:root {
    --bg: #050f18;
    --card: #071b2e;
    --text: #eaf2ff;
    --muted: rgba(234, 242, 255, 0.65);
    --accent: #38bdf8;
    --border: rgba(234, 242, 255, 0.12);
}

[data-theme="light"] {
    --bg: #f3f6fb;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --accent: #2563eb;
    --border: #dbe3ee;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(600px 300px at 20% -10%, rgba(56, 189, 248, 0.25), transparent),
        radial-gradient(600px 400px at 80% 120%, rgba(124, 58, 237, 0.25), transparent),
        linear-gradient(180deg, #05121f 0%, #050f18 40%, #071b2e 100%);
}

[data-theme="light"] body {
    background:
        radial-gradient(600px 300px at 20% -10%, rgba(37, 99, 235, 0.13), transparent),
        radial-gradient(600px 400px at 80% 120%, rgba(14, 165, 233, 0.10), transparent),
        linear-gradient(180deg, #f8fafc 0%, #f3f6fb 45%, #eef4fb 100%);
}

html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.nav {
    border-bottom: 1px solid var(--border);
    background: rgba(5, 15, 24, 0.6);
    backdrop-filter: blur(12px);
}

[data-theme="light"] .nav {
    background: rgba(255, 255, 255, 0.82);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-theme-switch input { display: none; }
.login-theme-slider {
    width: 58px;
    height: 32px;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.07);
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,.14);
}
.login-theme-slider span {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 13px;
    opacity: .45;
}
.login-theme-switch input:checked + .login-theme-slider span:first-child,
.login-theme-switch input:not(:checked) + .login-theme-slider span:last-child {
    opacity: 1;
    background: var(--accent);
}

.nav-in {
    max-width: 1100px;
    margin: auto;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.5px;
}
.brand .dot {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
}

.nav-links a {
    color: var(--muted);
    margin-right: 14px;
}

.pill {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 13px;
}

.container {
    max-width: 420px;
    margin: 80px auto 40px auto;
    padding: 0 16px;
    flex: 1;
}

h1 {
    margin-bottom: 6px;
}
.subtitle {
    color: var(--muted);
    margin-bottom: 30px;
}

.auth-card {
    background: rgba(7, 27, 46, 0.75);
    backdrop-filter: blur(20px);
    padding: 28px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow:
        0 20px 60px rgba(0,0,0,0.6),
        inset 0 1px 0 rgba(255,255,255,0.05);
    animation: fadeUp 0.6s ease;
}

[data-theme="light"] .auth-card {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12), inset 0 1px 0 #ffffff;
}

.auth-card button {
    margin-top: 6px;
    margin-bottom: 18px;
}

/* Auth inputs spacing */
.auth-card input {
    margin-bottom: 14px;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Separate OTP + New Password steps */
#forgotForm input:nth-of-type(2) {
    margin-bottom: 20px; /* OTP → New password gap */
}

#forgotForm h2 {
    margin-bottom: 18px;
}

h2 {
    margin-top: 0;
}

input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.05);
    color: var(--text);
    margin-bottom: 16px;
    transition: all 0.25s ease;
    font-size: 14px;
}

[data-theme="light"] input {
    background: #f8fafc;
}

[data-theme="light"] input::placeholder { color: #94a3b8; }
[data-theme="light"] .pw-eye { color: #64748b; }
[data-theme="light"] .pw-eye:hover { color: #0f172a; }

input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

button {
    width: 100%;
    padding: 14px;
    border-radius: 16px;
    border: none;
    background: linear-gradient(90deg, #38bdf8, #22d3ee);
    color: #0a1929;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.35);
}

button:active {
    transform: translateY(0);
}

.links {
    margin-top: 10px;
    text-align: center;
}
.links a {
    font-size: 13px;
    color: var(--accent);
    cursor: pointer;
}

.hidden {
    display: none;
}

.support {
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
}
.support a {
    color: var(--accent);
}

/* Toast popup */
.toast {
    position: fixed;
    top: 84px; /* below navbar */
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;

    min-width: 320px;
    max-width: 420px;
    padding: 14px 18px;

    border-radius: 16px;
    border: 1px solid var(--border);

    background: linear-gradient(180deg, #071b2e, #041018);
    color: var(--text);

    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
    font-weight: 600;
    text-align: center;

    animation: toastSlide 0.35s ease;
}

[data-theme="light"] .toast {
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
}

@media (max-width: 520px) {
    .pill { display: none; }
    .nav-actions { gap: 6px; }
}

.toast.success {
    border-color: rgba(34, 197, 94, 0.6);
    box-shadow: 0 0 22px rgba(34, 197, 94, 0.35);
}

.toast.error {
    border-color: rgba(255, 75, 92, 0.6);
    box-shadow: 0 0 22px rgba(255, 75, 92, 0.35);
}

.toast.info {
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 0 22px rgba(56, 189, 248, 0.35);
}

.hidden {
    display: none;
}

@keyframes toastSlide {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}
.terms-text {
    margin-top: 14px;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
    color: var(--muted);
}

.terms-text a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.terms-text a:hover {
    text-decoration: underline;
}


h1 {
    font-size: 28px;
    margin-bottom: 6px;
    font-weight: 700;
    text-align: center;
}


h2 {
    font-size: 18px;
    margin-bottom: 18px;
    font-weight: 600;
}

.subtitle {
    color: var(--muted);
    margin-bottom: 32px;
    font-size: 14px;
}
.logo {
    height: 34px;
    object-fit: contain;
}

