/* RIAGUSA · r6 (solo diseño). Rojo vivo provisional #D00A0B en variables editables; fondo blanco cálido; tinta oscura.
   Teléfono primero (cabecera roja compacta y barra inferior) y MacBook (barra lateral blanca con bloque de marca rojo). */
:root {
  /* Marca: cambiar aquí si se ajusta el rojo. Sin degradados ni transparencias sobre el rojo. */
  --red: #d00a0b;
  --red-hover: #b80809;
  --red-press: #9f0708;
  --red-soft: #fdeceb;
  --red-soft-2: #f9dcdb;
  --on-red: #ffffff;
  --ink: #1c1917;
  --ink-2: #3a3330;
  --muted: #6b625c;
  --line: #ece5df;
  --line-2: #ddd3cc;
  --bg: #fdfbf8;
  --card: #ffffff;
  --warn-bg: #fff6e3;
  --warn-line: #f0d28a;
  --warn-ink: #7a4b00;
  --ok-bg: #e9f6ee;
  --ok-line: #c4e5d0;
  --ok-ink: #1e6b3b;
  --focus: #1c1917;
  --sidebar: 248px;
  --radius: 14px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
/* Al saltar con el teclado o al desplazar hasta un control, que no quede tapado por la cabecera ni por la barra inferior. */
html { scroll-padding-top: 76px; scroll-padding-bottom: 96px; }
@media (min-width: 900px) { html { scroll-padding-top: 16px; scroll-padding-bottom: 16px; } }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }

/* ---------- Marca ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--card); }
.brandbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--red); color: var(--on-red); padding: 8px 12px 12px 16px; padding-top: max(8px, env(safe-area-inset-top)); }
.brand { position: relative; display: inline-block; line-height: 0; text-decoration: none; color: var(--on-red); border-radius: 6px; }
.brand:focus-visible { outline-color: var(--on-red); }
/* Logo definitivo: bytes originales, blanco, alto fijo y ancho automático (sin deformar ni recortar). */
.brand img { display: block; height: 30px; width: auto; }
/* Subtítulo pequeño SOLO bajo la palabra, alineado al extremo derecho (la última A termina en el borde derecho del PNG)
   y creciendo hacia la izquierda. La línea base de RIAGUSA está en y = 370 de 466 (79.4 %). Símbolo y palabra no se mueven. */
.brand-sub { position: absolute; right: 0; top: calc(79.4% + 1px); font-size: 9px; line-height: 1; letter-spacing: 0.15px; font-weight: 500; white-space: nowrap; color: var(--on-red); text-align: right; }
.menu-btn { width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--red); display: grid; place-items: center; color: var(--on-red); transition: background-color 120ms ease; }
.menu-btn svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
.menu-btn:hover { background: var(--red-hover); }
.menu-btn:active { background: var(--red-press); }
.menu-btn:focus-visible { outline-color: var(--on-red); outline-offset: -3px; }
.menu-sheet { position: fixed; z-index: 40; top: 60px; right: 12px; min-width: 240px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 30px rgba(28, 25, 23, 0.16); padding: 6px; }
.menu-sheet button { display: flex; width: 100%; min-height: 48px; align-items: center; gap: 10px; border: 0; background: none; border-radius: 10px; padding: 0 14px; text-align: left; font-size: 15px; color: var(--ink); }
.menu-sheet button:hover { background: var(--red-soft); }
.menu-sheet button:active { background: var(--red-soft-2); }
#desktop-nav { display: none; }
.data-note { margin: 0; padding: 7px 16px; font-size: 11.5px; line-height: 1.4; color: var(--muted); background: var(--card); border-bottom: 1px solid var(--line); }

/* ---------- Navegación inferior (teléfono) ---------- */
#mobile-nav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px max(6px, env(safe-area-inset-bottom)); }
#mobile-nav button { flex: 1; min-height: 54px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; color: var(--ink-2); border-radius: 10px; transition: background-color 120ms ease; }
#mobile-nav svg, #desktop-nav svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: none; }
#mobile-nav button.active { color: var(--red); font-weight: 650; }
#mobile-nav button:hover { background: var(--red-soft); }
#mobile-nav button:active { background: var(--red-soft-2); }

/* ---------- Contenido ---------- */
main { max-width: 1080px; margin: 0 auto; padding: 16px 16px 110px; }
h1 { font-size: 28px; line-height: 1.15; letter-spacing: -0.6px; margin: 6px 0 14px; color: var(--ink); }
h2 { font-size: 18px; margin: 22px 0 10px; color: var(--ink); }
h3 { font-size: 16px; margin: 0 0 6px; }
p { font-size: 14px; line-height: 1.55; color: var(--muted); }
small { color: var(--muted); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.link { border: 0; background: none; color: var(--red); font-weight: 650; font-size: 14.5px; padding: 8px 4px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; background: var(--red-soft); }
.link:active { background: var(--red-soft-2); }
.back { margin: 0 0 2px; padding-left: 4px; }

/* Selector Préstamos / Empeños: dos segmentos claramente separados. */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #f3eee9; border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin: 0 0 14px; max-width: 420px; }
.seg button { min-height: 44px; border: 0; border-radius: 9px; background: transparent; font-size: 15px; font-weight: 600; color: var(--ink-2); transition: background-color 120ms ease, color 120ms ease; }
.seg button:hover { background: var(--card); }
.seg button[aria-selected='true'] { background: var(--red); color: var(--on-red); }
.seg button[aria-selected='true']:hover { background: var(--red-hover); }
.seg button:active { transform: scale(0.985); }

/* Indicadores · r7e (A2/C1-C3): los importes nunca se parten ni se recortan.
   Teléfono (<600 px): cada indicador es una fila «etiqueta / ayuda ← → importe»; columnas desde 600 px. */
.summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 16px 14px; }
.metrics { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 6px 0 4px; }
.metric { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-width: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center; }
.metric .label { grid-column: 1; display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.metric strong { grid-column: 2; grid-row: 1 / span 2; display: block; font-size: 20px; letter-spacing: -0.3px; margin: 0; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; text-align: right; }
.metric .help { grid-column: 1; display: block; font-size: 12px; line-height: 1.35; color: var(--muted); margin-top: 2px; }
/* Resumen de Inicio: primera cifra destacada (escala con el ancho) y las otras tres debajo. */
.summary .metrics { gap: 0; margin: 0; }
.summary .metric { border: 0; border-radius: 0; padding: 10px 0; border-top: 1px solid var(--line); }
.summary .metric:first-child { display: block; border-top: 0; padding: 12px 0 14px; }
.summary .metric:first-child strong { font-size: clamp(26px, 9vw, 34px); letter-spacing: -1px; margin: 6px 0 4px; text-align: left; }
.summary .metric:not(:first-child) strong { font-size: 18px; }
@media (min-width: 600px) {
  .metrics { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
  .metric { display: block; padding: 14px; }
  .metric strong { font-size: 22px; margin: 6px 0 4px; text-align: left; }
  .summary .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
  .summary .metric { display: block; border-top: 0; padding: 12px 10px 12px 0; }
  .summary .metric:first-child { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .summary .metric:first-child strong { font-size: 34px; }
  .summary .metric:not(:first-child) + .metric { border-left: 1px solid var(--line); padding-left: 12px; }
  .summary .metric:not(:first-child) strong { font-size: 18px; }
}
.progress { border-top: 1px solid var(--line); padding-top: 12px; }
.progress-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.progress-head strong { font-variant-numeric: tabular-nums; }
.bar { height: 8px; background: #f1ebe6; border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--red); border-radius: 99px; }

/* Pagos atrasados: fila compacta y tocable. */
.late-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin: 12px 0 0; min-height: 60px; padding: 12px 14px; background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius); color: var(--ink); transition: background-color 120ms ease, transform 80ms ease; }
button.late-row:hover { background: #ffefc9; }
button.late-row:active { transform: scale(0.99); }
.late-row > span:not(.late-ico) { flex: 1; min-width: 0; }
.late-row strong { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.late-row small { display: block; font-size: 12.5px; margin-top: 2px; color: var(--warn-ink); }
.late-row.ok { background: var(--ok-bg); border-color: var(--ok-line); }
.late-row.ok small { color: var(--ok-ink); }
.late-row.neutral { background: var(--card); border-color: var(--line); }
.late-row.neutral small { color: var(--muted); }
.late-ico { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 2px solid var(--warn-ink); color: var(--warn-ink); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.note { margin: 8px 2px 0; font-size: 13px; }
.home-actions { margin-top: 16px; }
.quick { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 2px 0 0; }
.foot-note { font-size: 12.5px; margin-top: 18px; }
.late-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px; margin: 0 0 10px; background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius); color: var(--warn-ink); font-weight: 600; }
.late-total strong { font-size: 20px; color: var(--ink); font-variant-numeric: tabular-nums; }
.late-card { padding: 0; overflow: hidden; }
.late-client { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--line); background: var(--card); text-align: left; transition: background-color 120ms ease; }
.late-client:hover { background: #fcf7f4; }
.late-client:active { background: var(--red-soft); }
.late-client > span:not(.avatar) { flex: 1; min-width: 0; }
.late-client small { display: block; margin-top: 2px; font-size: 12.5px; }
.late-client .amt, .late-total strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.late-op { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.late-op:last-child { border-bottom: 0; }
.late-op small { display: block; font-size: 12.5px; margin-top: 2px; }
.late-op-actions { display: flex; gap: 4px; }

.avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; background: #f3eee9; color: var(--ink-2); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.grow { flex: 1; min-width: 0; }

/* Botones: normal, hover, presionado y foco; respuesta táctil suave. */
.action { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; border: 0; border-radius: 12px; background: var(--red); color: var(--on-red); font-weight: 650; font-size: 16px; padding: 12px 18px; transition: background-color 120ms ease, transform 80ms ease; }
.action:hover { background: var(--red-hover); }
.action:active { background: var(--red-press); transform: scale(0.985); }
.action.secondary { background: var(--card); color: var(--red); border: 1.5px solid var(--red); }
.action.secondary:hover { background: var(--red-soft); }
.action.secondary:active { background: var(--red-soft-2); }
.action:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.actions { display: grid; gap: 10px; margin: 14px 0; }
.inline { border: 0; background: none; color: var(--red); font-weight: 650; text-decoration: underline; text-underline-offset: 3px; padding: 8px 8px; min-height: 44px; border-radius: 8px; }
.inline:hover { background: var(--red-soft); }
.inline:active { background: var(--red-soft-2); }

/* Listas, filas y paneles */
.list, .panel, .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.panel { padding: 16px; }
.list { overflow: hidden; }
.card { padding: 14px 16px; margin: 0 0 10px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row small { display: block; margin-top: 3px; font-size: 12.5px; }
button.row, .rowbtn { width: 100%; text-align: left; background: var(--card); border: 0; border-bottom: 1px solid var(--line); min-height: 64px; transition: background-color 120ms ease; }
button.row:hover { background: #fcf7f4; }
button.row:active { background: var(--red-soft); }
button.row .badge { margin-top: 6px; }
.chev { width: 20px; height: 20px; flex: none; stroke: var(--ink-2); stroke-width: 2; fill: none; }
.line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; font-size: 14.5px; border-bottom: 1px solid #f2ece7; }
.line:last-child { border-bottom: 0; }
.line > span { min-width: 0; }
.line strong { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.line.total { font-weight: 650; color: var(--ink); }
.line.total strong { font-size: 18px; }
.line .sub { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.badge { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 5px 9px; border-radius: 8px; background: #f2ede8; color: var(--ink-2); margin: 6px 6px 0 0; }
.badge.warn { background: #fdecc8; color: var(--warn-ink); border: 1px solid var(--warn-line); }
.badge.ok { background: var(--ok-bg); color: var(--ok-ink); }
.tabs { display: flex; border-bottom: 1px solid var(--line); margin: 4px 0 14px; overflow-x: auto; }
.tabs button { flex: 1; min-height: 46px; border: 0; background: none; font-size: 15px; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; padding: 0 12px; transition: color 120ms ease; }
.tabs button[aria-selected='true'] { color: var(--red); font-weight: 700; border-bottom-color: var(--red); }
.tabs button:hover { color: var(--red); background: #fcf7f4; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.chips button { min-height: 44px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); padding: 0 16px; font-size: 14px; }
.chips button:hover { border-color: var(--red); color: var(--red); }
.chips button[aria-pressed='true'] { background: var(--red); border-color: var(--red); color: var(--on-red); }
.search { position: relative; margin: 0 0 10px; }
.search input { padding-left: 40px; }
.search svg { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); stroke: var(--muted); stroke-width: 2; fill: none; }
.empty { text-align: center; padding: 28px 10px; }

/* Formularios */
.form-title { margin: 0 0 14px; font-size: 19px; }
label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin: 0 0 14px; }
label .opt { font-weight: 400; color: var(--muted); }
input, select, textarea { display: block; width: 100%; min-height: 48px; margin-top: 6px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--card); padding: 11px 13px; font-size: 16px; color: var(--ink); }
input:hover, select:hover, textarea:hover { border-color: #b9aca4; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--ink); }
input[readonly] { background: #f6f1ec; }
textarea { resize: vertical; }
input[type='checkbox'] { display: inline-block; width: auto; min-height: 0; margin: 0 8px 0 0; vertical-align: middle; }
.owed { background: #faf6f2; border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 12px; margin: 0 0 14px; }
.owed small { display: block; line-height: 1.5; font-size: 12.5px; }
.owed-title { font-size: 14px; margin: 10px 0 2px; color: var(--ink); }
.owed-second { margin-top: 6px; padding-top: 4px; border-top: 1px dashed var(--line-2); font-size: 13px; }
.owed-second .line { font-size: 13.5px; color: var(--ink-2); }
.owed-second .link { padding-left: 0; }
.reparto:not(:empty) { margin: -4px 0 14px; padding: 0 2px; }
.reparto .owed-title { margin-top: 0; }
.code { white-space: nowrap; font-weight: 600; color: var(--muted); font-size: 0.85em; }
/* «Ver detalle»: ayuda larga plegada */
.detail { margin: 4px 0 10px; font-size: 13px; color: var(--muted); }
.detail summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--red); font-weight: 650; cursor: pointer; border-radius: 8px; padding: 0 4px; list-style-position: inside; }
.detail summary:hover { background: var(--red-soft); }
.detail-body { padding: 2px 4px 6px; line-height: 1.5; }
.sync .detail { margin: 2px 0 0; }
/* Historial: lo que no cuenta se ve tachado y atenuado */
.row.excluded .amt { text-decoration: line-through; color: var(--muted); }
.badge.out { background: #f1ece7; color: var(--muted); border: 1px dashed var(--line-2); }
/* Ojito de la contraseña */
.pw-label { margin: 0; }
.pw { position: relative; margin: 6px 0 14px; }
.pw input { margin-top: 0; padding-right: 56px; }
.pw-toggle { position: absolute; top: 2px; right: 2px; width: 48px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); display: grid; place-items: center; }
.pw-toggle:hover { background: var(--red-soft); color: var(--red); }
.pw-toggle svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.pw-toggle[aria-pressed='true'] { color: var(--red); }
.warn { color: var(--warn-ink); font-size: 13px; margin: 8px 0 0; }
.error { color: #a11212; font-size: 13.5px; line-height: 1.45; }
.explain { font-size: 13px; color: var(--muted); margin: -4px 0 12px; }
.row-action { padding: 6px 16px 16px; border-bottom: 1px solid var(--line); background: #fcf8f5; }
.row-action .actions { grid-template-columns: 1fr 1fr; }

#toast:not(:empty) { position: fixed; z-index: 50; bottom: 92px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 13px 18px; border-radius: 12px; max-width: 92%; font-size: 14.5px; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2); }
.split { display: grid; gap: 16px; }
.receipt-brand { background: var(--red); border-radius: 10px; padding: 12px 14px 16px; margin: -4px -4px 12px; }

/* ---------- MacBook y pantallas anchas: barra lateral blanca ---------- */
@media (min-width: 900px) {
  .topbar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; background: var(--card); border-right: 1px solid var(--line); overflow-y: auto; }
  /* Bloque de marca rojo de borde a borde del ancho de la barra: sin márgenes exteriores ni esquinas redondeadas. */
  .brandbar { flex: none; width: 100%; margin: 0; border-radius: 0; padding: 22px 24px 26px; justify-content: flex-start; }
  .brand img { height: 34px; }
  .brand-sub { font-size: 10px; }
  .menu-btn { display: none; }
  #desktop-nav { display: flex; flex-direction: column; gap: 2px; padding: 14px 12px; flex: 1; }
  #desktop-nav button { display: flex; align-items: center; gap: 12px; min-height: 46px; border: 0; background: none; border-radius: 10px; padding: 0 14px; font-size: 15px; color: var(--ink-2); text-align: left; transition: background-color 120ms ease, color 120ms ease; }
  #desktop-nav button:hover { background: #f8f2ee; color: var(--ink); }
  #desktop-nav button:active { background: var(--red-soft); }
  #desktop-nav button.active { background: var(--red-soft); color: var(--red); font-weight: 650; }
  /* Configuración al pie de la barra lateral. */
  #desktop-nav button[data-view='Configuración'] { margin-top: auto; }
  #mobile-nav { display: none; }
  .data-note { margin-left: var(--sidebar); padding: 8px 36px; }
  main { margin-left: var(--sidebar); margin-right: 0; max-width: 1000px; padding: 28px 36px 60px; }
  h1 { font-size: 30px; }
  .summary { padding: 8px 20px 16px; }
  .actions { grid-template-columns: repeat(2, minmax(0, 260px)); }
  .data-note { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .cards-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cards-grid .card { margin: 0; }
  .menu-sheet { display: none !important; }
  #toast:not(:empty) { bottom: 28px; left: calc(50% + var(--sidebar) / 2); }
}

@media (min-width: 1200px) {
  .summary .metrics { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .summary .metric:first-child { grid-column: auto; border-bottom: 0; padding: 14px 16px 14px 0; }
  .summary .metric:first-child strong { font-size: clamp(26px, 2.4vw, 34px); }
  .summary .metrics .metric + .metric { border-left: 1px solid var(--line); padding: 14px 16px; }
  .summary .metric:not(:first-child) strong { font-size: 20px; }
}

/* r7 · aviso de sincronización con el servidor (modo Supabase) */
.sync-wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.sync { margin: 12px 0 0; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); font-size: 14px; color: var(--ink); }
.sync span { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.sync.saving { border-color: var(--line-2); }
.sync.unknown { background: var(--warn-bg); border-color: var(--warn-line); }
.sync.offline { background: #f6f1ec; color: var(--ink-2); }
.sync-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
@media (min-width: 900px) { .sync-wrap { margin-left: var(--sidebar); max-width: 1000px; padding: 0 36px; } }

/* Movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .action:active, .seg button:active, button.late-row:active { transform: none; }
}

@media print {
  .topbar, #mobile-nav, .data-note, .actions, button, #toast, .menu-sheet { display: none !important; }
  main { padding: 0; margin: 0; max-width: none; }
  body { background: #fff; }
  .panel { border: 0; }
  .receipt-brand { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Toques: sin zoom por doble toque en controles, para que cada toque sea un clic inmediato. */
button, a, select, input, label { touch-action: manipulation; }
