/* === Design Tokens === */
:root {
    --bg: #f6f8fb;
    --card-bg: #ffffff;
    --border: #e5e7eb;
    --primary: #1f3a5f;
    --accent: #2f6fa5;
    --success-bg: #dff5e6;
    --success-text: #18794e;
    --warning-bg: #fff4d6;
    --warning-text: #9a6700;
    --error-bg: #ffe4e6;
    --error-text: #b42318;
    --text: #344054;
    --text-muted: #6b7280;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

main { flex: 1; padding: 24px 0; }

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    gap: 6px;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: #162d4a; }

.btn-block { display: flex; width: 100%; }

/* === Forms === */
.form-group { margin-bottom: 16px; }

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 4px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text);
    background: var(--card-bg);
    transition: border-color 0.15s ease;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(47, 111, 165, 0.1);
}

/* === Auth Pages === */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.auth-page.login-page {
    flex-direction: column;
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    width: 100%;
    max-width: 420px;
}

.auth-card h1 { font-size: 1.5rem; color: var(--primary); margin-bottom: 24px; text-align: center; }

/* === Flash Messages === */
.flash { padding: 12px 16px; border-radius: 8px; font-size: 0.875rem; margin-bottom: 8px; }
.flash.error { background: var(--error-bg); color: var(--error-text); }

.footer {
    border-top: 1px solid var(--border);
    padding: 16px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}
