/* ============================================ */
/* Transport Platform – Base styles             */
/* Dark-theme base (overridden by ec-theme.css) */
/* ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Manrope:wght@400;600;700;800&display=swap');

/* ─── CSS Variables ─── */
:root {
  --bg-1: #0d1117;
  --bg-2: #161b22;
  --ink: #e6edf3;
  --muted: #8b949e;
  --surface: #1c2128;
  --stroke: #30363d;
  --accent: #6366f1;
  --green: #22c55e;
  --red: #ef4444;
  --yellow: #eab308;
  --blue: #0ea5e9;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ─── Reset & Base ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  padding: 0;
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  background: var(--bg-1);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: 'Archivo Black', 'Manrope', sans-serif; }
p { margin: 0 0 8px; }
ul, ol { padding-left: 20px; margin: 0 0 8px; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; }

/* ─── Background glow (dark mode) ─── */
.background-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(99,102,241,0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* ─── Breadcrumb ─── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--ink); }
.sep { color: var(--stroke); margin: 0 2px; }

/* ─── Shell ─── */
.shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}
.shell--wide {
  max-width: 1120px;
}

/* ─── Hero ─── */
.hero {
  margin-bottom: 28px;
}

/* ─── Eyebrow ─── */
.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── Subtitle ─── */
.subtitle {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 720px;
}
.hint {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  margin: 20px 0 0;
}

/* ─── Card Grid ─── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

/* ─── Role Card ─── */
.role-card {
  background: var(--surface);
  border: 1.5px solid var(--stroke);
  border-radius: 16px;
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  display: block;
}
.role-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  border-color: var(--accent);
  text-decoration: none;
}
.role-card h2 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 12px 0 6px;
}
.role-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* ─── Chip ─── */
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

/* ─── GC Section ─── */
.gc-section {
  background: var(--surface);
  border: 1.5px solid var(--stroke);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
}
.gc-section > h2 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}
.gc-section > h2::after,
.gc-section > .ai-section-header::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .25s ease;
  flex-shrink: 0;
  margin-left: auto;
  margin-top: -2px;
}
.gc-section.collapsed > h2::after,
.gc-section.collapsed > .ai-section-header::after {
  transform: rotate(-45deg);
}
.gc-section-body {
  overflow: hidden;
  transition: max-height .35s ease, opacity .25s ease;
  opacity: 1;
}
.gc-section.collapsed .gc-section-body {
  max-height: 0 !important;
  opacity: 0;
  pointer-events: none;
}

/* ─── Data Table ─── */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.data-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 2px solid var(--stroke);
  white-space: nowrap;
}
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--stroke);
  vertical-align: top;
}
.data-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.04);
}

/* ─── Stat Card ─── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1.5px solid var(--stroke);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
}
.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
}
.stat-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

/* ─── ETA Badge ─── */
.eta-badge { display: inline-block; padding: 3px 10px; border-radius: 8px; font-size: 0.78rem; font-weight: 700; }
.eta-badge--ok { background: rgba(34,197,94,0.15); color: #22c55e; }
.eta-badge--delay { background: rgba(234,179,8,0.15); color: #eab308; }
.eta-badge--critical { background: rgba(239,68,68,0.15); color: #ef4444; }

/* ─── Search Modal ─── */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
  backdrop-filter: blur(4px);
}
.search-overlay.hidden { display: none; }
.search-box {
  background: #fff;
  border-radius: 16px;
  width: 520px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  overflow: hidden;
}
.search-input-wrap {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  gap: 10px;
  border-bottom: 1px solid #e2e4ea;
}
.search-input-wrap svg { color: #94a3b8; flex-shrink: 0; }
.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: inherit;
  color: #1f272c;
  background: transparent;
}
.search-input::placeholder { color: #94a3b8; }
.search-results {
  max-height: 340px;
  overflow-y: auto;
  padding: 8px;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  color: #1f272c;
  transition: background 0.12s;
}
.search-result-item:hover,
.search-result-item.active {
  background: #f0f1f4;
}
.search-result-icon { font-size: 1.1rem; }
.search-result-title { font-weight: 700; font-size: 0.9rem; }
.search-result-desc { font-size: 0.78rem; color: #94a3b8; }
.search-footer {
  padding: 10px 20px;
  border-top: 1px solid #e2e4ea;
  font-size: 0.75rem;
  color: #94a3b8;
  display: flex;
  gap: 12px;
}
.search-footer kbd {
  background: #f0f1f4;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.72rem;
}

/* ─── Animations ─── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero { animation: fadeIn 0.5s ease-out; }
