:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --line: #d9e2f2;
  --text: #1d2a3a;
  --muted: #5f6f82;
  --brand: #214fc6;
  --brand-2: #3f7bff;
  --danger: #cc3344;
  --success: #16804a;
  --warning: #b66b00;
  --shadow: 0 10px 30px rgba(20, 42, 88, 0.08);
  --radius: 18px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
button, input, select, textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: none;
  border-radius: 12px;
  transition: 0.2s ease;
}
button:hover { transform: translateY(-1px); }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
label {
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}
.small { font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); }
.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}
.hero {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  padding: 28px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.hero h1 { margin: 0 0 10px; font-size: 36px; }
.hero p { margin: 0; max-width: 900px; line-height: 1.6; }
.grid {
  display: grid;
  gap: 18px;
}
.grid.two { grid-template-columns: 1.2fr 1fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--card);
  border: 1px solid rgba(33,79,198,0.08);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card h2, .card h3 { margin-top: 0; }
.login-box {
  max-width: 420px;
  margin: 60px auto;
}
.btn-primary {
  background: var(--brand);
  color: white;
  padding: 12px 16px;
}
.btn-secondary {
  background: #edf3ff;
  color: var(--brand);
  padding: 12px 16px;
}
.btn-danger {
  background: #fff1f3;
  color: var(--danger);
  padding: 12px 16px;
}
.btn-success {
  background: #edf9f1;
  color: var(--success);
  padding: 12px 16px;
}
.btn-outline {
  background: white;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 12px 16px;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.kpi {
  background: linear-gradient(180deg, #ffffff, #f7faff);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}
.kpi .value {
  font-size: 34px;
  font-weight: 800;
  margin-top: 10px;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: #fff;
}
th, td {
  border-bottom: 1px solid #eef2f8;
  padding: 12px 14px;
  text-align: left;
  font-size: 14px;
}
th {
  background: #f7f9fd;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.badge-success { background: #edf9f1; color: var(--success); }
.badge-warning { background: #fff4e6; color: var(--warning); }
.badge-muted { background: #eef2f7; color: var(--muted); }
.row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 12px;
}
.row.three { grid-template-columns: repeat(3, 1fr); }
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.notice {
  border-left: 4px solid var(--brand);
  background: #eef4ff;
  padding: 12px 14px;
  border-radius: 12px;
  color: #24407f;
  margin-bottom: 14px;
}
.error {
  border-left-color: var(--danger);
  background: #fff2f4;
  color: #8e2030;
}
.success {
  border-left-color: var(--success);
  background: #edf9f1;
  color: #13643a;
}
.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.tab {
  background: white;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 14px;
}
.tab.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}
.section-title {
  margin: 0 0 12px;
  font-size: 22px;
}
.footer-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}
pre.sample {
  background: #0f172a;
  color: #dbeafe;
  border-radius: 14px;
  padding: 14px;
  overflow: auto;
  font-size: 13px;
}
@media (max-width: 980px) {
  .grid.two, .grid.three, .grid.four, .row, .row.three { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
  .page { padding: 14px; }
}

.checkbox-list {
  max-height: 220px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 8px;
  background: #fff;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 6px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
}
.check-row:last-child { border-bottom: 0; }
.check-row input { width: auto; }
