/* ============================================================
   TV DASHBOARD LAYOUT
   ============================================================ */

.tv {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  height: calc(100vh - var(--header-h));
  position: relative;
  overflow: hidden;
}
.tv-with-rail {
  grid-template-columns: 1fr minmax(280px, 18%);
}

/* Subtle radial backdrop — mission control vibe, very low intensity */
.tv::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 60%),
    repeating-linear-gradient(0deg, var(--grid-line) 0, var(--grid-line) 1px, transparent 1px, transparent 64px),
    repeating-linear-gradient(90deg, var(--grid-line) 0, var(--grid-line) 1px, transparent 1px, transparent 64px);
  pointer-events: none;
  z-index: 0;
}

.tv-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding: var(--s5);
  gap: var(--s4);
  overflow: hidden;
}

.tv-rail {
  position: relative;
  z-index: 1;
  border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-1) 90%, transparent);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Carousel header strip ── */
.carousel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--line);
  position: relative;
  flex-shrink: 0;
}
.carousel-bar-left {
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.carousel-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--accent);
}
.carousel-icon svg { width: 14px; height: 14px; }
.carousel-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-0);
  letter-spacing: -0.01em;
}
.carousel-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-2);
}

.carousel-pager {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.pager-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-right: var(--s2);
}
.pager-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: all var(--dur-base) var(--ease);
}
.pager-dot.active {
  width: 22px;
  background: var(--accent);
}
.pager-dot.active::after { display: none; }

.carousel-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  pointer-events: none;
  overflow: hidden;
}
.carousel-progress-fill {
  height: 100%;
  background: var(--accent);
  transform-origin: left center;
  opacity: 0.8;
}

/* ── Slide stage ── */
.slide-stage {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}
.slide {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  animation: slideIn var(--dur-slow) var(--ease) both;
}

/* Below TV-height, slides become scrollable rather than clipping. */
@media (max-height: 900px), (max-width: 1280px) {
  .slide-stage { overflow-y: auto; }
  .slide {
    flex: 0 0 auto;
    min-height: 0;
    padding-bottom: var(--s4);
  }
  .split-2 { flex: 0 0 auto; min-height: 360px; }
  .focus-split { flex: 0 0 auto; min-height: 240px; }
  .chart-wrap { min-height: 280px; }
  .donut-row { min-height: 280px; }
}

/* Narrow desktop: stack the chart-split and focus-split single-column. */
@media (max-width: 980px) {
  .split-2 { grid-template-columns: 1fr; }
  .focus-split { grid-template-columns: 1fr; }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(8px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
[data-motion="minimal"] .slide { animation: none; }

/* ── KPI grid ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--s3);
  flex-shrink: 0;
}

@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

/* TV breakpoint — bigger numerics */
@media (min-width: 1800px) {
  .kpi-value { font-size: clamp(48px, 5vw, 88px); }
  .kpi-label { font-size: 12px; }
}

/* Two-column main panel area */
.split-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--s4);
  flex: 1;
  min-height: 0;
}

/* ── Chart cards ── */
.chart-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: var(--s4);
}
.chart-svg { width: 100%; height: 100%; display: block; }

.chart-legend {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: 0 var(--s4) var(--s3);
  font-size: 11px;
  color: var(--fg-2);
}
.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
}
.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* ── Donut ── */
.donut-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
  padding: var(--s4);
  height: 100%;
  align-items: center;
}
.donut-svg { width: 100%; max-width: 280px; aspect-ratio: 1; }
.donut-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}
.donut-list-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 10px;
  align-items: center;
}
.donut-list-row .swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.donut-list-row .name {
  color: var(--fg-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.donut-list-row .count {
  font-family: var(--font-mono);
  color: var(--fg-0);
  font-weight: 600;
}

/* ── Agent rows ── */
.agent-list {
  display: flex;
  flex-direction: column;
}
.agent-row {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  gap: var(--s4);
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-soft);
}
.agent-row:last-child { border-bottom: none; }
.agent-meta { display: flex; align-items: center; gap: 10px; }
.agent-name { font-size: 14px; font-weight: 500; color: var(--fg-0); }
.agent-status {
  font-size: 11px;
  color: var(--fg-2);
  font-family: var(--font-mono);
}
.agent-bar {
  height: 6px;
  background: var(--bg-2);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.agent-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width var(--dur-slow) var(--ease);
}
.agent-bar-fill.is-warn { background: var(--warn); }
.agent-bar-fill.is-err { background: var(--err); }
.agent-bar-fill.is-ok { background: var(--ok); }
.agent-count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-1);
  min-width: 60px;
  text-align: right;
}

/* ── Deployment grid ── */
.deploy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--s3);
  align-content: start;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: 2px;
}
.deploy-card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-left: 3px solid var(--rail-color, var(--ok));
  border-radius: var(--r-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
}
.deploy-card.is-ok { --rail-color: var(--ok); }
.deploy-card.is-warn { --rail-color: var(--warn); }
.deploy-card.is-err { --rail-color: var(--err); }
.deploy-card.is-progress { --rail-color: var(--info); }
.deploy-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
.deploy-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-0);
  font-family: var(--font-sans);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deploy-card-meta {
  font-size: 10px;
  color: var(--fg-3);
}
.deploy-card-row {
  display: flex;
  justify-content: space-between;
  color: var(--fg-1);
}
.deploy-card-row .lbl { color: var(--fg-3); }
.deploy-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--fg-3);
  border-top: 1px dashed var(--line);
  padding-top: 6px;
  margin-top: 2px;
}

/* ── Store focus split ── */
.focus-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
  flex: 1;
  min-height: 0;
}
.focus-card {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.focus-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, var(--focus-tint, var(--accent-soft)), transparent 60%);
  opacity: 0.5;
  pointer-events: none;
}
.focus-card.store { --focus-tint: color-mix(in srgb, var(--info) 14%, transparent); }
.focus-card.corp { --focus-tint: color-mix(in srgb, #a855f7 14%, transparent); }
.focus-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  position: relative;
}
.focus-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.focus-value {
  font-size: clamp(56px, 7vw, 96px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--fg-0);
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 1;
}
.focus-value.value-blue { color: var(--info); }
.focus-value.value-purple { color: #c084fc; }
.focus-sub {
  font-size: 12px;
  color: var(--fg-2);
  font-family: var(--font-mono);
  position: relative;
  z-index: 1;
}
.focus-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.focus-list-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.focus-list-row .lbl { color: var(--fg-1); }
.focus-list-row .val { font-family: var(--font-mono); color: var(--fg-0); font-weight: 600; }

/* ── Chip strip (escalations / approvals / categories) ── */
.chip-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: var(--s2);
}
.strip-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--fg-1);
}
.strip-chip-count {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--fg-0);
}
.strip-chip.is-warn { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.strip-chip.is-err { background: var(--err-bg); border-color: transparent; color: var(--err); }
.strip-chip.is-info { background: var(--info-bg); border-color: transparent; color: var(--info); }

.strip-section { display: flex; flex-direction: column; gap: 8px; }
.strip-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ── Right rail ── */
.rail-block {
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--line);
}
.rail-clock {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.rail-clock-time {
  font-size: clamp(40px, 3.5vw, 56px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--fg-0);
}
.rail-clock-ampm {
  font-size: 18px;
  font-weight: 600;
  color: var(--fg-2);
}
.rail-clock-date {
  width: 100%;
  font-size: 12px;
  color: var(--fg-2);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.rail-pulse {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rail-pulse-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rail-pulse-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.rail-pulse-item {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rail-pulse-item .v {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--fg-0);
  line-height: 1;
}
.rail-pulse-item .l {
  font-size: 10px;
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.rail-broadcasts-empty {
  padding: var(--s4) var(--s5);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--fg-2);
}
.rail-broadcasts-empty-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ok-bg);
  display: grid;
  place-items: center;
  color: var(--ok);
}
.rail-broadcasts-empty-icon svg { width: 18px; height: 18px; }

.rail-broadcast {
  margin: var(--s3) var(--s4);
  padding: var(--s3) var(--s4);
  border-radius: var(--r-md);
  border-left: 3px solid var(--err);
  background: var(--err-bg);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rail-broadcast.is-warn { border-color: var(--warn); background: var(--warn-bg); }
.rail-broadcast.is-info { border-color: var(--info); background: var(--info-bg); }
.rail-broadcast-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--err);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.rail-broadcast.is-warn .rail-broadcast-tag { color: var(--warn); }
.rail-broadcast.is-info .rail-broadcast-tag { color: var(--info); }
.rail-broadcast-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-0);
}
.rail-broadcast-body {
  font-size: 12px;
  color: var(--fg-1);
  line-height: 1.45;
}

/* ── Header status pulse on TV ── */
.header-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
  gap: var(--s4);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  color: var(--fg-2);
}
.header-meta .sep { width: 1px; height: 14px; background: var(--line); }
.updated-pip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.updated-pip::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ok);
}
.updated-pip.stale::before,
.updated-pip.fresh-stale::before { background: var(--warn); }
.updated-pip.dead::before,
.updated-pip.fresh-dead::before { background: var(--err); animation: dotPulse 1.6s ease-in-out infinite; }

/* Theme switch — segmented */
.theme-seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-1);
  padding: 2px;
  gap: 2px;
}
.theme-seg button {
  width: 28px;
  height: 26px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: var(--fg-2);
  transition: all var(--dur-fast);
}
.theme-seg button:hover { color: var(--fg-0); }
.theme-seg button.active { background: var(--bg-2); color: var(--fg-0); box-shadow: var(--shadow-sm); }
.theme-seg button svg { width: 14px; height: 14px; }

/* ── ADMIN LAYOUT ── */
.admin-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--s8) var(--s6) var(--s10);
  width: 100%;
}
.admin-h {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s4);
  margin-bottom: var(--s6);
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--line);
}
.admin-h-title h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg-0);
}
.admin-h-title p {
  font-size: 14px;
  color: var(--fg-2);
  margin-top: 4px;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s4);
  margin-bottom: var(--s6);
}
@media (max-width: 900px) {
  .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
}

.admin-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s5);
}
.admin-card-link {
  display: flex;
  align-items: flex-start;
  gap: var(--s4);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s5);
  transition: all var(--dur-fast);
}
.admin-card-link:hover {
  border-color: var(--line-strong);
  background: var(--bg-1);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.admin-card-link-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.admin-card-link-icon svg { width: 20px; height: 20px; }
.admin-card-link h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}
.admin-card-link p {
  font-size: 13px;
  color: var(--fg-2);
}

.admin-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
}
@media (max-width: 900px) { .admin-grid-2 { grid-template-columns: 1fr; } }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--s12) var(--s4);
  text-align: center;
  color: var(--fg-2);
  gap: 12px;
}
.empty-state-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--bg-2);
  color: var(--fg-2);
  display: grid;
  place-items: center;
}
.empty-state-icon svg { width: 24px; height: 24px; }
.empty-state h3 { font-size: 16px; font-weight: 600; color: var(--fg-1); }
.empty-state p { font-size: 13px; max-width: 360px; line-height: 1.5; }

/* Sidebar / page nav for admin sub-routes (broadcasts, devices, etc) */
.subnav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: var(--s5);
  width: fit-content;
}
.subnav button {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-2);
  border-radius: var(--r-sm);
  transition: all var(--dur-fast);
}
.subnav button:hover { color: var(--fg-0); }
.subnav button.active { background: var(--bg-elev); color: var(--fg-0); box-shadow: var(--shadow-sm); }

/* Tabular toolbar */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  margin-bottom: var(--s4);
}
.toolbar-search {
  position: relative;
  width: 280px;
}
.toolbar-search input { padding-left: 34px; }
.toolbar-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--fg-2);
}

/* Health pill in tables */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
}
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-err { background: var(--err-bg); color: var(--err); }
.pill-info { background: var(--info-bg); color: var(--info); }
.pill-neutral { background: var(--neutral-bg); color: var(--neutral); }

/* ── Widget compatibility — classes not yet migrated to design-system equivalents ── */

/* Broadcast marquee (mobile/tablet banner) */
.broadcast-marquee {
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  height: 32px;
  display: none; /* hidden on TV width; shown by media query below */
}
.broadcast-marquee-inner {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  animation: marqueeScroll 40s linear infinite;
}
@keyframes marqueeScroll {
  from { transform: translateX(100vw); }
  to   { transform: translateX(-100%); }
}
.marquee-item { display: inline-flex; align-items: center; gap: 6px; padding: 0 24px; font-size: 12px; color: var(--fg-1); }
.marquee-tag  { font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.marquee-critical .marquee-tag { color: var(--err); }
.marquee-high     .marquee-tag { color: var(--warn); }
.marquee-medium   .marquee-tag { color: var(--warn); }
.marquee-info     .marquee-tag { color: var(--info); }
@media (max-width: 1280px) { .broadcast-marquee { display: flex; } }

/* Card detail drawer (summary cards) */
.card-drawer { overflow: hidden; max-height: 0; transition: max-height 0.35s var(--ease); }
.card-drawer-open { max-height: 480px; }

/* Chart canvas wrapper */
.chart-canvas-wrap { position: relative; flex: 1; min-height: 200px; overflow: hidden; }
.chart-canvas-wrap canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
/* Ensure split-2 surfaces have height for charts */
.split-2 > .surface { min-height: 240px; }

/* JIRA overview layout */
.jira-overview-widget { display: flex; flex-direction: column; gap: var(--s4); flex: 1; min-height: 0; }
.jira-chart-row { display: grid; grid-template-columns: 3fr 2fr; gap: var(--s4); flex: 1; min-height: 0; }
.jira-age-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s2); flex-shrink: 0; }
.jira-age-tile { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px; text-align: center; }
.jira-age-tile-count { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--fg-0); }
.jira-age-tile-label { font-size: 10px; font-weight: 600; color: var(--fg-2); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 2px; }
.age-fresh  { color: var(--ok); }
.age-warn1  { color: color-mix(in srgb, var(--ok) 50%, var(--warn)); }
.age-warn2  { color: var(--warn); }
.age-warn3  { color: color-mix(in srgb, var(--warn) 50%, var(--err)); }
.age-stale  { color: var(--err); }

/* Skeleton loading states */
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
.skeleton {
  background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  border-radius: var(--r-sm);
}
.skeleton-text    { height: 12px; border-radius: 3px; }
.skeleton-text-lg { height: 32px; border-radius: 4px; margin: 4px 0; }
.skeleton-chart   { height: 100%; min-height: 120px; border-radius: var(--r-md); }
.skeleton-card    { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.skeleton-circle  { border-radius: 50%; }

/* Store focus layout */
.store-focus-widget { display: flex; flex-direction: column; gap: var(--s4); flex: 1; min-height: 0; }
.store-focus-grid   { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: var(--s4); flex: 1; min-height: 0; }

/* Deploy modal overlay */
.deploy-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 100;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.deploy-modal-dialog {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s6); width: min(92vw, 680px); max-height: 85vh; overflow-y: auto;
  position: relative;
}
.deploy-detail-close {
  position: absolute; top: var(--s4); right: var(--s4);
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--line); cursor: pointer; color: var(--fg-2);
}
.deploy-detail-close:hover { background: var(--bg-3); color: var(--fg-0); }
.deploy-modal-loading { display: flex; align-items: center; justify-content: center; padding: var(--s8); }

/* Deploy card extras (not in deploy-card base) */
.deploy-card-divider { height: 1px; background: var(--line-soft); margin: 4px 0; }
.deploy-card-footer  { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: var(--fg-3); }
.deploy-version      { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); }
.deploy-image-tag    { font-family: var(--font-mono); font-size: 9px; color: var(--fg-3); }
.deploy-images       { display: flex; flex-direction: column; gap: 2px; }
.deploy-card-deployed { font-size: 10px; color: var(--fg-3); }
.deploy-card-hint    { font-size: 9px; color: var(--fg-3); opacity: 0.6; margin-top: 2px; }

/* ── Print stylesheet (TICKET-22) ── */
@media print {
  /* Force light theme and hide interactive chrome */
  html { --bg-0: #f6f7f9 !important; --bg-1: #ffffff !important; --bg-elev: #ffffff !important;
         --fg-0: #0a0e17 !important; --fg-1: #2d3748 !important; --fg-2: #6b7385 !important;
         --line: #e2e6ec !important; }
  .topbar, .tv-rail, .broadcast-marquee,
  .carousel-bar, .carousel-progress,
  #admin-link, #version-check { display: none !important; }
  .tv, .tv-with-rail { display: block !important; height: auto !important; }
  .tv-main { overflow: visible !important; height: auto !important; padding: 0 !important; }
  .slide { display: block !important; page-break-after: always; break-after: page;
           animation: none !important; }
  .slide:last-child { page-break-after: avoid; break-after: avoid; }
  /* Expand all hidden slides for print */
  [x-show] { display: block !important; }
}
