/* SureDig sign-in — glass tokens aligned with the map dashboard shell. */

:root {
  --font: 'Public Sans', system-ui, -apple-system, sans-serif;
  --bg: #f4f5f3;
  --text: #1a1d21;
  --text-2: #3a4045;
  --muted: #5b6167;
  --faint: #8b9294;
  --water: #0f6ed8;
  --accent: #0f6ed8;
  --haze: rgba(244, 245, 243, .45);
  --glass: rgba(255, 255, 255, .62);
  --glass-72: rgba(255, 255, 255, .72);
  --glass-80: rgba(255, 255, 255, .80);
  --edge: rgba(190, 193, 200, .7);
  --hairline: rgba(120, 126, 134, .3);
  --chip-bg: rgba(28, 33, 36, .06);
  --field-bg: rgba(255, 255, 255, .72);
  --field-edge: rgba(120, 126, 134, .35);
  --ink: #1c2124;
  --ink-text: #fff;
  --ok: #0a9648;
  --shadow: 0 1px 1px rgba(0,0,0,.04), 0 4px 14px rgba(0,0,0,.06), 0 16px 40px rgba(0,0,0,.08);
  --shadow-hi: 0 1px 1px rgba(0,0,0,.05), 0 6px 20px rgba(0,0,0,.10), 0 24px 60px rgba(0,0,0,.14);
}
[data-theme="dark"] {
  --bg: #14181d;
  --text: #e8ecee;
  --text-2: #c3ccd2;
  --muted: #8b969e;
  --faint: #6e7a82;
  --water: #2f8fd6;
  --accent: #3fc6ff;
  --haze: rgba(20, 24, 29, .45);
  --glass: rgba(23, 29, 35, .62);
  --glass-72: rgba(23, 29, 35, .72);
  --glass-80: rgba(23, 29, 35, .78);
  --edge: rgba(255, 255, 255, .1);
  --hairline: rgba(255, 255, 255, .12);
  --chip-bg: rgba(255, 255, 255, .06);
  --field-bg: rgba(255, 255, 255, .07);
  --field-edge: rgba(255, 255, 255, .14);
  --ink: #e8ecee;
  --ink-text: #14181d;
  --ok: #22b366;
  --shadow: 0 1px 1px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.45);
  --shadow-hi: 0 1px 1px rgba(0,0,0,.5), 0 8px 24px rgba(0,0,0,.55), 0 28px 70px rgba(0,0,0,.65);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: var(--font); color: var(--text); background: var(--bg); font-size: 13px;
  display: grid; place-items: center;
}
#net { position: absolute; inset: 0; width: 100%; height: 100%; }
.haze {
  position: absolute; inset: 0;
  background: var(--haze);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 0.5px solid var(--edge);
  box-shadow: var(--shadow-hi);
}

.signin { position: relative; width: 392px; padding: 28px; border-radius: 22px; }
.head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.brand-logo {
  width: 36px; height: 36px; flex: none; padding: 6px;
  background: #1c2124; border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
[data-theme="dark"] .brand-logo {
  background: #0c0f12; border: 0.5px solid rgba(255,255,255,.12);
}
.title { font-weight: 800; font-size: 20px; line-height: 1.1; letter-spacing: -0.02em; }
.blurb { font-size: 13px; line-height: 1.5; color: var(--muted); margin-bottom: 18px; }
.blurb a { color: var(--accent); }

.lbl { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.field {
  display: block; width: 100%; height: 44px; padding: 0 14px; margin-bottom: 12px;
  background: var(--field-bg); border: 0.5px solid var(--field-edge); border-radius: 999px;
  font: inherit; font-size: 14px; color: var(--text); outline: none;
}
.field:focus { border: 1.5px solid var(--accent); box-shadow: 0 0 0 3px rgba(15,110,216,.14); }
[data-theme="dark"] .field:focus { box-shadow: 0 0 0 3px rgba(63,198,255,.14); }
.field-wrap { position: relative; margin-bottom: 12px; }
.field-wrap .field { margin-bottom: 0; padding-right: 44px; }
.eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: 999px; cursor: pointer;
  display: grid; place-items: center; background: transparent; color: var(--muted);
}
.eye:hover { color: var(--text); background: var(--chip-bg); }
.eye svg[hidden] { display: none; }
.error { font-size: 12px; color: #b1332c; margin: 0 0 12px; }
[data-theme="dark"] .error { color: #f08a8a; }
.submit {
  width: 100%; height: 44px; margin-top: 6px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ink); color: var(--ink-text); font: inherit; font-size: 13.5px; font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
}
.submit:disabled { opacity: .6; cursor: default; }

.terms {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 4px 0 10px; font-size: 12px; line-height: 1.45; color: var(--muted); cursor: pointer;
}
.terms[hidden] { display: none; }
.terms input {
  width: 16px; height: 16px; margin-top: 2px; flex: none; accent-color: var(--accent); cursor: pointer;
}
.terms-link {
  display: inline; padding: 0; border: 0; background: none;
  color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline;
}

/* terms dialog — glass panel over the login canvas */
.dialog-scrim {
  position: fixed; inset: 0; z-index: 40;
  display: grid; place-items: center; padding: 20px;
  background: rgba(10, 14, 18, .45); backdrop-filter: blur(6px);
}
.dialog-scrim[hidden] { display: none; }
.legal-dialog {
  width: min(520px, 100%); max-height: min(78vh, 640px);
  display: flex; flex-direction: column; border-radius: 18px; overflow: hidden;
  background: var(--glass-72, rgba(255,255,255,.86));
  border: 0.5px solid var(--hairline); color: var(--text);
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
}
[data-theme="dark"] .legal-dialog {
  background: rgba(22, 26, 32, .92);
}
.dlg-head {
  padding: 16px 18px 8px; font-weight: 800; font-size: 16px; letter-spacing: -0.02em;
}
.legal-body {
  padding: 0 18px 8px; overflow: auto; font-size: 13px; line-height: 1.55; color: var(--muted);
}
.legal-body p { margin: 0 0 12px; }
.legal-body b { color: var(--text); font-weight: 700; }
.legal-fine { font-size: 11.5px; opacity: .9; }
.legal-body .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.dlg-actions { padding: 10px 18px 16px; }
.dlg-actions .submit { margin-top: 0; }

.oauth-status {
  margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.4;
}

/* auth tabs — same pill language as dashboard presets */
.tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 16px; border-radius: 999px;
  background: var(--chip-bg); border: 0.5px solid var(--hairline);
}
.tab {
  flex: 1; height: 34px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700;
}
.tab.is-active {
  background: var(--ink); color: var(--ink-text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
}

.trial-badge {
  display: inline-block; margin-top: 4px; padding: 2px 9px; border-radius: 999px;
  background: rgba(10,150,72,.14); color: var(--ok);
  font-size: 11px; font-weight: 800; letter-spacing: .02em;
}

.price { margin: 6px 0 4px; font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.price span { font-size: 13px; font-weight: 600; color: var(--muted); }
.price-note {
  margin: 0 0 16px; font-size: 12px; font-weight: 600; color: var(--muted); opacity: 0.75;
}
.linkbtn {
  display: block; width: 100%; margin-top: 12px; padding: 8px; border: 0; background: none;
  color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: underline;
}
