:root{font-family:system-ui,sans-serif;color:#19384a;background:#f3f7f9}*{box-sizing:border-box}body{margin:0}.head{display:flex;justify-content:space-between;align-items:center;background:#092d42;padding:14px 24px}.brand img{max-width:190px;height:42px}.back{color:#fff;font-size:13px}main{max-width:1120px;margin:auto;padding:24px}.hero{display:flex;justify-content:space-between;align-items:end;gap:22px;background:#103c54;color:white;border-radius:15px;padding:25px}.hero h1{margin:8px 0;font-size:32px}.hero p{font-size:13px;color:#c9e4ee}.eyebrow{font-size:10px;letter-spacing:.11em;color:#b6e8ed;font-weight:bold}.identity span{display:inline-block;margin-right:9px;font-size:11px;padding:7px;background:#ffffff19;border-radius:8px}.hero button{border:0;background:#80c53c;color:#17321d;font-weight:800;border-radius:8px;padding:12px;cursor:pointer}.status{font-size:13px;color:#46606d;margin:18px 0}.status.error{color:#a22731}.tabs{display:flex;gap:8px;flex-wrap:wrap}.tabs button{padding:12px;border:1px solid #ccd8df;border-radius:10px;background:white;color:#1a445c;font-size:12px;font-weight:800;cursor:pointer}.tabs button.active{background:#19435c;color:#fff}.tabs b{display:inline-block;padding:3px 6px;border-radius:6px;background:#e6eff3;color:#183749}.intro{margin:20px 0 14px}.intro h2{margin:0 0 4px}.intro p,.foot{color:#69808c;font-size:12px}.cards{display:grid;gap:12px}.work,.empty{border:1px solid #d6e1e8;border-radius:12px;background:#fff;padding:20px}.workhead{display:flex;justify-content:space-between;flex-wrap:wrap;gap:10px}.work h3{margin:5px 0;font-size:17px}.eyetype{font-size:10px;font-weight:800;letter-spacing:.06em;color:#0b6277}.when{font-size:11px;padding:7px;background:#e9f2f5;border-radius:7px}.work p,.empty p{font-size:13px;color:#4e6572;line-height:1.5}.work .statusline{font-weight:bold;color:#234559}.work .paper{border-left:3px solid #75aa44;padding:7px 10px;background:#f4f8f1}.primary{display:inline-block;background:#096080;color:white;padding:13px 16px;border-radius:8px;text-decoration:none;font-size:13px;font-weight:800}.empty a{color:#075a79}.foot{line-height:1.5}button{min-height:44px}@media(max-width:690px){main{padding:12px}.hero{flex-direction:column;align-items:stretch;padding:18px}.hero button{width:100%}.tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.tabs button:last-child{grid-column:1/-1}.tabs button{font-size:11px;padding:8px 5px}.brand img{max-width:145px}.work,.empty{padding:15px}.primary{display:block;text-align:center}}/* Pendiente de informe (supervisión) */
[data-section="pendiente"]{border-color:#b71c1c!important;color:#8a1c1c!important}
[data-section="pendiente"].active{background:#b71c1c!important;color:#fff!important}
.work a.secondary{display:inline-flex;align-items:center;min-height:48px;margin-top:8px;padding:10px 16px;border:1px solid #D5DCE4;border-radius:10px;color:#0B2D5B;font-weight:700;text-decoration:none;background:#fff}
/* Emergencias: primero en la lista y destacadas en rojo. */
.work.emergency{border:2px solid #B42318;border-left-width:6px;background:#FFF6F5}
.work.emergency h3{color:#912018}
.embadge{display:inline-block;margin:0 0 6px;padding:4px 10px;border-radius:999px;background:#B42318;color:#fff;font-size:13px;font-weight:700;letter-spacing:.2px}
/* Vista del técnico (26-10-2026): menos texto. Solo título, día, pestañas de trabajo y tarjetas cortas. */
.tech-mode .hero .eyebrow,.tech-mode .hero p,.tech-mode #sectionHint,.tech-mode #foot,.tech-mode #operationalDocs{display:none}
.tech-mode #status:not(.error){display:none}
.tech-mode .tabs [data-section="pendiente"],.tech-mode .tabs [data-section="historial"]{display:none}
.tech-mode .tabs{display:flex;flex-wrap:wrap;gap:8px}
.tech-mode .tabs [data-section="hoy"]{order:-1}
.tech-mode .work .who,.tech-mode .work .paper,.tech-mode .work .next{display:none}
.tech-mode .work .statusline{margin:6px 0 12px}
.tech-mode .hero{padding-bottom:12px}
.tech-mode .intro{margin-top:4px}
/* Técnico (26-10-2026, 2.ª revisión): un solo «Atrás», «Actualizar» chico arriba a la derecha, sin pestañas,
   fecha en palabras y «Hoy» con su número separado. Lo nuevo arriba. */
.daytext{display:none}
.tech-mode .daytext{display:block;margin:4px 0 0;font-size:17px;color:#475467}
.tech-mode .hero .identity,.tech-mode header.head .back,.tech-mode .tabs{display:none!important}
.tech-mode .hero{display:block}
header.head .refresh-top{margin-left:auto;min-height:44px;padding:8px 16px;font-size:16px;border-radius:10px;width:auto}
.tech-mode #sectionTitle{display:flex;align-items:center;gap:12px;font-size:26px}
.tech-mode #sectionTitle .count{display:inline-grid;place-items:center;min-width:36px;height:36px;padding:0 10px;border-radius:999px;background:#0B2D5B;color:#fff;font-size:18px}
.latebadge{display:inline-block;margin:0 0 6px;padding:4px 10px;border-radius:999px;background:#FEF0C7;color:#93370D;font-size:13px;font-weight:700}
.tech-mode .hero p.daytext{display:block}
header.head #refresh.refresh-top{background:#fff;color:#0B2D5B;border:2px solid #0B2D5B;font-weight:700;box-shadow:none}
header.head #refresh.refresh-top:disabled{opacity:.6}
/* Campana con el número de trabajos de hoy, a la derecha del título (solo técnico). */
.tech-mode .hero>div{position:relative;padding-right:76px}
.bell{display:none}
.tech-mode .bell:not([hidden]){display:inline-flex;position:absolute;top:50%;right:0;transform:translateY(-50%);width:60px;height:60px;align-items:center;justify-content:center;border-radius:50%;background:#EEF2F7;color:#0B2D5B}
.tech-mode .bell b{position:absolute;top:-4px;right:-4px;min-width:28px;height:28px;padding:0 7px;display:grid;place-items:center;border-radius:999px;background:#0B2D5B;color:#fff;font-size:16px;line-height:1;border:2px solid #fff}
.tech-mode .bell.has-emergency{background:#FDECEA;color:#B42318}
.tech-mode .bell.has-emergency b{background:#B42318}
.tech-mode #sectionTitle,.tech-mode .intro{display:none}
.tech-mode #cards{margin-top:16px}
/* Barra superior del técnico: logo, «Atrás» y «Actualizar» al mismo alto, alineados y del mismo porte. */
.tech-mode header.head{display:flex;align-items:center;gap:12px;padding:12px 16px!important;min-height:72px}
.tech-mode header.head .brand{display:flex;align-items:center;height:48px;margin-right:4px}
.tech-mode header.head .brand img{height:34px;width:auto;display:block}
.tech-mode header.head .zx-back,.tech-mode header.head #refresh.refresh-top{
 display:inline-flex;align-items:center;justify-content:center;gap:8px;height:48px;min-height:48px;padding:0 18px!important;margin:0;
 border-radius:12px!important;font:700 17px/1 system-ui,sans-serif!important;box-shadow:none!important;width:auto}
.tech-mode header.head .zx-back{background:#fff!important;color:#0B2D5B!important;border:2px solid #D0D5DD!important}
.tech-mode header.head #refresh.refresh-top{margin-left:auto;background:#0B2D5B!important;color:#fff!important;border:2px solid #0B2D5B!important}
.tech-mode header.head .zx-back svg{width:18px;height:18px}
.tech-mode header.head .zx-back,.tech-mode header.head #refresh.refresh-top{height:48px!important;min-height:48px!important;box-sizing:border-box!important}
/* Orden del técnico: «Atrás» a la izquierda, logo ZUREX al centro, «Actualizar» a la derecha. */
.tech-mode header.head .zx-back{order:0}
.tech-mode header.head .brand{order:1;flex:1;justify-content:center;margin:0}
.tech-mode header.head #refresh.refresh-top{order:2;margin-left:0}
/* Una tarjeta por visita en Gendarmería (27-10-2026) */
.vgroups{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0}
.vg{display:inline-block;padding:2px 10px;border-radius:999px;font-size:14px;font-weight:800;color:#fff;background:#0B2D5B}
.vg-GEN{background:#B54708}.vg-RS{background:#B42318}.vg-RH{background:#1D4ED8}
.vitems{margin:4px 0 8px;padding-left:20px}.vitems li{margin:2px 0}

/* Botones de la tarjeta (27-10-2026): lado a lado, mismo alto; «Entregado y liberado» en verde ZUREX. */
.work-actions{display:grid;grid-template-columns:1fr;gap:10px;margin-top:14px}
.work-actions.two{grid-template-columns:1fr 1fr}
body.tech-readable .work .work-actions a{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:60px;margin:0;padding:10px 12px;border-radius:12px;font-size:17px;font-weight:800;line-height:1.2;text-align:center;text-decoration:none;overflow-wrap:normal;word-break:normal}
body.tech-readable .work .work-actions a.primary{background:#0B2D5B;color:#fff;border:2px solid #0B2D5B}
body.tech-readable .work .work-actions a.secondary{background:#fff;color:#0B2D5B;border:2px solid #C9D3DE}
body.tech-readable .work .work-actions a.deliver{background:#EAF6EE;color:#14532D;border-color:#2EA04A}
.work-actions a.deliver svg{width:24px;height:24px;flex:none;color:#2EA04A}
body.tech-readable .work .work-actions a:active{transform:translateY(1px)}
@media (max-width:520px){.work-actions.two{grid-template-columns:1fr}}

/* Etiqueta «PRUEBA» (27-10-2026) */
.testbadge{display:inline-block;padding:3px 10px;border-radius:999px;background:#B42318;color:#fff;font-size:13px;font-weight:800;letter-spacing:.04em;margin-right:6px}
body.tech-readable .testbadge{font-size:14px}
/* MP eventual (27-10-2026): azul, para distinguirlo de la ruta mensual (las emergencias siguen en rojo). */
.work.eventual{border:2px solid #175CD3;border-left-width:6px;background:#F5F8FF}
.work.eventual h3{color:#1849A9}
.mpbadge{display:inline-block;margin:0 0 6px;padding:4px 10px;border-radius:999px;background:#175CD3;color:#fff;font-size:13px;font-weight:700;letter-spacing:.2px}

/* «Un día más» (02-11-2026, técnico Gendarmería) */
.work-actions.three{grid-template-columns:1fr 1fr 1fr}
.work .work-actions button.extend{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:60px;margin:0;padding:10px 12px;border-radius:12px;font-size:17px;font-weight:800;background:#fff7e8;color:#7a4b00;border:2px solid #f0c98a;cursor:pointer}
.work .work-actions button.extend:disabled{opacity:.5}
@media(max-width:600px){.work-actions.three{grid-template-columns:1fr 1fr}.work .work-actions button.extend{grid-column:1/-1}}

/* Técnico (09-11-2026, «autorizo así»): «☰ Menú» arriba a la izquierda (antes de «Atrás») y tarjetas más compactas. */
.tech-mode header.head .zx-shell-toggle.mt-menu{position:static!important;left:auto!important;bottom:auto!important;order:-1;height:48px;min-height:48px;padding:0 14px!important;margin:0;
 border-radius:12px!important;border:2px solid #D0D5DD!important;background:#fff!important;color:#0B2D5B!important;font:700 17px/1 system-ui,sans-serif!important;box-shadow:none!important;box-sizing:border-box!important;overflow-wrap:normal}
.tech-mode header.head{gap:8px}
.tech-mode #cards{margin-top:10px}
.tech-mode .cards{gap:10px}
.tech-mode .work{padding:12px 14px!important;margin:0 0 10px!important}
.tech-mode .work h3{font-size:19px!important;line-height:1.25!important;margin:4px 0 2px!important}
.tech-mode .work .workhead{gap:6px}
.tech-mode .work .when{font-size:15px!important;padding:3px 10px!important}
.tech-mode .work .embadge,.tech-mode .work .mpbadge,.tech-mode .work .latebadge,.tech-mode .work .testbadge,.tech-mode .work .eyetype{font-size:12.5px!important}
.tech-mode .vgroups{margin:4px 0}
.tech-mode .vg{font-size:12.5px;padding:1px 8px}
.tech-mode .vitems{margin:2px 0 4px;font-size:15.5px}.tech-mode .vitems li{margin:0}
.tech-mode .work .statusline{margin:4px 0 8px;font-size:15px}
.tech-mode .work .work-actions{gap:8px;margin-top:8px}
body.tech-readable.tech-mode .work .work-actions a,body.tech-mode .work .work-actions button.extend{min-height:48px;padding:6px 10px;font-size:15.5px;border-radius:10px}

/* mc1 (29-11-2026): en teléfono las pestañas van en una fila que se desliza (antes 6 apretadas) y un solo botón para volver. */
.head:has(.zx-back) .back{display:none!important}
@media (max-width:700px){
 body #tabs.tabs{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;gap:6px!important;scrollbar-width:none;padding:2px 2px 6px;grid-auto-flow:unset}
 body #tabs.tabs::-webkit-scrollbar{display:none}
 body #tabs.tabs>button{flex:0 0 auto!important;flex-direction:row!important;align-items:center;gap:6px!important;min-height:44px!important;padding:8px 12px!important;font-size:13px!important;white-space:nowrap!important;line-height:1.2}
 body #tabs.tabs>button br{display:none}
}

/* md1: pestañas Pendientes | Trabajo de hoy (solo oficina; el técnico no las ve) */
.dia-tabs{display:flex;gap:6px;margin:6px 0 14px;border-bottom:1px solid #d8dee6;flex-wrap:wrap}
.dia-tabs a{padding:10px 16px;min-height:44px;display:inline-flex;align-items:center;border-radius:10px 10px 0 0;text-decoration:none;color:#0b2d5b;font-weight:600;border:1px solid transparent;border-bottom:none}
.dia-tabs a.is-on{background:#fff;border-color:#d8dee6;margin-bottom:-1px}
.dia-tabs a:not(.is-on):hover{background:#eef3f9}
body.tech-mode .dia-tabs{display:none}
