  :root {
    --red: #FF6B6B;
  }
  body {
    font-family: 'Outfit', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100dvh;
    display: grid; place-items: center;
    overflow-x: hidden;
  }

  /* Backdrop */
  .bg-grid {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background-image:
      linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.5;
    mask-image: radial-gradient(ellipse at 50% 50%, black 20%, transparent 70%);
  }
  .bg-glow {
    position: fixed; pointer-events: none; z-index: 0;
    width: 700px; height: 700px; border-radius: 50%;
    background: radial-gradient(circle, var(--gold-glow) 0%, transparent 60%);
    top: 50%; left: 30%; transform: translate(-50%, -50%);
    opacity: 0.25; filter: blur(40px);
  }
  .bg-glow-2 {
    position: fixed; pointer-events: none; z-index: 0;
    width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, var(--mint-glow) 0%, transparent 60%);
    top: 50%; left: 70%; transform: translate(-50%, -50%);
    opacity: 0.18; filter: blur(60px);
  }

  /* Crown / iAthelit symbol - animated SVG */
  .symbol {
    width: 80px; height: 80px;
    margin: 0 auto 24px;
    display: grid; place-items: center;
    position: relative;
  }
  .symbol::before {
    content: ''; position: absolute; inset: -12px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--gold-glow), transparent 70%);
    opacity: 0.6;
  }
  .symbol img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; }

  /* Wrapper */
  .wrap {
    position: relative; z-index: 2;
    display: grid; grid-template-columns: 1fr 480px;
    width: min(1100px, calc(100vw - 48px));
    min-height: 600px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
    box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  }
  .wrap::before, .wrap::after {
    content: ''; position: absolute; width: 18px; height: 18px;
    border: 1px solid var(--gold); pointer-events: none;
  }
  .wrap::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
  .wrap::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }

  /* Left panel - branded */
  .left {
    padding: 56px 48px;
    display: flex; flex-direction: column; justify-content: space-between;
    background:
      linear-gradient(135deg, rgba(170,138,82,0.08) 0%, transparent 50%),
      linear-gradient(180deg, var(--panel) 0%, var(--bg-2) 100%);
    border-right: 1px solid var(--line);
    position: relative;
    overflow: hidden;
  }
  .brand-row { display: flex; align-items: center; gap: 14px; }
  .brand-sub { font-size: 11px; color: var(--text-faint); letter-spacing: 0.2em; text-transform: uppercase; padding-left: 14px; border-left: 1px solid var(--line); }

  .left-mid {
    margin-top: 60px;
  }
  .eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold);
    margin-bottom: 20px;
  }
  .eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--gold); }
  .left-title {
    font-size: clamp(34px, 4vw, 52px);
    line-height: 0.95; font-weight: 800;
    letter-spacing: -0.02em; margin: 0 0 20px;
    text-transform: uppercase;
  }
  .left-title .gilded {
    background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 50%, var(--gold-deep) 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  }
  .left-sub { font-size: 14px; color: var(--text-dim); line-height: 1.6; max-width: 380px; margin: 0; }

  .nav-links { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; }
  .nav-link {
    padding: 8px 14px;
    font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700;
    color: var(--text-dim); cursor: pointer; border-radius: 2px;
    appearance: none;
    background: transparent;
    font-family: inherit;
    text-decoration: none;
    transition: color .2s, background .2s;
    border: 1px solid transparent;
  }

  .left-foot {
    display: flex; flex-direction: column; gap: 14px;
    border-top: 1px solid var(--line-soft); padding-top: 24px;
  }
  .stat-line { display: flex; justify-content: space-between; align-items: baseline; }
  .stat-line-label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim); }
  .stat-line-val { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .stat-line-val.gold { color: var(--gold); }
  .stat-line-val.mint { color: var(--mint); }
  .live-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 12px; border: 1px solid var(--mint); border-radius: 999px;
    background: var(--mint-soft);
    font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mint);
    font-weight: 700; align-self: flex-start;
  }
  .live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint-glow); animation: pulse 1.6s infinite; }
  @keyframes pulse { 0%,100% {opacity:1} 50% {opacity:.4} }

  /* Decorative grid - left panel */
  .left-deco {
    position: absolute; bottom: -40px; right: -40px;
    width: 220px; height: 220px;
    border: 1px solid var(--line);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.4;
  }
  .left-deco::after {
    content: ''; position: absolute; inset: 30px;
    border: 1px dashed var(--line);
    border-radius: 50%;
  }

  /* Right panel - form */
  .right {
    padding: 56px 48px;
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, var(--panel-2) 0%, var(--bg-2) 100%);
    position: relative;
  }

  .tabs {
    display: flex; gap: 0; margin-bottom: 32px;
    border-bottom: 1px solid var(--line-soft);
  }
  .tab {
    flex: 1; padding: 14px 0;
    background: transparent; border: none; font-family: inherit;
    font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700;
    color: var(--text-dim); cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
    margin-bottom: -1px;
  }
  .tab:hover { color: var(--text); }
  .tab.active { color: var(--gold); border-bottom-color: var(--gold); }

  .form-head {
    margin-bottom: 28px;
  }
  .form-title { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; text-transform: uppercase; margin: 0 0 6px; }
  .form-sub { font-size: 12px; color: var(--text-dim); margin: 0; }

  .field { margin-bottom: 20px; }
  .field-label {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-faint);
    margin-bottom: 8px; font-weight: 700;
  }
  .field-label a,
  .field-label button {
    color: var(--gold); text-decoration: none; font-weight: 700;
    letter-spacing: 0.2em; font-size: 11px;
  }
  .field-label button {
    appearance: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    text-transform: uppercase;
  }
  .field-label a:hover,
  .field-label button:hover { color: var(--gold-hi); }
  .input-wrap {
    position: relative;
    display: flex; align-items: center;
  }
  .input-icon {
    position: absolute; left: 14px;
    color: var(--text-faint);
    pointer-events: none;
    display: grid; place-items: center;
  }
  .input {
    width: 100%;
    padding: 14px 14px 14px 46px;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--line-soft);
    color: var(--text);
    font-family: inherit; font-size: 14px;
    transition: border-color .15s, background .15s;
    border-radius: 0;
  }
  .input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(170, 138, 82, 0.04);
  }
  .input:focus + .input-icon, .input-wrap:focus-within .input-icon { color: var(--gold); }
  .input::placeholder { color: var(--text-faint); }
  .input.password { padding-right: 46px; }
  .toggle-pw {
    position: absolute; right: 12px;
    background: transparent; border: none; color: var(--text-faint);
    cursor: pointer; padding: 4px;
    display: grid; place-items: center;
  }
  .toggle-pw:hover,
  .toggle-pw:focus-visible { color: var(--gold); }

  /* Strength meter */
  .strength {
    display: flex; gap: 4px; margin-top: 8px;
  }
  .strength-bar {
    flex: 1; height: 3px; background: rgba(255,255,255,0.06);
    transition: background .2s;
  }
  .strength-bar.on { background: var(--gold); box-shadow: 0 0 6px var(--gold-glow); }
  .strength-bar.on.mint { background: var(--mint); box-shadow: 0 0 6px var(--mint-glow); }
  .strength-label { font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--text-faint); margin-top: 6px; }
  .strength-label.mint { color: var(--mint); }
  .strength-label.gold { color: var(--gold); }
  .strength-label.red { color: var(--red); }

  .row { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 24px; }
  .checkbox {
    display: inline-flex; align-items: center; gap: 10px;
    cursor: pointer; user-select: none;
  }
  .checkbox input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .checkbox-box {
    width: 16px; height: 16px;
    border: 1px solid var(--line);
    background: rgba(0,0,0,0.4);
    display: grid; place-items: center;
    transition: all .15s;
  }
  .checkbox input:checked + .checkbox-box {
    background: var(--gold); border-color: var(--gold);
    box-shadow: 0 0 8px var(--gold-glow);
  }
  .checkbox input:checked + .checkbox-box::after {
    content: ''; width: 8px; height: 4px;
    border-left: 2px solid #000; border-bottom: 2px solid #000;
    transform: rotate(-45deg) translate(1px, -1px);
  }
  .checkbox input:focus-visible + .checkbox-box {
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(170, 138, 82, 0.28);
  }
  .checkbox-label { font-size: 11px; color: var(--text-dim); letter-spacing: 0.05em; }

  .submit-btn {
    width: 100%; padding: 16px;
    background: var(--gold); color: #000;
    border: none; font-family: inherit; font-weight: 800;
    font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    position: relative; overflow: hidden;
    transition: box-shadow .2s, transform .1s;
  }
  .submit-btn:hover { background: var(--gold-hi); box-shadow: 0 0 24px var(--gold-glow); }
  .submit-btn:active { transform: translateY(1px); }
  .submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

  /* Divider */
  .divider {
    display: flex; align-items: center; gap: 14px;
    margin: 28px 0 20px;
    font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-faint);
  }
  .divider::before, .divider::after {
    content: ''; flex: 1; height: 1px; background: var(--line-soft);
  }

  /* SSO buttons */
  .sso-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .sso-row.single { grid-template-columns: 1fr; }
  .sso-btn {
    padding: 14px 8px;
    min-height: 44px;
    background: #000;
    border: 1px solid var(--line-soft);
    color: #fff;
    font-family: system-ui, sans-serif;
    font-size: 18px; letter-spacing: normal; text-transform: none; font-weight: 500;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all .15s;
  }
  .sso-btn:hover { background: #161616; border-color: var(--text-dim); }
  .sso-btn svg { flex-shrink: 0; }


  .switch-row {
    margin-top: auto; padding-top: 28px;
    text-align: center;
    font-size: 11px; color: var(--text-dim); letter-spacing: 0.05em;
  }
  .switch-row a {
    color: var(--gold); font-weight: 700; text-decoration: none;
    letter-spacing: 0.15em; text-transform: uppercase; font-size: 11px;
    margin-left: 6px;
  }
  .switch-row button {
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--gold);
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-left: 6px;
    padding: 0;
    text-transform: uppercase;
    font-size: 11px;
  }
  .switch-row a:hover,
  .switch-row button:hover { color: var(--gold-hi); }
  .switch-row button:first-child { margin-left: 0; }

  /* Footer */
  .signature a { color: inherit; text-decoration: none; pointer-events: auto; } .signature a:hover { color: var(--gold); } .signature {
    position: fixed; bottom: 16px; left: 0; right: 0;
    display: flex; justify-content: center; align-items: center; gap: 24px;
    font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-dim);
    z-index: 1; pointer-events: none;
  }
  .signature .sig-blink::after { content: '_'; color: var(--gold); animation: blink 1s step-end infinite; }

  /* Error toast */
  .toast {
    margin-bottom: 16px;
    padding: 10px 14px;
    border: 1px solid var(--red);
    background: rgba(255, 107, 107, 0.08);
    color: var(--red);
    font-size: 11px; letter-spacing: 0.1em;
    display: flex; align-items: center; gap: 10px;
  }
  .toast.success {
    border-color: var(--mint);
    color: var(--mint);
  }

  .legal-link {
    color: var(--gold);
    text-decoration: none;
  }

  .legal-link:hover,
  .legal-link:focus-visible {
    color: var(--gold-hi);
  }

  .config-required,
  .no-js {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 60px auto;
    padding: 40px;
    background: var(--panel);
    border: 1px solid var(--gold);
    color: var(--text);
    font-family: 'Outfit', system-ui, sans-serif;
  }

  .config-required h1,
  .no-js h1 {
    color: var(--gold);
    font-size: 22px;
    margin: 0 0 12px;
  }

  .config-required p,
  .no-js p {
    color: var(--text-dim);
    margin: 0 0 20px;
  }

  .config-required ol {
    line-height: 1.7;
    margin: 0;
  }

  .config-required code {
    color: var(--mint);
  }

  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  [role="button"]:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
  }

  /* Responsive */
  @media (max-width: 880px) {
    .wrap { grid-template-columns: 1fr; }
    .left { display: none; }
    body { padding: 32px 0; align-items: flex-start; }
    .right { padding: 40px 28px; }
    .signature { position: static; padding: 24px; flex-direction: column; gap: 8px; }
  }

/* Touch devices: inputs under 16px make iOS Safari zoom the page on focus */
  @media (pointer: coarse) {
    .input { font-size: 16px; }
  }
