:root {
    --bg: #f7f8fb;
    --panel: #ffffff;
    --text: #162033;
    --muted: #667085;
    --line: #d9dee8;
    --brand: #1f6feb;
    --brand-strong: #174ea6;
    --ok: #0b7a55;
    --warn: #9a6700;
    --danger: #b42318;
    --radius: 8px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.topbar { background: #10233f; color: #fff; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { color: #fff; font-weight: 750; font-size: 20px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a { color: #fff; padding: 10px 12px; border-radius: 6px; }
.nav a:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.hero { background: #dfeafb; border-bottom: 1px solid var(--line); }
.hero-inner { padding: 56px 0; }
.hero h1 { margin: 0 0 12px; font-size: clamp(30px, 5vw, 54px); line-height: 1.08; letter-spacing: 0; }
.hero p { margin: 0; max-width: 720px; color: #344054; font-size: 18px; }
.section { padding: 32px 0; }
.section h2 { margin: 0 0 16px; font-size: 26px; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card.bootstrap-card { padding: 0; }
.card h3 { margin: 0 0 8px; font-size: 19px; }
.meta { color: var(--muted); font-size: 14px; }
.button, button:not(.btn), input[type=submit]:not(.btn) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 6px;
    border: 1px solid var(--brand);
    background: var(--brand);
    color: #fff;
    font: inherit;
    cursor: pointer;
}
.button.secondary { background: #fff; color: var(--brand); }
.button.danger { background: var(--danger); border-color: var(--danger); }
.form-grid { display: grid; gap: 14px; max-width: 760px; }
label:not(.form-label):not(.form-check-label) { display: grid; gap: 6px; font-weight: 650; }
input:not(.form-control):not(.form-check-input), textarea:not(.form-control), select:not(.form-select) {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 9px 11px;
    font: inherit;
    background: #fff;
    color: var(--text);
}
textarea:not(.form-control) { min-height: 130px; resize: vertical; }
table:not(.table) { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); }
table:not(.table) th, table:not(.table) td { padding: 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table:not(.table) th { background: #f1f4f9; }
.status { display: inline-flex; padding: 3px 8px; border-radius: 999px; font-size: 13px; background: #eef4ff; color: #174ea6; }
.status.ok { background: #e7f6ef; color: var(--ok); }
.status.warn { background: #fff4d6; color: var(--warn); }
.layout, .admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar, .admin-sidebar { background: #10233f; color: #fff; padding: 20px; }
.sidebar a, .admin-sidebar .nav-link { display: block; color: #fff; padding: 9px 10px; border-radius: 6px; }
.sidebar a:hover, .admin-sidebar .nav-link:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.admin-sidebar .nav-link.active { background: #1f6feb; }
.main, .admin-main { padding: 24px; }
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.alert:not(.alert-primary):not(.alert-secondary):not(.alert-success):not(.alert-danger):not(.alert-warning):not(.alert-info):not(.alert-light):not(.alert-dark) { padding: 12px 14px; border-radius: 6px; background: #fff4d6; border: 1px solid #f2cc60; margin-bottom: 16px; }
.footer { padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); background: #fff; }

@media (max-width: 800px) {
    .topbar-inner, .toolbar { align-items: flex-start; flex-direction: column; }
    .grid-3 { grid-template-columns: 1fr; }
    .layout, .admin-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .main { padding: 16px; }
}
