  :root {
    --brand-primary: #2563eb;
    --brand-accent: #4ade80;
    --brand-bg: #060a13;
    /* Derived lighter/darker shades computed from primary */
    --brand-primary-light: #3b82f6;
    --brand-primary-dark: #1d4ed8;
    --brand-primary-glow: rgba(37, 99, 235, 0.35);
  }
  .login-page {
    min-height: 100vh; min-height: 100dvh;
    display: flex;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--brand-bg);
  }

  /* ── Left hero panel ── */
  .login-hero {
    flex: 1; position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand-bg), #0a1628 50%) 0%, color-mix(in srgb, var(--brand-bg), #0f172a 50%) 50%, color-mix(in srgb, var(--brand-bg), #0c1222 50%) 100%);
  }
  .login-hero-bg { position: absolute; inset: 0; z-index: 0; }
  .hero-grid {
    position: absolute; inset: 0;
    background-image:
      linear-gradient(color-mix(in srgb, var(--brand-primary), transparent 96%) 1px, transparent 1px),
      linear-gradient(90deg, color-mix(in srgb, var(--brand-primary), transparent 96%) 1px, transparent 1px);
    background-size: 40px 40px;
  }
  .hero-orb {
    position: absolute; border-radius: 50%;
    filter: blur(100px); opacity: 0.5;
    animation: hero-float 20s ease-in-out infinite;
  }
  .hero-orb-1 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, color-mix(in srgb, var(--brand-primary), transparent 81%) 0%, transparent 70%);
    top: 10%; left: 5%;
    animation-duration: 25s;
  }
  .hero-orb-2 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, color-mix(in srgb, var(--brand-accent), transparent 87%) 0%, transparent 70%);
    bottom: 5%; right: 10%;
    animation-duration: 20s; animation-delay: -7s;
  }
  .hero-orb-3 {
    width: 250px; height: 250px;
    background: radial-gradient(circle, color-mix(in srgb, var(--brand-primary), transparent 90%) 0%, transparent 70%);
    top: 55%; left: 55%;
    animation-duration: 18s; animation-delay: -12s;
  }
  @keyframes hero-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(25px, -30px) scale(1.04); }
    66% { transform: translate(-15px, 20px) scale(0.96); }
  }

  .login-hero-content {
    position: relative; z-index: 1;
    padding: 60px 48px; max-width: 560px;
  }

  /* ── Terminal illustration ── */
  .hero-terminal {
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(45,53,72,0.6);
    border-radius: 12px; overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4), 0 0 40px rgba(37,99,235,0.08);
    margin-bottom: 28px;
    animation: term-float 8s ease-in-out infinite;
  }
  @keyframes term-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
  }
  .term-bar {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 14px;
    background: rgba(15,20,35,0.8);
    border-bottom: 1px solid rgba(45,53,72,0.4);
  }
  .term-dot { width: 10px; height: 10px; border-radius: 50%; }
  .term-title {
    margin-left: 8px; font-size: 11px; color: #475569;
    font-family: 'JetBrains Mono', monospace;
  }
  .term-body {
    padding: 14px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px; line-height: 1.7;
  }
  .term-line { color: #94a3b8; white-space: pre; }
  .term-prompt { color: #4ade80; font-weight: 600; }
  .term-cmd { color: #e2e8f0; }
  .term-output { color: #64748b; }
  .term-cursor {
    display: inline-block; width: 7px; height: 14px;
    background: #4ade80; vertical-align: middle;
    animation: blink 1s step-end infinite;
  }
  @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

  /* ── Floating cards ── */
  .hero-cards {
    display: flex; gap: 10px; margin-bottom: 32px;
    flex-wrap: wrap;
  }
  .hero-card {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px;
    background: rgba(15,23,42,0.7);
    border: 1px solid rgba(45,53,72,0.5);
    border-radius: 10px;
    font-size: 12px; color: #94a3b8; font-weight: 500;
    animation: card-float 6s ease-in-out infinite;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  }
  .hc-1 { animation-delay: 0s; }
  .hc-2 { animation-delay: -2s; }
  .hc-3 { animation-delay: -4s; }
  @keyframes card-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
  }

  /* ── Hero text ── */
  .hero-headline {
    font-size: 32px; font-weight: 800; line-height: 1.2;
    letter-spacing: -0.03em;
    color: #f1f5f9; margin: 0 0 14px;
  }
  .hero-desc {
    font-size: 15px; color: #64748b; line-height: 1.6;
    margin: 0 0 24px; max-width: 420px;
  }

  /* ── Feature pills ── */
  .hero-pills { display: flex; gap: 8px; flex-wrap: wrap; }
  .hero-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px;
    background: color-mix(in srgb, var(--brand-primary), transparent 92%);
    border: 1px solid color-mix(in srgb, var(--brand-primary), transparent 85%);
    border-radius: 20px;
    font-size: 12px; color: color-mix(in srgb, var(--brand-primary), white 40%); font-weight: 500;
  }

  /* ── Right panel ── */
  .login-right {
    width: 480px; min-width: 400px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--brand-bg), #0a0f1a 50%);
    border-left: 1px solid rgba(45,53,72,0.3);
    padding: 40px;
  }

  /* ── Card ── */
  .login-card {
    width: 100%; max-width: 380px;
  }

  .login-shake { animation: login-shake-anim 0.5s ease-in-out; }
  @keyframes login-shake-anim {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-8px); }
    30% { transform: translateX(6px); }
    45% { transform: translateX(-4px); }
    60% { transform: translateX(2px); }
  }

  /* ── Logo ── */
  .login-logo-wrap {
    display: flex; justify-content: center; margin-bottom: 24px;
  }
  .login-logo {
    width: 140px; height: 140px; object-fit: contain;
    filter: drop-shadow(0 8px 24px color-mix(in srgb, var(--brand-primary), transparent 75%));
  }

  /* ── Title ── */
  .login-title {
    text-align: center; font-size: 32px; font-weight: 800;
    letter-spacing: -0.03em; margin: 0;
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand-primary), white 40%) 0%, var(--brand-accent) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  .login-subtitle {
    text-align: center; font-size: 13px; color: #475569;
    font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
    margin: 6px 0 36px;
  }

  /* ── Error ── */
  .login-error {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; margin-bottom: 20px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px; color: #f87171; font-size: 13px;
  }
  .login-error-icon { width: 18px; height: 18px; flex-shrink: 0; }

  /* ── Form ── */
  .login-form { display: flex; flex-direction: column; gap: 14px; }
  .login-field { position: relative; }
  .login-input-wrap {
    display: flex; align-items: center; gap: 10px;
    padding: 0 14px;
    background: rgba(15, 20, 35, 0.8);
    border: 1px solid rgba(45, 53, 72, 0.6);
    border-radius: 12px;
    transition: all 0.2s ease;
  }
  .login-input-wrap:hover { border-color: color-mix(in srgb, var(--brand-primary), transparent 75%); }
  .login-input-focus {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary), transparent 85%), 0 0 20px color-mix(in srgb, var(--brand-primary), transparent 92%);
    background: rgba(15, 20, 35, 1);
  }
  .login-input-icon { width: 18px; height: 18px; color: #475569; flex-shrink: 0; transition: color 0.2s; }
  .login-input-focus .login-input-icon { color: color-mix(in srgb, var(--brand-primary), white 40%); }
  .login-input-wrap input {
    flex: 1; padding: 14px 0; background: transparent; border: none; outline: none;
    color: #e2e8f0; font-size: 15px; font-family: inherit;
  }
  .login-input-wrap input::placeholder { color: #334155; }
  .login-eye-btn {
    background: none; border: none; cursor: pointer; padding: 4px;
    display: flex; align-items: center; justify-content: center;
  }
  .login-eye-icon { width: 18px; height: 18px; color: #475569; transition: color 0.15s; }
  .login-eye-btn:hover .login-eye-icon { color: #94a3b8; }

  /* ── Button ── */
  .login-btn {
    margin-top: 8px; padding: 0; border: none; cursor: pointer;
    height: 50px; border-radius: 12px; font-size: 15px; font-weight: 600;
    font-family: inherit;
    background: linear-gradient(135deg, var(--brand-primary) 0%, color-mix(in srgb, var(--brand-primary), white 15%) 50%, color-mix(in srgb, var(--brand-primary), black 15%) 100%);
    background-size: 200% 200%;
    color: white; position: relative; overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px color-mix(in srgb, var(--brand-primary), transparent 65%);
  }
  .login-btn:hover:not(:disabled) {
    background-position: 100% 50%;
    box-shadow: 0 8px 30px color-mix(in srgb, var(--brand-primary), transparent 55%);
    transform: translateY(-1px);
  }
  .login-btn:active:not(:disabled) { transform: translateY(0); }
  .login-btn:disabled { opacity: 0.7; cursor: wait; }
  .login-btn-text { display: flex; align-items: center; justify-content: center; gap: 8px; }
  .login-btn-arrow { width: 18px; height: 18px; transition: transform 0.2s; }
  .login-btn:hover .login-btn-arrow { transform: translateX(3px); }
  .login-btn-loading { display: flex; align-items: center; justify-content: center; gap: 8px; }
  .login-spinner { width: 20px; height: 20px; animation: spin 1s linear infinite; }
  @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

  /* ── Footer ── */
  .login-footer {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin-top: 32px; padding-top: 24px;
    border-top: 1px solid rgba(45, 53, 72, 0.2);
  }
  .login-version { font-size: 11px; color: #334155; font-family: 'JetBrains Mono', monospace; }
  .login-sep { width: 3px; height: 3px; border-radius: 50%; background: #334155; }
  .login-powered { font-size: 11px; color: #334155; }
  .login-powered strong { color: #475569; }

  /* ── Responsive: stack on mobile ── */
  @media (max-width: 960px) {
    .login-page { flex-direction: column; }
    .login-hero { min-height: 40vh; }
    .login-hero-content { padding: 40px 24px; max-width: 100%; }
    .hero-terminal { display: none; }
    .hero-headline { font-size: 24px; }
    .login-right {
      width: 100%; min-width: unset;
      border-left: none; border-top: 1px solid rgba(45,53,72,0.3);
      padding: 32px 24px;
    }
    .login-card { max-width: 400px; margin: 0 auto; }
    .login-logo { width: 100px; height: 100px; }
    .login-title { font-size: 26px; }
  }
  @media (max-width: 600px) {
    .login-hero { display: none; }
    .login-right {
      flex: 1; border: none;
      display: flex; align-items: center; justify-content: center;
      background: var(--brand-bg);
    }
  }
