/* ==========================================================================
   SIX.VI — SIX / OPS demo interface
   Light mode. Bone, white, ink. Signal used only for live operational state.
   ========================================================================== */

:root {
  --sb-w:    236px;
  --top-h:   56px;
  --intel-w: 330px;

  /* light surfaces */
  --page:    #F3F2ED;
  --panel:   #FFFFFF;
  --panel-2: #FAF9F5;
  --field:   #F7F6F2;
  --fg:      #0A0A0A;
  --faint:   rgba(10, 10, 10, 0.44);
  --line:    rgba(10, 10, 10, 0.10);
  --line-2:  rgba(10, 10, 10, 0.22);
  --hover:   rgba(10, 10, 10, 0.035);

  /* brand tokens retuned for a light background */
  --titanium:   #666661;   /* muted text, readable on white */
  --signal:     #4D6A00;   /* signal as text or stroke */
  --sig-fill:   #D8FF63;   /* signal as a filled surface */
  --sig-strong: #8DB600;   /* signal as a small graphic mark */
  --sig-tint:   rgba(216, 255, 99, 0.30);
  --alert:      #C8321F;
  --alert-dot:  #E5483A;
}

body.demo {
  background: var(--page);
  color: var(--fg);
  overflow: hidden;
  font-size: 15px;
}

.app {
  display: grid;
  grid-template-columns: var(--sb-w) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
}

/* ------------------------------------------------------------ sidebar --- */

.sb {
  border-right: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sb__brand {
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--line);
}
.sb__mark { display: none; }
.sb__product {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--titanium);
  margin-top: 12px;
}

.sb__nav {
  padding: 12px 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.sb__group {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--faint);
  padding: 18px 20px 8px;
}
.navitem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  color: rgba(10, 10, 10, 0.64);
  background: none;
  border: 0;
  border-left: 2px solid transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.navitem:hover { color: var(--fg); background: var(--hover); }
.navitem.is-active {
  color: var(--fg);
  border-left-color: var(--signal);
  background: var(--sig-tint);
}
.navitem svg { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.2; }
.navitem__badge {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--signal);
}

.sb__foot {
  border-top: 1px solid var(--line);
  padding: 14px 20px;
  display: grid;
  gap: 8px;
}
.sb__foot a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--faint);
}
.sb__foot a:hover { color: var(--fg); }

/* --------------------------------------------------------------- main --- */

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

.top {
  height: var(--top-h);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  background: var(--panel);
  flex: none;
}
.top__client {
  font-family: var(--font-mono);
  font-size: 0.91rem;
  letter-spacing: 0.05em;
}
.top__loc {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--titanium);
}
.top__sep { width: 1px; height: 22px; background: var(--line); }
.top__clock {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  letter-spacing: 0.02em;
  margin-left: auto;
}

.search {
  position: relative;
  width: 232px;
}
.search input {
  width: 100%;
  background: var(--field);
  border: 1px solid var(--line);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  padding: 9px 12px 9px 30px;
  outline: none;
}
.search input:focus { border-color: var(--line-2); }
.search input::placeholder { color: var(--faint); }
.search svg {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%);
  width: 13px; height: 13px;
  stroke: var(--titanium); fill: none; stroke-width: 1.3;
}

.tbtn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 9px 12px;
  border: 1px solid var(--line-2);
  background: none;
  color: var(--fg);
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
}
.tbtn:hover { background: var(--hover); border-color: var(--signal); }
.tbtn--sig { border-color: var(--sig-fill); background: var(--sig-fill); color: var(--fg); }
.tbtn--sig:hover { background: var(--sig-fill); border-color: var(--sig-strong); filter: brightness(0.97); }

/* --------------------------------------------------------------- body --- */

.body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--intel-w);
  flex: 1;
  min-height: 0;
}
.body.is-collapsed { grid-template-columns: minmax(0, 1fr) 0; }

.view {
  overflow-y: auto;
  min-height: 0;
  padding: 22px;
  scrollbar-width: thin;
}
.view::-webkit-scrollbar { width: 8px; height: 8px; }
.view::-webkit-scrollbar-thumb { background: rgba(10, 10, 10, 0.16); }

.vhead {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.vhead h1 {
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
}
.vhead p {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--titanium);
  margin: 0;
}
.vhead .spacer { margin-left: auto; }

/* --------------------------------------------------------- primitives --- */

.card {
  border: 1px solid var(--line);
  background: var(--panel);
}
.card__head {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--titanium);
}
.card__head .spacer { margin-left: auto; }
.card__body { padding: 16px; }

.grid { display: grid; gap: 16px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid--ops { grid-template-columns: minmax(0, 1fr) 300px; }

.kpi {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 16px 18px;
}
.kpi__n {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.02em;
}
.kpi__l {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  letter-spacing: 0.05em;
  color: var(--titanium);
  margin-top: 11px;
}
.kpi__d {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  letter-spacing: 0.03em;
  color: var(--faint);
  margin-top: 6px;
}
.kpi--sig .kpi__n { color: var(--signal); }

/* status dots and pills */
.st {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.st::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--titanium);
  flex: none;
}
.st--live::before, .st--active::before { background: var(--sig-strong); }
.st--live { color: var(--signal); }
.st--staged::before { background: transparent; border: 1px solid var(--signal); }
.st--complete::before { background: rgba(10, 10, 10, 0.55); }
.st--attention::before { background: var(--alert-dot); }
.st--attention { color: var(--alert); }

.blink { animation: blink 2.6s ease-in-out infinite; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--faint);
  text-align: left;
  font-weight: 400;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
}
.tbl td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 1.01rem;
  vertical-align: middle;
}
.tbl tbody tr { cursor: pointer; transition: background 0.18s var(--ease); }
.tbl tbody tr:hover { background: var(--hover); }
.tbl tbody tr.is-sel { background: var(--sig-tint); }
.tbl .m { font-family: var(--font-mono); letter-spacing: 0.01em; }
.tbl .tail { font-family: var(--font-mono); font-size: 0.88rem; letter-spacing: 0.01em; }
.tbl .sub { font-family: var(--font-mono); font-size: 0.73rem; letter-spacing: 0.04em; color: var(--titanium); margin-top: 4px; }
.tbl .vip { color: var(--signal); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; }

/* filter chips */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chipbtn {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  letter-spacing: 0.04em;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: none;
  color: var(--titanium);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.chipbtn:hover { color: var(--fg); border-color: var(--line-2); }
.chipbtn.is-on { color: var(--fg); background: var(--sig-fill); border-color: var(--sig-strong); }

/* progress bars */
.bar {
  height: 3px;
  background: rgba(10, 10, 10, 0.08);
  position: relative;
  overflow: hidden;
}
.bar > i {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--titanium);
  width: 0;
  transition: width 0.8s var(--ease);
}
.bar--sig > i { background: var(--sig-strong); }

.readyrow {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 40px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
}
.readyrow span:first-child {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--titanium);
}
.readyrow span:last-child {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-align: right;
}

/* form controls */
.sel, .inp {
  background: var(--field);
  border: 1px solid var(--line);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.81rem;
  letter-spacing: 0.03em;
  padding: 8px 10px;
  outline: none;
  cursor: pointer;
  max-width: 100%;
}
.sel:focus, .inp:focus { border-color: var(--signal); }

.actbtn {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  letter-spacing: 0.04em;
  padding: 8px 11px;
  border: 1px solid var(--line-2);
  background: none;
  color: var(--fg);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.actbtn:hover { border-color: var(--signal); color: var(--signal); }
.actbtn--sig { background: var(--sig-fill); border-color: var(--sig-strong); color: var(--fg); }
.actbtn--sig:hover { color: var(--fg); border-color: var(--sig-strong); filter: brightness(0.97); }
.actbtn[disabled] { opacity: 0.35; cursor: default; }
.actbtn[disabled]:hover { border-color: var(--line-2); color: var(--fg); }

/* ------------------------------------------------------ ops timeline --- */

.timeline {
  position: relative;
  padding: 26px 34px 98px;
  overflow-x: auto;
}
.timeline__axis {
  position: relative;
  height: 1px;
  background: var(--line);
  min-width: 640px;
}
.timeline__tick {
  position: absolute;
  top: -22px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--faint);
}
.timeline__tick::after {
  content: '';
  position: absolute;
  left: 50%; top: 20px;
  width: 1px; height: 6px;
  background: var(--line);
}
.timeline__mv {
  position: absolute;
  top: 10px;
  transform: translateX(-50%);
  text-align: center;
  cursor: pointer;
}
.timeline__mv i {
  display: block;
  width: 9px; height: 9px;
  border: 1px solid var(--titanium);
  border-radius: 50%;
  margin: 0 auto 7px;
  background: var(--panel);
}
.timeline__mv.is-arr i { border-color: var(--sig-strong); background: var(--sig-strong); }
.timeline__mv b {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--titanium);
}
.timeline__mv:hover b { color: var(--fg); }
.timeline__now {
  position: absolute;
  top: -14px; bottom: -46px;
  width: 1px;
  background: var(--sig-strong);
  opacity: 0.8;
}

/* ---------------------------------------------------------- ramp map --- */

.rampmap {
  position: relative;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 50% 0%, #FFFFFF 0%, #EEEDE7 70%);
  aspect-ratio: 16 / 9;
  min-height: 380px;
  overflow: hidden;
}
.rampmap__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(10,10,10,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10,10,10,0.05) 1px, transparent 1px);
  background-size: 6.25% 12.5%;
}
.rampmap__sweep {
  position: absolute;
  left: 50%; top: 50%;
  width: 150%; height: 150%;
  transform-origin: 0 0;
  background: conic-gradient(from 0deg, rgba(141,182,0,0.14), rgba(141,182,0,0) 22%);
  animation: sweep 9s linear infinite;
  pointer-events: none;
}
@keyframes sweep { to { transform: rotate(360deg); } }

.rampmap__label {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--faint);
}
.rampmap__zone {
  position: absolute;
  border: 1px dashed rgba(10, 10, 10, 0.18);
}

.spot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 86px;
  text-align: center;
  cursor: default;
}
.spot__box {
  height: 46px;
  border: 1px solid rgba(10, 10, 10, 0.16);
  background: var(--panel);
  display: grid;
  place-items: center;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.spot__id {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--faint);
  margin-top: 6px;
}
.spot__tail {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  letter-spacing: 0.03em;
  color: var(--fg);
  margin-top: 4px;
}
.spot.is-occupied { cursor: pointer; }
.spot.is-occupied .spot__box { border-color: var(--sig-strong); background: var(--sig-tint); }
.spot.is-occupied:hover .spot__box { background: rgba(216, 255, 99, 0.6); }
.spot svg { width: 30px; height: 30px; stroke: var(--titanium); fill: none; stroke-width: 1.1; }
.spot.is-occupied svg { stroke: var(--signal); }

.rampveh {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--titanium);
  transition: left 3s linear, top 3s linear;
}
.rampveh i {
  width: 8px; height: 8px;
  background: var(--titanium);
  display: block;
  flex: none;
}
.rampveh--fuel i { background: var(--sig-strong); }

/* ------------------------------------------------------- intel panel --- */

.intel-panel {
  border-left: 1px solid var(--line);
  background: var(--panel-2);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.intel-panel__head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.81rem;
  letter-spacing: 0.06em;
}
.intel-panel__list { overflow-y: auto; min-height: 0; flex: 1; }
.intel-item {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}
.intel-item__k {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--signal);
  display: flex;
  gap: 8px;
  align-items: center;
}
.intel-item__k span { margin-left: auto; color: var(--faint); }
.intel-item__t { font-size: 0.82rem; line-height: 1.35; margin-top: 9px; }
.intel-item__b { font-size: 0.94rem; line-height: 1.45; color: var(--titanium); margin-top: 7px; }
.intel-item__v {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  margin-top: 10px;
  color: var(--signal);
}
.intel-item__act { margin-top: 11px; display: flex; gap: 8px; }

/* ------------------------------------------------------ detail panel --- */

.detail {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(520px, 100%);
  background: var(--panel);
  border-left: 1px solid var(--line-2);
  z-index: 300;
  transform: translateX(100%);
  transition: transform 0.42s var(--ease);
  display: flex;
  flex-direction: column;
  box-shadow: -24px 0 48px rgba(10, 10, 10, 0.12);
}
.detail.is-open { transform: none; }

.detail__head {
  padding: 20px;
  border-bottom: 1px solid var(--line);
  flex: none;
}
.detail__close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: 1px solid var(--line);
  color: var(--fg);
  width: 30px; height: 30px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.91rem;
  line-height: 1;
}
.detail__close:hover { border-color: var(--signal); color: var(--signal); }
.detail__tail {
  font-family: var(--font-mono);
  font-size: 1.9rem;
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1;
}
.detail__type {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--titanium);
  margin-top: 10px;
}
.detail__timer {
  margin-top: 18px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.detail__timer b {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 1.7rem;
  letter-spacing: 0.01em;
  color: var(--signal);
}
.detail__timer span {
  font-family: var(--font-mono);
  font-size: 0.73rem;
  letter-spacing: 0.05em;
  color: var(--titanium);
}
.detail__body { overflow-y: auto; min-height: 0; flex: 1; }

.dsec { border-bottom: 1px solid var(--line); padding: 18px 20px; }
.dsec__k {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--faint);
  margin-bottom: 14px;
}
.dgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}
.dfield__k {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--titanium);
}
.dfield__v {
  font-family: var(--font-mono);
  font-size: 1.01rem;
  letter-spacing: 0.01em;
  margin-top: 6px;
}
.dactions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.tl { display: grid; gap: 0; }
.tl__i {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.99rem;
}
.tl__i:last-child { border-bottom: 0; }
.tl__t {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--titanium);
}
.tl__i--new .tl__t { color: var(--signal); }

/* ------------------------------------------------------------- toast --- */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 400;
  display: grid;
  gap: 8px;
  justify-items: center;
  pointer-events: none;
}
.toast {
  background: var(--fg);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.3s var(--ease);
}
.toast--sig { background: var(--sig-fill); color: var(--fg); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* ----------------------------------------------------------- gauges --- */

.gauge { display: grid; gap: 10px; }
.gauge__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--titanium);
}
.gauge__n {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.baycell {
  border: 1px solid var(--line);
  padding: 16px;
  display: grid;
  gap: 10px;
  min-height: 118px;
  background: var(--panel);
}
.baycell__id { font-family: var(--font-mono); font-size: 0.94rem; letter-spacing: 0.04em; }
.baycell__ac { font-family: var(--font-mono); font-size: 0.9rem; letter-spacing: 0.01em; color: var(--signal); }
.baycell--conflict { border-color: rgba(200, 50, 31, 0.5); }
.baycell--available { opacity: 0.55; }

/* bar chart */
.chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 190px;
  padding-top: 10px;
}
.chart__col { flex: 1; display: grid; gap: 8px; align-content: end; }
.chart__bar {
  background: rgba(10, 10, 10, 0.14);
  transition: height 0.7s var(--ease), background 0.3s var(--ease);
}
.chart__col:hover .chart__bar { background: var(--sig-strong); }
.chart__col--peak .chart__bar { background: var(--sig-fill); box-shadow: inset 0 0 0 1px var(--sig-strong); }
.chart__h {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--faint);
  text-align: center;
}

/* empty state */
.empty {
  padding: 48px 20px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.81rem;
  letter-spacing: 0.04em;
  color: var(--titanium);
}

/* --------------------------------------------------------- mobile nav --- */

.mobbar { display: none; }

/* ------------------------------------------------------- responsive --- */

@media (max-width: 1280px) {
  :root { --intel-w: 300px; }
  .grid--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--ops { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1080px) {
  /* Tablet: an FBO employee on an iPad. Sidebar collapses to icons,
     intelligence moves under the working view. */
  :root { --sb-w: 62px; }
  /* Collapse the wordmark to the X monogram so it fits the icon rail. */
  .sb__brand { padding: 14px 0; text-align: center; }
  .sb__brand .wordmark { display: block; }
  .sb__full { display: none; }
  .sb__mark { display: inline-block; }
  .sb__brand .sb__product, .sb__group, .navitem span, .sb__foot { display: none; }
  .navitem { justify-content: center; padding: 14px 0; }
  .top__client { white-space: nowrap; }
  .top__loc, .top__sep { display: none; }
  .body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .intel-panel { border-left: 0; border-top: 1px solid var(--line); max-height: 32vh; }
  .grid--4, .grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--2 { grid-template-columns: minmax(0, 1fr); }
  .search { width: 170px; }
}

@media (max-width: 760px) {
  /* Mobile: a purpose-built operations view, not a shrunken dashboard. */
  body.demo { font-size: 14px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .sb { display: none; }
  .top { padding: 0 12px; gap: 8px; overflow-x: auto; }
  .top__loc, .top__sep, .search { display: none; }
  .top__client { font-size: 0.73rem; white-space: nowrap; }
  .top__clock { font-size: 0.81rem; }
  .tbtn { font-size: 0.72rem; padding: 8px 9px; }
  .view { padding: 14px 14px 78px; }
  .body { grid-template-rows: minmax(0, 1fr); }
  .intel-panel { display: none; }
  .body.show-intel .intel-panel { display: flex; max-height: none; }
  .grid--3, .grid--4, .grid--5, .grid--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi__n { font-size: 1.6rem; }
  .detail { width: 100%; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr {
    border: 1px solid var(--line);
    margin-bottom: 10px;
    padding: 12px 14px;
    background: var(--panel);
  }
  .tbl td { border: 0; padding: 5px 0; }
  .tbl td[data-k]::before {
    content: attr(data-k);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    color: var(--faint);
    display: block;
    margin-bottom: 4px;
  }
  .rampmap { min-height: 300px; aspect-ratio: 3 / 4; }
  .spot { width: 62px; }
  .spot__box { height: 36px; }

  .mobbar {
    display: grid;
    grid-auto-flow: column;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 250;
    background: var(--panel);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobbar button {
    background: none;
    border: 0;
    color: rgba(10, 10, 10, 0.55);
    padding: 11px 4px 13px;
    display: grid;
    justify-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    cursor: pointer;
  }
  .mobbar button svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.2; }
  .mobbar button.is-active { color: var(--signal); }
}

/* ---------------------------------------------------- light extras --- */

body.demo ::selection { background: var(--sig-fill); color: var(--fg); }
body.demo :focus-visible { outline-color: var(--sig-strong); }
.card, .kpi, .baycell { box-shadow: 0 1px 2px rgba(10, 10, 10, 0.04); }

/* ------------------------------------------------ rounded, organized --- */

body.demo {
  --r-lg: 14px;
  --r-md: 10px;
  --r-sm: 8px;
  --r-pill: 999px;
  --shadow: 0 1px 2px rgba(10, 10, 10, 0.04), 0 4px 14px rgba(10, 10, 10, 0.04);
}

/* layout breathing room */
.view { padding: 28px 30px; }
.vhead { margin-bottom: 22px; }
.grid { gap: 18px; }

/* sidebar: inset rounded nav items instead of edge bars */
.sb__nav { padding: 10px 12px; }
.sb__group { padding: 18px 10px 8px; }
.navitem {
  border-left: 0;
  border-radius: var(--r-sm);
  padding: 10px 12px;
  margin: 2px 0;
}
.navitem.is-active {
  background: var(--sig-tint);
  box-shadow: inset 0 0 0 1px rgba(141, 182, 0, 0.35);
}
.navitem__badge {
  font-style: normal;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: var(--r-pill);
  background: var(--sig-fill);
  color: var(--fg);
  text-align: center;
}
.navitem__badge:empty { display: none; }

/* top bar controls */
.search input { border-radius: var(--r-pill); padding-left: 32px; }
.search svg { left: 12px; }
.tbtn { border-radius: var(--r-pill); padding: 9px 16px; }

/* cards, KPIs, bay cells */
.card, .kpi, .baycell {
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: clip;
}
.card__head { padding: 15px 18px; }
.card__body { padding: 18px; }
.kpi { padding: 20px 22px; }

/* tables sit cleanly inside rounded cards */
.tbl th:first-child, .tbl td:first-child { padding-left: 18px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 18px; }
.tbl tbody tr:last-child td { border-bottom: 0; }

/* chips, buttons, form controls */
.chipbtn { border-radius: var(--r-pill); padding: 8px 14px; background: var(--panel); }
.actbtn { border-radius: var(--r-pill); padding: 8px 14px; }
.sel, .inp { border-radius: var(--r-sm); }

/* status pills */
.st--live, .st--attention {
  padding: 4px 10px 4px 8px;
  border-radius: var(--r-pill);
}
.st--live { background: var(--sig-tint); }
.st--attention { background: rgba(229, 72, 58, 0.10); }
.st--live:empty { padding: 0; background: none; }

/* progress bars */
.bar { height: 5px; border-radius: var(--r-pill); }
.bar > i { border-radius: var(--r-pill); }

/* ramp map */
.rampmap { border-radius: var(--r-lg); box-shadow: var(--shadow); }
.rampmap__zone { border-radius: var(--r-md); }
.spot__box { border-radius: var(--r-md); }
.rampveh i { border-radius: 50%; }

/* bar chart */
.chart__bar { border-radius: 6px 6px 2px 2px; }

/* intelligence panel: items become stacked cards */
.intel-panel__list { padding: 12px; display: grid; gap: 10px; align-content: start; }
.intel-item {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(10, 10, 10, 0.03);
}

/* detail drawer */
.detail {
  border-radius: var(--r-lg) 0 0 var(--r-lg);
  border-left: 1px solid var(--line);
  box-shadow: none;
  overflow: clip;
  visibility: hidden;
  transition: transform 0.42s var(--ease), visibility 0s linear 0.42s, box-shadow 0.42s var(--ease);
}
.detail.is-open {
  box-shadow: -24px 0 60px rgba(10, 10, 10, 0.14);
  visibility: visible;
  transition: transform 0.42s var(--ease), visibility 0s, box-shadow 0.42s var(--ease);
}
.detail__close { border-radius: 50%; width: 32px; height: 32px; }
.dsec { padding: 20px 22px; }

/* toasts */
.toast { border-radius: var(--r-pill); padding: 11px 18px; box-shadow: 0 8px 24px rgba(10, 10, 10, 0.18); }

/* scrollbar */
.view::-webkit-scrollbar-thumb { border-radius: var(--r-pill); }

@media (max-width: 1080px) {
  .sb__nav { padding: 10px 8px; }
  .navitem { justify-content: center; padding: 12px 0; }
}

@media (max-width: 760px) {
  .view { padding: 16px 14px 84px; }
  .top__clock { white-space: nowrap; }
  .tbtn { padding: 8px 12px; }
  .tbl tr { border-radius: var(--r-md); box-shadow: 0 1px 2px rgba(10, 10, 10, 0.04); }
  .detail { border-radius: 0; }
  .tbl td:first-child, .tbl td:last-child { padding-left: 0; padding-right: 0; }
}

/* ------------------------------------------------------ typography --- */
/* Friendly, highly legible sans in the spirit of Airbnb Cereal. The old mono
   token now points to the sans too, so every label and value switches over,
   including inline styles written by demo.js. Numbers stay aligned with
   tabular figures. */

body.demo {
  --font-sans: 'Plus Jakarta Sans', 'Figtree', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: var(--font-sans);
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

/* headings */
.vhead h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.vhead p { font-weight: 500; }

/* small labels: semibold and muted instead of wide-tracked */
.sb__group, .card__head, .kpi__l, .tbl th, .dsec__k, .dfield__k,
.gauge__top, .readyrow span:first-child, .intel-item__k, .detail__type,
.detail__timer span, .spot__id, .timeline__tick, .chart__h, .rampmap__label,
.sb__product, .top__loc, .tbl .sub, .kpi__d {
  font-weight: 600;
  letter-spacing: 0.04em;
}
.card__head { font-size: 0.78rem; color: var(--fg); }
.kpi__d, .tbl .sub { font-weight: 500; letter-spacing: 0.02em; }

/* menu and buttons */
.navitem { font-size: 0.86rem; font-weight: 500; letter-spacing: 0.01em; }
.navitem.is-active { font-weight: 700; }
.tbtn, .chipbtn, .actbtn { font-weight: 600; letter-spacing: 0.03em; }
.tbtn { font-size: 0.74rem; }
.chipbtn, .actbtn { font-size: 0.72rem; }
.st { font-weight: 600; letter-spacing: 0.03em; font-size: 0.72rem; }

/* values */
.top__client { font-size: 0.86rem; font-weight: 700; letter-spacing: 0.02em; }
.top__clock { font-size: 0.9rem; font-weight: 600; }
.kpi__n { font-weight: 700; font-size: 2.2rem; letter-spacing: -0.03em; }
.gauge__n { font-weight: 700; }
.tbl td { font-size: 0.86rem; font-weight: 500; }
.tbl .tail { font-size: 0.95rem; font-weight: 700; letter-spacing: 0.01em; }
.tbl .m { letter-spacing: 0; }
.dfield__v { font-size: 0.92rem; font-weight: 600; letter-spacing: 0; }
.detail__tail { font-weight: 800; font-size: 2rem; letter-spacing: -0.01em; }
.detail__timer b { font-weight: 700; }
.baycell__id { font-weight: 700; }
.baycell__ac { font-weight: 700; }
.intel-item__t { font-size: 0.92rem; font-weight: 600; line-height: 1.4; }
.intel-item__b { font-size: 0.82rem; line-height: 1.5; }
.intel-item__v { font-size: 0.78rem; font-weight: 700; }
.toast { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; }
.search input { font-size: 0.8rem; letter-spacing: 0.01em; }
.mobbar button { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.02em; }

/* ------------------------------------------------- timeline planes --- */

.timeline { padding-bottom: 136px; }
.timeline__mv i { display: none; }
.timeline__plane {
  display: block;
  width: 20px; height: 20px;
  margin: 0 auto 6px;
  stroke-width: 1;
  stroke-linejoin: round;
  transition: transform 0.2s var(--ease);
}
.timeline__mv.is-arr .timeline__plane {
  fill: var(--sig-strong);
  stroke: var(--signal);
  transform: rotate(135deg);
}
.timeline__mv.is-dep .timeline__plane {
  fill: var(--panel);
  stroke: var(--titanium);
  transform: rotate(45deg);
}
.timeline__mv:hover .timeline__plane { transform: rotate(135deg) scale(1.2); }
.timeline__mv.is-dep:hover .timeline__plane { transform: rotate(45deg) scale(1.2); }
.timeline__mv b { font-size: 0.74rem; font-weight: 600; color: var(--fg); }
.timeline__now { bottom: -104px; }

@media (prefers-reduced-motion: reduce) {
  .rampmap__sweep { animation: none; }
  .detail { transition: none; }
}
