:root {
    --bg: #0d1020;
    --bg-soft: #14182b;
    --card: rgba(255,255,255,.08);
    --card-strong: rgba(255,255,255,.12);
    --text: #f6f7fb;
    --muted: #aab1c5;
    --line: rgba(255,255,255,.14);
    --primary: #7c89ff;
    --primary-strong: #a4adff;
    --danger: #ff6b7a;
    --success: #56d68a;
    --shadow: 0 24px 80px rgba(0,0,0,.35);
    --radius: 24px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(124,137,255,.25), transparent 36rem),
        radial-gradient(circle at top right, rgba(255,107,122,.16), transparent 32rem),
        var(--bg);
    line-height: 1.6;
}

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

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 80px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(16px);
    background: rgba(13,16,32,.74);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px max(16px, calc((100vw - 1120px) / 2));
}

.brand {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--text);
    font-weight: 800;
    letter-spacing: -.02em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--danger));
    box-shadow: 0 10px 28px rgba(124,137,255,.3);
}

.nav {
    display: flex;
    gap: 18px;
    align-items: center;
}

.nav a {
    color: var(--muted);
    font-weight: 650;
    font-size: 14px;
}

.nav a:hover,
.nav .nav-urgent {
    color: var(--text);
}

.menu-btn {
    display: none;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 14px;
    padding: 9px 12px;
}

.hero {
    min-height: 66vh;
    display: grid;
    grid-template-columns: 1.4fr .8fr;
    gap: 28px;
    align-items: center;
}

.hero-content, .hero-card, .card, .list-item, .form-card, .article, .urgent-card, .contact-card, .stat, .empty, .quote-box {
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.hero-content {
    padding: clamp(28px, 6vw, 64px);
}

.hero h1, .page-head h1, .article h1 {
    font-size: clamp(40px, 7vw, 78px);
    line-height: .98;
    margin: 12px 0 18px;
    letter-spacing: -.06em;
}

.lead {
    color: #dce1f4;
    font-size: clamp(18px, 2vw, 22px);
    max-width: 760px;
}

.hero-text, .prose {
    color: #d7dced;
    font-size: 17px;
}

.hero-card {
    padding: 28px;
    transform: rotate(1deg);
}

.badge {
    display: inline-flex;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(124,137,255,.15);
    border: 1px solid rgba(124,137,255,.35);
    color: #d9ddff;
    font-weight: 800;
    font-size: 13px;
}

.badge.danger {
    background: rgba(255,107,122,.15);
    border-color: rgba(255,107,122,.35);
    color: #ffd6db;
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.btn, button {
    appearance: none;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.08);
    color: var(--text);
    border-radius: 16px;
    padding: 11px 16px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover, button:hover {
    background: rgba(255,255,255,.14);
    text-decoration: none;
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary), #9a6cff);
    border-color: transparent;
    color: #fff;
}

.section { margin-top: 54px; }

.section-title, .page-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    margin: 32px 0 20px;
}

.section-title h1, .section-title h2, .page-head h1 {
    margin: 0;
}

.page-head {
    display: block;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.card {
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}

.card-body { padding: 20px; }

.card h2, .card h3 {
    margin: 6px 0 8px;
    line-height: 1.15;
}

.muted {
    color: var(--muted);
    font-size: 14px;
}

.empty {
    padding: 24px;
    color: var(--muted);
    grid-column: 1 / -1;
}

.article {
    padding: clamp(24px, 5vw, 58px);
    max-width: 900px;
    margin: 24px auto;
}

.article-img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid var(--line);
    margin-bottom: 20px;
}

.back {
    display: inline-block;
    margin-bottom: 22px;
    color: var(--muted);
}

.prose {
    white-space: normal;
}

.quote-box {
    padding: 22px;
    margin-top: 24px;
    background: rgba(124,137,255,.10);
}

.search {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    max-width: 620px;
}

input, textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(0,0,0,.22);
    color: var(--text);
    border-radius: 16px;
    padding: 12px 14px;
    outline: none;
}

input:focus, textarea:focus, select:focus {
    border-color: rgba(164,173,255,.8);
    box-shadow: 0 0 0 4px rgba(124,137,255,.16);
}

textarea { resize: vertical; }

.list {
    display: grid;
    gap: 14px;
}

.list-item {
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.auth {
    max-width: 520px;
    margin: 40px auto;
}

.auth.wide {
    max-width: 900px;
}

.form-card {
    padding: 24px;
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
    color: #dce1f4;
    font-weight: 750;
}

.two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.flash {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
}

.flash.success {
    background: rgba(86,214,138,.12);
    color: #d6ffe5;
    border-color: rgba(86,214,138,.35);
}

.flash.error {
    background: rgba(255,107,122,.12);
    color: #ffd6db;
    border-color: rgba(255,107,122,.35);
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    padding: 12px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.06);
    border-radius: 20px;
}

.admin-nav a {
    padding: 9px 12px;
    border-radius: 12px;
    color: var(--text);
    background: rgba(255,255,255,.06);
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stat {
    padding: 24px;
}

.stat strong {
    display: block;
    font-size: 46px;
    line-height: 1;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: var(--radius);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

th {
    color: #dce1f4;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.inline {
    display: inline;
}

.inline button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--danger);
    font-weight: 700;
}

.thumb {
    max-width: 220px;
    border-radius: 14px;
    border: 1px solid var(--line);
}

.urgent-page {
    padding-top: 32px;
}

.urgent-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 24px;
}

.urgent-card {
    padding: 24px;
}

.contact-cards {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.contact-card {
    padding: 20px;
    color: var(--text);
}

.contact-card strong {
    display: block;
    font-size: 18px;
}

.footer {
    border-top: 1px solid var(--line);
    padding: 22px max(16px, calc((100vw - 1120px) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    background: rgba(0,0,0,.16);
}

.small { font-size: 13px; }

@media (max-width: 850px) {
    .menu-btn { display: inline-flex; }
    .nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 16px;
        right: 16px;
        padding: 16px;
        border: 1px solid var(--line);
        background: rgba(13,16,32,.96);
        border-radius: 20px;
        flex-direction: column;
        align-items: stretch;
    }
    .nav.open { display: flex; }

    .hero, .grid, .urgent-grid, .two, .stats {
        grid-template-columns: 1fr;
    }

    .hero { min-height: auto; }
    .hero-card { transform: none; }

    .section-title, .list-item, .footer {
        align-items: stretch;
        flex-direction: column;
    }

    .search { flex-direction: column; }
}
