/* ═══════════════════════════════════════════════════════════
   ConstructIQ — Industrial Dashboard CSS
   Aesthetic: Heavy industrial — concrete, steel, amber alerts
   ═══════════════════════════════════════════════════════════ */

:root {
  --concrete:    #1a1a1e;
  --concrete-2:  #22222a;
  --concrete-3:  #2c2c38;
  --concrete-4:  #36364a;
  --steel:       #4a4a66;
  --grid-line:   rgba(255,255,255,0.05);
  --amber:       #f59e0b;
  --amber-glow:  rgba(245,158,11,0.15);
  --amber-dim:   #b45309;
  --cyan:        #06b6d4;
  --cyan-dim:    rgba(6,182,212,0.12);
  --red:         #ef4444;
  --red-dim:     rgba(239,68,68,0.12);
  --green:       #10b981;
  --green-dim:   rgba(16,185,129,0.12);
  --blue:        #6366f1;
  --blue-dim:    rgba(99,102,241,0.12);
  --orange:      #f97316;
  --white:       #f0f0f8;
  --white-dim:   rgba(240,240,248,0.55);
  --white-muted: rgba(240,240,248,0.25);
  --sidebar-w:   260px;
  --topbar-h:    64px;
  --radius:      6px;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--concrete);
  color: var(--white);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(245,158,11,0.04) 0%, transparent 60%),
    repeating-linear-gradient(0deg, transparent, transparent 39px, var(--grid-line) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, var(--grid-line) 40px);
}

/* ── Sidebar ─────────────────────────────────────────────── */

.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--concrete-2);
  border-right: 1px solid var(--concrete-4);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid var(--concrete-4);
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 28px;
  color: var(--amber);
  line-height: 1;
  filter: drop-shadow(0 0 8px var(--amber));
}

.brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--white);
  line-height: 1;
}

.brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--white-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-section { padding: 20px 12px 8px; }

.nav-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--white-muted);
  padding: 0 8px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--white-dim);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  margin-bottom: 2px;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: var(--concrete-3);
  color: var(--white);
  border-color: var(--concrete-4);
}

.nav-item.active {
  background: var(--amber-glow);
  color: var(--amber);
  border-color: rgba(245,158,11,0.3);
}

.nav-icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar-footer {
  margin-top: auto;
  padding: 16px 20px;
  border-top: 1px solid var(--concrete-4);
}

.api-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--white-muted);
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--steel);
  transition: all 0.3s;
}

.api-status.online .status-dot { background: var(--green); box-shadow: 0 0 6px var(--green); }
.api-status.offline .status-dot { background: var(--red); box-shadow: 0 0 6px var(--red); }
.api-status.online .status-text { color: var(--green); }
.api-status.offline .status-text { color: var(--red); }

/* ── Main Content ─────────────────────────────────────────── */

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ───────────────────────────────────────────────── */

.topbar {
  height: var(--topbar-h);
  background: var(--concrete-2);
  border-bottom: 1px solid var(--concrete-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky; top: 0;
  z-index: 50;
}

.topbar-left { display: flex; align-items: center; gap: 16px; }

.menu-toggle {
  background: none; border: none;
  color: var(--white-dim); font-size: 20px;
  cursor: pointer; display: none;
  padding: 4px;
}

.page-breadcrumb {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 3px;
  color: var(--amber);
}

.topbar-right { display: flex; align-items: center; gap: 16px; }

.topbar-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--white-muted);
}

.refresh-btn {
  background: var(--concrete-3);
  border: 1px solid var(--concrete-4);
  color: var(--white-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}

.refresh-btn:hover {
  background: var(--concrete-4);
  color: var(--white);
}

.user-badge {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--concrete);
  font-weight: 700;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}

/* ── Pages ────────────────────────────────────────────────── */

.page-container { flex: 1; overflow-y: auto; }

.page { display: none; padding: 28px 32px; animation: fadeIn 0.3s ease; }
.page.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── Dashboard Hero ───────────────────────────────────────── */

.page-hero {
  margin-bottom: 32px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 80px);
  letter-spacing: 4px;
  line-height: 1;
  color: var(--white);
}

.hero-title em {
  font-style: normal;
  color: var(--amber);
  text-shadow: 0 0 40px rgba(245,158,11,0.3);
}

.hero-sub {
  font-size: 14px;
  color: var(--white-muted);
  margin-top: 10px;
  font-family: var(--font-mono);
  letter-spacing: 1px;
}

/* ── Stats Grid ───────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--concrete-2);
  border: 1px solid var(--concrete-4);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}

.stat-card.amber::before { background: var(--amber); }
.stat-card.cyan::before { background: var(--cyan); }
.stat-card.green::before { background: var(--green); }
.stat-card.red::before { background: var(--red); }
.stat-card.blue::before { background: var(--blue); }
.stat-card.orange::before { background: var(--orange); }

.stat-card.loading {
  background: linear-gradient(90deg, var(--concrete-2) 25%, var(--concrete-3) 50%, var(--concrete-2) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s infinite;
  min-height: 100px;
}

@keyframes shimmer { to { background-position: -400% 0; } }

.stat-card:hover {
  border-color: var(--steel);
  transform: translateY(-2px);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--white-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 2px;
  line-height: 1;
  color: var(--white);
}

.stat-sub {
  font-size: 12px;
  color: var(--white-muted);
  margin-top: 6px;
}

/* ── Dashboard Grid ───────────────────────────────────────── */

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.dash-panel {
  background: var(--concrete-2);
  border: 1px solid var(--concrete-4);
  border-radius: var(--radius);
  padding: 20px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--concrete-4);
}

.panel-header h3 {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 3px;
  color: var(--amber);
}

.panel-btn {
  background: none; border: none;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  cursor: pointer;
  padding: 0;
  transition: opacity 0.15s;
}
.panel-btn:hover { opacity: 0.7; }

/* ── Project Card in Dashboard ────────────────────────────── */

.dash-project-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--concrete-4);
}

.dash-project-item:last-child { border-bottom: none; }

.dpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.dpi-name {
  font-weight: 600;
  font-size: 13px;
}

.dpi-pct {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--amber);
}

.progress-bar {
  height: 4px;
  background: var(--concrete-4);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--amber);
  transition: width 0.6s ease;
}

.dpi-meta {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.dpi-meta span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--white-muted);
}

/* ── Budget Chart ─────────────────────────────────────────── */

.budget-chart { display: flex; flex-direction: column; gap: 12px; }

.budget-item {}

.budget-item-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
}

.budget-name { color: var(--white-dim); }
.budget-pct { font-family: var(--font-mono); color: var(--white-muted); }

.budget-bar {
  height: 8px;
  background: var(--concrete-4);
  border-radius: 4px;
  overflow: hidden;
}

.budget-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}

.budget-fill.over { background: var(--red); }
.budget-fill.warn { background: var(--orange); }
.budget-fill.ok   { background: var(--green); }

/* ── Incident / Task List in Dashboard ────────────────────── */

.dash-list-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--concrete-4);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.dash-list-item:last-child { border-bottom: none; }

.dli-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.dli-title { font-size: 13px; font-weight: 500; }
.dli-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--white-muted);
  margin-top: 3px;
}

/* ── Page Header ──────────────────────────────────────────── */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.page-header h2 {
  font-family: var(--font-display);
  font-size: 40px;
  letter-spacing: 4px;
  color: var(--amber);
}

.btn-primary {
  background: var(--amber);
  color: var(--concrete);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-primary:hover { background: #fbbf24; transform: translateY(-1px); }

/* ── Filter Bar ───────────────────────────────────────────── */

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select {
  background: var(--concrete-2);
  border: 1px solid var(--concrete-4);
  color: var(--white);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.filter-bar input { flex: 1; min-width: 200px; }

.filter-bar input:focus,
.filter-bar select:focus { border-color: var(--amber); }

.filter-bar select option { background: var(--concrete-2); }

/* ── Projects Grid ────────────────────────────────────────── */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--concrete-2);
  border: 1px solid var(--concrete-4);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.2s;
  cursor: default;
}

.project-card:hover {
  border-color: var(--steel);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.pc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.pc-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
  flex: 1;
  padding-right: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-active    { background: var(--green-dim); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.badge-planning  { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(99,102,241,0.3); }
.badge-delayed   { background: var(--red-dim); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }
.badge-completed { background: rgba(107,114,128,0.15); color: #9ca3af; border: 1px solid rgba(107,114,128,0.3); }
.badge-onhold    { background: rgba(249,115,22,0.12); color: var(--orange); border: 1px solid rgba(249,115,22,0.3); }

.pc-location {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--white-muted);
  margin-bottom: 14px;
}

.pc-progress { margin-bottom: 14px; }

.pc-progress-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
}

.pc-progress-label { color: var(--white-muted); }
.pc-progress-pct { font-family: var(--font-mono); color: var(--amber); font-weight: 600; }

.pc-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.pc-stat {
  background: var(--concrete-3);
  border-radius: 4px;
  padding: 8px 10px;
}

.pc-stat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--white-muted);
  letter-spacing: 1.5px;
  display: block;
  margin-bottom: 3px;
}

.pc-stat-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
}

.pc-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--concrete-4);
}

.btn-sm {
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.15s;
  font-family: var(--font-body);
}

.btn-edit {
  background: var(--concrete-3);
  border-color: var(--concrete-4);
  color: var(--white-dim);
}

.btn-edit:hover { border-color: var(--amber); color: var(--amber); }

.btn-delete {
  background: var(--red-dim);
  border-color: rgba(239,68,68,0.3);
  color: var(--red);
}

.btn-delete:hover { background: rgba(239,68,68,0.25); }

/* ── Kanban Board ─────────────────────────────────────────── */

.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: start;
}

.kanban-col {
  background: var(--concrete-2);
  border: 1px solid var(--concrete-4);
  border-radius: var(--radius);
  padding: 16px;
}

.kanban-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--concrete-4);
}

.kanban-col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 600;
}

.kanban-count {
  background: var(--concrete-4);
  border-radius: 12px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--white-muted);
}

.task-card {
  background: var(--concrete-3);
  border: 1px solid var(--concrete-4);
  border-radius: 5px;
  padding: 12px;
  margin-bottom: 10px;
  transition: all 0.15s;
}

.task-card:hover { border-color: var(--steel); }

.task-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.task-title {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
  padding-right: 8px;
  line-height: 1.3;
}

.priority-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}

.priority-critical { background: var(--red); box-shadow: 0 0 4px var(--red); }
.priority-high     { background: var(--orange); }
.priority-medium   { background: var(--amber); }
.priority-low      { background: var(--green); }

.task-desc {
  font-size: 11px;
  color: var(--white-muted);
  margin-bottom: 10px;
  line-height: 1.4;
}

.task-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.task-meta span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--white-muted);
  background: var(--concrete-4);
  padding: 2px 6px;
  border-radius: 3px;
}

.task-footer {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--concrete-4);
}

/* ── Workers Grid ─────────────────────────────────────────── */

.workers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.worker-card {
  background: var(--concrete-2);
  border: 1px solid var(--concrete-4);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: all 0.2s;
}

.worker-card:hover { border-color: var(--steel); transform: translateY(-2px); }

.worker-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--concrete-4);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--amber);
  flex-shrink: 0;
  border: 2px solid var(--concrete-4);
}

.worker-info { flex: 1; }

.worker-name { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.worker-role { font-size: 12px; color: var(--white-muted); margin-bottom: 8px; }

.worker-details { display: flex; flex-direction: column; gap: 4px; }

.worker-detail {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--white-muted);
}

.worker-detail span { color: var(--white-dim); }

.worker-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--concrete-4);
}

.worker-rate {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--amber);
}

/* ── Materials Table ──────────────────────────────────────── */

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  background: var(--concrete-3);
  padding: 12px 16px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--white-muted);
  border-bottom: 1px solid var(--concrete-4);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--concrete-4);
  transition: background 0.1s;
}

tbody tr:hover { background: var(--concrete-3); }

tbody td {
  padding: 12px 16px;
  color: var(--white-dim);
  vertical-align: middle;
}

tbody td:first-child { color: var(--white); font-weight: 500; }

.mat-value {
  font-family: var(--font-mono);
  color: var(--amber) !important;
}

.td-actions { display: flex; gap: 6px; }

/* ── Incidents ────────────────────────────────────────────── */

.incidents-list { display: flex; flex-direction: column; gap: 14px; }

.incident-card {
  background: var(--concrete-2);
  border: 1px solid var(--concrete-4);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  gap: 16px;
  transition: all 0.2s;
}

.incident-card:hover { border-color: var(--steel); }

.incident-severity {
  width: 4px;
  border-radius: 2px;
  flex-shrink: 0;
  align-self: stretch;
}

.sev-critical { background: var(--red); box-shadow: 0 0 8px rgba(239,68,68,0.4); }
.sev-high     { background: var(--orange); }
.sev-medium   { background: var(--amber); }
.sev-low      { background: var(--green); }

.incident-body { flex: 1; }

.incident-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.incident-title { font-size: 15px; font-weight: 600; }

.incident-desc {
  font-size: 13px;
  color: var(--white-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.incident-footer {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.incident-meta {
  display: flex;
  gap: 12px;
}

.incident-meta span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--white-muted);
}

.btn-resolve {
  background: var(--green-dim);
  border: 1px solid rgba(16,185,129,0.3);
  color: var(--green);
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-resolve:hover { background: rgba(16,185,129,0.2); }

.incident-resolved {
  opacity: 0.5;
}

/* ── Modal ────────────────────────────────────────────────── */

.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--concrete-2);
  border: 1px solid var(--concrete-4);
  border-radius: 8px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--concrete-4);
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--amber);
}

.modal-close {
  background: none; border: none;
  color: var(--white-muted); font-size: 18px;
  cursor: pointer; padding: 4px;
  transition: color 0.15s;
}

.modal-close:hover { color: var(--white); }

.modal-body { padding: 24px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--white-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--concrete-3);
  border: 1px solid var(--concrete-4);
  color: var(--white);
  padding: 9px 12px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--amber); }

.form-group select option { background: var(--concrete-3); }

.form-group textarea { min-height: 80px; resize: vertical; }

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn-cancel {
  background: var(--concrete-3);
  border: 1px solid var(--concrete-4);
  color: var(--white-dim);
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-cancel:hover { border-color: var(--steel); color: var(--white); }

/* ── Toast ────────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: 28px; right: 28px;
  background: var(--concrete-3);
  border: 1px solid var(--concrete-4);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  z-index: 2000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 340px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast.info { border-left: 3px solid var(--amber); }

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 1100px) {
  .kanban-board { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .menu-toggle { display: block; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .page { padding: 20px 16px; }
  .kanban-board { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar { padding: 0 16px; }
}

/* ── Scrollbar ────────────────────────────────────────────── */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--concrete); }
::-webkit-scrollbar-thumb { background: var(--steel); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--concrete-4); }

/* ── Empty State ──────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--white-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
}
