:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --ink: #172033;
    --muted: #5f6f89;
    --line: #d9e2ef;
    --primary: #174ea6;
    --primary-dark: #0f3978;
    --accent: #dbeafe;
    --danger: #a61b1b;
    --success: #116329;
    --warning: #8a5a00;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: var(--bg); color: var(--ink); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header { background: #0b1730; color: white; border-bottom: 4px solid #1e5bb8; }
.nav { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: white; font-weight: 700; font-size: 19px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 6px; background: #eaf2ff; color: #0b1730; font-size: 13px; letter-spacing: .5px; }
nav { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
nav a { color: white; font-size: 14px; }
main.wrap { padding: 28px 0 44px; }
.site-footer { padding: 24px 0; color: var(--muted); font-size: 13px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 22px; box-shadow: 0 10px 24px rgba(22, 34, 51, .05); margin-bottom: 20px; }
.panel.compact { padding: 16px; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.15; }
p { line-height: 1.5; }
.muted { color: var(--muted); }
.kpi { background: white; border: 1px solid var(--line); border-left: 5px solid var(--primary); padding: 16px; border-radius: 6px; }
.kpi strong { display: block; font-size: 28px; margin-bottom: 6px; }
form .row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; color: #25324d; }
input, select, textarea { width: 100%; border: 1px solid #c8d4e4; border-radius: 6px; padding: 10px 11px; font-size: 14px; background: white; }
textarea { min-height: 96px; resize: vertical; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.button, button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; padding: 10px 14px; background: var(--primary); color: white; font-weight: 700; cursor: pointer; font-size: 14px; }
.button:hover, button:hover { background: var(--primary-dark); text-decoration: none; }
.button.secondary { background: #eaf1fb; color: var(--primary-dark); border: 1px solid #c9d9ef; }
.button.danger { background: var(--danger); }
.button.small { padding: 7px 10px; font-size: 13px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { padding: 10px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 14px; }
th { background: #f0f5fc; color: #23314a; white-space: nowrap; }
tr:hover td { background: #fbfdff; }
.badge { display: inline-block; border-radius: 999px; background: var(--accent); color: #12366f; padding: 4px 9px; font-size: 12px; font-weight: 700; }
.badge.warning { background: #fff1cc; color: var(--warning); }
.badge.success { background: #dcfce7; color: var(--success); }
.alert { padding: 12px 14px; border-radius: 6px; margin-bottom: 16px; border: 1px solid var(--line); background: white; }
.alert.success { border-color: #bbefc7; background: #edfdf1; color: var(--success); }
.alert.error { border-color: #f0b8b8; background: #fff0f0; color: var(--danger); }
.card-list { display: grid; gap: 12px; }
.card-item { border: 1px solid var(--line); border-radius: 7px; padding: 14px; background: white; }
.card-item h3 { font-size: 17px; }
.meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin: 6px 0 10px; }
.auth-box { max-width: 560px; margin: 28px auto; }
.print-title { display: none; }
@media (max-width: 840px) { .grid.two, .grid.three, .grid.four, form .row { grid-template-columns: 1fr; } .hero { display: block; } .nav { display: block; padding: 16px 0; } nav { margin-top: 12px; } }
@media print {
    body { background: white; color: black; }
    .no-print, .actions, .site-header, .site-footer { display: none !important; }
    .wrap { width: 100%; margin: 0; }
    main.wrap { padding: 0; }
    .panel { box-shadow: none; border: 0; padding: 0; }
    .print-title { display: block; }
    a { color: black; text-decoration: none; }
    th { background: #eee !important; }
}
.subpanel { border: 1px solid var(--line); background: #f8fbff; border-radius: 8px; padding: 16px; margin: 18px 0; }
.checkbox-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 10px 0 16px; }
.checkbox-grid.compact-checks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.check-card { display: flex; align-items: flex-start; gap: 8px; border: 1px solid #c8d4e4; border-radius: 6px; padding: 10px; background: white; font-weight: 600; line-height: 1.3; }
.check-card input { width: auto; margin-top: 2px; }
.inline-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; margin: 0; }
.inline-check input { width: auto; }
.profile-toggle { background: #f0f5fc; border: 1px solid var(--line); padding: 12px; border-radius: 8px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
@media (max-width: 840px) { .checkbox-grid, .checkbox-grid.compact-checks { grid-template-columns: 1fr; } }
.stats-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: white; border: 1px solid var(--line); border-left: 5px solid var(--primary); border-radius: 8px; padding: 15px; box-shadow: 0 8px 18px rgba(22, 34, 51, .04); }
.stat span { display: block; color: var(--muted); font-size: 13px; font-weight: 700; }
.stat strong { display: block; font-size: 30px; margin: 6px 0; }
.stat small { color: var(--muted); }
.card-grid { display: grid; gap: 14px; }
.admin-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tool-card { display: block; border: 1px solid #c9d9ef; border-radius: 8px; background: #f8fbff; padding: 16px; color: var(--ink); min-height: 120px; }
.tool-card:hover { text-decoration: none; border-color: var(--primary); box-shadow: 0 8px 20px rgba(22, 34, 51, .08); }
.tool-card strong { display: block; font-size: 17px; margin-bottom: 8px; color: var(--primary-dark); }
.tool-card span { display: block; color: var(--muted); line-height: 1.35; }
.inline-form { display: inline-flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.inline-form label { margin-bottom: 2px; }
.inline-form input, .inline-form select { width: auto; min-width: 90px; }
.stacked-form { display: grid; gap: 7px; min-width: 140px; }
.stacked-form input, .stacked-form select { padding: 7px 8px; font-size: 13px; }
@media (max-width: 980px) { .stats-grid, .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .stats-grid, .admin-grid { grid-template-columns: 1fr; } .inline-form { display: grid; width: 100%; } .inline-form input, .inline-form select { width: 100%; } }
