* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-dark: #020611;
    --card-surface: rgba(10, 16, 32, 0.78);
    --border-glass: rgba(255, 255, 255, 0.08);
    --cyan-neon: #38bdf8;
    --blue-neon: #2563eb;
    --text-white: #f8fafc;
    --text-muted: #94a3b8;
    --text-label: #cbd5e1;
}

html, body {
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-dark);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-white);
}

.login-page-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: 
        radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.22) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(56, 189, 248, 0.16) 0%, transparent 45%),
        linear-gradient(180deg, #020611 0%, #060d21 100%);
    z-index: 1;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
    pointer-events: none;
    z-index: -1;
    animation: orbFloat 8s infinite alternate ease-in-out;
}

.orb-1 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, #2563eb, #00d2ff);
    top: -40px;
    left: -40px;
}

.orb-2 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, #6366f1, #38bdf8);
    bottom: -40px;
    right: -40px;
    animation-delay: -4s;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(25px, 20px) scale(1.08); }
}

.login-card {
    width: 100%;
    max-width: 380px;
    padding: 24px 22px;
    background: var(--card-surface);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: cardScaleIn 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

@keyframes cardScaleIn {
    from { opacity: 0; transform: scale(0.95) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.brand-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 14px;
}

.brand-logo-frame {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.brand-img-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(56, 189, 248, 0.3));
}

.brand-container h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #ffffff;
    margin-bottom: 2px;
}

.subtitle {
    font-size: 11.5px;
    color: var(--text-muted);
}

.error-toast {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12px;
    margin-bottom: 12px;
    animation: shakeErr 0.3s ease;
}

@keyframes shakeErr {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* GOOGLE AUTH BUTTON WRAPPER */
.google-login-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 12px;
    min-height: 44px;
}

.google-login-wrap .g_id_signin,
.google-login-wrap .g_id_signin > div {
    width: 100% !important;
}

.google-login-wrap iframe {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
}

.login-divider {
    position: relative;
    text-align: center;
    margin: 10px 0 12px;
}

.login-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.login-divider span {
    position: relative;
    background: #080f22;
    color: #64748b;
    padding: 0 10px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
}

.segmented-control {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(4, 9, 22, 0.7);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 12px;
}

.segmented-control input {
    display: none;
}

.segment-tab {
    text-align: center;
    padding: 7px 0;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    user-select: none;
}

.segmented-control input:checked + .segment-tab {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(37, 99, 235, 0.25));
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.form-fields-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-group {
    position: relative;
    width: 100%;
}

.field-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-label);
    margin-bottom: 4px;
}

.input-shell {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-prefix {
    position: absolute;
    left: 12px;
    color: #64748b;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-shell input {
    width: 100%;
    padding: 10px 12px 10px 38px;
    border-radius: 10px;
    border: 1px solid var(--border-glass);
    background: rgba(3, 7, 18, 0.65);
    color: #ffffff;
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
}

.input-shell input::placeholder {
    color: #475569;
    font-size: 12.5px;
}

.input-shell input:focus {
    border-color: var(--cyan-neon);
    background: rgba(3, 7, 18, 0.95);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.input-shell:focus-within .input-icon-prefix {
    color: var(--cyan-neon);
}

#passwordBox input {
    padding-right: 36px;
}

.password-visibility-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    padding: 2px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.password-visibility-toggle:hover {
    color: var(--cyan-neon);
}

.password-visibility-toggle svg {
    width: 16px;
    height: 16px;
}

.form-context-actions {
    display: flex;
    justify-content: flex-end;
    margin: 5px 0 12px;
}

.link-premium {
    color: var(--cyan-neon);
    font-size: 11.5px;
    text-decoration: none;
    font-weight: 500;
}

.link-premium:hover {
    text-decoration: underline;
}

.btn-submit-premium {
    width: 100%;
    padding: 11.5px;
    border-radius: 11px;
    border: none;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 700;
    color: #020617;
    background: linear-gradient(135deg, #38bdf8 0%, #2563eb 50%, #4f46e5 100%);
    background-size: 200% 200%;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.btn-submit-premium:hover {
    background-position: right center;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(56, 189, 248, 0.45);
}

.btn-submit-premium:active {
    transform: scale(0.98);
}

.btn-submit-premium .arrow-icon {
    width: 15px;
    height: 15px;
    transition: transform 0.2s ease;
}

.btn-submit-premium:hover .arrow-icon {
    transform: translateX(3px);
}

.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(2, 6, 23, 0.25);
    border-top-color: #020617;
    border-radius: 50%;
    animation: spinLoader 0.6s linear infinite;
    position: absolute;
}

@keyframes spinLoader {
    to { transform: rotate(360deg); }
}

.btn-submit-premium.loading .btn-text,
.btn-submit-premium.loading .arrow-icon {
    opacity: 0;
}

.btn-submit-premium.loading .spinner {
    display: block;
}

.btn-submit-premium.loading {
    pointer-events: none;
    opacity: 0.9;
}

.powered-by-wrapper {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
}

.powered-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    text-decoration: none;
    transition: all 0.2s ease;
}

.powered-badge:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(56, 189, 248, 0.3);
}

.powered-badge span {
    font-size: 9.5px;
    letter-spacing: 0.4px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
}

.powered-badge strong {
    font-size: 11px;
    color: #e2e8f0;
}

.rs-logo-img {
    width: 13px;
    height: 13px;
    object-fit: contain;
    border-radius: 2px;
}

.proudly-indian-footer {
    margin-top: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 10.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.proudly-indian-footer .text-saffron { color: #f97316; }
.proudly-indian-footer .text-white   { color: #f8fafc; }
.proudly-indian-footer .flag-icon   { margin-left: 1px; }

@media (max-height: 670px) {
    .login-card {
        padding: 16px 18px;
    }
    .brand-logo-frame {
        width: 40px;
        height: 40px;
        margin-bottom: 4px;
    }
    .brand-container h2 {
        font-size: 16px;
    }
    .login-divider {
        margin: 6px 0 8px;
    }
    .form-fields-stack {
        gap: 6px;
    }
    .powered-by-wrapper {
        margin-top: 8px;
        padding-top: 6px;
    }
}