:root {
    --bg: #f5fbf6;
    --surface: #ffffff;
    --surface-soft: #edf8ef;
    --text: #133022;
    --muted: #5f7a6d;
    --line: #d8eadc;
    --primary: #1e8e5a;
    --primary-strong: #0f6c42;
    --primary-soft: #d8f3e1;
    --shadow: 0 18px 45px rgba(16, 59, 34, 0.08);
    --radius: 22px;
    --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
}
img { max-width: 100%; height: auto; }
iframe { width: 100%; min-height: 420px; border: 0; border-radius: 18px; }
a { color: var(--primary-strong); text-decoration: none; }
a:hover { color: var(--primary); }
.container { width: min(var(--container), calc(100% - 32px)); margin: 0 auto; }
.site-main { min-height: 60vh; }
.section { padding: 72px 0; }
.section--soft { background: linear-gradient(180deg, rgba(216,243,225,0.55), rgba(237,248,239,0.35)); }
.eyebrow {
    display: inline-block;
    margin: 0 0 8px;
    font-size: 13px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--primary-strong);
    font-weight: 700;
}
h1, h2, h3, h4 { margin: 0 0 14px; line-height: 1.15; }
h1 { font-size: clamp(34px, 5vw, 58px); }
h2 { font-size: clamp(28px, 3vw, 40px); }
h3 { font-size: 22px; }
p { margin: 0 0 16px; color: var(--text); }
.lead { font-size: 18px; max-width: 680px; color: var(--muted); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(14px);
    background: rgba(245,251,246,.88);
    border-bottom: 1px solid rgba(216,234,220,.9);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 78px;
}
.brand__link { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand__mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: white;
    font-weight: 800;
    box-shadow: var(--shadow);
}
.primary-nav { display: flex; align-items: center; gap: 16px; }
.primary-nav ul {
    display: flex;
    gap: 18px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.primary-nav li { margin: 0; }
.primary-nav a { font-weight: 600; color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle {
    display: none;
    border: 0;
    background: var(--surface);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: var(--shadow);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 700;
    border: 1px solid transparent;
    transition: .2s ease;
}
.btn--primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #fff;
    box-shadow: 0 12px 28px rgba(30, 142, 90, .22);
}
.btn--primary:hover { color: #fff; transform: translateY(-1px); }
.btn--ghost {
    background: rgba(255,255,255,.8);
    color: var(--primary-strong);
    border-color: var(--line);
}
.btn--ghost:hover { background: white; }

.hero { padding: 76px 0 32px; }
.hero__grid {
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    align-items: center;
}
.hero-panel__card,
.card,
.content-shell,
.widget {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid rgba(216,234,220,.92);
    box-shadow: var(--shadow);
}
.hero-panel__card { padding: 28px; }
.hero__actions, .inline-actions, .chips { display: flex; flex-wrap: wrap; gap: 12px; }
.stats-grid {
    margin-top: 26px;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.stat-card {
    padding: 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, var(--surface-soft));
    border: 1px solid var(--line);
}
.stat-card strong { display: block; font-size: 28px; color: var(--primary-strong); }
.stat-card span { color: var(--muted); }

.section-heading,
.page-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
}
.text-link { font-weight: 700; }
.cards-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.card__body { padding: 22px; }
.card__cover {
    display: block;
    min-height: 10px;
    background: linear-gradient(135deg, var(--primary-soft), rgba(216,243,225,.4));
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
}
.feature-grid,
.two-col,
.content-grid {
    display: grid;
    gap: 20px;
}
.feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.content-grid { grid-template-columns: minmax(0, 1fr) 320px; }
.feature-card, .pad-lg { padding: 26px; }
.content-shell { padding: 28px; }
.page-content ul, .list-clean { padding-left: 18px; }
.list-clean li { margin-bottom: 8px; }
.widget-title { margin-bottom: 12px; }
.pagination { margin-top: 26px; }
.chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    border: 1px solid rgba(30,142,90,.15);
    font-weight: 700;
    font-size: 14px;
}
.embed-shell { margin: 0 0 24px; }
.section-mini { margin-top: 28px; }
.text-center { text-align: center; }

.site-footer {
    padding: 42px 0 16px;
    background: #f0f8f2;
    border-top: 1px solid var(--line);
}
.footer-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: 1.4fr 1fr 1fr;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-bottom {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
}
.auth-card, .dashboard-shell, .filter-bar { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.dashboard-shell { padding: 24px; }
.dashboard-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.metric {
    padding: 18px;
    background: linear-gradient(180deg, #fff, var(--surface-soft));
    border-radius: 18px;
    border: 1px solid var(--line);
}
.metric strong { display: block; font-size: 30px; color: var(--primary-strong); }
.filter-bar { padding: 14px; margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.filter-bar input, .filter-bar select, .auth-card input, .auth-card textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    background: #fff;
}
.auth-card textarea { min-height: 120px; padding: 12px 14px; }
.auth-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.auth-card { padding: 24px; }
.notice {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 16px;
}
.notice--success { background: #e8f8ee; border: 1px solid #b9e6cb; color: #0e5b37; }
.notice--error { background: #fff2f1; border: 1px solid #f0c6c0; color: #9f2f22; }

@media (max-width: 1024px) {
    .cards-grid, .feature-grid, .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero__grid, .content-grid, .footer-grid, .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .menu-toggle { display: inline-flex; }
    .primary-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: calc(100% + 8px);
        background: white;
        border-radius: 22px;
        border: 1px solid var(--line);
        box-shadow: var(--shadow);
        padding: 18px;
        display: none;
        flex-direction: column;
        align-items: stretch;
    }
    .primary-nav.is-open { display: flex; }
    .primary-nav ul, .header-actions { flex-direction: column; align-items: stretch; }
    .cards-grid, .feature-grid, .dashboard-grid, .stats-grid, .auth-grid { grid-template-columns: 1fr; }
    .section, .hero { padding: 54px 0; }
    .content-shell { padding: 22px; }
}
