@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Instrument+Sans:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* Estilo "Almacén" (26/10/2026): papel, tinta y terracota, en sintonía con las apps (que usan crema y dorado).
   Las variables mantienen sus nombres de antes (--blue = color principal, etc.) para no tocar el resto. */
:root {
  --bg:        #f6f1e7;
  --surface:   #fffaf0;
  --surface2:  #f7efe1;
  --border:    #e6d9c3;
  --border2:   #d6c4a5;
  --text:      #2b2118;
  --text2:     #5b4a3a;
  --muted:     #8a6d4b;
  --ink:       #2b2118;   /* sidebar, login, burbujas propias del chat */
  --ink-text:  #d6c7ad;
  --ink-hover: rgba(255,247,237,.08);
  --green:     #4d7c0f;
  --green-bg:  #ecf3dc;
  --green-dim: rgba(77,124,15,.12);
  --blue:      #c2410c;   /* principal (terracota): botones, links, resaltados */
  --blue-hover:#9a3412;
  --blue-bg:   #fbe7da;
  --blue-dim:  rgba(194,65,12,.12);
  --on-blue:   #ffffff;
  --purple:    #7c3a5c;
  --purple-bg: #f6e6ee;
  --teal:      #0f766e;
  --teal-bg:   #e0f2ef;
  --orange:    #a16207;
  --orange-bg: #fbf0d0;
  --red:       #b91c1c;
  --red-bg:    #fbe1de;
  --red-dim:   rgba(185,28,28,.12);
  --warn:      #a16207;
  --accent:    #c2410c;
  --accent2:   #7c3a5c;
  --accent3:   #a16207;
  --danger:    #b91c1c;
  --radius:    10px;
  --radius-sm: 7px;
  --shadow:    0 1px 2px rgba(43,33,24,.06), 0 1px 1px rgba(43,33,24,.04);
  --shadow-md: 0 10px 22px -12px rgba(43,33,24,.35), 0 2px 4px rgba(43,33,24,.05);
  --font:      'Instrument Sans', system-ui, sans-serif;
  --font-titulo: 'Fraunces', Georgia, serif;
  --mono:      'JetBrains Mono', monospace;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

/* ICONOS — set Lucide (ver iconos.js). Heredan tamaño del font-size del contenedor,
   igual que hacía el emoji al que reemplazan, así no hay que ajustar tamaños a mano. */
.icon { width:1em; height:1em; flex-shrink:0; vertical-align:-0.15em; }
.icon-lg { width:1.6em; height:1.6em; }

/* Puntitos de estado (reemplazan 🔴🟢🟡⚪) */
.status-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:4px; vertical-align:middle; flex-shrink:0; }
.status-dot-red    { background:var(--red); }
.status-dot-green  { background:var(--green); }
.status-dot-yellow { background:var(--orange); }
.status-dot-gray   { background:var(--muted); }
body { font-family:var(--font); background:var(--bg); color:var(--text); min-height:100vh; display:flex; font-size:14px; }
/* Bloquea el scroll de fondo mientras hay un modal abierto — antes,
   scrollear dentro de un modal (ver detalle, relevamiento, etc.) se
   filtraba y scrolleaba la página de atrás. Clase puesta/sacada por un
   MutationObserver genérico en app.js (ver ahí el porqué). */
body.modal-abierto { overflow:hidden; }
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border2); border-radius:10px; }

/*OSCURO — marrón oscuro con crema y dorado, mismos tonos que el modo oscuro de las apps (26/10/2026) */
#appShell.dark-theme {
  color:       var(--text);
  --bg:        #171310;
  --surface:   #231b13;
  --surface2:  #2b2219;
  --border:    #3d3122;
  --border2:   #4a3c27;
  --text:      #f1e6d2;
  --text2:     #d4c3a6;
  --muted:     #b6a488;
  --ink:       #110d0a;
  --ink-text:  #c9b48f;
  --ink-hover: rgba(224,172,82,.12);
  --green:     #7fc97f;
  --green-bg:  rgba(84,201,120,.16);
  --blue:      #e0ac52;   /* dorado de las apps */
  --blue-hover:#f0c479;
  --blue-bg:   rgba(224,172,82,.18);
  --on-blue:   #171310;
  --purple:    #d6a2c4;
  --purple-bg: rgba(214,162,196,.16);
  --teal:      #6fc7bb;
  --teal-bg:   rgba(111,199,187,.16);
  --orange:    #f39a5b;
  --orange-bg: rgba(243,154,91,.16);
  --red:       #f87171;
  --red-bg:    rgba(220,38,38,.18);
  --warn:      #f39a5b;
  --accent:    #e0ac52;
  --danger:    #f87171;
  --shadow:    0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 10px 24px -10px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.3);
}
#appShell.dark-theme .sidebar { box-shadow:2px 0 12px rgba(0,0,0,.4); }
body.dark-bg { background:#171310; }

/* SIDEBAR */
.sidebar { width:240px; min-height:100vh; background:var(--ink); border-right:none; display:flex; flex-direction:column; position:fixed; top:0; left:0; bottom:0; z-index:100; transition:width .25s ease; box-shadow:2px 0 12px rgba(43,33,24,.18); }
.sidebar.collapsed { width:64px; }
.sidebar-logo {
  padding:16px 18px 14px;
  border-bottom:1px solid rgba(255,255,255,.12);
  display:flex; align-items:center; justify-content:center;
  min-height:76px;
}
.sidebar-brand-logo {
  width:100%; max-width:160px; height:60px;
  object-fit:contain;
  transition:opacity .2s;
}
.sidebar.collapsed .sidebar-brand-logo { display:none; }
.sidebar.collapsed .sidebar-collapsed-icon { display:flex !important; font-size:22px; }
.logo-avatar { width:36px; height:36px; background:linear-gradient(135deg,var(--blue),var(--purple)); border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:17px; flex-shrink:0; box-shadow:var(--shadow); }
/* logo-name y logo-sub reemplazados por imagen */
.nav { border-top:0; flex:1; padding:12px 10px; display:flex; flex-direction:column; gap:2px;
  /* 9/10/2026: con todas las secciones abiertas el menú no entraba y el último ítem quedaba inalcanzable */
  min-height:0; overflow-y:auto; overflow-x:hidden; scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.18) transparent; }
.nav > * { flex-shrink:0; }   /* con overflow, los ítems se achicaban ("Panel de Control" quedaba aplastado) */
.nav::-webkit-scrollbar { width:6px; } .nav::-webkit-scrollbar-thumb { background:rgba(255,255,255,.18); border-radius:3px; }
.nav-item { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:var(--radius-sm); cursor:pointer; color:var(--ink-text); font-size:13.5px; font-weight:500; transition:all .15s; white-space:nowrap; overflow:hidden; }
.nav-item:hover { background:var(--ink-hover); color:#fff7ed; }
.nav-item.active { background:var(--blue); color:var(--on-blue); font-weight:600; }
.nav-icon { font-size:17px; flex-shrink:0; width:20px; text-align:center; }
.sidebar.collapsed .nav-label { display:none; }
.nav-badge { margin-left:auto; background:var(--red); color:white; font-size:11px; font-weight:700; padding:2px 6px; border-radius:20px; }
.sidebar.collapsed .nav-badge { display:none; }
/* Sección pausada a propósito (ver Repartidores) — no bloquea el backend,
   solo evita que se navegue ahí desde el sidebar mientras está en desarrollo. */
.nav-item-disabled { cursor:not-allowed; opacity:.45; }
.nav-item-disabled:hover { background:none !important; color:var(--ink-text) !important; }
.nav-badge-dev { margin-left:auto; font-size:9.5px; font-weight:700; text-transform:uppercase; letter-spacing:.3px; color:rgba(255,255,255,.55); white-space:nowrap; }
.sidebar.collapsed .nav-badge-dev { display:none; }

/* Secciones del sidebar estilo wiki (29/9/2026): título chico en mayúsculas
   arriba de sus ítems, todas abiertas; el título oculta/muestra la sección
   (clase .cerrado, recordada en localStorage). Con el sidebar colapsado se
   ven solo los íconos de todos los ítems, sin títulos. */
.nav-group { margin-top:10px; }
.nav-group-header { display:flex; align-items:center; gap:8px; padding:6px 12px 4px; border-radius:var(--radius-sm); cursor:pointer; color:rgba(255,255,255,.5); font-size:11px; font-weight:700; letter-spacing:.6px; text-transform:uppercase; transition:color .15s; white-space:nowrap; overflow:hidden; user-select:none; }
.nav-group-header:hover { color:#ffffff; }
.nav-group-header .nav-icon { display:none; }
.nav-group-caret { margin-left:auto; flex-shrink:0; width:14px; height:14px; transform:rotate(180deg); transition:transform .18s ease; }
.nav-group.cerrado > .nav-group-header .nav-group-caret { transform:rotate(0deg); }
.nav-group-children { overflow:hidden; max-height:600px; transition:max-height .2s ease; border-left:2px solid rgba(255,255,255,.08); margin-left:12px; }
.nav-group.cerrado > .nav-group-children { max-height:0; }
.nav-group-children .nav-item { padding-left:12px; }
.sidebar.collapsed .nav-group { margin-top:0; }
.sidebar.collapsed .nav-group-header { display:none; }
.sidebar.collapsed .nav-group-children,
.sidebar.collapsed .nav-group.cerrado > .nav-group-children { max-height:none; border-left:0; margin-left:0; }
.collapse-btn { margin:12px; padding:9px; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.15); border-radius:var(--radius-sm); color:rgba(255,255,255,.5); cursor:pointer; font-size:13px; display:flex; align-items:center; justify-content:center; transition:all .15s; }
.collapse-btn:hover { color:#ffffff; border-color:rgba(255,255,255,.3); }

/* MAIN */
.main { margin-left:240px; flex:1; min-width:0; min-height:100vh; transition:margin-left .25s ease; }
.sidebar.collapsed ~ .main { margin-left:64px; }
.topbar { position:sticky; top:0; z-index:50; background:var(--surface); border-bottom:1px solid var(--border); padding:14px 28px; display:flex; align-items:center; justify-content:space-between; box-shadow:var(--shadow); }
.topbar-title { font-size:18px; font-weight:700; color:var(--text); letter-spacing:-.3px; }
.topbar-right { display:flex; gap:10px; align-items:center; }
/* Buscador del sistema (10/11/2026): por ahora solo visible ("Muy pronto"); queda fijo en todas las secciones. */
.topbar-buscar { flex:1; max-width:440px; margin:0 20px; display:flex; align-items:center; gap:8px; background:var(--surface2, rgba(0,0,0,.04)); border:1px solid var(--border); border-radius:999px; padding:7px 12px; color:var(--muted, #8a7d6b); cursor:help; }
.topbar-buscar .icon { width:16px; height:16px; flex-shrink:0; }
.topbar-buscar input { flex:1; min-width:0; border:0; background:transparent; outline:none; font:inherit; font-size:14px; color:var(--text); cursor:help; }
.topbar-buscar-pronto { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; padding:2px 8px; border-radius:999px; background:var(--orange-bg); color:var(--orange); white-space:nowrap; }
@media (max-width: 1100px) { .topbar-buscar-pronto { display:none; } }
@media (max-width: 860px) { .topbar-buscar { display:none; } }
.badge-live { display:flex; align-items:center; gap:6px; background:var(--green-bg); border:1px solid rgba(77,124,15,.25); color:var(--green); font-size:12px; font-weight:600; padding:5px 12px; border-radius:20px; }
.badge-live-icon { font-size:14px; padding:5px 10px; }
.dot-live { width:7px; height:7px; background:var(--green); border-radius:50%; animation:pulse 2s infinite; }
.badge-live.estado-error { background:var(--red-bg); border-color:rgba(185,28,28,.25); color:var(--red); }
.badge-live.estado-error .dot-live { background:var(--red); animation:none; }
.badge-live.estado-desconocido { background:var(--surface2); border-color:var(--border); color:var(--muted); }
.badge-live.estado-desconocido .dot-live { background:var(--muted); animation:none; }

/* CONEXIONES */
.conexiones-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px,1fr)); gap:16px; }
.conexion-card { background:var(--surface2); border:1px solid var(--border); border-radius:var(--radius); padding:18px; display:flex; flex-direction:column; gap:10px; }
.conexion-card-header { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
.conexion-card-nombre { font-size:14px; font-weight:700; color:var(--text); line-height:1.3; }
.conexion-card-detalle { font-size:12px; color:var(--text2); line-height:1.5; }
.conexion-card-evento { font-size:11px; color:var(--muted); line-height:1.5; }
.conexion-card-acciones { display:flex; gap:8px; margin-top:auto; flex-wrap:wrap; padding-top:6px; }
@keyframes pulse { 0%,100%{opacity:1;box-shadow:0 0 0 0 rgba(77,124,15,.4)} 50%{opacity:.8;box-shadow:0 0 0 4px rgba(77,124,15,0)} }
.time-display { font-family:var(--mono); font-size:12px; color:var(--text2); background:var(--surface2); padding:6px 12px; border-radius:var(--radius-sm); border:1px solid var(--border); }


#formProductoCard, #formLocalidadCard, #formUsuarioCard, #cardLocalidades {
  scroll-margin-top: 80px;
}


/* CONTENT */
.content { padding:24px 28px; }
.tab-panel { display:none; }
.tab-panel.active { display:block; animation:fadeIn .18s ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(5px)} to{opacity:1;transform:translateY(0)} }

/* CARDS */
.card { 
  background:var(--surface); 
  border:1px solid var(--border); 
  border-radius:var(--radius); 
  padding:20px 24px; 
  margin-bottom:18px; 
  box-shadow:var(--shadow);
  display: flex;
  flex-direction: column;
}
.card-title { font-size:13px; font-weight:600; text-transform:uppercase; letter-spacing:.6px; color:var(--muted); margin-bottom:16px; display:flex; align-items:center; gap:8px; }
.card .table-wrap {
  max-height: 420px;
  overflow-y: auto;
  scrollbar-gutter: stable;
  flex: 1 1 auto;
  min-height: 280px;
  min-width: 0;
}
.card .pagination {
  flex-shrink: 0;
  margin-top: 12px;
}


/* STATS */
.stats-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:14px; margin-bottom:18px; }
.stat-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:20px 22px; cursor:pointer; transition:all .2s; position:relative; overflow:hidden; box-shadow:var(--shadow); }
.stat-card::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; border-radius:var(--radius) var(--radius) 0 0; }
.stat-card.green::before { background:var(--green); }
.stat-card.blue::before  { background:var(--blue); }
.stat-card.orange::before{ background:var(--orange); }
.stat-card.red::before   { background:var(--red); }
.stat-card:hover { transform:translateY(-2px); box-shadow:var(--shadow-md); border-color:var(--border2); }
.stat-label { font-size:11px; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.6px; margin-bottom:10px; }
.stat-val   { font-size:34px; font-weight:700; letter-spacing:-1.5px; line-height:1; color:var(--text); }
.stat-sub   { font-size:12px; color:var(--muted); margin-top:6px; }
.stat-card.green .stat-val { color:var(--green); }
.stat-card.blue  .stat-val { color:var(--blue); }
.stat-card.orange .stat-val{ color:var(--orange); }
.stat-card.red   .stat-val { color:var(--red); }

/* TABLE */
.table-wrap { 
   overflow-x: auto;
  max-height: 420px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
table { width:100%; border-collapse:collapse; }
th { text-align:left; padding:10px 14px; font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.6px; color:var(--muted); border-bottom:1px solid var(--border); background:var(--surface2); }
.table-wrap thead th { position: sticky; top: 0; z-index: 2; }
/* Tablas largas con paginación (Pedidos, Ventas): sin caja con scroll propio adentro de la página, que confundía
   la rueda del mouse (primero scrolleaba la tabla y después la página). 9/10/2026. */
.table-wrap.sin-tope, .card .table-wrap.sin-tope { max-height:none; overflow-y:visible; min-height:0; }
/* Selector de estado de Pedidos con el color del estado (usa los .badge-<estado>) */
.estado-select { appearance:auto; width:100%; max-width:130px; padding:4px 4px 4px 8px; border-radius:20px; font-size:11px; font-weight:600;
  text-transform:uppercase; letter-spacing:0; cursor:pointer; font-family:inherit; }
.tabla-pedidos th, .tabla-pedidos td { padding-left:8px; padding-right:8px; }
.estado-select option { background:var(--surface); color:var(--text); text-transform:none; }
td { padding:12px 14px; font-size:13.5px; border-bottom:1px solid var(--border); vertical-align:middle; color:var(--text2); }
tr:last-child td { border-bottom:none; }
tr:hover td { background:var(--surface2); }
#tab-precios table {
  table-layout: fixed;          /* Fuerza que los anchos se respeten */
  width: 100%;
}
#tab-precios table th:nth-child(1),
#tab-precios table td:nth-child(1) {
  width: 80px;                  /* Código */
  max-width: 80px;
}
#tab-precios table th:nth-child(2),
#tab-precios table td:nth-child(2) {
  width: auto;                  /* Nombre/descripción: ocupa el espacio restante */
  /* Opcional: evitar que el texto se desborde */
  word-break: break-word;
}
#tab-precios table th:nth-child(3),
#tab-precios table td:nth-child(3) {
  width: 70px;                  /* Unidad */
  text-align: center;
}
#tab-precios table th:nth-child(4),
#tab-precios table td:nth-child(4) {
  width: 110px;                 /* Precio */
  text-align: right;
}
#tab-precios table th:nth-child(5),
#tab-precios table td:nth-child(5) {
  width: 150px;                 /* Marca — ¡más ancho! */
  max-width: 150px;
  white-space: nowrap;          /* Evita que el texto se divida en dos líneas */
  overflow: hidden;             /* Oculta el desbordamiento si es necesario */
  text-overflow: ellipsis;      /* Muestra "..." si se corta */
}
#tab-pedidos table {
  table-layout: fixed;
  width: 100%;
}
#tab-pedidos table th:nth-child(1), #tab-pedidos table td:nth-child(1) { width: 5%; }   /* # */
#tab-pedidos table th:nth-child(2), #tab-pedidos table td:nth-child(2) { width: 15%; }  /* Cliente */
#tab-pedidos table th:nth-child(3), #tab-pedidos table td:nth-child(3) { width: 10%; }  /* Localidad */
#tab-pedidos table th:nth-child(4), #tab-pedidos table td:nth-child(4) { width: 18%; }  /* Detalle */
#tab-pedidos table th:nth-child(5), #tab-pedidos table td:nth-child(5) { width: 8%; }   /* Pago */
#tab-pedidos table th:nth-child(6), #tab-pedidos table td:nth-child(6) { width: 8%; }   /* Estado */
#tab-pedidos table th:nth-child(7), #tab-pedidos table td:nth-child(7) { width: 8%; }   /* Fecha */
#tab-pedidos table th:nth-child(8), #tab-pedidos table td:nth-child(8) { width: 10%; }  /* Entrega */
#tab-pedidos table th:nth-child(9), #tab-pedidos table td:nth-child(9) { width: 18%; }  /* Acciones */


/*ClientesRegistrados*/
#tablaClientesRegistrados td:nth-child(1),
#tablaClientesRegistrados td:nth-child(2),
#tablaClientesRegistrados td:nth-child(3),
#tablaClientesRegistrados td:nth-child(4),
#tablaClientesRegistrados td:nth-child(5),
#tablaClientesRegistrados td:nth-child(6) {
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
#tablaClientesRegistrados td:nth-child(7) {
  white-space:nowrap; text-align:center; padding-left:6px; padding-right:6px;
}
#tablaClientesRegistrados td:nth-child(7) .btn { padding:5px 7px; }


/* TABLA EDITABLE */
#tablaEditable {
  table-layout: fixed;
  width: 100%;
}
#tablaEditable th:nth-child(1), #tablaEditable td:nth-child(1) { width: 70px; }   /* Código */
#tablaEditable th:nth-child(2), #tablaEditable td:nth-child(2) { width: auto; }    /* Nombre */
#tablaEditable th:nth-child(3), #tablaEditable td:nth-child(3) { width: 60px; }    /* Unidad */
#tablaEditable th:nth-child(4), #tablaEditable td:nth-child(4) { width: 100px; }   /* Precio */
#tablaEditable th:nth-child(5), #tablaEditable td:nth-child(5) { width: 140px; }   /* Marca */
#tablaEditable td:nth-child(5) input { width: 100%; } /* Asegura que el input ocupe todo el ancho */

/* BADGES */
.badge { display:inline-flex; align-items:center; gap:4px; padding:3px 9px; border-radius:20px; font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.4px; }
.badge-pendiente { background:var(--orange-bg); color:var(--orange); border:1px solid rgba(161,98,7,.25); }
.badge-preparando{ background:var(--teal-bg);   color:var(--teal);   border:1px solid rgba(15,118,110,.25); }
.badge-preparado { background:var(--purple-bg); color:var(--purple); border:1px solid rgba(124,58,92,.25); }
.badge-encamino  { background:var(--blue-bg);   color:var(--blue);   border:1px solid rgba(194,65,12,.25); }
.badge-entregado { background:var(--green-bg);  color:var(--green);  border:1px solid rgba(77,124,15,.25); }
.badge-cancelado { background:rgba(185,28,28,.12); color:var(--red); border:1px solid rgba(185,28,28,.25); }
.badge-recibido  { background:var(--orange-bg); color:var(--orange); border:1px solid rgba(161,98,7,.25); }
.badge-respondido{ background:var(--blue-bg);   color:var(--blue);   border:1px solid rgba(194,65,12,.25); }
.badge-cerrado   { background:var(--green-bg);  color:var(--green);  border:1px solid rgba(77,124,15,.25); }

/* BUTTONS */
.btn { display:inline-flex; align-items:center; gap:6px; padding:9px 16px; border-radius:var(--radius-sm); font-family:var(--font); font-size:13px; font-weight:600; cursor:pointer; border:none; transition:all .15s; white-space:nowrap; }
.btn-primary   { background:var(--blue); color:var(--on-blue); box-shadow:0 1px 3px rgba(194,65,12,.3); }
.btn-primary:hover { background:var(--blue-hover); box-shadow:0 4px 12px rgba(194,65,12,.35); }
.btn-secondary { background:var(--surface2); color:var(--text2); border:1px solid var(--border); }
.btn-secondary:hover { border-color:var(--border2); color:var(--text); }
.btn-export { background:var(--blue-bg); color:var(--blue); border:1px solid var(--blue-dim); }
.btn-export:hover { background:var(--blue-dim); }
.btn-danger    { background:var(--red-bg); color:var(--red); border:1px solid rgba(185,28,28,.25); }
.btn-danger:hover { background:var(--red-dim); }
.btn-sm { padding:6px 12px; font-size:12px; border-radius:6px; }
.btn-xs { padding:4px 8px;  font-size:11px; border-radius:5px; }
.btn:disabled { opacity:.45; cursor:not-allowed; }

/* FILTERS */
.filters { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:16px; }
.filter-btn { padding:6px 14px; border-radius:20px; background:var(--surface2); border:1px solid var(--border); color:var(--text2); font-size:12.5px; font-weight:500; cursor:pointer; transition:all .15s; font-family:var(--font); }
.filter-btn.active { background:var(--blue-bg); border-color:rgba(194,65,12,.3); color:var(--blue); font-weight:600; }
.filter-btn:hover { color:var(--text); border-color:var(--border2); }

/* FORM */
.input { width:100%; background:var(--surface2); border:1px solid var(--border); border-radius:var(--radius-sm); padding:10px 13px; color:var(--text); font-family:var(--font); font-size:13.5px; transition:all .15s; }
.input:focus { outline:none; border-color:var(--blue); background:var(--surface); box-shadow:0 0 0 3px rgba(194,65,12,.1); }
.input::placeholder { color:var(--muted); }
label { display:block; font-size:11px; font-weight:600; color:var(--muted); margin-bottom:6px; text-transform:uppercase; letter-spacing:.5px; }
select.input { appearance:none; cursor:pointer; }
textarea.input { resize:vertical; min-height:72px; }
.form-group { margin-bottom:14px; }

/* ── Selector de destinatarios (Notificaciones) — estilo "agregar miembros
   a un grupo": chips de los ya elegidos + buscador con sugerencias abajo ── */
.notif-chips { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
.notif-chips:empty { display:none; }
.notif-chip {
  display:inline-flex; align-items:center; gap:6px; background:var(--blue-bg); color:var(--blue);
  border:1px solid rgba(194,65,12,.3); border-radius:999px; padding:5px 8px 5px 12px; font-size:12.5px; font-weight:600;
}
.notif-chip button { background:none; border:none; color:inherit; cursor:pointer; display:flex; padding:2px; opacity:.7; }
.notif-chip button:hover { opacity:1; }
.notif-sugerencias {
  position:relative; margin-top:4px; max-height:240px; overflow-y:auto;
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); box-shadow:var(--shadow-md);
}
.notif-sugerencia-item { padding:9px 13px; cursor:pointer; font-size:13px; border-bottom:1px solid var(--border); }
.notif-sugerencia-item:last-child { border-bottom:none; }
.notif-sugerencia-item:hover { background:var(--surface2); }
.notif-sugerencia-nombre { font-weight:600; color:var(--text); }
.notif-sugerencia-sub { font-size:11px; color:var(--muted); margin-top:1px; }

/* UPLOAD */
.upload-zone { border:2px dashed var(--border2); border-radius:var(--radius); padding:40px 24px; text-align:center; cursor:pointer; transition:all .2s; background:var(--surface2); }
.upload-zone:hover, .upload-zone.drag-over { border-color:var(--blue); background:var(--blue-bg); }
.upload-icon { font-size:38px; margin-bottom:10px; }
.upload-text { font-size:15px; font-weight:600; color:var(--text); margin-bottom:5px; }
.upload-sub  { font-size:12px; color:var(--muted); }
.upload-filename { margin-top:10px; font-size:12px; font-family:var(--mono); color:var(--blue); }
input[type=file] { display:none; }

/* PROGRESS */
.progress-wrap { margin-top:14px; display:none; }
.progress-bar  { background:var(--surface2); border-radius:30px; height:6px; overflow:hidden; border:1px solid var(--border); }
.progress-fill { height:100%; border-radius:30px; background:linear-gradient(90deg,var(--blue),var(--purple)); transition:width .4s; width:0%; }
.progress-label{ font-size:11px; color:var(--muted); margin-top:5px; text-align:right; }

/* CHAT */
.chat-tabs { display:flex; gap:6px; margin-bottom:16px; border-bottom:1px solid var(--border); padding-bottom:12px; }
.chat-tab { padding:7px 16px; border-radius:var(--radius-sm); font-family:var(--font); font-size:13px; font-weight:500; cursor:pointer; border:1px solid var(--border); background:var(--surface2); color:var(--text2); transition:all .15s; }
.chat-tab:hover { color:var(--text); }
.chat-tab.active { background:var(--blue-bg); color:var(--blue); border-color:rgba(194,65,12,.3); font-weight:600; }
.chat-layout { display:grid; grid-template-columns:260px 1fr; gap:16px; height:calc(100vh - 240px); min-height:460px; }
.chat-layout-3col { grid-template-columns:260px 1fr 270px; }
/* Posiciones fijas — evita que el grid reordene las columnas cuando #handoffChat/#handoffEmpty
   se alternan con display:none (el auto-placement de grid ignora los items ocultos). */
#tab-atencion .chat-sidebar { grid-column:1; }
#handoffChat, #handoffEmpty { grid-column:2; }
#handoffInfoPanel { grid-column:3; }
.chat-info-panel { display:flex; flex-direction:column; overflow-y:auto; border-left:1px solid var(--border); padding-left:16px; }
.chat-info-header { padding-bottom:12px; border-bottom:1px solid var(--border); margin-bottom:12px; }
.chat-info-nombre { font-size:15px; font-weight:700; color:var(--text); margin-bottom:4px; }
.chat-info-tel { font-size:12px; color:var(--muted); font-family:var(--mono); cursor:pointer; }
.chat-info-tel:hover { color:var(--blue); }
.chat-info-section { margin-bottom:16px; }
.chat-info-section-title { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); margin-bottom:8px; }
.chat-info-pedido { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); padding:9px 11px; margin-bottom:6px; }
.chat-info-pedido-id { font-size:11px; color:var(--muted); font-family:var(--mono); margin-bottom:4px; }
.chat-info-pedido-estado { float:right; }
.chat-info-pedido-items { font-size:12px; color:var(--text); margin-top:4px; line-height:1.4; }
.chat-info-pedido-total { font-size:12px; font-weight:600; color:var(--accent); margin-top:5px; }
.chat-sidebar { display:flex; flex-direction:column; overflow:hidden; }
.chat-list { overflow-y:auto; display:flex; flex-direction:column; gap:3px; flex:1; }
.chat-contact { padding:11px 13px; border-radius:var(--radius-sm); cursor:pointer; transition:all .15s; border:1px solid transparent; }
.chat-contact:hover { background:var(--surface2); border-color:var(--border); }
.chat-contact.selected { background:var(--blue-bg); border-color:rgba(194,65,12,.25); }
.chat-contact-name { font-size:13.5px; font-weight:600; color:var(--text); margin-bottom:3px; }
.chat-contact-preview { font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chat-contact-time { font-size:11px; color:var(--muted); font-family:var(--mono); }
.chat-main { display:flex; flex-direction:column; overflow:hidden; }
.chat-messages {
  display:flex; flex-direction:column; gap:10px;
  padding:16px; overflow-y:auto; flex:1;
  background:var(--surface2);
}
.msg { max-width:72%; padding:10px 14px; border-radius:14px; font-size:13.5px; line-height:1.55; }
.msg-label { font-size:10px; font-weight:700; opacity:.55; margin-bottom:4px; text-transform:uppercase; letter-spacing:.5px; }
.msg-content { 
  padding:10px 14px;
  border-radius:16px;
  font-size:13.5px;
  line-height:1.5;
  word-break:break-word;
}
.msg-time { font-size:10px; opacity:.5; margin-top:5px; font-family:var(--mono); }
.msg.client { background:var(--surface); border:1px solid var(--border); color:var(--text); align-self:flex-start; border-bottom-left-radius:4px; box-shadow:var(--shadow); }
.msg.dora   { background:var(--blue-bg); border:1px solid rgba(194,65,12,.2); color:var(--blue); align-self:flex-end; border-bottom-right-radius:4px; text-align:right; }
.msg.human  { background:var(--green-bg); border:1px solid rgba(77,124,15,.2); color:var(--green); align-self:flex-end; border-bottom-right-radius:4px; text-align:right; }
.msg-bubble {
  display:flex; flex-direction:column;
  max-width:70%; gap:3px;
}
.msg-bubble.msg-user, .msg-bubble.msg-incoming {
  align-self:flex-start;
}
.msg-bubble.msg-dora, .msg-bubble.msg-outgoing,
.msg-bubble.msg-human, .msg-bubble.msg-agent {
  align-self:flex-end;
}
.msg-bubble.msg-user .msg-content,
.msg-bubble.msg-incoming .msg-content {
  background:var(--surface);
  border:1px solid var(--border);
  border-bottom-left-radius:4px;
  color:var(--text);
}
.msg-bubble.msg-dora .msg-content,
.msg-bubble.msg-outgoing .msg-content,
.msg-bubble.msg-human .msg-content,
.msg-bubble.msg-agent .msg-content {
  background:var(--ink);
  color:#ffffff;
  border-bottom-right-radius:4px;
}
.msg-hora {
  font-size:10.5px;
  color:var(--muted);
  padding:0 4px;
}
.msg-bubble.msg-dora .msg-hora,
.msg-bubble.msg-outgoing .msg-hora,
.msg-bubble.msg-human .msg-hora,
.msg-bubble.msg-agent .msg-hora {
  text-align:right;
}
.chat-compose { display:flex; gap:10px; flex-shrink:0; }
.human-mode-banner { background:var(--orange-bg); border:1px solid rgba(161,98,7,.25); border-radius:var(--radius-sm); padding:10px 14px; display:flex; align-items:center; gap:10px; margin-bottom:12px; font-size:13px; color:#92400e; flex-shrink:0; }

/* ACTIVITY */

/* PAGINATION */
.pagination { display:flex; gap:4px; justify-content:center; margin-top:16px; flex-wrap:wrap; }
.pag-label { font-size:12px; color:var(--muted); align-self:center; padding:0 8px; }
.form-label { font-size:11px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.5px; display:block; margin-bottom:6px; }
.page-btn { padding:6px 11px; border-radius:6px; background:var(--surface2); border:1px solid var(--border); color:var(--text2); cursor:pointer; font-size:12px; transition:all .15s; font-family:var(--font); min-width:32px; text-align:center; }
.page-btn.active { background:var(--blue); color:white; border-color:var(--blue); }
.page-btn:hover:not(.active) { color:var(--text); border-color:var(--border2); }

/* SKELETON */
/* Cargando (26/10/2026): antes era un brillo que barría la caja ("efecto espada"); ahora un spin chico en el medio.
   Una sola rueda girando por caja = menos trabajo para la compu que pintar el degradé entero. */
.skeleton { background:var(--surface2); border-radius:var(--radius-sm); position:relative; min-height:28px; }
.skeleton::after, .dato-cargando { content:''; border:2px solid var(--border2); border-top-color:var(--blue); border-radius:50%; animation:spinAnim .7s linear infinite; }
.skeleton::after { position:absolute; left:50%; top:50%; width:18px; height:18px; margin:-9px 0 0 -9px; }
/* Spin en línea, para el dato adentro de una tarjeta que ya está dibujada */
.dato-cargando { display:inline-block; width:.62em; height:.62em; vertical-align:middle; border-width:3px; }
.stat-sub .dato-cargando, .erp-sub .dato-cargando { width:10px; height:10px; border-width:2px; }

/* EMPTY */
.empty { text-align:center; padding:48px 24px; color:var(--muted); }
.empty-icon { font-size:36px; margin-bottom:12px; }
.empty-text { font-size:14px; }

/* TOAST */
.toasts { position:fixed; bottom:24px; right:24px; z-index:999; display:flex; flex-direction:column; gap:8px; }
.toast { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); padding:12px 18px; font-size:13.5px; min-width:260px; box-shadow:var(--shadow-md); display:flex; align-items:center; gap:10px; animation:slideIn .25s ease; }
@keyframes slideIn { from{transform:translateX(110%);opacity:0} to{transform:translateX(0);opacity:1} }
.toast.success { border-left:3px solid var(--green); }
.toast.error   { border-left:3px solid var(--red); }
.toast.warning { border-left:3px solid var(--orange); }
.toast.info    { border-left:3px solid var(--blue); }

/* CONFIG VARS */
.var-row { display:flex; align-items:center; gap:16px; padding:12px 0; border-bottom:1px solid var(--border); }
.var-row:last-child { border-bottom:none; }
.var-info { min-width:260px; flex-shrink:0; }
.var-label { font-size:13px; font-weight:600; color:var(--text); margin:5px 0 2px; }
.var-desc  { font-size:11px; color:var(--muted); }
.var-input { flex:1; }
.config-seccion { border:1px solid var(--border); border-radius:10px; margin-bottom:16px; overflow:hidden; }
.config-seccion:last-child { margin-bottom:0; }
.config-seccion-header { display:flex; align-items:center; gap:8px; padding:11px 14px; background:var(--surface2); border-bottom:1px solid var(--border); font-size:13px; font-weight:700; color:var(--text); text-transform:uppercase; letter-spacing:.4px; }
.config-seccion-header .icon { width:16px; height:16px; color:var(--blue); flex-shrink:0; }
.config-seccion-body { padding:0 14px; }
.config-seccion-agregar { display:flex; align-items:center; gap:6px; padding:10px 14px; font-size:12px; font-weight:600; color:var(--blue); cursor:pointer; border-top:1px dashed var(--border); background:var(--surface); }
.config-seccion-agregar:hover { background:var(--surface2); }
.config-seccion-agregar .icon { width:14px; height:14px; }

/* PRECIOS editable */
.prices-toolbar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:14px; }
.prices-toolbar-right { margin-left:auto; display:flex; gap:8px; }
td input { background:transparent; border:1px solid transparent; border-radius:5px; color:var(--text); font-family:var(--mono); font-size:12px; padding:3px 6px; transition:all .15s; outline:none; }
td input:hover  { border-color:var(--border2); background:var(--surface2); }
td input:focus  { border-color:var(--blue); background:var(--surface); box-shadow:0 0 0 2px rgba(194,65,12,.1); }
td input[type=number] { color:var(--blue); }

/* SPINNER */
.spin { display:inline-block; animation:spinAnim .7s linear infinite; }
@keyframes spinAnim { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }

/* LOGIN SCREEN */
#loginScreen {
  position:fixed; inset:0; z-index:9999;
  background:radial-gradient(circle at 30% 20%, #3a2c20 0%, #2b2118 55%, #1c1510 100%);
  display:flex; align-items:center; justify-content:center;
  padding:20px;
}
.login-card {
  background:#fffaf0;
  border-radius:20px;
  padding:40px 44px;
  width:100%; max-width:400px;
  box-shadow:0 24px 64px rgba(0,0,0,.25);
  animation:fadeIn .3s ease;
}
/* El logo es blanco: va sobre una franja oscura (la tarjeta es clara) */
.login-logo {
  display:flex; justify-content:center; margin:-40px -44px 22px;
  padding:20px 24px; background:#2b2118; border-radius:20px 20px 0 0;
}
.login-brand-logo {
  height:78px; object-fit:contain;
}
.login-title {
  text-align:center; font-size:20px; font-weight:700;
  color:var(--text); letter-spacing:-.4px;
}
.login-sub {
  text-align:center; font-size:13px; color:var(--muted); margin-top:5px;
}
.login-field { margin-top:14px; }
.login-field label {
  font-size:11px; font-weight:600; color:var(--muted);
  text-transform:uppercase; letter-spacing:.5px;
  display:block; margin-bottom:6px;
}
.password-field-wrap { position:relative; }
.password-field-wrap .input { padding-right:40px; }
/* Edge/IE agregan su propio ícono nativo de "revelar contraseña" (::-ms-reveal) que
   solo aparece con type="password" y queda superpuesto justo donde va nuestro botón —
   al pasar a type="text" ese ícono nativo desaparece (porque deja de aplicar), dando
   la sensación de que el ícono propio "se esfuma". Lo desactivamos para que el único
   control visible sea el nuestro, siempre. */
.password-field-wrap input::-ms-reveal,
.password-field-wrap input::-ms-clear { display:none; }
.password-toggle-btn {
  position:absolute; right:4px; top:50%; transform:translateY(-50%);
  width:32px; height:32px; display:flex; align-items:center; justify-content:center;
  background:none; border:none; cursor:pointer; color:var(--muted); border-radius:8px;
  z-index:2;
}
.password-toggle-btn:hover { color:var(--text); background:var(--surface2); }
.password-toggle-btn .icon { width:18px; height:18px; }
.login-error {
  color:var(--red); font-size:12.5px; text-align:center;
  min-height:20px; margin-top:12px; font-weight:500;
}
.login-btn {
  width:100%; justify-content:center; margin-top:16px;
  padding:12px; font-size:14px; font-weight:600;
  background:var(--ink); border-radius:10px;
  box-shadow:0 4px 12px rgba(43,33,24,.3);
}
.login-btn:hover { background:var(--blue-hover); }

/* USER INFO in topbar */
.user-info {
  display:flex; align-items:center; gap:7px;
  background:var(--surface2); border:1px solid var(--border);
  border-radius:var(--radius-sm); padding:5px 12px;
}
.user-nombre { font-size:13px; font-weight:600; color:var(--text); }
.user-rol {
  font-size:11px; font-weight:600; padding:2px 8px;
  border-radius:20px; background:var(--ink); color:#fff;
  text-transform:uppercase; letter-spacing:.4px;
}

/* HANDOFF — Cola de atención */
.handoff-item {
  padding:12px 16px; cursor:pointer;
  border-bottom:1px solid var(--border);
  transition:background .12s;
}
.handoff-item:hover { background:var(--surface2); }
.handoff-item.handoff-activo { background:var(--blue-bg); border-left:3px solid var(--blue); }
.handoff-item.handoff-mio { border-left:3px solid var(--green); }
.handoff-item-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:4px; }
.handoff-tel { font-weight:700; font-size:13px; color:var(--text); }
.handoff-ultimo { font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:200px; }
.handoff-hora { font-size:11px; color:var(--muted); margin-top:3px; font-family:var(--mono); }
/* Código de barras en Lista de Precios (29/9/2026): Sí/No en la tabla y modo de carga en el formulario */
.badge-ean-si { background:var(--green-bg); color:var(--green); border:1px solid rgba(77,124,15,.25); }
.badge-ean-no { background:var(--surface2); color:var(--muted); border:1px solid var(--border); }
.ean-modos { display:flex; gap:6px; flex-wrap:wrap; }
.ean-modo { padding:7px 12px; border-radius:var(--radius-sm); border:1px solid var(--border); background:var(--surface2); color:var(--text); font-size:12.5px; font-weight:600; cursor:pointer; display:inline-flex; align-items:center; gap:6px; }
.ean-modo.activo { border-color:var(--accent); color:var(--accent); background:transparent; }
.ean-modo:disabled { opacity:.55; cursor:not-allowed; }
/* Productos por pasos (1/10/2026): Activo → Desactivado → Eliminado */
.fila-desactivada td { opacity:.6; }
.fila-desactivada td:last-child { opacity:1; }
.badge-desactivado { background:var(--surface2); color:var(--danger); border:1px solid var(--border); margin-left:6px; font-size:10.5px; }
.ean-pronto { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.3px; padding:1px 6px; border-radius:10px; background:var(--border); color:var(--muted); }
.badge-rojo { background:rgba(185,28,28,.12); color:var(--red); border:1px solid rgba(185,28,28,.2); border-radius:20px; padding:2px 8px; font-size:11px; font-weight:600; }

/* REPARTIDOR CARDS */
.rep-pedido-card {
  border:1px solid var(--border); border-radius:var(--radius);
  padding:16px 18px; margin-bottom:12px;
  background:var(--surface); transition:box-shadow .15s;
}
.rep-pedido-card:hover { box-shadow:var(--shadow-md); }
.rep-pedido-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.rep-pedido-cliente { font-size:15px; font-weight:700; color:var(--text); }
.rep-pedido-fecha { font-size:11px; color:var(--muted); font-family:var(--mono); }
.rep-pedido-info { display:flex; gap:16px; font-size:12.5px; color:var(--text2); margin-bottom:8px; flex-wrap:wrap; }
.rep-pedido-detalle { font-size:12px; color:var(--muted); margin-bottom:12px; line-height:1.5; }
.rep-pedido-acciones { display:flex; gap:8px; }

/* TABLERO DE ASIGNACIÓN (drag & drop) */
.tablero-repartidores { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:14px; margin-bottom:20px; }
.tablero-repartidor-card {
  border:1px solid var(--border); border-radius:var(--radius);
  background:var(--surface2); padding:14px; min-height:120px;
  display:flex; flex-direction:column; gap:8px;
  transition:background .15s, border-color .15s;
}
.tablero-repartidor-card.drag-over { background:var(--blue-dim); border-color:var(--blue); border-style:dashed; }
.tablero-repartidor-header { display:flex; justify-content:space-between; align-items:center; }
.tablero-repartidor-nombre { font-size:13.5px; font-weight:700; color:var(--text); }
.tablero-repartidor-zonas { font-size:11px; color:var(--muted); }
.tablero-repartidor-pedidos { display:flex; flex-direction:column; gap:6px; min-height:36px; }
.tablero-pedido-card {
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm);
  padding:8px 10px; font-size:12px; cursor:grab; transition:box-shadow .15s, opacity .15s;
}
.tablero-pedido-card:hover { box-shadow:var(--shadow); }
.tablero-pedido-card.dragging { opacity:.4; }
.tablero-pedido-cliente { font-weight:600; color:var(--text); }
.tablero-pedido-meta { color:var(--muted); font-size:11px; margin-top:2px; }
.tablero-pool-label { display:flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:var(--muted); text-transform:uppercase; letter-spacing:.5px; margin-bottom:8px; }
.tablero-pool {
  display:flex; flex-wrap:wrap; gap:10px; min-height:56px;
  border:1px dashed var(--border2); border-radius:var(--radius); padding:12px;
  transition:background .15s, border-color .15s;
}
.tablero-pool.drag-over { background:var(--orange-bg); border-color:var(--orange); }
.tablero-pool .tablero-pedido-card { width:220px; }

/* ZONAS TAGS */
.zonas-tags {
  display:flex; flex-wrap:wrap; gap:6px; align-items:center;
  background:var(--surface2); border:1px solid var(--border);
  border-radius:var(--radius-sm); padding:8px 10px; min-height:42px;
}
.zona-tag {
  display:inline-flex; align-items:center;
  background:var(--blue-bg); color:var(--blue);
  border:1px solid rgba(194,65,12,.25);
  border-radius:20px; padding:3px 10px; font-size:12px; font-weight:500;
}
.zona-input:focus { outline:none; }

/* MODAL DEPÓSITO */
.modal-overlay {
  position:fixed; inset:0;
  z-index:500; /* por arriba del sidebar (100) y los th sticky de tablas (2) — sin esto, un thead con position:sticky se pintaba encima del modal */
  background:rgba(0,0,0,.45);
  display:flex; align-items:center; justify-content:center;
  animation:fadeIn .15s ease;
}
.modal-box {
  background:var(--surface); border-radius:var(--radius);
  padding:24px 28px; width:100%; max-width:420px;
  box-shadow:0 20px 60px rgba(0,0,0,.2);
  animation:slideUp .2s ease;
}
.modal-box-lg {
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal-box-xl {
  max-width: 760px;
  max-height: 88vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
@keyframes slideUp { from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1} }
.modal-overlay.closing { animation:fadeOut .18s ease forwards; }
.modal-overlay.closing .modal-box { animation:slideDownOut .18s ease forwards; }
@keyframes fadeOut { from{opacity:1} to{opacity:0} }
@keyframes slideDownOut { from{transform:translateY(0);opacity:1} to{transform:translateY(14px);opacity:0} }
.modal-header {
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:20px;
}
.modal-id { font-size:20px; font-weight:700; color:var(--text); font-family:var(--mono); }
.modal-close {
  background:none; border:none; cursor:pointer;
  font-size:18px; color:var(--muted); padding:4px 8px;
  border-radius:var(--radius-sm); transition:all .15s;
}
.modal-close:hover { background:var(--red-bg); color:var(--red); }
.modal-section-label {
  font-size:11px; font-weight:600; text-transform:uppercase;
  letter-spacing:.6px; color:var(--muted); margin-bottom:12px;
}
.deposito-productos {
  background:var(--surface2); border:1px solid var(--border);
  border-radius:var(--radius-sm); padding:12px 16px;
}
.deposito-prod-item {
  display:flex; justify-content:space-between; align-items:center;
  padding:8px 0; border-bottom:1px solid var(--border);
  font-size:14px;
}
.deposito-prod-item:last-child { border-bottom:none; }
.deposito-prod-nombre { color:var(--text); font-weight:500; }
.deposito-prod-qty {
  font-weight:700; color:var(--blue);
  background:var(--blue-bg); padding:2px 10px;
  border-radius:20px; font-size:13px;
}
.deposito-prod-texto { color:var(--text2); font-size:13.5px; line-height:1.6; }

/* RESPONSIVE */
@media(max-width:900px) {
  .sidebar { width:64px; }
  .sidebar .nav-label, .sidebar .nav-badge { display:none; }
  /* Rail de íconos: igual que .sidebar.collapsed — sin títulos de sección, todos los ítems visibles */
  .sidebar .nav-group { margin-top:0; }
  .sidebar .nav-group-header { display:none; }
  .sidebar .nav-group-children, .sidebar .nav-group.cerrado > .nav-group-children { max-height:none; border-left:0; margin-left:0; }
  .main { margin-left:64px; }
  .chat-layout { grid-template-columns:1fr; height:auto; }
  .stats-grid { grid-template-columns:1fr 1fr; }
}
@media(max-width:500px) {
  .stats-grid { grid-template-columns:1fr; }
  .content { padding:16px; }
}
@media(max-width:600px) {
  .topbar { flex-wrap:wrap; row-gap:8px; padding:14px 16px; }
  .topbar-right { flex-wrap:wrap; row-gap:8px; }
  .time-display { display:none; }
  .card-title { flex-wrap:wrap; row-gap:8px; }
  .card-title > div { flex-wrap:wrap; row-gap:8px; }
}

.check-row { display:flex; align-items:center; gap:10px; }
.check-bonito {
  appearance:none; -webkit-appearance:none;
  width:20px; height:20px; flex-shrink:0;
  border:2px solid var(--border2); border-radius:6px;
  background:var(--surface); cursor:pointer;
  position:relative; margin:0; top:1px;
  transition:background .15s, border-color .15s;
}
.check-bonito:hover { border-color:var(--accent); }
.check-bonito:checked { background:var(--accent); border-color:var(--accent); }
.check-bonito:checked::after {
  content:''; position:absolute; left:6px; top:2px;
  width:5px; height:10px;
  border:solid #fff; border-width:0 2px 2px 0;
  transform:rotate(45deg);
}
.check-row label { font-size:14px; color:var(--text); cursor:pointer; line-height:20px; }


/* Cartera: asignar de a muchos (1/10/2026) */
.cartera-bulk { padding:12px; background:var(--surface2); border-radius:var(--radius-sm); margin-bottom:14px; }
.cartera-bulk-titulo { font-size:11px; font-weight:700; letter-spacing:.4px; text-transform:uppercase; color:var(--muted); margin-bottom:8px; }
.cartera-bulk-filtros { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.cartera-bulk-filtros .input { width:auto; max-width:260px; font-size:13px; padding:7px 10px; }
.cartera-bulk-check { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; cursor:pointer; }
.cartera-bulk-tabla { max-height:340px; overflow:auto; margin-top:10px; background:var(--surface); border-radius:var(--radius-sm); }
.cartera-bulk-tabla thead th { position:sticky; top:0; background:var(--surface); z-index:1; }
.cartera-bulk-acciones { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top:10px; font-size:12.5px; }
/* Recorrido del día (1/10/2026) */
.recorrido-ayuda { font-size:12.5px; color:var(--muted); margin:-4px 0 12px; }
.recorrido-filtros { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:12px; }
.recorrido-filtros .input { width:auto; font-size:13px; padding:7px 10px; }
.recorrido-resumen { font-size:12.5px; color:var(--muted); }
.recorrido-cuerpo { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:12px; }
.recorrido-mapa { height:380px; border-radius:10px; border:1px solid var(--border); overflow:hidden; }
.recorrido-lista { list-style:none; margin:0; padding:0; max-height:380px; overflow:auto; display:flex; flex-direction:column; gap:6px; }
.recorrido-lista li { display:flex; gap:10px; align-items:flex-start; padding:8px 10px; border:1px solid var(--border); border-radius:var(--radius-sm); cursor:pointer; font-size:12.5px; }
.recorrido-lista li:hover { border-color:var(--accent); }
.recorrido-lista li.recorrido-vacio { cursor:default; color:var(--muted); border-style:dashed; }
.recorrido-lista li.recorrido-revisar { border-left:4px solid var(--danger); }
.recorrido-num { flex:0 0 24px; height:24px; border-radius:50%; background:var(--accent); color:#fff; font-weight:700; font-size:12px; display:flex; align-items:center; justify-content:center; }
.recorrido-revisar .recorrido-num { background:var(--danger); }
.recorrido-cliente { font-weight:600; }
.recorrido-detalle { color:var(--muted); margin-top:2px; }
.recorrido-marca { width:26px; height:26px; border-radius:50%; background:var(--accent); color:#fff; font-weight:700; font-size:12px; display:flex; align-items:center; justify-content:center; border:2px solid #fff; box-shadow:0 1px 4px rgba(0,0,0,.35); }
.recorrido-marca.revisar { background:var(--danger); }
@media (max-width: 900px) { .recorrido-cuerpo { grid-template-columns:1fr; } .recorrido-mapa { height:300px; } }
/* Leyenda del mapa del detalle de relevamiento (6/10/2026) */
.mapa-leyenda { display:flex; gap:14px; flex-wrap:wrap; font-size:11.5px; color:var(--muted); margin-top:6px; }
.mapa-leyenda i { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:5px; vertical-align:-1px; border:1px solid rgba(0,0,0,.25); }
/* Punto de cliente en los mapas (iconoCliente, js/clientes.js): violeta liso con borde blanco fino (22/10/2026;
   antes era dorado). Sin animación ni aura a propósito (23/10/2026): con cientos de clientes trababa el mapa. */
.marca-cliente { width:14px; height:14px; box-sizing:border-box; border-radius:50%; background:#7C3AED; border:1px solid #fff; box-shadow:0 1px 3px rgba(0,0,0,.45); }

/* ════ ADMINISTRACIÓN (mini ERP, 6/10/2026) — js/erp_*.js ════ */
.erp-toolbar { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:14px; }
.erp-inline { display:inline-flex; align-items:center; gap:8px; font-size:12.5px; color:var(--text2); font-weight:500; }
.erp-inline .input { width:auto; }
.erp-sub { font-size:11.5px; color:var(--muted); }
.erp-mono { font-family:var(--mono); font-size:12.5px; white-space:nowrap; }
.erp-num { text-align:right; font-family:var(--mono); font-size:12.5px; white-space:nowrap; }
.erp-debe { color:var(--orange); }
.erp-haber { color:var(--green); }
.erp-nc td.erp-num { color:var(--green); }
.erp-anulada td { opacity:.5; text-decoration:line-through; }
.erp-anulada td:last-child, .erp-anulada .erp-sub { text-decoration:none; }
.erp-chip { display:inline-block; padding:1px 7px; border-radius:6px; background:var(--surface2); border:1px solid var(--border); font-size:10.5px; font-weight:700; color:var(--text2); font-family:var(--mono); }
.erp-chip-azul { background:var(--blue-bg); color:var(--blue); border-color:rgba(194,65,12,.3); }
.erp-stat-pesos { font-size:24px; letter-spacing:-.5px; }
/* Bancos (erp_bancos.js): tarjetas de cuentas */
.erp-bco-cuentas { display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:10px; }
.erp-bco-cuenta { border:1px solid var(--border); border-radius:var(--radius-sm); padding:12px 14px; cursor:pointer; background:var(--surface); transition:border-color .15s, box-shadow .15s; }
.erp-bco-cuenta:hover { border-color:var(--border2); }
.erp-bco-cuenta.activa { border-color:var(--blue); box-shadow:0 0 0 2px var(--blue-bg); }
.erp-bco-cuenta.inactiva { opacity:.55; }
.erp-perc-bloque { border:1px solid var(--border); border-radius:var(--radius-sm); padding:14px; margin-top:12px; background:var(--surface2); }
.erp-campo label.erp-inline { text-transform:none; letter-spacing:0; font-size:12.5px; font-weight:500; margin:0; }
.erp-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(180px, 1fr)); gap:12px 14px; margin-bottom:12px; }
.erp-campo { min-width:0; }
.erp-campo .form-label { margin-bottom:5px; }
.erp-seccion { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; color:var(--muted); margin:14px 0 8px; padding-top:12px; border-top:1px solid var(--border); }
.erp-acciones { display:flex; gap:10px; justify-content:flex-end; align-items:center; flex-wrap:wrap; margin-top:16px; }
.erp-total-box { display:flex; justify-content:space-between; align-items:center; background:var(--blue-bg); border:1px solid rgba(194,65,12,.25); border-radius:var(--radius-sm); padding:12px 16px; margin:4px 0 12px; font-size:13px; color:var(--text2); }
.erp-total-box strong { font-size:20px; font-family:var(--mono); color:var(--text); }
.erp-input-mal { border-color:var(--red) !important; background:var(--red-bg) !important; }
.erp-modal { max-height:90vh; overflow-y:auto; overscroll-behavior:contain; }
.modal-box-xl.erp-modal { max-width:900px; }
.modal-box-xl.erp-modal.erp-modal-xxl { max-width:min(1240px, 96vw); }
#erpModal2 .modal-overlay { z-index:510; }
.erp-resumen-cuenta { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; margin-bottom:16px; }
.erp-saldo { font-size:28px; font-weight:700; font-family:var(--mono); letter-spacing:-.5px; }
.erp-card-plana { box-shadow:none; background:var(--surface2); margin-bottom:16px; }
.erp-card-info { background:var(--surface2); box-shadow:none; }
.erp-aviso { display:flex; gap:8px; align-items:flex-start; background:var(--orange-bg); color:var(--text2); border:1px solid rgba(161,98,7,.3); border-radius:var(--radius-sm); padding:8px 12px; font-size:12.5px; margin-bottom:10px; }
.erp-aviso .icon { color:var(--orange); flex-shrink:0; width:16px; height:16px; }
.erp-tabla-chica td, .erp-tabla-chica th { font-size:12px; padding-left:8px; padding-right:8px; }
.erp-fila-total td { font-weight:700; background:var(--surface2); border-top:2px solid var(--border2); }
.erp-pasos { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:12px; }
.erp-pasos li { display:flex; gap:12px; align-items:flex-start; font-size:13.5px; }
.erp-paso-check { flex-shrink:0; width:22px; height:22px; border-radius:50%; border:2px solid var(--border2); display:flex; align-items:center; justify-content:center; margin-top:1px; }
.erp-pasos li.hecho .erp-paso-check { border-color:var(--green); background:var(--green-bg); color:var(--green); }
.erp-pasos li.hecho .erp-paso-check .icon { width:14px; height:14px; }
.erp-pasos li.hecho > div > strong { color:var(--muted); text-decoration:line-through; }
@media (max-width:600px) {
  .erp-grid { grid-template-columns:1fr 1fr; }
  .erp-grid > .erp-campo[style*="span 2"] { grid-column:1/-1 !important; }
  .erp-resumen-cuenta { flex-direction:column; align-items:flex-start; }
  .erp-stat-pesos { font-size:20px; }
}
/* Ventas (etapa 2, 6/10/2026) */
.erp-aviso-azul { background:var(--blue-bg); border-color:rgba(194,65,12,.3); }
.erp-aviso-azul .icon { color:var(--blue); }
/* Completar datos desde un Excel (044) */
.erp-datos-pasos { display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; margin-bottom:12px; }
.erp-datos-pasos > div { background:var(--surface2); border:1px solid var(--border); border-radius:var(--radius-sm); padding:8px 10px; font-size:12.5px; line-height:1.4; }
.erp-datos-pasos b { display:inline-flex; width:20px; height:20px; border-radius:50%; background:var(--blue); color:#fff; align-items:center; justify-content:center; font-size:11px; margin-right:6px; }
.erp-datos-tipos { display:flex; gap:6px; flex-wrap:wrap; }
.erp-datos-campos { display:grid; grid-template-columns:repeat(2, 1fr); gap:6px 14px; }
.erp-datos-campos label, label.erp-datos-lbl { display:flex; gap:8px; align-items:flex-start; font-size:13px; cursor:pointer; text-transform:none; letter-spacing:normal; font-weight:400; color:var(--text); margin-bottom:0; }
label.btn.erp-datos-lbl { display:inline-flex; align-items:center; font-size:12px; font-weight:600; color:#fff; }
.erp-datos-campos input { margin-top:2px; }
.erp-datos-est { display:inline-block; font-size:11px; font-weight:600; padding:2px 8px; border-radius:20px; white-space:nowrap; }
.erp-datos-est-ok { background:var(--green-bg); color:var(--green); }
.erp-datos-est-mal { background:var(--red-bg); color:var(--red); }
.erp-datos-est-gris { background:var(--surface2); color:var(--muted); border:1px solid var(--border); }
.erp-datos-cargas { margin-top:14px; font-size:13px; }
.erp-datos-cargas summary { cursor:pointer; font-weight:600; color:var(--text2); }
@media (max-width:700px) { .erp-datos-pasos, .erp-datos-campos { grid-template-columns:1fr; } }
.erp-aviso a { color:var(--blue); font-weight:600; }
.erp-items { width:100%; min-width:720px; }
.erp-items td { padding:4px 4px; vertical-align:middle; }
.erp-items .input { padding:7px 9px; font-size:12.5px; }
.erp-tot-fila { display:flex; justify-content:space-between; font-size:12.5px; padding:2px 0; color:var(--text2); }
.erp-tot-final { border-top:1px solid rgba(194,65,12,.25); margin-top:6px; padding-top:8px; font-size:13px; color:var(--text); }
.erp-tot-final strong { font-size:20px; font-family:var(--mono); }
/* Texto de ayuda debajo de un campo (ej. "Monotributista · CUIT … · sale Factura A"): separado del input (7/10/2026) */
.erp-campo > .erp-sub { margin-top:6px; line-height:1.45; }
/* Extras TusFacturas (8/10/2026): cupo del plan y mail de la factura */
.erp-cupo { display:flex; gap:10px; align-items:center; flex-wrap:wrap; font-size:12.5px; color:var(--text2); margin:8px 0 12px; }
.erp-cupo:empty { display:none; }
.erp-mail-box { margin-top:12px; padding:12px 14px; background:var(--surface2); border:1px solid var(--border); border-radius:var(--radius-sm); display:flex; flex-direction:column; gap:8px; }

/* ── Preparar pedido (Depósito, 8/10/2026) ── */
.prep-lista { display:flex; flex-direction:column; gap:10px; }
.prep-fila { border:1px solid var(--border); border-left:4px solid var(--border2); border-radius:var(--radius-sm); padding:10px 12px; background:var(--surface); display:flex; flex-direction:column; gap:8px; }
.prep-fila[data-estado="ok"] { border-left-color:var(--green); background:var(--green-bg); }
.prep-fila[data-estado="parcial"] { border-left-color:var(--orange); background:var(--orange-bg); }
.prep-fila[data-estado="no_hay"] { border-left-color:var(--red); background:var(--red-bg); }
.prep-fila[data-estado="no_hay"] .prep-nombre { text-decoration:line-through; color:var(--text2); }
.prep-top { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.prep-nombre { font-weight:600; font-size:14px; }
.prep-btns { display:flex; gap:6px; }
.prep-b { min-width:44px; height:38px; padding:0 12px; border-radius:var(--radius-sm); border:1.5px solid var(--border2); background:var(--surface); color:var(--text2); font:600 13px var(--font); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:4px; }
.prep-b:disabled { opacity:.5; cursor:not-allowed; }
.prep-b-ok:hover, .prep-fila[data-estado="ok"] .prep-b-ok { border-color:var(--green); color:#fff; background:var(--green); }
.prep-b-parcial:hover, .prep-fila[data-estado="parcial"] .prep-b-parcial { border-color:var(--orange); color:#fff; background:var(--orange); }
.prep-b-nohay:hover, .prep-fila[data-estado="no_hay"] .prep-b-nohay { border-color:var(--red); color:#fff; background:var(--red); }
.prep-parcial-box { display:none; align-items:center; gap:8px; font-size:13px; color:var(--text2); }
.prep-fila[data-estado="parcial"] .prep-parcial-box { display:flex; }
.prep-cant { width:90px; }
.prep-nota { font-size:12.5px; }
.prep-pie { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-top:12px; font-size:13px; color:var(--text2); }
.prep-chip { display:inline-block; font-size:11px; font-weight:600; padding:1px 7px; border-radius:20px; margin-right:4px; }
.prep-chip-ok { background:var(--green-bg); color:var(--green); }
.prep-chip-parcial { background:var(--orange-bg); color:#b45309; }
.prep-chip-nohay { background:var(--red-bg); color:var(--red); }
.prep-det-fila { display:flex; flex-direction:column; gap:2px; }

/* ── Cuentas corrientes: formas de pago de la cobranza (8/10/2026) ── */
.erp-cob-medio { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:6px; }
.erp-cob-medio .erp-cob-medio-tipo { width:160px; }
.erp-cob-medio .erp-cob-medio-imp { width:140px; text-align:right; }
.erp-cob-medio .erp-cob-medio-ref { flex:1; min-width:160px; }
.erp-cob-medio .erp-cob-medio-banco { width:140px; }
.erp-cob-medio .erp-cob-medio-fecha { width:150px; }

/* Preparar pedido: "Cambio" = va otro producto en su lugar (9/10/2026) */
.prep-fila[data-estado="cambio"] { border-left-color:var(--orange); background:var(--orange-bg); }
.prep-b-cambio:hover, .prep-fila[data-estado="cambio"] .prep-b-cambio { border-color:var(--orange); color:#fff; background:var(--orange); }
.prep-cambio-box { display:none; align-items:center; gap:8px; font-size:13px; color:var(--text2); flex-wrap:wrap; }
.prep-fila[data-estado="cambio"] .prep-cambio-box { display:flex; }
.prep-reemp { flex:1; min-width:240px; }
.prep-reemp-cant { width:90px; }
/* Ventas como MixTrack (017, 12/10/2026): modo demo, pestañas, cobro, comisiones, reportes */
.erp-demo-franja { display:flex; gap:8px; align-items:flex-start; background:var(--purple-bg); color:var(--text2); border:1px dashed var(--purple); border-radius:var(--radius-sm); padding:8px 12px; font-size:12.5px; margin-bottom:14px; }
.erp-demo-franja .icon { color:var(--purple); flex-shrink:0; width:16px; height:16px; }
.erp-demo-franja strong { color:var(--purple); }
.erp-tabs { display:flex; gap:4px; border-bottom:1px solid var(--border); margin-bottom:16px; flex-wrap:wrap; }
.erp-tab { padding:9px 16px; background:none; border:none; border-bottom:2px solid transparent; color:var(--text2); font-size:13.5px; font-weight:600; cursor:pointer; font-family:var(--font); margin-bottom:-1px; display:flex; align-items:center; gap:6px; }
.erp-tab .icon { width:15px; height:15px; }
.erp-tab.active { color:var(--blue); border-bottom-color:var(--blue); }
.erp-cobro { display:inline-block; padding:2px 8px; border-radius:20px; font-size:11px; font-weight:700; white-space:nowrap; }
.erp-cobro-ok { background:var(--green-bg); color:var(--green); }
.erp-cobro-pend { background:var(--orange-bg); color:var(--orange); }
.erp-cobro-venc { background:var(--red-bg); color:var(--red); }
.erp-cobro-na { background:var(--surface2); color:var(--muted); font-weight:500; }
.erp-limite { margin-top:6px; }
.erp-limite .erp-aviso { margin:0; }
.erp-com-card { border:1px solid var(--border); border-radius:var(--radius-sm); padding:14px 16px; margin-bottom:12px; background:var(--surface); }
.erp-com-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; flex-wrap:wrap; }
.erp-com-monto { font-size:22px; font-weight:700; font-family:var(--mono); color:var(--green); }
.erp-com-pct { display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--text2); }
.erp-com-pct .input { width:72px; padding:5px 8px; font-family:var(--mono); }
.erp-barras { display:flex; align-items:flex-end; gap:6px; height:160px; padding:8px 4px 0; }
.erp-barra { flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; height:100%; justify-content:flex-end; min-width:0; }
.erp-barra-col { width:100%; max-width:42px; background:var(--border2); border-radius:4px 4px 0 0; min-height:3px; }
.erp-barra.actual .erp-barra-col { background:var(--blue); }
.erp-barra-lbl { font-size:10.5px; color:var(--muted); white-space:nowrap; }
/* Detalle de una barra al pasar el mouse o tocarla (js/nucleo.js, barraMostrar) */
.erp-barras { position:relative; }
.erp-barra { cursor:pointer; }
.erp-barra:hover .erp-barra-col { filter:brightness(.92); }
.erp-barra.fija .erp-barra-col { box-shadow:0 0 0 2px var(--surface), 0 0 0 4px var(--blue); }
.erp-barra-tip { position:absolute; z-index:5; transform:translate(-50%, -100%); pointer-events:none; white-space:nowrap;
  background:var(--text); color:var(--bg); font-size:12px; font-weight:500; padding:6px 10px; border-radius:7px; box-shadow:var(--shadow-md); }
.erp-barra-tip::after { content:''; position:absolute; left:50%; bottom:-5px; margin-left:-5px; border:5px solid transparent; border-bottom:0; border-top-color:var(--text); }
.erp-placeholder { border:2px dashed var(--border2); border-radius:var(--radius-sm); padding:28px 16px; text-align:center; color:var(--muted); font-size:13px; }
/* Links (14/10/2026): antes usaban el azul por defecto del navegador, ilegible en modo oscuro.
   Claro = azul subrayado; oscuro = blanco subrayado. Siempre subrayados para que se note que se pueden tocar. */
#appShell a:not(.btn):not([class*="leaflet"]) { color:var(--blue); text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:2px; cursor:pointer; }
#appShell a:not(.btn):not([class*="leaflet"]):hover { text-decoration-thickness:2px; }
#appShell.dark-theme a:not(.btn):not([class*="leaflet"]) { color:var(--text); text-decoration-color:rgba(241,230,210,.55); }
#appShell.dark-theme a:not(.btn):not([class*="leaflet"]):hover { color:#fff; text-decoration-color:#fff; }
/* Cuentas corrientes → Importar / Exportar (14/10/2026, por ahora solo el diseño) */
.erp-pasos-h { display:flex; align-items:center; gap:8px; margin:6px 0 18px; flex-wrap:wrap; }
.erp-pasos-h-item { display:flex; align-items:center; gap:7px; font-size:12.5px; font-weight:600; color:var(--muted); }
.erp-pasos-h-item.actual { color:var(--blue); }
.erp-pasos-h-item.hecho { color:var(--green); }
.erp-pasos-h-num { width:22px; height:22px; border-radius:50%; border:2px solid currentColor; display:inline-flex; align-items:center; justify-content:center; font-size:11px; }
.erp-pasos-h-item.actual .erp-pasos-h-num { background:var(--blue); border-color:var(--blue); color:#fff; }
.erp-pasos-h-linea { flex:1; min-width:16px; height:2px; background:var(--border); }
.erp-drop { display:flex; flex-direction:column; align-items:center; gap:6px; padding:28px 16px; border:2px dashed var(--border2); border-radius:var(--radius-sm); cursor:pointer; text-align:center; color:var(--text2); background:var(--surface2); transition:border-color .15s, background .15s; text-transform:none; letter-spacing:0; font-size:13.5px; font-weight:500; margin:0; }
.erp-drop .icon { width:28px; height:28px; color:var(--blue); }
.erp-drop:hover, .erp-drop.sobre { border-color:var(--blue); background:var(--blue-bg); }
.erp-opciones { display:flex; flex-direction:column; gap:8px; }
.erp-opcion { display:flex; gap:10px; align-items:flex-start; padding:12px 14px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); cursor:pointer; text-transform:none; letter-spacing:0; font-size:13px; font-weight:500; color:var(--text); margin:0; font-family:var(--font); width:100%; }
.erp-opcion:hover:not(:disabled) { border-color:var(--blue); }
.erp-opcion:disabled { opacity:.55; cursor:not-allowed; }
.erp-opcion input { margin-top:3px; }
.erp-opcion .icon { flex-shrink:0; width:18px; height:18px; color:var(--blue); margin-top:2px; }
/* Barras horizontales de reportes (Compras → Reportes, 14/10/2026) */
.erp-cc-tramo { display:flex; align-items:center; gap:10px; padding:5px 0; font-size:12.5px; }
.erp-cc-tramo > span:first-child { width:150px; flex-shrink:0; color:var(--text2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.erp-cc-barra { flex:1; height:10px; background:var(--surface2); border-radius:5px; overflow:hidden; min-width:40px; }
.erp-cc-barra > div { height:100%; border-radius:5px; }
.erp-cc-tramo > strong { min-width:110px; text-align:right; }

/* ── Inicio del dueño (19/10/2026): la plata, "Para atender hoy" y los últimos 14 días ── */
.inicio-seccion-h { font-size:13px; font-weight:700; color:var(--text); text-transform:uppercase; letter-spacing:.6px; margin:4px 0 10px; }
.inicio-seccion-h span { font-weight:500; color:var(--muted); text-transform:none; letter-spacing:0; }
.inicio-kpis { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-bottom:18px; }
@media (max-width: 1100px) { .inicio-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 560px) { .inicio-kpis { grid-template-columns:1fr; } }
.inicio-kpi { padding:16px 18px; }
.inicio-kpi .stat-sub { line-height:1.35; }
.inicio-kpi:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.inicio-dos { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:14px; margin-bottom:18px; }
@media (max-width: 900px) { .inicio-dos { grid-template-columns:1fr; } }
.inicio-alertas { display:flex; flex-direction:column; gap:6px; }
/* 29/10/2026: "Para atender hoy" y el gráfico con la misma altura; si hay muchos avisos, scroll adentro con una barra visible. */
.inicio-dos > .card { height:290px; display:flex; flex-direction:column; }
.inicio-dos .inicio-alertas { flex:1; min-height:0; overflow-y:auto; padding-right:8px; scrollbar-width:auto; scrollbar-color:var(--border2) transparent; }
.inicio-dos .inicio-alertas::-webkit-scrollbar { width:10px; }
.inicio-dos .inicio-alertas::-webkit-scrollbar-track { background:var(--surface2); border-radius:10px; }
.inicio-dos .inicio-alertas::-webkit-scrollbar-thumb { background:var(--border2); border-radius:10px; border:2px solid var(--surface2); }
.inicio-dos .inicio-alertas::-webkit-scrollbar-thumb:hover { background:var(--text-muted, #8a7d6b); }
.inicio-dos .erp-barras { flex:1; height:auto; min-height:110px; }
@media (max-width: 900px) { .inicio-dos > .card { height:auto; } .inicio-dos .inicio-alertas { max-height:290px; } .inicio-dos .erp-barras { height:150px; flex:none; } }
.inicio-alerta { display:flex; align-items:center; gap:10px; width:100%; text-align:left; padding:10px 12px; border-radius:var(--radius-sm);
  border:1px solid var(--border); border-left:3px solid var(--border2); background:var(--surface); color:var(--text); font:inherit; font-size:13px; cursor:pointer; transition:background .15s, border-color .15s; }
.inicio-alerta:hover { background:var(--surface2); border-color:var(--border2); }
.inicio-alerta.rojo { border-left-color:var(--red); }
.inicio-alerta.amarillo { border-left-color:var(--orange); }
.inicio-alerta.azul { border-left-color:var(--blue); }
.inicio-alerta-ico { display:flex; color:var(--muted); }
.inicio-alerta.rojo .inicio-alerta-ico { color:var(--red); }
.inicio-alerta.amarillo .inicio-alerta-ico { color:var(--orange); }
.inicio-alerta-txt { flex:1; min-width:0; }
.inicio-alerta-ir { font-size:11.5px; color:var(--muted); white-space:nowrap; }
.inicio-ok { display:flex; align-items:center; gap:8px; padding:14px 12px; color:var(--green); font-size:13px; font-weight:600; }

/* Pedidos de aumento de límite (Preventistas, 21/10/2026) */
.solicitud-fila{display:flex;gap:12px;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid var(--border);}
.solicitud-fila:last-child{border-bottom:none;}
.solicitud-fila.pendiente{border-left:3px solid var(--primary);padding-left:10px;}
.solicitud-info{flex:1;min-width:240px;}
.solicitud-acciones{display:flex;gap:6px;flex-wrap:wrap;align-items:center;}

/* ════ ESTILO ALMACÉN — toques finales (26/10/2026) ════
   Títulos y números grandes con letra de imprenta (Fraunces); el resto queda igual. */
.topbar-title { font-family:var(--font-titulo); font-size:21px; font-weight:600; letter-spacing:-.2px; }
.stat-val, .login-title, .modal-title, .modal-header h2, .modal-header h3 { font-family:var(--font-titulo); letter-spacing:-.5px; font-weight:600; }
.stat-label, .card-title { color:var(--muted); letter-spacing:.08em; }
.stat-card::before { height:0; }
.stat-card { border-top:3px solid var(--border2); }
.stat-card.green  { border-top-color:var(--green); }
.stat-card.blue   { border-top-color:var(--blue); }
.stat-card.orange { border-top-color:var(--orange); }
.stat-card.red    { border-top-color:var(--red); }
.sidebar { background:var(--ink); }
.sidebar-logo, .nav-group-children { border-color:rgba(255,247,237,.08); }
.nav-group-header { color:rgba(214,199,173,.6); }
.nav-group-header:hover { color:#fff7ed; }
.nav-item.active .nav-badge { background:var(--on-blue); color:var(--blue); }
.user-rol { background:var(--blue); color:var(--on-blue); }
::selection { background:var(--blue-bg); color:var(--text); }

/* ════ CONTROLES CON ESTILO (26/10/2026) — antes eran los "de fábrica" del navegador.
   Modelos elegidos en maquetas/controles_almacen.html: casillas A, opciones A (y tarjetas en Importar),
   desplegables A con la lista estilizada, fechas B, números limpios (− / + solo en .num-pasos), "ver más" B. ════ */
:root {
  color-scheme: light;
  --ico-flecha: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a6d4b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --ico-cal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23c2410c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
  --anillo-foco: rgba(194,65,12,.18);
}
#appShell.dark-theme {
  color-scheme: dark;   /* almanaques, listas nativas y barras de scroll también en oscuro */
  --ico-flecha: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b6a488' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --ico-cal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23e0ac52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
  --anillo-foco: rgba(224,172,82,.22);
}

/* Casillas — "Cajita": se llena con el color principal y aparece el tilde; rayita si están "algunas" */
#appShell input[type=checkbox]:not(.check-bonito) {
  appearance:none; -webkit-appearance:none; width:18px; height:18px; flex-shrink:0; margin:0; vertical-align:-4px;
  border:2px solid var(--border2); border-radius:5px; background:var(--surface); cursor:pointer;
  display:inline-grid; place-content:center; transition:background .15s, border-color .15s;
}
#appShell input[type=checkbox]:not(.check-bonito)::after {
  content:''; width:9px; height:5px; margin-top:-2px; border:2px solid var(--on-blue); border-top:0; border-right:0;
  transform:rotate(-45deg) scale(0); transition:transform .15s;
}
#appShell input[type=checkbox]:not(.check-bonito):hover { border-color:var(--blue); }
#appShell input[type=checkbox]:not(.check-bonito):checked,
#appShell input[type=checkbox]:not(.check-bonito):indeterminate { background:var(--blue); border-color:var(--blue); }
#appShell input[type=checkbox]:not(.check-bonito):checked::after { transform:rotate(-45deg) scale(1); }
#appShell input[type=checkbox]:not(.check-bonito):indeterminate::after { width:8px; height:0; margin-top:0; border-left:0; transform:none; }

/* Opciones — "Puntito" */
#appShell input[type=radio] {
  appearance:none; -webkit-appearance:none; width:18px; height:18px; flex-shrink:0; margin:0; vertical-align:-4px;
  border:2px solid var(--border2); border-radius:50%; background:var(--surface); cursor:pointer;
  display:inline-grid; place-content:center; transition:border-color .15s;
}
#appShell input[type=radio]::after { content:''; width:8px; height:8px; border-radius:50%; background:var(--blue); transform:scale(0); transition:transform .15s cubic-bezier(.3,1.4,.5,1); }
#appShell input[type=radio]:hover, #appShell input[type=radio]:checked { border-color:var(--blue); }
#appShell input[type=radio]:checked::after { transform:scale(1); }
#appShell input[type=checkbox]:disabled, #appShell input[type=radio]:disabled { opacity:.5; cursor:not-allowed; }
#appShell input[type=checkbox]:focus-visible, #appShell input[type=radio]:focus-visible { outline:none; box-shadow:0 0 0 3px var(--anillo-foco); }
/* Opciones que necesitan explicación (Importar): la tarjeta elegida se pinta entera */
.erp-opcion:has(input[type=radio]:checked) { border-color:var(--blue); background:var(--blue-bg); }

/* Desplegables — con flechita */
select.input { background-image:var(--ico-flecha); background-repeat:no-repeat; background-position:right 12px center; padding-right:34px; }
select.input option { background:var(--surface); color:var(--text); }
/* La lista que se abre, con estilo propio (Chrome/Edge nuevos; en otros navegadores queda la lista de siempre) */
@supports (appearance: base-select) {
  select.input, select.input::picker(select) { appearance:base-select; }
  select.input::picker-icon { display:none; }   /* ya está la flechita de fondo */
  select.input::picker(select) {
    background:var(--surface); color:var(--text); border:1px solid var(--border2); border-radius:10px;
    padding:4px; margin-top:4px; box-shadow:var(--shadow-md); max-height:320px;
  }
  select.input option { padding:8px 10px; border-radius:6px; font-size:13.5px; cursor:pointer; background:transparent; }
  select.input option:hover, select.input option:focus-visible { background:var(--blue-bg); outline:none; }
  select.input option:checked { color:var(--blue); font-weight:600; }
  select.input option::checkmark { color:var(--blue); }
  select.input option:disabled { color:var(--muted); cursor:default; }
}

/* Fechas — ícono adelante; se abre tocando en cualquier parte del cuadro */
#appShell input.input[type=date], #appShell input.input[type=month], #appShell input.input[type=datetime-local] {
  position:relative; padding-left:38px; cursor:pointer;
  background-image:var(--ico-cal); background-repeat:no-repeat; background-position:12px center;
}
#appShell input.input[type=date]::-webkit-calendar-picker-indicator,
#appShell input.input[type=month]::-webkit-calendar-picker-indicator,
#appShell input.input[type=datetime-local]::-webkit-calendar-picker-indicator {
  position:absolute; inset:0; width:auto; height:auto; margin:0; opacity:0; cursor:pointer;
}
#appShell input.input:disabled { cursor:not-allowed; opacity:.65; }

/* Números — sin las flechitas del navegador; con − / + donde sirve sumar de a poco (clase .num-pasos, js/nucleo.js) */
#appShell input[type=number] { -moz-appearance:textfield; appearance:textfield; }
#appShell input[type=number]::-webkit-inner-spin-button,
#appShell input[type=number]::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
.num-pasos-wrap { display:flex; width:100%; min-width:0; }
.num-pasos-wrap .input { border-radius:0; border-left:0; border-right:0; text-align:center; min-width:48px; flex:1; }
.num-pasos-wrap button {
  flex:0 0 36px; border:1px solid var(--border); background:var(--surface2); color:var(--text);
  font:inherit; font-size:17px; line-height:1; cursor:pointer; transition:background .15s, color .15s;
}
.num-pasos-wrap button:first-child { border-radius:var(--radius-sm) 0 0 var(--radius-sm); }
.num-pasos-wrap button:last-child { border-radius:0 var(--radius-sm) var(--radius-sm) 0; }
.num-pasos-wrap button:hover:not(:disabled) { background:var(--blue-bg); color:var(--blue); }
.num-pasos-wrap button:disabled { opacity:.4; cursor:not-allowed; }

/* "Ver más" — acordeón con flechita que apunta abajo (cerrado) y arriba (abierto) */
#appShell details { border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface2); }
#appShell details > summary {
  list-style:none; cursor:pointer; padding:9px 14px; display:flex; align-items:center; justify-content:space-between; gap:10px;
  font-size:13px; font-weight:600; color:var(--text);
}
#appShell details > summary::-webkit-details-marker { display:none; }
#appShell details > summary::after { content:''; width:12px; height:12px; flex-shrink:0; background:var(--ico-flecha) no-repeat center; transition:transform .2s; }
#appShell details[open] > summary::after { transform:rotate(180deg); }
#appShell details > summary:hover { color:var(--blue); }
#appShell details > :not(summary) { padding:0 14px 12px; }

/* ════ ESTILO "ORIGINAL" (26/10/2026) — el look de antes de Almacén: blanco/gris, sidebar azul, letra Inter.
   Se elige en Configuración → Estilo del panel (js/configuracion.js); se guarda en esta compu (localStorage
   'dora_estilo') y se aplica como <html data-estilo="original"> antes de dibujar (script en el <head>).
   Solo cambia colores y letras: los controles (casillas, desplegables, etc.) son los mismos en los dos estilos. ════ */
html[data-estilo="original"] {
  --bg:        #f4f6f9;
  --surface:   #ffffff;
  --surface2:  #f8f9fb;
  --border:    #e5e9f0;
  --border2:   #d0d7e3;
  --text:      #1a1f2e;
  --text2:     #4a5568;
  --muted:     #8a96a8;
  --ink:       #153d7e;
  --ink-text:  rgba(255,255,255,.65);
  --ink-hover: rgba(255,255,255,.12);
  --green:     #10b981;
  --green-bg:  #ecfdf5;
  --green-dim: rgba(16,185,129,.12);
  --blue:      #3b82f6;
  --blue-hover:#2563eb;
  --blue-bg:   #eff6ff;
  --blue-dim:  rgba(59,130,246,.12);
  --on-blue:   #ffffff;
  --purple:    #8b5cf6;
  --purple-bg: #f5f3ff;
  --teal:      #14b8a6;
  --teal-bg:   #f0fdfa;
  --orange:    #f59e0b;
  --orange-bg: #fffbeb;
  --red:       #ef4444;
  --red-bg:    #fef2f2;
  --red-dim:   rgba(239,68,68,.12);
  --warn:      #f59e0b;
  --accent:    #3b82f6;
  --accent2:   #8b5cf6;
  --accent3:   #f59e0b;
  --danger:    #ef4444;
  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --font:      'Inter', sans-serif;
  --font-titulo: 'Inter', sans-serif;
  --anillo-foco: rgba(59,130,246,.2);
  --ico-flecha: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a96a8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --ico-cal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
}
html[data-estilo="original"] #appShell.dark-theme {
  --bg:        #11151c;
  --surface:   #1a1f2b;
  --surface2:  #20262f;
  --border:    #2a313d;
  --border2:   #3a4250;
  --text:      #e7eaf0;
  --text2:     #aab2c0;
  --muted:     #6b7686;
  --ink:       #1c2128;
  --ink-text:  rgba(255,255,255,.65);
  --ink-hover: rgba(16,185,129,.18);
  --green:     #10b981;
  --green-bg:  rgba(16,185,129,.15);
  --blue:      #3b82f6;
  --blue-hover:#60a5fa;
  --blue-bg:   rgba(59,130,246,.15);
  --on-blue:   #ffffff;
  --purple:    #8b5cf6;
  --purple-bg: rgba(139,92,246,.15);
  --teal:      #14b8a6;
  --teal-bg:   rgba(20,184,166,.15);
  --orange:    #f59e0b;
  --orange-bg: rgba(245,158,11,.15);
  --red:       #ef4444;
  --red-bg:    rgba(239,68,68,.15);
  --warn:      #f59e0b;
  --accent:    #3b82f6;
  --danger:    #ef4444;
  --shadow:    0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3);
  --anillo-foco: rgba(59,130,246,.3);
  --ico-flecha: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7686' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --ico-cal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2360a5fa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
}
html[data-estilo="original"] body.dark-bg { background:#11151c; }
html[data-estilo="original"] .nav-item.active { background:rgba(255,255,255,.18); color:#fff; }
html[data-estilo="original"] #appShell.dark-theme .nav-item.active { background:rgba(16,185,129,.25); color:#fff; }
html[data-estilo="original"] .nav-item.active .nav-badge { background:var(--red); color:#fff; }
html[data-estilo="original"] .nav-group-header { color:rgba(255,255,255,.5); }
html[data-estilo="original"] .sidebar-logo, html[data-estilo="original"] .nav-group-children { border-color:rgba(255,255,255,.1); }
html[data-estilo="original"] .topbar-title { font-size:18px; font-weight:700; letter-spacing:-.3px; }
html[data-estilo="original"] .stat-val { font-weight:700; letter-spacing:-1.5px; }
html[data-estilo="original"] .stat-label, html[data-estilo="original"] .card-title { letter-spacing:.6px; }
html[data-estilo="original"] #loginScreen { background:linear-gradient(135deg, #0f2352 0%, #153d7e 60%, #1a4a99 100%); }
html[data-estilo="original"] .login-card { background:#ffffff; }
html[data-estilo="original"] #appShell.dark-theme a:not(.btn):not([class*="leaflet"]) { text-decoration-color:rgba(231,234,240,.55); }

/* ════ Configuración → Estilo del panel: tarjetas con una vista previa en miniatura ════ */
.estilos-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(250px, 1fr)); gap:16px; }
.estilo-op { border:2px solid var(--border); border-radius:var(--radius); background:var(--surface); overflow:hidden; display:flex; flex-direction:column; transition:border-color .15s, box-shadow .15s; }
.estilo-op:hover { border-color:var(--border2); box-shadow:var(--shadow-md); }
.estilo-op.en-uso { border-color:var(--blue); }
.estilo-prev { display:grid; grid-template-columns:1fr 1fr; gap:2px; background:var(--border); }
.estilo-pie { padding:12px 14px; display:flex; flex-direction:column; gap:8px; }
.estilo-pie b { font-size:15px; font-family:var(--font-titulo); }
.estilo-pie span { font-size:12px; color:var(--muted); line-height:1.4; }
.estilo-pie .btn { justify-content:center; }
/* Miniatura: un panelcito dibujado con los colores fijos de cada estilo (no cambian con el estilo activo) */
.mini { display:flex; height:120px; font-size:0; }
.mini-side { width:26%; padding:8px 5px; display:flex; flex-direction:column; gap:5px; }
.mini-side i { display:block; height:5px; border-radius:3px; background:var(--m-navtxt); opacity:.5; }
.mini-side i.on { opacity:1; background:var(--m-acc); height:7px; }
.mini-main { flex:1; background:var(--m-bg); padding:8px; display:flex; flex-direction:column; gap:6px; }
.mini-top { height:10px; border-radius:3px; background:var(--m-card); }
.mini-tit { width:45%; height:6px; border-radius:3px; background:var(--m-txt); }
.mini-cards { display:grid; grid-template-columns:1fr 1fr 1fr; gap:5px; }
.mini-cards div { height:26px; border-radius:4px; background:var(--m-card); border:1px solid var(--m-borde); border-top:3px solid var(--m-acc); }
.mini-cards div:nth-child(2) { border-top-color:var(--m-ok); }
.mini-tabla { flex:1; border-radius:4px; background:var(--m-card); border:1px solid var(--m-borde); position:relative; }
.mini-tabla::before { content:''; position:absolute; left:6px; top:7px; width:40%; height:4px; border-radius:2px; background:var(--m-txt); opacity:.5; box-shadow:0 8px 0 var(--m-txt), 0 16px 0 var(--m-txt); }
.mini-tabla::after { content:''; position:absolute; right:6px; top:6px; width:16px; height:7px; border-radius:3px; background:var(--m-acc); }
.mini-et { font-size:10px; text-align:center; padding:3px 0; background:var(--surface2); color:var(--muted); font-weight:600; grid-column:span 1; }
.mini.almacen-claro  { --m-bg:#f6f1e7; --m-card:#fffaf0; --m-borde:#e6d9c3; --m-txt:#2b2118; --m-acc:#c2410c; --m-ok:#4d7c0f; --m-navtxt:#d6c7ad; }
.mini.almacen-claro .mini-side  { background:#2b2118; }
.mini.almacen-oscuro { --m-bg:#171310; --m-card:#231b13; --m-borde:#3d3122; --m-txt:#f1e6d2; --m-acc:#e0ac52; --m-ok:#7fc97f; --m-navtxt:#c9b48f; }
.mini.almacen-oscuro .mini-side { background:#110d0a; }
.mini.original-claro { --m-bg:#f4f6f9; --m-card:#ffffff; --m-borde:#e5e9f0; --m-txt:#1a1f2e; --m-acc:#3b82f6; --m-ok:#10b981; --m-navtxt:#ffffff; }
.mini.original-claro .mini-side { background:#153d7e; }
.mini.original-claro .mini-side i.on { background:rgba(255,255,255,.9); }
.mini.original-oscuro { --m-bg:#11151c; --m-card:#1a1f2b; --m-borde:#2a313d; --m-txt:#e7eaf0; --m-acc:#3b82f6; --m-ok:#10b981; --m-navtxt:#ffffff; }
.mini.original-oscuro .mini-side { background:#1c2128; }
.mini.original-oscuro .mini-side i.on { background:#10b981; }

/* ════ DISEÑOS DEL INICIO (26/10/2026) — js/inicio_disenos.js. Mismos datos en todos; acá solo cambia la forma.
   #tab-dashboard[data-diseno]: tarjetas (sin reglas: es el de siempre) · lista · iconos · circuito · graficos ════ */
.stat-card.green  { --c:var(--green); }
.stat-card.blue   { --c:var(--blue); }
.stat-card.orange { --c:var(--orange); }
.stat-card.red    { --c:var(--red); }
.stat-ico { display:none; }

/* Lista: una fila por dato, todo dentro de una sola caja */
#tab-dashboard[data-diseno="lista"] :is(#statsGrid, .inicio-kpis) {
  display:flex; flex-direction:column; gap:0; background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow);
}
#tab-dashboard[data-diseno="lista"] :is(#statsGrid, .inicio-kpis) .stat-card {
  display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"lbl val" "sub val"; align-items:center; column-gap:16px;
  border:0; border-bottom:1px solid var(--border); border-left:4px solid var(--c, var(--border2)); border-radius:0; box-shadow:none;
  padding:10px 18px; transform:none;
}
#tab-dashboard[data-diseno="lista"] :is(#statsGrid, .inicio-kpis) .stat-card:last-child { border-bottom:0; }
#tab-dashboard[data-diseno="lista"] :is(#statsGrid, .inicio-kpis) .stat-card:hover { background:var(--surface2); transform:none; box-shadow:none; }
#tab-dashboard[data-diseno="lista"] .stat-card::before { display:none; }
#tab-dashboard[data-diseno="lista"] .stat-label { grid-area:lbl; margin:0; }
#tab-dashboard[data-diseno="lista"] .stat-val { grid-area:val; font-size:24px; text-align:right; }
#tab-dashboard[data-diseno="lista"] .stat-sub { grid-area:sub; margin:2px 0 0; }

/* Íconos grandes: el dibujo a la izquierda, en el color de la tarjeta */
#tab-dashboard[data-diseno="iconos"] :is(#statsGrid, .inicio-kpis) .stat-card {
  display:grid; grid-template-columns:auto minmax(0,1fr); grid-template-areas:"ico lbl" "ico val" "ico sub"; column-gap:16px; align-items:center;
}
#tab-dashboard[data-diseno="iconos"] .stat-ico {
  grid-area:ico; display:grid; place-items:center; width:66px; height:66px; border-radius:18px; font-size:34px;
  color:var(--c, var(--blue)); background:color-mix(in srgb, var(--c, var(--blue)) 13%, transparent);
}
#tab-dashboard[data-diseno="iconos"] .stat-ico .icon { stroke-width:1.6; }
#tab-dashboard[data-diseno="iconos"] #statsGrid { grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); }
#tab-dashboard[data-diseno="iconos"] .stat-label { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#tab-dashboard[data-diseno="iconos"] .stat-label { grid-area:lbl; margin-bottom:2px; }
#tab-dashboard[data-diseno="iconos"] .stat-val { grid-area:val; }
#tab-dashboard[data-diseno="iconos"] .stat-sub { grid-area:sub; margin-top:3px; }

/* Circuito y Gráficos reemplazan las tarjetas de arriba y las de "Lo económico" (lo demás queda igual) */
#tab-dashboard:is([data-diseno="circuito"], [data-diseno="graficos"]) :is(#statsGrid, .inicio-kpis) { display:none; }

.circ-rio { position:relative; display:grid; grid-template-columns:repeat(var(--paradas), minmax(0,1fr)); gap:8px; padding-top:4px; }
.circ-rio::before {   /* la línea que une las paradas: del centro de la primera al centro de la última */
  content:''; position:absolute; top:42px; height:4px; border-radius:2px; background:var(--border2);
  left:calc(100% / var(--paradas) / 2); right:calc(100% / var(--paradas) / 2);
}
.circ-parada { position:relative; display:flex; flex-direction:column; align-items:center; text-align:center; gap:3px; background:none; border:0; cursor:pointer; font:inherit; color:inherit; padding:0 2px 4px; }
.circ-bola {
  position:relative; z-index:1; width:80px; height:80px; border-radius:50%; display:grid; place-items:center; margin-bottom:6px;
  background:var(--surface); border:3px solid var(--blue); font-family:var(--font-titulo); font-size:26px; font-weight:600; color:var(--text);
  transition:transform .15s; font-variant-numeric:tabular-nums;
}
.circ-bola.plata { font-size:15px; line-height:1.1; padding:0 6px; }
.circ-parada:hover .circ-bola { transform:scale(1.06); }
.circ-parada.con-rojo .circ-bola { border-color:var(--red); }
.circ-parada.con-ambar .circ-bola { border-color:var(--orange); }
.circ-nom { font-size:13px; font-weight:600; }
.circ-uni { font-size:12px; color:var(--muted); }
.circ-aviso { margin-top:5px; font-size:11.5px; font-weight:600; padding:3px 9px; border-radius:99px; }
.circ-aviso.rojo { background:var(--red-bg); color:var(--red); }
.circ-aviso.ambar { background:var(--orange-bg); color:var(--orange); }
@media (max-width: 900px) {
  .circ-rio { grid-template-columns:repeat(2, minmax(0,1fr)); row-gap:18px; }
  .circ-rio::before { display:none; }
}

.graf-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap:14px; margin-bottom:18px; }
.graf-grid .card { margin-bottom:0; }
.graf-cols { height:210px; gap:18px; padding:26px 8px 0; justify-content:center; }
.graf-cols .erp-barra { max-width:120px; }
.graf-cols .erp-barra-col { max-width:64px; border-radius:6px 6px 0 0; }
.graf-cols .erp-barra-lbl { white-space:normal; text-align:center; font-size:11.5px; line-height:1.2; min-height:28px; color:var(--text2); }
.graf-col-val { font-size:12.5px; font-weight:700; color:var(--text); white-space:nowrap; font-variant-numeric:tabular-nums; }
.graf-ir { font-size:12px; font-weight:600; color:var(--blue); cursor:pointer; text-transform:none; letter-spacing:0; }
.graf-ir:hover { text-decoration:underline; }

/* Configuración → dibujitos de cada diseño (con los colores del estilo activo) */
.mini-diseno { height:120px; background:var(--bg); padding:12px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:center; }
.mini-diseno > div { width:100%; }
.mini-diseno i { display:block; background:var(--surface); border:1px solid var(--border2); border-radius:4px; }
.md-tarjetas { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.md-tarjetas i { height:36px; border-top:3px solid var(--blue); }
.md-lista { display:flex; flex-direction:column; gap:0; border:1px solid var(--border2); border-radius:4px; overflow:hidden; }
.md-lista i { height:17px; border:0; border-bottom:1px solid var(--border); border-left:3px solid var(--blue); border-radius:0; }
.md-iconos { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.md-iconos i { height:40px; position:relative; }
.md-iconos b { position:absolute; left:6px; top:7px; width:24px; height:24px; border-radius:7px; background:color-mix(in srgb, var(--blue) 25%, transparent); }
.md-circuito { display:flex; justify-content:space-between; position:relative; }
.md-circuito::before { content:''; position:absolute; left:10%; right:10%; top:50%; height:3px; margin-top:-1px; background:var(--border2); }
.md-circuito i { position:relative; width:30px; height:30px; border-radius:50%; border:3px solid var(--blue); }
.md-graficos { display:flex; align-items:flex-end; justify-content:center; gap:10px; height:90px; }
.md-graficos i { width:22px; border:0; border-radius:4px 4px 0 0; background:var(--blue); }
.md-graficos i:nth-child(2) { background:var(--green); }
.md-graficos i:nth-child(4) { background:var(--orange); }

/* ════ TABLA CON FILTROS (26/10/2026) — js/tabla_filtrable.js ════ */
.tf-barra { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:12px; }
.tf-barra .input { width:auto; padding-top:8px; padding-bottom:8px; font-size:13px; }
.tf-barra .tf-buscar { flex:0 1 300px; min-width:0; }
.tf-barra .tf-select { flex:0 1 auto; max-width:230px; }
.tf-fechas { display:inline-flex; flex-wrap:wrap; align-items:center; gap:6px; font-size:12px; color:var(--muted); max-width:100%; }
.tf-fechas .input { width:158px; max-width:100%; }
.tf-tabla th.tf-ordenable { cursor:pointer; user-select:none; white-space:nowrap; }
.tf-tabla th.tf-ordenable:hover, .tf-tabla th.tf-activa { color:var(--text); }
.tf-flecha { font-size:10px; color:var(--blue); }
/* Lado derecho de la barra: botón "Filtros" y, separado, "Ver de a" */
.tf-der { margin-left:auto; display:inline-flex; align-items:center; gap:20px; }
.tf-ver { display:inline-flex; align-items:center; gap:8px; font-size:12px; color:var(--muted); white-space:nowrap; }
.tf-filtros { position:relative; }
.tf-btn-filtros .tf-n { background:var(--blue); color:var(--on-blue); border-radius:99px; font-size:11px; line-height:18px; min-width:18px; padding:0 5px; text-align:center; }
.tf-btn-filtros .tf-n[hidden] { display:none; }
.tf-btn-filtros.con-filtros { border-color:var(--blue); color:var(--blue); }
.tf-panel {
  position:absolute; right:0; top:calc(100% + 6px); z-index:40; width:300px; max-width:calc(100vw - 32px);
  display:flex; flex-direction:column; gap:8px; padding:12px; background:var(--surface);
  border:1px solid var(--border2); border-radius:10px; box-shadow:var(--shadow-md);
}
.tf-panel[hidden] { display:none; }
.tf-barra .tf-panel .input, .tf-barra .tf-panel .tf-select { width:100%; max-width:none; }
.tf-panel .tf-fechas { display:grid; grid-template-columns:auto minmax(0,1fr); gap:6px 8px; }
.tf-panel .tf-fechas .input { width:100%; }
.tf-barra .tf-porpag { width:76px; }
.tf-cuenta { font-size:12px; color:var(--muted); }
.tf-limpiar[hidden] { display:none; }   /* .btn pone display:inline-flex y le ganaba al hidden */
@media (max-width: 700px) { .tf-barra .tf-buscar { flex:1 1 100%; } .tf-der { margin-left:0; width:100%; justify-content:space-between; } }

/* ── Depósito: bandeja de pedidos para armar (27/10/2026, js/deposito.js) ── */
.dep-barra { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:14px; }
.dep-contadores { display:flex; gap:8px; flex-wrap:wrap; }
.dep-cont { background:var(--surface2); border:1px solid var(--border); border-radius:999px; padding:6px 12px; font-size:13px; }
.dep-cont strong { font-size:15px; }
.dep-cont-urg { border-color:#ef4444; color:#ef4444; font-weight:700; }
.dep-grupo { margin-bottom:18px; }
.dep-grupo-t { font-size:13px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin:0 2px 8px; }
.dep-grupo-t span { background:var(--surface2); border-radius:999px; padding:1px 8px; margin-left:4px; }
/* 11/11/2026: Depósito como tablero de columnas (una por paso). */
.dep-tablero { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(290px, 1fr); gap:14px; overflow-x:auto; align-items:start; padding-bottom:10px; }
.dep-col { background:var(--surface2); border:1px solid var(--border); border-radius:16px; padding:12px; min-height:140px; }
.dep-col-t { margin:0 2px 10px; display:flex; align-items:center; gap:4px; }
.dep-col-accion { width:100%; justify-content:center; margin-bottom:10px; text-transform:none; letter-spacing:0; }
.dep-col-cards { display:flex; flex-direction:column; gap:10px; }
.dep-col-vacia { color:var(--muted); font-size:13px; text-align:center; padding:18px 6px; }
.dep-col .dep-card { padding:12px; }
.dep-col .dep-num { font-size:19px; }
.dep-col .dep-acciones { flex-wrap:wrap; }
.dep-grilla { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:12px; }
.dep-card { background:var(--surface); border:1px solid var(--border); border-left:5px solid var(--border); border-radius:var(--radius); padding:14px; display:flex; flex-direction:column; gap:6px; }
.dep-card.dep-prio-1 { border-left-color:#f59e0b; }
.dep-card.dep-prio-2 { border-left-color:#ef4444; box-shadow:0 0 0 1px rgba(239,68,68,.25); }
.dep-card.dep-listo { border-left-color:var(--green); }
.dep-card-top { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.dep-num { font-size:22px; font-weight:800; font-family:var(--mono); }
.dep-prio { font-size:12px; font-weight:800; }
.dep-hora { font-size:12px; color:var(--muted); }
.dep-cliente { font-size:17px; font-weight:700; line-height:1.25; }
.dep-sub { font-size:12.5px; color:var(--muted); }
.dep-datos { display:flex; gap:12px; flex-wrap:wrap; font-size:13px; }
.dep-datos span { display:inline-flex; gap:4px; align-items:center; }
.dep-datos .icon, .dep-armando .icon { width:15px; height:15px; }
.dep-armando { font-size:12.5px; background:var(--surface2); border-radius:8px; padding:6px 8px; display:flex; gap:5px; align-items:center; flex-wrap:wrap; }
.dep-notas { font-size:12.5px; background:var(--orange-bg); border-radius:8px; padding:6px 8px; }
.dep-acciones { display:flex; gap:8px; align-items:center; margin-top:4px; }
.dep-acciones .dep-btn:last-child { flex:1; justify-content:center; }
.dep-btn { padding:10px 14px; font-size:14px; }
.dep-prio-sel { width:auto; padding:8px; font-size:13px; }
.dep-armando.dep-dif { background:rgba(239,68,68,.12); color:#ef4444; }
.dep-salir-fila { display:flex; gap:8px; align-items:center; padding:8px 4px; border-bottom:1px solid var(--border); cursor:pointer; font-size:14px; }

/* ── Stock (27/10/2026, js/erp_stock.js) ── */
.erp-st-fila { display:flex; gap:8px; align-items:center; margin-bottom:6px; }
.erp-st-fila .erp-st-prod { flex:1; }
.prep-ubic { display:inline-flex; gap:4px; align-items:center; font-size:12px; font-weight:700; color:var(--accent, #c2410c); margin:2px 0; }
.prep-ubic .icon { width:13px; height:13px; }
/* 065 (10/11/2026): stock por planta y "Bajé" en Preparar pedido; menú Extras */
.prep-stock:empty { display:none; }
.prep-stock { font-size:12px; margin:3px 0; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.prep-stock .prep-stock-aviso { color:var(--orange, #b45309); font-weight:600; }
.prep-stock .btn { padding:3px 10px; font-size:12px; text-transform:none; letter-spacing:0; }
.prep-extras-menu { display:none; position:absolute; bottom:calc(100% + 6px); left:0; z-index:20; min-width:280px; background:var(--surface); border:1px solid var(--border); border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,.18); padding:6px; }
.prep-extras-menu.abierto { display:block; }
.prep-extras-menu button { display:flex; gap:8px; align-items:center; width:100%; text-align:left; background:none; border:0; border-radius:8px; padding:9px 10px; font-size:13px; color:var(--text); cursor:pointer; }
.prep-extras-menu button:hover { background:var(--surface2, rgba(0,0,0,.05)); }
.dep-reponer { background:var(--orange-bg); border:1px solid rgba(245,158,11,.35); border-radius:var(--radius); padding:12px 14px; margin-bottom:16px; }
.dep-reponer-fila { display:flex; gap:10px; align-items:center; justify-content:space-between; flex-wrap:wrap; padding:6px 0; border-top:1px solid rgba(245,158,11,.25); font-size:14px; }

/* Fotos de productos (27/10/2026) */
.producto-mini { width:34px; height:34px; object-fit:contain; border-radius:6px; background:#fff; border:1px solid var(--border); vertical-align:middle; }
.producto-foto-caja { display:flex; gap:16px; align-items:center; }
.producto-foto-vista { width:140px; height:140px; flex-shrink:0; border-radius:10px; background:#fff; border:1px solid var(--border); display:flex; align-items:center; justify-content:center; overflow:hidden; font-size:12px; color:var(--muted); }
.producto-foto-vista img { max-width:100%; max-height:100%; object-fit:contain; }
.asignar-fila { display:flex; gap:14px; align-items:center; padding:10px 0; border-bottom:1px solid var(--border); min-height:96px; }
.asignar-fila.subiendo { opacity:.5; pointer-events:none; }
.asignar-prod { width:230px; flex-shrink:0; }
.asignar-nombre { font-weight:600; font-size:13px; }
.asignar-sub { font-size:11px; color:var(--muted); margin:2px 0 6px; }
.asignar-buscar { padding:5px 8px; font-size:12px; }
.asignar-fotos { display:flex; gap:8px; flex-wrap:wrap; flex:1; }
.asignar-foto-grande { position:fixed; z-index:3000; width:380px; padding:10px; background:#fff; border:1px solid var(--border); border-radius:12px; box-shadow:0 12px 40px rgba(0,0,0,.25); pointer-events:none; display:none; }
.asignar-foto-grande img { width:100%; height:330px; object-fit:contain; }
.asignar-foto-grande div { font-size:11px; color:#555; word-break:break-all; margin-top:6px; }
.asignar-mini { width:104px; height:104px; padding:3px; border-radius:8px; border:2px solid var(--border); background:#fff; cursor:pointer; }
.asignar-mini:hover { border-color:var(--accent); }
.asignar-mini img { width:100%; height:100%; object-fit:contain; }
.asignar-nada { font-size:12px; color:var(--muted); }
.asignar-listo { display:flex; gap:8px; align-items:center; color:var(--success, #15803d); font-weight:600; font-size:13px; }
.asignar-revisadas { display:flex; gap:12px; align-items:center; justify-content:space-between; padding:10px 14px; margin-bottom:12px; border-radius:10px; background:var(--accent-bg, rgba(21,128,61,.08)); border:1px solid var(--border); font-size:13px; font-weight:600; }

/* ── Flota en vivo (js/flota_mapa.js, 11/11/2026) ── */
.flota-grid { display:grid; grid-template-columns:290px 1fr; gap:14px; }
.flota-lista { max-height:600px; overflow-y:auto; display:flex; flex-direction:column; gap:6px; }
.flota-item { display:flex; gap:10px; align-items:flex-start; padding:10px 12px; border:1px solid var(--border); border-radius:var(--radius-sm); background:var(--surface); cursor:pointer; }
.flota-item:hover, .flota-item.activo { border-color:var(--accent); }
.flota-item-nombre { font-size:13px; font-weight:600; }
.flota-item-sub { font-size:11.5px; color:var(--muted); margin-top:2px; }
.flota-punto { width:11px; height:11px; border-radius:50%; margin-top:4px; flex-shrink:0; }
.flota-prueba { font-size:10px; font-weight:700; padding:1px 6px; border-radius:6px; background:var(--orange-bg); color:var(--orange); vertical-align:middle; }
.flota-vacio { font-size:13px; color:var(--muted); padding:14px; border:1px dashed var(--border2); border-radius:var(--radius-sm); }
.flota-mapa-caja { position:relative; }
#flotaMapa { height:600px; border-radius:var(--radius-sm); border:1px solid var(--border); z-index:0; }
.flota-demo-cartel { position:absolute; bottom:44px; left:50%; transform:translateX(-50%); z-index:500; background:#b91c1c; color:#fff; font-weight:700; font-size:13px; padding:6px 14px; border-radius:20px; box-shadow:0 2px 8px rgba(0,0,0,.25); pointer-events:none; white-space:nowrap; }
.flota-leyenda { display:flex; flex-wrap:wrap; gap:14px; font-size:11.5px; color:var(--muted); margin-top:8px; }
.flota-leyenda i { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:5px; vertical-align:-1px; }
.flota-marcador { width:34px; height:34px; border-radius:50%; background:var(--c); color:#fff; font-size:11px; font-weight:700; display:flex; align-items:center; justify-content:center; border:3px solid #fff; box-shadow:0 1px 6px rgba(0,0,0,.35); }
.flota-marcador.apagado { opacity:.55; border-style:dashed; }
.flota-galpon { width:30px; height:30px; border-radius:7px; background:#2b2118; color:#f6f1e7; font-size:11px; font-weight:800; display:flex; align-items:center; justify-content:center; border:2px solid #fff; box-shadow:0 1px 5px rgba(0,0,0,.3); }
.flota-ficha { font-size:12.5px; min-width:220px; }
.flota-ficha-titulo { font-weight:700; font-size:14px; }
.flota-ficha-sub { color:#6b7280; margin-top:2px; }
.flota-ficha-estado { font-weight:600; margin:6px 0; }
.flota-ficha table { width:100%; border-collapse:collapse; }
.flota-ficha td { padding:2px 0; } .flota-ficha td:first-child { color:#6b7280; padding-right:10px; }
.flota-bloqueo { margin-top:8px; padding:6px 8px; background:#fee2e2; color:#991b1b; border-radius:6px; font-weight:600; }
#flotaContenedor:fullscreen { overflow:auto; border-radius:0; }
#flotaContenedor:fullscreen .flota-lista, #flotaContenedor:fullscreen #flotaMapa { height:calc(100vh - 150px); max-height:none; }
@media (max-width: 860px) { .flota-grid { grid-template-columns:1fr; } .flota-lista { max-height:260px; } #flotaMapa { height:420px; } }
/* Flota — Últimos recorridos (12/11/2026) */
#flotaRecCard { margin-top:14px; }
#flotaRecCard .recorrido-mapa, #flotaRecCard .recorrido-lista { height:440px; max-height:440px; }
#flotaRecCard .recorrido-mapa { z-index:0; }
.recorrido-marca.rec-inicio, .rec-inicio .recorrido-num { background:#16a34a; }
.recorrido-marca.rec-fin, .rec-fin .recorrido-num { background:#241c14; }
.rec-hueco .recorrido-num { background:#9ca3af; }
.recorrido-lista li.rec-hueco { border-style:dashed; }
@media (max-width: 900px) { #flotaRecCard .recorrido-mapa { height:320px; } #flotaRecCard .recorrido-lista { height:auto; max-height:320px; } }
/* Recorrido modelo C (12/11/2026): tramos de colores, flechas, parada con pausa y minutos */
.rec-parada { display:flex; align-items:center; gap:2px; height:20px; padding:0 7px; border-radius:10px; background:#BA7517; color:#fff; font-size:11px; font-weight:700; border:2px solid #fff; box-shadow:0 1px 4px rgba(0,0,0,.35); white-space:nowrap; width:max-content; }
.rec-parada i { display:inline-block; width:2px; height:8px; background:#fff; margin-right:1px; }
.rec-parada span { margin-left:3px; }
.rec-pausa { display:inline-block; width:8px; height:10px; border-left:3px solid #fff; border-right:3px solid #fff; }
.rec-par .recorrido-num { background:#BA7517; }
.rec-flecha { display:block; overflow:visible; }
.rec-flecha path { fill:none; stroke-linecap:round; stroke-linejoin:round; }
.recorrido-lista li.rec-tramo.activo { border-color:var(--accent); background:var(--surface2); }
.rec-frenada { width:14px; height:14px; border-radius:50%; background:#5F5E5A; border:2px solid #fff; display:flex; align-items:center; justify-content:center; gap:1px; box-shadow:0 1px 3px rgba(0,0,0,.3); box-sizing:border-box; }
.rec-frenada i { width:1.5px; height:5px; background:#fff; }
