:root {
    --primary: #3667B1;
    --secondary: #1B3C6E;
    --navy: var(--secondary);
    --blue: var(--primary);
    --gold: var(--primary);
    --on-dark: #E7F0FA;
    --cream: #f3f6fb;
    --ink: #1c2430;
    --muted: #5d6978;
    --line: #d5e0ee;
    --white: #fff;
    --danger: #8d2f2f;
    --ok: #1f6b45;
    --shadow: 0 18px 50px rgba(27, 60, 110, 0.1);
    --serif: "Fraunces", Georgia, serif;
    --sans: "Outfit", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: var(--sans); font-size: 16px; line-height: 1.6; }
a { color: var(--blue); text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.skip { position: absolute; left: -999px; }

.topbar { background: var(--secondary); color: var(--on-dark); font-size: 14px; }
.topbar .container, .nav .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.topbar a { color: var(--on-dark); }
.socials { display: flex; gap: 12px; }
.nav { background: rgba(255,255,255,.92); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--navy); font-family: var(--serif); font-weight: 650; }
.brand small { display: block; font-family: var(--sans); font-weight: 500; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-size: 11px; }
.brand img, .mark { width: 46px; height: 46px; object-fit: cover; border-radius: 50%; background: var(--secondary); color: white; display: grid; place-items: center; font-family: var(--serif); }
.menu { display: flex; gap: 18px; align-items: center; list-style: none; margin: 0; padding: 14px 0; }
.menu a { color: var(--navy); font-weight: 500; }
.menu .btn { color: white; }
.drop { position: relative; }
.drop ul { display: none; position: absolute; background: white; min-width: 190px; padding: 8px; border-radius: 12px; box-shadow: var(--shadow); list-style: none; }
.drop:hover ul, .drop:focus-within ul { display: block; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--primary); color: white; border: 0; border-radius: 999px; padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; }
.btn.gold { background: var(--secondary); color: white; }
.btn.ghost { background: transparent; color: var(--secondary); border: 1px solid var(--primary); }
.btn.danger { background: var(--danger); }

.hero { position: relative; min-height: 560px; background: var(--navy); color: white; overflow: hidden; }
.slide { min-height: 560px; display: none; align-items: flex-end; background: center/cover no-repeat; }
.slide.active { display: flex; }
.slide .veil { width: 100%; background: linear-gradient(transparent, rgba(27, 60, 110, .88)); padding: 80px 0 56px; }
.slide h1 { font-family: var(--serif); font-size: clamp(40px, 6vw, 72px); line-height: 1.05; margin: 0 0 12px; max-width: 760px; }
.hero-dots { position: absolute; right: 24px; bottom: 24px; display: flex; gap: 8px; }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.45); }
.hero-dots button.on { background: var(--gold); }

section { padding: 72px 0; }
.kicker { color: var(--gold); letter-spacing: .14em; text-transform: uppercase; font-size: 12px; font-weight: 700; }
h2, h1.page { font-family: var(--serif); font-weight: 620; line-height: 1.15; color: var(--navy); }
h2 { font-size: clamp(32px, 4vw, 48px); margin: 6px 0 18px; }
.lead { font-size: 18px; color: #314155; max-width: 720px; }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.frame { border-radius: 28px; min-height: 320px; background: #d9d1c5 center/cover; box-shadow: var(--shadow); }
.cards, .grid-3, .grid-gallery { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-gallery { grid-template-columns: repeat(3, 1fr); }
.card, .quote, .panel, .auth-card, .table-wrap { background: white; border-radius: 22px; box-shadow: var(--shadow); }
.card { overflow: hidden; }
.card .body, .quote, .pad { padding: 22px; }
.card h3, .quote h3 { margin: 0 0 8px; font-family: var(--serif); color: var(--navy); }
.card .photo { height: 180px; background: #d7e0ea center/cover; }
.quote { margin: 0; }
.quote p { font-size: 18px; }
.person { display: flex; gap: 12px; align-items: center; margin-top: 16px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--primary); color: white; display: grid; place-items: center; font-weight: 700; }
.band { background: white; }
.footer { background: var(--secondary); color: var(--on-dark); padding: 48px 0 24px; }
.footer a { color: var(--on-dark); }
.footer .container { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 24px; }
.legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 24px; padding-top: 14px; display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }

.page-hero { padding: 54px 0 10px; }
.prose { white-space: pre-wrap; }
.prose.rich { white-space: normal; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.prose.rich p { margin: 0 0 10px; }
.prose.rich ul, .prose.rich ol { padding-left: 22px; }
.ck-editor { margin-top: 6px; }
.ck-editor__editable_inline { min-height: 220px; }
.review-status { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.check-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.review-panel { margin-top: 28px; background: white; border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.review-panel h2 { margin-top: 0; color: var(--secondary); }
.review-form { margin: 14px 0 22px; }
.inline-check { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 12px 0; }
.review-list { display: grid; gap: 12px; }
.review-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.review-card header { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.list { display: grid; gap: 14px; }
.note { background: #fff; border-left: 4px solid var(--gold); padding: 16px 18px; border-radius: 12px; }
.alert { padding: 12px 14px; border-radius: 12px; background: #e7f6ee; color: var(--ok); margin-bottom: 16px; }
.alert.error { background: #fdecec; color: var(--danger); }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input, select, textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); font: inherit; background: white; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.combo { position: relative; }
.combo-native { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.combo-list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); max-height: 240px; overflow: auto; margin: 0; padding: 6px; list-style: none; background: white; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.combo-list li { padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.combo-list li.on, .combo-list li:hover { background: #e7eef8; color: var(--secondary); }
.combo-list li.empty { color: var(--muted); cursor: default; }
.combo-list li.empty:hover { background: transparent; color: var(--muted); }
textarea { min-height: 120px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.steps { display: flex; gap: 8px; margin-bottom: 18px; }
.steps span { flex: 1; text-align: center; padding: 8px; border-radius: 999px; background: #e7eef8; font-size: 13px; font-weight: 650; color: var(--secondary); }
.steps .on { background: var(--primary); color: white; }
.auth-card { padding: 28px; width: min(920px, 100%); margin: 32px auto 64px; }
.auth-card.narrow { width: min(460px, calc(100% - 32px)); }
.help { color: var(--muted); font-size: 14px; }
.quote-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #e7eef8; color: var(--secondary); font-size: 12px; font-weight: 700; }
.badge.ok { background: #e5f6ec; color: var(--ok); }
.badge.wait { background: #fff4d8; color: #8a5a10; }
.badge.no { background: #fdecec; color: var(--danger); }
.pager { margin-top: 16px; }
.pager nav { display: flex; gap: 8px; }
.thumb { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; }

.shell { display: grid; grid-template-columns: 270px 1fr; min-height: 100vh; }
.side { background: var(--secondary); color: var(--on-dark); padding: 18px 14px; overflow: auto; }
.side-brand { display: flex; align-items: center; gap: 10px; color: white; padding: 8px 10px 16px; margin-bottom: 6px; }
.side-brand img, .side-brand .mark { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.side-brand strong { display: block; font-family: var(--serif); font-size: 20px; }
.side-brand small { color: #D7E6FA; font-size: 12px; }
.side a { color: var(--on-dark); display: block; padding: 8px 10px; border-radius: 10px; }
.side a.on, .side a:hover { background: var(--primary); color: white; }
.side h2 { color: white; font-size: 22px; margin: 8px 10px 18px; }
.side .group { margin: 16px 10px 6px; color: #D7E6FA; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.nav-tree { margin: 4px 0; }
.nav-tree summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border-radius: 10px; color: white; font-weight: 650; }
.nav-tree summary::-webkit-details-marker { display: none; }
.nav-tree summary:hover { background: rgba(255,255,255,.08); }
.nav-tree .chev { width: 8px; height: 8px; border-right: 2px solid #D7E6FA; border-bottom: 2px solid #D7E6FA; transform: rotate(-45deg); transition: transform .2s ease; }
.nav-tree[open] .chev { transform: rotate(45deg); }
.nav-sub { padding: 4px 0 8px 8px; display: grid; gap: 2px; }
.nav-sub a { font-size: 14px; }
.workspace { min-width: 0; background: var(--cream); }
.panel-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 28px; background: white; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.panel-top strong { display: block; color: var(--secondary); font-family: var(--serif); font-size: 22px; }
.panel-user { display: flex; align-items: center; gap: 10px; }
.panel-user img, .panel-user .avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.main { padding: 28px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { background: white; border-radius: 18px; padding: 16px; box-shadow: var(--shadow); color: inherit; }
.stat b { display: block; font-family: var(--serif); font-size: 28px; color: var(--navy); }
.dash-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.panel-card { background: white; border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.panel-card header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel-card header h2 { margin: 0; font-size: 18px; color: var(--secondary); }
.panel-card header a { font-weight: 650; }
.role-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 8px 0 18px; }
.role-option { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: white; cursor: pointer; }
.role-option:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(54,103,177,.15); }
.role-option input { width: auto; }
.id-card { width: min(420px, 100%); background: white; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.id-card header { background: var(--navy); color: white; padding: 16px; display: flex; justify-content: space-between; }
.id-card .body { display: grid; grid-template-columns: 110px 1fr; gap: 14px; padding: 16px; }
.id-card img, .id-fallback { width: 110px; height: 130px; object-fit: cover; background: #d7e0ea; border-radius: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filters input, .filters select, .filters .combo { width: 220px; }
.filters .combo-input { width: 100%; }

@media (max-width: 900px) {
    .split, .grid-3, .grid-gallery, .quote-row, .footer .container, .form-grid, .stats, .shell, .dash-panels, .role-options { grid-template-columns: 1fr; }
    .menu { display: none; }
    .menu.open { display: flex; flex-direction: column; align-items: flex-start; position: absolute; background: white; left: 0; right: 0; top: 74px; padding: 12px 18px 18px; }
    .nav-toggle { display: inline-flex; }
}
.nav-toggle { display: none; }
