/* Mejoras del portal de Arará Traza, por fuera del frontend compilado (que no se toca).
   Mismos colores del sitio: verde oscuro #102f29, verde #167e64, lima #a5db8f. */

/* ---------- Hoja del logo con movimiento (se mece desde el tallo) ---------- */
.official-leaf { transform-origin: 14% 92%; animation: tz-hoja 7s ease-in-out infinite; will-change: transform; }
.brand-link:hover .official-leaf, .brand:hover .official-leaf { animation: tz-hoja-viento 1.4s ease-in-out infinite; }
@keyframes tz-hoja {
  0%, 100% { transform: rotate(0deg) scale(1); }
  20% { transform: rotate(-5deg) scale(1.02); }
  45% { transform: rotate(2.5deg) scale(1); }
  70% { transform: rotate(-2deg) scale(1.01); }
}
@keyframes tz-hoja-viento {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-9deg) translateY(-1px); }
  50% { transform: rotate(4deg); }
  75% { transform: rotate(-5deg); }
}

/* ---------- Barra izquierda encogible (solo íconos) ---------- */
:root { --tz-sb: 244px; --tz-mini: 76px; }
@media (max-width: 1250px) { :root { --tz-sb: 222px; } }
@media (max-width: 1020px) { :root { --tz-sb: 205px; } }
html.tz-listo .sidebar { transition: width .26s cubic-bezier(.2,.7,.2,1), padding .26s cubic-bezier(.2,.7,.2,1); }
html.tz-listo .workspace-main { transition: margin-left .26s cubic-bezier(.2,.7,.2,1); }

.tz-plegar {
  position: fixed; top: 38px; left: calc(var(--tz-sb) - 13px); z-index: 60;
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid #2b5247; background: #173d35; color: #a5db8f;
  display: none; align-items: center; justify-content: center; cursor: pointer; padding: 0;
  box-shadow: 0 2px 10px #0b1f1a40; transition: left .26s cubic-bezier(.2,.7,.2,1), background .15s, transform .15s;
}
.tz-plegar:hover { background: #1f4d42; transform: scale(1.08); }
.tz-plegar:focus-visible { outline: 2px solid #a5db8f; outline-offset: 2px; }
.tz-plegar svg { width: 14px; height: 14px; transition: transform .26s; }
html.tz-con-app .tz-plegar { display: inline-flex; }
@media (max-width: 760px) { html.tz-con-app .tz-plegar { display: none; } }

@media (min-width: 761px) {
  html.tz-mini .tz-plegar { left: calc(var(--tz-mini) - 13px); }
  html.tz-mini .tz-plegar svg { transform: rotate(180deg); }
  html.tz-mini .sidebar { width: var(--tz-mini); padding-left: 12px; padding-right: 12px; overflow-x: hidden; }
  html.tz-mini .workspace-main { margin-left: var(--tz-mini); }
  html.tz-mini .sidebar .brand-name,
  html.tz-mini .sidebar .workspace-picker,
  html.tz-mini .sidebar .nav-caption,
  html.tz-mini .sidebar .sidebar-bottom,
  html.tz-mini .sidebar .nav-item > span,
  html.tz-mini .sidebar .sidebar-utility .nav-item > svg:not(:first-child) { display: none !important; }
  html.tz-mini .sidebar .brand-link { display: flex; justify-content: center; }
  html.tz-mini .sidebar .brand { justify-content: center; }
  html.tz-mini .sidebar nav { margin-top: 18px; }
  html.tz-mini .sidebar .nav-item { justify-content: center; padding-left: 0; padding-right: 0; position: relative; }
  html.tz-mini .sidebar .nav-item .nav-count { position: absolute; top: 3px; right: 6px; min-width: 17px; height: 17px; font-size: 10px; padding: 0 4px; margin: 0; }
}
.tz-globo {
  position: fixed; z-index: 500; pointer-events: none; background: #102f29; color: #fff; font: 600 12.5px/1.2 Inter, "Segoe UI", Arial, sans-serif;
  padding: 7px 10px; border-radius: 8px; box-shadow: 0 6px 22px #0b1f1a40; white-space: nowrap;
  opacity: 0; transform: translateX(-4px); transition: opacity .12s, transform .12s;
}
.tz-globo.ver { opacity: 1; transform: none; }
.tz-globo::before { content: ""; position: absolute; left: -4px; top: 50%; margin-top: -4px; border: 4px solid transparent; border-left: 0; border-right-color: #102f29; }

/* ---------- Animaciones al cambiar de pestaña y al abrir ventanas ---------- */
dialog.modal[open] { animation: tz-ventana .24s cubic-bezier(.2,.8,.2,1); }
dialog.modal::backdrop { animation: tz-fundido .24s ease-out; }
@keyframes tz-ventana { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes tz-fundido { from { opacity: 0; } to { opacity: 1; } }
.nav-item { transition: background-color .18s, color .18s; }
.nav-item.active > svg:first-child { animation: tz-icono .32s cubic-bezier(.2,.8,.2,1); }
@keyframes tz-icono { 0% { transform: scale(.82); } 60% { transform: scale(1.08); } 100% { transform: none; } }

/* ---------- En vivo + avisos ---------- */
.tz-vivo {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px;
  background: #edf6f1; color: #167e64; font: 600 11.5px/1 Inter, "Segoe UI", Arial, sans-serif; letter-spacing: .02em; white-space: nowrap;
}
.tz-vivo i { width: 7px; height: 7px; border-radius: 50%; background: #9aa9a3; }
.tz-vivo.on i { background: #22a06b; box-shadow: 0 0 0 0 #22a06b80; animation: tz-latido 2.4s infinite; }
.tz-vivo.off { background: #f4f1ea; color: #8b7a55; }
@keyframes tz-latido { 0% { box-shadow: 0 0 0 0 #22a06b70; } 70% { box-shadow: 0 0 0 7px #22a06b00; } 100% { box-shadow: 0 0 0 0 #22a06b00; } }
@media (max-width: 1020px) { .tz-vivo span { display: none; } .tz-vivo { padding: 0 9px; } }

.tz-avisos { position: fixed; top: 86px; right: 18px; z-index: 450; display: grid; gap: 10px; width: min(370px, calc(100vw - 24px)); pointer-events: none; }
@media (max-width: 760px) { .tz-avisos { top: 72px; right: 12px; } }
.tz-aviso {
  pointer-events: auto; position: relative; display: grid; grid-template-columns: 34px 1fr auto; gap: 11px; align-items: start;
  background: #fff; color: #1d302c; border: 1px solid #dfe9d6; border-left: 4px solid #167e64; border-radius: 12px; padding: 12px 12px 12px 12px;
  box-shadow: 0 14px 40px #102f2926; font: 13px/1.45 Inter, "Segoe UI", Arial, sans-serif; overflow: hidden;
  animation: tz-entra .34s cubic-bezier(.2,.9,.25,1.15);
}
.tz-aviso.sale { animation: tz-sale .26s ease-in forwards; }
@keyframes tz-entra { from { opacity: 0; transform: translateX(28px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes tz-sale { to { opacity: 0; transform: translateX(28px); } }
.tz-aviso.ticket { border-left-color: #b6802d; }
.tz-aviso.alerta { border-left-color: #bb5c53; }
.tz-aviso .tz-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #edf6f1; color: #167e64; }
.tz-aviso.ticket .tz-ico { background: #fbf3e6; color: #b6802d; }
.tz-aviso .tz-ico svg { width: 18px; height: 18px; }
.tz-aviso b { display: block; font-weight: 650; font-size: 13.5px; color: #102f29; }
.tz-aviso p { margin: 2px 0 0; color: #65796b; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tz-aviso .tz-acc { display: flex; gap: 8px; margin-top: 8px; }
.tz-aviso .tz-acc button { border: 0; border-radius: 7px; padding: 6px 11px; font: 600 12px/1 inherit; cursor: pointer; background: #102f29; color: #fff; }
.tz-aviso .tz-acc button.sec { background: #edf6f1; color: #167e64; }
.tz-aviso .tz-x { border: 0; background: none; color: #9aa9a3; cursor: pointer; padding: 2px; border-radius: 6px; line-height: 0; }
.tz-aviso .tz-x:hover { background: #f1f5f2; color: #1d302c; }
.tz-aviso .tz-tiempo { position: absolute; left: 0; bottom: 0; height: 2px; background: #a5db8f; animation: tz-tiempo linear forwards; }
.tz-aviso:hover .tz-tiempo { animation-play-state: paused; }
@keyframes tz-tiempo { from { width: 100%; } to { width: 0; } }

/* Fila/tarjeta que acaba de cambiar */
.tz-destello { animation: tz-destello 1.6s ease-out; }
@keyframes tz-destello { 0% { background-color: #fff7d6; } 100% { background-color: transparent; } }

@media (prefers-reduced-motion: reduce) {
  .official-leaf, .brand-link:hover .official-leaf, .tz-vivo.on i, dialog.modal[open], dialog.modal::backdrop, .nav-item.active > svg:first-child, .tz-aviso, .tz-aviso.sale { animation: none !important; }
  html.tz-listo .sidebar, html.tz-listo .workspace-main, .tz-plegar { transition: none !important; }
}

/* Fuera de producción: círculo flotante «AMBIENTE TESTING» (no tapa clics: los deja pasar). */
.tz-testing {
  position: fixed; right: 18px; bottom: 18px; z-index: 2147483000; width: 82px; height: 82px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center;
  background: radial-gradient(circle at 32% 28%, #ffbb55, #e2780e 72%); color: #fff;
  font: 800 9.5px/1 Inter, "Segoe UI", Arial, sans-serif; letter-spacing: .08em; text-shadow: 0 1px 1px #0003;
  box-shadow: 0 0 0 3px #fff, 0 8px 20px #e2780e66; pointer-events: none; user-select: none;
  animation: tz-testing-flota 3.4s ease-in-out infinite;
}
.tz-testing b { font-weight: 700; font-size: 9px; opacity: .92; }
.tz-testing span { font-weight: 900; font-size: 12px; letter-spacing: .06em; }
@keyframes tz-testing-flota { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-6px) rotate(-6deg); } }
@media (max-width: 760px) { .tz-testing { width: 64px; height: 64px; right: 10px; bottom: 10px; } .tz-testing b { font-size: 7.5px; } .tz-testing span { font-size: 9.5px; } }
@media (prefers-reduced-motion: reduce) { .tz-testing { animation: none; transform: rotate(-6deg); } }

/* =====================================================================================================================
   Celular y tablet (≤ 760 px): el portal entero adaptado para usarse con el dedo y como app instalada.
   ===================================================================================================================== */
/* Un elemento «absoluto» dentro de una tabla con scroll (el texto oculto «Acciones») ensanchaba toda la página. */
.table-scroll { position: relative; }
@media (max-width: 760px) {
  html, body { overflow-x: clip; }
  body { -webkit-tap-highlight-color: transparent; }
  /* iPhone hace zoom al tocar un campo con letra de menos de 16 px: se evita así. */
  input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { font-size: 16px !important; }
  /* Barra de arriba en una sola fila: «Explorar demo» y «Cerrar sesión» quedan solo con su ícono. */
  .topbar { padding-top: max(10px, env(safe-area-inset-top)); }
  .topbar-actions { flex-wrap: nowrap; gap: 6px; }
  .topbar-actions .demo-button, .topbar-actions .logout-button { font-size: 0; gap: 0; min-width: 40px; min-height: 40px; padding: 0 10px; justify-content: center; }
  .topbar-actions .demo-button svg, .topbar-actions .logout-button svg { width: 19px; height: 19px; flex: none; }
  .topbar-actions .user-info { display: none; }
  /* Botones y renglones más cómodos para el dedo. */
  .nav-item { min-height: 46px; }
  #main-content button, dialog.modal button { min-height: 40px; }
  .main-content { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  /* Ventanas (solicitud, movimiento, habilitación…) como hoja a pantalla completa desde abajo. */
  dialog.modal[open] {
    width: 100vw !important; max-width: 100vw !important; max-height: calc(100dvh - 12px) !important; margin: auto 0 0 0 !important;
    border-radius: 18px 18px 0 0 !important; padding-bottom: env(safe-area-inset-bottom);
    animation: tz-hoja-sube .28s cubic-bezier(.2,.8,.2,1);
  }
  @keyframes tz-hoja-sube { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
  /* Tablas como tarjetas: cada fila es una tarjeta y cada dato lleva el nombre de su columna. */
  .table-scroll { overflow-x: visible !important; }
  table.records-table { min-width: 0 !important; width: 100% !important; border: 0 !important; }
  table.records-table thead { display: none; }
  table.records-table, table.records-table tbody { display: block; }
  table.records-table tbody tr {
    display: grid; grid-template-columns: 1fr; gap: 4px; padding: 12px 14px; margin: 0 0 10px; border: 1px solid #e3ebdf; border-radius: 14px; background: #fff;
    box-shadow: 0 2px 8px #102f290a;
  }
  table.records-table tbody td { display: grid; grid-template-columns: minmax(84px, 38%) 1fr; column-gap: 12px; row-gap: 2px; align-items: start; padding: 3px 0 !important; border: 0 !important; text-align: right; min-width: 0; white-space: normal !important; }
  table.records-table tbody td > * { grid-column: 2; justify-self: end; text-align: right; }
  table.records-table tbody td[data-tz-col]::before { content: attr(data-tz-col); grid-column: 1; grid-row: 1 / span 6; text-align: left; color: #6b7d72; font-size: 12px; font-weight: 600; padding-top: 1px; }
  table.records-table tbody td:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-weight: 650; text-align: left; justify-content: flex-start; padding-bottom: 6px !important; border-bottom: 1px solid #eef3ea !important; margin-bottom: 2px; }
  table.records-table tbody td:first-child::before { display: none; }
  table.records-table tbody td[colspan] { display: block; text-align: center; }
  table.records-table tbody td > * { min-width: 0; }
}

/* =====================================================================================================================
   Avisos de la mesa de ayuda para admins (/avisos.js): alarma, sector y aviso para activarlas.
   ===================================================================================================================== */
.tz-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 10px; padding: 10px 15px; min-height: 42px; font: 650 13.5px/1.1 Inter, "Segoe UI", Arial, sans-serif; cursor: pointer; background: #167e64; color: #fff; }
.tz-btn svg { width: 17px; height: 17px; flex: none; }
.tz-btn:hover { filter: brightness(1.07); }
.tz-btn:focus-visible { outline: 2px solid #a5db8f; outline-offset: 2px; }
.tz-btn.sec { background: #edf6f1; color: #167e64; }
.tz-btn.ter { background: transparent; color: #65796b; border: 1px solid #dfe9d6; }

.tz-alarma {
  position: fixed; z-index: 2147482000; right: 18px; bottom: 18px; width: min(420px, calc(100vw - 24px));
  background: #fff; color: #1d302c; border-radius: 18px; padding: 16px 16px 14px; border: 2px solid #d64545;
  box-shadow: 0 0 0 6px #d6454526, 0 22px 60px #102f2950; font: 13.5px/1.45 Inter, "Segoe UI", Arial, sans-serif;
  animation: tz-alarma-entra .35s cubic-bezier(.2,.9,.25,1.2), tz-alarma-pulso 1.6s ease-in-out .35s infinite;
}
@keyframes tz-alarma-entra { from { opacity: 0; transform: translateY(30px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes tz-alarma-pulso { 0%, 100% { box-shadow: 0 0 0 4px #d6454522, 0 22px 60px #102f2950; } 50% { box-shadow: 0 0 0 12px #d6454510, 0 22px 60px #102f2950; } }
.tz-alarma-cab { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; }
.tz-alarma-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #fdeaea; color: #c33b3b; }
.tz-alarma-ico svg { width: 24px; height: 24px; animation: tz-campana 1s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes tz-campana { 0%, 60%, 100% { transform: rotate(0); } 10% { transform: rotate(16deg); } 25% { transform: rotate(-14deg); } 40% { transform: rotate(9deg); } }
.tz-alarma-cab small { display: block; color: #c33b3b; font-weight: 700; font-size: 11.5px; letter-spacing: .03em; text-transform: uppercase; }
.tz-alarma-cab b { display: block; font-size: 15px; color: #102f29; line-height: 1.3; }
.tz-alarma em, .tz-av em { font-style: normal; font-size: 11px; background: #fdeaea; color: #c33b3b; border-radius: 999px; padding: 1px 7px; vertical-align: 2px; }
.tz-alarma-emp { margin: 10px 0 2px; color: #65796b; font-size: 12.5px; }
.tz-alarma-txt { margin: 0; white-space: pre-line; max-height: 7.5em; overflow: auto; }
.tz-alarma-vis { margin: 8px 0 0; color: #167e64; font-size: 12.5px; }
.tz-alarma-son { margin: 8px 0 0; color: #b6802d; font-size: 12.5px; font-weight: 600; }
.tz-alarma-acc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tz-alarma-acc .tz-btn:first-child { background: #c33b3b; flex: 1 1 100%; }
@media (max-width: 760px) {
  .tz-alarma { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; }
  .tz-alarma-acc .tz-btn { flex: 1 1 auto; }
}

.tz-nav-avisos > svg { width: 20px; height: 20px; flex: none; }
.tz-nav-avisos .tz-cuenta { background: #d64545 !important; color: #fff !important; }

.tz-sector { position: fixed; inset: 0; z-index: 2147481000; background: #0b1f1a73; display: none; align-items: stretch; justify-content: flex-end; }
.tz-sector.ver { display: flex; animation: tz-fundido .2s ease-out; }
html.tz-sector-abierto { overflow: hidden; }
.tz-sector-caja { width: min(760px, 100vw); height: 100%; background: #f6f8f4; display: flex; flex-direction: column; box-shadow: -20px 0 60px #0b1f1a40; animation: tz-sector-entra .28s cubic-bezier(.2,.8,.2,1); font: 13.5px/1.45 Inter, "Segoe UI", Arial, sans-serif; color: #1d302c; }
@keyframes tz-sector-entra { from { transform: translateX(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.tz-sector-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(18px, env(safe-area-inset-top)) 22px 14px; background: #102f29; color: #fff; }
.tz-sector-cab small { color: #a5db8f; font-weight: 700; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.tz-sector-cab h2 { margin: 2px 0 0; font-size: 20px; line-height: 1.2; color: #fff; }
.tz-cerrar { border: 0; background: #ffffff1a; color: inherit; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; flex: none; }
.tz-cerrar svg { width: 20px; height: 20px; }
.tz-sector-cuerpo { flex: 1; overflow: auto; padding: 16px 22px calc(28px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.tz-pend-barra { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 16px; border-radius: 12px; background: #fdeaea; color: #8e2a2a; margin-bottom: 14px; }
.tz-pend-barra.ok { background: #e7f4ec; color: #167e64; font-weight: 600; padding: 13px 16px; }
.tz-pend-barra .tz-btn { background: #c33b3b; }
.tz-filtros { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.tz-pestanas { display: inline-flex; background: #e9efe6; border-radius: 10px; padding: 3px; }
.tz-pestanas button { border: 0; background: none; padding: 8px 13px; border-radius: 8px; font: 600 13px/1 Inter, "Segoe UI", Arial, sans-serif; color: #65796b; cursor: pointer; min-height: 36px; }
.tz-pestanas button.act { background: #fff; color: #102f29; box-shadow: 0 1px 4px #102f2914; }
.tz-filtros input { flex: 1 1 200px; min-height: 40px; border: 1px solid #dfe9d6; border-radius: 10px; padding: 0 12px; font: 14px Inter, "Segoe UI", Arial, sans-serif; background: #fff; }
.tz-lista { display: grid; gap: 10px; }
.tz-vacio { text-align: center; color: #8a998f; padding: 26px 0; }
.tz-av { background: #fff; border: 1px solid #e3ebdf; border-left: 4px solid #167e64; border-radius: 14px; padding: 13px 15px; }
.tz-av.pend { border-left-color: #d64545; }
.tz-av header { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: #8a998f; }
.tz-av-tipo { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #b6802d; }
.tz-av h4 { margin: 4px 0 2px; font-size: 14.5px; color: #102f29; }
.tz-av-emp { margin: 0; color: #65796b; font-size: 12.5px; }
.tz-av-txt { margin: 6px 0 0; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tz-av-estado { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; }
.tz-av-estado svg { width: 16px; height: 16px; color: #167e64; }
.tz-av-estado small { color: #8a998f; }
.tz-punto { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #9aa9a3; flex: none; }
.tz-punto.rojo { background: #d64545; box-shadow: 0 0 0 3px #d6454526; }
.tz-av-lect { list-style: none; margin: 8px 0 0; padding: 8px 10px; background: #f6f8f4; border-radius: 10px; display: grid; gap: 4px; font-size: 12.5px; }
.tz-av-lect li { display: flex; gap: 8px; align-items: center; }
.tz-av-lect svg { width: 14px; height: 14px; color: #167e64; flex: none; }
.tz-av footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tz-mas { width: 100%; margin-top: 12px; }
.tz-disp { margin-top: 22px; background: #fff; border: 1px solid #e3ebdf; border-radius: 14px; padding: 16px; }
.tz-disp h3 { margin: 0 0 6px; font-size: 15px; color: #102f29; }
.tz-disp h4 { margin: 16px 0 6px; font-size: 13px; color: #102f29; }
.tz-disp p { margin: 0 0 10px; }
.tz-disp .tz-ok { color: #167e64; font-weight: 600; }
.tz-disp .tz-mal { color: #b03a3a; }
.tz-disp .tz-nota { color: #8a998f; font-size: 12px; margin: 14px 0 0; }
.tz-inst { margin-top: 12px; padding-top: 12px; border-top: 1px solid #eef3ea; }
.tz-disps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tz-disps li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; background: #f6f8f4; border-radius: 10px; }
.tz-disps small { display: block; color: #8a998f; font-size: 11.5px; }
.tz-disps em { font-style: normal; color: #167e64; font-size: 12px; }
@media (max-width: 760px) {
  .tz-sector-caja { width: 100vw; }
  .tz-sector-cab, .tz-sector-cuerpo { padding-left: 14px; padding-right: 14px; }
  .tz-pestanas { width: 100%; }
  .tz-pestanas button { flex: 1; }
}

.tz-ofrece { position: fixed; z-index: 2147480000; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom)); width: min(460px, calc(100vw - 16px));
  display: grid; grid-template-columns: 40px 1fr auto auto; gap: 10px; align-items: center; background: #102f29; color: #fff; border-radius: 16px; padding: 12px; box-shadow: 0 18px 50px #0b1f1a60;
  font: 13px/1.4 Inter, "Segoe UI", Arial, sans-serif; }
.tz-ofrece .tz-alarma-ico { width: 40px; height: 40px; background: #ffffff1a; color: #a5db8f; }
.tz-ofrece p { margin: 0; color: #cfe3d8; }
.tz-ofrece p b { display: block; color: #fff; }
.tz-ofrece .tz-btn { background: #a5db8f; color: #102f29; }
@media (max-width: 480px) { .tz-ofrece { grid-template-columns: 40px 1fr auto; } .tz-ofrece .tz-btn { grid-column: 1 / -1; grid-row: 2; } }
.tz-toast { position: fixed; z-index: 2147483100; left: 50%; transform: translateX(-50%); top: calc(14px + env(safe-area-inset-top)); max-width: calc(100vw - 24px); background: #102f29; color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: 0 12px 34px #0b1f1a50; font: 600 13px/1.4 Inter, "Segoe UI", Arial, sans-serif; }
@media (prefers-reduced-motion: reduce) { .tz-alarma, .tz-alarma-ico svg, .tz-sector.ver, .tz-sector-caja, dialog.modal[open] { animation: none !important; } }
/* Con el sector abierto, la alarma no lo tapa (sigue sonando; ahí mismo se confirma). */
html.tz-sector-abierto .tz-alarma { display: none; }
/* La alarma va como popover (capa superior): se anulan los estilos por defecto del navegador para popover. */
.tz-alarma[popover] { inset: auto 18px 18px auto; margin: 0; overflow: visible; }
@media (max-width: 760px) { .tz-alarma[popover] { inset: auto 8px calc(8px + env(safe-area-inset-bottom)) 8px; } }
/* Con una ventana del portal abierta (por ejemplo la solicitud), la alarma queda chica abajo a la izquierda. */
.tz-alarma.compacta { width: auto; max-width: calc(100vw - 150px); padding: 8px; border-radius: 14px; }
.tz-alarma.compacta[popover] { inset: auto auto calc(10px + env(safe-area-inset-bottom)) 10px; }
.tz-alarma.compacta .tz-alarma-cab, .tz-alarma.compacta > p, .tz-alarma.compacta .tz-btn:not(:first-child) { display: none; }
.tz-alarma.compacta .tz-alarma-acc { margin: 0; }
.tz-alarma.compacta .tz-alarma-acc .tz-btn:first-child { flex: none; }
