/* SKYFIBER Panel */
:root {
  --fondo: #f3f6fb;
  --superficie: #ffffff;
  --borde: #e2e8f0;
  --texto: #0f172a;
  --tenue: #64748b;
  --azul: #2563eb;
  --azul-claro: #38bdf8;
  --azul-suave: #e8f0fe;
  --verde: #059669;
  --verde-suave: #d1fae5;
  --rojo: #dc2626;
  --rojo-suave: #fee2e2;
  --ambar: #b45309;
  --ambar-suave: #fef3c7;
  --lateral: #0b1730;
  --lateral-texto: #cbd5e1;
  --radio: 12px;
  --sombra: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 8px rgba(15, 23, 42, .04);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--texto);
  background: var(--fondo);
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14.5px; line-height: 1.45; }
a { color: var(--azul); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .9em; }
code { background: #f1f5f9; padding: 1px 5px; border-radius: 5px; }
pre { background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: 8px; overflow-x: auto; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
h2 { font-size: 16px; margin-bottom: 12px; }
small { font-size: 12.5px; }

/* ---- estructura ---- */
.lateral {
  position: fixed; inset: 0 auto 0 0; width: 236px; background: var(--lateral); color: var(--lateral-texto);
  display: flex; flex-direction: column; z-index: 20; transition: transform .2s;
}
.marca { display: flex; align-items: center; gap: 10px; padding: 20px 18px; color: #fff; font-weight: 800; font-size: 18px; letter-spacing: .04em; }
.marca:hover { text-decoration: none; }
.marca img { width: 34px; height: 34px; }
.lateral nav { flex: 1; overflow-y: auto; padding: 4px 10px; }
.lateral nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: var(--lateral-texto); margin-bottom: 2px; font-weight: 500;
}
.lateral nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.lateral nav a.activo { background: linear-gradient(90deg, rgba(56,189,248,.18), rgba(37,99,235,.12)); color: #fff; box-shadow: inset 3px 0 0 var(--azul-claro); }
.lateral svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.yo { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08); }
.yo b { display: block; color: #fff; font-weight: 600; font-size: 13.5px; }
.yo small { color: #94a3b8; text-transform: capitalize; }
.yo a { color: #94a3b8; font-size: 13px; }

.contenido { margin-left: 236px; padding: 0 28px 48px; min-height: 100vh; }
.barra { display: flex; align-items: center; gap: 16px; padding: 22px 0 18px; }
.barra h1 { font-size: 22px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.buscar-global input { width: 290px; }
.hamburguesa { display: none; cursor: pointer; width: 38px; height: 38px; border-radius: 9px; background: var(--superficie); border: 1px solid var(--borde); flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.hamburguesa span { width: 18px; height: 2px; background: var(--texto); border-radius: 2px; }
.velo { display: none; }

/* ---- tarjetas ---- */
.tarjeta { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: 18px 20px; box-shadow: var(--sombra); margin-bottom: 18px; }
.tarjeta.sin-relleno { padding: 0; overflow: hidden; }
.desplazable { overflow-x: auto !important; }
.dos-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dos-col > .tarjeta { margin-bottom: 18px; }
.seccion { margin: 26px 0 10px; font-size: 17px; }
.relleno { padding: 14px 18px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: 14px 16px; color: var(--texto); box-shadow: var(--sombra); }
.kpi:hover { text-decoration: none; border-color: #bfdbfe; }
.kpi span { display: block; color: var(--tenue); font-size: 12.5px; font-weight: 500; }
.kpi b { font-size: 24px; letter-spacing: -.02em; }
.kpi.alerta { border-color: #fecaca; background: linear-gradient(180deg, #fff, #fff7f7); }
.kpi.alerta b { color: var(--rojo); }

.rejilla-routers { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 4px; }
.router header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.router h3 { font-size: 15px; }
.router header small { color: var(--tenue); margin-left: auto; }
.router.caido { border-color: #fecaca; }
.punto { width: 9px; height: 9px; border-radius: 50%; background: var(--tenue); }
.punto.ok { background: #10b981; box-shadow: 0 0 0 3px #d1fae5; }
.punto.mal { background: var(--rojo); box-shadow: 0 0 0 3px var(--rojo-suave); }
.metricas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.metricas span { color: var(--tenue); font-size: 12px; display: block; }
.metricas b { font-size: 18px; }
.metricas i { display: block; height: 5px; border-radius: 3px; background: #e2e8f0; margin-top: 4px; position: relative; overflow: hidden; }
.metricas i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--v); background: linear-gradient(90deg, var(--azul-claro), var(--azul)); border-radius: 3px; }
.pie { margin: 4px 0 0; color: var(--tenue); font-size: 12.5px; }
.vivo { margin: 8px 0 0; font-size: 13px; }

.grafica { position: relative; height: 260px; }
.grafica.baja { height: 200px; }

/* ---- tablas ---- */
.tabla { width: 100%; border-collapse: collapse; }
.tabla th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--tenue); font-weight: 600; background: #f8fafc; }
.tabla th, .tabla td { padding: 10px 14px; border-bottom: 1px solid var(--borde); vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tbody tr:hover { background: #fafcff; }
.tarjeta:not(.sin-relleno) .tabla th, .tarjeta:not(.sin-relleno) .tabla td { padding-left: 0; }
.tarjeta:not(.sin-relleno) .tabla th { background: none; }
.num { text-align: right; white-space: nowrap; }
.centro { text-align: center; }
tr.apagado td { opacity: .55; }
.acciones-fila { white-space: nowrap; text-align: right; }
.acciones-fila form { display: inline; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.badge.ok { background: var(--verde-suave); color: var(--verde); }
.badge.mal { background: var(--rojo-suave); color: var(--rojo); }
.badge.ambar { background: var(--ambar-suave); color: var(--ambar); }
.badge.gris { background: #eef2f7; color: #475569; }
.tenue { color: var(--tenue); }
.error-txt { color: var(--rojo); }
.grande { font-size: 26px; font-weight: 700; margin: 0 0 10px; }
.grande small { font-size: 14px; color: var(--tenue); font-weight: 500; }

.eventos { list-style: none; margin: 0; padding: 0; }
.eventos li { padding: 8px 0; border-bottom: 1px solid var(--borde); font-size: 13.5px; }
.eventos li:last-child { border: 0; }
.eventos time { color: var(--tenue); font-size: 12px; margin-right: 6px; }

/* ---- formularios ---- */
input, select, textarea {
  font: inherit; color: inherit; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 11px; width: 100%; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
input[type=checkbox], input[type=radio] { width: auto; flex: none; accent-color: var(--azul); }
.campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px 18px; }
.campos label { display: flex; flex-direction: column; gap: 5px; font-weight: 500; font-size: 13px; }
.campos label small { color: var(--tenue); font-weight: 400; }
.campos .ancho2 { grid-column: span 2; }
label.check { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 400 !important; }
.formulario .acciones, .acciones { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.formulario > .acciones { margin: 0 0 18px; }
.tarjeta.formulario .acciones { margin: 16px 0 0; }
.con-boton { display: flex; gap: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; font-size: 13.5px;
  padding: 8px 14px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; color: var(--texto); cursor: pointer; white-space: nowrap;
}
.btn:hover { background: #f8fafc; text-decoration: none; }
.btn.primario { background: var(--azul); border-color: var(--azul); color: #fff; }
.btn.primario:hover { background: #1d4ed8; }
.btn.peligro { color: var(--rojo); border-color: #fecaca; }
.btn.peligro:hover { background: var(--rojo-suave); }
.btn.exito { background: var(--verde); border-color: var(--verde); color: #fff; }
.btn.chico { padding: 5px 10px; font-size: 12.5px; }
.btn.ancho { width: 100%; padding: 11px; }
.btn[disabled] { opacity: .6; cursor: wait; }

.cabecera-lista { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cabecera-lista p { margin: 0; }
.filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filtros input[type=search] { flex: 1 1 260px; width: auto; }
.filtros select { width: auto; }
.cabecera-lista .filtros { margin: 0; }
.paginas { display: flex; gap: 4px; justify-content: center; margin-top: 14px; }
.paginas a, .paginas b, .paginas span { padding: 5px 10px; border-radius: 6px; }
.paginas b { background: var(--azul); color: #fff; }

.aviso { padding: 11px 14px; border-radius: 9px; margin-bottom: 14px; font-weight: 500; }
.aviso.ok { background: var(--verde-suave); color: #065f46; }
.aviso.error { background: var(--rojo-suave); color: #991b1b; }
.aviso.info { background: var(--azul-suave); color: #1e3a8a; }

/* ---- routers ---- */
.opciones-conexion { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 16px; }
.opcion { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 14px; border: 1.5px solid var(--borde); border-radius: 10px; cursor: pointer; }
.opcion input { grid-row: span 2; margin-top: 3px; }
.opcion span { color: var(--tenue); font-size: 13px; }
.opcion:has(input:checked) { border-color: var(--azul); background: var(--azul-suave); }
.opcion.deshabilitada { opacity: .5; cursor: not-allowed; }
.avanzado { margin-top: 16px; }
.avanzado summary { cursor: pointer; font-weight: 600; color: var(--azul); margin-bottom: 12px; }
.pasos-script { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pasos-script .acciones { margin-top: 0; }
.lista-pasos { margin: 0; padding-left: 18px; line-height: 1.7; }
pre.script { max-height: 420px; overflow: auto; font-size: 12.5px; white-space: pre; }
.estado-router { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; margin-bottom: 14px; }
.estado-router p { grid-column: span 2; margin: 0; }
.estado-router .punto { width: 12px; height: 12px; background: #f59e0b; box-shadow: 0 0 0 4px var(--ambar-suave); }
.estado-router .punto.ok { background: #10b981; box-shadow: 0 0 0 4px var(--verde-suave); }

.vacio { text-align: center; padding: 48px 20px; background: var(--superficie); border: 1px dashed #cbd5e1; border-radius: var(--radio); margin-bottom: 18px; }
.vacio p { color: var(--tenue); }

/* ---- ficha de cliente ---- */
.ficha-cabecera { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 24px; }
.etiquetas { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.datos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 20px; margin: 0; }
.datos dt { color: var(--tenue); font-size: 12px; }
.datos dd { margin: 2px 0 0; font-weight: 500; }
.notas { background: #f8fafc; border-radius: 8px; padding: 10px 12px; margin-top: 14px; }
.panel-acciones { display: flex; flex-direction: column; gap: 8px; }
.panel-acciones .btn, .botonera .btn { width: 100%; }
.botonera { display: flex; flex-direction: column; gap: 8px; }
.vivo-cliente { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vivo-cliente p { grid-column: span 2; margin: 0; }
.medidor { background: var(--azul-suave); border-radius: 10px; padding: 12px 14px; }
.medidor span { display: block; font-size: 12px; color: #1e40af; }
.medidor b { font-size: 22px; }
.barra-uso { height: 9px; background: #e2e8f0; border-radius: 6px; overflow: hidden; margin-bottom: 6px; }
.barra-uso i { display: block; height: 100%; background: linear-gradient(90deg, var(--azul-claro), var(--azul)); border-radius: 6px; }
.barra-uso.alto i { background: #f59e0b; }
.barra-uso.lleno i { background: var(--rojo); }

/* ---- login ---- */
.pantalla-login { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at 20% 10%, #1e3a8a 0, var(--lateral) 55%); padding: 16px; }
.caja-login { width: 100%; max-width: 360px; background: #fff; border-radius: 16px; padding: 32px 28px; box-shadow: 0 20px 50px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 14px; }
.caja-login h1 { text-align: center; letter-spacing: .06em; }
.caja-login .sub { text-align: center; color: var(--tenue); margin: -10px 0 4px; }
.caja-login label { display: flex; flex-direction: column; gap: 5px; font-weight: 500; font-size: 13px; }
.logo-login { width: 56px; height: 56px; margin: 0 auto; }

/* ---- recibo ---- */
.pagina-recibo { background: #fff; padding: 24px 16px; min-height: 100vh; }
.recibo { max-width: 520px; margin: 0 auto; border: 1px solid var(--borde); border-radius: 12px; padding: 24px; }
.recibo header { display: flex; gap: 12px; align-items: center; padding-bottom: 16px; border-bottom: 2px solid var(--azul); margin-bottom: 16px; }
.recibo header img { width: 44px; }
.recibo header small { color: var(--tenue); }
.num-recibo { margin-left: auto; text-align: right; font-size: 13px; }
.recibo dl { display: grid; grid-template-columns: 100px 1fr; gap: 8px; margin: 0; }
.recibo dt { color: var(--tenue); }
.recibo dd { margin: 0; }
.total { display: flex; justify-content: space-between; align-items: center; background: var(--azul-suave); padding: 12px 14px; border-radius: 8px; margin: 18px 0 8px; }
.total b { font-size: 22px; }
.gracias { text-align: center; color: var(--tenue); }

/* ---- tickets ---- */
.pagina-tickets { background: #fff; min-height: 100vh; }
.barra-impresion { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--borde); position: sticky; top: 0; background: #fff; }
.barra-impresion b { flex: 1; }
.hoja-tickets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px; }
.ticket { border: 1.5px dashed #94a3b8; border-radius: 8px; padding: 7px 9px; break-inside: avoid; page-break-inside: avoid; }
.t-cab { display: flex; align-items: center; gap: 5px; font-weight: 700; font-size: 12px; border-bottom: 1px solid var(--borde); padding-bottom: 4px; margin-bottom: 5px; }
.t-cab img { width: 16px; }
.t-cab b { margin-left: auto; color: var(--azul); }
.t-cuerpo { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.t-cuerpo small { display: block; color: var(--tenue); font-size: 10px; }
.t-cuerpo code { background: none; padding: 0; font-size: 14px; font-weight: 700; letter-spacing: .05em; }
.t-codigo { font-size: 18px !important; }
.t-pie { margin: 3px 0 0; font-size: 10px; color: var(--tenue); }
.t-qr img, .t-qr canvas { width: 64px !important; height: 64px !important; }


/* ---- formulario de cliente ---- */
.ficha-form { background: var(--superficie); border: 1px solid var(--borde); border-radius: 14px; box-shadow: 0 10px 30px rgba(15, 23, 42, .08); overflow: hidden; margin-bottom: 24px; }
.ficha-form-cab { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; background: linear-gradient(90deg, #1d4ed8, #2563eb); color: #fff; }
.ficha-form-cab h2 { margin: 0; font-size: 19px; }
.ficha-form-cab .cerrar { color: #fff; font-size: 28px; line-height: 1; text-decoration: none; opacity: .85; }
.ficha-form-cab .cerrar:hover { opacity: 1; }
.ficha-form-cuerpo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 18px 18px 0; }
.ficha-form-cuerpo .col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ficha-form > .bloque { margin: 16px 18px 0; }
.bloque { background: #f8fafc; border: 1px solid #eef2f7; border-radius: 12px; padding: 14px 16px; }
.bloque h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: #334155; margin: 0 0 12px; display: flex; align-items: center; gap: 6px; }
.bloque h3 small, .bloque summary small { text-transform: none; letter-spacing: 0; color: var(--tenue); font-weight: 400; }
.ic { font-size: 12px; } .ic.azul { color: var(--azul); } .ic.verde { color: #16a34a; } .ic.morado { color: #9333ea; } .ic.ambar { color: #d97706; }
.derecha { margin-left: auto; font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 400; }
.bloque label, .bloque .etq { display: block; font-size: 13px; font-weight: 500; color: #334155; }
.bloque label small { color: var(--tenue); font-weight: 400; }
.bloque label > input, .bloque label > select, .bloque label > textarea, .bloque label > .con-boton, .bloque .fila-gps { margin-top: 5px; }
.bloque label > input, .bloque label > select, .bloque label > textarea { display: block; }
.bloque label > input ~ small, .bloque label > select ~ small, .bloque label > .con-boton ~ small { display: block; margin-top: 4px; }
.bloque .con-boton > select { flex: 1; }
.bloque input, .bloque select, .bloque textarea { background: #fff; }
.rejilla { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rejilla .r2 { grid-column: span 2; }
.rejilla.tres { grid-template-columns: repeat(6, 1fr); }
.rejilla.tres > label { grid-column: span 2; }
.rejilla.tres > .r3 { grid-column: span 6; }
.rejilla.tres > .r15 { grid-column: span 3; }
input.valor, input[readonly] { background: #eef2f7 !important; color: #475569; }
#valor { color: #16a34a; font-weight: 700; }
.buscador { position: relative; }
.resultados { position: absolute; top: 100%; left: 0; right: 0; z-index: 30; background: #fff; border: 1px solid var(--borde); border-radius: 8px; box-shadow: 0 10px 25px rgba(15, 23, 42, .12); margin-top: 4px; overflow: hidden; }
.resultados button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; font: inherit; cursor: pointer; border-bottom: 1px solid #f1f5f9; }
.resultados button:hover { background: var(--azul-suave); }
.vacio-res { padding: 9px 12px; color: var(--tenue); }
.fila-gps { display: flex; gap: 6px; }
.fila-gps input { flex: 1; font-family: ui-monospace, monospace; }
.btn.gps { background: #ef4444; border-color: #ef4444; color: #fff; }
.btn.gps:hover { background: #dc2626; }
.btn.verde { background: #22c55e; border-color: #22c55e; color: #fff; font-size: 16px; }
.mapa { height: 300px; border-radius: 10px; margin-top: 8px; border: 1px solid var(--borde); z-index: 0; }
.nota-tipo { border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.nota-tipo.pppoe { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.nota-tipo.ip { background: #faf5ff; border: 1px solid #e9d5ff; color: #7e22ce; }
.nota-tipo.vacio { background: #f1f5f9; color: var(--tenue); }
.caja-ip { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 12px; }
.caja-ip-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: #15803d; font-size: 13px; }
.caja-ip-cab small { color: #2563eb; }
#ip-uso { color: #16a34a; display: block; margin-top: 6px; }
.activacion { background: #f0fdf4; border-color: #bbf7d0; }
.activacion h3 { color: #15803d; font-size: 15px; text-transform: none; letter-spacing: 0; }
.opciones-activacion { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.op { display: grid !important; grid-template-columns: auto 1fr; gap: 0 8px !important; padding: 10px; border: 1.5px solid #cbd5e1; border-radius: 10px; background: #fff; cursor: pointer; }
.op input { grid-row: span 2; width: auto; margin-top: 2px; }
.op span { font-size: 11.5px; color: var(--tenue); font-weight: 400; }
.op:has(input:checked) { border-color: var(--azul); background: var(--azul-suave); }
.cobro-inicial { margin-top: 10px; }
.plegable summary { cursor: pointer; display: flex; align-items: center; gap: 6px; list-style: none; }
.plegable summary::-webkit-details-marker { display: none; }
.plegable summary::after { content: '⌄'; margin-left: 8px; color: var(--tenue); }
.plegable[open] summary { margin-bottom: 10px; }
.tiles-fotos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile-foto { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 4px !important; min-height: 92px; border: 1.5px solid #e2e8f0; border-radius: 12px; background: #fff; cursor: pointer; text-align: center; padding: 10px; }
.tile-foto:hover { border-color: var(--azul); }
.tile-foto.con-fotos { border-color: #22c55e; background: #f0fdf4; }
.tile-foto .ico { font-size: 22px; }
.tile-foto .mini { display: flex; gap: 3px; }
.tile-foto .mini img { width: 30px; height: 30px; object-fit: cover; border-radius: 4px; }
.ficha-form-pie { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 18px; margin-top: 16px; border-top: 1px solid var(--borde); background: #fff; position: sticky; bottom: 0; }
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.galeria figure { margin: 0; position: relative; }
.galeria img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; display: block; }
.galeria figcaption { font-size: 12px; color: var(--tenue); display: flex; justify-content: space-between; align-items: center; margin-top: 3px; }
.galeria form { display: inline; }
.mapa-ficha { height: 220px; border-radius: 10px; margin-top: 12px; z-index: 0; }
@media (max-width: 1000px) { .ficha-form-cuerpo { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .rejilla, .rejilla.tres { grid-template-columns: 1fr; }
  .rejilla .r2, .rejilla.tres > label, .rejilla.tres > .r3, .rejilla.tres > .r15 { grid-column: auto; }
  .opciones-activacion, .tiles-fotos { grid-template-columns: 1fr 1fr; }
  .ficha-form-cuerpo { padding: 12px 12px 0; } .ficha-form > .bloque { margin: 12px 12px 0; }
}

/* ---- centro de mensajes ---- */
.pestanas { display: flex; gap: 4px; border-bottom: 1px solid var(--borde); margin-bottom: 18px; overflow-x: auto; }
.pestanas a { padding: 10px 14px; color: var(--tenue); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.pestanas a:hover { text-decoration: none; color: var(--texto); }
.pestanas a.activa { color: var(--azul); border-bottom-color: var(--azul); }
.lista-opciones { border: 1px solid var(--borde); border-radius: 10px; overflow: hidden; }
.opcion-linea { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--borde); cursor: pointer; }
.opcion-linea:last-child { border-bottom: 0; }
.opcion-linea span { display: flex; flex-direction: column; }
.opcion-linea small { color: var(--tenue); }
.opcion-linea:has(input:checked) { background: var(--azul-suave); }
.caja-meta { border: 1px solid var(--borde); border-radius: 10px; padding: 12px 14px; margin-top: 14px; }
.caja-meta legend { font-weight: 600; padding: 0 6px; }
.wa-estado { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; background: #f8fafc; border: 1px solid var(--borde); border-radius: 12px; padding: 16px; }
.wa-icono { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: #cbd5e1; color: #fff; }
.wa-estado.conectado .wa-icono { background: #22c55e; }
.wa-estado.qr .wa-icono, .wa-estado.iniciando .wa-icono, .wa-estado.reconectando .wa-icono { background: #f59e0b; }
.wa-estado.sin_servicio .wa-icono { background: var(--rojo); }
.wa-texto p { margin: 2px 0 0; }
.wa-estado img { width: 220px; height: 220px; background: #fff; border-radius: 8px; padding: 6px; border: 1px solid var(--borde); }
.acciones.entre { justify-content: space-between; }
.acciones form.acciones { margin: 0; }
.ambar-aviso { background: var(--ambar-suave); color: #92400e; border: 1px solid #fcd34d; margin-top: 16px; font-weight: 400; }
label.plantilla { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
@media (max-width: 700px) { .wa-estado { grid-template-columns: auto 1fr; } .wa-estado img { grid-column: span 2; margin: 0 auto; } }

/* ---- ventana del cliente ---- */
body.sin-scroll { overflow: hidden; }
tr.clicable { cursor: pointer; }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(15, 23, 42, .55); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 16px; overflow-y: auto; }
.modal[hidden] { display: none; }
.modal-caja { background: #fff; border-radius: 14px; width: 100%; max-width: 900px; box-shadow: 0 25px 60px rgba(0,0,0,.3); display: flex; flex-direction: column; max-height: 92vh; }
.modal-carga { padding: 60px; text-align: center; color: var(--tenue); }
.modal-cab { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px 6px; }
.modal-cab h2 { margin: 0; font-size: 19px; }
.modal-cab .cerrar { border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--tenue); }
.modal-tabs { display: flex; gap: 2px; padding: 0 14px; border-bottom: 1px solid var(--borde); overflow-x: auto; }
.modal-tabs button { border: 0; background: none; font: inherit; font-weight: 600; color: var(--tenue); padding: 10px 12px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.modal-tabs button.activa { color: var(--azul); border-bottom-color: var(--azul); }
.punto-num { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--rojo); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.punto-num.gris { background: #94a3b8; }
.modal-cuerpo { padding: 16px 20px; overflow-y: auto; flex: 1; min-height: 0; }
.tres-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tres-col h4, .modal-cuerpo h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #475569; border-bottom: 1px solid var(--borde); padding-bottom: 6px; margin: 0 0 8px; }
.modal-cuerpo h4.sep { margin-top: 18px; }
.tres-col p { margin: 0 0 6px; font-size: 13.5px; word-break: break-word; }
.tres-col p span { color: var(--tenue); }
.verde-txt { color: #16a34a; }
.fila-estado { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.en-linea { display: inline; }
.tabla.compacta th, .tabla.compacta td { padding: 7px 8px; font-size: 13px; }
.modal-cuerpo .acciones { margin: 0 0 12px; }
.modal-pie { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--borde); background: #f8fafc; border-radius: 0 0 14px 14px; }
.menu-mas { position: relative; }
.menu-lista { position: absolute; bottom: calc(100% + 6px); right: 0; z-index: 5; background: #fff; border: 1px solid var(--borde); border-radius: 10px; box-shadow: 0 12px 30px rgba(15,23,42,.18); min-width: 250px; padding: 6px; }
.menu-lista a, .menu-lista button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; font: inherit; color: var(--texto); border-radius: 6px; cursor: pointer; }
.menu-lista a:hover, .menu-lista button:hover { background: #f1f5f9; text-decoration: none; }
.menu-lista button[disabled] { opacity: .45; cursor: not-allowed; }
.menu-lista .rojo { color: var(--rojo); }
.menu-lista hr { border: 0; border-top: 1px solid var(--borde); margin: 5px 0; }
.menu-lista form { margin: 0; }
.factura .detalle-factura { margin: 16px 0 6px; }
.factura .detalle-factura th { background: #f8fafc; }
@media (max-width: 700px) { .tres-col { grid-template-columns: 1fr; } .modal { padding: 0; } .modal-caja { border-radius: 0; max-height: 100vh; min-height: 100vh; } }

/* ---- planes ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { padding: 5px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; }
.chip.oscuro { background: #0f172a; color: #fff; } .chip.azul { background: #dbeafe; color: #1e40af; } .chip.verde { background: #dcfce7; color: #166534; }
.chip.morado { background: #f3e8ff; color: #7e22ce; } .chip.lila { background: #e0e7ff; color: #3730a3; }
.btn.naranja { background: #f97316; border-color: #f97316; color: #fff; }
.btn.naranja:hover { background: #ea580c; }
.btn.sin-borde { border-color: transparent; background: none; }
.plan-nombre { display: flex; gap: 12px; align-items: center; min-width: 210px; }
.vel { white-space: nowrap; }
.plan-ico { width: 38px; height: 38px; border-radius: 10px; background: #e0e7ff; display: grid; place-items: center; flex: none; }
.badge.azul-badge { background: #dbeafe; color: #1e40af; }
.badge.morado-badge { background: #f3e8ff; color: #7e22ce; }
.plan-form { max-width: 680px; }
.plan-form .modal-cab { padding: 22px 24px 8px; align-items: flex-start; }
.plan-form .modal-cuerpo { padding: 12px 24px; display: flex; flex-direction: column; gap: 14px; }
.campo-icono { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: #334155; min-width: 0; }
.campo-icono > span { position: relative; display: block; }
.campo-icono > span > i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-style: normal; color: #64748b; pointer-events: none; font-size: 14px; }
.campo-icono input, .campo-icono select { padding-left: 34px; height: 42px; }
.plan-form .dos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.plan-form .tres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.caja-boost { border: 1px solid var(--borde); background: #f8fafc; border-radius: 12px; padding: 14px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.caja-boost legend { font-weight: 600; font-size: 13px; padding: 0 6px; }
.caja-boost p { margin: 0; font-size: 12.5px; }
.titulo-boost { display: flex; justify-content: space-between; align-items: center; cursor: pointer; color: #1e40af; }
.titulo-boost input { width: 20px; height: 20px; }
[data-boost].apagado { opacity: .45; }
.pequeño { font-size: 12px; }
.modal-pie.al-final { justify-content: flex-end; }
@media (max-width: 640px) { .plan-form .dos, .plan-form .tres { grid-template-columns: 1fr; } }

/* ---- menú con grupos ---- */
.lateral nav a > span, .lateral summary > span { flex: 1; }
.grupo { margin-bottom: 2px; }
.grupo summary { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: var(--lateral-texto); font-weight: 500; cursor: pointer; list-style: none; user-select: none; }
.grupo summary::-webkit-details-marker { display: none; }
.grupo summary:hover { background: rgba(255,255,255,.06); color: #fff; }
.grupo summary.con-activo { color: #fff; }
.grupo[open] summary { background: rgba(255,255,255,.04); }
.flecha { width: 7px; height: 7px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(-45deg); transition: transform .15s; opacity: .7; margin-right: 4px; }
.grupo[open] .flecha { transform: rotate(45deg); }
.grupo .sub { margin: 2px 0 6px 21px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.12); }
.grupo .sub a { padding: 7px 10px; font-size: 13.5px; }
.grupo .sub a svg { width: 17px; height: 17px; opacity: .8; }
.contador { font-style: normal; background: var(--rojo); color: #fff; font-size: 11px; font-weight: 700; border-radius: 9px; padding: 0 6px; line-height: 18px; }

/* ---- responsive ---- */
@media (max-width: 1000px) {
  .dos-col, .pasos-script { grid-template-columns: 1fr; }
  .ficha-cabecera { grid-template-columns: 1fr; }
  .hoja-tickets { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .lateral { transform: translateX(-100%); }
  #menu-toggle:checked ~ .lateral { transform: none; }
  #menu-toggle:checked ~ .velo { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 10; }
  .contenido { margin-left: 0; padding: 0 16px 40px; }
  .hamburguesa { display: flex; }
  .buscar-global { display: none; }
  .campos .ancho2 { grid-column: auto; }
  .tabla th, .tabla td { padding: 9px 10px; }
  .hoja-tickets { grid-template-columns: repeat(2, 1fr); }
}
@media print {
  .no-imprimir { display: none !important; }
  .pagina-recibo { padding: 0; }
  .recibo { border: 0; }
  .hoja-tickets { grid-template-columns: repeat(4, 1fr); padding: 0; gap: 4px; }
  @page { margin: 8mm; }
}
.bloque input[hidden], .bloque [hidden] { display: none !important; }
.subir-fotos { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.subir-fotos select { width: auto; }
.subir-fotos input[type=file] { flex: 1; min-width: 180px; padding: 5px; }
.acciones.centro { justify-content: center; }
.vista-correo { width: 100%; height: 520px; border: 1px solid var(--borde); border-radius: 10px; background: #f1f5f9; }

/* Mapa de red y soporte */
.leyenda-mapa { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; font-size: 13px; color: var(--tenue); }
.leyenda-mapa i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #cbd5e1; margin-left: 8px; }
.leyenda-mapa i.eq { border-radius: 3px; background: #2563eb; }
.leyenda-mapa b { color: var(--texto); }
.marca-equipo { font-size: 20px; line-height: 26px; text-align: center; background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.lista-simple { margin: 10px 0 0; padding-left: 18px; columns: 2 280px; font-size: 13.5px; }
.lista-simple li { margin-bottom: 4px; break-inside: avoid; }
details.tarjeta > summary { cursor: pointer; }
@media (max-width: 760px) { .leyenda-mapa { margin-left: 0; } }

/* Firewall */
.titulo-seccion { font-size: 17px; margin: 26px 0 12px; }
.fw-cabecera { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 24px; align-items: start; }
.fw-cabecera h2 { margin-top: 0; }
.fw-cabecera p { font-size: 13.5px; line-height: 1.55; }
.kpi .fw-nivel { height: 6px; background: #e2e8f0; border-radius: 99px; margin-top: 8px; overflow: hidden; }
.kpi .fw-nivel i { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #16a34a); border-radius: inherit; }
.fw-grupos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.fw-grupos > .tarjeta { margin: 0; }
.fw-grupos h3 { margin: 0 0 4px; font-size: 15.5px; }
.fw-grupos h3 + .tenue { margin: 0 0 8px; font-size: 13px; }
.fw-prot { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--borde); scroll-margin-top: 90px; }
.fw-prot b { font-size: 14px; margin-right: 4px; }
.fw-prot p { margin: 4px 0 0; font-size: 13px; color: var(--tenue); line-height: 1.45; }
.fw-prot .badge { font-size: 11px; vertical-align: 1px; }
.interruptor { flex: none; position: relative; width: 44px; height: 24px; border-radius: 99px; border: 0; background: #cbd5e1; cursor: pointer; padding: 0; margin-top: 1px; transition: background .2s; }
.interruptor i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.interruptor.on { background: #16a34a; }
.interruptor.on i { transform: translateX(20px); }
.interruptor:disabled { opacity: .45; cursor: not-allowed; }
.interruptor:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
.fw-interfaces { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fw-if { display: flex !important; align-items: center; gap: 8px; border: 1px solid var(--borde); border-radius: 10px; padding: 8px 12px; cursor: pointer; min-width: 170px; margin: 0 !important; }
.fw-if.sel, .fw-if:has(input:checked) { border-color: var(--azul); background: #eff6ff; }
.fw-if span { display: flex; flex-direction: column; line-height: 1.2; }
.fw-if small { color: var(--tenue); font-size: 11.5px; font-weight: 400; }
.fw-if .punto { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; flex: none; }
.fw-if .punto.on { background: #16a34a; }
.fw-agregar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.fw-agregar input { flex: 1 1 140px; width: auto; }
.fw-agregar select { width: auto; }
.fw-lista { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow: auto; }
.fw-lista li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--borde); font-size: 13px; }
.fw-lista li small { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw-lista form { margin: 0; }
.btn-x { border: 0; background: none; color: var(--tenue); cursor: pointer; font-size: 13px; padding: 2px 6px; border-radius: 6px; }
.btn-x:hover { background: #fee2e2; color: var(--rojo); }
@media (max-width: 960px) { .fw-grupos, .fw-cabecera { grid-template-columns: 1fr; } }

/* Barra superior: router, notificaciones y usuario */
.barra { position: relative; z-index: 30; }
.barra-acciones { display: flex; align-items: center; gap: 8px; }
.desplegable { position: relative; }
.barra-acciones svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.barra-acciones .chev { width: 15px; height: 15px; opacity: .7; }
.chip-router { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid #bfdbfe; background: #eff6ff; color: #1d4ed8; font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; max-width: 240px; }
.chip-router span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-router:hover, .desplegable.abierto .chip-router { background: #dbeafe; }
.chip-router .punto { width: 8px; height: 8px; box-shadow: none; }
.icono-barra { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: none; color: #475569; cursor: pointer; }
.icono-barra:hover, .desplegable.abierto > .icono-barra { background: #e2e8f0; color: var(--texto); text-decoration: none; }
.globo { position: absolute; top: -3px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--rojo); color: #fff; font-size: 10.5px; font-style: normal; font-weight: 700; line-height: 16px; text-align: center; border: 2px solid var(--fondo, #f1f5f9); box-sizing: content-box; }
.globo[hidden] { display: none; }
.chip-usuario { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 4px; border: 0; border-radius: 99px; background: none; font: inherit; font-weight: 600; font-size: 13.5px; color: var(--texto); cursor: pointer; }
.chip-usuario:hover, .desplegable.abierto .chip-usuario { background: #e2e8f0; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; flex: none; }
.avatar.grande { width: 42px; height: 42px; font-size: 15px; }
.nombre-usuario { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; font-size: 13px; }
.caja { position: absolute; top: calc(100% + 8px); right: 0; width: 340px; background: var(--superficie, #fff); border: 1px solid var(--borde); border-radius: 14px; box-shadow: 0 18px 40px rgba(15,23,42,.16); overflow: hidden; z-index: 50; }
.caja[hidden] { display: none; }
.caja-routers { right: auto; left: 0; width: 300px; }
.caja-usuario { width: 260px; }
.caja-cab { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--borde); }
.caja-cab b { flex: 1; font-size: 14px; }
.caja-cab small { color: var(--tenue); font-size: 12px; }
.caja-cab.perfil span:last-child { display: flex; flex-direction: column; min-width: 0; }
.caja-cab.perfil small { overflow: hidden; text-overflow: ellipsis; }
.caja-cab .rol { color: var(--azul); font-weight: 600; }
.caja > a, .caja-routers > a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--texto); font-size: 13.5px; }
.caja > a:hover { background: #f1f5f9; text-decoration: none; }
.caja-routers > a span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.caja-routers > a small { color: var(--tenue); font-size: 12px; }
.caja-routers > a.sel { background: #eff6ff; }
.caja-routers > a em { color: var(--azul); font-style: normal; font-weight: 700; }
.caja-routers .punto { width: 9px; height: 9px; box-shadow: none; flex: none; }
.caja-usuario > a svg { width: 18px; height: 18px; color: var(--tenue); }
.caja-usuario > a.salir { border-top: 1px solid var(--borde); color: var(--rojo); }
.caja-usuario > a.salir svg { color: var(--rojo); }
.caja-pie { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--borde); background: #f8fafc; font-size: 13px; }
.caja-pie a { font-weight: 600; }
.enlace-chico { border: 0; background: none; color: var(--tenue); font: inherit; font-size: 12px; cursor: pointer; padding: 2px 4px; }
.enlace-chico:hover { color: var(--azul); }
.cerrar-caja { border: 0; background: none; color: var(--tenue); font-size: 15px; cursor: pointer; padding: 0 2px; }
.caja-notif { width: 380px; }
.notif-lista { max-height: min(460px, 65vh); overflow-y: auto; }
.notif { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid #f1f5f9; color: var(--texto); border-left: 3px solid transparent; }
.notif:hover { background: #f8fafc; text-decoration: none; }
.notif.alerta { border-left-color: var(--rojo); }
.notif.aviso { border-left-color: #f59e0b; }
.notif.info { border-left-color: var(--azul); }
.notif-icono { font-size: 18px; line-height: 1.2; flex: none; }
.notif-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-txt b { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.notif-txt small { color: #475569; font-size: 12.5px; line-height: 1.35; }
.notif-txt em { color: var(--tenue); font-size: 11.5px; font-style: normal; }
.notif-vacio { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 20px; color: var(--tenue); font-size: 14px; }
.notif-vacio svg { width: 42px; height: 42px; fill: none; stroke: #94a3b8; stroke-width: 1.8; stroke-linecap: round; }
@media (max-width: 860px) {
  .nombre-usuario, .chip-router span { display: none; }
  .chip-router { padding: 0 9px; }
  .caja, .caja-notif { position: fixed; top: 64px; left: 10px; right: 10px; width: auto; }
}
.fila-notif { align-items: flex-start; padding: 14px 18px; }
.fila-notif.leida { opacity: .62; border-left-color: transparent; }
.fila-notif .notif-txt { flex: 1; }
.fila-notif .notif-txt b a { color: inherit; }
.fila-notif .al-final { margin-left: auto; }
.kpi.sel { border-color: var(--azul); box-shadow: 0 0 0 3px #dbeafe; }

/* Cuentas */
.campos label[hidden], [data-solo-cuenta][hidden], [data-solo-colaborador][hidden] { display: none !important; }
.opciones-tipo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 6px 0 16px; }
.opcion-tipo { display: flex !important; gap: 10px; align-items: flex-start; border: 1.5px solid var(--borde); border-radius: 12px; padding: 12px 14px; cursor: pointer; margin: 0 !important; }
.opcion-tipo:has(input:checked) { border-color: var(--azul); background: #eff6ff; }
.opcion-tipo input { margin-top: 3px; }
.opcion-tipo span { display: flex; flex-direction: column; gap: 3px; }
.opcion-tipo small { color: var(--tenue); font-weight: 400; line-height: 1.4; }
.banda-cuenta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fef3c7; border: 1px solid #fcd34d; color: #78350f; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; }
.banda-cuenta a { margin-left: auto; font-weight: 600; }
@media (max-width: 700px) { .opciones-tipo { grid-template-columns: 1fr; } }
.renombrar { display: flex; align-items: center; gap: 4px; margin: 0; }
.renombrar input { border: 1px solid transparent; background: transparent; font-weight: 600; padding: 4px 6px; width: 200px; }
.renombrar input:hover, .renombrar input:focus { border-color: var(--borde); background: #fff; }

/* Solicitudes desde la app */
.solicitud-plan h2 { display: flex; align-items: center; gap: 8px; }
.cambio-plan { display: flex; align-items: stretch; gap: 14px; margin: 6px 0 16px; flex-wrap: wrap; }
.cambio-plan > div { flex: 1; min-width: 180px; border: 1px solid var(--borde); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.cambio-plan > div.nuevo { border-color: var(--azul); background: #eff6ff; }
.cambio-plan b { font-size: 16px; }
.cambio-plan span { color: var(--tenue); font-size: 13px; }
.flecha-plan { align-self: center; font-size: 22px; color: var(--tenue); }
.eventos li.nota-cliente { background: #f5f3ff; border-radius: 8px; padding: 8px 10px; border-bottom: 0; margin-bottom: 4px; }
.datos-app { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.datos-app > div { border: 1px dashed var(--borde); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.datos-app small { color: var(--tenue); font-size: 12px; }

/* Lista de clientes */
.barra-clientes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; position: relative; z-index: 20; }
.barra-clientes form { margin: 0; }
.barra-clientes .desplegable .caja { left: 0; right: auto; }
.buscar-clientes { margin-left: auto !important; flex: 1 1 240px; max-width: 360px; }
.buscar-clientes input { width: 100%; }
.cuenta-sel { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 99px; background: var(--azul); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.cuenta-sel[hidden] { display: none; }
.caja-acciones { width: 300px; padding-bottom: 6px; }
.caja-menu { width: 230px; }
.caja-acciones > button, .caja-acciones summary { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 14px; border: 0; background: none; font: inherit; font-size: 13.5px; color: var(--texto); text-align: left; cursor: pointer; }
.caja-acciones > button:hover, .caja-acciones summary:hover { background: #f1f5f9; }
.caja-acciones .peligro-txt { color: var(--rojo); }
.caja-acciones .todos-filtro { display: flex; gap: 8px; align-items: center; margin: 0; padding: 9px 14px; font-size: 12.5px; color: var(--tenue); border-bottom: 1px solid var(--borde); }
.sub-accion { border-top: 0; }
.sub-accion summary { list-style: none; }
.sub-accion summary::-webkit-details-marker { display: none; }
.sub-accion[open] { background: #f8fafc; padding-bottom: 10px; }
.sub-accion select, .sub-accion textarea { display: block; width: calc(100% - 28px); margin: 4px 14px 6px; }
.sub-accion small { display: block; margin: 0 14px 6px; }
.sub-accion .btn { margin-left: 14px; }
.lista-clientes { overflow: visible; }
.contadores { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--borde); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chips form { margin: 0; }
.chip-cont { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; background: #f1f5f9; color: #334155; }
.chip-cont:hover { text-decoration: none; filter: brightness(.96); }
.chip-cont.sel { border-color: currentColor; box-shadow: 0 0 0 2px rgba(37, 99, 235, .12); }
.chip-cont.total { background: #e2e8f0; color: #0f172a; }
.chip-cont.verde { background: #dcfce7; color: #166534; }
.chip-cont.rojo { background: #fee2e2; color: #b91c1c; }
.chip-cont.ambar { background: #fef9c3; color: #854d0e; }
.chip-cont.naranja { background: #ffedd5; color: #c2410c; }
.chip-cont.azulado { background: #e0f2fe; color: #0369a1; cursor: default; }
a.chip-cont.azulado { cursor: pointer; }
.chip-select select { height: 30px; padding: 0 8px; font-size: 12.5px; font-weight: 600; border-radius: 8px; }
.mini-barra { display: inline-block; width: 44px; height: 5px; border-radius: 9px; background: rgba(3, 105, 161, .18); overflow: hidden; margin-left: 4px; }
.mini-barra i { display: block; height: 100%; background: currentColor; }
.opciones-lista { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.opciones-lista label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--tenue); }
.opciones-lista select { height: 32px; padding: 0 8px; font-size: 13px; }
.pestanas-lista { margin: 0; padding: 0 10px; }
.pestanas-lista em { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 99px; background: #e2e8f0; color: var(--tenue); margin-left: 3px; }
.tabla-clientes th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.tabla-clientes td { vertical-align: middle; }
.tabla-clientes .col-sel { width: 34px; text-align: center; }
.tabla-clientes tr.marcada td { background: #eff6ff; }
.punto-enlace { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; margin-right: 6px; vertical-align: top; margin-top: 4px; }
.punto-enlace.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.punto-enlace.off { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .15); }
.tabla-clientes td.enlace { white-space: nowrap; }
.tabla-clientes td.enlace small { display: inline-block; line-height: 1.3; }
.acciones-iconos { white-space: nowrap; }
.acciones-iconos a { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: #475569; }
.acciones-iconos a:hover { background: #e2e8f0; text-decoration: none; }
.error-txt { color: var(--rojo); font-weight: 600; }
@media (max-width: 760px) { .buscar-clientes { max-width: none; margin-left: 0 !important; } .opciones-lista { width: 100%; } }
.chip-cont b { font-size: inherit; font-weight: 800; }
.tabla-clientes td:nth-child(5), .tabla-clientes td:nth-child(6), .tabla-clientes td:nth-child(8) { white-space: nowrap; }
.tabla-clientes { min-width: 1000px; } .tabla-clientes td:first-child + td { min-width: 150px; }
.banda-prueba { background: linear-gradient(90deg, #eef2ff, #e0f2fe); border-color: #c7d2fe; color: #1e3a8a; display: block; }
.banda-prueba a { margin-left: 8px; }
.badge.azul { background: #dbeafe; color: #1e40af; }
.registro-ajustes { margin-bottom: 16px; }
.registro-ajustes summary { cursor: pointer; list-style: none; }
.registro-ajustes summary::-webkit-details-marker { display: none; }
.registro-ajustes summary::before { content: "▸ "; color: var(--tenue); }
.registro-ajustes[open] summary::before { content: "▾ "; }
.dar-plan { position: relative; display: inline-block; }
.dar-plan summary { list-style: none; }
.dar-plan summary::-webkit-details-marker { display: none; }
.caja-plan { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: 250px; display: grid; gap: 8px; padding: 14px; background: #fff; border: 1px solid var(--borde); border-radius: 12px; box-shadow: 0 18px 40px rgba(15, 23, 42, .16); text-align: left; }
.caja-plan label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; }
.col-plan { white-space: nowrap; }
