/* =========================================================
   Estilos — minimalista, mobile first
   ========================================================= */
:root {
  /* Tintas de la marca (anillo CMYK del logo) */
  --c: #1c9cd6;
  --m: #e40a7c;
  --y: #fae500;
  --k: #231f20;
  --navy: #0c324c;

  --bg: #f4f7f9;
  --surface: #ffffff;
  --text: #13202b;
  --muted: #5d6a74;
  --line: #e2e8ec;
  --line-strong: #cdd6dc;
  --accent: var(--navy);
  --accent-text: #ffffff;
  --ok: #18794e;
  --ok-bg: #e9f5ee;
  --warn: #9a5b00;
  --warn-bg: #fdf4e3;
  --err: #c0362c;
  --info: #1d6f99;
  --info-bg: #e7f3fa;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.04);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --k: #e4eaee;
    --bg: #0a1621; --surface: #10212f; --text: #eef3f6; --muted: #98a9b6;
    --line: #1d3344; --line-strong: #2b4558; --accent: #3fb0e3; --accent-text: #04131d;
    --ok: #4cc38a; --ok-bg: #15291f; --warn: #f0b04a; --warn-bg: #2d2412;
    --err: #ff7a6e; --info: #6cc3ec; --info-bg: #11293a;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1 { font-size: 1.5rem; line-height: 1.2; margin: 0 0 .35rem; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
svg { width: 100%; height: 100%; }

.container { max-width: 1120px; margin: 0 auto; padding: 16px 16px 120px; }
.hint { color: var(--muted); font-size: .85rem; display: block; }

/* ---------- Barra superior ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(10px); }
/* Detalle de identidad: barra de control de color, como en el borde de un pliego impreso */
.topbar::after { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--c) 0 25%, var(--m) 25% 50%, var(--y) 50% 75%, var(--navy) 75%); }
.topbar-inner { max-width: 1120px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; }
.logo-icon { width: 38px; height: 38px; flex: none; border-radius: 50%; background: #fff; }
.wordmark { font-family: Montserrat, var(--font); font-weight: 300; font-size: 1.1rem; letter-spacing: -.01em; white-space: nowrap; }
.wordmark b { font-weight: 800; }
.wordmark i { font-style: normal; color: var(--c); }
@media (max-width: 380px) { .wordmark { font-size: .95rem; } .clock #reloj { display: none; } }
.clock { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; text-transform: capitalize; }
.clock-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

/* ---------- Catálogo ---------- */
.hero { padding: 12px 0 18px; }
.banner { margin-top: 12px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); font-size: .9rem; }
.dot-live { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.card-media { height: 120px; display: grid; place-items: center; background: var(--bg); border-bottom: 1px solid var(--line); color: var(--text); }
.card-media svg { width: 64px; height: 64px; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-title { font-size: 1.1rem; }
.card-body > .hint { margin-top: -8px; }
.specs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.specs li { font-size: .78rem; padding: 3px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line-strong); background: transparent; border-radius: 999px; padding: 7px 12px; cursor: pointer; font-size: .88rem; }
.chip small { color: var(--muted); }
.chip.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.chip.on small { color: inherit; opacity: .75; }

.qty-row { display: flex; align-items: center; gap: 10px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.stepper button { width: 38px; height: 38px; border: 0; background: transparent; font-size: 1.15rem; cursor: pointer; }
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper input { width: 46px; height: 38px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; background: transparent; font-size: 16px; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.price-row { margin-top: auto; padding-top: 4px; }
.price { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.badge { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 9px 12px; border-radius: var(--radius-sm); font-size: .88rem; }
.badge strong { font-weight: 650; }
.badge small { flex-basis: 100%; font-size: .78rem; opacity: .85; }
.badge.hoy { background: var(--ok-bg); color: var(--ok); }
.badge.manana { background: var(--info-bg); color: var(--info); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-weight: 600; }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.block { width: 100%; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: .88rem; }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: .88rem; align-self: flex-start; }
.link.danger { color: var(--err); }
:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }

/* ---------- Pasos ---------- */
.steps { list-style: none; padding: 0; margin: 4px 0 16px; display: flex; gap: 6px; }
.steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.steps li span { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; background: var(--line); color: var(--muted); }
.steps li em { font-style: normal; }
/* Cada paso suma una tinta: C → M → Y → K */
.steps li:nth-child(1) { --ink: var(--c); --ink-text: #fff; }
.steps li:nth-child(2) { --ink: var(--m); --ink-text: #fff; }
.steps li:nth-child(3) { --ink: var(--y); --ink-text: #231f20; }
.steps li:nth-child(4) { --ink: var(--k); --ink-text: var(--bg); }
.steps li.current, .steps li.done { color: var(--text); border-color: var(--ink); }
.steps li.current span, .steps li.done span { background: var(--ink); color: var(--ink-text); }
.steps li.current { font-weight: 600; }
@media (max-width: 520px) { .steps li:not(.current) em { display: none; } }

/* ---------- Paneles ---------- */
.layout { display: grid; gap: 16px; max-width: 720px; margin: 0 auto; }
.layout.two { max-width: none; }
.layout > * { min-width: 0; }   /* evita que el contenido ensanche la columna en celular */
@media (min-width: 900px) { .layout.two { grid-template-columns: 1.4fr 1fr; align-items: start; } .layout.two > aside { position: sticky; top: 72px; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.sub { font-size: .95rem; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.sub.first { margin-top: 0; padding-top: 0; border-top: 0; }

.summary { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line); }
.summary-icon { width: 40px; height: 40px; flex: none; padding: 6px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.summary-text { flex: 1; min-width: 0; }
.summary .link { align-self: center; }

.specbox { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 620px) { .specbox { grid-template-columns: repeat(4, 1fr); } }
.specbox > div { padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.specbox strong { font-size: .92rem; }

/* ---------- Subida de arte ---------- */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); text-align: center; cursor: pointer; transition: background .15s, border-color .15s; }
.dropzone:hover, .dropzone.over { background: var(--bg); border-color: var(--accent); }
.dz-icon { width: 36px; height: 36px; color: var(--muted); }

.artes { display: flex; flex-direction: column; gap: 10px; }
.arte { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.arte-thumb { width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; }
.arte-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.ext { font-size: .75rem; font-weight: 700; color: var(--muted); }
.arte-info { min-width: 0; }
.arte-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arte-side { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
@media (min-width: 620px) { .arte { grid-template-columns: 72px 1fr auto; } .arte-side { grid-column: auto; flex-direction: column; align-items: flex-end; border-top: 0; padding-top: 0; } }
.checks { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 3px; font-size: .8rem; }
.checks li::before { margin-right: 6px; font-weight: 700; }
.checks .ok { color: var(--ok); } .checks .ok::before { content: "✓"; }
.checks .warn { color: var(--warn); } .checks .warn::before { content: "!"; }
.checks .info { color: var(--info); } .checks .info::before { content: "i"; }

.distrib { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: .9rem; }
.distrib.ok { background: var(--ok-bg); color: var(--ok); }
.distrib.pend { background: var(--warn-bg); color: var(--warn); }

/* ---------- Formularios ---------- */
.form-grid { display: grid; gap: 12px; }
@media (min-width: 620px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; font-size: 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface);
}
.field textarea { resize: vertical; }
.field .invalid, .check.invalid { border-color: var(--err); }
.err { color: var(--err); font-size: .8rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; cursor: pointer; padding: 2px 0; }
.check input { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: var(--accent); }
.check.warn { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--warn-bg); color: var(--warn); }
.check.invalid { color: var(--err); }

.entrega-box { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--info-bg); color: var(--info); }
.entrega-box.hoy { background: var(--ok-bg); color: var(--ok); }
.entrega-box strong { font-size: 1.05rem; }
.entrega-box .hint { color: inherit; opacity: .85; }

.lines { display: flex; flex-direction: column; }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: .92rem; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.line .hint { display: inline; }
.line.muted { color: var(--muted); font-size: .85rem; }
.line.total { border-bottom: 0; font-size: 1.1rem; padding-top: 12px; }

.segmented { display: inline-flex; padding: 3px; border-radius: var(--radius-sm); background: var(--bg); border: 1px solid var(--line); align-self: flex-start; }
.segmented button { border: 0; background: transparent; padding: 8px 18px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--muted); }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

.pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pay { text-align: left; padding: 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: transparent; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.pay.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.gateway-note { font-size: .85rem; color: var(--muted); padding: 12px; border-radius: var(--radius-sm); border: 1px dashed var(--line-strong); }

/* ---------- Barra de acción inferior ---------- */
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.actionbar-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.actionbar-total { flex: 1; text-align: right; line-height: 1.15; font-variant-numeric: tabular-nums; }
.actionbar-total strong { font-size: 1.1rem; }
@media (max-width: 420px) { .actionbar .btn.ghost { padding: 0 8px; } }

/* ---------- Seguimiento ---------- */
.track-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px; }
.track-head h1 { margin: 0; }
.action-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); }
.action-card > div { display: flex; flex-direction: column; gap: 4px; }
.action-card.ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-bg); }
.action-card.proof { flex-direction: column; align-items: stretch; gap: 14px; }
.action-card .ic { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; font-weight: 700; }
.proof-head { display: flex; flex-direction: column; gap: 2px; }
.proof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.proof-grid figure { margin: 0; }
.proof-grid img, .proof-file { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.proof-file { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; color: var(--muted); background: var(--bg); font-size: .8rem; font-weight: 700; }
.proof-file svg { width: 36px; height: 36px; }
.proof-grid figcaption { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.checklist { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: var(--radius-sm); background: var(--bg); }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.cambios { display: flex; flex-direction: column; gap: 8px; }
.cambios textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); font-size: 16px; }
.warn-text { color: var(--warn); }
.stars { display: flex; gap: 4px; margin-top: 6px; }
.stars button { border: 0; background: none; font-size: 1.6rem; color: var(--line-strong); cursor: pointer; padding: 0 2px; }
.stars:hover button { color: var(--warn); }
.stars button:hover ~ button { color: var(--line-strong); }

.spinner { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--c); border-right-color: var(--m); border-bottom-color: var(--y); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

.timeline { list-style: none; padding: 0; margin: 4px 0 0; }
.timeline li { position: relative; display: flex; gap: 12px; padding: 0 0 16px; color: var(--muted); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li > div { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.timeline strong { font-weight: 500; }
.tl-dot { position: relative; z-index: 1; width: 16px; height: 16px; flex: none; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); }
.timeline li.done { color: var(--text); }
.timeline li.done .tl-dot { background: var(--ok); border-color: var(--ok); }
.timeline li.done::before { background: var(--ok); }
.timeline li.current { color: var(--text); }
.timeline li.current strong { font-weight: 700; }
.timeline li.current .tl-dot { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }

.chat { gap: 12px; }
.thread { display: flex; flex-direction: column; gap: 8px; max-height: 380px; min-height: 140px; overflow-y: auto; padding: 4px 2px; }
.msg { max-width: 85%; padding: 8px 12px; border-radius: 14px; font-size: .9rem; display: flex; flex-direction: column; gap: 2px; }
.msg .who { font-size: .72rem; font-weight: 700; color: var(--muted); }
.msg time { font-size: .7rem; color: var(--muted); align-self: flex-end; }
.msg.taller { background: var(--bg); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.cliente { background: var(--accent); color: var(--accent-text); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.cliente .who, .msg.cliente time { color: inherit; opacity: .7; }
.msg.sys { align-self: center; max-width: 100%; text-align: center; background: none; color: var(--muted); font-size: .8rem; padding: 2px 8px; }
.composer { display: flex; gap: 8px; }
.composer input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; font-size: 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.doc { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); font-size: .88rem; }

.demo-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: var(--accent); color: var(--accent-text); padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); font-size: .85rem; }
.demo-inner { max-width: 1120px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.demo-actions { display: flex; gap: 6px; }
.demo-bar .btn { background: var(--accent-text); color: var(--accent); border-color: transparent; }
.demo-bar .btn.ghost { background: transparent; color: var(--accent-text); border-color: color-mix(in srgb, var(--accent-text) 40%, transparent); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 50; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: var(--radius-sm); background: var(--accent); color: var(--accent-text); font-size: .9rem; box-shadow: 0 8px 30px rgba(0,0,0,.2); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Enlace a la otra web (demo) ---------- */
.demo-link { color: inherit; font-weight: 600; margin-left: 6px; white-space: nowrap; text-underline-offset: 3px; }

/* =========================================================
   PORTAL DEL PRODUCTOR — una columna, botones grandes, todo al alcance del pulgar
   ========================================================= */
.portal-wrap { max-width: 560px; display: flex; flex-direction: column; gap: 14px; }
.portal-tag { font-size: .78rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-text); letter-spacing: .02em; }
.portal .steps { margin-bottom: 0; }
.btn.grow { flex: 1; }
.btn.danger { background: var(--err); border-color: var(--err); color: #fff; }
.portal .btn { min-height: 50px; font-size: 1rem; }
.portal .btn.small { min-height: 40px; font-size: .88rem; }
.p-bar { gap: 10px; }
.p-center { text-align: center; }

.p-head { display: flex; flex-direction: column; gap: 2px; }
.p-head h1 { margin: 0; }
.p-head p { margin: 4px 0 0; }
.p-code { font-size: .8rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.p-h2 { font-size: 1rem; margin: 6px 0 -4px; }

.p-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.p-prod { display: flex; align-items: center; gap: 12px; }
.p-prod .summary-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.p-qty { text-align: right; display: flex; flex-direction: column; line-height: 1.1; }
.p-qty strong { font-size: 1.8rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.p-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.p-facts > div { display: flex; flex-direction: column; }
.p-pay { grid-column: 1 / -1; flex-direction: row !important; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--ok-bg); color: var(--ok); }
.p-pay .hint { color: inherit; }
.p-pay strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }

/* Contador para aceptar */
.p-timer { text-align: center; padding: 8px 0 2px; }
.p-timer-num { font-size: 3.2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--text); }
.p-timer-num.urgente { color: var(--m); }
.p-timer-bar { height: 6px; border-radius: 999px; background: var(--line); margin: 12px auto 0; max-width: 260px; overflow: hidden; }
.p-timer-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--c), var(--m)); transition: width 1s linear; }

/* Hoja inferior (motivo de rechazo) */
.sheet-bg { position: fixed; inset: 0; z-index: 40; background: rgba(4, 19, 29, .45); }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 560px; margin: 0 auto; background: var(--surface); border-radius: 20px 20px 0 0; padding: 22px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; box-shadow: 0 -10px 40px rgba(0,0,0,.2); animation: sube .2s ease-out; }
.sheet h2 { font-size: 1.2rem; }
.sheet p { margin: 0; }
.sheet .row { flex-wrap: nowrap; }
.p-motivos .chip, .p-rapidos .chip { min-height: 44px; }
@keyframes sube { from { transform: translateY(30px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } .p-timer-bar i { transition: none; } }

.p-alert { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: var(--radius-sm); border-left: 4px solid var(--m); background: color-mix(in srgb, var(--m) 8%, var(--surface)); }
.p-alert .hint { color: var(--m); font-weight: 600; }
.p-note { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--info-bg); color: var(--info); font-size: .92rem; display: flex; flex-direction: column; gap: 2px; }
.p-note .hint { color: inherit; opacity: .85; }

.p-spec summary, .p-chat summary { cursor: pointer; display: flex; flex-direction: column; gap: 2px; list-style: none; }
.p-spec summary::-webkit-details-marker, .p-chat summary::-webkit-details-marker { display: none; }
.p-spec summary strong::after, .p-chat summary strong::after { content: " ›"; color: var(--muted); }
.p-spec[open] summary, .p-chat[open] summary { margin-bottom: 12px; }
.p-chat .composer { margin-top: 10px; }
.p-chat > .hint { margin-top: 8px; }

/* Diseños a revisar */
.p-arte { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.p-arte-img { position: relative; background: #fff; display: grid; place-items: center; height: clamp(190px, 52vw, 280px); border-bottom: 1px solid var(--line); }
.p-arte-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.p-arte-img .proof-file { border: 0; aspect-ratio: auto; width: auto; background: none; }
.p-arte-img .p-tag { z-index: 1; }
.p-tag { position: absolute; top: 10px; left: 10px; font-size: .75rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--m); color: #fff; }
.p-arte-info { padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.p-arte-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.p-units { font-weight: 700; font-variant-numeric: tabular-nums; }
.p-file { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-arte .row { margin-top: 6px; align-items: center; }

.p-wait { display: flex; gap: 14px; align-items: flex-start; }
.p-wait > div { display: flex; flex-direction: column; gap: 4px; }
.proof-grid.single { grid-template-columns: 1fr; }
.proof-grid.single img { aspect-ratio: 4 / 3; }

.p-deadline { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 18px 14px; border-radius: var(--radius); background: var(--accent); color: var(--accent-text); }
.p-deadline .hint { color: inherit; opacity: .8; }
.p-deadline strong { font-size: 1.45rem; letter-spacing: -.01em; }

/* Foto de control de calidad */
.photo-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 220px; padding: 20px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius); text-align: center; cursor: pointer; background: var(--surface); overflow: hidden; }
.photo-drop .dz-icon { width: 48px; height: 48px; color: var(--c); }
.photo-drop.has { padding: 0; border-style: solid; }
.photo-drop.has img { width: 100%; max-height: 340px; object-fit: cover; }

.p-moto { display: flex; align-items: center; gap: 14px; }
.p-moto > div { display: flex; flex-direction: column; }
.p-moto-icon { width: 52px; height: 52px; flex: none; padding: 8px; border-radius: 50%; background: var(--info-bg); color: var(--info); }

/* Pantallas vacías y final */
.p-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 28px 4px; }
.p-empty h1 { margin: 0; }
.p-empty > .hint { max-width: 380px; }
.p-empty-icon { width: 76px; height: 76px; padding: 16px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.p-demo-note { margin-top: 10px; padding: 14px; border-radius: var(--radius-sm); border: 1px dashed var(--line-strong); font-size: .9rem; color: var(--muted); display: flex; flex-direction: column; gap: 12px; text-align: left; }
.p-demo-note a { text-decoration: none; color: var(--text); }
.p-check { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; font-weight: 700; color: #fff; background: radial-gradient(circle, var(--ok) 0 62%, transparent 63%), conic-gradient(var(--c) 0 25%, var(--m) 0 50%, var(--y) 0 75%, var(--navy) 0); }
.p-liq { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; }
.p-liq strong { font-size: 1.3rem; color: var(--ok); font-variant-numeric: tabular-nums; }

/* =========================================================
   PÁGINA DEL SUPERVISOR — celular primero, columnas en pantallas grandes
   ========================================================= */
.sup-wrap { display: flex; flex-direction: column; gap: 16px; padding-bottom: 40px; }
.sin-scroll { overflow: hidden; }
.sup-head h1 { margin: 0; }
.live { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; }

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 820px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; min-height: 92px; }
.kpi strong { font-size: clamp(1.3rem, 5vw, 1.75rem); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi small { color: var(--muted); font-size: .78rem; }
.kpi.alerta { border-color: var(--m); box-shadow: inset 4px 0 0 var(--m); }
.kpi.alerta strong { color: var(--m); }
.kpi.deuda { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.kpi.deuda .hint, .kpi.deuda small { color: inherit; opacity: .8; }

.sup-tabs { align-self: stretch; display: flex; overflow-x: auto; }
.sup-tabs button { flex: 1; white-space: nowrap; min-height: 42px; }
@media (min-width: 620px) { .sup-tabs { align-self: flex-start; } }
.sup-filtros .chip { min-height: 40px; }
.sup-intro { margin: 0; }

.sup-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 700px) { .sup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .sup-grid:not(.dos) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.sup-card { text-align: left; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); cursor: pointer; transition: border-color .15s; }
.sup-card:hover { border-color: var(--line-strong); }
.sup-card.con-alerta { border-color: color-mix(in srgb, var(--m) 50%, var(--line)); }
.sup-card-top { display: flex; align-items: center; gap: 8px; }
.sup-card-top > .hint { margin-left: auto; }
.sup-estado { font-weight: 650; }
.sup-estado.grande { font-size: 1.15rem; }
.sup-linea { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; }
.sup-linea > :last-child { text-align: right; }
.sup-montos { align-items: center; padding-top: 8px; border-top: 1px solid var(--line); }
.sup-alerta { font-size: .85rem; font-weight: 600; color: var(--m); padding: 8px 10px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--m) 9%, var(--surface)); }

/* Barra de avance de 7 etapas */
.etapas { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.etapas i { height: 5px; border-radius: 3px; background: var(--line); }
.etapas i.done { background: var(--c); }
.etapas i.now { background: var(--m); }

.pill { display: inline-flex; align-items: center; font-size: .75rem; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); border-color: transparent; color: var(--ok); }
.pill.deuda { background: color-mix(in srgb, var(--y) 30%, var(--surface)); border-color: transparent; color: var(--text); }

/* Pagos por taller */
.sup-taller h2 { font-size: 1.1rem; }
.sup-taller-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sup-deuda { text-align: right; display: flex; flex-direction: column; }
.sup-deuda strong { font-size: 1.4rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sup-filas { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.sup-fila { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 56px; }
.sup-fila:last-child { border-bottom: 0; }
.sup-fila input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.sup-fila-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sup-fila-monto { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sup-al-dia { margin: 0; padding: 12px; border-radius: var(--radius-sm); background: var(--ok-bg); color: var(--ok); font-weight: 600; }

/* Historial de pagos */
.sup-pago { flex-direction: row; align-items: flex-start; gap: 14px; }
.sup-const { flex: none; width: 92px; height: 120px; padding: 0; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg); overflow: hidden; cursor: zoom-in; display: grid; place-items: center; }
.sup-const img { width: 100%; height: 100%; object-fit: cover; }
.sup-pago-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sup-pago-info strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }

/* Hojas y visor */
.sup-sheet { max-width: 620px; max-height: 92vh; overflow-y: auto; }
@media (min-width: 700px) { .sup-sheet { bottom: auto; top: 50%; transform: translateY(-50%); border-radius: 20px; animation: none; } }
.sheet-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sheet-top h2 { font-size: 1.3rem; margin: 0; }
.sup-resumen-pago { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: var(--radius-sm); background: var(--accent); color: var(--accent-text); }
.sup-resumen-pago strong { font-size: 1.8rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sup-resumen-pago .hint { color: inherit; opacity: .8; }
.sup-drop { min-height: 150px; }
.sup-drop.has img { max-height: 260px; object-fit: contain; background: #fff; }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(4, 19, 29, .82); display: grid; place-items: center; padding: 16px; }
.lightbox-in { max-width: 520px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; color: #fff; text-align: center; }
.lightbox-in img { max-height: 72vh; width: auto; max-width: 100%; border-radius: 10px; background: #fff; }
.lightbox-in p { margin: 0; font-size: .92rem; }
.lightbox-in .btn { background: #fff; color: #13202b; border-color: #fff; min-width: 140px; }

.sup-demo { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 14px; border-radius: var(--radius-sm); border: 1px dashed var(--line-strong); }
.sup-demo a { text-decoration: none; color: var(--text); }
.p-empty h2 { font-size: 1.15rem; }

/* ---------- Historial del taller ---------- */
.hist-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-weight: 650; font-size: .88rem; cursor: pointer; }
.hist-btn svg { width: 18px; height: 18px; }
.hist-btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
@media (max-width: 380px) { .hist-btn span { display: none; } .hist-btn { padding: 0 10px; } }
.h-head .link { margin-bottom: 8px; font-size: .92rem; min-height: 32px; }
.h-resumen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.h-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.h-tile strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-tile small { color: var(--muted); font-size: .74rem; }
.h-tile.cobrar { background: color-mix(in srgb, var(--y) 28%, var(--surface)); border-color: transparent; }
.h-filtros .chip { min-height: 42px; }
.h-lista { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.h-fila { display: flex; justify-content: space-between; gap: 12px; padding: 14px; border-bottom: 1px solid var(--line); }
.h-fila:last-child { border-bottom: 0; }
.h-fila-txt { display: flex; flex-direction: column; min-width: 0; }
.h-fila-der { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.h-fila-der strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.h-fila-der .link { align-self: flex-end; }
.h-pago { display: flex; flex-direction: column; gap: 8px; }
.h-pago-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.h-pago-top > div { display: flex; flex-direction: column; }
.h-pago-top strong { font-size: 1.5rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.h-mini { display: flex; flex-wrap: wrap; gap: 6px; font-size: .82rem; }
.h-mini span { padding: 3px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }

/* ---------- Supervisor: listado / tarjetas ---------- */
.sup-barra { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.vista-toggle { flex: none; }
.vista-toggle button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; }
.vista-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 420px) { .vista-toggle span { display: none; } }

.sup-lista { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.sup-row { display: grid; gap: 4px 12px; width: 100%; text-align: left; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; font-size: .9rem;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "num hace" "estado monto" "prod monto"; }
.sup-row:last-child { border-bottom: 0; }
.sup-row:hover { background: color-mix(in srgb, var(--c) 5%, transparent); }
.sup-row.con-alerta { box-shadow: inset 3px 0 0 var(--m); }
.sup-row-head { display: none; }
.c-num { grid-area: num; display: flex; align-items: center; gap: 6px; }
.c-estado { grid-area: estado; display: flex; flex-direction: column; gap: 5px; font-weight: 600; }
.c-estado .etapas { max-width: 220px; }
.c-alerta { font-size: .78rem; font-weight: 600; color: var(--m); }
.c-prod { grid-area: prod; }
.c-taller, .c-entrega { display: none; }
.c-entrega .hint { display: block; font-size: .78rem; }
.c-monto { grid-area: monto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.c-monto strong, .sup-row .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.c-hace { grid-area: hace; font-size: .78rem; text-align: right; }
.sup-row .num { text-align: right; }
@media (min-width: 900px) {
  .sup-row { grid-template-areas: none; grid-template-columns: 112px minmax(170px, 1.5fr) minmax(140px, 1.3fr) minmax(90px, .9fr) minmax(130px, 1fr) 150px 84px; align-items: center; padding: 12px 16px; }
  .sup-row > span { grid-area: auto; }
  .c-taller, .c-entrega { display: block; }
  .sup-row-head { display: grid; cursor: default; background: var(--bg); font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding-block: 10px; }
  .sup-row-head:hover { background: var(--bg); }
}
.c-prod .hint { display: inline; }
.sup-barra { flex-wrap: nowrap; }
.sup-barra .sup-filtros { flex: 1; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.sup-barra .sup-filtros::-webkit-scrollbar { display: none; }
.sup-barra .chip { flex: none; }

/* =========================================================
   INICIO DE SESIÓN
   ========================================================= */
.auth { min-height: 100vh; min-height: 100dvh; background:
  linear-gradient(90deg, var(--c) 0 25%, var(--m) 25% 50%, var(--y) 50% 75%, var(--navy) 75%) top / 100% 4px no-repeat, var(--bg); }
.auth-wrap { max-width: 420px; margin: 0 auto; padding: clamp(28px, 8vh, 72px) 16px 32px; display: flex; flex-direction: column; gap: 18px; }
.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.auth-logo img { border-radius: 50%; background: #fff; }
.auth-logo .wordmark { font-size: 1.25rem; }
.auth-card h1 { margin: 0; }
.auth-card > .hint { margin: -6px 0 0; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-err { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--err) 10%, var(--surface)); font-size: .88rem; }
.auth-ayuda { margin: 0; text-align: center; }
.auth-tienda { align-self: center; color: var(--muted); font-size: .9rem; text-underline-offset: 3px; }
.auth .btn.block { min-height: 50px; font-size: 1rem; }
.clave-wrap { position: relative; display: flex; }
.clave-wrap input { flex: 1; padding-right: 84px; }
.ver-clave { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: var(--bg); color: var(--text); font-weight: 600; font-size: .82rem; cursor: pointer; }

/* ---------- Sesión en el encabezado ---------- */
.sesion { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sesion-txt { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; min-width: 0; }
.sesion-txt strong { font-size: .88rem; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sesion-txt small { font-size: .72rem; color: var(--muted); }
.sesion-salir { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-weight: 600; font-size: .85rem; cursor: pointer; }
.sesion-salir svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 560px) { .sesion-txt { display: none; } }
@media (max-width: 400px) { .sesion-salir span { display: none; } .sesion-salir { padding: 0 10px; } }

/* =========================================================
   ADMINISTRADOR
   ========================================================= */
.adm-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px; }
.adm-head .btn { text-decoration: none; color: var(--text); }
.adm-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.adm-bar p { margin: 0; flex: 1 1 280px; }
.adm-lista { gap: 0; }
.adm-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; font-size: .92rem; }
.adm-row:last-child { border-bottom: 0; }
.adm-row:hover, .adm-prod-main:hover { background: color-mix(in srgb, var(--c) 5%, transparent); }
.adm-row-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.adm-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; flex: none; }
.adm-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.pill.alerta { background: color-mix(in srgb, var(--m) 12%, var(--surface)); color: var(--m); border-color: transparent; }
.adm-prod { padding: 0; cursor: default; }
.adm-prod-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 0 12px 14px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.adm-prod.apagado .adm-thumb, .adm-prod.apagado strong { opacity: .55; }
.adm-prod-side { display: flex; align-items: center; gap: 6px; padding-right: 10px; }
.adm-orden { display: flex; flex-direction: column; }
.adm-orden .btn { min-height: 30px; padding: 0 10px; }
.adm-thumb { width: 54px; height: 54px; flex: none; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; padding: 8px; color: var(--text); }
.adm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.adm-thumb:has(img) { padding: 0; }

/* Interruptor */
.switch { position: relative; display: inline-block; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--c); outline-offset: 2px; }
.switch-linea { display: flex; justify-content: space-between; align-items: center; gap: 14px; cursor: pointer; }
.switch-linea > span:first-child { display: flex; flex-direction: column; }

/* Editor */
.adm-sheet { max-width: 720px; padding-bottom: 0; }
@media (max-width: 699px) { .adm-sheet { top: 0; max-height: none; border-radius: 0; } }
.adm-sheet-top { position: sticky; top: -22px; z-index: 2; background: var(--surface); margin: -22px -16px 0; padding: 18px 16px 12px; border-bottom: 1px solid var(--line); }
.adm-form { display: flex; flex-direction: column; gap: 6px; }
.adm-sec { display: flex; flex-direction: column; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.adm-sec:last-child { border-bottom: 0; }
.adm-sec h3 { margin: 0; font-size: 1rem; }
.adm-sec .hint { margin: 0; }
.form-grid.cuatro { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 620px) { .form-grid.cuatro { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.field.con-error input, .field.con-error select, .field.con-error textarea { border-color: var(--err); }
.label small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.input-pre { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.input-pre > span { display: grid; place-items: center; padding: 0 10px; background: var(--bg); color: var(--muted); font-weight: 600; font-size: .88rem; border-right: 1px solid var(--line); white-space: nowrap; }
.input-pre input { border: 0 !important; border-radius: 0 !important; min-width: 0; flex: 1; }
.field select { width: 100%; min-height: 44px; padding: 10px 12px; font-size: 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.dias { display: flex; gap: 6px; flex-wrap: wrap; }
.dias .chip { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; font-weight: 700; }
.adm-checks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
@media (min-width: 560px) { .adm-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.adm-checks .check { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.adm-acceso { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bg); }
.adm-pie { position: sticky; bottom: 0; display: flex; gap: 10px; margin: 0 -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
.adm-pie .btn { min-height: 48px; }

.adm-foto { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.adm-drop { width: 100%; max-width: 320px; min-height: 200px; }
.adm-drop.has img { aspect-ratio: 1; max-height: 320px; object-fit: cover; }
.adm-drop .dz-icon { color: var(--muted); }
.adm-iconos { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-icono { width: 52px; height: 52px; padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; }
.adm-icono.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: color-mix(in srgb, var(--c) 8%, var(--surface)); }
.adm-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: .85rem; }
.adm-tag button { width: 26px; height: 26px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; font-size: 1.05rem; color: var(--muted); }
.adm-add { display: flex; gap: 8px; }
.adm-add input { flex: 1; min-width: 0; min-height: 44px; padding: 10px 12px; font-size: 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); }
.adm-margen { display: block; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--ok-bg); color: var(--ok); font-size: .88rem; font-weight: 600; }
.adm-margen.malo { background: color-mix(in srgb, var(--err) 10%, var(--surface)); color: var(--err); }
.adm-acabados { display: flex; flex-direction: column; gap: 8px; }
.adm-acabado { display: grid; grid-template-columns: minmax(0, 1fr) 128px 40px; gap: 8px; align-items: center; }
.adm-acabado > input { min-height: 44px; padding: 10px 12px; font-size: 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); min-width: 0; }
.adm-acabado .input-pre input { min-height: 42px; padding: 8px; font-size: 16px; width: 100%; background: var(--surface); }
.adm-cred { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius-sm); background: var(--bg); border: 1px dashed var(--line-strong); }
.adm-cred > div { display: flex; flex-direction: column; }
.adm-cred strong { overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.1rem; letter-spacing: .02em; }
.p-pausa { margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--y) 30%, var(--surface)); font-size: .9rem; }
.h-salir { margin-top: 8px; }
.sup-admin-link { text-decoration: none; color: var(--text); }
@media (max-width: 560px) { .sup-admin-link { display: none; } }
.card-media.con-foto { display: block; padding: 0; height: 180px; overflow: hidden; background: #fff; }
.card-media.con-foto img { width: 100%; height: 100%; object-fit: cover; }
.summary-icon.con-foto { display: block; padding: 0; overflow: hidden; }
.summary-icon.con-foto img { width: 100%; height: 100%; object-fit: cover; }
