:root {
  --bg: #f1f3f6;
  --card: #fff;
  --text: #1f2937;
  --text-muted: #6b7280;
  --border: #dfe2ea;
  --danger: #dc2626;
  --success: #3b8c10;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.site-header .logo {
  width: 36px; height: 36px; border-radius: 9px; background: #4d9a1f; color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px;
}
.site-header h1 { font-size: 17px; margin: 0; }
.site-header p { margin: 0; font-size: 12px; color: var(--text-muted); }
main { padding: 16px 20px 40px; max-width: 1400px; margin: 0 auto; }
input, select, textarea {
  font: inherit; color: inherit; border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 10px; background: #fff; min-width: 0;
}
input:focus, select:focus { outline: 2px solid #9bd06f; border-color: #6aae3a; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: #fff;
  color: var(--text); border-radius: 6px; padding: 8px 14px; font: inherit; font-weight: 500;
  cursor: pointer; white-space: nowrap; user-select: none;
}
.btn:hover { background: #f6f7fa; }
a.btn { text-decoration: none; }
.btn:disabled { opacity: .6; cursor: default; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn-danger { color: var(--danger); border-color: #f3c4c4; background: #fff5f5; }
.btn-danger:hover { background: #fde2e2; }
.muted { color: var(--text-muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid #edf0f4; text-align: left; white-space: nowrap; }
thead th { background: #f7f8fa; font-weight: 600; }
.row-actions { display: flex; gap: 6px; }
.empty-state { padding: 26px; text-align: center; color: var(--text-muted); }
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5); display: flex; align-items: center;
  justify-content: center; padding: 16px; z-index: 50;
}
.modal { background: #fff; border-radius: 12px; padding: 18px; width: 100%; max-height: 95vh; overflow: auto; }
.modal h2 { margin: 0 0 12px; font-size: 17px; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
#toast-root { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: #334155; color: #fff; padding: 10px 14px; border-radius: 8px; max-width: 360px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }
.site-footer { text-align: center; font-size: 12px; color: var(--text-muted); padding: 0 16px 24px; }
@media (max-width: 600px) {
  main { padding: 12px 12px 32px; }
  .site-header { padding: 10px 12px; }
}
