:root {
    --bg: #f6f7fb;
    --panel: #ffffff;
    --text: #172033;
    --muted: #657089;
    --line: #dfe4ee;
    --accent: #2647d8;
    --accent-dark: #182f9c;
    --danger: #b42318;
    --success: #067647;
    --shadow: 0 18px 45px rgba(19, 31, 66, .08);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(8px);
}
.brand { font-weight: 800; color: var(--text); font-size: 1.15rem; }
nav { display: flex; gap: 20px; flex-wrap: wrap; }
nav a { color: var(--text); font-weight: 600; }
.container { width: min(1180px, calc(100vw - 32px)); margin: 32px auto 72px; }
.footer { border-top: 1px solid var(--line); padding: 24px 32px; color: var(--muted); }
.hero {
    display: grid;
    gap: 20px;
    padding: 48px;
    border-radius: 28px;
    background: linear-gradient(135deg, #ffffff 0%, #eef2ff 100%);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .13em; font-weight: 800; font-size: .8rem; }
h1 { font-size: clamp(2rem, 5vw, 4rem); line-height: 1; margin: .1em 0 .35em; }
h2 { margin-top: 0; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 760px; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 18px; }
.cards { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 24px 0; }
.card, .panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}
.card { padding: 24px; }
.card h2 { font-size: 2rem; margin-bottom: 4px; }
.card p { color: var(--muted); margin: 0; }
.panel { padding: 24px; margin: 24px 0; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    font-weight: 800;
    cursor: pointer;
}
.button:hover { background: var(--accent-dark); text-decoration: none; }
.button.secondary { background: #e9edff; color: var(--accent-dark); margin-right: 8px; }
.feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.feature-list div { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; }
.feature-list span { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
label { display: grid; gap: 8px; font-weight: 700; color: #29354d; }
input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: white;
    color: var(--text);
    font: inherit;
}
textarea { resize: vertical; }
.form { display: grid; gap: 18px; }
.alert { padding: 14px 16px; border-radius: 14px; margin: 14px 0; font-weight: 700; }
.alert.success { background: #ecfdf3; color: var(--success); border: 1px solid #abefc6; }
.alert.danger { background: #fef3f2; color: var(--danger); border: 1px solid #fecdca; }
.table { width: 100%; border-collapse: collapse; background: white; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: #f9fafc; font-size: .86rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.table tr:last-child td { border-bottom: 0; }
.num { text-align: right !important; white-space: nowrap; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.meta { display: grid; gap: 8px; }
.filters { display: flex; align-items: end; gap: 16px; flex-wrap: wrap; }
.summary-line { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.summary-line:last-child { border-bottom: 0; }
@media (max-width: 720px) {
    .topbar { align-items: flex-start; flex-direction: column; gap: 12px; padding: 14px 16px; }
    nav { gap: 12px; font-size: .95rem; }
    .hero { padding: 28px; }
    .table { display: block; overflow-x: auto; }
}
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: start; flex-wrap: wrap; }
.checkbox { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.checkbox input { width: auto; }
.checkbox-list { display: grid; gap: 10px; }
.validation { color: var(--danger); font-weight: 700; }
.notice { padding: 14px 16px; border-radius: 14px; margin: 14px 0; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; }
.inline-actions { display: inline-flex; margin-right: 10px; margin-top: 12px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f9fafc; color: var(--muted); }
.inline-form { display: inline; margin: 0; }
.auth-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
