/* Agenda Patitas · estilos. Variables de marca en :root (fase 2 · marca las sobreescribe). */
:root {
  --brand: #0f766e; --brand-ink: #fff; --brand-soft: #e6f4f2;
  --bg: #f5f6f8; --card: #fff; --ink: #1c2430; --muted: #6b7480; --line: #e3e6ea;
  --danger: #c0392b; --warn: #b45309; --warn-soft: #fff4e0;
  --st-pendiente: #6b7480; --st-confirmada: #2563eb; --st-lista: #7c3aed; --st-cobrada: #15803d; --st-no_vino: #b91c1c;
  --radius: 14px; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --nav-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--bg); -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; font-size: 16px; line-height: 1.4; }
a { color: var(--brand); text-decoration: none; }
h1 { font-size: 1.4rem; margin: 0; } h2 { font-size: 1.05rem; margin: 0; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; } .hidden { display: none !important; }
.ico { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.ico-muted { color: #b3b9c1; }

/* Estructura */
.topbar { position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { border-radius: 9px; }
.biz { font-weight: 700; font-size: 1.05rem; }
.biz-sub { font-size: .78rem; color: var(--muted); }
.main { padding: 14px 14px calc(var(--nav-h) + 90px + var(--safe-b)); max-width: 1100px; margin: 0 auto; outline: none; }
.nav { position: fixed; z-index: 6; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--card); border-top: 1px solid var(--line); display: flex; }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: .72rem; }
.nav a.on { color: var(--brand); font-weight: 600; }
.nav a .ico { width: 24px; height: 24px; }

/* Componentes */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; }
.list { display: flex; flex-direction: column; gap: 8px; }
button.card, a.card { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.row-card { display: flex; align-items: center; gap: 12px; }
.row-card .grow, .grow { flex: 1; min-width: 0; }
.title { font-weight: 600; } .sub { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.price { font-weight: 600; }
.is-off { opacity: .6; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; flex: none; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.4rem; }
.avatar-pet .ico { width: 22px; height: 22px; }
.avatar-lg.avatar-pet .ico { width: 30px; height: 30px; }
.page-head { display: flex; align-items: baseline; gap: 8px; margin: 4px 2px 12px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 20px 2px 8px; gap: 8px; }
.group-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 2px 6px; }
.hint { color: var(--muted); font-size: .88rem; margin: -4px 2px 10px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 10px; font-weight: 500; }
.profile { display: flex; gap: 14px; align-items: flex-start; }
.profile .sub a { display: inline-flex; gap: 4px; align-items: center; }
.note { margin: 6px 0 0; font-size: .92rem; }
.tag { display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: #eef0f3; color: var(--muted); margin-top: 4px; font-weight: 500; }
.tag-warn { background: var(--warn-soft); color: var(--warn); }
.alert { display: flex; gap: 8px; align-items: center; background: var(--warn-soft); color: var(--warn); border-radius: var(--radius); padding: 10px 14px; margin: 10px 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: .88rem; } .kv dd { margin: 0; overflow-wrap: anywhere; }
.mini-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.mini-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 4px 6px 6px 0; border-bottom: 1px solid var(--line); }
.mini-table td { padding: 7px 6px 7px 0; border-bottom: 1px solid var(--line); }
.mini-table tr:last-child td { border-bottom: 0; }
.empty { text-align: center; color: var(--muted); padding: 28px 16px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-title { color: var(--ink); font-weight: 600; margin: 0 0 4px; }
.empty .btn { margin-top: 8px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; margin-bottom: 12px; color: var(--muted); }
.search input { border: 0; outline: 0; flex: 1; padding: 12px 0; font: inherit; background: transparent; color: var(--ink); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 12px; padding: 11px 16px; font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-text { color: var(--danger); }
.btn-small { padding: 6px 12px; min-height: 36px; font-size: .9rem; }
.btn.block { width: 100%; margin-top: 24px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; flex: none; }
.fab { position: fixed; z-index: 4; right: 16px; bottom: calc(var(--nav-h) + 16px + var(--safe-b)); display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 999px; padding: 14px 20px; font: inherit; font-weight: 700; box-shadow: 0 6px 18px rgba(15,118,110,.35); cursor: pointer; }

/* Agenda */
.agenda-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.seg { display: inline-flex; background: #e9ecef; border-radius: 10px; padding: 3px; }
.seg a { padding: 7px 14px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .92rem; }
.seg a.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.date-nav { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 230px; }
.date-label { flex: 1; text-align: center; font-weight: 700; }
.today-btn { order: 3; }
.day-summary { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .92rem; margin: 0 2px 10px; }
.day-summary strong { color: var(--ink); }
.warn-text { color: var(--warn); font-weight: 600; }
.appt { display: flex; gap: 12px; align-items: flex-start; border-left: 4px solid var(--st-pendiente); }
.appt-time { display: flex; flex-direction: column; min-width: 50px; font-variant-numeric: tabular-nums; }
.appt-time span { color: var(--muted); font-size: .85rem; }
.appt-main { flex: 1; min-width: 0; }
.appt-title { font-weight: 600; }
.appt-sub { color: var(--muted); font-size: .9rem; }
.appt.has-conflict { background: #fffaf0; border-color: #f3d19c; }
.conflict { display: flex; gap: 6px; align-items: flex-start; color: var(--warn); background: var(--warn-soft); font-size: .86rem; font-weight: 600; border-radius: 8px; padding: 6px 8px; margin-top: 6px; }
.chip { font-size: .75rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; color: #fff; background: var(--st-pendiente); }
.st-confirmada { --st: var(--st-confirmada); } .st-lista { --st: var(--st-lista); } .st-cobrada { --st: var(--st-cobrada); } .st-no_vino { --st: var(--st-no_vino); } .st-pendiente { --st: var(--st-pendiente); }
.chip.st-confirmada, .chip.st-lista, .chip.st-cobrada, .chip.st-no_vino, .chip.st-pendiente { background: var(--st); }
.appt.st-confirmada, .appt.st-lista, .appt.st-cobrada, .appt.st-no_vino, .appt.st-pendiente { border-left-color: var(--st); }
.appt.st-no_vino { opacity: .65; }
.status-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chip-btn { border: 1.5px solid var(--st); color: var(--st); background: #fff; border-radius: 999px; padding: 8px 14px; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; min-height: 40px; }
.chip-btn.on { background: var(--st); color: #fff; }
.week { display: flex; flex-direction: column; gap: 8px; }
.week-day { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.week-day.is-today { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.week-day-head { display: flex; align-items: baseline; gap: 8px; padding: 10px 12px; color: var(--ink); }
.week-day-head .wd { font-weight: 700; } .week-day-head .dn { color: var(--muted); } .week-day-head .cnt { margin-left: auto; color: var(--muted); font-size: .85rem; }
.week-day-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 10px; }
.week-day-list:empty { display: none; }
.appt-mini { display: inline-flex; align-items: center; gap: 4px; border: 0; border-left: 3px solid var(--st); background: #f3f5f7; border-radius: 6px; padding: 6px 8px; font: inherit; font-size: .82rem; cursor: pointer; color: var(--ink); }
.appt-mini .t { font-weight: 700; font-variant-numeric: tabular-nums; }
.appt-mini.has-conflict { background: var(--warn-soft); }
.ico-warn { color: var(--warn); width: 15px; height: 15px; }

/* Hoja modal */
dialog.sheet { border: 0; padding: 0; width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 18px 18px 0 0; max-height: 92vh; background: var(--card); color: var(--ink); }
dialog.sheet::backdrop { background: rgba(16,24,40,.45); }
.sheet-head { position: sticky; top: 0; background: var(--card); display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); z-index: 1; }
.sheet-body { padding: 14px 16px calc(18px + var(--safe-b)); overflow: auto; }
.confirm-msg { margin: 0 0 8px; }
.label { color: var(--muted); font-size: .88rem; margin: 14px 0 6px; }

/* Formularios */
.form { display: flex; flex-direction: column; gap: 12px; }
.form.card { padding: 16px; }
.form label { min-width: 0; display: flex; flex-direction: column; gap: 5px; font-size: .88rem; color: var(--muted); font-weight: 500; }
.form input, .form select, .form textarea, .vac-row input { min-width: 0; max-width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid #cfd4da; border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%; }
.form textarea { resize: vertical; min-height: 64px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.form .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.form label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--ink); }
.form label.check input { width: 20px; min-height: 20px; height: 20px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.form-actions .btn { flex: 1; }
.form-error { color: var(--danger); font-weight: 600; margin: 0; font-size: .9rem; }
fieldset.vac { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 12px; margin: 0; }
fieldset.vac legend { font-size: .88rem; color: var(--ink); font-weight: 600; padding: 0 4px; }
.vac-row { display: flex; flex-direction: column; gap: 6px; background: #f7f8fa; padding: 8px; border-radius: 10px; margin-bottom: 8px; min-width: 0; }
.vac-top { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 6px; align-items: center; }
.vac-dates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.vac-dates label { font-size: .78rem; gap: 3px; min-width: 0; }
.vac-row input { padding: 8px; font-size: 15px; min-width: 0; }
.vac-row .icon-btn { width: 44px; height: 44px; }

/* Toasts */
.toasts { position: fixed; z-index: 50; left: 0; right: 0; bottom: calc(var(--nav-h) + 80px + var(--safe-b)); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { background: #1c2430; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: .92rem; transition: opacity .3s, transform .3s; }
.toast.out { opacity: 0; transform: translateY(6px); }

/* Escritorio */
@media (min-width: 900px) {
  .app { display: grid; grid-template-columns: 220px 1fr; grid-template-rows: auto 1fr; min-height: 100vh; }
  .topbar { grid-column: 1 / -1; }
  .nav { position: sticky; top: 61px; height: calc(100vh - 61px); flex-direction: column; justify-content: flex-start; gap: 2px; padding: 14px 10px; border-top: 0; border-right: 1px solid var(--line); }
  .nav a { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 12px; border-radius: 10px; font-size: .95rem; }
  .nav a.on { background: var(--brand-soft); }
  .main { padding: 22px 28px 100px; width: 100%; }
  .content { min-width: 0; }
  .banners { padding: 14px 28px 0; max-width: 1100px; margin: 0 auto; }
  .fab { right: 32px; bottom: 32px; }
  .date-nav { flex: 0 1 460px; }
  .toasts { bottom: 100px; }
  .week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
  .week-day { min-height: 300px; }
  .week-day-head { flex-direction: column; gap: 0; border-bottom: 1px solid var(--line); }
  .week-day-head .cnt { margin-left: 0; }
  .week-day-list { flex-direction: column; flex-wrap: nowrap; padding-top: 8px; }
  .appt-mini { width: 100%; }
  dialog.sheet { max-width: 520px; margin: auto; border-radius: 18px; }
  .list { gap: 10px; }
}

/* ===== Correcciones auditoría F1 ===== */
/* Zonas táctiles de 44 px */
.seg a { min-height: 40px; display: inline-flex; align-items: center; padding: 8px 16px; }
.seg { padding: 2px; }
.icon-btn { width: 44px; height: 44px; }
.btn-small, .btn-sm { min-height: 44px; padding: 8px 14px; font-size: .92rem; }
.chip-btn { min-height: 44px; }
.appt-mini { min-height: 44px; padding: 8px 10px; }
.back { min-height: 44px; padding-right: 8px; }
.week-day-head { min-height: 44px; }
/* Palabras largas no ensanchan la página */
h1, h2, .title, .appt-title, .biz, .date-label, .confirm-msg, .alert, .tag, .sub, .note, .mov .title { overflow-wrap: anywhere; word-break: normal; }
.main, .sheet-body, .card, .profile .grow { min-width: 0; }
body { overflow-x: hidden; }
/* Alergias y horario */
.tag-allergy { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; margin: 4px 0 2px; max-width: 100%; }
.tag-allergy .ico { width: 14px; height: 14px; }
.mini-allergy { color: var(--warn); font-weight: 800; }
.alert { align-items: flex-start; }
.alert > .btn { margin-left: auto; flex: none; }
.alert-soft { background: #f1f5f9; color: var(--ink); }
.hours-warn { display: flex; gap: 6px; align-items: flex-start; color: #1d4ed8; background: #eff6ff; font-size: .86rem; font-weight: 600; border-radius: 8px; padding: 6px 8px; margin-top: 6px; }
.filter-row { display: flex; gap: 8px; margin: -2px 0 12px; flex-wrap: wrap; }
.filter-row .chip-btn { --st: var(--brand); text-decoration: none; display: inline-flex; align-items: center; }

/* ===== Fase 2 ===== */
.banners:empty { display: none; }
.banners { padding: 10px 14px 0; display: flex; flex-direction: column; gap: 8px; }
.banner { display: flex; align-items: center; gap: 10px; background: #fff7e6; border: 1px solid #f6d58e; color: var(--ink); border-radius: var(--radius); padding: 10px 12px; }
.banner > .ico { color: var(--warn); }
.banner-info { background: #eff6ff; border-color: #bfdbfe; }
.banner-info > .ico { color: #1d4ed8; }
.banner .grow span { display: block; color: var(--muted); font-size: .86rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.file-btn { cursor: pointer; }
.btn-block { width: 100%; margin-top: 10px; }
.btn-wa { background: #25d366; color: #0b3d1f; border-color: #25d366; }
.btn-wa:hover { filter: brightness(.97); }
.btn-in { background: #e8f6ee; color: #146c3a; border-color: #bfe5cf; flex: 1; }
.btn-out { background: #fdecec; color: #a12424; border-color: #f6c9c9; flex: 1; }
.tag-pkg { background: var(--brand-soft); color: var(--brand); margin: 0; }
.ok-text { color: #15803d; font-weight: 600; }
.neg-text { color: #b42318; }
code { background: #eef0f3; border-radius: 6px; padding: 1px 5px; font-size: .85em; }
.card > h2, .card-title { font-size: 1rem; margin: 0 0 8px; }
.card + .card, .cash-side .card, .cash-main > .card { margin-top: 12px; }
#settingsExtras > div { margin-top: 14px; }

/* Caja */
.cash { display: flex; flex-direction: column; gap: 0; }
.kpi-hero { background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 70%, #000)); color: #fff; border-radius: 18px; padding: 16px 18px; box-shadow: 0 8px 22px rgba(15, 23, 42, .14); }
.kpi-hero.neg { background: linear-gradient(135deg, #b42318, #7a1a12); }
.kpi-hero .kpi-label { font-size: .85rem; opacity: .9; }
.kpi-hero .kpi-value { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 2px 0; }
.kpi-hero .kpi-foot { font-size: .85rem; opacity: .9; }
.kpi-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 10px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; box-shadow: var(--shadow); }
.kpi .kpi-label { color: var(--muted); font-size: .8rem; }
.kpi strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi .kpi-sub { color: var(--muted); font-size: .75rem; }
.cash-actions { display: flex; gap: 8px; margin: 12px 0 0; }
.cash-side { display: flex; flex-direction: column; }
.mov { display: flex; align-items: center; gap: 10px; }
.mov-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.mov.ingreso .mov-ico { background: #e8f6ee; color: #15803d; }
.mov.gasto .mov-ico { background: #fdecec; color: #b42318; }
.mov .title { display: block; } .mov .sub { display: block; }
.mov-amt { text-align: right; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mov.ingreso .mov-amt strong { color: #15803d; } .mov.gasto .mov-amt strong { color: #b42318; }
.mov-amt small { color: var(--muted); font-size: .75rem; }
.method-box { display: flex; gap: 14px; align-items: center; }
.donut { width: 128px; height: 128px; flex: none; }
.donut-k { font-size: 8px; fill: var(--muted); }
.donut-v { font-size: 9.5px; font-weight: 800; fill: var(--ink); }
.method-list { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.method-row { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.method-row .amt { text-align: right; display: flex; flex-direction: column; white-space: nowrap; font-variant-numeric: tabular-nums; }
.method-row .amt small { font-size: .72rem; }
.method-row .grow { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.method-row .m-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut { width: 112px; height: 112px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.fee-total { margin: 10px 0 0; font-size: .9rem; color: var(--muted); }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar-top { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; margin-bottom: 4px; }
.hbar-top span { overflow-wrap: anywhere; }
.hbar-top strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar-track { height: 8px; background: #eef0f3; border-radius: 99px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 99px; }
.chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px; height: 170px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; font-size: .66rem; color: var(--muted); text-align: right; padding-bottom: 16px; white-space: nowrap; }
.chart-plot { display: flex; align-items: stretch; gap: 2px; border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, var(--line) 1px, transparent 1px) 0 0 / 100% 50%; padding-bottom: 0; position: relative; margin-bottom: 16px; }
.chart-col { flex: 1; min-width: 0; display: flex; align-items: flex-end; justify-content: center; gap: 1px; position: relative; border-radius: 3px; }
.chart-col.is-today { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.chart-col .bar { width: 45%; max-width: 9px; border-radius: 3px 3px 0 0; min-height: 0; }
.bar-in { background: var(--brand); } .bar-out { background: #f87171; }
.chart-x { position: absolute; bottom: -16px; font-size: .64rem; color: var(--muted); }
.legend { display: flex; gap: 14px; font-size: .8rem; color: var(--muted); margin-top: 4px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.lg-in { background: var(--brand); } .lg-out { background: #f87171; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.stats > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; text-align: center; box-shadow: var(--shadow); }
.stats strong { display: block; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: .75rem; }
.method-pick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.method-opt input { position: absolute; opacity: 0; pointer-events: none; }
.method-opt span { display: flex; align-items: center; gap: 8px; min-height: 48px; border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 10px; color: var(--ink); font-weight: 600; font-size: .9rem; cursor: pointer; }
.method-opt input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.method-opt input:focus-visible + span { outline: 2px solid var(--brand); }
.fee-preview { display: flex; flex-wrap: wrap; gap: 6px 14px; background: #f7f8fa; border-radius: 10px; padding: 8px 12px; font-size: .9rem; color: var(--muted); }
.fee-preview strong { color: var(--ink); }
.fee-head, .fee-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.fee-head { font-size: .78rem; color: var(--muted); }
.fee-row span { font-size: .92rem; color: var(--ink); }
/* Paquetes */
.pkg-top { display: flex; align-items: center; gap: 10px; }
.pkg-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.pkg-left { text-align: right; display: flex; flex-direction: column; line-height: 1.1; }
.pkg-left strong { font-size: 1.5rem; color: var(--brand); }
.pkg-left span { font-size: .75rem; color: var(--muted); }
.pkg-dots { display: flex; gap: 4px; margin: 10px 0 6px; }
.pkg-dots span { flex: 1; height: 8px; border-radius: 99px; background: var(--brand); }
.pkg-dots span.used { background: #dfe3e8; }
.pkg-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .85rem; }
.pkg-foot .chip-btn { --st: var(--brand); min-height: 40px; padding: 6px 12px; }
.pkg.is-done { opacity: .7; }
.pkg.is-done .pkg-left strong { color: var(--muted); }
/* WhatsApp y mensajes */
.wa-to { display: flex; align-items: center; gap: 8px; background: #effaf3; color: #14532d; border-radius: 10px; padding: 8px 12px; font-size: .92rem; }
.wa-to .ico { color: #16a34a; }
.tpl-card .title, .tpl-card .sub { display: block; }
.var-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.var-chips .chip-btn { --st: var(--brand); font-size: .82rem; padding: 6px 10px; }
/* Marca */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 12px; }
.swatch { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; position: relative; overflow: hidden; }
.swatch.on { box-shadow: 0 0 0 3px var(--ink); }
.swatch-custom { background: conic-gradient(#ef4444, #f59e0b, #22c55e, #3b82f6, #a855f7, #ef4444); display: inline-block; }
.swatch-custom input { opacity: 0; width: 100%; height: 100%; cursor: pointer; }
@media (min-width: 900px) {
  .cash { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
  .cash-side .card:first-child { margin-top: 0; }
  .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpi-hero .kpi-value { font-size: 2.5rem; }
  .chart { height: 210px; }
  .method-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 360px) {
  .method-box { flex-direction: column; align-items: stretch; }
  .donut { margin: 0 auto; }
}
.nowrap { white-space: nowrap; }

/* R2 · P2-B: los radios ocultos del cobro quedan dentro de su opción (antes ensanchaban la hoja a 549 px). */
.method-opt { position: relative; display: block; min-width: 0; }
.method-opt input { inset: 0; width: 100%; height: 100%; margin: 0; }
dialog.sheet { overflow-x: hidden; }
.sheet-body { overflow-x: hidden; }
.fee-preview .fee-warn, .fee-preview [data-amt-warn] { flex-basis: 100%; font-weight: 600; }

/* R2 · P3: zonas táctiles de 44 px. */
.seg a { min-height: 44px; }
.chip-btn, .pkg-foot .chip-btn { min-height: 44px; }
.swatch-custom input { position: absolute; inset: -3px; width: calc(100% + 6px); height: calc(100% + 6px); }
.sub a, dd a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding-inline: 2px; }
.tag-arch { background: #f3f4f6; color: #374151; border: 1px dashed #9ca3af; }
.mini-arch { display: inline-flex; color: #6b7280; }
.mini-arch svg { width: 12px; height: 12px; }
/* Fichas: alinear etiqueta y valor por la línea de texto (los enlaces de 44 px no desalinean la fila). */
.kv { align-items: baseline; }
