:root {
  --bg: #0b1020;
  --panel: #111833;
  --panel-2: #152044;
  --border: #243464;
  --text: #e8eefc;
  --muted: #9cb1e8;
  --primary: #5f8cff;
  --ok: #2ecc71;
  --warn: #f39c12;
  --danger: #ff5d73;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: linear-gradient(180deg, #0a0f1f, #090d18);
  color: var(--text);
}
.topbar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.topbar h1 { margin: 0; font-size: 24px; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
button, .btn-like {
  background: var(--primary);
  border: none;
  color: white;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
}
.secondary {
  background: #293969;
}
.btn-like { display: inline-block; text-decoration: none; }
.kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 16px 20px;
}
.kpi {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}
.kpi h3 { margin: 0; font-size: 13px; color: var(--muted); }
.kpi p { margin: 6px 0 0; font-size: 24px; font-weight: 700; }
.tabs {
  padding: 0 20px;
  display: flex;
  gap: 8px;
}
.tab {
  background: #1a2550;
  border: 1px solid var(--border);
}
.tab.active {
  background: var(--primary);
}
main { padding: 16px 20px 24px; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}
.split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
}
h2 { margin: 0 0 10px; font-size: 18px; }
.task-form label, .filters label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
}
input, select, textarea {
  width: 100%;
  margin-top: 4px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px;
  color: var(--text);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.form-actions { display: flex; gap: 8px; margin-top: 8px; }
.muted { color: var(--muted); font-size: 12px; }
.mini-tags {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.mini-tag {
  display: inline-block;
  padding: 2px 7px;
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
}
.tag-assigned { background: #2a4a9a; color: #dbe7ff; border-color: #4f73cb; }
.tag-self { background: #15301f; color: #b6f0cb; border-color: #2f6d46; }
.tag-new { background: #4f1f1f; color: #ffd6d6; border-color: #b14a4a; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 8px;
  border-bottom: 1px solid #1f2a55;
  text-align: left;
  font-size: 13px;
}
tr:hover td { background: #10193a; }
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.b-do-now { background: rgba(255, 93, 115, .2); color: #ff9dad; }
.b-schedule { background: rgba(95, 140, 255, .2); color: #bfd1ff; }
.b-delegate { background: rgba(243, 156, 18, .2); color: #ffd79a; }
.b-eliminate { background: rgba(129, 140, 248, .2); color: #d8dcff; }
.b-overdue { background: rgba(255, 93, 115, .2); color: #ff8ca0; }
.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.kanban-col {
  background: #0f1737;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  min-height: 200px;
}
.kanban-col h3 {
  margin: 4px 0 8px;
  font-size: 14px;
}
.card {
  background: #1a2550;
  border: 1px solid #31427b;
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 8px;
}
.card h4 { margin: 0 0 6px; font-size: 13px; }
.card p { margin: 0; font-size: 12px; color: var(--muted); }
.report-box {
  margin-top: 8px;
  padding: 8px;
  border: 1px dashed #3f548f;
  border-radius: 8px;
  background: #111d41;
}
.report-box p { margin: 0 0 6px; font-size: 12px; }
.report-box p:last-child { margin-bottom: 0; }
.calendar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-cell {
  min-height: 80px;
  border: 1px solid #283864;
  border-radius: 8px;
  padding: 6px;
  background: #101a3d;
  cursor: pointer;
}
.cal-cell.inactive { opacity: .35; }
.cal-cell.active-day { outline: 2px solid var(--primary); }
.cal-day { font-size: 12px; color: var(--muted); }
.cal-count { margin-top: 6px; font-size: 12px; color: #9ec5ff; }
.calendar-list ul, #calendarList { padding-left: 18px; }
.dashboard-row-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.dashboard-row-bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.chart-card {
  background: #0f1737;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}
.chart-card h2 {
  font-size: 15px;
  margin-bottom: 8px;
}
.chart-card canvas {
  width: 100% !important;
  height: 300px !important;
}
#quadrantChart {
  height: 300px !important;
}
#velocityChart {
  height: 340px !important;
}
.full-width {
  width: 100%;
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 18, 0.78);
  display: grid;
  place-items: center;
  z-index: 1000;
  padding: 16px;
}
.modal[hidden] { display: none; }
.modal-card {
  width: min(680px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}
.report-channels {
  display: flex;
  gap: 14px;
  margin: 8px 0;
}
.report-channels label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.report-channels input {
  width: auto;
  margin: 0;
}
footer {
  text-align: center;
  color: var(--muted);
  padding: 10px;
  border-top: 1px solid var(--border);
}
@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .split, .kanban-board, .grid-4, .dashboard-row-top { grid-template-columns: 1fr; }
  .chart-card canvas,
  #quadrantChart,
  #velocityChart {
    height: 250px !important;
  }
}
