/* =====================================================================
   RA Gestión · Sistema de diseño
   Tipografía Inter · tokens de color (claro / oscuro / automático)
   Escala de espacios de 4 px · radios suaves · movimiento sutil
   ===================================================================== */

/* ---------- Tokens: tema claro (por defecto) ---------- */
:root {
  --bg: #f4f6f9;
  --card: #ffffff;
  --card-2: #f8f9fb;
  --card-3: #eef1f6;
  --head: #f9fafb;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e4e8ef;
  --line-2: #d0d7e2;

  --navy: #14213d;
  --navy-2: #22335a;
  --brand: #22406f;
  --brand-2: #2f5596;
  --brand-dark: #14213d;
  --brand-soft: #edf2fa;
  --link: #24508f;
  --gold: #c9a24a;
  --gold-2: #8f6b1c;
  --gold-soft: #faf3e1;

  --primary: #14213d;
  --primary-ink: #ffffff;
  --primary-hover: #24365f;
  --pill: #14213d;
  --pill-ink: #ffffff;

  --ok: #157f3c;   --ok-soft: #e7f6ed;
  --bad: #c0262d;  --bad-soft: #fdecec;
  --warn: #b45309; --warn-soft: #fef4e4;
  --info: #1d6fd1; --info-soft: #e9f2fd;

  --c1: #22406f; --c2: #3b82c4; --c3: #d4508a; --c4: #d98a1c;
  --c5: #1f9d55; --c6: #7c5cc4; --c7: #d14343; --c8: #14988c;

  --hdr-bg: #14213d;
  --sec-bg: #14213d;
  --tip-bg: #0f172a; --tip-ink: #ffffff;
  --overlay: rgba(15, 23, 42, .45);

  --radius: 12px; --r-sm: 8px; --r-lg: 16px;
  --sh-1: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 3px rgba(15, 23, 42, .07), 0 1px 2px rgba(15, 23, 42, .04);
  --sh-pop: 0 20px 44px -12px rgba(15, 23, 42, .30), 0 6px 14px -6px rgba(15, 23, 42, .12);
  --focus: 0 0 0 3px rgba(201, 162, 74, .40);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

/* ---------- Tokens: tema oscuro ---------- */
:root[data-theme="dark"] {
  --bg: #0b1120; --card: #111a2e; --card-2: #152039; --card-3: #1b2844; --head: #131d34;
  --ink: #e8edf6; --ink-2: #c5cddd; --muted: #8e9ab4; --line: #22304d; --line-2: #314266;
  --navy: #0a1224; --navy-2: #1c2a49; --brand: #8fb1ec; --brand-2: #a9c4f3; --brand-dark: #0a1224;
  --brand-soft: rgba(143, 177, 236, .12); --link: #9dbcf3;
  --gold: #d4af5a; --gold-2: #e3c47e; --gold-soft: rgba(212, 175, 90, .14);
  --primary: #d4af5a; --primary-ink: #14213d; --primary-hover: #e1c174; --pill: #d4af5a; --pill-ink: #14213d;
  --ok: #4cc38a; --ok-soft: rgba(76, 195, 138, .13); --bad: #f07a7a; --bad-soft: rgba(240, 122, 122, .13);
  --warn: #f0b354; --warn-soft: rgba(240, 179, 84, .13); --info: #6aa8f0; --info-soft: rgba(106, 168, 240, .13);
  --c1: #7aa2e8; --c2: #4fb3e8; --c3: #ec7bae; --c4: #f0a84a; --c5: #4cc38a; --c6: #a58bea; --c7: #f07a7a; --c8: #3cc4b6;
  --hdr-bg: #0a1224; --sec-bg: #1c2a49; --tip-bg: #e8edf6; --tip-ink: #0f172a; --overlay: rgba(2, 6, 16, .66);
  --sh-1: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .02);
  --sh-pop: 0 24px 50px -12px rgba(0, 0, 0, .65); --focus: 0 0 0 3px rgba(212, 175, 90, .45);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0b1120; --card: #111a2e; --card-2: #152039; --card-3: #1b2844; --head: #131d34;
    --ink: #e8edf6; --ink-2: #c5cddd; --muted: #8e9ab4; --line: #22304d; --line-2: #314266;
    --navy: #0a1224; --navy-2: #1c2a49; --brand: #8fb1ec; --brand-2: #a9c4f3; --brand-dark: #0a1224;
    --brand-soft: rgba(143, 177, 236, .12); --link: #9dbcf3;
    --gold: #d4af5a; --gold-2: #e3c47e; --gold-soft: rgba(212, 175, 90, .14);
    --primary: #d4af5a; --primary-ink: #14213d; --primary-hover: #e1c174; --pill: #d4af5a; --pill-ink: #14213d;
    --ok: #4cc38a; --ok-soft: rgba(76, 195, 138, .13); --bad: #f07a7a; --bad-soft: rgba(240, 122, 122, .13);
    --warn: #f0b354; --warn-soft: rgba(240, 179, 84, .13); --info: #6aa8f0; --info-soft: rgba(106, 168, 240, .13);
    --c1: #7aa2e8; --c2: #4fb3e8; --c3: #ec7bae; --c4: #f0a84a; --c5: #4cc38a; --c6: #a58bea; --c7: #f07a7a; --c8: #3cc4b6;
    --hdr-bg: #0a1224; --sec-bg: #1c2a49; --tip-bg: #e8edf6; --tip-ink: #0f172a; --overlay: rgba(2, 6, 16, .66);
    --sh-1: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .02);
    --sh-pop: 0 24px 50px -12px rgba(0, 0, 0, .65); --focus: 0 0 0 3px rgba(212, 175, 90, .45);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(116px + env(safe-area-inset-top)); }
/* iPhone/iPad: la zona de la hora siempre azul marino. iOS 26 ignora theme-color y tiñe esa franja
   con el fondo de la página, salvo que haya un elemento FIJO pegado al borde superior. */
body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top); background: var(--hdr-bg); z-index: 50; pointer-events: none; }
@media (hover: none) and (pointer: coarse) { html { background-color: var(--hdr-bg); } }
body {
  background: var(--bg); color: var(--ink); min-height: 100vh; min-height: 100dvh;
  font: 14px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
@media (min-width: 1800px) { body { font-size: 14.5px; } }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
::selection { background: color-mix(in srgb, var(--gold) 35%, transparent); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
.num, .tbl td.right, .kpi .val, .stat .val, .price { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 300; background: var(--card); color: var(--ink); padding: 8px 14px; border-radius: 8px; box-shadow: var(--sh-pop); }
.skip:focus { left: 12px; }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(18px); } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Pantalla de carga inicial ---------- */
.boot { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 18px; color: var(--muted); text-align: center; padding: 24px; }
.boot img { width: 64px; height: 64px; border-radius: 16px; box-shadow: var(--shadow); }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--gold); animation: spin .8s linear infinite; margin: 0 auto; }

/* ---------- Encabezado ---------- */
.app-hdr { position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: calc(56px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 12px; padding: env(safe-area-inset-top) 16px 0; background: var(--hdr-bg); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; color: #fff; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand b { color: var(--gold); font-weight: 700; }
.cmdk-btn { flex: 1; max-width: 560px; margin: 0 auto; height: 36px; display: flex; align-items: center; gap: 10px; padding: 0 6px 0 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07); color: rgba(255,255,255,.7); cursor: pointer; text-align: left; transition: background .15s, border-color .15s; }
.cmdk-btn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.26); }
.cmdk-btn > svg { width: 16px; height: 16px; flex: none; }
.cmdk-btn > span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
kbd { display: inline-flex; align-items: center; gap: 2px; font: 600 11px/1 "Inter", system-ui, sans-serif; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--card-2); color: var(--muted); white-space: nowrap; }
.cmdk-btn kbd { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: rgba(255,255,255,.75); }
.hdr-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.hbtn { position: relative; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: rgba(255,255,255,.82); display: grid; place-items: center; cursor: pointer; flex: none; transition: background .15s, color .15s; }
.hbtn:hover { background: rgba(255,255,255,.1); color: #fff; }
.hbtn svg { width: 18px; height: 18px; }
.hbtn .badge { position: absolute; top: 2px; right: 1px; border: 2px solid var(--hdr-bg); }
.avatar-me { width: 34px; height: 34px; margin-left: 6px; border-radius: 50%; background: var(--gold); color: #14213d; display: grid; place-items: center; font-weight: 700; font-size: 12.5px; border: 2px solid rgba(255,255,255,.22); cursor: pointer; flex: none; transition: box-shadow .15s; }
.avatar-me:hover { box-shadow: 0 0 0 3px rgba(201,162,74,.35); }

/* ---------- Navegación por pestañas ---------- */
.app-hdr + .app-nav { margin-top: calc(56px + env(safe-area-inset-top)); }
.app-nav { position: sticky; top: calc(56px + env(safe-area-inset-top)); z-index: 39; height: 52px; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: color-mix(in srgb, var(--card) 90%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.launcher { width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none; transition: background .15s, color .15s; }
.launcher:hover { background: var(--card-3); color: var(--ink); }
.launcher svg { width: 18px; height: 18px; }
.tabs { display: flex; align-items: center; gap: 2px; height: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabw { position: relative; display: flex; align-items: center; height: 34px; border-radius: 999px; transition: background .15s; flex: none; }
.tabw:hover { background: var(--card-3); }
.tabw.on { background: var(--pill); }
.tab { height: 100%; border: 0; background: none; padding: 0 4px 0 14px; color: var(--ink-2); font-weight: 500; font-size: 13.5px; white-space: nowrap; cursor: pointer; border-radius: 999px 0 0 999px; }
.tab.solo { padding-right: 14px; border-radius: 999px; }
.tabw.on .tab, .tabw.on .tabdd { color: var(--pill-ink); }
.tabw.on .tab { font-weight: 600; }
.tabdd { height: 100%; width: 26px; border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; border-radius: 0 999px 999px 0; }
.tabdd svg { width: 13px; height: 13px; }
.badge { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1; }
.tabw .badge { position: absolute; top: -4px; right: -3px; }

/* ---------- Contenido ---------- */
main { width: 100%; padding: 22px 24px 56px; }
main.enter > * { animation: rise .24s var(--ease) both; }
main.enter > *:nth-child(2) { animation-delay: .02s; }
main.enter > *:nth-child(3) { animation-delay: .04s; }
main.enter > *:nth-child(n+4) { animation-delay: .06s; }
.only-m { display: none !important; }
.mnav { display: none; }

/* ---------- Encabezado de página ---------- */
.page-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 2px 0 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.page-head select.inp { width: auto; min-width: 170px; }
.obj-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), var(--sh-1); }
.obj-icon svg { width: 19px; height: 19px; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); line-height: 1.3; }
.spacer { flex: 1; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 10px; display: flex; gap: 6px; align-items: center; }

/* ---------- Tarjetas ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 18px; }
.card-h { display: flex; align-items: center; gap: 10px; margin: -18px -18px 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-h h3 { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.card-h .ci { width: 28px; height: 28px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.card-h .ci svg { width: 15px; height: 15px; }
.card-h .opt { margin-left: auto; color: var(--muted); font-size: 12.5px; }

/* ---------- Botones ---------- */
.btn { --spin: var(--muted); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font-weight: 500; font-size: 13.5px; white-space: nowrap; cursor: pointer; box-shadow: var(--sh-1); transition: background .15s, border-color .15s, box-shadow .15s, transform .06s; }
.btn:hover { background: var(--card-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn.primary, .btn.gold { --spin: var(--primary-ink); background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover, .btn.gold:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.btn.danger-solid { --spin: #fff; background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger-solid:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--card-3); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading > * { visibility: hidden; }
.btn.loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--spin) 30%, transparent); border-top-color: var(--spin); animation: spin .7s linear infinite; }
.btn kbd { margin-left: 2px; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.btn-group .btn:only-child { border-radius: var(--r-sm); }
.btns { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.link { background: none; border: 0; padding: 0; color: var(--link); font-weight: 500; cursor: pointer; }
.link:hover { text-decoration: underline; }
.icon-btn { width: 36px; height: 36px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--card); color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none; box-shadow: var(--sh-1); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--card-2); color: var(--ink); }
.icon-btn.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.icon-btn svg { width: 16px; height: 16px; }

/* ---------- Formularios ---------- */
.inp, select.inp, textarea.inp { width: 100%; height: 38px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.inp::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.inp:hover { border-color: color-mix(in srgb, var(--line-2) 55%, var(--muted)); }
.inp:focus { border-color: var(--gold); box-shadow: var(--focus); }
.inp[readonly] { background: var(--card-2); color: var(--muted); }
select.inp { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a0b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
select.inp option { background: var(--card); color: var(--ink); }
textarea.inp { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.f label { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.f .hint { margin-top: 6px; font-size: 12px; color: var(--muted); }
.f.invalid .inp { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 18%, transparent); }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; color: var(--ink) !important; font-weight: 400 !important; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); margin: 0; }
.search { position: relative; }
.search > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search .inp { padding-left: 36px; }
.phone { display: flex; }
.phone > span { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line-2); border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); background: var(--card-2); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.phone .inp { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.pw { position: relative; }
.pw .inp { padding-right: 44px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 32px; border: 0; background: none; color: var(--muted); border-radius: 6px; display: grid; place-items: center; cursor: pointer; }
.pw-eye:hover { color: var(--ink); background: var(--card-3); }
.pw-eye svg { width: 17px; height: 17px; }
.caps { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; font-weight: 500; color: var(--warn); }
.caps::before { content: "⇪"; font-size: 13px; }
.num-fmt { font-variant-numeric: tabular-nums; }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.filters .grow { flex: 1 1 240px; }
.filters .inp { width: auto; min-width: 160px; }
.filters .grow .inp { width: 100%; }

/* ---------- Chips y estados ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--card-3); color: var(--ink-2); font-size: 12px; font-weight: 500; white-space: nowrap; line-height: 1; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; flex: none; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.gold, .chip.brand { background: var(--gold-soft); color: var(--gold-2); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.right { text-align: right; }
.pos { color: var(--ok); } .neg { color: var(--bad); }
.notice { display: block; padding: 12px 14px 12px 40px; margin-bottom: 16px; border-radius: var(--radius); background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); color: var(--ink); font-size: 13.5px; position: relative; }
.notice::before { content: "!"; position: absolute; left: 13px; top: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--warn); color: #fff; font-weight: 800; font-size: 12px; display: grid; place-items: center; }
.notice b { color: var(--warn); }
.empty { text-align: center; padding: 44px 16px; color: var(--muted); }
.empty::before { content: ""; display: block; width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 14px; background: var(--card-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a0b8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11L2 12v6a2 2 0 002 2h16a2 2 0 002-2v-6l-3.45-6.89A2 2 0 0016.76 4H7.24a2 2 0 00-1.79 1.11z'/%3E%3C/svg%3E") center / 24px no-repeat; }
.empty b { display: block; margin-bottom: 4px; color: var(--ink); font-size: 15px; font-weight: 600; }
.empty.small { padding: 22px 10px; font-size: 13px; }
.empty.small::before { width: 36px; height: 36px; border-radius: 10px; background-size: 18px; margin-bottom: 8px; }

/* ---------- Avatares ---------- */
.av { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .02em; flex: none; vertical-align: middle; margin-right: 9px; }
.av.sm { width: 22px; height: 22px; font-size: 9.5px; margin-right: 7px; }
.av.lg { width: 40px; height: 40px; font-size: 14px; margin-right: 0; }
.av.sq { border-radius: 8px; width: 32px; height: 32px; }
.who { display: inline-flex; align-items: center; min-width: 0; }

/* ---------- Dashboard ---------- */
.dash-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-hero h1 { margin: 4px 0 0; font-size: 26px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.dash-hero p { margin: 6px 0 0; color: var(--muted); }
.dash-hero select.inp { width: auto; min-width: 180px; }
.qa { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.qa .btn { height: 38px; border-radius: 10px; }
.qa .btn svg { color: var(--gold-2); }
.qa .btn.ghost svg { color: var(--muted); }
.onb { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 20px; padding: 18px; margin-bottom: 18px; background: linear-gradient(120deg, var(--card) 40%, var(--gold-soft)); }
.onb h3 { margin: 6px 0 4px; font-size: 17px; letter-spacing: -.015em; }
.onb .progress { margin: 12px 0 10px; }
.progress { height: 6px; border-radius: 99px; background: var(--card-3); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold), color-mix(in srgb, var(--gold) 70%, #fff)); transition: width .4s var(--ease); }
.onb-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.onb-step { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.onb-step:hover:not(:disabled) { border-color: var(--gold); box-shadow: var(--shadow); transform: translateY(-1px); }
.onb-step:disabled { cursor: default; opacity: .7; }
.onb-step b { display: block; font-size: 13.5px; font-weight: 600; }
.onb-step small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; line-height: 1.4; }
.onb-step .ck { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center; margin-top: 1px; color: #fff; }
.onb-step.done .ck { background: var(--ok); border-color: var(--ok); }
.onb-step.done b { text-decoration: line-through; color: var(--muted); }
.onb-step .ck svg { width: 12px; height: 12px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { padding: 16px 18px 14px; display: flex; flex-direction: column; min-width: 0; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat-top > span { display: inline-flex; align-items: center; gap: 6px; }
.stat .val { font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; margin: 8px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.stat-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); }
.spark { width: 92px; height: 30px; flex: none; }
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.delta.up { color: var(--ok); background: var(--ok-soft); }
.delta.down { color: var(--bad); background: var(--bad-soft); }
.delta.flat { color: var(--muted); background: var(--card-3); }
.info { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; color: var(--muted); cursor: help; }
.info svg { width: 14px; height: 14px; }
.info:hover { color: var(--ink); }
.kpi { --kc: var(--brand); padding: 16px; display: flex; gap: 14px; align-items: flex-start; min-width: 0; border-left: 3px solid var(--kc); }
.kpi .ki { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--kc) 13%, transparent); color: var(--kc); }
.kpi .ki svg { width: 20px; height: 20px; }
.kpi .lbl { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi .val { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.dgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.chart svg { width: 100%; height: auto; display: block; max-height: 380px; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; }
.chart .hov { fill: transparent; cursor: crosshair; }
.chart .hov:hover { fill: color-mix(in srgb, var(--brand) 7%, transparent); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ringwrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ringwrap .ring { flex: none; }
.ring circle[data-tip] { cursor: pointer; transition: opacity .15s; }
.ring:hover circle[data-tip]:not(:hover) { opacity: .55; }
.statlist { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 170px; }
.statlist li { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.statlist li:last-child { border-bottom: 0; }
.statlist li span:last-child { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.statlist i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.big { font-size: 26px; font-weight: 700; letter-spacing: -.025em; }
.hbar { margin-bottom: 13px; }
.hbar .row { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.hbar .row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 7px; border-radius: 99px; background: var(--card-3); overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--c1), color-mix(in srgb, var(--c1) 60%, var(--c2))); transition: width .5s var(--ease); }
.pl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pl td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.pl td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.pl tr.sub td { font-weight: 600; }
.pl tr.total td { border-bottom: 0; border-top: 2px solid var(--ink); padding-top: 9px; font-weight: 700; }
.pl .ind { padding-left: 12px; color: var(--muted); }
.list-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row b { font-weight: 600; }
.list-row small { display: block; color: var(--muted); font-size: 12px; }
.list-row > div { min-width: 0; }
.list-row > div > b, .list-row > div > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Tablas ---------- */
.list { overflow: hidden; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.tbl th { text-align: left; padding: 10px 14px; background: var(--head); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.tbl th.sort { cursor: pointer; user-select: none; transition: color .15s; }
.tbl th.sort:hover { color: var(--ink); }
.tbl th .ar { margin-left: 4px; font-size: 10px; color: var(--gold-2); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover td { background: var(--card-2); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl td.rn { width: 42px; color: var(--muted); font-size: 12px; text-align: right; }
.tbl td.act { width: 44px; text-align: right; }
.tbl .lnk { background: none; border: 0; padding: 0; color: var(--ink); font-weight: 600; text-align: left; cursor: pointer; }
.tbl tr:hover .lnk { color: var(--link); }
.tbl tr.anul td { opacity: .5; text-decoration: line-through; }
.tbl tr.anul td:last-child { opacity: 1; text-decoration: none; }
.tbl tr.off td { color: var(--muted); }
.tbl .detail td { background: var(--card-2) !important; }
.tbl th.right, .tbl td.right { text-align: right; }
.rowdd { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card); color: var(--muted); display: inline-grid; place-items: center; cursor: pointer; transition: color .15s, background .15s; }
.rowdd:hover { color: var(--ink); background: var(--card-3); }
.rowdd svg { width: 13px; height: 13px; }
.lines { width: 100%; border-collapse: collapse; font-size: 13px; }
.lines td { padding: 5px 0; border: 0; background: none !important; }
.scroll-x { overflow-x: auto; }
.psku { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 11.5px; color: var(--muted); }
.thumb { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; vertical-align: middle; margin-right: 9px; border: 1px solid var(--line); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; }

/* ---------- Vistas de lista (CRM) ---------- */
.lv { overflow: hidden; }
.lv-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 18px 8px; }
.lv-title select { max-width: 100%; border: 0; outline: none; background-color: transparent; color: var(--ink); font-size: 18px; font-weight: 700; letter-spacing: -.015em; padding: 0 24px 0 0; cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a0b8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 2px center; background-size: 16px; }
.lv-title select option { font-size: 14px; font-weight: 400; background: var(--card); }
.lv-meta { font-size: 12.5px; color: var(--muted); }
.lv-tools { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; padding: 4px 18px 12px; }
.lv-tools .search { width: 300px; max-width: 100%; }
.lv-body { display: flex; border-top: 1px solid var(--line); }
.lv-body > .scroll-x { flex: 1; min-width: 0; }
.lv-filters { width: 280px; flex: none; padding: 14px; border-left: 1px solid var(--line); background: var(--card-2); }
.lv-filters h4 { margin: 0 0 12px; font-size: 14.5px; display: flex; justify-content: space-between; align-items: center; }
.lv-filters .f { margin-bottom: 10px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); }
.crm-nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.crm-title { display: flex; align-items: center; gap: 12px; }
.crm-title b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; margin-left: auto; padding: 4px; border-radius: 999px; background: var(--card-3); border: 1px solid var(--line); }
.seg button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font-weight: 500; cursor: pointer; transition: background .15s, color .15s; }
.seg button svg { width: 16px; height: 16px; }
.seg button em { font-style: normal; font-size: 11.5px; font-weight: 600; padding: 0 7px; line-height: 18px; border-radius: 99px; background: var(--card); color: var(--ink); }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--pill); color: var(--pill-ink); box-shadow: var(--sh-1); }
.seg button.on em { background: var(--gold); color: #14213d; }

/* ---------- Ficha de registro ---------- */
.rec-head { padding: 16px 18px; margin-bottom: 14px; }
.rec-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rec-top h1 { margin: 2px 0 0; font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.rec-fields { display: flex; flex-wrap: wrap; gap: 10px 44px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.rec-fields small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.path { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 14px; }
.path ol { list-style: none; margin: 0; padding: 0; display: flex; flex: 1; min-width: 300px; overflow-x: auto; counter-reset: paso; }
.path li { flex: 1; min-width: 92px; position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 2px 6px; color: var(--muted); font-size: 12.5px; text-align: center; cursor: pointer; white-space: nowrap; }
.path li::before { counter-increment: paso; content: counter(paso); position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 2px solid var(--line-2); color: var(--muted); font-weight: 700; font-size: 13px; transition: transform .15s; }
.path li::after { content: ""; position: absolute; top: 17px; left: calc(-50% + 15px); right: calc(50% + 15px); height: 2px; background: var(--line-2); }
.path li:first-child::after { display: none; }
.path li:hover { color: var(--ink); }
.path li:hover::before { transform: scale(1.06); }
.path li.done { color: var(--ok); }
.path li.done::before { content: "\2713"; background: var(--ok); border-color: var(--ok); color: #fff; }
.path li.done::after, .path li.cur::after, .path li.won::after, .path li.lost::after { background: var(--ok); }
.path li.cur { color: var(--ink); font-weight: 600; }
.path li.cur::before { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 14%, transparent); }
.path li.won { color: var(--ok); font-weight: 600; }
.path li.won::before { content: "\2605"; background: var(--gold); border-color: var(--gold); color: #14213d; }
.path li.lost { color: var(--bad); font-weight: 600; }
.path li.lost::before { content: "\2715"; background: var(--bad); border-color: var(--bad); color: #fff; }
.rec-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 30%); gap: 14px; align-items: start; }
.rtabs { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.rtabs { overflow-x: auto; scrollbar-width: none; }
.rtabs::-webkit-scrollbar { display: none; }
.rtabs button { flex: none; white-space: nowrap; padding: 12px 10px 10px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-weight: 500; cursor: pointer; margin-bottom: -1px; }
.rtabs button:hover { color: var(--ink); }
.rtabs button.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--gold); }
.rtab-body { padding: 16px 18px; }
.act-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.act-bar .btn svg { color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.tl-item { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tl-item:last-child { border-bottom: 0; }
.tl-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; box-shadow: 0 0 0 4px var(--card); }
.tl-ico svg { width: 15px; height: 15px; }
.tl-body { flex: 1; min-width: 0; }
.tl-body b { font-weight: 600; }
.tl-body p { margin: 4px 0 0; white-space: pre-wrap; color: var(--ink-2); }
.tl-item.done .tl-body b { text-decoration: line-through; color: var(--muted); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.fields > div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.fields small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.related { display: flex; flex-direction: column; gap: 14px; }
.rel { overflow: hidden; }
.rel-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.rel-h h3 { margin: 0; flex: 1; font-size: 14px; font-weight: 600; }
.rel-h .obj-icon { width: 26px; height: 26px; border-radius: 8px; }
.rel-h .obj-icon svg { width: 14px; height: 14px; }
.rel-b { padding: 8px 16px 10px; }
.rel-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rel-row:last-child { border-bottom: 0; }
.rel-empty { padding: 8px 0; color: var(--muted); }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kv div { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); }
.kv small { display: block; color: var(--muted); font-size: 11.5px; }
.kv b { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }

/* ---------- Ficha 360° del cliente ---------- */
.cli-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.cli-kpis > div { min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); }
.cli-kpis small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.cli-kpis b { display: block; margin-top: 2px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cli-kpis span { display: block; margin-top: 1px; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cli-kpis > div:first-child { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 18%, transparent); }
.buys { display: flex; flex-direction: column; gap: 10px; }
.buy { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.buy-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--card-2); }
.buy-h > b { font-size: 15px; }
.buy-m { margin-top: 2px; color: var(--muted); font-size: 12px; }
.buy-l > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 13.5px; }
.buy-l > div > span:last-child { flex: none; color: var(--ink-2); }
.buy-tot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--brand-soft); color: var(--muted); }
.buy-tot b { color: var(--ink); font-size: 16px; }
.rel-row .btns { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 1400px) { .cli-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cli-kpis { grid-template-columns: 1fr 1fr; gap: 8px; } .cli-kpis b { font-size: 16px; } .rec-top .btn-group { width: 100%; flex-wrap: wrap; gap: 6px; } .rec-top .btn-group .btn { flex: 1 1 auto; margin-left: 0; border-radius: var(--r-sm); } .rec-top .btn-group .btn.primary { flex: 1 1 100%; } .buy-l > div { flex-direction: column; gap: 2px; } }

/* ---------- Menús desplegables ---------- */
.dd { position: absolute; z-index: 70; min-width: 240px; max-width: 340px; padding: 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--sh-pop); animation: pop .14s var(--ease); }
.dd > button, .dd .dd-list > button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.dd > button:hover { background: var(--card-3); }
.dd > button svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.dd > button kbd { margin-left: auto; }
.dd .dd-h { margin: 6px 4px 2px; padding: 8px 6px 4px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.dd .dd-h:empty { padding: 0; margin: 6px 4px; }
.dd .dd-user { display: flex; gap: 12px; align-items: center; padding: 10px; margin-bottom: 4px; }
.dd .dd-user b { display: block; font-weight: 600; }
.dd .dd-user small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.dd .danger, .dd .danger svg { color: var(--bad) !important; }
.dd-theme { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 2px 4px 4px; }
.dd-theme button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink-2); font-size: 12px; cursor: pointer; }
.dd-theme button svg { width: 16px; height: 16px; }
.dd-theme button:hover { background: var(--card-3); }
.dd-theme button.on { border-color: var(--gold); background: var(--gold-soft); color: var(--ink); font-weight: 600; }
.dd.alerts { width: 380px; max-width: calc(100vw - 16px); padding: 0; overflow: hidden; }
.al-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.al-list { max-height: min(62vh, 480px); overflow-y: auto; padding: 6px; }
.al-item { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 10px; border: 0; border-radius: 10px; background: none; color: var(--ink); text-align: left; cursor: pointer; white-space: normal; }
.al-item:hover { background: var(--card-3); }
.al-item b { display: block; font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.al-item small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.al-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.al-ico svg { width: 16px; height: 16px; }
.al-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 16px; text-align: center; color: var(--muted); }
.al-empty svg { width: 36px; height: 36px; color: var(--ok); margin-bottom: 6px; }
.al-empty b { color: var(--ink); }

/* ---------- Paleta de comandos (Ctrl K) ---------- */
.pal-wrap { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: var(--overlay); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: fade .12s; }
.pal { width: 100%; max-width: 660px; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--sh-pop); animation: pop .16s var(--ease); }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.pal-in > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.pal-in input { flex: 1; height: 56px; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 16px; }
.pal-in input::placeholder { color: var(--muted); }
.pal-list { max-height: min(60vh, 470px); overflow-y: auto; padding: 6px; }
.pal-g { padding: 10px 10px 4px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.pal-it { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.pal-it.sel { background: var(--brand-soft); }
.pal-it .obj-icon { width: 30px; height: 30px; border-radius: 8px; }
.pal-it .obj-icon svg { width: 15px; height: 15px; }
.pal-it > span:nth-child(2) { flex: 1; min-width: 0; }
.pal-it small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-it kbd { visibility: hidden; }
.pal-it.sel kbd { visibility: visible; }
.pal-empty { padding: 34px 16px; text-align: center; color: var(--muted); }
.pal-foot { display: flex; gap: 16px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--card-2); color: var(--muted); font-size: 12px; }
.pal-foot span { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Tooltip ---------- */
.tip { position: fixed; z-index: 120; max-width: 280px; padding: 8px 10px; border-radius: 8px; background: var(--tip-bg); color: var(--tip-ink); font-size: 12px; line-height: 1.45; white-space: pre-line; box-shadow: var(--sh-pop); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.tip.show { opacity: 1; transform: none; }

/* ---------- Modal (formularios) ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 24px; overflow-y: auto; background: var(--overlay); animation: fade .15s; }
.sheet { position: relative; width: 100%; max-width: 600px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); box-shadow: var(--sh-pop); animation: pop .2s var(--ease); }
.sheet.wide { max-width: 880px; }
.mhead { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.mhead h3 { margin: 0; flex: 1; font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
.x { width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; display: grid; place-items: center; cursor: pointer; flex: none; }
.x:hover { background: var(--card-3); color: var(--ink); }
.mbody { padding: 18px 20px 8px; }
.mfoot { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--card-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.mfoot .grow { flex: 1; }
.merr { flex-basis: 100%; color: var(--bad); font-size: 13px; font-weight: 500; }
.merr:empty { display: none; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.fgrid .full { grid-column: 1 / -1; }
.sect { display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.sect::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sect.first { margin-top: 0; }
.f .lbl { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.warn-t { color: var(--warn); }
.lrow { display: grid; grid-template-columns: minmax(0, 1fr) 172px 64px 112px 100px 38px; gap: 8px; margin-bottom: 8px; align-items: start; }
.lrow.c { grid-template-columns: minmax(0, 1fr) 172px 76px 130px 38px; }
.lrow .del { height: 38px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--card); color: var(--muted); font-size: 18px; cursor: pointer; }
.lrow .del:hover { color: var(--bad); background: var(--bad-soft); }
.lrow .hint { grid-column: 1 / -1; margin: -2px 0 4px; font-size: 12px; color: var(--muted); }
.lrow .hint:empty { display: none; }
.lhead { display: grid; grid-template-columns: minmax(0, 1fr) 172px 64px 112px 100px 38px; gap: 8px; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 500; }
.lhead.c { grid-template-columns: minmax(0, 1fr) 172px 76px 130px 38px; }
.totalbox { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent); }
.totalbox b { font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.totalbox small { display: block; margin-top: 1px; font-size: 11.5px; }
.totalbox small:empty { display: none; }

/* ---------- Selector por nombre (productos y clientes) ---------- */
.pp { position: relative; min-width: 0; }
.pp-box { position: relative; }
.pp-box > svg { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.pp .pp-q { padding-left: 34px; text-overflow: ellipsis; }
.pp.ok .pp-q { border-color: color-mix(in srgb, var(--ok) 45%, var(--line-2)); background: color-mix(in srgb, var(--ok-soft) 35%, var(--card)); font-weight: 500; }
.pp.ok .pp-box > svg { color: var(--ok); }
.pp-sku { padding: 0 9px; font: 500 11.5px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: -.02em; text-overflow: ellipsis; cursor: default; }
.pp-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; min-width: min(300px, 86vw); max-height: 300px; overflow-y: auto; overscroll-behavior: contain; padding: 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--sh-pop); animation: pop .12s var(--ease); }
.pp-opt { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.pp-opt.on { background: var(--card-3); }
@media (hover: hover) { .pp-opt:hover { background: var(--card-3); } }
.pp-opt .av { margin: 0; width: 34px; height: 34px; font-size: 12px; }
.pp-img { width: 34px; height: 34px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 8px; color: #fff; font-size: 11px; font-weight: 700; }
.pp-img img { width: 100%; height: 100%; object-fit: cover; }
.pp-img.add { background: var(--brand-soft); color: var(--brand); }
.pp-img.add svg { width: 16px; height: 16px; }
.pp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pp-main b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-main b mark { background: color-mix(in srgb, var(--gold) 32%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.pp-main small, .pp-side small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right; line-height: 1.3; font-variant-numeric: tabular-nums; }
.pp-side b { font-size: 13px; font-weight: 600; }
.pp-side small.pos { color: var(--ok); } .pp-side small.neg { color: var(--bad); }
.pp-new .pp-main b { color: var(--link); }
.pp-empty { padding: 14px 10px; color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- Cliente en la venta ---------- */
.cb-row { display: flex; gap: 8px; align-items: flex-start; }
.cb-row .pp { flex: 1; }
.cb-row .btn { flex: none; height: 38px; }
.cb-row + .hint { margin-top: 6px; font-size: 12px; color: var(--muted); }
.cb-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--ok) 28%, var(--line)); background: color-mix(in srgb, var(--ok-soft) 60%, var(--card)); animation: rise .18s var(--ease); }
.cb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.35; }
.cb-info b { font-weight: 600; }
.cb-info small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.cb-new { padding: 14px; border-radius: 12px; border: 1px dashed var(--line-2); background: var(--card-2); animation: rise .18s var(--ease); }
.cb-new-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cb-new-h b { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.cb-new-h b svg { width: 16px; height: 16px; color: var(--brand); }

/* ---------- Botones de opción (canal, medio de pago) ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.f .pill-r { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.pill-r input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pill-r span { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2); font-size: 13px; font-weight: 500; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.pill-r:hover span { border-color: color-mix(in srgb, var(--line-2) 50%, var(--muted)); color: var(--ink); }
.pill-r input:checked + span { background: var(--pill); border-color: var(--pill); color: var(--pill-ink); font-weight: 600; }
.pill-r input:focus-visible + span { box-shadow: var(--focus); }

/* ---------- Más detalles (plegable) ---------- */
details.more { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); }
details.more > summary { display: flex; align-items: center; gap: 8px; padding: 11px 14px; list-style: none; cursor: pointer; color: var(--ink-2); font-weight: 500; border-radius: 12px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary svg { width: 14px; height: 14px; flex: none; color: var(--muted); transform: rotate(-90deg); transition: transform .15s; }
details.more[open] > summary svg { transform: none; }
details.more > summary small { margin-left: auto; color: var(--muted); font-weight: 400; font-size: 12px; text-align: right; }
details.more > .fgrid { padding: 4px 14px 14px; }

/* ---------- Diálogo de confirmación ---------- */
.dlg-wrap { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; padding: 16px; background: var(--overlay); animation: fade .12s; }
.dlg { width: 100%; max-width: 440px; padding: 22px 22px 18px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); box-shadow: var(--sh-pop); animation: pop .16s var(--ease); }
.dlg-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; background: var(--brand-soft); color: var(--brand); }
.dlg-ico svg { width: 22px; height: 22px; }
.dlg.danger .dlg-ico { background: var(--bad-soft); color: var(--bad); }
.dlg h3 { margin: 0 0 6px; font-size: 17px; font-weight: 650; letter-spacing: -.015em; line-height: 1.35; }
.dlg p { margin: 0; color: var(--ink-2); white-space: pre-line; line-height: 1.55; }
.dlg .inp { margin-top: 14px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }

/* ---------- Lanzador de secciones ---------- */
.menu-sheet { max-width: 720px; }
.menu-list { list-style: none; margin: 0; padding: 12px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.menu-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--ink); font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; transition: background .15s, border-color .15s; }
.menu-list button:hover { background: var(--card-2); border-color: var(--line); }
.menu-list .obj-icon { width: 32px; height: 32px; border-radius: 9px; }
.menu-list .obj-icon svg { width: 16px; height: 16px; }
.menu-list .chev { display: none; }

/* ---------- Fotos e IA ---------- */
.fotobox { display: flex; align-items: flex-start; gap: 14px; padding: 12px; margin-bottom: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card-2); }
.foto { width: 96px; height: 96px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 10px; border: 1.5px dashed var(--line-2); background: var(--card); color: var(--muted); font-size: 12px; text-align: center; cursor: pointer; transition: border-color .15s, color .15s; }
.foto:hover { border-color: var(--gold); color: var(--ink); }
.foto span { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.foto svg { width: 24px; height: 24px; }
.foto img { width: 100%; height: 100%; object-fit: cover; }
.fotoinfo b { font-weight: 600; }
.fotoinfo p { margin: 2px 0 8px; }
.iabox { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 12px; border-radius: var(--radius); background: var(--gold-soft); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); }
.iabox p { margin: 2px 0 0; }

/* ---------- Flujo de caja (tabla tipo planilla) ---------- */
.fcwrap { overflow: auto; max-height: 74vh; }
.fc { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; white-space: nowrap; }
.fc th, .fc td { padding: 7px 12px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.fc th { position: sticky; top: 0; z-index: 2; background: var(--head); color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.fc td:first-child, .fc th:first-child { position: sticky; left: 0; z-index: 1; min-width: 270px; white-space: normal; text-align: left; background: var(--card); border-right: 1px solid var(--line); }
.fc th:first-child { z-index: 3; background: var(--head); }
.fc td:last-child, .fc th:last-child { background: var(--card-2); font-weight: 600; }
.fc tr.sec td, .fc tr.sec td:first-child { background: var(--sec-bg); color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .02em; }
.fc tr.ind td:first-child { padding-left: 26px; color: var(--muted); }
.fc tr.sub td, .fc tr.sub td:first-child { font-weight: 600; background: var(--card-2); }
.fc tr.total td, .fc tr.total td:first-child { font-weight: 700; border-top: 2px solid var(--ink); background: var(--brand-soft); }
.fc tbody tr:hover td { background: color-mix(in srgb, var(--brand) 5%, var(--card)); }
.fc .z { color: var(--line-2); }
.fc .ng { color: var(--bad); }

/* ---------- Ingreso / registro ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(380px, 1fr) 1.15fr; }
.login-left { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 20px; background: var(--bg); }
.login-logo { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 24px; }
.login-logo img { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 8px 24px -8px rgba(20, 33, 61, .45); }
.login-logo h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.login-logo h1 b { color: var(--gold-2); }
.login-card { width: 100%; max-width: 400px; padding: 26px 24px 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); animation: pop .25s var(--ease); }
.login-card .f { margin-bottom: 16px; }
.login-card .inp { height: 42px; }
.login-card > .btn, .login-card form > .btn { width: 100%; height: 42px; font-size: 14.5px; }
.login-card .fgrid { gap: 0 12px; }
.login-title { margin: 0 0 6px; font-size: 19px; font-weight: 700; letter-spacing: -.015em; }
.remember { margin-top: 14px; }
.login-card .err { margin-top: 12px; color: var(--bad); font-size: 13px; font-weight: 500; }
.login-card .err:empty { display: none; }
.login-links { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; }
.login-foot { margin-top: 24px; color: var(--muted); font-size: 12px; }
.login-right { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 36px; padding: 64px 56px; color: #fff;
  background: radial-gradient(800px 460px at 85% 5%, rgba(201, 162, 74, .35), transparent 60%), radial-gradient(600px 400px at 0% 100%, rgba(59, 130, 196, .25), transparent 60%), linear-gradient(160deg, #1d3557 0%, #14213d 100%); }
.lr-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #e8cf94; }
.lr-eyebrow svg { width: 20px; height: 20px; }
.lr-text h2 { margin: 14px 0 12px; max-width: 560px; font-size: 34px; font-weight: 600; line-height: 1.2; letter-spacing: -.025em; }
.lr-text p { margin: 0; max-width: 500px; font-size: 16px; color: rgba(255, 255, 255, .78); line-height: 1.55; }
.lr-mock { position: relative; z-index: 1; max-width: 560px; padding-bottom: 18px; border-radius: 14px; background: #fff; color: #0f172a; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .55); transform: perspective(1200px) rotateY(-6deg) rotateX(3deg); }
.lr-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid #e4e8ef; }
.lr-bar span { width: 9px; height: 9px; border-radius: 50%; background: #d0d7e2; }
.lr-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 16px 6px; }
.lr-kpis div { padding: 9px 11px; border-radius: 10px; border: 1px solid #e4e8ef; border-left: 3px solid #c9a24a; }
.lr-kpis small { display: block; color: #64748b; font-size: 11px; }
.lr-kpis b { font-size: 16px; }
.lr-chart { display: flex; align-items: flex-end; gap: 12px; height: 110px; margin: 0 16px; padding: 10px 18px 0; border-bottom: 1px solid #e4e8ef; }
.lr-chart i { flex: 1; border-radius: 6px 6px 0 0; background: linear-gradient(#3d5f94, #14213d); }
.bye { text-align: center; padding: 6px 0 4px; }
.bye-ico { width: 68px; height: 68px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.bye-ico svg { width: 36px; height: 36px; }
.bye h3 { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.bye p { margin: 0 0 18px; color: var(--muted); }
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth .box { width: 100%; max-width: 400px; padding: 26px 22px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.auth .btn { width: 100%; margin-top: 8px; }
.auth .err { color: var(--bad); }

/* ---------- Avisos (toasts) ---------- */
.toasts { position: fixed; z-index: 110; right: 20px; bottom: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.toast-i { pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; min-width: 260px; max-width: 420px; padding: 12px 10px 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); box-shadow: var(--sh-pop); font-size: 13.5px; animation: toastIn .22s var(--ease); }
.toast-i.out { animation: toastOut .18s ease forwards; }
.toast-i .ti { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--ok-soft); color: var(--ok); }
.toast-i.bad .ti { background: var(--bad-soft); color: var(--bad); }
.toast-i .ti svg { width: 14px; height: 14px; }
.toast-i > span:nth-child(2) { flex: 1; padding-top: 1px; line-height: 1.45; }
.toast-i button { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 4px; border-radius: 6px; cursor: pointer; }
.toast-i button:hover { color: var(--ink); background: var(--card-3); }

/* ---------- Esqueleto de carga ---------- */
.sk { border-radius: 8px; background: linear-gradient(90deg, var(--card-3) 25%, color-mix(in srgb, var(--card-3) 45%, var(--card)) 37%, var(--card-3) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.sk-hdr { height: calc(56px + env(safe-area-inset-top)); background: var(--hdr-bg); }
.sk-nav { height: 52px; background: var(--card); border-bottom: 1px solid var(--line); }
.sk-main { padding: 22px 24px; }
.sk-title { height: 30px; width: 280px; margin-bottom: 20px; }
.sk-card { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.sk-l { height: 12px; width: 45%; } .sk-v { height: 26px; width: 70%; } .sk-s { height: 10px; width: 55%; }

/* ---------- Sin conexión ---------- */
.offline { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 115; padding: 8px 16px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 13px; font-weight: 500; box-shadow: var(--sh-pop); }

/* ---------- Solo lectura ---------- */
body.ro [data-act^="new"], body.ro [data-act^="del"], body.ro [data-act="ajuste"], body.ro [data-act="anular"], body.ro [data-act="editRec"],
body.ro [data-act="cancelRes"], body.ro [data-act="venderRes"], body.ro [data-act="convertLead"], body.ro [data-act="pathNext"], body.ro [data-act="pathSel"],
body.ro [data-act="addOppLine"], body.ro [data-act="oppToVenta"], body.ro #msubmit, body.ro [data-act="abonar"], body.ro [data-act="delPago"], body.ro [data-act="metaEdit"], body.ro [data-act="provCompra"], body.ro [data-act="cliVenta"], body.ro [data-act="cliRes"] { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c3 { grid-column: span 6; } .c4, .c5, .c6, .c7, .c8 { grid-column: span 12; }
  .dgrid.dash > .c4 { grid-column: span 6; }
}
@media (max-width: 1000px) { .rec-grid { grid-template-columns: 1fr; } .onb { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .cmdk-btn, .hide-m, .app-nav { display: none !important; }
  .only-m { display: grid !important; }
  .app-hdr { gap: 6px; padding: env(safe-area-inset-top) 8px 0; }
  html { scroll-padding-top: calc(64px + env(safe-area-inset-top)); }
  main { padding: 16px 12px calc(88px + env(safe-area-inset-bottom)); }
  .app-hdr ~ main { margin-top: calc(56px + env(safe-area-inset-top)); }
  .page-head .spacer { flex-basis: 100%; height: 0; }
  .page-head select.inp, .dash-hero select.inp { flex: 1; }
  .dash-hero h1 { font-size: 22px; }
  .dgrid.dash > .c4 { grid-column: span 12; }
  .qa { flex-wrap: nowrap; overflow-x: auto; margin: 0 -12px 16px; padding: 0 12px 4px; scrollbar-width: none; }
  .qa::-webkit-scrollbar { display: none; }
  .qa .btn { flex: none; }
  .filters .inp { flex: 1 1 45%; min-width: 0; }
  .mnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--card) 92%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .mnav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 7px; border: 0; background: none; color: var(--muted); font-size: 10.5px; font-weight: 500; cursor: pointer; position: relative; }
  .mnav button svg { width: 22px; height: 22px; }
  .mnav button.on { color: var(--ink); }
  .mnav button.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold); }
  .tbl.stack thead { display: none; }
  .tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: 100%; }
  .tbl.stack tr { position: relative; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .tbl.stack td { padding: 2px 0; border: 0; text-align: left !important; }
  .tbl.stack td.rn { display: none; }
  .tbl.stack td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: 12px; }
  .tbl.stack td.first { font-size: 14.5px; font-weight: 600; padding-right: 40px; margin-bottom: 2px; }
  .tbl.stack td.act { position: absolute; top: 10px; right: 12px; width: auto; }
  .tbl.stack .btns { justify-content: flex-start; margin-top: 8px; }
  .lv-body { flex-direction: column; }
  .lv-filters { width: auto; border-left: 0; border-top: 1px solid var(--line); }
  .lv-tools .search { flex: 1; width: auto; }
  .seg { margin-left: 0; width: 100%; }
  .seg button { flex: 1; justify-content: center; padding: 7px 8px; }
  .toasts { left: 12px; right: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); align-items: stretch; }
  .toast-i { max-width: none; min-width: 0; }
  .login { grid-template-columns: 1fr; }
  .login-right { display: none; }
  .login-left { background: radial-gradient(600px 320px at 50% 0, var(--gold-soft), transparent 70%), var(--bg); }
  .pal-wrap { padding-top: 8vh; }
}
@media (max-width: 600px) {
  .fields { grid-template-columns: 1fr; }
  .seg button span { display: none; }
  .stat .val { font-size: 22px; }
  .spark { width: 70px; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .modal { padding: 0; align-items: flex-end; }
  .sheet { max-height: 94vh; max-height: calc(100dvh - env(safe-area-inset-top) - 12px); overflow-y: auto; border-radius: 18px 18px 0 0; animation: rise .22s var(--ease); }
  .mfoot { position: sticky; bottom: 0; border-radius: 0; }
  .fgrid { grid-template-columns: 1fr; }
  .login-card .fgrid { grid-template-columns: 1fr 1fr; }
  .lhead { display: none; }
  .lrow, .lrow.c { grid-template-columns: minmax(0, 1fr) 58px 104px 38px; grid-template-areas: "p p p p" "s c r x" "h h h h"; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card-2); }
  .lrow > .pp { grid-area: p; } .lrow > .pp-sku { grid-area: s; } .lrow > [name=l_cant] { grid-area: c; }
  .lrow > [name=l_precio] { grid-area: r; } .lrow > .del { grid-area: x; } .lrow > .hint { grid-area: h; margin: 0; }
  .lrow .desc { display: none; }
  .pp-list { max-height: 240px; }
  .mfoot .btn { flex: 1 1 auto; }
  .mfoot .grow { display: none; }
  .cb-row .btn span { display: none; }
  .cb-row .btn { width: 42px; padding: 0; justify-content: center; }
  details.more > summary small { display: none; }
  .dlg-actions { flex-direction: column-reverse; }
  .dlg-actions .btn { width: 100%; height: 42px; }
}
@media (max-width: 400px) { .kpis { grid-template-columns: 1fr; } }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Impresión ---------- */
@media print {
  .app-hdr, .app-nav, .mnav, .btn, .icon-btn, .rowdd, .toasts, .lv-tools, .filters, .seg, .qa, .onb, .act-bar, .launcher, .tip { display: none !important; }
  body { background: #fff; color: #000; }
  main { padding: 0; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  .fcwrap { max-height: none; overflow: visible; }
}

/* ---------- Cuentas, metas y cotización (Fase 4) ---------- */
.tbl tr.late td { background: color-mix(in srgb, var(--bad-soft) 55%, transparent); }
.tscroll { overflow-x: auto; margin: 0 -4px; }
.tbl.mini { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl.mini th { padding: 6px 8px; color: var(--muted); font-size: 11.5px; font-weight: 600; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl.mini td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
.tbl.mini tr:last-child td { border-bottom: 0; }
.tbl.mini th.right, .tbl.mini td.right { text-align: right; }
.tbl.mini tr.click { cursor: pointer; } .tbl.mini tr.click:hover td { background: var(--card-2); }
.tbl.mini tr.cur td { background: var(--brand-soft); font-weight: 600; }
.meta-strip { display: grid; grid-template-columns: minmax(160px, auto) 1fr 1fr; gap: 10px 24px; align-items: center; padding: 14px 18px; margin-bottom: 14px; }
.meta-t { display: flex; flex-direction: column; gap: 2px; }
.meta-t b { font-size: 14px; }
.meta-strip.empty-meta { display: flex; justify-content: space-between; gap: 12px; }
.meta-strip.empty-meta > span { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.meta-strip.empty-meta svg { width: 18px; height: 18px; color: var(--gold); }
.goal-h { display: flex; align-items: baseline; gap: 8px; font-size: 13px; margin-bottom: 6px; flex-wrap: wrap; }
.goal-h > span:first-child { color: var(--muted); font-weight: 500; }
.goal-h > b:last-child { margin-left: auto; }
.goal .track { height: 8px; border-radius: 99px; background: var(--card-3); overflow: hidden; }
.goal .fill { height: 100%; border-radius: 99px; transition: width .4s var(--ease); }
.pdf-ok { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); margin-bottom: 14px; }
.pdf-ok b { display: block; word-break: break-all; } .pdf-ok small { color: var(--muted); }
.pdf-ico { width: 44px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 8px; background: #c0262d; color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .04em; }
.pdf-acts { display: flex; flex-direction: column; gap: 8px; }
.pdf-acts .btn { height: 42px; justify-content: flex-start; }
@media (max-width: 900px) { .meta-strip { grid-template-columns: 1fr; } .meta-strip.empty-meta { flex-direction: column; align-items: flex-start; } }

/* ---------- Lector de código de barras y etiquetas ---------- */
.pp.has-scan .pp-q { padding-right: 40px; }
.pp-scan { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.pp-scan:hover { background: var(--card-3); color: var(--ink); }
.pp-scan svg { width: 18px; height: 18px; }
.lacts { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.inline-inp { display: flex; gap: 6px; } .inline-inp .inp { flex: 1; min-width: 0; } .inline-inp .btn { height: 38px; width: 42px; padding: 0; flex: none; }
.scan-wrap { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: 16px; background: rgba(2, 6, 16, .78); animation: fade .12s; }
.scan { width: 100%; max-width: 520px; overflow: hidden; border-radius: 18px; background: var(--card); box-shadow: var(--sh-pop); animation: pop .16s var(--ease); }
.scan-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 10px 18px; }
.scan-v { position: relative; aspect-ratio: 4 / 3; background: #000; overflow: hidden; }
.scan-v video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-frame { position: absolute; left: 8%; right: 8%; top: 28%; bottom: 28%; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .38); border: 2px solid rgba(255, 255, 255, .85); }
.scan-frame i { position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: #ff3b30; box-shadow: 0 0 10px #ff3b30; animation: scanline 1.6s ease-in-out infinite; }
.scan-frame.hit { border-color: #34c759; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .38), 0 0 0 4px rgba(52, 199, 89, .5); }
@keyframes scanline { 0%, 100% { transform: translateY(-18px); } 50% { transform: translateY(18px); } }
.scan-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; color: #fff; text-align: center; font-size: 14px; pointer-events: none; }
.scan-msg:empty { display: none; }
.scan-msg small { display: block; margin-top: 6px; opacity: .8; font-size: 12.5px; }
.scan-f { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 14px; }
.scan-last { min-height: 20px; font-size: 13.5px; color: var(--muted); }
.scan-man { display: flex; gap: 8px; } .scan-man .inp { flex: 1; }
.scan-ok { height: 42px; }
.et-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.et-tools .search { min-width: 200px; }
.et-list { max-height: 46vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.et-row { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.et-row:last-child { border-bottom: 0; }
.et-row:hover { background: var(--card-2); }
.et-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.et-n { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.et-n b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.et-n small { color: var(--muted); font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; }
.et-q { width: 76px !important; flex: none; text-align: right; }
@media (max-width: 560px) { .scan-wrap { padding: 0; align-items: end; } .scan { border-radius: 18px 18px 0 0; max-width: none; padding-bottom: env(safe-area-inset-bottom); } }

/* ---------- Mensajes (bandeja) ---------- */
.ch-ico { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; flex: none; vertical-align: middle; }
.ch-ico svg { width: 13px; height: 13px; }
.ch-ico.sm { width: 16px; height: 16px; } .ch-ico.sm svg { width: 10px; height: 10px; stroke-width: 2.4; }
.inbox { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); height: calc(100vh - 230px); height: calc(100dvh - 230px); min-height: 460px; overflow: hidden; padding: 0; }
.ib-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.ib-tools { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
.ib-seg { margin: 0; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; } .ib-seg::-webkit-scrollbar { display: none; }
.ib-seg button { padding: 6px 10px; font-size: 12.5px; white-space: nowrap; }
.ib-items { flex: 1; overflow-y: auto; min-height: 0; }
.ib-it { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); text-align: left; cursor: pointer; }
.ib-it:hover { background: var(--card-2); } .ib-it.on { background: var(--brand-soft); }
.ib-av { position: relative; flex: none; } .ib-av .av { margin: 0; width: 38px; height: 38px; font-size: 13px; } .ib-av .av.lg { width: 42px; height: 42px; }
.ib-av .ch-ico { position: absolute; right: -3px; bottom: -3px; box-shadow: 0 0 0 2px var(--card); }
.ib-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ib-top { display: flex; justify-content: space-between; gap: 8px; } .ib-top b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ib-top small { color: var(--muted); font-size: 11.5px; flex: none; }
.ib-prev { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-it.unread .ib-top b, .ib-it.unread .ib-prev { color: var(--ink); font-weight: 600; }
.ib-thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--card-2); }
.ib-empty { flex: 1; display: grid; place-items: center; align-content: center; gap: 6px; padding: 24px; color: var(--muted); text-align: center; }
.ib-empty svg { width: 34px; height: 34px; color: var(--line-2); } .ib-empty b { color: var(--ink); } .ib-empty.small { flex: none; padding: 30px; }
.ib-h { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ib-back { display: none; color: var(--ink); } .ib-back svg { transform: rotate(90deg); }
.ib-who { flex: 1; min-width: 160px; display: flex; flex-direction: column; line-height: 1.35; } .ib-who b { font-weight: 600; } .ib-who small { color: var(--muted); font-size: 12px; }
.ib-acts { display: flex; gap: 6px; flex-wrap: wrap; } .ib-acts .btn svg { width: 14px; height: 14px; }
.ib-msgs { flex: 1; overflow-y: auto; min-height: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.ib-day { text-align: center; margin: 8px 0 4px; } .ib-day span { display: inline-block; padding: 3px 10px; border-radius: 99px; background: var(--card-3); color: var(--muted); font-size: 11.5px; font-weight: 500; }
.bub { max-width: min(78%, 520px); padding: 8px 11px 6px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); align-self: flex-start; box-shadow: var(--sh-1); }
.bub.out { align-self: flex-end; background: color-mix(in srgb, #25d366 16%, var(--card)); border-color: color-mix(in srgb, #25d366 30%, var(--line)); }
.bub.err { border-color: var(--bad); }
.bub-t { white-space: pre-wrap; word-wrap: break-word; line-height: 1.45; }
.bub-media { font-size: 12.5px; color: var(--muted); margin-bottom: 2px; }
.bub-m { margin-top: 2px; text-align: right; color: var(--muted); font-size: 11px; } .bub-m .leido { color: #34b7f1; }
.bub-e { margin-top: 4px; color: var(--bad); font-size: 12px; }
.ib-comp { padding: 10px 12px; background: var(--card); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.ib-modo { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); } .ib-modo label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; } .ib-modo input { accent-color: var(--primary); }
.ib-row { display: flex; gap: 8px; align-items: flex-end; } .ib-row textarea { min-height: 40px; max-height: 140px; resize: none; padding: 9px 12px; line-height: 1.4; }
.ib-row .btn { height: 40px; }
.ib-warn { padding: 8px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; }
.badge.mb { position: absolute; top: 3px; left: calc(50% + 6px); }
@media (max-width: 900px) {
  .inbox { grid-template-columns: 1fr; height: calc(100dvh - 56px - env(safe-area-inset-top) - 150px - env(safe-area-inset-bottom)); min-height: 420px; }
  .inbox .ib-thread { display: none; } .inbox.has-sel .ib-list { display: none; } .inbox.has-sel .ib-thread { display: flex; }
  .ib-back { display: grid; } .ib-acts .btn span { display: none; } .ib-acts .btn { padding: 0 9px; }
  .bub { max-width: 86%; }
}
@media (max-width: 900px) { #view.msg-open .page-head { display: none; } #view.msg-open .inbox { height: calc(100dvh - 164px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); min-height: 380px; } }

/* ---------- Módulos CRM / ERP ---------- */
.modsw { display: inline-flex; flex: none; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.modsw button { height: 28px; padding: 0 13px; border: 0; border-radius: 999px; background: none; color: rgba(255,255,255,.72); font-weight: 600; font-size: 12.5px; letter-spacing: .02em; cursor: pointer; }
.modsw button:hover { color: #fff; }
.modsw button.on { background: var(--gold); color: #14213d; }
.nav-mod { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 0 12px 0 4px; margin-right: 4px; border-right: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: 13px; letter-spacing: .03em; }
.nav-mod svg { width: 16px; height: 16px; color: var(--mc); }
.menu-g { padding: 10px 22px 0; color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.menu-list button.on { background: var(--brand-soft); }
.mod-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 22px 4px; }
.mod-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.mod-card:hover { border-color: var(--line-2); background: var(--card-2); }
.mod-card.on { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 20%, transparent); }
.mod-card b { display: block; font-size: 16px; } .mod-card small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }
@media (max-width: 900px) { .nav-mod { display: none; } }
@media (max-width: 440px) { .app-hdr .brand span { display: none; } .modsw button { padding: 0 10px; } }
@media (max-width: 560px) { .mod-cards { grid-template-columns: 1fr; } }
/* ---------- Categorías y líneas ---------- */
.cat-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cat-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 80px 38px; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.cat-row:last-child { border-bottom: 0; } .cat-h { color: var(--muted); font-size: 12px; font-weight: 600; background: var(--card-2); } .cat-new { background: var(--card-2); }
@media (max-width: 560px) { .cat-row { grid-template-columns: 1fr 1fr 34px; } .cat-row > :nth-child(3) { display: none; } }
/* ---------- Chatbot ---------- */
.bot-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.bot-grid .f { margin-bottom: 12px; }
.bot-sw { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-bottom: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); cursor: pointer; }
.bot-sw input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex: none; } .bot-sw b { display: block; } .bot-sw small { display: block; color: var(--muted); font-size: 12px; line-height: 1.4; }
.dias .pill-r span { padding: 0 11px; height: 30px; }
.faq-row { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 6px; padding: 10px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card-2); }
.faq-row textarea { grid-column: 1; min-height: 56px; } .faq-row .rowdd { grid-row: 1; grid-column: 2; }
.bot-test { position: sticky; top: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--card-2); overflow: hidden; }
.bot-test-h { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.bot-test-h svg { width: 16px; height: 16px; color: #1faa59; } .bot-test-h small { color: var(--muted); font-size: 12px; }
.bot-msgs { height: 340px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.bot-sug { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; } .bot-sug .chip { cursor: pointer; border: 0; } .bot-sug .chip::before { display: none; }
.bot-test .ib-row { padding: 10px 12px; background: var(--card); border-top: 1px solid var(--line); }
@media (max-width: 860px) { .bot-grid { grid-template-columns: 1fr; } .bot-test { position: static; } .bot-msgs { height: 300px; } }

/* ---------- Agenda ---------- */
.ag-wrap { padding: 0; overflow: hidden; }
.ag-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ag-nav { color: var(--ink); } .ag-nav svg { transform: rotate(90deg); } .ag-nav.sig svg { transform: rotate(-90deg); }
.ag-tit { margin: 0 6px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
select.inp.ag-sel { width: auto; min-width: 120px; height: 34px; }
.ag-seg { margin: 0; } .ag-seg button { padding: 6px 12px; }
.ag-vchk { font-size: 13px !important; }
.ag-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.ag-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; } .ag-legend i.vi { background: transparent; border: 2px dashed var(--muted); }
.ag-dow { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); } .ag-dow span { padding: 6px 8px; color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; }
.ag-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(108px, auto); }
.ag-cel { position: relative; padding: 4px 4px 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ag-cel:nth-child(7n) { border-right: 0; } .ag-cel:hover { background: var(--card-2); } .ag-cel.fuera { background: color-mix(in srgb, var(--card-2) 60%, transparent); } .ag-cel.fuera .ag-n { color: var(--muted); opacity: .6; }
.ag-n { align-self: flex-start; display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: 99px; font-size: 12.5px; font-weight: 600; }
.ag-cel.hoy .ag-n, .ag-sd.hoy b { background: var(--brand-2, #2f5596); color: #fff; }
.ag-ev { display: block; width: 100%; padding: 2px 6px; border: 0; border-radius: 5px; background: color-mix(in srgb, var(--ec) 18%, var(--card)); border-left: 3px solid var(--ec); color: var(--ink); font-size: 12px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.ag-ev:hover { background: color-mix(in srgb, var(--ec) 28%, var(--card)); } .ag-ev b { font-weight: 600; }
.ag-ev.done, .ag-blk.done { opacity: .55; text-decoration: line-through; } .ag-ev.venc { background: transparent; border: 1px dashed var(--ec); border-left-width: 3px; border-left-style: solid; }
.ag-mas { border: 0; background: none; color: var(--muted); font-size: 11.5px; text-align: left; padding: 0 6px; cursor: pointer; } .ag-mas:hover { color: var(--ink); }
.arrastrando { opacity: .4; } .sobre { background: var(--brand-soft) !important; outline: 2px dashed var(--brand); outline-offset: -2px; }
.ag-sem { --n: 7; } .ag-shead, .ag-allday { display: grid; grid-template-columns: 56px repeat(var(--n), minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.ag-sd { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border: 0; border-left: 1px solid var(--line); background: none; color: var(--ink); cursor: pointer; }
.ag-sd small { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; } .ag-sd b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 15px; }
.ag-hl { padding: 6px 4px; color: var(--muted); font-size: 10.5px; text-align: right; }
.ag-ad { border-left: 1px solid var(--line); padding: 3px; display: flex; flex-direction: column; gap: 2px; min-height: 30px; cursor: pointer; min-width: 0; }
.ag-body { display: grid; grid-template-columns: 56px repeat(var(--n), minmax(0, 1fr)); max-height: 620px; overflow-y: auto; }
.ag-hours span { display: block; padding-right: 6px; color: var(--muted); font-size: 11px; text-align: right; transform: translateY(-7px); }
.ag-col { position: relative; border-left: 1px solid var(--line); } .ag-slot { border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); cursor: pointer; } .ag-slot:hover { background: var(--card-2); }
.ag-blk { position: absolute; display: flex; flex-direction: column; gap: 1px; padding: 3px 6px; border: 0; border-radius: 6px; background: color-mix(in srgb, var(--ec) 22%, var(--card)); border-left: 3px solid var(--ec); color: var(--ink); font-size: 11.5px; text-align: left; overflow: hidden; cursor: pointer; box-shadow: var(--sh-1); }
.ag-blk b { font-weight: 600; } .ag-blk span { overflow: hidden; text-overflow: ellipsis; }
.ag-now { position: absolute; left: 0; right: 0; height: 2px; background: #ea4335; z-index: 2; } .ag-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ea4335; }
.ag-lista { padding: 6px 14px 14px; }
.ag-ld { margin: 14px 0 4px; padding-bottom: 4px; border-bottom: 1px solid var(--line); font-weight: 600; } .ag-ld.hoy { color: var(--brand-2, #2f5596); }
.ag-li { display: grid; grid-template-columns: 82px 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 5px 0; }
.ag-li-h { color: var(--muted); font-size: 12.5px; } .ag-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ec); } .ag-li .ag-ev { font-size: 13.5px; padding: 5px 8px; }
@media (max-width: 760px) {
  .ag-tit { font-size: 16px; flex-basis: 100%; order: 9; margin: 4px 0 0; } .ag-vchk { display: none !important; }
  .ag-grid { grid-auto-rows: minmax(64px, auto); } .ag-cel { padding: 2px; } .ag-ev { font-size: 10.5px; padding: 1px 4px; } .ag-ev b { display: none; }
  .ag-shead, .ag-allday, .ag-body { grid-template-columns: 40px repeat(var(--n), minmax(0, 1fr)); } .ag-blk { font-size: 10px; padding: 2px 3px; }
  .ag-li { grid-template-columns: 64px 10px minmax(0, 1fr); } .ag-li small { display: none; }
}
/* ---------- Asistente de aprendizaje ---------- */
.hq { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 2px solid currentColor; font-weight: 800; font-size: 12px; line-height: 1; }
.ay-top { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.ay-prog b { font-size: 13px; } .ay-prog .track { height: 8px; margin-top: 6px; border-radius: 99px; background: var(--card-3); overflow: hidden; } .ay-prog .fill { height: 100%; background: var(--ok); border-radius: 99px; }
.ay-list { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; }
.ay-it { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.ay-it.ok { background: color-mix(in srgb, var(--ok-soft) 50%, var(--card)); }
.ay-h { display: flex; align-items: flex-start; gap: 10px; } .ay-h > div { flex: 1; } .ay-h b { display: block; } .ay-h small { color: var(--muted); font-size: 12.5px; }
.ay-ck { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); color: #fff; font-size: 12px; font-weight: 800; }
.ay-it.ok .ay-ck { background: var(--ok); border-color: var(--ok); }
.ay-it details { margin: 8px 0 0 32px; } .ay-it summary { cursor: pointer; color: var(--link); font-size: 13px; } .ay-it ol { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.ay-acts { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0 32px; }
.tour { position: fixed; inset: 0; z-index: 125; }
.tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(2, 6, 16, .62); outline: 3px solid var(--gold); transition: all .25s var(--ease); pointer-events: none; }
.tour-pop { position: fixed; width: min(360px, calc(100vw - 24px)); padding: 14px 16px; border-radius: 14px; background: var(--card); color: var(--ink); box-shadow: var(--sh-pop); animation: pop .16s var(--ease); }
.tour-pop small { color: var(--muted); font-size: 11.5px; } .tour-pop b { display: block; margin: 2px 0 4px; font-size: 16px; } .tour-pop p { margin: 0 0 8px; color: var(--ink-2); line-height: 1.5; }
.tour-pop.abajo { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); width: auto; }
.tour-acts { display: flex; align-items: center; gap: 8px; } .tour-acts .grow { flex: 1; }
.tour-hello { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 105; width: min(340px, calc(100vw - 32px)); padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--sh-pop); animation: rise .25s var(--ease); }
.tour-hello p { margin: 6px 0 10px; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
@media (max-width: 900px) { .tour-hello { bottom: calc(84px + env(safe-area-inset-bottom)); } }

/* ---------- Caja (varios clientes seguidos) ---------- */
.cj { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 14px; align-items: start; }
.cj-cat { padding: 12px; }
.cj-busca { display: flex; gap: 8px; margin-bottom: 10px; } .cj-busca .btn { height: 38px; flex: none; }
.cj-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; } .cj-chips::-webkit-scrollbar { display: none; }
.cj-chips .chip { cursor: pointer; border: 1px solid var(--line); background: var(--card); height: 28px; padding: 0 12px; flex: none; } .cj-chips .chip::before { display: none; }
.cj-chips .chip.on { background: var(--pill); color: var(--pill-ink); border-color: var(--pill); }
.cj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.cj-prod { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); text-align: left; cursor: pointer; transition: border-color .12s, transform .08s; }
.cj-prod:active { transform: scale(.97); } .cj-prod:hover { border-color: var(--line-2); }
.cj-prod.en { border-color: var(--ok); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ok) 30%, transparent); } .cj-prod.ago { opacity: .7; }
.cj-img { width: 100%; aspect-ratio: 1.3; border-radius: 9px; display: grid; place-items: center; overflow: hidden; color: #fff; font-weight: 800; font-size: 18px; margin-bottom: 4px; }
.cj-img img { width: 100%; height: 100%; object-fit: cover; }
.cj-q { position: absolute; top: 4px; right: 4px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 99px; background: var(--ok); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; box-shadow: var(--sh-1); }
.cj-prod b { font-size: 12.5px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cj-pr { font-weight: 700; font-size: 14px; } .cj-prod small { color: var(--muted); font-size: 11px; }
.cj-carro { position: sticky; top: calc(124px + env(safe-area-inset-top)); padding: 12px; max-height: calc(100vh - 150px); overflow-y: auto; }
.cj-ch { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; } .cj-ch b { font-size: 16px; } .cj-cerrar { display: none; color: var(--ink); font-size: 22px; }
.cj-vacio { display: grid; place-items: center; gap: 4px; padding: 28px 10px; text-align: center; color: var(--muted); } .cj-vacio svg { width: 30px; height: 30px; color: var(--line-2); } .cj-vacio b { color: var(--ink); }
.cj-l { display: grid; grid-template-columns: minmax(0, 1fr) auto 84px; grid-template-areas: "n q p" "n s x"; gap: 4px 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cj-ln { grid-area: n; min-width: 0; } .cj-ln b { display: block; font-size: 13px; font-weight: 600; } .cj-ln small { font-size: 11.5px; }
.cj-qty { grid-area: q; display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 99px; overflow: hidden; }
.cj-qty button { width: 32px; height: 30px; border: 0; background: var(--card-2); color: var(--ink); font-size: 18px; font-weight: 700; cursor: pointer; } .cj-qty span { min-width: 28px; text-align: center; font-weight: 700; }
.cj-precio { grid-area: p; height: 32px; padding: 0 8px; text-align: right; font-size: 13px; }
.cj-sub { grid-area: s; justify-self: end; font-size: 13px; } .cj-l .rowdd { grid-area: x; justify-self: end; }
.cj-tot { display: flex; justify-content: space-between; align-items: center; margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); } .cj-tot b { font-size: 20px; }
.cj-pago { display: flex; flex-direction: column; gap: 8px; } .cj-modo { display: flex; gap: 6px; flex-wrap: wrap; }
.cj-modo .pill-r span { height: 38px; padding: 0 14px; font-size: 13.5px; }
.cj-cli { border: 1px solid var(--line); border-radius: 10px; background: var(--card-2); } .cj-cli > summary { padding: 9px 12px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.cj-cli > div { padding: 0 10px 10px; }
.cj-ok { width: 100%; height: 46px; margin-top: 10px; font-size: 15px; }
.cj-barra { display: none; }
.cj-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.cj-kpis > div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card-2); } .cj-kpis small { display: block; color: var(--muted); font-size: 11.5px; } .cj-kpis b { font-size: 17px; }
.cj-res { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cj-v { padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; } .cj-v.err { border-color: var(--bad); background: var(--bad-soft); }
.cj-vh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .cj-vl { margin-top: 4px; color: var(--ink-2); font-size: 13px; } .cj-va { display: flex; gap: 14px; margin-top: 6px; font-size: 13px; }
@media (max-width: 900px) {
  .cj { grid-template-columns: 1fr; }
  .cj-cat { padding: 10px; } .cj-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; } .cj-busca .btn span { display: none; }
  .cj-carro { position: fixed; inset: 0; top: calc(56px + env(safe-area-inset-top)); z-index: 46; max-height: none; border-radius: 0; padding: 12px 12px calc(96px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .22s var(--ease); }
  .cj-carro.abierto { transform: none; } .cj-cerrar { display: grid; }
  .cj-barra { display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(68px + env(safe-area-inset-bottom)); z-index: 47; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border: 0; border-radius: 14px; background: var(--primary); color: var(--primary-ink); font-size: 14px; box-shadow: var(--sh-pop); cursor: pointer; }
  .cj-barra b { font-size: 17px; } .cj-barra .cj-ir { margin-left: auto; font-weight: 600; }
  .cj-barra[hidden] { display: none; }
  .cj-kpis { grid-template-columns: 1fr 1fr; } .cj-res { grid-template-columns: 1fr; }
}

/* ================================================================ módulo Mercado */
/* colores por tienda: paleta validada (daltonismo y contraste) para fondo claro y oscuro */
:root { --mk1: #2a78d6; --mk2: #eb6834; --mk3: #1baf7a; --mk4: #eda100; --mk5: #e87ba4; --mk6: #008300; --mk7: #6250d6; --mk-otro: #8a94a6; }
:root[data-theme="dark"] { --mk1: #3987e5; --mk2: #d95926; --mk3: #199e70; --mk4: #c98500; --mk5: #d55181; --mk6: #0ca30c; --mk7: #9085e9; --mk-otro: #6b7690; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] { --mk1: #3987e5; --mk2: #d95926; --mk3: #199e70; --mk4: #c98500; --mk5: #d55181; --mk6: #0ca30c; --mk7: #9085e9; --mk-otro: #6b7690; }
}
.mk-filtros { margin-bottom: 16px; }
.mk-filtros .filters { border-bottom: 0; }
.chart .mk-lbl { fill: var(--ink); font-size: 12px; font-weight: 600; }
.chart .mk-val { fill: var(--ink-2); font-size: 11.5px; font-weight: 600; }
.mk-ley { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.mk-ley span { display: inline-flex; align-items: center; gap: 6px; }
.mk-ley i { display: inline-block; flex: none; }
.mk-k-l { width: 18px; height: 0; border-top: 1.5px solid var(--muted); }
.mk-k-b { width: 18px; height: 8px; border-radius: 4px; background: var(--muted); }
.mk-k-d { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 2px var(--card); }
.mk-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: -4px 0 10px; font-size: 12.5px; color: var(--ink-2); }
.mk-legend span { display: inline-flex; align-items: center; gap: 7px; }
.mk-legend i { width: 14px; height: 3px; border-radius: 2px; }
.mk-tchip { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-weight: 500; }
.mk-tchip i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.mk-bars { display: grid; gap: 2px; }
.mk-bar { display: grid; grid-template-columns: minmax(90px, 1.2fr) 2fr 44px 78px; align-items: center; gap: 10px; padding: 5px 4px; border-radius: 8px; font-size: 13px; }
.mk-bar:not(.hd):hover, .mk-bar:focus-visible { background: var(--card-2); outline: none; }
.mk-bar.hd { color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding-bottom: 6px; }
.mk-bar .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-bar .tr { height: 10px; }
.mk-bar .tr i { display: block; height: 100%; min-width: 3px; border-radius: 0 4px 4px 0; background: var(--mk1); }
.mk-bar.otra .tr i { background: var(--mk-otro); }
.mk-bar .v, .mk-bar .p { text-align: right; font-variant-numeric: tabular-nums; }
.mk-bar .v { font-weight: 600; }
.mk-bar .p { color: var(--muted); }
.mk-cxt th.mk-th { text-transform: none; letter-spacing: 0; font-size: 12px; }
.mk-seg { margin-left: 0; padding: 2px; }
.mk-seg button { padding: 4px 11px; font-size: 12px; }
.mk-cxt td small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; }
.mk-nota { margin: 14px 2px 0; }
.mk-prod td { vertical-align: middle; }
.mk-pt { display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 420px; }
.mk-pt img, .mk-noimg { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--card-3); flex: none; border: 1px solid var(--line); }
.mk-pt a { color: var(--ink); text-decoration: none; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk-pt a:hover { color: var(--brand); text-decoration: underline; }
.mk-tach { text-decoration: line-through; }
tr.mk-ex td { opacity: .55; }
tr.mk-grp td { background: var(--card-2); color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding-top: 7px; padding-bottom: 7px; }
.mk-res { max-width: 360px; }
.mk-res .chip { margin: 2px 0; }
.nowrap { white-space: nowrap; }
.mk-pasos { margin: 0; padding-left: 20px; font-size: 13px; color: var(--ink-2); }
.mk-pasos li { margin-bottom: 7px; }
.mk-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-top: 4px; }
.mk-spin { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--line-2); border-top-color: var(--brand); border-radius: 50%; animation: mkgira .8s linear infinite; vertical-align: -2px; margin-right: 4px; }
@keyframes mkgira { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  .mk-bar { grid-template-columns: minmax(80px, 1fr) 1.2fr 36px 70px; gap: 8px; font-size: 12.5px; }
  .mk-pt { min-width: 200px; }
}
@media (max-width: 520px) { .modsw button { padding: 0 8px; font-size: 12px; letter-spacing: 0; } }
