:root {
  --navy: #00008c;
  --sky: #4297c8;
  --orange: #e6873c;
  --body: #4a5568;
  --bg: #eef1f4;
  --paper: #ffffff;
  --line: #e3e7ee;
  --muted: #8a94a3;
  --danger: #c0392b;
  --success: #1f9d55;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; background: var(--bg);
  font-family: 'Segoe UI', Arial, Helvetica, sans-serif; color: var(--body);
}
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; background: var(--paper); border-bottom: 1px solid var(--line);
}
.topbar .brand { font-weight: 800; color: var(--navy); font-size: 16px; }
.topbar .kicker {
  font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--sky); font-weight: 700;
}
.topbar .spacer { flex: 1; }
.topbar a, .topbar button.linklike {
  color: var(--navy); text-decoration: none; font-size: 13px; font-weight: 700;
  background: none; border: none; cursor: pointer; padding: 0;
}
.topbar a + a, .topbar a + button, .topbar button + a { margin-left: 16px; }

.wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 60px 16px; }
.wrap.wide { max-width: 1100px; }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 22px;
  margin-bottom: 18px;
}
.card h2 { margin: 0 0 4px 0; color: var(--navy); font-size: 18px; }
.card .sub { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.field .help { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=date], textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 5px; padding: 9px 10px;
  font-size: 14px; font-family: inherit; background: #fbfcfd; color: var(--body);
}
input:focus, textarea:focus { outline: none; border-color: var(--sky); background: #fff; }
textarea { resize: vertical; min-height: 80px; }

.rating-group {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.rating-option {
  flex: 1; min-width: 90px; border: 1px solid var(--line); border-radius: 6px; padding: 10px;
  text-align: center; cursor: pointer; font-size: 12.5px; font-weight: 600;
}
.rating-option input { margin-right: 6px; }
.rating-option.selected { border-color: var(--sky); background: #eef7fb; }

.btn {
  display: inline-block; border: none; border-radius: 5px; padding: 10px 20px;
  font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: #000066; }
.btn-secondary { background: #fff; border: 1px solid var(--line); color: var(--navy); }
.btn-secondary:hover { border-color: var(--sky); }
.btn:disabled { opacity: 0.55; cursor: default; }

.msg { padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; }
.msg-error { background: #fdecea; color: var(--danger); border: 1px solid #f3c8c3; }
.msg-success { background: #eafaf1; color: var(--success); border: 1px solid #bfe8d1; }
.msg[hidden] { display: none; }

.captcha-row { display: flex; align-items: center; gap: 12px; }
.captcha-question {
  font-family: monospace; font-size: 16px; font-weight: 700; color: var(--navy);
  background: #f4f6f9; border-radius: 5px; padding: 8px 14px;
}
.captcha-refresh { font-size: 12px; color: var(--sky); background: none; border: none; cursor: pointer; text-decoration: underline; }

table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: 8px; overflow: hidden; }
th { text-align: left; font-size: 11px; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafbfc; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
tr:last-child td { border-bottom: none; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #fbfcfe; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters input, .filters select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; font-size: 13px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-tile { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 16px; text-align: center; }
.stat-tile .value { font-size: 26px; font-weight: 800; color: var(--navy); }
.stat-tile .label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bar-label { width: 160px; font-size: 12.5px; color: var(--body); flex-shrink: 0; }
.bar-track { flex: 1; background: #eef1f4; border-radius: 4px; overflow: hidden; height: 16px; }
.bar-fill { background: var(--sky); height: 100%; }
.bar-value { width: 42px; font-size: 12px; color: var(--muted); text-align: right; flex-shrink: 0; }

.pagination { display: flex; gap: 8px; margin-top: 14px; align-items: center; justify-content: center; }
.pagination button { padding: 6px 12px; }
.pagination span { font-size: 12.5px; color: var(--muted); }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin-bottom: 16px; }
.detail-grid .dt { font-size: 11px; text-transform: uppercase; color: var(--muted); }
.detail-grid .dd { font-size: 14px; color: var(--body); margin: 2px 0 0 0; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 13.5px; }
