/* ═══════════════════════════════════════════════════════════════════════════════════════
   ORVICAMPA · Tema visual (se carga despues de app.css y lo sobrescribe)
   Linea grafica: fondo slate claro, menu blanco, tarjetas blancas con borde fino y sombra suave,
   botones azul noche, badges en pastilla. Referencia: pantallas "Tareas operativas", "Dashboard",
   "Control acceso/salida", "Entrada de vehiculo" y "Vehiculos / Maestros".
   ═══════════════════════════════════════════════════════════════════════════════════════ */
:root {
  --o-bg: #F1F5F9;
  --o-surface: #FFFFFF;
  --o-surface-2: #F8FAFC;
  --o-border: #E2E8F0;
  --o-border-strong: #CBD5E1;
  --o-text: #0F172A;
  --o-text-2: #334155;
  --o-muted: #64748B;
  --o-faint: #94A3B8;
  --o-primary: #1E293B;
  --o-primary-hover: #0F172A;
  --o-navy: #16355B;
  --o-accent: #3B82B6;
  --o-ok-bg: #ECFDF5;   --o-ok: #047857;   --o-ok-b: #A7F3D0;
  --o-warn-bg: #FFFBEB; --o-warn: #B45309; --o-warn-b: #FDE68A;
  --o-bad-bg: #FFF1F2;  --o-bad: #BE123C;  --o-bad-b: #FECDD3;
  --o-info-bg: #EFF6FF; --o-info: #1D4ED8; --o-info-b: #BFDBFE;
  --o-radius: 12px;
  --o-shadow: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --o-shadow-lg: 0 20px 50px rgba(15,23,42,.20);
  --radius: 10px; --radius-sm: 8px;
}
html, body { background: var(--o-bg); }
body { color: var(--o-text); font-size: 14px; -webkit-font-smoothing: antialiased; }
::selection { background: #BFDBFE; }
* { scrollbar-width: thin; scrollbar-color: #CBD5E1 transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #94A3B8; background-clip: content-box; border: 2px solid transparent; }

/* ── Estructura ───────────────────────────────────────────────────────────────────── */
.okcampa-shell { background: var(--o-bg); }
.main-content { padding: 0; background: var(--o-bg); display: flex; flex-direction: column; min-width: 0; }
.page-body { padding: 22px 28px 40px; min-width: 0; flex: 1 0 auto; }
@media (max-width: 760px) { .page-body { padding: 14px 12px 32px; } }

/* ── Menu lateral ─────────────────────────────────────────────────────────────────── */
.sidebar { width: 252px; background: var(--o-surface,#fff) !important; background-image: none !important; border-right: 1px solid var(--o-border); color: var(--o-text-2); box-shadow: none; }
.sidebar-brand { padding: 20px 20px 4px; border-bottom: 0; align-items: flex-start; flex-direction: column; gap: 4px; position: relative; }
.sidebar-brand .app-logo { max-width: 100%; }
.sidebar-brand .app-logo img { max-height: 34px; width: auto; max-width: 190px; object-fit: contain; display: block; }
.sidebar-date { font-size: 12px; color: var(--o-muted); text-transform: capitalize; padding: 0 0 6px 2px; }
.sidebar-toggle { position: absolute; right: 12px; top: 18px; margin: 0; width: 26px; height: 26px; border: 1px solid var(--o-border); background: var(--o-surface,#fff); color: var(--o-muted); border-radius: 8px; box-shadow: var(--o-shadow); }
.sidebar-toggle:hover { background: var(--o-surface-2); color: var(--o-text); }
.sidebar-scroll { padding: 8px 0 14px; }
.nav-quick { padding: 0 0 6px; }
.sidebar .nav-item { margin: 2px 12px; padding: 9px 12px; gap: 12px; border-radius: 10px; color: var(--o-text-2); font-size: 14px; font-weight: 500; position: relative; }
.sidebar .nav-item:hover { background: var(--o-surface-3,#F1F5F9); color: var(--o-text); }
.sidebar .nav-item.active { background: var(--o-active,#E6ECF3); color: var(--o-text); font-weight: 600; }
.sidebar .nav-item.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--o-navy); }
.sidebar .nav-icon { flex: 0 0 20px; width: 20px; height: 20px; font-size: 0 !important; line-height: 0; opacity: .9; background-color: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; overflow: hidden; color: inherit; }
.sidebar .nav-quick .nav-item:first-child .nav-text { text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }
.sidebar .nav-text { white-space: normal; line-height: 1.25; }
.sidebar .badge-count { background: var(--o-bad); }
.nav-group { margin: 2px 0 0; }
.sidebar .nav-group > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 24px 6px; margin: 0; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--o-faint); cursor: pointer; user-select: none; border-radius: 0; }
.sidebar .nav-group > summary::-webkit-details-marker { display: none; }
.sidebar .nav-group > summary:hover { color: var(--o-muted); }
.sidebar .nav-group > summary .nav-icon { display: none; }
.sidebar .nav-group > summary .nav-text { text-transform: uppercase; }
.sidebar .nav-group > summary::after { content: ""; width: 16px; height: 16px; background-color: currentColor; -webkit-mask: var(--chev) center / contain no-repeat; mask: var(--chev) center / contain no-repeat; transition: transform .15s; flex: 0 0 16px; }
.sidebar .nav-group:not([open]) > summary::after { transform: rotate(180deg); }
.sidebar-footer { padding: 12px; border-top: 0; margin-top: 0; }
.user-card { display: flex; align-items: center; gap: 10px; background: var(--o-surface-2); border: 1px solid var(--o-border); border-radius: 12px; padding: 10px 12px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: #2F4A6B; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: 0 0 36px; }
.user-card .user-meta { min-width: 0; flex: 1; display: grid; gap: 1px; }
.user-card .user-name { font-size: 13px; font-weight: 600; color: var(--o-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card .user-role { font-size: 11px; color: var(--o-muted); margin: 0; }
.user-account-link { font-size: 12px; color: var(--o-accent); text-decoration: underline; width: fit-content; }
.user-card .user-account-link.active { background: transparent; color: var(--o-accent); font-weight: 700; }
.btn-logout-icon { flex: 0 0 34px; width: 34px; height: 34px; border: 0; background: transparent; color: var(--o-muted); border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.btn-logout-icon::before { content: ""; width: 20px; height: 20px; background-color: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
.btn-logout-icon:hover { background: var(--o-surface-3,#E2E8F0); color: var(--o-bad); }
.sidebar-collapsed .sidebar { width: 72px; }
.sidebar-collapsed .sidebar-brand { padding: 16px 0 6px; align-items: center; }
.sidebar-collapsed .sidebar-date, .sidebar-collapsed .user-card .user-meta { display: none; }
.sidebar-collapsed .sidebar-toggle { position: static; margin-top: 6px; }
.sidebar-collapsed .sidebar .nav-item { margin: 2px 10px; justify-content: center; padding: 10px 0; }
.sidebar-collapsed .sidebar .nav-item.active::before { left: -10px; }
.sidebar-collapsed .sidebar .nav-group > summary { padding: 10px 0; justify-content: center; }
.sidebar-collapsed .sidebar .nav-group > summary .nav-text { display: none; }
.sidebar-collapsed .sidebar .nav-group > summary::after { margin: 0; }
.sidebar-collapsed .user-card { padding: 8px; justify-content: center; flex-wrap: wrap; }

/* ── Cabecera superior ────────────────────────────────────────────────────────────── */
.topbar { position: sticky; top: 0; z-index: 30; margin: 0; min-height: 66px; padding: 12px 28px; background: var(--o-surface,#fff); border-bottom: 1px solid var(--o-border); gap: 16px; }
.topbar-title { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 700; color: var(--o-text); letter-spacing: -.01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-title span { color: var(--o-muted); font-weight: 500; margin: 0 4px; }
.topbar-actions { gap: 12px; }
.topbar-date { font-size: 14px; color: var(--o-text-2); font-weight: 500; white-space: nowrap; text-transform: capitalize; }
.topbar-circle, .notification-button, .topbar-account-link .account-avatar { width: 38px; height: 38px; min-width: 38px; border-radius: 50%; border: 0; box-shadow: none; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; }
.topbar-account-link { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--o-text-2); font-weight: 500; padding: 0; background: transparent; border: 0; }
.topbar-account-link .account-avatar { background: #2F4A6B; }
.topbar-account-link .account-label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.topbar-account-link .account-label::before { content: ""; width: 18px; height: 18px; background-color: var(--o-muted); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21v-1a6 6 0 0 1 6-6h4a6 6 0 0 1 6 6v1'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21v-1a6 6 0 0 1 6-6h4a6 6 0 0 1 6 6v1'/%3E%3C/svg%3E") center / contain no-repeat; }
.topbar-account-link .account-label::after { content: ""; width: 7px; height: 7px; border-right: 1.8px solid var(--o-muted); border-bottom: 1.8px solid var(--o-muted); transform: rotate(45deg) translateY(-2px); margin-left: 2px; }
.notification-button { background: #5B7FA6; cursor: pointer; }
.notification-button:hover { background: #4A6D93; }
.notification-button strong { border-color: var(--o-border,#fff); }
.mobile-menu-button { border-radius: 10px; box-shadow: none; }
.tenant-subscription-alert { margin: 14px 28px 0; }
@media (max-width: 900px) { .topbar { padding: 10px 14px; min-height: 58px; } .topbar-title { font-size: 17px; } .topbar-date, .topbar-account-link .account-label { display: none; } }

/* ── Cabeceras de pagina internas (el titulo ya esta en la barra superior) ───────── */
.page-header { margin-bottom: 16px; }
.page-header > div:first-child > h1, .page-header > h1, .page-header > .page-title, .page-header > div:first-child > .page-title { display: none; }
.page-header > div:first-child > .page-sub, .page-header > div:first-child > p { margin: 0; color: var(--o-muted); font-size: 13px; }
.page-sub { color: var(--o-muted); }

/* ── Tarjetas ─────────────────────────────────────────────────────────────────────── */
.card, .panel, .box { background: var(--o-surface); border: 1px solid var(--o-border); border-radius: var(--o-radius); box-shadow: var(--o-shadow); padding: 18px; }
.card-title { font-size: 15px; font-weight: 700; color: var(--o-text); margin-bottom: 12px; }
.kpi-grid { gap: 14px; }
.kpi-card { background: var(--o-surface); border: 1px solid var(--o-border); border-left-width: 1px; border-radius: var(--o-radius); box-shadow: var(--o-shadow); padding: 16px 18px; position: relative; overflow: hidden; }
.kpi-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--o-accent); }
.kpi-card.kpi-green::before { background: #10B981; } .kpi-card.kpi-red::before { background: #F43F5E; } .kpi-card.kpi-amber::before { background: #F59E0B; } .kpi-card.kpi-blue::before { background: #3B82F6; }
.kpi-value { font-size: 30px; font-weight: 700; letter-spacing: -.02em; color: var(--o-text); }
.kpi-label { font-size: 12px; font-weight: 600; color: var(--o-muted); }

/* ── Botones ──────────────────────────────────────────────────────────────────────── */
.btn-primary, .btn-primary-sm { background: var(--o-primary); color: #fff; border: 1px solid var(--o-primary); border-radius: 10px; font-weight: 600; padding: 10px 16px; transition: background .12s, box-shadow .12s; }
.btn-primary:hover:not(:disabled), .btn-primary-sm:hover:not(:disabled) { background: var(--o-primary-hover); box-shadow: 0 2px 8px rgba(15,23,42,.22); }
.btn-primary-sm { padding: 6px 12px; font-size: 12px; }
.btn-secondary, .btn-secondary-sm, .btn-tool { background: var(--o-surface,#fff); color: var(--o-text-2); border: 1px solid var(--o-border-strong); border-radius: 10px; font-weight: 500; padding: 7px 14px; font-size: 13px; transition: background .12s, border-color .12s; }
.btn-secondary:hover:not(:disabled), .btn-secondary-sm:hover:not(:disabled), .btn-tool:hover { background: var(--o-surface-2); border-color: #94A3B8; color: var(--o-text); }
.btn-tool.active { background: var(--o-primary); color: #fff; border-color: var(--o-primary); }
.btn-danger, .btn-success, .btn-warning { border-radius: 10px; padding: 8px 14px; font-weight: 600; }
.btn-danger { background: #E11D48; } .btn-danger:hover { background: #BE123C; }
.btn-success { background: #059669; } .btn-success:hover { background: #047857; }
.btn-danger-soft { background: var(--o-bad-bg); color: var(--o-bad); border: 1px solid var(--o-bad-b); border-radius: 10px; font-weight: 500; }
.btn-link, .btn-link-sm { color: var(--o-accent); }
button:focus-visible, a:focus-visible, .form-input:focus-visible { outline: 2px solid #94A3B8; outline-offset: 2px; }

/* ── Formularios ──────────────────────────────────────────────────────────────────── */
.form-input, select.form-input, textarea.form-input, .input-sm, input.yard-search, .yard-select {
  background: var(--o-surface,#fff); border: 1px solid var(--o-border-strong); border-radius: 10px; color: var(--o-text); padding: 9px 12px; font-size: 14px; min-height: 40px; transition: border-color .12s, box-shadow .12s; }
.form-input::placeholder { color: var(--o-faint); }
.form-input:focus, .input-sm:focus, input.yard-search:focus, .yard-select:focus { border-color: var(--o-primary); box-shadow: 0 0 0 3px rgba(30,41,59,.14); outline: none; }
.form-group label, .form-grid label { font-size: 13px; font-weight: 600; color: var(--o-text-2); }
.form-group { margin-bottom: 12px; }
.form-input:disabled, .form-input[readonly] { background: var(--o-surface-2); color: var(--o-muted); }
.login-card .form-input { min-height: 43px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--o-primary); }

/* ── Tablas ───────────────────────────────────────────────────────────────────────── */
.table-wrap { background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: var(--o-radius); box-shadow: var(--o-shadow); }
.data-table { font-size: 14px; }
.data-table th { background: var(--o-surface-2); color: var(--o-muted); font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; padding: 12px 14px; border-bottom: 1px solid var(--o-border); white-space: nowrap; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--o-border,#EEF2F7); color: var(--o-text-2); }
.data-table tbody tr:hover td { background: var(--o-surface-2,#F8FAFC); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table a { color: var(--o-accent); text-decoration: none; font-weight: 500; }
.data-table a:hover { text-decoration: underline; }

/* ── Badges en pastilla ───────────────────────────────────────────────────────────── */
.badge-cat, .badge-red, .badge-green, .badge-amber, .badge-gray, .badge-warn, .badge-blue, .badge-bloq,
.pill, .status-pill, [class^="badge-"]:not(.badge-count) { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; line-height: 1.4; border: 1px solid transparent; white-space: nowrap; }
.badge-green { background: var(--o-ok-bg); color: var(--o-ok); border-color: var(--o-ok-b); }
.badge-amber, .badge-warn { background: var(--o-warn-bg); color: var(--o-warn); border-color: var(--o-warn-b); }
.badge-red, .badge-bloq { background: var(--o-bad-bg); color: var(--o-bad); border-color: var(--o-bad-b); }
.badge-blue, .badge-cat { background: var(--o-info-bg); color: var(--o-info); border-color: var(--o-info-b); }
.badge-gray { background: var(--o-surface-3,#F1F5F9); color: var(--o-text-2); border-color: var(--o-border); }
.badge-bloq { margin-top: 6px; }

/* ── Alertas ──────────────────────────────────────────────────────────────────────── */
.alert-error { background: var(--o-bad-bg); color: var(--o-bad); border: 1px solid var(--o-bad-b); border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.alert-info { background: var(--o-info-bg); color: var(--o-info); border: 1px solid var(--o-info-b); border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.alert-success { background: var(--o-ok-bg); color: var(--o-ok); border: 1px solid var(--o-ok-b); border-radius: 10px; padding: 10px 14px; font-size: 13px; }

/* ── Modales ──────────────────────────────────────────────────────────────────────── */
.modal-overlay { background: rgba(15,23,42,.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); padding: 16px; }
.modal-card { background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 16px; padding: 24px 26px; box-shadow: var(--o-shadow-lg); max-height: calc(100vh - 32px); overflow: auto; }
.modal-title { font-size: 18px; font-weight: 700; color: var(--o-text); margin-bottom: 14px; }
.modal-footer { margin-top: 20px; gap: 10px; }
.modal-footer .btn-primary { width: auto; min-width: 110px; padding: 9px 18px; }
.modal-footer .btn-secondary { padding: 9px 18px; }

/* ── Pestañas / chips de filtro ───────────────────────────────────────────────────── */
.calle-tab, .tab, .tab-btn { border-radius: 10px; border: 1px solid var(--o-border-strong); background: var(--o-surface,#fff); color: var(--o-text-2); font-weight: 500; }
.calle-tab.active, .tab.active, .tab-btn.active { background: var(--o-primary); border-color: var(--o-primary); color: #fff; }

/* ── Neutralizar capas antiguas del menu (app.css tenia 2-3 rediseños superpuestos) ─────────────── */
.sidebar { overflow: hidden !important; }
.sidebar-brand { position: relative; background: transparent; backdrop-filter: none; min-height: 0; z-index: 2; }
.sidebar .nav-quick { display: block; padding: 4px 0 8px; border-bottom: 1px solid var(--o-border); }
.sidebar .nav-groups { display: block; padding: 0 0 12px; }
.sidebar .nav-group { border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.sidebar .nav-group > summary { background: transparent; border: 0; }
.sidebar .nav-group > summary:hover { background: transparent; }
.sidebar .nav-group .nav-item { margin: 2px 12px; }
.sidebar .nav-group .nav-item:last-child { margin-bottom: 2px; }
.sidebar .nav-item-primary { background: transparent; border: 0; color: var(--o-text-2); }
.sidebar .nav-item-primary:hover { background: var(--o-surface-3,#F1F5F9); }
.sidebar .nav-item.active, .sidebar .nav-item-primary.active { background: var(--o-active,#E6ECF3); color: var(--o-text); }
.sidebar .nav-icon { min-width: 0; min-height: 0; display: inline-block; border-radius: 0; font-weight: 400; }
.sidebar .nav-item.active .nav-icon { background-color: currentColor; color: inherit; }
.sidebar-footer { background: transparent; border-top: 0; padding: 12px; }
.sidebar-collapsed .sidebar .nav-group > summary { background: transparent; border: 0; padding: 10px 0; }
.sidebar-collapsed .sidebar .nav-quick, .sidebar-collapsed .sidebar .nav-groups { padding-left: 0; padding-right: 0; }
.sidebar-collapsed .sidebar .app-logo-sidebar { width: 40px; height: 40px; }
.sidebar-collapsed .sidebar .sidebar-brand .app-logo img { max-height: 40px; }
.app-logo-sidebar { height: auto; width: auto; max-width: 100%; overflow: visible; }
.app-logo-sidebar .app-logo-full { max-width: 190px; max-height: 38px; }
.nav-item-primary.active .nav-icon { background-color: currentColor; }

/* ═══════════════ Pantallas ═══════════════════════════════════════════════════════════════ */

/* ── Componentes compartidos: chips de filtro, buscador, KPI pastel ───────────────────────── */
.page-body .chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 10px; font-size: 13px; font-weight: 500; border: 1px solid transparent; cursor: pointer; background: var(--o-surface,#fff); line-height: 1.3; }
.page-body .chip i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: 0 0 9px; }
.page-body .chip-info { background: var(--o-info-bg); color: var(--o-info); border-color: var(--o-info-b); }
.page-body .chip-ok { background: var(--o-ok-bg); color: var(--o-ok); border-color: var(--o-ok-b); }
.page-body .chip-bad { background: var(--o-bad-bg); color: var(--o-bad); border-color: var(--o-bad-b); }
.page-body .chip-warn { background: var(--o-warn-bg); color: var(--o-warn); border-color: var(--o-warn-b); }
.page-body .chip-neutral { background: var(--o-surface-3,#F1F5F9); color: var(--o-muted,#475569); border-color: var(--o-border); }
.page-body .chip-off { opacity: .6; }
.page-body button.chip:not(.on) { opacity: .72; }
.page-body button.chip.on { box-shadow: 0 0 0 1.5px currentColor; }
.page-body button.chip:hover { opacity: 1; }
.search-box { display: flex; align-items: center; gap: 8px; background: var(--o-surface,#fff); border: 1px solid var(--o-border-strong); border-radius: 10px; padding: 0 12px; min-height: 40px; min-width: 230px; }
.search-box:focus-within { border-color: var(--o-primary); box-shadow: 0 0 0 3px rgba(30,41,59,.14); }
.search-box svg { width: 17px; height: 17px; stroke: var(--o-faint); fill: none; stroke-width: 1.9; stroke-linecap: round; flex: 0 0 17px; }
.search-box input { border: 0; outline: 0; flex: 1; min-width: 0; font-size: 14px; background: transparent; padding: 8px 0; color: var(--o-text); }
.btn-ico { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-right: 7px; vertical-align: -3px; }

/* ── Tareas operativas ───────────────────────────────────────────────────────────────────── */
.page-body .okcampa-toolbar-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.page-body .okcampa-filter-chips, .page-body .okcampa-toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-body .okcampa-filter-label { font-weight: 600; color: var(--o-text-2); margin-right: 2px; }
.page-body .okcampa-check { margin-left: 8px; font-size: 13px; color: var(--o-text-2); }
.page-body .okcampa-toolbar-right .btn-primary { width: auto; padding: 9px 18px; }
.page-body .okcampa-kpi-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.page-body .okcampa-kpi { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-radius: 14px; border: 1px solid transparent; box-shadow: none; min-height: 96px; }
.page-body .okcampa-kpi > div { display: grid; gap: 2px; }
.page-body .okcampa-kpi span { font-size: 17px; font-weight: 500; color: var(--o-text-2,#334155); }
.page-body .okcampa-kpi strong { font-size: 36px; line-height: 1.1; font-weight: 600; color: var(--o-text,#0F172A); }
.page-body .okcampa-kpi .kpi-ico { width: 54px; height: 54px; flex: 0 0 54px; opacity: .9; }
.page-body .okcampa-kpi.kpi-blue { background: var(--o-info-bg,#EAF1FB); border-color: var(--o-info-b,#D3E2F6); } .page-body .okcampa-kpi.kpi-blue .kpi-ico { color: #1E4E8C; }
.page-body .okcampa-kpi.kpi-green { background: var(--o-ok-bg,#E8F6EC); border-color: var(--o-ok-b,#C9EBD3); } .page-body .okcampa-kpi.kpi-green .kpi-ico { color: #2E8B57; }
.page-body .okcampa-kpi.kpi-amber { background: var(--o-warn-bg,#FEF4E4); border-color: var(--o-warn-b,#F9DDAA); } .page-body .okcampa-kpi.kpi-amber .kpi-ico { color: #D68910; }
.page-body .okcampa-kpi.kpi-red { background: var(--o-bad-bg,#FDECEE); border-color: var(--o-bad-b,#F6CBD0); } .page-body .okcampa-kpi.kpi-red .kpi-ico { color: #C94452; }
@media (max-width: 1000px) { .page-body .okcampa-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .page-body .okcampa-kpi-row { grid-template-columns: 1fr; } .page-body .okcampa-kpi strong { font-size: 30px; } }

.page-body .okcampa-workbench { grid-template-columns: minmax(300px, 380px) 1fr; gap: 16px; height: calc(100dvh - 330px); min-height: 460px; }
.page-body .okcampa-work-list { gap: 12px; padding-right: 6px; }
.page-body .okcampa-work-item { border: 1px solid var(--o-border); border-radius: 12px; padding: 14px 16px; background: var(--o-surface,#fff); box-shadow: var(--o-shadow); transition: border-color .12s, box-shadow .12s; }
.page-body .okcampa-work-item:hover { border-color: var(--o-border-strong); }
.page-body .okcampa-work-item.active { border: 1.5px solid #1E3A5F; background: var(--o-surface-2,#F8FBFF); box-shadow: 0 2px 10px rgba(30,58,95,.12); }
.page-body .okcampa-work-main strong { font-size: 15px; letter-spacing: .01em; }
.page-body .okcampa-work-main span { color: var(--o-text-2); font-size: 14px; font-weight: 500; }
.page-body .okcampa-work-main small { font-size: 13px; }
.page-body .okcampa-status { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; border: 1px solid var(--o-border,#E2E8F0); background: var(--o-surface-3,#F1F5F9); color: var(--o-muted,#475569); }
.page-body .okcampa-status.ok { background: var(--o-ok-bg); color: var(--o-ok); border-color: var(--o-ok-b); }
.page-body .okcampa-status.info { background: var(--o-info-bg); color: var(--o-info); border-color: var(--o-info-b); }
.page-body .okcampa-status.danger { background: var(--o-bad-bg); color: var(--o-bad); border-color: var(--o-bad-b); }
.page-body .okcampa-work-detail { padding: 22px 24px; border-radius: 14px; }
.page-body .okcampa-vehicle-head { padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--o-border); }
.page-body .okcampa-vehicle-head h2 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.page-body .okcampa-vehicle-progress strong { color: var(--o-navy); }
.page-body .okcampa-meta span { background: var(--o-surface-3,#F1F5F9); border: 1px solid var(--o-border); color: var(--o-muted,#475569); font-size: 12px; padding: 2px 9px; }
.page-body .okcampa-order-layout { grid-template-columns: minmax(250px, 300px) 1fr; gap: 18px; }
.page-body .okcampa-task-sequence { border: 1px solid var(--o-border); border-radius: 12px; padding: 14px; background: var(--o-surface,#fff); gap: 4px; align-self: start; }
.page-body .okcampa-card-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--o-text); }
.page-body .okcampa-sequence-item { border: 0; border-radius: 8px; padding: 9px 8px; background: transparent; grid-template-columns: 30px 1fr auto; }
.page-body .okcampa-sequence-item:hover { background: var(--o-surface-3,#F1F5F9); }
.page-body .okcampa-sequence-item.active { background: var(--o-info-bg,#E8EEF6); border: 0; }
.page-body .okcampa-sequence-item.ok, .page-body .okcampa-sequence-item.info, .page-body .okcampa-sequence-item.danger { border-left: 0; }
.page-body .okcampa-step { background: var(--o-info-bg,#E6EEF8); color: var(--o-heading,#1E3A5F); font-weight: 700; width: 26px; height: 26px; font-size: 12px; }
.page-body .okcampa-sequence-item.ok .okcampa-step { background: var(--o-ok-bg,#D1FAE5); color: var(--o-ok,#047857); }
.page-body .okcampa-sequence-item strong { font-size: 14px; font-weight: 600; }
.page-body .okcampa-task-editor { gap: 14px; }
.page-body .okcampa-editor-head h3 { font-size: 18px; font-weight: 700; }
.page-body .okcampa-panel-soft { background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 12px; padding: 16px 18px; box-shadow: var(--o-shadow); }
.page-body .okcampa-panel-soft > strong { font-size: 15px; font-weight: 700; color: var(--o-text); }
.page-body .okcampa-move-box { background: var(--o-info-bg); border: 1px solid var(--o-info-b); border-radius: 12px; color: var(--o-info); }
.page-body .okcampa-ai-box { background: var(--o-info-bg,#F0F9FF); border-color: var(--o-info-b,#BAE6FD); border-radius: 10px; }
.page-body .okcampa-definition dt { color: var(--o-muted); }
.page-body .okcampa-finish-actions { justify-content: flex-end; padding-top: 4px; }
.page-body .okcampa-finish-actions .btn-danger { background: var(--o-primary); }
.page-body .okcampa-finish-actions .btn-danger:hover:not(:disabled) { background: var(--o-primary-hover); }
.page-body .okcampa-finish-actions .btn-success { background: #059669; }
.page-body .okcampa-flow-step { border-radius: 999px; }
.page-body .okcampa-file-btn { border-radius: 10px; }
.page-body .okcampa-comments { min-height: 90px; }

/* ── Control acceso / salida ─────────────────────────────────────────────────────────────── */
:root { --ico-camera: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 4 7.5 6.5H4a2 2 0 0 0-2 2V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8.5a2 2 0 0 0-2-2h-3.5L15 4z'/%3E%3Ccircle cx='12' cy='13' r='3.5'/%3E%3C/svg%3E"); }
.page-body .access-filterbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-body .access-filterbar .okcampa-filter-chips { flex: 1 1 auto; }
.page-body .access-state { width: 150px; }
.page-body .access-date { width: 150px; }
.page-body .access-grid { grid-template-columns: minmax(380px, .8fr) minmax(0, 1.3fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .page-body .access-grid { grid-template-columns: 1fr; } }
.page-body .access-form { padding: 24px 26px; border-radius: 14px; }
.page-body .access-title { font-size: 22px; font-weight: 700; margin-bottom: 16px; }
.page-body .truck-first { border: 0; background: transparent; padding: 0; margin-bottom: 12px; }
.page-body .truck-search-row { grid-template-columns: 1fr auto; gap: 10px; }
.page-body .truck-search-row .form-input { font-size: 15px; }
.page-body .truck-search-row .btn-primary { width: auto; white-space: nowrap; padding: 9px 18px; }
.page-body .access-dropzone .quick-ocr { margin: 12px 0 0; }
.page-body .access-dropzone .quick-ocr-btn { width: 100%; min-height: 104px; border: 1.5px dashed var(--o-border-strong); border-radius: 12px; background: var(--o-surface-2); color: var(--o-text-2); font-weight: 500; font-size: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.page-body .access-dropzone .quick-ocr-btn::before { content: ""; width: 34px; height: 34px; background-color: #334155; -webkit-mask: var(--ico-camera) center / contain no-repeat; mask: var(--ico-camera) center / contain no-repeat; }
.page-body .access-dropzone .quick-ocr-btn:hover { background: var(--o-surface-3,#EEF2F7); border-color: #94A3B8; }
.page-body .access-section { font-weight: 600; margin: 18px 0 8px; color: var(--o-text-2); font-size: 15px; }
.page-body .access-form-grid { grid-template-columns: 1fr 1fr; gap: 0 12px; }
.page-body .access-form-grid.three { grid-template-columns: 1.4fr 1.2fr .8fr; }
.page-body .access-form-grid .span-2 { grid-column: 1 / -1; }
.page-body .access-form .form-group { margin-bottom: 12px; }
.page-body .access-form .form-group label { display: block; margin-bottom: 5px; }
.page-body .signature-box { border: 1.5px dashed var(--o-border-strong); border-radius: 12px; background: var(--o-surface-2); padding: 12px 14px; margin-top: 4px; }
.page-body .firma-canvas { background: var(--o-surface,#fff); border-radius: 8px; border: 1px solid var(--o-border); width: 100%; }
.page-body .access-actions { display: flex; gap: 10px; margin-top: 16px; }
.page-body .access-actions .access-submit { flex: 1 1 auto; width: auto; padding: 11px 18px; }
.page-body .access-actions .access-cancel { flex: 0 0 auto; padding: 11px 20px; }
.page-body .access-top { display: grid; grid-template-columns: 1.05fr .95fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 1300px) { .page-body .access-top { grid-template-columns: 1fr; } }
.page-body .access-summary { background: linear-gradient(135deg, #E6F5EC 0%, #EEF8F2 100%); border: 1px solid var(--o-ok-b,#CBEAD6); border-radius: 14px; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; gap: 12px; overflow: hidden; }
.page-body .access-summary h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--o-ok,#0F3D2A); }
.page-body .access-sub { color: #3F6B55; font-size: 13px; }
.page-body .access-numbers { display: flex; gap: 30px; margin-top: 14px; }
.page-body .access-numbers strong { display: block; font-size: 42px; font-weight: 600; line-height: 1; color: var(--o-text,#0F172A); }
.page-body .access-numbers small { color: #3F6B55; font-size: 13px; }
.page-body .access-art { width: 150px; height: auto; flex: 0 0 150px; opacity: .95; }
.page-body .access-donut-card { background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 14px; padding: 18px 22px; box-shadow: var(--o-shadow); }
.page-body .access-donut-card h3 { margin: 0 0 10px; font-size: 18px; font-weight: 700; }
.page-body .access-donut-row { display: flex; align-items: center; gap: 22px; }
.page-body .access-donut { position: relative; width: 116px; height: 116px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 116px; }
.page-body .access-donut::after { content: ""; position: absolute; inset: 24px; border-radius: 50%; background: var(--o-surface,#fff); }
.page-body .access-donut span { position: relative; z-index: 1; font-size: 24px; font-weight: 700; }
.page-body .access-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--o-text-2); }
.page-body .access-legend li { display: flex; align-items: center; gap: 8px; }
.page-body .access-legend i { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 11px; }
.page-body .access-legend i.g { background: #22C55E; } .page-body .access-legend i.y { background: #F5B73B; } .page-body .access-legend i.r { background: #EF4444; }
.page-body .access-legend strong { margin-left: 2px; color: var(--o-text); font-weight: 700; }
.page-body .access-table-card { background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 14px; box-shadow: var(--o-shadow); padding: 18px 20px 6px; }
.page-body .access-table-card .card-title { font-size: 20px; margin-bottom: 10px; }
.page-body .access-table-card .table-wrap { border: 0; box-shadow: none; border-radius: 0; }
.page-body .access-table-card .data-table th { background: transparent; border-bottom: 1px solid var(--o-border); color: var(--o-text-2); font-weight: 600; }
.page-body .badge-yellow { display: inline-flex; align-items: center; border-radius: 999px; background: var(--o-warn-bg); color: var(--o-warn); border: 1px solid var(--o-warn-b); padding: 3px 10px; font-weight: 600; font-size: 12px; }
.page-body .access-top { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); }
.page-body .access-top > * { min-width: 0; }
.page-body .access-art { width: 104px; flex: 0 1 104px; }
.page-body .access-numbers { gap: 22px; }
.page-body .access-numbers strong { font-size: 36px; }
.page-body .access-donut { width: 100px; height: 100px; flex: 0 0 100px; }
.page-body .access-donut::after { inset: 21px; }
.page-body .access-donut-row { gap: 16px; }
.page-body .access-legend { font-size: 13px; }
.page-body .access-panel { min-width: 0; }
.page-body .access-form-grid.three { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, .8fr); }
.page-body .dock-row { grid-template-columns: minmax(0, 1fr) auto; }

/* ── Entrada de vehiculo (asistente) ─────────────────────────────────────────────────────── */
.page-body .entrada-shell { grid-template-columns: minmax(210px, 250px) minmax(0, 680px); gap: 40px; justify-content: start; }
@media (max-width: 980px) { .page-body .entrada-shell { grid-template-columns: 1fr; gap: 16px; } }
.page-body .entrada-steps { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 90px; padding: 4px 0; }
.page-body .entrada-step { border: 0; background: transparent; border-radius: 12px; padding: 10px 12px; grid-template-columns: 44px 1fr; gap: 0 10px; position: relative; box-shadow: none; min-height: 56px; }
.page-body .entrada-step small { display: none; }
.page-body .entrada-step strong { font-size: 17px; font-weight: 600; color: var(--o-text-2,#1E293B); }
.page-body .entrada-step span { grid-row: auto; width: 38px; height: 38px; border: 2px solid var(--o-border-strong,#CBD5E1); background: var(--o-surface,#fff); color: var(--o-text-2,#334155); font-size: 15px; font-weight: 600; z-index: 1; }
.page-body .entrada-step:not(:last-child)::after { content: ""; position: absolute; left: 30px; top: 52px; bottom: -8px; width: 2px; background: #CBD5E1; }
.page-body .entrada-step.active { background: var(--o-info-bg,#E3EDF6); box-shadow: none; border: 0; }
.page-body .entrada-step.active span { background: #5B9BD0; border-color: #5B9BD0; color: #fff; }
.page-body .entrada-step.done span { background: #10B981; border-color: #10B981; color: #fff; }
.page-body .entrada-step.locked { opacity: .55; }
.page-body .entrada-card { padding: 28px 32px; border-radius: 16px; }
.page-body .entrada-card h2 { font-size: 22px; font-weight: 700; padding-bottom: 12px; border-bottom: 1px solid var(--o-border); margin-bottom: 4px; }
.page-body .entrada-card p { color: var(--o-muted); margin-bottom: 18px; }
.page-body .entrada-search-grid { grid-template-columns: minmax(0, 1fr) auto; gap: 14px 12px; align-items: end; }
.page-body .entrada-search-grid > .form-group:first-child { grid-column: 1 / -1; }
.page-body .entrada-search-grid .form-input { height: 44px; min-height: 44px; }
.page-body .camera-cell .quick-ocr-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; background: var(--o-primary); color: #fff; border: 0; border-radius: 10px; padding: 0 18px; font-weight: 600; font-size: 14px; white-space: nowrap; }
.page-body .camera-cell .quick-ocr-btn::after { content: ""; width: 18px; height: 18px; background-color: var(--o-surface,#fff); -webkit-mask: var(--ico-camera) center / contain no-repeat; mask: var(--ico-camera) center / contain no-repeat; }
.page-body .camera-cell .quick-ocr-btn:hover { background: var(--o-primary-hover); }
.page-body .entrada-card .form-group > label { font-size: 14px; }
.page-body .asn-next-card { border-radius: 14px; margin-bottom: 16px; }

/* ── KPI tile (componente compartido) ────────────────────────────────────────────────────── */
.kpi-tile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-radius: 14px; border: 1px solid transparent; min-height: 96px; min-width: 0; }
.kpi-tile .kpi-tile-text { display: grid; gap: 2px; min-width: 0; }
.kpi-tile span { font-size: 15px; font-weight: 500; color: var(--o-text-2,#334155); }
.kpi-tile strong { font-size: 34px; line-height: 1.1; font-weight: 600; color: var(--o-text,#0F172A); letter-spacing: -.01em; }
.kpi-tile small { font-size: 12px; color: var(--o-muted); }
.kpi-tile .kpi-ico { width: 52px; height: 52px; flex: 0 0 52px; opacity: .9; }
.kpi-tile.compact { padding: 12px 16px; min-height: 72px; } .kpi-tile.compact strong { font-size: 26px; } .kpi-tile.compact .kpi-ico { width: 40px; height: 40px; flex-basis: 40px; }
.kpi-tile.kpi-blue { background: var(--o-info-bg,#EAF1FB); border-color: var(--o-info-b,#D3E2F6); } .kpi-tile.kpi-blue .kpi-ico { color: #1E4E8C; }
.kpi-tile.kpi-green { background: var(--o-ok-bg,#E8F6EC); border-color: var(--o-ok-b,#C9EBD3); } .kpi-tile.kpi-green .kpi-ico { color: #2E8B57; }
.kpi-tile.kpi-amber { background: var(--o-warn-bg,#FEF4E4); border-color: var(--o-warn-b,#F9DDAA); } .kpi-tile.kpi-amber .kpi-ico { color: #D68910; }
.kpi-tile.kpi-red { background: var(--o-bad-bg,#FDECEE); border-color: var(--o-bad-b,#F6CBD0); } .kpi-tile.kpi-red .kpi-ico { color: #C94452; }
.kpi-tile.kpi-slate { background: var(--o-surface-3,#F1F5F9); border-color: var(--o-border,#E2E8F0); } .kpi-tile.kpi-slate .kpi-ico { color: var(--o-muted,#475569); }
.kpi-tile.kpi-violet { background: var(--o-purple-bg,#F1EDFB); border-color: var(--o-border,#DDD3F4); } .kpi-tile.kpi-violet .kpi-ico { color: #6D4FC2; }

/* ── Listados genericos (Vehiculos, Estancias, Clientes...) ──────────────────────────────── */
.page-body .stock-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 16px; }
@media (max-width: 1000px) { .page-body .stock-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.page-body .vehs-count { margin-left: 8px; font-weight: 500; color: var(--o-muted); font-size: 13px; }
.page-body .filters-bar { background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 12px; padding: 12px 14px; box-shadow: var(--o-shadow); align-items: center; gap: 10px; margin-bottom: 16px; }
.page-body .input-search, .page-body .select-sm, .page-body .input-sm { border: 1px solid var(--o-border-strong); border-radius: 10px; min-height: 38px; padding: 7px 12px; font-size: 14px; background: var(--o-surface,#fff); color: var(--o-text); }
.page-body .input-search:focus, .page-body .select-sm:focus, .page-body .input-sm:focus { border-color: var(--o-primary); box-shadow: 0 0 0 3px rgba(30,41,59,.14); outline: none; }
.page-body .bulk-btn { min-height: 38px; }
.page-body .okcampa-table-shell { background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 14px; box-shadow: var(--o-shadow); overflow: hidden; }
.page-body .okcampa-table-meta { padding: 14px 18px; border-bottom: 1px solid var(--o-border); background: var(--o-surface,#fff); }
.page-body .okcampa-table-meta strong { font-size: 18px; font-weight: 700; color: var(--o-text); }
.page-body .okcampa-table-meta span, .page-body .okcampa-table-meta small { color: var(--o-muted); font-size: 12px; }
.page-body .okcampa-table-pager { padding: 12px 18px; border-top: 1px solid var(--o-border); background: var(--o-surface,#fff); }
.page-body .okcampa-table-scroll .data-table th { background: var(--o-surface-2); }
.page-body .badge-red-soft { background: var(--o-bad-bg); color: var(--o-bad); border-color: var(--o-bad-b); }
.page-body .row-blocked td { background: var(--o-bad-bg,#FFF7F8); }
.page-body .row-warn td { background: var(--o-warn-bg,#FFFCF2); }

/* ── Dashboard ───────────────────────────────────────────────────────────────────────────── */
.page-body .dashboard-head { display: none; }
.page-body .dash-board { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; margin-bottom: 18px; align-items: start; }
.page-body .dash-main { display: grid; gap: 16px; min-width: 0; }
@media (max-width: 1280px) { .page-body .dash-board { grid-template-columns: 1fr; } .page-body .dash-board .smart-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .page-body .dash-board .smart-kpi-grid { grid-template-columns: 1fr; } }
.page-body .smart-hero { margin: 0; border-radius: 14px; padding: 24px 28px; background: linear-gradient(135deg, #12274A 0%, #1B3A6B 100%); box-shadow: 0 8px 24px rgba(18,39,74,.22); grid-template-columns: minmax(0, 1fr) 250px; }
.page-body .smart-hero.cliente { background: linear-gradient(135deg, #0f3d4a, #0f4c5c); } .page-body .smart-hero.operario { background: linear-gradient(135deg, #17492f, #1f5f43); }
.page-body .smart-hero .text-ok { color: #4ADE80; font-weight: 600; font-size: 14px; }
.page-body .smart-hero h2 { font-size: 30px; font-weight: 700; letter-spacing: -.01em; }
.page-body .forecast-card { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: 14px 18px; }
.page-body .forecast-card strong { font-size: 40px; font-weight: 600; }
.page-body .kpi-command-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; }
@media (max-width: 760px) { .page-body .kpi-command-strip { grid-template-columns: 1fr; } }
.page-body .command-card { background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-left-width: 4px; border-radius: 12px; padding: 16px 18px; min-height: 148px; box-shadow: var(--o-shadow); }
.page-body .command-card-head span { font-size: 12px; font-weight: 700; color: var(--o-muted); letter-spacing: .05em; }
.page-body .command-card-head b { font-size: 13px; color: var(--o-text); }
.page-body .command-card.health.good { border-left-color: #F59E0B; } .page-body .command-card.health { border-left-color: #F59E0B; }
.page-body .command-card.health.good { border-left-color: #10B981; } .page-body .command-card.health.risk { border-left-color: #EF4444; }
.page-body .command-card.capacity { border-left: 4px solid #10B981; }
.page-body .command-card.priority { border-left: 4px solid #3B82F6; }
.page-body .command-card.pulse { border-left: 4px solid #6366F1; }
.page-body .priority .priority-title { font-size: 19px; font-weight: 700; }
.page-body .command-stats div, .page-body .pulse-grid div { background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 10px; }
.page-body .command-stats strong, .page-body .pulse-grid strong { font-size: 22px; font-weight: 600; }
.page-body .smart-kpi-grid { grid-template-columns: 1fr; gap: 12px; margin: 0; }
.page-body .smart-kpi { border: 1px solid var(--o-border); border-left-width: 4px; border-radius: 12px; padding: 14px 18px; min-height: 0; box-shadow: var(--o-shadow); grid-template-rows: auto auto auto auto; gap: 6px; }
.page-body .smart-kpi.blue { border-left-color: #3B82F6; } .page-body .smart-kpi.green { border-left-color: #10B981; } .page-body .smart-kpi.amber { border-left-color: #F59E0B; } .page-body .smart-kpi.red { border-left-color: #EF4444; } .page-body .smart-kpi.purple { border-left-color: #8B5CF6; }
.page-body .smart-kpi span { font-size: 12px; font-weight: 700; letter-spacing: .05em; }
.page-body .smart-kpi strong { font-size: 32px; font-weight: 600; letter-spacing: -.01em; }
.page-body .smart-kpi b { background: var(--o-surface-2); border-color: var(--o-border); color: var(--o-text-2); font-weight: 600; }
.page-body .dashboard-grid-main { grid-template-columns: minmax(320px, .8fr) minmax(0, 1.5fr); gap: 16px; }
.page-body .ai-panel, .page-body .chart-panel { border-radius: 14px; }
.page-body .chart-panel .card-title { font-size: 18px; }
.page-body .trend-btn { border-radius: 999px; font-weight: 600; }
.page-body .trend-btn.active { background: var(--o-primary); border-color: var(--o-primary); }
.page-body .flow-bars .in { background: #64748B; } .page-body .flow-bars .out { background: #B6C0CF; } .page-body .flow-bars .stock { display: none; }
.page-body .dot.in { background: #64748B; } .page-body .dot.out { background: #B6C0CF; }
.page-body .ai-line { background: var(--o-surface,#fff); border-radius: 10px; }
.page-body .trend-summary div { background: var(--o-surface,#fff); border-radius: 10px; }
.sidebar .nav-item.active, .sidebar .nav-item-primary.active, .sidebar a.nav-item.active { box-shadow: none !important; background-image: none !important; background-color: var(--o-active,#E6ECF3) !important; }
.sidebar .nav-item.active .nav-text { font-weight: 600; }

/* ── Botones primarios: ancho segun contenido dentro de las paginas (los formularios que lo necesiten usan .btn-block) ── */
.page-body .btn-primary { width: auto; min-width: 110px; padding: 9px 18px; }
.page-body .btn-primary.btn-block, .page-body .form-group .btn-primary.btn-block { width: 100%; }
.page-body .okcampa-toolbar-right .btn-primary, .page-body .header-actions .btn-primary { width: auto; }

/* ── Salida de vehiculo (asistente) — mismo lenguaje que la entrada ───────────────────────── */
.page-body .salida-shell { grid-template-columns: minmax(210px, 250px) minmax(0, 1fr); gap: 36px; }
@media (max-width: 960px) { .page-body .salida-shell { grid-template-columns: 1fr; gap: 16px; } }
.page-body .salida-steps { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 90px; padding: 4px 0; background: transparent; border: 0; box-shadow: none; }
.page-body .salida-step { border: 0; background: transparent; border-radius: 12px; padding: 10px 12px; grid-template-columns: 44px 1fr; gap: 0 10px; position: relative; min-height: 56px; }
.page-body .salida-step small { display: none; }
.page-body .salida-step strong { font-size: 17px; font-weight: 600; color: var(--o-text-2,#1E293B); }
.page-body .salida-step span { grid-row: auto; width: 38px; height: 38px; border: 2px solid var(--o-border-strong,#CBD5E1); background: var(--o-surface,#fff); color: var(--o-text-2,#334155); font-size: 15px; font-weight: 600; z-index: 1; }
.page-body .salida-step:not(:last-child)::after { content: ""; position: absolute; left: 30px; top: 52px; bottom: -8px; width: 2px; background: #CBD5E1; }
.page-body .salida-step.active { background: var(--o-info-bg,#E3EDF6); box-shadow: none; border: 0; }
.page-body .salida-step.active span { background: #5B9BD0; border-color: #5B9BD0; color: #fff; }
.page-body .salida-step.done span { background: #10B981; border-color: #10B981; color: #fff; }
.page-body .salida-card, .page-body .salida-main { border-radius: 16px; padding: 28px 32px; }
.page-body .salida-card h2 { font-size: 22px; font-weight: 700; }
.page-body .vehicle-summary > div, .page-body .validation-card, .page-body .document-preview, .page-body .firma-wrap { border-radius: 12px; background: var(--o-surface,#fff); border-color: var(--o-border); }

/* ── Movil ───────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .page-body .okcampa-kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .page-body .okcampa-kpi { padding: 12px 14px; min-height: 78px; }
  .page-body .okcampa-kpi span { font-size: 13px; } .page-body .okcampa-kpi strong { font-size: 26px; }
  .page-body .okcampa-kpi .kpi-ico { width: 34px; height: 34px; flex-basis: 34px; }
  .page-body .stock-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-tile { padding: 12px 14px; min-height: 78px; } .kpi-tile span { font-size: 13px; } .kpi-tile strong { font-size: 26px; } .kpi-tile .kpi-ico { width: 34px; height: 34px; flex-basis: 34px; }
  .page-body .okcampa-toolbar-right, .page-body .okcampa-toolbar-right > * { width: 100%; }
  .page-body .okcampa-toolbar-right .btn-primary { width: 100%; }
}

/* ═══════════════ Sistema de botones unificado ═══════════════════════════════════════════════ */
.page-body .btn-primary, .page-body .btn-secondary, .page-body .btn-danger, .page-body .btn-success, .page-body .btn-warning,
.modal-card .btn-primary, .modal-card .btn-secondary, .modal-card .btn-danger, .modal-card .btn-success {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 16px; border-radius: 10px;
  font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s, color .12s;
}
.page-body .btn-secondary, .modal-card .btn-secondary { background: var(--o-surface,#fff); color: var(--o-text-2); border: 1px solid var(--o-border-strong); font-weight: 500; }
.page-body .btn-secondary:hover:not(:disabled), .modal-card .btn-secondary:hover:not(:disabled) { background: var(--o-surface-2,#F8FAFC); border-color: #94A3B8; color: var(--o-text); }
.page-body .btn-secondary:active:not(:disabled) { background: var(--o-surface-3,#EEF2F7); }
.page-body .btn-primary:active:not(:disabled) { transform: translateY(1px); }
.page-body .btn-danger, .modal-card .btn-danger { background: #E11D48; border: 1px solid #E11D48; color: #fff; }
.page-body .btn-danger:hover:not(:disabled) { background: #BE123C; }
.page-body .btn-success, .modal-card .btn-success { background: #059669; border: 1px solid #059669; color: #fff; }
.page-body .btn-success:hover:not(:disabled) { background: #047857; }
.page-body .btn-warning { background: #D97706; border: 1px solid #D97706; color: #fff; }
.page-body button:disabled, .modal-card button:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
/* tamaño reducido: acciones de fila y barras densas */
.page-body .btn-xs, .page-body .data-table td .btn-primary, .page-body .data-table td .btn-secondary, .page-body .data-table td .btn-danger, .page-body .data-table td .btn-success,
.page-body .btn-secondary-sm, .page-body .btn-primary-sm {
  min-height: 30px; padding: 0 11px; font-size: 13px; border-radius: 8px; min-width: 0; width: auto; font-weight: 500;
}
.page-body .btn-primary.btn-xs, .page-body .data-table td .btn-primary { font-weight: 600; }
/* acciones destructivas discretas: contorno rojo, relleno al pasar el raton */
.page-body .btn-secondary.danger-button, .page-body .btn-secondary.danger-action, .page-body .btn-secondary.btn-danger-outline, .page-body .btn-danger-soft {
  background: var(--o-surface,#fff); color: var(--o-bad); border: 1px solid var(--o-bad-b);
}
.page-body .btn-secondary.danger-button:hover:not(:disabled), .page-body .btn-secondary.danger-action:hover:not(:disabled), .page-body .btn-danger-soft:hover:not(:disabled) { background: var(--o-bad-bg); border-color: #FDA4AF; color: #9F1239; }
.page-body .btn-danger.btn-xs { background: var(--o-surface,#fff); color: var(--o-bad); border: 1px solid var(--o-bad-b); }
.page-body .btn-danger.btn-xs:hover:not(:disabled) { background: var(--o-bad-bg); }
/* enlaces-boton */
.page-body .btn-link, .page-body .btn-link-sm { background: none; border: 0; padding: 4px 6px; border-radius: 6px; color: var(--o-accent); font-weight: 600; font-size: 13px; text-decoration: none; cursor: pointer; }
.page-body .btn-link:hover, .page-body .btn-link-sm:hover { background: var(--o-info-bg,#EEF4FA); text-decoration: none; }
.page-body .btn-link-danger { color: var(--o-bad); } .page-body .btn-link-danger:hover { background: var(--o-bad-bg); text-decoration: none; }
/* grupos de acciones en celdas de tabla */
.page-body .data-table td.actions, .page-body .data-table td.actions-cell, .page-body .data-table td.row-actions { display: table-cell; white-space: nowrap; }
.page-body .data-table td .btn-secondary + .btn-secondary, .page-body .data-table td .btn-secondary + .btn-primary, .page-body .data-table td .btn-primary + .btn-secondary { margin-left: 6px; }
.page-body .btn-icon, .page-body .btn-ghost { background: transparent; border: 0; border-radius: 8px; min-width: 32px; min-height: 32px; display: inline-flex; align-items: center; justify-content: center; color: var(--o-muted); cursor: pointer; }
.page-body .btn-icon:hover, .page-body .btn-ghost:hover { background: var(--o-surface-3,#EEF2F7); color: var(--o-text); }
.page-body .btn-tool { min-height: 34px; padding: 0 12px; display: inline-flex; align-items: center; }
.page-body .btn-crear-inline { border-radius: 8px; background: var(--o-purple-bg,#F5F3FF); border: 1px dashed #A78BFA; color: var(--o-purple,#6D28D9); font-weight: 600; padding: 6px 10px; }

/* ── Pestañas del mapa (estilo subrayado; el estilo de pastilla oscura las dejaba ilegibles) ── */
.page-body .yard-tabs { gap: 4px; border-bottom: 1px solid var(--o-border); }
.page-body .yard-tab { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--o-muted); padding: 10px 16px; font-size: 14px; font-weight: 500; }
.page-body .yard-tab:hover { color: var(--o-text); background: var(--o-surface-2,#F8FAFC); }
.page-body .yard-tab.active { background: transparent; color: var(--o-text); border-bottom-color: var(--o-navy); font-weight: 700; }

/* ── KpiTile: icono sobre pastilla circular (sustituye al pictograma grande) ─────────────── */
.kpi-tile .kpi-badge { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--o-glass,rgba(255,255,255,.7)); box-shadow: 0 1px 2px rgba(15,23,42,.06); }
.kpi-tile .kpi-badge .kpi-ico { width: 28px; height: 28px; flex: none; opacity: 1; }
.kpi-tile.compact .kpi-badge { width: 40px; height: 40px; flex-basis: 40px; } .kpi-tile.compact .kpi-badge .kpi-ico { width: 22px; height: 22px; }
@media (max-width: 560px) { .kpi-tile .kpi-badge { width: 38px; height: 38px; flex-basis: 38px; } .kpi-tile .kpi-badge .kpi-ico { width: 21px; height: 21px; } }

/* ═══════════════ Listados: orden, ancho de columnas y formato por usuario ═══════════════════ */
.page-body .data-table th.sortable { cursor: pointer; user-select: none; }
.page-body .data-table th.sortable:hover { color: var(--o-text); background: var(--o-surface-3,#F1F5F9); }
.page-body .data-table th .sort-ind { display: inline-block; width: 12px; height: 12px; margin-left: 6px; vertical-align: -1px; opacity: .25; background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 9l4-4 4 4M8 15l4 4 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 9l4-4 4 4M8 15l4 4 4-4'/%3E%3C/svg%3E") center / contain no-repeat; }
.page-body .data-table th.sortable:hover .sort-ind { opacity: .55; }
.page-body .data-table th.asc .sort-ind, .page-body .data-table th.desc .sort-ind { opacity: 1; color: var(--o-navy);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 15l6-6 6 6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 15l6-6 6 6'/%3E%3C/svg%3E"); }
.page-body .data-table th.desc .sort-ind { transform: rotate(180deg); }
.page-body .data-table th.asc, .page-body .data-table th.desc { color: var(--o-text); }

.grid-enh th { position: relative; }
.grid-enh.grid-fixed th, .grid-enh.grid-fixed td { overflow: hidden; text-overflow: ellipsis; }
.grid-enh.grid-fixed td { overflow-wrap: anywhere; }
.grid-rz { position: absolute; top: 0; right: -4px; width: 9px; height: 100%; cursor: col-resize; z-index: 4; touch-action: none; }
.grid-rz::after { content: ""; position: absolute; left: 4px; top: 22%; height: 56%; width: 1px; background: #CBD5E1; transition: background .1s, width .1s, left .1s; }
.grid-rz:hover::after, .grid-rz.active::after { background: var(--o-navy); width: 2px; left: 3px; }
.grid-enh th:last-child .grid-rz { right: 0; }
.grid-gear { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--o-faint); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; opacity: .55; z-index: 5; }
.grid-gear svg { width: 16px; height: 16px; }
.grid-enh:hover .grid-gear, .grid-gear:focus-visible { opacity: 1; }
.grid-gear:hover { background: var(--o-surface-3,#E2E8F0); color: var(--o-text); opacity: 1; }
.grid-enh th:last-child { padding-right: 44px; }
.grid-dense th, .grid-dense td { padding-top: 5px !important; padding-bottom: 5px !important; font-size: 13px; }
.grid-pop { position: fixed; z-index: 3000; width: 250px; max-height: min(70vh, 460px); overflow: auto; background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 12px; box-shadow: var(--o-shadow-lg); padding: 10px 6px 8px; font-size: 14px; }
.grid-pop-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--o-faint); padding: 2px 12px 6px; }
.grid-pop-row { display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 8px; cursor: pointer; color: var(--o-text-2); }
.grid-pop-row:hover { background: var(--o-surface-3,#F1F5F9); }
.grid-pop-list { border-bottom: 1px solid var(--o-border); margin-bottom: 4px; padding-bottom: 4px; }
.grid-pop-actions { padding: 6px 10px 2px; }
.grid-pop-reset { width: 100%; padding: 8px 10px; border: 1px solid var(--o-border-strong); border-radius: 9px; background: var(--o-surface,#fff); color: var(--o-text-2); font-weight: 500; cursor: pointer; }
.grid-pop-reset:hover { background: var(--o-surface-2,#F8FAFC); }

/* ── Iconos del menu (generado) ─────────────────────────────────────────── */
.sidebar .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3.2'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='9' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1.5'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1.5'/%3E%3Crect x='3' y='16' width='7' height='5' rx='1.5'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/campa"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 17H3v-5l2-5h14l2 5v5h-2'/%3E%3Cpath d='M3 12h18'/%3E%3Ccircle cx='7.5' cy='17' r='2'/%3E%3Ccircle cx='16.5' cy='17' r='2'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/mapa"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3 3 5.5v15L9 18l6 3 6-2.5v-15L15 6z'/%3E%3Cpath d='M9 3v15M15 6v15'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/reubicacion"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 3v3M12 18v3M3 12h3M18 12h3'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/mapa?tab=inventario"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M8 8h8M8 12h8M8 16h5'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/estancias"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M8 8h8M8 12h8M8 16h5'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/vehiculos"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 17H3v-5l2-5h14l2 5v5h-2'/%3E%3Cpath d='M3 12h18'/%3E%3Ccircle cx='7.5' cy='17' r='2'/%3E%3Ccircle cx='16.5' cy='17' r='2'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/acceso"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h11v10H3z'/%3E%3Cpath d='M14 9h4l3 3v4h-7'/%3E%3Ccircle cx='7' cy='17.5' r='2'/%3E%3Ccircle cx='17' cy='17.5' r='2'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/asn"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 9.5h18M8 2.5v4M16 2.5v4'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/entrada-vehiculo"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12m0 0-4-4m4 4 4-4'/%3E%3Cpath d='M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/importacion-vehiculos"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 13h5l1.5 3h5L16 13h5'/%3E%3Cpath d='M5.5 6 3 13v5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5l-2.5-7z'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/llaves"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='4'/%3E%3Cpath d='M10.5 12.5 21 2M16 7l3 3M14 9l2 2'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/bloqueos"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='10' rx='2'/%3E%3Cpath d='M8 11V7a4 4 0 0 1 8 0v4'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/danos"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 4 2 18a2 2 0 0 0 1.7 3h16.6a2 2 0 0 0 1.7-3L13.7 4a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/incidencias"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 4 2 18a2 2 0 0 0 1.7 3h16.6a2 2 0 0 0 1.7-3L13.7 4a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/documentos-transporte"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z'/%3E%3Cpath d='M14 3v6h6M8 14h8M8 18h5'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/previsiones"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 9.5h18M8 2.5v4M16 2.5v4'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/salida-vehiculo"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V3m0 0L8 7m4-4 4 4'/%3E%3Cpath d='M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/okcampa-supervisor"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='M7 16v-5M12 16V6M17 16v-3'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/servicios"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2.5' width='8' height='4' rx='1'/%3E%3Cpath d='M16 4.5h2a2 2 0 0 1 2 2V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6.5a2 2 0 0 1 2-2h2M9 14l2 2 4-4'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/ordenes-proveedor"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h11v10H3z'/%3E%3Cpath d='M14 9h4l3 3v4h-7'/%3E%3Ccircle cx='7' cy='17.5' r='2'/%3E%3Ccircle cx='17' cy='17.5' r='2'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/okcampa-operario"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2.5' width='8' height='4' rx='1'/%3E%3Cpath d='M16 4.5h2a2 2 0 0 1 2 2V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6.5a2 2 0 0 1 2-2h2M9 14l2 2 4-4'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/planificacion-trabajo"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4.5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 9.5h18M8 2.5v4M16 2.5v4'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/productividad"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='M7 16v-5M12 16V6M17 16v-3'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/taller"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 0 0 5 5L22 9l-4-4zM13 8 4 17a2.1 2.1 0 0 0 3 3l9-9'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/okcampa-configuracion"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9 7 7M17 17l2.1 2.1M19.1 4.9 17 7M7 17l-2.1 2.1'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/yard-care"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19c0-8 5-14 15-14 0 10-6 15-14 15'/%3E%3Cpath d='M5 19c2-5 5-8 9-10'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/aprovisionamiento/solicitudes"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z'/%3E%3Cpath d='M14 3v6h6M8 14h8M8 18h5'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/aprovisionamiento/pedidos"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8 12 3 3 8v8l9 5 9-5z'/%3E%3Cpath d='M3 8l9 5 9-5M12 13v8'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/aprovisionamiento/recepciones"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 13h5l1.5 3h5L16 13h5'/%3E%3Cpath d='M5.5 6 3 13v5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5l-2.5-7z'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/aprovisionamiento/inventarios"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8 12 3 3 8v8l9 5 9-5z'/%3E%3Cpath d='M3 8l9 5 9-5M12 13v8'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/aprovisionamiento/movimientos"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M8 8h8M8 12h8M8 16h5'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/facturas-borradores"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z'/%3E%3Cpath d='M14 3v6h6M8 14h8M8 18h5'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/facturas"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='6' width='20' height='12' rx='2'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3Cpath d='M6 12h.01M18 12h.01'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/facturas-proveedor"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='6' width='20' height='12' rx='2'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3Cpath d='M6 12h.01M18 12h.01'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/rentabilidad"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='M7 16v-5M12 16V6M17 16v-3'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/tarifas"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12V4h8l10 10-8 8z'/%3E%3Ccircle cx='7.5' cy='8.5' r='1.2'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/platform/tenants"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='1.5'/%3E%3Cpath d='M9 7h2M13 7h2M9 11h2M13 11h2M9 15h2M13 15h2M10 21v-3h4v3'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/portal-cliente"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='M7 16v-5M12 16V6M17 16v-3'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/campas"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3 3 5.5v15L9 18l6 3 6-2.5v-15L15 6z'/%3E%3Cpath d='M9 3v15M15 6v15'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/clientes"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20v-1a5 5 0 0 1 5-5h3a5 5 0 0 1 5 5v1'/%3E%3Cpath d='M16 4.5a3.5 3.5 0 0 1 0 7M18 14.5a5 5 0 0 1 3.5 4.5v1'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/maestros"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h11v10H3z'/%3E%3Cpath d='M14 9h4l3 3v4h-7'/%3E%3Ccircle cx='7' cy='17.5' r='2'/%3E%3Ccircle cx='17' cy='17.5' r='2'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/proveedores"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='1.5'/%3E%3Cpath d='M9 7h2M13 7h2M9 11h2M13 11h2M9 15h2M13 15h2M10 21v-3h4v3'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/articulos-compra"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8 12 3 3 8v8l9 5 9-5z'/%3E%3Cpath d='M3 8l9 5 9-5M12 13v8'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/maestro-servicios"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 0 0 5 5L22 9l-4-4zM13 8 4 17a2.1 2.1 0 0 0 3 3l9-9'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/operarios"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20v-1a5 5 0 0 1 5-5h3a5 5 0 0 1 5 5v1'/%3E%3Cpath d='M16 4.5a3.5 3.5 0 0 1 0 7M18 14.5a5 5 0 0 1 3.5 4.5v1'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/habilidades"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.9 5.1L19 10l-5.1 1.9L12 17l-1.9-5.1L5 10l5.1-1.9z'/%3E%3Cpath d='M19 16l.7 1.8L21.5 18.5l-1.8.7L19 21l-.7-1.8-1.8-.7 1.8-.7z'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/usuarios"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20v-1a5 5 0 0 1 5-5h3a5 5 0 0 1 5 5v1'/%3E%3Cpath d='M16 4.5a3.5 3.5 0 0 1 0 7M18 14.5a5 5 0 0 1 3.5 4.5v1'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/maestro-marcas-modelos"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12V4h8l10 10-8 8z'/%3E%3Ccircle cx='7.5' cy='8.5' r='1.2'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/control-inspeccion"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='2.5' width='8' height='4' rx='1'/%3E%3Cpath d='M16 4.5h2a2 2 0 0 1 2 2V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6.5a2 2 0 0 1 2-2h2M9 14l2 2 4-4'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/empresas"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='1.5'/%3E%3Cpath d='M9 7h2M13 7h2M9 11h2M13 11h2M9 15h2M13 15h2M10 21v-3h4v3'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/mi-jornada"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12.5l2.6 2.6L16 9.5'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/modulos"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h3a2 2 0 1 1 4 0h3v3a2 2 0 1 1 0 4v3h-3a2 2 0 1 0-4 0H4v-3a2 2 0 1 0 0-4z'/%3E%3Cpath d='M14 4h6v6'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/auditoria"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 8v4l3 2'/%3E%3Cpath d='M3.5 12a8.5 8.5 0 1 0 2.5-6'/%3E%3Cpath d='M3 4v4h4'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/citas"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3Cpath d='M9 15l2 2 4-4'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/aduanas"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/edi"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h13l-3-3M20 17H7l3 3'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/notificaciones-clientes"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9a6 6 0 1 1 12 0c0 6 2 7 2 7H4s2-1 2-7'/%3E%3Cpath d='M10 20a2 2 0 0 0 4 0'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/pantalla"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='4' width='20' height='13' rx='1.5'/%3E%3Cpath d='M8 21h8M12 17v4'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/plataforma"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='6' rx='1.5'/%3E%3Crect x='3' y='15' width='18' height='6' rx='1.5'/%3E%3Cpath d='M7 6h.01M7 18h.01M12 9v6'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/reclamaciones"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16v12H8l-4 4z'/%3E%3Cpath d='M12 8v3M12 13.5h.01'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/riesgo-meteorologico"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 16a4 4 0 1 1 .5-8A5.5 5.5 0 0 1 18 9a3.5 3.5 0 0 1-.5 7z'/%3E%3Cpath d='M11 18l-1.5 3M15 18l-1.5 3'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/alertas"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9'/%3E%3Cpath d='M10 21a2 2 0 0 0 4 0'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/integraciones"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 2v5M15 2v5M6 7h12v4a6 6 0 0 1-12 0z'/%3E%3Cpath d='M12 17v5'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/configuracion-ia"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.9 5.1L19 10l-5.1 1.9L12 17l-1.9-5.1L5 10l5.1-1.9z'/%3E%3Cpath d='M19 16l.7 1.8L21.5 18.5l-1.8.7L19 21l-.7-1.8-1.8-.7 1.8-.7z'/%3E%3C/svg%3E")}
.sidebar .nav-group summary::after{--chev:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 15l6-6 6 6'/%3E%3C/svg%3E")}
.btn-logout-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v8'/%3E%3Cpath d='M6.5 6.5a8 8 0 1 0 11 0'/%3E%3C/svg%3E")}

/* Firma: lienzo a todo el ancho con el boton de limpiar superpuesto en la esquina */
.page-body .firma-box, .firma-box { position: relative; width: 100%; }
.page-body .firma-box .firma-canvas { display: block; width: 100%; height: 190px; margin: 0; touch-action: none; }
.page-body .firma-box .firma-clear { position: absolute; top: 10px; right: 10px; z-index: 2; background: var(--o-glass,rgba(255,255,255,.92)); }
@media (max-width: 700px) { .page-body .firma-box .firma-canvas { height: 220px; } }

/* Asistentes (entrada/salida) en movil: la lista de pasos se sustituye por una barra compacta "Paso X de N" junto al titulo */
.page-body .entrada-stepbar { display: none; }
@media (max-width: 980px) {
  .page-body .entrada-shell, .page-body .salida-shell { grid-template-columns: 1fr; }
  .page-body .entrada-steps, .page-body .salida-steps { display: none; }
  .page-body .entrada-stepbar { display: flex; align-items: center; gap: 10px; position: relative; margin: 0 0 14px; padding: 0 0 12px; border-bottom: 1px solid var(--o-border); }
  .page-body .entrada-stepbar .step-chip { background: var(--o-navy, #1b3a6b); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 800; white-space: nowrap; }
  .page-body .entrada-stepbar strong { font-size: 14px; }
  .page-body .entrada-stepbar i { position: absolute; left: 0; bottom: -1px; height: 3px; background: var(--o-ok, #16a34a); border-radius: 3px; transition: width .2s; }
}

/* Boton de accion en curso (ver js/guard.js): no admite nuevos clics hasta que termina */
button.is-busy, input.is-busy { opacity: .6; cursor: progress; }

/* Miniaturas de fotos subidas, con boton para quitarlas */
.page-body .photo-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.page-body .photo-thumb { position: relative; width: 104px; height: 104px; margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--o-border); background: var(--o-surface-2); }
.page-body .photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.page-body .photo-thumb-ph { width: 100%; height: 100%; display: grid; place-items: center; font-weight: 800; color: var(--o-text-2); }
.page-body .photo-thumb-del { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; padding: 0; border-radius: 50%; border: 0; background: rgba(15,23,42,.72); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.page-body .photo-thumb-del:hover { background: var(--o-bad, #dc2626); }

.page-body .firma-preview { background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 8px; min-height: 120px; display: grid; place-items: center; padding: 10px; }
.page-body .firma-preview img { max-width: 100%; max-height: 190px; display: block; }
.page-body .firma-hint { margin: 8px 2px 0; font-size: 12.5px; color: var(--o-text-3, var(--o-muted,#64748b)); }

/* Logo de la empresa (PNG transparente) sobre fondos oscuros (login y pantalla de carga): sin caja blanca, con un contorno claro suave para que se lea */
.app-logo-custom.app-logo-login img, .app-logo-custom.app-logo-splash img, #application-logo.app-logo-custom-img {
  background: transparent; padding: 0;
  filter: drop-shadow(0 0 1.5px rgba(255,255,255,.95)) drop-shadow(0 0 10px rgba(255,255,255,.28));
}
.app-logo-login, .app-logo-splash { height: auto; }
.app-logo-login img { max-height: 96px; max-width: 100%; }
.app-logo-splash img { max-height: 120px; max-width: 100%; }
/* Menu lateral: el logo se adapta al ancho disponible */
.sidebar-brand .app-logo { min-width: 0; flex: 1 1 auto; }
.sidebar-brand .app-logo img { max-width: 100%; height: auto; max-height: 44px; }

/* ===== Mapa vivo ===== */
.mv-page { display: flex; flex-direction: column; gap: 10px; }
.mv-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.mv-kpis { display: flex; flex-wrap: wrap; gap: 8px; }
.mv-kpi { background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--o-text-2); }
.mv-kpi b { color: var(--o-text); font-weight: 800; margin-right: 3px; }
.mv-kpi-bad b { color: var(--o-bad,#dc2626); } .mv-kpi-sal b { color: var(--o-purple,#7c3aed); }
.mv-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mv-modes { display: inline-flex; background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 12px; padding: 3px; gap: 2px; }
.mv-mode { border: 0; background: transparent; padding: 7px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--o-text-2); cursor: pointer; }
.mv-mode.on { background: var(--o-primary, #1b3a6b); color: #fff; }
.mv-campa { width: auto; min-width: 150px; }
.mv-search { position: relative; }
.mv-search .form-input { min-width: 250px; }
.mv-results { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; min-width: 280px; background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 12px; box-shadow: 0 14px 40px rgba(15,23,42,.18); overflow: hidden; }
.mv-result { display: grid; width: 100%; text-align: left; padding: 9px 14px; border: 0; background: var(--o-surface,#fff); cursor: pointer; border-bottom: 1px solid var(--o-border,#f1f5f9); }
.mv-result:hover { background: var(--o-info-bg,#f1f5ff); }
.mv-result strong { font-size: 14px; } .mv-result span { font-size: 12px; color: var(--o-text-2); }
.mv-result-empty { padding: 12px 14px; color: var(--o-text-2); font-size: 13px; }
.mv-stage { position: relative; height: calc(100vh - 250px); min-height: 420px; background: var(--o-surface-3,#eef2f7); border: 1px solid var(--o-border); border-radius: 16px; overflow: hidden; }
#mv-canvas { display: block; touch-action: none; cursor: grab; }
#mv-canvas:active { cursor: grabbing; }
.mv-hud { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; }
.mv-hud button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--o-border); background: var(--o-surface,#fff); font-size: 20px; font-weight: 700; color: var(--o-text); box-shadow: 0 4px 14px rgba(15,23,42,.12); cursor: pointer; }
.mv-pill { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); background: rgba(15,23,42,.88); color: #fff; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; }
.mv-legend { position: absolute; left: 12px; top: 12px; display: flex; flex-wrap: wrap; gap: 4px 12px; max-width: 60%; background: var(--o-glass,rgba(255,255,255,.92)); border: 1px solid var(--o-border); border-radius: 12px; padding: 7px 12px; font-size: 12px; color: var(--o-text-2); }
.mv-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mv-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.mv-help { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); font-size: 12px; color: var(--o-muted,#64748b); background: var(--o-glass,rgba(255,255,255,.8)); padding: 3px 12px; border-radius: 999px; pointer-events: none; white-space: nowrap; }
.mv-error { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 10px; background: rgba(238,242,247,.92); color: var(--o-bad,#b91c1c); font-weight: 600; }
.mv-skeleton { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--o-surface-3,#eef2f7); color: var(--o-text-2); }
.mv-skel-grid { display: grid; grid-template-columns: repeat(5, 70px); gap: 10px; }
.mv-skel-grid i { height: 70px; border-radius: 10px; background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%); background-size: 200% 100%; animation: mvShimmer 1.2s infinite; }
@keyframes mvShimmer { to { background-position: -200% 0; } }
.mv-panel { position: absolute; top: 0; right: 0; bottom: 0; width: 330px; max-width: 92%; background: var(--o-surface,#fff); border-left: 1px solid var(--o-border); box-shadow: -14px 0 40px rgba(15,23,42,.14); padding: 18px; transform: translateX(105%); transition: transform .22s ease; overflow-y: auto; z-index: 20; }
.mv-panel.open { transform: none; }
.mv-panel-close { position: absolute; top: 8px; right: 10px; border: 0; background: transparent; font-size: 26px; color: var(--o-muted,#64748b); cursor: pointer; }
.mv-panel-code { font-size: 13px; color: var(--o-text-2); font-weight: 700; letter-spacing: .04em; }
.mv-panel-state { display: inline-block; margin: 6px 0 12px; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.mv-panel-state.ok { background: var(--o-ok-bg,#d1fae5); color: var(--o-ok,#047857); } .mv-panel-state.busy { background: var(--o-info-bg,#dbeafe); color: var(--o-info,#1d4ed8); }
.mv-panel-state.bad { background: var(--o-bad-bg,#fee2e2); color: var(--o-bad,#b91c1c); } .mv-panel-state.warn { background: var(--o-warn-bg,#fef3c7); color: var(--o-warn,#b45309); } .mv-panel-state.muted { background: var(--o-surface-3,#e2e8f0); color: var(--o-muted,#475569); }
.mv-plate { font-size: 28px; font-weight: 900; letter-spacing: .04em; color: var(--o-text); margin-bottom: 2px; }
.mv-panel-line { color: var(--o-text-2); margin-bottom: 4px; } .mv-panel-line.mono { font-family: Consolas, monospace; font-size: 12px; }
.mv-panel-rows { display: grid; gap: 8px; margin: 14px 0; }
.mv-panel-rows div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; border-bottom: 1px solid var(--o-border,#f1f5f9); padding-bottom: 6px; }
.mv-panel-rows span { color: var(--o-text-2); }
.mv-tag { border-radius: 10px; padding: 7px 10px; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.mv-tag-bad { background: var(--o-bad-bg,#fee2e2); color: var(--o-bad,#b91c1c); } .mv-tag-sal { background: var(--o-purple-bg,#ede9fe); color: var(--o-purple,#6d28d9); }
.mv-tag-ok { background: var(--o-ok-bg,#dcfce7); color: var(--o-ok,#166534); } .mv-tag-warn { background: var(--o-warn-bg,#fef3c7); color: var(--o-warn,#92400e); }   /* acceso de la plaza: sale libre / hay que mover */
.mv-panel-actions { display: grid; gap: 8px; margin-top: 14px; }
.mv-panel-loading { padding: 40px 0; text-align: center; color: var(--o-text-2); }
@media (max-width: 760px) {
  .mv-stage { height: calc(100vh - 300px); min-height: 380px; }
  .mv-legend { max-width: calc(100% - 70px); font-size: 11px; }
  .mv-help { display: none; }
  .mv-search .form-input { min-width: 0; width: 100%; }
  .mv-search { flex: 1 1 100%; }
  .mv-panel { top: auto; left: 0; width: 100%; max-width: 100%; max-height: 62%; border-left: 0; border-top: 1px solid var(--o-border); border-radius: 18px 18px 0 0; transform: translateY(105%); }
  .mv-panel.open { transform: none; }
}

.mv-pill-warn { background: rgba(180,83,9,.92); }

.mv-hud .mv-hud-sep { margin-top: 10px; }
.mv-hud button.on { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.mv-toast { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); background: rgba(15,23,42,.92); color: #fff; padding: 9px 16px; border-radius: 12px; font-size: 13.5px; max-width: 86%; text-align: center; z-index: 25; }

/* ---- Mapa real ---- */
.mr-page { position: relative; height: calc(100vh - 70px); min-height: 480px; margin: -8px; border-radius: 14px; overflow: hidden; background: #0f172a; }
.mr-mapa { position: absolute; inset: 0; }
.mr-top { position: absolute; z-index: 600; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; max-width: 560px; }
.mr-search { position: relative; flex: 1; }
.mr-search .form-input, .mr-campa { box-shadow: 0 6px 20px rgba(0,0,0,.28); border-radius: 14px; height: 46px; font-size: 15px; }
.mr-campa { width: 150px; background: var(--o-surface,#fff); }
.mr-resumen { position: absolute; z-index: 560; top: 70px; left: 12px; width: 270px; background: rgba(15,23,42,.9); color: #fff; border-radius: 14px; padding: 11px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.mr-resumen-t { font-weight: 800; font-size: 14px; margin-bottom: 7px; }
.mr-resumen-barra { height: 7px; background: rgba(255,255,255,.18); border-radius: 4px; overflow: hidden; }
.mr-resumen-barra i { display: block; height: 100%; background: linear-gradient(90deg,#34d399,#f59e0b); border-radius: 4px; }
.mr-resumen-n { margin-top: 7px; font-size: 12.5px; color: #cbd5e1; }
.mr-resumen-n b { color: #fff; font-size: 15px; }
.mr-resumen-av span { display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.14); }
.mr-resumen-av .mal { background: rgba(239,68,68,.35); }
.mr-ayuda-btn { margin-top: 9px; background: none; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer; }
.mr-ayuda { position: absolute; z-index: 700; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(460px, 92%); max-height: 86%; overflow-y: auto; background: var(--o-surface,#fff); color: var(--o-text,#0f172a); border-radius: 16px; padding: 18px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.mr-ayuda h4 { margin: 0 0 8px; } .mr-ayuda ul { margin: 0 0 8px; padding-left: 18px; line-height: 1.55; font-size: 14px; } .mr-ayuda small { color: var(--o-muted,#64748b); }
.mr-aviso { position: absolute; z-index: 620; left: 50%; transform: translateX(-50%); top: 70px; max-width: 90%; background: rgba(15,23,42,.92); color: #fff; padding: 9px 16px; border-radius: 12px; font-size: 13px; text-align: center; }
.mr-aviso.mal { background: #b91c1c; }
.mr-leyenda { position: absolute; z-index: 560; left: 12px; bottom: 12px; display: flex; gap: 12px; background: rgba(15,23,42,.82); color: #fff; padding: 6px 12px; border-radius: 999px; font-size: 12px; }
.mr-leyenda span { display: inline-flex; align-items: center; gap: 6px; } .mr-leyenda i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.mr-botones { position: absolute; z-index: 580; right: 12px; top: 70px; display: flex; flex-direction: column; gap: 8px; }
.mr-botones button { display: flex; align-items: center; gap: 8px; border: 0; border-radius: 14px; background: var(--o-surface,#fff); color: var(--o-text,#0f172a); padding: 8px 14px 8px 10px; font-weight: 700; font-size: 13px; box-shadow: 0 6px 18px rgba(0,0,0,.3); cursor: pointer; }
.mr-botones button b { width: 28px; height: 28px; display: grid; place-content: center; border-radius: 9px; background: var(--o-info-bg,#e8efff); color: var(--o-info,#1d4ed8); font-size: 16px; }
.mr-botones button.on { background: #7c3aed; color: #fff; } .mr-botones button.on b { background: rgba(255,255,255,.25); color: #fff; }
.mr-ajuste { position: absolute; z-index: 650; left: 50%; transform: translateX(-50%); bottom: 14px; width: min(520px, 94%); background: var(--o-surface,#fff); border-radius: 16px; padding: 12px 14px; box-shadow: 0 14px 40px rgba(0,0,0,.4); }
.mr-ajuste-txt { font-size: 13px; margin-bottom: 8px; } .mr-ajuste-fila { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.mr-ajuste-fila button { border: 1px solid var(--o-border-strong,#cbd5e1); background: var(--o-surface-2,#f8fafc); border-radius: 10px; padding: 7px 11px; font-weight: 600; font-size: 12.5px; cursor: pointer; }
.mr-tarjeta { position: absolute; z-index: 640; left: 50%; transform: translateX(-50%); bottom: 14px; width: min(480px, 94%); background: var(--o-surface,#fff); border-radius: 20px; padding: 16px 18px; box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.mr-cerrar { position: absolute; top: 8px; right: 12px; border: 0; background: none; font-size: 24px; color: var(--o-muted,#64748b); cursor: pointer; }
.mr-tarjeta-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-right: 22px; }
.mr-matricula { font-size: 22px; font-weight: 900; letter-spacing: .5px; } .mr-sub { color: var(--o-muted,#64748b); font-size: 13.5px; }
.mr-flecha { width: 56px; height: 56px; border-radius: 50%; background: #2563eb; color: #fff; display: grid; place-content: center; font-size: 26px; flex: none; box-shadow: 0 6px 16px rgba(37,99,235,.5); transition: transform .3s; }
.mr-dist { margin-top: 8px; font-size: 14px; color: var(--o-muted,#475569); } .mr-dist b { font-size: 30px; color: var(--o-text,#0f172a); }
.mr-acciones { display: flex; gap: 8px; margin-top: 10px; }
.mr-pill { position: absolute; z-index: 620; top: 14px; left: 50%; transform: translateX(-50%); background: rgba(15,23,42,.85); color: #fff; padding: 5px 12px; border-radius: 999px; font-size: 12px; }
.mr-pin-head { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; background: #ef4444; border: 3px solid var(--o-border,#fff); transform: rotate(-45deg); box-shadow: 0 4px 12px rgba(0,0,0,.5); margin: 0 2px; }
.mr-yo-dot { position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #2563eb; border: 3px solid var(--o-border,#fff); box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.mr-yo-halo { position: absolute; left: -9px; top: -9px; width: 40px; height: 40px; border-radius: 50%; background: rgba(37,99,235,.3); animation: mrHalo 1.8s infinite; }
@keyframes mrHalo { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
@media (max-width: 700px) {
  .mr-resumen { top: 66px; width: calc(100% - 140px); font-size: 12px; } .mr-botones button span { display: none; } .mr-botones button { padding: 6px; } .mr-leyenda { display: none; }
  .mr-page { height: calc(100vh - 120px); }
}

/* ---- Mapa real: en vivo, actividad, editor ---- */
.mr-vivo { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 14px; height: 46px; padding: 0 14px; background: rgba(15,23,42,.9); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .6px; box-shadow: 0 6px 20px rgba(0,0,0,.28); cursor: pointer; flex: none; }
.mr-vivo i { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.7); animation: mrLive 1.6s infinite; }
.mr-vivo.off i { background: #f59e0b; animation: none; }
@keyframes mrLive { 70% { box-shadow: 0 0 0 9px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.mr-resumen.min { width: auto; }
.mr-resumen-t { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; }
.mr-actividad { position: absolute; z-index: 630; top: 70px; right: 12px; width: min(340px, 92%); max-height: calc(100% - 150px); overflow-y: auto; overflow-x: hidden; background: rgba(15,23,42,.95); color: #fff; border-radius: 16px; padding: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.5); }
.mr-actividad-t { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 8px; }
.mr-actividad-t button { background: none; border: 0; color: #cbd5e1; font-size: 22px; cursor: pointer; }
.mr-actividad-vacio { color: var(--o-faint,#94a3b8); font-size: 13px; padding: 8px; }
.mr-act { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0; border-radius: 10px; padding: 8px 6px; color: inherit; cursor: pointer; }
.mr-act:hover { background: rgba(255,255,255,.08); }
.mr-act-i { width: 30px; height: 30px; border-radius: 9px; display: grid; place-content: center; font-weight: 800; flex: none; }
.mr-act-i.in { background: rgba(34,197,94,.25); color: #4ade80; } .mr-act-i.out { background: rgba(239,68,68,.25); color: #f87171; } .mr-act-i.mv { background: rgba(59,130,246,.25); color: #93c5fd; }
.mr-act-t { display: flex; flex-direction: column; font-size: 13px; line-height: 1.3; min-width: 0; }
.mr-act-t em { font-style: normal; color: #cbd5e1; } .mr-act-t small { color: var(--o-faint,#94a3b8); }
.mr-banner { position: absolute; z-index: 645; left: 50%; transform: translateX(-50%); top: 70px; display: flex; align-items: center; gap: 12px; background: #7c3aed; color: #fff; padding: 10px 16px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: 94%; }
.mr-banner button { background: rgba(255,255,255,.2); border: 0; color: #fff; border-radius: 10px; padding: 5px 12px; font-weight: 700; cursor: pointer; }
.mr-tarjeta.ok { border: 3px solid #22c55e; }
.mr-flecha.ok { background: #16a34a; font-size: 30px; }
.mr-editor { position: absolute; z-index: 650; left: 12px; bottom: 12px; width: min(460px, calc(100% - 24px)); max-height: calc(100% - 90px); overflow-y: auto; background: var(--o-surface,#fff); border-radius: 18px; padding: 14px 16px; box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.mr-editor-cab { display: flex; justify-content: space-between; align-items: center; font-size: 16px; margin-bottom: 6px; }
.mr-editor-cab .mr-cerrar { position: static; }
.mr-editor-txt { font-size: 13px; color: var(--o-muted,#475569); margin: 6px 0 10px; line-height: 1.45; }
.mr-editor-sub { font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--o-muted,#64748b); margin: 12px 0 6px; }
.mr-editor-fila { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: stretch; }
.mr-calle-sel { display: flex; gap: 6px; flex: 1; min-width: 220px; } .mr-calle-sel .form-input { flex: 1; min-width: 0; }
.mr-big, .mr-sec, .mr-ok, .mr-peligro, .mr-herr button { border: 1px solid var(--o-border-strong,#cbd5e1); background: var(--o-surface-2,#f8fafc); border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: 13.5px; cursor: pointer; color: var(--o-text,#0f172a); }
.mr-big.on, .mr-herr button.on { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.mr-ok { background: #16a34a; border-color: #16a34a; color: #fff; flex: 1; } .mr-ok:disabled, .mr-big:disabled { opacity: .55; cursor: default; }
.mr-peligro { background: var(--o-surface,#fff); color: var(--o-bad,#b91c1c); border-color: var(--o-bad-b,#fecaca); }
.mr-herr { display: flex; flex-wrap: wrap; gap: 6px; } .mr-herr button { padding: 8px 12px; font-size: 13px; }
.mr-sliders { display: grid; gap: 8px; margin-top: 12px; }
.mr-sliders label { display: grid; gap: 3px; font-size: 12.5px; color: var(--o-muted,#475569); } .mr-sliders label b { color: var(--o-text,#0f172a); margin-left: 6px; }
.mr-sliders input[type=range] { width: 100%; accent-color: #7c3aed; }
.mr-medidas { display: flex; gap: 10px; } .mr-medidas label { flex: 1; } .mr-medidas .form-input { height: 38px; }
@media (max-width: 700px) {
  .mr-editor { left: 6px; right: 6px; width: auto; bottom: 6px; max-height: 62%; }
  .mr-vivo span { display: none; }
  .mr-actividad { top: 66px; right: 6px; }
}

.mr-tabs { display: flex; gap: 4px; margin: 4px 0 10px; border-bottom: 1px solid var(--o-border,#e2e8f0); }
.mr-tabs button { flex: 1; border: 0; background: none; padding: 8px 4px; font-weight: 700; font-size: 12.5px; color: var(--o-muted,#64748b); border-bottom: 3px solid transparent; cursor: pointer; }
.mr-tabs button.on { color: var(--o-purple,#7c3aed); border-bottom-color: #7c3aed; }
.mr-min { float: right; background: var(--o-surface-3,#f1f5f9); border: 0; border-radius: 8px; padding: 3px 9px; font-size: 12px; font-weight: 700; cursor: pointer; }
.mr-slider { display: grid; gap: 3px; font-size: 12.5px; color: var(--o-muted,#475569); margin-top: 8px; } .mr-slider b { color: var(--o-text,#0f172a); margin-left: 6px; } .mr-slider input { width: 100%; accent-color: #7c3aed; }
.mr-sliders2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; } .mr-sliders2 .mr-medidas { grid-column: 1 / -1; }
.mr-editor { max-height: 46%; padding: 10px 14px; }
@media (max-width: 700px) { .mr-editor { max-height: 52%; } .mr-sliders2 { grid-template-columns: 1fr; } }

.mr-acciones { flex-wrap: wrap; }
.mr-acciones button { flex: 1 1 auto; min-width: 0; white-space: nowrap; padding-left: 12px; padding-right: 12px; }
.mr-tarjeta { max-height: 60%; overflow-y: auto; }
.mr-editor-fila > button { flex: 1 1 auto; }

/* ---- Mapa vivo: cabecera tipo cuadro de mando ---- */
.mv-head { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: stretch; justify-content: space-between; background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 16px; padding: 12px 16px; }
.mv-head-l { display: flex; flex-direction: column; gap: 8px; justify-content: center; min-width: 190px; }
.mv-title { font-weight: 800; letter-spacing: .6px; font-size: 14px; color: var(--o-text); }
.mv-stats { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0; }
.mv-stat { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; padding: 2px 20px; border-left: 1px solid var(--o-border); text-align: center; }
.mv-stat small { font-size: 11px; letter-spacing: .5px; font-weight: 700; color: var(--o-muted,#64748b); }
.mv-stat b { font-size: 28px; line-height: 1; color: var(--o-text-2,#1e293b); font-weight: 800; }
.mv-stat b.azul { color: #1f5ea8; } .mv-stat b.sal { color: var(--o-purple,#7c3aed); }
.mv-ring-box { border-left: 0; }
.mv-ring { --p: 0; width: 54px; height: 54px; border-radius: 50%; background: conic-gradient(#1f5ea8 calc(var(--p) * 1%), #dbe4ee 0); display: grid; place-content: center; position: relative; }
.mv-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--o-surface,#fff); }
.mv-ring span { position: relative; font-weight: 800; font-size: 14px; color: var(--o-text-2,#1e293b); }
.mv-leyenda { border: 1px solid var(--o-border); border-radius: 12px; padding: 8px 14px; min-width: 210px; background: var(--o-surface,#fff); }
.mv-leyenda-t { font-size: 11px; letter-spacing: .6px; font-weight: 800; color: var(--o-muted,#64748b); margin-bottom: 5px; }
.mv-leyenda-g { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 16px; font-size: 12.5px; color: var(--o-text-2); }
.mv-leyenda-g span { display: inline-flex; align-items: center; gap: 7px; } .mv-leyenda-g i { width: 13px; height: 13px; border-radius: 4px; display: inline-block; }
@media (max-width: 800px) { .mv-stat { padding: 2px 12px; } .mv-stat b { font-size: 22px; } .mv-leyenda { width: 100%; } }

/* ---- Mapa vivo: buscador y leyenda dentro del mapa, zoom abajo a la derecha ---- */
.mv-ov-search { position: absolute; z-index: 25; top: 12px; left: 12px; width: min(340px, calc(100% - 24px)); }
.mv-ov-search .form-input { width: 100%; min-width: 0; background: var(--o-surface,#fff); box-shadow: 0 4px 14px rgba(15,23,42,.12); }
.mv-ov-leyenda { position: absolute; z-index: 22; top: 12px; right: 12px; box-shadow: 0 4px 14px rgba(15,23,42,.12); min-width: 230px; }
.mv-hud { top: auto; bottom: 14px; right: 14px; }
.mv-hud button { width: 38px; height: 38px; font-size: 18px; }
.mv-bar { margin-top: -2px; }
.mv-stage { background: var(--o-info-bg,#f4f7fb); }
@media (max-width: 800px) { .mv-ov-leyenda { display: none; } .mv-ov-search { width: calc(100% - 24px); } }
.mv-hud { max-height: calc(100% - 28px); flex-wrap: wrap-reverse; align-content: flex-end; justify-content: flex-end; }

/* ---- Registrar llave: sugerencias de coches sin llave ---- */
.key-vin { position: relative; }
.key-vin-list { position: absolute; z-index: 40; top: 100%; left: 0; right: 0; margin-top: 4px; background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 12px; box-shadow: 0 14px 40px rgba(15,23,42,.18); max-height: 260px; overflow-y: auto; }
.key-vin-item { display: grid; width: 100%; text-align: left; padding: 9px 14px; border: 0; background: var(--o-surface,#fff); cursor: pointer; border-bottom: 1px solid var(--o-border,#f1f5f9); }
.key-vin-item:hover { background: var(--o-surface-3,#f1f5f9); } .key-vin-item span { font-size: 12px; color: var(--o-muted,#64748b); }
.key-vin-empty { padding: 10px 14px; font-size: 13px; color: var(--o-muted,#64748b); }

.mr-llave-aviso { display: flex; gap: 10px; align-items: flex-start; background: var(--o-warn-bg,#fff7ed); border: 1px solid var(--o-warn-b,#fdba74); border-radius: 12px; padding: 10px 12px; margin: 8px 0; font-size: 13.5px; color: #7c2d12; cursor: pointer; }
.mr-llave-aviso input { margin-top: 3px; width: 18px; height: 18px; accent-color: #ea580c; flex: none; }
/* la ficha de la plaza queda por encima del buscador, la leyenda y los botones */
.mv-ov-search, .mv-ov-leyenda, .mv-hud { z-index: 12; }
.mv-panel { z-index: 30; }

/* ---- Editor: diseno de calle ---- */
.mr-diseno { background: var(--o-purple-bg,#f5f3ff); border-color: #c4b5fd; color: var(--o-purple,#5b21b6); }
.mr-filas { display: grid; gap: 4px; max-height: 240px; overflow-y: auto; padding-right: 4px; }
.mr-fila { display: grid; grid-template-columns: 54px 62px 48px 78px 54px 34px 34px 62px 40px; gap: 4px; align-items: center; font-size: 12.5px; }
.mr-fila-cab { font-size: 11px; font-weight: 800; color: var(--o-muted,#64748b); letter-spacing: .3px; position: sticky; top: 0; background: var(--o-surface,#fff); z-index: 1; }
.mr-fila select, .mr-fila input[type=number] { width: 100%; height: 30px; border: 1px solid var(--o-border-strong,#cbd5e1); border-radius: 8px; padding: 0 4px; background: var(--o-surface,#fff); font-size: 12.5px; }
.mr-fila input[type=checkbox] { width: 18px; height: 18px; accent-color: #7c3aed; justify-self: center; }
.mr-fila small { color: var(--o-faint,#94a3b8); }
@media (max-width: 700px) { .mr-fila { grid-template-columns: 44px 54px 42px 70px 48px 28px 28px 54px 34px; gap: 3px; font-size: 11.5px; } }

.mr-calle-select { width: 100%; height: 42px; margin-top: 2px; }
.mr-editor-fila .mr-big { flex: 1 1 140px; }

/* ---- Editor: movible, redimensionable y bloqueo de plazas ---- */
.mr-editor { resize: both; overflow: auto; min-width: 340px; min-height: 150px; }
.mr-editor-cab { user-select: none; }
.mr-filas { overflow-x: auto; }
.mr-fila { min-width: 500px; }
.mr-marcar .form-input { height: 38px; }
.mr-marcar-n { margin: 8px 0; font-size: 14px; color: var(--o-muted,#475569); } .mr-marcar-n b { font-size: 20px; color: #ea580c; }
.mr-tabs button { font-size: 12px; padding: 8px 2px; }

/* ---- Editor: secciones (zonas, calles, plazas) ---- */
.mr-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.mr-menu button { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left; border: 1px solid var(--o-border-strong,#cbd5e1); background: var(--o-surface-2,#f8fafc); border-radius: 14px; padding: 12px; cursor: pointer; }
.mr-menu button b { grid-row: 1 / 3; width: 34px; height: 34px; display: grid; place-content: center; border-radius: 10px; background: var(--o-purple-bg,#ede9fe); color: var(--o-purple,#6d28d9); font-size: 18px; }
.mr-menu button span { font-weight: 800; font-size: 14.5px; color: var(--o-text,#0f172a); }
.mr-menu button small { font-size: 11.5px; color: var(--o-muted,#64748b); line-height: 1.25; }
.mr-sec-cab { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.mr-atras { border: 0; background: var(--o-surface-3,#f1f5f9); border-radius: 9px; padding: 5px 11px; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.mr-zonas { display: grid; gap: 6px; max-height: 260px; overflow-y: auto; }
.mr-zona-fila { display: grid; grid-template-columns: 14px 1fr 34px 34px 34px; gap: 8px; align-items: center; border: 1px solid var(--o-border,#e2e8f0); border-radius: 12px; padding: 8px 10px; }
.mr-zona-fila i { width: 14px; height: 36px; border-radius: 5px; display: block; }
.mr-zona-t { display: grid; min-width: 0; } .mr-zona-t b { font-size: 13.5px; } .mr-zona-t small { font-size: 11.5px; color: var(--o-muted,#64748b); }
.mr-zona-fila button { width: 34px; height: 34px; border: 1px solid var(--o-border-strong,#cbd5e1); background: var(--o-surface,#fff); border-radius: 9px; cursor: pointer; font-size: 15px; }
.mr-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin-top: 6px; }
.mr-form label { display: grid; gap: 3px; font-size: 12.5px; color: var(--o-muted,#475569); font-weight: 600; } .mr-form label small { font-weight: 400; color: var(--o-faint,#94a3b8); }
.mr-form .form-input { height: 38px; } .mr-form input[type=color] { padding: 2px 4px; }
.mr-checks { display: grid; gap: 5px; margin-top: 10px; font-size: 13px; color: var(--o-text-2,#334155); } .mr-checks label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.mr-checks input { width: 17px; height: 17px; accent-color: #7c3aed; }
@media (max-width: 700px) { .mr-form { grid-template-columns: 1fr; } .mr-menu { grid-template-columns: 1fr; } }

/* ---- Bloque por esquinas: capacidad ---- */
.mr-cap { display: grid; grid-template-columns: 44px 54px 70px 54px 1fr; gap: 6px; align-items: center; font-size: 12.5px; padding: 4px 6px; border-radius: 8px; min-width: 360px; }
.mr-cap-cab { font-size: 11px; font-weight: 800; color: var(--o-muted,#64748b); position: sticky; top: 0; background: var(--o-surface,#fff); z-index: 1; }
.mr-cap.mal { background: var(--o-warn-bg,#fff7ed); color: var(--o-warn,#9a3412); }
.mr-aviso-inline { margin: 6px 0; padding: 7px 10px; background: var(--o-purple-bg,#f5f3ff); border: 1px solid #c4b5fd; color: var(--o-purple,#5b21b6); border-radius: 10px; font-size: 13px; font-weight: 600; }

/* ---- Etiquetas del mapa: zonas desplegables con sus calles ---- */
.mr-resumen { max-height: calc(100% - 100px); overflow-y: auto; }
.mr-etq { margin-top: 10px; border-top: 1px solid rgba(255,255,255,.15); padding-top: 8px; }
.mr-etq-cab { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; margin-bottom: 6px; }
.mr-etq-cab b { margin-right: auto; font-size: 12px; letter-spacing: .3px; color: #e2e8f0; }
.mr-etq-cab button { border: 1px solid rgba(255,255,255,.35); background: transparent; color: #cbd5e1; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 700; cursor: pointer; }
.mr-etq-cab button.on { background: var(--o-surface,#fff); color: var(--o-text,#0f172a); border-color: var(--o-border,#fff); }
.mr-zl-lista { display: grid; gap: 3px; max-height: 280px; overflow-y: auto; }
.mr-zl-fila { display: grid; grid-template-columns: 22px 10px 1fr; gap: 6px; align-items: center; }
.mr-zl-fila i { width: 10px; height: 28px; border-radius: 4px; display: block; }
.mr-zl-chev { border: 0; background: transparent; color: #cbd5e1; font-size: 13px; cursor: pointer; padding: 2px; }
.mr-zl-nom { display: grid; text-align: left; border: 0; background: transparent; color: #fff; cursor: pointer; padding: 3px 4px; border-radius: 8px; }
.mr-zl-nom:hover, .mr-cl:hover { background: rgba(255,255,255,.1); }
.mr-zl-nom b { font-size: 12.5px; } .mr-zl-nom small, .mr-cl small { font-size: 11px; color: var(--o-faint,#94a3b8); }
.mr-cl { display: flex; justify-content: space-between; align-items: center; width: calc(100% - 38px); margin-left: 38px; border: 0; background: transparent; color: #e2e8f0; font-size: 12px; cursor: pointer; padding: 3px 6px; border-radius: 8px; text-align: left; }

/* ---- Pantalla completa (Mapa real y Mapa vivo) ---- */
.mr-page.pc { position: fixed; inset: 0; z-index: 900; height: 100vh; min-height: 0; margin: 0; border-radius: 0; }
.mv-page.pc { position: fixed; inset: 0; z-index: 900; background: var(--o-surface-3,#eef2f7); padding: 10px; overflow: hidden; }
.mv-page.pc .mv-head { display: none; }
.mv-page.pc .mv-stage { flex: 1; height: auto; min-height: 0; }

/* ---- Filtro por cliente en listados ---- */
.cliente-filtro { position: relative; display: inline-block; min-width: 230px; }
.cliente-filtro .input-sm { width: 100%; padding-right: 26px; }
.cf-x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; font-size: 18px; line-height: 1; color: var(--o-muted,#64748b); cursor: pointer; padding: 0 4px; }

/* ---- Mapa vivo: alcance (todas las zonas / una zona), calles y resaltado ---- */
.mv-alcance { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--o-text-2); font-weight: 600; }
.mv-link { border: 1px solid var(--o-border); background: var(--o-surface-2,#f8fafc); border-radius: 999px; padding: 3px 11px; font-size: 12px; font-weight: 700; color: var(--o-text); cursor: pointer; }
.mv-link:hover { background: var(--o-info-bg,#eef2ff); }
.mv-filtros { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 12px; padding: 3px 4px 3px 10px; }
.mv-filtros > span { font-size: 11px; font-weight: 800; letter-spacing: .5px; color: var(--o-muted,#64748b); margin-right: 4px; text-transform: uppercase; }
.mv-filtro { border: 0; background: transparent; padding: 6px 10px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--o-text-2); cursor: pointer; }
.mv-filtro:hover { background: var(--o-surface-3,#f1f5f9); }
.mv-filtro.on { background: #0f172a; color: #fff; }

.mv-ov-top { position: absolute; z-index: 25; top: 12px; left: 12px; right: 300px; display: grid; gap: 8px; pointer-events: none; }
.mv-ov-top > * { pointer-events: auto; }
.mv-toprow { display: flex; align-items: flex-start; gap: 10px; min-width: 0; pointer-events: none; }
.mv-toprow > * { pointer-events: auto; }
.mv-toprow .mv-ov-search { position: relative; top: auto; left: auto; flex: 0 0 300px; width: 300px; z-index: 26; }
.mv-zchips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; min-width: 0; flex: 1 1 auto; }
.mv-zchip { position: relative; flex: 0 0 auto; display: grid; grid-template-columns: auto; gap: 1px; text-align: left; min-width: 96px; padding: 7px 12px 10px; border-radius: 12px; border: 1.5px solid color-mix(in srgb, var(--zc) 55%, var(--o-border,#fff)); background: var(--o-glass,rgba(255,255,255,.96)); cursor: pointer; box-shadow: 0 3px 10px rgba(15,23,42,.10); overflow: hidden; }
.mv-zchip b { font-size: 14px; font-weight: 800; color: var(--zc); letter-spacing: .3px; }
.mv-zchip span { font-size: 11.5px; color: var(--o-muted,#475569); font-weight: 600; white-space: nowrap; }
.mv-zchip em { position: absolute; left: 0; bottom: 0; height: 4px; width: calc(var(--p) * 1%); background: var(--zc); }
.mv-zchip:hover { transform: translateY(-1px); }
.mv-zchip.on { background: var(--zc); border-color: var(--zc); }
.mv-zchip.on b, .mv-zchip.on span { color: #fff; }
.mv-zchip.on em { background: var(--o-glass,rgba(255,255,255,.75)); }
.mv-cchips { display: flex; gap: 5px; overflow-x: auto; padding: 1px 2px 4px; scrollbar-width: thin; }
.mv-cchip { flex: 0 0 auto; display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--o-border-strong,#cbd5e1); background: var(--o-glass,rgba(255,255,255,.95)); font-size: 12.5px; font-weight: 800; color: var(--o-text,#0f172a); cursor: pointer; box-shadow: 0 2px 6px rgba(15,23,42,.08); }
.mv-cchip small { font-size: 11px; font-weight: 600; color: var(--o-muted,#64748b); }
.mv-cchip:hover { background: var(--o-info-bg,#eef2ff); border-color: #6366f1; }
@media (max-width: 800px) {
    .mv-ov-top { right: 12px; }
    .mv-toprow { flex-direction: column; align-items: stretch; }
    .mv-toprow .mv-ov-search { flex: 0 0 auto; width: 100%; }
}
.mr-zl-fila { grid-template-columns: 22px 10px 1fr auto; }
.mr-zl-vivo { border: 1px solid rgba(255,255,255,.35); background: transparent; color: #cbd5e1; border-radius: 8px; width: 28px; height: 28px; cursor: pointer; font-size: 14px; }
.mr-zl-vivo:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ---- Ficha de plaza y atributos en bloque ---- */
.ficha-plaza { max-width: 560px; width: 94vw; max-height: 90vh; overflow-y: auto; }
.ficha-sub { color: var(--o-text-2); font-size: 13px; margin-bottom: 10px; }
.ficha-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.ficha-grid label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--o-muted,#475569); align-content: start; }
.ficha-grid label small { font-weight: 400; color: var(--o-faint,#94a3b8); }
.ficha-grid .ficha-ancho { grid-column: 1 / -1; }
.ficha-grid .form-input { height: 38px; } .ficha-grid textarea.form-input { height: auto; }
.ficha-cuenta { margin: 12px 0 6px; padding: 8px 12px; background: var(--o-surface-3,#f1f5f9); border-radius: 10px; font-size: 13.5px; }
.ficha-cuenta b { font-size: 17px; color: var(--o-info,#1d4ed8); }
.ficha-campos { display: grid; grid-template-columns: 190px 1fr; gap: 8px 12px; align-items: center; margin-top: 10px; }
.ficha-chk { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--o-text-2,#334155); cursor: pointer; }
.ficha-chk input { width: 17px; height: 17px; accent-color: #1d4ed8; }
.ficha-par { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ficha-campos .form-input { height: 36px; }
.ficha-off { opacity: .45; pointer-events: none; }
@media (max-width: 640px) { .ficha-grid { grid-template-columns: 1fr; } .ficha-campos { grid-template-columns: 1fr; } }

/* ---- Inventario y etiquetas ---- */
.inv-page { display: grid; gap: 14px; max-width: 1100px; }
.inv-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-end; }
.inv-campa { width: auto; min-width: 180px; }
.inv-tabs { display: inline-flex; gap: 4px; background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 12px; padding: 3px; width: fit-content; }
.inv-tabs button { border: 0; background: transparent; padding: 8px 16px; border-radius: 9px; font-weight: 700; font-size: 13.5px; color: var(--o-text-2); cursor: pointer; }
.inv-tabs button.on { background: var(--o-primary, #1b3a6b); color: #fff; }
.inv-card { background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 16px; padding: 16px 18px; display: grid; gap: 12px; }
.inv-card h2 { margin: 0; font-size: 16px; } .inv-card h3 { margin: 6px 0 0; font-size: 14px; }
.inv-fila { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.inv-fila label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--o-muted,#475569); min-width: 150px; }
.inv-fila-etq { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.inv-titulo { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.inv-acciones { display: flex; gap: 8px; }
.inv-tabla { max-height: 420px; overflow: auto; border: 1px solid var(--o-border,#e2e8f0); border-radius: 10px; }
.inv-tabla table { margin: 0; } .inv-tabla .mono { font-family: Consolas, monospace; font-size: 12px; }
.inv-nota { font-size: 12.5px; color: var(--o-muted,#64748b); } .inv-nota code { background: var(--o-surface-3,#f1f5f9); padding: 1px 6px; border-radius: 6px; }
.inv-lecturas { font-family: Consolas, monospace; font-size: 13px; }
.inv-error { color: var(--o-bad,#b91c1c); font-weight: 700; font-size: 13px; }
.inv-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.inv-kpis div { background: var(--o-surface-2,#f8fafc); border: 1px solid var(--o-border,#e2e8f0); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.inv-kpis span { font-size: 11.5px; font-weight: 700; color: var(--o-muted,#64748b); text-transform: uppercase; letter-spacing: .4px; }
.inv-kpis b { font-size: 24px; color: var(--o-text,#0f172a); }
.inv-kpis .ok b { color: var(--o-ok,#15803d); } .inv-kpis .warn { background: var(--o-warn-bg,#fffbeb); border-color: var(--o-warn-b,#fcd34d); } .inv-kpis .warn b { color: var(--o-warn,#b45309); } .inv-kpis .bad { background: var(--o-bad-bg,#fef2f2); border-color: var(--o-bad-b,#fca5a5); } .inv-kpis .bad b { color: var(--o-bad,#b91c1c); }
.inv-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 280px; overflow: auto; }
.inv-lista li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 6px 10px; border-radius: 8px; font-size: 13px; }
.inv-lista.warn li { background: var(--o-warn-bg,#fffbeb); } .inv-lista.bad li { background: var(--o-bad-bg,#fef2f2); } .inv-lista span { color: var(--o-muted,#64748b); }
.inv-todo-ok { padding: 14px; border-radius: 12px; background: var(--o-ok-bg,#ecfdf5); color: var(--o-ok,#047857); font-weight: 800; text-align: center; }
.inv-chk { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.inv-cuenta { font-size: 14px; } .inv-cuenta b { font-size: 20px; color: var(--o-info,#1d4ed8); }

/* ---- Zonas: ayuda bajo cada desplegable y estado de cada regla ---- */
.mr-ayuda-sel, .zone-ayuda { display: block; font-size: 11.5px; font-weight: 500; line-height: 1.35; color: var(--o-muted,#475569); background: var(--o-surface-3,#f1f5f9); border-radius: 8px; padding: 6px 9px; }
.mr-ayuda-sel.info, .zone-ayuda.info { background: var(--o-warn-bg,#fff7ed); color: var(--o-warn,#9a3412); }
em.mr-act, em.mr-inf { font-style: normal; font-size: 10.5px; font-weight: 800; border-radius: 999px; padding: 1px 8px; margin-left: 6px; white-space: nowrap; }
em.mr-act { background: var(--o-ok-bg,#dcfce7); color: var(--o-ok,#15803d); } em.mr-inf { background: var(--o-surface-3,#f1f5f9); color: var(--o-muted,#64748b); }

/* ---- Aviso de accesibilidad y salida de cargas completas ---- */
.aviso-acc-msg { white-space: pre-line; font-size: 15px; line-height: 1.5; color: var(--o-text,#0f172a); background: var(--o-warn-bg,#fffbeb); border: 1px solid var(--o-warn-b,#fcd34d); border-radius: 12px; padding: 12px 14px; margin: 4px 0 8px; }

/* ---- Salida de cargas completas ---- */
.carga-modal { max-height: 92vh; overflow-y: auto; }
.carga-sub, .carga-meta { font-size: 12.5px; color: var(--o-muted,#64748b); }
.carga-meta { display: block; }
.carga-lista { display: grid; gap: 10px; margin-top: 8px; }
.carga-card { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; border: 1px solid var(--o-border,#e2e8f0); border-radius: 12px; padding: 12px 14px; background: var(--o-surface,#fff); }
.carga-card strong { font-size: 15px; display: block; }
.carga-acciones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.carga-chips { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.carga-chips em { font-style: normal; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 9px; }
.chip-res { background: var(--o-purple-bg,#ede9fe); color: var(--o-purple,#6d28d9); } .chip-ocu { background: var(--o-info-bg,#e0f2fe); color: var(--o-info,#0369a1); } .chip-vacia { background: var(--o-surface-3,#f1f5f9); color: var(--o-muted,#64748b); } .chip-key { background: var(--o-warn-bg,#fef3c7); color: var(--o-warn,#92400e); }
.carga-cab { display: grid; gap: 2px; margin-bottom: 6px; }
.carga-h { margin: 12px 0 6px; font-size: 14px; } .carga-h-mal { color: var(--o-bad,#b91c1c); }
.carga-tabla { display: grid; gap: 4px; max-height: 240px; overflow-y: auto; }
.carga-fila { display: grid; grid-template-columns: 32px minmax(110px, 1.2fr) 1.2fr 100px 1fr; gap: 8px; align-items: center; background: var(--o-surface-2,#f8fafc); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.carga-fila-mal { grid-template-columns: minmax(110px, 1fr) 100px 2fr auto; background: var(--o-bad-bg,#fef2f2); }
.carga-motivo { color: var(--o-bad,#b91c1c); font-size: 12.5px; }
.carga-parcial { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; background: var(--o-warn-bg,#fff7ed); border: 1px solid var(--o-warn-b,#fdba74); border-radius: 10px; padding: 8px 10px; margin-top: 8px; }
.carga-form { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.alert-warn { background: var(--o-warn-bg,#fffbeb); border: 1px solid var(--o-warn-b,#fcd34d); color: var(--o-warn,#92400e); border-radius: 10px; padding: 10px 12px; margin: 6px 0; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@media (max-width: 720px) { .carga-form { grid-template-columns: 1fr; } .carga-fila, .carga-fila-mal { grid-template-columns: 1fr; } }
.mr-carga { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--o-muted,#475569); background: var(--o-purple-bg,#f5f3ff); border: 1px solid var(--o-border,#ddd6fe); border-radius: 10px; padding: 7px 10px; margin: 6px 0; }
.modo-entrada-opciones { display: flex; flex-wrap: wrap; gap: 14px; }
.modo-entrada-opciones label { display: flex; gap: 6px; align-items: center; font-weight: 600; font-size: 13px; }
.field-hint { color: var(--o-warn,#b45309); font-size: 12px; }

/* ---- Mapa vivo: desplegable de zonas (varias a la vez) y menu de botones centrado ---- */
.mv-zsel { position: relative; flex: 0 0 auto; }
.mv-zbtn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--o-border); background: var(--o-surface,#fff); border-radius: 12px; cursor: pointer; box-shadow: 0 4px 14px rgba(15,23,42,.12); font-size: 13px; color: var(--o-text-2); }
.mv-zbtn b { color: var(--o-text); font-weight: 800; }
.mv-zbtn i { font-style: normal; font-size: 11px; transition: transform .15s; } .mv-zbtn.open i { transform: rotate(180deg); }
.mv-zmenu-fondo { position: fixed; inset: 0; z-index: 38; }
.mv-zmenu { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: min(380px, 86vw); max-height: min(60vh, 420px); overflow-y: auto; background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 14px; box-shadow: 0 18px 44px rgba(15,23,42,.22); padding: 6px; }
.mv-zmenu-cab { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 8px; font-size: 12px; font-weight: 700; color: var(--o-muted,#64748b); border-bottom: 1px solid var(--o-border,#f1f5f9); margin-bottom: 4px; }
.mv-zmenu-cab button, .mv-zsolo { border: 1px solid var(--o-border-strong,#cbd5e1); background: var(--o-surface-2,#f8fafc); border-radius: 999px; font-size: 11.5px; font-weight: 700; padding: 3px 11px; cursor: pointer; color: var(--o-text-2,#334155); }
.mv-zrow { display: flex; align-items: center; gap: 6px; border-radius: 10px; padding: 2px 4px; }
.mv-zrow:hover { background: var(--o-surface-3,#f1f5f9); } .mv-zrow.on { background: var(--o-surface-2,#f8fafc); }
.mv-zrow label { flex: 1; display: grid; grid-template-columns: 20px 12px 1fr auto; align-items: center; gap: 8px; padding: 7px 4px; cursor: pointer; min-width: 0; }
.mv-zrow input { width: 17px; height: 17px; accent-color: #1d4ed8; }
.mv-zdot { width: 12px; height: 12px; border-radius: 4px; display: block; }
.mv-znom { font-size: 13.5px; color: var(--o-text,#0f172a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mv-znom b { margin-right: 4px; }
.mv-zinfo { font-size: 11.5px; color: var(--o-muted,#64748b); white-space: nowrap; }
/* los botones de zoom, pantalla completa, mi posicion... van a la derecha, centrados en vertical */
.mv-stage .mv-hud { top: 50%; bottom: auto; transform: translateY(-50%); }
.mv-stage .mv-hud .mv-hud-sep { margin-top: 10px; }

.mv-tag-carga { background: var(--o-purple-bg,#ede9fe); color: var(--o-purple,#5b21b6); }

/* ---- iconos del menu: Mapa campa (chincheta sobre el plano), Mapa vivo (pulso en directo), Inventario ---- */
.sidebar a.nav-item[href="/mapa-campa"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-6.5-5.6-6.5-11A6.5 6.5 0 0 1 12 3.5 6.5 6.5 0 0 1 18.5 10c0 5.4-6.5 11-6.5 11z'/%3E%3Ccircle cx='12' cy='10' r='2.4'/%3E%3Cpath d='M4 21h16'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/mapa-vivo"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h4l2.5-6 4 12 2.5-6H21'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/inventario-campa"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='m8 12 2.5 2.5L16 9'/%3E%3Cpath d='M8 18h5'/%3E%3C/svg%3E")}

/* ---- Reubicar con escaneo ---- */
.rb-page { display: grid; gap: 14px; max-width: 1000px; }
.rb-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-end; }
.rb-campa { width: auto; min-width: 180px; }
.rb-cols { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: start; }
.rb-card { background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 16px; padding: 16px 18px; display: grid; gap: 10px; }
.rb-titulo { display: flex; align-items: center; gap: 12px; }
.rb-titulo strong { display: block; font-size: 15px; } .rb-titulo small { color: var(--o-muted,#64748b); font-size: 12px; }
.rb-ico { font-size: 22px; font-weight: 300; letter-spacing: .02em; color: var(--o-text,#0f172a); }
.rb-div { text-align: center; font-size: 12px; color: var(--o-faint,#94a3b8); }
.rb-flecha { align-self: center; font-size: 28px; color: var(--o-faint,#94a3b8); }
.rb-match { border-radius: 12px; padding: 9px 12px; display: grid; gap: 2px; font-size: 13px; background: var(--o-surface-3,#f1f5f9); color: var(--o-muted,#475569); }
.rb-match span { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.rb-match.ok { background: var(--o-ok-bg,#ecfdf5); color: var(--o-ok,#065f46); } .rb-match.warn { background: var(--o-warn-bg,#fff7ed); color: var(--o-warn,#9a3412); }
.rb-accion { display: grid; gap: 10px; }
.rb-resultado { border-radius: 12px; padding: 10px 14px; font-weight: 700; } .rb-resultado.ok { background: var(--o-ok-bg,#dcfce7); color: var(--o-ok,#166534); } .rb-resultado.error { background: var(--o-bad-bg,#fee2e2); color: var(--o-bad,#991b1b); }
.rb-diff { border-radius: 12px; padding: 10px 14px; display: grid; gap: 2px; font-size: 13.5px; }
.rb-diff.match { background: var(--o-ok-bg,#ecfdf5); color: var(--o-ok,#065f46); } .rb-diff.mismatch { background: var(--o-warn-bg,#fffbeb); color: var(--o-warn,#92400e); border: 1px solid var(--o-warn-b,#fcd34d); }
.rb-confirmar { height: 48px; font-size: 15px; }
@media (max-width: 760px) { .rb-cols { grid-template-columns: 1fr; } .rb-flecha { display: none; } }

.mv-prev { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.mv-prev select { max-width: 320px; padding: 4px 8px; }
.mv-prevlista { display:flex; flex-wrap:wrap; gap:6px; max-height:92px; overflow:auto; padding:4px 0; }
.mv-prevlista .mv-filtro b { background:#7c3aed; color:#fff; border-radius:999px; padding:0 6px; margin-right:4px; }

.lang-sel { border:1px solid var(--border, var(--o-info-b,#d8dee9)); border-radius:8px; background:transparent; color:inherit; font-weight:700; font-size:12px; padding:4px 6px; cursor:pointer; }
.mm-ext-modelo { color:var(--o-muted,#475569); font-size:.92em; }

.mr-prev-n { background:#7c3aed; color:#fff; border:2.5px solid var(--o-border,#fff); border-radius:50%; font:800 13px Inter,system-ui,sans-serif; display:flex; align-items:center; justify-content:center; box-shadow:0 3px 10px rgba(0,0,0,.5); }
.mr-prev-panel { position:absolute; left:12px; bottom:70px; z-index:1100; width:min(340px, calc(100% - 24px)); background:var(--surface, var(--o-surface,#fff)); color:var(--text, var(--o-text,#0f172a)); border-radius:14px; box-shadow:0 10px 30px rgba(0,0,0,.35); padding:10px 12px; }
.mr-prev-panel select { width:100%; }
.mr-prev-lista { display:flex; flex-direction:column; gap:4px; max-height:180px; overflow:auto; margin-top:8px; }
.mr-prev-lista button { text-align:left; border:1px solid var(--o-info-b,#d8dee9); border-radius:8px; background:transparent; padding:4px 8px; cursor:pointer; color:inherit; }
.mr-prev-lista button b { background:#7c3aed; color:#fff; border-radius:999px; padding:0 7px; margin-right:6px; }

/* iconos de linea de los mapas, los mismos trazos que el menu principal */
.mv-ico { display:inline-block; width:15px; height:15px; margin-right:5px; vertical-align:-3px; background:currentColor; -webkit-mask:var(--ico) center/contain no-repeat; mask:var(--ico) center/contain no-repeat; }
.mv-ico-pin { --ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-6.5-5.6-6.5-11A6.5 6.5 0 0 1 12 3.5 6.5 6.5 0 0 1 18.5 10c0 5.4-6.5 11-6.5 11z'/%3E%3Ccircle cx='12' cy='10' r='2.4'/%3E%3Cpath d='M4 21h16'/%3E%3C/svg%3E"); color:var(--o-info,#1e40af); }
.mv-search-ico { position:absolute; left:14px; top:50%; width:17px; height:17px; transform:translateY(-50%); background:#64748b; pointer-events:none; z-index:1;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4.5 4.5'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4.5 4.5'/%3E%3C/svg%3E") center/contain no-repeat; }
.mv-search .form-input { padding-left: 40px; }
.mr-actividad .mr-act { box-sizing: border-box; background: none; color: inherit; border-radius: 10px; margin: 0; padding: 8px 6px; font-size: 13px; font-weight: 400; white-space: normal; }

.mr-zona-off { opacity: .75; }

/* Los mapas (Leaflet y paneles flotantes con z-index altos) no deben quedar por encima del menu lateral en movil:
   cada mapa crea su propio contexto de apilado y sus z-index se quedan dentro. */
.mr-page, .mv-page, .mv-stage { isolation: isolate; }

/* Logo de la empresa con el menu plegado (escritorio): se ve entero, ajustado al ancho, en vez de recortado por la izquierda */
.sidebar-collapsed .sidebar .app-logo-sidebar { width: 100%; height: auto; max-height: 40px; display: flex; justify-content: center; overflow: hidden; }
.sidebar-collapsed .sidebar .app-logo-sidebar .app-logo-compact { width: 100%; max-width: 54px; height: auto; max-height: 40px; object-fit: contain; object-position: center; }

/* En movil el menu es un cajon: aunque este "plegado" en escritorio, se ve desplegado y completo */
@media (max-width: 1024px) {
  .sidebar-collapsed .sidebar { width: min(330px, 88vw) !important; }
  .sidebar-collapsed .sidebar-brand { padding: 16px 16px 6px !important; align-items: flex-start !important; }
  .sidebar-collapsed .sidebar-date, .sidebar-collapsed .user-card .user-meta { display: block !important; }
  .sidebar-collapsed .sidebar .nav-item { margin: 2px 10px !important; justify-content: flex-start !important; padding: 10px 14px !important; gap: 10px !important; }
  .sidebar-collapsed .sidebar .nav-item .nav-text, .sidebar-collapsed .sidebar .nav-group > summary .nav-text { display: inline !important; }
  .sidebar-collapsed .sidebar .nav-group > summary { justify-content: flex-start !important; padding: 10px 14px !important; }
  .sidebar-collapsed .sidebar .nav-quick, .sidebar-collapsed .sidebar .nav-groups { padding-left: 4px !important; padding-right: 4px !important; }
  .sidebar-collapsed .user-card { justify-content: flex-start !important; flex-wrap: nowrap !important; }
  .sidebar-collapsed .sidebar .app-logo-sidebar { width: auto !important; height: auto !important; max-height: none !important; display: flex !important; justify-content: flex-start !important; }
  .sidebar-collapsed .sidebar .app-logo-sidebar .app-logo-full { display: block !important; max-height: 44px; max-width: 190px; }
  .sidebar-collapsed .sidebar .app-logo-sidebar .app-logo-compact { display: none !important; }
  .sidebar .sidebar-toggle { display: none !important; }       /* en movil el menu siempre va completo: el boton de plegar no hace nada */
}

/* Dashboard en pantallas estrechas: el tema fija 2 columnas en .smart-hero y pisaba la regla de la pagina que la pasa a una sola */
@media (max-width: 1100px) {
  .page-body .smart-hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .page-body .smart-hero { padding: 18px 16px; gap: 14px; }
  .page-body .smart-hero h2 { font-size: 22px; }
}

/* ---- Mapa vivo en movil: resumen plegable, controles que se desplazan dentro de su caja y mas sitio para el mapa ---- */
.mv-toggle-resumen { display: none; }
.mv-ring-mini { --p: 0; width: 24px; height: 24px; border-radius: 50%; flex: none; background: conic-gradient(#1f5ea8 calc(var(--p) * 1%), #dbe4ee 0); position: relative; }
.mv-ring-mini::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--o-surface-2,#f8fafc); }
@media (max-width: 760px) {
  .mv-page { max-width: 100%; min-width: 0; overflow-x: clip; }
  .mv-head { padding: 10px 12px; gap: 8px; flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .mv-head-l { min-width: 0; width: 100%; gap: 6px; }
  .mv-toggle-resumen { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid var(--o-border); background: var(--o-surface-2,#f8fafc); border-radius: 12px; padding: 8px 12px; font-size: 13px; color: var(--o-text-2); cursor: pointer; text-align: left; }
  .mv-toggle-resumen b { color: var(--o-text); font-weight: 800; }
  .mv-toggle-txt { flex: 1 1 auto; min-width: 0; }
  .mv-caret { color: var(--o-muted,#64748b); }
  .mv-head:not(.abierto) .mv-stats { display: none; }
  .mv-head.abierto .mv-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
  .mv-stat { border-left: 0; background: var(--o-surface-2,#f8fafc); border-radius: 12px; padding: 8px 4px; min-width: 0; }
  .mv-stat b { font-size: 20px; }
  .mv-stat small { font-size: 10px; }
  .mv-bar, .mv-controls { width: 100%; min-width: 0; max-width: 100%; }
  .mv-controls { gap: 6px; }
  .mv-modes, .mv-filtros { display: flex; flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .mv-modes::-webkit-scrollbar, .mv-filtros::-webkit-scrollbar { display: none; }
  .mv-mode, .mv-filtro { flex: 0 0 auto; white-space: nowrap; padding: 6px 10px; }
  .mv-filtros > span { flex: 0 0 auto; }
  .mv-prev { flex-wrap: wrap; overflow: visible; }
  .mv-prev select { width: 100%; max-width: 100%; }
  .mv-prevlista { max-height: 72px; }
  .mv-stage { height: calc(100dvh - 205px); min-height: 360px; }
  .mv-ov-leyenda { top: auto; bottom: 12px; left: 12px; right: auto; min-width: 0; max-width: calc(100% - 76px); padding: 6px 8px; }
  .mv-ov-leyenda .mv-leyenda-t { display: none; }
  .mv-ov-leyenda .mv-leyenda-g { gap: 2px 10px; font-size: 11px; }
}

/* ---- Movil: pantallas de trabajo mas compactas (cabecera, filtros, KPI y tablas) para dejar ver mas contenido ---- */
@media (max-width: 760px) {
  .main-content { overflow: visible; }                       /* la barra superior (con el boton del menu) se queda fija al desplazarse */
  .page-body { padding: 8px 10px 28px; min-width: 0; max-width: 100%; overflow-x: clip; }
  .page-body .page-header { margin-bottom: 8px; gap: 4px; }
  .page-body .page-header > div:first-child > .page-sub, .page-body .page-header > div:first-child > p { display: block; font-size: 12px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .page-body .header-actions { display: flex; flex-wrap: nowrap; gap: 6px; width: 100%; margin: 4px 0 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .page-body .header-actions::-webkit-scrollbar { display: none; }
  .page-body .header-actions > * { flex: 0 0 auto; min-height: 34px; height: auto; padding: 6px 12px; font-size: 13px; white-space: nowrap; }
  .page-body .tabs-bar { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 2px; margin-bottom: 8px; }
  .page-body .tabs-bar::-webkit-scrollbar { display: none; }
  .page-body .tabs-bar > button { flex: 0 0 auto; white-space: nowrap; padding: 8px 12px; font-size: 13px; }
  .page-body .filters-bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 10px; margin-bottom: 8px; align-items: center; }
  .page-body .filters-bar > * { min-width: 0; max-width: 100%; width: 100%; margin: 0; }
  .page-body .filters-bar > :first-child, .page-body .filters-bar > .search-with-bulk, .page-body .filters-bar > .calle-tab { grid-column: auto; }
  .page-body .filters-bar > :first-child, .page-body .filters-bar > .search-with-bulk { grid-column: 1 / -1; }
  .page-body .filters-bar input, .page-body .filters-bar select, .page-body .filters-bar .form-input, .page-body .filters-bar .form-select { min-height: 38px; height: 38px; font-size: 14px; }
  .page-body .filters-bar > .calle-tab { width: auto; justify-self: start; }
  .page-body .kpi-grid, .page-body .keys-kpis, .page-body .kpi-command-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 8px; }
  .page-body .kpi-card, .page-body .key-kpi { padding: 8px 10px 8px 14px; min-width: 0; }
  .page-body .kpi-card .kpi-value, .page-body .kpi-card strong, .page-body .key-kpi strong { font-size: 22px; line-height: 1.1; }
  .page-body .kpi-card .kpi-label, .page-body .kpi-card small, .page-body .key-kpi span { font-size: 11px; }
  .page-body .kpi-card .kpi-sub, .page-body .kpi-card p { display: none; }
  .page-body .data-table th, .page-body .data-table td { white-space: nowrap; padding: 7px 10px; }
  .page-body .data-table td .btn-secondary, .page-body .data-table td .btn-primary, .page-body .data-table td button { padding: 4px 10px; min-height: 30px; font-size: 13px; }
  .page-body .okcampa-table-scroll { max-width: 100%; }
  /* asistente de salida: sin sangrias dobles */
  .page-body .salida-shell, .page-body .entrada-shell { gap: 10px; grid-template-columns: minmax(0, 1fr); }
  .page-body .salida-shell > *, .page-body .entrada-shell > * { min-width: 0; }
  .page-body .salida-main { padding: 0; min-width: 0; }
  .page-body .salida-card, .page-body .salida-main .card { padding: 14px; }
}

/* ---- Movil: formularios de salida y entrada mas compactos; boton de camara alineado con su campo ---- */
.page-body .entrada-search-grid .form-group { margin-bottom: 0; }
.page-body .entrada-search-grid .camera-cell { display: flex; align-items: flex-end; align-self: end; margin: 0; }
.page-body .entrada-search-grid .camera-cell > :not(style) { display: flex; align-items: flex-end; margin: 0; }
@media (max-width: 760px) {
  .page-body .salida-search-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .page-body .salida-search-grid > .salida-search-input { grid-column: 1 / -1; }
  .page-body .salida-search-grid > .form-input { min-width: 0; height: 40px; min-height: 40px; }
  .page-body .salida-search-grid > .salida-camera-direct { order: 1; display: flex; }
  .page-body .salida-search-grid > .salida-camera-direct > :not(style), .page-body .salida-search-grid > .salida-camera-direct .quick-ocr-btn { width: 100%; }
  .page-body .salida-search-grid > .salida-search-secondary { order: 2; width: 100%; }
  .page-body .salida-search-grid > .salida-search-btn { order: 3; grid-column: 1 / -1; width: 100%; }
  .page-body .salida-search-grid > button, .page-body .salida-search-grid .quick-ocr-btn { height: 40px; min-height: 40px; padding: 0 12px; }
  .page-body .entrada-search-grid { gap: 10px 8px; }
  .page-body .entrada-search-grid .camera-cell .quick-ocr-btn { height: 44px; padding: 0 14px; }
}
@media (max-width: 760px) {
  .page-body .filters-bar.keys-filter { display: flex; flex-wrap: wrap; gap: 6px; }
  .page-body .filters-bar.keys-filter > .search-with-bulk { flex: 1 1 100%; width: 100%; margin-bottom: 2px; }
  .page-body .filters-bar.keys-filter > .calle-tab { flex: 0 0 auto; width: auto; }
  .page-body .key-kpi { background: var(--o-surface,#fff); border-radius: 10px; border: 1px solid var(--o-border); border-left-width: 4px; padding: 6px 10px; }
  .page-body .key-kpi.ok { border-left-color: #16a34a; } .page-body .key-kpi.work { border-left-color: #d97706; } .page-body .key-kpi.danger { border-left-color: #dc2626; }
}
@media (max-width: 760px) {
  /* la columna de acciones (fija a la derecha) no puede comerse la pantalla: botones en varias lineas dentro de un ancho maximo */
  .page-body .data-table td.row-actions { position: static; max-width: 210px; width: 210px; white-space: normal; line-height: 1.2; padding: 6px 8px; }
  .page-body .data-table td.row-actions > button, .page-body .data-table td.row-actions > a { margin: 2px 3px 2px 0; padding: 3px 8px; min-height: 28px; font-size: 12px; }
  .page-body .data-table th:last-child { position: static; }
}
@media (max-width: 760px) {
  .page-body .header-actions { flex-direction: row; align-items: center; }
  .page-body .page-header > div:first-child { min-width: 0; max-width: 100%; width: 100%; }
  .page-body .filters-bar > * { min-width: 0 !important; }
  .page-body .filters-bar .filter-button { width: 100%; height: 38px; }
}
@media (max-width: 760px) {
  .page-body .header-actions > * { width: auto !important; flex: 0 0 auto !important; }
  .page-body .filters-bar > .filter-button { grid-column: 1 / -1; }
  .page-body .kpi-card > span:last-child:not(:first-child), .page-body .kpi-card small { display: none; }
}
@media (max-width: 760px) { .page-body .page-sub.solo-escritorio { display: none; } }

/* ---- Movil: fichas de vehiculo y estancia ----
   Las fichas comparten .detail-cards. En una pantalla estrecha dos columnas
   convierten cada tarjeta en una franja y hacen que tablas y referencias se
   partan caracter a caracter. */
@media (max-width: 760px) {
  .page-body .detail-cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .page-body .detail-cards > .card {
    min-width: 0;
  }
  .page-body .detail-cards .table-wrap,
  .page-body .detail-cards .okcampa-table-shell,
  .page-body .detail-cards .okcampa-table-scroll {
    min-width: 0;
    max-width: 100%;
  }
  .page-body .detail-row {
    grid-template-columns: minmax(104px, 42%) minmax(0, 1fr);
    gap: 8px;
    margin-bottom: 9px;
    font-size: 14px;
  }
  .page-body .detail-row > * {
    min-width: 0;
  }
  .page-body .detail-row strong,
  .page-body .detail-row > div {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .page-body .detail-row .font-mono {
    font-size: 11px;
    letter-spacing: -.01em;
  }
}

/* ---- Movil: los modales (minimos de 380/600 px en app.css) no pueden salirse de la pantalla ---- */
@media (max-width: 760px) {
  .modal-overlay, .modal-backdrop, .modal-backdrop-custom, .skill-modal-backdrop { padding: 8px !important; align-items: flex-start; overflow-y: auto; }
  .modal-overlay > *, .modal-backdrop > *, .modal-backdrop-custom > *, .skill-modal-backdrop > * {
    min-width: 0 !important; width: 100% !important; max-width: 100% !important; box-sizing: border-box; max-height: calc(100dvh - 16px); overflow-y: auto; overflow-x: hidden; padding: 14px !important; margin: 0 auto;
  }
  .modal-overlay .form-grid, .modal-backdrop .form-grid, .modal-overlay .form-grid.two, .modal-overlay .form-grid.three, .modal-overlay [class*="-grid"], .modal-backdrop [class*="-grid"] { grid-template-columns: minmax(0, 1fr) !important; }
  .modal-overlay input, .modal-overlay select, .modal-overlay textarea, .modal-backdrop input, .modal-backdrop select, .modal-backdrop textarea { max-width: 100%; min-width: 0; }
  .modal-overlay table, .modal-backdrop table { display: block; overflow-x: auto; max-width: 100%; }
  .modal-footer, .modal-actions { flex-wrap: wrap; gap: 8px; }
}

/* ---- Campos obligatorios de los formularios de edicion: label.req lleva asterisco rojo ---- */
label.req::after, .req-mark::after { content: " *"; color: var(--o-bad,#dc2626); font-weight: 700; }

/* El asterisco de campo obligatorio va junto al texto de la etiqueta (en las etiquetas «grid» caia en una fila aparte) */
label:has(> .req-mark), label:has(> .required) { display: block !important; }
label:has(> .req-mark) > :is(input, select, textarea, .input-with-icon), label:has(> .required) > :is(input, select, textarea) { display: block; width: 100%; margin-top: 4px; box-sizing: border-box; }
label > .req-mark, label > .required { display: inline; }
label > .required { margin-left: 3px; }

/* ---- Movil: las rejillas del Dashboard pasan a una sola columna y no se salen de la pantalla ---- */
@media (max-width: 900px) {
  .page-body .dashboard-grid-main, .page-body .section-grid, .page-body .section-grid.client-grid, .page-body .platform-board, .page-body .platform-board.lower,
  .page-body .tech-grid, .page-body .dash-board { grid-template-columns: minmax(0, 1fr) !important; }
  .page-body .dashboard-grid-main > *, .page-body .section-grid > *, .page-body .platform-board > *, .page-body .dash-board > *, .page-body .dash-main { min-width: 0; max-width: 100%; }
  .page-body .section-grid .card, .page-body .dashboard-grid-main .card { overflow-x: auto; }
  .page-body .smart-kpi-grid, .page-body .saas-metrics-grid, .page-body .pulse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* ---- Movil: formularios de los modales en una sola columna, con campos a todo el ancho y menos aire entre filas ---- */
@media (max-width: 760px) {
  .modal-overlay [style*="grid-template-columns"], .modal-backdrop [style*="grid-template-columns"], .modal-backdrop-custom [style*="grid-template-columns"],
  .modal-overlay .form-grid, .modal-backdrop .form-grid, .modal-overlay [class*="form-grid"], .modal-backdrop [class*="form-grid"], .modal-overlay .two-cols, .modal-overlay .grid-2, .modal-overlay .grid-3 {
    grid-template-columns: minmax(0, 1fr) !important; gap: 8px !important;
  }
  .modal-overlay [style*="display:flex"], .modal-backdrop [style*="display:flex"] { flex-wrap: wrap; }
  .modal-overlay .form-group, .modal-backdrop .form-group { margin: 0 0 6px; min-width: 0; }
  .modal-overlay .form-group > label, .modal-backdrop .form-group > label, .modal-overlay label.field-label, .modal-backdrop label.field-label { display: block; margin-bottom: 4px; line-height: 1.25; }
  .modal-overlay label:has(> input), .modal-overlay label:has(> select), .modal-overlay label:has(> textarea),
  .modal-backdrop label:has(> input), .modal-backdrop label:has(> select), .modal-backdrop label:has(> textarea) { display: block; }
  .modal-overlay input.form-input, .modal-overlay select.form-input, .modal-overlay textarea.form-input, .modal-overlay .form-select,
  .modal-backdrop input.form-input, .modal-backdrop select.form-input, .modal-backdrop textarea.form-input, .modal-backdrop .form-select { width: 100%; max-width: 100%; box-sizing: border-box; }
  .modal-overlay input.form-input, .modal-overlay select.form-input, .modal-backdrop input.form-input, .modal-backdrop select.form-input { height: 42px; min-height: 42px; }
  .modal-overlay .modal-title, .modal-backdrop .modal-title { font-size: 18px; margin-bottom: 10px; }
}

/* ---- Modal «Nueva previsión de salida»: bloques con campos cortos en pareja y datos de destino plegados ---- */
.pv-form { display: grid; gap: 10px; }
.pv-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 10px; align-items: start; }
.pv-row > .form-group { margin: 0; min-width: 0; }
.pv-row > .form-group.wide { grid-column: 1 / -1; }
.pv-destino { border: 1px solid var(--o-border); border-radius: 12px; padding: 0 12px; background: var(--o-surface-2,#f8fafc); }
.pv-destino > summary { cursor: pointer; padding: 10px 0; font-weight: 700; color: var(--o-text-2); list-style-position: inside; }
.pv-destino > summary small { font-weight: 500; color: var(--o-muted); }
.pv-destino[open] > summary { border-bottom: 1px solid var(--o-border); margin-bottom: 10px; }
.pv-destino[open] { padding-bottom: 12px; }
@media (max-width: 760px) {
  .regla-modal { transform: none !important; top: 8px !important; bottom: auto !important; max-height: calc(100dvh - 16px) !important; overflow-y: auto !important; min-width: 0 !important; width: 100% !important; max-width: 100vw !important; left: 0 !important; right: 0 !important; box-sizing: border-box; padding: 14px !important; }
  .material-inline-grid { grid-template-columns: minmax(0, 1fr) 90px !important; }
  .page-body .bloqueos-table .row-actions, .page-body .data-table td.row-actions { min-width: 0 !important; }
}

/* ---- Movil: Configuracion IA (una columna, cabecera y pie que bajan de linea, sin salirse) ---- */
@media (max-width: 760px) {
  .page-body .ia-config-card { padding: 12px; min-width: 0; max-width: 100%; overflow: hidden; }
  .page-body .ia-config-card .form-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 8px; }
  .page-body .ia-config-card .form-group { min-width: 0; margin: 0; }
  .page-body .ia-config-card input.form-input, .page-body .ia-config-card textarea.form-input { width: 100%; max-width: 100%; box-sizing: border-box; }
  .page-body .ia-config-head { flex-wrap: wrap; gap: 8px; }
  .page-body .ia-config-head > div:first-child { flex: 1 1 100%; min-width: 0; }
  .page-body .ia-config-head .ia-switch { white-space: normal; }
  .page-body .ia-config-card .prompt-box { min-height: 110px; }
  .page-body .ia-config-footer { flex-wrap: wrap; }
  .page-body .ia-config-footer .font-mono { overflow-wrap: anywhere; min-width: 0; }
  .page-body .ia-help { overflow-wrap: anywhere; }
}

/* ---- Plataforma: barra de estado del tenant seleccionado ---- */
.platform-estado { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 0 10px; margin-bottom: 10px; border-bottom: 1px solid var(--o-border); }
.form-section-title { font-weight: 700; color: var(--o-text-2); margin: 14px 0 6px; }

/* ---- Listados: vista de FICHAS (una tarjeta por fila). Se elige por usuario con el boton «Fichas/Tabla»; en movil es la vista por defecto ---- */
.grid-viewbtn { border: 1px solid var(--o-border); background: var(--o-surface,#fff); color: var(--o-text-2); border-radius: 10px; padding: 5px 12px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.grid-viewbtn:hover { background: var(--o-surface-3,#f1f5f9); }
.grid-viewbtn-float { margin: 0 0 8px auto; display: block; }
.grid-pop-seg { display: flex; gap: 6px; margin: 4px 0 10px; }
.grid-pop-seg button { flex: 1; border: 1px solid var(--o-border); background: var(--o-surface,#fff); border-radius: 8px; padding: 6px 8px; font-size: 13px; cursor: pointer; }
.grid-pop-seg button.on { background: #1d3f73; color: #fff; border-color: #1d3f73; }

table.grid-cards { display: block; width: 100% !important; max-width: 100% !important; min-width: 0 !important; table-layout: auto !important; border: 0; background: transparent; }
table.grid-cards > thead { display: none; }
table.grid-cards > tbody { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); padding: 10px; }
table.grid-cards > tbody > tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 14px; padding: 10px 14px; box-shadow: 0 1px 3px rgba(15, 23, 42, .06); min-width: 0; }
table.grid-cards > tbody > tr.row-selected { border-color: #1d3f73; box-shadow: 0 0 0 2px rgba(29, 63, 115, .15); }
table.grid-cards > tbody > tr > td { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border: 0 !important; padding: 4px 0 !important; text-align: right; white-space: normal !important; position: static !important; left: auto !important; right: auto !important; width: auto !important; min-width: 0; max-width: none !important; min-height: 0 !important; height: auto !important; overflow-wrap: anywhere; background: transparent !important; }
table.grid-cards > tbody > tr > td::before { content: attr(data-label); flex: 0 0 38%; max-width: 42%; color: var(--o-muted); font-size: 12px; font-weight: 600; text-align: left; }
table.grid-cards > tbody > tr > td[data-label=""]::before { display: none; }
table.grid-cards > tbody > tr > td[data-empty="1"] { display: none; }
/* la primera celda es el titulo de la ficha */
table.grid-cards > tbody > tr > td:first-child { justify-content: flex-start; text-align: left; font-weight: 700; font-size: 15px; padding-bottom: 6px !important; border-bottom: 1px solid var(--o-border) !important; margin-bottom: 4px; }
table.grid-cards > tbody > tr > td:first-child::before { display: none; }
/* acciones: una fila de botones al final, a todo el ancho */
table.grid-cards > tbody > tr > td.row-actions, table.grid-cards > tbody > tr > td[data-label=""]:last-child { justify-content: flex-start; flex-wrap: wrap; text-align: left; padding-top: 8px !important; margin-top: 4px; border-top: 1px dashed var(--o-border) !important; }
table.grid-cards > tbody > tr > td[colspan] { display: block; text-align: center; }
table.grid-cards > tbody > tr:has(> td[colspan]) { grid-column: 1 / -1; }
.okcampa-table-scroll:has(> table.grid-cards) { overflow: visible !important; max-height: none !important; }
.okcampa-table-shell:has(table.grid-cards) { max-height: none !important; overflow: visible !important; }
@media (max-width: 760px) { table.grid-cards > tbody { grid-template-columns: minmax(0, 1fr); padding: 8px 6px; } }

/* ---- Copiloto de campa ---- */
.cp-hero { display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 18px 22px; border-radius: 18px; color: #fff; background: linear-gradient(120deg, #12274a 0%, #1d3f73 55%, #2b6cb0 100%); margin-bottom: 14px; box-shadow: 0 10px 30px rgba(18, 39, 74, .28); }
.cp-saludo h2 { margin: 0 0 4px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.cp-saludo p { margin: 0; color: #dbe7f7; font-size: 15px; }
.cp-saludo small { display: block; margin-top: 4px; color: #9db6d8; }
.cp-kpis { display: flex; gap: 22px; align-items: center; }
.cp-kpi { display: grid; justify-items: center; gap: 2px; min-width: 76px; }
.cp-kpi strong { font-size: 26px; font-weight: 800; line-height: 1.1; }
.cp-kpi small { color: #9db6d8; font-size: 12px; }
.cp-ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#34d399 calc(var(--p) * 1%), rgba(255, 255, 255, .18) 0); position: relative; }
.cp-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #1b3a6b; }
.cp-ring b { position: relative; font-size: 15px; font-weight: 800; color: #fff; }
.cp-prevision { padding: 16px 18px; margin-bottom: 14px; }
.cp-prevision-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.cp-leyenda { display: flex; gap: 14px; font-size: 12px; color: var(--o-text-2); align-items: center; }
.cp-leyenda span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.cp-leyenda .ll::before { background: #10b981; } .cp-leyenda .sa::before { background: #3b82f6; } .cp-leyenda .oc::before { background: #f59e0b; border-radius: 50%; }
.cp-chart { width: 100%; height: auto; max-height: 300px; display: block; }
.cp-grid { stroke: #e5e9f0; stroke-width: 1; }
.cp-eje { fill: #64748b; font-size: 11px; }
.cp-umbral { stroke: #ef4444; stroke-width: 1.2; stroke-dasharray: 5 4; opacity: .7; }
.cp-umbral-t { fill: #ef4444; font-size: 10.5px; font-weight: 600; }
.cp-bar-ll { fill: #10b981; } .cp-bar-sa { fill: #3b82f6; }
.cp-num { fill: #334155; font-size: 10.5px; font-weight: 700; }
.cp-linea { stroke: #f59e0b; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.cp-punto { fill: #fff; stroke: #f59e0b; stroke-width: 3; }
.cp-punto-rojo { stroke: #ef4444; fill: #fee2e2; }
.cp-avisos { display: grid; gap: 10px; }
.cp-aviso { display: flex; gap: 14px; align-items: center; background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-left: 5px solid #94a3b8; border-radius: 14px; padding: 12px 16px; box-shadow: 0 1px 3px rgba(15, 23, 42, .05); }
.cp-aviso-icono { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; background: var(--o-surface-3,#f1f5f9); color: var(--o-muted,#475569); }
.cp-aviso-cuerpo { flex: 1; min-width: 0; }
.cp-aviso-cuerpo strong { display: block; font-size: 15px; color: var(--o-text); }
.cp-aviso-cuerpo p { margin: 3px 0 0; font-size: 13px; color: var(--o-text-2); }
.cp-aviso .btn-primary, .cp-aviso .btn-secondary { width: auto; flex: none; white-space: nowrap; }
.cp-critica { border-left-color: #ef4444; } .cp-critica .cp-aviso-icono { background: var(--o-bad-bg,#fee2e2); color: var(--o-bad,#dc2626); }
.cp-aviso { transition: transform .12s ease, box-shadow .12s ease; }
.cp-aviso:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(15, 23, 42, .09); }
.cp-aviso.cp-aviso { border-left-color: #f59e0b; }
.cp-aviso.cp-aviso .cp-aviso-icono { background: var(--o-warn-bg,#fef3c7); color: #d97706; }
.cp-info { border-left-color: #3b82f6; } .cp-info .cp-aviso-icono { background: var(--o-info-bg,#dbeafe); color: var(--o-info,#2563eb); }
.cp-ok { border-left-color: #10b981; } .cp-ok .cp-aviso-icono { background: var(--o-ok-bg,#d1fae5); color: #059669; }
@media (max-width: 760px) {
  .cp-hero { padding: 14px; } .cp-saludo h2 { font-size: 20px; } .cp-kpis { gap: 14px; width: 100%; justify-content: space-between; }
  .cp-aviso { flex-wrap: wrap; } .cp-aviso .btn-primary, .cp-aviso .btn-secondary { width: 100%; }
  .cp-campa { max-width: 100%; }
}

/* ---- Copiloto en el Dashboard ---- */
.cp-mini { background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(15, 23, 42, .05); }
.cp-mini-cab { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cp-mini-cab > div { flex: 1; min-width: 160px; display: grid; }
.cp-mini-cab small { color: var(--o-muted); }
.cp-mini-cab .btn-secondary { width: auto; }
.cp-ring-mini { width: 46px; height: 46px; background: conic-gradient(#1d3f73 calc(var(--p) * 1%), #dbe4ee 0); }
.cp-ring-mini::before { inset: 5px; background: var(--o-surface,#fff); }
.cp-ring-mini b { color: var(--o-heading,#1d3f73); font-size: 12px; }
.cp-mini-fila { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: var(--o-surface-2,#f8fafc); border-left: 4px solid #94a3b8; color: var(--o-text); text-decoration: none; font-size: 13.5px; }
.cp-mini-fila:hover { background: var(--o-surface-3,#eef2f7); }
.cp-mini-fila.cp-critica { border-left-color: #ef4444; } .cp-mini-fila.cp-aviso { border-left-color: #f59e0b; }
.cp-mini-fila i { color: var(--o-faint,#94a3b8); font-style: normal; font-size: 18px; }

/* ---- Paleta de comandos (Ctrl+K) ---- */
.topbar-search { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--o-border); background: var(--o-surface-2,#f8fafc); color: var(--o-text-2); border-radius: 12px; padding: 7px 12px; font-size: 13.5px; cursor: pointer; min-height: 38px; }
.topbar-search:hover { background: var(--o-surface-3,#eef2f7); }
.topbar-search kbd { font: 600 11px/1 inherit; background: var(--o-surface,#fff); border: 1px solid var(--o-border); border-radius: 6px; padding: 3px 6px; color: var(--o-muted,#64748b); }
@media (max-width: 900px) { .topbar-search span, .topbar-search kbd { display: none; } .topbar-search { padding: 0 10px; } }
.pal-fondo { position: fixed; inset: 0; z-index: 2500; background: rgba(15, 23, 42, .5); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 12px 12px; }
.pal-caja { width: min(640px, 100%); max-height: 70vh; display: flex; flex-direction: column; background: var(--o-surface,#fff); border-radius: 18px; box-shadow: 0 30px 80px rgba(15, 23, 42, .45); overflow: hidden; }
.pal-entrada { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--o-border); }
.pal-entrada input { flex: 1; border: 0; outline: 0; font-size: 17px; background: transparent; min-width: 0; }
.pal-entrada kbd { font-size: 11px; border: 1px solid var(--o-border); border-radius: 6px; padding: 3px 6px; color: var(--o-muted,#64748b); background: var(--o-surface-2,#f8fafc); }
.pal-lista { overflow-y: auto; padding: 6px; }
.pal-grupo { padding: 8px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--o-faint,#94a3b8); }
.pal-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 12px; border-radius: 10px; cursor: pointer; color: var(--o-text); }
.pal-item.sel, .pal-item:hover { background: var(--o-info-bg,#eaf1fb); }
.pal-item .pal-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--o-surface-3,#f1f5f9); flex: none; font-size: 15px; }
.pal-item .pal-txt { flex: 1; min-width: 0; display: grid; }
.pal-item .pal-txt strong { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-item .pal-txt small { color: var(--o-muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-item .pal-ir { color: var(--o-faint,#94a3b8); font-size: 12px; }
.pal-vacio { padding: 26px 16px; text-align: center; color: var(--o-muted); }
.pal-pie { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--o-border); font-size: 12px; color: var(--o-faint,#94a3b8); background: var(--o-surface-2,#f8fafc); }
@media (max-width: 760px) { .pal-fondo { padding-top: 8px; } .pal-caja { max-height: 92vh; } .pal-pie { display: none; } }
.topbar-search { white-space: nowrap; flex: none; }
.topbar-search kbd { white-space: nowrap; }
@media (max-width: 760px) { .cp-eje { font-size: 19px; } .cp-num { font-size: 19px; } .cp-umbral-t { font-size: 17px; } .cp-linea { stroke-width: 4.5; } }

/* iconos de linea (componente Icono) */
.ico { flex: none; vertical-align: -3px; }
.pal-item .pal-ico { color: var(--o-heading,#112b4f); }
.nav-icon .ico { vertical-align: middle; }
.topbar-search .ico { color: var(--o-muted,#475569); }

.mv-link-3d { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; }
.mr-3d { display: inline-flex; align-items: center; gap: 6px; } .mr-3d i { display: none; }

/* Control de acceso/salida en móvil: una columna, sin desbordes ni cajas dentro de cajas */
@media (max-width: 720px) {
  .page-body .access-grid, .page-body .access-top { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .page-body .access-grid > *, .page-body .access-top > *, .page-body .access-panel { min-width: 0; max-width: 100%; }
  .page-body .access-form-grid, .page-body .access-form-grid.three { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .page-body .access-form-grid .span-2 { grid-column: auto; }
  .page-body .truck-search-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .page-body .truck-search-row .btn-primary { width: 100%; }
  .page-body .truck-search-row .form-input, .page-body .access-form .form-input { font-family: inherit; font-size: 16px; text-overflow: ellipsis; }
  .page-body .truck-search-row .form-input.font-mono { letter-spacing: .04em; text-transform: uppercase; }
  .page-body .truck-search-row .form-input::placeholder { font-family: inherit; letter-spacing: 0; text-transform: none; }
  .page-body .truck-first { padding: 10px; }
  .page-body .access-dropzone .quick-ocr-btn { min-height: 84px; }
  .page-body .dock-row { grid-template-columns: minmax(0, 1fr) auto; }
  .page-body .dock-row .form-input { min-width: 0; }
  .page-body .signature-box { border: 0; background: none; padding: 0; }
  .page-body .firma-box { min-width: 0; }
  .page-body .signature-actions { flex-wrap: wrap; }
  .page-body .access-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .page-body .access-actions .access-submit { width: 100%; }
  .page-body .access-summary { padding: 16px; flex-wrap: wrap; }
  .page-body .access-art { display: none; }
  .page-body .access-numbers { gap: 24px; flex-wrap: wrap; }
  .page-body .access-numbers strong { font-size: 34px; }
  .page-body .access-donut-card { padding: 16px; }
  .page-body .access-donut-row { flex-wrap: wrap; gap: 14px; }
  .page-body .access-legend { flex: 1 1 180px; min-width: 0; font-size: 13px; }
  .page-body .access-table-card { padding: 12px; min-width: 0; overflow: hidden; }
  .page-body .access-table-card .table-wrap { border: 0; border-radius: 0; background: none; overflow-x: auto; }
  .page-body .access-table-card .empty-state { padding: 18px 8px; }
  .page-body .access-filterbar { gap: 8px; }
  .page-body .access-filterbar .okcampa-filter-chips { width: 100%; flex-wrap: wrap; }
  .page-body .access-filterbar .search-box { flex: 1 1 100%; }
  .page-body .access-filterbar .okcampa-toolbar-right, .page-body .access-filterbar .okcampa-toolbar-right .btn-primary { width: 100%; }
}

/* ---- Listados: barra «Fichas | Tabla» + Columnas (las dos opciones siempre visibles) ---- */
.grid-viewbar { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grid-viewbar-float { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.grid-seg { display: inline-flex; border: 1px solid var(--o-border-strong,#cbd5e1); border-radius: 10px; overflow: hidden; background: var(--o-surface,#fff); }
.grid-seg button { border: 0; background: transparent; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--o-text-2, var(--o-muted,#475569)); cursor: pointer; white-space: nowrap; }
.grid-seg button + button { border-left: 1px solid var(--o-border-strong,#cbd5e1); }
.grid-seg button.on { background: #1d3f73; color: #fff; }
.grid-cols { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--o-border-strong,#cbd5e1); background: var(--o-surface,#fff); color: var(--o-text-2, var(--o-muted,#475569)); border-radius: 10px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.grid-cols svg { width: 15px; height: 15px; } .grid-cols:hover { background: var(--o-surface-3,#f1f5f9); }
/* el engranaje de la cabecera no debe «escaparse» al formulario: su celda siempre es su referencia de posición */
.page-body .data-table.grid-enh th:last-child { position: relative; }
@media (max-width: 760px) {
  /* barras de estado (Todos / Pendiente / En ruta…): una sola línea, deslizables */
  .page-body .filters-bar:not(:has(> :not(.calle-tab))) { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 4px; padding: 8px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .page-body .filters-bar:not(:has(> :not(.calle-tab)))::-webkit-scrollbar { display: none; }
  .page-body .filters-bar:not(:has(> :not(.calle-tab))) > .calle-tab { flex: 1 1 auto; width: auto; white-space: nowrap; padding: 6px 7px; font-size: 12px; text-align: center; }
  .page-body .ayuda-escritorio { display: none; }
  .grid-viewbar { width: 100%; justify-content: space-between; }
  .okcampa-table-controls .grid-viewbar { width: 100%; }
  .grid-viewbar-float { justify-content: space-between; }
}

/* Copiloto: icono de avión en el menú (sin esta regla el menú usaba el punto por defecto) */
.sidebar a.nav-item[href="/copiloto"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z'/%3E%3C/svg%3E")}

/* selector de campa de trabajo de la cabecera (se aplica a todas las pantallas) */
.campa-sel { max-width: 190px; height: 34px; border: 1px solid var(--o-border,#dbe3ef); border-radius: 999px; padding: 0 28px 0 12px; background-color: var(--o-surface,#fff); color: var(--o-heading,#12335f); font-weight: 600; font-size: 13px; cursor: pointer; text-overflow: ellipsis; box-shadow: 0 2px 8px rgba(15, 23, 42, .06); }
.campa-sel:focus-visible { outline: 2px solid #1d4ed8; outline-offset: 1px; }
@media (max-width: 760px) { .campa-sel { max-width: 120px; font-size: 12px; } }
/* móvil estrecho: la barra superior cabe en el ancho (antes la campana se salía y toda la página se desplazaba de lado) */
@media (max-width: 420px) { .topbar-actions { gap: 6px; min-width: 0; } .campa-sel { max-width: 92px; padding-right: 22px; } .lang-sel { padding: 4px 3px; } }

/* celda con varias lineas (nombre + detalle…): un solo bloque, para que en fichas no se parta letra a letra */
.cel-multi { display: grid; gap: 2px; min-width: 0; }
.cel-multi .badge-estado { justify-self: start; }
table.grid-cards > tbody > tr > td .cel-multi { flex: 1 1 auto; text-align: right; justify-items: end; }
table.grid-cards > tbody > tr > td .cel-multi .badge-estado { justify-self: end; }

/* ---- Dashboard en movil: primero los contadores que importan, en fichas compactas; el resto debajo y mas pequeño ---- */
@media (max-width: 760px) {
  .page-body .dash-board { display: flex !important; flex-direction: column; gap: 10px; }
  .page-body .dash-main { display: contents; }
  .page-body .dash-board .smart-kpi-grid { order: 1; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
  .page-body .kpi-command-strip { order: 2; }
  .page-body .cp-mini { order: 3; }
  .page-body .smart-hero { order: 4; padding: 12px 14px; gap: 8px; }
  .page-body .smart-hero h2 { font-size: 18px; margin: 2px 0; }
  .page-body .smart-hero p { display: none; }
  .page-body .smart-hero .forecast-card { padding: 8px 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .page-body .smart-hero .forecast-card strong { font-size: 24px; }
  .page-body .smart-kpi { padding: 10px 12px; }
  .page-body .smart-kpi .smart-kpi-top strong { font-size: 22px; }
  .page-body .smart-kpi small, .page-body .smart-kpi > b { font-size: 11px; }
  .page-body .command-card { min-height: 0; padding: 10px 12px; }
  .page-body .command-card p { display: none; }
  .page-body .command-card.health { grid-template-columns: 64px minmax(0, 1fr); }
  .page-body .kpi-command-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .page-body .command-card-head { flex-direction: column; gap: 2px; }
  .page-body .command-stats, .page-body .pulse-grid { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 4px; }
  .page-body .command-stats > div, .page-body .pulse-grid > div { padding: 4px 5px !important; min-width: 0; }
  .page-body .command-stats strong, .page-body .pulse-grid strong { font-size: 15px !important; }
  .page-body .command-stats span, .page-body .pulse-grid span, .page-body .pulse-grid small { font-size: 9.5px !important; }
  .page-body .priority-title { font-size: 14px !important; }
}

/* editor de campas: farolas */
.mr-on { background: var(--o-ok-bg,#dcfce7) !important; border-color: var(--o-ok-b,#4ade80) !important; color: var(--o-ok,#166534) !important; }
.mr-farola-alt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--o-muted,#475569); } .mr-farola-alt input { width: 64px; }
.mr-farola-ed { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--o-border,#e2e8f0); border-radius: 10px; background: var(--o-surface-2,#f8fafc); font-size: 13px; }
.mr-farola-ed label { display: flex; align-items: center; gap: 6px; } .mr-farola-ed input[type=number] { width: 70px; }

/* puntos e iluminación: paleta que se arrastra al mapa */
.mr-paleta { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.mr-paleta button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 4px; border: 1px solid var(--o-border,#e2e8f0); border-radius: 10px; background: var(--o-surface,#fff); font-size: 11.5px; font-weight: 600; color: var(--o-text-2,#334155); cursor: grab; touch-action: none; user-select: none; }
.mr-paleta button span { font-size: 20px; line-height: 1.1; }
.mr-paleta button:hover { border-color: var(--o-info-b,#93c5fd); background: var(--o-info-bg,#eff6ff); }
.mr-fantasma { position: fixed; z-index: 100000; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 3px solid #8b5cf6; background: var(--o-surface,#fff); display: grid; place-items: center; font-size: 21px; pointer-events: none; box-shadow: 0 6px 18px rgba(15, 23, 42, .35); }
.mr-fantasma.fuera { opacity: .55; }
.mr-farola-ed select, .mr-farola-ed input[type=text] { flex: 1; min-width: 0; padding: 4px 6px; border: 1px solid var(--o-border-strong,#cbd5e1); border-radius: 6px; font-size: 13px; }
.mr-punto-ico { font-style: normal; font-size: 18px; width: 22px; text-align: center; }

/* cuadrar plazas y filas */
.mr-cuadrar { display: grid; gap: 8px; }
.mr-cuadrar-sel { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; background: var(--o-info-bg,#e0f2fe); border: 1px solid var(--o-info-b,#7dd3fc); font-size: 13px; }
.mr-cuadrar-sel small { color: var(--o-info,#0369a1); }
.mr-cuadrar-pad { display: grid; gap: 8px; }
.mr-cuadrar-grupo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mr-cuadrar-grupo > span { width: 44px; font-size: 12px; font-weight: 700; color: var(--o-muted,#64748b); }
.mr-cruz { display: grid; grid-template-columns: repeat(3, 34px); grid-template-rows: repeat(3, 30px); gap: 2px; }
.mr-cruz button { border: 1px solid var(--o-border-strong,#cbd5e1); border-radius: 7px; background: var(--o-surface,#fff); font-size: 13px; cursor: pointer; }
.mr-cruz button:active { background: var(--o-info-bg,#bae6fd); }
.mr-cruz button:nth-child(1) { grid-column: 2; grid-row: 1; } .mr-cruz button:nth-child(2) { grid-column: 1; grid-row: 2; }
.mr-cruz button:nth-child(3) { grid-column: 3; grid-row: 2; } .mr-cruz button:nth-child(4) { grid-column: 2; grid-row: 3; }
.mr-cuadrar-grupo select { padding: 4px 6px; border: 1px solid var(--o-border-strong,#cbd5e1); border-radius: 6px; font-size: 13px; }
.mr-cuadrar-giro button { font-size: 12px; padding: 5px 8px; }
.mr-cuadrar-pend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; background: var(--o-warn-bg,#fef3c7); border: 1px solid var(--o-warn-b,#fbbf24); font-size: 13px; }
.mr-cuadrar-pend span { flex: 1; min-width: 140px; }
.mr-intensidad input[type=range] { flex: 1; min-width: 90px; } .mr-intensidad b { min-width: 44px; text-align: right; }
/* etiquetas del mapa: el título en su línea y todos los chips juntos debajo (antes «Zonas» quedaba suelto junto al título) */
.mr-etq-chips { gap: 5px; margin-top: -2px; }

/* ayuda del punto «Entrada» en el editor */
.mr-farola-ed .mr-ayuda-punto { display: block; color: var(--text-muted, var(--o-muted,#64748b)); font-size: 12px; line-height: 1.35; }

/* iconos del menú que faltaban (conciliación, diseño de factura, Verifactu, recursos —elevador— y simulador) */
.sidebar a.nav-item[href="/conciliacion-bancaria"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 3 8h18z'/%3E%3Cpath d='M3 20.5h18M5 11v6.5M9.5 11v6.5M14.5 11v6.5M19 11v6.5'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/diseno-factura"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M14 3v5h5v2.5M9 12h4M9 16h2'/%3E%3Cpath d='m13.5 21 .8-3.3 5.2-5.2a1.5 1.5 0 0 1 2.1 2.1l-5.2 5.2z'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/verifactu"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2.5h12v19l-3-2-3 2-3-2-3 2z'/%3E%3Cpath d='m9 11 2 2 4-4'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/recursos-operativos"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21V4M20 21V4M2.5 21h19M4 14.5h16'/%3E%3Cpath d='M7 14.5l1.6-3.5h6.8l1.6 3.5'/%3E%3C/svg%3E")}
.sidebar a.nav-item[href="/simulador-campa"] .nav-icon{--ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='m6.5 15.5 3.5-4.5 3 2.5 2.5-3.5'/%3E%3Cpath d='m15.5 10 4.5-4.5' stroke-dasharray='1.5 2.5'/%3E%3Ccircle cx='20' cy='5.5' r='.6'/%3E%3C/svg%3E")}

/* rótulos dentro de un grupo del menú (Trabajos y servicios): ordenan las entradas por para qué sirven */
.sidebar .nav-sublabel { margin: 10px 16px 2px 22px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--o-faint,#94a3b8); }
.sidebar .nav-group > .nav-sublabel:first-of-type { margin-top: 4px; }
.sidebar-collapsed .sidebar .nav-sublabel { display: none; }

/* Editor de plazas → Nombres de las plazas */
.mr-nom-nota { font-size: 12.5px; color: var(--o-muted,#64748b); }
.mr-nom-zona { border: 1px solid var(--o-border,#e2e8f0); border-radius: 12px; padding: 10px; margin: 10px 0; background: var(--o-surface,#fff); }
.mr-nom-cab { font-size: 14px; margin-bottom: 8px; }
.mr-nom-cab small { color: var(--o-muted,#64748b); }
.mr-nom-acciones { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.mr-nom-acciones .mr-sec { font-size: 12.5px; padding: 6px 10px; }
.mr-nom-tabla { display: flex; flex-direction: column; gap: 4px; }
.mr-nom-fila { display: grid; grid-template-columns: 52px 60px minmax(70px, 110px) 1fr; gap: 8px; align-items: center; padding: 3px 4px; border-radius: 8px; }
.mr-nom-fila small { color: var(--o-muted,#64748b); font-size: 11px; }
.mr-nom-fila .form-input { padding: 5px 8px; min-height: 0; text-transform: uppercase; font-weight: 700; }
.mr-nom-tit { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; color: var(--o-muted,#64748b); }
.mr-nom-fila.cambiado { background: color-mix(in srgb, var(--o-primary,#2e6db4) 10%, transparent); }
.mr-nom-ej { display: flex; flex-direction: column; line-height: 1.2; font-variant-numeric: tabular-nums; }
.mr-nom-guardar { position: sticky; bottom: -14px; background: var(--o-surface,#fff); padding: 10px 0 14px; margin-bottom: -14px; justify-content: flex-end; }

/* Editor de plazas: el panel mide unos 460 px. En los formularios, desplegables y campos con ayuda a todo el ancho (las ayudas largas
   desalineaban la columna de al lado y los desplegables se cortaban), casillas con la etiqueta debajo del texto y desplegables que no ensanchan el panel. */
.mr-editor .mr-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
.mr-editor .mr-form > label:has(select), .mr-editor .mr-form > label:has(.mr-ayuda-sel), .mr-editor .mr-form > label:has(textarea),
.mr-editor .mr-form > :not(label) { grid-column: 1 / -1; }
.mr-editor select.form-input, .mr-editor input.form-input, .mr-editor textarea.form-input { min-width: 0; max-width: 100%; width: 100%; box-sizing: border-box; }
.mr-editor .mr-medidas, .mr-editor .mr-medidas label { min-width: 0; }
.mr-editor .mr-checks { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.mr-editor .mr-checks label, .mr-editor .mr-checks label:has(> input[type=checkbox]) { display: grid; grid-template-columns: 17px minmax(0, 1fr); column-gap: 9px; row-gap: 2px; align-items: start; line-height: 1.35; }
.mr-editor .mr-checks label > input[type=checkbox] { margin: 1px 0 0; }
.mr-editor .mr-checks label > em { grid-column: 2; justify-self: start; margin: 0; }
.mr-editor .mr-checks label:not(:has(> input[type=checkbox])) { grid-template-columns: minmax(0, 1fr); row-gap: 5px; font-weight: 600; color: var(--o-muted, #475569); margin-top: 4px; }
/* las pastillas «activo / informativo» compartían clase con las filas del panel de actividad (display flex, ancho 100 %) */
em.mr-act, em.mr-inf { display: inline-block; width: auto; text-align: left; white-space: normal; line-height: 1.4; padding: 1px 8px; cursor: inherit; }
em.mr-act:hover { background: var(--o-ok-bg, #dcfce7); }
.mr-farola-alt input { height: 32px; padding: 0 8px; border: 1px solid var(--o-border-strong, #cbd5e1); border-radius: 8px; background: var(--o-surface, #fff); color: var(--o-text, #0f172a); font: inherit; }
/* menú del editor a una columna: en 460 px las tarjetas a dos columnas partían los títulos y quedaban desiguales */
.mr-editor .mr-menu { grid-template-columns: minmax(0, 1fr); gap: 6px; }
/* diseño de filas de una calle: las 9 columnas caben en el panel (antes pedían 500 px y salía una barra horizontal) */
.mr-editor .mr-filas { overflow-x: hidden; }
.mr-editor .mr-fila { min-width: 0; grid-template-columns: 34px minmax(50px, 1fr) 40px minmax(64px, 1.3fr) 44px 24px 22px 44px 24px; gap: 3px; font-size: 12px; }
.mr-editor .mr-fila-cab span { text-align: center; } .mr-editor .mr-fila-cab span:nth-child(-n+5) { text-align: left; }
.mr-editor .mr-fila-cab { font-size: 10.5px; letter-spacing: 0; }
.mr-editor .mr-fila-cab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-editor .mr-fila select, .mr-editor .mr-fila input[type=number] { min-width: 0; padding: 0 3px; font-size: 12px; }
.mr-editor .mr-fila small { display: block; font-size: 10px; line-height: 1; }
/* pestañas del diseñador: «5 · Obstáculos» ya no se parte en dos líneas */
.mr-editor .mr-tabs button { white-space: nowrap; padding: 8px 2px; font-size: 12px; min-width: 0; }
/* medidas: si un título ocupa dos líneas, los campos siguen alineados */
.mr-editor .mr-medidas { align-items: flex-end; }
/* atributos de varias plazas: la aclaración de una casilla va debajo (antes se apretaba al lado) y el buscador de cliente ocupa todo el ancho */
.ficha-campos label.ficha-chk { display: flex; flex-wrap: wrap; row-gap: 1px; }
.ficha-campos label.ficha-chk small { flex-basis: 100%; padding-left: 25px; font-size: 11.5px; font-weight: 400; color: var(--o-faint, #94a3b8); line-height: 1.25; }
.ficha-campos .cliente-filtro { display: block; width: 100%; min-width: 0; }
.ficha-campos .cliente-filtro .input-sm { height: 36px; }
/* la lista de zonas usa el alto del panel (antes una caja de 260 px con su propio desplazamiento y hueco debajo) */
.mr-editor .mr-zonas { max-height: none; overflow: visible; }
@media (max-width: 520px) { .mr-editor .mr-filas { overflow-x: auto; } .mr-editor .mr-fila { min-width: 372px; } }
/* Integraciones → Códigos de cliente: los recibidos sin enlazar */
.okc-sin-enlazar { border: 1px solid var(--o-warn-border, #fed7aa); background: var(--o-warn-bg, #fff7ed); border-radius: 12px; padding: 12px 14px; margin: 10px 0 16px; }
.okc-sin-enlazar h3 { margin: 0 0 4px; font-size: 15px; color: var(--o-warn, #9a3412); }
.okc-sin-enlazar p { margin: 0 0 10px; font-size: 13px; color: var(--o-muted, #64748b); }
.okc-sin-enlazar td small { display: block; color: var(--o-muted, #64748b); }
