/* Fraua App Shell — Dashboard & CRM */
@import url("./tokens.css");

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--pampas);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { border-bottom: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- A11Y ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -40px; left: 8px; z-index: 200;
  background: var(--charcoal); color: var(--pampas);
  padding: 8px 12px; border-radius: 6px;
  font-size: 13px; text-decoration: none;
}
.skip-link:focus { top: 8px; }

:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 2px;
  border-radius: 4px;
}
.nav-link:focus-visible,
.btn:focus-visible,
.tab-btn:focus-visible,
.range-pill button:focus-visible,
.filter-chip:focus-visible {
  outline-offset: 2px;
}

a[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
button[disabled], button[aria-busy="true"] { opacity: 0.7; cursor: progress; }

/* ---------- ENTRANCE / DOPAMINE ---------- */
@keyframes fraua-enter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.enter {
  animation: fraua-enter 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--enter-delay, 0ms);
}
@media (prefers-reduced-motion: reduce) {
  .enter { animation: none; }
}

/* KPI hover depth */
.kpi { transition: transform 180ms ease, box-shadow 220ms ease, border-color 180ms ease; }
.kpi:not(.feature):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(27,27,25,0.07);
  border-color: var(--rule-strong);
}
.kpi.feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(27,27,25,0.18);
}
.card { transition: box-shadow 220ms ease; }
.card:hover { box-shadow: 0 4px 16px rgba(27,27,25,0.05); }

/* Live "atendiendo ahora" dot */
.live-pill {
  display: none;
  align-items: center; gap: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(217,119,87,0.14);
  color: var(--terracotta);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.live-pill.show { display: inline-flex; }
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--terracotta);
  position: relative;
  flex-shrink: 0;
}
.live-dot::after {
  content: "";
  position: absolute; inset: -4px;
  border-radius: 50%;
  background: var(--terracotta);
  opacity: 0.5;
  animation: fraua-pulse 1.4s ease-out infinite;
}
@keyframes fraua-pulse {
  0%   { transform: scale(0.6); opacity: 0.5; }
  70%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Streak badge inside the hero */
.streak-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: rgba(249,247,242,0.08);
  border: 1px solid rgba(249,247,242,0.18);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(249,247,242,0.85);
}
.streak-chip .flame { color: var(--terracotta); }

/* Sparkline reveal animation */
.spark path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: fraua-draw 1.2s ease-out 220ms forwards;
}
@keyframes fraua-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .spark path { animation: none; stroke-dashoffset: 0; }
}

/* Heatmap cells fade in */
.heatmap .cell {
  opacity: 0;
  animation: fraua-cell-in 380ms ease-out forwards;
  animation-delay: calc(var(--cell-i, 0) * 6ms);
}
@keyframes fraua-cell-in { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .heatmap .cell { opacity: 1; animation: none; }
}

/* Positive delta flourish */
.delta {
  position: relative;
  transition: color 200ms ease;
}

/* Big hero number receives a brief glow when it lands */
.hero-roi .big-number.landed { animation: fraua-glow 900ms ease-out; }
@keyframes fraua-glow {
  0%   { text-shadow: 0 0 0 rgba(217,119,87,0); }
  40%  { text-shadow: 0 0 24px rgba(217,119,87,0.55); }
  100% { text-shadow: 0 0 0 rgba(217,119,87,0); }
}

/* Confetti — anchored to viewport via fixed positioning */
.fraua-confetti {
  position: fixed;
  pointer-events: none;
  z-index: 150;
}
.fraua-confetti-piece {
  position: absolute;
  width: 7px; height: 11px;
  border-radius: 1px;
  animation: fraua-confetti-fall var(--dur, 1200ms) cubic-bezier(0.2, 0.6, 0.5, 1) forwards;
  opacity: 0.95;
}
@keyframes fraua-confetti-fall {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--x, 0), 60vh) rotate(var(--rot, 0)); opacity: 0; }
}

/* ---------- LOADING / SKELETON ---------- */
@keyframes fraua-shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
.skel {
  display: inline-block;
  background: linear-gradient(90deg, rgba(27,27,25,0.06) 0, rgba(27,27,25,0.12) 40%, rgba(27,27,25,0.06) 80%);
  background-size: 200px 100%;
  animation: fraua-shimmer 1.4s ease-in-out infinite;
  border-radius: 4px;
  color: transparent !important;
  min-height: 0.9em;
  min-width: 2.5em;
}
.kpi.feature .skel {
  background: linear-gradient(90deg, rgba(249,247,242,0.08) 0, rgba(249,247,242,0.18) 40%, rgba(249,247,242,0.08) 80%);
  background-size: 200px 100%;
}

/* Inline button spinner */
.spinner {
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: fraua-spin 0.8s linear infinite;
  vertical-align: -2px;
}
@keyframes fraua-spin { to { transform: rotate(360deg); } }

/* ---------- ERROR BANNER ---------- */
.error-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: rgba(217,119,87,0.10);
  border: 1px solid rgba(217,119,87,0.4);
  color: var(--charcoal);
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 13px;
}
.error-banner svg { width: 18px; height: 18px; stroke: var(--terracotta); stroke-width: 1.8; fill: none; flex-shrink: 0; }
.error-banner b { color: var(--terracotta); }
.error-banner button {
  margin-left: auto;
  padding: 6px 12px;
  border: 1px solid var(--terracotta);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--terracotta);
  background: transparent;
}
.error-banner button:hover { background: rgba(217,119,87,0.12); }

/* ---------- PRINT ---------- */
@media print {
  .sidebar, .mobile-bar, .topbar-actions, .sidebar-backdrop,
  .skip-link, .error-banner { display: none !important; }
  .app { grid-template-columns: 1fr; }
  .main { padding: 0; }
  body { background: #fff; }
  .card, .kpi { break-inside: avoid; box-shadow: none; }
  .kpi.feature { background: #fff !important; color: var(--charcoal) !important; border: 1px solid var(--rule) !important; }
  .kpi.feature * { color: var(--charcoal) !important; }
}

/* ---------- LAYOUT SHELL ---------- */
.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

/* Mobile menu toggle (hidden on desktop) */
.mobile-bar {
  display: none;
  position: sticky; top: 0; z-index: 50;
  background: var(--pampas);
  border-bottom: 1px solid var(--rule);
  padding: 12px 16px;
  align-items: center; justify-content: space-between;
}
/* Backdrop: hidden by default; only shown when .show on mobile */
.sidebar-backdrop { display: none; }
.mobile-bar .brand { padding: 0; border: none; }
.mobile-bar .menu-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--rule-strong);
  display: flex; align-items: center; justify-content: center;
  background: var(--pampas);
}
.mobile-bar .menu-btn svg { width: 18px; height: 18px; stroke: var(--charcoal); stroke-width: 2; fill: none; }

/* Sidebar */
.sidebar {
  border-right: 1px solid var(--rule);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--pampas);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 14px;
  border-bottom: 1px solid var(--rule);
}
.brand .mark {
  width: 28px; height: 28px;
  background: var(--charcoal);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
}
.brand .wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 24;
}
.brand .wordmark .dot { color: var(--terracotta); }

.nav-section {
  display: flex; flex-direction: column; gap: 2px;
}
.nav-section .nav-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--soft-gray);
  padding: 6px 10px;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 7px;
  color: var(--charcoal);
  font-size: 14px;
  text-decoration: none;
  transition: background 150ms ease;
}
.nav-link:hover { background: var(--sage-light); }
.nav-link.active {
  background: var(--charcoal);
  color: var(--pampas);
}
.nav-link.active svg { stroke: var(--pampas); }
.nav-link svg {
  width: 16px; height: 16px;
  stroke: var(--charcoal);
  stroke-width: 1.6;
  fill: none;
  flex-shrink: 0;
}

.sidebar-foot {
  margin-top: auto;
  padding: 14px 10px;
  border-top: 1px solid var(--rule);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-foot .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--sage);
  font-family: var(--font-mono);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  color: var(--charcoal);
}
.sidebar-foot .who { display: flex; flex-direction: column; line-height: 1.2; }
.sidebar-foot .who b { font-weight: 600; font-size: 13px; }
.sidebar-foot .who span { font-size: 11px; color: var(--soft-gray); font-family: var(--font-mono); letter-spacing: 0.04em; }

/* Main */
.main {
  padding: 28px 40px 48px;
  min-width: 0;
}

/* Topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.topbar .crumbs {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft-gray);
  margin-bottom: 6px;
}
.topbar h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 38px;
  letter-spacing: -0.035em;
  line-height: 1;
  font-variation-settings: "opsz" 48;
}
.topbar h1 .ser { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--terracotta); }

.topbar-actions { display: flex; gap: 10px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--rule-strong);
  background: var(--pampas);
  color: var(--charcoal);
  transition: all 150ms ease;
}
.btn:hover { background: var(--sage-light); }
.btn.primary {
  background: var(--charcoal);
  color: var(--pampas);
  border-color: var(--charcoal);
}
.btn.primary:hover { background: #2A2A26; }
.btn.brand {
  background: var(--terracotta);
  color: #fff;
  border-color: var(--terracotta);
}
.btn.brand:hover { background: #B85C3E; }
.btn svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.8; fill: none; }

.range-pill {
  display: inline-flex;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 3px;
  background: var(--pampas);
}
.range-pill button {
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--soft-gray);
}
.range-pill button.on {
  background: var(--charcoal);
  color: var(--pampas);
}

/* ---------- KPI GRID ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.kpi {
  background: var(--pampas);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  min-height: 168px;
}
.kpi.feature {
  background: var(--charcoal);
  color: var(--pampas);
  border-color: var(--charcoal);
}
.kpi-head {
  display: flex; align-items: center; justify-content: space-between;
}
.kpi-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--sage-light);
  display: flex; align-items: center; justify-content: center;
}
.kpi.feature .kpi-icon { background: rgba(249,247,242,0.12); }
.kpi-icon svg { width: 16px; height: 16px; stroke: var(--charcoal); stroke-width: 1.6; fill: none; }
.kpi.feature .kpi-icon svg { stroke: var(--pampas); }

.kpi-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--soft-gray);
}
.kpi.feature .kpi-label { color: rgba(249,247,242,0.6); }

.kpi-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 48;
  display: flex; align-items: baseline; gap: 6px;
}
.kpi-value .unit {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--soft-gray);
}
.kpi.feature .kpi-value .unit { color: rgba(249,247,242,0.55); }

.kpi-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  margin-top: auto;
}
.kpi.feature .kpi-foot { border-top-color: rgba(249,247,242,0.14); }
.delta {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--muted-green);
}
.delta.down { color: var(--terracotta); }
.delta svg { width: 11px; height: 11px; stroke: currentColor; stroke-width: 2; fill: none; }
.kpi-foot .vs { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; color: var(--soft-gray); }
.kpi.feature .kpi-foot .vs { color: rgba(249,247,242,0.5); }

.spark { width: 100%; height: 32px; }

/* ---------- BLOCKS / SECTIONS ---------- */
.row {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}
.row.r-2-1 { grid-template-columns: 2fr 1fr; }
.row.r-1-1 { grid-template-columns: 1fr 1fr; }

.card {
  background: var(--pampas);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 20px 22px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-head h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.card-head .sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft-gray);
}
.card-head .actions { display: flex; gap: 6px; }
.tab-btn {
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--soft-gray);
  border-radius: 6px;
}
.tab-btn.on { background: var(--sage-light); color: var(--charcoal); }

/* Chart */
.chart-wrap { position: relative; height: 220px; width: 100%; }
.chart-x {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft-gray);
  margin-top: 8px;
}

/* Activity feed */
.feed { display: flex; flex-direction: column; gap: 0; }
.feed-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  align-items: flex-start;
}
.feed-item:first-child { border-top: none; padding-top: 0; }
.feed-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--sage-light);
  display: flex; align-items: center; justify-content: center;
}
.feed-icon svg { width: 13px; height: 13px; stroke: var(--charcoal); stroke-width: 1.8; fill: none; }
.feed-icon.brand { background: rgba(217,119,87,0.14); }
.feed-icon.brand svg { stroke: var(--terracotta); }
.feed-icon.green { background: rgba(138,160,141,0.18); }
.feed-icon.green svg { stroke: var(--muted-green); }
.feed-body { font-size: 13px; line-height: 1.4; }
.feed-body b { font-weight: 600; }
.feed-body .quote {
  display: block;
  margin-top: 4px;
  color: var(--soft-gray);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
}
.feed-time {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--soft-gray);
  white-space: nowrap;
}

/* Donut & lists */
.donut-wrap {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  align-items: center;
}
.legend { display: flex; flex-direction: column; gap: 8px; }
.legend-row {
  display: grid; grid-template-columns: 12px 1fr auto auto;
  gap: 10px; align-items: center;
  font-size: 12.5px;
}
.legend-dot { width: 10px; height: 10px; border-radius: 3px; }
.legend-row .num { font-family: var(--font-mono); font-size: 11px; color: var(--soft-gray); }
.legend-row .pct { font-family: var(--font-mono); font-size: 11px; }

/* Hour heatmap */
.heatmap { display: grid; grid-template-columns: 36px repeat(24, 1fr); gap: 2px; }
.heatmap .hr-label, .heatmap .day-label {
  font-family: var(--font-mono); font-size: 9px; color: var(--soft-gray);
  letter-spacing: 0.06em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center;
}
.heatmap .cell {
  aspect-ratio: 1/1; border-radius: 3px;
  background: var(--sage-light);
}
.hm-axis {
  display: grid; grid-template-columns: 36px repeat(24, 1fr); gap: 2px;
  margin-top: 6px;
}

/* ---------- CRM TABLE ---------- */
.crm-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.search {
  flex: 1; min-width: 240px; max-width: 360px;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--pampas);
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
}
.search input {
  border: none; outline: none; background: none;
  font-family: var(--font-sans); font-size: 13px;
  flex: 1; color: var(--charcoal);
}
.search svg { width: 14px; height: 14px; stroke: var(--soft-gray); stroke-width: 1.8; fill: none; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--charcoal);
  background: var(--pampas);
}
.filter-chip.on { background: var(--charcoal); color: var(--pampas); border-color: var(--charcoal); }
.filter-chip svg { width: 11px; height: 11px; stroke: currentColor; stroke-width: 2; fill: none; }

.tablewrap {
  background: var(--pampas);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
}
table.crm {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.crm thead th {
  text-align: left;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft-gray);
  background: var(--sage-light);
  border-bottom: 1px solid var(--rule);
  font-weight: 500;
}
table.crm thead th .sortable { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
table.crm thead .th-sort {
  font: inherit; color: inherit; padding: 0;
  display: inline-flex; align-items: center; gap: 6px;
  letter-spacing: inherit; text-transform: inherit;
}
table.crm thead .th-sort:hover { color: var(--charcoal); }
table.crm thead .sort-ind {
  width: 8px; height: 8px;
  border: 4px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.25;
  transform: translateY(2px);
}
table.crm thead [aria-sort="ascending"] .sort-ind {
  border-top: 0; border-bottom: 4px solid currentColor;
  transform: translateY(-2px); opacity: 1;
}
table.crm thead [aria-sort="descending"] .sort-ind { opacity: 1; }
table.crm tbody tr.selected { background: rgba(217,119,87,0.06); }
table.crm tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}
table.crm tbody tr:last-child td { border-bottom: none; }
table.crm tbody tr { transition: background 120ms ease; cursor: pointer; }
table.crm tbody tr:hover { background: rgba(225,229,224,0.5); }

.client-cell { display: flex; align-items: center; gap: 10px; }
.client-avatar {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--charcoal);
  flex-shrink: 0;
  background: var(--sage);
}
.client-avatar.t { background: rgba(217,119,87,0.18); color: var(--terracotta); }
.client-avatar.g { background: rgba(138,160,141,0.22); color: #4F6753; }
.client-avatar.k { background: var(--charcoal); color: var(--pampas); }
.client-name b { font-weight: 600; display: block; line-height: 1.2; font-size: 13.5px; }
.client-name span { font-family: var(--font-mono); font-size: 10.5px; color: var(--soft-gray); letter-spacing: 0.04em; }

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tag.active { background: rgba(138,160,141,0.2); color: #4F6753; }
.tag.onboarding { background: rgba(217,119,87,0.18); color: var(--terracotta); }
.tag.paused { background: var(--sage-light); color: var(--soft-gray); }
.tag.churn { background: rgba(184,92,62,0.16); color: #B85C3E; }
.tag.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.metric-stack { display: flex; flex-direction: column; line-height: 1.25; }
.metric-stack b { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.metric-stack span { font-family: var(--font-mono); font-size: 10.5px; color: var(--soft-gray); letter-spacing: 0.04em; }

.health {
  display: flex; align-items: center; gap: 8px;
}
.health-bar {
  width: 56px; height: 6px;
  background: var(--sage-light);
  border-radius: 999px; overflow: hidden;
}
.health-bar .fill { height: 100%; background: var(--muted-green); border-radius: 999px; }
.health-bar.warn .fill { background: var(--terracotta); }
.health-bar.bad .fill { background: #B85C3E; }
.health b { font-family: var(--font-mono); font-size: 11px; }

.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.icon-btn {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent;
}
.icon-btn:hover { background: var(--sage-light); border-color: var(--rule); }
.icon-btn svg { width: 14px; height: 14px; stroke: var(--soft-gray); stroke-width: 1.8; fill: none; }

.table-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--sage-light);
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--soft-gray);
}
.pager { display: flex; gap: 4px; }
.pager button {
  padding: 4px 9px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--soft-gray);
}
.pager button.on { background: var(--charcoal); color: var(--pampas); }
.pager button:hover:not(.on) { background: var(--pampas); color: var(--charcoal); }

/* CRM summary cards */
.crm-summary {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-bottom: 22px;
}
.sum {
  background: var(--pampas);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px 18px;
}
.sum .label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--soft-gray);
  margin-bottom: 8px;
}
.sum .num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.03em;
  line-height: 1;
}
.sum .num .unit { font-size: 14px; color: var(--soft-gray); margin-left: 4px; font-weight: 500; }
.sum .micro {
  margin-top: 6px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--soft-gray);
}
.sum.brand { background: var(--terracotta); color: var(--pampas); border-color: var(--terracotta); }
.sum.brand .label, .sum.brand .micro { color: rgba(249,247,242,0.75); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .kpi.feature { grid-column: span 3; min-height: 140px; }
  .crm-summary { grid-template-columns: repeat(2, 1fr); }
  .main { padding: 24px 28px 40px; }
  .topbar h1 { font-size: 32px; }
}

@media (max-width: 1024px) {
  .row.r-2-1, .row.r-1-1 { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 16px; }
  .topbar-actions { width: 100%; flex-wrap: wrap; }
  table.crm thead th:nth-child(4),
  table.crm tbody td:nth-child(4),
  table.crm thead th:nth-child(5),
  table.crm tbody td:nth-child(5) { display: none; }
}

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 280px;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 220ms ease;
    box-shadow: 0 0 60px rgba(27,27,25,0.18);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(27,27,25,0.4);
    z-index: 99;
  }
  .sidebar-backdrop.show { display: block; }
  .mobile-bar { display: flex; }
  .main { padding: 18px 18px 36px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi.feature { grid-column: span 2; }
  .kpi-value { font-size: 36px; }
  .topbar h1 { font-size: 26px; }
  .crm-summary { grid-template-columns: 1fr 1fr; gap: 10px; }
  .sum .num { font-size: 22px; }
  .crm-toolbar { gap: 6px; }
  .search { min-width: 100%; max-width: 100%; }
  .filter-chip { font-size: 10px; padding: 6px 9px; }
  table.crm thead th:nth-child(3),
  table.crm tbody td:nth-child(3),
  table.crm thead th:nth-child(7),
  table.crm tbody td:nth-child(7),
  table.crm thead th:nth-child(8),
  table.crm tbody td:nth-child(8),
  table.crm thead th:nth-child(10),
  table.crm tbody td:nth-child(10) { display: none; }
  .donut-wrap { grid-template-columns: 1fr; justify-items: center; }
  .heatmap { grid-template-columns: 30px repeat(24, 1fr); }
  .hm-axis { grid-template-columns: 30px repeat(24, 1fr); }
}

@media (max-width: 520px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi.feature { grid-column: span 1; }
  .crm-summary { grid-template-columns: 1fr; }
  .topbar h1 { font-size: 24px; }
  .kpi-value { font-size: 40px; }
  .card { padding: 16px 14px; }
  table.crm thead th:nth-child(1),
  table.crm tbody td:nth-child(1),
  table.crm thead th:nth-child(11),
  table.crm tbody td:nth-child(11) { display: none; }
  .btn { font-size: 12px; padding: 8px 11px; }
}

/* ---------- OUTCOME TAGS ---------- */
.tag-out {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.tag-out::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-out.booked { background: rgba(217,119,87,0.16); color: var(--terracotta); }
.tag-out.info { background: rgba(138,160,141,0.22); color: #4F6753; }
.tag-out.rescheduled { background: rgba(201,168,95,0.20); color: #8B6A2A; }
.tag-out.cancelled { background: rgba(184,92,62,0.18); color: #B85C3E; }
.tag-out.other { background: var(--sage-light); color: var(--soft-gray); }

/* ---------- AGENDA ---------- */
.agenda-day {
  background: var(--pampas);
  border: 1px solid var(--rule);
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
}
.agenda-day-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 20px;
  background: var(--sage-light);
  border-bottom: 1px solid var(--rule);
}
.agenda-day-head .date {
  font-family: var(--font-display);
  font-weight: 600; font-size: 18px;
  letter-spacing: -0.02em;
}
.agenda-day-head .date .ser { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--terracotta); margin-left: 6px; }
.agenda-day-head .count {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--soft-gray);
}
.agenda-slot {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 18px;
  padding: 14px 20px;
  border-top: 1px solid var(--rule);
  align-items: center;
}
.agenda-slot:first-of-type { border-top: none; }
.agenda-slot .time {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.agenda-slot .time small {
  display: block;
  font-family: var(--font-mono); font-size: 10px;
  font-weight: 400; color: var(--soft-gray);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.agenda-slot .who b { font-weight: 600; font-size: 14px; display: block; }
.agenda-slot .who span { color: var(--soft-gray); font-size: 12.5px; }
.agenda-empty {
  padding: 30px 20px;
  text-align: center;
  color: var(--soft-gray);
  font-family: var(--font-serif);
  font-style: italic;
}
.agenda-slot .actions {
  display: flex; gap: 6px; align-items: center;
  margin-top: 6px;
}
.agenda-slot .actions button {
  padding: 5px 10px;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 6px;
  color: var(--soft-gray);
  border: 1px solid var(--rule-strong);
  background: var(--pampas);
}
.agenda-slot .actions button:hover { background: var(--sage-light); color: var(--charcoal); }
.agenda-slot .actions button.danger { color: #B85C3E; border-color: rgba(184,92,62,0.35); }
.agenda-slot .actions button.danger:hover { background: rgba(184,92,62,0.10); }

/* ---------- MODAL ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(27,27,25,0.55);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--pampas);
  border-radius: 14px;
  padding: 28px 30px;
  width: min(420px, 100%);
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 20px 60px rgba(27,27,25,0.3);
}
.modal h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 22px; letter-spacing: -0.025em;
}
.modal p { font-size: 13.5px; line-height: 1.5; color: var(--charcoal); }
.modal label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft-gray); }
.modal input {
  padding: 10px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  font-family: var(--font-sans); font-size: 14px;
  color: var(--charcoal);
  background: var(--pampas);
  outline: none;
}
.modal input:focus { border-color: var(--terracotta); }
.modal .err {
  color: var(--terracotta); font-size: 12.5px;
  font-family: var(--font-mono); letter-spacing: 0.02em;
  min-height: 18px;
}
.modal .actions {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 6px;
}

/* ---------- CONVERSATIONS (split layout) ---------- */
.conv-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
  min-height: 520px;
}
@media (max-width: 1024px) {
  .conv-layout { grid-template-columns: 1fr; }
}
.conv-list {
  background: var(--pampas);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  display: flex; flex-direction: column;
  max-height: 70vh;
}
.conv-search {
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
}
.conv-search input {
  width: 100%; padding: 8px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 7px;
  background: var(--pampas);
  font-family: var(--font-sans); font-size: 13px;
  color: var(--charcoal); outline: none;
}
.conv-search input:focus { border-color: var(--terracotta); }
.conv-items { overflow-y: auto; flex: 1; }
.conv-item {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  transition: background 120ms ease;
}
.conv-item:hover { background: var(--sage-light); }
.conv-item.active { background: var(--charcoal); color: var(--pampas); }
.conv-item.active .conv-meta { color: rgba(249,247,242,0.6); }
.conv-item.active .tag-out { background: rgba(249,247,242,0.14); color: var(--pampas); }
.conv-item .name { font-weight: 600; font-size: 13.5px; }
.conv-item .preview {
  margin-top: 4px; font-size: 12px; line-height: 1.4;
  color: var(--soft-gray);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.conv-item.active .preview { color: rgba(249,247,242,0.7); }
.conv-meta {
  margin-top: 6px; display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.04em; color: var(--soft-gray);
}
.conv-pane {
  background: var(--pampas);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 22px 26px;
  display: flex; flex-direction: column;
  min-height: 100%;
}
.conv-pane .head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.conv-pane .head h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -0.025em; }
.conv-pane .summary {
  background: var(--sage-light);
  border-left: 3px solid var(--muted-green);
  padding: 12px 14px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 18px;
  font-family: var(--font-serif); font-style: italic;
  font-size: 14.5px; line-height: 1.45;
  color: var(--charcoal);
}
.transcript {
  display: flex; flex-direction: column; gap: 10px;
  font-size: 13.5px; line-height: 1.5;
}
.transcript .line {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  padding: 8px 0;
}
.transcript .role {
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--soft-gray);
  padding-top: 2px;
}
.transcript .line.user .role { color: var(--terracotta); }
.transcript .line.agent .role { color: var(--muted-green); }
.transcript .text { color: var(--charcoal); }

/* ---------- AJUSTES ---------- */
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1024px) { .set-grid { grid-template-columns: 1fr; } }
.set-card {
  background: var(--pampas);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 22px 24px;
}
.set-card h3 {
  font-family: var(--font-display);
  font-weight: 600; font-size: 18px;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.set-row {
  display: grid; grid-template-columns: 1fr auto;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  gap: 12px;
}
.set-row:first-of-type { border-top: none; padding-top: 0; }
.set-row .lbl { font-size: 13px; color: var(--charcoal); }
.set-row .lbl small { display: block; color: var(--soft-gray); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; margin-top: 2px; }
.set-row .val { font-family: var(--font-mono); font-size: 12.5px; color: var(--charcoal); text-align: right; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.ok { background: rgba(138,160,141,0.22); color: #4F6753; }
.status-pill.miss { background: rgba(184,92,62,0.16); color: #B85C3E; }

/* ---------- PATIENT DETAIL ---------- */
.pat-hero {
  background: var(--charcoal);
  color: var(--pampas);
  border-radius: 14px;
  padding: 28px 30px;
  display: flex; gap: 22px; align-items: center;
  margin-bottom: 18px;
}
.pat-hero .av {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(249,247,242,0.10);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 22px; flex-shrink: 0;
}
.pat-hero h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 28px; letter-spacing: -0.025em; line-height: 1.05;
}
.pat-hero .meta {
  margin-top: 6px;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.04em; color: rgba(249,247,242,0.6);
}
.pat-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-bottom: 18px;
}
@media (max-width: 1024px) { .pat-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .pat-stats { grid-template-columns: 1fr 1fr; } }
.pat-stat {
  background: var(--pampas);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 16px 18px;
}
.pat-stat .lbl {
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--soft-gray); margin-bottom: 6px;
}
.pat-stat .num {
  font-family: var(--font-display); font-weight: 600;
  font-size: 26px; letter-spacing: -0.025em;
}
.pat-stat .num small {
  font-size: 12px; color: var(--soft-gray); margin-left: 4px; font-weight: 500;
}

.timeline {
  background: var(--pampas);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 8px 22px;
}
.timeline-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
  align-items: flex-start;
}
.timeline-item:first-child { border-top: none; }
.timeline-icon {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--sage-light);
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.timeline-icon svg { width: 14px; height: 14px; stroke: var(--charcoal); stroke-width: 1.8; fill: none; }
.timeline-icon.future { background: rgba(217,119,87,0.16); }
.timeline-icon.future svg { stroke: var(--terracotta); }
.timeline-icon.call { background: rgba(138,160,141,0.22); }
.timeline-icon.call svg { stroke: #4F6753; }
.timeline-body b { font-weight: 600; font-size: 14px; }
.timeline-body .detail { font-size: 13px; color: var(--charcoal); margin-top: 4px; line-height: 1.4; }
.timeline-time { font-family: var(--font-mono); font-size: 10.5px; color: var(--soft-gray); white-space: nowrap; }
.timeline-body audio { width: 100%; max-width: 360px; margin-top: 8px; }

/* ---------- DASHBOARD HERO + CARDS ---------- */
.hero-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
@media (max-width: 1024px) { .hero-row { grid-template-columns: 1fr; } }

.hero-roi {
  background: var(--charcoal);
  color: var(--pampas);
  border-radius: 14px;
  padding: 26px 28px;
  display: flex; flex-direction: column; gap: 18px;
  position: relative; overflow: hidden;
}
.hero-roi .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(249,247,242,0.55);
}
.hero-roi h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
}
.hero-roi h2 .ser { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--terracotta); }
.hero-roi .big-number {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 88px;
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-variation-settings: "opsz" 96;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 4px;
  row-gap: 6px;
}
.hero-roi .big-number .unit {
  font-size: 28px;
  color: rgba(249,247,242,0.55);
  margin-left: 8px;
  letter-spacing: -0.01em;
  line-height: 1;
  font-weight: 500;
  white-space: nowrap;
  vertical-align: baseline;
}
.hero-roi .roi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(249,247,242,0.14);
}
.hero-roi .roi-grid > div b {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.hero-roi .roi-grid > div span {
  font-family: var(--font-mono); font-size: 10.5px;
  color: rgba(249,247,242,0.55); letter-spacing: 0.06em; text-transform: uppercase;
}
@media (max-width: 520px) {
  .hero-roi .big-number { font-size: 64px; }
  .hero-roi h2 { font-size: 24px; }
  .hero-roi .roi-grid { grid-template-columns: 1fr 1fr; }
}

.why-card {
  background: var(--pampas);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 22px 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.why-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.why-list { display: flex; flex-direction: column; gap: 14px; }
.why-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; }
.why-row .ic {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--sage-light);
  display: flex; align-items: center; justify-content: center;
}
.why-row .ic svg { width: 17px; height: 17px; stroke: var(--charcoal); stroke-width: 1.6; fill: none; }
.why-row .ic.brand { background: rgba(217,119,87,0.16); }
.why-row .ic.brand svg { stroke: var(--terracotta); }
.why-row .ic.green { background: rgba(138,160,141,0.22); }
.why-row .ic.green svg { stroke: #4F6753; }
.why-row .lbl b { display: block; font-weight: 600; font-size: 13.5px; }
.why-row .lbl span { font-family: var(--font-mono); font-size: 10.5px; color: var(--soft-gray); letter-spacing: 0.04em; text-transform: uppercase; }
.why-row .val {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.025em;
  text-align: right;
}
.why-row .val small { font-family: var(--font-sans); font-size: 11px; color: var(--soft-gray); display: block; font-weight: 500; }

.proof-quote {
  margin-top: auto;
  padding: 14px 16px;
  background: var(--sage-light);
  border-radius: 10px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.4;
  color: var(--charcoal);
}
.proof-quote .cite {
  display: block; margin-top: 6px;
  font-family: var(--font-mono); font-style: normal;
  font-size: 10.5px; color: var(--soft-gray);
  letter-spacing: 0.06em; text-transform: uppercase;
}

.compare-card {
  background: var(--pampas);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 20px 22px;
}
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 12px;
}
@media (max-width: 520px) { .compare-grid { grid-template-columns: 1fr; gap: 14px; } }
.compare-grid > div {
  padding: 18px 18px;
  border-radius: 10px;
}
.compare-grid .before {
  background: var(--sage-light);
}
.compare-grid .after {
  background: rgba(217,119,87,0.10);
  border: 1px solid rgba(217,119,87,0.4);
}
.compare-grid .lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft-gray);
  margin-bottom: 10px;
}
.compare-grid .after .lbl { color: var(--terracotta); }
.compare-grid .num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.035em;
}
.compare-grid .desc {
  margin-top: 8px;
  font-size: 13px; color: var(--charcoal); line-height: 1.4;
}
.compare-grid .after .desc b { color: var(--terracotta); }
.compare-arrow {
  display: flex; align-items: center; justify-content: center;
  margin: 12px 0;
}

/* misc */
.tag-tier {
  display: inline-flex;
  padding: 2px 8px;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tag-tier.gold { border-color: var(--terracotta); color: var(--terracotta); }
