:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #697386;
  --line: #dfe5ef;
  --blue: #2563eb;
  --blue-dark: #1e40af;
  --green: #047857;
  --red: #b91c1c;
  --amber: #b45309;
  --shadow: 0 18px 45px rgba(15,23,42,.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: inherit; text-decoration: none; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; background: #0f172a; color: white; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: #2563eb; display: grid; place-items: center; font-weight: 800; }
.brand-title { font-weight: 750; letter-spacing: -.02em; }
.brand-subtitle { color: #bfdbfe; font-size: 12px; margin-top: 2px; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav a { padding: 9px 12px; border-radius: 10px; color: #dbeafe; font-size: 14px; }
.nav a:hover, .nav a.is-active { background: rgba(37,99,235,.25); color: white; }
.page { max-width: 1240px; margin: 0 auto; padding: 28px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top left, #dbeafe 0, transparent 34%), #f8fafc; }
.login-card { width: 100%; max-width: 420px; background: white; border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 24px; padding: 28px; }
.login-logo { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: #2563eb; color: white; font-weight: 800; margin-bottom: 18px; }
.login-title { font-size: 24px; font-weight: 760; margin: 0 0 8px; letter-spacing: -.03em; }
.login-subtitle { color: var(--muted); margin: 0 0 22px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 28px rgba(15,23,42,.045); }
.card-header { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.card-title { margin: 0; font-size: 18px; font-weight: 730; letter-spacing: -.02em; }
.card-body { padding: 20px; }
.stat { padding: 20px; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { margin-top: 8px; font-size: 32px; font-weight: 780; letter-spacing: -.04em; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--text); font-weight: 650; cursor: pointer; font-size: 14px; }
.btn:hover { border-color: #c4cce0; background: #f8fafc; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: white; }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-danger { background: #fee2e2; border-color: #fecaca; color: var(--red); }
.btn-muted { color: var(--muted); }
.btn-disabled { opacity: .45; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); background: #f8fafc; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:hover td { background: #fbfdff; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; background: #eef2ff; color: #3730a3; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; font-weight: 650; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; background: white; color: var(--text); }
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: #93c5fd; box-shadow: 0 0 0 4px #dbeafe; }
.help { color: var(--muted); font-size: 12px; margin-top: 6px; }
.flash { margin-bottom: 18px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: white; }
.flash-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.flash-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.flash-info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.error-box { margin-bottom: 18px; padding: 12px 14px; border-radius: 14px; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.section-title { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 8px 0 -4px; }
.header-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.header-line h1 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.header-line p { margin: 6px 0 0; color: var(--muted); }
.search { max-width: 360px; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px; font-size: 14px; }
.kv div:nth-child(odd) { color: var(--muted); }
@media (max-width: 760px) { .topbar { height: auto; padding: 16px; flex-direction: column; align-items: flex-start; } .nav { flex-wrap: wrap; } .page { padding: 18px; } .grid-2, .grid-3, .form-row { grid-template-columns: 1fr; } .header-line { flex-direction: column; align-items: flex-start; } }

.checkbox-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.check-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 14px; }
.check-item input { width: auto; }
@media (max-width: 760px) { .checkbox-grid { grid-template-columns: 1fr; } }
