/* =====================================================================
   DarohaGPS · Tema del panel de Planer (rutas fijas)
   VIOLETA con NEGRO, colores planos (sin degradados).
   Familia de productos: elite = cian, Logística = amarillo, Chatbots = verde, Planer = violeta.
   Hoja normal (sin compilar): gana sobre los estilos de Filament.
   ===================================================================== */
:root {
    --pl-v: #7c3aed;  --pl-v-2: #6d28d9; --pl-v-soft: #ede9fe; --pl-v-line: #c4b5fd;
    --pl-ink: #1c1917; --pl-ink-2: #292524; --pl-sheet: #faf9fb;
}

/* Logos: blanco sobre la barra negra; de color en la entrada */
.pl-logo { height: 2rem; width: auto; max-width: 100%; }
.pl-logo-color { display: none; }
.fi-simple-layout .pl-logo-color { display: block; }
.fi-simple-layout .pl-logo-white { display: none; }
.dark .fi-simple-layout .pl-logo-color { display: none; }
.dark .fi-simple-layout .pl-logo-white { display: block; }
.fi-topbar .pl-logo-white { display: none; }
.fi-topbar .pl-logo-color { display: block; }
.dark .fi-topbar .pl-logo-white { display: block; }
.dark .fi-topbar .pl-logo-color { display: none; }

/* Fondo y tarjetas */
.fi-body { background: var(--pl-sheet); }
.dark .fi-body { background: #141210; }
.fi-section, .fi-ta-ctn { border-radius: 1rem; box-shadow: 0 1px 2px rgba(28,25,23,.05), 0 6px 18px -8px rgba(28,25,23,.1); }

/* Barra lateral negra con pastilla violeta en la opción activa */
.fi-sidebar { background: var(--pl-ink); color: #fff; }
.fi-sidebar-header { background: transparent; box-shadow: none; border-bottom: 1px solid rgba(255,255,255,.08); }
.fi-sidebar-header .fi-icon-btn, .fi-sidebar .fi-sidebar-group-btn .fi-icon-btn { color: rgba(255,255,255,.65); }
.fi-sidebar-group-label { color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: .09em; font-size: .68rem; font-weight: 800; }
.fi-sidebar-group-btn .fi-icon { color: rgba(255,255,255,.45); }
.fi-sidebar-item-btn { border-radius: .7rem; }
.fi-sidebar-item-btn .fi-sidebar-item-label, .fi-sidebar-item-btn .fi-icon { color: rgba(255,255,255,.82); }
.fi-sidebar-item-btn:hover { background: rgba(255,255,255,.07); }
.fi-sidebar-item.fi-active .fi-sidebar-item-btn { background: var(--pl-v); }
.fi-sidebar-item.fi-active .fi-sidebar-item-btn .fi-sidebar-item-label,
.fi-sidebar-item.fi-active .fi-sidebar-item-btn .fi-icon { color: #fff; font-weight: 700; }

/* Botón «Ver en DarohaGPS» (misma pieza que Logística) */
.lg-gps-btn { display: inline-flex; align-items: center; gap: .45rem; padding: .38rem .8rem; margin-inline-end: .5rem;
    border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; color: var(--pl-v-2);
    background: var(--pl-v-soft); border: 1px solid var(--pl-v-line); }
.lg-gps-btn:hover { background: #ddd6fe; }
.dark .lg-gps-btn { color: #c4b5fd; background: transparent; border-color: var(--pl-v-2); }
.lg-gps-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
@media (max-width: 640px) { .lg-gps-txt { display: none; } .lg-gps-btn { padding: .45rem; } }

/* Tablero «Hoy» y reportes */
.pl-grid { display: grid; gap: 1rem; }
@media (min-width: 1100px) { .pl-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.pl-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem; }
.pl-kpi { background: #fff; border: 1px solid rgba(28,25,23,.08); border-radius: .9rem; padding: .75rem .9rem; }
.dark .pl-kpi { background: var(--pl-ink-2); border-color: rgba(255,255,255,.08); }
.pl-kpi b { display: block; font-size: 1.5rem; line-height: 1.2; }
.pl-kpi span { font-size: .75rem; opacity: .7; }
.pl-kpi.bad b { color: #dc2626; }
.pl-map { height: 520px; border-radius: .9rem; overflow: hidden; border: 1px solid rgba(128,128,128,.25); z-index: 0; isolation: isolate; }
.pl-runs { display: flex; flex-direction: column; gap: .6rem; }
.pl-run { background: #fff; border: 1px solid rgba(28,25,23,.08); border-left: 5px solid var(--c, var(--pl-v)); border-radius: .8rem; padding: .7rem .9rem; }
.dark .pl-run { background: var(--pl-ink-2); border-color: rgba(255,255,255,.08); border-left-color: var(--c, var(--pl-v)); }
.pl-run.unassigned { background: #fef2f2; }
.dark .pl-run.unassigned { background: #3b1515; }
.pl-run-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pl-run-head strong { font-size: .95rem; }
.pl-meta { font-size: .8rem; opacity: .8; margin-top: .2rem; }
.pl-msg { font-size: .78rem; margin-top: .3rem; color: #b45309; }
.dark .pl-msg { color: #fbbf24; }
.pl-bar { height: 6px; border-radius: 3px; background: rgba(128,128,128,.2); overflow: hidden; margin-top: .45rem; }
.pl-bar span { display: block; height: 100%; background: var(--c, var(--pl-v)); }
.pl-pill { font-size: .7rem; font-weight: 700; padding: .12rem .5rem; border-radius: 999px; background: rgba(128,128,128,.15); white-space: nowrap; }
.pl-pill.sub { background: #fef3c7; color: #92400e; }
.pl-pill.ok { background: #dcfce7; color: #166534; }
.pl-pill.bad { background: #fee2e2; color: #991b1b; }
.pl-pill.run { background: var(--pl-v-soft); color: var(--pl-v-2); }
.pl-actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.pl-table { width: 100%; font-size: .82rem; border-collapse: collapse; }
.pl-table th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; opacity: .65; padding: .45rem .5rem; border-bottom: 1px solid rgba(128,128,128,.25); white-space: nowrap; }
.pl-table td { padding: .45rem .5rem; border-bottom: 1px solid rgba(128,128,128,.12); vertical-align: top; }
.pl-table td.num, .pl-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pl-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .35rem; vertical-align: middle; }
.pl-good { color: #15803d; font-weight: 700; }
.pl-warn { color: #b45309; font-weight: 700; }
.pl-bad { color: #dc2626; font-weight: 700; }
