/* =========================================================
   Rivadex Contable — estilos (página pública + aplicación)
   Sin estilos en línea: la política de seguridad (CSP) los bloquea.
   ========================================================= */

:root {
  --ivory: #FAF9F5;
  --pampas: #F0EEE6;
  --paper: #FFFFFF;
  --ink: #141413;
  --ink-2: #1F1E1C;
  --body: #3D3D3A;
  --muted: #6B6A64;
  --line: #DEDCD1;
  --line-strong: #C9C6BA;
  --clay: #D97757;
  --clay-deep: #A8502F;
  --green: #2F6B3B;
  --green-soft: #E3EFE2;
  --red: #B54A2F;
  --red-soft: #F7E4DD;
  --amber: #8A6212;
  --amber-soft: #F6ECCF;
  --darkline: #34332F;
  --on-dark-muted: #A8A69D;

  --font-serif: "Source Serif 4", Georgia, serif;
  --font-display: "Sora", "Geist", system-ui, sans-serif;
  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 1px 2px rgba(20, 20, 19, .04), 0 8px 24px -12px rgba(20, 20, 19, .12);
  --shadow-lift: 0 24px 48px -24px rgba(20, 20, 19, .3);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 15px/1.6 var(--font-sans); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
h1, h2, h3 { text-wrap: balance; font-family: var(--font-display); letter-spacing: -0.025em; }
p { text-wrap: pretty; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--clay); color: #fff; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Piezas comunes ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px;
  border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap;
  font-weight: 500; font-size: 14px; line-height: 1.2; background: var(--pampas); color: var(--ink);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--ink); color: var(--ivory); }
.btn--clay { background: var(--clay); color: #fff; }
.btn--light { background: var(--ivory); color: var(--ink); }
.btn--ghost { background: transparent; border-color: var(--line); }
.btn--danger { background: transparent; border-color: #E2BFB3; color: var(--red); }
.btn--lg { padding: 14px 24px; font-size: 15px; }
.btn--sm { padding: 6px 12px; font-size: 13px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.arrow { display: inline-block; transition: transform .25s var(--ease-out); }

.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 100px; font-weight: 600; font-size: 11px; line-height: 1.6; letter-spacing: .03em; text-transform: uppercase; background: var(--pampas); color: var(--body); white-space: nowrap; }
.badge--ok { background: var(--green-soft); color: var(--green); }
.badge--warn { background: var(--amber-soft); color: var(--amber); }
.badge--danger { background: var(--red-soft); color: var(--red); }
.badge--clay { background: rgba(217, 119, 87, .16); color: var(--clay-deep); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .label { font-weight: 500; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--body); }
.field small { font-size: 12px; color: var(--muted); }
.input, .field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper);
  font-size: 15px; line-height: 1.4; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field select, select.input { appearance: none; padding-right: 34px; background-repeat: no-repeat; background-position: right 12px center; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23141413' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20, 20, 19, .08); }
.field ::placeholder { color: #8F8E87; }
.field--error input, .field--error select { border-color: var(--red); }
.field__error { font-size: 12px; color: var(--red); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--body); cursor: pointer; }
.check input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ink); }
.check a, .link { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; border: 1px solid; }
.alert--ok { background: var(--green-soft); border-color: #C5DCC3; color: var(--green); }
.alert--error { background: var(--red-soft); border-color: #E9C6BA; color: var(--red); }
.alert--info { background: var(--amber-soft); border-color: #E8D9A8; color: var(--amber); }
.alert ul { list-style: disc; padding-left: 18px; }

/* =========================================================
   Página pública
   ========================================================= */
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.eyebrow { font-weight: 500; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--clay-deep); }
.lead { font-family: var(--font-serif); font-size: clamp(18px, 1.7vw, 21px); line-height: 1.5; color: var(--body); }
.h-display { font-weight: 600; font-size: clamp(38px, 5.4vw, 68px); line-height: 1.03; letter-spacing: -0.04em; }
.h-display em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; color: var(--clay-deep); }
.h-section { font-weight: 500; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.1; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section__head { display: flex; flex-direction: column; gap: 14px; max-width: 640px; margin-bottom: 48px; }

.site-nav { position: sticky; top: 0; z-index: 50; background: var(--ivory); border-bottom: 1px solid transparent; transition: border-color .25s var(--ease), box-shadow .25s var(--ease); }
.site-nav.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px -18px rgba(20, 20, 19, .35); }
.site-nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.brand__mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: var(--ivory); }
.brand__mark svg { width: 17px; height: 17px; }
.brand small { font-family: var(--font-sans); font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--clay-deep); }
.site-nav__links { display: flex; gap: 28px; font-weight: 500; font-size: 14px; color: var(--body); }
.site-nav__links a { transition: color .2s var(--ease); }
.site-nav__cta { display: flex; gap: 8px; align-items: center; }

.hero { padding: clamp(48px, 7vw, 88px) 0 0; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero__note { font-size: 13px; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 100px; background: var(--pampas); font-weight: 500; font-size: 13px; }
.pill b { color: var(--clay-deep); font-weight: 600; }

/* Maqueta del panel (HTML puro, sin imágenes) */
.mock { position: relative; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow-lift); overflow: hidden; transform: rotate(-1.2deg); }
.mock__bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--pampas); }
.mock__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.mock__bar span { margin-left: 10px; font-size: 12px; color: var(--muted); }
.mock__body { display: grid; gap: 14px; padding: 18px; }
.mock__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mock__kpi { padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.mock__kpi small { display: block; font-size: 11px; color: var(--muted); }
.mock__kpi strong { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.mock__chart { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.mock__chart span { flex: 1; border-radius: 5px 5px 0 0; background: var(--ink); transform-origin: bottom; animation: grow 1s var(--ease-out) backwards; }
.mock__chart span:nth-child(even) { background: var(--clay); }
.mock__chart .b1 { height: 38%; animation-delay: .1s; } .mock__chart .b2 { height: 24%; animation-delay: .15s; }
.mock__chart .b3 { height: 55%; animation-delay: .2s; } .mock__chart .b4 { height: 31%; animation-delay: .25s; }
.mock__chart .b5 { height: 72%; animation-delay: .3s; } .mock__chart .b6 { height: 40%; animation-delay: .35s; }
.mock__chart .b7 { height: 92%; animation-delay: .4s; } .mock__chart .b8 { height: 47%; animation-delay: .45s; }
.mock__rows { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; }
.mock__rows div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-top: 1px solid var(--line); }
.mock__rows div:first-child { border-top: 0; color: var(--muted); }
.mock__float { position: absolute; right: -8px; bottom: 26px; padding: 10px 14px; border-radius: 12px; background: var(--ink); color: var(--ivory); font-size: 12px; box-shadow: var(--shadow-lift); transform: rotate(2.4deg); }
.mock__float b { display: block; font-family: var(--font-display); font-size: 15px; }
@keyframes grow { from { transform: scaleY(0); } }

.strip { margin-top: clamp(56px, 8vw, 96px); padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 32px; font-size: 14px; color: var(--body); }
.strip__inner span { display: inline-flex; align-items: center; gap: 8px; }
.strip__inner span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--clay); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { display: flex; flex-direction: column; gap: 12px; padding: 26px; border-radius: var(--radius); background: var(--pampas); transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out); }
.feature__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--ink); color: var(--ivory); }
.feature__icon svg { width: 20px; height: 20px; }
.feature h3 { font-weight: 600; font-size: 19px; }
.feature p { color: var(--body); }
.feature ul { display: grid; gap: 6px; margin-top: 4px; font-size: 14px; color: var(--body); }
.feature li { position: relative; padding-left: 18px; }
.feature li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 8px; height: 2px; background: var(--clay); }

.bolivia { background: var(--ink); color: var(--ivory); }
.bolivia .eyebrow { color: #F0A98F; }
.bolivia .lead { color: var(--on-dark-muted); }
.bolivia__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
.bolivia__intro { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 110px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--darkline); border: 1px solid var(--darkline); border-radius: var(--radius); overflow: hidden; }
.fact { display: flex; flex-direction: column; gap: 6px; padding: 26px; background: var(--ink); }
.fact strong { font-family: var(--font-display); font-weight: 600; font-size: 34px; letter-spacing: -0.03em; line-height: 1; }
.fact strong span { color: var(--clay); }
.fact b { font-weight: 500; font-size: 15px; }
.fact p { font-size: 13px; color: var(--on-dark-muted); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
.step { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; border-top: 1px solid var(--line); counter-increment: step; }
.step::before { content: "0" counter(step); font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--clay-deep); }
.step h3 { font-weight: 600; font-size: 19px; }
.step p { color: var(--body); }

.secure { background: var(--pampas); }
.secure__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.secure__item { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line-strong); }
.secure__item h3 { font-weight: 600; font-size: 16px; }
.secure__item p { font-size: 14px; color: var(--body); }

.plan { display: grid; grid-template-columns: .9fr 1.1fr; gap: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); overflow: hidden; box-shadow: var(--shadow); }
.plan__price { display: flex; flex-direction: column; gap: 18px; padding: 40px; background: var(--ink); color: var(--ivory); }
.plan__price h3 { font-weight: 500; font-size: 22px; }
.plan__amount { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-display); }
.plan__amount strong { font-weight: 600; font-size: 64px; letter-spacing: -0.04em; line-height: 1; }
.plan__amount span { color: var(--on-dark-muted); font-size: 15px; }
.plan__price p { color: var(--on-dark-muted); font-size: 14px; }
.plan__list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; padding: 40px; align-content: center; }
.plan__list li { position: relative; padding-left: 26px; font-size: 15px; color: var(--body); }
.plan__list li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232F6B3B' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 10px no-repeat; }

.faq { max-width: 760px; border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; cursor: pointer; list-style: none; font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -0.015em; transition: color .2s var(--ease); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-family: var(--font-sans); font-weight: 400; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .3s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--clay-deep); }
.faq p { padding-bottom: 20px; max-width: 62ch; color: var(--body); }
@supports (interpolate-size: allow-keywords) {
  .faq { interpolate-size: allow-keywords; }
  .faq details::details-content { block-size: 0; overflow: hidden; transition: block-size .35s var(--ease-out), content-visibility .35s allow-discrete; }
  .faq details[open]::details-content { block-size: auto; }
}

.cta { background: var(--clay); color: #fff; text-align: center; }
.cta__inner { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.cta p { max-width: 520px; color: rgba(255, 255, 255, .88); }

.site-foot { padding: 48px 0 36px; background: var(--ink); color: var(--on-dark-muted); font-size: 13px; }
.site-foot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.site-foot .brand { color: var(--ivory); }
.site-foot .brand__mark { background: var(--ivory); color: var(--ink); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Acceso (registro, ingreso, 2FA) ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; }
.auth__side { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 40px 48px; background: var(--ink); color: var(--ivory); }
.auth__side .brand__mark { background: var(--ivory); color: var(--ink); }
.auth__side h2 { font-weight: 500; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.12; }
.auth__side ul { display: grid; gap: 12px; color: var(--on-dark-muted); font-size: 14px; }
.auth__side li { position: relative; padding-left: 20px; }
.auth__side li::before { content: ""; position: absolute; left: 0; top: 9px; width: 8px; height: 2px; background: var(--clay); }
.auth__side small { color: var(--on-dark-muted); }
.auth__main { display: grid; place-items: center; padding: 40px 24px; }
.auth__card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 22px; }
.auth__card h1 { font-weight: 600; font-size: 28px; }
.auth__card form { display: grid; gap: 16px; }
.auth__alt { font-size: 14px; color: var(--muted); }
.code-input { text-align: center; font-family: var(--font-display); font-size: 26px !important; letter-spacing: .4em; }
.auth__card form.auth__resend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); cursor: pointer; }
button.link:disabled { color: var(--muted); cursor: default; text-decoration: none; }

/* =========================================================
   Aplicación
   ========================================================= */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; background: var(--ivory); }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 6px; padding: 18px 14px; background: var(--ink); color: var(--ivory); overflow-y: auto; }
.side .brand { padding: 4px 8px 14px; }
.side .brand__mark { background: var(--ivory); color: var(--ink); }
.side__group { padding: 14px 10px 6px; font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #7E7C74; }
.side__link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 14px; color: #CFCDC4; transition: background-color .2s var(--ease), color .2s var(--ease); }
.side__link svg { flex: none; width: 17px; height: 17px; opacity: .8; }
.side__link.is-active { background: var(--darkline); color: #fff; }
.side__link.is-active svg { opacity: 1; color: var(--clay); }
.side__foot { margin-top: auto; padding: 12px 10px 4px; border-top: 1px solid var(--darkline); font-size: 12px; color: var(--on-dark-muted); }
.side__foot b { display: block; color: var(--ivory); font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { display: flex; flex-direction: column; min-width: 0; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; padding: 0 28px; background: rgba(250, 249, 245, .92); border-bottom: 1px solid var(--line); }
.top__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.top__title { font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top__right { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.top__user { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.top__user b { color: var(--ink); font-weight: 500; }
.menu-toggle { display: none; width: 38px; height: 38px; border: 0; border-radius: var(--radius-sm); background: var(--pampas); cursor: pointer; place-items: center; }
.menu-toggle svg { width: 18px; height: 18px; }

.content { display: flex; flex-direction: column; gap: 22px; padding: 28px; max-width: 1280px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; }
.page-head h1 { font-weight: 600; font-size: 26px; line-height: 1.15; }
.page-head p { color: var(--muted); font-size: 14px; max-width: 70ch; }
.page-head__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card__head h2 { font-weight: 600; font-size: 16px; }
.card__body { padding: 20px; }
.card__body--tight { padding: 0; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.kpi small { font-weight: 500; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.kpi strong { font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi--dark { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.kpi--dark small, .kpi--dark span { color: var(--on-dark-muted); }
.is-neg { color: var(--red); }
.is-pos { color: var(--green); }

.cols-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.cols-even { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { padding: 10px 16px; text-align: left; font-weight: 500; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: #FBFAF7; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 16px; border-bottom: 1px solid #ECEAE1; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { font-weight: 600; background: #FBFAF7; border-top: 1px solid var(--line); border-bottom: 0; }
.table a.rowlink { font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.table .muted, .muted { color: var(--muted); }
.table tr.is-void td { color: var(--muted); text-decoration: line-through; }
.table tr.is-void td:last-child, .table tr.is-void .badge { text-decoration: none; }
.table tr.lvl-1 td { font-family: var(--font-display); font-weight: 600; background: var(--pampas); }
.table tr.lvl-2 td { font-weight: 600; }
.table tr.lvl-3 td { font-weight: 500; }
.table tr.lvl-2 td:nth-child(2) { padding-left: 28px; }
.table tr.lvl-3 td:nth-child(2) { padding-left: 44px; }
.table tr.lvl-4 td:nth-child(2) { padding-left: 60px; }
.table tr.row-total td { font-weight: 600; background: var(--pampas); }
.table tr.row-grand td { font-family: var(--font-display); font-weight: 600; font-size: 15px; background: var(--ink); color: var(--ivory); }
.table--compact td, .table--compact th { padding: 8px 12px; }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 24px; text-align: center; color: var(--muted); }
.empty h3 { font-weight: 600; font-size: 17px; color: var(--ink); }

.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.toolbar .field { flex: 0 1 170px; }
.toolbar .field--grow { flex: 1 1 200px; }
.toolbar .input, .toolbar input, .toolbar select { padding: 8px 10px; font-size: 14px; }
.toolbar select { padding-right: 30px; }

.form { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.c-2 { grid-column: span 2; } .c-3 { grid-column: span 3; } .c-4 { grid-column: span 4; } .c-5 { grid-column: span 5; }
.c-6 { grid-column: span 6; } .c-8 { grid-column: span 8; } .c-12 { grid-column: span 12; }
.form__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 4px; }

.lines { width: 100%; border-collapse: collapse; }
.lines th { padding: 8px 6px; text-align: left; font-weight: 500; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.lines td { padding: 6px; vertical-align: top; }
.lines .input { padding: 8px 10px; font-size: 14px; }
.lines .num, .lines .num .input { text-align: right; font-variant-numeric: tabular-nums; }
.lines .w-acc { width: 32%; } .lines .w-num { width: 130px; } .lines .w-qty { width: 100px; } .lines .w-x { width: 40px; }
.lines .line-total { display: block; padding: 9px 4px; font-weight: 500; }
.icon-btn { display: grid; place-items: center; width: 34px; height: 36px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); color: var(--muted); cursor: pointer; }
.icon-btn svg { width: 15px; height: 15px; }

.totals { display: grid; gap: 6px; margin-left: auto; width: min(100%, 340px); font-size: 14px; }
.totals div { display: flex; justify-content: space-between; gap: 16px; }
.totals .totals__grand { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); font-family: var(--font-display); font-weight: 600; font-size: 20px; }
.totals small { color: var(--muted); }
.balance-ok { color: var(--green); font-weight: 600; }
.balance-bad { color: var(--red); font-weight: 600; }

.dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 24px; }
.dl div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dl dt { font-weight: 500; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dl dd { font-size: 15px; overflow-wrap: anywhere; }

.report-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.report-link { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .3s var(--ease-out), border-color .2s var(--ease); }
.report-link h3 { font-weight: 600; font-size: 16px; }
.report-link p { font-size: 13px; color: var(--muted); }

.chart { width: 100%; height: auto; }
.chart text { font: 500 11px var(--font-sans); fill: var(--muted); }
.chart .bar-sales { fill: var(--ink); }
.chart .bar-purchases { fill: var(--clay); }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--ink); }
.legend .l-clay { background: var(--clay); }

.list { display: grid; }
.list__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 20px; border-top: 1px solid #ECEAE1; font-size: 14px; }
.list__row:first-child { border-top: 0; }
.list__row small { display: block; color: var(--muted); font-size: 12px; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pagination nav { display: flex; gap: 6px; }

.qr { width: 200px; height: 200px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.secret { font-family: ui-monospace, Consolas, monospace; font-size: 14px; letter-spacing: .08em; overflow-wrap: anywhere; }
.stack { display: grid; gap: 14px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.inline-form { display: inline; }

/* Documento imprimible (factura, reportes) */
.doc { display: grid; gap: 22px; padding: 32px; }
.doc__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 2px solid var(--ink); }
.doc__head h2 { font-weight: 600; font-size: 22px; }
.doc__head p { font-size: 13px; color: var(--body); }
.doc__title { text-align: right; }
.doc__title strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: -0.02em; }
.report-title { text-align: center; display: grid; gap: 2px; }
.report-title h2 { font-weight: 600; font-size: 20px; }
.report-title p { font-size: 13px; color: var(--muted); }

/* ---------- Cursor ---------- */
@media (hover: hover) {
  .btn--primary:hover { background: #32312E; }
  .btn--clay:hover { background: #C4653F; }
  .btn--light:hover { background: #fff; }
  .btn--ghost:hover, .btn:not([class*="btn--"]):hover { background: var(--line); }
  .btn--danger:hover { background: var(--red-soft); }
  .btn:hover .arrow { transform: translateX(4px); }
  .site-nav__links a:hover { color: var(--ink); }
  .feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
  .faq summary:hover { color: var(--clay-deep); }
  .site-foot a:hover { color: var(--ivory); }
  .side__link:hover { background: var(--ink-2); color: #fff; }
  .table tbody tr:hover td { background: #FCFBF8; }
  .table tr.lvl-1:hover td { background: var(--pampas); }
  .table tr.row-grand:hover td { background: var(--ink); }
  .report-link:hover { transform: translateY(-3px); border-color: var(--line-strong); }
  .icon-btn:hover { color: var(--red); border-color: #E2BFB3; }
}

/* ---------- Adaptación ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-2, .cols-even { grid-template-columns: 1fr; }
  .dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .hero__grid, .bolivia__grid, .plan { grid-template-columns: 1fr; }
  .bolivia__intro { position: static; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .secure__grid { grid-template-columns: repeat(2, 1fr); }
  .site-nav__links { display: none; }
  .auth { grid-template-columns: 1fr; }
  .auth__side { display: none; }

  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; z-index: 60; width: 264px; transform: translateX(-100%); transition: transform .3s var(--ease-out); }
  .app.is-menu-open .side { transform: none; box-shadow: var(--shadow-lift); }
  .menu-toggle { display: grid; }
  .top { padding: 0 16px; }
  .content { padding: 18px 16px 40px; }
  .c-2, .c-3, .c-4, .c-5 { grid-column: span 6; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .features, .steps, .secure__grid, .facts, .plan__list { grid-template-columns: 1fr; }
  .plan__price, .plan__list { padding: 28px; }
  .site-nav__cta .btn--ghost { display: none; }
  .mock { transform: none; }
  .mock__float { right: 8px; }
  .kpis, .report-links { grid-template-columns: 1fr; }
  .c-2, .c-3, .c-4, .c-5, .c-6, .c-8 { grid-column: span 12; }
  .top__user { display: none; }
  .doc { padding: 20px; }
  .lines .w-acc { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .side, .top, .no-print, .toolbar, .pagination, .alert { display: none !important; }
  .app { display: block; }
  .content { padding: 0; max-width: none; }
  .card { border: 0; box-shadow: none; }
  body { background: #fff; font-size: 12px; }
  .table th, .table td { padding: 6px 8px; }
}

.error-page { min-height: 100vh; min-height: 100dvh; }

/* =========================================================
   Tienda pública, pedidos, guía de inicio, legal y cookies
   ========================================================= */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.store-head { padding: 36px 0 24px; border-bottom: 1px solid var(--line); background: var(--pampas); }
.store-head__inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.store-head h1 { font-weight: 600; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
.store { display: grid; gap: 20px; padding-top: 24px; padding-bottom: 140px; }
.store form { display: grid; gap: 20px; }
.store__tools { display: grid; gap: 12px; }
.store__tools input { font-size: 16px; padding: 13px 14px; }
.pill { cursor: default; }
button.pill { cursor: pointer; font: inherit; font-weight: 500; font-size: 13px; color: var(--ink); }
.pill.is-on { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.pill__x { margin-left: 2px; padding: 0 2px; border: 0; background: none; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.step-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -0.015em; }
.step-title b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--ivory); font-size: 13px; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.product { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.product.is-picked { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.product.is-sold { opacity: .6; }
.product__img { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--pampas); overflow: hidden; }
.product__img img { width: 100%; height: 100%; object-fit: cover; }
.product__img span { font-family: var(--font-display); font-weight: 600; font-size: 44px; color: var(--line-strong); }
.product__body { display: flex; flex-direction: column; gap: 8px; padding: 14px; flex: 1; }
.product__body h2 { font-weight: 600; font-size: 16px; line-height: 1.25; letter-spacing: -0.01em; }
.product__body p { font-size: 13px; color: var(--muted); }
.product__body .badge { align-self: flex-start; }
.product__meta { display: flex; align-items: baseline; gap: 6px; margin-top: auto; }
.product__meta strong { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.product__meta small { font-size: 12px; color: var(--muted); }
.stepper { display: grid; grid-template-columns: 44px 1fr 44px; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.stepper button { height: 44px; border: 0; background: var(--pampas); font-size: 20px; line-height: 1; cursor: pointer; transition: background-color .2s var(--ease); }
.stepper input { width: 100%; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; font-weight: 600; font-size: 16px; background: var(--paper); -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.stepper input:focus { outline: 2px solid var(--clay); outline-offset: -2px; }
.checkout { display: grid; gap: 16px; padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); scroll-margin-top: 24px; }
.hints { display: grid; gap: 6px; font-size: 13px; color: var(--body); }
.hints li { position: relative; padding-left: 18px; }
.hints li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 8px; height: 2px; background: var(--clay); }
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 12px 0; background: var(--ink); color: var(--ivory); box-shadow: 0 -8px 24px -12px rgba(20, 20, 19, .5); }
.cartbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cartbar__inner > div { display: flex; flex-direction: column; font-size: 13px; color: var(--on-dark-muted); line-height: 1.3; margin-right: auto; }
.cartbar__inner > div b { display: inline; color: var(--ivory); }
.cartbar strong { font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--ivory); }
.cartbar .btn--ghost { border-color: var(--darkline); color: var(--ivory); }
.cartbar .btn--primary { background: var(--clay); color: #fff; }
.store-foot { padding: 28px 0 120px; font-size: 13px; color: var(--muted); text-align: center; }
.receipt { max-width: 520px; }

.side__count { margin-left: auto; padding: 1px 8px; border-radius: 100px; background: var(--clay); color: #fff; font-weight: 600; font-size: 11px; }
.side__legal { display: block; margin-top: 6px; font-size: 11px; }
.side__legal a { text-decoration: underline; text-underline-offset: 2px; }
a.alert { display: block; }
.share { display: grid; gap: 8px; border-top: 1px solid var(--line); }
.thumb { width: 72px; height: 72px; border-radius: var(--radius-sm); object-fit: cover; border: 1px solid var(--line); }

.guide__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; padding: 8px 20px 14px; counter-reset: none; }
.guide__list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #ECEAE1; font-size: 14px; }
.guide__list li:nth-child(-n+2) { border-top: 0; }
.guide__list a { font-weight: 500; }
.guide__check { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-strong); font-weight: 600; font-size: 12px; color: var(--muted); }
.guide__list .is-done { color: var(--muted); }
.guide__list .is-done .guide__check { background: var(--green-soft); border-color: #C5DCC3; color: var(--green); }

.legal { display: grid; gap: 28px; max-width: 800px; padding-top: 48px; padding-bottom: 72px; }
.legal__head { display: grid; gap: 10px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.legal section { display: grid; gap: 10px; }
.legal h2 { font-weight: 600; font-size: 19px; }
.legal section p, .legal section li { font-size: 15px; line-height: 1.65; color: var(--body); }
.legal section ul { display: grid; gap: 6px; padding-left: 20px; list-style: disc; }
.legal b { color: var(--ink); font-weight: 600; }
.legal code { padding: 1px 6px; border-radius: 5px; background: var(--pampas); font-size: 13px; }
.legal__table { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.legal__table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.legal__table th, .legal__table td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); color: var(--body); }
.legal__table th { background: var(--pampas); color: var(--ink); font-weight: 600; }
.legal__table tr:last-child td { border-bottom: 0; }
.legal__foot { display: grid; gap: 8px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.site-nav__links a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }

.cookies { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; max-width: 880px; margin: 0 auto; padding: 16px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lift); }
.cookies__text { flex: 1 1 380px; font-size: 13px; line-height: 1.5; color: var(--body); }
.cookies__text b { display: block; font-family: var(--font-display); font-size: 15px; color: var(--ink); }
.cookies__actions { display: flex; flex-wrap: wrap; gap: 8px; }

@media (hover: hover) {
  .stepper button:hover { background: var(--line); }
  .product:hover { border-color: var(--line-strong); }
  .pill__x:hover { color: var(--red); }
  button.pill:hover { border-color: var(--line-strong); }
  button.pill.is-on:hover { border-color: var(--ink); }
}
@media (max-width: 640px) {
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product__body { padding: 10px; }
  .guide__list { grid-template-columns: 1fr; }
  .guide__list li:nth-child(2) { border-top: 1px solid #ECEAE1; }
  .cartbar [data-cart-next] { display: none; }
  .checkout { padding: 18px; }
  .cookies { bottom: 10px; left: 10px; right: 10px; }
}
@media print { .cookies, .cartbar { display: none !important; } }

/* En la tienda, el aviso de cookies queda por encima de la barra del pedido. */
body:has(.cartbar) .cookies { bottom: 92px; }

/* En el celular el aviso de cookies es más corto: el detalle queda en la Política de cookies. */
@media (max-width: 640px) {
  .cookies { padding: 12px 14px; gap: 10px; }
  .cookies__more { display: none; }
  .cookies__actions { width: 100%; }
  .cookies__actions .btn { flex: 1; padding: 9px 10px; }
}

.product__meta { flex-wrap: wrap; }
.product__meta strong { white-space: nowrap; }

/* =========================================================
   Agregar stock: botón rápido en la lista y tarjeta en la ficha
   ========================================================= */
.row-actions { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; gap: 6px; }
.quick { position: relative; text-align: left; }
.quick > summary { list-style: none; }
.quick > summary::-webkit-details-marker { display: none; }
.quick[open] > summary { background: var(--ink); border-color: var(--ink); color: var(--ivory); }
.quick__panel { display: grid; gap: 10px; width: 240px; margin-top: 8px; padding: 14px; background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-lift); }
.quick__title { font-size: 13px; line-height: 1.4; white-space: normal; }
.qty-box { display: grid; gap: 10px; }
.qty-box .stepper button:hover { background: var(--line); }
.restock { display: grid; gap: 14px; }
.restock__row { display: grid; grid-template-columns: minmax(150px, 220px) auto; gap: 12px; align-items: center; justify-content: start; }
.restock__row .stepper input { font-size: 20px; }
.restock__more summary, .adjust > summary { cursor: pointer; }
.restock__more summary { font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.restock__more[open] summary { margin-bottom: 10px; }
.adjust > summary { list-style: none; }
.adjust > summary::-webkit-details-marker { display: none; }
.adjust > summary::after { content: "+"; font-size: 20px; color: var(--muted); }
.adjust[open] > summary::after { content: "−"; }
.adjust:not([open]) > summary { border-bottom: 0; }
@media (max-width: 560px) {
  .restock__row { grid-template-columns: 1fr; }
  .quick__panel { width: min(240px, 80vw); }
}

/* =========================================================
   Marca de cada empresa (tienda, pedido y nota de venta)
   Paleta fija: el color nunca viene escrito por el usuario.
   ========================================================= */
.brand-tinta     { --brand: #141413; --brand-soft: #EDEBE4; }
.brand-terracota { --brand: #B5532F; --brand-soft: #F7E4DD; }
.brand-bosque    { --brand: #2F6B3B; --brand-soft: #E3EFE2; }
.brand-oceano    { --brand: #1F5F8B; --brand-soft: #E0ECF5; }
.brand-vino      { --brand: #7A2335; --brand-soft: #F3E1E4; }
.brand-ciruela   { --brand: #5B3A7A; --brand-soft: #ECE4F3; }
.brand-mostaza   { --brand: #8F6510; --brand-soft: #F6ECCF; }
.brand-pizarra   { --brand: #3F4A56; --brand-soft: #E5E8EC; }

.store-logo { display: inline-grid; place-items: center; flex: none; width: 88px; height: 88px; border-radius: 22px; background: var(--brand, var(--ink)); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 32px; letter-spacing: -0.02em; overflow: hidden; box-shadow: 0 10px 24px -14px rgba(20, 20, 19, .55); }
.store-logo:has(img) { background: var(--paper); border: 1px solid var(--line); }
.store-logo img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.store-logo--sm { width: 52px; height: 52px; border-radius: 14px; font-size: 19px; }
.store-logo--xs { width: 30px; height: 30px; border-radius: 9px; font-size: 12px; box-shadow: none; }

/* .storefront siempre lleva una clase .brand-* (Company::brandClass), que define --brand y --brand-soft. */
.shop-bar { position: sticky; top: 0; z-index: 30; background: rgba(250, 249, 245, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.shop-bar__inner { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.shop-bar__inner b { font-family: var(--font-display); font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-bar__wa { margin-left: auto; padding: 6px 12px; border-radius: 100px; background: var(--brand); color: #fff; font-weight: 500; font-size: 13px; }
.shop-hero { position: relative; padding: 40px 0 0; background: linear-gradient(180deg, var(--brand-soft), var(--ivory)); border-bottom: 1px solid var(--line); overflow: hidden; }
.shop-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--brand); }
.shop-hero__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 24px; }
.shop-hero__text { flex: 1 1 280px; display: grid; gap: 6px; }
.shop-hero__kicker { font-weight: 600; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.shop-hero h1 { font-weight: 600; font-size: clamp(30px, 5vw, 46px); line-height: 1.05; letter-spacing: -0.03em; color: var(--ink); }
.shop-hero__text p:last-child:not(.shop-hero__kicker) { color: var(--body); max-width: 60ch; }
.shop-hero__cta { background: var(--brand); border-color: var(--brand); color: #fff; }
.shop-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; padding-top: 14px; padding-bottom: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--body); }
.shop-facts li { display: flex; align-items: center; gap: 8px; }
.shop-facts b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 11px; }

.storefront .step-title b { background: var(--brand); }
.storefront .pill.is-on { background: var(--brand); border-color: var(--brand); }
.storefront .product.is-picked { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.storefront .product__img { background: var(--brand-soft); }
.storefront .product__img span { color: var(--brand); opacity: .45; }
.storefront .stepper input:focus { outline-color: var(--brand); }
.storefront .hints li::before { background: var(--brand); }
.storefront .cartbar { background: var(--ink); border-top: 4px solid var(--brand); }
.storefront .cartbar .btn--primary { background: var(--brand); border-color: #fff; }
.brand-tinta .cartbar .btn--primary { background: var(--ivory); color: var(--ink); }

.shop-foot { padding: 28px 0 120px; border-top: 1px solid var(--line); background: var(--pampas); font-size: 13px; color: var(--muted); }
.shop-foot__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.shop-foot__brand { display: flex; align-items: center; gap: 12px; }
.shop-foot__brand b { display: block; color: var(--ink); font-size: 15px; }
.shop-foot__contact { display: grid; gap: 2px; text-align: right; }
.shop-foot__legal { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; font-size: 12px; }
.order-brand { display: flex; align-items: center; gap: 12px; }
.order-brand b { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.storefront .receipt .btn--primary { background: var(--brand); border-color: var(--brand); }

/* Selector de marca en Catálogo */
.brand-pick { display: grid; gap: 14px; margin: 4px 0 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.brand-pick legend { padding: 0 6px; font-weight: 600; font-size: 14px; }
.brand-pick__logo { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.brand-pick__logo .field { flex: 1 1 220px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { display: grid; justify-items: center; gap: 4px; cursor: pointer; font-size: 11px; color: var(--muted); }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch span { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--line-strong); transition: box-shadow .2s var(--ease); }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--ink); }
.swatch input:checked ~ small { color: var(--ink); font-weight: 600; }
.swatch input:focus-visible + span { outline: 2px solid var(--clay); outline-offset: 3px; }

@media (max-width: 640px) {
  .shop-hero { padding-top: 28px; }
  .shop-hero__inner { gap: 16px; }
  .store-logo { width: 68px; height: 68px; border-radius: 18px; font-size: 26px; }
  .shop-hero__cta { width: 100%; justify-content: center; }
  .shop-facts { flex-direction: column; gap: 8px; }
  .shop-foot__contact { text-align: left; }
}
@media print { .shop-bar { display: none !important; } }

/* =========================================================
   Nota de venta en rollo (80 mm): angosta y larga, no hoja carta
   ========================================================= */
.ticket-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: center; }
.ticket-stage { display: grid; justify-items: center; padding: 28px 12px 40px; background: repeating-linear-gradient(135deg, var(--pampas) 0 12px, #EAE7DD 12px 24px); border: 1px solid var(--line); border-radius: var(--radius); }
.ticket { position: relative; width: 100%; max-width: 80mm; padding: 6mm 5mm 7mm; background: #fff; color: #111; font-family: var(--font-sans); font-size: 12px; line-height: 1.4; font-variant-numeric: tabular-nums; box-shadow: 0 18px 40px -22px rgba(20, 20, 19, .45); }
.ticket::before, .ticket::after { content: ""; position: absolute; left: 0; right: 0; height: 8px; background: radial-gradient(circle at 5px -1px, transparent 5px, #fff 5.5px) 0 0 / 10px 8px repeat-x; }
.ticket::before { top: -8px; transform: scaleY(-1); }
.ticket::after { bottom: -8px; }
.ticket > * + * { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #9A988F; }
.ticket__head { display: grid; justify-items: center; gap: 1px; text-align: center; }
.ticket__head h2 { font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.2; text-transform: uppercase; letter-spacing: .01em; color: var(--brand); }
.ticket__head p { font-size: 11px; color: #333; }
.ticket__logo { width: 64px; height: 64px; object-fit: contain; margin-bottom: 6px; }
.ticket__small { font-size: 10px !important; color: #555 !important; }
.ticket__title { display: grid; justify-items: center; gap: 2px; text-align: center; }
.ticket__title strong { font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: .14em; }
.ticket__title span { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #555; }
.ticket__title b { margin-top: 4px; padding: 2px 10px; border: 1.5px solid #111; border-radius: 4px; font-size: 13px; letter-spacing: .04em; }
.ticket__meta { display: grid; gap: 3px; }
.ticket__meta div { display: flex; justify-content: space-between; gap: 10px; }
.ticket__meta dt { flex: none; color: #555; }
.ticket__meta dd { text-align: right; font-weight: 500; overflow-wrap: anywhere; }
.ticket__items { display: grid; gap: 7px; }
.ticket__cols { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #555; }
.ticket__item p { font-weight: 500; overflow-wrap: anywhere; }
.ticket__item div { display: flex; justify-content: space-between; gap: 10px; color: #333; }
.ticket__item div span:last-child { font-weight: 600; color: #111; }
.ticket__totals { display: grid; gap: 3px; }
.ticket__totals div { display: flex; justify-content: space-between; }
.ticket__grand { margin: 4px -5mm 0; padding: 6px 5mm; background: var(--brand); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.ticket__words { margin-top: 6px; font-size: 11px; font-weight: 500; text-transform: uppercase; }
.ticket__void { margin: 12px 0 0; padding: 6px 0 !important; border: 2px solid var(--red) !important; color: var(--red); text-align: center; font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: .3em; }
.ticket.is-void .ticket__grand { background: #777; text-decoration: line-through; }
.ticket__note { font-size: 11px; text-align: center; font-style: italic; color: #333; }
.ticket__verify { display: flex; align-items: center; gap: 10px; }
.ticket__verify img { width: 26mm; height: 26mm; flex: none; }
.ticket__verify small { display: block; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: #555; }
.ticket__verify b { font-family: ui-monospace, Consolas, monospace; font-size: 13px; letter-spacing: .04em; }
.ticket__legal { font-size: 9.5px; line-height: 1.35; text-align: center; color: #444; }
.ticket__thanks { border-top: 0 !important; padding-top: 0 !important; text-align: center; font-weight: 600; font-size: 13px; }
.ticket__by { border-top: 0 !important; padding-top: 0 !important; margin-top: 4px !important; text-align: center; font-size: 9px; color: #777; }

@page ticket { margin: 3mm 0; }
@media print {
  body:has(.ticket) .content > :not(.ticket-stage) { display: none !important; }
  .ticket-stage { display: block; padding: 0; background: none; border: 0; page: ticket; }
  .ticket { max-width: 72mm; margin: 0 auto; padding: 0 2mm; box-shadow: none; }
  .ticket::before, .ticket::after { display: none; }
  .ticket__grand { margin-left: -2mm; margin-right: -2mm; padding-left: 2mm; padding-right: 2mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
