/* ============================================================
   Cuestio · panel de clientes (MAQUETA, 2026-11-02)
   Built on the public site's "papel y sello" system
   (priceRadar/src/css/public.css): the tokens below are copied
   verbatim from its :root; everything after them is the
   application layer. One light theme, no gradients, no blur.
   ============================================================ */

@font-face { font-family: "Archivo"; src: url("fonts/Archivo-100-900-latin.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-400-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-500-latin.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-600-latin.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  /* papel y sello, verbatim */
  --papel: #f8f7f4;
  --papel-2: #ffffff;
  --tinta: #15171c;
  --tinta-2: #565b66;
  --tinta-3: #676c76;
  --linea: #e0ded7;
  --linea-2: #cfccc2;
  --sello: #4a43c4;
  --sello-tinta: #3a34a3;
  --sello-suave: #eeedfb;
  --verde: #177d53;
  --verde-suave: #e7f3ee;
  --caro: #b0432f;
  --caro-suave: #f7ece9;
  --noche: #101116;
  --noche-2: #1a1c23;
  --papel-en-noche: #ece9e1;
  --sans: "Archivo", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "Consolas", ui-monospace, monospace;
  --radius: 10px;

  /* application layer */
  --lavanda: #7a73d8;            /* the landing chart's second violet step */
  --side-w: 256px;
  --r-ctl: 7px;                  /* the brand's button and input radius */
  --r-chip: 5px;
  --sombra: 0 18px 40px -22px rgba(21, 23, 28, 0.35);   /* the brand's .factura shadow */
  --sombra-menu: 0 16px 36px -20px rgba(21, 23, 28, 0.4); /* the brand's .senal shadow */
  --velo: rgba(16, 17, 22, 0.42);
  --t-page: clamp(1.55rem, 2.1vw, 2rem);

  /* D2 change 6: the workspace colours, the facturillo portal accountant panel's eleven client colours
     (portal/app/src/design/tokens.css, --client-*), named as its lib/contadorV2Copy.ts names them */
  --ws-azul: #3e7bdb;
  --ws-celeste: #1c8fd6;
  --ws-turquesa: #2ec4b6;
  --ws-verde: #24a891;
  --ws-violeta: #7e6ff0;
  --ws-morado: #8e5bd8;
  --ws-rosado: #e35d9b;
  --ws-rojo: #e74852;
  --ws-naranja: #f07a3a;
  --ws-coral: #f2855e;
  --ws-ambar: #e9a23b;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; background: var(--papel); }
body { color: var(--tinta); font-family: var(--sans); font-size: 0.9375rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; text-wrap: balance; }
p { margin: 0 0 0.8em; }
a { color: var(--sello-tinta); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2.5px solid var(--sello); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--sello-suave); }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.micro { font-family: var(--mono); font-size: 0.78rem; color: var(--tinta-3); }
.small { font-size: 0.875rem; color: var(--tinta-2); }
.muted { color: var(--tinta-2); }
.ic { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; display: inline-block; vertical-align: -0.28em; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--tinta); color: var(--papel); padding: 10px 14px; border-radius: var(--r-ctl); }
.skip:focus { top: 12px; }

/* ---------- type ---------- */
.display { font-stretch: 118%; font-weight: 760; letter-spacing: -0.015em; }
.page-title { font-size: var(--t-page); font-stretch: 116%; font-weight: 730; letter-spacing: -0.014em; }
.page-title:focus { outline: none; }
.sec-title { font-size: 1.1rem; font-stretch: 106%; font-weight: 660; letter-spacing: -0.006em; }
.h3 { font-size: 1rem; font-weight: 640; }
.lede { font-size: 1.02rem; color: var(--tinta-2); max-width: 62ch; }
/* D2 change 5: on the wider page, long reading text keeps the lede's measure (62ch is about 80 characters in Archivo):
   the notes' sentences and the numbered steps (the Licencias note ran 202 characters on one line at 1920) */
.note > span, .steps li > span { max-width: 62ch; }
.eyebrow { font-family: var(--mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sello-tinta); display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--linea-2); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--sans); font-weight: 620; font-size: 0.93rem; line-height: 1.2; padding: 11px 18px; border-radius: var(--r-ctl); border: 1.5px solid var(--tinta); background: var(--tinta); color: var(--papel); cursor: pointer; text-decoration: none; transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease; white-space: nowrap; }
.btn:hover { background: var(--sello-tinta); border-color: var(--sello-tinta); color: #fff; text-decoration: none; }
.btn .ic { width: 1.15em; height: 1.15em; }
.btn.sec { background: var(--papel-2); color: var(--tinta); border-color: var(--linea-2); }
.btn.sec:hover { border-color: var(--sello-tinta); color: var(--sello-tinta); background: var(--papel-2); }
.btn.sm { padding: 7px 12px; font-size: 0.86rem; }
.btn.block { width: 100%; }
.btn.danger { background: var(--caro); border-color: var(--caro); color: #fff; }
.btn.danger:hover { background: #8f3424; border-color: #8f3424; }
.btn.danger-sec { background: var(--papel-2); color: var(--caro); border-color: var(--linea-2); }
.btn.danger-sec:hover { border-color: var(--caro); color: var(--caro); }
.btn[disabled], .btn[aria-disabled="true"] { background: var(--linea); border-color: var(--linea); color: var(--tinta-3); cursor: not-allowed; }
.btn.sec[disabled] { background: var(--papel-2); border-color: var(--linea); color: var(--tinta-3); } /* round 2: the colour too, or .btn.sec:hover (same weight, earlier) left a disabled button's text purple under the pointer */
.link { background: none; border: 0; padding: 0; color: var(--sello-tinta); font-weight: 560; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-size: inherit; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link.danger { color: var(--caro); }
.iconbtn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: var(--r-ctl); border: 1px solid transparent; background: none; color: var(--tinta-2); cursor: pointer; flex: none; }
.iconbtn:hover { background: var(--papel-2); border-color: var(--linea); color: var(--tinta); }
.iconbtn .ic { width: 20px; height: 20px; }
.row-acts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > label, .label { font-size: 0.875rem; font-weight: 580; color: var(--tinta); }
.field .hint, .hint { font-size: 0.82rem; color: var(--tinta-2); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], select, textarea { width: 100%; font-family: var(--sans); font-size: 0.95rem; color: var(--tinta); background: var(--papel-2); border: 1px solid var(--linea-2); border-radius: var(--r-ctl); padding: 10px 12px; }
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2.5px solid var(--sello); outline-offset: 0; border-color: var(--sello); }
input[disabled], select[disabled] { background: var(--papel); color: var(--tinta-3); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--sello); width: 17px; height: 17px; margin: 0; flex: none; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; font-size: 0.93rem; }
.check input { margin-top: 2px; }
.check .sub { display: block; font-size: 0.82rem; color: var(--tinta-2); }
.check.boxed { border: 1px solid var(--linea); border-radius: var(--r-ctl); padding: 12px 14px; background: var(--papel-2); margin-bottom: 8px; }
.check.boxed:has(input:checked) { border-color: var(--sello); background: var(--sello-suave); }
.check.disabled { color: var(--tinta-3); cursor: default; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.input-row { display: flex; gap: 8px; }
.input-row > input { flex: 1; min-width: 0; }
.chips-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--linea-2); border-radius: var(--r-ctl); padding: 6px 8px; background: var(--papel-2); min-height: 46px; }
.chips-input:focus-within { outline: 2.5px solid var(--sello); border-color: var(--sello); }
.chips-input input { border: 0; outline: 0; padding: 6px 4px; flex: 1; min-width: 180px; }
.chips-input input:focus { outline: 0; }
.email-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--sello-suave); color: var(--sello-tinta); border-radius: var(--r-chip); padding: 3px 4px 3px 9px; font-size: 0.86rem; }
.email-chip button { border: 0; background: none; color: inherit; cursor: pointer; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 4px; padding: 0; }
.email-chip button:hover { background: rgba(58, 52, 163, 0.12); }
.email-chip .ic { width: 15px; height: 15px; }
/* D2 change 6: the workspace colour, the facturillo portal accountant panel's selector (ClientColorSwatches: a ghost
   option per colour, the picked one outlined and checked) in this system's tokens; the radio covers its option */
.color-pick { display: flex; flex-wrap: wrap; gap: 4px; }
.color-opt { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 38px; height: 36px; padding: 0 10px; border: 1px solid transparent; border-radius: var(--r-ctl); cursor: pointer; }
.color-opt:hover { background: var(--papel-2); border-color: var(--linea); }
.color-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.color-opt i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 20%, transparent); flex: none; }
.color-opt .ic { display: none; width: 16px; height: 16px; color: var(--tinta); }
.color-opt:has(input:checked) { background: var(--papel-2); border-color: var(--linea-2); }
.color-opt:has(input:checked) .ic { display: inline-block; }
.color-opt:has(input:focus-visible) { outline: 2.5px solid var(--sello); outline-offset: 2px; }
/* round 2 (O21, call 14): the code-entry boxes (core.js C.codeBoxes), six one-digit fields read as one code, in the
   inputs' own tokens. States: default, focus (the inputs' own ring), filled (:valid), invalid ([aria-invalid], the caro
   tone of .note.warn and .chip.warn), disabled (the inputs' own disabled tone). The boxes shrink on a narrow screen. */
.code-field { margin-bottom: 0; }
.code-boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 52px)); gap: 8px; }
.code-boxes input { height: 56px; padding: 0; text-align: center; font-family: var(--mono); font-size: 1.45rem; font-weight: 600; font-variant-numeric: tabular-nums; caret-color: var(--sello); }
.code-boxes input:valid { border-color: var(--tinta-3); }
.code-boxes input[aria-invalid="true"] { border-color: var(--caro); background: var(--caro-suave); }
.code-boxes input[disabled] { border-color: var(--linea); background: var(--papel); cursor: not-allowed; }

/* ---------- chips, tags, stamp ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; line-height: 1.2; padding: 3px 8px; border-radius: var(--r-chip); background: var(--papel); color: var(--tinta-2); border: 1px solid var(--linea); white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.chip.plain::before { content: none; }
.chip.ok { background: var(--verde-suave); color: var(--verde); border-color: transparent; }
.chip.warn { background: var(--caro-suave); color: var(--caro); border-color: transparent; }
.chip.off { background: var(--papel); color: var(--tinta-2); }
.chip.off::before { background: none; border: 1.5px solid currentColor; width: 6px; height: 6px; }
.chip.sello { background: var(--sello-suave); color: var(--sello-tinta); border-color: transparent; }
.tipo { display: inline-block; font-family: var(--mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.11em; text-transform: uppercase; color: var(--tinta-2); border: 1px solid var(--linea-2); border-radius: 4px; padding: 2px 7px; white-space: nowrap; line-height: 1.5; }
.ejemplo { display: inline-block; font-family: var(--mono); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--caro); border: 1px dashed var(--caro); border-radius: 4px; padding: 1px 6px; white-space: nowrap; line-height: 1.5; }
.ws { display: inline-flex; align-items: center; gap: 6px; font-size: 0.84rem; font-weight: 560; color: var(--tinta); background: var(--papel-2); border: 1px solid var(--linea); border-radius: var(--r-chip); padding: 2px 8px; white-space: nowrap; }
.ws i, .sw { width: 9px; height: 9px; border-radius: 2px; display: inline-block; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cnt { font-family: var(--mono); font-size: 0.72rem; font-weight: 600; background: var(--sello-suave); color: var(--sello-tinta); border-radius: var(--r-chip); padding: 1px 7px; min-width: 22px; text-align: center; line-height: 1.6; }
/* D2 change 2: a cell's pills on one line, the first pill and a "+N" count chip (the .cnt badge as a button, the pill's height) */
.pills { display: inline-flex; align-items: center; gap: 6px; flex-wrap: nowrap; white-space: nowrap; max-width: 100%; vertical-align: middle; }
.cnt.more { border: 1px solid transparent; cursor: pointer; padding: 2px 7px; line-height: 20px; }
.cnt.more:hover { border-color: var(--sello); }
/* its floating list (in the layer of change 1): every pill, wrapping inside a small panel with the menu's surface */
.pop { display: block; max-width: min(300px, calc(100vw - 16px)); padding: 10px; background: var(--papel-2); border: 1px solid var(--linea); border-radius: 9px; box-shadow: var(--sombra-menu); }
.pop[hidden] { display: none; }
.stamp { display: inline-block; font-family: var(--mono); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sello-tinta); border: 1.5px solid currentColor; box-shadow: inset 0 0 0 1.5px var(--papel-2), inset 0 0 0 2.5px currentColor; padding: 6px 12px; border-radius: 4px; transform: rotate(-1.6deg); opacity: 0.94; background: transparent; white-space: nowrap; }
.stamp.verde { color: var(--verde); }
.stamp.caro { color: var(--caro); }
.stamp.gris { color: var(--tinta-3); }
.seal { width: 92px; height: 92px; border-radius: 50%; border: 1.5px solid var(--sello-tinta); box-shadow: inset 0 0 0 3px var(--papel-2), inset 0 0 0 4.2px var(--sello-tinta); display: grid; place-content: center; text-align: center; font-family: var(--mono); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sello-tinta); line-height: 1.5; transform: rotate(4deg); flex: none; }

/* ---------- avatars & marks ---------- */
.av { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--sello-suave); color: var(--sello-tinta); font-size: 0.78rem; font-weight: 680; font-stretch: 110%; flex: none; letter-spacing: 0.02em; }
.av.lg { width: 56px; height: 56px; font-size: 1.15rem; }
.av.tinta { background: var(--tinta); color: var(--papel); }
.orgmark { width: 34px; height: 34px; border-radius: 8px; display: inline-grid; place-items: center; background: var(--tinta); color: var(--papel); font-size: 0.82rem; font-weight: 760; font-stretch: 118%; letter-spacing: 0.02em; flex: none; }
.orgmark.lg { width: 64px; height: 64px; border-radius: 12px; font-size: 1.4rem; }
.orgmark.alt { background: var(--sello-suave); color: var(--sello-tinta); }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who > span:not(.av) { display: block; min-width: 0; }
.who b { font-weight: 620; display: block; }
.who > span:not(.av) > span { display: block; font-size: 0.82rem; color: var(--tinta-2); overflow: hidden; text-overflow: ellipsis; }
.app-icon { width: 30px; height: 30px; border-radius: 22%; flex: none; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--linea); background: var(--papel); padding: 18px 14px 14px; overflow-y: auto; }
.brand { display: inline-flex; align-items: center; gap: 8px; padding: 2px 8px 0; }
.brand img.m { height: 22px; width: auto; }
.brand img.n { height: 18px; width: auto; }
.org { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; padding: 10px; border: 1px solid var(--linea); border-radius: var(--radius); background: var(--papel-2); }
.org b { display: block; font-weight: 640; font-size: 0.92rem; line-height: 1.25; }
.org > div > span { display: block; font-size: 0.78rem; color: var(--tinta-2); }
.ledger-list > li > .tipo { min-width: 116px; text-align: center; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r-ctl); color: var(--tinta); font-weight: 520; font-size: 0.93rem; text-decoration: none; position: relative; }
.nav a .ic { color: var(--tinta-2); width: 20px; height: 20px; }
.nav a:hover { background: var(--papel-2); }
.nav a[aria-current="page"] { background: var(--sello-suave); color: var(--sello-tinta); font-weight: 620; }
.nav a[aria-current="page"] .ic { color: var(--sello-tinta); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--sello); }
.nav a .cnt { margin-left: auto; }
.nav-sect { font-family: var(--mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tinta-3); padding: 18px 10px 6px; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--linea); position: relative; }
.me-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-ctl); border: 1px solid transparent; background: none; cursor: pointer; text-align: left; }
.me-btn:hover { background: var(--papel-2); border-color: var(--linea); }
.me-btn .who { flex: 1; }
.me-btn .ic { color: var(--tinta-2); }
.topbar { display: none; }
.main { min-width: 0; }
.page { max-width: 1600px; margin: 0 auto; padding: 26px clamp(20px, 3.4vw, 44px) 120px; } /* D2 change 5: was 1180px, left-aligned */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 0.86rem; color: var(--tinta-2); margin: 0 0 10px; padding: 0; list-style: none; }
.crumbs a { color: var(--tinta-2); }
.crumbs a:hover { color: var(--sello-tinta); }
.crumbs li + li::before { content: "›"; color: var(--tinta-3); margin-right: 6px; }
.crumbs [aria-current] { color: var(--tinta); font-weight: 560; }
.page-head { display: flex; gap: 16px 24px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .lede { margin: 8px 0 0; }
.page-head .row-acts { margin-bottom: 2px; }
.head-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 10px; }

/* ---------- sections, cards, lists ---------- */
section.sec { margin-top: 30px; } /* scoped: ".sec" alone is also the brand's secondary button (.btn.sec) */
section.sec:first-child { margin-top: 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card { background: var(--papel-2); border: 1px solid var(--linea); border-radius: var(--radius); padding: 20px 22px; }
.card.pad-s { padding: 16px 18px; }
.card .tag { font-family: var(--mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.11em; text-transform: uppercase; color: var(--tinta-3); display: inline-block; margin-bottom: 10px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.stack > * + * { margin-top: 18px; }
.ledger-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linea); }
.ledger-list > li { display: flex; gap: 14px; align-items: center; padding: 13px 2px; border-bottom: 1px solid var(--linea); }
.ledger-list .grow { flex: 1; min-width: 0; }
.ledger-list .t { font-weight: 600; display: block; color: var(--tinta); }
.ledger-list a.t:hover { color: var(--sello-tinta); }
.ledger-list .s { display: block; font-size: 0.84rem; color: var(--tinta-2); }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 10px 18px; margin: 0; }
.kv dt { color: var(--tinta-2); font-size: 0.88rem; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv.w200 { grid-template-columns: 200px 1fr; }
.ws-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--tinta); transition: border-color 0.15s ease; min-height: 150px; }
a.ws-card:hover { border-color: var(--sello); text-decoration: none; }
.ws-card .nm { display: flex; align-items: center; gap: 9px; font-size: 1.08rem; font-weight: 660; font-stretch: 106%; }
.ws-card .nm .sw { width: 12px; height: 12px; border-radius: 3px; }
.ws-card p { color: var(--tinta-2); font-size: 0.9rem; margin: 0; }
.ws-card .facts { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--linea-2); display: flex; gap: 18px; font-size: 0.86rem; color: var(--tinta-2); }
.ws-card .facts b { font-family: var(--mono); color: var(--tinta); font-weight: 600; }
.item-card { display: grid; gap: 8px; text-decoration: none; color: var(--tinta); }
a.item-card:hover { border-color: var(--sello); text-decoration: none; }
.item-card .t { font-weight: 640; font-size: 1rem; }
.item-card .meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.note { border-left: 2px solid var(--sello); background: var(--papel-2); padding: 12px 16px; border-radius: 0 var(--r-ctl) var(--r-ctl) 0; font-size: 0.92rem; display: flex; gap: 10px; align-items: flex-start; }
.note .ic { color: var(--sello-tinta); margin-top: 1px; }
.note.warn { border-left-color: var(--caro); background: var(--caro-suave); }
.note.warn .ic { color: var(--caro); }
.note.ok { border-left-color: var(--verde); background: var(--verde-suave); }
.note.ok .ic { color: var(--verde); }
.note p { margin: 0; }
.note .grow { flex: 1; }
.empty { border: 1px dashed var(--linea-2); border-radius: var(--radius); padding: 36px 24px; text-align: center; color: var(--tinta-2); background: transparent; }
.empty .ic { width: 30px; height: 30px; color: var(--tinta-3); margin-bottom: 8px; }
.empty b { display: block; color: var(--tinta); font-size: 1.02rem; margin-bottom: 4px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--tinta-3); font-size: 0.84rem; margin: 18px 0; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--linea); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: paso; display: grid; gap: 12px; }
.steps li { counter-increment: paso; display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.steps li::before { content: counter(paso); font-family: var(--mono); font-weight: 600; font-size: 0.8rem; width: 26px; height: 26px; border: 1.5px solid var(--tinta); border-radius: 50%; display: grid; place-items: center; }
.flow { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; list-style: none; margin: 0; padding: 0; counter-reset: f; }
.flow li { counter-increment: f; display: inline-flex; align-items: center; gap: 8px; background: var(--papel-2); border: 1px solid var(--linea); border-radius: var(--r-ctl); padding: 8px 12px; font-weight: 560; font-size: 0.9rem; }
.flow li::before { content: counter(f); font-family: var(--mono); font-size: 0.72rem; font-weight: 600; color: var(--sello-tinta); }
.flow li + li::after { content: none; }
.flow .sep { color: var(--tinta-3); background: none; border: 0; padding: 0; }
.flow .sep::before { content: none; }
.barra { height: 10px; border-radius: 5px; background: var(--linea); overflow: hidden; margin: 10px 0 6px; }
.barra > span { display: block; height: 100%; background: var(--sello); border-radius: 5px 0 0 5px; }
.figure { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; }
.inc-list { columns: 2; column-gap: 28px; margin: 0; padding: 0; list-style: none; }
.inc-list li { break-inside: avoid; display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; font-size: 0.93rem; }
.inc-list .ic { color: var(--verde); margin-top: 1px; }
.addr { display: flex; align-items: stretch; border: 1px solid var(--linea-2); border-radius: var(--r-ctl); background: var(--papel-2); overflow: hidden; }
.addr code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 0.98rem; padding: 12px 14px; color: var(--tinta); overflow-x: auto; white-space: nowrap; }
.addr button { border: 0; border-left: 1px solid var(--linea-2); background: var(--papel); padding: 0 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.88rem; }
.addr button:hover { background: var(--sello-suave); color: var(--sello-tinta); }
.q-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.q-list li { background: var(--papel-2); border: 1px solid var(--linea); border-radius: var(--radius); padding: 12px 14px; font-size: 0.93rem; }
.scope { font-family: var(--mono); font-size: 0.84rem; color: var(--tinta-3); border-left: 2px solid var(--sello); padding-left: 10px; line-height: 1.6; }
.price { font-stretch: 116%; font-weight: 760; font-size: 1.9rem; letter-spacing: -0.015em; line-height: 1; }
.price small { font-size: 0.95rem; font-weight: 520; font-stretch: 100%; color: var(--tinta-2); letter-spacing: 0; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--linea-2); border-radius: var(--r-ctl); background: var(--papel-2); }
.stepper button { width: 40px; height: 40px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--tinta); }
.stepper button:hover { background: var(--sello-suave); color: var(--sello-tinta); }
.stepper button[disabled] { color: var(--linea-2); cursor: not-allowed; background: none; }
.stepper output { min-width: 46px; text-align: center; font-family: var(--mono); font-weight: 600; font-size: 1.05rem; border-left: 1px solid var(--linea); border-right: 1px solid var(--linea); line-height: 40px; }
.summary { border: 1px solid var(--linea); border-radius: var(--radius); background: var(--papel); padding: 4px 16px; }
.summary .ln { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--linea-2); font-size: 0.93rem; }
.summary .ln:last-child { border-bottom: 0; }
.summary .ln b { font-family: var(--mono); font-weight: 600; text-align: right; }
.card-line { display: flex; align-items: center; gap: 12px; border: 1px solid var(--linea); border-radius: var(--r-ctl); padding: 12px 14px; background: var(--papel-2); }
.card-line .ic { color: var(--tinta-2); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--linea); margin: 0 0 22px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; color: var(--tinta-2); font-weight: 560; font-size: 0.93rem; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.tabs a:hover, .tabs button:hover { color: var(--tinta); text-decoration: none; }
.tabs [aria-selected="true"], .tabs [aria-current="page"] { color: var(--tinta); border-bottom-color: var(--sello); font-weight: 640; }
.tabs.small a, .tabs.small button { padding: 8px 10px; font-size: 0.88rem; }

/* ---------- tables ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .search { position: relative; flex: 1 1 240px; max-width: 340px; }
.toolbar .search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--tinta-3); width: 18px; height: 18px; pointer-events: none; }
.toolbar .search input { padding-left: 36px; }
.toolbar select { width: auto; min-width: 150px; padding: 9px 30px 9px 11px; }
.toolbar .count { margin-left: auto; }
.tabla { border: 1px solid var(--linea); border-radius: var(--radius); background: var(--papel-2); overflow-x: auto; }
.tabla table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tabla th { font-family: var(--mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.11em; text-transform: uppercase; color: var(--tinta-3); text-align: left; padding: 0; border-bottom: 1px solid var(--linea); white-space: normal; vertical-align: bottom; }
.tabla th > span, .tabla th > button { display: flex; align-items: center; gap: 4px; padding: 12px 12px; }
.tabla th > button { width: 100%; border: 0; background: none; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; text-align: left; }
.tabla th > button:hover { color: var(--tinta); }
.tabla th > button .ic { width: 15px; height: 15px; opacity: 0.55; }
.tabla th[aria-sort="ascending"] > button, .tabla th[aria-sort="descending"] > button { color: var(--sello-tinta); }
.tabla th[aria-sort="ascending"] > button .ic, .tabla th[aria-sort="descending"] > button .ic { opacity: 1; }
.tabla td { padding: 12px 12px; border-bottom: 1px solid var(--linea); vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tbody tr:hover td { background: #fcfbf9; }
.tabla td.t-main { font-weight: 600; }
.tabla td.t-main a { color: var(--tinta); }
.tabla td.t-main a:hover { color: var(--sello-tinta); }
.tabla td.t-acts { text-align: right; white-space: nowrap; width: 1%; }
.tabla td.t-acts .row-acts { flex-wrap: nowrap; } /* D2 change 4: a row's actions side by side (Reenviar and Revocar) */
/* D2 changes 3 and 7: a row that opens a side panel; the whole row is the control and ends with a chevron */
.tabla tr.go { cursor: pointer; }
.tabla tr.go:focus-visible { outline: 2.5px solid var(--sello); outline-offset: -2.5px; }
.tabla td.t-go { width: 1%; padding-left: 0; text-align: right; }
.go-chev { display: inline-block; font-size: 1.4rem; line-height: 1; color: var(--tinta-3); }
.tabla tr.go:hover .go-chev, .tabla tr.go:focus-visible .go-chev { color: var(--sello-tinta); }
.tabla td .sub { display: block; font-weight: 400; font-size: 0.82rem; color: var(--tinta-2); }
.nw { white-space: nowrap; }
.tabla .empty-row td { text-align: center; color: var(--tinta-2); padding: 28px; }
.tsort { display: none; }
.menu-wrap { position: relative; display: inline-block; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 40; min-width: 230px; background: var(--papel-2); border: 1px solid var(--linea); border-radius: 9px; box-shadow: var(--sombra-menu); padding: 6px; display: grid; gap: 1px; text-align: left; }
.menu[hidden] { display: none; }
.menu.up { top: auto; bottom: calc(100% + 6px); left: 0; right: 0; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--tinta); font-size: 0.92rem; text-decoration: none; white-space: nowrap; }
.menu button:hover, .menu a:hover, .menu button:focus-visible, .menu a:focus-visible { background: var(--sello-suave); color: var(--sello-tinta); text-decoration: none; outline: none; }
.menu .ic { color: var(--tinta-2); width: 19px; height: 19px; }
.menu .danger { color: var(--caro); }
.menu .danger .ic { color: var(--caro); }
.menu hr { border: 0; border-top: 1px solid var(--linea); margin: 4px 2px; }
/* D2 change 1: the floating layer. An open menu or "+N" list is moved here and fixed from its trigger's box (core.js
   C.place sets left and top), so no table's scrolling or clipping box can cut it */
#pop-root { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 150; }
#pop-root > .menu, #pop-root > .pop { position: fixed; right: auto; bottom: auto; margin: 0; max-height: calc(100vh - 16px); overflow-y: auto; }

/* ---------- overlays ---------- */
.velo { position: fixed; inset: 0; background: var(--velo); z-index: 100; }
.ov { position: fixed; z-index: 101; background: var(--papel-2); display: flex; flex-direction: column; max-height: 100vh; }
.ov.modal { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border-radius: 12px; box-shadow: var(--sombra); }
.ov.modal.wide { width: min(680px, calc(100vw - 32px)); }
.ov.drawer { right: 0; top: 0; bottom: 0; width: min(460px, 100vw); border-left: 1px solid var(--linea); box-shadow: var(--sombra); }
.ov.drawer.left { right: auto; left: 0; border-left: 0; border-right: 1px solid var(--linea); width: min(300px, 88vw); }
.ov-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--linea); }
.ov-head h2 { font-size: 1.15rem; font-stretch: 108%; font-weight: 680; padding-top: 6px; }
.ov-head .sub { font-size: 0.86rem; color: var(--tinta-2); margin-top: 4px; }
.ov-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.ov-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--linea); background: var(--papel); border-radius: 0 0 12px 12px; }
.ov.drawer .ov-foot { border-radius: 0; }
.ov-foot .grow { margin-right: auto; align-self: center; font-size: 0.88rem; color: var(--tinta-2); }
.consequence { font-size: 0.9rem; font-weight: 600; color: var(--tinta); display: flex; align-items: center; gap: 8px; }
.ov-foot .consequence { flex: 1 1 100%; flex-wrap: wrap; }
.check.boxed .av { background: var(--papel-2); box-shadow: inset 0 0 0 1px var(--linea-2); }
.consequence .ic { color: var(--sello-tinta); }
@media (prefers-reduced-motion: no-preference) {
  .ov.drawer { animation: entra-der 0.18s ease-out; }
  .ov.drawer.left { animation: entra-izq 0.18s ease-out; }
  .ov.modal { animation: entra-modal 0.16s ease-out; }
  @keyframes entra-der { from { transform: translateX(24px); opacity: 0.4; } to { transform: none; opacity: 1; } }
  @keyframes entra-izq { from { transform: translateX(-24px); opacity: 0.4; } to { transform: none; opacity: 1; } }
  @keyframes entra-modal { from { transform: translate(-50%, calc(-50% + 10px)); opacity: 0.4; } to { transform: translate(-50%, -50%); opacity: 1; } }
  .stamp.lands { animation: sellar 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  @keyframes sellar { from { transform: rotate(-9deg) scale(1.5); opacity: 0; } to { transform: rotate(-1.6deg) scale(1); opacity: 0.94; } }
}
.toasts { position: fixed; left: 20px; bottom: 20px; z-index: 160; display: grid; gap: 8px; }
.toast { background: var(--tinta); color: var(--papel); border-radius: 9px; padding: 11px 16px; font-size: 0.9rem; box-shadow: var(--sombra-menu); display: flex; gap: 10px; align-items: center; max-width: 380px; }
.toast .ic { color: #9be2c2; }

/* ---------- entry pages (acceso, bienvenida) ---------- */
.entry { min-height: 100vh; display: flex; flex-direction: column; }
.entry-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px clamp(20px, 4vw, 48px); border-bottom: 1px solid var(--linea); }
.entry-top .brand img.m { height: 26px; }
.entry-top .brand img.n { height: 21px; }
.entry-main { flex: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px) 110px; }
.entry-main.narrow { max-width: 640px; }
.entry-foot { border-top: 1px solid var(--linea); padding: 18px clamp(20px, 4vw, 48px) 26px; font-family: var(--mono); font-size: 0.78rem; color: var(--tinta-3); display: flex; flex-wrap: wrap; gap: 8px 24px; }
.entry-foot .sep { flex: 1; }
.entry-title { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-stretch: 120%; font-weight: 790; letter-spacing: -0.02em; margin-bottom: 10px; }
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 28px; }
.door { background: var(--papel-2); border: 1px solid var(--linea); border-radius: 12px; padding: 24px 26px 26px; }
.door-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.door-head h2 { font-size: 1.2rem; font-stretch: 108%; font-weight: 680; }
.door-head .logo-n { height: 30px; width: 30px; display: grid; place-items: center; border-radius: 50%; }
.one-account { margin-top: 18px; display: flex; gap: 10px; align-items: center; color: var(--tinta-2); font-size: 0.93rem; }
.one-account .ic { color: var(--sello-tinta); }
.qr-wrap { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start; }
.qr-frame { position: relative; width: 196px; height: 196px; padding: 14px; background: var(--papel-2); }
.qr-frame img.qr { width: 168px; height: 168px; }
.qr-frame .corner { position: absolute; width: 22px; height: 22px; border-color: var(--tinta); border-style: solid; border-width: 0; }
.qr-frame .c1 { left: 0; top: 0; border-left-width: 2.5px; border-top-width: 2.5px; border-top-left-radius: 6px; }
.qr-frame .c2 { right: 0; top: 0; border-right-width: 2.5px; border-top-width: 2.5px; border-top-right-radius: 6px; }
.qr-frame .c3 { left: 0; bottom: 0; border-left-width: 2.5px; border-bottom-width: 2.5px; border-bottom-left-radius: 6px; }
.qr-frame .c4 { right: 0; bottom: 0; border-right-width: 2.5px; border-bottom-width: 2.5px; border-bottom-right-radius: 6px; }
.qr-frame.off img.qr { opacity: 0.12; }
.qr-frame.ok img.qr { opacity: 0.18; }
.qr-over { position: absolute; inset: 14px; display: grid; place-items: center; text-align: center; }
.qr-over .badge { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--papel-2); border: 1px solid var(--linea-2); color: var(--tinta-2); }
.qr-over .badge .ic { width: 28px; height: 28px; }
.match { display: flex; align-items: baseline; gap: 10px; margin: 2px 0 6px; }
.match .code { font-family: var(--mono); font-size: 2.2rem; font-weight: 600; letter-spacing: 0.06em; line-height: 1; color: var(--tinta); }
.timer { display: inline-flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--tinta-2); margin-top: 12px; }
.timer .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--verde); }
.timer .num { color: var(--tinta); font-weight: 600; }
.qr-steps { margin-top: 18px; }
.same-device { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--linea-2); font-size: 0.9rem; }
.social { display: flex; flex-direction: column; gap: 10px; }
.social .btn { justify-content: center; }
.social img { width: 18px; height: 18px; }
.solo { max-width: 600px; margin: 0 auto; }
.solo-head { text-align: left; margin-bottom: 22px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.choice { display: flex; flex-direction: column; gap: 8px; background: var(--papel-2); border: 1px solid var(--linea); border-radius: 12px; padding: 22px; }
.choice .ic.big { width: 30px; height: 30px; color: var(--sello-tinta); }
.choice h2 { font-size: 1.12rem; font-stretch: 106%; font-weight: 680; }
.choice p { color: var(--tinta-2); font-size: 0.92rem; margin: 0; }
.choice .btn { margin-top: auto; align-self: flex-start; }
.invite-card { background: var(--papel-2); border: 1px solid var(--linea); border-radius: 12px; padding: 24px; }
.invite-card .facts { display: grid; grid-template-columns: 150px 1fr; gap: 12px 18px; margin: 18px 0; padding: 16px 0; border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); }
.invite-card .facts dt { color: var(--tinta-2); font-size: 0.88rem; }
.invite-card .facts dd { margin: 0; }
.radio-list { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.radio-list label { display: flex; gap: 14px; align-items: center; border: 1px solid var(--linea); border-radius: var(--radius); padding: 14px 16px; background: var(--papel-2); cursor: pointer; }
.radio-list label:has(input:checked) { border-color: var(--sello); background: var(--sello-suave); }
.radio-list .grow { flex: 1; }
.radio-list b { display: block; font-weight: 640; }
.radio-list span.s { display: block; font-size: 0.85rem; color: var(--tinta-2); }
.big-ic { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--sello-suave); color: var(--sello-tinta); margin-bottom: 16px; }
.big-ic .ic { width: 28px; height: 28px; }
.big-ic.warn { background: var(--caro-suave); color: var(--caro); }
.big-ic.ok { background: var(--verde-suave); color: var(--verde); }

/* ---------- content pages ---------- */
.content-head .t-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sheet-wrap { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--radius); padding: clamp(18px, 4vw, 40px); display: grid; place-items: center; }
.sheet { width: min(100%, 560px); aspect-ratio: 210 / 297; background: var(--papel-2); border: 1px solid var(--linea); border-radius: 3px; box-shadow: var(--sombra); padding: 9% 9% 7%; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.sheet .s-brand { display: flex; align-items: center; gap: 6px; }
.sheet .s-brand img.m { height: 14px; }
.sheet .s-brand img.n { height: 11px; }
.sheet .s-kicker { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tinta-3); margin-top: 6px; }
.sheet .s-title { font-size: clamp(1rem, 2.2vw, 1.35rem); font-stretch: 118%; font-weight: 780; letter-spacing: -0.012em; line-height: 1.12; }
.sheet .s-for { font-size: 0.72rem; color: var(--tinta-2); }
.sheet .s-h { font-size: 0.82rem; font-weight: 660; margin-top: 8px; }
.sheet .ln { height: 7px; border-radius: 3px; background: var(--linea); }
.sheet .ln.w9 { width: 92%; } .sheet .ln.w8 { width: 84%; } .sheet .ln.w7 { width: 70%; } .sheet .ln.w5 { width: 52%; }
.sheet .frame { flex: 1; min-height: 70px; border: 1.5px dashed var(--linea-2); border-radius: 4px; display: grid; place-items: center; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tinta-3); margin: 6px 0; }
.lock-panel { max-width: 560px; }
.lic-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.lic-bar .figure { font-size: 1.25rem; }

/* ---------- reviewer control (MAQUETA, not product) ---------- */
.mq { position: fixed; right: 16px; bottom: 16px; z-index: 200; font-family: var(--mono); }
body.ov-open .mq { visibility: hidden; } /* the reviewer control never covers a drawer's or a sheet's buttons */
.mq-toggle { display: inline-flex; align-items: center; gap: 10px; background: var(--noche); color: var(--papel-en-noche); border: 1px dashed #4b4f5c; border-radius: 9px; padding: 9px 14px; cursor: pointer; font-family: var(--mono); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; box-shadow: 0 10px 26px -14px rgba(0, 0, 0, 0.6); }
.mq-toggle .lbl { text-transform: uppercase; letter-spacing: 0.14em; color: #f3d38a; }
.mq-toggle:focus-visible { outline-color: #f3d38a; }
.mq-panel { position: absolute; right: 0; bottom: calc(100% + 8px); width: min(360px, calc(100vw - 32px)); max-height: min(78vh, 720px); overflow-y: auto; background: var(--noche); color: var(--papel-en-noche); border: 1px dashed #4b4f5c; border-radius: 12px; padding: 14px 16px 16px; box-shadow: 0 22px 44px -22px rgba(0, 0, 0, 0.7); }
.mq-panel[hidden] { display: none; }
.mq-panel h2 { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: #f3d38a; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mq-tag { font-size: 0.66rem; letter-spacing: 0.1em; border: 1px solid #f3d38a; color: #f3d38a; border-radius: 4px; padding: 2px 6px; text-transform: uppercase; }
.mq-note { font-size: 0.72rem; color: #a5aab6; margin: 8px 0 12px; line-height: 1.5; font-family: var(--sans); }
.mq-h { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: #a5aab6; margin: 14px 0 6px; }
.mq-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--noche-2); padding: 4px; border-radius: 8px; }
.mq-seg.two { grid-template-columns: 1fr 1fr; }
.mq-seg button { border: 0; background: none; color: #c8ccd6; font-family: var(--sans); font-size: 0.8rem; font-weight: 560; padding: 7px 4px; border-radius: 6px; cursor: pointer; }
.mq-seg button[aria-pressed="true"] { background: var(--papel-en-noche); color: var(--noche); font-weight: 680; }
.mq-seg button:focus-visible, .mq-panel a:focus-visible, .mq-panel button:focus-visible { outline: 2px solid #f3d38a; outline-offset: 1px; }
.mq-index { list-style: none; margin: 0; padding: 0; font-family: var(--sans); }
.mq-index .grp { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: #8a8f99; padding: 10px 0 3px; border-top: 1px solid #262833; margin-top: 6px; }
.mq-index .grp:first-child { border-top: 0; margin-top: 0; padding-top: 2px; }
.mq-index a { display: flex; justify-content: space-between; gap: 8px; color: #dfe2ea; font-size: 0.82rem; padding: 4px 6px; border-radius: 5px; text-decoration: none; }
.mq-index a:hover { background: var(--noche-2); text-decoration: none; }
.mq-index a[aria-current="page"] { background: #262833; color: #fff; }
.mq-index a .p { font-family: var(--mono); font-size: 0.64rem; color: #8a8f99; }

/* grid and flex children may shrink below their content (long addresses scroll inside their own box) */
.cols > *, .doors > *, .choice-grid > *, .grid-2 > *, .grid-3 > *, .qr-wrap > *, .form-grid > * { min-width: 0; }

/* ---------- admin screens: requests, store, billing, settings ---------- */
.hello { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.req { display: grid; gap: 12px; }
.req + .req { margin-top: 14px; }
.req-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.req-what { font-size: 1rem; font-weight: 620; margin: 0; }
.req-what .s { display: block; font-weight: 400; font-size: 0.88rem; color: var(--tinta-2); margin-top: 2px; }
.req-msg { margin: 0; padding: 10px 14px; border-left: 2px solid var(--linea-2); background: var(--papel); border-radius: 0 var(--r-ctl) var(--r-ctl) 0; color: var(--tinta-2); font-size: 0.92rem; }
.req-ctl { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 4px 22px; align-items: start; padding-top: 12px; border-top: 1px dashed var(--linea-2); }
.req-ctl .field { margin-bottom: 8px; }
.req-ctl fieldset { border: 0; padding: 0; margin: 0; }
.req-ctl .chks { display: flex; flex-wrap: wrap; gap: 0 18px; }
.prod { display: flex; flex-direction: column; gap: 10px; }
.prod h2 { font-size: 1.3rem; font-stretch: 112%; font-weight: 720; letter-spacing: -0.01em; }
.prod p { margin: 0; }
.prod-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--linea-2); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rep { display: flex; flex-direction: column; gap: 6px; }
.rep h3 { font-size: 1.02rem; font-weight: 660; }
.rep p { margin: 0; color: var(--tinta-2); font-size: 0.9rem; }
.rep .foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price-box { display: grid; gap: 14px; }
.price-box .tot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 12px; border-top: 1px dashed var(--linea-2); }
.price-box .tot b { font-family: var(--mono); font-weight: 600; }
.ok-box { display: grid; justify-items: start; gap: 12px; }
.resolved > li { align-items: flex-start; }
.switch-row { display: flex; align-items: center; gap: 14px; padding: 14px 2px; border-bottom: 1px solid var(--linea); }
.switch-row:first-child { border-top: 1px solid var(--linea); }
.switch-row .grow { flex: 1; min-width: 0; }
.switch-row b { display: block; font-weight: 620; }
.switch-row .s { display: block; font-size: 0.85rem; color: var(--tinta-2); }
.switch-row img { width: 22px; height: 22px; }
.switch { appearance: none; -webkit-appearance: none; width: 42px !important; height: 24px !important; border-radius: 12px; background: var(--linea-2); position: relative; cursor: pointer; flex: none; transition: background 0.15s ease; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--papel-2); transition: transform 0.15s ease; box-shadow: 0 1px 2px rgba(21, 23, 28, 0.25); }
.switch:checked { background: var(--sello); }
.switch:checked::after { transform: translateX(18px); }
.switch[disabled] { opacity: 0.5; cursor: not-allowed; }
.staff { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px clamp(20px, 4vw, 48px); background: var(--caro-suave); border-bottom: 1px solid var(--linea); }
.profile { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.profile .nm { font-size: 1.3rem; font-stretch: 110%; font-weight: 700; }
.mono-line { font-family: var(--mono); font-size: 0.86rem; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .cols { grid-template-columns: minmax(0, 1fr); }
  .cols > .lead { order: -1; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 50; align-items: center; gap: 10px; padding: 10px 14px; background: var(--papel); border-bottom: 1px solid var(--linea); }
  .topbar .org-n { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; font-weight: 640; font-size: 0.95rem; }
  .topbar .org-n span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .orgmark { width: 30px; height: 30px; font-size: 0.75rem; border-radius: 7px; }
  .ov.drawer.left .side-in { display: flex; flex-direction: column; min-height: 100%; }
  .doors { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .page { padding: 18px 16px 120px; }
  .grid-2, .grid-3, .choice-grid, .form-grid, .q-list { grid-template-columns: minmax(0, 1fr); }
  .inc-list { columns: 1; }
  .kv, .kv.w200, .invite-card .facts { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd, .invite-card .facts dd { margin-bottom: 10px; }
  .page-head { align-items: flex-start; }
  .page-head .row-acts { width: 100%; }
  .qr-wrap { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .qr-wrap .match { justify-content: center; }
  .qr-steps { text-align: left; }
  .door { padding: 20px 18px 22px; }
  .toolbar .search { max-width: none; flex-basis: 100%; }
  .toolbar select { flex: 1 1 140px; }
  .toolbar .count { margin-left: 0; }
  .tsort { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 0.86rem; color: var(--tinta-2); }
  .tsort { white-space: nowrap; }
  .tsort select { width: auto; flex: 1 1 auto; min-width: 0; padding: 8px 10px; }
  .tabla.cards { border: 0; background: none; overflow: visible; }
  .tabla.cards table, .tabla.cards tbody, .tabla.cards tr, .tabla.cards td { display: block; width: 100%; }
  .tabla.cards thead { display: none; }
  .tabla.cards tr { background: var(--papel-2); border: 1px solid var(--linea); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 10px; }
  .tabla.cards tbody tr:hover td { background: none; }
  .tabla.cards td { border: 0; padding: 5px 0; display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; align-items: baseline; }
  .tabla.cards td > * { justify-self: start; }
  .tabla.cards td { overflow-wrap: anywhere; }
  .tabla.cards td::before { content: attr(data-label); font-family: var(--mono); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tinta-3); }
  .tabla.cards td.t-main { grid-template-columns: minmax(0, 1fr); font-size: 1rem; padding-bottom: 8px; }
  .tabla.cards td.t-main::before { content: none; }
  .tabla.cards td.t-acts { grid-template-columns: minmax(0, 1fr); text-align: left; width: auto; padding-top: 8px; border-top: 1px dashed var(--linea-2); margin-top: 4px; }
  .tabla.cards td.t-acts::before { content: none; }
  /* D2: an open menu now sits in the floating layer, so the former .t-acts .menu placement rule is gone; a row that opens
     a side panel is a card whose chevron sits at its top right, beside the name */
  .tabla.cards tr.go { position: relative; }
  .tabla.cards tr.go td.t-main { padding-right: 26px; }
  .tabla.cards td.t-go { position: absolute; top: 17px; right: 14px; width: auto; padding: 0; display: block; }
  .tabla.cards td.t-go::before { content: none; }
  .tabla.cards .empty-row td { grid-template-columns: 1fr; }
  .tabla.cards .empty-row td::before { content: none; }
  .ov.modal { top: auto; bottom: 0; left: 0; right: 0; transform: none; width: 100%; max-height: 92vh; border-radius: 14px 14px 0 0; }
  .ov.modal.wide { width: 100%; }
  .ov-foot { border-radius: 0; }
  .ov-foot .btn { flex: 1 1 auto; }
  @media (prefers-reduced-motion: no-preference) {
    .ov.modal { animation: entra-abajo 0.18s ease-out; }
    @keyframes entra-abajo { from { transform: translateY(30px); opacity: 0.4; } to { transform: none; opacity: 1; } }
  }
  .mq { right: 10px; bottom: 10px; }
  .mq-toggle { padding: 8px 11px; }
  .mq-toggle .who-now { display: none; }
  .entry-top { padding: 14px 16px; }
  .entry-main { padding: 24px 16px 110px; }
  .lic-bar { align-items: flex-start; }
  .addr button span { display: none; }
  .req-ctl { grid-template-columns: 1fr; }
  .ledger-list > li > .tipo { min-width: 0; }
  .switch-row { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
