:root {
    color-scheme: light;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: #f3f6fb;
    color: #1f2937;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #e5eefb 0%, #f8f9ff 60%);
    padding: 1.5rem;
}

.page-shell {
    width: min(100%, 680px);
}

.hero-panel {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    backdrop-filter: blur(18px);
}

.login-card {
    padding: 2.25rem;
    display: grid;
    gap: 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-icon {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    border-radius: 1rem;
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
    color: #fff;
    font-size: 1.4rem;
}

.brand h1 {
    margin: 0;
    font-size: clamp(1.75rem, 2vw, 2.25rem);
}

.brand p {
    margin: 0.35rem 0 0;
    color: #475569;
    line-height: 1.5;
}

.login-form {
    display: grid;
    gap: 1rem;
}

.login-form label {
    font-weight: 600;
    color: #334155;
}

.login-form input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.95rem;
    padding: 0.95rem 1rem;
    font-size: 1rem;
    background: #f8fafc;
    color: #0f172a;
}

.login-form input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #475569;
    font-size: 0.95rem;
}

.checkbox-label input {
    width: 1rem;
    height: 1rem;
}

.link-secondary {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary {
    width: 100%;
    border: none;
    border-radius: 1.05rem;
    padding: 1rem 1.15rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
    cursor: pointer;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease;
}

.btn-primary:hover,
.btn-primary:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.18);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 0;
    color: #64748b;
    font-size: 0.9rem;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.soc-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    margin-top: 0.6rem;
    overflow: hidden;
}

.soc-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s ease;
}

.spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid rgba(37, 99, 235, 0.15);
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.footnote {
    text-align: center;
    color: #64748b;
}

.footnote a {
    color: #2563eb;
    text-decoration: none;
}

@media (max-width: 640px) {
    body {
        padding: 1rem;
    }

    .hero-panel {
        border-radius: 1.5rem;
    }

    .login-card {
        padding: 1.5rem;
    }

    .brand {
        flex-direction: column;
        align-items: flex-start;
    }

    .options-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-primary {
        padding: 1.15rem 1rem;
        font-size: 1.05rem;
    }
}

@media (max-width: 420px) {
    .status-grid {
        grid-template-columns: 1fr;
    }
    .login-card {
        padding: 1.25rem;
    }

    .brand h1 {
        font-size: 1.6rem;
    }

    .login-form input {
        font-size: 0.98rem;
    }

    .options-row {
        gap: 0.75rem;
    }
}
