/* ============================================================
   Lux Design System — lux.css
   Monochrome, serif headers, fine lines. Match lux.do aesthetic.
   ============================================================ */

@import url('./tokens.css');

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
  width: 100%;
  background: var(--lux-bg);
}
/* Form controls don't inherit text colour by default: the browser paints them
   black, which vanishes in the dark theme. Any class that sets its own colour
   still wins. */
button,
input,
select,
textarea {
  color: inherit;
}
body {
  font-family: var(--lux-sans);
  color: var(--lux-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.5;
}

/* Keyboard focus: inputs signal focus via border-color (rules below), so this
   covers buttons, links, nav items, table rows, tabs, and chips. */
:focus-visible {
  outline: 2px solid var(--lux-accent);
  outline-offset: 2px;
}

canvas#net {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.35;
  pointer-events: none;
}

/* Boot loader — shown in #app until the first render replaces it. */
.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  position: relative;
  z-index: 2;
}
.boot img {
  opacity: 0.9;
}
.boot-spin {
  width: 22px;
  height: 22px;
  border: 2px solid var(--lux-line);
  border-top-color: var(--lux-ink);
  border-radius: 50%;
  animation: boot-spin 0.7s linear infinite;
}
@keyframes boot-spin {
  to {
    transform: rotate(360deg);
  }
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
}
.noscript-msg {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--lux-bg);
  font-size: 14px;
  color: var(--lux-ink-2);
  padding: 24px;
  text-align: center;
}
.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 80% 60% at 60% 30%,
    var(--lux-bg-fade) 0%,
    var(--lux-veil) 60%,
    var(--lux-bg) 100%
  );
}

/* ---------- Shell ---------- */
.shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.side {
  border-right: 1px solid var(--lux-line-soft);
  background: var(--lux-glass);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--lux-line-soft);
  margin-bottom: 18px;
}
.brand img {
  height: 38px;
  width: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  /* Thin scrollbar, invisible until the menu is hovered or focused. The
     gutter stays reserved so nothing shifts when it appears. */
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  scrollbar-gutter: stable;
  transition: scrollbar-color 0.2s;
}
.nav:hover,
.nav:focus-within {
  scrollbar-color: var(--lux-line-mid) transparent;
}
/* Safari (no scrollbar-color yet) */
.nav::-webkit-scrollbar {
  width: 6px;
}
.nav::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 3px;
}
.nav:hover::-webkit-scrollbar-thumb,
.nav:focus-within::-webkit-scrollbar-thumb {
  background: var(--lux-line-mid);
}
.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-label {
  padding: 0 12px 6px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lux-ink-6);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--lux-ink-2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: 2px;
  transition:
    background 0.15s,
    color 0.15s;
}
.nav-item:hover {
  background: var(--lux-bg-3);
  color: var(--lux-ink);
}
.nav-item.active {
  background: var(--lux-ink);
  color: var(--lux-ink-inv);
}
.nav-item .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
}
.nav-item.active .dot {
  opacity: 1;
}

.side-foot {
  padding: 16px 24px 0;
  border-top: 1px solid var(--lux-line-soft);
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.env {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--lux-ink-3);
}
.env .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lux-ink);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.5);
  }
}
.who {
  font-size: 11px;
  color: var(--lux-ink-4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Main ---------- */
.main {
  padding: 0 36px 56px;
  min-width: 0;
}

/* Top bar */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  background: linear-gradient(180deg, var(--lux-bg) 70%, var(--lux-bg-fade));
}
.top-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.crumbs {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lux-ink-4);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.crumbs span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crumbs .sep {
  color: var(--lux-line-mid);
  flex: none;
}
.crumbs .cur {
  color: var(--lux-ink);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Mobile nav toggle — hidden on desktop, shown ≤780px. */
.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  padding: 0 7px;
  border: 1px solid var(--lux-line);
  background: var(--lux-surface);
  cursor: pointer;
  flex: none;
}
.menu-btn span {
  display: block;
  height: 2px;
  background: var(--lux-ink);
  transition:
    transform 0.2s,
    opacity 0.2s;
}
.menu-btn[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.menu-btn[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}
.menu-btn[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
.side-scrim {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: var(--lux-scrim);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--lux-line);
  background: var(--lux-surface);
  padding: 8px 12px;
  width: 340px;
  color: var(--lux-ink-6);
}
.search input {
  border: 0;
  outline: 0;
  background: transparent;
  flex: 1;
  font: inherit;
  color: var(--lux-ink);
  font-size: 13px;
}
.search input::placeholder {
  color: var(--lux-ink-6);
}
.search kbd {
  font-family: var(--lux-mono);
  font-size: 10px;
  color: var(--lux-ink-4);
  border: 1px solid var(--lux-line);
  padding: 1px 5px;
  background: var(--lux-bg);
}
.icon-btn {
  position: relative;
  border: 1px solid var(--lux-line);
  background: var(--lux-surface);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--lux-ink-2);
}
.icon-btn:hover {
  border-color: var(--lux-ink);
  color: var(--lux-ink);
}
.icon-btn .badge {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lux-accent);
}

/* Page head */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 32px;
  flex-wrap: wrap;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--lux-ink-3);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.eyebrow .rule {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--lux-line-mid);
}

.page-head h1 {
  font-family: var(--lux-serif);
  font-weight: 600;
  font-size: clamp(32px, 3.6vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.015em;
}
.page-head h1 em {
  font-style: italic;
  font-weight: 500;
}
.lede {
  margin-top: 10px;
  color: var(--lux-lede);
  max-width: 60ch;
  font-size: 14.5px;
  line-height: 1.6;
}
.page-cta {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 0;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition:
    transform 0.15s,
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}
.btn-primary {
  background: var(--lux-ink);
  color: var(--lux-ink-inv);
  border: 1px solid var(--lux-ink);
}
.btn-primary:hover {
  background: var(--lux-surface);
  color: var(--lux-ink);
}
.btn-ghost {
  background: transparent;
  color: var(--lux-ink);
  border: 1px solid var(--lux-line-strong);
}
.btn-ghost:hover {
  border-color: var(--lux-ink);
}
.btn-danger {
  background: var(--lux-err);
  color: var(--lux-ink-inv);
  border: 1px solid var(--lux-err);
}
.btn-danger:hover {
  background: var(--lux-surface);
  color: var(--lux-err);
}

/* ---------- KPIs ---------- */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.kpi {
  position: relative;
  background: var(--lux-surface);
  border: 1px solid var(--lux-line-soft);
  padding: 20px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.kpi:hover {
  border-color: var(--lux-ink);
}
.kpi-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lux-ink-4);
}
.kpi-value {
  font-family: var(--lux-serif);
  font-weight: 600;
  font-size: 34px;
  line-height: 1;
  color: var(--lux-ink);
  letter-spacing: -0.02em;
}
.kpi-value small {
  font-size: 18px;
  font-weight: 500;
  color: var(--lux-ink-3);
  margin-left: 1px;
}
.kpi-delta {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.kpi-delta.up {
  color: var(--lux-ok);
}
.kpi-delta.down {
  color: var(--lux-err);
}
.kpi-delta.flat {
  color: var(--lux-ink-4);
}
.spark {
  width: 100%;
  height: 36px;
  margin-top: 4px;
  display: block;
}

/* ---------- Cards ---------- */
.card {
  background: var(--lux-surface);
  border: 1px solid var(--lux-line-soft);
  padding: 20px 22px;
  margin-bottom: 20px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--lux-divider);
}
.card-head h3 {
  font-family: var(--lux-serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.muted {
  color: var(--lux-ink-4);
  font-size: 12px;
}
.mono {
  font-family: var(--lux-mono);
  font-size: 11.5px;
}
.link {
  font-size: 12px;
  color: var(--lux-ink);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.link:hover {
  border-color: var(--lux-ink);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* Legend */
.legend {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--lux-ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  vertical-align: middle;
}

/* Flow chart */
.flow {
  width: 100%;
  height: 240px;
  display: block;
}

/* Destinations */
.dest-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dest-list li {
  display: grid;
  grid-template-columns: 130px 1fr 60px 70px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.d-name {
  font-weight: 500;
}
.d-bar {
  height: 4px;
  background: var(--lux-bg-3);
  position: relative;
  overflow: hidden;
}
.d-bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--lux-ink);
  display: block;
}
.d-num {
  font-family: var(--lux-mono);
  font-size: 11.5px;
  color: var(--lux-ink-3);
  text-align: right;
}
.d-st {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: right;
}
.d-st.ok {
  color: var(--lux-ok);
}
.d-st.warn {
  color: var(--lux-warn);
}
.d-st.err {
  color: var(--lux-err);
}

/* Filters */
.filters {
  display: flex;
  gap: 6px;
}
.chip {
  background: transparent;
  border: 1px solid var(--lux-line);
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lux-ink-3);
  cursor: pointer;
  font-family: inherit;
  transition:
    border-color 0.15s,
    color 0.15s,
    background 0.15s;
}
.chip:hover {
  border-color: var(--lux-ink);
  color: var(--lux-ink);
}
.chip.active {
  background: var(--lux-ink);
  color: var(--lux-ink-inv);
  border-color: var(--lux-ink);
}

/* Table */
.table-wrap {
  overflow-x: auto;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl th {
  text-align: left;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lux-ink-4);
  padding: 8px 14px 12px;
  border-bottom: 1px solid var(--lux-line-soft);
}
.tbl td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--lux-line-faint);
  vertical-align: middle;
}
.tbl tbody tr:hover {
  background: var(--lux-bg-hover);
}
.tbl td.mono,
.tbl td .mono {
  font-family: var(--lux-mono);
  font-size: 11.5px;
  color: var(--lux-ink-2);
}

.pill {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 9px;
  border: 1px solid currentColor;
}
.pill.ok {
  color: var(--lux-ok);
}
.pill.warn {
  color: var(--lux-warn);
}
.pill.err {
  color: var(--lux-err);
}
.pill.neutral {
  color: var(--lux-ink-3);
}

/* Code block */
.code {
  font-family: var(--lux-mono);
  font-size: 12px;
  line-height: 1.7;
  background: var(--lux-code-bg);
  color: var(--lux-code-ink);
  padding: 18px 22px;
  overflow-x: auto;
  border: 1px solid var(--lux-code-bg);
}
.code .k {
  color: var(--lux-code-key);
}
.code .s {
  color: var(--lux-code-str);
}
.code .v {
  color: var(--lux-code-val);
}
.code .n {
  color: var(--lux-code-num);
}

/* Lookup form */
.lookup {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lookup label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lux-ink-4);
}
.lookup input {
  border: 1px solid var(--lux-line);
  background: var(--lux-surface);
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  font-family: var(--lux-mono);
}
.lookup input:focus {
  outline: 0;
  border-color: var(--lux-ink);
}
.lookup .btn {
  align-self: flex-start;
  margin-bottom: 6px;
}

/* Source list */
.src-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.src-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--lux-divider);
}
.src-list li:last-child {
  border-bottom: 0;
}
.s-name {
  font-weight: 500;
  font-size: 13.5px;
}
.s-meta {
  font-family: var(--lux-mono);
  font-size: 11.5px;
  color: var(--lux-ink-4);
}

/* Graph canvas */
.graph {
  width: 100%;
  height: 480px;
  display: block;
  background: var(--lux-bg);
  border: 1px solid var(--lux-divider);
}

/* Connection cards */
.conn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.conn {
  background: var(--lux-surface);
  border: 1px solid var(--lux-line-soft);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s;
}
.conn:hover {
  border-color: var(--lux-ink);
}
.conn-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.conn-name {
  font-family: var(--lux-serif);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.conn-kind {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lux-ink-4);
}
.conn-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--lux-ink-3);
}
.conn-meta .mono {
  color: var(--lux-ink-2);
}
.conn-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--lux-divider);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lux-ink-4);
}

/* Partner cards */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.partner {
  background: var(--lux-surface);
  border: 1px solid var(--lux-line-soft);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s;
}
.partner:hover {
  border-color: var(--lux-ink);
}
.partner-name {
  font-family: var(--lux-serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.partner-kv {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--lux-ink-3);
}
.partner-kv span:last-child {
  color: var(--lux-ink);
  font-family: var(--lux-mono);
  font-size: 11.5px;
}

/* Audit log */
.audit-list {
  list-style: none;
}
.audit-list li {
  display: grid;
  grid-template-columns: 140px 90px 1fr 120px;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--lux-divider);
  font-size: 12.5px;
  align-items: center;
}
.audit-list li:last-child {
  border-bottom: 0;
}
.audit-list .ts {
  font-family: var(--lux-mono);
  font-size: 11.5px;
  color: var(--lux-ink-4);
}
.audit-list .act {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lux-ink);
}
.audit-list .who-cell {
  color: var(--lux-ink-2);
  font-family: var(--lux-mono);
  font-size: 11.5px;
  text-align: right;
}

/* kv rows */
.kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--lux-divider);
  font-size: 13px;
}
.kv:last-child {
  border-bottom: 0;
}
.kv span:first-child {
  color: var(--lux-ink-4);
}

/* ---------- Propensity & Budget ---------- */
.prop-list,
.alloc-list,
.ident-list,
.timeline {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.prop-list li {
  display: grid;
  grid-template-columns: 140px 1fr 50px 80px 70px;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--lux-divider);
}
.prop-list li:last-child,
.alloc-list li:last-child,
.ident-list li:last-child {
  border-bottom: 0;
}
.p-prod {
  font-weight: 500;
  font-size: 13.5px;
}
.p-bar {
  height: 4px;
  background: var(--lux-bg-3);
  position: relative;
  overflow: hidden;
}
.p-bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--lux-ink);
  display: block;
}

.alloc-list li {
  display: grid;
  grid-template-columns: 160px 1fr 70px;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--lux-divider);
}
.alloc-list li:last-child {
  border-bottom: 0;
}
.a-ch {
  font-weight: 500;
  font-size: 13.5px;
}
.a-bar {
  height: 4px;
  background: var(--lux-bg-3);
  position: relative;
  overflow: hidden;
}
.a-bar i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  display: block;
}

/* Lead row clickable */
.tbl tbody tr.clickable {
  cursor: pointer;
}
.tbl tbody tr.clickable:hover {
  background: var(--lux-bg-hover);
}

/* ---------- User drill-down ---------- */
.ident-list li {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--lux-divider);
  font-size: 13px;
}
.ident-k {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lux-ink-4);
}

.timeline li {
  display: grid;
  grid-template-columns: 130px 90px 1fr 110px;
  align-items: center;
  gap: 14px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--lux-divider);
  font-size: 12.5px;
}
.timeline li:last-child {
  border-bottom: 0;
}
.timeline .t-time {
  font-family: var(--lux-mono);
  font-size: 11.5px;
  color: var(--lux-ink-4);
}
.timeline .t-kind {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lux-ink);
}
.timeline .t-src {
  font-family: var(--lux-mono);
  font-size: 11.5px;
  color: var(--lux-ink-3);
  text-align: right;
}

/* ---------- Conflict queue ---------- */
.conflict-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.conflict-list li {
  display: grid;
  grid-template-columns: 1fr 1fr 90px 140px;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--lux-divider);
  font-size: 12.5px;
}
.conflict-list li:last-child {
  border-bottom: 0;
}
.conflict-list .c-pair {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.conflict-list .c-pair .mono {
  font-size: 11.5px;
  color: var(--lux-ink-2);
}
.conflict-list .c-pair .muted {
  font-size: 10.5px;
}
.conflict-list .c-conf {
  font-family: var(--lux-mono);
  font-size: 12px;
  color: var(--lux-warn);
}
.conflict-list .c-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.conflict-list .c-actions button {
  background: transparent;
  border: 1px solid var(--lux-line);
  padding: 5px 10px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lux-ink-2);
  cursor: pointer;
  font-family: inherit;
}
.conflict-list .c-actions button:hover {
  border-color: var(--lux-ink);
  color: var(--lux-ink);
}
.conflict-list .c-actions .keep {
  border-color: var(--lux-ink);
  color: var(--lux-ink);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 780px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .side {
    position: fixed;
    left: -260px;
    width: 248px;
    transition: left 0.25s;
    z-index: 30;
  }
  .side.open {
    left: 0;
    box-shadow: var(--lux-shadow-panel);
  }
  .menu-btn {
    display: flex;
  }
  .main {
    padding: 0 20px 40px;
  }
  .search {
    display: none;
  }
  .kpis {
    grid-template-columns: 1fr 1fr;
  }
  .page-head h1 {
    font-size: 30px;
  }
}
@media (min-width: 781px) {
  .side-scrim {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
