/* Aurea — sistema de diseño. Paleta: #262525 #525252 #e6ddbc #822626 #690202 */
:root {
  --c1: #262525; --c2: #525252; --c3: #e6ddbc; --c4: #822626; --c5: #690202;
  --bg: #f4f0e1; --surface: #fffdf7; --surface-2: #f8f4e6; --text: #262525; --muted: #4d4b46;
  --line: rgba(38,37,37,.16); --line-strong: rgba(38,37,37,.5);
  --accent: #822626; --accent-strong: #690202; --accent-soft: rgba(130,38,38,.09); --on-accent: #f6f0d6;
  --ok: #3f6b4f; --ok-soft: rgba(63,107,79,.12); --warn: #7a520e; --warn-soft: rgba(154,106,26,.13);
  --shadow: 0 1px 2px rgba(38,37,37,.05), 0 8px 24px -10px rgba(38,37,37,.14);
  --shadow-lg: 0 24px 60px -20px rgba(38,37,37,.35);
  --side: #262525; --side-text: #e6ddbc; --side-muted: rgba(230,221,188,.82);
  --radius: 18px; --font: 'Atkinson Hyperlegible', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Atkinson Hyperlegible', 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1); --chart2: #b9ab78;
  --fz: 1.2; --side-w: calc(268px * (1 + (var(--fz) - 1) * .6));
}
[data-fs="s"] { --fz: 1.05; }
[data-fs="m"] { --fz: 1.2; }
[data-fs="l"] { --fz: 1.4; }
[data-fs="xl"] { --fz: 1.6; }
[data-theme="dark"] {
  --bg: #1a1919; --surface: #262525; --surface-2: #2e2d2d; --text: #efe8cc; --muted: #c3beb2;
  --line: rgba(230,221,188,.16); --line-strong: rgba(230,221,188,.55);
  --accent: #e08a8a; --accent-strong: #f0a8a8; --accent-soft: rgba(194,90,90,.14); --on-accent: #f6f0d6;
  --ok: #7fb593; --ok-soft: rgba(127,181,147,.14); --warn: #e6b45a; --warn-soft: rgba(217,165,72,.14);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 28px -12px rgba(0,0,0,.6);
  --side: #151414; --side-text: #e6ddbc; --side-muted: rgba(230,221,188,.8);
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: calc(15px * var(--fz)); line-height: 1.5; -webkit-font-smoothing: antialiased; transition: background .3s, color .3s; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; }
.ico { flex: none; display: block; }
.muted { color: var(--muted); }
.fine { font-size: calc(12.5px * var(--fz)); color: var(--muted); text-align: center; }
.num { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Bienvenida ---------- */
.welcome { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; }
.welcome-art { position: relative; background: var(--c1); color: var(--c3); display: grid; place-items: center; overflow: hidden; padding: 48px; }
.art-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(230,221,188,.12); left: 50%; top: 50%; transform: translate(-50%,-50%); }
.r1 { width: 380px; height: 380px; } .r2 { width: 640px; height: 640px; border-color: rgba(230,221,188,.08); } .r3 { width: 940px; height: 940px; border-color: rgba(230,221,188,.05); }
.art-ring.r1 { animation: breathe 9s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translate(-50%,-50%) scale(1.06); } }
.welcome-brand { position: relative; text-align: center; max-width: 380px; animation: rise .9s var(--ease) both; }
.welcome-brand h1 { font-family: var(--display); font-size: calc(72px * var(--fz)); font-weight: 600; letter-spacing: .02em; margin: 18px 0 8px; }
.welcome-brand p { color: rgba(230,221,188,.65); font-size: calc(16px * var(--fz)); }
.logo-lg { width: 84px; height: 84px; border-radius: 24px; box-shadow: 0 18px 40px -12px rgba(105,2,2,.7); }
.logo-md { width: 52px; height: 52px; border-radius: 15px; display: none; margin-bottom: 18px; }
.logo-sm { width: 38px; height: 38px; border-radius: 11px; }
.welcome-panel { display: grid; place-items: center; padding: 32px 24px; background: var(--bg); }
.welcome-card { width: 100%; max-width: 420px; display: grid; gap: 18px; animation: rise .8s .1s var(--ease) both; }
.welcome-card h2 { font-family: var(--display); font-size: calc(46px * var(--fz)); line-height: 1; }
.welcome-card .lead { font-size: calc(17px * var(--fz)); line-height: 1.55; color: var(--text); opacity: .85; }

/* Bienvenida impactante: fondo de red global + boton de oro con reflejo giratorio (siempre oscura, sin importar la paleta) */
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.welcome { position: relative; isolation: isolate; background: #02050c url('../img/bienvenida.jpg') center bottom / cover no-repeat; color: #f1e7c4; }
.welcome::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(2,5,12,.45) 0%, rgba(2,5,12,.12) 45%, rgba(2,5,12,0) 100%); }
.welcome-art { background: transparent; }
.welcome-art .art-ring { border-color: rgba(243,210,122,.16); }
.welcome-brand h1 { background: linear-gradient(180deg, #fff3c8, #e0b24a 60%, #a8741a); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 6px 24px rgba(224,178,74,.35)); }
.welcome-brand p { color: rgba(241,231,196,.8); }
.logo-lg { box-shadow: 0 0 0 1px rgba(243,210,122,.35), 0 0 60px -6px rgba(224,178,74,.65); }
.welcome-panel { background: transparent; }
.welcome-card { padding: 0; border-radius: 0; background: none; border: 0; box-shadow: none; text-align: center; justify-items: center; }
.welcome-card .field { width: 100%; text-align: center; }
.welcome-card .returning { justify-items: center; }
.welcome-card .returning .chips { justify-content: center; }
.welcome-card .logo-md { display: block; width: 64px; height: 64px; margin: 0 0 4px; }
.welcome { grid-template-columns: 1fr; }
.welcome-art { display: none; }
.welcome-card h2 { color: #fff3c8; }
.welcome-card .lead, .welcome-card .label, .welcome-card .fine, .welcome-card .returning small { color: #f1e7c4; }
.welcome-card .fine, .welcome-card .returning small { opacity: .7; }
.welcome-card .input { background: rgba(255,255,255,.06); border-color: rgba(243,210,122,.28); color: #fff7de; }
.welcome-card .input::placeholder { color: rgba(241,231,196,.75); }
.welcome-card .input:focus { border-color: #f3d27a; box-shadow: 0 0 0 4px rgba(243,210,122,.18); }
.welcome-card .field-error { color: #ff9d8a; }
.welcome-card .chip { background: rgba(255,255,255,.06); border-color: rgba(243,210,122,.25); color: #f1e7c4; }
.welcome-card .chip:hover { border-color: #f3d27a; color: #fff3c8; }
.welcome-card h2, .welcome-card .lead, .welcome-card .label { text-shadow: 0 1px 3px rgba(0,0,0,.9), 0 2px 18px rgba(0,0,0,.85); }
.welcome-card .fine, .welcome-card .returning small { text-shadow: 0 1px 3px rgba(0,0,0,.9), 0 2px 14px rgba(0,0,0,.8); opacity: .9; }
.welcome-card .input { background: rgba(4,8,18,.78); }
/* teclado abierto / pantallas bajas: el formulario queda sobre el globo, se oscurece el fondo para que se lea */
@media (max-height: 700px) { .welcome::before { background: linear-gradient(180deg, rgba(2,5,12,.72), rgba(2,5,12,.62)); } .welcome-panel { padding-top: 3vh; } }
@media (max-width: 900px) { .welcome-panel { place-items: start center; padding-top: 6vh; } .welcome-card { gap: 14px; } .welcome-card .lead { font-size: calc(15px * var(--fz)); } .welcome-card .logo-md { margin-bottom: 4px; } }

.btn.primary.btn-gold { position: relative; isolation: isolate; color: #2a1a02; font-weight: 700; letter-spacing: .04em; text-shadow: 0 1px 0 rgba(255,240,190,.5);
  background: linear-gradient(180deg, rgba(255,255,255,.3) 0%, rgba(255,255,255,0) 45%, rgba(80,45,0,.3) 100%), url("../img/oro.webp") center / cover no-repeat, #e2b650; box-shadow: 0 0 28px -4px rgba(226,182,80,.65), 0 14px 30px -12px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.65); overflow: visible; }
.btn.primary.btn-gold:hover { box-shadow: 0 0 40px -2px rgba(255,214,110,.85), 0 14px 30px -12px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.65); }
/* reflejo de luz suave que gira por el borde interior del boton */
.btn-gold::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0deg, rgba(255,246,214,.0) 40deg, rgba(255,246,214,.28) 110deg, rgba(255,255,255,.55) 150deg, rgba(255,246,214,.28) 190deg, rgba(255,246,214,0) 260deg, transparent 360deg);
  -webkit-mask: radial-gradient(ellipse at center, transparent 38%, #000 100%); mask: radial-gradient(ellipse at center, transparent 38%, #000 100%);
  filter: blur(5px); animation: spin-ang 7s linear infinite; }
/* halo difuminado que se asoma por fuera siguiendo al reflejo */
.btn-gold::after { content: ''; position: absolute; inset: -5px; z-index: -2; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0deg, rgba(255,214,110,0) 50deg, rgba(255,214,110,.45) 130deg, rgba(255,236,170,.7) 150deg, rgba(255,214,110,.45) 170deg, rgba(255,214,110,0) 250deg, transparent 360deg);
  filter: blur(13px); animation: spin-ang 7s linear infinite; }
@keyframes spin-ang { to { --ang: 360deg; } }

/* ---------- Portada (pantalla de inicio) ---------- */
.intro { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 0 24px; background: #02050c url('../img/intro-vertical.webp') center / cover no-repeat; color: #f1e7c4; overflow: hidden; animation: fadein .6s both; }
.intro[hidden] { display: none; }
@media (min-aspect-ratio: 1/1) { .intro { background-image: url('../img/intro-horizontal.webp'); } }
.intro-copy { position: relative; margin-top: 27vh; max-width: 560px; text-align: center; animation: rise .9s .15s var(--ease) both; }
.intro-copy h1 { font-family: var(--display); font-weight: 600; font-size: clamp(30px, 8.4vw, 52px); line-height: 1.12; color: #fbf4de; text-shadow: 0 2px 24px rgba(0,0,0,.6); }
.intro-copy h1 em { font-style: normal; background: linear-gradient(180deg, #f6dc94, #d9a93f 70%, #b8860f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro-copy p { margin: 18px auto 0; max-width: 440px; font-size: calc(clamp(15px, 4vw, 18px) * var(--fz)); line-height: 1.55; color: rgba(241,231,196,.88); text-shadow: 0 1px 14px rgba(0,0,0,.7); }
.intro-btn { position: absolute; left: 0; right: 0; margin: 0 auto; bottom: calc(7vh + env(safe-area-inset-bottom)); width: min(calc(100% - 48px), 420px); min-height: calc(62px * var(--fz)); display: flex; align-items: center; justify-content: center; border-radius: 999px; isolation: isolate;
  font-weight: 700; letter-spacing: .04em; font-size: calc(19px * var(--fz)); color: #2a1a02; background: linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 50%, rgba(80,45,0,.25)), url("../img/oro.webp") center / cover no-repeat, #e2b650;
  box-shadow: 0 0 34px -6px rgba(226,182,80,.6), 0 18px 36px -14px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.6); transition: box-shadow .3s, transform .3s var(--ease); animation: rise .9s .4s var(--ease) both; }
.intro-btn span { text-shadow: 0 1px 0 rgba(255,240,190,.5); }
.intro-btn i { position: absolute; right: 26px; display: grid; place-items: center; }
.intro-btn:hover { box-shadow: 0 0 44px -4px rgba(255,214,110,.8), 0 18px 36px -14px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.6); transform: translateY(-2px); }
.intro-btn:active { transform: scale(.985); }
/* mismo reflejo suave y difuminado que el boton Ingresar de la bienvenida */
.intro-btn::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0deg, rgba(255,246,214,.0) 40deg, rgba(255,246,214,.28) 110deg, rgba(255,255,255,.55) 150deg, rgba(255,246,214,.28) 190deg, rgba(255,246,214,0) 260deg, transparent 360deg);
  -webkit-mask: radial-gradient(ellipse at center, transparent 38%, #000 100%); mask: radial-gradient(ellipse at center, transparent 38%, #000 100%);
  filter: blur(5px); animation: spin-ang 7s linear infinite; }
.intro-btn::after { content: ''; position: absolute; inset: -5px; z-index: -2; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0deg, rgba(255,214,110,0) 50deg, rgba(255,214,110,.45) 130deg, rgba(255,236,170,.7) 150deg, rgba(255,214,110,.45) 170deg, rgba(255,214,110,0) 250deg, transparent 360deg);
  filter: blur(13px); animation: spin-ang 7s linear infinite; }
@media (min-aspect-ratio: 1/1) { .intro-copy { margin-top: 37vh; max-width: min(860px, 92vw); } .intro-copy h1 { font-size: clamp(20px, 2.7vw, 38px); line-height: 1.1; } .intro-copy p { max-width: 760px; margin-top: 8px; font-size: calc(clamp(13px, 1.5vw, 18px) * var(--fz)); line-height: 1.4; } .intro-btn { bottom: 4vh; width: min(420px, 60vw); min-height: calc(clamp(48px, 7vh, 62px) * var(--fz)); } }

.greet { position: fixed; inset: 0; z-index: 90; background: var(--c1); color: var(--c3); display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; animation: fadein .4s both; }
.greet-kicker { text-transform: uppercase; letter-spacing: .22em; font-size: calc(12px * var(--fz)); color: rgba(230,221,188,.6); margin-top: 18px; }
.greet h2 { font-family: var(--display); font-size: clamp(40px, 9vw, 72px); font-weight: 600; animation: rise .8s var(--ease) both; }
.greet-bar { width: 160px; height: 2px; background: rgba(230,221,188,.15); border-radius: 2px; overflow: hidden; margin-top: 18px; }
.greet-bar span { display: block; height: 100%; background: var(--c3); animation: load 1.5s var(--ease) forwards; }
@keyframes load { from { width: 0; } to { width: 100%; } }

/* ---------- Estructura ---------- */
.app { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--side); color: var(--side-text); display: flex; flex-direction: column; padding: 26px 16px 18px; z-index: 40; transition: transform .35s var(--ease); }
.side-brand { display: flex; gap: 12px; align-items: center; padding: 0 10px 26px; }
.side-brand strong { font-family: var(--display); font-size: calc(27px * var(--fz)); font-weight: 600; line-height: 1; letter-spacing: .03em; display: block; }
.side-brand small { color: var(--side-muted); font-size: calc(11.5px * var(--fz)); }
.nav { display: grid; gap: 4px; }
.nav a { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 12px; text-decoration: none; color: var(--side-muted); font-weight: 500; position: relative; transition: background .2s, color .2s; }
.nav a:hover { background: rgba(230,221,188,.06); color: var(--side-text); }
.nav a.active { background: rgba(230,221,188,.1); color: var(--side-text); }
.nav a.active::before { content: ''; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c3); }
.nav .count { margin-left: auto; font-size: calc(12px * var(--fz)); background: var(--c4); color: var(--c3); border-radius: 20px; padding: 1px 8px; }
.side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(230,221,188,.1); }
.side-foot { position: relative; }
.side-user { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 8px; margin: -8px; border-radius: 14px; color: inherit; transition: background .2s; }
.side-user > div { flex: 1; min-width: 0; }
.side-user strong { display: block; font-size: calc(14px * var(--fz)); } .side-user small { color: var(--side-muted); font-size: calc(12px * var(--fz)); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--c4); color: var(--c3); display: grid; place-items: center; font-family: var(--display); font-size: calc(20px * var(--fz)); font-weight: 600; }

.main { margin-left: var(--side-w); min-height: 100vh; padding-bottom: 40px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 18px 40px 14px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); }
.top-title { flex: 1; min-width: 0; }
.top-title small { color: var(--muted); font-size: calc(13px * var(--fz)); }
.top-title h1 { font-family: var(--display); font-size: calc(36px * var(--fz)); line-height: 1.05; font-weight: 600; }
.top-actions { display: flex; gap: 10px; }
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .2s, border-color .2s; }
.icon-btn:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.icon-btn.plain { background: none; border-color: transparent; box-shadow: none; width: 36px; height: 36px; border-radius: 10px; color: var(--muted); }
.icon-btn.plain:hover { background: var(--accent-soft); color: var(--accent); }
.mode-btn { height: 44px; padding: 0 14px; border-radius: 13px; display: inline-flex; align-items: center; gap: 8px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--line); font-weight: 600; font-size: calc(13.5px * var(--fz)); transition: transform .2s var(--ease), border-color .2s; }
.mode-btn:hover { transform: translateY(-1px); border-color: var(--accent); }
.mode-btn span { display: grid; place-items: center; }
@media (max-width: 480px) { .mode-btn { width: 44px; padding: 0; justify-content: center; } .mode-btn b { display: none; } }
.badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 20px; background: var(--accent); color: var(--on-accent); font-size: calc(11px * var(--fz)); font-style: normal; display: grid; place-items: center; border: 2px solid var(--bg); }
.only-mobile { display: none; }
.goalbar { display: flex; align-items: center; gap: 14px; padding: 0 40px 6px; }
.goalbar-track { flex: 1; height: 5px; border-radius: 5px; background: var(--line); overflow: hidden; }
.goalbar-track span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--c4), var(--c5)); border-radius: 5px; transition: width 1s var(--ease); }
.goalbar small { color: var(--muted); font-size: calc(12.5px * var(--fz)); white-space: nowrap; }
.view { padding: 18px 40px 40px; max-width: 1280px; animation: rise .5s var(--ease) both; }

.bottom-nav { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(20,19,19,.55); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 35; }

/* ---------- Componentes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head h3 { font-family: var(--display); font-size: calc(25px * var(--fz)); font-weight: 600; }
.card-head p { color: var(--muted); font-size: calc(13.5px * var(--fz)); }
.grid { display: grid; gap: 20px; }
.g-4 { grid-template-columns: repeat(4, 1fr); } .g-3 { grid-template-columns: repeat(3, 1fr); } .g-2 { grid-template-columns: repeat(2, 1fr); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; }
.stack { display: grid; gap: 20px; }

.kpi { position: relative; overflow: hidden; display: grid; gap: 6px; padding: 22px; }
.kpi .kpi-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.kpi small { color: var(--muted); font-size: calc(13px * var(--fz)); }
.kpi strong { font-family: var(--display); font-size: calc(38px * var(--fz)); font-weight: 600; line-height: 1; letter-spacing: -.01em; }
.kpi em { font-style: normal; font-size: calc(12.5px * var(--fz)); color: var(--muted); }
.kpi.dark { background: linear-gradient(145deg, var(--c1), color-mix(in srgb, var(--c1) 82%, white)); color: var(--c3); border-color: transparent; }
.kpi.dark .kpi-ico { background: rgba(230,221,188,.12); color: var(--c3); } .kpi.dark small, .kpi.dark em { color: rgba(230,221,188,.65); }
.kpi.wine { background: linear-gradient(145deg, var(--c4), var(--c5)); color: var(--c3); border-color: transparent; }
.kpi.wine .kpi-ico { background: rgba(230,221,188,.15); color: var(--c3); } .kpi.wine small, .kpi.wine em { color: rgba(230,221,188,.75); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: calc(46px * var(--fz)); padding: 0 22px; border-radius: 13px; font-weight: 600; font-size: calc(14.5px * var(--fz)); transition: transform .2s var(--ease), box-shadow .2s, background .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.primary { background: linear-gradient(145deg, var(--c4), var(--c5)); color: var(--on-accent); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--c5) 75%, transparent); }
.btn.soft { background: var(--accent-soft); color: var(--accent); }
.btn.ghost { border: 1px solid var(--line-strong); background: var(--surface); }
.btn.danger { background: var(--accent-soft); color: var(--accent); }
.btn.sm { min-height: calc(36px * var(--fz)); padding: 0 14px; font-size: calc(13px * var(--fz)); border-radius: 10px; gap: 7px; }
.btn.lg { min-height: calc(54px * var(--fz)); font-size: calc(16px * var(--fz)); border-radius: 15px; }
.btn.block { width: 100%; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 20px; font-size: calc(12.5px * var(--fz)); font-weight: 500; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.chip.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
button.chip { cursor: pointer; transition: all .2s; padding: 7px 14px; }
button.chip:hover { border-color: var(--accent); color: var(--accent); }
button.chip.on { background: var(--c1); color: var(--c3); border-color: var(--c1); }
[data-theme="dark"] button.chip.on { background: var(--c3); color: var(--c1); border-color: var(--c3); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.search .ico { position: absolute; left: 14px; top: 14px; color: var(--muted); }
.search .input { padding-left: 44px; }
.tabs { display: inline-flex; padding: 4px; border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line); gap: 2px; }
.tabs button { padding: 9px 18px; border-radius: 10px; font-weight: 500; color: var(--muted); font-size: calc(14px * var(--fz)); transition: all .2s; }
.tabs button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* Formularios */
.field { display: grid; gap: 7px; }
.label { font-size: calc(13px * var(--fz)); font-weight: 500; color: var(--muted); }
.input { width: 100%; min-height: calc(48px * var(--fz)); padding: 0 15px; border-radius: 13px; border: 1px solid var(--line-strong); background: var(--surface); outline: none; transition: border-color .2s, box-shadow .2s; }
textarea.input { height: auto; min-height: 88px; padding: 12px 15px; resize: vertical; }
.input.lg { min-height: calc(56px * var(--fz)); font-size: calc(17px * var(--fz)); border-radius: 15px; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.input[aria-invalid="true"] { border-color: var(--accent); }
.field-error { color: var(--accent); font-size: calc(13px * var(--fz)); }
.hint { color: var(--muted); font-size: calc(12.5px * var(--fz)); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

/* Listas */
.list { display: grid; }
.row { display: flex; align-items: center; gap: 14px; padding: 16px 4px; border-top: 1px solid var(--line); }
.list .row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row h4 { font-size: calc(15px * var(--fz)); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row p { color: var(--muted); font-size: calc(13.5px * var(--fz)); }
.row.click { cursor: pointer; border-radius: 12px; padding-left: 10px; padding-right: 10px; margin: 0 -10px; transition: background .2s; }
.row.click:hover { background: var(--surface-2); }
.row-actions { display: flex; gap: 4px; }
.mono-avatar { width: 44px; height: 44px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-family: var(--display); font-size: calc(22px * var(--fz)); font-weight: 600; flex: none; }

.opp-ico.t-warn { background: var(--warn-soft); color: var(--warn); }
.opp-ico.t-dark { background: var(--surface-2); color: var(--text); }
.opp-ico.t-ok { background: var(--ok-soft); color: var(--ok); }
.group-title { font-size: calc(12px * var(--fz)); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 22px 0 10px; }
.group-title:first-child { margin-top: 0; }

.empty { text-align: center; padding: 44px 20px; display: grid; gap: 10px; justify-items: center; color: var(--muted); }
.empty .empty-ico { width: 64px; height: 64px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 6px; }
.empty h4 { color: var(--text); font-family: var(--display); font-size: calc(24px * var(--fz)); }
.empty p { max-width: 380px; }

.progress { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--c4), var(--c5)); transition: width .8s var(--ease); }
.steps { display: grid; gap: 4px; margin-top: 14px; }
.step { display: flex; gap: 12px; align-items: center; padding: 10px 0; color: var(--muted); }
.step .dot { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; flex: none; }
.step.done { color: var(--text); } .step.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.done span:last-child { text-decoration: line-through; text-decoration-color: var(--line-strong); }
.step a { margin-left: auto; color: var(--accent); font-size: calc(13px * var(--fz)); font-weight: 600; text-decoration: none; }

/* Inventario */
.inv-head, .inv-row { display: grid; grid-template-columns: minmax(180px, 2.2fr) 1.1fr .8fr .8fr .9fr 92px; gap: 14px; align-items: center; }
.inv-head { padding: 0 6px 10px; font-size: calc(12px * var(--fz)); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.inv-row { padding: 14px 6px; border-top: 1px solid var(--line); }
.inv-row h4 { font-size: calc(15px * var(--fz)); } .inv-row small { color: var(--muted); }
.stock-pill { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.stock-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.stock-pill.low i { background: var(--warn); } .stock-pill.out i { background: var(--accent); }

/* Prospectos */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(268px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px; padding: 14px; scroll-snap-align: start; min-height: 220px; }
.col-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 12px; font-weight: 600; }
.col-head span { font-size: calc(12px * var(--fz)); background: var(--surface); border: 1px solid var(--line); padding: 1px 9px; border-radius: 20px; color: var(--muted); }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 8px; box-shadow: var(--shadow); cursor: pointer; transition: transform .2s; }
.pcard:hover { transform: translateY(-2px); } .pcard + .pcard { margin-top: 10px; }
.pcard h4 { font-size: calc(15px * var(--fz)); } .pcard p { color: var(--muted); font-size: calc(13px * var(--fz)); }
.pcard select { min-height: calc(34px * var(--fz)); padding: 0 10px; font-size: calc(13px * var(--fz)); border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface); }

/* Ventas */
.sale-row { display: grid; grid-template-columns: 1fr 74px 110px 36px; gap: 10px; align-items: center; margin-bottom: 10px; }
.sale-total { display: flex; justify-content: space-between; padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); margin-top: 14px; }
.sale-total strong { font-family: var(--display); font-size: calc(26px * var(--fz)); }

/* Gráficos */
.chart { width: 100%; height: auto; display: block; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: calc(13px * var(--fz)); color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; }
.hbar { display: grid; gap: 6px; margin-bottom: 14px; }
.hbar-top { display: flex; justify-content: space-between; font-size: calc(14px * var(--fz)); gap: 10px; }
.hbar-top span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.donut-wrap svg { width: 168px; height: 168px; flex: none; }
.donut-legend { display: grid; gap: 8px; font-size: calc(14px * var(--fz)); flex: 1; min-width: 150px; }
.donut-legend div { display: flex; align-items: center; gap: 9px; }
.donut-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.donut-legend b { margin-left: auto; font-weight: 600; }

/* Ajustes */
.settings { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; max-width: 1040px; }
.set-nav { position: sticky; top: 100px; display: grid; gap: 4px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.set-nav button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; font-weight: 500; color: var(--muted); text-align: left; transition: all .2s; }
.set-nav button:hover { background: var(--surface-2); color: var(--text); }
.set-nav button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.set-pane { display: grid; gap: 20px; }
.set-head h2 { font-family: var(--display); font-size: calc(32px * var(--fz)); line-height: 1.1; }
.set-head p { color: var(--muted); margin-top: 4px; }
.set-group { padding: 0; overflow: hidden; }
.set-group > h3 { font-size: calc(12px * var(--fz)); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; padding: 20px 28px 4px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 28px; border-top: 1px solid var(--line); }
.set-group > h3 + .set-row { border-top: 0; }
.set-row.stk { flex-direction: column; align-items: stretch; gap: 16px; }
.set-text { min-width: 0; flex: 1; }
.set-text b { display: block; font-size: calc(15.5px * var(--fz)); font-weight: 600; }
.set-text span { display: block; color: var(--muted); font-size: calc(13.5px * var(--fz)); margin-top: 3px; }
.set-ctl { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.set-ctl .input { width: 220px; }
.set-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.set-fields .full { grid-column: 1 / -1; }
.set-save { display: flex; justify-content: flex-end; padding: 18px 28px; border-top: 1px solid var(--line); background: var(--surface-2); }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.opt { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 18px 12px; border-radius: 16px; border: 1.5px solid var(--line-strong); background: var(--surface); transition: all .2s var(--ease); position: relative; }
.opt:hover { border-color: var(--accent); transform: translateY(-1px); }
.opt.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.opt.on::after { content: ''; position: absolute; top: 10px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.opt small { color: var(--muted); font-size: calc(12.5px * var(--fz)); }
.opt strong { font-size: calc(14.5px * var(--fz)); font-weight: 600; }
.opt .aa { font-family: var(--display); font-weight: 600; line-height: 1; height: 40px; display: grid; place-items: end center; }
.opt .swatch { width: 100%; height: 56px; border-radius: 10px; border: 1px solid var(--line-strong); display: grid; place-items: center; gap: 4px; padding: 8px; }
.opt .swatch i { display: block; height: 6px; border-radius: 3px; width: 70%; } .opt .swatch i + i { width: 45%; }
.sw-light { background: #f4f0e1; } .sw-light i { background: #262525; opacity: .75; }
.sw-dark { background: #262525; } .sw-dark i { background: #e6ddbc; opacity: .8; }
.preview { padding: 20px 24px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.preview h4 { font-family: var(--display); font-size: calc(26px * var(--fz)); margin-bottom: 6px; }
.preview p { color: var(--muted); }
.danger-zone { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
@media (max-width: 900px) {
  .settings { grid-template-columns: 1fr; gap: 16px; }
  .set-nav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; padding: 6px; gap: 4px; }
  .set-nav button { white-space: nowrap; padding: 10px 14px; }
}
@media (max-width: 640px) {
  .set-row { flex-direction: column; align-items: stretch; gap: 14px; padding: 18px 20px; }
  .set-group > h3 { padding: 18px 20px 2px; }
  .set-ctl { justify-content: stretch; } .set-ctl .btn, .set-ctl .input { flex: 1; width: 100%; }
  .set-fields { grid-template-columns: 1fr; }
  .set-save { padding: 16px 20px; } .set-save .btn { width: 100%; }
  .opt-grid { grid-template-columns: 1fr 1fr; }
}

.set-nav::-webkit-scrollbar { display: none; }
/* Compra en curso y nuevo cliente en venta */
.buy-card, .newc { display: grid; gap: 14px; padding: 18px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.newc { margin-bottom: 18px; animation: rise .35s var(--ease) both; }
.buy-head { display: flex; gap: 14px; align-items: flex-start; }
.buy-head b, .newc-head b { display: block; font-size: calc(15.5px * var(--fz)); }
.buy-head span:not(.opp-ico), .newc-head span { display: block; color: var(--muted); font-size: calc(13.5px * var(--fz)); margin-top: 2px; }

/* Oportunidades: lista agrupada con filas expandibles */
.olist { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); }
.orow { position: relative; border-top: 1px solid var(--line); animation: rise .35s var(--ease) both; }
.orow:first-child { border-top: 0; }
.orow-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px 12px 18px; text-align: left; transition: background .2s; }
.orow-head:hover { background: var(--surface-2); }
.obar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--muted); opacity: .45; }
.orow.late .obar { background: var(--accent); opacity: 1; }
.orow.today .obar { background: var(--warn); opacity: 1; }
.otxt { flex: 1; min-width: 0; display: grid; }
.otxt b { font-size: calc(15px * var(--fz)); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.otxt small { color: var(--muted); font-size: calc(13px * var(--fz)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orow-head .chip { flex: none; padding: 1px 9px; font-size: calc(12px * var(--fz)); }
.ochev { color: var(--muted); transition: transform .25s var(--ease); display: grid; flex: none; }
.orow.open .ochev { transform: rotate(180deg); }
.orow-body { display: none; flex-wrap: wrap; gap: 8px; padding: 2px 14px 14px 18px; }
.orow.open .orow-body { display: flex; animation: rise .25s var(--ease) both; }
.orow.open { background: var(--surface-2); }
.orow-body .btn { flex: 1 1 auto; }
.oico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.oico.t-warn { background: var(--warn-soft); color: var(--warn); } .oico.t-dark { background: var(--surface); color: var(--text); } .oico.t-ok { background: var(--ok-soft); color: var(--ok); }
@media (max-width: 640px) { .orow-head { padding-left: 16px; gap: 10px; } .otag { display: none; } }

/* Paletas de color */
.pal { display: flex; width: 100%; height: 34px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-strong); }
.pal i { flex: 1; display: block; }
.opt-grid.pals { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.opt .tagnew { font-size: calc(11px * var(--fz)); color: var(--accent); background: var(--accent-soft); border-radius: 20px; padding: 0 8px; font-weight: 600; }

/* Tarjeta de saludo: clara en modo claro, oscura en modo oscuro */
.hero { padding: 32px; border: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--c3) 60%, var(--surface)), var(--surface)); color: var(--text); }
.hero-kick { color: var(--muted); font-size: calc(13px * var(--fz)); text-transform: uppercase; letter-spacing: .16em; }
.hero-name { font-family: var(--display); font-size: calc(44px * var(--fz)); font-weight: 600; line-height: 1.1; margin: 6px 0 10px; color: var(--accent-strong); }
.hero-text { color: var(--muted); max-width: 560px; }
.hero-text b { color: var(--text); }
[data-theme="dark"] .hero { border: 0; background: linear-gradient(135deg, var(--c1), color-mix(in srgb, var(--c1) 82%, white)); color: var(--c3); }
[data-theme="dark"] .hero-kick { color: rgba(230,221,188,.65); }
[data-theme="dark"] .hero-name { color: var(--c3); }
[data-theme="dark"] .hero-text { color: rgba(230,221,188,.78); }
[data-theme="dark"] .hero-text b { color: var(--c3); }

/* Elección de enfoque */
.focus { position: fixed; inset: 0; z-index: 95; background: var(--bg); display: grid; place-items: center; padding: 24px; overflow-y: auto; animation: fadein .3s both; }
.focus-inner { width: 100%; max-width: 760px; display: grid; gap: 14px; justify-items: center; text-align: center; }
.focus-inner h2 { font-family: var(--display); font-size: calc(44px * var(--fz)); line-height: 1.05; }
.focus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; margin-top: 12px; }
.focus-card { display: grid; gap: 8px; justify-items: start; text-align: left; padding: 26px; border-radius: 22px; background: var(--surface); border: 1.5px solid var(--line-strong); box-shadow: var(--shadow); transition: transform .25s var(--ease), border-color .2s, box-shadow .2s; }
.focus-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-lg); }
.focus-card strong { font-family: var(--display); font-size: calc(30px * var(--fz)); font-weight: 600; line-height: 1; }
.focus-card > span:not(.focus-ico) { color: var(--muted); }
.focus-card ul { list-style: none; padding: 0; display: grid; gap: 6px; margin-top: 8px; font-size: calc(14px * var(--fz)); }
.focus-card li::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 10px; vertical-align: middle; }
.focus-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(145deg, var(--c4), var(--c5)); color: var(--on-accent); margin-bottom: 6px; }
@media (max-width: 640px) { .focus-grid { grid-template-columns: 1fr; } .focus { place-items: start center; } .focus-inner h2 { font-size: calc(36px * var(--fz)); } }
/* Eleccion de enfoque: mismo estilo premium oscuro que la bienvenida (colores fijos, independientes de la paleta) */
.focus { background: #02050c url('../img/enfoque.jpg') center / cover no-repeat; color: #f1e7c4; isolation: isolate; }
.focus::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 50% 105%, rgba(224,177,58,.28), rgba(224,177,58,0) 62%), radial-gradient(ellipse at 50% 45%, rgba(2,5,12,.25), rgba(2,5,12,0) 75%), linear-gradient(180deg, rgba(60,38,0,.22), rgba(60,38,0,.12)); mix-blend-mode: normal; }
.focus::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: rgba(120,80,10,.30); mix-blend-mode: color; }
.focus-inner .logo-md { box-shadow: 0 0 0 1px rgba(243,210,122,.35), 0 0 40px -6px rgba(224,178,74,.6); width: 64px; height: 64px; }
.focus-inner h2 { background: linear-gradient(180deg, #fff3c8, #e0b24a 70%, #b8860f); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 22px rgba(224,178,74,.3)); }
.focus-inner .muted { color: rgba(241,231,196,.8); text-shadow: 0 1px 12px rgba(0,0,0,.7); }
.focus-card { color: #f1e7c4; background: rgba(4,8,18,.36); border: 1px solid rgba(243,210,122,.28); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); box-shadow: 0 24px 60px -24px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.06); }
.focus-card:hover, .focus-card:focus-visible { border-color: #f3d27a; background: rgba(8,14,28,.62); box-shadow: 0 0 36px -6px rgba(224,178,74,.5), 0 24px 60px -24px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.1); }
.focus-card strong { color: #fff3c8; }
.focus-card > span:not(.focus-ico) { color: rgba(241,231,196,.75); }
.focus-card li::before { background: #e0b13a; box-shadow: 0 0 8px rgba(224,177,58,.8); }
.focus-ico { background: linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0) 50%, rgba(80,45,0,.3)), url("../img/oro.webp") center / cover no-repeat, #e2b650; color: #2a1a02; box-shadow: 0 0 22px -4px rgba(226,182,80,.6), inset 0 1px 0 rgba(255,255,255,.6); }

/* Equipo y guiones */
.progress.sm { height: 5px; }
.mrow-meta { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.mrow-meta .progress { flex: 1; max-width: 160px; }
.mrow-meta small { color: var(--muted); font-size: calc(12.5px * var(--fz)); white-space: nowrap; }
.chk-list { display: grid; gap: 4px; margin: 6px 0 18px; }
.chk { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; cursor: pointer; transition: background .2s; }
.chk:hover { background: var(--surface-2); }
.chk input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; flex: none; cursor: pointer; transition: all .15s; margin: 0; }
.chk input:checked { background: var(--accent); border-color: var(--accent); }
.chk input:checked::after { content: ''; width: 5px; height: 10px; border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.chk input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.tpl { display: grid; gap: 10px; align-content: start; padding: 20px; }
.tpl h4 { font-size: calc(16px * var(--fz)); }
.tpl p { color: var(--muted); font-size: calc(14px * var(--fz)); line-height: 1.55; white-space: pre-wrap; }
.tpl .ph { color: var(--accent); font-weight: 600; }
.tpl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
@media (max-width: 640px) { .tpl-grid { grid-template-columns: 1fr; } }

/* Desplegables internos */
.dd { position: relative; min-width: 0; width: 100%; }
.dd-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; cursor: pointer; }
.dd-btn .ico { color: var(--muted); }
.dd-btn[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.dd-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-label.ph { color: var(--muted); }
.dd-btn.sm { min-height: calc(34px * var(--fz)); padding: 0 10px; font-size: calc(13px * var(--fz)); border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface); }
.dd-panel { position: fixed; z-index: 120; max-height: min(300px, 50vh); overflow-y: auto; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; animation: pop .18s var(--ease) both; }
.dd-opt { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 10px; text-align: left; font-size: calc(14.5px * var(--fz)); }
.dd-opt:hover, .dd-opt:focus-visible { background: var(--accent-soft); outline: none; }
.dd-opt.on { color: var(--accent); font-weight: 600; }
.dd-opt[disabled] { opacity: .4; cursor: not-allowed; }
.dd-panel.cal { width: 304px; padding: 14px; max-height: none; overflow: visible; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head button { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.cal-head button:hover { background: var(--accent-soft); color: var(--accent); }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-week span { font-size: calc(11.5px * var(--fz)); color: var(--muted); padding: 4px 0; text-transform: uppercase; }
.cal-day { height: 38px; border-radius: 10px; font-size: calc(14px * var(--fz)); font-variant-numeric: tabular-nums; }
.cal-day:hover { background: var(--accent-soft); }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.cal-day.on { background: linear-gradient(145deg, var(--c4), var(--c5)); color: var(--on-accent); box-shadow: none; }
.cal-foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.cal-foot button { color: var(--accent); font-weight: 600; font-size: calc(13.5px * var(--fz)); padding: 6px 8px; border-radius: 8px; }
.cal-foot button:hover { background: var(--accent-soft); }

/* Superposiciones */
.popover { position: absolute; right: 0; top: 54px; width: 360px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 16px; animation: pop .25s var(--ease) both; z-index: 50; }
.bell-wrap { position: relative; }
.pop-item { display: flex; gap: 12px; padding: 12px 6px; border-top: 1px solid var(--line); font-size: calc(14px * var(--fz)); }
.pop-item:first-of-type { border-top: 0; } .pop-item small { color: var(--muted); display: block; }
.modal-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(20,19,19,.6); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fadein .25s both; }
.modal { width: 100%; max-width: 560px; max-height: calc(100dvh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg); animation: pop .3s var(--ease) both; overflow: hidden; }
.modal.wide { max-width: 720px; } .modal form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.modal header { display: flex; justify-content: space-between; gap: 12px; padding: 24px 28px 6px; }
.modal header h3 { font-family: var(--display); font-size: calc(30px * var(--fz)); line-height: 1.1; }
.modal header p { color: var(--muted); font-size: calc(14px * var(--fz)); }
.modal-body { padding: 16px 28px 8px; overflow-y: auto; }
.modal footer { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 28px 24px; flex-wrap: wrap; }
.form-error { color: var(--accent); background: var(--accent-soft); padding: 10px 14px; border-radius: 11px; font-size: calc(14px * var(--fz)); margin-top: 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 6px 0 18px; }
.detail-grid div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px; }
.detail-grid small { color: var(--muted); display: block; font-size: calc(12px * var(--fz)); } .detail-grid strong { font-size: calc(15px * var(--fz)); }
.toast-root { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 10px; justify-items: center; pointer-events: none; width: calc(100% - 32px); }
.toast { background: var(--c1); color: var(--c3); padding: 13px 20px; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: calc(14.5px * var(--fz)); display: flex; gap: 10px; align-items: center; animation: pop .3s var(--ease) both; }
[data-theme="dark"] .toast { background: var(--c3); color: var(--c1); }
.toast.out { opacity: 0; transform: translateY(10px); transition: all .3s; }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .g-main { grid-template-columns: 1fr; }
  .g-3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .welcome { grid-template-columns: 1fr; }
  .welcome-art { display: none; }
  .logo-md { display: block; }
  .sidebar { transform: translateX(-100%); width: 286px; }
  .app.menu-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .app.menu-open .scrim { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; padding-bottom: 92px; }
  .only-mobile { display: grid; }
  .topbar { padding: 14px 16px 10px; gap: 10px; }
  .top-title h1 { font-size: calc(26px * var(--fz)); }
  .goalbar { padding: 0 16px 4px; }
  .view { padding: 12px 16px 24px; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
  .bottom-nav a { display: grid; justify-items: center; gap: 3px; padding: 6px 0; border-radius: 12px; text-decoration: none; color: var(--muted); font-size: calc(11px * var(--fz)); font-weight: 500; }
  .bottom-nav a.active { color: var(--accent); background: var(--accent-soft); }
  .toast-root { bottom: 96px; }
}
@media (max-width: 640px) {
  .g-4, .g-2 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kpi { padding: 16px; } .kpi strong { font-size: calc(29px * var(--fz)); }
  .card { padding: 18px; border-radius: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .inv-head { display: none; }
  .inv-row { grid-template-columns: 1fr auto; gap: 6px 12px; }
  .inv-row > :nth-child(n+3) { font-size: calc(13.5px * var(--fz)); }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { max-width: none; border-radius: 22px 22px 0 0; max-height: 92dvh; }
  .modal header, .modal-body, .modal footer { padding-left: 20px; padding-right: 20px; }
  .modal footer .btn { flex: 1; }
  .sale-row { grid-template-columns: 1fr 60px 90px 34px; gap: 6px; }
  .toolbar .btn { width: 100%; }
  .welcome-card h2 { font-size: calc(40px * var(--fz)); }
  .popover { position: fixed; top: 70px; right: 16px; left: 16px; width: auto; }
}

/* PALETAS:INICIO (generado por execution/build_palettes.py; no editar a mano) */
[data-palette="vivo"] {
  --c1: #14213d; --c2: #435069; --c3: #dbe8ff; --c4: #2f7bff; --c5: #1648c4;
  --bg: #eef3ff; --surface: #ffffff; --surface-2: #f1f5ff; --text: #14213d; --muted: #435069;
  --line: rgba(20,33,61,0.16); --line-strong: rgba(20,33,61,0.5);
  --accent: #1f5fe0; --accent-strong: #1648c4; --accent-soft: rgba(31,95,224,0.09); --on-accent: #ffffff;
  --side: #0d1530; --side-text: #dbe8ff; --side-muted: rgba(219,232,255,0.82); --chart2: #ffa23a;
}
[data-palette="vivo"][data-theme="dark"] {
  --c1: #14213d; --c2: #435069; --c3: #dbe8ff; --c4: #2f7bff; --c5: #1648c4;
  --bg: #070b16; --surface: #111a33; --surface-2: #18233f; --text: #f2f6ff; --muted: #b8c4de;
  --line: rgba(242,246,255,0.16); --line-strong: rgba(242,246,255,0.55);
  --accent: #7db3ff; --accent-strong: #a9ccff; --accent-soft: rgba(125,179,255,0.14); --on-accent: #ffffff;
  --side: #070b16; --side-text: #dbe8ff; --side-muted: rgba(219,232,255,0.82); --chart2: #ffb74d;
}
[data-palette="oceano"] {
  --c1: #1d2528; --c2: #52595c; --c3: #dbe9ec; --c4: #1f6f8b; --c5: #124a5e;
  --bg: #eaf1f2; --surface: #fafdfd; --surface-2: #f0f6f7; --text: #1d2528; --muted: #454f52;
  --line: rgba(29,37,40,0.16); --line-strong: rgba(29,37,40,0.5);
  --accent: #1f6f8b; --accent-strong: #124a5e; --accent-soft: rgba(31,111,139,0.09); --on-accent: #f4fbfc;
  --side: #1d2528; --side-text: #dbe9ec; --side-muted: rgba(219,233,236,0.82); --chart2: #8fc1cf;
}
[data-palette="oceano"][data-theme="dark"] {
  --c1: #1d2528; --c2: #52595c; --c3: #dbe9ec; --c4: #1f6f8b; --c5: #124a5e;
  --bg: #111819; --surface: #1b2224; --surface-2: #242c2f; --text: #e4eef0; --muted: #b7c3c6;
  --line: rgba(228,238,240,0.16); --line-strong: rgba(228,238,240,0.55);
  --accent: #6fb6cc; --accent-strong: #9bcfdf; --accent-soft: rgba(111,182,204,0.14); --on-accent: #f4fbfc;
  --side: #0b1011; --side-text: #dbe9ec; --side-muted: rgba(219,233,236,0.82); --chart2: #8fc1cf;
}
[data-palette="oro"] {
  --c1: #1f1d1a; --c2: #55504a; --c3: #f3dd9a; --c4: #b8860f; --c5: #7c5208;
  --bg: #f3efe6; --surface: #fffdf8; --surface-2: #f8f4ea; --text: #1f1d1a; --muted: #544e44;
  --line: rgba(31,29,26,0.16); --line-strong: rgba(31,29,26,0.5);
  --accent: #7c5208; --accent-strong: #5e3d04; --accent-soft: rgba(124,82,8,0.09); --on-accent: #fff8e6;
  --side: #1c1b19; --side-text: #f3dd9a; --side-muted: rgba(243,221,154,0.82); --chart2: #e0b13a;
}
[data-palette="oro"][data-theme="dark"] {
  --c1: #1f1d1a; --c2: #55504a; --c3: #f3dd9a; --c4: #b8860f; --c5: #7c5208;
  --bg: #151412; --surface: #201e1b; --surface-2: #292723; --text: #f1e8d0; --muted: #c4bba5;
  --line: rgba(241,232,208,0.16); --line-strong: rgba(241,232,208,0.55);
  --accent: #e0b13a; --accent-strong: #f2cb63; --accent-soft: rgba(224,177,58,0.14); --on-accent: #fff8e6;
  --side: #0e0d0c; --side-text: #f3dd9a; --side-muted: rgba(243,221,154,0.82); --chart2: #e0b13a;
}
/* PALETAS:FIN */
/* telefonos muy angostos: botones de la barra mas pequenos para que el titulo no se corte */
@media (max-width: 380px) { .topbar { gap: 6px; padding-inline: 12px; } .topbar .icon-btn, .topbar .mode-btn { width: 38px; height: 38px; border-radius: 11px; } .top-actions { gap: 6px; } .top-title h1 { font-size: calc(22px * var(--fz)); } .top-title small { font-size: calc(12px * var(--fz)); } }

/* Venta con producto opcional */
.sale-what { display: grid; gap: 6px; min-width: 0; }
.sale-what [hidden] { display: none; }
.sale-row { align-items: start; }
.fin-actions { display: flex; gap: 8px; width: 100%; }
.fin-actions .btn { flex: 1; padding-inline: 10px; }
@media (min-width: 900px) { .fin-actions { width: auto; } .fin-actions .btn { flex: none; } }

/* Acceso, bloqueo y aviso de prueba */
.auth-tabs { display: flex; width: 100%; padding: 4px; gap: 4px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(243,210,122,.22); }
.auth-tabs button { flex: 1; padding: 10px 8px; border-radius: 10px; color: #f1e7c4; font-weight: 500; opacity: .75; }
.auth-tabs button.on { background: rgba(243,210,122,.18); color: #fff3c8; opacity: 1; }
.code-input { text-align: center; letter-spacing: .14em; font-variant-numeric: tabular-nums; font-size: calc(22px * var(--fz)); text-transform: uppercase; }
.link-btn { color: #f1e7c4; opacity: .75; text-decoration: underline; padding: 8px; }
#auth .welcome-card, #lock .welcome-card { text-shadow: 0 1px 10px rgba(2,5,12,.9); }
.trialbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 40px 12px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: calc(14px * var(--fz)); }
.trialbar[hidden] { display: none; }
.trialbar.warn { border-color: var(--accent); }
.lic-code { font-variant-numeric: tabular-nums; letter-spacing: .08em; }
@media (max-width: 640px) { .trialbar { margin-inline: 16px; } }
#auth.welcome::before, #lock.welcome::before { background: linear-gradient(180deg, rgba(2,5,12,.84) 0%, rgba(2,5,12,.66) 60%, rgba(2,5,12,.45) 100%); }
#auth .welcome-panel, #lock .welcome-panel { align-content: center; }

/* Elección de plan */
.plan-grid { display: grid; gap: 10px; }
.plan { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; text-align: left; padding: 16px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); transition: border-color .2s, transform .2s; }
.plan:hover, .plan:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.plan.best { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan-info { display: grid; gap: 4px; min-width: 0; }
.plan-info strong { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: calc(18px * var(--fz)); font-weight: 600; }
.plan-info em { font-style: normal; font-size: calc(11px * var(--fz)); font-weight: 600; letter-spacing: .02em; padding: 3px 9px; border-radius: 99px; background: var(--accent); color: #fff; white-space: nowrap; }
.plan-info small { color: var(--muted); font-size: calc(13px * var(--fz)); }
.plan-price { font-family: var(--display); font-size: calc(28px * var(--fz)); line-height: 1; white-space: nowrap; font-weight: 600; }
.plan-note { margin: 14px 0 4px; text-align: center; color: var(--muted); font-size: calc(13px * var(--fz)); }
@media (max-width: 420px) { .plan { padding: 14px; gap: 10px; } .plan-price { font-size: calc(23px * var(--fz)); } .plan-info small { font-size: calc(12px * var(--fz)); } }

/* ---------- Accesibilidad para 50-75 años ---------- */
/* Letra: más espacio entre líneas y nada menor a ~15px en pantalla normal */
body { line-height: 1.6; letter-spacing: .005em; }
h1, h2, h3, h4, .card-head h3, .set-head h2, .modal header h3, .kpi strong, .hero-name, .welcome-card h2, .focus-inner h2 { font-family: var(--font); font-weight: 700; letter-spacing: 0; }
.fine, .hint, .label, .field-error, .chip, .kpi small, .kpi em, .card-head p, .row p, .set-text span, .otxt small, .tpl p, .pcard p, .legend, .goalbar small, .top-title small,
.mrow-meta small, .opt small, .detail-grid small, .pop-item small, .plan-info small, .plan-note, .hero-kick, .group-title, .inv-head, .col-head span, .cal-week span, .brand small, .side-brand small, .side-user small, .nav .count, .badge, .opt .tagnew, .plan-info em { font-size: calc(14.5px * var(--fz)); }
.label { color: var(--text); font-weight: 600; }
.group-title, .inv-head, .set-group > h3, .hero-kick { letter-spacing: .04em; }
.bottom-nav a { font-size: calc(13.5px * var(--fz)); }
.chart text { font-size: 13px; fill: var(--text); }

/* Lo que se toca: zonas grandes (mínimo ~48px) y separadas */
.btn { min-height: calc(46px * var(--fz)); padding: 0 24px; border-radius: 14px; font-size: calc(15.5px * var(--fz)); gap: 10px; }
.btn.sm { min-height: calc(40px * var(--fz)); font-size: calc(14.5px * var(--fz)); padding: 0 16px; }
.btn.lg { min-height: calc(50px * var(--fz)); font-size: calc(17px * var(--fz)); }
.btn.primary { background: linear-gradient(145deg, var(--c5), color-mix(in srgb, var(--c5) 78%, #000)); color: var(--on-accent); }
.btn.ghost { border: 2px solid var(--line-strong); }
.btn.soft, .btn.danger { border: 2px solid transparent; }
.icon-btn { width: 52px; height: 52px; border: 2px solid var(--line-strong); }
.icon-btn.plain { width: 48px; height: 48px; border: 0; color: var(--text); }
.mode-btn { height: 52px; font-size: calc(14.5px * var(--fz)); border: 2px solid var(--line-strong); color: var(--accent-strong); }
.nav a { padding: 14px 16px; font-size: calc(16px * var(--fz)); color: var(--side-text); }
.nav a.active { background: rgba(230,221,188,.2); font-weight: 700; }
.nav a.active::before { width: 5px; }
.bottom-nav a { padding: 8px 0; min-height: 60px; color: var(--text); }
.bottom-nav a.active { font-weight: 700; }
.tabs button { padding: 12px 20px; font-size: calc(15px * var(--fz)); color: var(--text); }
.tabs button.on { font-weight: 700; border: 2px solid var(--accent); }
button.chip { padding: 10px 16px; }
.set-nav button, .set-nav button.on { padding: 14px 16px; font-size: calc(15.5px * var(--fz)); color: var(--text); }
.set-nav button.on { color: var(--accent-strong); }
.row { padding: 18px 4px; }
.orow-head { padding-top: 16px; padding-bottom: 16px; min-height: 64px; }
.otxt b, .row h4, .inv-row h4, .pcard h4 { font-size: calc(16.5px * var(--fz)); }
.otxt small, .row p { white-space: normal; }
.dd-opt { padding: 14px 14px; font-size: calc(16px * var(--fz)); }
.dd-btn.sm, .pcard select { min-height: calc(44px * var(--fz)); font-size: calc(15px * var(--fz)); }
.cal-day { height: 46px; font-size: calc(16px * var(--fz)); }
.cal-head button { width: 46px; height: 46px; }
.dd-panel.cal { width: 340px; }
.cal-foot button { font-size: calc(15px * var(--fz)); padding: 12px 14px; }
.chk { padding: 14px 12px; }
.chk input { width: 30px; height: 30px; border-width: 2px; border-radius: 8px; }
.chk input:checked::after { width: 8px; height: 15px; }

/* Formularios: campos claros, bordes visibles, texto grande */
.input { min-height: calc(46px * var(--fz)); border: 2px solid var(--line-strong); font-size: calc(16px * var(--fz)); }
.input.lg { min-height: calc(50px * var(--fz)); font-size: calc(18px * var(--fz)); }
.input::placeholder { color: var(--muted); opacity: .85; }
.input:focus { border-color: var(--accent-strong); box-shadow: 0 0 0 4px var(--accent-soft); }
.field-error, .form-error { font-weight: 600; }
.form-error { border: 2px solid var(--accent); }

/* Foco del teclado muy visible (anillo doble: se ve sobre fondo claro y oscuro) */
:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 3px; box-shadow: 0 0 0 6px var(--surface); }
.sidebar :focus-visible, .welcome :focus-visible, .intro :focus-visible, .focus :focus-visible { outline-color: #ffd86b; box-shadow: 0 0 0 6px rgba(0,0,0,.6); }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 300; padding: 14px 20px; border-radius: 12px; background: var(--c1); color: var(--c3); font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* Estados que no dependen solo del color */
.orow.late .obar, .orow.today .obar { width: 8px; }
.stock-pill.low::after { content: ' (poco)'; font-weight: 500; } .stock-pill.out::after { content: ' (agotado)'; font-weight: 500; }
a:not(.btn):not(.nav a):not(.bottom-nav a):not(.skip-link) { text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Tarjetas y tablas con más aire */
.card { padding: 28px; }
.view { max-width: 1180px; }
.top-title h1 { font-size: calc(32px * var(--fz)); }
.toast { font-size: calc(16.5px * var(--fz)); padding: 16px 22px; }
.modal { max-width: 620px; } .modal.wide { max-width: 780px; }
.modal header h3 { font-size: calc(26px * var(--fz)); }
.modal footer .btn { min-width: 130px; }
.trialbar { font-size: calc(15.5px * var(--fz)); }
.welcome-card .label { font-size: calc(16px * var(--fz)); }
.welcome-card .lead { font-size: calc(18px * var(--fz)); }
.welcome-card h2 { font-size: calc(40px * var(--fz)); }
.auth-tabs button { padding: 14px 8px; font-size: calc(16px * var(--fz)); opacity: 1; }
.link-btn { opacity: 1; font-size: calc(16px * var(--fz)); padding: 14px; }
.focus-card ul { font-size: calc(16px * var(--fz)); }
.focus-card > span:not(.focus-ico) { color: #f1e7c4; font-size: calc(17px * var(--fz)); }
.intro-copy p { color: #f1e7c4; }

/* Calma visual: sin movimiento si el sistema lo pide */
@media (prefers-reduced-motion: reduce) { .btn-gold::before, .btn-gold::after, .intro-btn::before, .intro-btn::after, .art-ring { animation: none !important; } .btn:hover, .icon-btn:hover, .focus-card:hover, .pcard:hover { transform: none; } }
/* Contraste alto del sistema */
@media (prefers-contrast: more) { :root, [data-palette] { --line: currentColor; } .card { border-width: 2px; border-color: var(--text); } }

@media (max-width: 900px) { .top-title h1 { font-size: calc(26px * var(--fz)); } .card { padding: 20px; } }
@media (max-width: 380px) { .topbar .icon-btn, .topbar .mode-btn { width: 46px; height: 46px; } .top-title h1 { font-size: calc(20px * var(--fz)); } }
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; row-gap: 6px; }
  .top-title { order: 3; flex-basis: 100%; }
  .top-actions { margin-left: auto; }
  .bottom-nav a { font-size: calc(12.5px * var(--fz)); gap: 2px; letter-spacing: 0; overflow-wrap: anywhere; text-align: center; }
}
@media (max-width: 640px) { .sale-row { grid-template-columns: 1fr 1fr 48px; gap: 10px; } .sale-row .sale-what { grid-column: 1 / -1; } }

/* Pantalla Hoy: cuadros grandes de secciones y acciones rápidas */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile { display: grid; justify-items: center; align-content: center; gap: 6px; min-height: calc(150px * var(--fz)); padding: 20px 12px; text-align: center; text-decoration: none; color: var(--text); background: var(--surface); border: 2px solid var(--line-strong); border-radius: 22px; box-shadow: var(--shadow); transition: transform .2s var(--ease), border-color .2s; }
.tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.tile-ico { width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(145deg, var(--c4), var(--c5)); color: var(--on-accent); margin-bottom: 4px; }
.tile b { font-size: calc(20px * var(--fz)); font-weight: 700; line-height: 1.15; }
.tile small { color: var(--muted); font-size: calc(14.5px * var(--fz)); }
.acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.act { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: calc(104px * var(--fz)); padding: 14px 8px; text-align: center; font-weight: 700; font-size: calc(15.5px * var(--fz)); line-height: 1.2; color: var(--accent-strong); background: var(--accent-soft); border: 2px solid var(--line-strong); border-radius: 18px; transition: transform .2s var(--ease), border-color .2s; }
.act:hover { transform: translateY(-2px); border-color: var(--accent); }
.act.act-main { background: linear-gradient(145deg, var(--c5), color-mix(in srgb, var(--c5) 78%, #000)); color: var(--on-accent); border-color: transparent; }
@media (max-width: 900px) { .tiles { grid-template-columns: 1fr 1fr; gap: 12px; } .tile { min-height: calc(132px * var(--fz)); } }
@media (max-width: 640px) { .acts { gap: 10px; } .act { font-size: calc(13.5px * var(--fz)); padding: 12px 4px; } .tile-ico { width: 60px; height: 60px; } }

/* Sin barra inferior: se navega desde los cuadros de Inicio, con "Volver al inicio" en las demás pantallas */
.bottom-nav { display: none !important; }
.main { padding-bottom: 40px; }
.toast-root { bottom: 24px; }
.back-home { display: inline-flex; align-items: center; min-height: calc(44px * var(--fz)); padding: 0 16px; margin-bottom: 6px; border-radius: 12px; font-weight: 700; font-size: calc(15.5px * var(--fz)); text-decoration: none; color: var(--accent-strong); background: var(--accent-soft); border: 2px solid var(--line-strong); }
.back-home[hidden] { display: none; }

/* Contraseña con ojito */
.pass-wrap { position: relative; display: block; }
.pass-wrap .input { padding-right: 64px; }
.pass-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: #f3d27a; }
.pass-eye:hover { background: rgba(243,210,122,.18); }

/* Acciones del inicio: color por tipo y contador de pendientes */
.act { position: relative; }
.act.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.act.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.act.alert { border-color: var(--accent-strong); }
.act-n { position: absolute; top: -10px; right: -6px; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 16px; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: calc(15px * var(--fz)); background: var(--accent-strong); color: var(--on-accent); border: 3px solid var(--surface); }

/* Revisión multiplataforma: selectores de periodo que no desborden y botón de cerrar que no se aplaste */
.icon-btn, .icon-btn.plain { flex: none; }
.tabs { display: flex; flex-wrap: wrap; max-width: 100%; }
.tabs button { flex: 1 1 auto; text-align: center; }
.top-actions { flex: none; }

/* Revisión multiplataforma 2: nada se sale de la pantalla con letra muy grande en celulares angostos */
.btn { white-space: normal; text-align: center; line-height: 1.25; padding-top: 8px; padding-bottom: 8px; }
.tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.acts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile b, .act span, .kpi small, .kpi strong, .kpi em, .opt strong, .opt small, .hoy-txt { overflow-wrap: anywhere; }
@media (max-width: 900px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .g-4, .g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi strong { font-size: calc(26px * var(--fz)); }
  [data-fs="l"] .acts, [data-fs="xl"] .acts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-fs="xl"] .g-4, [data-fs="xl"] .g-2 { grid-template-columns: minmax(0, 1fr); }
  [data-fs="xl"] .tiles { grid-template-columns: minmax(0, 1fr); }
  [data-fs="xl"] .opt-grid { grid-template-columns: minmax(0, 1fr); }
}
.btn { min-height: max(48px, calc(46px * var(--fz))); } .btn.sm { min-height: max(44px, calc(40px * var(--fz))); } .btn.lg { min-height: max(52px, calc(50px * var(--fz))); }

/* ================= Estilo visual 2: fondos degradados, iconos 3D y tarjetas de color (Inicio) ================= */
body { background: var(--bg) url('../img/ui/fondo-claro.webp') center top / cover fixed no-repeat; }
[data-theme="dark"] body { background: #070b16 url('../img/ui/fondo-oscuro.webp') center top / cover fixed no-repeat; }
.topbar { background: transparent; backdrop-filter: none; }

/* Saludo y resumen del día */
.hero2 { position: relative; display: block; overflow: hidden; min-height: calc(170px * var(--fz)); padding: 24px 26px; border-radius: 28px; text-decoration: none; color: #14213d;
  background: linear-gradient(135deg, #fff6e6, #ffe4bf); border: 1px solid rgba(255,170,60,.55); box-shadow: 0 14px 34px -16px rgba(230,140,30,.55); transition: transform .2s var(--ease), box-shadow .2s; }
.hero2:hover { transform: translateY(-2px); }
[data-theme="dark"] .hero2 { color: #fff; background: linear-gradient(135deg, #17161a, #2b2214); border-color: rgba(255,190,80,.7); box-shadow: 0 14px 34px -14px rgba(0,0,0,.8), 0 0 0 1px rgba(255,190,80,.15) inset; }
.hero2-txt { position: relative; z-index: 1; display: grid; gap: 6px; max-width: 62%; }
.hero2-kick { font-size: calc(14.5px * var(--fz)); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.hero2-name { font-size: calc(46px * var(--fz)); line-height: 1.05; font-weight: 700; overflow-wrap: anywhere; }
.hero2-sub { font-size: calc(16px * var(--fz)); line-height: 1.45; }
.hero2-sub strong { font-size: 1.15em; }
.hero2-go { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-weight: 700; font-size: calc(15.5px * var(--fz)); color: #a24b00; }
[data-theme="dark"] .hero2-go { color: #ffc65a; }
.hero2-art { position: absolute; right: 0; top: 0; bottom: 0; width: 46%; background: url('../img/ui/hero-claro.webp') right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 38%); mask-image: linear-gradient(90deg, transparent 0, #000 38%); }
[data-theme="dark"] .hero2-art { background-image: url('../img/ui/hero-oscuro.webp'); }
.hero2-badge { position: absolute; top: 14px; right: 16px; z-index: 2; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 20px; display: grid; place-items: center; font-weight: 700; font-size: calc(18px * var(--fz)); color: #fff; background: #d92d20; border: 3px solid #fff; }
[data-theme="dark"] .hero2-badge { border-color: #17161a; }

/* Cuatro cuadros de sección */
.tile { position: relative; display: block; min-height: calc(150px * var(--fz)); padding: 16px; text-align: left; color: #14213d; border: 1px solid rgba(255,255,255,.7); border-radius: 24px; background-size: cover; background-position: center; background-color: #eef3ff; box-shadow: 0 12px 26px -16px rgba(40,60,120,.5); }
[data-theme="dark"] .tile { color: #fff; border-color: rgba(255,255,255,.25); box-shadow: 0 12px 26px -14px rgba(0,0,0,.8); }
.tile--clientes { --tc: #2f6bff; background-image: url('../img/ui/tile-clientes-claro.webp'); } .tile--interesados { --tc: #e8730c; background-image: url('../img/ui/tile-interesados-claro.webp'); }
.tile--inventario { --tc: #7c3aed; background-image: url('../img/ui/tile-inventario-claro.webp'); } .tile--finanzas { --tc: #138a4a; background-image: url('../img/ui/tile-finanzas-claro.webp'); }
[data-theme="dark"] .tile--clientes { background-image: url('../img/ui/tile-clientes-oscuro.webp'); } [data-theme="dark"] .tile--interesados { background-image: url('../img/ui/tile-interesados-oscuro.webp'); }
[data-theme="dark"] .tile--inventario { background-image: url('../img/ui/tile-inventario-oscuro.webp'); } [data-theme="dark"] .tile--finanzas { background-image: url('../img/ui/tile-finanzas-oscuro.webp'); }
.tile-img { display: block; width: calc(72px * var(--fz)); height: calc(72px * var(--fz)); object-fit: contain; object-position: left top; filter: drop-shadow(0 6px 8px rgba(0,0,0,.25)); }
.tile-go { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--tc); box-shadow: 0 4px 10px -3px rgba(0,0,0,.4); }
.tile-txt { display: grid; gap: 0; margin-top: 8px; }
.tile-txt b { font-size: calc(21px * var(--fz)); line-height: 1.15; font-weight: 700; }
.tile-txt small { font-size: calc(15px * var(--fz)); color: inherit; opacity: .85; }

/* Nueve acciones */
.acts-card { padding: 20px; border-radius: 28px; background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.8); box-shadow: 0 14px 34px -18px rgba(40,60,120,.4); backdrop-filter: blur(6px); }
[data-theme="dark"] .acts-card { background: rgba(10,14,28,.62); border-color: rgba(255,255,255,.18); box-shadow: 0 14px 34px -14px rgba(0,0,0,.8); }
.acts-title { font-size: calc(24px * var(--fz)); margin: 0 0 14px 4px; color: #14213d; position: relative; padding-bottom: 8px; }
.acts-title::after { content: ''; position: absolute; left: 4px; bottom: 0; width: 46px; height: 4px; border-radius: 4px; background: #e8730c; }
[data-theme="dark"] .acts-title { color: #fff; } [data-theme="dark"] .acts-title::after { background: #ffc65a; }
.act { position: relative; display: grid; justify-items: center; align-content: end; gap: 4px; min-height: calc(112px * var(--fz)); padding: 10px 6px 12px; border: 1px solid rgba(255,255,255,.55); border-radius: 18px; color: #fff; font-weight: 700; font-size: calc(15.5px * var(--fz)); line-height: 1.15; text-shadow: 0 1px 3px rgba(0,0,0,.6);
  background-color: #2d8cff; background-size: cover; background-position: center; box-shadow: 0 8px 18px -10px rgba(0,0,0,.55); }
.act::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.44)); pointer-events: none; }
.act > * { position: relative; }
.act-img { width: calc(46px * var(--fz)); height: calc(46px * var(--fz)); object-fit: contain; filter: drop-shadow(0 4px 5px rgba(0,0,0,.35)); }
.act:hover { transform: translateY(-2px); border-color: #fff; }
.act--vender { background-image: url('../img/ui/act-vender.webp'); } .act--cliente { background-image: url('../img/ui/act-cliente.webp'); } .act--interesado { background-image: url('../img/ui/act-interesado.webp'); }
.act--producto { background-image: url('../img/ui/act-producto.webp'); } .act--ingreso { background-image: url('../img/ui/act-ingreso.webp'); } .act--salida { background-image: url('../img/ui/act-salida.webp'); }
.act--estadisticas { background-image: url('../img/ui/act-estadisticas.webp'); color: #2b1a00; text-shadow: 0 1px 0 rgba(255,255,255,.45); } .act--estadisticas::before { background: none; }
.act--copia { background-image: url('../img/ui/act-copia.webp'); } .act--ajustes { background-image: url('../img/ui/act-ajustes.webp'); }
@media (max-width: 640px) {
  .hero2 { padding: 18px; } .hero2-name { font-size: calc(38px * var(--fz)); } .hero2-txt { max-width: 66%; } .hero2-art { width: 42%; }
  .tile { padding: 12px; min-height: calc(138px * var(--fz)); } .tile-go { top: 10px; right: 10px; width: 40px; height: 40px; }
  .acts-card { padding: 14px; } .acts { gap: 10px; } .act { font-size: calc(13.5px * var(--fz)); }
}
@media (max-width: 400px) { .hero2-art { opacity: .45; } .hero2-txt { max-width: 100%; } }
[data-fs="l"] .hero2-txt, [data-fs="xl"] .hero2-txt { max-width: 100%; } [data-fs="xl"] .hero2-art { opacity: .3; }
.tile { justify-items: start; align-content: start; }
.topbar { background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px); }

/* Saludo solo (sin resumen) y tarjeta "Hoy" separada */
.hero2--solo { min-height: calc(120px * var(--fz)); display: flex; align-items: center; }
.hero2--solo .hero2-txt { max-width: 60%; }
.hoy-card { display: flex; align-items: center; gap: 18px; min-height: calc(130px * var(--fz)); padding: 22px 26px; border-radius: 24px; text-decoration: none; color: var(--text); background: var(--surface); border: 2px solid #e8a53a; box-shadow: 0 12px 28px -16px rgba(0,0,0,.5); transition: transform .2s var(--ease); }
[data-theme="dark"] .hoy-card { color: #fff3dc; background: #1d1b19; border-color: #f0b84a; }
.hoy-card:hover { transform: translateY(-2px); }
.hoy-ico { flex: none; width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(145deg, #c58a14, #8a5a08); color: #fff8e6; }
.hoy-txt { flex: 1; min-width: 0; display: grid; gap: 4px; overflow-wrap: anywhere; }
.hoy-txt b { font-size: calc(30px * var(--fz)); line-height: 1.1; }
.hoy-txt > span { font-size: calc(18px * var(--fz)); font-weight: 700; }
.hoy-txt small { color: var(--muted); font-size: calc(14.5px * var(--fz)); }
.hoy-badge { flex: none; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 22px; display: grid; place-items: center; background: #d92d20; color: #fff; font-weight: 700; font-size: calc(20px * var(--fz)); }
.hoy-go { flex: none; color: #c58a14; display: grid; }
[data-theme="dark"] .hoy-go { color: #f0b84a; }
@media (max-width: 640px) { .hoy-card { padding: 16px; gap: 12px; } .hoy-ico { width: 60px; height: 60px; } .hoy-txt b { font-size: calc(26px * var(--fz)); } .hoy-txt > span { font-size: calc(16px * var(--fz)); } }

/* Tarjeta "Hoy" en el estilo nuevo: degradado azul, icono 3D y flecha en círculo */
.hoy-card { position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px; min-height: calc(120px * var(--fz)); padding: 18px 20px; border-radius: 24px; text-decoration: none; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.5);
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.4)), url('../img/ui/act-ajustes.webp') center / cover no-repeat, #1f6bff; border: 1px solid rgba(255,255,255,.6); box-shadow: 0 14px 28px -14px rgba(20,70,200,.7); }
[data-theme="dark"] .hoy-card { color: #fff; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.4)), url('../img/ui/act-ajustes.webp') center / cover no-repeat, #1f6bff; border-color: rgba(255,255,255,.35); }
.hoy-img { flex: none; width: calc(72px * var(--fz)); height: calc(72px * var(--fz)); object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
.hoy-txt b { font-size: calc(28px * var(--fz)); }
.hoy-txt > span { font-size: calc(17px * var(--fz)); font-weight: 700; }
.hoy-txt small { color: #fff; opacity: .92; font-size: calc(15px * var(--fz)); }
.hoy-badge { position: absolute; top: -2px; right: 14px; min-width: 38px; height: 38px; border-radius: 19px; border: 3px solid #fff; text-shadow: none; }
.hoy-go { width: 44px; height: 44px; border-radius: 50%; place-items: center; background: #fff; color: #1f6bff; text-shadow: none; box-shadow: 0 4px 10px -3px rgba(0,0,0,.4); }
[data-theme="dark"] .hoy-go { color: #1f6bff; }
@media (max-width: 640px) { .hoy-card { padding: 14px 14px; gap: 12px; } .hoy-img { width: calc(60px * var(--fz)); height: calc(60px * var(--fz)); } .hoy-txt b { font-size: calc(24px * var(--fz)); } .hoy-txt > span { font-size: calc(15.5px * var(--fz)); } }
.flat { display: grid; place-items: center; border-radius: 18px; background: rgba(255,255,255,.88); color: var(--accent-strong); text-shadow: none; filter: none; }
.tile-img.flat, .hoy-img.flat { width: calc(64px * var(--fz)); height: calc(64px * var(--fz)); }
.act-img.flat { width: calc(44px * var(--fz)); height: calc(44px * var(--fz)); border-radius: 14px; }

/* ================= Estilo visual 2 en el resto de la app ================= */
/* Cabecera de sección: tarjeta de color con icono 3D */
.banner { position: relative; display: flex; align-items: center; gap: 16px; min-height: calc(96px * var(--fz)); margin-bottom: 20px; padding: 14px 20px; border-radius: 24px; color: #14213d; background-size: cover; background-position: center; border: 1px solid rgba(255,255,255,.8); box-shadow: 0 12px 26px -16px rgba(40,60,120,.5); }
[data-theme="dark"] .banner { color: #fff; border-color: rgba(255,255,255,.25); box-shadow: 0 12px 26px -14px rgba(0,0,0,.8); }
.banner-img { flex: none; width: calc(68px * var(--fz)); height: calc(68px * var(--fz)); object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,.3)); }
.banner-img.flat { width: calc(60px * var(--fz)); height: calc(60px * var(--fz)); }
.banner-txt { font-size: calc(21px * var(--fz)); font-weight: 700; line-height: 1.2; }
.banner--clientes, .banner--equipo { background-image: url('../img/ui/tile-clientes-claro.webp'); } .banner--prospectos { background-image: url('../img/ui/tile-interesados-claro.webp'); }
.banner--inventario { background-image: url('../img/ui/tile-inventario-claro.webp'); } .banner--ventas { background-image: url('../img/ui/tile-finanzas-claro.webp'); }
[data-theme="dark"] .banner--clientes, [data-theme="dark"] .banner--equipo { background-image: url('../img/ui/tile-clientes-oscuro.webp'); } [data-theme="dark"] .banner--prospectos { background-image: url('../img/ui/tile-interesados-oscuro.webp'); }
[data-theme="dark"] .banner--inventario { background-image: url('../img/ui/tile-inventario-oscuro.webp'); } [data-theme="dark"] .banner--ventas { background-image: url('../img/ui/tile-finanzas-oscuro.webp'); }
.banner--estadisticas { background-image: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.4)), url('../img/ui/act-estadisticas.webp'); color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.banner--ajustes, .banner--detalle { background-image: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.4)), url('../img/ui/act-ajustes.webp'); color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.banner--guiones { background-image: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.4)), url('../img/ui/act-ingreso.webp'); color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }

/* Tarjetas de vidrio sobre el fondo degradado */
.card, .olist { background: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.9); border-radius: 26px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 14px 34px -18px rgba(40,60,120,.4); }
[data-theme="dark"] .card, [data-theme="dark"] .olist { background: rgba(10,14,28,.66); border-color: rgba(255,255,255,.16); box-shadow: 0 14px 34px -14px rgba(0,0,0,.8); }
.card-head h3 { color: var(--text); position: relative; }
.col { background: rgba(255,255,255,.55); border-radius: 22px; } [data-theme="dark"] .col { background: rgba(10,14,28,.5); }
.pcard, .tpl, .buy-card, .newc, .preview, .detail-grid div, .sale-total { border-radius: 18px; }

/* Indicadores con degradados de color e icono */
.kpi { min-height: calc(130px * var(--fz)); }
.grid > .kpi { position: relative; overflow: hidden; color: #fff; border: 1px solid rgba(255,255,255,.55); text-shadow: 0 1px 3px rgba(0,0,0,.55); background-size: cover; background-position: center; background-color: #2d8cff; }
.grid > .kpi::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 20%, rgba(0,0,0,.42)); pointer-events: none; }
.grid > .kpi > * { position: relative; }
.grid > .kpi small, .grid > .kpi em, .grid > .kpi strong { color: #fff; }
.grid > .kpi .kpi-ico { background: rgba(255,255,255,.9); color: #14213d; text-shadow: none; }
.grid > .kpi:nth-child(8n+1) { background-image: url('../img/ui/act-vender.webp'); } .grid > .kpi:nth-child(8n+2) { background-image: url('../img/ui/act-cliente.webp'); }
.grid > .kpi:nth-child(8n+3) { background-image: url('../img/ui/act-producto.webp'); } .grid > .kpi:nth-child(8n+4) { background-image: url('../img/ui/act-salida.webp'); }
.grid > .kpi:nth-child(8n+5) { background-image: url('../img/ui/act-interesado.webp'); } .grid > .kpi:nth-child(8n+6) { background-image: url('../img/ui/act-ingreso.webp'); }
.grid > .kpi:nth-child(8n+7) { background-image: url('../img/ui/act-copia.webp'); } .grid > .kpi:nth-child(8n+8) { background-image: url('../img/ui/act-ajustes.webp'); }

/* Botones de color */
.btn.primary { background: linear-gradient(160deg, #2468ee, #1648c4); color: #fff; border: 1px solid rgba(255,255,255,.45); box-shadow: 0 10px 20px -10px rgba(22,72,196,.8); text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.btn.soft { background: rgba(31,95,224,.12); color: var(--accent-strong); border: 2px solid rgba(31,95,224,.35); }
[data-theme="dark"] .btn.soft { background: rgba(125,179,255,.16); border-color: rgba(125,179,255,.45); }
.btn.danger { background: linear-gradient(160deg, #e5484d, #b3262c); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.btn.ghost { background: rgba(255,255,255,.7); } [data-theme="dark"] .btn.ghost { background: rgba(255,255,255,.08); }

/* Listas, pestañas y ajustes */
.mono-avatar { border-radius: 50%; background: linear-gradient(145deg, #2f7bff, #1648c4); color: #fff; }
.row.click:hover { background: rgba(31,95,224,.08); }
.tabs { background: rgba(255,255,255,.7); border-radius: 18px; } [data-theme="dark"] .tabs { background: rgba(10,14,28,.6); }
.tabs button.on { background: linear-gradient(160deg, #2468ee, #1648c4); color: #fff; border-color: transparent; }
.set-nav { background: rgba(255,255,255,.8); border-radius: 24px; } [data-theme="dark"] .set-nav { background: rgba(10,14,28,.66); }
.set-nav button.on { background: linear-gradient(160deg, #2468ee, #1648c4); color: #fff; }
.opt { border-radius: 20px; background: rgba(255,255,255,.8); } [data-theme="dark"] .opt { background: rgba(10,14,28,.6); }
.trialbar { border-radius: 18px; }
.nav a.active { background: linear-gradient(160deg, rgba(47,123,255,.55), rgba(22,72,196,.55)); color: #fff; }

/* Estados vacíos e iconos de lista */
.empty-img { width: calc(96px * var(--fz)); height: calc(96px * var(--fz)); object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0,0,0,.25)); }
.empty h4 { font-family: var(--font); font-weight: 700; }
.oico, .opp-ico { border-radius: 14px; }

/* Ventanas */
.modal { border-radius: 28px; border: 1px solid rgba(255,255,255,.8); }
.modal header { background: linear-gradient(135deg, rgba(47,123,255,.16), rgba(255,160,60,.16)); padding-bottom: 14px; margin-bottom: 4px; }
[data-theme="dark"] .modal { border-color: rgba(255,255,255,.2); }
.modal header h3 { color: var(--text); }
@media (max-width: 640px) { .banner { padding: 12px 14px; gap: 12px; } .banner-txt { font-size: calc(18px * var(--fz)); } .card { border-radius: 22px; } }
.list { grid-template-columns: minmax(0, 1fr); }
.row .opp-ico, .row .oico { flex: none; }
.stack { grid-template-columns: minmax(0, 1fr); }
.banner-txt { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 1000px) {
  .inv-head { display: none; }
  .inv-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .inv-row > :nth-child(n+3) { font-size: calc(14px * var(--fz)); }
  .row-actions { flex-wrap: wrap; justify-content: flex-end; }
}
.kpi strong { font-size: calc(30px * var(--fz)); overflow-wrap: normal; }
@media (max-width: 640px) { .kpi strong { font-size: calc(26px * var(--fz)); } }

/* ===== Inicio más compacto (menos desplazamiento) ===== */
.stack:has(> .hero2) { gap: 12px; }
.hero2--solo { min-height: calc(84px * var(--fz)); padding: 12px 18px; }
.hero2--solo .hero2-name { font-size: calc(34px * var(--fz)); }
.hero2--solo .hero2-kick { font-size: calc(13px * var(--fz)); }
.hoy-card { min-height: calc(82px * var(--fz)); padding: 12px 16px; gap: 12px; border-radius: 22px; }
.hoy-img { width: calc(54px * var(--fz)); height: calc(54px * var(--fz)); }
.hoy-txt { gap: 0; } .hoy-txt b { font-size: calc(24px * var(--fz)); } .hoy-txt > span { font-size: calc(15.5px * var(--fz)); } .hoy-txt small { display: none; }
.hoy-go { width: 40px; height: 40px; }
.tiles { gap: 10px; }
.tile { min-height: calc(112px * var(--fz)); padding: 10px 12px; border-radius: 22px; }
.tile-img { width: calc(52px * var(--fz)); height: calc(52px * var(--fz)); }
.tile-go { top: 10px; right: 10px; width: 38px; height: 38px; }
.tile-txt { margin-top: 2px; } .tile-txt b { font-size: calc(19px * var(--fz)); } .tile-txt small { font-size: calc(14px * var(--fz)); }
.acts-card { padding: 12px; border-radius: 24px; }
.acts-title { font-size: calc(20px * var(--fz)); margin: 0 0 8px 4px; padding-bottom: 6px; }
.acts { gap: 8px; }
.act { min-height: calc(86px * var(--fz)); padding: 8px 4px 10px; gap: 2px; font-size: calc(14.5px * var(--fz)); }
.act-img { width: calc(36px * var(--fz)); height: calc(36px * var(--fz)); }
@media (max-width: 640px) { .tile { padding: 8px 10px; } .act { font-size: calc(13.5px * var(--fz)); } }

/* Botón Agenda debajo de los cuatro cuadros */
.tile--agenda { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; min-height: calc(76px * var(--fz)); padding: 10px 14px; color: #2b1a00; text-shadow: 0 1px 0 rgba(255,255,255,.45);
  background: url('../img/ui/act-estadisticas.webp') center / cover no-repeat, #ffc83a; border-color: rgba(255,255,255,.7); }
[data-theme="dark"] .tile--agenda { color: #2b1a00; }
.tile--agenda .tile-txt { margin-top: 0; flex: 1; min-width: 0; }
.tile--agenda .tile-go { position: static; flex: none; background: #2b1a00; color: #ffd86b; box-shadow: none; }
.agenda-ico { flex: none; width: calc(52px * var(--fz)); height: calc(52px * var(--fz)); border-radius: 16px; display: grid; place-items: center; background: rgba(255,255,255,.92); color: #b45309; box-shadow: 0 6px 10px -4px rgba(0,0,0,.35); text-shadow: none; }

/* Hoy y Agenda con los recursos nuevos (calendario rojo, libreta amarilla) */
.hoy-card, [data-theme="dark"] .hoy-card { background: linear-gradient(90deg, rgba(110,0,15,.62), rgba(110,0,15,.18) 70%), url('../img/ui/card-hoy.webp') center / cover no-repeat, #e11d2e; border-color: rgba(255,255,255,.7); box-shadow: 0 14px 28px -14px rgba(200,20,40,.7); }
.hoy-img { width: calc(60px * var(--fz)); height: calc(60px * var(--fz)); }
.hoy-go { color: #c1121f; } [data-theme="dark"] .hoy-go { color: #c1121f; }
.tile--agenda, [data-theme="dark"] .tile--agenda { background: url('../img/ui/card-agenda.webp') center / cover no-repeat, #ffc83a; }
.agenda-img { flex: none; width: calc(60px * var(--fz)); height: calc(60px * var(--fz)); object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0,0,0,.3)); }
.agenda-img.flat, .hoy-img.flat { width: calc(52px * var(--fz)); height: calc(52px * var(--fz)); color: #b45309; }

/* Hoy y Agenda con los fondos claros y oscuros nuevos */
[data-theme="light"] .hoy-card { background: url('../img/ui/card-hoy-claro.webp') center / cover no-repeat, #ffd1d4; color: #5a0a14; text-shadow: 0 1px 0 rgba(255,255,255,.55); border-color: rgba(255,255,255,.9); box-shadow: 0 14px 28px -16px rgba(220,60,70,.55); }
[data-theme="light"] .hoy-txt small { color: #5a0a14; }
[data-theme="light"] .hoy-go { background: #c1121f; color: #fff; }
[data-theme="dark"] .hoy-card { background: url('../img/ui/card-hoy-oscuro.webp') center / cover no-repeat, #5a0610; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); border-color: rgba(255,120,120,.45); box-shadow: 0 14px 28px -14px rgba(0,0,0,.8); }
[data-theme="dark"] .hoy-go { background: #fff; color: #c1121f; }
[data-theme="light"] .tile--agenda { background: url('../img/ui/card-agenda-claro.webp') center / cover no-repeat, #ffe59a; color: #3a2200; text-shadow: 0 1px 0 rgba(255,255,255,.55); border-color: rgba(255,255,255,.9); }
[data-theme="light"] .tile--agenda .tile-go { background: #3a2200; color: #ffd86b; }
[data-theme="dark"] .tile--agenda { background: url('../img/ui/card-agenda-oscuro.webp') center / cover no-repeat, #3a2605; color: #fff3c4; text-shadow: 0 1px 3px rgba(0,0,0,.65); border-color: rgba(255,200,90,.45); }
[data-theme="dark"] .tile--agenda .tile-go { background: #ffc83a; color: #2b1a00; }
[data-theme="dark"] .hoy-card { background: linear-gradient(90deg, rgba(0,0,0,.4), rgba(0,0,0,0) 75%), url('../img/ui/card-hoy-oscuro.webp') center / cover no-repeat, #5a0610; }
[data-theme="dark"] .tile--agenda { background: linear-gradient(90deg, rgba(0,0,0,.4), rgba(0,0,0,0) 75%), url('../img/ui/card-agenda-oscuro.webp') center / cover no-repeat, #3a2605; }

/* Fondos intercambiados: Hoy en amarillo y Agenda en rojo */
[data-theme="light"] .hoy-card { background: url('../img/ui/card-agenda-claro.webp') center / cover no-repeat, #ffe59a; color: #3a2200; text-shadow: 0 1px 0 rgba(255,255,255,.55); box-shadow: 0 14px 28px -16px rgba(230,160,30,.6); }
[data-theme="light"] .hoy-txt small { color: #3a2200; }
[data-theme="light"] .hoy-go { background: #3a2200; color: #ffd86b; }
[data-theme="dark"] .hoy-card { background: linear-gradient(90deg, rgba(0,0,0,.4), rgba(0,0,0,0) 75%), url('../img/ui/card-agenda-oscuro.webp') center / cover no-repeat, #3a2605; color: #fff3c4; border-color: rgba(255,200,90,.45); }
[data-theme="dark"] .hoy-go { background: #ffc83a; color: #2b1a00; }
[data-theme="light"] .tile--agenda { background: url('../img/ui/card-hoy-claro.webp') center / cover no-repeat, #ffd1d4; color: #5a0a14; box-shadow: 0 14px 28px -16px rgba(220,60,70,.55); }
[data-theme="light"] .tile--agenda .tile-go { background: #c1121f; color: #fff; }
[data-theme="dark"] .tile--agenda { background: linear-gradient(90deg, rgba(0,0,0,.4), rgba(0,0,0,0) 75%), url('../img/ui/card-hoy-oscuro.webp') center / cover no-repeat, #5a0610; color: #fff; border-color: rgba(255,120,120,.45); }
[data-theme="dark"] .tile--agenda .tile-go { background: #fff; color: #c1121f; }

/* ================= Pantallas de trabajo: Clientes, ficha, Hoy y formularios ================= */
/* Colores de iconos (suaves, con icono fuerte) */
.fld-ico { flex: none; width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; }
.c-b { background: #e3eeff; color: #1f5fe0; } .c-g { background: #dcf7e6; color: #12803a; } .c-v { background: #eee3ff; color: #6d28d9; }
.c-r { background: #ffe1e4; color: #c1121f; } .c-a { background: #fff0cf; color: #b45309; }
[data-theme="dark"] .c-b { background: rgba(80,140,255,.2); color: #8ab8ff; } [data-theme="dark"] .c-g { background: rgba(60,200,120,.2); color: #6fe3a0; }
[data-theme="dark"] .c-v { background: rgba(160,110,255,.22); color: #c4a3ff; } [data-theme="dark"] .c-r { background: rgba(255,90,100,.22); color: #ff9aa2; }
[data-theme="dark"] .c-a { background: rgba(255,180,60,.2); color: #ffc66b; }

/* Campos de formulario: tarjeta con icono, sin amontonar */
.fld { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--line); }
[data-theme="dark"] .fld { background: rgba(255,255,255,.05); }
.fld-body { display: grid; gap: 6px; flex: 1; min-width: 0; }
.fld .label { font-size: calc(15px * var(--fz)); }
.form-grid { gap: 12px; }
.modal-body { padding-top: 14px; }

/* Estado del cliente */
.chip.st { font-weight: 700; padding: 6px 14px; font-size: calc(14px * var(--fz)); border: 0; }
.st-nuevo { background: #dbeaff; color: #1445a8; } .st-recurrente { background: #d9f6e4; color: #0b6b33; } .st-ocasional { background: #eadcff; color: #5b21b6; } .st-inactivo { background: #ffd9dd; color: #a30f1b; } .st-todos { background: #e6eefc; color: #1445a8; }
[data-theme="dark"] .st-nuevo { background: rgba(80,140,255,.28); color: #bcd6ff; } [data-theme="dark"] .st-recurrente { background: rgba(60,200,120,.26); color: #9ff0bf; }
[data-theme="dark"] .st-ocasional { background: rgba(160,110,255,.3); color: #dac7ff; } [data-theme="dark"] .st-inactivo { background: rgba(255,90,100,.3); color: #ffc2c7; } [data-theme="dark"] .st-todos { background: rgba(125,179,255,.25); color: #cfe2ff; }

/* Filtros por estado */
.cfilters { display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: 10px; margin-bottom: 14px; }
.cf { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border-radius: 18px; border: 2px solid transparent; font-weight: 700; font-size: calc(14.5px * var(--fz)); }
.cf b { font-size: calc(22px * var(--fz)); line-height: 1; }
.cf.on { border-color: currentColor; box-shadow: 0 6px 14px -8px currentColor; }

/* Lista de clientes A-Z */
#list:has(.crow) { background: none; border: 0; box-shadow: none; padding: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.count-line { color: var(--muted); font-weight: 700; margin: 0 4px 8px; }
.letter { margin: 14px 0 8px; padding: 6px 16px; border-radius: 14px; background: rgba(31,95,224,.1); color: var(--accent-strong); font-weight: 700; font-size: calc(17px * var(--fz)); }
.crow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; border-radius: 20px; background: rgba(255,255,255,.88); border: 1px solid rgba(255,255,255,.9); box-shadow: 0 8px 20px -14px rgba(40,60,120,.5); cursor: pointer; }
[data-theme="dark"] .crow { background: rgba(10,14,28,.7); border-color: rgba(255,255,255,.14); }
.crow:hover { border-color: var(--accent); }
.crow-main { flex: 1; min-width: 0; } .crow-main h4 { font-size: calc(18px * var(--fz)); white-space: normal; overflow-wrap: anywhere; }
.crow-main p { color: var(--muted); font-size: calc(15px * var(--fz)); }
.crow-last { display: flex; align-items: center; gap: 6px; font-size: calc(14px * var(--fz)) !important; }
.wa-btn { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #19a24a; box-shadow: 0 6px 12px -6px rgba(25,162,74,.8); }
.wa-btn:hover { background: #12873c; } .wa-btn.off { background: none; box-shadow: none; }
.arow { position: relative; padding-left: 18px; }
.arow::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 6px; border-radius: 6px; background: #2f7bff; }
.arow.late::before { background: #e5484d; } .arow.today::before { background: #f59e0b; }
.arow .wa-btn { width: 48px; height: 48px; }
@media (max-width: 520px) { .crow { flex-wrap: wrap; } .crow .chip.st { order: 3; } .crow-main { flex-basis: calc(100% - 70px); } }

/* Ficha del cliente */
.cd-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.cd-av { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: calc(32px * var(--fz)); font-weight: 700; color: #fff; background: linear-gradient(145deg, #2f7bff, #1648c4); border: 4px solid rgba(47,123,255,.25); }
.cd-id { display: grid; gap: 6px; justify-items: start; } .cd-id p { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: calc(17px * var(--fz)); }
.cd-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.qa { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 14px; border-radius: 16px; font-weight: 700; font-size: calc(16px * var(--fz)); text-decoration: none; border: 2px solid transparent; }
.qa-wa { background: #dcf7e6; color: #0b6b33; border-color: #8fdcad; } .qa-call { background: #e3eeff; color: #1445a8; border-color: #a9c8ff; } .qa-edit { background: #eee3ff; color: #5b21b6; border-color: #cbb0ff; }
[data-theme="dark"] .qa-wa { background: rgba(60,200,120,.2); color: #9ff0bf; border-color: rgba(60,200,120,.5); } [data-theme="dark"] .qa-call { background: rgba(80,140,255,.22); color: #bcd6ff; border-color: rgba(80,140,255,.5); }
[data-theme="dark"] .qa-edit { background: rgba(160,110,255,.25); color: #dac7ff; border-color: rgba(160,110,255,.5); }
.info-card { padding: 14px; border-radius: 22px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 14px; }
[data-theme="dark"] .info-card { background: rgba(255,255,255,.05); }
.info-title { font-size: calc(18px * var(--fz)); margin: 2px 4px 10px; }
.irow { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); } .info-title + .irow { border-top: 0; }
.irow .fld-ico { width: 44px; height: 44px; } .irow-l { flex: 0 0 38%; color: var(--muted); font-size: calc(15px * var(--fz)); } .irow-v { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 520px) { .irow { flex-wrap: wrap; } .irow-l { flex: 1; } .irow-v { flex-basis: 100%; padding-left: 56px; margin-top: -8px; } }
.tl { position: relative; padding-left: 24px; } .tl::before { content: ''; position: absolute; left: 7px; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: rgba(47,123,255,.35); }
.tl-row { position: relative; display: grid; grid-template-columns: 78px 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); } .tl-row:first-child { border-top: 0; }
.tl-dot { position: absolute; left: -24px; top: 50%; margin-top: -8px; width: 16px; height: 16px; border-radius: 50%; background: #2f7bff; border: 3px solid var(--surface-2); } .tl-dot.first { background: #19a24a; }
.tl-date { color: var(--muted); font-size: calc(15px * var(--fz)); } .tl-what { font-weight: 700; overflow-wrap: anywhere; }
@media (max-width: 520px) { .tl-row { grid-template-columns: 1fr auto; } .tl-date { grid-column: 1 / -1; } }

/* Hoy: WhatsApp y Llamar siempre a la vista */
.orow { display: flex; flex-wrap: wrap; align-items: center; }
.orow-head { flex: 1 1 100%; } .orow-body { flex: 1 1 100%; }
.orow-quick { flex: 1 1 100%; display: flex; gap: 10px; padding: 0 14px 12px 18px; } .orow-quick .qa { flex: 1; min-height: 48px; }
@media (min-width: 760px) { .orow-head { flex: 1 1 0; min-width: 0; } .orow-quick { flex: 0 0 auto; padding: 0 12px; } .orow-quick .qa { flex: none; } }
.cd-actions { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.cd-actions .qa { flex-direction: column; gap: 4px; min-height: 72px; padding: 8px 4px; font-size: calc(15px * var(--fz)); text-align: center; line-height: 1.15; }
.modal footer .btn { white-space: normal; }
@media (max-width: 640px) {
  .orow-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; text-align: left; }
  .orow-head .oico { grid-row: 1; grid-column: 1; } .orow-head .otxt { grid-row: 1; grid-column: 2; } .orow-head .ochev { grid-row: 1; grid-column: 3; }
  .orow-head .chip { grid-row: 2; grid-column: 2; justify-self: start; }
  .otxt b { white-space: normal; overflow-wrap: anywhere; } .otxt small { white-space: normal; }
}
.orow-quick { flex-wrap: wrap; } .orow-quick .qa { flex: 1 1 128px; min-width: 0; padding: 0 8px; }
@media (max-width: 520px) {
  .arow { flex-wrap: wrap; row-gap: 4px; } .arow .chip { order: 4; margin-left: 58px; } .arow .wa-btn { margin-left: auto; }
  .arow .grow { flex: 1 1 calc(100% - 130px); }
  [data-fs="xl"] .detail-grid, [data-fs="l"] .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .cd-head { flex-wrap: wrap; }
}
@media (max-width: 380px) { .kpi strong { font-size: calc(22px * var(--fz)); } .grid > .kpi { padding: 14px 12px; } .kpi small { overflow-wrap: anywhere; } }
.detail-grid > div, .info-card, .irow-v, .tl-what { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 1100px) { .g-main, .g-3 { grid-template-columns: minmax(0, 1fr); } }
.arow .chip, .orow-head .chip { white-space: normal; text-align: center; }
.legend { flex-wrap: wrap; }
.toolbar .search { flex: 1 1 100%; max-width: none; }

/* Cabecera de Agenda: mismos colores que su botón de Inicio */
.banner--agenda { background-image: url('../img/ui/card-hoy-claro.webp'); color: #5a0a14; text-shadow: 0 1px 0 rgba(255,255,255,.55); }
[data-theme="dark"] .banner--agenda { background-image: linear-gradient(90deg, rgba(0,0,0,.4), rgba(0,0,0,0) 75%), url('../img/ui/card-hoy-oscuro.webp'); color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.cfilters { grid-template-columns: repeat(auto-fit, minmax(min(108px, 100%), 1fr)); }
.cf span { overflow-wrap: anywhere; text-align: center; }
[data-fs="l"] .cfilters, [data-fs="xl"] .cfilters { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ================= Agenda (semana, día, mes) ================= */
.ag-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ag-title { font-size: calc(36px * var(--fz)); line-height: 1.05; } .ag-top .muted { font-size: calc(16px * var(--fz)); }
.wk { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.wk-day { position: relative; flex: 1 0 46px; display: grid; justify-items: center; gap: 2px; padding: 8px 4px 12px; border-radius: 18px; background: rgba(255,255,255,.8); border: 2px solid rgba(255,255,255,.9); color: var(--text); font-size: calc(14.5px * var(--fz)); box-shadow: 0 6px 14px -10px rgba(40,60,120,.5); }
[data-theme="dark"] .wk-day { background: rgba(10,14,28,.66); border-color: rgba(255,255,255,.16); }
.wk-day b { font-size: calc(24px * var(--fz)); line-height: 1.1; } .wk-day i { position: absolute; bottom: 6px; width: 8px; height: 8px; border-radius: 50%; background: #2f7bff; }
.wk-day.today { border-color: #2f7bff; }
.wk-day.on { background: linear-gradient(160deg, #2468ee, #1648c4); border-color: transparent; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35); } .wk-day.on i { background: #fff; }
.ag-sub { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; } .ag-sub h3 { font-size: calc(22px * var(--fz)); }
.ag-list { display: grid; gap: 10px; margin-bottom: 18px; grid-template-columns: minmax(0, 1fr); }
.ag-row { --c: #2f7bff; display: grid; grid-template-columns: 62px 6px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 22px; background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.95); box-shadow: 0 8px 20px -14px rgba(40,60,120,.5); }
[data-theme="dark"] .ag-row { background: rgba(10,14,28,.72); border-color: rgba(255,255,255,.14); }
.ag-recompra { --c: #f59e0b; } .ag-seg { --c: #2f7bff; } .ag-venta { --c: #e5484d; } .ag-afil { --c: #8b5cf6; }
.ag-when { font-weight: 700; font-size: calc(15px * var(--fz)); text-align: center; line-height: 1.2; } .ag-when.late { color: #c1121f; } [data-theme="dark"] .ag-when.late { color: #ff9aa2; }
.ag-bar { align-self: stretch; width: 6px; border-radius: 6px; background: var(--c); }
.ag-main { display: flex; align-items: center; gap: 12px; min-width: 0; text-align: left; border-radius: 14px; color: inherit; }
.ag-av { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: calc(22px * var(--fz)); color: #fff; background: var(--c); }
.ag-txt { display: grid; gap: 4px; justify-items: start; min-width: 0; } .ag-txt b { font-size: calc(18px * var(--fz)); overflow-wrap: anywhere; } .ag-txt small { color: var(--muted); font-size: calc(15px * var(--fz)); overflow-wrap: anywhere; }
.ag-chip { gap: 6px; font-weight: 700; border: 0; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.ag-recompra .ag-chip { color: #92560a; } .ag-venta .ag-chip { color: #b3262c; } .ag-afil .ag-chip { color: #6d28d9; } .ag-seg .ag-chip { color: #1648c4; }
[data-theme="dark"] .ag-recompra .ag-chip { color: #ffc66b; } [data-theme="dark"] .ag-venta .ag-chip { color: #ff9aa2; } [data-theme="dark"] .ag-afil .ag-chip { color: #cdb4ff; } [data-theme="dark"] .ag-seg .ag-chip { color: #9fc4ff; }
.ag-quick { display: flex; gap: 8px; }
.call-btn { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #2468ee; box-shadow: 0 6px 12px -6px rgba(36,104,238,.8); } .call-btn:hover { background: #1648c4; }
.ag-quick .wa-btn { width: 52px; height: 52px; }
@media (max-width: 600px) {
  .ag-row { grid-template-columns: 56px 6px minmax(0, 1fr); row-gap: 8px; } .ag-quick { grid-column: 3; }
}
/* Calendario del mes */
.mcal { padding: 14px; }
.mc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; } .mc-head h3 { font-size: calc(22px * var(--fz)); }
.mc-nav { display: flex; align-items: center; gap: 4px; }
.mc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mc-wd { text-align: center; color: var(--muted); font-weight: 700; font-size: calc(14px * var(--fz)); padding: 6px 0; }
.mc-day { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 52px; border-radius: 14px; font-size: calc(17px * var(--fz)); color: var(--text); }
.mc-day:hover { background: rgba(31,95,224,.1); } .mc-day.today b { color: #1f5fe0; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 3px; }
.mc-day.on { background: linear-gradient(160deg, #2468ee, #1648c4); color: #fff; } .mc-day.on b { color: #fff; text-decoration: none; }
.mc-dots { display: flex; gap: 3px; min-height: 8px; } .mc-dots i { width: 8px; height: 8px; border-radius: 50%; } .mc-day.on .mc-dots i { outline: 2px solid #fff; }
@media (max-width: 380px) { .mcal { padding: 8px 4px; } .mc-day { font-size: calc(15px * var(--fz)); } }
.ag-top { flex-wrap: wrap; } .ag-top > div { min-width: 0; flex: 1 1 160px; }
.ag-main { width: 100%; } .ag-txt, .ag-txt b, .ag-txt small { min-width: 0; max-width: 100%; }
.ag-chip { white-space: normal; text-align: left; }
.ag-row { min-width: 0; } .ag-row > * { min-width: 0; }
.ag-main { flex: 1; min-width: 0; overflow: hidden; }
.ag-txt { flex: 1 1 0; grid-template-columns: minmax(0, 1fr); justify-items: stretch; }
.ag-txt .chip { justify-self: start; }
@media (max-width: 400px) { .ag-av { display: none; } .ag-row { grid-template-columns: 52px 6px minmax(0, 1fr); gap: 10px; padding: 12px 10px; } .ag-chip { max-width: 100%; } }

/* Formulario de producto: precios en pareja, cantidad con + y − */
.fld-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.pair-item { display: flex; gap: 10px; align-items: flex-start; min-width: 0; } .pair-item + .pair-item { border-left: 1px solid var(--line); padding-left: 12px; }
.pair-item .fld-ico { width: 44px; height: 44px; }
.money-in { position: relative; display: block; } .money-in i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-weight: 700; color: var(--muted); } .money-in .input { padding-left: 34px; }
@media (max-width: 520px) { .fld-pair { grid-template-columns: minmax(0, 1fr); } .pair-item + .pair-item { border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; } }
.stepper { display: flex; align-items: center; gap: 8px; max-width: 280px; }
.stepper .input { text-align: center; font-weight: 700; font-size: calc(20px * var(--fz)); min-width: 0; }
.step-btn { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: calc(28px * var(--fz)); line-height: 1; font-weight: 700; color: var(--accent-strong); background: rgba(31,95,224,.12); border: 2px solid rgba(31,95,224,.35); }
.step-btn:hover { background: rgba(31,95,224,.22); }
.stepper input[type=number]::-webkit-outer-spin-button, .stepper input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } .stepper input[type=number] { -moz-appearance: textfield; }
.modal footer { gap: 10px; } .modal footer .btn { flex: 1 1 150px; }

/* Formulario de cliente: contador de notas y botón verde de venta */
.counter { justify-self: end; color: var(--muted); font-size: calc(14px * var(--fz)); }
.btn.ok { background: #dcf7e6; color: #0b6b33; border: 2px solid #8fdcad; }
.btn.ok:hover { background: #c9f1d9; }
[data-theme="dark"] .btn.ok { background: rgba(60,200,120,.2); color: #9ff0bf; border-color: rgba(60,200,120,.5); }
textarea.input { min-height: 96px; }

/* Pantalla Hoy: pestañas, filas con WhatsApp y Llamar, tarjeta de pendientes */
.hr-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .hr-head > div { flex: 1 1 150px; min-width: 0; }
.hr-date { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 18px; font-weight: 700; font-size: calc(16px * var(--fz)); background: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.9); color: var(--text); }
[data-theme="dark"] .hr-date { background: rgba(10,14,28,.66); border-color: rgba(255,255,255,.16); }
.hr-plus { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, #2468ee, #1648c4); box-shadow: 0 10px 18px -8px rgba(36,104,238,.8); }
.hr-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 10px; }
.hr-tab { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 60px; padding: 8px 12px; border-radius: 20px; font-weight: 700; font-size: calc(17px * var(--fz)); color: var(--text); text-decoration: none; background: rgba(255,255,255,.85); border: 2px solid rgba(255,255,255,.95); box-shadow: 0 8px 18px -12px rgba(40,60,120,.5); }
[data-theme="dark"] .hr-tab { background: rgba(10,14,28,.66); border-color: rgba(255,255,255,.16); }
.hr-tab b { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 15px; display: inline-grid; place-items: center; color: #fff; font-size: calc(15px * var(--fz)); background: #2468ee; }
.hr-tab--pend b { background: #e5484d; } .hr-tab--hoy svg { color: #f59e0b; } .hr-tab--pend svg { color: #e5484d; } .hr-tab--cal svg { color: #2468ee; }
.hr-tab.on { border-color: #2f7bff; background: #e3eeff; } [data-theme="dark"] .hr-tab.on { background: rgba(80,140,255,.28); }
.hr-sub h3 { font-size: calc(26px * var(--fz)); }
.hr-types .chip { min-height: 44px; padding: 6px 16px; font-size: calc(16px * var(--fz)); font-weight: 700; white-space: normal; }
.hr-list { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.hr { --c: #2f7bff; display: grid; gap: 8px; padding: 12px 14px; border-radius: 24px; min-width: 0; background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.95); box-shadow: 0 8px 20px -14px rgba(40,60,120,.5); animation: rise .35s var(--ease) both; }
[data-theme="dark"] .hr { background: rgba(10,14,28,.72); border-color: rgba(255,255,255,.14); }
.hr-top { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; min-height: 64px; text-align: left; color: inherit; border-radius: 16px; }
.hr-txt { display: grid; gap: 3px; flex: 1 1 0; min-width: 0; } .hr-txt b { font-size: calc(19px * var(--fz)); overflow-wrap: anywhere; } .hr-txt small { color: var(--muted); font-size: calc(15px * var(--fz)); overflow-wrap: anywhere; }
.hr-ph { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text) !important; } .hr-ph svg { color: #19a24a; flex: none; }
.hr-bot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hr-tags { display: grid; gap: 4px; justify-items: start; min-width: 0; flex: 1 1 120px; }
.hr-rel { font-style: normal; font-weight: 700; font-size: calc(15px * var(--fz)); color: var(--muted); } .hr-rel.late { color: #c1121f; } [data-theme="dark"] .hr-rel.late { color: #ff9aa2; }
.hr .ochev.ochev { transform: none; } .hr.open .ochev { transform: rotate(180deg); }
.hr-body { display: none; flex-wrap: wrap; gap: 8px; padding-top: 4px; border-top: 1px solid var(--line); } .hr.open .hr-body { display: flex; } .hr-body .btn { flex: 1 1 auto; }
.hr-pend { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 12px 18px; text-align: left; border-radius: 24px; color: #7a1030; background: #ffe3ea; border: 2px solid #ffb3c4; }
.hr-pend span { flex: 1 1 0; min-width: 0; display: grid; gap: 2px; } .hr-pend b { font-size: calc(21px * var(--fz)); } .hr-pend small { font-size: calc(15px * var(--fz)); color: #5b1a2a; }
.hr-pend > svg:first-child { color: #e5484d; flex: none; }
[data-theme="dark"] .hr-pend { color: #ffd0da; background: rgba(229,72,77,.22); border-color: rgba(255,120,140,.5); } [data-theme="dark"] .hr-pend small { color: #ffd0da; }
.hr-sum { border-radius: 24px; background: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.9); } [data-theme="dark"] .hr-sum { background: rgba(10,14,28,.66); border-color: rgba(255,255,255,.16); }
.hr-sum summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 60px; padding: 8px 18px; font-weight: 700; font-size: calc(19px * var(--fz)); border-radius: 24px; }
.hr-sum summary::-webkit-details-marker { display: none; } .hr-sum summary::after { content: ''; width: 12px; height: 12px; border: solid currentColor; border-width: 0 3px 3px 0; transform: rotate(45deg); margin: -4px 4px 0 8px; transition: transform .2s; } .hr-sum[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.hr-sum > .stack { padding: 0 12px 14px; }
@media (max-width: 400px) { .hr-top .ag-av { display: none; } .hr { padding: 10px; } }
.hr-lead { font-weight: 700; font-size: calc(19px * var(--fz)); color: var(--muted); }
@media (max-width: 440px) { .hr-head > div { flex: 1 1 100%; } .hr-date { flex: 1 1 0; justify-content: center; } }

/* Formulario de cliente: foto y avatares con foto */
.photo-card { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 22px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.ph-btn { position: relative; flex: none; width: 96px; height: 96px; border-radius: 50%; border: 3px dashed #9db3e6; display: grid; place-items: center; padding: 4px; background: none; }
.ph-circle { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; overflow: hidden; color: #8fa3cf; background: #e6ecf8; } [data-theme="dark"] .ph-circle { background: rgba(255,255,255,.12); }
.ph-circle img, .ag-av img, .cd-av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.ph-plus { position: absolute; right: -2px; bottom: -2px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: calc(26px * var(--fz)); line-height: 1; color: #fff; background: #2468ee; border: 3px solid #fff; }
.ph-txt { display: grid; gap: 4px; justify-items: start; min-width: 0; flex: 1 1 0; } .ph-txt b { font-size: calc(20px * var(--fz)); } .ph-txt span { color: var(--muted); font-size: calc(15px * var(--fz)); }
.ag-av, .cd-av { overflow: hidden; }
@media (max-width: 400px) { .photo-card { gap: 10px; padding: 10px; } .ph-btn { width: 80px; height: 80px; } }
.modal footer .btn.ok { order: 1; } .modal footer .btn.primary { order: 2; }

/* Filtros de clientes dentro de un desplegable */
.cf-box { margin-bottom: 14px; border-radius: 22px; background: rgba(255,255,255,.85); border: 1px solid rgba(255,255,255,.95); box-shadow: 0 8px 18px -12px rgba(40,60,120,.5); }
[data-theme="dark"] .cf-box { background: rgba(10,14,28,.7); border-color: rgba(255,255,255,.16); }
.cf-box summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 60px; padding: 8px 18px; border-radius: 22px; font-size: calc(17px * var(--fz)); }
.cf-box summary::-webkit-details-marker { display: none; }
.cf-box summary > span { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; } .cf-box summary b { overflow-wrap: anywhere; }
.cf-box summary::after { content: ''; flex: none; width: 12px; height: 12px; border: solid currentColor; border-width: 0 3px 3px 0; transform: rotate(45deg); margin: -4px 4px 0 8px; transition: transform .2s; } .cf-box[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.cf-box .cfilters { margin: 0; padding: 0 12px 14px; }

/* Tarjeta de cliente compacta: nombre y teléfono | última compra | estado | WhatsApp */
.crow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-areas: "main last chip wa"; align-items: center; gap: 4px 14px; padding: 10px 14px; margin-bottom: 8px; }
.crow-main { grid-area: main; } .crow-main h4 { line-height: 1.2; } .crow-main p { line-height: 1.25; }
.crow-last { grid-area: last; display: flex; align-items: center; gap: 10px; color: #2468ee; padding-left: 14px; border-left: 1px solid var(--line); font-size: inherit !important; }
.crow-last > span { display: grid; line-height: 1.2; } .crow-last small { color: var(--muted); font-size: calc(14px * var(--fz)); } .crow-last b { color: var(--text); font-size: calc(16px * var(--fz)); }
.crow .chip.st { grid-area: chip; order: 0; justify-self: start; } .crow .wa-btn { grid-area: wa; width: 48px; height: 48px; }
@media (max-width: 640px) {
  .crow { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "main chip wa" "last chip wa"; gap: 2px 10px; padding: 8px 12px; }
  .crow .chip.st { align-self: center; }
  .crow-last { border-left: 0; padding-left: 0; } .crow-last > span { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; } .crow .chip.st { justify-self: end; padding: 3px 12px; } .crow-last svg { width: 18px; height: 18px; }
}
.crow .chip.st { justify-content: center; text-align: center; } @media (min-width: 420px) { .crow .chip.st { min-width: 7.6em; } }
@media (max-width: 400px) { .crow-last .lbl { display: none; } .crow-last { gap: 6px; } }

/* Ficha del cliente: datos en mosaicos compactos */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 8px; padding: 10px; margin-bottom: 12px; }
.info-grid .irow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 16px; background: rgba(255,255,255,.75); min-width: 0; } [data-theme="dark"] .info-grid .irow { background: rgba(255,255,255,.07); }
.info-grid .irow.wide { grid-column: 1 / -1; }
.info-grid .fld-ico { width: 40px; height: 40px; border-radius: 13px; flex: none; }
.irow-t { display: grid; gap: 1px; min-width: 0; flex: 1; } .info-grid .irow-l { flex: none; font-size: calc(13.5px * var(--fz)); color: var(--muted); line-height: 1.2; } .info-grid .irow-v { font-size: calc(16px * var(--fz)); line-height: 1.25; padding: 0; margin: 0; overflow-wrap: anywhere; }
.info-grid .irow:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* Ficha del cliente: resumen arriba y cada dato en su propia tarjeta, una bajo otra */
.cd-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.cd-stat { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 10px; border-radius: 18px; background: linear-gradient(150deg, rgba(47,123,255,.14), rgba(47,123,255,.04)); border: 1px solid rgba(47,123,255,.22); }
.cd-stat .fld-ico { width: 38px; height: 38px; border-radius: 12px; flex: none; }
.cd-stat > span:last-child { display: grid; gap: 1px; min-width: 0; line-height: 1.2; } .cd-stat small { color: var(--muted); font-size: calc(13.5px * var(--fz)); } .cd-stat b { font-size: calc(17px * var(--fz)); overflow-wrap: anywhere; }
.info-card.info-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 0; background: none; border: 0; box-shadow: none; }
.info-stack .irow, .info-stack .irow.wide { grid-column: auto; padding: 9px 12px; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 6px 14px -12px rgba(40,60,120,.5); }
@media (max-width: 340px), (max-width: 480px) and (min-resolution: 1dppx) { .cd-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
[data-fs="xl"] .cd-stats { grid-template-columns: minmax(0, 1fr); }
.cd-stat.wide { grid-column: 1 / -1; }

/* Ficha del cliente como la maqueta: cabecera, información en filas de color e historial en línea de tiempo */
.cd-head { gap: 16px; margin-bottom: 14px; } .cd-head .cd-av { width: 88px; height: 88px; flex: none; }
.cd-id { flex: 1 1 0; min-width: 0; display: grid; gap: 8px; justify-items: start; } .cd-id h2 { font-size: calc(28px * var(--fz)); line-height: 1.1; overflow-wrap: anywhere; }
.cd-actions .qa { border: 0; }
.cd-actions .qa-wa { background: #13902f; color: #fff; } .cd-actions .qa-call { background: #0a66f2; color: #fff; } .cd-actions .qa-edit { background: #e4d6fb; color: #6d28d9; }
[data-theme="dark"] .cd-actions .qa-wa { background: #13902f; color: #fff; } [data-theme="dark"] .cd-actions .qa-call { background: #1f6fe0; color: #fff; } [data-theme="dark"] .cd-actions .qa-edit { background: rgba(160,110,255,.3); color: #e6d9ff; }
@media (min-width: 520px) { .cd-actions .qa { flex-direction: row; min-height: 60px; gap: 10px; } }
.ci-card { padding: 12px; margin-bottom: 14px; border-radius: 26px; background: rgba(255,255,255,.92); border: 1px solid rgba(255,255,255,.95); box-shadow: 0 10px 24px -16px rgba(40,60,120,.5); }
[data-theme="dark"] .ci-card { background: rgba(10,14,28,.7); border-color: rgba(255,255,255,.14); }
.ci-head { display: flex; align-items: center; gap: 12px; margin: 2px 2px 12px; } .ci-head h4 { flex: 1 1 0; min-width: 0; font-size: calc(22px * var(--fz)); }
.ci-hico { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(160deg, #2f7bff, #1648c4); }
.ci-list, .hs-list { display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr); }
.ci-row { display: grid; grid-template-columns: 48px minmax(0, 38fr) minmax(0, 62fr); align-items: center; gap: 12px; padding: 8px 10px; min-height: 60px; border-radius: 18px; background: #eaf2ff; border: 1px solid #cfe0fb; }
.ci-row:nth-child(even) { background: #dbe9ff; }
[data-theme="dark"] .ci-row { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); } [data-theme="dark"] .ci-row:nth-child(even) { background: rgba(80,140,255,.18); }
.ci-row .fld-ico { width: 48px; height: 48px; color: #fff; } .ci-row .fld-ico.c-b { background: #2468ee; } .ci-row .fld-ico.c-g { background: #19a24a; } .ci-row .fld-ico.c-v { background: #8b5cf6; } .ci-row .fld-ico.c-a { background: #f59e0b; } .ci-row .fld-ico.c-r { background: #f0457a; }
.ci-l { font-size: calc(16px * var(--fz)); color: var(--text); } .ci-v { font-size: calc(17px * var(--fz)); overflow-wrap: anywhere; }
@media (max-width: 520px) { .ci-row { grid-template-columns: 48px minmax(0, 1fr); row-gap: 0; } .ci-row .fld-ico { grid-row: 1 / 3; } .ci-l { color: var(--muted); font-size: calc(14.5px * var(--fz)); } }
.hs-total { flex: none; padding: 6px 14px; border-radius: 16px; font-weight: 700; font-size: calc(16px * var(--fz)); color: #0b4fc4; background: #dbe9ff; } [data-theme="dark"] .hs-total { color: #bcd6ff; background: rgba(80,140,255,.25); }
.hs-list { position: relative; padding-left: 26px; } .hs-list::before { content: ''; position: absolute; left: 9px; top: 24px; bottom: 24px; width: 3px; border-radius: 3px; background: #4a90ff; }
.hs-row { position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 10px 12px; min-height: 60px; border-radius: 18px; background: #eaf2ff; border: 1px solid #cfe0fb; }
.hs-row:nth-child(even) { background: #dbe9ff; } [data-theme="dark"] .hs-row { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); } [data-theme="dark"] .hs-row:nth-child(even) { background: rgba(80,140,255,.18); }
.hs-dot { position: absolute; left: -26px; top: 50%; margin-top: -9px; width: 18px; height: 18px; border-radius: 50%; background: #2f7bff; border: 3px solid #fff; box-shadow: 0 0 0 1px #9db3e6; } .hs-dot.first { background: #19a24a; } [data-theme="dark"] .hs-dot { border-color: #0e1424; }
.hs-when { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; } .hs-when b { font-size: calc(24px * var(--fz)); line-height: 1; } .hs-when small { font-size: calc(14px * var(--fz)); color: var(--muted); }
.hs-what { font-size: calc(16px * var(--fz)); overflow-wrap: anywhere; min-width: 0; }
.hs-price { padding: 6px 12px; border-radius: 14px; font-weight: 700; font-size: calc(16px * var(--fz)); background: #cfe0fb; color: #0b3a8f; white-space: nowrap; } [data-theme="dark"] .hs-price { background: rgba(80,140,255,.3); color: #e1ecff; }
@media (max-width: 520px) { .hs-row { grid-template-columns: minmax(0, 1fr) auto; } .hs-when { grid-column: 1 / -1; } .hs-what { grid-column: 1; } .hs-price { grid-column: 2; } }
@media (max-width: 360px) { .cd-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cd-actions .qa:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* Seguimiento de interesados: filas como las de Clientes, con la etapa a la izquierda de WhatsApp */
.pgroup { display: flex; align-items: center; justify-content: space-between; } .pgroup span { min-width: 30px; text-align: center; padding: 0 9px; border-radius: 14px; background: rgba(31,95,224,.16); }
.prow { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "main stage wa"; align-items: center; gap: 6px 12px; padding: 10px 14px; }
.prow .crow-main { display: grid; gap: 4px; justify-items: start; min-width: 0; } .prow .crow-main h4 { font-size: calc(18px * var(--fz)); }
.prow-int { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: calc(15px * var(--fz)); overflow-wrap: anywhere; } .prow-int svg { flex: none; color: #8b5cf6; }
.prow-chips { display: flex; flex-wrap: wrap; gap: 6px; } .prow-chips .chip { padding: 3px 10px; font-weight: 700; }
.pst { grid-area: stage; min-width: 0; } .pst .dd { width: 100%; max-width: 142px; }
.pst .dd-btn { min-height: 44px; border-radius: 22px; padding: 4px 10px 4px 14px; font-weight: 700; font-size: calc(15px * var(--fz)); text-align: left; white-space: normal; line-height: 1.15; border: 0; color: #1648c4; background: #dbe9ff; }
.pst-nuevo .dd-btn { color: #1648c4; background: #dbe9ff; } .pst-contactado .dd-btn { color: #6d28d9; background: #e9defc; } .pst-interesado .dd-btn { color: #8a4a05; background: #ffe9c7; } .pst-seguimiento .dd-btn { color: #0b6b5f; background: #d2f3ec; } .pst-cierre .dd-btn { color: #0b6b33; background: #d3f5df; }
[data-theme="dark"] .pst-nuevo .dd-btn { color: #bcd6ff; background: rgba(80,140,255,.28); } [data-theme="dark"] .pst-contactado .dd-btn { color: #dac7ff; background: rgba(160,110,255,.28); } [data-theme="dark"] .pst-interesado .dd-btn { color: #ffd9a0; background: rgba(245,158,11,.25); } [data-theme="dark"] .pst-seguimiento .dd-btn { color: #9ff0e0; background: rgba(20,184,166,.25); } [data-theme="dark"] .pst-cierre .dd-btn { color: #9ff0bf; background: rgba(60,200,120,.25); }
.prow .wa-btn { grid-area: wa; }
@media (max-width: 400px) { .prow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main main" "stage wa"; } .pst .dd { max-width: none; } }
.pst .dd-label { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; } .pst .dd-btn { height: auto; }

/* Seguimiento: nombre y etapa arriba, interés y chips debajo a todo el ancho */
.prow { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "name stage wa" "info info info"; align-items: center; gap: 6px 12px; }
.prow-name { grid-area: name; font-size: calc(19px * var(--fz)); line-height: 1.2; overflow-wrap: anywhere; min-width: 0; }
.prow-info { grid-area: info; display: grid; gap: 6px; justify-items: start; min-width: 0; padding-top: 6px; border-top: 1px solid var(--line); width: 100%; }
.prow-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pst { display: grid; gap: 2px; justify-items: stretch; } .pst::before { content: 'Etapa'; font-size: calc(12.5px * var(--fz)); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding-left: 12px; }
.pst .dd { max-width: 164px; } .pst .dd-label { overflow-wrap: normal; word-break: normal; hyphens: none; }
@media (max-width: 400px) { .prow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name name" "info info" "stage wa"; } .pst .dd { max-width: none; } }

/* Interesados de compra: sin etapa */
.prow--nostage { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name wa" "info info"; }
@media (max-width: 400px) { .prow--nostage { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name wa" "info info"; } }

/* Ficha del interesado: historial de contactos sin precio */
.hs-row--np { grid-template-columns: 84px minmax(0, 1fr); } @media (max-width: 520px) { .hs-row--np { grid-template-columns: minmax(0, 1fr); } .hs-row--np .hs-what { grid-column: 1; } }

/* Indicadores compactos (Inventario): icono a la izquierda, rótulo y cifra, y la nota debajo */
.grid.kpis-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kpis-sm > .kpi { min-height: 0; padding: 10px 12px; gap: 0 10px; align-items: center; grid-template-columns: 40px minmax(0, 1fr); grid-template-areas: "ico label" "ico value" "note note"; border-radius: 20px; }
.kpis-sm .kpi-ico { grid-area: ico; width: 40px; height: 40px; margin: 0; border-radius: 12px; }
.kpis-sm .kpi small { grid-area: label; font-size: calc(14px * var(--fz)); line-height: 1.2; }
.kpis-sm .kpi strong { grid-area: value; font-size: calc(24px * var(--fz)); line-height: 1.15; overflow-wrap: anywhere; }
.kpis-sm .kpi em { grid-area: note; font-size: calc(13.5px * var(--fz)); line-height: 1.2; margin-top: 4px; }
@media (max-width: 400px) { .kpis-sm > .kpi { grid-template-columns: minmax(0, 1fr); grid-template-areas: "label" "value" "note"; } .kpis-sm .kpi-ico { display: none; } .kpis-sm .kpi strong { font-size: calc(22px * var(--fz)); } }
[data-fs="xl"] .grid.kpis-sm { grid-template-columns: minmax(0, 1fr); }
.kpis-sm > .kpi { grid-template-columns: 32px minmax(0, 1fr); grid-template-areas: "ico label" "value value" "note note"; gap: 2px 8px; }
.kpis-sm .kpi-ico { width: 32px; height: 32px; border-radius: 10px; } .kpis-sm .kpi-ico svg { width: 18px; height: 18px; }
.kpis-sm .kpi strong { overflow-wrap: normal; white-space: nowrap; }
@media (max-width: 400px) { .kpis-sm > .kpi { grid-template-columns: 32px minmax(0, 1fr); grid-template-areas: "ico label" "value value" "note note"; } .kpis-sm .kpi-ico { display: grid; } }

/* Indicadores de Inventario (Productos y Stock bajo): tarjetas de vidrio con borde de color y icono en baldosa blanca */
.ik-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.ik { --c: #16a34a; --bg: rgba(220,252,231,.9); display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: "ico t" "ico n" "ico s"; align-items: center; column-gap: 12px; padding: 12px 14px; border-radius: 26px; border: 2.5px solid color-mix(in srgb, var(--c) 45%, white); background: linear-gradient(135deg, #fff 30%, var(--bg)); box-shadow: 0 12px 26px -16px color-mix(in srgb, var(--c) 70%, transparent); min-width: 0; }
.ik--blue { --c: #2f7bff; --bg: rgba(219,234,254,.95); }
.ik-ico { grid-area: ico; width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: #fff; box-shadow: 0 8px 18px -10px rgba(40,60,120,.55), inset 0 0 0 1px rgba(255,255,255,.9); color: #f59e0b; }
.ik-img { width: 46px; height: 46px; object-fit: contain; }
.ik-t { grid-area: t; font-size: calc(19px * var(--fz)); line-height: 1.15; color: #14213d; }
.ik-n { grid-area: n; font-size: calc(38px * var(--fz)); line-height: 1.05; font-weight: 700; color: var(--c); }
.ik-s { grid-area: s; font-size: calc(15px * var(--fz)); line-height: 1.2; color: #4a5a7a; overflow-wrap: anywhere; }
[data-theme="dark"] .ik { background: linear-gradient(135deg, rgba(10,14,28,.85) 30%, color-mix(in srgb, var(--c) 28%, rgba(10,14,28,.85))); border-color: color-mix(in srgb, var(--c) 65%, transparent); }
[data-theme="dark"] .ik-t { color: #fff; } [data-theme="dark"] .ik-s { color: #c8d4ee; } [data-theme="dark"] .ik--green .ik-n { color: #6ee7a0; } [data-theme="dark"] .ik--blue .ik-n { color: #8fbaff; }
@media (max-width: 560px) { .ik { grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "ico t" "n n" "s s"; row-gap: 2px; padding: 10px 12px; column-gap: 8px; border-radius: 22px; }
  .ik-ico { width: 44px; height: 44px; border-radius: 14px; } .ik-img { width: 32px; height: 32px; } .ik-ico svg { width: 24px; height: 24px; } .ik-t { font-size: calc(17px * var(--fz)); } .ik-n { font-size: calc(32px * var(--fz)); } }
[data-fs="xl"] .ik-grid { grid-template-columns: minmax(0, 1fr); }

.ik-warn { width: 44px; height: 44px; display: block; } @media (max-width: 560px) { .ik-warn { width: 32px; height: 32px; } }
@media (max-width: 380px) { .ik { grid-template-columns: 38px minmax(0, 1fr); padding: 10px; column-gap: 6px; } .ik-ico { width: 38px; height: 38px; border-radius: 12px; } .ik-img { width: 28px; height: 28px; } .ik-warn { width: 26px; height: 26px; } .ik-t { font-size: calc(15.5px * var(--fz)); overflow-wrap: anywhere; min-width: 0; } .ik-n { font-size: calc(30px * var(--fz)); } }
@media (max-width: 380px) { .ik { grid-template-areas: "t t" "ico n" "s s"; align-items: center; row-gap: 4px; } .ik-t { overflow-wrap: normal; } .ik-n { justify-self: start; } }

/* Inventario: sin iconos; la cifra a la izquierda y el título a su derecha, la nota debajo */
.ik-grid .ik { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "n t" "s s"; align-items: center; column-gap: 12px; row-gap: 2px; padding: 12px 16px; }
.ik-grid .ik-n { font-size: calc(40px * var(--fz)); } .ik-grid .ik-t { overflow-wrap: normal; font-size: calc(19px * var(--fz)); }
@media (max-width: 380px) { .ik-grid .ik { padding: 10px 12px; column-gap: 8px; } .ik-grid .ik-n { font-size: calc(32px * var(--fz)); } .ik-grid .ik-t { font-size: calc(16px * var(--fz)); } }

/* Inventario: tarjetas más bajas */
.ik-grid { gap: 10px; margin-bottom: 10px; }
.ik-grid .ik { padding: 6px 12px 8px; row-gap: 0; column-gap: 8px; border-width: 2px; border-radius: 20px; align-items: baseline; }
.ik-grid .ik-n { font-size: calc(30px * var(--fz)); line-height: 1.05; }
.ik-grid .ik-t { font-size: calc(17px * var(--fz)); line-height: 1.1; align-self: center; }
.ik-grid .ik-s { font-size: calc(14px * var(--fz)); line-height: 1.15; }
@media (max-width: 380px) { .ik-grid .ik { padding: 6px 10px 8px; } .ik-grid .ik-n { font-size: calc(26px * var(--fz)); } .ik-grid .ik-t { font-size: calc(15px * var(--fz)); } .ik-grid .ik-s { font-size: calc(13.5px * var(--fz)); } }

/* Inventario como Hoy: cada producto en su tarjeta; a la derecha el estado y las unidades y el menú «···» */
#list:has(.pr) { background: none; border: 0; box-shadow: none; padding: 0; backdrop-filter: none; -webkit-backdrop-filter: none; display: grid; gap: 12px; }
.pr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-radius: 24px; cursor: pointer; background: rgba(255,255,255,.92); border: 1px solid rgba(255,255,255,.95); box-shadow: 0 8px 20px -14px rgba(40,60,120,.5); min-width: 0; }
[data-theme="dark"] .pr { background: rgba(10,14,28,.72); border-color: rgba(255,255,255,.14); }
.pr:hover { border-color: var(--accent); }
.pr-info { display: grid; gap: 3px; min-width: 0; } .pr-info h4 { font-size: calc(18px * var(--fz)); line-height: 1.2; overflow-wrap: anywhere; } .pr-info small { color: var(--muted); font-size: calc(14.5px * var(--fz)); overflow-wrap: anywhere; }
.pr-price { font-weight: 700; font-size: calc(17px * var(--fz)); color: #0b4fc4; } [data-theme="dark"] .pr-price { color: #9fc4ff; }
.pr-stock { display: grid; justify-items: center; gap: 4px; }
.pr-chip { padding: 4px 12px; border-radius: 14px; font-weight: 700; font-size: calc(14.5px * var(--fz)); white-space: nowrap; }
.pr-chip--ok { color: #0b6b33; background: #d3f5df; } .pr-chip--low { color: #8a4a05; background: #ffe9c7; } .pr-chip--out { color: #b3262c; background: #ffd9dc; }
[data-theme="dark"] .pr-chip--ok { color: #9ff0bf; background: rgba(60,200,120,.25); } [data-theme="dark"] .pr-chip--low { color: #ffd9a0; background: rgba(245,158,11,.25); } [data-theme="dark"] .pr-chip--out { color: #ffb3b8; background: rgba(229,72,77,.3); }
.pr-qty { font-size: calc(15px * var(--fz)); color: var(--muted); white-space: nowrap; } .pr-qty b { font-size: calc(22px * var(--fz)); color: var(--text); }
.pr-more { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #3b4a6b; background: #eaf0ff; } .pr-more:hover { background: #dbe6ff; }
[data-theme="dark"] .pr-more { color: #dbe6ff; background: rgba(255,255,255,.12); }
@media (max-width: 400px) { .pr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "info more" "stock stock"; } .pr-info { grid-area: info; } .pr-more { grid-area: more; } .pr-stock { grid-area: stock; grid-auto-flow: column; justify-content: start; align-items: center; gap: 10px; } }
@media (max-width: 400px) { .pr-stock { display: flex; flex-wrap: wrap; } .pr-chip, .pr-qty { white-space: normal; } .pr-more { width: 44px; height: 44px; } }

/* Inventario: botón «Filtros» junto a «Nuevo producto» y su panel de tipos */
.inv-actions { display: flex; gap: 10px; flex-wrap: wrap; flex: 1 1 auto; } .inv-actions .btn { flex: 1 1 auto; min-width: 0; }
.inv-fbtn { justify-content: center; } .inv-fbtn span { overflow-wrap: anywhere; } .inv-fbtn.on { background: #2468ee; color: #fff; }
.inv-fbtn[aria-expanded="true"] svg:last-child { transform: rotate(180deg); }
.inv-fpanel { margin: 0 0 14px; padding: 12px; border-radius: 22px; background: rgba(255,255,255,.85); border: 1px solid rgba(255,255,255,.95); box-shadow: 0 8px 18px -12px rgba(40,60,120,.5); }
[data-theme="dark"] .inv-fpanel { background: rgba(10,14,28,.7); border-color: rgba(255,255,255,.16); }
.inv-fpanel .chip { min-height: 44px; padding: 6px 16px; font-size: calc(16px * var(--fz)); font-weight: 700; white-space: normal; }

/* Botón de filtros: cuadrado a la derecha de «Nuevo producto», siempre en la misma fila */
.inv-actions { flex-wrap: nowrap; align-items: stretch; } .inv-actions .btn.primary { flex: 1 1 0; min-width: 0; }
.inv-fbtn { flex: none; width: 56px; min-height: 56px; border-radius: 18px; display: grid; place-items: center; padding: 0; color: #1648c4; background: #dbe9ff; border: 2px solid #9db8f5; }
.inv-fbtn:hover { background: #c9dcff; } .inv-fbtn.on { color: #fff; background: #2468ee; border-color: #1648c4; } .inv-fbtn[aria-expanded="true"] { box-shadow: 0 0 0 3px rgba(36,104,238,.35); }
[data-theme="dark"] .inv-fbtn { color: #bcd6ff; background: rgba(80,140,255,.22); border-color: rgba(80,140,255,.5); } [data-theme="dark"] .inv-fbtn.on { color: #fff; background: #2468ee; }

/* Finanzas: panel de filtros por categoría (reutiliza el botón cuadrado y el panel de Inventario) */
.fin-actions { flex-wrap: nowrap; align-items: stretch; } .fin-actions .btn { min-width: 0; }
.ff-label { margin: 0 0 8px; font-weight: 700; font-size: calc(14px * var(--fz)); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); } .inv-fpanel .chips + .ff-label { margin-top: 14px; }
@media (max-width: 520px) { .fin-actions { flex-wrap: wrap; } }

/* Finanzas: resumen del dinero (Le quedó / Entró / Salió / Ganancia) */
.fm { margin-bottom: 20px; padding: 0; overflow: hidden; display: grid; gap: 0; }
.fm small { display: block; font-size: calc(16px * var(--fz)); font-weight: 700; }
.fm strong { display: block; font-size: calc(30px * var(--fz)); line-height: 1.1; font-weight: 800; white-space: nowrap; }
.fm em { display: block; font-style: normal; font-size: calc(15px * var(--fz)); font-weight: 600; }
.fm-ico { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; background: #fff; color: #0f1d3a; }
.fm-top { display: flex; align-items: center; gap: 14px; padding: 16px; color: #fff; }
.fm-top.pos { background: linear-gradient(135deg, #0b7a3b, #0a5a30); }
.fm-top.neg { background: linear-gradient(135deg, #b3261e, #7f1710); }
.fm-top .fm-ico { width: 52px; height: 52px; }
.fm-top.pos .fm-ico { color: #0a5a30; } .fm-top.neg .fm-ico { color: #7f1710; }
.fm-top strong { font-size: calc(36px * var(--fz)); }
.fm-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.fm-in, .fm-out { display: grid; gap: 4px; padding: 14px 16px; justify-items: start; }
.fm-in { background: #e3f6e9; color: #0a4d27; border-right: 1px solid rgba(15, 29, 58, .12); }
.fm-in .fm-ico { background: #0b7a3b; color: #fff; }
.fm-out { background: #fde8e6; color: #8a1a12; }
.fm-out .fm-ico { background: #b3261e; color: #fff; }
.fm-in strong, .fm-out strong { font-size: calc(26px * var(--fz)); }
.fm-gain { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 14px 16px; background: #eaf0ff; color: #12286b; border-top: 1px solid rgba(15, 29, 58, .12); }
.fm-gain > div { flex: 1 1 140px; min-width: 0; }
.fm-gain strong { font-size: calc(24px * var(--fz)); }
.fm-gain em { flex: 1 1 100%; padding-left: 56px; }
[data-theme="dark"] .fm-in { background: #123a24; color: #c9f2d6; border-color: rgba(255, 255, 255, .14); }
[data-theme="dark"] .fm-out { background: #4a1a16; color: #ffd6d2; }
[data-theme="dark"] .fm-gain { background: #172a5c; color: #d8e3ff; border-color: rgba(255, 255, 255, .14); }
.fm-in, .fm-out { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 8px; }
.fm-in .fm-ico, .fm-out .fm-ico { width: 36px; height: 36px; border-radius: 11px; }
.fm-in strong, .fm-out strong, .fm-in em, .fm-out em { grid-column: 1 / -1; }
.fm-in strong, .fm-out strong { font-size: calc(22px * var(--fz)); }
.fm-gain .fm-ico { width: 36px; height: 36px; border-radius: 11px; } .fm-gain em { padding-left: 0; }
.fm-top strong { font-size: calc(32px * var(--fz)); }
[data-fs="xl"] .fm-two { grid-template-columns: minmax(0, 1fr); } [data-fs="xl"] .fm-in { border-right: 0; border-bottom: 1px solid rgba(15, 29, 58, .12); }
.fm-top > div { min-width: 0; }
[data-fs="xl"] .fm-top strong { font-size: calc(26px * var(--fz)); } [data-fs="xl"] .fm-gain strong { font-size: calc(20px * var(--fz)); }

/* Finanzas: gráficos deslizables (barras / salidas por categoría) */
.fch { overflow: hidden; }
.swp { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: 12px; }
.swp::-webkit-scrollbar { display: none; }
.swp:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.swp-s { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
.swp-dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.swp-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--line, #c9d3e6); transition: width .2s var(--ease), background .2s; }
.swp-dots span.on { width: 26px; background: var(--accent); }
.swp-hint { margin: 6px 0 0; text-align: center; font-size: calc(14px * var(--fz)); font-weight: 600; color: var(--muted); }
.cd-wrap { display: grid; gap: 14px; justify-items: center; }
.cd-wrap svg { width: 190px; height: 190px; }
.cd-list { display: grid; gap: 12px; width: 100%; }
.cd-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
.cd-l { grid-column: 1 / -1; display: flex; align-items: center; gap: 9px; font-size: calc(16px * var(--fz)); font-weight: 600; }
.cd-l i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.cd-l span { min-width: 0; overflow-wrap: break-word; } .cd-l b { margin-left: auto; font-weight: 800; }
.cd-bar { height: 8px; border-radius: 99px; background: rgba(60, 90, 160, .16); overflow: hidden; } .cd-bar span { display: block; height: 100%; border-radius: 99px; background: #3b78e7; }
.cd-row small { font-size: calc(14px * var(--fz)); font-weight: 600; color: var(--muted); white-space: nowrap; }
@media (min-width: 700px) { .cd-wrap { grid-template-columns: auto minmax(0, 1fr); justify-items: stretch; align-items: center; gap: 28px; } }

/* Gráfico deslizable más compacto y minimalista */
.swp { align-items: flex-start; transition: height .25s var(--ease); }
.swp-s .card-head { margin-bottom: 6px; }
.cd-wrap { gap: 10px; } .cd-wrap svg { width: 132px; height: 132px; }
.cd-list { gap: 10px; }
.cd-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; }
.cd-l { font-size: calc(15px * var(--fz)); font-weight: 600; gap: 8px; }
.cd-l i { width: 10px; height: 10px; }
.cd-l span { flex: 1; min-width: 0; }
.cd-l small { margin-left: auto; font-size: calc(14px * var(--fz)); font-weight: 600; color: var(--muted); white-space: nowrap; }
.cd-l b { margin-left: 0; min-width: 3.2ch; text-align: right; font-weight: 800; }
.cd-bar { height: 5px; background: rgba(60, 90, 160, .12); }
.cd-bar span { background: #3b78e7; }

/* Balance semanal */
.wb { display: grid; gap: 12px; }
.wb-row { display: grid; gap: 5px; }
.wb-l { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: calc(16px * var(--fz)); font-weight: 600; }
.wb-l span { min-width: 0; } .wb-l b { white-space: nowrap; font-weight: 800; }
.wb-row.pos .wb-l b { color: #0b7a3b; } .wb-row.neg .wb-l b { color: #b3261e; }
.wb-bar { height: 8px; border-radius: 99px; background: rgba(60, 90, 160, .12); overflow: hidden; }
.wb-bar span { display: block; height: 100%; border-radius: 99px; }
.wb-row.pos .wb-bar span { background: #1fa65a; } .wb-row.neg .wb-bar span { background: #d9443a; }
.wb-row small { font-size: calc(14px * var(--fz)); font-weight: 600; color: var(--muted); }
[data-theme="dark"] .wb-row.pos .wb-l b { color: #6fe0a0; } [data-theme="dark"] .wb-row.neg .wb-l b { color: #ff9a92; }

/* Balance semanal: tarjetas por semana con Entró / Salió comparados */
.wb { gap: 10px; }
.wb-row { gap: 6px; padding: 12px 14px; border-radius: 16px; border: 1px solid transparent; }
.wb-row.pos { background: #e6f6ec; border-color: #bfe5cd; } .wb-row.neg { background: #fdebe9; border-color: #f4c3be; }
.wb-row.now { border-width: 2px; }
.wb-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wb-w { font-size: calc(16px * var(--fz)); font-weight: 700; min-width: 0; }
.wb-chip { flex: none; padding: 3px 10px; border-radius: 99px; font-size: calc(14px * var(--fz)); font-weight: 800; color: #fff; }
.wb-row.pos .wb-chip { background: #0b7a3b; } .wb-row.neg .wb-chip { background: #b3261e; }
.wb-row > strong { font-size: calc(28px * var(--fz)); line-height: 1.1; font-weight: 800; white-space: nowrap; }
.wb-row.pos > strong { color: #0a6a34; } .wb-row.neg > strong { color: #a31f17; }
.wb-m { display: grid; grid-template-columns: 3.4em minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: calc(15px * var(--fz)); font-weight: 600; }
.wb-m b { font-weight: 700; white-space: nowrap; }
.wb-m .wb-bar { background: rgba(15, 29, 58, .1); }
.wb-m.in .wb-bar span { background: #1fa65a; } .wb-m.out .wb-bar span { background: #e0603a; }
[data-theme="dark"] .wb-row.pos { background: #123a24; border-color: #1f6b43; } [data-theme="dark"] .wb-row.neg { background: #4a1a16; border-color: #8a342d; }
[data-theme="dark"] .wb-row.pos > strong { color: #8be8b2; } [data-theme="dark"] .wb-row.neg > strong { color: #ffb4ad; }
[data-theme="dark"] .wb-m .wb-bar { background: rgba(255, 255, 255, .16); }
.wb-row { padding: 9px 12px; gap: 3px; }
.wb-w { font-size: calc(15px * var(--fz)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-chip { padding: 2px 8px; font-size: calc(13px * var(--fz)); }
.wb-row > strong { font-size: calc(24px * var(--fz)); }
.wb-m { font-size: calc(14px * var(--fz)); gap: 6px; grid-template-columns: 3.2em minmax(0, 1fr) auto; }
.wb { gap: 8px; }
.wb-w { white-space: normal; overflow: visible; text-overflow: clip; }
[data-fs="xl"] .wb-m { grid-template-columns: minmax(0, 1fr) auto; } [data-fs="xl"] .wb-m .wb-bar { grid-column: 1 / -1; order: 3; }
[data-fs="xl"] .wb-row > strong { font-size: calc(20px * var(--fz)); }
.wb { grid-template-columns: minmax(0, 1fr); } .wb-row { min-width: 0; } .wb-top { flex-wrap: wrap; }

/* Balance mensual (vista Año): tarjetas más bajas, la cifra va en la fila del mes */
.wb-compact .wb-top strong { font-size: calc(22px * var(--fz)); line-height: 1.1; white-space: nowrap; }
.wb-compact .wb-row.pos .wb-top strong { color: #0a6a34; } .wb-compact .wb-row.neg .wb-top strong { color: #a31f17; }
[data-theme="dark"] .wb-compact .wb-row.pos .wb-top strong { color: #8be8b2; } [data-theme="dark"] .wb-compact .wb-row.neg .wb-top strong { color: #ffb4ad; }
.wb-compact .wb-top { flex-wrap: nowrap; }
[data-fs="xl"] .wb-compact .wb-top { flex-wrap: wrap; } [data-fs="xl"] .wb-compact .wb-top strong { font-size: calc(18px * var(--fz)); }

/* Gráfico «Entró y salió» (HTML) */
.fc-leg { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 10px; font-size: calc(15px * var(--fz)); font-weight: 600; }
.fc-leg span { display: inline-flex; align-items: center; gap: 7px; min-width: 0; } .fc-leg b { font-weight: 800; white-space: nowrap; }
.fc-leg i { width: 14px; height: 14px; border-radius: 5px; flex: none; }
.fc-leg .in i, .fc-bars .in { background: #1fa65a; } .fc-leg .out i, .fc-bars .out { background: #e0603a; }
.fc { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 8px; }
.fc-y { display: flex; flex-direction: column; justify-content: space-between; height: 170px; text-align: right; font-size: calc(13px * var(--fz)); font-weight: 600; color: var(--muted); line-height: 1; }
.fc-plot { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); height: 170px; border-bottom: 2px solid var(--line, #c9d3e6); background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), rgba(60, 90, 160, .16) calc(25% - 1px), rgba(60, 90, 160, .16) 25%); position: relative; align-items: end; }
.fc-c { position: relative; height: 100%; min-width: 0; }
.fc-bars { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 0 2px; }
.fc-bars i { flex: 0 1 18px; min-width: 5px; border-radius: 6px 6px 0 0; }
.fc-c > span { position: absolute; left: 0; right: 0; top: calc(100% + 6px); text-align: center; font-size: calc(14px * var(--fz)); font-weight: 700; white-space: nowrap; }
.fc { padding-bottom: calc(26px * var(--fz)); }
/* Balance semanal: «Le quedó / Le faltó» como texto, sin recuadro */
.wb-chip, .wb-row.pos .wb-chip, .wb-row.neg .wb-chip { background: none; padding: 0; border-radius: 0; }
.wb-row.pos .wb-chip { color: #0a6a34; } .wb-row.neg .wb-chip { color: #a31f17; }
[data-theme="dark"] .wb-row.pos .wb-chip { color: #8be8b2; } [data-theme="dark"] .wb-row.neg .wb-chip { color: #ffb4ad; }
.wb-row .wb-chip, .wb-row.pos .wb-chip, .wb-row.neg .wb-chip { background: transparent !important; box-shadow: none; border: 0; }
.wb-compact .wb-top strong { font-size: calc(19px * var(--fz)); } .wb-compact .wb-w { font-size: calc(14px * var(--fz)); }

/* Finanzas: tarjetas de movimientos como las de Inventario (.pr) */
.fr-list { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.fr { padding: 8px 8px 8px 14px; gap: 8px; border-radius: 20px; }
.fr .pr-info { gap: 1px; } .fr .pr-info h4 { font-size: calc(17px * var(--fz)); } .fr .pr-info small { font-size: calc(14px * var(--fz)); }
.fr .pr-stock { gap: 3px; justify-items: end; }
.fr-amt { font-size: calc(18px * var(--fz)); font-weight: 800; white-space: nowrap; }
.fr-amt.pos { color: #0a6a34; } .fr-amt.neg { color: #b3262c; }
[data-theme="dark"] .fr-amt.pos { color: #8be8b2; } [data-theme="dark"] .fr-amt.neg { color: #ff9a92; }
.pr-chip--sale { color: #0b4fc4; background: #dbe8ff; }
[data-theme="dark"] .pr-chip--sale { color: #bcd4ff; background: #1d3568; }
.fr .pr-chip { padding: 2px 10px; font-size: calc(13px * var(--fz)); }
.fr .pr-more { width: 44px; height: 44px; }
.fr-det { display: none; grid-column: 1 / -1; margin: 2px 0 4px; padding: 8px 0 0; list-style: none; border-top: 1px solid rgba(60, 90, 160, .18); gap: 4px; font-size: calc(15px * var(--fz)); }
.fr.open .fr-det { display: grid; }
.fr-det li { display: flex; justify-content: space-between; gap: 10px; } .fr-det li .num { white-space: nowrap; font-weight: 700; }
/* Finanzas: tarjeta compacta (nombre y «···» arriba; debajo, en una línea que salta si hace falta: monto, tipo y fecha/ganancia) */
.pr.fr { grid-template-columns: minmax(0, 1fr) 44px; grid-template-areas: "t m" "s m" "d d"; align-items: center; column-gap: 6px; row-gap: 0; padding: 8px 4px 8px 14px; }
.pr.fr h4 { grid-area: t; align-self: end; font-size: calc(17px * var(--fz)); overflow-wrap: break-word; word-break: normal; }
.pr.fr .pr-more { grid-area: m; width: 44px; height: 44px; }
.fr-sub { grid-area: s; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; }
.fr-sub small { font-size: calc(14px * var(--fz)); color: var(--muted); font-weight: 600; min-width: 0; }
.pr.fr .fr-det { grid-area: d; }

/* Formulario de producto nuevo: pie como el de «Nuevo interesado» (Cancelar | Guardar) y «Guardar y agregar otro» en su propia fila */
.modal footer .btn[data-m="again"] { order: 3; flex: 1 1 100%; min-width: 0; }
.modal footer .btn[data-m="again"] svg { flex: none; }
.modal footer:has(.btn[data-m="again"]) .btn:not([data-m="again"]) { flex: 1 1 0; min-width: 0; padding-inline: 10px; }
/* Hoy: pestañas Hoy / Pendientes / Calendario sin apretarse (2 columnas y Calendario abajo en pantallas angostas) */
.hr-tab { min-width: 0; padding-inline: 10px; }
.hr-tab span { min-width: 0; overflow-wrap: normal; }
@media (max-width: 600px) { .hr-tabs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .hr-tab--cal { grid-column: 1 / -1; min-height: 52px; } }
@media (min-width: 601px) { .hr-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 440px) { .hr-tabs { grid-template-columns: minmax(0, 1fr); gap: 8px; } .hr-tab { min-height: 52px; } }
[data-fs="xl"] .hr-tabs { grid-template-columns: minmax(0, 1fr); } [data-fs="xl"] .hr-tab { min-height: 52px; flex-wrap: wrap; }

/* Hoy: tarjetas como las de Seguimiento (nombre + WhatsApp, línea de lo que toca, chips); la fila se abre con «Copiar mensaje / Resolver / Posponer» */
.hr-list { display: grid; gap: 0; }
.hrow { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name wa" "info info" "body body"; }
.hrow .hr-body { grid-area: body; display: none; flex-wrap: wrap; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); cursor: default; }
.hrow.open .hr-body { display: flex; } .hrow .hr-body .btn { flex: 1 1 auto; }
.hrow.open { border-color: var(--accent); }

/* Registrar venta: cada producto en su tarjeta con etiquetas claras (¿Qué vendió? / Cantidad / Precio de cada uno / Subtotal) */
.sale-row.sr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: stretch; padding: 14px; margin-bottom: 12px; border-radius: 18px; background: rgba(60, 90, 160, .07); border: 1px solid var(--line); }
.sr-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .sr-n { font-size: calc(17px * var(--fz)); }
.sr:only-child .sr-rm { display: none; }
.sr-f { display: grid; gap: 6px; min-width: 0; } .sr-f .label { font-weight: 700; }
.sr-two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; align-items: end; }
.sr .stepper { max-width: none; } .sr .step-btn { width: 44px; height: 44px; } .sr .stepper .input { padding-inline: 4px; }
.sr-money { display: flex; align-items: center; gap: 8px; } .sr-money i { font-style: normal; font-weight: 800; font-size: calc(18px * var(--fz)); } .sr-money .input { min-width: 0; }
.sr-sub { display: flex; justify-content: space-between; align-items: baseline; padding-top: 8px; border-top: 1px solid var(--line); font-weight: 600; } .sr-sub b { font-size: calc(19px * var(--fz)); }
@media (max-width: 440px) { .sr-two { grid-template-columns: minmax(0, 1fr); } }
[data-fs="xl"] .sr-two { grid-template-columns: minmax(0, 1fr); }

/* Lector de códigos de barras (cámara) */
.scan-btn { margin-top: 8px; width: 100%; justify-content: center; }
.scan-ov { position: fixed; inset: 0; z-index: 120; background: #000; display: grid; grid-template-rows: 1fr auto auto; justify-items: center; align-items: center; gap: 14px; padding: 0 16px 20px; }
.scan-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: relative; z-index: 1; width: min(86vw, 420px); aspect-ratio: 16 / 9; border-radius: 18px; border: 3px solid #fff; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55); overflow: hidden; }
.scan-frame i { position: absolute; left: 6%; right: 6%; top: 50%; height: 3px; border-radius: 3px; background: #ff4d4f; box-shadow: 0 0 12px #ff4d4f; animation: scanline 1.6s ease-in-out infinite alternate; }
@keyframes scanline { from { top: 18%; } to { top: 82%; } }
.scan-msg { position: relative; z-index: 1; margin: 0; max-width: 28em; text-align: center; color: #fff; font-weight: 700; font-size: calc(19px * var(--fz)); text-shadow: 0 1px 6px #000; }
.scan-cancel { position: relative; z-index: 1; min-width: min(100%, 320px); background: #fff; color: #14213d; }
@media (prefers-reduced-motion: reduce) { .scan-frame i { animation: none; } }
.scan-btn { display: flex; align-items: center; gap: 8px; width: 100%; max-width: none; }
.scan-ov .scan-cancel { background: #fff !important; color: #14213d !important; border-color: #fff !important; opacity: 1; }

/* Inicio: botón «Metas» (mismo formato que Agenda, en verde) */
button.tile--metas { width: 100%; text-align: left; cursor: pointer; font: inherit; }
[data-theme="light"] .tile--metas { background: url('../img/ui/tile-finanzas-claro.webp') center / cover no-repeat, #c8f2da; color: #0a3d22; box-shadow: 0 14px 28px -16px rgba(20,150,90,.55); }
[data-theme="light"] .tile--metas .tile-go { background: #138a4a; color: #fff; }
[data-theme="dark"] .tile--metas { background: linear-gradient(90deg, rgba(0,0,0,.4), rgba(0,0,0,0) 75%), url('../img/ui/tile-finanzas-oscuro.webp') center / cover no-repeat, #06301c; color: #fff; border-color: rgba(90,220,150,.45); }
[data-theme="dark"] .tile--metas .tile-go { background: #fff; color: #138a4a; }
.tile--metas small { overflow-wrap: anywhere; }

button.tile--metas { display: flex; width: 100%; box-sizing: border-box; }

/* Metas con barras: dos barras de progreso (afiliados y compras) que se llenan según se cumplen */
.tile--metas.has-bars { flex-wrap: wrap; row-gap: 10px; }
.tile--metas .mt-bars { flex: 1 1 100%; display: grid; gap: 10px; text-shadow: none; }
.mt-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: baseline; }
.mt-l { font-weight: 800; font-size: calc(16px * var(--fz)); } .mt-n { font-weight: 700; font-size: calc(15px * var(--fz)); white-space: nowrap; text-align: right; }
.mt-bar { grid-column: 1 / -1; height: 14px; border-radius: 99px; background: rgba(255, 255, 255, .75); overflow: hidden; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .18); }
.mt-bar span { display: block; height: 100%; min-width: 0; border-radius: 99px; background: linear-gradient(90deg, #138a4a, #2fbf71); transition: width 1s var(--ease); }
.mt-row:first-child .mt-bar span { background: linear-gradient(90deg, #2468ee, #4a8bff); }
.mt-row:last-child:not(:first-child) .mt-bar span { background: linear-gradient(90deg, #138a4a, #2fbf71); }
[data-theme="dark"] .mt-bar { background: rgba(255, 255, 255, .22); box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .mt-bar span { transition: none; } }

.mt-n.num { font-size: calc(14px * var(--fz)); letter-spacing: -.02em; white-space: normal; } .mt-l { min-width: 0; }
[data-fs="xl"] .mt-row { grid-template-columns: minmax(0, 1fr); } [data-fs="xl"] .mt-n { text-align: left; }

/* Inicio (afiliaciones): «Agenda» como cuadro normal, con los colores rojos de la Agenda */
[data-theme="light"] .tile--agendamini { background: url('../img/ui/card-hoy-claro.webp') center / cover no-repeat, #ffd1d4; color: #5a0a14; box-shadow: 0 14px 28px -16px rgba(220,60,70,.55); }
[data-theme="light"] .tile--agendamini .tile-go { background: #c1121f; color: #fff; }
[data-theme="dark"] .tile--agendamini { background: linear-gradient(90deg, rgba(0,0,0,.4), rgba(0,0,0,0) 75%), url('../img/ui/card-hoy-oscuro.webp') center / cover no-repeat, #5a0610; color: #fff; border-color: rgba(255,120,120,.45); }
[data-theme="dark"] .tile--agendamini .tile-go { background: #fff; color: #c1121f; }

.prow-chips .chip { white-space: normal; max-width: 100%; }

.hint.busy { color: #b3261e; font-weight: 700; } [data-theme="dark"] .hint.busy { color: #ff9a92; }

/* Equipo: el chip de cada afiliado es su etapa (igual que los filtros); el seguimiento va junto al patrocinador */
.mseg.late { color: #b3261e; font-weight: 700; } [data-theme="dark"] .mseg.late { color: #ff9a92; }
.chip.mst { font-weight: 700; white-space: nowrap; align-self: center; }
.mst-nuevo { background: #dbe9ff; color: #1648c4; } .mst-capacitacion { background: #e9defc; color: #6d28d9; } .mst-activo { background: #d3f5df; color: #0b6b33; } .mst-lider { background: #ffe9c7; color: #8a4a05; }
.mst-inactivo { background: #e5e7eb; color: #374151; } .mst-desactivado { background: #ffd9dc; color: #b3262c; }
[data-theme="dark"] .mst-nuevo { background: rgba(80,140,255,.28); color: #bcd6ff; } [data-theme="dark"] .mst-capacitacion { background: rgba(160,110,255,.28); color: #dac7ff; } [data-theme="dark"] .mst-activo { background: rgba(40,190,110,.25); color: #a6f0c6; } [data-theme="dark"] .mst-lider { background: rgba(245,158,11,.25); color: #ffd9a0; }
[data-theme="dark"] .mst-inactivo { background: rgba(255,255,255,.16); color: #e5e7eb; } [data-theme="dark"] .mst-desactivado { background: rgba(255,90,100,.25); color: #ffb4ad; }
@media (max-width: 400px) {
  .row.click:has(.chip.mst) { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "av main" "av chip"; align-items: start; gap: 6px 12px; }
  .row.click:has(.chip.mst) > .mono-avatar { grid-area: av; } .row.click:has(.chip.mst) > .grow { grid-area: main; min-width: 0; }
  .row.click:has(.chip.mst) > .chip.mst { grid-area: chip; justify-self: start; }
  .row.click:has(.chip.mst) .grow h4 { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: normal; }
}

/* Aviso de prueba gratuita en celular: el texto ocupa toda la fila y los botones van debajo, lado a lado */
@media (max-width: 640px) {
  .trialbar { flex-wrap: wrap; gap: 8px 10px; }
  .trialbar > span { flex: 1 1 100%; min-width: 0; overflow-wrap: normal; }
  .trialbar .btn { flex: 1 1 0; min-width: 0; white-space: normal; justify-content: center; text-align: center; }
}

/* Pantalla de acceso: tarjeta de vidrio, campos a la izquierda y pestañas claras */
#auth .welcome-panel { place-items: start center; padding-top: 4vh; padding-bottom: 4vh; overflow-y: auto; }
#auth .welcome-card { max-width: 400px; padding: 16px 16px 14px; gap: 10px; border-radius: 24px; background: rgba(4,8,18,.74); border: 1px solid rgba(243,210,122,.32); box-shadow: 0 24px 60px -20px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.08); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); text-shadow: none; }
#auth .welcome-card h2, #auth .welcome-card .lead, #auth .welcome-card .label, #auth .welcome-card .fine { text-shadow: none; }
#auth .welcome-card .logo-md { width: 42px; height: 42px; margin-bottom: 0; }
#auth .welcome-card h2 { font-size: calc(26px * var(--fz)); }
#auth .welcome-card .lead { font-size: calc(15px * var(--fz)); line-height: 1.4; opacity: 1; color: #f6ecc8; }
#auth .welcome-card .field { text-align: left; gap: 6px; }
#auth .welcome-card .label { font-size: calc(15px * var(--fz)); font-weight: 700; color: #fff3c8; text-align: left; }
#auth .welcome-card .input { min-height: calc(48px * var(--fz)); font-size: calc(16px * var(--fz)); background: rgba(255,255,255,.08); border: 2px solid rgba(243,210,122,.38); }
#auth .welcome-card .input::placeholder { color: rgba(241,231,196,.6); }
#auth .auth-tabs { padding: 4px; gap: 4px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(243,210,122,.3); }
#auth .auth-tabs button { min-height: calc(46px * var(--fz)); padding: 6px 4px; border-radius: 11px; font-size: calc(15px * var(--fz)); font-weight: 700; color: #f6ecc8; opacity: 1; }
#auth .auth-tabs button.on { background: linear-gradient(180deg, #f6dc94, #d9a93f); color: #2b1d00; box-shadow: 0 6px 16px -6px rgba(217,169,63,.8); }
#auth .auth-tabs button:not(.on):hover { background: rgba(243,210,122,.14); }
.auth-trial { display: grid; gap: 2px; width: 100%; padding: 8px 12px; border-radius: 12px; background: rgba(243,210,122,.14); border: 1px solid rgba(243,210,122,.45); color: #fff3c8; font-size: calc(14px * var(--fz)); }
.auth-trial[hidden] { display: none; }
.auth-trial b { font-size: calc(15px * var(--fz)); color: #f6dc94; }
#auth .welcome-card .fine { opacity: 1; color: #e8dcb0; font-size: calc(13px * var(--fz)); line-height: 1.45; }
#auth .welcome-card .field-error { font-size: calc(14px * var(--fz)); padding: 8px 10px; border-radius: 12px; background: rgba(255,120,100,.14); border: 1px solid rgba(255,157,138,.5); text-align: left; width: 100%; }
@media (max-width: 380px) { #auth .welcome-card { padding: 14px 12px 12px; } }
#auth .welcome-card .hint { font-size: calc(14px * var(--fz)); font-weight: 700; text-align: left; text-shadow: none; }
#auth .hint.auth-ok { color: #8fe3a4; }
#auth .hint.auth-no { color: #ffb4a3; }

/* Notificaciones: iconos de tamaño fijo y con color visible (claro por defecto, oscuro aparte) */
.pop-item { align-items: flex-start; }
.pop-item > div:last-child { min-width: 0; flex: 1; }
.pop-item .opp-ico { flex: none; width: 40px !important; height: 40px !important; border-radius: 12px; display: grid; place-items: center; background: #dbe7ff; color: #1d4ed8; border: 1px solid #a9c4f7; }
.pop-item .opp-ico.t-warn { background: #fff0cc; color: #8a5200; border-color: #f0cf85; }
.pop-item .opp-ico.t-ok { background: #d9f5e3; color: #11693a; border-color: #98d9b3; }
.pop-item .opp-ico.t-dark { background: #e9ecf3; color: #243049; border-color: #c4cadb; }
.pop-item .opp-ico svg { width: 22px; height: 22px; }
[data-theme="dark"] .pop-item .opp-ico { background: rgba(110,160,255,.22); color: #b9d3ff; border-color: rgba(110,160,255,.4); }
[data-theme="dark"] .pop-item .opp-ico.t-warn { background: rgba(255,190,70,.2); color: #ffd27a; border-color: rgba(255,190,70,.45); }
[data-theme="dark"] .pop-item .opp-ico.t-ok { background: rgba(80,210,140,.2); color: #8fe3b0; border-color: rgba(80,210,140,.45); }
[data-theme="dark"] .pop-item .opp-ico.t-dark { background: rgba(255,255,255,.1); color: #f1e7c4; border-color: rgba(255,255,255,.28); }

/* Botón «Volver al inicio»: sólido y con contraste alto (en su propia fila, compacto) */
.back-home { display: flex; width: fit-content; gap: 6px; min-height: max(44px, calc(40px * var(--fz))); padding: 0 16px 0 10px; margin-bottom: 6px; border-radius: 14px; font-size: calc(17px * var(--fz)); font-weight: 700; color: #fff; background: linear-gradient(180deg, #2f6df6, #1546c9); border: 2px solid #8fb3ff; box-shadow: 0 6px 16px -6px rgba(21,70,201,.7); }
.back-home:hover { background: linear-gradient(180deg, #4a82ff, #1d55e0); }
.back-home:active { transform: scale(.98); }
.back-home svg { flex: none; }
[data-theme="dark"] .back-home { color: #1a1300; background: linear-gradient(180deg, #f6dc94, #d9a93f); border-color: #fff0bd; box-shadow: 0 6px 18px -6px rgba(217,169,63,.75); }
[data-theme="dark"] .back-home:hover { background: linear-gradient(180deg, #ffe7a8, #e5b64c); }

/* Cuadros de Inicio: subtítulos en negrita */
.tile small, .tile-txt small { font-weight: 700; }

/* Instalar la app (PWA) */
.tile.tile--install { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 84px; padding: 14px 16px; border-radius: 20px; text-align: left; background: var(--surface); border: 2px solid var(--line-strong); box-shadow: var(--shadow-md, 0 8px 24px -12px rgba(0,0,0,.45)); background-image: none; color: var(--text); }
.tile--install::before, .tile--install::after { content: none; }
.tile--install .inst-ico { flex: none; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #2f6df6, #1546c9); }
.tile--install .tile-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tile--install .tile-txt b { font-size: calc(18px * var(--fz)); }
.tile--install .tile-txt small { font-size: calc(14px * var(--fz)); font-weight: 700; line-height: 1.3; }
.tile--install .inst-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 16px; border-radius: 14px; font-weight: 700; font-size: calc(16px * var(--fz)); color: #fff; background: linear-gradient(180deg, #2f6df6, #1546c9); border: 2px solid #8fb3ff; }
[data-theme="dark"] .tile--install .inst-btn { color: #1a1300; background: linear-gradient(180deg, #f6dc94, #d9a93f); border-color: #fff0bd; }
@media (max-width: 440px) { .tile.tile--install { flex-wrap: wrap; } .tile--install .tile-txt { flex: 1 1 calc(100% - 70px); } .tile--install .inst-btn { flex: 1 1 100%; } }
.inst-steps { margin: 0; padding-left: 24px; display: grid; gap: 12px; font-size: calc(17px * var(--fz)); line-height: 1.5; }
