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

  :root {
    --bg: #0a0a0f;
    --surface: #111118;
    --card: #16161f;
    --border: #2a2a3a;
    --accent: #6c63ff;
    --accent2: #ff6584;
    --text: #e8e8f0;
    --muted: #6b6b80;
    --success: #4ade80;
    --error: #f87171;
  }

  html, body { height: 100%; }

  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
  }

  /* Animated background */
  .bg-orbs {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
  }
  .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
    animation: drift 12s ease-in-out infinite alternate;
  }
  .orb-1 { width: 500px; height: 500px; background: var(--accent); top: -100px; left: -100px; animation-delay: 0s; }
  .orb-2 { width: 400px; height: 400px; background: var(--accent2); bottom: -80px; right: -80px; animation-delay: -4s; }
  .orb-3 { width: 300px; height: 300px; background: #00d4aa; top: 50%; left: 50%; transform: translate(-50%,-50%); animation-delay: -8s; }

  @keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(30px, 20px) scale(1.08); }
  }

  /* Grid lines */
  .grid-overlay {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image:
      linear-gradient(rgba(108,99,255,0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(108,99,255,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
  }

  .auth-container {
    position: relative; z-index: 10;
    width: 100%; max-width: 420px;
    padding: 16px;
  }

  .brand {
    text-align: center;
    margin-bottom: 32px;
    animation: fadeUp 0.6s ease both;
  }
  .brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Syne', sans-serif;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text);
  }
  .brand-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 20px var(--accent);
    animation: pulse 2s ease-in-out infinite;
  }
  @keyframes pulse {
    0%,100% { box-shadow: 0 0 10px var(--accent); }
    50%      { box-shadow: 0 0 30px var(--accent); }
  }
  .brand-tagline {
    color: var(--muted);
    font-size: 13px;
    margin-top: 6px;
    font-weight: 300;
    letter-spacing: 0.3px;
  }

  .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 32px;
    backdrop-filter: blur(20px);
    box-shadow: 0 24px 60px rgba(0,0,0,0.5);
    animation: fadeUp 0.6s ease 0.1s both;
  }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* Tab switcher */
  .tabs {
    display: flex;
    background: var(--surface);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 28px;
    gap: 4px;
  }
  .tab-btn {
    flex: 1;
    padding: 9px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  .tab-btn.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(108,99,255,0.4);
  }

  .form-panel { display: none; }
  .form-panel.active { display: block; }

  .form-title {
    font-family: 'Syne', sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
  }
  .form-subtitle {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 24px;
  }

  .field-row { display: flex; gap: 12px; }
  .field-row .field { flex: 1; }

  .field { margin-bottom: 16px; }
  .field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 7px;
  }
  .field input {
    width: 100%;
    padding: 11px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
  }
  .field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108,99,255,0.15);
  }
  .field input::placeholder { color: var(--muted); }

  .btn-primary {
    width: 100%;
    padding: 13px;
    background: var(--accent);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 4px;
    position: relative;
    overflow: hidden;
  }
  .btn-primary:hover {
    background: #7c73ff;
    box-shadow: 0 8px 24px rgba(108,99,255,0.45);
    transform: translateY(-1px);
  }
  .btn-primary:active { transform: translateY(0); }
  .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

  .btn-loader {
    display: inline-block;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  .alert {
    padding: 10px 14px;
    border-radius: 9px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
  }
  .alert.error { background: rgba(248,113,113,0.12); color: var(--error); border: 1px solid rgba(248,113,113,0.25); }
  .alert.success { background: rgba(74,222,128,0.12); color: var(--success); border: 1px solid rgba(74,222,128,0.25); }
  .alert.show { display: block; animation: fadeUp 0.3s ease; }
