.app-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(2, 214, 181, 0.9);
}

.brand h1 {
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.brand p {
  font-size: 0.75rem;
  color: var(--muted);
}

.status-pill {
  border: 1px solid rgba(47, 140, 255, 0.36);
  color: #b9d8ff;
  font-size: 0.7rem;
  line-height: 1;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(12, 26, 42, 0.8);
}

.kpi-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.kpi-tile {
  background: rgba(14, 25, 40, 0.8);
  border: 1px solid rgba(117, 162, 212, 0.24);
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
}

.kpi-label {
  font-size: 0.68rem;
  color: #90adce;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.kpi-value {
  font-size: 1rem;
  line-height: 1.15;
  font-weight: 660;
}

.kpi-value.positive {
  color: #bcffe9;
}

.kpi-foot {
  font-size: 0.7rem;
  color: #a5bfdc;
}

.kpi-foot.negative {
  color: #ffbdc9;
}

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

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

.lane-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.lane-head.secondary {
  margin-top: 8px;
}

.lane-head h2 {
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  color: #9bc3f0;
}

.lane-chip {
  font-size: 0.66rem;
  color: #a6c9ef;
  border: 1px solid rgba(124, 165, 214, 0.36);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(11, 22, 35, 0.7);
}

.stack-card,
.graph-zone {
  padding: 13px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.card-head h3 {
  font-size: 0.9rem;
  font-weight: 640;
  letter-spacing: 0.01em;
}

.badge {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.badge.critical {
  background: rgba(255, 92, 122, 0.2);
  color: #ffc2ce;
  border: 1px solid rgba(255, 92, 122, 0.45);
}

.badge.warning {
  background: rgba(247, 184, 74, 0.17);
  color: #ffe2a6;
  border: 1px solid rgba(247, 184, 74, 0.4);
}

.badge.neutral {
  background: rgba(47, 140, 255, 0.16);
  color: #d2e8ff;
  border: 1px solid rgba(47, 140, 255, 0.4);
}

.badge.success {
  background: rgba(2, 214, 181, 0.16);
  color: #c4ffee;
  border: 1px solid rgba(2, 214, 181, 0.38);
}

.card-subtitle {
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.35;
  margin-bottom: 10px;
}

.preview-list {
  padding-left: 18px;
  margin: 0;
  display: grid;
  gap: 6px;
  font-size: 0.82rem;
  line-height: 1.35;
}

.preview-list li::marker {
  color: #8fc8ff;
}

.card-foot {
  margin-top: 10px;
  font-size: 0.72rem;
  color: #9fc4f2;
  letter-spacing: 0.01em;
}

.interactive {
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.interactive:hover,
.interactive:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(2, 214, 181, 0.5);
  background: linear-gradient(180deg, rgba(27, 41, 63, 0.9), rgba(14, 23, 37, 0.88));
  outline: none;
}

.graph-row {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.zone-head h3 {
  font-size: 0.81rem;
  font-weight: 620;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.zone-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.zone-head > div > span {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.71rem;
  color: var(--muted);
}

.zone-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.ghost-btn {
  border: 1px solid rgba(130, 171, 216, 0.34);
  background: rgba(11, 20, 33, 0.74);
  color: #bad6f8;
  border-radius: 8px;
  font-size: 0.68rem;
  line-height: 1;
  padding: 6px 8px;
}

.graph-placeholder {
  min-height: 170px;
  border: 1px dashed rgba(143, 183, 230, 0.4);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #8bb0da;
  background: rgba(7, 12, 20, 0.45);
  font-size: 0.84rem;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 20;
}

.modal.open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 15, 0.7);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  margin: 7vh auto;
  width: min(900px, calc(100% - 20px));
  background: linear-gradient(180deg, #18273b, #0f1a2a);
  border: 1px solid rgba(130, 177, 231, 0.35);
  border-radius: 14px;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.58);
  padding: 16px;
}

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

.modal-head h2 {
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.close-btn {
  border: 1px solid rgba(162, 193, 228, 0.4);
  background: rgba(10, 19, 31, 0.9);
  color: #cde5ff;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  cursor: pointer;
}

.modal-subtitle {
  color: var(--muted);
  font-size: 0.81rem;
  margin-bottom: 10px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(123, 165, 211, 0.2);
  border-radius: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

thead {
  background: rgba(25, 44, 68, 0.9);
}

th,
td {
  border-bottom: 1px solid rgba(117, 160, 208, 0.2);
  text-align: left;
  padding: 9px 10px;
}

tbody tr:hover {
  background: rgba(37, 67, 102, 0.22);
}

.tiny-note {
  margin-top: 8px;
  font-size: 0.72rem;
  color: #8ea6c4;
}

.status-pending,
.status-progress,
.status-blocked,
.status-done {
  border-radius: 999px;
  font-size: 0.7rem;
  padding: 2px 8px;
  display: inline-block;
  border: 1px solid transparent;
}

.status-pending {
  background: rgba(247, 184, 74, 0.15);
  color: #ffe2a6;
  border-color: rgba(247, 184, 74, 0.38);
}

.status-progress {
  background: rgba(47, 140, 255, 0.16);
  color: #c6e3ff;
  border-color: rgba(47, 140, 255, 0.45);
}

.status-blocked {
  background: rgba(255, 92, 122, 0.16);
  color: #ffd3dc;
  border-color: rgba(255, 92, 122, 0.45);
}

.status-done {
  background: rgba(2, 214, 181, 0.16);
  color: #bcffe9;
  border-color: rgba(2, 214, 181, 0.38);
}

@media (min-width: 900px) {
  .app-shell {
    padding: 22px;
  }

  .kpi-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 14px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 14px;
  }

  .lane {
    gap: 12px;
  }

  .graph-row {
    grid-template-columns: 1fr 1fr;
  }

  .graph-zone {
    min-height: 250px;
  }
}

@media (max-width: 899px) {
  .desktop-only {
    display: none;
  }
}
