    
    /* ── viewport overflow guard (responsive fix) ── */
    html, body { overflow-x: clip; max-width: 100%; }

    :root {
      --navy: #0f2044;
      --blue-accent: #2563eb;
      --bg: #f4f6fb;
      --bg-card: #ffffff;
      --text-main: #0f2044;
      --text-muted: #64748b;
      --border: #d6dce8;
      --radius: 18px;
      --radius-sm: 10px;
      --shadow-lg: 0 12px 40px rgba(15,32,68,0.14);
    }

    html, body { scrollbar-width: none; }
    html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }

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

    .login-card {
      background: var(--bg-card);
      border-radius: var(--radius);
      box-shadow: var(--shadow-lg);
      width: 100%;
      max-width: 420px;
      padding: 40px 32px;
      display: flex;
      flex-direction: column;
      gap: 22px;
    }

    .login-icon {
      width: 64px;
      height: 64px;
      border-radius: 16px;
      background: var(--navy);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
      margin: 0 auto;
    }

    .login-header {
      text-align: center;
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .login-header h1 {
      font-family: 'Playfair Display', serif;
      font-size: clamp(1.5rem, 4vw, 1.9rem);
      font-weight: 800;
      color: var(--navy);
    }

    .login-header p {
      font-size: 0.9rem;
      color: var(--text-muted);
    }

    .form-group {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .form-label-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .form-label {
      font-size: 0.9rem;
      font-weight: 700;
      color: var(--navy);
    }

    .forgot-link {
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--blue-accent);
      text-decoration: none;
    }

    .forgot-link:hover { text-decoration: underline; }

    .input-wrapper {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 0 14px;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: #fff;
      transition: border-color 0.2s, box-shadow 0.2s;
    }

    .input-wrapper:focus-within {
      border-color: var(--blue-accent);
      box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
    }

    .input-wrapper svg {
      flex-shrink: 0;
      color: var(--text-muted);
    }

    .input-wrapper input {
      flex: 1;
      width: 100%;
      min-width: 0;
      padding: 13px 0;
      border: none;
      outline: none;
      font-family: inherit;
      font-size: 0.95rem;
      color: var(--text-main);
      background: none;
    }

    .input-wrapper input::placeholder { color: #9aa5b8; }

    .toggle-password {
      flex-shrink: 0;
      background: none;
      border: none;
      cursor: pointer;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      padding: 0;
    }

    .toggle-password:hover { color: var(--navy); }

    .btn-login {
      width: 100%; padding: 14px; border: none; border-radius: var(--radius-sm); font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: background 0.2s, transform 0.15s; }

    .btn-login:hover {
      transform: translateY(-1px); }

    .divider {
      display: flex;
      align-items: center;
      gap: 14px;
      color: var(--text-muted);
      font-size: 0.8rem;
      font-weight: 600;
    }

    .divider::before,
    .divider::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--border);
    }

    .btn-google {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      padding: 13px;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: #fff;
      font-family: inherit;
      font-size: 0.95rem;
      font-weight: 600;
      color: var(--text-main);
      cursor: pointer;
      transition: background 0.2s, border-color 0.2s;
      text-decoration: none;
    }

    .btn-google:hover {
      background: var(--bg);
      border-color: var(--blue-accent);
    }

    /* .error-box removed — login errors are reported by the shared toast
       component (css/toast.css, x-toast). */

    @media (max-width: 480px) {
      .login-card {
        padding: 32px 22px;
        border-radius: 14px;
      }
    }
