/* Shared styles for /transit — matches cj.sv dark theme */

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

html {
  color-scheme: dark;
}

body {
  min-height: 100vh;
  background-color: #0d0e10;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  color: #f0f0f2;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 15% 5%, rgba(124, 58, 237, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 85%, rgba(74, 155, 212, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.back {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.82rem;
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s;
}

.back:hover {
  color: #94a3b8;
}

.back::before {
  content: "← ";
}

.header {
  margin-bottom: 2rem;
}

h1 {
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #e2e8f0;
}

.subtitle {
  margin-top: 0.5rem;
  color: #94a3b8;
  font-size: 0.95rem;
  line-height: 1.5;
}

.nav-cards {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 560px) {
  .nav-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  display: block;
  padding: 1.25rem 1.35rem;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 12px;
  background: rgba(15, 17, 22, 0.7);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.card:hover {
  border-color: rgba(168, 85, 247, 0.45);
  background: rgba(20, 22, 30, 0.9);
}

.card h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #e2e8f0;
}

.card p {
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.45;
}

.panel {
  margin-top: 1.5rem;
  padding: 1.35rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  background: rgba(15, 17, 22, 0.65);
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: #cbd5e1;
  margin-bottom: 0.4rem;
}

input[type="file"],
input[type="password"],
input[type="text"],
select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #0a0b0d;
  color: #f1f5f9;
  font: inherit;
  margin-bottom: 1rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #cbd5e1;
}

.checkbox-row input {
  width: auto;
  margin: 0;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  border: none;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.1s;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
}

.btn-secondary {
  background: rgba(148, 163, 184, 0.15);
  color: #e2e8f0;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.status-msg {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.45;
}

.status-msg.info {
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
}

.status-msg.ok {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.status-msg.err {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

.report-section {
  margin-top: 1.5rem;
}

.report-section h2 {
  font-size: 1rem;
  margin-bottom: 0.65rem;
}

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

th,
td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  vertical-align: top;
}

th {
  color: #94a3b8;
  font-weight: 500;
}

.muted {
  color: #64748b;
  font-size: 0.8rem;
}

.sev-error h2 {
  color: #fca5a5;
}

.sev-warning h2 {
  color: #fcd34d;
}

.status.ok {
  color: #86efac;
}

.status.fail {
  color: #fca5a5;
}

.meta {
  color: #64748b;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.feed-list {
  list-style: none;
  margin-top: 1rem;
}

.feed-list li {
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  background: rgba(10, 11, 13, 0.5);
}

.feed-list a {
  color: #c4b5fd;
  word-break: break-all;
}

.progress {
  height: 4px;
  background: rgba(148, 163, 184, 0.15);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.75rem;
  display: none;
}

.progress.active {
  display: block;
}

.progress-bar {
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  animation: progress 1.2s ease-in-out infinite;
}

@keyframes progress {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(350%);
  }
}

.hidden {
  display: none !important;
}

/* ── App shell ───────────────────────────────────────────── */

.app {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(10, 11, 14, 0.85);
  backdrop-filter: blur(8px);
  padding: 1.25rem 0.85rem;
}

.sidebar-brand {
  padding: 0 0.5rem 1.25rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  margin-bottom: 1rem;
}

.brand-link {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
  text-decoration: none;
}

.brand-sub {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.nav-link {
  display: block;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font-size: 0.88rem;
  color: #94a3b8;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: rgba(148, 163, 184, 0.08);
  color: #e2e8f0;
}

.nav-link.active {
  background: rgba(124, 58, 237, 0.2);
  color: #e9d5ff;
  font-weight: 500;
}

.muted-link {
  font-size: 0.8rem;
}

.sidebar-foot {
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(13, 14, 16, 0.6);
}

.app-title {
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #e2e8f0;
}

.app-subtitle {
  margin-top: 0.35rem;
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 42rem;
}

.app-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.workspace-chip {
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(168, 85, 247, 0.35);
  background: rgba(124, 58, 237, 0.12);
  color: #ddd6fe;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-chip.empty {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(148, 163, 184, 0.06);
  color: #64748b;
}

.app-content {
  flex: 1;
  overflow: auto;
  padding: 1.25rem 1.5rem 2.5rem;
}

.page-inner {
  max-width: 1200px;
}

.page-inner.studio-page,
.studio-page {
  max-width: 1440px;
}

/* ── Studio review: timetable + metadata ─────────────────── */

.review-layout {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .review-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  }
}

.timetable-panel {
  min-width: 0;
  padding: 1rem 1.1rem 1.15rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  background: rgba(15, 17, 22, 0.65);
}

.timetable-header {
  margin-bottom: 0.85rem;
}

.timetable-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #e2e8f0;
}

.timetable-lead {
  font-size: 0.82rem;
  margin-top: 0.2rem;
}

.timetable-filters {
  margin-bottom: 0.75rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: flex-end;
  margin-bottom: 0.55rem;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 10rem;
  max-width: 20rem;
  margin: 0;
  font-size: 0.78rem;
  color: #94a3b8;
}

.filter-field select {
  margin: 0;
  font-size: 0.85rem;
}

.filter-field-wide {
  max-width: none;
}

.direction-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.direction-tab {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  padding: 0.35rem 0.85rem;
  border-radius: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
}

.direction-tab:hover:not(:disabled) {
  border-color: rgba(167, 139, 250, 0.45);
  color: #e2e8f0;
}

.direction-tab.active {
  background: rgba(109, 40, 217, 0.35);
  border-color: #7c3aed;
  color: #f8fafc;
}

.direction-tab:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.filter-toggles {
  margin-bottom: 0;
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #cbd5e1;
  cursor: pointer;
}

.filter-check input {
  width: auto;
  margin: 0;
}

.timetable-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
  font-size: 0.8rem;
  color: #cbd5e1;
  margin-bottom: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(10, 11, 13, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.08);
}

.timetable-meta-row strong {
  color: #94a3b8;
  font-weight: 500;
  margin-right: 0.25rem;
}

.timetable-meta-row code {
  font-size: 0.75rem;
}

.timetable-placeholder {
  padding: 2rem 1rem;
  text-align: center;
}

.timetable-wrap {
  max-height: min(70vh, 36rem);
  margin-top: 0;
}

table.timetable-grid {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.timetable-grid th,
.timetable-grid td {
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  vertical-align: top;
}

.timetable-grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #1a1b20;
  color: #a1a1aa;
  font-weight: 500;
}

.timetable-grid .col-stop {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #14151a;
  min-width: 11rem;
  max-width: 14rem;
  white-space: normal;
}

.timetable-grid thead .col-stop {
  z-index: 3;
  background: #1a1b20;
}

.timetable-grid .col-status {
  position: sticky;
  left: 11rem;
  z-index: 1;
  background: #14151a;
  text-align: center;
  min-width: 2.75rem;
}

.timetable-grid thead .col-status {
  z-index: 3;
  background: #1a1b20;
}

.timetable-grid .stop-name {
  display: block;
  color: #e4e4e7;
}

.timetable-grid .stop-id {
  display: block;
  font-size: 0.7rem;
  margin-top: 0.1rem;
}

.timetable-grid .status-ptp {
  color: #c4b5fd;
  font-weight: 600;
  font-size: 0.72rem;
}

.timetable-grid .status-tip {
  color: #94a3b8;
  font-size: 0.72rem;
}

.timetable-grid .status-oth {
  color: #52525b;
  font-size: 0.72rem;
}

.timetable-grid .cell-timing {
  color: #f4f4f5;
  font-weight: 500;
  text-align: center;
}

.timetable-grid .cell-pass {
  color: #71717a;
  text-align: center;
  font-size: 0.75rem;
}

.timetable-grid .col-time {
  text-align: center;
  min-width: 3rem;
}

.timetable-trip-meta th,
.timetable-trip-meta td {
  font-size: 0.68rem;
  font-weight: 500;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.55);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  padding: 0.28rem 0.45rem;
  vertical-align: top;
}

.timetable-trip-meta .col-meta-label {
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}

.timetable-trip-meta .col-meta {
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.66rem;
  color: #cbd5e1;
  word-break: break-all;
}

.timetable-blocks td,
.timetable-blocks th {
  font-size: 0.72rem;
  color: #64748b;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.review-aside {
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  background: rgba(12, 13, 16, 0.55);
}

.stat-grid-compact {
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.stat-grid-compact .stat {
  padding: 0.45rem 0.35rem;
}

.stat-grid-compact .num {
  font-size: 1rem;
}

.stat-grid-compact .lbl {
  font-size: 0.68rem;
}

.meta-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.65rem;
}

.meta-tabs button {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
}

.meta-tabs button.active {
  background: rgba(124, 58, 237, 0.2);
  border-color: rgba(168, 85, 247, 0.4);
  color: #e9d5ff;
}

.meta-toolbar {
  margin-bottom: 0.5rem;
}

.meta-toolbar input[type="search"] {
  margin: 0;
  font-size: 0.82rem;
  padding: 0.45rem 0.6rem;
}

.meta-panel {
  min-height: 8rem;
}

.meta-panel .table-wrap {
  max-height: 22rem;
}

.meta-hint {
  font-size: 0.78rem;
  margin-bottom: 0.45rem;
}

.operating-period-row {
  margin-top: 0.65rem;
}

.operating-period-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  align-items: flex-end;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(10, 11, 13, 0.4);
  font-size: 0.82rem;
}

.operating-period-label {
  color: #cbd5e1;
}

.operating-period-end {
  min-width: 11rem;
  max-width: 14rem;
}

.operating-period-end input[type="date"] {
  margin: 0;
}

.drawer-subhead {
  margin: 1rem 0 0.5rem;
  font-size: 0.9rem;
  color: #e2e8f0;
}


.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
}

@media (max-width: 768px) {
  .app {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .sidebar-brand {
    border: none;
    margin: 0;
    padding: 0 0.5rem 0 0;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1;
  }

  .sidebar-foot {
    border: none;
    padding: 0;
  }
}

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

.hero-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-bottom: 1.5rem;
}

.hero-card {
  padding: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  background: rgba(15, 17, 22, 0.65);
}

.hero-card h2 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #e2e8f0;
}

.hero-card p {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.45;
  margin-bottom: 0.85rem;
}

.workflow-steps {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin: 1rem 0;
}

.workflow-step {
  text-align: center;
  padding: 0.85rem 0.5rem;
  border-radius: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.2);
  background: rgba(10, 11, 13, 0.4);
}

.workflow-step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.25);
  color: #e9d5ff;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.workflow-step .step-label {
  display: block;
  font-size: 0.82rem;
  color: #cbd5e1;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.75rem;
}

.stat {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.85rem;
}

.stat .num {
  font-size: 1.4rem;
  font-weight: 600;
  color: #f1f5f9;
}

.stat .lbl {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

/* ── Workbench ───────────────────────────────────────────── */

.workbench-layout {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .workbench-layout {
    grid-template-columns: 1fr 320px;
    align-items: start;
  }
}

.step-panel {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  background: rgba(15, 17, 22, 0.65);
  overflow: hidden;
}

.step-panel-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(10, 11, 13, 0.35);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 6px;
  background: rgba(124, 58, 237, 0.3);
  color: #e9d5ff;
  font-size: 0.72rem;
  font-weight: 600;
  flex-shrink: 0;
}

.step-panel-header h2 {
  font-size: 0.92rem;
  font-weight: 600;
  color: #e2e8f0;
}

.step-panel-body {
  padding: 1.1rem;
}

.drop-zone {
  display: block;
  border: 2px dashed rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  padding: 2rem 1.25rem;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(124, 58, 237, 0.06);
}

.drop-zone p {
  color: #94a3b8;
  font-size: 0.88rem;
  margin-bottom: 0.75rem;
}

.file-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.file-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
}

.file-list li:last-child {
  border-bottom: none;
}

.file-list .file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-list .file-status {
  font-size: 0.72rem;
  color: #a78bfa;
}

.file-list .btn-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #f87171;
  font-size: 0.85rem;
  padding: 0 0.25rem;
}

.format-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.5rem 0;
}

.format-chip {
  font-size: 0.72rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d4d4d8;
  background: rgba(255, 255, 255, 0.04);
}

.format-chip.import-only {
  opacity: 0.75;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem 1rem;
  margin-top: 0.5rem;
}

.option-grid label {
  margin-bottom: 0.25rem;
}

.sidebar-panel {
  position: sticky;
  top: 0;
}

.action-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.action-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  font-size: 0.85rem;
  color: #94a3b8;
}

.action-list li:last-child {
  border-bottom: none;
}

.action-list strong {
  display: block;
  color: #e2e8f0;
  font-weight: 500;
  margin-bottom: 0.15rem;
}

/* ── Explorer / viewer ───────────────────────────────────── */

.explorer-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 1rem;
}

.explorer-toolbar input[type="search"],
.explorer-toolbar select {
  width: auto;
  min-width: 10rem;
  flex: 1;
  max-width: 18rem;
  margin-bottom: 0;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}

.tabs button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e4e4e7;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
}

.tabs button.active {
  background: #6d28d9;
  border-color: #7c3aed;
}

.viewer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.viewer-table th,
.viewer-table td {
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

.viewer-table th {
  color: #a1a1aa;
  position: sticky;
  top: 0;
  background: #18181b;
  font-weight: 500;
}

.viewer-table tr.clickable {
  cursor: pointer;
}

.viewer-table tr.clickable:hover td {
  background: rgba(124, 58, 237, 0.08);
}

.table-wrap {
  max-height: 32rem;
  overflow: auto;
  margin-top: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 8px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin: 0.75rem 0;
}

.detail-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.detail-drawer.open {
  pointer-events: auto;
  opacity: 1;
}

.detail-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.detail-drawer-panel {
  position: relative;
  width: min(480px, 100%);
  height: 100%;
  background: #14151a;
  border-left: 1px solid rgba(148, 163, 184, 0.15);
  padding: 1.25rem;
  overflow: auto;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.detail-drawer.open .detail-drawer-panel {
  transform: translateX(0);
}

.detail-drawer h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: #e2e8f0;
}

.detail-drawer .close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.stop-sequence {
  list-style: none;
  padding: 0;
  margin: 0;
}

.stop-sequence li {
  display: flex;
  gap: 0.65rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  font-size: 0.82rem;
}

.stop-sequence .seq {
  color: #64748b;
  min-width: 1.5rem;
}

.sev-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.sev-filter button {
  font-size: 0.78rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}

.sev-filter button.active {
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(124, 58, 237, 0.15);
  color: #e9d5ff;
}

.matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.matrix th,
.matrix td {
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.matrix th {
  color: #a1a1aa;
  font-weight: 500;
}

.ok {
  color: #86efac;
}

.flow-rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  padding: 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(10, 11, 13, 0.5);
}

.flow-step {
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: transparent;
  color: #94a3b8;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.flow-step.active {
  background: rgba(124, 58, 237, 0.25);
  border-color: rgba(168, 85, 247, 0.45);
  color: #e9d5ff;
}

.flow-step:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.flow-arrow {
  color: #334155;
  font-size: 0.9rem;
  user-select: none;
}

.panel-lead,
.overview-lead {
  color: #94a3b8;
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.overview-lead {
  font-size: 1.05rem;
  color: #e2e8f0;
  font-weight: 500;
}

.flow-panel.hidden {
  display: none;
}

.session-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 17, 22, 0.65);
  font-size: 0.9rem;
}

.session-bar-main {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.session-bar-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.finding-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.finding-list li {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.finding-tag {
  display: inline-block;
  min-width: 4.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #c4b5fd;
}

.btn-ghost {
  background: transparent;
  border: none;
  color: #64748b;
  padding: 0.35rem 0.5rem;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  text-align: center;
}

.btn-ghost:hover {
  color: #94a3b8;
}

.export-layout {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .export-layout {
    grid-template-columns: 1fr 280px;
    align-items: start;
  }
}

.preset-grid {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.preset-card {
  display: block;
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(10, 11, 13, 0.4);
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.preset-card strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: #e2e8f0;
}

.preset-card .muted {
  font-size: 0.78rem;
  line-height: 1.4;
}

.preset-card.active {
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(124, 58, 237, 0.12);
}

.include-fieldset {
  margin-top: 1rem;
  padding: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  border-style: dashed;
}

.include-fieldset legend {
  font-size: 0.82rem;
  color: #94a3b8;
  padding: 0 0.35rem;
}

.include-check {
  display: block;
  font-size: 0.82rem;
  color: #cbd5e1;
  margin: 0.35rem 0;
  cursor: help;
}

.include-check input {
  width: auto;
  margin-right: 0.35rem;
}

.export-aside h3 {
  color: #e2e8f0;
}

.file-input-offscreen {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.na {
  color: #71717a;
}
