:root {
  --metal-dark: #0f2742;
  --metal-mid: #1d4ed8;
  --metal-light: #3b82f6;
  --silver-bg: #eef2f6;
  --silver-card: #f8fafc;
  --silver-border: #cbd5e1;
  --ink: #0f172a;
  --muted: #475569;
  --conf-ok: #dcfce7;
  --conf-warn: #fef3c7;
  --conf-miss: #fee2e2;
}
* { box-sizing: border-box; font-family: 'Segoe UI', system-ui, sans-serif; }
body { margin: 0; background: linear-gradient(180deg, #e2e8f0 0%, #f1f5f9 100%); color: var(--ink); min-height: 100vh; }
header.topbar {
  background: linear-gradient(90deg, #0b1d33 0%, #163a63 55%, #334155 100%);
  color: #f8fafc; padding: 12px 24px; border-bottom: 2px solid #94a3b8;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
}
.brand-title { font-weight: 700; letter-spacing: 0.3px; font-size: 16px; }
.brand-sub { font-size: 11px; color: #cbd5e1; }
header.topbar a { color: #f8fafc; text-decoration: none; margin-left: 14px; font-weight: 600; font-size: 13px; }
.container { max-width: 1340px; margin: 18px auto; padding: 0 16px; }
.card {
  background: var(--silver-card); border: 1px solid var(--silver-border); border-radius: 8px;
  padding: 18px; margin-bottom: 16px; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}
.btn {
  background: linear-gradient(180deg, #1e40af 0%, #0f2742 100%); color: #fff; border: 1px solid #64748b;
  border-radius: 6px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: 13px;
}
.btn:hover { filter: brightness(1.08); }
.btn-outline { background: #fff; color: var(--metal-dark); border: 1px solid #64748b; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
input, select, textarea {
  width: 100%; padding: 7px 9px; border: 1px solid #94a3b8; border-radius: 5px;
  font-size: 13px; background: #fff; color: var(--ink);
}
label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
table.grade { width: 100%; border-collapse: collapse; font-size: 12px; background: #fff; }
table.grade th, table.grade td { border: 1px solid #cbd5e1; padding: 3px; text-align: center; }
table.grade th { background: #dbe4ee; color: #0f2742; }
table.grade td:first-child { text-align: left; font-weight: 600; min-width: 175px; }
table.grade input { padding: 3px 4px; font-size: 12px; text-align: center; border-radius: 3px; background: rgba(255,255,255,0.85); }
.cell-ok { background: var(--conf-ok); }
.cell-warn { background: var(--conf-warn); }
.cell-miss { background: var(--conf-miss); }
.legenda-conf { display: flex; gap: 14px; font-size: 12px; margin-bottom: 8px; align-items: center; flex-wrap: wrap; }
.dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid #64748b; }
.menu-bar { display: flex; gap: 8px; margin-bottom: 14px; border-bottom: 2px solid #94a3b8; padding-bottom: 8px; flex-wrap: wrap; }
.menu-btn { background: #e2e8f0; color: #0f2742; border: 1px solid #94a3b8; padding: 7px 14px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 13px; }
.menu-btn.active { background: #0f2742; color: #fff; }
.alert-warn { background: #fef3c7; color: #78350f; border: 1px solid #d97706; padding: 10px 14px; border-radius: 6px; margin-bottom: 12px; font-size: 13px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.badge-ok { background: #dcfce7; color: #166534; }
.badge-exp { background: #fef3c7; color: #92400e; }
@media (max-width: 900px) {
  body { font-size: 13px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
