/* ===========================
   Auth Page Styles
   Only rules that cannot be expressed as Tailwind utilities
   =========================== */

/* CSS Custom Properties */
:root {
    --auth-primary: var(--color-primary);
    --auth-primary-dark: var(--color-primary-dark);
    --auth-primary-light: var(--primary-light);
    --auth-bg: linear-gradient(135deg, #1a1c2e 0%, #2d1f3d 50%, #1a1c2e 100%);
    --auth-card-bg: rgba(30, 32, 48, 0.95);
    --auth-text-primary: var(--color-gray-50);
    --auth-text-secondary: var(--color-slate-400);
    --auth-text-muted: var(--color-slate-500);
    --auth-border: rgba(var(--primary-rgb), 0.2);
    --auth-success: var(--color-green-500);
    --auth-error: #fc8181;
    --auth-warning: var(--color-orange-400);
}

/* Body background gradient */
body.auth-page {
    background: var(--auth-bg);
}

/* Scrollbar */
.login-card::-webkit-scrollbar {
    width: 6px;
}
.login-card::-webkit-scrollbar-track {
    background: transparent;
}
.login-card::-webkit-scrollbar-thumb {
    background: rgba(var(--primary-rgb), 0.3);
    border-radius: 3px;
}

/* Step dots – JS-toggled states */
.step-dot {
    width: 8px;
    height: 8px;
    border-radius: 8px;
    background: var(--auth-border);
    transition: all 0.3s ease;
}
.step-dot.active {
    background: linear-gradient(135deg, var(--color-primary), var(--secondary));
    width: 24px;
    border-radius: 4px;
}
.step-dot.completed {
    background: var(--auth-success);
}

/* Step visibility & animation – JS-toggled */
.login-step {
    display: none;
    animation: fadeIn 0.3s ease;
}
.login-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Role option – selected compound state (JS-toggled) */
.role-option.selected {
    border-color: var(--color-primary);
    background: rgba(var(--primary-rgb), 0.18);
    box-shadow: none;
}
.role-option.selected .role-check {
    border-color: var(--color-primary);
    background: linear-gradient(135deg, var(--color-primary), var(--secondary));
    color: white;
}

/* OTP input fields */
.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}
.otp-inputs input {
    width: 42px;
    height: 46px;
    text-align: center;
    font-size: var(--ui-font-size-3xl, 20px);
    font-weight: 600;
    background: rgba(var(--primary-rgb), 0.05);
    border: 1px solid var(--auth-border);
    border-radius: 0;
    color: var(--auth-text-primary);
    transition: all 0.2s ease;
}
.otp-inputs input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(var(--primary-rgb), 0.1);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.1);
}

/* Message states – JS-toggled */
.message {
    padding: 10px 14px;
    border-radius: 0;
    font-size: var(--ui-font-size-md, 13px);
    margin-bottom: 14px;
    display: none;
}
.message.error {
    background: rgba(252, 129, 129, 0.12);
    border: 1px solid rgba(252, 129, 129, 0.35);
    color: var(--color-red-300);
    display: block;
}
.message.success {
    background: rgba(72, 187, 120, 0.12);
    border: 1px solid rgba(72, 187, 120, 0.35);
    color: #9ae6b4;
    display: block;
}

/* Spinner animation */
.spinner {
    width: 22px;
    height: 22px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 8px;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Resend timer */
.resend-timer {
    text-align: center;
    color: var(--auth-text-muted);
    font-size: var(--ui-font-size-md, 13px);
    margin-top: 14px;
}
.resend-timer button {
    color: var(--primary-light);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
}
.resend-timer button:disabled {
    color: var(--auth-text-muted);
    cursor: not-allowed;
}

/* Dev OTP display */
.dev-otp {
    background: rgba(246, 173, 85, 0.12);
    border: 1px solid rgba(246, 173, 85, 0.35);
    padding: 10px;
    border-radius: 0;
    text-align: center;
    margin-bottom: 14px;
}
.dev-otp span {
    color: var(--color-orange-400);
    font-size: var(--ui-font-size-sm, 12px);
}
.dev-otp strong {
    display: block;
    color: var(--color-orange-400);
    font-size: var(--ui-font-size-3xl-lg, 22px);
    letter-spacing: 4px;
    margin-top: 4px;
}

/* ── Maintenance page ── */
.maintenance-pulse {
    animation: pulse-ring 2s ease-in-out infinite;
}
@keyframes pulse-ring {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--yellow-rgb), 0.3); }
    50%       { box-shadow: 0 0 0 12px rgba(var(--yellow-rgb), 0); }
}
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 8px;
    background: var(--color-warning);
    margin-right: 6px;
    animation: blink-dot 1.5s ease-in-out infinite;
}
@keyframes blink-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}
.maintenance-status-bar {
    background: var(--color-gray-50);
    border: 1px solid var(--color-slate-200);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
}
.maintenance-status-bar span {
    font-size: 0.8125rem;
    color: var(--color-slate-600);
    font-weight: 500;
}

