/* =====================================================================
   Solta Device Portal — App-specific styles
   Layered on top of VideoART tokens.
   ===================================================================== */

* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body { margin: 0; background: var(--bg-1); color: var(--fg-1); overflow: hidden; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Layout shell ---------- */
.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 56px 1fr;
  height: 100vh;
  width: 100vw;
}
.app[data-mode="customer"] {
  grid-template-columns: 1fr;
  grid-template-rows: 56px 1fr;
}

/* Top bar */
.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-1);
  background: var(--bg-1);
  position: relative;
  z-index: 10;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: flex; align-items: center; gap: 10px;
}
.brand-mark svg { display: block; height: 22px; width: auto; }
.brand-divider {
  width: 1px; height: 20px; background: var(--border-1);
}
.brand-context {
  display: flex; flex-direction: column; line-height: 1.1;
}
.brand-context .eyebrow {
  font-size: 10px; letter-spacing: 0.14em; color: var(--fg-mute);
}
.brand-context .name {
  font-family: var(--font-text);
  font-size: 13px; font-weight: 600; color: var(--fg-1);
}
.mode-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--border-1);
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: 500;
  background: var(--bg-1);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-standard);
}
.mode-pill:hover { border-color: var(--fg-1); }
.mode-pill .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--va-red);
}
.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--border-1);
  border-radius: var(--r-pill);
  font-size: 13px;
}
.user-chip .avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--va-ink); color: var(--va-white);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
  font-family: var(--font-text);
}

/* ---------- Sidebar ---------- */
.sidebar {
  border-right: 1px solid var(--border-1);
  background: var(--bg-1);
  padding: 16px 12px;
  display: flex; flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.sidebar-section {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
  padding: 12px 12px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-radius: var(--r-2);
  font-size: 14px;
  color: var(--fg-2);
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.nav-item:hover { background: var(--bg-3); color: var(--fg-1); }
.nav-item[aria-current="page"] { background: var(--va-ink); color: var(--va-white); }
.nav-item[aria-current="page"]:hover { background: var(--va-ink); }
.nav-item .badge {
  margin-left: auto;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: var(--bg-3);
  color: var(--fg-2);
}
.nav-item[aria-current="page"] .badge { background: rgba(255,255,255,0.15); color: var(--va-white); }
.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border-1);
  font-size: 12px;
  color: var(--fg-mute);
  line-height: 1.45;
}

/* ---------- Main pane ---------- */
.main {
  overflow: auto;
  background: var(--bg-1);
}
.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 40px 64px;
}
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.page-head .eyebrow {
  display: block;
  font-size: 11px;
  margin-bottom: 6px;
  color: var(--va-red);
}
.page-head .sub {
  color: var(--fg-3);
  font-size: 14px;
  margin-top: 6px;
}
.page-actions { display: flex; gap: 8px; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-text);
  border-radius: var(--r-2);
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg-1);
  transition: all var(--dur-fast) var(--ease-standard);
  white-space: nowrap;
}
.btn:hover { background: var(--bg-3); }
.btn-primary {
  background: var(--va-red);
  color: var(--va-white);
  border-color: var(--va-red);
}
.btn-primary:hover { background: var(--va-red-600); border-color: var(--va-red-600); }
.btn-primary:active { background: var(--va-red-700); transform: scale(0.98); }
.btn-secondary {
  border-color: var(--border-1);
  background: var(--bg-1);
}
.btn-secondary:hover { background: var(--va-ink); color: var(--va-white); border-color: var(--va-ink); }
.btn-ghost { color: var(--fg-2); }
.btn-ghost:hover { color: var(--fg-1); background: var(--bg-3); }
.btn-icon {
  width: 32px; height: 32px; padding: 0;
  display: grid; place-items: center;
  border-radius: var(--r-2);
}
.btn-icon:hover { background: var(--bg-3); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--border-1);
  border-radius: var(--r-3);
  background: var(--bg-1);
  transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard);
}
.card-hoverable:hover {
  border-color: var(--fg-1);
  box-shadow: var(--shadow-2);
}
.card-pad { padding: 20px; }
.card-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-1);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-head h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}
.card-body { padding: 20px; }

/* ---------- Status / traffic light ---------- */
.status-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-1);
  box-shadow: 0 0 0 1px var(--border-1);
  flex-shrink: 0;
}
.status-dot.green { background: #1F8A5B; box-shadow: 0 0 0 1px #1F8A5B; }
.status-dot.yellow { background: #E6A100; box-shadow: 0 0 0 1px #E6A100; }
.status-dot.red { background: var(--va-red); box-shadow: 0 0 0 1px var(--va-red); }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border-1);
  background: var(--bg-1);
  white-space: nowrap;
}
.status-pill .status-dot {
  width: 8px; height: 8px; border-width: 0;
  box-shadow: none;
}

/* ---------- Tables ---------- */
.table-wrap {
  border: 1px solid var(--border-1);
  border-radius: var(--r-3);
  overflow: hidden;
  background: var(--bg-1);
}
table.va-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.va-table thead th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  background: var(--bg-3);
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-1);
  white-space: nowrap;
}
.va-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-2);
  vertical-align: middle;
}
.va-table tbody tr:last-child td { border-bottom: none; }
.va-table tbody tr {
  transition: background var(--dur-fast) var(--ease-standard);
  cursor: pointer;
}
.va-table tbody tr:hover { background: var(--bg-3); }
.va-table tbody tr[data-selected="true"] { background: var(--va-red-050); }

/* density */
.va-table[data-density="compact"] tbody td { padding: 8px 16px; }
.va-table[data-density="compact"] thead th { padding: 8px 16px; }
.va-table[data-density="comfortable"] tbody td { padding: 18px 16px; }

.cell-strong { font-weight: 600; color: var(--fg-1); }
.cell-mute { color: var(--fg-3); font-size: 12px; }
.cell-mono { font-family: var(--font-mono); font-size: 12px; color: var(--fg-2); }

/* ---------- Search / inputs ---------- */
.input {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-1);
  border-radius: var(--r-2);
  font-family: var(--font-text);
  font-size: 13px;
  background: var(--bg-1);
  color: var(--fg-1);
  transition: border-color var(--dur-fast) var(--ease-standard);
}
.input:hover { border-color: var(--fg-3); }
.input:focus { outline: none; border-color: var(--va-ink); box-shadow: 0 0 0 3px rgba(10,10,10,0.08); }
.input-search {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238A8A8A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>");
  background-repeat: no-repeat;
  background-position: 10px center;
  padding-left: 32px;
  width: 280px;
}

textarea.input {
  height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; min-height: 80px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.field-help { font-size: 12px; color: var(--fg-mute); }

.input-error,
.input.input-error {
  border-color: var(--va-red, #E30613) !important;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--va-red, #E30613) 15%, transparent);
}

/* ---------- Multi-device picker (NewBookingDrawer) ---------- */
.device-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.device-pick {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-1);
  border-radius: var(--r-2);
  background: var(--bg-1);
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.device-pick:hover { border-color: var(--border-2); }
.device-pick input[type="checkbox"] {
  margin: 2px 0 0; flex-shrink: 0;
  accent-color: var(--va-red, #E30613);
}
.device-pick-body { flex: 1; min-width: 0; }
.device-pick.is-checked {
  border-color: var(--fg-1);
  background: var(--bg-2);
}
.device-pick.has-conflict.is-checked {
  border-color: #C68A12;
  background: color-mix(in oklab, #C68A12 6%, var(--bg-2));
}
.device-pick.is-blocked {
  opacity: 0.55;
  cursor: not-allowed;
}
.device-pick.is-blocked input { cursor: not-allowed; }

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23545454' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

/* ---------- Tabs / segmented ---------- */
.segmented {
  display: inline-flex;
  border: 1px solid var(--border-1);
  border-radius: var(--r-2);
  background: var(--bg-1);
  padding: 2px;
}
.segmented button {
  border: none;
  background: transparent;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-2);
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--font-text);
  transition: all var(--dur-fast) var(--ease-standard);
}
.segmented button:hover { color: var(--fg-1); }
.segmented button[aria-pressed="true"] {
  background: var(--va-ink);
  color: var(--va-white);
}

/* ---------- KPI tiles ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.kpi {
  border: 1px solid var(--border-1);
  border-radius: var(--r-3);
  padding: 18px 20px;
  background: var(--bg-1);
  display: flex; flex-direction: column; gap: 4px;
}
.kpi .label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.kpi .value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}
.kpi .meta {
  font-size: 12px; color: var(--fg-3);
  display: flex; align-items: center; gap: 6px;
  margin-top: 4px;
}
.kpi-accent { border-left: 3px solid var(--va-red); }

/* ---------- Two-column dashboard layout ---------- */
.grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

/* ---------- Booking row ---------- */
.timeline-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-2);
  transition: background var(--dur-fast) var(--ease-standard);
  cursor: pointer;
}
.timeline-row:last-child { border-bottom: none; }
.timeline-row:hover { background: var(--bg-3); }
.timeline-row .when {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-2);
  width: 92px;
  flex-shrink: 0;
}
.timeline-row .when .day { font-weight: 600; color: var(--fg-1); }
.timeline-row .what { flex: 1; min-width: 0; }
.timeline-row .what .title {
  font-weight: 600;
  font-size: 14px;
  display: flex; align-items: center; gap: 8px;
}
.timeline-row .what .meta {
  font-size: 12px; color: var(--fg-3); margin-top: 2px;
  display: flex; align-items: center; gap: 8px;
}
.timeline-row .what .meta .sep { color: var(--va-line); }

/* ---------- Calendar — Gantt ---------- */
.gantt {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: var(--r-3);
  overflow: hidden;
}
.gantt-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-1);
  background: var(--bg-1);
  gap: 12px;
}
.gantt-scroll {
  overflow-x: auto;
  overflow-y: hidden;
}
.gantt-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-width: 1100px;
}
.gantt-side-head, .gantt-time-head {
  background: var(--bg-3);
  border-bottom: 1px solid var(--border-1);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  height: 40px;
  display: flex; align-items: center;
}
.gantt-side-head { padding: 0 16px; border-right: 1px solid var(--border-1); }
.gantt-time-head {
  display: grid;
  position: relative;
}
.gantt-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--fg-3);
  border-right: 1px solid var(--border-2);
}
.gantt-day .dnum {
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 13px;
  color: var(--fg-1);
  letter-spacing: 0;
}
.gantt-day.weekend { background: var(--bg-3); }
.gantt-day.today { color: var(--va-red); }
.gantt-day.today .dnum { color: var(--va-red); }
.gantt-side-cell {
  padding: 0 16px;
  border-right: 1px solid var(--border-1);
  border-bottom: 1px solid var(--border-2);
  display: flex; align-items: center; gap: 10px;
  height: 56px;
  font-size: 13px;
}
.gantt-side-cell .device-name { font-weight: 600; }
.gantt-side-cell .device-id { font-size: 11px; color: var(--fg-mute); font-family: var(--font-mono); }
.gantt-track {
  position: relative;
  height: 56px;
  border-bottom: 1px solid var(--border-2);
  display: grid;
}
.gantt-track .day-cell {
  border-right: 1px solid var(--border-2);
}
.gantt-track .day-cell.weekend { background: var(--bg-3); }
.gantt-track .today-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--va-red);
  z-index: 4;
  pointer-events: none;
}
.gantt-bar {
  position: absolute;
  top: 8px;
  height: 40px;
  border-radius: var(--r-2);
  background: var(--va-ink);
  color: var(--va-white);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 500;
  display: flex; align-items: center;
  gap: 6px;
  overflow: hidden;
  cursor: pointer;
  z-index: 2;
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-standard);
}
.gantt-bar:hover { transform: translateY(-1px); z-index: 5; box-shadow: var(--shadow-2); }
.gantt-bar.confirmed { background: var(--va-ink); }
.gantt-bar.requested { background: var(--bg-1); color: var(--fg-1); border: 1px dashed var(--va-ink); }
.gantt-bar.in-transit { background: var(--va-red); }
.gantt-bar.in-use { background: var(--va-red); }
.gantt-bar.maintenance { background: #E6A100; color: var(--va-ink); }
.gantt-bar .bar-event { font-weight: 600; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }

/* ---------- Calendar — Month ---------- */
.month-cal {
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: var(--r-3);
  overflow: hidden;
}
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.month-dayhead {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  background: var(--bg-3);
  border-bottom: 1px solid var(--border-1);
  border-right: 1px solid var(--border-2);
  text-align: left;
}
.month-dayhead:last-child { border-right: none; }
.month-cell {
  min-height: 110px;
  padding: 8px;
  border-right: 1px solid var(--border-2);
  border-bottom: 1px solid var(--border-2);
  display: flex; flex-direction: column; gap: 4px;
  background: var(--bg-1);
}
.month-cell.other-month { background: var(--bg-3); color: var(--fg-mute); }
.month-cell.today .dnum { background: var(--va-red); color: var(--va-white); }
.month-cell .dnum {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600;
  border-radius: var(--r-pill);
}
.month-event {
  background: var(--va-ink); color: var(--va-white);
  padding: 2px 6px; border-radius: 3px;
  font-size: 11px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
}
.month-event.in-use { background: var(--va-red); }
.month-event.in-transit { background: var(--va-red); }
.month-event.maintenance { background: #E6A100; color: var(--va-ink); }
.month-event.requested { background: var(--bg-1); border: 1px dashed var(--va-ink); color: var(--fg-1); }

/* ---------- Week view ---------- */
.week-cal {
  display: grid;
  grid-template-columns: 64px repeat(7, 1fr);
  background: var(--bg-1);
  border: 1px solid var(--border-1);
  border-radius: var(--r-3);
  overflow: hidden;
}
.week-corner, .week-dayhead {
  padding: 10px 12px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  background: var(--bg-3);
  border-bottom: 1px solid var(--border-1);
  border-right: 1px solid var(--border-2);
}
.week-dayhead .dnum {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  color: var(--fg-1); letter-spacing: -0.02em; display: block;
}
.week-dayhead.today .dnum { color: var(--va-red); }
.week-col, .week-timecol {
  position: relative;
  border-right: 1px solid var(--border-2);
  height: 480px;
}
.week-timecol {
  background: var(--bg-3);
  text-align: right;
}
.week-hour {
  height: 40px;
  border-bottom: 1px solid var(--border-2);
  font-size: 10px; color: var(--fg-mute);
  padding: 2px 8px;
  font-family: var(--font-mono);
}
.week-event {
  position: absolute;
  left: 4px; right: 4px;
  background: var(--va-ink); color: var(--va-white);
  padding: 6px 8px; border-radius: var(--r-2);
  font-size: 11px;
  cursor: pointer;
  z-index: 2;
}
.week-event.requested { background: var(--bg-1); color: var(--fg-1); border: 1px dashed var(--va-ink); }
.week-event.in-use { background: var(--va-red); }
.week-event-title { font-weight: 600; line-height: 1.2; }
.week-event-meta { opacity: 0.85; font-size: 10px; margin-top: 2px; }

/* ---------- Reminder strip ---------- */
.reminder {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--border-1);
  border-radius: var(--r-2);
  margin-bottom: 8px;
  font-size: 13px;
  background: var(--bg-1);
}
.reminder.urgent { border-left: 3px solid var(--va-red); }
.reminder .label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--va-red);
  font-weight: 600;
  margin-bottom: 2px;
}
.reminder .text { color: var(--fg-2); line-height: 1.45; }
.reminder .meta { color: var(--fg-mute); font-size: 11px; margin-top: 4px; font-family: var(--font-mono); }

/* ---------- Drawer / modal ---------- */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,10,10,0.36);
  z-index: 50;
  animation: fade 160ms var(--ease-standard);
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(640px, 90vw);
  background: var(--bg-1);
  border-left: 1px solid var(--border-1);
  z-index: 51;
  display: flex; flex-direction: column;
  animation: slide-in 240ms var(--ease-standard);
  box-shadow: -16px 0 40px rgba(10,10,10,0.08);
}
.drawer-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-1);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.drawer-head h2 {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  letter-spacing: -0.02em; margin: 0;
}
.drawer-head .eyebrow {
  font-size: 11px; margin-bottom: 4px; letter-spacing: 0.14em;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 24px; }
.drawer-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--border-1);
  display: flex; justify-content: space-between; gap: 8px;
}

@keyframes slide-in { from { transform: translateX(8px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Detail rows ---------- */
.detail-list { display: flex; flex-direction: column; }
.detail-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-2);
  font-size: 13px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row .k {
  color: var(--fg-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 2px;
}
.detail-row .v { color: var(--fg-1); line-height: 1.5; }
.detail-row .v .mono { font-family: var(--font-mono); font-size: 12px; }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-3);
  color: var(--fg-2);
  border: 1px solid var(--border-1);
}
.tag-red { background: var(--va-red-100); color: var(--va-red-700); border-color: transparent; }
.tag-ink { background: var(--va-ink); color: var(--va-white); border-color: var(--va-ink); }

/* ---------- Empty placeholders ---------- */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--fg-mute);
  font-size: 13px;
}

/* ---------- Customer mode tweaks ---------- */
.app[data-mode="customer"] .topbar {
  border-bottom: 1px solid var(--border-1);
}
.app[data-mode="customer"] .topbar-left .brand-context .name { color: var(--va-red); }

/* Hairline between adjacent cards in dashboard col */
.stack-16 > * + * { margin-top: 16px; }
.stack-12 > * + * { margin-top: 12px; }
.stack-8  > * + * { margin-top: 8px; }

.row { display: flex; align-items: center; gap: 8px; }
.row-end { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }

.divider { height: 1px; background: var(--border-1); margin: 16px 0; }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: var(--va-ink); color: var(--va-white);
  padding: 12px 18px;
  border-radius: var(--r-2);
  font-size: 13px;
  z-index: 80;
  box-shadow: var(--shadow-3);
  display: flex; align-items: center; gap: 10px;
  animation: slide-up 240ms var(--ease-standard);
}
@keyframes slide-up { from { transform: translate(-50%, 8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.toast .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--va-red); }

/* Utility */
.muted { color: var(--fg-mute); }
.h-flex-grow { flex: 1; }
.nowrap { white-space: nowrap; }
.text-mono { font-family: var(--font-mono); }
.text-sm { font-size: 12px; }

/* Customer-only banner */
.customer-banner {
  background: var(--va-ink); color: var(--va-white);
  padding: 10px 24px;
  font-size: 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.customer-banner .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--va-red); margin-right: 6px; }

/* Make scrollbars nicer */
.main::-webkit-scrollbar, .gantt-scroll::-webkit-scrollbar, .drawer-body::-webkit-scrollbar, .sidebar::-webkit-scrollbar { width: 10px; height: 10px; }
.main::-webkit-scrollbar-thumb, .gantt-scroll::-webkit-scrollbar-thumb, .drawer-body::-webkit-scrollbar-thumb, .sidebar::-webkit-scrollbar-thumb {
  background: var(--va-line); border-radius: 999px;
}
.main::-webkit-scrollbar-thumb:hover { background: var(--va-mute); }
