/* Compucast – hoja de estilos de la plataforma (tokens + componentes + pantallas) */
:root {
  --brand-red: #FE0C0E; --brand-red-deep: #800808; --brand-coral: #FFB8B5;
  --primary: #D60808; --primary-hover: #B80606; --primary-text: #B80606; --primary-tint: #FFE8E6;
  --header-bg: #D60808; --on-primary: #FFFFFF;
  --surface-page: #FFF8F6; --surface-card: #FFFFFF; --surface-sunken: #F7ECEA; --surface-inverse: #211B1B;
  --ink: #211B1B; --ink-muted: #5E5454; --ink-subtle: #746969;
  --border-subtle: #E8D8D6; --border-control: #9C8C8A; --focus-ring: #1F5FAD;
  --success: #1E7A46; --success-bg: #E4F4EA; --warning: #9A5B00; --warning-bg: #FFF1D6;
  --info: #1F5FAD; --info-bg: #E6EFFB; --danger: #A30505; --danger-bg: #FFE8E6; --neutral-bg: #F3ECEA;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-11: 44px;
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 22px; --radius-full: 999px;
  --shadow-card: 0 1px 2px rgba(33,27,27,0.06), 0 6px 20px rgba(33,27,27,0.07);
  --shadow-tile: 0 1px 2px rgba(33,27,27,0.08);
  --shadow-sheet: 0 -8px 30px rgba(33,27,27,0.18);
  --font-display: "Google Sans Flex", system-ui, sans-serif;
  --font-body: Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
.app { position: relative; overflow: hidden; background: var(--surface-page); color: var(--ink); font: 400 15px/22px var(--font-body); display: flex; flex-direction: column; }
.app a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.display { font: 800 30px/36px var(--font-display); letter-spacing: -0.4px; }
.h1 { font: 700 24px/30px var(--font-display); letter-spacing: -0.2px; }
.h2 { font: 700 19px/26px var(--font-display); }
.h3 { font: 700 16px/22px var(--font-display); }
.stat-num { font: 700 28px/32px var(--font-display); }
.money { font: 800 34px/40px var(--font-display); letter-spacing: -0.4px; }
.small { font-size: 13px; line-height: 18px; }
.caption { font: 600 12px/16px var(--font-body); letter-spacing: .4px; text-transform: uppercase; color: var(--ink-muted); }
.muted { color: var(--ink-muted); } .subtle { color: var(--ink-subtle); } .strong { font-weight: 600; }
.stack { display: flex; flex-direction: column; } .hstack { display: flex; align-items: center; }
.g4 { gap: 4px; } .g8 { gap: 8px; } .g12 { gap: 12px; } .g16 { gap: 16px; } .g20 { gap: 20px; }
.between { justify-content: space-between; } .grow { flex: 1; min-width: 0; }

/* Íconos Lucide como máscara: <span class="ic ic-wallet"></span> */
.ic { display: inline-block; width: 20px; height: 20px; flex: none; background-color: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.ic-lg { width: 22px; height: 22px; } .ic-sm { width: 16px; height: 16px; } .ic-xs { width: 14px; height: 14px; }
.ic-activity { --i: url("../icons/activity.svg"); }
.ic-arrow-left { --i: url("../icons/arrow-left.svg"); }
.ic-bell { --i: url("../icons/bell.svg"); }
.ic-calendar-clock { --i: url("../icons/calendar-clock.svg"); }
.ic-chart-column { --i: url("../icons/chart-column.svg"); }
.ic-chevron-right { --i: url("../icons/chevron-right.svg"); }
.ic-circle-check { --i: url("../icons/circle-check.svg"); }
.ic-circle-x { --i: url("../icons/circle-x.svg"); }
.ic-clock { --i: url("../icons/clock.svg"); }
.ic-house { --i: url("../icons/house.svg"); }
.ic-log-out { --i: url("../icons/log-out.svg"); }
.ic-message-square { --i: url("../icons/message-square.svg"); }
.ic-phone { --i: url("../icons/phone.svg"); }
.ic-plus { --i: url("../icons/plus.svg"); }
.ic-printer { --i: url("../icons/printer.svg"); }
.ic-refresh-cw { --i: url("../icons/refresh-cw.svg"); }
.ic-router { --i: url("../icons/router.svg"); }
.ic-search { --i: url("../icons/search.svg"); }
.ic-send { --i: url("../icons/send.svg"); }
.ic-settings-2 { --i: url("../icons/settings-2.svg"); }
.ic-triangle-alert { --i: url("../icons/triangle-alert.svg"); }
.ic-user-plus { --i: url("../icons/user-plus.svg"); }
.ic-wallet { --i: url("../icons/wallet.svg"); }
.ic-wifi { --i: url("../icons/wifi.svg"); }
.ic-wrench { --i: url("../icons/wrench.svg"); }

/* Encabezado rojo del inicio */
.hero { background: var(--header-bg); color: var(--on-primary); padding: 16px 16px 60px; display: flex; flex-direction: column; gap: 20px; }
.hero-top { display: flex; align-items: center; justify-content: space-between; }
.hero-logo { height: 22px; display: block; }
.hero-date { font-size: 14px; opacity: .9; }
.icon-btn { width: 44px; height: 44px; border-radius: var(--radius-full); border: 0; display: inline-flex; align-items: center; justify-content: center; background: transparent; color: inherit; text-decoration: none; cursor: pointer; }
.icon-btn--onred { background: rgba(255,255,255,.16); color: #FFFFFF; font: 700 14px var(--font-body); }
.overlap { margin-top: -40px; }

/* Barra superior de pantallas internas */
.bar { background: var(--surface-card); border-bottom: 1px solid var(--border-subtle); min-height: 60px; padding: 8px 8px 8px 4px; display: flex; align-items: center; gap: 4px; }
.bar-title { font: 700 18px/24px var(--font-display); flex: 1; min-width: 0; }
.bar-back { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-full); text-decoration: none; color: var(--ink); }
.content { padding: 16px 16px 104px; display: flex; flex-direction: column; gap: 16px; }
.content--nonav { padding-bottom: 32px; }

/* Tarjetas y filas */
.card { background: var(--surface-card); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); padding: 18px; }
.card-flat { background: var(--surface-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-tile); }
.list { background: var(--surface-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-tile); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); min-height: 64px; }
.row + .row { border-top: 1px solid var(--border-subtle); }
.row-title { font-weight: 600; font-size: 15px; line-height: 20px; }
.row-sub { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.row .ic-chevron-right { color: var(--ink-subtle); }
.avatar { width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--neutral-bg); color: var(--ink-muted); display: inline-flex; align-items: center; justify-content: center; font: 700 14px var(--font-body); flex: none; }
.avatar--red { background: var(--primary-tint); color: var(--primary-text); }
.time { min-width: 56px; text-align: center; border-radius: 10px; padding: 6px 4px; font: 700 12px/16px var(--font-body); flex: none; }
.time--info { background: var(--info-bg); color: var(--info); } .time--warning { background: var(--warning-bg); color: var(--warning); }
.time--danger { background: var(--danger-bg); color: var(--danger); } .time--success { background: var(--success-bg); color: var(--success); }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.kv dt { font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.kv dd { margin: 2px 0 0; font-weight: 600; font-size: 15px; line-height: 20px; overflow-wrap: anywhere; }
.divider { height: 1px; background: var(--border-subtle); }

/* Control segmentado */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; background: var(--surface-sunken); border-radius: var(--radius-md); padding: 4px; }
.seg a, .seg button { height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-muted); font: 600 13px var(--font-body); display: flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; }
.seg .on { background: var(--surface-card); color: var(--ink); box-shadow: 0 1px 2px rgba(33,27,27,.14); }
/* Pestañas en dos renglones: nombre arriba y número abajo, centrados */
.seg--dos a, .seg--dos button { height: auto; min-height: 52px; flex-direction: column; gap: 2px; text-align: center; line-height: 16px; padding: 6px 2px; }
.seg--dos .seg-num { font-weight: 700; font-size: 15px; }

/* Cajitas de números (Fallas de hoy): número y palabra centrados, la palabra siempre en un renglón */
.stat-caja { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; padding: 10px 4px; border-radius: 12px; text-align: center; text-decoration: none; }
.stat-caja .stat-num { line-height: 32px; }
.stat-texto { font: 600 clamp(11px, 3vw, 13px)/16px var(--font-body); color: var(--ink-muted); white-space: nowrap; }
.stat-caja--info { background: var(--info-bg); } .stat-caja--info .stat-num { color: var(--info); }
.stat-caja--warning { background: var(--warning-bg); } .stat-caja--warning .stat-num { color: var(--warning); }
.stat-caja--success { background: var(--success-bg); } .stat-caja--success .stat-num { color: var(--success); }
.stat-caja--danger { background: var(--danger-bg); } .stat-caja--danger .stat-num { color: var(--danger); }

/* Datos en pareja (Plan / Paga cada) centrados en su caja */
.kv--centrado > div { text-align: center; }

/* Estado de los routers dentro de la franja roja del Inicio: blanco translúcido para que se vea el rojo */
.franja-routers { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .30); border-radius: var(--radius-lg); padding: 10px 12px; margin-top: 8px; }
.franja-routers-aviso { color: #FFFFFF; text-align: center; }
.franja-routers .chip { background: transparent; color: #FFFFFF; font-size: 13px; }
.franja-routers .chip .ic { width: 18px; height: 18px; }
.franja-routers .chip--success .ic { color: #9CF2BE; }  /* verde claro: en línea */
.franja-routers .chip--danger .ic { color: #FFC4BF; }   /* rojo claro: sin respuesta */
/* Con la caja de routers, la franja roja termina poco después de ella y "Fallas de hoy" se monta solo 20 px */
.hero:has(.franja-routers) { padding-bottom: 36px; }
.main-col:has(.franja-routers) .content.overlap { margin-top: -36px; }  /* 20 px sobre el rojo + 16 px de margen del contenido */
.franja-routers-aviso .ic { vertical-align: -2px; }

/* Botones de contacto con color suave de la paleta: Llamar en azul claro, WhatsApp en verde claro */
.btn--llamar { background: var(--info-bg); color: var(--info); border-color: transparent; }
.btn--wa-suave { background: var(--success-bg); color: var(--success); border-color: transparent; }
.app .btn--llamar { color: var(--info); } .app .btn--wa-suave { color: var(--success); }
.btn--llamar, .btn--wa-suave { white-space: nowrap; }

/* En Cobro, en celular y tableta: Llamar y WhatsApp a la mitad cada uno; "Reportar falla" en su propio renglón */
@media (max-width: 1023px) {
  .botones-contacto > .btn { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .botones-contacto > .btn--ghost { flex-basis: 100%; }
}

/* La MAC del equipo (Conexión): un poco más chica y siempre completa en una línea */
.kv dd.dd-mac { font-size: 13px; white-space: nowrap; overflow-wrap: normal; letter-spacing: -0.1px; }

/* Cabecera del cliente (Cobro y Diagnóstico): en celular y tableta, todo centrado
   (en Cobro, el estado queda debajo del nombre) */
@media (max-width: 1023px) {
  .cliente-cabeza { flex-direction: column; text-align: center; gap: 8px; }
  .cliente-cabeza .cliente-nombre { flex: none; align-items: center; }
}

/* Avance */
.progress { height: 8px; border-radius: 4px; background: var(--surface-sunken); overflow: hidden; }
.progress > span { display: block; height: 8px; border-radius: 4px; background: var(--success); }
.progress--red > span { background: var(--primary); }

/* Navegación inferior */
.bottom-nav { position: absolute; left: 0; right: 0; bottom: 0; height: 72px; background: var(--surface-card); border-top: 1px solid var(--border-subtle); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; color: var(--ink-subtle); font: 600 11px/14px var(--font-body); }
.nav-item.on { color: var(--primary-text); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: var(--radius-md); border: 2px solid transparent; font: 600 15px/1 var(--font-body); text-decoration: none; cursor: pointer; }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--secondary { background: var(--surface-card); color: var(--ink); border-color: var(--border-control); }
.btn--ghost { background: transparent; color: var(--primary-text); }
.btn--danger { background: var(--surface-card); color: var(--danger); border-color: var(--danger); }
.btn--whatsapp { background: #1E7A46; color: #FFFFFF; }
.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .5; }
.app .btn--primary, .app .btn--whatsapp { color: #FFFFFF; }
.app .btn--ghost { color: var(--primary-text); }
.app .btn--danger { color: var(--danger); }

/* Tarjetas del menú */
.tile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 100px; padding: 12px 8px; background: var(--surface-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-tile); text-decoration: none; color: var(--ink); text-align: center; font: 600 13px/16px var(--font-body); }
.tile-icon { width: 44px; height: 44px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; }
.tile--cobranza .tile-icon { background: var(--primary-tint); color: var(--primary-text); }
.tile--soporte .tile-icon { background: var(--info-bg); color: var(--info); }
.tile--clientes .tile-icon { background: var(--neutral-bg); color: var(--ink-muted); }
.badge { position: absolute; top: 8px; right: 8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--radius-full); background: var(--danger); color: #FFFFFF; font: 700 12px/22px var(--font-body); text-align: center; }

/* Chips y avisos */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--radius-full); font: 600 12px/16px var(--font-body); white-space: nowrap; flex: none; }
.chip--success { background: var(--success-bg); color: var(--success); } .chip--warning { background: var(--warning-bg); color: var(--warning); }
.chip--info { background: var(--info-bg); color: var(--info); } .chip--danger { background: var(--danger-bg); color: var(--danger); }
.chip--neutral { background: var(--neutral-bg); color: var(--ink-muted); }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-md); font-size: 14px; line-height: 20px; text-decoration: none; }
.alert--success { background: var(--success-bg); color: var(--success); } .alert--warning { background: var(--warning-bg); color: var(--warning); }
.alert--info { background: var(--info-bg); color: var(--info); } .alert--danger { background: var(--danger-bg); color: var(--danger); }
.alert strong { font-weight: 700; }

/* Formularios */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font: 600 13px/18px var(--font-body); color: var(--ink); }
.hint { font-size: 13px; line-height: 18px; color: var(--ink-subtle); }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: 0 12px; border: 1.5px solid var(--border-control); border-radius: var(--radius-md); background: var(--surface-card); color: var(--ink); font: 400 16px var(--font-body); }
.textarea { min-height: 88px; padding: 12px; line-height: 22px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--ink-subtle); }
.field--error .input { border-color: var(--danger); } .field--error .hint { color: var(--danger); }
.search { position: relative; }
.search .ic { position: absolute; left: 14px; top: 14px; color: var(--ink-subtle); }
.search .input { padding-left: 44px; border-radius: var(--radius-lg); }
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.choices--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice { min-height: 48px; padding: 6px 4px; border-radius: var(--radius-md); border: 2px solid var(--border-control); background: var(--surface-card); color: var(--ink); font: 600 14px/18px var(--font-body); cursor: pointer; }
.choice small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-muted); }
.choice.on { border-color: var(--primary); background: var(--primary-tint); color: var(--primary-text); }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 15px; }
.check input { width: 22px; height: 22px; accent-color: var(--primary); }

/* Hoja inferior */
.backdrop { position: absolute; inset: 0; background: rgba(33,27,27,.45); }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--surface-card); border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: 12px 20px 24px; box-shadow: var(--shadow-sheet); display: flex; flex-direction: column; gap: 18px; }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--border-subtle); align-self: center; }

/* Señal de fibra */
.meter { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.meter span { height: 8px; border-radius: 4px; background: var(--surface-sunken); }
.meter.good span.f { background: var(--success); } .meter.low span.f { background: var(--warning); } .meter.bad span.f { background: var(--danger); }

/* Recibo */
.receipt { background: var(--surface-card); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); padding: 24px 20px; display: flex; flex-direction: column; gap: 16px; }
.dashed { border-top: 1.5px dashed var(--border-subtle); }

.empty { text-align: center; padding: 32px 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--ink-muted); }
.empty-icon { width: 56px; height: 56px; border-radius: var(--radius-full); background: var(--success-bg); color: var(--success); display: flex; align-items: center; justify-content: center; }

/* ------------------------------------------------------------------
   Capa para el sistema real (Django)
   Las maquetas usan .app con ancho fijo de 390 px. En el sistema,
   el <body> lleva class="app app--live" y todo se adapta a la pantalla.
   ------------------------------------------------------------------ */
html { -webkit-text-size-adjust: 100%; }
body.app--live { margin: 0; min-height: 100vh; min-height: 100dvh; overflow: visible; }
.app--live .bottom-nav { position: fixed; z-index: 20; padding-bottom: env(safe-area-inset-bottom); height: calc(72px + env(safe-area-inset-bottom)); }
.app--live .content { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
.app--live .content--nonav { padding-bottom: 32px; }
.app--live .backdrop { position: fixed; z-index: 30; }
.app--live .sheet { position: fixed; z-index: 31; max-height: 90dvh; overflow-y: auto; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.app--live .bar { position: sticky; top: 0; z-index: 10; }

/* Foco visible con teclado: siempre azul, nunca rojo */
.app a:focus-visible, .app button:focus-visible, .app input:focus-visible,
.app select:focus-visible, .app textarea:focus-visible, .app summary:focus-visible {
  outline: 3px solid var(--focus-ring); outline-offset: 2px;
}
.app .input:focus, .app .select:focus, .app .textarea:focus { border-color: var(--focus-ring); outline: 3px solid rgba(31,95,173,.25); outline-offset: 0; }
.select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-muted) 50%), linear-gradient(135deg, var(--ink-muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.btn:hover { filter: brightness(.95); } .btn--primary:hover { background: var(--primary-hover); filter: none; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Opciones hechas con radio/checkbox reales (accesibles) */
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-tint); color: var(--primary-text); }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
label.choice { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }

/* Mensajes de Django (messages framework) */
.messages { display: flex; flex-direction: column; gap: 8px; }

/* Tablas en computadora */
.table { width: 100%; border-collapse: collapse; background: var(--surface-card); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-tile); }
.table th { text-align: left; font: 600 12px/16px var(--font-body); letter-spacing: .4px; text-transform: uppercase; color: var(--ink-muted); padding: 12px 16px; background: var(--surface-sunken); }
.table td { padding: 14px 16px; border-top: 1px solid var(--border-subtle); vertical-align: middle; }
.table tr:hover td { background: #FFFCFB; }

/* Computadora: barra lateral y contenido más ancho */
.sidenav { display: none; }
@media (min-width: 1024px) {
  body.app--live.app--desk { flex-direction: row; }
  .app--desk .sidenav { display: flex; flex-direction: column; gap: 4px; width: 240px; flex: none; min-height: 100vh; position: sticky; top: 0; background: var(--surface-card); border-right: 1px solid var(--border-subtle); padding: 20px 12px; }
  .sidenav .sidenav-logo { height: 26px; margin: 4px 12px 20px; align-self: flex-start; }
  .sidenav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: var(--radius-md); text-decoration: none; color: var(--ink-muted); font-weight: 600; font-size: 14px; }
  .sidenav a.on { background: var(--primary-tint); color: var(--primary-text); }
  .sidenav .sidenav-foot { margin-top: auto; }
  .app--desk .bottom-nav { display: none; }
  .app--desk .main-col { flex: 1; min-width: 0; }
  .app--desk .content { max-width: 1120px; margin: 0 auto; width: 100%; padding: 24px 32px 48px; }
  .app--desk .hero { padding: 24px 32px 64px; }
  .app--desk .hero:has(.franja-routers) { padding-bottom: 44px; }
  .app--desk .main-col:has(.franja-routers) .content.overlap { margin-top: -44px; }  /* 20 px sobre el rojo + 24 px de margen */
  .app--desk .main-col:has(.franja-routers) .columnas > aside { padding-top: 28px; }  /* los accesos empiezan fuera del rojo */
}
@media (min-width: 600px) and (max-width: 1023px) {
  .app--live .content { max-width: 640px; margin: 0 auto; width: 100%; }
}
/* Pantallas sin barra lateral (por ejemplo Entrar): columna de ~640 px centrada */
@media (min-width: 600px) {
  body.app--live:not(.app--desk) .content { max-width: 640px; margin-left: auto; margin-right: auto; width: 100%; }
  body.app--live .hero > * { max-width: 608px; margin-left: auto; margin-right: auto; width: 100%; }
}

/* ------------------------------------------------------------------
   Versión de computadora del sistema real (≥ 1024 px)
   ------------------------------------------------------------------ */
.solo-compu { display: none !important; }
@media (min-width: 1024px) {
  .solo-movil { display: none !important; }
  .solo-compu { display: revert !important; }
  .solo-compu.hstack, .solo-compu.stack { display: flex !important; }
  .solo-compu.btn { display: inline-flex !important; }
  .solo-compu.empty { display: flex !important; }
  /* Formularios en una columna cómoda; Inicio, Fallas, Fibra y Cobranza a todo lo ancho */
  .app--desk .content { max-width: 760px; }
  .app--desk .content--ancho { max-width: 1120px; }
  .sidenav button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--ink-muted); font: 600 14px var(--font-body); cursor: pointer; }
  .sidenav a:hover, .sidenav button:hover { background: var(--surface-sunken); }
  .sidenav a.on:hover { background: var(--primary-tint); }
  /* Dos columnas: principal y lateral (Inicio) o mitades (Cobranza) */
  .columnas { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
  .columnas--mitad { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Inicio: 88 px entre "Fallas de hoy" y las tarjetas. El contenido crece esos px de más (1120 → 1188)
     para que las cajas no cambien de tamaño; en pantallas angostas el espacio baja hasta 32 px. */
  .columnas:not(.columnas--mitad) { gap: clamp(32px, calc(100vw - 1340px), 88px); }
  .app--desk .content--ancho:has(> .columnas:not(.columnas--mitad)) { max-width: 1188px; }
  body.app--live.app--desk .hero > * { max-width: 1124px; }
  /* Menú de accesos centrado: cada fila con el mismo espacio a los lados, aunque tenga menos tarjetas */
  .menu-centrado .caption { text-align: center; }
  .menu-centrado .tile-grid { display: flex; flex-wrap: wrap; justify-content: center; }
  .menu-centrado .tile { flex: 0 0 calc((100% - 24px) / 3); }
  .table a { color: var(--ink); }
}
@media print {
  .bottom-nav, .sidenav, .bar-back, .no-print { display: none !important; }
  body.app--live { background: #fff; }
  .receipt { box-shadow: none; }
}
