/* Panel de Chiquibot · dirección "Claro operativo" (ver .impeccable/surfaces y DESIGN.md) */

:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --line: #e5e7eb;
  --line-soft: #f0f1f3;
  --line-strong: #d1d5db;
  --ink: #111827;
  --ink-2: #4b5563;
  --ink-3: #5f6672;
  --accent: #3752b9;
  --accent-hover: #2c4396;
  --accent-soft: #eef1fb;
  --accent-ring: rgb(55 82 185 / 0.28);
  --ok: #15803d;
  --ok-soft: #ecfdf3;
  --warn: #b45309;
  --warn-soft: #fff7ed;
  --bad: #b91c1c;
  --bad-soft: #fef2f2;
  --muted-dot: #9ca3af;

  --radius-s: 8px;
  --radius-m: 10px;
  --radius-l: 12px;
  --shadow-pop: 0 1px 2px rgb(17 24 39 / 0.06), 0 8px 24px rgb(17 24 39 / 0.12);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --text-xs: 0.75rem;
  --text-s: 0.8125rem;
  --text-m: 0.9375rem;
  --text-l: 1.0625rem;
  --text-xl: 1.375rem;

  --tap: 40px;
  --nav-h: 64px;
  --side-w: 240px;

  /* motion tokens (transitions.dev) */
  --duration-quick: 150ms;
  --duration-fast: 250ms;
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);
  --toast-open: 350ms;
  --toast-close: 250ms;
  --toast-distance: 16px;
  --toast-blur: 2px;
  --toast-scale: 0.97;
  --toast-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --modal-open-dur: 250ms;
  --modal-close-dur: 150ms;
  --modal-scale: 0.96;
  --modal-scale-close: 0.96;
  --modal-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (pointer: coarse) {
  :root { --tap: 44px; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scrollbar-color: var(--line-strong) transparent;
  caret-color: var(--accent);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-m);
  line-height: 1.5;
  font-feature-settings: "cv11", "ss01";
}

::selection { background: #c7d7fe; color: var(--ink); }

h1, h2, h3 { margin: 0; text-wrap: balance; line-height: 1.25; }
h1 { font-size: var(--text-xl); font-weight: 650; letter-spacing: -0.015em; }
h2 { font-size: var(--text-m); font-weight: 600; }
h3 { font-size: var(--text-m); font-weight: 600; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
small, .muted { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.icon { width: 20px; height: 20px; flex: none; }
.icon-s { width: 16px; height: 16px; }

.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;
}

/* ---------- Shell ---------- */

.shell { min-height: 100dvh; }

.side { display: none; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 16px;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .back { margin-left: -8px; }
.topbar-title { flex: 1; min-width: 0; font-weight: 600; font-size: var(--text-l);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink);
  text-decoration: none; font-weight: 650; font-size: var(--text-l); }
.brand:hover { color: var(--ink); }
.brand-mark { display: block; width: 32px; height: 32px; border-radius: 50%; }

.main {
  width: 100%; max-width: 1100px; margin: 0 auto;
  padding: 16px 16px calc(var(--nav-h) + 32px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 16px;
}

.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.page-sub { color: var(--ink-3); font-size: var(--text-s); margin-top: 2px; }

.bottomnav {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 4px 4px env(safe-area-inset-bottom);
  background: rgb(255 255 255 / 0.96);
  backdrop-filter: saturate(1.4) blur(10px);
  border-top: 1px solid var(--line);
}
.bottomnav a {
  position: relative;
  min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--ink-3); text-decoration: none; font-size: var(--text-xs); font-weight: 500;
  border-radius: var(--radius-m);
  transition-property: color, background-color;
  transition-duration: var(--duration-quick);
}
.bottomnav a[aria-current="page"] { color: var(--accent); font-weight: 650; }
.bottomnav .count { position: absolute; top: 6px; left: calc(50% + 6px); }

.count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 650; line-height: 18px;
  text-align: center; font-variant-numeric: tabular-nums;
}
.count.soft { background: var(--accent-soft); color: var(--accent); }

@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .side {
    display: flex; flex-direction: column; gap: 4px;
    position: sticky; top: 0; height: 100dvh; overflow-y: auto;
    padding: 16px 12px; background: var(--surface); border-right: 1px solid var(--line);
  }
  .side .brand { padding: 4px 8px 16px; }
  .side-group { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; }
  .side-label { padding: 8px 10px 4px; font-size: var(--text-xs); color: var(--ink-3); font-weight: 500; }
  .side a.nav {
    display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px;
    border-radius: var(--radius-s); color: var(--ink-2); text-decoration: none; font-weight: 500;
    transition-property: color, background-color;
    transition-duration: var(--duration-quick);
  }
  .side a.nav:hover { background: var(--surface-2); color: var(--ink); }
  .side a.nav[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
  .side a.nav .count { margin-left: auto; }
  .side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px;
    display: flex; align-items: center; gap: 8px; justify-content: space-between; }
  .side-foot .who { font-size: var(--text-s); color: var(--ink-2); padding-left: 10px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-foot .who-role { display: block; font-size: var(--text-xs); color: var(--ink-3); }
  .topbar.mobile-only, .bottomnav { display: none; }
  .main { padding: 28px 32px 48px; }
}

/* ---------- Surfaces ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  min-width: 0;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
}
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.card-foot { padding: 12px 16px; border-top: 1px solid var(--line-soft); display: flex; gap: 8px; flex-wrap: wrap; }

.grid-2 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) {
  .grid-2 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}

/* lista con separadores: la unidad básica del panel */
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 10px 16px;
  border-top: 1px solid var(--line-soft);
}
.rows > .row:first-child { border-top: 0; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-title { font-weight: 550; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.row-title { text-decoration: none; }
a.row-title:hover { color: var(--accent); }
.row-meta { font-size: var(--text-s); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; gap: 6px; flex: none; }
/* usuarios: en el celular las acciones bajan debajo del nombre */
.user-row { flex-wrap: wrap; }
.user-row .row-main { flex: 1 1 180px; }
.role-form { display: flex; align-items: center; gap: 6px; }
.name-form { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.name-form .input { flex: 1 1 180px; min-width: 0; width: auto; }
.role-form .select { width: auto; min-height: var(--tap); padding: 6px 32px 6px 10px; font-size: var(--text-s); }
a.row-link { color: inherit; text-decoration: none; transition: background-color var(--duration-quick); }
a.row-link:hover { background: var(--surface-2); color: inherit; }
.row .chev { color: var(--ink-3); }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted-dot); }
.dot.active { background: var(--ok); }
.dot.due { background: #d97706; }
.dot.expired, .dot.overdue { background: var(--bad); }
.dot.pending, .dot.lead { background: var(--accent); }
.dot.seed { background: var(--muted-dot); }
.dot.opted_out, .dot.closed { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted-dot); }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-s); color: var(--ink-2); white-space: nowrap; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
  border-radius: 12px; font-size: var(--text-xs); font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line);
}
.tag.active { background: var(--ok-soft); color: var(--ok); box-shadow: none; }
.tag.expired { background: var(--bad-soft); color: var(--bad); box-shadow: none; }
.tag.due { background: var(--warn-soft); color: var(--warn); box-shadow: none; }
.tag.pending { background: var(--accent-soft); color: var(--accent); box-shadow: none; }

.t-bad { color: var(--bad); }
.t-warn { color: var(--warn); }
.t-ok { color: var(--ok); }

/* cifras */
.kpis { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 960px) { .kpis { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; } }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0;
  color: inherit; text-decoration: none;
}
a.kpi { transition: border-color var(--duration-quick); }
a.kpi:hover { border-color: var(--line-strong); color: inherit; }
.kpi-label { font-size: var(--text-xs); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-value { font-size: 1.125rem; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.kpi-note { font-size: var(--text-xs); color: var(--ink-3); }
.kpi.hide-s { display: none; }
@media (min-width: 960px) {
  .kpi { padding: 14px 16px; }
  .kpi-value { font-size: 1.375rem; }
  .kpi.hide-s { display: flex; }
}

.empty {
  padding: 28px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--ink-2);
}
.empty .icon { width: 28px; height: 28px; color: var(--ok); }
.empty p { max-width: 36ch; font-size: var(--text-s); color: var(--ink-3); }

/* ---------- Controles ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--tap); min-width: var(--tap); padding: 0 14px;
  border-radius: var(--radius-s); border: 1px solid transparent;
  font: inherit; font-size: 0.875rem; font-weight: 600; line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  background: var(--surface); color: var(--ink); border-color: var(--line-strong);
  transition-property: background-color, border-color, color, box-shadow, scale;
  transition-duration: var(--duration-quick);
  transition-timing-function: var(--ease-smooth-out);
}
.btn:hover { background: var(--surface-2); color: var(--ink); }
.btn:active { scale: 0.96; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); color: var(--bad); }
.btn.danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger-solid:hover { background: #991b1b; border-color: #991b1b; color: #fff; }
.btn.wa { color: var(--ok); }
.btn.wa:hover { background: var(--ok-soft); color: var(--ok); }
.btn.icon-only { padding: 0; }
.btn.block { width: 100%; }
.btn.lg { min-height: 48px; font-size: var(--text-m); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.btn .icon { width: 18px; height: 18px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .label { font-size: var(--text-s); font-weight: 550; color: var(--ink-2); }
.hint { font-size: var(--text-xs); color: var(--ink-3); }
.hint.ok { color: var(--ok); }
.hint.warn { color: var(--warn); }
.hint.bad { color: var(--bad); font-weight: 550; }
fieldset.plain { border: 0; padding: 0; margin: 0; }
fieldset.plain > legend { padding: 0; margin-bottom: 2px; }
.checks { display: flex; flex-wrap: wrap; column-gap: 20px; }
.fields { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 1rem;
  transition-property: border-color, box-shadow;
  transition-duration: var(--duration-quick);
}
.textarea { min-height: 80px; resize: vertical; line-height: 1.45; }
.select { appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.input::placeholder, .textarea::placeholder, .search input::placeholder { color: var(--ink-3); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: #b8bec7; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.input[readonly] { background: var(--surface-2); color: var(--ink-2); }
.field.has-error .input { border-color: var(--bad); }

.check { display: flex; align-items: flex-start; gap: 10px; min-height: var(--tap); padding: 8px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }

.search {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-m); background: var(--surface);
  transition-property: border-color, box-shadow; transition-duration: var(--duration-quick);
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.search .icon { color: var(--ink-3); width: 18px; height: 18px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1rem; min-height: 42px; }
.search input::-webkit-search-cancel-button { cursor: pointer; }

/* chips de filtro: desplazables en celular */
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px; margin: -2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 36px; padding: 0 12px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2);
  font-size: var(--text-s); font-weight: 550; text-decoration: none; cursor: pointer;
  transition-property: background-color, border-color, color;
  transition-duration: var(--duration-quick);
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip[aria-current="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip .n { font-variant-numeric: tabular-nums; color: inherit; opacity: 0.7; }

/* control segmentado (radio) */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-m); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 8px;
  border-radius: 7px; font-size: var(--text-s); font-weight: 600; color: var(--ink-2);
  transition-property: background-color, color, box-shadow; transition-duration: var(--duration-quick);
}
.seg input:checked + span { background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }

/* tarjetas de plan (radio) */
.options { display: grid; gap: 8px; }
.option { position: relative; display: block; cursor: pointer; }
.option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.option-box {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-m); background: var(--surface);
  transition-property: border-color, box-shadow, background-color; transition-duration: var(--duration-quick);
}
.option-radio { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.5px var(--line-strong);
  transition: box-shadow var(--duration-quick) var(--ease-smooth-out); }
.option input:checked + .option-box { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.option input:checked + .option-box .option-radio { box-shadow: inset 0 0 0 5px var(--accent); }
.option input:focus-visible + .option-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.option input:disabled + .option-box { opacity: 0.5; cursor: not-allowed; }
.option-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.option-title { font-weight: 600; }
.option-meta { font-size: var(--text-s); color: var(--ink-3); }
.option-price { font-weight: 650; font-variant-numeric: tabular-nums; }

/* avisos en página */
.notice {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px;
  border-radius: var(--radius-m); background: var(--accent-soft); color: #1e3a8a; font-size: var(--text-s);
}
.notice .icon { width: 18px; height: 18px; margin-top: 1px; }
.notice.bad { background: var(--bad-soft); color: #7f1d1d; }
.notice.ok { background: var(--ok-soft); color: #14532d; }
.notice.warn { background: var(--warn-soft); color: #78350f; }
.notice-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.notice ul { margin: 0; padding-left: 18px; }
.avisos-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.avisos-actions [hidden], .notice.avisos[hidden] { display: none; }
.avisos-hint { color: inherit; opacity: 0.85; }
.avisos-hint a { color: inherit; text-decoration: underline; }

/* tabla densa (escritorio) */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-s); }
.table th { text-align: left; font-weight: 550; color: var(--ink-3); padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; }
.table tr.voided td { color: var(--ink-3); text-decoration: line-through; }
.table tr.voided td:last-child { text-decoration: none; }

/* pestañas */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tab {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; margin-bottom: -1px;
  color: var(--ink-3); text-decoration: none; font-weight: 550; border-bottom: 2px solid transparent;
  transition-property: color, border-color; transition-duration: var(--duration-quick);
}
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
/* en el celular las pestañas no se parten: si no caben, se deslizan de lado como los filtros */
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { white-space: nowrap; flex: none; }

/* menú "Más" en celular */
.menu-list a { color: inherit; text-decoration: none; }
.menu-list .icon { color: var(--ink-3); }

/* ---------- Aviso flotante (toast) ---------- */

.toast-wrap {
  position: fixed; z-index: 50; left: 16px; right: 16px;
  bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom));
  display: flex; justify-content: center; pointer-events: none;
}
@media (min-width: 960px) { .toast-wrap { bottom: 24px; left: calc(var(--side-w) + 24px); } }
.toast {
  pointer-events: auto; max-width: 460px; width: 100%;
  display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px;
  background: #111827; color: #fff; border-radius: var(--radius-l); box-shadow: var(--shadow-pop);
  font-size: var(--text-s); font-weight: 500;
}
.toast .icon { width: 18px; height: 18px; color: #86efac; }
.toast.bad .icon { color: #fca5a5; }
.toast-text { flex: 1; }
.toast .btn.ghost { color: #d1d5db; min-height: 32px; min-width: 32px; }
.toast .btn.ghost:hover { background: rgb(255 255 255 / 0.08); color: #fff; }

.t-toast {
  opacity: 0;
  transform: translateY(var(--toast-distance)) scale(var(--toast-scale));
  filter: blur(var(--toast-blur));
  will-change: transform, opacity, filter;
  transition:
    opacity var(--toast-close) var(--toast-ease),
    transform var(--toast-close) var(--toast-ease),
    filter var(--toast-close) var(--toast-ease);
}
.t-toast.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  transition:
    opacity var(--toast-open) var(--toast-ease),
    transform var(--toast-open) var(--toast-ease),
    filter var(--toast-open) var(--toast-ease);
}

@media (prefers-reduced-motion: reduce) {
  .t-toast { transition: none !important; }
}

/* ---------- Confirmación (dialog) ---------- */

dialog.confirm {
  border: 0; padding: 0; background: transparent; max-width: min(420px, calc(100vw - 32px)); width: 100%;
  overflow: visible;
}
dialog.confirm::backdrop { background: rgb(17 24 39 / 0.4); }
.confirm-panel {
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-pop);
  padding: 20px; display: flex; flex-direction: column; gap: 12px;
}
.confirm-panel p { color: var(--ink-2); font-size: var(--text-m); }
.confirm-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }

.t-modal {
  transform-origin: center;
  transform: scale(var(--modal-scale));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--modal-open-dur) var(--modal-ease),
    opacity   var(--modal-open-dur) var(--modal-ease);
  will-change: transform, opacity;
}
.t-modal.is-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}
.t-modal.is-closing {
  transform: scale(var(--modal-scale-close));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--modal-close-dur) var(--modal-ease),
    opacity   var(--modal-close-dur) var(--modal-ease);
}

@media (prefers-reduced-motion: reduce) {
  .t-modal { transition: none !important; }
}

/* ---------- Entrada (login / crear cuenta) ---------- */

.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth .card { width: 100%; max-width: 400px; }
.auth .card-body { padding: 24px; gap: 16px; }
.auth-logo { display: block; width: 88px; height: 88px; border-radius: 20px; margin-bottom: 4px; }

/* utilidades pequeñas */
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-s { display: flex; flex-direction: column; gap: 8px; }
.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (min-width: 960px) { .hide-l { display: none !important; } }
@media (max-width: 959px) { .only-l { display: none !important; } }

/* ficha del negocio: pagos arriba en celular, a la derecha en computador */
.detail { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) {
  .detail { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .detail-form { grid-column: 1; grid-row: 1; }
  .detail-aside { grid-column: 2; grid-row: 1; position: sticky; top: 28px; }
}
.detail.solo { grid-template-columns: minmax(0, 760px); }

/* cobro: un formulario corto, el botón siempre a mano */
.pay { max-width: 560px; width: 100%; }
.pay-bar { position: sticky; bottom: calc(var(--nav-h) + 8px + env(safe-area-inset-bottom)); z-index: 5; }
@media (min-width: 960px) { .pay-bar { position: static; } }
details.more summary.btn { color: var(--accent); }
details.more summary { list-style: none; align-self: flex-start; padding-left: 0; color: var(--accent); }
details.more summary::-webkit-details-marker { display: none; }
details.more summary:hover { background: transparent; color: var(--accent-hover); text-decoration: underline; }

.lead-row { flex-wrap: wrap; }
.lead-row .row-meta .tag { height: 20px; padding: 0 7px; margin-right: 4px; vertical-align: 1px; }
/* estados de una solicitud: un color cada uno, el mismo en la etiqueta y en el botón que lleva a él */
.tag.lead-nuevo { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.tag.lead-contactado { background: var(--warn-soft); color: var(--warn); box-shadow: none; }
.tag.lead-creado { background: var(--ok-soft); color: var(--ok); box-shadow: none; }
.tag.lead-descartado { background: var(--surface-2); color: var(--ink-3); }
.tag.lead-libre { background: var(--ok-soft); color: var(--ok); box-shadow: none; }
.tag.lead-tuya { background: var(--accent); color: #fff; box-shadow: none; }
.btn.lead-btn-contactado { color: var(--warn); border-color: #fed7aa; background: var(--warn-soft); }
.btn.lead-btn-contactado:hover { background: #ffedd5; color: var(--warn); }
.btn.lead-btn-creado { color: var(--ok); border-color: #bbf7d0; background: var(--ok-soft); }
.btn.lead-btn-creado:hover { background: #dcfce7; color: var(--ok); }
.btn.lead-btn-descartado { color: var(--ink-3); background: transparent; border-color: transparent; }
.btn.lead-btn-descartado:hover { color: var(--bad); background: var(--bad-soft); }
.lead-moves { gap: 6px; }
.row-group {
  padding: 10px 16px 6px; font-size: var(--text-xs); font-weight: 650; letter-spacing: 0.02em;
  color: var(--ink-3); background: var(--surface-2); border-top: 1px solid var(--line-soft);
}
.rows > .row-group:first-child { border-top: 0; border-radius: var(--radius-l) var(--radius-l) 0 0; }
.row-group + .row { border-top: 0; }
@media (max-width: 639px) {
  .lead-row .lead-actions { width: 100%; flex-wrap: wrap; }
}

/* Solicitudes: un grupo por tarjeta según lo que se puede hacer. Lo disponible va en blanco con el punto azul de
   solicitud; lo que espera (otra persona la atiende, ya se le escribió) va en gris humo y con el texto más suave */
.lead-group-head { align-items: flex-start; }
.lead-group-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lead-group-hint { margin: 0; font-size: var(--text-s); color: var(--ink-3); }
.lead-group-head .count { flex: none; margin-top: 2px; }
.lead-row { align-items: flex-start; }
.lead-row > .dot { margin-top: 7px; }
.lead-row .row-title { font-weight: 600; }
.lead-note { color: var(--ink-2); font-weight: 550; }
.lead-note.is-urgent { color: var(--warn); }
.lead-group.is-quiet { background: var(--surface-2); }
.lead-group.is-quiet .row-title { color: var(--ink-2); font-weight: 550; }
.lead-group.is-quiet .lead-group-title h2 { color: var(--ink-2); }
.lead-actions { flex-wrap: wrap; align-items: center; }
.lead-more { color: var(--ink-2); }
.lead-more[aria-expanded="true"] { color: var(--ink); background: var(--line-soft); }
.lead-more-body { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lead-more-body[hidden] { display: none; }
@media (min-width: 640px) { .lead-more-body { justify-content: flex-end; } }
@media (max-width: 639px) {
  .lead-row .row-main { flex: 1 1 0; }
  .lead-more { padding: 0; width: var(--tap); justify-content: center; }
  .lead-more-text { display: none; }
}

/* ajustes tras la primera revisión */
.kpi-label, .kpi-note { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.3; }
.card-head { min-height: 52px; }
.card-head .btn { min-height: 32px; padding: 0 10px; }
@media (max-width: 959px) {
  .row-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
}
.toast .btn .icon { color: inherit; }
@media (max-width: 959px) {
  .row-meta { white-space: normal; }
}
.topbar .back-link { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); margin-left: -6px;
  padding: 0 6px; color: var(--ink-2); text-decoration: none; font-weight: 550; border-radius: var(--radius-s); }
.topbar .back-link:hover { color: var(--ink); background: var(--surface-2); }
.detail-aside .row-meta { white-space: normal; }

/* ajustes tras la revisión de acabado */
fieldset.plain { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.section-title { padding: 0; font-size: var(--text-m); font-weight: 650; color: var(--ink); }
.more-chev { width: 16px; height: 16px; transition: transform var(--duration-quick) var(--ease-smooth-out); }
details.more[open] .more-chev { transform: rotate(90deg); }
.btn.wa-short .wa-text { display: none; }
.btn.wa-short { width: var(--tap); padding: 0; }
@media (min-width: 640px) {
  .btn.wa-short { width: auto; padding: 0 12px; }
  .btn.wa-short .wa-text { display: inline; }
}
/* Recibidos: el mes y su total van en una sola tarjeta; las flechas no llevan texto en el celular para no chocar */
.month-nav { display: flex; align-items: center; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line-soft); }
.month-title { flex: 1; min-width: 0; text-align: center; font-size: var(--text-m); font-weight: 650; }
.month-step { flex: none; padding: 0; color: var(--ink-2); }
.month-step.is-off { opacity: 0.3; pointer-events: none; }
.month-step-text { display: none; }
@media (min-width: 640px) {
  .month-step { padding: 0 10px; min-width: 132px; }
  .month-step:first-child { justify-content: flex-start; }
  .month-step:last-child { justify-content: flex-end; }
  .month-step-text { display: inline; }
}
.sum { display: flex; flex-direction: column; gap: 2px; padding: 16px 16px 18px; }
.sum-label { font-size: var(--text-s); color: var(--ink-3); }
.sum-value { font-size: 1.875rem; font-weight: 650; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sum-note { font-size: var(--text-s); color: var(--ink-2); }
.sum-split { margin: 0; padding: 4px 16px; border-top: 1px solid var(--line-soft); }
.sum-split > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 0.875rem; }
.sum-split > div + div { border-top: 1px solid var(--line-soft); }
.sum-split dt { color: var(--ink-2); }
.sum-split dd { margin: 0; font-weight: 600; }
.sum-foot { padding: 10px 16px; border-top: 1px solid var(--line-soft); background: var(--surface-2);
  border-radius: 0 0 var(--radius-l) var(--radius-l); font-size: var(--text-s); color: var(--ink-2); }
.pay-row .row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.pay-row .row-meta:has(.tag) { margin-top: 3px; }
.pay-row .row-meta .tag { height: 20px; padding: 0 7px; }
.pay-row.is-void .row-title, .pay-row.is-void .pay-amount { text-decoration: line-through; color: var(--ink-3); }
.card-head + .rows > .row-group:first-child { border-radius: 0; }
.save-bar { position: sticky; bottom: calc(var(--nav-h) + 8px + env(safe-area-inset-bottom)); z-index: 5; }
.save-bar .btn { width: 100%; }
@media (min-width: 960px) {
  .save-bar { position: static; }
  .save-bar .btn { width: auto; }
}
@media (prefers-reduced-motion: reduce) { .more-chev { transition: none; } }

/* plan Destacado: tarjeta con foto en el bot */
:root { --star: #a16207; --star-soft: #fefce8; }
.tag.featured { background: var(--star-soft); color: var(--star); box-shadow: none; vertical-align: 1px; }
.tag.featured .icon { width: 13px; height: 13px; }
.row-title .tag { margin-left: 6px; height: 20px; padding: 0 7px; }
.biz-photo {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: var(--radius-s); outline: 1px solid rgb(0 0 0 / 0.1); outline-offset: -1px;
}
input[type="file"].input { padding: 6px 8px; height: auto; width: 100%; }
.proof-photo { display: block; width: 100%; height: auto; border: 1px solid var(--line-soft); border-radius: 8px; }
.proof-inline { display: flex; flex-direction: column; gap: 4px; flex-basis: 100%; font-size: var(--text-s); color: var(--ink-2); }
/* el campo de archivo no cede por sí solo y empujaría la fila más allá de la pantalla */
.proof-inline input { min-width: 0; }
.row-actions:has(.proof-inline) { flex: 1 1 100%; min-width: 0; }
.row:has(.proof-inline) { flex-wrap: wrap; }

/* recibo de pago: se ve en el celular, se imprime en carta y se guarda como PDF */
.receipt-page { max-width: 720px; margin: 0 auto; padding: 16px 16px 48px; }
.receipt-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.receipt-next { display: flex; flex-direction: column; gap: 10px; padding: 18px; margin-bottom: 16px; }
.receipt-next h2 { margin: 4px 0 0; }
.receipt-next-ok { display: flex; gap: 8px; align-items: flex-start; margin: 0; color: var(--ok, #15803d); }
.receipt-next-ok .icon { flex: none; margin-top: 2px; }
.receipt-next-ok span { color: var(--ink); }
.receipt-next .btn.lg { align-self: stretch; justify-content: center; }
.receipt-next .btn.ghost[data-share-pdf] { align-self: flex-start; }
@media (min-width: 640px) { .receipt-next .btn.lg { align-self: flex-start; } }
.receipt-wrap { width: 100%; max-width: 720px; margin: 0 auto; }
.receipt-after { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.receipt-after .label { margin: 0; font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.next-links { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 640px) { .next-links { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.next-link {
  display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 64px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface);
  color: var(--ink); text-decoration: none;
  transition-property: border-color, background-color, box-shadow;
  transition-duration: var(--duration-quick);
}
.next-link:hover { color: var(--ink); border-color: var(--accent); background: var(--accent-soft); }
.next-link > .icon:last-child { flex: none; color: var(--ink-3); }
.next-link-icon { flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.next-link-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.next-link-text > span { font-size: var(--text-s); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ya lo envió: la primera opción pasa a ser el paso que sigue */
.receipt-next[data-sent] .next-link:first-child { border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent); }
.receipt-next[data-sent] .next-link:first-child .next-link-icon { background: var(--accent); color: #fff; }
.receipt-next[data-sent] .receipt-after .label { color: var(--ok); }
.receipt-tools .btn.primary { flex: 1 0 auto; }
@media (min-width: 640px) { .receipt-tools .btn.primary { flex: 0 0 auto; } }
.receipt-delivery { align-self: center; margin: 0; font-size: var(--text-s); font-weight: 600; color: var(--ok); }
.receipt-delivery.t-bad { color: var(--bad); }
.receipt { position: relative; padding: 24px 20px; display: flex; flex-direction: column; gap: 20px; overflow: hidden; }
.receipt p { margin: 0; }
.receipt-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: var(--text-s); color: var(--ink-2); }
.receipt-issuer { font-size: var(--text-l); font-weight: 650; color: var(--ink); }
.receipt-id h1 { font-size: var(--text-xl); margin: 0 0 2px; letter-spacing: -0.01em; color: var(--ink); }
.receipt-client { display: flex; flex-direction: column; gap: 2px; font-size: var(--text-s); color: var(--ink-2); }
.receipt-client .label { text-transform: uppercase; letter-spacing: 0.04em; font-size: var(--text-xs); margin-bottom: 2px; }
.receipt-client-name { font-size: var(--text-m); font-weight: 600; color: var(--ink); }
.receipt-lines { width: 100%; border-collapse: collapse; font-size: var(--text-m); }
.receipt-lines th, .receipt-lines td { padding: 10px 0; text-align: left; vertical-align: top; }
.receipt-lines thead th { font-size: var(--text-xs); font-weight: 600; color: var(--ink-3); text-transform: uppercase;
  letter-spacing: 0.04em; border-bottom: 1px solid var(--line); }
.receipt-lines tbody td { border-bottom: 1px solid var(--line-soft); }
.receipt-lines td strong { display: block; font-weight: 600; }
.receipt-lines td span { display: block; font-size: var(--text-s); margin-top: 2px; }
.receipt-lines .amount { text-align: right; white-space: nowrap; padding-left: 16px; }
.receipt-lines tfoot th, .receipt-lines tfoot td { font-size: var(--text-l); font-weight: 700; padding-top: 14px; }
.receipt-words { font-size: var(--text-s); color: var(--ink-2); }
.receipt-words::first-letter { text-transform: uppercase; }
.receipt-paid { font-size: var(--text-s); font-weight: 600; color: var(--ok); }
.receipt-foot { padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: var(--text-xs); color: var(--ink-3); }
.receipt-void { position: absolute; top: 42%; left: 50%; translate: -50% -50%; rotate: -18deg; pointer-events: none;
  padding: 4px 18px; border: 3px solid var(--bad); border-radius: var(--radius-s); color: var(--bad);
  font-size: 2.5rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.55; }
@media (min-width: 640px) {
  .receipt { padding: 36px 40px; }
  .receipt-id { text-align: right; }
}
@media print {
  @page { size: letter; margin: 18mm; }
  body { background: #fff; }
  .receipt-page { padding: 0; max-width: none; }
  .receipt-tools, .receipt-next, .toast-wrap, .side, .topbar, .bottomnav { display: none; }
  .main { padding: 0; max-width: none; }
  .receipt { border: 0; padding: 0; }
  .receipt-id { text-align: right; }
}

/* ---------- Formulario público de inscripción ---------- */
.signup { max-width: 680px; margin: 0 auto; padding: 24px 16px 48px; display: flex; flex-direction: column; gap: 16px; }
.signup-head { display: flex; flex-direction: column; gap: 8px; }
.signup .card-body { display: flex; flex-direction: column; gap: 14px; }
.signup .notice[hidden], .signup [hidden] { display: none; }
.claim-list { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 0 8px; }
.claim-list .label, .claim-list .hint { padding: 0 16px; }
.pay-list { margin: 0; padding-left: 18px; }
/* selector de categoría: tipo de negocio arriba, sus categorías abajo; sin JS se ven todas en grupos */
.catpick { gap: 10px; }
.catpick > legend { margin-bottom: 6px; }
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
/* los tipos van en rejilla de dos columnas y con otra forma, para no confundirlos con las categorías */
.catpick-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .catpick-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.catpick-groups .pick { justify-content: flex-start; min-height: 48px; padding: 6px 12px; border-radius: var(--radius-m); text-align: left; }
.pick { position: relative; display: inline-flex; align-items: center; min-height: var(--tap, 40px); padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: inherit; font-size: var(--text-s); font-weight: 550; line-height: 1.2; cursor: pointer; user-select: none;
  transition-property: background-color, border-color, color, box-shadow; transition-duration: var(--duration-quick); }
.pick:hover { border-color: #b8bec7; }
.pick:active { background: var(--surface-2); }
button.pick[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
label.pick input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
label.pick:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent); }
label.pick:has(input:focus-visible), button.pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.catpick-panel { display: flex; flex-direction: column; gap: 8px; }
.catpick-title { font-size: var(--text-xs); font-weight: 600; color: var(--ink-3); }
.catpick.is-js .catpick-panel { display: none; padding: 12px; border-radius: var(--radius-m); background: var(--surface-2);
  border: 1px solid var(--line); }
.catpick.is-js .catpick-panel.is-on { display: flex; }
.catpick.is-js .catpick-panel .pick { background: var(--surface); }
.catpick.is-js .pick[hidden] { display: none; }
.catpick-other { border-top: 1px solid var(--line-soft); padding-top: 12px; }
.catpick-chosen { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: var(--radius-s);
  background: var(--ok-soft); color: var(--ok); font-size: var(--text-s); }
.catpick-chosen .icon { width: 18px; height: 18px; flex: none; }
.catpick.has-error .search, .catpick.has-error .catpick-groups .pick { border-color: var(--bad); }

/* el motivo del descuento solo se pide cuando no es abono */
.pay-less:has(input[name="abono"]:checked) .discount-note { display: none; }

/* campo trampa para robots: fuera de la vista y del lector de pantalla */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Subasta de Destacados ---------- */
.auction-cat { padding-top: 12px; }
.auction-cat + .auction-cat { border-top: 1px solid var(--line); }
.auction-cat > .label { padding: 0 16px; }

/* ---------- Editor de horario por días ---------- */
.hours-editor { display: flex; flex-direction: column; gap: 4px; }
.hrow { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hrow:last-of-type { border-bottom: 0; }
.hhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hday { font-weight: 550; }
.h24 { font-size: var(--text-s); }
.hslots { display: flex; flex-direction: column; gap: 6px; padding-left: 30px; }
.hslot { display: flex; align-items: center; gap: 6px; }
.hslot[hidden], .hadd[hidden] { display: none; }
.hslot .input { flex: none; width: 7rem; min-height: 40px; padding: 0 8px; }
.hto { color: var(--ink-3); font-size: var(--text-s); }
.hadd { align-self: flex-start; min-height: 32px; padding: 0 8px; font-size: var(--text-s); }
/* cerrado: sin horas ni "24 horas"; 24 horas: sin horas */
.hrow:has([data-day-open]:not(:checked)) :is(.h24, .hslots) { display: none; }
.hrow:has([data-day-open]:checked) .hclosed { display: none; }
.hrow:has([name$="_24"]:checked) .hslots { display: none; }

/* ---------- App en el celular ---------- */
.card[hidden], .card [hidden] { display: none; }

/* estadísticas: una sola serie, barras finas y solo el mes más alto con su valor */
.stats-mix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 960px) { .stats-mix { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.month-bars { list-style: none; margin: 0; padding: 22px 0 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.month-col { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.month-track { position: relative; width: 100%; height: 132px; display: flex; align-items: flex-end; justify-content: center;
  border-bottom: 1px solid var(--line-strong); }
.month-bar { display: block; width: min(60%, 28px); min-height: 3px; background: var(--accent); border-radius: 4px 4px 0 0; }
.month-value { position: absolute; left: 50%; transform: translateX(-50%); margin-bottom: 4px; white-space: nowrap;
  font-size: var(--text-xs); font-weight: 600; color: var(--ink); }
.edge-start .month-value { left: 0; transform: none; }
.edge-end .month-value { left: auto; right: 0; transform: none; }
.month-name { font-size: var(--text-xs); color: var(--ink-3); }
.month-tip { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); z-index: 2; display: none; white-space: nowrap;
  background: var(--ink); color: #fff; font-size: var(--text-xs); padding: 4px 8px; border-radius: 6px; pointer-events: none; }
.edge-start .month-tip { left: 0; transform: none; }
.edge-end .month-tip { left: auto; right: 0; transform: none; }
.month-col:hover .month-tip, .month-col:focus .month-tip { display: block; }
.month-col:hover .month-bar { background: var(--accent-hover); }
.month-col:focus { outline: none; }
.month-table summary { cursor: pointer; font-size: var(--text-s); color: var(--ink-2); }
