:root {
    --auth-bg: #0b1220;
    --auth-panel: rgba(15, 23, 42, 0.92);
    --auth-border: rgba(148, 163, 184, 0.18);
    --auth-text: #e2e8f0;
    --auth-muted: #94a3b8;
    --auth-accent: #3b82f6;
    --auth-accent-hover: #2563eb;
    --auth-input-bg: rgba(2, 6, 23, 0.55);
}

* {
    box-sizing: border-box;
}

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

.auth-page {
    min-height: 100vh;
    background: var(--auth-bg);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--auth-text);
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(320px, 520px) 1fr;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem clamp(1.5rem, 4vw, 3.5rem);
    background: linear-gradient(180deg, rgba(11, 18, 32, 0.98), rgba(15, 23, 42, 0.96));
    border-right: 1px solid var(--auth-border);
}

.auth-hero {
    position: relative;
    min-height: 320px;
    background: url('../images/login-hero.webp') center/cover no-repeat;
}

.auth-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(11, 18, 32, 0.35), rgba(11, 18, 32, 0.05));
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 2rem;
}

.auth-logo-mark {
    width: 3rem;
    height: 3rem;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    display: grid;
    place-items: center;
    box-shadow: 0 0.75rem 1.5rem rgba(37, 99, 235, 0.35);
}

.auth-logo-mark svg {
    width: 1.6rem;
    height: 1.6rem;
    fill: none;
    stroke: #fff;
    stroke-width: 1.8;
}

.auth-logo-text {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.auth-heading {
    margin: 0 0 0.35rem;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    line-height: 1.15;
}

.auth-heading-accent {
    color: var(--auth-accent);
}

.auth-subtitle {
    margin: 0 0 2rem;
    color: var(--auth-muted);
    font-size: 0.98rem;
}

.auth-card-inner {
    width: min(100%, 420px);
}

.auth-field {
    margin-bottom: 1rem;
}

.auth-field label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.9rem;
    color: var(--auth-muted);
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap svg {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.1rem;
    height: 1.1rem;
    stroke: var(--auth-muted);
    fill: none;
    stroke-width: 1.8;
    pointer-events: none;
}

.auth-input-wrap .form-control {
    padding-left: 2.65rem;
}

.form-control {
    width: 100%;
    border: 1px solid var(--auth-border);
    border-radius: 0.65rem;
    background: var(--auth-input-bg);
    color: var(--auth-text);
    padding: 0.75rem 0.9rem;
    font-size: 0.98rem;
}

.form-control:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.65);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.25rem 0 1.25rem;
    font-size: 0.9rem;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--auth-muted);
}

.auth-check input {
    accent-color: var(--auth-accent);
}

.auth-link {
    color: var(--auth-accent);
    text-decoration: none;
}

.auth-link:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.btn-auth-primary {
    width: 100%;
    border: 0;
    border-radius: 0.65rem;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.85rem 1rem;
    cursor: pointer;
    box-shadow: 0 0.75rem 1.5rem rgba(37, 99, 235, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-auth-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 1rem 1.75rem rgba(37, 99, 235, 0.34);
}

.btn-auth-primary:disabled {
    cursor: not-allowed;
    opacity: 0.75;
    transform: none;
    box-shadow: none;
}

.form-control:disabled,
.form-control[readonly] {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-form-locked {
    pointer-events: none;
}

.auth-form-locked .auth-check input:disabled {
    opacity: 0.7;
}

.auth-support {
    margin-top: 1.25rem;
    text-align: center;
    color: var(--auth-muted);
    font-size: 0.9rem;
}

.auth-provider-switch {
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--auth-border);
    border-radius: 0.65rem;
    background: rgba(2, 6, 23, 0.35);
}

.auth-provider-switch-label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.85rem;
    color: var(--auth-muted);
}

.auth-provider-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
}

.auth-provider-badge {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    font-size: 0.75rem;
    font-weight: 600;
    vertical-align: middle;
}

.auth-row-trusted {
    margin-bottom: 1.25rem;
}

.auth-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--auth-border);
}

.auth-feature {
    text-align: center;
    color: var(--auth-muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.auth-feature-icon {
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    margin: 0 auto 0.45rem;
    border-radius: 0.55rem;
    background: rgba(59, 130, 246, 0.12);
    color: var(--auth-accent);
    font-size: 1rem;
}

.auth-alert {
    border-radius: 0.65rem;
    padding: 0.75rem 0.9rem;
    margin-bottom: 1rem;
    font-size: 0.92rem;
}

.auth-alert-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

.auth-alert-warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fde68a;
}

.auth-alert-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #bbf7d0;
}

.auth-compact .auth-features {
    display: none;
}

@media (max-width: 960px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        min-height: 220px;
        order: -1;
    }

    .auth-panel {
        border-right: 0;
        border-top: 1px solid var(--auth-border);
    }
}
