/* Maquetas de la plataforma (laptop y celular de #plataforma).
   Se dibujan a tamaño real (1328×830 y 360 de ancho) y ui-plataforma.js las escala a la pantalla del aparato.
   Colores de followmee: blanco, grises, negro y turquesa; ámbar solo para ralentí y rojo solo para alertas. */
.ui{position:absolute;left:0;top:0;transform-origin:0 0;font-family:Poppins,system-ui,sans-serif;color:#0F1318;background:#fff;overflow:hidden;text-align:left;line-height:1.35;-webkit-font-smoothing:antialiased;pointer-events:none;user-select:none}
.ui *{box-sizing:border-box}
.ui svg{display:block}
.ui small{display:block;font-size:inherit}
.ui b{font-weight:600}
.ui em,.ui i{font-style:normal}
.ui ul{list-style:none;margin:0;padding:0}
.ui .bd b,.d-bell b,.m-tab b{position:absolute;top:-4px;right:-4px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:#E5484D;color:#fff;font-size:10px;line-height:17px;text-align:center}

/* ── Escritorio ── */
.ui-d{width:1328px;height:830px;display:grid;grid-template-columns:64px 1fr;grid-template-rows:830px}
.d-side{display:flex;flex-direction:column;align-items:center;padding:18px 0 46px;border-right:1px solid #EDF0F2}
.d-side>img{width:34px;height:34px}
.d-side nav{display:flex;flex-direction:column;align-items:center;gap:12px;margin-top:30px}
.d-side nav i{position:relative;width:40px;height:40px;border-radius:12px;display:grid;place-items:center}
.d-side nav svg{width:20px;height:20px;fill:none;stroke:#68737D;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.d-side nav i.on{background:#F1F4F6}
.d-side nav i.on svg{stroke:#0F1318}
.d-side hr{width:22px;border:0;border-top:1px solid #E3E8EC;margin:6px 0}
.d-av{margin-top:auto;width:34px;height:34px;border-radius:50%;background:#0F1318;color:#fff;font-size:12px;font-weight:600;display:grid;place-items:center}
.d-main{min-height:0;height:830px;display:grid;grid-template-rows:84px minmax(0,1fr);padding:12px 18px 14px;min-width:0}
.d-head{display:flex;align-items:center;justify-content:space-between}
.d-head small{font-size:11.5px;color:#6B7580}
.d-head h4{margin:0;font-size:34px;line-height:42px;font-weight:500;letter-spacing:-1px}
.d-tools{display:flex;align-items:center;gap:10px;font-size:13px}
.d-search{white-space:nowrap;width:300px;height:40px;border-radius:20px;background:#F1F4F6;display:flex;align-items:center;gap:8px;padding:0 10px 0 14px;color:#7A8590}
.d-search svg,.m-search svg{width:16px;height:16px;fill:none;stroke:#7A8590;stroke-width:2;stroke-linecap:round}
.d-search kbd{margin-left:auto;background:#fff;border-radius:5px;padding:0 6px;font:11px Poppins,sans-serif;color:#7A8590}
.d-sum{height:40px;border-radius:20px;background:#F1F4F6;display:flex;align-items:center;gap:6px;padding:0 14px 0 5px}
.d-sum img{width:30px;height:30px;padding:5px;border-radius:50%;background:#0F1318}
.d-sum em{color:#D93C3C;font-weight:500}
.d-btn{height:40px;padding:0 16px;border-radius:20px;border:1px solid #DCE2E6;background:#fff;display:inline-flex;align-items:center;font-size:13px;font-weight:500;white-space:nowrap}
.d-btn.dk{background:#0F1318;border-color:#0F1318;color:#fff}
.d-bell{position:relative;width:40px;height:40px;border-radius:50%;border:1px solid #DCE2E6;display:grid;place-items:center}
.d-bell svg{width:18px;height:18px;fill:none;stroke:#0F1318;stroke-width:1.7;stroke-linejoin:round}
.d-body{display:grid;grid-template-columns:304px 1fr;gap:14px;min-height:0;height:100%}
.d-list{overflow:hidden;min-width:0}
.d-lh{display:flex;justify-content:space-between;align-items:center}
.d-lh h5{margin:0;font-size:19px;font-weight:600;letter-spacing:-.3px}
.d-lh small{font-size:12px;color:#6B7580}
.d-flt{width:34px;height:34px;border-radius:50%;border:1px solid #DCE2E6;display:grid;place-items:center}
.d-flt svg{width:16px;height:16px;fill:#fff;stroke:#0F1318;stroke-width:1.6}
.d-tabs{display:flex;gap:6px;margin:12px 0}
.d-tabs span{white-space:nowrap;height:32px;padding:0 10px 0 12px;border-radius:16px;border:1px solid #DCE2E6;font-size:12.5px;font-weight:500;display:flex;align-items:center;gap:6px}
.d-tabs b{font-size:10.5px;color:#68737D;background:#F1F4F6;border-radius:8px;padding:0 6px}
.d-tabs .on{background:#0F1318;border-color:#0F1318;color:#fff}
.d-tabs .on b{background:rgba(255,255,255,.16);color:#fff}
.d-card{display:grid;grid-template-columns:42px 1fr auto;gap:6px 10px;align-items:center;padding:11px 12px;border-radius:14px;background:#F5F7F8;margin-bottom:8px}
.d-card.sel{background:#fff;box-shadow:inset 0 0 0 1.5px #0F1318}
.d-card b{font-size:14px}
.d-card small{font-size:11.5px;color:#6B7580;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.d-card>div{min-width:0}
.d-card b{white-space:nowrap}
.d-card .r{text-align:right}
.d-card .r b{font-size:15px}
.d-card .st{grid-column:1/3;justify-self:start}
.d-card .loc{text-align:right}
.vi{width:42px;height:30px;border-radius:8px;display:grid;place-items:center}
.vi svg{width:24px;height:16px;fill:#0F1318;stroke:#fff;stroke-width:.8}
.vi.mv{background:rgba(30,217,183,.2)}
.vi.id{background:rgba(245,165,36,.2)}
.vi.pk,.vi.of{background:#E9EDF0}
.vi.pk svg{fill:#5E6873}
.vi.of svg{fill:#A3ADB5}
.ui .am{color:#A35F00}
.ui .rd{color:#D93C3C}
.st{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 9px;border-radius:11px;font-size:11px;font-weight:500;white-space:nowrap}
.st::before{content:"";width:6px;height:6px;border-radius:50%}
.st.mv{background:rgba(30,217,183,.16)}.st.mv::before{background:#13B497}
.st.id{background:rgba(245,165,36,.18)}.st.id::before{background:#F5A524}
.st.pk{background:#EBEEF1}.st.pk::before{background:#7C8A96}
.st.of{background:#EBEEF1}.st.of::before{box-shadow:inset 0 0 0 1.5px #9AA5AE}
.d-map{position:relative;border-radius:18px;overflow:hidden;min-width:0}
.d-streets,.d-ov{position:absolute;inset:0;width:100%;height:100%}
.d-route{fill:none;stroke:#0F1318;stroke-width:4;stroke-linejoin:round;stroke-linecap:round}
.d-ov text{font:600 11.5px Poppins,sans-serif;fill:#fff;text-anchor:middle}
.d-ov .lb{font-size:11px;font-weight:500;fill:#0F1318;paint-order:stroke;stroke:#fff;stroke-width:5px;stroke-linejoin:round}
.d-unit .halo{transform-box:fill-box;transform-origin:center;animation:ui-halo 2.4s ease-out infinite}
@keyframes ui-halo{0%{transform:scale(.6);opacity:.9}100%{transform:scale(1.5);opacity:0}}
.d-chips{position:absolute;top:14px;left:14px;display:flex;gap:6px}
.d-chips span{height:34px;padding:0 12px 0 14px;border-radius:17px;background:#fff;box-shadow:0 2px 8px rgba(15,19,24,.08);font-size:12.5px;font-weight:500;display:flex;align-items:center;gap:6px}
.d-chips b{font-size:10.5px;color:#68737D}
.d-chips .on{background:#0F1318;color:#fff}.d-chips .on b{color:#fff}
.d-ctrl{position:absolute;top:14px;right:14px;display:flex;flex-direction:column;gap:8px}
.d-ctrl i{width:36px;height:36px;border-radius:50%;background:#fff;box-shadow:0 2px 8px rgba(15,19,24,.1);display:grid;place-items:center;font-size:18px;line-height:1}
.d-ctrl svg{width:16px;height:16px;fill:none;stroke:#0F1318;stroke-width:1.7;stroke-linejoin:round}
.d-panel{position:absolute;left:12px;right:12px;bottom:12px;height:262px;background:#fff;border-radius:18px;box-shadow:0 12px 40px rgba(15,19,24,.16);padding:14px 18px}
.d-ph{display:flex;align-items:center;gap:12px}
.d-ph p{margin:0;display:flex;align-items:center;gap:10px}
.d-ph p b{font-size:20px;font-weight:500;letter-spacing:-.4px}
.d-ph small{font-size:12px;color:#6B7580;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.d-ph>div{min-width:0;flex:1}
.d-ph strong{flex:none}
.d-ph strong{margin-left:auto;display:flex;align-items:baseline;gap:4px;font-size:34px;font-weight:400;letter-spacing:-1px;font-variant-numeric:tabular-nums}
.d-ph strong small{font-size:13px;letter-spacing:0}
.d-x{width:34px;height:34px;border-radius:50%;border:1px solid #DCE2E6;display:grid;place-items:center;font-size:20px;line-height:1}
.d-pt{display:flex;align-items:center;gap:4px;margin:12px 0 10px}
.d-pt span{padding:6px 14px;border-radius:15px;font-size:12.5px;font-weight:500;color:#5E6873}
.d-pt .on{background:#F1F4F6;color:#0F1318}
.d-pt small{margin-left:auto;font-size:11.5px;color:#6B7580}
.d-pb{display:grid;grid-template-columns:270px 1fr;gap:12px}
.d-kpi{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.d-kpi div{background:#F5F7F8;border-radius:12px;padding:9px 12px}
.d-kpi small{font-size:10.5px;color:#6B7580}
.d-kpi b{display:block;font-size:24px;font-weight:400;letter-spacing:-.6px;font-variant-numeric:tabular-nums}
.d-kpi b i{font-size:12px;color:#6B7580;letter-spacing:0}
.d-tl{background:#F5F7F8;border-radius:12px;padding:22px 14px 8px}
.d-tl .bar{display:flex;gap:3px;height:22px}
.d-tl .bar i{border-radius:5px;font-size:9.5px;font-weight:600;display:grid;place-items:center;white-space:nowrap;overflow:hidden}
.d-tl .p{background:#DCE3E8;color:#5E6873}
.d-tl .a{background:#F5A524}
.d-tl .m{background:#1ED9B7;color:#0F1318}
.d-tl em{position:relative;flex:none;width:2px;margin:-4px 0;background:#0F1318}
.d-tl em span{position:absolute;bottom:100%;left:50%;transform:translate(-50%,-2px);background:#0F1318;color:#fff;font-size:9.5px;font-weight:600;padding:1px 5px;border-radius:5px}
.d-tl .hrs{display:flex;justify-content:space-between;font-size:10px;color:#6B7580;margin:4px 0 6px}
.d-tl li{white-space:nowrap;display:grid;grid-template-columns:12px 84px 1fr 56px 50px;align-items:center;font-size:11.5px;padding:2px 0}
.d-tl li i{width:7px;height:7px;border-radius:50%}
.d-tl li i.mv{background:#1ED9B7}.d-tl li i.pk{background:#7C8A96}
.d-tl li span{color:#6B7580}
.d-tl li em{text-align:right;color:#3A434C}

/* ── Celular ── */
.ui-m{width:360px}
.m-map{position:absolute;left:0;right:0;top:0;height:330px}
.m-map>svg{width:100%;height:100%}
.m-map .dt{position:absolute;width:15px;height:15px;margin:-7.5px;border-radius:50%;border:2.5px solid #fff;box-shadow:0 1px 4px rgba(15,19,24,.25)}
.dt.mv{background:#1ED9B7;animation:ui-drift 9s ease-in-out infinite alternate}
.dt.mv:nth-of-type(2){animation-duration:11s;animation-direction:alternate-reverse}
.dt.mv.big{width:20px;height:20px;margin:-10px;background:#0F1318;border-color:#1ED9B7;box-shadow:0 0 0 7px rgba(30,217,183,.25)}
.dt.id{background:#F5A524}
.dt.pk{background:#7C8A96}
@keyframes ui-drift{to{transform:translate(14px,-10px)}}
.m-status{position:absolute;top:0;left:0;right:0;height:46px;display:flex;align-items:center;justify-content:space-between;padding:4px 28px 0 34px;font-size:15px}
.m-status span{display:flex;gap:3px;align-items:center}
.m-status span i{width:4px;height:4px;border-radius:50%;background:#0F1318}
.m-status span em{width:10px;height:12px;margin-left:5px;border-radius:2px;background:#0F1318}
.m-top{position:absolute;top:54px;left:16px;right:16px;display:flex;gap:10px}
.m-search{flex:1;height:46px;border-radius:23px;background:#fff;box-shadow:0 3px 12px rgba(15,19,24,.12);display:flex;align-items:center;gap:9px;padding:0 16px;font-size:14px;color:#6B7580}
.m-menu{width:46px;height:46px;border-radius:50%;background:#fff;box-shadow:0 3px 12px rgba(15,19,24,.12);display:grid;place-items:center}
.m-menu svg{width:20px;height:20px;stroke:#0F1318;stroke-width:1.8;stroke-linecap:round}
.m-sheet{position:absolute;top:300px;left:0;right:0;bottom:0;background:#fff;border-radius:22px 22px 0 0;box-shadow:0 -6px 22px rgba(15,19,24,.1);padding:8px 18px 0}
.m-grip{display:block;width:36px;height:4px;border-radius:2px;background:#D5DBE0;margin:0 auto}
.m-sh{display:flex;justify-content:space-between;align-items:baseline;margin:14px 0 10px}
.m-sh b{font-size:20px;letter-spacing:-.4px}
.m-sh small{font-size:12px;color:#5E6873}
.m-bar{display:flex;gap:3px;height:7px;border-radius:4px;overflow:hidden}
.m-bar .mv{background:#1ED9B7}.m-bar .id{background:#F5A524}.m-bar .pk{background:#B7C2CA}.m-bar .of{background:#DCE3E8}
.m-chips{display:flex;gap:6px;margin:12px 0 4px;white-space:nowrap}
.m-chips span{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border-radius:14px;font-size:11.5px;font-weight:500}
.m-chips i{width:6px;height:6px;border-radius:50%}
.m-chips .mv{background:rgba(30,217,183,.16)}.m-chips .mv i{background:#13B497}
.m-chips .id{background:rgba(245,165,36,.18)}.m-chips .id i{background:#F5A524}
.m-chips .pk{background:#EBEEF1}.m-chips .pk i{background:#7C8A96}
.m-list li{display:grid;grid-template-columns:12px 1fr auto;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid #EEF1F3}
.m-list li>i{width:9px;height:9px;border-radius:50%}
.m-list i.mv{background:#1ED9B7}.m-list i.id{background:#F5A524}.m-list i.pk{background:#7C8A96}.m-list i.of{box-shadow:inset 0 0 0 2px #9AA5AE}
.m-list b{font-size:14.5px}
.m-list small{font-size:11.5px;color:#6B7580}
.m-list .r{text-align:right}
.m-list .r b{font-size:13.5px;font-variant-numeric:tabular-nums}
.m-tab{position:absolute;left:0;right:0;bottom:0;height:66px;background:#fff;border-top:1px solid #EEF1F3;display:grid;grid-template-columns:repeat(4,1fr);padding-top:9px}
.m-tab span{position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:10.5px;font-weight:500;color:#68737D}
.m-tab svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.m-tab .on{color:#0F1318}
.m-tab b{top:-5px;right:auto;left:50%;margin-left:3px}
@media (prefers-reduced-motion:reduce){.d-unit .halo,.dt.mv{animation:none}}
.dev-note{position:absolute;right:0;bottom:4px;font-size:12px;color:rgba(255,255,255,.45)}
@media (max-width:600px){.dev-note{bottom:-30px}}
.d-tl li .t{color:#0F1318;overflow:hidden;text-overflow:ellipsis}

/* ── Ventana del navegador (familia "sin aparatos") ── */
.win{position:relative;border-radius:12px;overflow:hidden;background:#fff;box-shadow:0 40px 90px -30px rgba(0,0,0,.75),0 0 0 1px rgba(255,255,255,.1)}
.win .bar{display:flex;align-items:center;gap:6px;height:30px;padding:0 12px;background:#F3F5F6;border-bottom:1px solid rgba(15,19,24,.07)}
.win .bar i{width:9px;height:9px;border-radius:50%;background:#D4D9DC}
.win .bar em{flex:1;max-width:220px;height:17px;margin-left:14px;border-radius:5px;background:#fff;font-style:normal;font-size:10px;color:rgba(15,19,24,.5);display:flex;align-items:center;justify-content:center}
.win .scr{position:relative;aspect-ratio:1328/830;overflow:hidden}

/* ── Escritorio: ficha de la unidad, pestaña "En vivo" (sensores) ── */
.d-sens{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.d-sens>div{background:#F5F7F8;border-radius:12px;padding:10px 12px}
.d-sens h6{margin:0 0 6px;font-size:11px;font-weight:600;color:#6B7580}
.d-sens li{display:grid;grid-template-columns:16px 1fr auto;gap:7px;align-items:center;font-size:11.5px;line-height:15px;padding:3px 4px;margin:0 -4px;border-radius:6px;white-space:nowrap}
.d-sens li svg{width:14px;height:14px;fill:none;stroke:#7A8590;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.d-sens li span{color:#5E6873;overflow:hidden;text-overflow:ellipsis}
.d-sens li b{font-weight:600;font-variant-numeric:tabular-nums}
.d-sens li.am{background:rgba(245,165,36,.16)}.d-sens li.am b{color:#A35F00}
.d-sens li.rd{background:rgba(229,72,77,.1)}.d-sens li.rd b,.d-sens li.rd span{color:#D93C3C}.d-sens li.rd svg{stroke:#D93C3C}

/* ── Celular: piezas comunes de la ficha y del recorrido ── */
.m-route{fill:none;stroke:#0F1318;stroke-width:4.5;stroke-linejoin:round;stroke-linecap:round}
.m-fab{position:absolute;top:56px;width:44px;height:44px;border-radius:50%;background:#fff;box-shadow:0 3px 12px rgba(15,19,24,.14);display:grid;place-items:center}
.m-fab svg{width:19px;height:19px;fill:none;stroke:#0F1318;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.m-fab.l{left:16px}.m-fab.r{right:16px}
.m-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}
.m-kpis div{background:#F5F7F8;border-radius:12px;padding:9px 11px}
.m-kpis small{font-size:11px;color:#6B7580}
.m-kpis b{display:block;font-size:19px;font-weight:500;letter-spacing:-.4px;font-variant-numeric:tabular-nums}
.m-tab.two{grid-template-columns:1fr 1fr}

/* Ficha de la unidad */
.m-fi .m-map{height:360px}
.m-fi .m-sheet{top:330px;padding:8px 18px 0}
.m-fh{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;margin:12px 0 10px}
.m-fh .vi{position:relative;width:50px;height:38px;border-radius:10px}
.m-fh .vi svg{width:28px;height:19px}
.m-fh .vi u{position:absolute;right:-7px;bottom:-7px;width:22px;height:22px;border-radius:50%;background:#0F1318;color:#fff;border:2px solid #fff;font-size:8.5px;font-weight:600;text-decoration:none;display:grid;place-items:center}
.m-fh b{display:block;font-size:22px;font-weight:500;letter-spacing:-.5px;line-height:28px}
.m-fh small{font-size:11.5px;color:#6B7580}
.m-key{width:38px;height:38px;border-radius:50%;background:rgba(30,217,183,.18);display:grid;place-items:center}
.m-key svg{width:17px;height:17px;fill:none;stroke:#0F1318;stroke-width:1.8;stroke-linecap:round}
.m-fs{display:flex;align-items:center;gap:10px}
.m-fs strong{font-size:24px;font-weight:400;letter-spacing:-.6px;font-variant-numeric:tabular-nums}
.m-fs strong small{display:inline;font-size:12px;color:#6B7580;letter-spacing:0}
.m-fs>small{margin-left:auto;font-size:11.5px;color:#6B7580}
.m-loc{display:grid;grid-template-columns:18px 1fr;gap:8px;margin-top:12px;font-size:13px}
.m-loc svg{width:16px;height:16px;fill:none;stroke:#0F1318;stroke-width:1.8;margin-top:1px}
.m-loc small{font-size:11.5px;color:#6B7580}
.m-note{display:flex;align-items:center;gap:8px;padding:9px 12px;border-radius:10px;background:rgba(245,165,36,.16);font-size:12px;color:#7A4A00}
.m-note b{font-weight:600}
.m-note svg{width:15px;height:15px;fill:none;stroke:#A35F00;stroke-width:2;stroke-linejoin:round;flex:none}
.m-acts{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-top:12px}
.m-acts span{height:38px;border-radius:19px;border:1px solid #DCE2E6;display:flex;align-items:center;justify-content:center;gap:5px;font-size:12px;font-weight:500}
.m-acts span.dk{background:#0F1318;border-color:#0F1318;color:#fff}
.m-acts svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

/* Recorrido del día */
.m-day{position:absolute;top:56px;left:72px;height:44px;padding:0 14px;border-radius:22px;background:#fff;box-shadow:0 3px 12px rgba(15,19,24,.14);display:flex;align-items:center;gap:7px;font-size:14px;font-weight:600}
.m-day svg{width:16px;height:16px;fill:none;stroke:#0F1318;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.m-re .m-sheet{top:286px;padding:8px 18px 0}
.m-rh{margin:12px 0 0;font-size:21px;font-weight:500;letter-spacing:-.4px}
.m-rh small{display:inline;margin-left:6px;font-size:12px;color:#6B7580;letter-spacing:0}
.m-tl{display:flex;gap:2px;height:9px;border-radius:5px;overflow:hidden;background:#E6F7F3}
.m-tl i{height:100%}
.m-tl .m{background:#1ED9B7}.m-tl .a{background:#F5A524}.m-tl .p{background:#DCE3E8}
.m-hrs{display:flex;justify-content:space-between;font-size:10.5px;color:#6B7580;margin:5px 0 4px}
.m-hrs b{color:#0F1318;font-weight:600}
.m-ev li{display:grid;grid-template-columns:30px 1fr auto;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid #EEF1F3}
.m-ev li>i{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:600}
.m-ev .ev-o{box-shadow:inset 0 0 0 2.5px #0F1318}
.m-ev .ev-t{background:rgba(30,217,183,.18)}
.m-ev .ev-t svg{width:12px;height:12px;fill:none;stroke:#0F1318;stroke-width:2.2;stroke-linecap:round}
.m-ev .ev-s{background:#0F1318;color:#fff}
.m-ev b{display:block;font-size:12.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m-ev li>div{min-width:0}
.m-ev small{font-size:11px;color:#6B7580}
.m-ev .r{text-align:right;font-size:11.5px;color:#3A434C}
.m-ev .r small{font-size:11px}

/* ── Escritorio: piezas comunes de Alertas y Reportes ── */
.d-seg{display:flex;gap:2px;padding:4px;border-radius:22px;background:#EEF1F3}
.d-seg span{height:34px;padding:0 16px;border-radius:17px;display:flex;align-items:center;gap:6px;font-size:13px;font-weight:500;color:#5E6873}
.d-seg .on{background:#fff;color:#0F1318;box-shadow:0 1px 4px rgba(15,19,24,.08)}
.d-seg b{font-size:10.5px;background:#E5484D;color:#fff;border-radius:8px;padding:0 6px}
.d-card2{background:#fff;border-radius:16px;box-shadow:0 0 0 1px #E8ECEF;min-height:0;overflow:hidden}
.ui-al .d-main,.ui-rp .d-main{background:#F4F6F8}
.d-pill{display:inline-flex;align-items:center;height:22px;padding:0 9px;border-radius:11px;font-size:11px;font-weight:500;background:#EBEEF1;white-space:nowrap;justify-self:start}
.d-pill.rd{background:rgba(229,72,77,.12);color:#C8353A}
.d-pill.tq{background:rgba(30,217,183,.18);color:#0B7F6B}

/* Alertas: incidentes */
.al-body{position:relative;display:grid;grid-template-columns:1fr 390px;gap:14px;min-height:0;height:100%}
.al-list{display:flex;flex-direction:column}
.al-top{display:flex;justify-content:space-between;align-items:center;padding:12px 14px}
.al-top .d-tabs{margin:0}
.al-th,.al-row{display:grid;grid-template-columns:4px minmax(0,1fr) 130px 96px 70px;gap:12px;align-items:center;padding:0 14px}
.al-th{height:30px;font-size:11px;color:#6B7580;border-bottom:1px solid #EEF1F3}
.al-row{height:58px;border-bottom:1px solid #F1F3F5;font-size:12px;transition:background .4s}
.al-row>i{align-self:stretch;margin:10px 0;border-radius:2px}
.al-row>i.rd{background:#E5484D}.al-row>i.am{background:#F5A524}
.al-row b{display:block;font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.al-row small{font-size:11px;color:#6B7580;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.al-row>div{min-width:0}
.al-row em{font-size:11.5px;color:#3A434C}
.al-row em u{display:block;text-decoration:none;color:#A35F00;font-size:10.5px}
.al-row.sel{background:#F6F8F9}
.al-foot{margin-top:auto;display:flex;justify-content:space-between;padding:10px 14px;font-size:11px;color:#6B7580;border-top:1px solid #EEF1F3}
.al-det{display:flex;flex-direction:column;padding:14px 16px}
.al-det h5{margin:6px 0 2px;font-size:19px;font-weight:500;letter-spacing:-.3px}
.al-det>small{font-size:11.5px;color:#6B7580}
.al-meta{display:flex;align-items:center;gap:8px;font-size:11px;color:#6B7580}
.al-warn{margin-top:10px;padding:10px 12px;border-radius:10px;background:rgba(229,72,77,.09);color:#A3262B;font-size:11.5px;line-height:16px}
.al-warn b{font-weight:600}
.al-map{position:relative;height:96px;margin-top:10px;border-radius:10px;overflow:hidden}
.al-map svg{width:100%;height:100%}
.al-kpi{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:8px}
.al-kpi div{background:#F5F7F8;border-radius:10px;padding:7px 10px}
.al-kpi small{font-size:10.5px;color:#6B7580}
.al-kpi b{display:block;font-size:15px;font-weight:500}
.al-det h6{margin:10px 0 4px;font-size:11px;font-weight:600;color:#6B7580}
.al-tl li{display:grid;grid-template-columns:38px 10px 1fr;gap:6px;align-items:baseline;font-size:11px;line-height:15px;padding:2.5px 0;transition:opacity .4s,transform .4s}
.al-tl time{color:#6B7580;font-variant-numeric:tabular-nums}
.al-tl i{width:7px;height:7px;border-radius:50%;background:#E5484D;transform:translateY(-1px)}
.al-tl i.g{background:#B7C2CA}.al-tl i.t{background:#1ED9B7}
.al-acts{margin-top:auto;display:flex;gap:6px;justify-content:flex-end}
.al-acts .d-btn{height:32px;padding:0 12px;font-size:11.5px}
/* ventana del botón de pánico: se queda hasta que alguien la toma */
.al-pop{position:absolute;z-index:5;top:70px;left:170px;width:420px;padding:14px 16px;border-radius:16px;background:#fff;box-shadow:0 0 0 1.5px #E5484D,0 24px 60px rgba(15,19,24,.28);opacity:0;transform:translateY(-12px) scale(.97);transition:opacity .45s,transform .45s cubic-bezier(.2,.8,.2,1)}
.al-pop.on{opacity:1;transform:none}
.al-pop .hd{display:grid;grid-template-columns:36px 1fr;gap:10px;align-items:center}
.al-pop .hd i{width:36px;height:36px;border-radius:50%;background:#D93C3C;display:grid;place-items:center}
.al-pop .hd svg{width:17px;height:17px;fill:none;stroke:#fff;stroke-width:2;stroke-linejoin:round}
.al-pop .hd small{font-size:10.5px;font-weight:600;color:#D93C3C}
.al-pop .hd b{display:block;font-size:17px}
.al-pop p{margin:8px 0;font-size:11.5px;color:#3A434C}
.al-pop .al-kpi{margin:0}
.al-took{margin-top:10px;display:grid;grid-template-columns:28px 1fr;gap:8px;padding:9px 10px;border-radius:10px;background:rgba(30,217,183,.14);font-size:11px;opacity:0;transform:translateY(6px);transition:opacity .4s,transform .4s}
.al-took.on{opacity:1;transform:none}
.al-took u{width:28px;height:28px;border-radius:50%;background:#0F1318;color:#fff;text-decoration:none;font-size:10px;font-weight:600;display:grid;place-items:center}
.al-took b{display:block;font-size:12px}

/* Reportes: Generar, Plantillas y Programados */
.rp-view{display:none;min-height:0;height:100%}
.ui-rp[data-view=gen] .rp-gen,.ui-rp[data-view=pla] .rp-pla,.ui-rp[data-view=pro] .rp-pro{display:grid}
.rp-gen{grid-template-columns:250px 1fr;gap:14px}
.rp-cfg{padding:14px;display:flex;flex-direction:column;gap:6px;font-size:12px}
.rp-cfg label{font-size:11px;color:#6B7580;margin-top:6px}
.rp-sel{height:36px;border-radius:10px;box-shadow:inset 0 0 0 1px #DCE2E6;display:flex;align-items:center;justify-content:space-between;padding:0 12px;font-size:12px}
.rp-chips{display:flex;flex-wrap:wrap;gap:5px}
.rp-chips span{height:26px;padding:0 10px;border-radius:13px;box-shadow:inset 0 0 0 1px #DCE2E6;display:flex;align-items:center;font-size:11px}
.rp-chips .on{background:#0F1318;color:#fff;box-shadow:none}
.rp-trae{margin-top:8px;padding:10px 12px;border-radius:10px;background:#F4F6F8;font-size:11.5px;line-height:21px}
.rp-trae small{font-size:10.5px;font-weight:600;color:#6B7580}
.rp-go{margin-top:auto;height:40px;border-radius:20px;background:#0F1318;color:#fff;display:grid;place-items:center;font-size:12.5px;font-weight:500}
.rp-out{display:grid;grid-template-rows:auto auto minmax(0,1fr);padding:14px 16px}
.rp-oh{display:flex;justify-content:space-between;align-items:flex-start}
.rp-oh b{font-size:18px;font-weight:500}
.rp-oh small{font-size:11px;color:#6B7580}
.rp-oh .d-btn{height:30px;padding:0 12px;font-size:11.5px;margin-left:6px}
.rp-kpi{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin:12px 0}
.rp-kpi div{background:#F4F6F8;border-radius:12px;padding:9px 12px}
.rp-kpi small{font-size:11px;color:#6B7580}
.rp-kpi b{display:block;font-size:24px;font-weight:400;letter-spacing:-.6px;font-variant-numeric:tabular-nums}
.rp-kpi b i{font-size:12px;color:#6B7580;letter-spacing:0}
.rp-grid{display:grid;grid-template-columns:1fr 270px;gap:16px;min-height:0}
.rp-tab{width:100%;border-collapse:collapse}
.rp-tab th,.rp-tab td{text-align:left;font-size:11.5px;padding:7px 6px;white-space:nowrap;border-bottom:1px solid #F1F3F5}
.rp-tab th{font-weight:400;color:#6B7580;font-size:11px}
.rp-tab .n{text-align:right;font-variant-numeric:tabular-nums}
.rp-tab tr.u td{font-weight:600}
.rp-tab tr.v td:first-child{color:#0B7F6B}
.rp-bars h6{margin:0 0 8px;font-size:12px;font-weight:600}
.rp-bars ul{display:flex;align-items:flex-end;gap:6px;height:160px}
.rp-bars li{flex:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px;font-size:10px;color:#6B7580}
.rp-bars li i{width:100%;border-radius:6px 6px 2px 2px;background:rgba(30,217,183,.35);height:0;transition:height .9s cubic-bezier(.2,.8,.2,1)}
.rp-bars li.hoy i{background:#1ED9B7}
.rp-pla{grid-template-columns:230px 1fr 300px;gap:14px}
.rp-blk{padding:14px;font-size:12px}
.rp-blk h6{margin:0 0 4px;font-size:13px;font-weight:600}
.rp-blk small.g{display:block;margin:10px 0 4px;font-size:10.5px;font-weight:600;color:#6B7580}
.rp-blk li{display:flex;justify-content:space-between;padding:4px 0}
.rp-blk li em{font-size:10.5px;color:#0B7F6B}
.rp-tpl{padding:14px 16px;display:flex;flex-direction:column;gap:8px}
.rp-tpl>p{margin:0 0 4px;font-size:16px;font-weight:500}
.rp-tpl li{display:grid;grid-template-columns:1fr auto;align-items:center;padding:10px 14px;margin-bottom:8px;border-radius:12px;box-shadow:inset 0 0 0 1px #E3E8EC;background:#fff;font-size:12px;opacity:0;transform:translateY(8px);transition:opacity .4s,transform .4s}
.rp-tpl li.on{opacity:1;transform:none}
.rp-tpl li b{display:block;font-size:12.5px}
.rp-tpl li small{font-size:10.5px;color:#6B7580}
.rp-cols{padding:14px 16px;font-size:12px}
.rp-cols h6{margin:0 0 10px;font-size:15px;font-weight:500}
.rp-cols ul{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px}
.rp-cols li{display:flex;align-items:center;gap:7px}
.rp-cols li i{width:14px;height:14px;border-radius:4px;box-shadow:inset 0 0 0 1.5px #B7C2CA}
.rp-cols li i.on{background:#1ED9B7;box-shadow:none}
.rp-cols .d-seg{margin-top:14px;display:inline-flex}
.rp-pro{grid-template-rows:minmax(0,1fr)}
.rp-pro .d-card2{padding:14px 16px}
.rp-pro .rp-tab td{padding:12px 6px}
.ui .tg{display:inline-block;width:30px;height:18px;border-radius:9px;background:#DCE2E6;position:relative;transition:background .3s}
.ui .tg::after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:#fff;transition:transform .3s}
.ui .tg.on{background:#1ED9B7}.ui .tg.on::after{transform:translateX(12px)}

/* Celular: reglas de alertas */
.m-rg{background:#F4F6F8}
.m-rg .m-in{position:absolute;top:46px;left:0;right:0;bottom:66px;padding:10px 16px}
.m-rgh{display:flex;justify-content:space-between;align-items:center}
.m-rgh b{font-size:28px;font-weight:500;letter-spacing:-.6px}
.m-rgh span{width:44px;height:44px;border-radius:50%;background:#0F1318;color:#fff;font-size:24px;display:grid;place-items:center}
.m-rgt{display:flex;gap:6px;margin:12px 0}
.m-rgt span{height:30px;padding:0 13px;border-radius:15px;background:#fff;box-shadow:inset 0 0 0 1px #DCE2E6;font-size:12px;font-weight:500;display:flex;align-items:center}
.m-rgt .on{background:#0F1318;color:#fff;box-shadow:none}
.m-rgl li{display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center;padding:11px 12px;margin-bottom:7px;border-radius:14px;background:#fff}
.m-rgl li>i{width:34px;height:34px;border-radius:10px;display:grid;place-items:center}
.m-rgl li>i svg{width:16px;height:16px;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.m-rgl i.rd{background:rgba(229,72,77,.12)}.m-rgl i.rd svg{stroke:#D93C3C}
.m-rgl i.am{background:rgba(245,165,36,.16)}.m-rgl i.am svg{stroke:#A35F00}
.m-rgl i.tq{background:rgba(30,217,183,.16)}.m-rgl i.tq svg{stroke:#0B7F6B}
.m-rgl i.gr{background:#EEF1F3}.m-rgl i.gr svg{stroke:#5E6873}
.m-rgl b{display:block;font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.m-rgl li>div{min-width:0}
.m-rgl small{font-size:10.5px;color:#6B7580}
.m-rgl .tg{width:38px;height:22px;border-radius:11px}
.m-rgl .tg::after{width:18px;height:18px}
.m-rgl .tg.on::after{transform:translateX(16px)}
