:root {
      --bg-dark: #020617;
      --bg-card: rgba(15, 23, 42, 0.65);
      --border-card: rgba(255, 255, 255, 0.08);
      --border-card-hover: rgba(251, 191, 36, 0.32);
      --text-main: #f8fafc;
      --text-muted: #64748b;
      --input-bg: rgba(15, 23, 42, 0.5);
      --input-border: rgba(255, 255, 255, 0.1);
      --accent: #38bdf8;
      --accent-hover: #f59e0b;
      --accent-blue: #2563eb;
      --accent-teal: #0f766e;
      --accent-glow: rgba(56, 189, 248, 0.24);
      --accent-warm-glow: rgba(245, 158, 11, 0.26);
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }
    html, body { min-height: 100%; }

    body {
      min-height: 100dvh;
      padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
      position: relative;
      color: var(--text-main);
      background:
        radial-gradient(circle at 12% 18%, rgba(245, 158, 11, 0.14), transparent 18rem),
        radial-gradient(circle at 85% 14%, rgba(56, 189, 248, 0.16), transparent 18rem),
        var(--bg-dark);
      font-family: 'Inter', system-ui, sans-serif;
      overflow-x: hidden;
      overflow-y: auto;
    }

    .bg-glow {
      position: fixed;
      width: 150vw;
      height: 150vh;
      top: -25%;
      left: -25%;
      background:
        radial-gradient(circle at 20% 24%, rgba(245, 158, 11, 0.18) 0%, transparent 28%),
        radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(15, 118, 110, 0.12) 0%, transparent 50%);
      animation: rotateGlow 20s linear infinite;
      z-index: -2;
      pointer-events: none;
    }

    .bg-image {
      position: fixed;
      inset: 0;
      background: url('/assets/tech1.webp') center/cover no-repeat fixed;
      opacity: 0.12;
      mix-blend-mode: overlay;
      z-index: -1;
      pointer-events: none;
    }

    @keyframes rotateGlow {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }

    .page-shell {
      width: min(100%, 560px);
      min-height: calc(100dvh - 32px);
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto;
    }

    .login-box {
      position: relative;
      width: min(100%, 420px);
      max-width: 420px;
      margin: 0 auto;
      padding: 3rem;
      border-radius: 2rem;
      border: 1px solid var(--border-card);
      background:
        radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 16rem),
        radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.10), transparent 14rem),
        var(--bg-card);
      backdrop-filter: blur(40px) saturate(150%);
      -webkit-backdrop-filter: blur(40px) saturate(150%);
      box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255,255,255,0.05);
      animation: cardIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
      transition: border-color 0.3s ease;
    }

    .login-box:hover {
      border-color: var(--border-card-hover);
    }

    @keyframes cardIn {
      from { opacity: 0; transform: translateY(30px) scale(0.95); filter: blur(10px); }
      to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
    }

    .logo {
      display: block;
      margin: 0 auto 2rem;
      height: clamp(6.2rem, 18vw, 10rem);
      filter:
        drop-shadow(0 0 15px rgba(56, 189, 248, 0.22))
        drop-shadow(0 10px 18px rgba(245, 158, 11, 0.20));
    }

    h2 {
      margin: 0 0 0.5rem 0;
      font-family: 'Plus Jakarta Sans', sans-serif;
      font-size: 1.75rem;
      font-weight: 800;
      letter-spacing: -0.02em;
      background: linear-gradient(90deg, #fff 0%, #fbbf24 42%, #7dd3fc 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .tagline {
      margin: 0 0 2rem 0;
      color: var(--text-muted);
      font-size: 0.875rem;
      line-height: 1.5;
    }

    .message,
    .helper-box {
      margin-bottom: 1.25rem;
      padding: 0.85rem 1rem;
      border-radius: 0.75rem;
      font-size: 0.85rem;
      text-align: left;
      line-height: 1.5;
    }

    .message.error {
      color: #fca5a5;
      background: rgba(239, 68, 68, 0.1);
      border: 1px solid rgba(239, 68, 68, 0.2);
    }

    .message.success {
      color: #bbf7d0;
      background: rgba(34, 197, 94, 0.12);
      border: 1px solid rgba(34, 197, 94, 0.22);
    }

    .helper-box {
      color: #cbd5e1;
      background: linear-gradient(135deg, rgba(56, 189, 248, 0.10), rgba(245, 158, 11, 0.08));
      border: 1px solid rgba(245, 158, 11, 0.18);
    }

    .form-group {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      margin-bottom: 1.5rem;
    }

    input[type="email"] {
      width: 100%;
      padding: 0.85rem 1.25rem;
      border-radius: 0.75rem;
      border: 1px solid var(--input-border);
      background: var(--input-bg);
      color: var(--text-main);
      font-family: 'Inter', sans-serif;
      font-size: 0.9rem;
      transition: all 0.2s ease;
    }

    input::placeholder { color: rgba(148, 163, 184, 0.5); font-weight: 400; }

    input[type="email"]:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow:
        0 0 0 3px var(--accent-glow),
        0 0 24px var(--accent-warm-glow);
      background: rgba(15, 23, 42, 0.8);
    }

    .primary-btn {
      width: 100%;
      padding: 0.85rem;
      border-radius: 0.75rem;
      border: none;
      cursor: pointer;
      background: linear-gradient(135deg, var(--accent-blue), var(--accent-teal));
      color: #fff;
      font-family: 'Inter', sans-serif;
      font-size: 0.9rem;
      font-weight: 600;
      transition: all 0.2s ease;
      box-shadow:
        0 10px 22px rgba(37, 99, 235, 0.34),
        0 16px 30px var(--accent-warm-glow);
    }

    .primary-btn:hover {
      background: linear-gradient(135deg, #2563eb 0%, #0f766e 58%, #f59e0b 100%);
      transform: translateY(-1px);
      box-shadow:
        0 14px 28px rgba(37, 99, 235, 0.38),
        0 18px 34px rgba(245, 158, 11, 0.34);
    }

    .primary-btn:active {
      transform: translateY(0);
      box-shadow:
        0 8px 16px rgba(15, 23, 42, 0.42),
        0 10px 18px rgba(245, 158, 11, 0.18);
    }

    .links-section {
      margin-top: 2rem;
      padding-top: 1.5rem;
      border-top: 1px solid rgba(255, 255, 255, 0.05);
      text-align: center;
    }

    .back-link,
    .secondary-link {
      text-decoration: none;
      transition: color 0.2s ease;
    }

    .back-link {
      display: inline-block;
      margin-top: 0.25rem;
      font-size: 0.875rem;
      font-weight: 500;
      color: var(--accent);
    }

    .back-link:hover {
      color: var(--accent-hover);
      text-decoration: underline;
    }

    .secondary-link {
      display: inline-block;
      margin-top: 1rem;
      font-size: 0.78rem;
      color: rgba(100, 116, 139, 0.75);
    }

    .secondary-link:hover {
      color: var(--accent-hover);
    }

    .login-footer {
      text-align: center;
      font-size: 0.7rem;
      color: rgba(100, 116, 139, 0.5);
      margin-top: 2.5rem;
    }

    .login-footer a {
      color: rgba(100, 116, 139, 0.7);
      text-decoration: none;
    }

    .login-footer a:hover {
      color: var(--accent);
    }

    @media (max-width: 640px) {
      body {
        padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
      }

      .page-shell {
        width: 100%;
        min-height: auto;
        align-items: flex-start;
      }

      .login-box {
        width: 100%;
        padding: 1.65rem 1.2rem;
        border-radius: 1.35rem;
      }

      .logo {
        height: clamp(4.8rem, 24vw, 6.6rem);
        margin-bottom: 1.25rem;
      }

      h2 {
        font-size: 1.45rem;
      }

      .tagline {
        margin-bottom: 1.35rem;
      }

      .links-section {
        margin-top: 1.5rem;
        padding-top: 1.2rem;
      }
    }
