/* =========================================================
   Unified Auth Stylesheet (login, change_password, logout)
   ========================================================= */

:root {
    --bg-main: #0f1115;
    --bg-card: #181b22;
    --bg-input: #0f1115;
    --border-card: #262b36;
    --border-input: #2e3440;
    --text-primary: #ffffff;
    --text-body: #e2e8f0;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --error-bg: rgba(239, 68, 68, 0.15);
    --error-text: #f87171;
    --error-border: rgba(239, 68, 68, 0.3);
    --success-bg: rgba(34, 197, 94, 0.15);
    --success-text: #4ade80;
    --success-border: rgba(34, 197, 94, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-body);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

/* Main Auth Container */
.auth-card {
    background-color: var(--bg-card);
    padding: 2.5rem;
    border-radius: 12px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-card);
}

/* Center-aligned modifier for logout or status pages */
.auth-card.text-center {
    text-align: center;
}

/* Typography */
.auth-card h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--text-primary);
}

.auth-card .subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Spacing helper when there is no subtitle */
.auth-card h1 + form,
.auth-card h1 + .alert {
    margin-top: 1.25rem;
}

/* Alert Banners (Errors & Confirmations) */
.alert {
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    text-align: center;
}

.alert-error {
    background-color: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-border);
}

.alert-success {
    background-color: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

/* Form Elements */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    color: var(--text-muted);
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border-input);
    background-color: var(--bg-input);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--accent);
}

/* Primary Buttons & Button-Styled Links */
.btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background-color: var(--accent);
    color: var(--text-primary);
    text-decoration: none;
    text-align: center;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: var(--accent-hover);
}

/* Secondary / Subtle Footer Links */
.auth-footer {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

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

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