/* Detailing Gestion — app del taller. Lenguaje visual "Showroom nocturno" (docs/DISENO.md). */
:root {
  --bg: #0B0D10; --bg-2: #111419; --surface: #161A20; --surface-2: #1D222A; --surface-3: #252B35;
  --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.14);
  --text: #ECEFF3; --text-2: #A9B1BC; --text-3: #7D8793;
  --acc: #FF6B1A; --acc-2: #FF8A47; --acc-ink: #160A03; --acc-soft: rgba(255,107,26,.14); --acc-glow: rgba(255,107,26,.35);
  --ok: #3DDC97; --ok-soft: rgba(61,220,151,.13); --warn: #FFC542; --warn-soft: rgba(255,197,66,.13); --bad: #FF5A5F; --bad-soft: rgba(255,90,95,.13);
  --info: #6CB4FF; --info-soft: rgba(108,180,255,.13);
  --radius: 14px; --radius-lg: 22px; --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 40px -24px rgba(0,0,0,.7);
  --ease: cubic-bezier(.2,.8,.2,1);
  --rail: 248px; --top: 64px; --tab: 68px;
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
  color-scheme: dark;
}
body[data-palette="rojo"] { --acc: #E5313B; --acc-2: #FF5560; --acc-ink: #FFFFFF; --acc-soft: rgba(229,49,59,.15); --acc-glow: rgba(229,49,59,.38); }
body[data-palette="azul"] { --acc: #2F7BFF; --acc-2: #5A97FF; --acc-ink: #FFFFFF; --acc-soft: rgba(47,123,255,.15); --acc-glow: rgba(47,123,255,.38); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 400 16px/1.45 var(--font); min-height: 100dvh; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--acc-2); }
h1, h2, h3 { overflow-wrap: anywhere; font-family: var(--display); font-weight: 700; letter-spacing: .01em; margin: 0; line-height: 1.05; }
.num, .money { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--acc); color: var(--acc-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Fondo: grilla de inspeccion ---------- */
.grid-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse 80% 60% at 70% 0%, #000 0%, transparent 70%); mask-image: radial-gradient(ellipse 80% 60% at 70% 0%, #000 0%, transparent 70%); }
.glow-bg { position: fixed; inset: -20% -10% auto auto; width: 70vmax; height: 70vmax; pointer-events: none; z-index: 0;
  background: radial-gradient(circle at center, var(--acc-soft), transparent 60%); filter: blur(20px); opacity: .7; }

/* ---------- Shell ---------- */
.shell { position: relative; z-index: 1; min-height: 100dvh; }
.rail { display: none; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: rgba(11,13,16,.78); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--line); }
.topbar .brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; text-decoration: none; color: var(--text); }
.brand-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: contain; background: var(--surface-2); border: 1px solid var(--line); flex: none; }
.brand-logo.ph { display: grid; place-items: center; font: 700 18px var(--display); color: var(--acc); }
.brand-name { font: 700 19px/1 var(--display); letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 12px; color: var(--text-3); letter-spacing: .08em; text-transform: uppercase; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2);
  font: 700 15px var(--display); color: var(--text); cursor: pointer; flex: none; }
.avatar:hover { border-color: var(--acc); }

main.view { padding: 18px 16px calc(var(--tab) + 28px + env(safe-area-inset-bottom)); max-width: 1180px; margin: 0 auto; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tab) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: rgba(14,16,20,.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text-3); text-decoration: none; font-size: 11.5px; font-weight: 600;
  letter-spacing: .03em; position: relative; }
.tabbar a svg { width: 23px; height: 23px; }
.tabbar a.on { color: var(--text); }
.tabbar a.on::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 2px; border-radius: 0 0 2px 2px; background: var(--acc); box-shadow: 0 0 14px var(--acc-glow); }
.tabbar a.on svg { color: var(--acc); }
.tabbar .badge, .rail .badge { position: absolute; top: 8px; left: calc(50% + 6px); }

@media (min-width: 960px) {
  .rail { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: var(--rail); z-index: 35; padding: 18px 14px; gap: 4px;
    background: linear-gradient(180deg, rgba(17,20,25,.96), rgba(11,13,16,.96)); border-right: 1px solid var(--line); }
  .rail .brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 18px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); margin-bottom: 12px; }
  .rail .brand-logo { width: 52px; height: 52px; border-radius: 12px; }
  .rail a.nav { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--text-2); text-decoration: none; font-weight: 600; position: relative; }
  .rail a.nav svg { width: 21px; height: 21px; flex: none; }
  .rail a.nav:hover { background: var(--surface); color: var(--text); }
  .rail a.nav.on { background: var(--surface-2); color: var(--text); box-shadow: inset 2px 0 0 var(--acc); }
  .rail a.nav.on svg { color: var(--acc); }
  .rail .badge { position: static; margin-left: auto; }
  .rail .rail-foot { margin-top: auto; padding: 12px 8px 4px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); }
  .rail .plan-tag { display: inline-flex; align-items: center; gap: 6px; }
  .rail .plan-tag .spark, .rail a.nav .lock-ic { width: 14px; height: 14px; }
  .rail a.nav .lock-ic { margin-left: auto; color: var(--text-3); }
  .shell { padding-left: var(--rail); }
  .tabbar { display: none; }
  .topbar .brand { visibility: hidden; }
  main.view { padding: 28px 36px 60px; }
}

/* ---------- Encabezado de pagina ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 18px; flex-wrap: wrap; }
.eyebrow { font: 600 12px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--acc); display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.eyebrow .spark { width: 12px; height: 12px; }
.page-head h1 { font-size: clamp(30px, 6vw, 46px); text-transform: uppercase; letter-spacing: .02em; }
.page-head .sub { color: var(--text-2); margin-top: 6px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.spark { color: var(--acc); flex: none; }

/* ---------- Tarjetas ---------- */
.card { position: relative; background: linear-gradient(180deg, var(--surface), rgba(22,26,32,.92)); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 18px; overflow: hidden; }
.card + .card { margin-top: 14px; }
.card h2 { font-size: 22px; text-transform: uppercase; letter-spacing: .03em; }
.card h3 { font-size: 17px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sheen::after { content: ''; position: absolute; inset: 0; pointer-events: none; transform: translateX(-110%);
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.075) 50%, transparent 62%); }
.sheen:hover::after, .sheen.sweep::after { transform: translateX(110%); transition: transform .9s var(--ease); }
.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid.c2 { grid-template-columns: 1fr 1fr; } .grid.c3 { grid-template-columns: repeat(3, 1fr); } }
.stack > * + * { margin-top: 12px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); font-size: 14px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); margin: 14px 0; border: 0; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { position: relative; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.kpi .label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); font-weight: 600; }
.kpi .value { font: 700 clamp(28px, 6vw, 38px)/1.05 var(--display); margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi .hint { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.kpi.acc { background: linear-gradient(140deg, var(--acc-soft), var(--surface) 65%); border-color: color-mix(in srgb, var(--acc) 35%, transparent); }
.kpi.acc .value { color: var(--text); }

/* ---------- Botones ---------- */
.btn { --h: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--h); padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font-weight: 600; cursor: pointer; text-decoration: none;
  transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s; white-space: nowrap; position: relative; overflow: hidden; user-select: none; }
.btn:hover { border-color: rgba(255,255,255,.24); background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn svg { width: 19px; height: 19px; flex: none; }
.btn.primary { background: var(--acc); color: var(--acc-ink); border-color: transparent; box-shadow: 0 10px 28px -12px var(--acc-glow), inset 0 1px 0 rgba(255,255,255,.25); }
.btn.primary:hover { background: var(--acc-2); }
.btn.primary::after { content: ''; position: absolute; inset: 0; transform: translateX(-120%); background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%); }
.btn.primary:hover::after { transform: translateX(120%); transition: transform .8s var(--ease); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.ghost:hover { background: var(--surface); }
.btn.danger { color: var(--bad); border-color: rgba(255,90,95,.35); background: transparent; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ok { background: var(--ok); color: #04150D; border-color: transparent; }
.btn.sm { --h: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn.lg { --h: 54px; font-size: 17px; padding: 0 24px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.busy { opacity: .55; pointer-events: none; }
.btn.busy::before { content: ''; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.icon-btn { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); cursor: pointer; flex: none; }
.icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.icon-btn svg { width: 20px; height: 20px; }
@keyframes spin { to { transform: rotate(360deg); } }
.fab { position: fixed; right: 18px; bottom: calc(var(--tab) + 18px + env(safe-area-inset-bottom)); z-index: 39; width: 58px; height: 58px; border-radius: 18px; border: 0;
  background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; box-shadow: 0 16px 34px -10px var(--acc-glow); cursor: pointer; }
.fab svg { width: 26px; height: 26px; }
@media (min-width: 960px) { .fab { bottom: 28px; right: 32px; } }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .label { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--text-2); }
.input, .field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--bg-2); color: var(--text); outline: none; transition: border-color .2s, box-shadow .2s; font-size: 16px; }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--acc); box-shadow: 0 0 0 4px var(--acc-soft); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A9B1BC' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.field .help { font-size: 13px; color: var(--text-3); }
.form-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid.c2 { grid-template-columns: 1fr 1fr; } .form-grid.c3 { grid-template-columns: repeat(3, 1fr); } .form-grid .span2 { grid-column: span 2; } }
.input-money { position: relative; }
.input-money::before { content: '$'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-money input { padding-left: 28px; }

.seg { display: inline-flex; padding: 4px; border-radius: 13px; background: var(--bg-2); border: 1px solid var(--line); gap: 2px; flex-wrap: wrap; }
.seg button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.06) inset; }
.seg button.on.acc { background: var(--acc); color: var(--acc-ink); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--text-2); font-weight: 600; font-size: 14px; cursor: pointer; transition: all .18s var(--ease); }
.chip:hover { color: var(--text); }
.chip.on { background: var(--acc-soft); border-color: var(--acc); color: var(--text); }
.chip .count { font-size: 12px; padding: 1px 7px; border-radius: 99px; background: rgba(255,255,255,.08); }

.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background .2s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.switch input:checked + span { background: var(--acc); border-color: transparent; }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--acc); outline-offset: 2px; }

.search { position: relative; flex: 1; min-width: 200px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.search input { padding-left: 42px; }

/* ---------- Listas ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { position: relative; display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: var(--text); cursor: pointer; transition: border-color .2s, transform .2s var(--ease), background .2s; overflow: hidden; }
.item:hover { border-color: var(--line-2); background: #191D24; }
.item:active { transform: scale(.995); }
.item .main { flex: 1; min-width: 0; }
.item .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .meta { font-size: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .side { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.item .amount { font: 700 20px var(--display); font-variant-numeric: tabular-nums; }
.plate { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; background: #E9ECEF; color: #111; font: 700 13px/1.4 var(--display); letter-spacing: .12em; border: 1px solid #fff; }
.thumb { width: 52px; height: 40px; flex: none; object-fit: contain; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; white-space: nowrap;
  background: rgba(255,255,255,.07); color: var(--text-2); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.pendiente, .pill.agendada, .pill.recibido { background: var(--info-soft); color: var(--info); }
.pill.enviada, .pill.confirmada, .pill.en_proceso { background: var(--warn-soft); color: var(--warn); }
.pill.aceptada, .pill.listo, .pill.completada { background: var(--ok-soft); color: var(--ok); }
.pill.rechazada, .pill.cancelada, .pill.no_asistio { background: var(--bad-soft); color: var(--bad); }
.pill.control_calidad, .pill.en_taller { background: var(--acc-soft); color: var(--acc-2); }
.pill.entregado { background: rgba(255,255,255,.08); color: var(--text-2); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--acc); color: var(--acc-ink); font: 700 12px/20px var(--font); text-align: center; }

/* ---------- Estados vacios y carga ---------- */
.empty { text-align: center; padding: 44px 20px; color: var(--text-2); }
.empty .spark-big { width: 46px; height: 46px; margin: 0 auto 14px; color: var(--acc); filter: drop-shadow(0 0 14px var(--acc-glow)); animation: twinkle 2.6s ease-in-out infinite; }
.empty h3 { font: 700 22px var(--display); text-transform: uppercase; color: var(--text); margin-bottom: 6px; letter-spacing: .03em; }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.82) rotate(45deg); opacity: .7; } }
.skel { border-radius: var(--radius); background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 300% 100%; animation: skel 1.3s linear infinite; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- Aparicion escalonada ---------- */
.reveal > * { animation: rise .5s var(--ease) both; }
.reveal > *:nth-child(2) { animation-delay: .04s; } .reveal > *:nth-child(3) { animation-delay: .08s; } .reveal > *:nth-child(4) { animation-delay: .12s; }
.reveal > *:nth-child(5) { animation-delay: .16s; } .reveal > *:nth-child(6) { animation-delay: .2s; } .reveal > *:nth-child(n+7) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Hoja (modal) ---------- */
.backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(4,5,7,.62); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s; }
.backdrop.in { opacity: 1; }
.sheet { position: fixed; z-index: 81; left: 0; right: 0; bottom: 0; max-height: 92dvh; display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line-2);
  border-radius: 24px 24px 0 0; transform: translateY(102%); transition: transform .34s var(--ease); box-shadow: 0 -30px 60px -20px rgba(0,0,0,.6); }
.sheet.in { transform: none; }
.sheet .grab { width: 44px; height: 5px; border-radius: 99px; background: var(--line-2); margin: 10px auto 0; flex: none; }
.sheet header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px 12px; border-bottom: 1px solid var(--line); flex: none; }
.sheet header h2 { font-size: 24px; text-transform: uppercase; letter-spacing: .03em; }
.sheet .body { padding: 18px; overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.sheet footer { padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 10px; flex: none; background: var(--bg-2); }
.sheet footer .btn { flex: 1; }
@media (min-width: 760px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: min(640px, calc(100vw - 48px)); max-height: 86dvh; border-radius: 22px; transform: translate(-50%, -46%) scale(.98); opacity: 0; transition: transform .3s var(--ease), opacity .25s; }
  .sheet.wide { width: min(920px, calc(100vw - 48px)); }
  .sheet.in { transform: translate(-50%, -50%); opacity: 1; }
  .sheet .grab { display: none; }
}

/* ---------- Toast ---------- */
.toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab) + 14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; width: min(460px, calc(100vw - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: #1F242C; border: 1px solid var(--line-2); box-shadow: 0 18px 40px -16px rgba(0,0,0,.8);
  animation: toastIn .35s var(--ease); font-weight: 500; }
.toast.bad { border-color: rgba(255,90,95,.5); }
.toast.ok svg { color: var(--ok); } .toast.bad svg { color: var(--bad); }
.toast svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.toast.out { opacity: 0; transform: translateY(-8px); transition: all .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Menu de usuario ---------- */
.menu { position: fixed; z-index: 90; top: calc(var(--top) - 4px); right: 12px; width: 260px; background: #1A1E25; border: 1px solid var(--line-2); border-radius: 16px; padding: 8px;
  box-shadow: 0 24px 50px -20px rgba(0,0,0,.8); animation: toastIn .2s var(--ease); }
.menu .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 11px 12px; border: 0; background: none; color: var(--text); border-radius: 10px; cursor: pointer; text-align: left; text-decoration: none; font-weight: 500; }
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.menu svg { width: 18px; height: 18px; color: var(--text-2); }

/* ---------- Ingreso ---------- */
.login { position: relative; z-index: 1; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(420px, 100%); }
.login-logo { width: 116px; height: 116px; border-radius: 26px; object-fit: contain; margin: 0 auto 18px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 30px 60px -30px var(--acc-glow); }
.login h1 { text-align: center; font-size: clamp(30px, 8vw, 40px); text-transform: uppercase; letter-spacing: .03em; }
.login .sub { text-align: center; color: var(--text-2); margin: 8px 0 26px; }
.login .powered { text-align: center; font-size: 12px; color: var(--text-3); margin-top: 22px; letter-spacing: .12em; text-transform: uppercase; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px; }
.pw-wrap button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 40px; border: 0; background: none; color: var(--text-3); cursor: pointer; display: grid; place-items: center; }
.pw-wrap button svg { width: 20px; height: 20px; }
.form-error { color: var(--bad); font-size: 14px; min-height: 20px; margin-top: 8px; }
.suspended { text-align: center; max-width: 480px; margin: 18vh auto 0; padding: 24px; position: relative; z-index: 1; }

/* ---------- Cotizador ---------- */
.vtypes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 760px) { .vtypes { grid-template-columns: repeat(6, 1fr); } }
.vtype { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  color: var(--text-2); font-weight: 600; font-size: 13.5px; transition: all .2s var(--ease); }
.vtype img { width: 100%; height: 44px; object-fit: contain; filter: grayscale(.5) brightness(.9); transition: filter .2s, transform .3s var(--ease); }
.vtype:hover img { transform: translateX(3px); }
.vtype.on { border-color: var(--acc); background: var(--acc-soft); color: var(--text); box-shadow: 0 0 0 1px var(--acc) inset; }
.vtype.on img { filter: none; }
.svc-cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; margin: 0 -2px; }
.svc-cats::-webkit-scrollbar { display: none; }
.svc-list { display: grid; gap: 10px; grid-template-columns: 1fr; margin-top: 12px; }
@media (min-width: 760px) { .svc-list { grid-template-columns: 1fr 1fr; } }
.svc { position: relative; text-align: left; display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  color: var(--text); transition: border-color .2s, background .2s, transform .2s var(--ease); overflow: hidden; }
.svc:hover { border-color: var(--line-2); }
.svc .tick { width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--line-2); flex: none; display: grid; place-items: center; margin-top: 2px; transition: all .2s; }
.svc .tick svg { width: 15px; height: 15px; opacity: 0; transform: scale(.5); transition: all .2s var(--ease); color: var(--acc-ink); }
.svc.on { border-color: var(--acc); background: linear-gradient(150deg, var(--acc-soft), var(--surface) 60%); }
.svc.on .tick { background: var(--acc); border-color: var(--acc); }
.svc.on .tick svg { opacity: 1; transform: none; }
.svc .name { display: block; font-weight: 600; line-height: 1.25; }
.svc .desc { display: block; font-size: 13.5px; color: var(--text-3); margin-top: 3px; line-height: 1.35; }
.svc .price { font: 700 19px var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; margin-left: auto; padding-left: 8px; }
.svc .dur { font-size: 12.5px; color: var(--text-3); display: block; text-align: right; font-weight: 500; }
.lines .line { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 12px 0; border-bottom: 1px dashed var(--line-2); align-items: center; }
.lines .line:last-child { border-bottom: 0; }
.lines .line .nm { font-weight: 600; }
.lines .line .ctl { display: flex; gap: 6px; align-items: center; grid-column: 1 / -1; flex-wrap: wrap; }
.lines .line .ctl .qty { width: 64px; }
.lines .line .ctl .pr { width: 140px; }
.lines .line .ctl input { min-height: 38px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); font-size: 15px; }
.lines .line .ctl .input-money input { padding-left: 24px; }
.lines .line .ctl .input-money::before { left: 10px; }
.summary { position: sticky; top: calc(var(--top) + 14px); }
.totals { display: grid; gap: 8px; }
.totals .t { display: flex; justify-content: space-between; color: var(--text-2); font-variant-numeric: tabular-nums; }
.totals .t.grand { color: var(--text); font: 700 30px var(--display); padding-top: 10px; border-top: 1px solid var(--line-2); margin-top: 6px; align-items: baseline; }
.totals .t.grand span:first-child { font-size: 15px; letter-spacing: .14em; color: var(--text-2); font-family: var(--font); font-weight: 600; text-transform: uppercase; }
.cot-layout { display: grid; gap: 14px; }
@media (min-width: 1100px) { .cot-layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }
.sticky-total { position: fixed; left: 0; right: 0; bottom: calc(var(--tab) + env(safe-area-inset-bottom)); z-index: 38; padding: 10px 16px; background: rgba(17,20,25,.95); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: 12px; }
.sticky-total .amt { font: 700 26px var(--display); font-variant-numeric: tabular-nums; flex: 1; }
.sticky-total .amt small { display: block; font: 600 11px var(--font); letter-spacing: .14em; color: var(--text-3); text-transform: uppercase; }
@media (min-width: 1100px) { .sticky-total { display: none; } }
.ac { position: relative; }
.ac-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); background: #1B2028; border: 1px solid var(--line-2); border-radius: 14px; padding: 6px; max-height: 280px; overflow-y: auto; box-shadow: 0 20px 40px -14px rgba(0,0,0,.8); }
.ac-list button { width: 100%; display: block; text-align: left; padding: 10px 12px; border: 0; background: none; border-radius: 10px; cursor: pointer; color: var(--text); }
.ac-list button:hover, .ac-list button.on { background: var(--surface-3); }
.ac-list .faint { font-size: 13px; }

/* ---------- Agenda ---------- */
.week-nav { display: flex; align-items: center; gap: 8px; }
.week-nav .range { font: 700 20px var(--display); text-transform: uppercase; letter-spacing: .03em; min-width: 0; flex: 1; text-align: center; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 14px 0; }
.day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--text-2); position: relative; }
.day .dn { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.day .dd { font: 700 22px/1 var(--display); color: var(--text); }
.day .dots { display: flex; gap: 3px; height: 6px; margin-top: 3px; }
.day .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--acc); }
.day.closed { opacity: .45; }
.day.today .dd { color: var(--acc); }
.day.on { border-color: var(--acc); background: var(--acc-soft); }
.timeline { position: relative; display: flex; flex-direction: column; gap: 10px; }
.slot-free { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--text-3); cursor: pointer; background: none; width: 100%; text-align: left; }
.slot-free:hover { border-color: var(--acc); color: var(--text); }
.slot-free svg { width: 20px; height: 20px; flex: none; }
.appt { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: stretch; cursor: pointer; }
.appt .hour { font: 700 20px/1 var(--display); padding-top: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.appt .hour small { display: block; font: 500 12px var(--font); color: var(--text-3); margin-top: 4px; }
.appt .box { position: relative; padding: 12px 14px 12px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.appt .box::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--info); }
.appt.confirmada .box::before { background: var(--warn); } .appt.en_taller .box::before { background: var(--acc); } .appt.completada .box::before { background: var(--ok); }
.appt.cancelada .box, .appt.no_asistio .box { opacity: .5; } .appt.cancelada .box::before, .appt.no_asistio .box::before { background: var(--bad); }
.appt:hover .box { border-color: var(--line-2); }
.week-grid { display: none; }
@media (min-width: 1100px) {
  .agenda-wrap { display: grid; grid-template-columns: 1fr; }
  .week-grid { display: grid; grid-template-columns: 56px repeat(7, 1fr); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); position: relative; }
  .week-grid .wh { padding: 10px 8px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); font-weight: 600; font-size: 13px; color: var(--text-2); text-align: center; cursor: pointer; }
  .week-grid .wh b { display: block; font: 700 22px var(--display); color: var(--text); }
  .week-grid .wh.today b { color: var(--acc); }
  .week-grid .col { position: relative; border-left: 1px solid var(--line); }
  .week-grid .hrs { position: relative; }
  .week-grid .hl { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
  .week-grid .hl span { position: absolute; top: -9px; left: 6px; font-size: 11.5px; color: var(--text-3); background: var(--surface); padding: 0 2px; }
  .week-grid .ev { position: absolute; left: 4px; right: 4px; border-radius: 10px; padding: 6px 8px; font-size: 12.5px; line-height: 1.25; overflow: hidden; cursor: pointer;
    background: color-mix(in srgb, var(--info) 22%, var(--surface-2)); border-left: 3px solid var(--info); }
  .week-grid .ev.confirmada { background: color-mix(in srgb, var(--warn) 20%, var(--surface-2)); border-left-color: var(--warn); }
  .week-grid .ev.en_taller { background: color-mix(in srgb, var(--acc) 22%, var(--surface-2)); border-left-color: var(--acc); }
  .week-grid .ev.completada { background: color-mix(in srgb, var(--ok) 18%, var(--surface-2)); border-left-color: var(--ok); }
  .week-grid .ev.cancelada, .week-grid .ev.no_asistio { opacity: .45; border-left-color: var(--bad); }
  .week-grid .ev b { display: block; font-weight: 700; }
  .week-grid .now { position: absolute; left: 0; right: 0; height: 2px; background: var(--acc); box-shadow: 0 0 10px var(--acc-glow); z-index: 2; }
  .week-grid .cell-add { position: absolute; left: 0; right: 0; cursor: copy; }
  .week-grid .cell-add:hover { background: rgba(255,255,255,.03); }
  .agenda-mobile { display: none; }
}

/* ---------- Taller / orden de trabajo ---------- */
.board { display: grid; gap: 14px; }
@media (min-width: 1100px) { .board.kanban { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); align-items: start; } }
.lane-head { display: flex; align-items: center; gap: 8px; margin: 0 2px 10px; font: 700 15px var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
.lane-head .n { color: var(--text-3); }
.job-card { display: block; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); position: relative; overflow: hidden; cursor: pointer; }
.job-card + .job-card { margin-top: 10px; }
.job-card:hover { border-color: var(--line-2); }
.job-card .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.job-card .veh { font-weight: 600; margin-top: 8px; overflow-wrap: anywhere; }
.lines .line .nm, .tbl td { overflow-wrap: anywhere; }
@media (min-width: 960px) { .toasts { bottom: 24px; } }
.job-card .svcs { font-size: 13.5px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 12px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--acc), var(--acc-2)); border-radius: inherit; box-shadow: 0 0 12px var(--acc-glow); transition: width .5s var(--ease); }
.steps-flow { display: flex; gap: 4px; margin: 4px 0 2px; }
.steps-flow .sf { flex: 1; height: 5px; border-radius: 99px; background: var(--surface-3); }
.steps-flow .sf.on { background: var(--acc); }
.steps-flow .sf.done { background: color-mix(in srgb, var(--acc) 55%, var(--surface-3)); }
.flow-labels span { flex: 1; text-align: center; padding: 0 2px; }
.flow-labels span:first-child { text-align: left; } .flow-labels span:last-child { text-align: right; }
@media (max-width: 640px) { .flow-labels span:not(.cur) { display: none; } .flow-labels span.cur { text-align: left; color: var(--acc-2); } }
.flow-labels { display: flex; justify-content: space-between; gap: 6px; font-size: 11.5px; color: var(--text-3); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 4px 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { position: relative; padding: 12px 14px; border: 0; background: none; color: var(--text-3); font-weight: 600; cursor: pointer; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs button.on { color: var(--text); }
.tabs button.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--acc); box-shadow: 0 0 12px var(--acc-glow); }
.tabs .lock { width: 14px; height: 14px; color: var(--text-3); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 15px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.fuel { display: flex; gap: 4px; align-items: flex-end; }
.fuel button { flex: 1; height: 34px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface-2); cursor: pointer; }
.fuel button.on { background: var(--acc); border-color: var(--acc); }
.fuel-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); margin-top: 6px; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.check-row:last-child { border-bottom: 0; }
.check-row .lbl { flex: 1; }

/* Dibujo del vehiculo (heredado de DyPGestion) */
.car-stage { background: radial-gradient(ellipse at 50% 60%, #222831 0%, var(--bg-2) 70%); border-radius: 18px; border: 1px solid var(--line); padding: 12px; }
.car-views { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.car-svg { width: 100%; height: auto; max-height: 300px; }
.car-svg .car-zone { fill: transparent; stroke: transparent; cursor: pointer; transition: fill .2s; }
.car-svg .car-zone:hover { fill: rgba(255,255,255,.12); }
.car-svg .car-zone.on { fill: var(--warn); fill-opacity: .55; stroke: #9A7600; stroke-width: 3; }
.car-svg .car-zone.passive { pointer-events: none; }
.car-svg .car-zone:focus-visible { outline: none; fill: rgba(255,255,255,.2); }
.car-sheet { width: 100%; height: auto; background: #fff; border-radius: 12px; }
.car-sheet .car-zone.on { fill: #FFC928; fill-opacity: .6; stroke: #9A7600; stroke-width: 3; }
.car-sheet .car-zone { fill: transparent; }
.sheet-label { font: 700 16px Arial, sans-serif; fill: #2A313A; }
.mark-list .mk { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.mark-types { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }

/* Firma */
.sig-pad { width: 100%; height: 190px; border-radius: 14px; background: #F4F5F7; touch-action: none; cursor: crosshair; display: block; }
.sig-img { width: 100%; max-width: 360px; height: auto; border-radius: 10px; background: #F4F5F7; }

/* Fotos */
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 760px) { .photos { grid-template-columns: repeat(5, 1fr); } }
.photo { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); cursor: zoom-in; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .tag { position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; background: rgba(0,0,0,.65); color: #fff; text-transform: uppercase; }
.photo .x { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 9px; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.photo .x svg { width: 16px; height: 16px; }
.photo.add { display: grid; place-items: center; border-style: dashed; border-color: var(--line-2); color: var(--text-3); cursor: pointer; background: transparent; }
.photo.add:hover { color: var(--acc); border-color: var(--acc); }
.photo.add svg { width: 26px; height: 26px; }
.photo.pending { opacity: .6; }
.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(0,0,0,.92); display: grid; place-items: center; padding: 20px; cursor: zoom-out; animation: toastIn .2s; }
.lightbox img { max-width: 100%; max-height: 86dvh; border-radius: 12px; }
.lightbox .cap { position: absolute; bottom: 20px; left: 20px; right: 20px; text-align: center; color: #ddd; font-size: 14px; }

/* Checklist de calidad */
.qc-head { display: flex; align-items: center; gap: 16px; }
.ring { width: 86px; height: 86px; flex: none; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring .bg { stroke: var(--surface-3); }
.ring .fg { stroke: var(--acc); stroke-linecap: round; transition: stroke-dashoffset .6s var(--ease); filter: drop-shadow(0 0 6px var(--acc-glow)); }
.ring .pct { position: absolute; inset: 0; display: grid; place-items: center; font: 700 22px var(--display); }
.stage { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
.stage + .stage { margin-top: 10px; }
.stage > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; }
.stage > summary::-webkit-details-marker { display: none; }
.stage .idx { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; font: 700 17px var(--display); background: var(--surface-3); color: var(--text-2); }
.stage.done .idx { background: var(--acc); color: var(--acc-ink); }
.stage .st-title { display: block; font-weight: 600; }
.stage .idx svg { width: 18px; height: 18px; }
.stage .st-meta { display: block; font-size: 13px; color: var(--text-3); }
.stage .chev { width: 20px; height: 20px; color: var(--text-3); transition: transform .25s; }
.stage[open] .chev { transform: rotate(180deg); }
.stage .st-body { padding: 0 16px 16px; }
.step { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; align-items: flex-start; }
.step .box { width: 26px; height: 26px; flex: none; border-radius: 8px; border: 1.5px solid var(--line-2); display: grid; place-items: center; transition: all .2s var(--ease); margin-top: 1px; }
.step .box svg { width: 16px; height: 16px; color: var(--acc-ink); opacity: 0; transform: scale(.4) rotate(-20deg); transition: all .25s var(--ease); }
.step.done .box { background: var(--acc); border-color: var(--acc); }
.step.done .box svg { opacity: 1; transform: none; }
.step .txt { flex: 1; font-size: 15px; line-height: 1.45; }
.step.done .txt { color: var(--text-2); }
.step .who { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.step[aria-disabled="true"] { cursor: default; }
.ev-photos { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.burst { position: fixed; pointer-events: none; z-index: 130; width: 0; height: 0; }
.burst i { position: absolute; width: 10px; height: 10px; color: var(--acc); animation: burst .7s var(--ease) forwards; }
@keyframes burst { from { transform: translate(0,0) scale(.3); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(1) rotate(90deg); opacity: 0; } }

/* Upsell plan Master */
.locked { text-align: center; padding: 36px 20px; border: 1px dashed var(--line-2); border-radius: 20px; background: linear-gradient(180deg, var(--acc-soft), transparent 70%); }
.locked .spark-big { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--acc); }
.locked h3 { font: 700 22px var(--display); text-transform: uppercase; color: var(--text); letter-spacing: .03em; }
.locked p { color: var(--text-2); max-width: 420px; margin: 8px auto 0; }

/* ---------- Reportes ---------- */
.chart { width: 100%; height: 220px; }
.chart .bar-in { fill: var(--acc); }
.chart .bar-out { fill: #5C6672; }
.chart text { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart .gl { stroke: var(--line); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 8px 0; }
.hbar .nm { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .vl { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14.5px; }
.hbar .tr { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.hbar .tr i { display: block; height: 100%; background: var(--acc); border-radius: inherit; }
.hbar.out .tr i { background: #7D8793; }
.month-nav { display: flex; align-items: center; gap: 8px; }
.month-nav .m { font: 700 22px var(--display); text-transform: uppercase; min-width: 170px; text-align: center; letter-spacing: .03em; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td.r, .tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }

/* ---------- Ajustes ---------- */
.set-nav { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .set-nav { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .set-nav { grid-template-columns: repeat(3, 1fr); } }
.set-tile { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; text-align: left; color: var(--text); position: relative; overflow: hidden; }
.set-tile:hover { border-color: var(--line-2); }
.set-tile .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--acc-soft); color: var(--acc); flex: none; }
.set-tile .ic svg { width: 21px; height: 21px; }
.set-tile b { display: block; font-weight: 600; }
.set-tile small { color: var(--text-3); font-size: 13.5px; line-height: 1.35; display: block; margin-top: 2px; }
.price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .price-grid { grid-template-columns: repeat(3, 1fr); } }
.cl-stage { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--surface); }
.cl-stage + .cl-stage { margin-top: 10px; }
.cl-step { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; }
.cl-step textarea { flex: 1; min-height: 48px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg-2); resize: vertical; font-size: 15px; }
.secret { font: 700 26px var(--display); letter-spacing: .1em; text-align: center; padding: 16px; border-radius: 14px; background: var(--bg); border: 1px dashed var(--acc); margin: 12px 0; user-select: all; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
