* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; background: #f6f7fb; color: #121826; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: #0f172a; color: #fff; }
.topbar h1 { margin: 0; font-size: 22px; }
.topbar p { margin: 4px 0 0; color: #b7c3df; font-size: 13px; }
.top-actions { display: flex; gap: 8px; align-items: center; }
button, input, select { padding: 8px 10px; border-radius: 8px; border: 1px solid #d0d7e2; }
button { background: #2563eb; color: #fff; border: none; cursor: pointer; }
button:hover { opacity: .92; }
.layout { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 82px); }
.sidebar { background: #fff; border-right: 1px solid #e5e9f2; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.tab { text-align: left; background: #eef2ff; color: #223; }
.tab.active { background: #2563eb; color: #fff; }
.content { padding: 16px; }
.panel { background: #fff; border: 1px solid #e4e9f3; border-radius: 12px; padding: 14px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: #f8faff; border: 1px solid #dce5f5; border-radius: 10px; padding: 10px; }
.kpi h4 { margin: 0; font-size: 12px; color: #556; }
.kpi strong { font-size: 23px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px; border-bottom: 1px solid #edf1f9; text-align: left; }
.inline-controls { margin: 0 0 12px 0; display: flex; gap: 10px; align-items: center; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.day-cell { min-height: 86px; border: 1px solid #e5e9f3; border-radius: 10px; background: #fefefe; padding: 6px; font-size: 12px; }
.day-cell.good { background: #dcfce7; }
.day-cell.mid { background: #fef3c7; }
.day-cell.bad { background: #fee2e2; }
.day-num { font-weight: 700; margin-bottom: 4px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stack-form { display: grid; gap: 8px; margin-bottom: 12px; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list li { border: 1px solid #e7ecf7; background: #fbfcff; border-radius: 10px; padding: 8px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; }
.badge.on_track { background: #dcfce7; }
.badge.at_risk { background: #fef3c7; }
.badge.missed { background: #fee2e2; }
.login-body { min-height: 100vh; display: grid; place-items: center; }
.login-card { width: 360px; background: #fff; border: 1px solid #e3e8f3; border-radius: 12px; padding: 16px; display: grid; gap: 8px; }
.error { color: #b91c1c; font-size: 13px; }
pre { white-space: pre-wrap; max-height: 260px; overflow: auto; background: #0b1220; color: #dbeafe; padding: 10px; border-radius: 8px; }
dialog { border: 1px solid #dbe4f5; border-radius: 12px; padding: 16px; min-width: 420px; }
.hidden { display: none !important; }
.progress-wrap { display: grid; gap: 6px; }
.progress-label { font-size: 12px; color: #334155; }
.progress-bar { width: 100%; height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #3b82f6, #2563eb); transition: width .25s ease; }
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow: auto; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(100px, 1fr)); }
  .split { grid-template-columns: 1fr; }
}
