    /* ─── Variables ───────────────────────────────────────────── */
    :root {
      --font: 'DM Sans', sans-serif;
      --radius: 10px;
      --t: .22s ease;
      --brand: #4285F4;
      --brand-h: #2b6de8;
      --brand-soft: #e8f0fe;
      --grad: linear-gradient(135deg, #609af7 0%, #302182 55%, #0099d8 100%);
      --bg: #f3f4f6;
      --surface: #ffffff;
      --surface2: #f8f9fa;
      --border: #e4e6ea;
      --text: #1a1d23;
      --muted: #6b7280;
      --sh: 0 1px 3px rgba(0,0,0,.07), 0 4px 20px rgba(0,0,0,.05);
      --sh-lg: 0 8px 48px rgba(0,0,0,.10);
      --in-bg: #f8f9fa;
      --in-bd: #e4e6ea;
    }
    [data-theme="dark"] {
      --bg: #111318;
      --surface: #1c1f27;
      --surface2: #252830;
      --border: #2e3340;
      --text: #e8eaf0;
      --muted: #8b91a0;
      --sh: 0 1px 4px rgba(0,0,0,.3), 0 4px 24px rgba(0,0,0,.2);
      --sh-lg: 0 8px 48px rgba(0,0,0,.45);
      --in-bg: #252830;
      --in-bd: #2e3340;
      --brand-soft: #1e2d5a;
      --bs-secondary-color: #8b91a0;
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    body {
      font-family: var(--font);
      background: var(--bg);
      color: var(--text);
      font-size: .875rem;
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background var(--t), color var(--t);
    }

    /* ambient glow */
    body::before {
      content: '';
      position: fixed; inset: 0; pointer-events: none;
      background:
        radial-gradient(circle at 15% 30%, rgba(66,133,244,.07) 0%, transparent 55%),
        radial-gradient(circle at 85% 75%, rgba(52,168,83,.05) 0%, transparent 50%);
    }

    /* ─── Theme button ────────────────────────────────────────── */
    .theme-btn {
      position: fixed; top: 16px; right: 16px; z-index: 200;
      width: 36px; height: 36px; border-radius: 50%;
      background: var(--surface); border: 1px solid var(--border);
      color: var(--muted); cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      font-size: 1rem; box-shadow: var(--sh); transition: all var(--t);
    }
    .theme-btn:hover { color: var(--text); }
    [data-theme="dark"]  .icon-moon { display: none; }
    [data-theme="light"] .icon-sun  { display: none; }

    /* ─── Wrapper card ────────────────────────────────────────── */
    .card {
      display: flex;
      width: min(900px, 96vw);
      min-height: 560px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 18px;
      box-shadow: var(--sh-lg);
      overflow: hidden;
      position: relative; z-index: 1;
      transition: background var(--t), border-color var(--t);
    }

    /* ─── Brand panel (left) ──────────────────────────────────── */
    .brand-panel {
      width: 42%;
      flex-shrink: 0;
      background: var(--grad);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 48px 40px;
      position: relative;
      overflow: hidden;
    }

    /* decorative circles */
    .brand-panel::before,
    .brand-panel::after {
      content: '';
      position: absolute;
      border-radius: 50%;
      background: rgba(255,255,255,.08);
    }
    .brand-panel::before { width: 340px; height: 340px; top: -80px; right: -100px; }
    .brand-panel::after  { width: 220px; height: 220px; bottom: -60px; left: -60px; }

    .brand-inner { position: relative; z-index: 1; text-align: center; }

    /* big logo mark */
    .brand-logo-mark {
      width: 80px; height: 80px;
      background: rgb(255,255,255);
      border: 2px solid rgba(255,255,255,.35);
      border-radius: 22px;
      display: flex; align-items: center; justify-content: center;
      font-size: 2rem; font-weight: 800; color: #fff;
      letter-spacing: -.04em;
      margin: 0 auto 24px;
      backdrop-filter: blur(6px);
    }

    .brand-name {
      font-size: 1.7rem; font-weight: 700; color: #fff;
      letter-spacing: -.03em; margin-bottom: 10px;
    }

    .brand-tagline {
      font-size: .82rem; color: rgba(255,255,255,.75);
      line-height: 1.5; max-width: 220px; margin: 0 auto 32px;
    }

    /* small stat pills */
    .brand-pills {
      display: flex; flex-direction: column; gap: 10px; width: 100%;
    }
    .pill {
      background: rgba(255,255,255,.15);
      border: 1px solid rgba(255,255,255,.2);
      border-radius: 10px;
      padding: 10px 16px;
      display: flex; align-items: center; gap: 10px;
      backdrop-filter: blur(4px);
    }
    .pill i { color: rgba(255,255,255,.85); font-size: 1rem; flex-shrink: 0; }
    .pill-text { font-size: .78rem; color: rgba(255,255,255,.9); line-height: 1.35; text-align: left; }
    .pill-text strong { display: block; font-weight: 600; font-size: .82rem; color: #fff; }

    /* ─── Form panel (right) ──────────────────────────────────── */
    .form-panel {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 48px 44px;
      overflow-y: auto;
    }

    /* logo row inside form (mobile only) */
    .form-logo-mobile {
      display: none;
      align-items: center; gap: 10px;
      margin-bottom: 28px;
    }
    .form-logo-mobile .logo-icon {
      width: 34px; height: 34px;
      background: var(--grad);
      border-radius: 9px;
      display: flex; align-items: center; justify-content: center;
      font-size: .78rem; font-weight: 800; color: #fff;
    }
    .form-logo-mobile .logo-name {
      font-size: 1.05rem; font-weight: 700; color: var(--text);
      letter-spacing: -.02em;
    }

    .form-heading { margin-bottom: 6px; }
    .form-heading h1 { font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; }
    .form-heading p  { font-size: .8rem; color: var(--muted); margin-top: 4px; }

    /* ─── Last-login chip ─────────────────────────────────────── */
    .ll-chip {
      display: none;
      align-items: center; gap: 10px;
      background: var(--brand-soft);
      border: 1px solid rgba(66,133,244,.2);
      border-radius: 10px;
      padding: 10px 14px;
      margin-top: 18px;
      cursor: pointer;
      transition: border-color var(--t);
    }
    .ll-chip:hover { border-color: var(--brand); }
    .ll-avatar {
      width: 32px; height: 32px;
      background: var(--grad);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: .68rem; font-weight: 700; color: #fff; flex-shrink: 0;
    }
    .ll-info { flex: 1; overflow: hidden; }
    .ll-info strong { display: block; font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .ll-info span   { font-size: .74rem; color: var(--muted); }
    .ll-arrow { color: var(--brand); font-size: .95rem; flex-shrink: 0; }
    .ll-dismiss {
      background: none; border: none; color: var(--muted);
      cursor: pointer; padding: 2px; display: flex; align-items: center;
      font-size: .82rem; transition: color var(--t); flex-shrink: 0;
    }
    .ll-dismiss:hover { color: var(--text); }

    /* ─── Divider ─────────────────────────────────────────────── */
    .divider {
      display: flex; align-items: center; gap: 10px;
      color: var(--muted); font-size: .73rem;
      margin: 18px 0 16px;
    }
    .divider::before, .divider::after {
      content: ''; flex: 1; height: 1px; background: var(--border);
    }

    /* ─── Form fields ─────────────────────────────────────────── */
    .form-group { margin-bottom: 14px; }
    .form-label {
      display: block; font-size: .78rem; font-weight: 500;
      color: var(--text); margin-bottom: 5px;
    }
    .input-wrap { position: relative; display: flex; align-items: center; }
    .input-icon {
      position: absolute; left: 12px; color: var(--muted);
      font-size: .9rem; pointer-events: none; transition: color var(--t);
    }
    .input-wrap:focus-within .input-icon { color: var(--brand); }
    .form-input {
      width: 100%;
      background: var(--in-bg); border: 1px solid var(--in-bd);
      border-radius: var(--radius);
      padding: 9px 12px 9px 36px;
      font-family: var(--font); font-size: .855rem; color: var(--text);
      outline: none;
      transition: border-color var(--t), box-shadow var(--t), background var(--t);
    }
    .form-input::placeholder { color: var(--muted); }
    .form-input:focus {
      border-color: var(--brand);
      box-shadow: 0 0 0 3px rgba(66,133,244,.14);
      background: var(--surface);
    }
    .form-input.error { border-color: #EA4335; box-shadow: 0 0 0 3px rgba(234,67,53,.11); }

    .pw-toggle {
      position: absolute; right: 10px;
      background: none; border: none; color: var(--muted);
      cursor: pointer; padding: 4px; display: flex; align-items: center;
      font-size: .88rem; border-radius: 5px; transition: color var(--t);
    }
    .pw-toggle:hover { color: var(--text); }

    .form-error { font-size: .73rem; color: #EA4335; margin-top: 4px; display: none; }
    .form-error.show { display: block; }

    /* ─── Aux row ─────────────────────────────────────────────── */
    .form-aux {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 20px; margin-top: -2px;
    }
    .check-label {
      display: flex; align-items: center; gap: 7px;
      font-size: .78rem; color: var(--muted);
      cursor: pointer; user-select: none;
    }
    .check-label input[type="checkbox"] {
      width: 15px; height: 15px; accent-color: var(--brand);
      cursor: pointer; flex-shrink: 0;
    }
    .forgot-link {
      font-size: .78rem; color: var(--brand); font-weight: 500;
      text-decoration: none; transition: color var(--t);
    }
    .forgot-link:hover { color: var(--brand-h); text-decoration: underline; }

    /* ─── Buttons ─────────────────────────────────────────────── */
    .btn-primary {
      width: 100%; background: var(--brand); color: #fff;
      border: none; border-radius: var(--radius);
      padding: 10px 20px;
      font-family: var(--font); font-size: .875rem; font-weight: 600;
      cursor: pointer; letter-spacing: -.01em;
      display: flex; align-items: center; justify-content: center; gap: 7px;
      transition: background var(--t), transform var(--t), box-shadow var(--t);
    }
    .btn-primary:hover {
      background: var(--brand-h);
      box-shadow: 0 4px 18px rgba(66,133,244,.32);
      transform: translateY(-1px);
    }
    .btn-primary:active { transform: translateY(0); box-shadow: none; }

    .signup-row { text-align: center; margin-top: 18px; font-size: .78rem; color: var(--muted); }
    .signup-row a { color: var(--brand); font-weight: 500; text-decoration: none; transition: color var(--t); }
    .signup-row a:hover { color: var(--brand-h); text-decoration: underline; }

    /* ─── Forgot panel ────────────────────────────────────────── */
    .forgot-panel { display: none; animation: fadeUp .2s ease; }
    .forgot-panel.active { display: block; }
    .main-form.hidden { display: none; }
    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(6px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    .back-btn {
      background: none; border: none; color: var(--muted);
      font-family: var(--font); font-size: .78rem; cursor: pointer; padding: 0;
      display: flex; align-items: center; gap: 5px; margin-bottom: 16px;
      transition: color var(--t);
    }
    .back-btn:hover { color: var(--text); }

    /* ─── Toast ───────────────────────────────────────────────── */
    .toast {
      position: fixed; bottom: 24px; left: 50%;
      transform: translateX(-50%) translateY(14px);
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 10px; padding: 10px 18px;
      font-size: .8rem; color: var(--text); box-shadow: var(--sh-lg);
      opacity: 0; transition: opacity .25s, transform .25s;
      pointer-events: none; white-space: nowrap;
      display: flex; align-items: center; gap: 8px; z-index: 999;
    }
    .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
    .toast i { color: var(--brand); }

    /* ─── Responsive ──────────────────────────────────────────── */
    /* Tablet: shrink brand panel */
    @media (max-width: 720px) {
      .card { flex-direction: column; min-height: unset; width: min(440px, 96vw); border-radius: 16px; }
      .brand-panel {
        width: 100%; padding: 32px 28px;
        border-radius: 0;
        flex-direction: row; align-items: center; justify-content: flex-start; gap: 18px;
      }
      .brand-panel::before, .brand-panel::after { display: none; }
      .brand-inner { display: flex; align-items: center; gap: 16px; text-align: left; flex: 1; }
      .brand-logo-mark { width: 52px; height: 52px; border-radius: 14px; font-size: 1.3rem; margin: 0; flex-shrink: 0; }
      .brand-name { font-size: 1.25rem; margin-bottom: 3px; }
      .brand-tagline { font-size: .76rem; max-width: none; margin: 0; }
      .brand-pills { display: none; }
      .form-panel { padding: 28px 28px 32px; }
      .form-logo-mobile { display: none !important; }
    }

    /* Mobile: hide brand panel entirely, show inline logo */
    @media (max-width: 480px) {
      .card { width: 100%; min-height: 100svh; border-radius: 0; border: none; box-shadow: none; }
      .brand-panel { display: none; }
      .form-panel { padding: 36px 24px 40px; justify-content: flex-start; padding-top: 56px; }
      .form-logo-mobile { display: flex !important; }
    }
