/* Sign-in card pages (login, register, forgot-password, reset-password). */
:root {
    --primary: #f59e0b;
    --primary-light: #fbbf24;
    --primary-dark: #d97706;
    --secondary: #f97316;
    --bg-dark: #0a0a12;
    --bg-gradient-1: #0f0f1a;
    --bg-gradient-2: #12121f;
    --text-light: #fef3c7;
    --text-muted: #a1a1aa;
    --text-dim: #71717a;
    --card-glass: rgba(15, 15, 26, 0.65);
    --card-border: rgba(245, 158, 11, 0.18);
    --success: #10b981;
    --danger: #ef4444;
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
    min-height: 100vh;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background:
        radial-gradient(ellipse 80% 70% at 50% 30%, rgba(245, 158, 11, 0.10) 0%, transparent 65%),
        radial-gradient(ellipse 60% 60% at 20% 85%, rgba(239, 68, 68, 0.05) 0%, transparent 70%),
        radial-gradient(ellipse 60% 60% at 80% 85%, rgba(16, 185, 129, 0.05) 0%, transparent 70%),
        linear-gradient(135deg, var(--bg-gradient-1), var(--bg-gradient-2));
    color: var(--text-light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Animated backdrop */
.login-bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.login-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.login-spotlight { position: absolute; inset: 0; mix-blend-mode: screen; transition: background 80ms linear; }
.login-scanline {
    position: absolute; inset: 0;
    background: repeating-linear-gradient(0deg, rgba(245,158,11,0.02) 0px, rgba(245,158,11,0.02) 1px, transparent 1px, transparent 3px);
    opacity: 0.5;
    animation: scan-drift 22s linear infinite;
}
@keyframes scan-drift { 0% { transform: translateY(-2%); } 100% { transform: translateY(2%); } }

/* Layout */
.login-shell {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 20px; position: relative; z-index: 2;
}
.login-stack {
    width: 100%; max-width: 420px; position: relative;
    animation: fade-up 0.55s var(--ease-smooth);
}
@keyframes fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Brand block */
.brand-block { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 26px; }
.brand-wrap {
    position: relative; width: 200px; height: 200px;
    display: flex; align-items: center; justify-content: center;
}
.brand-rings {
    position: absolute; inset: 0; width: 200px; height: 200px;
    display: flex; align-items: center; justify-content: center;
}
.brand-rings span {
    position: absolute; width: 140px; height: 140px;
    border: 1px solid rgba(245, 158, 11, 0.35); border-radius: 50%;
    opacity: 0;
    animation: ring-pulse 4s var(--ease-smooth) infinite;
}
.brand-rings span:nth-child(2) { animation-delay: 1.3s; }
.brand-rings span:nth-child(3) { animation-delay: 2.6s; }
@keyframes ring-pulse {
    0%   { transform: scale(0.85); opacity: 0; }
    30%  { opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}
.brand-glow {
    position: absolute; inset: 0;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.22) 0%, transparent 65%);
    pointer-events: none;
}
.brand-logo {
    position: relative; z-index: 1; height: 180px; max-width: 180px; object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.55));
    animation: brand-pulse 3s ease-in-out infinite;
}
@keyframes brand-pulse {
    0%, 100% { transform: scale(1);    filter: drop-shadow(0 0 16px rgba(245,158,11,0.50)); }
    50%      { transform: scale(1.04); filter: drop-shadow(0 0 28px rgba(245,158,11,0.70)); }
}
.brand-tag {
    font-size: 13px; color: var(--text-muted); text-align: center;
    max-width: 340px; line-height: 1.55; margin-top: 4px;
}
.brand-tag em { color: var(--primary-light); font-style: normal; }

/* Glass card */
.login-card {
    background: var(--card-glass);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), inset 0 1px 0 rgba(245,158,11,0.08);
    transition: transform 0.3s var(--ease-smooth);
}

/* Mode pills */
.mode-pills {
    display: flex; padding: 4px;
    background: rgba(15, 15, 26, 0.6);
    border: 1px solid rgba(245, 158, 11, 0.10);
    border-radius: 9999px;
    margin-bottom: 20px;
}
.mode-pills .pill {
    flex: 1; padding: 8px 14px; border-radius: 9999px;
    font-size: 12px; font-weight: 600; letter-spacing: 0.5px;
    text-align: center; transition: all 0.25s var(--ease-smooth);
    text-decoration: none; color: var(--text-muted);
    background: transparent; border: none; cursor: pointer; font-family: inherit;
}
.mode-pills .pill.active {
    color: var(--bg-dark);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}
.mode-pills .pill:hover:not(.active) { color: var(--text-light); }

/* Form fields */
.login-form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field-label {
    font-size: 10px; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 1.2px; font-weight: 600;
}
.field-row { display: flex; justify-content: space-between; align-items: center; }
.field-input {
    width: 100%; padding: 12px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 10px;
    color: var(--text-light); font-size: 14px; font-family: inherit;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.field-input:focus {
    outline: none; border-color: var(--primary);
    background: rgba(0, 0, 0, 0.45);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}
.field-input::placeholder { color: var(--text-dim); }

.forgot-link {
    font-size: 10px; color: var(--primary-light);
    text-transform: uppercase; letter-spacing: 1px;
    text-decoration: none; font-weight: 600;
}
.forgot-link:hover { color: var(--primary); }

/* Primary CTA */
.cta-primary {
    margin-top: 8px; padding: 14px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--bg-dark);
    font-size: 14px; font-weight: 700; letter-spacing: 0.3px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(245,158,11,0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: none; font-family: inherit;
    position: relative; overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}
.cta-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(245,158,11,0.55), inset 0 1px 0 rgba(255,255,255,0.25);
}
.cta-primary:active { transform: translateY(0); }
.cta-primary::after {
    content: '';
    position: absolute; top: 0; left: -75%; width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.25), transparent);
    transform: skewX(-20deg);
    animation: shimmer 3s ease-in-out infinite;
}
@keyframes shimmer { 0%,100% { left:-75%; } 50% { left:125%; } }

/* OR divider */
.or-divider { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.or-divider .line { flex: 1; height: 1px; background: rgba(245, 158, 11, 0.10); }
.or-divider .text {
    font-size: 10px; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 2px;
}

/* Google button */
.btn-google {
    padding: 11px 16px; border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(245, 158, 11, 0.15);
    color: var(--text-light); font-size: 13px; font-weight: 500;
    cursor: pointer;
    display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    font-family: inherit;
}
.btn-google:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(245, 158, 11, 0.30);
}
.btn-google i { color: var(--primary-light); }

/* Coming-soon hint */
.future-hint {
    margin-top: 18px; padding: 12px 14px;
    background: rgba(15, 15, 26, 0.6);
    border: 1px dashed rgba(245, 158, 11, 0.20);
    border-radius: 10px;
    font-size: 11px; color: var(--text-muted); line-height: 1.55;
}
.future-hint strong { color: var(--primary-light); font-weight: 600; }

/* Footer */
.login-footer {
    text-align: center; margin-top: 20px;
    font-size: 11px; color: var(--text-dim); line-height: 1.6;
}
.login-footer a {
    color: var(--primary-light); text-decoration: none; font-weight: 600;
}
.login-footer a:hover { color: var(--primary); }

/* Alerts */
.alert {
    padding: 10px 14px; border-radius: 10px; font-size: 13px;
    margin-bottom: 14px; font-weight: 500;
    display: flex; align-items: center; gap: 8px;
}
.alert-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.alert-info    { background: rgba(245,158,11,0.10); border: 1px solid rgba(245,158,11,0.25); color: var(--primary-light); }
.alert-error   { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }

/* Card heading + helper text for the forgot/reset password cards */
.card-title { font-size: 18px; font-weight: 700; color: var(--text-light); margin-bottom: 6px; }
.card-sub { font-size: 13px; color: var(--text-muted); line-height: 1.55; margin-bottom: 16px; }
.card-sub strong { color: var(--primary-light); font-weight: 600; }
.field-hint { font-size: 11px; color: var(--text-dim); line-height: 1.5; }

/* Short-viewport (laptops with ~720-820px viewport height).
   The default sizes assume a tall monitor; on a 1366x768 or
   1280x720 laptop the brand block + card overflows by ~130px
   and forces a scroll. Scale the brand down so everything fits
   in one screen. */
@media (max-height: 820px) {
    .login-shell { padding: 14px; }
    .brand-block { margin-bottom: 16px; gap: 10px; }
    .brand-wrap { width: 150px; height: 150px; }
    .brand-rings { width: 150px; height: 150px; }
    .brand-rings span { width: 105px; height: 105px; }
    .brand-logo { height: 130px; max-width: 130px; }
    .brand-tag { font-size: 12px; max-width: 320px; margin-top: 2px; }
    .login-card { padding: 18px; }
    .mode-pills { margin-bottom: 14px; }
    .login-footer { padding: 10px 0; font-size: 11px; }
}

/* Very short — sub-680px viewport (split-screen, kiosk, low-res
   laptops). Drop the tagline and the future-hint, shrink the
   brand further, tighten the card. Still fits the form. */
@media (max-height: 680px) {
    .brand-wrap { width: 110px; height: 110px; }
    .brand-rings { width: 110px; height: 110px; }
    .brand-rings span { width: 80px; height: 80px; }
    .brand-logo { height: 95px; max-width: 95px; }
    .brand-tag { display: none; }
    .brand-block { margin-bottom: 10px; gap: 6px; }
    .login-card { padding: 14px; border-radius: 12px; }
    .future-hint { display: none; }
    .login-footer { font-size: 10px; padding: 6px 0; }
    .login-footer span { display: none; }
}

/* Mobile */
@media (max-width: 480px) {
    .brand-wrap { width: 160px; height: 160px; }
    .brand-rings { width: 160px; height: 160px; }
    .brand-rings span { width: 110px; height: 110px; }
    .brand-logo { height: 140px; max-width: 140px; }
    .login-card { padding: 20px; border-radius: 14px; }
    .login-stack { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .brand-logo, .brand-rings span, .cta-primary::after, .login-scanline {
        animation: none !important;
    }
    .login-bg canvas { display: none; }
}
