:root {
  --bg: #f4f3ef; --bg-2: #ffffff; --bg-3: #eae9e3;
  --brand: #1b2a4a; --accent: #1a7a4a;
  --ink: #15141a; --ink-2: #5c5b62; --ink-3: #9e9da4;
  --border: #e2e1dd; --r: 12px; --r-sm: 8px;
  --shadow: 0 2px 16px rgba(21,20,26,0.08);
  --danger: #dc2626;
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.5; min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
svg { display: block; }

/* Standard public nav */
nav.site-nav{position:sticky;top:0;z-index:100;background:rgba(244,243,239,0.95);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-bottom:1px solid #e2e1dd;padding:0 20px}
.nav-inner{max-width:1100px;margin:0 auto;height:60px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.nav-logo{display:flex;align-items:center;gap:10px;flex-shrink:0;text-decoration:none}
.logo-mark{width:32px;height:32px;background:#1b2a4a;border-radius:8px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.logo-text{font-size:19px;font-weight:800;color:#1b2a4a;letter-spacing:-0.5px}
.nav-links{display:flex;align-items:center;gap:4px}
.nav-link{font-size:14px;font-weight:600;color:#5c5b62;padding:8px 12px;border-radius:8px;transition:color 0.15s,background 0.15s;white-space:nowrap;text-decoration:none}
.nav-link:hover{color:#15141a;background:#eae9e3}
.btn-nav{font-size:13px;font-weight:700;color:#1b2a4a;background:transparent;border:1.5px solid rgba(21,20,26,0.16);cursor:pointer;padding:8px 16px;border-radius:8px;transition:background 0.15s;white-space:nowrap;min-height:38px;text-decoration:none;display:inline-flex;align-items:center}
.btn-nav:hover{background:#eae9e3}
@media(max-width:600px){.nav-links{gap:2px}.nav-link{padding:8px 8px;font-size:13px}}

/* App nav (authenticated) */
.top-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px; border-bottom: 1px solid rgba(21,20,26,0.09);
  background: rgba(244,243,239,0.95); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 10;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-mark { width: 34px; height: 34px; background: var(--brand); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.nav-name { font-size: 18px; font-weight: 800; letter-spacing: -.03em; color: var(--brand); }
.nav-domain { font-family: var(--mono); font-size: 8px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: 1px; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-user { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.nav-avatar { width: 30px; height: 30px; background: var(--bg-3); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: var(--brand); }
.btn-signout { font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 5px 10px; border-radius: 5px; transition: color .15s, background .15s; }
.btn-signout:hover { color: var(--ink); background: var(--bg-3); }

/* Loader */
.loader { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; z-index: 100; }
.spin { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader--hide { display: none; }

/* Main */
.main { max-width: 600px; margin: 0 auto; padding: 52px 24px 80px; }
.page-eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 10px; }
.page-title { font-size: 28px; font-weight: 800; letter-spacing: -.025em; color: var(--brand); margin-bottom: 6px; }
.page-sub { font-size: 14px; color: var(--ink-2); line-height: 1.6; margin-bottom: 36px; max-width: 480px; }

/* Form card */
.form-card { background: var(--bg-2); border: 1.5px solid var(--border); border-radius: var(--r); padding: 28px 24px; }
.form-section { margin-bottom: 24px; }
.form-section-title { font-size: 11px; font-weight: 700; color: var(--brand); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.fg { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.form-label { font-size: 12px; font-weight: 700; color: var(--ink-2); letter-spacing: .03em; }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-input {
  width: 100%; font-family: var(--font); font-size: 14px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  padding: 10px 12px; background: var(--bg); color: var(--ink);
  outline: none; transition: border-color .15s;
}
.form-input:focus { border-color: var(--brand); background: #fff; }
.form-input::placeholder { color: var(--ink-3); font-weight: 400; }
.form-input.err { border-color: var(--danger); }
select.form-input { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%231b2a4a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 8px; padding-right: 36px; cursor: pointer; }
.form-hint { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.form-link { color: var(--accent); font-size: 11px; font-weight: 600; text-decoration: underline; margin-top: 3px; display: inline-block; }

/* Phone row */
.phone-row { display: flex; gap: 8px; }
.phone-pfx { height: 42px; padding: 0 10px; border: 1.5px solid var(--border); border-radius: var(--r-sm); background: var(--bg-3); font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--ink-2); display: flex; align-items: center; white-space: nowrap; flex-shrink: 0; }
.phone-row .form-input { flex: 1; }

/* Submit button */
.btn-submit {
  width: 100%; font-family: var(--font); font-size: 15px; font-weight: 800;
  background: var(--brand); color: #fff;
  border: none; border-radius: var(--r-sm); padding: 14px;
  cursor: pointer; min-height: 48px; margin-top: 8px;
  transition: background .15s; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-submit:hover { background: #233661; }
.btn-submit:disabled { background: var(--ink-3); cursor: not-allowed; }
.btn-back { font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 10px; margin-top: 8px; width: 100%; text-align: center; transition: color .15s; }
.btn-back:hover { color: var(--brand); }

/* Error row */
.form-error { color: var(--danger); font-size: 12px; font-weight: 600; margin-top: 4px; min-height: 18px; }

/* Success state */
.success-card { text-align: center; padding: 40px 20px; }
.success-icon { font-size: 48px; margin-bottom: 16px; }
.success-title { font-size: 20px; font-weight: 800; color: var(--brand); margin-bottom: 8px; }
.success-body { font-size: 14px; color: var(--ink-2); line-height: 1.65; margin-bottom: 24px; max-width: 380px; margin-left: auto; margin-right: auto; }
.btn-home { display: inline-flex; align-items: center; gap: 8px; background: var(--brand); color: #fff; font-family: var(--font); font-size: 14px; font-weight: 700; padding: 12px 24px; border-radius: var(--r-sm); cursor: pointer; border: none; transition: background .15s; }
.btn-home:hover { background: #233661; }

/* Toast */
.lo-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: rgba(21,20,26,0.92); color: #fff; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; padding: 12px 20px; font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow); z-index: 200; white-space: nowrap;
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.lo-toast--show { opacity: 1; }

@media (max-width: 640px) {
  .main { padding: 32px 16px 60px; }
  .top-nav { padding: 14px 16px; }
  .form-card { padding: 20px 16px; }
}
