/* us-phone-number.com member UI: login / register layer, member pages and
   /dash. Card style after Tabler, in this site's colours (#28c buttons, dark
   navbar). Everything is prefixed m- so the old bootstrap styles do not
   interfere. */
:root {
  --m-primary: #2288cc;
  --m-primary-hover: #1e79b6;
  --m-primary-soft: #e8f3fb;
  --m-text: #1f2a37;
  --m-muted: #6b7686;
  --m-border: #dce3ea;
  --m-bg: #f4f7fa;
  --m-danger: #d63939;
  --m-danger-soft: #fdecec;
  --m-success: #2fb344;
  --m-success-soft: #eaf7ec;
  --m-radius: 10px;
  --m-shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 8px 24px rgba(20, 30, 50, .08);
  --m-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------------------------------------------------------------- page frame */
.m-body { background: var(--m-bg); }
.m-main { padding: 96px 0 56px; min-height: calc(100vh - 120px); font-family: var(--m-font); color: var(--m-text); }
.m-narrow { max-width: 440px; margin: 0 auto; }
.m-wide { max-width: 960px; margin: 0 auto; }

/* ---------------------------------------------------------------- card */
.m-card { background: #fff; border: 1px solid var(--m-border); border-radius: 14px; box-shadow: var(--m-shadow); padding: 28px; }
.m-card + .m-card { margin-top: 16px; }
.m-card-title { font-size: 17px; font-weight: 600; margin: 0 0 4px; color: var(--m-text); }
.m-card-sub { font-size: 14px; color: var(--m-muted); margin: 0 0 18px; }
.m-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 18px; text-decoration: none !important; }
.m-brand img { width: 34px; height: 34px; }
.m-brand span { font-size: 17px; font-weight: 700; color: var(--m-text); }

/* ---------------------------------------------------------------- headings */
.m-auth h2, .m-h2 { font-size: 22px; font-weight: 700; text-align: center; margin: 0 0 6px; color: var(--m-text); letter-spacing: -.01em; }
.m-sub { font-size: 14px; color: var(--m-muted); text-align: center; margin: 0 0 22px; line-height: 1.5; }

/* ---------------------------------------------------------------- form */
.m-auth, .m-card, .m-dialog { font-family: var(--m-font); }
.m-field { display: block; margin: 0 0 14px; }
.m-field > span, .m-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 600; color: var(--m-text); margin-bottom: 6px; }
.m-input, .m-field input, .m-field select {
  display: block; width: 100%; height: 42px; padding: 0 12px; font-size: 15px; color: var(--m-text);
  background: #fff; border: 1px solid var(--m-border); border-radius: var(--m-radius); outline: none;
  transition: border-color .15s, box-shadow .15s; box-shadow: none; font-family: inherit;
}
.m-field input:focus, .m-field select:focus, .m-input:focus { border-color: var(--m-primary); box-shadow: 0 0 0 3px rgba(34, 136, 204, .15); }
.m-field input.is-invalid { border-color: var(--m-danger); box-shadow: 0 0 0 3px rgba(214, 57, 57, .12); }
.m-err { display: block; font-size: 12.5px; color: var(--m-danger); margin-top: 5px; }
.m-row { display: flex; gap: 8px; }
.m-row > * { flex: 1 1 0; min-width: 0; }
.m-row > .m-btn { flex: 0 0 auto; height: 42px; }
.m-hint { font-size: 12.5px; color: var(--m-muted); margin-top: 5px; }
.m-turnstile { margin: 4px 0 14px; min-height: 0; }
.m-turnstile:empty { margin: 0; }
.m-field .iti { width: 100%; display: block; }
.m-field .iti input { padding-left: 52px; }

/* ---------------------------------------------------------------- buttons */
.m-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px;
  font-size: 15px; font-weight: 600; line-height: 1; border-radius: var(--m-radius); border: 1px solid transparent;
  cursor: pointer; text-decoration: none !important; transition: background .15s, border-color .15s, color .15s; font-family: inherit;
}
.m-btn[disabled], .m-btn.is-busy { opacity: .6; cursor: default; }
.m-btn-block { display: flex; width: 100%; }
.m-btn-primary { background: var(--m-primary); color: #fff !important; }
.m-btn-primary:hover:not([disabled]) { background: var(--m-primary-hover); }
.m-btn-light { background: #fff; color: var(--m-text) !important; border-color: var(--m-border); }
.m-btn-light:hover:not([disabled]) { background: #f6f8fa; }
.m-btn-soft { background: var(--m-primary-soft); color: var(--m-primary) !important; }
.m-btn-soft:hover:not([disabled]) { background: #d9ebf8; }
.m-btn-danger { background: var(--m-danger); color: #fff !important; }
.m-btn-danger:hover:not([disabled]) { background: #bf2f2f; }
.m-btn-google img { width: 18px; height: 18px; }
.m-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; font-size: 12.5px; color: var(--m-muted); text-transform: uppercase; letter-spacing: .06em; }
.m-or::before, .m-or::after { content: ""; flex: 1; height: 1px; background: var(--m-border); }
.m-link { color: var(--m-primary) !important; font-weight: 600; cursor: pointer; text-decoration: none !important; }
.m-link:hover { text-decoration: underline !important; }
.m-switch { text-align: center; font-size: 14px; color: var(--m-muted); margin: 18px 0 0; }

/* ---------------------------------------------------------------- alerts */
.m-alert { font-size: 14px; line-height: 1.5; border-radius: var(--m-radius); padding: 10px 12px; margin: 0 0 14px; }
.m-alert[hidden] { display: none; }
.m-alert-error { background: var(--m-danger-soft); color: #9f2525; }
.m-alert-ok { background: var(--m-success-soft); color: #1d7a2e; }
.m-alert-info { background: var(--m-primary-soft); color: #175f8f; }

/* ---------------------------------------------------------------- register steps */
.m-steps { display: flex; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.m-steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--m-muted); padding-bottom: 8px; border-bottom: 3px solid var(--m-border); }
.m-steps li b { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; background: var(--m-border); color: #fff; font-size: 12px; }
.m-steps li.is-active { color: var(--m-text); border-color: var(--m-primary); font-weight: 600; }
.m-steps li.is-active b, .m-steps li.is-done b { background: var(--m-primary); }
.m-steps li.is-done { border-color: var(--m-primary); }

/* ---------------------------------------------------------------- views */
.m-view { display: none; }
.m-auth[data-view="login"] .m-view[data-v="login"],
.m-auth[data-view="register"] .m-view[data-v="register"],
.m-auth[data-view="details"] .m-view[data-v="details"],
.m-auth[data-view="forgot"] .m-view[data-v="forgot"] { display: block; }

/* ---------------------------------------------------------------- the layer */
.m-modal { position: fixed; inset: 0; z-index: 2000; display: none; align-items: flex-start; justify-content: center; padding: 6vh 16px 24px; background: rgba(15, 23, 35, .55); overflow-y: auto; }
.m-modal.is-open { display: flex; animation: m-fade .15s ease-out; }
.m-modal-box { position: relative; width: 100%; max-width: 420px; background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); padding: 30px 28px 24px; animation: m-rise .18s ease-out; }
.m-close { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border: 0; background: transparent; border-radius: 8px; font-size: 24px; line-height: 1; color: var(--m-muted); cursor: pointer; }
.m-close:hover { background: #f1f4f7; color: var(--m-text); }
.m-modal-intro { font-size: 13.5px; color: #8a5a00; background: #fff6e0; border-radius: var(--m-radius); padding: 10px 12px; margin: 0 0 18px; line-height: 1.5; }
.m-extra { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--m-border); font-size: 13.5px; text-align: center; color: var(--m-muted); }
.m-extra a { color: var(--m-primary); font-weight: 600; }
.m-extra > div + div { margin-top: 6px; }
html.m-locked { overflow: hidden; }
@keyframes m-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes m-rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------- dialog (confirm) */
.m-dialog .m-modal-box { max-width: 400px; text-align: center; }
.m-dialog p { font-size: 15px; color: var(--m-text); margin: 6px 0 22px; line-height: 1.55; }
.m-dialog .m-row { justify-content: center; }

/* ---------------------------------------------------------------- /dash */
.m-dash { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.m-profile { text-align: center; }
.m-avatar { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #2288cc, #36b3d9); }
.m-profile-name { font-size: 19px; font-weight: 700; margin: 0; word-break: break-word; }
.m-profile-mail { font-size: 14px; color: var(--m-muted); margin: 4px 0 16px; word-break: break-all; }
.m-facts { list-style: none; padding: 0; margin: 0 0 18px; text-align: left; border-top: 1px solid var(--m-border); }
.m-facts li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 10px 0; border-bottom: 1px solid var(--m-border); }
.m-facts li span { color: var(--m-muted); }
.m-badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #eef1f5; color: var(--m-muted); }
.m-badge-ok { background: var(--m-success-soft); color: #1d7a2e; }
.m-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.m-danger-zone { border-color: #f3c9c9; }
.m-danger-zone .m-card-title { color: #a52a2a; }
.m-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.m-code { display: flex; gap: 8px; justify-content: center; margin: 18px 0; }
.m-code input { width: 46px; height: 52px; text-align: center; font-size: 22px; font-weight: 600; border: 1px solid var(--m-border); border-radius: var(--m-radius); outline: none; }
.m-code input:focus { border-color: var(--m-primary); box-shadow: 0 0 0 3px rgba(34, 136, 204, .15); }
.m-center { text-align: center; }
.m-icon-ok, .m-icon-bad { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #fff; }
.m-icon-ok { background: var(--m-success); }
.m-icon-bad { background: var(--m-danger); }

@media (max-width: 767px) {
  .m-main { padding-top: 80px; }
  .m-dash { grid-template-columns: 1fr; }
  .m-card { padding: 22px 18px; }
  .m-grid2 { grid-template-columns: 1fr; }
  .m-modal { padding-top: 3vh; }
  .m-modal-box { padding: 26px 18px 20px; }
}
.m-field > span em.m-hint { margin: 0; font-weight: 400; }
