
    /* ── CSS Variables (mirrors main.css) ────────────────────── */
    :root {
      --primary:        #0d47a1;
      --secondary:      #1565c0;
      --nav-glow-1:     #00e5ff;
      --nav-glow-2:     #7c4dff;
      --nav-glow-3:     rgba(255,255,255,0.95);
      --bg:             #ffffff;
      --bg-secondary:   #f5f5f5;
      --card-bg:        #f5f7fa;
      --text:           #111111;
      --text-secondary: #444444;
      --border:         #e0e0e0;
      --shadow:         rgba(0,0,0,0.1);
      --footer-bg:      #f0f0f0;
      --footer-text:    #333333;
      --footer-link:    #0d47a1;
      --radius-sm:  6px;
      --radius-md:  10px;
      --radius-lg:  16px;
      --input-bg:       #ffffff;
      --input-border:   #cdd6e8;
      --input-focus:    #1976d2;
      --tab-active-bg:  #0d47a1;
    }

    [data-theme="dark"] {
      --primary:        #90caf9;
      --secondary:      #64b5f6;
      --nav-glow-1:     #00bcd4;
      --nav-glow-2:     #9575cd;
      --nav-glow-3:     rgba(255,255,255,0.7);
      --bg:             #121212;
      --bg-secondary:   #1e1e1e;
      --card-bg:        #1e1e1e;
      --text:           #e0e0e0;
      --text-secondary: #bbbbbb;
      --border:         #333333;
      --shadow:         rgba(0,0,0,0.5);
      --footer-bg:      #1a1a1a;
      --footer-text:    #aaaaaa;
      --footer-link:    #90caf9;
      --input-bg:       #2a2a2a;
      --input-border:   #444;
      --input-focus:    #64b5f6;
      --tab-active-bg:  #1565c0;
    }

    /* ── Global Reset ─────────────────────────────────────────── */
    html { box-sizing: border-box; }
    *, *::before, *::after {
      box-sizing: inherit;
      transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    }

    .sr-only {
      position: absolute; width: 1px; height: 1px;
      padding: 0; margin: -1px; overflow: hidden;
      clip: rect(0 0 0 0); white-space: nowrap; border: 0;
    }

    body {
      margin: 0; padding: 0;
      font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
      background-color: var(--bg);
      color: var(--text);
      line-height: 1.6;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    /* ── Header (matches main.css exactly) ──────────────────── */
    header {
      background: linear-gradient(90deg, #0d47a1, #1976d2);
      color: #fff;
      padding: 18px 20px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      box-shadow: 0 4px 8px rgba(0,0,0,0.15);
      position: sticky;
      top: 0;
      z-index: 100;
    }

    header h1 {
      margin: 0;
      font-size: 1.65rem;
      font-family: 'Playfair Display', serif;
      font-weight: 700;
      letter-spacing: .5px;
      white-space: nowrap;
    }

    @media (max-width: 480px) {
      header h1 { font-size: 1.35rem; }
    }

    .logo {
      position: relative;
      color: #fff;
      text-decoration: none;
      display: inline-block;
    }
    .logo::after {
      content: "";
      position: absolute;
      width: 0; height: 3px;
      left: 0; bottom: -4px;
      background: linear-gradient(90deg, var(--nav-glow-1), var(--nav-glow-2));
      border-radius: 2px;
      transition: width 0.4s ease;
    }
    .logo:hover::after { width: 100%; }

    nav ul {
      list-style: none; margin: 0; padding: 0;
      display: flex; gap: 28px; align-items: center;
    }
    nav ul li a {
      text-decoration: none; color: #fff;
      font-size: 1.05em; font-weight: 600;
      position: relative;
      transition: color 0.3s ease, transform 0.3s ease;
    }
    nav ul li a::after {
      content: "";
      position: absolute;
      width: 0; height: 3px;
      left: 0; bottom: -4px;
      background: linear-gradient(90deg, var(--nav-glow-1), var(--nav-glow-2));
      border-radius: 2px;
      transition: width 0.4s ease;
    }
    nav ul li a:hover {
      color: #fff;
      transform: scale(1.07);
      text-shadow: 0 0 6px var(--nav-glow-3), 0 0 16px var(--nav-glow-1), 0 0 28px var(--nav-glow-2);
      filter: drop-shadow(0 0 4px var(--nav-glow-1));
    }
    nav ul li a:hover::after { width: 100%; }

    .theme-toggle {
      background: transparent;
      border: 1.5px solid rgba(255,255,255,0.5);
      border-radius: 20px;
      cursor: pointer;
      font-size: 16px;
      padding: 4px 10px;
      line-height: 1;
      color: #fff;
    }
    .theme-toggle:hover {
      background: rgba(255,255,255,0.15);
      border-color: rgba(255,255,255,0.85);
    }

    /* ── Auth Layout ─────────────────────────────────────────── */
    main {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 48px 20px 80px;
      background-color: var(--bg);
      /* subtle geometric background */
      background-image:
        radial-gradient(circle at 15% 20%, rgba(13,71,161,0.07) 0%, transparent 55%),
        radial-gradient(circle at 85% 80%, rgba(124,77,255,0.06) 0%, transparent 55%);
    }

    /* ── Auth Card (extends .card from main.css) ─────────────── */
    .auth-card {
      background: var(--card-bg);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      padding: 44px 40px 40px;
      width: 100%;
      max-width: 460px;
      border-radius: var(--radius-lg);
      box-shadow: 0 4px 32px rgba(0,0,0,0.10);
      border: 1px solid rgba(255,255,255,0.4);
      position: relative;
      overflow: hidden;
      opacity: 0;
      transform: translateY(20px) scale(.98);
      animation: fadeUp .8s cubic-bezier(.2,.6,.3,1) forwards;
      animation-delay: .1s;
    }

    [data-theme="dark"] .auth-card {
      border-color: var(--border);
      box-shadow: 0 4px 32px rgba(0,0,0,0.4);
    }

    /* shimmer gloss on card */
    .auth-card::before {
      content: "";
      position: absolute;
      top: -100%; left: -100%;
      width: 200%; height: 200%;
      background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.2), transparent 60%);
      opacity: 1;
      pointer-events: none;
    }

    /* decorative top stripe */
    .auth-card::after {
      content: "";
      position: absolute;
      top: 0; left: 0; right: 0;
      height: 4px;
      background: linear-gradient(90deg, var(--nav-glow-1), var(--nav-glow-2), #0d47a1);
    }

    .auth-card h1 {
      margin: 0 0 6px;
      font-size: 1.7rem;
      font-family: 'Playfair Display', serif;
      font-weight: 700;
      color: var(--primary);
      text-align: center;
      letter-spacing: .3px;
    }

    .auth-subtitle {
      text-align: center;
      color: var(--text-secondary);
      font-size: 0.9rem;
      margin: 0 0 28px;
    }

    /* ── Tabs ────────────────────────────────────────────────── */
    .auth-tabs {
      display: flex;
      border-radius: var(--radius-md);
      background: var(--bg-secondary);
      border: 1px solid var(--border);
      padding: 4px;
      margin-bottom: 28px;
      gap: 4px;
    }

    .tab-btn {
      flex: 1;
      padding: 9px 0;
      border: none;
      border-radius: calc(var(--radius-md) - 2px);
      cursor: pointer;
      font-family: 'Poppins', sans-serif;
      font-size: 0.9rem;
      font-weight: 600;
      background: transparent;
      color: var(--text-secondary);
      transition: background 0.25s, color 0.25s, box-shadow 0.25s;
    }

    .tab-btn.active {
      background: var(--tab-active-bg);
      color: #fff;
      box-shadow: 0 2px 8px rgba(13,71,161,0.25);
    }

    /* ── Forms ───────────────────────────────────────────────── */
    form { display: flex; flex-direction: column; gap: 18px; }

    form label {
      display: flex;
      flex-direction: column;
      gap: 6px;
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--text-secondary);
      letter-spacing: 0.03em;
    }

    form input,
    form select {
      padding: 11px 14px;
      border-radius: var(--radius-sm);
      border: 1.5px solid var(--input-border);
      background: var(--input-bg);
      color: var(--text);
      font-family: 'Poppins', sans-serif;
      font-size: 0.95rem;
      outline: none;
      transition: border-color 0.2s, box-shadow 0.2s;
    }

    form input::placeholder { color: #aab; }

    form input:focus,
    form select:focus {
      border-color: var(--input-focus);
      box-shadow: 0 0 0 3px rgba(25,118,210,0.15);
    }

    form select { appearance: none; cursor: pointer; }

    /* ── Password visibility wrapper ────────────────────────── */
    .pw-wrap {
      position: relative;
      display: flex;
      align-items: center;
    }
    .pw-wrap input {
      flex: 1;
      padding-right: 44px; /* room for the eye button */
    }
    .pw-toggle {
      position: absolute;
      right: 4px;
      background: none;
      border: none;
      cursor: pointer;
      font-size: 1rem;
      padding: 6px 8px;
      line-height: 1;
      color: var(--text-secondary);
      border-radius: var(--radius-sm);
      transition: background 0.15s;
    }
    .pw-toggle:hover { background: rgba(0,0,0,0.06); }
    [data-theme="dark"] .pw-toggle:hover { background: rgba(255,255,255,0.08); }

    /* ── Primary button ──────────────────────────────────────── */
    .btn-primary {
      padding: 12px 0;
      background: linear-gradient(90deg, #0d47a1, #1976d2);
      color: #fff;
      border: none;
      border-radius: var(--radius-sm);
      font-family: 'Poppins', sans-serif;
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
      letter-spacing: 0.03em;
      position: relative;
      overflow: hidden;
      transition: transform 0.2s, box-shadow 0.2s;
      margin-top: 4px;
    }

    .btn-primary::after {
      content: "";
      position: absolute;
      inset: 0;
      background: rgba(255,255,255,0);
      transition: background 0.2s;
    }
    .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(13,71,161,0.35);
    }
    .btn-primary:hover::after { background: rgba(255,255,255,0.07); }
    .btn-primary:active { transform: translateY(0); box-shadow: none; }
    .btn-primary:disabled {
      opacity: 0.65; cursor: not-allowed; transform: none; box-shadow: none;
    }

    /* ── Auth Links ──────────────────────────────────────────── */
    .auth-link {
      text-align: center;
      font-size: 0.85rem;
      color: var(--text-secondary);
      margin: 0;
    }
    .auth-link a {
      color: var(--primary);
      text-decoration: none;
      font-weight: 600;
    }
    .auth-link a:hover { text-decoration: underline; }

    /* ── Alert message ───────────────────────────────────────── */
    .auth-message {
      padding: 12px 16px;
      border-radius: var(--radius-sm);
      font-size: 0.88rem;
      font-weight: 500;
      margin-bottom: 4px;
      display: none;
      border-left: 4px solid;
    }
    .auth-message.error   { background: #fff0f0; color: #721c24; border-color: #dc3545; }
    .auth-message.success { background: #f0fff4; color: #155724; border-color: #43a047; }

    [data-theme="dark"] .auth-message.error   { background: rgba(220,53,69,0.15);  }
    [data-theme="dark"] .auth-message.success { background: rgba(67,160,71,0.15);  }

    /* ── Forgot form helper text ─────────────────────────────── */
    #forgot-form p:first-child {
      text-align: center;
      font-size: 0.88rem;
      color: var(--text-secondary);
      margin: 0;
    }

    /* ── Divider ─────────────────────────────────────────────── */
    .divider {
      display: flex;
      align-items: center;
      gap: 12px;
      color: var(--text-secondary);
      font-size: 0.78rem;
      font-weight: 600;
      letter-spacing: 0.04em;
    }
    .divider::before, .divider::after {
      content: ""; flex: 1;
      height: 1px;
      background: var(--border);
    }

    /* ── Password strength ───────────────────────────────────── */
    .strength-bar {
      display: flex; gap: 4px; margin-top: -10px;
    }
    .strength-seg {
      flex: 1; height: 3px; border-radius: 2px;
      background: var(--border);
      transition: background 0.3s;
    }
    .strength-label {
      font-size: 0.75rem;
      font-weight: 600;
      text-align: right;
      color: var(--text-secondary);
      margin-top: -14px;
    }

    /* ── Footer (mirrors main.css) ───────────────────────────── */
    footer {
      text-align: center;
      padding: 15px 0;
      background-color: var(--footer-bg);
      color: var(--footer-text);
      font-size: 0.88rem;
    }
    footer a { color: var(--footer-link); text-decoration: none; }
    footer a:hover { text-decoration: underline; }

    /* ── Animation ───────────────────────────────────────────── */
    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(20px) scale(.98); }
      to   { opacity: 1; transform: translateY(0)    scale(1);   }
    }

    /* ── Responsive ──────────────────────────────────────────── */
    @media (max-width: 600px) {
      header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
      }
      header h1 { font-size: 1.55rem; }
      nav ul { gap: 15px; flex-wrap: wrap; justify-content: center; }
      .auth-card { padding: 36px 22px 30px; }
    }
