/* ==========================================================================
   CIVC Investor Pipeline Dashboard — design system
   Palette extracted from ci.vc (dark-mode brand site), adapted to a white
   working surface: header band keeps the brand's original dark identity;
   body surfaces flip to warm off-white so the tool is easy to read all day.
   ========================================================================== */

:root {
  /* --- brand ramps, pulled from ci.vc's stylesheet --- */
  --civc-blue:        #0e97df;
  --civc-blue-dark:   #078fce;
  --civc-blue-bright: #35b5f4;
  --civc-gold:        #c99719;
  --civc-navy-950:    #020609;
  --civc-navy-900:    #04090d;
  --civc-navy-800:    #07121d;
  --civc-navy-700:    #101c26;

  /* --- status palette (reserved — never reused as a categorical hue) --- */
  --status-good:      #1e8e5a;
  --status-good-bg:   #e7f4ee;
  --status-warning:   #c97a19;
  --status-warning-bg:#fbf0e2;
  --status-critical:  #c1432b;
  --status-critical-bg:#fbeae7;

  /* --- surfaces (white working theme) --- */
  --bg:            #f5f2ee;
  --surface:       #ffffff;
  --surface-sunken:#faf8f5;
  --border:        #e6e1d8;
  --border-soft:   #efebe4;

  /* --- ink --- */
  --ink:           #16140f;
  --ink-soft:      #4b4945;
  --ink-muted:     #8b8884;
  --ink-on-dark:   #f5f2ee;
  --ink-on-dark-soft: rgba(245,242,238,0.72);

  /* --- geometry --- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 2px rgba(20,17,10,0.04), 0 8px 24px -12px rgba(20,17,10,0.10);
  --shadow-pop:  0 12px 32px -8px rgba(20,17,10,0.22);

  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; margin: 0 0 4px; color: var(--ink); }
h1 { font-size: 28px; }
h2 { font-size: 21px; }
h3 { font-size: 16px; }
p { margin: 0 0 8px; }
a { color: var(--civc-blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--ink-muted); }
.soft { color: var(--ink-soft); }

/* ---------------------------------------------------------------------- */
/* Layout                                                                  */
/* ---------------------------------------------------------------------- */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.app-header {
  background: linear-gradient(180deg, var(--civc-navy-900) 0%, var(--civc-navy-950) 100%);
  color: var(--ink-on-dark);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 2px 18px rgba(2,6,9,0.25);
}
.app-header .brand { display: flex; align-items: center; gap: 10px; }
.app-header .brand img { height: 30px; display: block; }
.app-header nav { display: flex; align-items: center; gap: 22px; }
.app-header nav a {
  color: var(--ink-on-dark-soft);
  font-size: 14px;
  letter-spacing: .01em;
}
.app-header nav a.active, .app-header nav a:hover { color: #fff; text-decoration: none; }
.app-header .user-menu { display: flex; align-items: center; gap: 14px; }
.app-header .user-chip {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-on-dark-soft);
}
.app-header .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--civc-gold); color: #1a1204;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.app-header .btn-logout {
  color: var(--ink-on-dark-soft); font-size: 13px;
  border: 1px solid rgba(245,242,238,0.25);
  padding: 6px 12px; border-radius: 999px;
}
.app-header .btn-logout:hover { color: #fff; border-color: rgba(245,242,238,0.5); text-decoration: none; }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0;
  background: none; border: 1px solid rgba(245,242,238,0.25); border-radius: 8px;
  color: var(--ink-on-dark); cursor: pointer; padding: 0;
}
.nav-toggle svg { width: 18px; height: 18px; }
.nav-toggle:hover { border-color: rgba(245,242,238,0.5); }

.app-main { flex: 1; padding: 28px 24px 60px; max-width: 1240px; margin: 0 auto; width: 100%; }

/* ---------------------------------------------------------------------- */
/* Mobile responsiveness                                                  */
/* ---------------------------------------------------------------------- */
@media (max-width: 680px) {
  .app-header {
    flex-wrap: wrap; height: auto; min-height: 60px;
    padding: 10px 16px; row-gap: 2px;
  }
  .app-main { padding: 20px 16px 48px; }
  .brand { order: 1; }
  .nav-toggle { display: flex; order: 2; margin-left: auto; }
  .app-header nav,
  .app-header .user-menu {
    display: none; flex: 0 0 100%; flex-direction: column; align-items: flex-start; gap: 4px;
  }
  .app-header nav { order: 3; padding-top: 10px; margin-top: 8px; border-top: 1px solid rgba(245,242,238,0.14); }
  .app-header nav a { padding: 7px 0; width: 100%; }
  .app-header .user-menu { order: 4; padding-top: 10px; margin-top: 2px; border-top: 1px solid rgba(245,242,238,0.14); padding-bottom: 4px; gap: 10px; }
  .app-header .user-chip { padding: 4px 0; }
  .app-header .btn-logout { padding: 7px 0; border: none; }
  .app-header.nav-open nav,
  .app-header.nav-open .user-menu { display: flex; }
}

/* Grid items shrink-to-fit their content by default (min-width: auto),
   which lets a wide table or long value force the whole grid track —
   and the page itself — wider than the viewport instead of scrolling
   inside its own card. Letting these tracks shrink is what makes
   .table-wrap's overflow-x:auto actually take effect on narrow screens. */
.two-col > *, .stat-grid > *, .rep-grid > * { min-width: 0; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: var(--civc-blue-dark); font-weight: 700; margin-bottom: 6px; }

/* ---------------------------------------------------------------------- */
/* Cards / stat tiles                                                      */
/* ---------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 20px;
}
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head h2 { margin: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stat-grid { grid-template-columns: 1fr; } }
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.stat-tile::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--civc-blue-bright), var(--civc-blue-dark));
}
.stat-tile .label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.stat-tile .label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-muted); font-weight: 600; }
.stat-tile .icon-chip {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  background: var(--surface-sunken); border: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center; color: var(--civc-blue-dark);
}
.stat-tile .icon-chip svg { width: 15px; height: 15px; }
.stat-tile .value { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--ink); }
.stat-tile .sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; }
.stat-tile .delta { font-size: 12.5px; font-weight: 600; }
.stat-tile .delta.good { color: var(--status-good); }
.stat-tile .delta.warn { color: var(--status-warning); }
.stat-tile .delta.bad { color: var(--status-critical); }

/* ---------------------------------------------------------------------- */
/* Progress bars                                                          */
/* ---------------------------------------------------------------------- */
.progress-track {
  background: var(--surface-sunken);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--civc-blue-dark), var(--civc-blue));
  transition: width .4s ease;
}
.progress-fill.status-good { background: linear-gradient(90deg, #146b44, var(--status-good)); }
.progress-fill.status-warning { background: linear-gradient(90deg, #9c5f10, var(--status-warning)); }
.progress-fill.status-critical { background: linear-gradient(90deg, #8f2f1c, var(--status-critical)); }
.progress-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 6px; }

/* ---------------------------------------------------------------------- */
/* Charts (hand-rolled, no JS chart library)                              */
/* ---------------------------------------------------------------------- */

/* Radial gauge — replaces the old thin progress bar for a single magnitude. */
.gauge-wrap { display: flex; flex-direction: column; align-items: center; }
.gauge { position: relative; width: 100%; max-width: 300px; margin: 0 auto; }
.gauge-svg { width: 100%; height: auto; display: block; }
.gauge-track { fill: none; stroke: var(--surface-sunken); stroke-width: 18; stroke-linecap: round; }
.gauge-fill { fill: none; stroke-width: 18; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.gauge-center { position: absolute; left: 50%; top: 66%; transform: translate(-50%, -50%); text-align: center; width: 100%; }
.gauge-pct { font-family: var(--font-display); font-size: 38px; font-weight: 700; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.gauge-label { font-size: 12.5px; color: var(--ink-muted); margin-top: 4px; }
.gauge-foot { display: flex; justify-content: space-between; width: 100%; max-width: 300px; margin: 8px auto 0; font-size: 12.5px; color: var(--ink-soft); }
.gauge-foot strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* True tapering funnel (SVG trapezoids) + value/drop-off legend. */
.funnel2 { display: flex; align-items: center; gap: 20px; }
.funnel2-svg { width: 46%; max-width: 190px; flex-shrink: 0; }
.funnel2-legend { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.funnel2-legend-row { display: flex; align-items: flex-start; gap: 10px; }
.funnel-swatch { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; margin-top: 5px; }
.funnel-name { font-size: 12.5px; color: var(--ink-soft); }
.funnel-value { font-size: 17px; font-weight: 700; font-family: var(--font-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.funnel-drop { font-size: 11px; color: var(--ink-muted); }
@media (max-width: 480px) { .funnel2 { flex-direction: column; } .funnel2-svg { width: 70%; } }

/* Ranked horizontal bar chart, rounded-pill track + share-of-total line. */
.barchart2 { display: flex; flex-direction: column; gap: 13px; }
.barchart2-row .bhead { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; margin-bottom: 5px; }
.barchart2-row .bhead .bname { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barchart2-row .bhead .bval { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.barchart2-row .btrack2 { background: var(--surface-sunken); border-radius: 999px; height: 11px; border: 1px solid var(--border-soft); overflow: hidden; }
.barchart2-row .bfill2 { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #a97a12, var(--civc-gold)); min-width: 3px; }
.barchart2-row .bshare { font-size: 11px; color: var(--ink-muted); margin-top: 3px; }

/* Rep leaderboard — visual card grid with a radial ring per rep, replacing
   the plain data-table leaderboard. */
.rep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.rep-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px 14px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: var(--shadow-card); }
.rep-card.rank-1 { border-color: var(--civc-gold); box-shadow: 0 0 0 1px var(--civc-gold), 0 10px 24px -12px rgba(201,151,25,.4); }
.rep-card.inactive { opacity: .55; }
.rep-rank { position: absolute; top: 10px; left: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-sunken); color: var(--ink-muted); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); }
.rep-card.rank-1 .rep-rank { background: var(--civc-gold); color: #1a1204; border-color: var(--civc-gold); }
.rep-ring { width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; margin-bottom: 10px; }
.rep-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.rep-ring-label { position: relative; z-index: 1; font-family: var(--font-display); font-weight: 700; font-size: 19px; font-variant-numeric: tabular-nums; }
.rep-name { font-weight: 700; font-size: 14.5px; margin-bottom: 2px; }
.rep-sub { font-size: 11.5px; color: var(--ink-muted); margin-bottom: 12px; }
.rep-amounts { display: flex; justify-content: space-between; width: 100%; border-top: 1px solid var(--border-soft); padding-top: 9px; gap: 6px; }
.rep-amounts div { text-align: center; flex: 1; min-width: 0; }
.rep-amounts .n { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; display: block; font-size: 12.5px; }
.rep-amounts .l { color: var(--ink-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.rep-view-link { margin-top: 12px; font-size: 12px; }

.chart-tooltip-hint { font-size: 11.5px; color: var(--ink-muted); margin-top: 10px; }

/* ---------------------------------------------------------------------- */
/* Tables                                                                  */
/* ---------------------------------------------------------------------- */
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data-table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-muted); font-weight: 700; padding: 10px 10px; border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
table.data-table td { padding: 8px 10px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr.total-row td { border-top: 2px solid var(--border); font-weight: 700; background: var(--surface-sunken); }
table.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data-table input[type="number"], table.data-table input[type="text"] {
  width: 84px; text-align: right; padding: 6px 8px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13.5px; font-variant-numeric: tabular-nums;
  background: var(--surface);
}
table.data-table input[data-field="pipeline_value"] { width: 108px; }
table.data-table input:focus { outline: none; border-color: var(--civc-blue); box-shadow: 0 0 0 3px rgba(14,151,223,0.15); }
table.data-table .channel-name { font-weight: 600; color: var(--ink); }
.save-state { font-size: 12px; color: var(--ink-muted); margin-left: 10px; }
.save-state.saving { color: var(--civc-blue-dark); }
.save-state.saved { color: var(--status-good); }
.save-state.error { color: var(--status-critical); }

/* ---------------------------------------------------------------------- */
/* Buttons / forms                                                        */
/* ---------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; font-family: var(--font-body);
}
.btn-primary { background: var(--civc-navy-900); color: #fff; }
.btn-primary:hover { background: var(--civc-navy-950); text-decoration: none; }
.btn-gold { background: var(--civc-gold); color: #1a1204; }
.btn-gold:hover { background: #b6870f; text-decoration: none; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-muted); text-decoration: none; }
.btn-danger-ghost { background: transparent; border-color: var(--status-critical); color: var(--status-critical); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.form-field input, .form-field select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14.5px; font-family: var(--font-body); background: var(--surface); color: var(--ink);
}
.form-field input:focus, .form-field select:focus { outline: none; border-color: var(--civc-blue); box-shadow: 0 0 0 3px rgba(14,151,223,0.15); }
.form-hint { font-size: 12px; color: var(--ink-muted); margin-top: 5px; }

/* ---------------------------------------------------------------------- */
/* Badges / alerts                                                        */
/* ---------------------------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.badge-good { background: var(--status-good-bg); color: var(--status-good); }
.badge-warning { background: var(--status-warning-bg); color: var(--status-warning); }
.badge-critical { background: var(--status-critical-bg); color: var(--status-critical); }
.badge-muted { background: var(--surface-sunken); color: var(--ink-muted); border: 1px solid var(--border); }

.alert { border-radius: var(--radius-md); padding: 13px 16px; font-size: 13.5px; margin-bottom: 18px; border: 1px solid transparent; }
.alert-success { background: var(--status-good-bg); color: #14562f; border-color: #bfe3cf; }
.alert-error { background: var(--status-critical-bg); color: #7a2115; border-color: #f0c4bb; }
.alert-info { background: #e7f2fa; color: #0b4a6b; border-color: #c8e4f3; }

/* ---------------------------------------------------------------------- */
/* Login page                                                             */
/* ---------------------------------------------------------------------- */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(14,151,223,0.10), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(201,151,25,0.10), transparent 55%),
    var(--bg);
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
.login-card .login-brand-band {
  background: linear-gradient(180deg, var(--civc-navy-900), var(--civc-navy-950));
  padding: 30px 32px 22px;
  text-align: center;
}
.login-card .login-brand-band img { height: 40px; margin-bottom: 2px; }
.login-card .login-body { padding: 28px 32px 32px; }
.login-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 22px;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.login-tab {
  flex: 1;
  text-align: center;
  padding: 9px 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  border-radius: 7px;
  transition: background 0.15s ease, color 0.15s ease;
}
.login-tab:hover { color: var(--ink-soft); }
.login-tab.active {
  background: var(--civc-navy-900);
  color: var(--ink-on-dark);
}
.login-card h1 { font-size: 19px; margin-bottom: 4px; }
.login-card .login-sub { color: var(--ink-muted); font-size: 13px; margin-bottom: 22px; }
.login-card .btn { width: 100%; padding: 12px; font-size: 14.5px; }
.login-foot { text-align: center; margin-top: 18px; font-size: 12px; color: var(--ink-muted); }

.password-reveal-card { border: 1px dashed var(--civc-gold); background: #fdf8ee; border-radius: var(--radius-md); padding: 16px 18px; }
.password-reveal-card .cred-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; padding: 6px 0; font-size: 14px; }
.password-reveal-card code { background: #fff; border: 1px solid var(--border); padding: 4px 9px; border-radius: 6px; font-size: 13.5px; letter-spacing: .02em; }

.footnote { font-size: 12px; color: var(--ink-muted); margin-top: 16px; line-height: 1.6; }
.two-col { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; align-items: start; }
/* Some pages (the admin dashboard hero) want an even 1fr/1fr split instead
   of the default 1.5fr/1fr — done as a modifier class rather than an
   inline style, so the mobile collapse below still applies. An inline
   style="grid-template-columns:..." would out-specificity the media query
   and stay locked at two columns on a phone. */
.two-col.two-col-hero { grid-template-columns: 1fr 1fr; }
@media (max-width: 980px) { .two-col, .two-col.two-col-hero { grid-template-columns: 1fr; } }

.table-wrap { overflow-x: auto; }

/* On narrow screens, freeze the first column (channel/name) while the
   rest of a wide data table scrolls horizontally underneath it, so you
   never lose track of which row you're looking at. */
@media (max-width: 700px) {
  .table-wrap table.data-table th:first-child,
  .table-wrap table.data-table td:first-child {
    position: sticky; left: 0; z-index: 2; background: var(--surface);
    box-shadow: 1px 0 0 var(--border-soft);
  }
  .table-wrap table.data-table tr.total-row td:first-child { background: var(--surface-sunken); }
}

/* Responsive card layout for management-style tables (e.g. the team &
   users list) where a row of action buttons makes a plain scrolling
   table unusable on a phone. Opt in with class="data-table responsive-table"
   and a data-label="Column name" on every <td>; add class="stack" to a
   <td> whose content (several buttons, a mini form) needs its own full
   line rather than sitting inline with the label. */
@media (max-width: 640px) {
  table.responsive-table thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  table.responsive-table, table.responsive-table tbody,
  table.responsive-table tr, table.responsive-table td { display: block; width: 100%; }
  table.responsive-table tr {
    border: 1px solid var(--border); border-radius: var(--radius-md);
    margin-bottom: 12px; padding: 2px 14px; box-shadow: var(--shadow-card);
  }
  table.responsive-table td {
    border-bottom: 1px solid var(--border-soft); padding: 10px 0;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: right;
  }
  table.responsive-table td:last-child { border-bottom: none; }
  table.responsive-table td::before {
    content: attr(data-label); font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
    color: var(--ink-muted); font-weight: 600; text-align: left; flex-shrink: 0;
  }
  table.responsive-table td.stack { display: block; }
  table.responsive-table td.stack::before { display: block; margin-bottom: 8px; }
  table.responsive-table td.stack > * { justify-content: flex-start !important; }
}
