:root {
    --primary: #f44336;
    --primary-dark: #d32f2f;
    --primary-light: #ffebee;
    --primary-muted: rgba(244, 67, 54, 0.1);
    --bg: #fafafa;
    --surface: #ffffff;
    --surface-2: #f5f5f5;
    --border: #e8e8e8;
    --text: #1a1a1a;
    --text-secondary: #616161;
    --text-muted: #9e9e9e;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
    --shadow: 0 2px 8px rgba(0,0,0,.08);
    --radius: 10px;
    --radius-lg: 14px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body.theme-light {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Frontend header */
.site-header {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.site-header .nav-link {
    color: var(--text-secondary);
    font-size: .875rem;
    font-weight: 500;
    padding: .5rem .875rem;
    border-radius: 999px;
    transition: all .2s;
    text-decoration: none;
}

.site-header .nav-link:hover,
.site-header .nav-link.active {
    color: var(--primary);
    background: var(--primary-muted);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .625rem 1.25rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: .875rem;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, transform .15s;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
    display: inline-flex;
    align-items: center;
    padding: .625rem 1.25rem;
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: 8px;
    font-weight: 600;
    font-size: .875rem;
    text-decoration: none;
}

.section-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, border-color .2s;
}

.section-card:hover {
    border-color: rgba(244,67,54,.25);
    box-shadow: var(--shadow);
}

.section-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--primary-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .875rem;
}

.section-card-icon img,
.section-card-icon svg {
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.section-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 .375rem;
    color: var(--text);
}

.section-card p {
    font-size: .8125rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Auth pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(160deg, #fff 0%, #fafafa 50%, #ffebee 100%);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.auth-card h1 {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0 0 .25rem;
    color: var(--text);
}

.auth-card .subtitle {
    font-size: .875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

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

.form-field label {
    display: block;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: .375rem;
}

.form-field input {
    width: 100%;
    height: auto;
    min-height: 0;
    padding: .625rem .875rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: .875rem;
    line-height: 1.4;
    background: var(--surface);
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
}

.auth-page input[type="checkbox"],
.auth-page input[type="radio"] {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    max-width: 16px;
    padding: 0;
    accent-color: var(--primary);
}

.form-field input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-muted);
}

@media (max-width: 640px) {
    .auth-card { padding: 1.5rem; }
    .hide-mobile { display: none !important; }
}
