* { box-sizing: border-box; }
body { font-family: -apple-system, Segoe UI, Roboto, sans-serif; margin: 0; background: #f3f4f6; color: #111827; }
header { background: #1e3a8a; color: #fff; padding: 12px 24px; display: flex; align-items: center; gap: 24px; }
header .brand { font-weight: 700; font-size: 18px; }
header nav a { color: #e0e7ff; text-decoration: none; margin-right: 16px; font-size: 15px; }
header nav a:hover { color: #fff; text-decoration: underline; }
main { max-width: 1200px; margin: 24px auto; padding: 0 16px; }
h1 { margin: 0 0 16px; font-size: 22px; }
h3 { margin: 4px 0 12px; font-size: 16px; }

.card { background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 16px; }

.form label { display: block; margin-bottom: 12px; font-size: 14px; color: #374151; }
.form input, .form select, .form textarea {
  display: block; width: 100%; padding: 8px 10px; margin-top: 4px;
  border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; background: #fff;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid #3b82f6; border-color: transparent; }

.btn { display: inline-block; padding: 8px 16px; border: 1px solid #d1d5db; border-radius: 6px;
  background: #fff; color: #111827; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn:hover { background: #f9fafb; }
.btn.primary { background: #1e3a8a; color: #fff; border-color: #1e3a8a; }
.btn.primary:hover { background: #1e40af; }
.btn.danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn.small { padding: 4px 8px; font-size: 12px; }

.filter { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.filter label { font-size: 12px; color: #6b7280; display: block; margin-bottom: 4px; }
.filter input, .filter select { width: 100%; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 6px; }
.filter .btns { display: flex; gap: 8px; }

.table-wrap { background: #fff; border-radius: 8px; overflow-x: auto; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #e5e7eb; }
th { background: #f9fafb; font-weight: 600; color: #374151; position: sticky; top: 0; }
tr:hover td { background: #f9fafb; }
.actions { white-space: nowrap; }

.badge { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge.ok { background: #d1fae5; color: #065f46; }
.badge.warn { background: #fef3c7; color: #92400e; }

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; }
.flash.success { background: #d1fae5; color: #065f46; }
.flash.error { background: #fee2e2; color: #991b1b; }

.muted { color: #6b7280; font-size: 13px; }
.center { text-align: center; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

.form-group { margin-bottom: 12px; }
.form-group small { display: block; margin-top: 4px; }
