/* ==========================================================================
   Flux — Mid-fi wireframe shared styles
   Grayscale-first. Orange (#ff9901) used only as an active-state indicator.
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-muted: #fafafa;
  --bg-soft: #f5f5f5;
  --border: #e5e5e5;
  --border-strong: #d4d4d4;
  --text: #2a2a2a;
  --text-muted: #6b6b6b;
  --text-faint: #9a9a9a;
  --accent: #ff9901;
  --accent-soft: #fff3df;
  --danger: #c84a3a;
  --warning: #c98423;
  --success: #4a8a5e;

  --sidebar-w: 220px;
  --sidebar-w-collapsed: 52px;
  --topbar-h: 56px;

  --r-sm: 4px;
  --r: 6px;
  --r-lg: 10px;

  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg-soft);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

/* --- App shell ------------------------------------------------------------ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
  transition: grid-template-columns .18s ease;
}
.app.collapsed { grid-template-columns: var(--sidebar-w-collapsed) 1fr; }

/* --- Sidebar -------------------------------------------------------------- */
.sidebar {
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px 16px;
  border-bottom: 1px solid var(--border);
  height: var(--topbar-h);
  flex-shrink: 0;
}
.sidebar__logo {
  width: 22px; height: 22px;
  background: var(--accent);
  color: #fff;
  border-radius: 5px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 12px;
  flex-shrink: 0;
}
.sidebar__name {
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 15px;
}
.sidebar__nav { padding: 10px 8px; flex: 1; overflow-y: auto; }
.sidebar__section {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  padding: 12px 10px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r);
  color: var(--text);
  text-decoration: none;
  font-size: 15.5px;
  white-space: nowrap;
  margin-bottom: 1px;
  position: relative;
}
.nav-item:hover { background: var(--bg-soft); }
.nav-item.active {
  background: var(--accent-soft);
  color: var(--text);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -8px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}
.nav-item__icon {
  width: 20px; height: 20px;
  opacity: .65;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-item.active .nav-item__icon { opacity: 1; }

.sidebar__footer {
  border-top: 1px solid var(--border);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.sidebar__avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}
.sidebar__user-name { font-size: 13px; font-weight: 500; }
.sidebar__user-role { font-size: 11px; color: var(--text-faint); }

.sidebar__collapse-btn {
  position: absolute;
  bottom: 64px;
  right: 0px;
  width: 25px; height: 25px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  display: grid; place-items: center;
  cursor: pointer;
  font-size: 10px;
  color: var(--text-muted);
  z-index: 10;
}
.sidebar__collapse-btn:hover { color: var(--text); border-color: var(--text-muted); }

/* Collapsed state */
.collapsed .sidebar__name,
.collapsed .sidebar__nav-label,
.collapsed .sidebar__user-name,
.collapsed .sidebar__user-role,
.collapsed .sidebar__section { display: none; }
.collapsed .nav-item { justify-content: center; padding: 8px; }
.collapsed .sidebar__footer { justify-content: center; }
.collapsed .sidebar__brand { justify-content: center; padding: 18px 8px 16px; }

/* --- Main content area --------------------------------------------------- */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-soft);
}
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar__title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.topbar__crumbs {
  font-size: 12px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 6px;
}
.topbar__crumbs a { color: inherit; text-decoration: none; }
.topbar__crumbs a:hover { color: var(--text); }

.topbar__search {
  flex: 1;
  max-width: 360px;
  margin: 0 32px;
  position: relative;
}
.topbar__search input {
  width: 100%;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0 12px 0 30px;
  font-family: inherit;
  font-size: 13px;
  background: var(--bg-soft);
}
.topbar__search input:focus {
  outline: none;
  background: #fff;
  border-color: var(--border-strong);
}
.topbar__search::before {
  content: "";
  position: absolute;
  left: 10px; top: 50%;
  width: 12px; height: 12px;
  border: 1.5px solid var(--text-faint);
  border-radius: 50%;
  transform: translateY(-60%);
}
.topbar__search::after {
  content: "";
  position: absolute;
  left: 19px; top: 18px;
  width: 6px; height: 1.5px;
  background: var(--text-faint);
  transform: rotate(45deg);
}

.topbar__actions { display: flex; align-items: center; gap: 8px; }

.page {
  padding: 28px 32px 60px;
  max-width: 1400px;
  width: 100%;
}
.page__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  gap: 16px;
}
.page__title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.page__subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}
.page__actions { display: flex; gap: 8px; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { border-color: var(--text-muted); }
.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn--primary:hover { background: #ef8c00; border-color: #ef8c00; }
.btn--dark {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}
.btn--dark:hover { background: #000; }
.btn--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text-muted);
}
.btn--ghost:hover { background: var(--bg-soft); color: var(--text); }
.btn--sm { height: 26px; padding: 0 8px; font-size: 12px; }
.btn--icon { width: 32px; padding: 0; justify-content: center; }

/* --- Cards / surfaces ----------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
a.card:hover,
.card.hover-lift:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px -8px rgba(0,0,0,0.08), 0 1px 0 rgba(0,0,0,0.02);
  border-color: var(--border-strong);
}
.card__header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card__title { font-weight: 600; font-size: 14px; }
.card__body { padding: 16px; }
.card__footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* --- Metric card ---------------------------------------------------------- */
.metric {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.metric:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  box-shadow: 0 6px 20px -8px rgba(0,0,0,0.08);
}
.metric--accent::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #fff 0%, #fffaf0 100%);
  z-index: 0;
}
.metric--accent > * { position: relative; z-index: 1; }
.metric--accent { border-color: #f1d9b0; }
.metric__spark {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 72px;
  height: 28px;
  opacity: .85;
  pointer-events: none;
}
.metric__label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0;
}
.metric__value {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.metric__delta {
  font-size: 11px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.metric__delta--up { color: var(--success); }
.metric__delta--down { color: var(--danger); }
.metric__sparkline {
  height: 28px;
  margin-top: 2px;
}

/* --- Tables --------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl th {
  text-align: left;
  font-weight: 500;
  color: var(--text-muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-muted);
  white-space: nowrap;
}
.tbl td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr { transition: background .12s ease; }
.tbl tbody tr:hover td { background: var(--bg-muted); }
.tbl tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.tbl td.num,
.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* --- Badges --------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  height: 20px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-muted);
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  line-height: 1;
}
.badge::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-faint);
}
.badge--active::before { background: var(--success); }
.badge--active { color: var(--success); border-color: #d6e3d8; background: #f3f8f4; }
.badge--passive::before { background: var(--text-faint); }
.badge--trial::before { background: var(--accent); }
.badge--trial { color: #c47914; border-color: #f1d9b0; background: #fff5e3; }
.badge--none::before { background: #ddd; }
.badge--danger::before { background: var(--danger); }
.badge--danger { color: var(--danger); border-color: #ebcdc8; background: #fbf2f0; }
.badge--warning::before { background: var(--warning); }
.badge--warning { color: var(--warning); border-color: #eed9b8; background: #fbf3e2; }
.badge--neutral { border-color: var(--border); }

.tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11.5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  background: #fff;
  margin-right: 4px;
}

/* --- Avatars -------------------------------------------------------------- */
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}
.avatar--lg { width: 56px; height: 56px; font-size: 18px; }
.cell-with-avatar { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-with-avatar .stack { display: flex; flex-direction: column; min-width: 0; }
.cell-with-avatar .stack b { font-weight: 500; font-size: 13px; }
.cell-with-avatar .stack span { font-size: 11.5px; color: var(--text-faint); }

/* --- Forms ---------------------------------------------------------------- */
.field { margin-bottom: 16px; }
.field__label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.field__input,
.field__textarea,
.field__select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  background: #fff;
}
.field__input:focus,
.field__textarea:focus,
.field__select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,153,1,0.12);
}
.field__textarea { min-height: 100px; resize: vertical; }
.field__hint { font-size: 11.5px; color: var(--text-faint); margin-top: 4px; }

/* --- Money / numbers ----------------------------------------------------- */
.money { font-variant-numeric: tabular-nums; }
.money--credit { color: var(--success); }
.money--debt { color: var(--danger); }
.money--zero { color: var(--text-faint); }

/* --- Activity feed ------------------------------------------------------- */
.feed { display: flex; flex-direction: column; }
.feed__item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.feed__item:last-child { border-bottom: 0; }
.feed__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
  margin-top: 8px;
  flex-shrink: 0;
}
.feed__dot--add { background: var(--success); }
.feed__dot--license { background: var(--accent); }
.feed__dot--payment { background: var(--text); }
.feed__body { flex: 1; min-width: 0; }
.feed__text { font-size: 13px; }
.feed__text b { font-weight: 600; }
.feed__meta { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }

/* --- Tabs ---------------------------------------------------------------- */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 4px;
  margin-bottom: 0;
}
.tab {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  border-top: 0; border-left: 0; border-right: 0;
  font-family: inherit;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 500; }
.tab__count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 11px;
  background: var(--bg-soft);
  border-radius: 100px;
  color: var(--text-muted);
}

/* --- Filter chips -------------------------------------------------------- */
.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.chip {
  height: 28px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12.5px;
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chip:hover { border-color: var(--text-muted); }
.chip.active {
  border-color: var(--text);
  color: var(--text);
  background: var(--bg-soft);
  font-weight: 500;
}
.chip__count {
  font-size: 11px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.chip.active .chip__count { color: var(--text-muted); }

/* --- Pagination ---------------------------------------------------------- */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pagination button {
  height: 28px; min-width: 28px;
  padding: 0 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
}
.pagination button.active { background: var(--text); color: #fff; border-color: var(--text); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* --- Wireframe placeholder ----------------------------------------------- */
.ph {
  background:
    repeating-linear-gradient(135deg,
      var(--bg-muted) 0 8px,
      var(--bg-soft) 8px 16px);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r);
  display: grid;
  place-items: center;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 11px;
}

/* --- Annotation (small dev/wireframe note) -------------------------------- */
.note {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
}
.wf-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 7px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-faint);
  background: #fff;
}

/* --- Grid utilities ------------------------------------------------------- */
.grid { display: grid; gap: 16px; }
.grid--metrics { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: 1fr 1fr; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--projects { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid--dash { grid-template-columns: 2fr 1fr; }
.stack-v { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; }
.spacer { flex: 1; }

/* --- Auth pages ----------------------------------------------------------- */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg-soft);
  padding: 40px 20px;
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
}
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}
.auth-brand__logo {
  width: 26px; height: 26px;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 13px;
}
.auth-brand__name {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.auth-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
  text-align: center;
}
.auth-sub {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 24px;
}

/* --- Tweaks panel --------------------------------------------------------- */
#tweaks-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 240px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  font-family: var(--sans);
  font-size: 13px;
  z-index: 100;
  display: none;
  overflow: hidden;
}
#tweaks-panel.open { display: block; }
.tweaks__hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.tweaks__title { font-weight: 600; font-size: 13px; }
.tweaks__close {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  padding: 0;
  line-height: 1;
}
.tweaks__body { padding: 12px 14px; }
.tweak-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}
.tweak-row__label { color: var(--text-muted); font-size: 12.5px; }
.toggle {
  width: 32px; height: 18px;
  border-radius: 100px;
  background: var(--border);
  position: relative;
  cursor: pointer;
  transition: background .15s;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: left .15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.toggle.on { background: var(--text); }
.toggle.on::after { left: 16px; }

/* --- Live / pulse dots --------------------------------------------------- */
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.live-dot::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(74,138,94,0.6);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74,138,94,0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(74,138,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,138,94,0); }
}

/* Danger badge urgency: subtle pulse on the dot */
.badge--danger::before {
  animation: pulse-danger 2.2s ease-out infinite;
}
@keyframes pulse-danger {
  0%   { box-shadow: 0 0 0 0 rgba(200,74,58,0.5); }
  70%  { box-shadow: 0 0 0 5px rgba(200,74,58,0); }
  100% { box-shadow: 0 0 0 0 rgba(200,74,58,0); }
}

/* --- Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .live-dot::before, .badge--danger::before, .spark-path, .spark-fill,
  .bar-rise, .aging-seg { animation: none; }
}

/* Sparkline drawing */
.spark-path {
  stroke: var(--accent);
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: draw 1.4s ease-out .2s both;
}
.spark-path--muted { stroke: var(--text-muted); opacity: .55; }
.spark-fill {
  fill: var(--accent);
  opacity: .12;
  animation: fade-in .8s ease-out 1.0s both;
}
@keyframes draw {
  from { stroke-dasharray: 200; stroke-dashoffset: 200; }
  to   { stroke-dasharray: 200; stroke-dashoffset: 0; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: .12; }
}

/* Chart bar entrance */
.bar-rise {
  transform-origin: bottom;
  animation: barUp .7s cubic-bezier(.2,.8,.2,1) both;
}
.bar-rise:nth-child(1) { animation-delay: .10s; }
.bar-rise:nth-child(2) { animation-delay: .18s; }
.bar-rise:nth-child(3) { animation-delay: .26s; }
.bar-rise:nth-child(4) { animation-delay: .34s; }
.bar-rise:nth-child(5) { animation-delay: .42s; }
.bar-rise:nth-child(6) { animation-delay: .50s; }
@keyframes barUp {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

/* Section accent rule */
.accent-rule {
  display: inline-block;
  width: 22px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 8px;
}

/* Animated aging bar fill */
.aging-seg {
  transform-origin: left;
  animation: grow-x .9s cubic-bezier(.2,.8,.2,1) .15s both;
}
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Status colour ramp */
.badge--info { color: #2a6da6; border-color: #c9deef; background: #eef5fb; }
.badge--info::before { background: #2a6da6; }

/* Misc */
hr.divider { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 16px; font-size: 13px; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; }

.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-faint);
  font-size: 13px;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text);
}
