/* ==========================================================================
   Shared authentication styling for SD Analytics
   Palette matches dashboard.php (accent #3a86ff, dark #1a2332)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --auth-accent: #3a86ff;
    --auth-accent-dark: #2a76ff;
    --auth-dark: #1a2332;
    --auth-text: #1f2937;
    --auth-muted: #6b7280;
    --auth-border: #e5e7eb;
    --auth-danger: #dc2626;
    --auth-success: #059669;
    --auth-radius: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--auth-text);
    background: linear-gradient(135deg, #1a2332 0%, #22304a 45%, #3a86ff 140%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    line-height: 1.5;
}

.auth-card {
    width: 100%;
    max-width: 410px;
    background: #ffffff;
    border-radius: var(--auth-radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
    padding: 40px 36px 34px;
    animation: auth-rise 0.4s ease;
}

@keyframes auth-rise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 26px;
}

.auth-logo {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--auth-accent) 0%, #6aa8ff 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(58, 134, 255, 0.35);
    margin-bottom: 14px;
}

.auth-brand h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    color: var(--auth-dark);
    letter-spacing: -0.01em;
}

.auth-brand p {
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: var(--auth-muted);
}

.auth-field {
    margin-bottom: 16px;
}

.auth-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 6px;
}

.auth-field input {
    width: 100%;
    padding: 12px 14px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--auth-text);
    background: #f9fafb;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.auth-field input::placeholder {
    color: #9ca3af;
}

.auth-field input:focus {
    outline: none;
    background: #fff;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.18);
}

.auth-btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.98rem;
    font-weight: 600;
    font-family: inherit;
    color: #fff;
    background: var(--auth-accent);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.05s ease;
    margin-top: 4px;
}

.auth-btn:hover { background: var(--auth-accent-dark); }
.auth-btn:active { transform: translateY(1px); }

.auth-foot {
    margin-top: 22px;
    text-align: center;
    font-size: 0.88rem;
    color: var(--auth-muted);
}

.auth-foot a {
    color: var(--auth-accent);
    font-weight: 600;
    text-decoration: none;
}

.auth-foot a:hover { text-decoration: underline; }

.auth-foot + .auth-foot { margin-top: 8px; }

/* Alert / status messages */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

.auth-alert i { margin-top: 2px; }

.auth-alert.error {
    background: #fef2f2;
    color: var(--auth-danger);
    border: 1px solid #fecaca;
}

.auth-alert.success {
    background: #ecfdf5;
    color: var(--auth-success);
    border: 1px solid #a7f3d0;
}

.auth-alert.info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.auth-alert a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

@media (max-width: 480px) {
    .auth-card { padding: 32px 24px 28px; }
}
