
    :root {
      --accent: #00f0ff;
      --accent2: #ff0055;
      --accent3: #b000ff;
      --glow: rgba(0, 240, 255, 0.4);
      --glow2: rgba(255, 0, 85, 0.4);
      --r: 24px;
      --rsm: 14px;
    }

    [data-theme="dark"] {
      --bg: #03050c;
      --bg2: #080b14;
      --surface: rgba(20, 25, 40, 0.4);
      --surface2: rgba(30, 40, 60, 0.4);
      --surface3: rgba(40, 50, 80, 0.5);
      --border: rgba(255, 255, 255, 0.05);
      --border-h: rgba(255, 255, 255, 0.15);
      --text: #ffffff;
      --text-m: #a0a8c0;
      --text-s: #6b7a99;
      --overlay: rgba(3, 5, 12, 0.85);
      --scroll: rgba(255, 255, 255, 0.1);
      --shadow-base: 0 16px 40px rgba(0, 0, 0, 0.5);
    }

    [data-theme="light"] {
      --bg: #f5f7fa;
      --bg2: #e4e9f2;
      --surface: rgba(255, 255, 255, 0.6);
      --surface2: rgba(255, 255, 255, 0.8);
      --surface3: rgba(240, 244, 250, 0.9);
      --border: rgba(0, 0, 0, 0.05);
      --border-h: rgba(0, 0, 0, 0.15);
      --text: #0b0f19;
      --text-m: #4a5568;
      --text-s: #8792a2;
      --overlay: rgba(245, 247, 250, 0.85);
      --scroll: rgba(0, 0, 0, 0.1);
      --shadow-base: 0 16px 40px rgba(0, 0, 0, 0.05);
    }

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

    body {
      font-family: 'Syne', sans-serif;
      background-color: var(--bg);
      color: var(--text);
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      position: relative;
      transition: background-color 0.4s ease, color 0.4s ease;
    }

    /* ── Animated background ── */
    .bg-canvas {
      position: fixed; inset: 0; z-index: 0; pointer-events: none;
      overflow: hidden;
    }
    .bg-canvas::before {
      content: '';
      position: absolute; inset: 0;
      background:
        radial-gradient(ellipse 80% 60% at 20% 30%, rgba(0,240,255,0.07) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 70%, rgba(176,0,255,0.07) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 50% 100%, rgba(255,0,85,0.05) 0%, transparent 60%);
      animation: bgPulse 8s ease-in-out infinite alternate;
    }
    [data-theme="light"] .bg-canvas::before {
      background:
        radial-gradient(ellipse 80% 60% at 20% 30%, rgba(0,240,255,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 70%, rgba(176,0,255,0.1) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 50% 100%, rgba(255,0,85,0.07) 0%, transparent 60%);
    }
    @keyframes bgPulse {
      from { opacity: 0.7; transform: scale(1); }
      to   { opacity: 1;   transform: scale(1.05); }
    }

    /* Grid overlay */
    .bg-grid {
      position: fixed; inset: 0; z-index: 0;
      background-image:
        linear-gradient(rgba(0,240,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,240,255,0.04) 1px, transparent 1px);
      background-size: 50px 50px;
      mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
    }
    [data-theme="light"] .bg-grid {
      background-image:
        linear-gradient(rgba(0,120,200,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,120,200,0.06) 1px, transparent 1px);
    }

    /* Floating orbs */
    .orb {
      position: fixed; border-radius: 50%; filter: blur(80px);
      animation: orbFloat 12s ease-in-out infinite;
      pointer-events: none; z-index: 0;
    }
    .orb-1 { width: 400px; height: 400px; background: rgba(0,240,255,0.08); top: -100px; left: -100px; animation-delay: 0s; }
    .orb-2 { width: 300px; height: 300px; background: rgba(176,0,255,0.08); bottom: -80px; right: -80px; animation-delay: -4s; }
    .orb-3 { width: 200px; height: 200px; background: rgba(255,0,85,0.06); top: 50%; left: 60%; animation-delay: -8s; }
    [data-theme="light"] .orb-1 { background: rgba(0,240,255,0.15); }
    [data-theme="light"] .orb-2 { background: rgba(176,0,255,0.12); }
    [data-theme="light"] .orb-3 { background: rgba(255,0,85,0.1); }
    @keyframes orbFloat {
      0%, 100% { transform: translate(0, 0) scale(1); }
      33%  { transform: translate(30px, -20px) scale(1.05); }
      66%  { transform: translate(-20px, 30px) scale(0.97); }
    }

    /* ── Theme toggle ── */
    .theme-toggle {
      position: fixed; top: 24px; right: 24px; z-index: 100;
      width: 44px; height: 44px; border-radius: 50%;
      background: var(--surface2);
      border: 1px solid var(--border-h);
      backdrop-filter: blur(20px);
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      font-size: 18px; transition: all 0.3s ease;
      box-shadow: var(--shadow-base);
    }
    .theme-toggle:hover {
      border-color: var(--accent);
      box-shadow: 0 0 20px var(--glow);
      transform: rotate(20deg) scale(1.1);
    }

    /* ── Main wrapper ── */
    .login-wrapper {
      position: relative; z-index: 10;
      width: 100%; max-width: 480px; padding: 16px;
      animation: wrapperIn 0.8s cubic-bezier(0.25, 1, 0.35, 1) forwards;
    }
    @keyframes wrapperIn {
      from { opacity: 0; transform: translateY(32px) scale(0.97); }
      to   { opacity: 1; transform: translateY(0) scale(1); }
    }

    /* ── Card ── */
    .login-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--r);
      backdrop-filter: blur(40px) saturate(200%);
      box-shadow: var(--shadow-base), inset 0 1px 0 rgba(255,255,255,0.06);
      overflow: hidden;
      position: relative;
    }
    [data-theme="light"] .login-card {
      box-shadow: var(--shadow-base), inset 0 1px 0 rgba(255,255,255,0.8);
    }

    /* Top accent line */
    .card-accent-line {
      height: 3px;
      background: linear-gradient(90deg, var(--accent), var(--accent3), var(--accent2));
      background-size: 200% 100%;
      animation: accentShift 4s linear infinite;
    }
    @keyframes accentShift {
      0%   { background-position: 0% 0%; }
      100% { background-position: 200% 0%; }
    }

    .card-body { padding: 48px 40px 40px; }

    /* ── Logo & header ── */
    .logo-ring {
      width: 64px; height: 64px; border-radius: 18px;
      background: linear-gradient(135deg, rgba(0,240,255,0.15), rgba(176,0,255,0.15));
      border: 1px solid rgba(0,240,255,0.3);
      display: flex; align-items: center; justify-content: center;
      margin: 0 auto 24px;
      position: relative;
      box-shadow: 0 0 30px rgba(0,240,255,0.15);
      animation: logoGlow 3s ease-in-out infinite alternate;
    }
    @keyframes logoGlow {
      from { box-shadow: 0 0 20px rgba(0,240,255,0.1); }
      to   { box-shadow: 0 0 40px rgba(0,240,255,0.3), 0 0 60px rgba(176,0,255,0.15); }
    }
    .logo-ring svg { width: 32px; height: 32px; }

    .login-title {
      font-family: 'Orbitron', monospace;
      font-size: 26px; font-weight: 800;
      letter-spacing: 0.08em;
      text-align: center;
      background: linear-gradient(135deg, var(--text) 0%, var(--accent) 60%, var(--accent3) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      margin-bottom: 6px;
    }
    .login-subtitle {
      text-align: center;
      color: var(--text-s);
      font-size: 13px; font-weight: 400;
      letter-spacing: 0.05em;
      margin-bottom: 36px;
    }

    /* ── Tabs ── */
    .auth-tabs {
      display: flex; gap: 4px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: var(--rsm);
      padding: 4px;
      margin-bottom: 32px;
    }
    .auth-tab {
      flex: 1; padding: 9px 0;
      border-radius: 10px;
      border: none; background: transparent;
      color: var(--text-s); font-family: 'Syne', sans-serif;
      font-size: 13px; font-weight: 500; letter-spacing: 0.04em;
      cursor: pointer; transition: all 0.25s ease;
    }
    .auth-tab.active {
      background: var(--surface3);
      color: var(--accent);
      border: 1px solid rgba(0,240,255,0.2);
      box-shadow: 0 2px 12px rgba(0,240,255,0.1);
    }
    .auth-tab:hover:not(.active) { color: var(--text-m); }

    /* ── Form ── */
    .form-label {
      font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
      text-transform: uppercase; color: var(--text-s);
      margin-bottom: 8px; display: block;
    }

    .input-wrap {
      position: relative; margin-bottom: 20px;
    }
    .input-icon {
      position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
      color: var(--text-s); pointer-events: none; transition: color 0.25s;
      font-size: 16px; z-index: 2;
    }
    .form-control-custom {
      width: 100%; height: 52px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: var(--rsm);
      color: var(--text);
      font-family: 'Syne', sans-serif;
      font-size: 14px;
      padding: 0 48px 0 48px;
      outline: none;
      transition: all 0.25s ease;
      backdrop-filter: blur(10px);
    }
    .form-control-custom::placeholder { color: var(--text-s); }
    .form-control-custom:focus {
      border-color: var(--accent);
      background: var(--surface3);
      box-shadow: 0 0 0 3px rgba(0,240,255,0.1), 0 0 20px rgba(0,240,255,0.08);
    }
    .form-control-custom:focus + .input-border-glow { opacity: 1; }
    .input-wrap:focus-within .input-icon { color: var(--accent); }

    .toggle-pw {
      position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
      background: none; border: none; color: var(--text-s);
      cursor: pointer; padding: 4px; font-size: 16px; z-index: 2;
      transition: color 0.2s;
    }
    .toggle-pw:hover { color: var(--accent); }

    /* ── Options row ── */
    .form-options {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 28px;
    }
    .check-wrap {
      display: flex; align-items: center; gap: 8px; cursor: pointer;
    }
    .check-box {
      width: 18px; height: 18px; border-radius: 5px;
      border: 1px solid var(--border-h);
      background: var(--surface2);
      position: relative; cursor: pointer; flex-shrink: 0;
      transition: all 0.2s;
    }
    .check-box.checked {
      background: var(--accent);
      border-color: var(--accent);
    }
    .check-box.checked::after {
      content: '✓';
      position: absolute; inset: 0;
      display: flex; align-items: center; justify-content: center;
      color: #000; font-size: 11px; font-weight: 700;
    }
    .check-label { font-size: 13px; color: var(--text-m); }
    .forgot-link {
      font-size: 13px; color: var(--accent);
      text-decoration: none; transition: opacity 0.2s;
    }
    .forgot-link:hover { opacity: 0.75; text-decoration: underline; }

    /* ── CTA Button ── */
    .btn-login {
      width: 100%; height: 52px;
      background: linear-gradient(135deg, var(--accent), var(--accent3));
      border: none; border-radius: var(--rsm);
      color: #fff; font-family: 'Orbitron', monospace;
      font-size: 13px; font-weight: 600; letter-spacing: 0.12em;
      text-transform: uppercase; cursor: pointer;
      position: relative; overflow: hidden;
      transition: all 0.3s ease;
      box-shadow: 0 4px 24px rgba(0,240,255,0.25);
    }
    .btn-login::before {
      content: '';
      position: absolute; inset: 0;
      background: linear-gradient(135deg, var(--accent3), var(--accent2));
      opacity: 0; transition: opacity 0.3s ease;
    }
    .btn-login:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,240,255,0.35); }
    .btn-login:hover::before { opacity: 1; }
    .btn-login:active { transform: translateY(0); }
    .btn-login span { position: relative; z-index: 1; }

    /* Ripple */
    .btn-login .ripple {
      position: absolute; border-radius: 50%;
      background: rgba(255,255,255,0.25);
      transform: scale(0); animation: rippleAnim 0.6s linear;
      pointer-events: none; z-index: 2;
    }
    @keyframes rippleAnim {
      to { transform: scale(4); opacity: 0; }
    }

    /* ── Divider ── */
    .divider {
      display: flex; align-items: center; gap: 12px;
      margin: 28px 0; color: var(--text-s); font-size: 11px;
      letter-spacing: 0.1em; text-transform: uppercase;
    }
    .divider::before, .divider::after {
      content: ''; flex: 1;
      height: 1px; background: var(--border);
    }

    /* ── Social buttons ── */
    .social-row { display: flex; gap: 10px; }
    .btn-social {
      flex: 1; height: 46px;
      background: var(--surface2);
      border: 1px solid var(--border);
      border-radius: var(--rsm);
      color: var(--text-m);
      font-family: 'Syne', sans-serif;
      font-size: 13px; font-weight: 500;
      display: flex; align-items: center; justify-content: center;
      gap: 8px; cursor: pointer;
      transition: all 0.25s ease;
      text-decoration: none;
    }
    .btn-social:hover {
      border-color: var(--border-h);
      background: var(--surface3);
      color: var(--text);
      transform: translateY(-1px);
    }
    .btn-social svg { width: 18px; height: 18px; flex-shrink: 0; }

    /* ── Footer ── */
    .card-footer-custom {
      text-align: center; padding: 20px 40px;
      border-top: 1px solid var(--border);
      font-size: 13px; color: var(--text-s);
      background: var(--surface2);
    }
    .card-footer-custom a {
      color: var(--accent); text-decoration: none; font-weight: 600;
      transition: opacity 0.2s;
    }
    .card-footer-custom a:hover { opacity: 0.75; }

    /* ── Tag ── */
    .security-tag {
      display: flex; align-items: center; justify-content: center;
      gap: 6px; margin-top: 20px;
      font-size: 11px; color: var(--text-s); letter-spacing: 0.06em;
    }
    .security-tag svg { width: 13px; height: 13px; color: var(--accent); }

    /* ── Register panel (hidden by default) ── */
    .auth-panel { display: none; }
    .auth-panel.active { display: block; }

    /* ── Shake anim ── */
    @keyframes shake {
      0%, 100% { transform: translateX(0); }
      20% { transform: translateX(-8px); }
      40% { transform: translateX(8px); }
      60% { transform: translateX(-5px); }
      80% { transform: translateX(5px); }
    }
    .shake { animation: shake 0.45s ease; }

    /* ── Alert ── */
    .alert-custom {
      border-radius: var(--rsm); padding: 12px 16px;
      font-size: 13px; display: flex; align-items: center; gap: 10px;
      margin-bottom: 20px; border: 1px solid;
      animation: alertIn 0.3s ease;
    }
    @keyframes alertIn {
      from { opacity: 0; transform: translateY(-8px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    .alert-error {
      background: rgba(255,0,85,0.1); border-color: rgba(255,0,85,0.3);
      color: #ff4d88;
    }
    .alert-success {
      background: rgba(0,240,255,0.1); border-color: rgba(0,240,255,0.3);
      color: var(--accent);
    }

    /* ── Responsive ── */
    @media (max-width: 520px) {
      .card-body { padding: 36px 24px 28px; }
      .card-footer-custom { padding: 16px 24px; }
      .login-title { font-size: 22px; }
    }
