/* Base styles — переменные, layout, header, footer */
:root {
    --green-600: #16a34a;
    --green-500: #22c55e;
    --green-400: #4ade80;
    --green-300: #86efac;
    --green-200: #bbf7d0;
    --green-100: #dcfce7;
    --green-50: #f0fdf4;
    --green-25: #f7fef9;
    --amber-500: #eab308;
    --amber-400: #facc15;
    --amber-100: #fef9c3;
    --white: #ffffff;
    --bg: #ffffff;
    --bg-elevated: #ffffff;
    --text: #0a0f0c;
    --text-secondary: #1a2e1f;
    --text-muted: #4b6b55;
    --border: rgba(34, 197, 94, 0.12);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08);
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;
    --on-primary: #ffffff;
}

/* Тёмная тема (#1c1c1c) */
[data-theme="dark"] {
    --white: #252525;
    --bg: #1c1c1c;
    --bg-elevated: #252525;
    --green-100: #1e3d25;
    --green-200: #2a4d35;
    --green-50: #1a2e20;
    --green-25: #152518;
    --text: #f0f0f0;
    --text-secondary: #b8b8b8;
    --text-muted: #888888;
    --border: rgba(255, 255, 255, 0.08);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
    --on-primary: #ffffff;
}

[data-theme="dark"] .header {
    background: rgba(28, 28, 28, 0.9);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: var(--bg-elevated);
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--text-muted);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

[data-theme="dark"] body {
    background: var(--bg);
}

.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-right .theme-toggle {
    margin-left: 1.5rem;
}

.logo {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    text-decoration: none;
    color: var(--text);
    transition: color 0.2s;
}

.logo:hover {
    color: var(--green-600);
}

.logo span {
    color: var(--green-500);
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.nav a:hover {
    color: var(--green-600);
}

.nav .btn-nav {
    background: var(--green-500);
    color: var(--on-primary);
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.nav .btn-nav:hover {
    background: var(--green-600);
    color: var(--on-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}

.nav-user {
    font-size: 0.9375rem;
    color: var(--text-muted);
    font-weight: 500;
}

.theme-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    background: var(--green-50);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.theme-toggle:hover {
    background: var(--green-100);
    border-color: var(--green-200);
    transform: scale(1.05);
}

.theme-toggle .theme-icon {
    position: absolute;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.theme-toggle .theme-icon-sun {
    opacity: 1;
}

.theme-toggle.active-dark .theme-icon-sun {
    opacity: 0;
}

.theme-toggle.active-dark .theme-icon-moon {
    opacity: 1;
}

main {
    flex: 1;
}

.footer {
    background: var(--green-50);
    color: var(--text-secondary);
    padding: 3.5rem 1.5rem 2rem;
    margin-top: auto;
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 700px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.footer h4 {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--green-600);
    margin-bottom: 0.875rem;
    font-weight: 600;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.65;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--green-600);
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.footer-bottom a {
    color: inherit;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--green-600);
}

.messages-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.message-success { background: var(--green-100); color: var(--green-600); border: 1px solid var(--green-200); }
.message-warning { background: var(--green-100); color: var(--green-600); border: 1px solid var(--green-200); }
.message-error { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.message-info { background: var(--green-100); color: var(--green-600); border: 1px solid var(--green-200); }
