:root {
  color-scheme: dark;
  --bg: #090c10;
  --panel: #111820;
  --panel-2: #151f28;
  --line: #253241;
  --text: #edf4f7;
  --muted: #8fa0ad;
  --green: #4ade80;
  --yellow: #facc15;
  --red: #fb7185;
  --cyan: #22d3ee;
  --blue: #60a5fa;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 34rem),
    linear-gradient(135deg, #090c10 0%, #0c1015 48%, #11161d 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  padding: 24px 18px;
  background: rgba(9, 12, 16, 0.86);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  font-weight: 800;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0 21%, var(--cyan) 21% 34%, transparent 34% 47%, var(--green) 47% 60%, transparent 60% 73%, var(--red) 73% 86%, transparent 86%),
    #131b24;
  border: 1px solid #2e4052;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.24);
}

.nav {
  display: grid;
  gap: 6px;
}

.nav a {
  color: var(--muted);
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  background: #121b24;
  border-color: #263442;
}

.sidebar-note {
  margin-top: auto;
  padding: 14px;
  border: 1px solid #253241;
  border-radius: 8px;
  background: #101720;
}

.mini-label,
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-note strong {
  display: block;
  margin-top: 8px;
  font-size: 1.25rem;
}

.shell {
  margin-left: 248px;
  min-height: 100vh;
  padding: 30px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 4.5rem);
  line-height: 0.94;
}

h2 {
  margin-bottom: 14px;
  font-size: 1.4rem;
}

h3 {
  margin-bottom: 8px;
}

.top-actions,
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button,
button {
  min-height: 40px;
  border: 1px solid #33475a;
  border-radius: 8px;
  padding: 9px 13px;
  color: var(--text);
  background: linear-gradient(180deg, #1d2a35, #141d26);
  cursor: pointer;
}

.button:hover,
button:hover {
  border-color: #4c657f;
}

.button.ghost,
button.ghost {
  background: transparent;
}

button.danger {
  border-color: rgba(251, 113, 133, 0.45);
  color: #fecdd3;
}

.view {
  display: grid;
  gap: 20px;
}

.grid {
  display: grid;
  gap: 16px;
}

.dashboard-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.two-col {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.card,
.panel {
  background: rgba(17, 24, 32, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.card {
  padding: 18px;
}

.project-card {
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--health-color);
}

.project-head,
.row-between {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-title {
  margin-bottom: 4px;
  font-size: 1.1rem;
}

.muted {
  color: var(--muted);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.metric {
  padding: 12px;
  border-radius: 8px;
  background: #0d141b;
  border: 1px solid #1f2d39;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 1.45rem;
  line-height: 1;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #071015;
  background: var(--cyan);
}

.badge.status {
  color: #dbeafe;
  background: rgba(96, 165, 250, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.35);
}

.badge.green {
  background: var(--green);
}

.badge.yellow {
  background: var(--yellow);
}

.badge.red {
  background: var(--red);
}

.badge.warn {
  color: #fee2e2;
  background: rgba(251, 113, 133, 0.16);
  border: 1px solid rgba(251, 113, 133, 0.42);
}

.panel {
  padding: 18px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid #23313d;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  color: var(--text);
  background: #0b1118;
  border: 1px solid #2a3948;
  border-radius: 8px;
  padding: 9px 10px;
  outline: none;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.alerts {
  position: sticky;
  top: 12px;
  z-index: 2;
  display: grid;
  gap: 8px;
}

.alert {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #2e4558;
  background: #0f1a24;
}

.alert.error {
  border-color: rgba(251, 113, 133, 0.5);
  background: rgba(127, 29, 29, 0.25);
}

.bars {
  display: grid;
  gap: 10px;
}

.bar {
  display: grid;
  gap: 6px;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: #0b1118;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: var(--bar-width);
  max-width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.report-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.report-list {
  display: grid;
  gap: 10px;
}

.report-item {
  padding: 12px;
  border-radius: 8px;
  background: #0d141b;
  border: 1px solid #22303d;
}

.assessment-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.assessment-block {
  padding: 14px;
  border: 1px solid #22303d;
  border-radius: 8px;
  background: #0d141b;
}

.assessment-block h3 {
  margin: 8px 0;
  font-size: 1rem;
  line-height: 1.25;
}

.board-shell {
  gap: 18px;
}

.board-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.board-toolbar h2,
.board-toolbar p {
  margin-bottom: 0;
}

.board-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  min-width: min(100%, 430px);
}

.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(230px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.board-column {
  min-height: 520px;
  padding: 14px;
  border: 1px solid #253241;
  border-radius: 8px;
  background: rgba(13, 20, 27, 0.72);
}

.board-column h3 {
  margin-bottom: 0;
}

.board-lane {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 450px;
  margin-top: 14px;
  border-radius: 8px;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.board-lane.drop-target {
  background: rgba(34, 211, 238, 0.08);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.35);
}

.empty-lane {
  min-height: 88px;
  display: grid;
  place-items: center;
  border: 1px dashed #314253;
  border-radius: 8px;
  color: var(--muted);
}

.work-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #2a3948;
  border-radius: 8px;
  background: #111922;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  cursor: grab;
}

.work-card:active {
  cursor: grabbing;
}

.work-card.dragging {
  opacity: 0.55;
}

.work-card.overdue {
  border-color: rgba(251, 113, 133, 0.56);
}

.work-card h3,
.work-card p {
  margin-bottom: 0;
}

.work-card h3 {
  font-size: 1rem;
}

.work-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.priority-low {
  color: #c7d2fe;
  background: rgba(129, 140, 248, 0.18);
  border: 1px solid rgba(129, 140, 248, 0.34);
}

.priority-normal {
  color: #dbeafe;
  background: rgba(96, 165, 250, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.34);
}

.priority-high {
  color: #fef3c7;
  background: rgba(250, 204, 21, 0.16);
  border: 1px solid rgba(250, 204, 21, 0.38);
}

.priority-urgent {
  color: #fee2e2;
  background: rgba(251, 113, 133, 0.18);
  border: 1px solid rgba(251, 113, 133, 0.42);
}

@media (max-width: 860px) {
  .sidebar {
    position: static;
    width: auto;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-note {
    display: none;
  }

  .shell {
    margin-left: 0;
    padding: 20px;
  }

  .topbar,
  .two-col,
  .project-head,
  .board-toolbar,
  .row-between {
    display: grid;
  }

  .form-grid,
  .metric-grid,
  .assessment-summary {
    grid-template-columns: 1fr;
  }

  .board-filters {
    grid-template-columns: 1fr;
    min-width: 0;
  }
}
