/* Animal Prospect — línea gráfica de Animal Digital: negro #0A0A0A, teal #00A69A, Barlow Condensed. */

:root {
  --negro: #0A0A0A;
  --teal: #00A69A;
  --teal-fuerte: #00857B;
  --teal-claro: #D5F2EE;
  --teal-tinta: #00665F;
  --fondo: #F4F3EF;
  --tarjeta: #FFFFFF;
  --tarjeta-2: #FAFAF8;
  --tinta: #151515;
  --tinta-2: #4A4A4A;
  --gris: #8A8A85;
  --linea: #E6E4DE;
  --linea-2: #D7D4CC;
  --amarillo: #E3B20C;
  --amarillo-claro: #FFF3C4;
  --amarillo-tinta: #7A5E00;
  --rojo: #D64545;
  --rojo-claro: #FCE1E1;
  --rojo-tinta: #A12C2C;
  --violeta: #7A5CF0;
  --violeta-claro: #ECE6FF;
  --azul: #3D7BF0;
  --azul-claro: #E0EAFF;
  --sombra: 0 1px 2px rgba(10, 10, 10, .05), 0 4px 16px rgba(10, 10, 10, .05);
  --sombra-alta: 0 12px 48px rgba(10, 10, 10, .18);
  --radio: 14px;
  --titulo: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --texto: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    --fondo: #0E0F0F; --tarjeta: #171919; --tarjeta-2: #1D2020; --tinta: #F1F1EE; --tinta-2: #C3C3BE; --gris: #8D918F;
    --linea: #262A2A; --linea-2: #333838; --teal-claro: rgba(0, 166, 154, .18); --teal-tinta: #5CE0D2;
    --amarillo-claro: rgba(227, 178, 12, .16); --amarillo-tinta: #F2D25E; --rojo-claro: rgba(214, 69, 69, .18); --rojo-tinta: #FF9A9A;
    --violeta-claro: rgba(122, 92, 240, .2); --azul-claro: rgba(61, 123, 240, .2);
    --sombra: 0 1px 2px rgba(0, 0, 0, .4); --sombra-alta: 0 12px 48px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* una clase con display: anula hidden sin avisar */
html, body { margin: 0; height: 100%; }
body { background: var(--fondo); color: var(--tinta); font: 14px/1.5 var(--texto); -webkit-font-smoothing: antialiased; }
a { color: var(--teal-fuerte); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--titulo); font-weight: 700; letter-spacing: .01em; margin: 0; line-height: 1.1; }

/* ---------- estructura ---------- */

.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--negro) 248px, transparent 248px); }
.lateral {
  background: var(--negro); color: #fff; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 22px 14px 18px; overflow-y: auto;
}
.marca { padding: 4px 10px 22px; }
.marca img { height: 22px; width: auto; display: block; align-self: flex-start; }
.marca .producto { font-family: var(--titulo); font-weight: 900; font-size: 30px; letter-spacing: .06em; color: var(--teal); line-height: 1; margin-top: 8px; }
.marca .lema { font-size: 11px; color: #8E8E8E; margin-top: 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #CFCFCF; text-decoration: none;
  font-family: var(--titulo); font-size: 18px; font-weight: 600; letter-spacing: .02em;
}
.nav a:hover { background: #1B1B1B; color: #fff; }
.nav a.activo { background: #161616; color: #fff; box-shadow: inset 3px 0 0 var(--teal); }
.nav .num {
  display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 6px;
  background: #222; color: #9A9A9A; font-size: 12px; font-family: var(--texto); font-weight: 700; letter-spacing: 0;
}
.nav a.activo .num { background: var(--teal); color: var(--negro); }
.nav .sep { height: 1px; background: #222; margin: 12px 8px; }
.lateral .pie { margin-top: auto; padding: 14px 10px 0; font-size: 12px; color: #7A7A7A; border-top: 1px solid #1E1E1E; }
.lateral .pie .estado-linea { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.punto { width: 8px; height: 8px; border-radius: 50%; background: var(--gris); flex: 0 0 auto; }
.punto.ok { background: var(--teal); box-shadow: 0 0 0 3px rgba(0, 166, 154, .2); }
.punto.mal { background: var(--rojo); box-shadow: 0 0 0 3px rgba(214, 69, 69, .2); }
.punto.aviso { background: var(--amarillo); }

.principal { min-width: 0; padding: 28px 32px 80px; }
.encabezado { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.encabezado h1 { font-size: 40px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.encabezado .paso { font-family: var(--titulo); color: var(--teal-fuerte); font-weight: 700; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; }
.encabezado p { margin: 6px 0 0; color: var(--tinta-2); max-width: 640px; }

/* recorrido de los 6 pasos */
.recorrido { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; background: var(--tarjeta); border-radius: var(--radio); box-shadow: var(--sombra); margin-bottom: 24px; overflow: hidden; }
.recorrido a { padding: 14px 16px; text-decoration: none; color: inherit; border-right: 1px solid var(--linea); position: relative; min-width: 0; }
.recorrido a:last-child { border-right: 0; }
.recorrido a:hover { background: var(--tarjeta-2); }
.recorrido .n { font-family: var(--titulo); font-size: 30px; font-weight: 800; line-height: 1; }
.recorrido .t { font-size: 12px; color: var(--gris); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recorrido .p { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-fuerte); }
.recorrido .barra { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--teal); }

/* ---------- piezas ---------- */

.tarjeta { background: var(--tarjeta); border-radius: var(--radio); box-shadow: var(--sombra); padding: 20px; min-width: 0; }
.tarjeta + .tarjeta { margin-top: 16px; }
.tarjeta h2 { font-size: 22px; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }
.tarjeta h3 { font-size: 17px; text-transform: uppercase; letter-spacing: .04em; color: var(--tinta-2); margin: 18px 0 10px; }
.tarjeta .sub { color: var(--gris); font-size: 13px; margin: 0 0 14px; }
.rejilla { display: grid; gap: 16px; }
.rejilla > * { min-width: 0; }
.dos { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
.tres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cuatro { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--linea-2); background: var(--tarjeta);
  padding: 9px 14px; border-radius: 10px; cursor: pointer; font-weight: 600; text-decoration: none; color: var(--tinta); white-space: nowrap;
  transition: transform .08s ease, background .15s ease;
}
.btn:hover { background: var(--tarjeta-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primario { background: var(--negro); color: #fff; border-color: var(--negro); box-shadow: inset 0 -3px 0 var(--teal); }
.btn.primario:hover { background: #222; }
.btn.teal { background: var(--teal); border-color: var(--teal); color: var(--negro); }
.btn.teal:hover { background: #12B5A9; }
.btn.peligro { color: var(--rojo-tinta); border-color: var(--rojo-claro); }
.btn.chico { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn.grande { padding: 13px 22px; font-size: 16px; font-family: var(--titulo); letter-spacing: .04em; text-transform: uppercase; }
.btn svg { width: 16px; height: 16px; flex: 0 0 auto; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .btn.primario { background: var(--teal); color: var(--negro); border-color: var(--teal); box-shadow: none; } }

label.campo { display: block; margin-bottom: 14px; }
label.campo > span, .etiqueta { display: block; font-size: 12px; font-weight: 700; color: var(--tinta-2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.entrada, input[type=text], input[type=email], input[type=number], input[type=password], input[type=time], input[type=url], select, textarea {
  width: 100%; border: 1px solid var(--linea-2); background: var(--tarjeta); border-radius: 10px; padding: 9px 12px; outline: none;
}
textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
input:focus, select:focus, textarea:focus, .entrada:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 166, 154, .18); }
.ayuda { font-size: 12px; color: var(--gris); margin-top: 5px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--linea-2);
  background: var(--tarjeta); cursor: pointer; font-weight: 600; font-size: 13px; user-select: none; line-height: 1.2;
}
.chip:hover { border-color: var(--tinta-2); }
.chip.si { background: var(--negro); color: #fff; border-color: var(--negro); }
.chip.si .x { opacity: .7; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .chip.si { background: var(--teal); color: var(--negro); border-color: var(--teal); } }
.chip .x { font-size: 15px; line-height: 1; margin-left: 2px; }

/* entrada de etiquetas (colonias, CP, ciudades) */
.etiquetas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--linea-2); border-radius: 10px; padding: 6px 8px; background: var(--tarjeta); min-height: 42px; cursor: text; }
.etiquetas input { border: 0; outline: 0; box-shadow: none; flex: 1 1 140px; min-width: 120px; padding: 4px; background: transparent; }
.etiquetas .chip { padding: 4px 10px; }

/* selector con búsqueda */
.selector { position: relative; }
.selector .lista { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: var(--tarjeta); border: 1px solid var(--linea-2); border-radius: 12px; box-shadow: var(--sombra-alta); max-height: 280px; overflow-y: auto; padding: 6px; }
.selector .opcion { padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.selector .opcion:hover, .selector .opcion.foco { background: var(--teal-claro); }
.selector .opcion small { color: var(--gris); }

/* sectores */
.sectores { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.sector {
  border: 1px solid var(--linea-2); border-radius: 12px; padding: 10px 12px; cursor: pointer; background: var(--tarjeta);
  display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 13px; line-height: 1.25; min-height: 52px;
}
.sector .ic { font-size: 20px; }
.sector:hover { border-color: var(--tinta-2); }
.sector.si { border-color: var(--teal); background: var(--teal-claro); box-shadow: inset 0 0 0 1px var(--teal); }

.seccion-form { padding: 18px 0; border-top: 1px solid var(--linea); }
.seccion-form:first-of-type { border-top: 0; padding-top: 6px; }
.seccion-form > .titulo { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.seccion-form > .titulo b { font-family: var(--titulo); font-size: 20px; text-transform: uppercase; letter-spacing: .03em; }
.seccion-form > .titulo .num { font-family: var(--titulo); font-weight: 800; color: var(--teal); font-size: 20px; }

.interruptor { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.interruptor input { appearance: none; width: 40px; height: 22px; border-radius: 999px; background: var(--linea-2); position: relative; cursor: pointer; transition: background .15s; margin: 0; flex: 0 0 auto; }
.interruptor input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.interruptor input:checked { background: var(--teal); }
.interruptor input:checked::after { transform: translateX(18px); }

.costo { display: flex; gap: 12px; align-items: center; background: var(--tarjeta-2); border: 1px dashed var(--linea-2); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--tinta-2); }
.costo b { color: var(--tinta); }
.costo svg { width: 22px; height: 22px; flex: 0 0 auto; color: var(--teal-fuerte); }

/* avisos */
.aviso { display: block; padding: 12px 16px; border-radius: 12px; background: var(--amarillo-claro); color: var(--amarillo-tinta); font-weight: 500; margin-bottom: 16px; line-height: 1.6; }
.aviso.info { background: var(--teal-claro); color: var(--teal-tinta); }
.aviso.error { background: var(--rojo-claro); color: var(--rojo-tinta); }
.aviso b { font-weight: 700; }
.aviso .btn { margin-left: 8px; vertical-align: middle; }

/* etiquetas de estado */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--tarjeta-2); color: var(--tinta-2); border: 1px solid var(--linea); }
.pill.teal { background: var(--teal-claro); color: var(--teal-tinta); border-color: transparent; }
.pill.negro { background: var(--negro); color: #fff; border-color: var(--negro); }
.pill.amarillo { background: var(--amarillo-claro); color: var(--amarillo-tinta); border-color: transparent; }
.pill.rojo { background: var(--rojo-claro); color: var(--rojo-tinta); border-color: transparent; }
.pill.violeta { background: var(--violeta-claro); color: var(--violeta); border-color: transparent; }
.pill.azul { background: var(--azul-claro); color: var(--azul); border-color: transparent; }

/* tabla */
.tabla-caja { overflow-x: auto; margin: 0 -20px -20px; }
table.tabla { width: 100%; border-collapse: collapse; min-width: 900px; }
.tabla th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--gris); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--linea); background: var(--tarjeta); position: sticky; top: 0; }
.tabla td { padding: 12px; border-bottom: 1px solid var(--linea); vertical-align: middle; }
.tabla tr.fila { cursor: pointer; }
.tabla tr.fila:hover td { background: var(--tarjeta-2); }
.tabla tr.sel td { background: var(--teal-claro) !important; }
.tabla .nombre { font-weight: 700; }
.tabla .chico { font-size: 12px; color: var(--gris); }
.tabla th:first-child, .tabla td:first-child { padding-left: 20px; width: 36px; }
.tabla input[type=checkbox], .marcar { width: 17px; height: 17px; accent-color: var(--teal); cursor: pointer; }

.iconos { display: flex; gap: 6px; align-items: center; }
.ico { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--tarjeta-2); color: var(--gris); border: 1px solid var(--linea); }
.ico svg { width: 14px; height: 14px; }
.ico.ok { background: var(--teal-claro); color: var(--teal-tinta); border-color: transparent; }
.ico.mal { background: var(--rojo-claro); color: var(--rojo-tinta); border-color: transparent; }
.ico.no { opacity: .35; }

/* anillo de verificación */
.anillo { --v: 0; --c: var(--teal); width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--c) calc(var(--v) * 1%), var(--linea) 0); flex: 0 0 auto; }
.anillo::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--tarjeta); }
.anillo span { position: relative; font-family: var(--titulo); font-weight: 800; font-size: 15px; }
.anillo.media { --c: var(--amarillo); }
.anillo.baja { --c: var(--rojo); }
.anillo.grande { width: 72px; height: 72px; }
.anillo.grande::before { inset: 6px; }
.anillo.grande span { font-size: 26px; }

.medidor { height: 8px; border-radius: 99px; background: var(--linea); overflow: hidden; min-width: 60px; }
.medidor i { display: block; height: 100%; background: var(--teal); border-radius: 99px; }

/* barra de acciones en lote */
.lote {
  position: sticky; top: 12px; z-index: 20; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--negro); color: #fff; border-radius: 14px; padding: 10px 12px 10px 18px; margin-bottom: 14px; box-shadow: var(--sombra-alta);
}
.lote .cuantos { font-family: var(--titulo); font-size: 20px; font-weight: 700; margin-right: 6px; }
.lote .btn { background: #1E1E1E; color: #fff; border-color: #2E2E2E; }
.lote .btn:hover { background: #2A2A2A; }
.lote .btn.teal { background: var(--teal); color: var(--negro); border-color: var(--teal); }
.lote .costo-lote { font-size: 12px; color: #9A9A9A; }

/* pestañas */
.pestanas { display: flex; gap: 4px; border-bottom: 1px solid var(--linea); margin-bottom: 16px; overflow-x: auto; }
.pestanas button { border: 0; background: none; padding: 10px 12px; cursor: pointer; font-weight: 600; color: var(--gris); border-bottom: 2px solid transparent; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.pestanas button.si { color: var(--tinta); border-bottom-color: var(--teal); }
.pestanas .cuenta { font-size: 11px; background: var(--tarjeta-2); border: 1px solid var(--linea); border-radius: 99px; padding: 0 7px; color: var(--tinta-2); }

.barra-herramientas { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.barra-herramientas .buscar { flex: 1 1 240px; min-width: 200px; }
.barra-herramientas select { width: auto; max-width: 100%; }

/* ficha (panel lateral) */
.velo { position: fixed; inset: 0 0 0 248px; background: rgba(10, 10, 10, .35); z-index: 40; }   /* deja libre el menú */
@media (max-width: 960px) { .velo { inset: 0; } .ficha { bottom: 0; z-index: 50; } }
.ficha {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100vw); background: var(--fondo); z-index: 50; box-shadow: var(--sombra-alta);
  display: flex; flex-direction: column; animation: entra .18s ease-out;
}
@keyframes entra { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.ficha .cabeza { background: var(--negro); color: #fff; padding: 20px 24px 0; }
.ficha .cabeza h2 { font-size: 30px; font-weight: 800; text-transform: none; }
.ficha .cabeza .meta { color: #A9A9A9; font-size: 13px; margin-top: 4px; }
.ficha .cabeza .fila-cabeza { display: flex; gap: 16px; align-items: flex-start; }
.ficha .cabeza .anillo::before { background: var(--negro); }
.ficha .cabeza .anillo span { color: #fff; }
.ficha .cerrar { margin-left: auto; background: #1E1E1E; border: 0; color: #fff; width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 20px; flex: 0 0 auto; }
.ficha .cabeza .pestanas { border-bottom: 0; margin: 16px -8px 0; }
.ficha .cabeza .pestanas button { color: #8E8E8E; }
.ficha .cabeza .pestanas button.si { color: #fff; }
.ficha .cuerpo { overflow-y: auto; padding: 20px 24px 40px; flex: 1; }
.ficha .acciones-cabeza { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ficha .acciones-cabeza .btn { background: #1B1B1B; color: #fff; border-color: #2E2E2E; }
.ficha .acciones-cabeza .btn.teal { background: var(--teal); color: var(--negro); border-color: var(--teal); }

.dato { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--linea); align-items: flex-start; }
.dato:last-child { border-bottom: 0; }
.dato .ico { margin-top: 1px; }
.dato .que { font-size: 12px; color: var(--gris); }
.dato .valor { font-weight: 600; word-break: break-word; }
.dato .der { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 10px; padding: 7px 0; align-items: flex-start; font-size: 13px; }
.checklist .marca-ok { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; font-size: 12px; font-weight: 800; }
.checklist .si .marca-ok { background: var(--teal); color: var(--negro); }
.checklist .no .marca-ok { background: var(--linea); color: var(--gris); }
.checklist small { color: var(--gris); display: block; }
.checklist .pts { margin-left: auto; font-family: var(--titulo); font-weight: 700; color: var(--gris); }

.necesidad { border: 1px solid var(--linea); border-left: 4px solid var(--teal); border-radius: 12px; padding: 12px 14px; background: var(--tarjeta); margin-bottom: 10px; }
.necesidad.media { border-left-color: var(--amarillo); }
.necesidad.baja { border-left-color: var(--linea-2); }
.necesidad b { font-family: var(--titulo); font-size: 18px; text-transform: uppercase; letter-spacing: .02em; }
.angulo { background: var(--negro); color: #fff; border-radius: 14px; padding: 16px 18px; font-size: 16px; line-height: 1.45; position: relative; }
.angulo::before { content: 'EL GANCHO'; display: block; font-family: var(--titulo); color: var(--teal); font-weight: 800; letter-spacing: .14em; font-size: 12px; margin-bottom: 6px; }
.lista-simple { margin: 0; padding-left: 18px; }
.lista-simple li { margin: 4px 0; }

.vista-correo { border: 1px solid var(--linea); border-radius: 12px; overflow: hidden; background: #fff; }
.vista-correo .sobre { padding: 10px 14px; border-bottom: 1px solid #eee; font-size: 13px; color: #555; background: #fafafa; }
.vista-correo iframe { width: 100%; border: 0; height: 420px; display: block; background: #fff; }
.whatsapp-burbuja { background: #DCF8C6; color: #111; border-radius: 12px 12px 12px 2px; padding: 12px 14px; max-width: 460px; white-space: pre-wrap; box-shadow: 0 1px 1px rgba(0,0,0,.1); }

.linea-tiempo { list-style: none; margin: 0; padding: 0; position: relative; }
.linea-tiempo::before { content: ''; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--linea); }
.linea-tiempo li { position: relative; padding: 0 0 16px 34px; }
.linea-tiempo li::before { content: ''; position: absolute; left: 5px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--tarjeta); border: 3px solid var(--teal); }
.linea-tiempo li.gris::before { border-color: var(--linea-2); }
.linea-tiempo li.rojo::before { border-color: var(--rojo); }
.linea-tiempo .cuando { font-size: 12px; color: var(--gris); }

/* tiles de números */
.tile { background: var(--tarjeta); border-radius: var(--radio); box-shadow: var(--sombra); padding: 16px 18px; min-width: 0; }
.tile .k { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--gris); }
.tile .v { font-family: var(--titulo); font-size: 40px; font-weight: 800; line-height: 1.05; margin-top: 4px; }
.tile .d { font-size: 12px; color: var(--tinta-2); margin-top: 2px; overflow-wrap: anywhere; }
.tile.negro { background: var(--negro); color: #fff; }
.tile.negro .k { color: var(--teal); }
.tile.negro .d { color: #A9A9A9; }

.embudo { display: flex; flex-direction: column; gap: 8px; }
.embudo .paso-embudo { display: grid; grid-template-columns: 150px minmax(0, 1fr) 64px; gap: 12px; align-items: center; }
.embudo .nombre-paso { font-weight: 600; font-size: 13px; }
.embudo .barra-embudo { height: 28px; background: var(--tarjeta-2); border-radius: 8px; overflow: hidden; border: 1px solid var(--linea); }
.embudo .barra-embudo i { display: flex; align-items: center; height: 100%; background: linear-gradient(90deg, var(--negro), #2A2A2A); color: #fff; font-size: 12px; font-weight: 700; padding: 0 10px; min-width: 2px; border-right: 3px solid var(--teal); }
.embudo .pct { text-align: right; font-family: var(--titulo); font-weight: 700; font-size: 18px; }

/* agenda */
.semana-agenda { display: grid; grid-template-columns: 64px repeat(5, minmax(0, 1fr)); gap: 6px; }
.semana-agenda .dia-cab { font-family: var(--titulo); font-weight: 700; text-transform: uppercase; font-size: 15px; text-align: center; padding: 6px 0; letter-spacing: .03em; }
.semana-agenda .hora { font-size: 12px; color: var(--gris); text-align: right; padding: 8px 6px 0 0; }
.espacio { border-radius: 10px; min-height: 54px; padding: 8px 10px; font-size: 12px; font-weight: 600; border: 1px solid var(--linea); background: var(--tarjeta); display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.espacio.libre { border-style: dashed; color: var(--teal-fuerte); }
.espacio.reservado { background: repeating-linear-gradient(-45deg, var(--tarjeta-2), var(--tarjeta-2) 6px, var(--linea) 6px, var(--linea) 7px); color: var(--gris); }
.espacio.ocupado { background: var(--linea); color: var(--tinta-2); border-color: transparent; }
.espacio.no_disponible { opacity: .45; color: var(--gris); }
.espacio.cita { background: var(--negro); color: #fff; border: 0; box-shadow: inset 4px 0 0 var(--teal); }
.espacio.cita small { color: var(--teal); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 10px; }
.espacio span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leyenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--tinta-2); margin-top: 14px; }
.leyenda i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; border: 1px solid var(--linea); }

/* búsquedas */
.busqueda-item { padding: 14px 0; border-bottom: 1px solid var(--linea); }
.busqueda-item:last-child { border-bottom: 0; }
.busqueda-item .nombre { font-weight: 700; }
.busqueda-item .fila { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.progreso { height: 6px; background: var(--linea); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progreso i { display: block; height: 100%; background: var(--teal); transition: width .4s; }
.progreso.anda i { background: linear-gradient(90deg, var(--teal), #6FE3D8, var(--teal)); background-size: 200% 100%; animation: anda 1.2s linear infinite; }
@keyframes anda { to { background-position: -200% 0; } }

.vacio { text-align: center; padding: 48px 20px; color: var(--gris); }
.vacio .grande { font-family: var(--titulo); font-size: 28px; font-weight: 800; color: var(--tinta); text-transform: uppercase; margin-bottom: 6px; }

/* tareas en curso (esquina) */
.tareas { position: fixed; right: 20px; bottom: 20px; z-index: 35; display: flex; flex-direction: column; gap: 10px; width: 330px; }
.tarea { background: var(--negro); color: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: var(--sombra-alta); }
.tarea .t { font-family: var(--titulo); font-size: 17px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.tarea .d { font-size: 12px; color: #A9A9A9; margin-top: 4px; }
.tarea .progreso { background: #2A2A2A; }

.aviso-flotante { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; background: var(--negro); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--sombra-alta); font-weight: 600; max-width: min(560px, calc(100vw - 32px)); }
.aviso-flotante.error { background: var(--rojo); }

/* entrar */
.entrar { min-height: 100vh; display: grid; place-items: center; background: var(--negro); padding: 16px; }
.entrar form { width: min(380px, 100%); background: #141414; border-radius: 18px; padding: 32px; color: #fff; }
.entrar input { background: #0E0E0E; border-color: #2A2A2A; color: #fff; margin: 18px 0 12px; }

.oculto-movil { }
.solo-movil { display: none !important; }

/* ---------- celular ---------- */
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .embudo .barra-embudo i { background: linear-gradient(90deg, #00665F, var(--teal)); color: var(--negro); border-right-color: #5CE0D2; } }
.pie-mensajes { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; bottom: -40px; background: var(--fondo); padding: 14px 24px 18px; margin: 0 -24px -40px; border-top: 1px solid var(--linea); }

@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); background: none; }
  .lateral { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); z-index: 30; }
  .marca, .lateral .pie, .nav .sep { display: none; }
  .nav { flex-direction: row; justify-content: space-around; width: 100%; }
  .nav a { flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 12px; }
  .nav a .num { display: none; }
  .nav a.activo { box-shadow: inset 0 -2px 0 var(--teal); }
  .principal { padding: 18px 16px 110px; }
  .encabezado h1 { font-size: 30px; }
  .dos, .tres, .cuatro { grid-template-columns: minmax(0, 1fr); }
  .recorrido { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .recorrido a:nth-child(n+5) { display: none; }
  .recorrido .t { white-space: normal; font-size: 11px; line-height: 1.2; }
  .recorrido a { padding: 12px 10px; }
  .semana-agenda { grid-template-columns: 44px repeat(5, minmax(84px, 1fr)); overflow-x: auto; }
  .tareas { left: 16px; right: 16px; width: auto; bottom: 84px; }
  .embudo .paso-embudo { grid-template-columns: 96px minmax(0, 1fr) 48px; }
  .oculto-movil { display: none !important; }
  .solo-movil { display: inline-flex !important; }
}
.nav a .ic-nav { display: none; }
@media (max-width: 960px) { .nav a .ic-nav { display: block; width: 20px; height: 20px; } .nav a .txt-largo { display: none; } }

/* usuarios (23 nov 2026): a quién ve el admin y quién está dentro */
.lateral .ver-de { display: flex; flex-direction: column; gap: 4px; margin: 14px 8px 0; font-size: 12px; color: #9A9A9A; }
.lateral .ver-de select { width: 100%; background: #161616; color: #fff; border: 1px solid #2A2A2A; border-radius: 8px; padding: 7px 8px; font: inherit; font-size: 13px; }
.lateral .quien { margin: 12px 8px 0; font-size: 12px; color: #BDBDBD; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lateral .quien .btn { background: transparent; color: #BDBDBD; border-color: #2A2A2A; }
@media (max-width: 960px) {
  .lateral .ver-de, .lateral .quien { display: none; }
  .barra-movil-sesion { display: flex !important; }
}
.barra-movil-sesion { display: none; align-items: center; justify-content: space-between; gap: 8px; margin: -8px 0 14px; font-size: 13px; color: var(--gris); }
.barra-movil-sesion select { flex: 1; max-width: 220px; }
