/* ==========================================================================
   SportSyncec 365 · base común de estilos (ui.css)
   Estilo ERP: verde muy oscuro, esquinas rectas, paneles con encabezado
   y líneas divisoras. El botón de tema cambia entre "moderno" (sombra
   suave bajo los paneles) y "plano" (solo líneas).
   ========================================================================== */

:root {
  --texto: #101512;
  --texto-suave: #4a554e;
  --borde: #d3d9d5;
  --borde-suave: #e6eae7;
  --linea: #c7cfca;
  --fondo: #eff1f0;
  --blanco: #ffffff;

  --verde-osc: #0a3520;      /* principal */
  --verde-osc2: #06231a;     /* menú, parte baja */
  --verde: #12492d;          /* hover de botones */
  --verde-acento: #2f7a4f;   /* detalles finos */
  --verde-claro: #e3ebe6;    /* fondos seleccionados (gris verdoso, no cansa) */
  --verde-texto-claro: #c5d6cc;

  --amarillo-claro: #f8f1cf;
  --amarillo-borde: #e3d48f;
  --rojo-suave: #f9e1e1;
  --rojo-texto: #8f1d1d;

  --sombra: 0 2px 0 rgba(6, 35, 26, .10), 0 4px 10px -6px rgba(6, 35, 26, .35);
  --sombra-hover: 0 2px 0 rgba(6, 35, 26, .14), 0 8px 16px -8px rgba(6, 35, 26, .45);
  --radio: 2px;
  --radio-sm: 2px;
  --menu-ancho: 256px;
  --fuente: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

html[data-tema="plano"] {
  --sombra: none;
  --sombra-hover: none;
  --fondo: #f7f8f7;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--fuente); font-size: 14px; color: var(--texto); background: var(--fondo); line-height: 1.45; }
a { color: var(--verde-osc); }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--verde-osc); margin: 0 0 .6rem; line-height: 1.25; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.08rem; }
h3 { font-size: .98rem; }
small, .suave { color: var(--texto-suave); }
hr { border: 0; border-top: 1px solid var(--borde); margin: 14px 0; }
.ico { width: 18px; height: 18px; flex: 0 0 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nw { white-space: nowrap; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cortar { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ----- Estructura ----- */
.app { display: flex; min-height: 100vh; }
.menu {
  width: var(--menu-ancho); flex: 0 0 var(--menu-ancho);
  background: linear-gradient(180deg, var(--verde-osc) 0%, var(--verde-osc2) 100%); color: #fff;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 14px 10px 14px;
  display: flex; flex-direction: column;
}
.menu .marca { display: flex; align-items: center; gap: 10px; padding: 2px 6px 14px; border-bottom: 1px solid rgba(255, 255, 255, .14); margin-bottom: 10px; min-width: 0; }
.menu .marca img { width: 40px; height: 40px; flex: 0 0 40px; object-fit: contain; background: #fff; border: 1px solid rgba(255, 255, 255, .4); }
.menu .marca .cir { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; background: #fff; color: var(--verde-osc); font-weight: 800; font-size: 14px; }
.menu .marca .txt { min-width: 0; }
.menu .marca b {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  color: #fff; font-size: 13.5px; line-height: 1.25; word-break: break-word;
}
.menu .marca span { display: block; font-size: 11.5px; color: var(--verde-texto-claro); margin-top: 2px; }
.menu .volver {
  display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 10px; min-width: 0;
  border: 1px solid rgba(255, 255, 255, .45); color: #fff; text-decoration: none; font-weight: 600; font-size: 13px;
}
.menu .volver span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu .volver:hover { background: rgba(255, 255, 255, .12); text-decoration: none; }
.menu-seccion > button, .menu a.item {
  width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: 0; border-left: 3px solid transparent;
  padding: 8px 10px; font: inherit; font-weight: 600; color: #fff; cursor: pointer; text-align: left; text-decoration: none;
}
.menu-seccion > button:hover, .menu a.item:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }
.menu-seccion.abierta > button { background: rgba(255, 255, 255, .06); }
.menu-seccion > button .flecha { margin-left: auto; transition: transform .15s; }
.menu-seccion.abierta > button .flecha { transform: rotate(90deg); }
.menu-seccion .sub { overflow: hidden; max-height: 0; transition: max-height .25s ease; padding-left: 31px; }
.menu-seccion.abierta .sub { max-height: 640px; }
.menu .sub a { display: block; padding: 6px 10px; color: var(--verde-texto-claro); font-size: 13px; text-decoration: none; border-left: 3px solid transparent; }
.menu .sub a:first-child { margin-top: 2px; }
.menu .sub a:last-child { margin-bottom: 6px; }
.menu .sub a:hover { color: #fff; background: rgba(255, 255, 255, .06); text-decoration: none; }
.menu a.activo, .menu .sub a.activo { background: rgba(255, 255, 255, .14); border-left-color: #8fd1a8; color: #fff; }
.menu-pie { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .14); display: flex; align-items: center; justify-content: center; }
.menu-pie .usuario { flex: 1; min-width: 0; font-size: 12px; color: var(--verde-texto-claro); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-pie .usuario b { display: block; color: #fff; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.btn-salir {
  width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid rgba(255, 255, 255, .55); color: #fff;
}
.btn-salir:hover { background: var(--rojo-suave); color: var(--rojo-texto); border-color: var(--rojo-suave); }
.btn-salir .ico { width: 19px; height: 19px; }

.principal { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.barra {
  display: flex; align-items: center; gap: 12px; padding: 8px 22px; min-height: 52px;
  background: var(--blanco); border-bottom: 2px solid var(--verde-osc); position: sticky; top: 0; z-index: 20;
}
.barra .empresa-barra { font-weight: 600; color: var(--texto-suave); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.barra .derecha { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.contenido { padding: 20px 26px 44px; width: 100%; max-width: 1440px; margin: 0 auto; }

/* Encabezado de cada pantalla: título junto al contenido */
.pagina-cab { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; padding-bottom: 12px; margin-bottom: 18px; border-bottom: 1px solid var(--linea); }
.pagina-cab .tit { min-width: 0; }
.pagina-cab h1 { margin: 0; font-size: 1.45rem; }
.pagina-cab .ruta { font-size: 12px; color: var(--texto-suave); margin-bottom: 2px; text-transform: uppercase; letter-spacing: .4px; }
.pagina-cab .acciones { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ----- Paneles (tarjetas) ----- */
.tarjeta { background: var(--blanco); border: 1px solid var(--borde); box-shadow: var(--sombra); padding: 16px 18px; margin-bottom: 18px; min-width: 0; }
.tarjeta > h2:first-child, .tarjeta > h3:first-child { margin: -16px -18px 14px; padding: 11px 18px; border-bottom: 1px solid var(--borde); background: #f7f9f8; font-size: 1rem; }
.tarjeta-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -16px -18px 14px; padding: 9px 18px; border-bottom: 1px solid var(--borde); background: #f7f9f8; min-height: 46px; }
.tarjeta-cab h2, .tarjeta-cab h3 { margin: 0; font-size: 1rem; }
.tarjeta-cab .acciones { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.seccion { border-top: 1px solid var(--borde-suave); margin: 14px -18px 0; padding: 14px 18px 0; }
.seccion > h3 { font-size: .9rem; text-transform: uppercase; letter-spacing: .4px; color: var(--texto-suave); margin-bottom: 10px; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .span-todo { grid-column: 1 / -1; }

.kpi { background: var(--blanco); border: 1px solid var(--borde); border-left: 3px solid var(--verde-osc); box-shadow: var(--sombra); padding: 12px 16px; min-width: 0; }
.kpi .et { display: inline-block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--texto-suave); }
.kpi .et.am { color: #6b5a0f; }
.kpi .val { font-size: 1.55rem; font-weight: 700; margin-top: 4px; white-space: nowrap; color: var(--verde-osc); overflow: hidden; text-overflow: ellipsis; }
.kpi .det { font-size: 12.5px; color: var(--texto-suave); }

/* ----- Etiquetas ----- */
.etq {
  display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: var(--radio-sm);
  border: 1px solid var(--borde); background: var(--verde-claro); white-space: nowrap; color: var(--texto); line-height: 1.4;
}
.etq.am { background: var(--amarillo-claro); border-color: var(--amarillo-borde); }
.etq.bl { background: var(--blanco); }
.etq.ok { background: var(--verde-claro); border-color: #a9c4b3; color: var(--verde-osc); }
.etq.osc { background: var(--verde-osc); border-color: var(--verde-osc); color: #fff; }
.etq.rojo { background: var(--rojo-suave); color: var(--rojo-texto); border-color: #eab4b4; }

/* ----- Botones ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; font: inherit; font-weight: 600; color: var(--verde-osc); text-decoration: none;
  background: var(--blanco); border: 1px solid var(--verde-osc); border-radius: var(--radio-sm);
  cursor: pointer; white-space: nowrap; line-height: 1.2; min-height: 34px;
}
.btn:hover { background: var(--verde-claro); text-decoration: none; }
.btn.prim { background: var(--verde-osc); color: #fff; }
.btn.prim:hover { background: var(--verde); }
.btn.am { background: var(--amarillo-claro); color: var(--texto); border-color: #b9a34a; }
.btn.peligro { border-color: var(--rojo-texto); color: var(--rojo-texto); }
.btn.peligro:hover { background: var(--rojo-suave); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; min-height: 28px; }
.btn.lg { padding: 11px 20px; font-size: 15px; min-height: 44px; }
.btn.bloque { width: 100%; }
.btn { max-width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn .ico { width: 16px; height: 16px; }
.grupo-btn { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-menu { color: var(--verde-osc); }

/* ----- Formularios ----- */
label { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 4px; color: var(--texto); }
.campo { margin-bottom: 12px; min-width: 0; }
.campo small { display: block; margin-top: 3px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time],
input[type=search], input[type=tel], input[type=file], select, textarea {
  width: 100%; padding: 7px 10px; font: inherit; color: var(--texto); background: var(--blanco); min-height: 36px;
  border: 1px solid #a7b1ab; border-radius: var(--radio-sm); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--verde-osc); box-shadow: 0 0 0 2px rgba(10, 53, 32, .16); }
input[readonly] { background: #f2f4f3; }
textarea { min-height: 60px; resize: vertical; }
input[type=checkbox], input[type=radio] { accent-color: var(--verde-osc); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; margin-bottom: 8px; }
.check input { width: 16px; height: 16px; flex: 0 0 16px; }
.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--borde-suave); }
.filtros .campo { margin-bottom: 0; min-width: 140px; }
.filtros .crece { flex: 1; min-width: 200px; }
.filtros .check { margin: 0 0 8px; }
.error-campo { color: var(--rojo-texto); font-size: 12.5px; }
.clave-wrap { position: relative; }
.clave-wrap input { padding-right: 42px; }
.ojito { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; padding: 4px; color: var(--texto); }
/* Campo con botones pegados: [buscar.............][+ Nuevo][Consumidor final] */
.grupo-input { display: flex; align-items: stretch; min-width: 0; }
.grupo-input > input, .grupo-input > select, .grupo-input > .ac { flex: 1; min-width: 0; }
.grupo-input > .ac > input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.grupo-input > .btn { border-left-width: 0; min-height: 36px; }
.grupo-input > .btn:first-of-type { border-left-width: 1px; }
.dato { padding: 8px 10px; border: 1px solid var(--borde); background: #f7f9f8; min-height: 36px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.dato b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dato.sel { border-left: 3px solid var(--verde-osc); background: var(--verde-claro); }

/* ----- Tablas ----- */
.tabla-wrap { width: 100%; overflow-x: auto; }
table.tabla { width: 100%; border-collapse: collapse; background: var(--blanco); }
.tabla th, .tabla td { padding: 8px 10px; border-bottom: 1px solid var(--borde-suave); text-align: left; vertical-align: middle; }
.tabla th { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: var(--texto-suave); background: #f4f6f5; border-bottom: 1px solid var(--linea); border-top: 1px solid var(--linea); white-space: nowrap; }
.tabla tr:hover td { background: #f8faf9; }
.tabla tfoot td { font-weight: 700; border-top: 1px solid var(--verde-osc); border-bottom: 0; background: #f4f6f5; }
.tabla .num, .tabla th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabla .fecha { white-space: nowrap; }
.tabla .acc { white-space: nowrap; text-align: right; }
.tabla tr.anulado td { color: #7a7f7c; text-decoration: line-through; }
.tabla tr.sel td { background: var(--verde-claro); }
.tabla.compacta th, .tabla.compacta td { padding: 5px 8px; }
.tabla input, .tabla select { padding: 5px 7px; min-height: 32px; }
.tabla.ficha th { width: 220px; text-transform: none; letter-spacing: 0; font-size: 12.5px; background: #f7f9f8; border-top: 0; white-space: normal; }
.vacio { text-align: center; padding: 26px; color: var(--texto-suave); }

/* ----- Avisos ----- */
.aviso { border: 1px solid var(--borde); border-left: 3px solid var(--verde-osc); padding: 10px 14px; margin-bottom: 14px; background: var(--verde-claro); }
.aviso.am { background: var(--amarillo-claro); border-color: var(--amarillo-borde); border-left-color: #a08519; }
.aviso.error { background: var(--rojo-suave); color: var(--rojo-texto); border-color: #eab4b4; border-left-color: var(--rojo-texto); }
.aviso ul { margin: 4px 0 0 18px; padding: 0; }

/* ----- Paginación ----- */
.paginacion { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.paginacion a, .paginacion span { padding: 4px 10px; border: 1px solid var(--borde); text-decoration: none; background: var(--blanco); color: var(--texto); }
.paginacion .actual { background: var(--verde-osc); color: #fff; border-color: var(--verde-osc); font-weight: 700; }
.paginacion .info { border: 0; background: none; color: var(--texto-suave); }

/* ----- Tablero de canchas en vivo ----- */
.tablero { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.cancha {
  background: var(--blanco); border: 1px solid var(--borde); border-top: 3px solid #9aa79f; box-shadow: var(--sombra);
  padding: 12px 14px; cursor: pointer; min-height: 150px; display: flex; flex-direction: column; gap: 4px;
  text-align: left; font: inherit; color: var(--texto); min-width: 0;
}
.cancha:hover { box-shadow: var(--sombra-hover); }
.cancha .cab { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.cancha .nom { font-weight: 700; font-size: 14.5px; line-height: 1.25; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cancha.en_curso { border-top-color: var(--verde-osc); }
.cancha.por_cobrar { border-top-color: #b8971c; }
.cancha.excedida { border-top-color: var(--rojo-texto); }
.cancha .reloj { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--verde-osc); }
.cancha.libre .reloj { color: #aab3ad; }
.cancha .linea { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; min-width: 0; }
.cancha .linea span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cancha .linea b { white-space: nowrap; }
.cancha .total { margin-top: auto; padding-top: 6px; border-top: 1px solid var(--borde-suave); display: flex; justify-content: space-between; font-weight: 700; font-size: 14.5px; }
.resumen-vivo { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

/* ----- Modal ----- */
.modal-fondo { position: fixed; inset: 0; background: rgba(6, 20, 13, .55); display: none; align-items: flex-start; justify-content: center; z-index: 100; padding: 5vh 12px; overflow-y: auto; }
.modal-fondo.ver { display: flex; }
.modal { background: var(--blanco); border: 1px solid var(--borde); border-top: 3px solid var(--verde-osc); box-shadow: 0 20px 40px -12px rgba(6, 35, 26, .55); width: 100%; max-width: 640px; padding: 16px 20px; }
.modal.ancho { max-width: 960px; }
.modal-cab { display: flex; align-items: center; gap: 10px; margin: -16px -20px 14px; padding: 12px 20px; border-bottom: 1px solid var(--borde); }
.modal-cab h2 { margin: 0; }
.modal-cab .cerrar { margin-left: auto; }

/* ----- Autocompletar ----- */
.ac { position: relative; }
.ac-lista { position: absolute; left: 0; right: 0; top: 100%; z-index: 300; background: var(--blanco); border: 1px solid var(--verde-osc); max-height: 300px; overflow-y: auto; display: none; box-shadow: var(--sombra-hover); }
.ac-lista.ver { display: block; }
.ac-lista div { padding: 7px 10px; cursor: pointer; border-bottom: 1px solid var(--borde-suave); }
.ac-lista div:hover, .ac-lista div.foco { background: var(--verde-claro); }

details.asiento { margin-top: 12px; border-top: 1px solid var(--borde-suave); padding-top: 10px; }
details.asiento summary { cursor: pointer; font-weight: 600; color: var(--verde-osc); }

/* ----- Totales ----- */
.totales { margin-left: auto; min-width: 280px; border: 1px solid var(--borde); padding: 10px 14px; background: #f7f9f8; }
.totales .fila { display: flex; justify-content: space-between; gap: 20px; padding: 3px 0; }
.totales .fila b { white-space: nowrap; }
.totales .gran { font-size: 1.2rem; font-weight: 700; border-top: 1px solid var(--verde-osc); padding-top: 6px; margin-top: 4px; color: var(--verde-osc); }

/* ----- Barras simples ----- */
.barras { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 10px; }
.barras .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.barras .b i { display: block; width: 100%; max-width: 46px; background: var(--verde-osc); min-height: 2px; }
.barras .b span { font-size: 11.5px; white-space: nowrap; }

/* ----- Login (estilo ERP) ----- */
.login-fondo { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--fondo); }
.login-lado { padding: 48px 56px; display: flex; flex-direction: column; justify-content: center; color: #fff; background: var(--verde-osc2);
  border-right: 4px solid var(--verde-osc); }
.login-lado h1 { font-size: 1.85rem; color: #fff; margin: 6px 0 10px; line-height: 1.25; max-width: 560px; }
.login-lado p, .login-lado .suave { color: var(--verde-texto-claro); }
.login-intro { font-size: 15px; max-width: 540px; margin: 0 0 26px; }
.login-modulos { max-width: 560px; border-top: 1px solid rgba(255, 255, 255, .16); margin-bottom: 26px; }
.login-modulos .mod { display: grid; grid-template-columns: 38px 150px minmax(0, 1fr); align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.login-modulos .mod .ico { width: 20px; height: 20px; stroke: #fff; }
.login-modulos .mod .ic { width: 38px; height: 38px; display: grid; place-items: center; background: var(--verde-osc); border: 1px solid rgba(255, 255, 255, .22); }
.login-modulos .mod b { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.login-modulos .mod span { color: var(--verde-texto-claro); font-size: 13.5px; }
.login-pie { font-size: 12.5px; color: var(--verde-texto-claro); letter-spacing: .3px; }
.login-caja { display: flex; align-items: center; justify-content: center; padding: 32px; background: var(--fondo); }
.login-caja .tarjeta { width: 100%; max-width: 420px; padding: 0; border-top: 4px solid var(--verde-osc); }
.login-caja .login-cab { padding: 18px 26px; border-bottom: 1px solid var(--borde); background: #f7f9f8; }
.login-caja .login-cab h2 { margin: 0; font-size: 1.25rem; color: var(--verde-osc); }
.login-caja .login-cab p { margin: 2px 0 0; font-size: 13px; }
.login-caja .login-form { padding: 22px 26px 8px; }
.login-caja .login-fin { display: flex; justify-content: space-between; align-items: center; padding: 12px 26px; border-top: 1px solid var(--borde); background: #f7f9f8; margin-top: 14px; }
.logo-365 { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; margin-bottom: 18px; }
.logo-365 .cir { width: 44px; height: 44px; display: grid; place-items: center; background: var(--verde-osc); color: #fff; font-size: 15px; }
.login-lado .logo-365 { color: #fff; }
.logo-365 img { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 14px; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .6); }
.logo-365 .txt { line-height: 1.1; }
.logo-365 .txt b { display: block; font-size: 22px; letter-spacing: -.3px; }
.logo-365 .txt small { display: block; font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--texto-suave); margin-top: 4px; }
.login-lado .logo-365 .txt small { color: #9fd9b6; }
.login-lado .logo-365 .cir { background: #fff; color: var(--verde-osc); }

/* ----- Agenda de reservas (escala a muchas canchas) ----- */
.agenda-wrap { overflow: auto; max-height: 72vh; border: 1px solid var(--linea); background: var(--blanco); }
table.agenda { border-collapse: separate; border-spacing: 0; table-layout: fixed; min-width: 100%; }
.agenda th, .agenda td { border-right: 1px solid var(--linea); border-bottom: 1px solid var(--borde-suave); padding: 0; height: 46px; vertical-align: top; }
.agenda thead th { position: sticky; top: 0; z-index: 3; background: #f4f6f5; height: auto; padding: 8px 10px; border-bottom: 1px solid var(--linea);
  font-size: 12.5px; text-align: left; width: 190px; min-width: 190px; max-width: 190px; }
.agenda thead th .n { display: block; font-weight: 700; color: var(--verde-osc); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda thead th .t { display: block; font-weight: 500; font-size: 11.5px; color: var(--texto-suave); }
.agenda .hora { position: sticky; left: 0; z-index: 2; background: #f4f6f5; width: 112px; min-width: 112px; max-width: 112px; padding: 6px 10px;
  font-size: 12px; font-weight: 700; white-space: nowrap; color: var(--texto); border-right: 1px solid var(--linea); }
.agenda thead th.hora { z-index: 4; }
.agenda .hora small { display: block; font-weight: 500; color: var(--texto-suave); }
.agenda tr.ahora td, .agenda tr.ahora .hora { background-image: linear-gradient(0deg, rgba(10, 53, 32, .05), rgba(10, 53, 32, .05)); }
.agenda tr.ahora .hora { border-left: 3px solid var(--verde-osc); }
.agenda td.libre:hover { background: #f6f9f7; cursor: pointer; }
.agenda td.libre:hover::after { content: "+ Reservar"; display: block; padding: 13px 10px; font-size: 12px; color: var(--verde-acento); font-weight: 600; }
.agenda td.pasado { background: repeating-linear-gradient(135deg, #fafbfa, #fafbfa 6px, #f3f5f4 6px, #f3f5f4 12px); }
.bloque-res { margin: 3px; padding: 5px 8px; height: calc(100% - 6px); border-left: 3px solid var(--verde-osc); background: var(--verde-claro);
  font-size: 12px; line-height: 1.3; overflow: hidden; display: flex; flex-direction: column; gap: 1px; }
.bloque-res b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bloque-res span { color: var(--texto-suave); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bloque-res.pendiente { border-left-color: #a08519; background: var(--amarillo-claro); }
.bloque-res.en_uso { border-left-color: var(--verde-osc); background: #cfe0d6; }
.bloque-res.finalizada { border-left-color: #8a958f; background: #eef0ef; }
.agenda-pie { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.agenda a.bloque-res { color: var(--texto); text-decoration: none; }
.agenda a.bloque-res:hover { box-shadow: inset 0 0 0 1px var(--verde-osc); }
.leyenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--texto-suave); align-items: center; }
.leyenda i { display: inline-block; width: 12px; height: 12px; margin-right: 5px; vertical-align: -1px; border-left: 3px solid var(--verde-osc); background: var(--verde-claro); }
.leyenda i.p { border-left-color: #a08519; background: var(--amarillo-claro); }
.leyenda i.u { background: #cfe0d6; }
.leyenda i.f { border-left-color: #8a958f; background: #eef0ef; }

/* ----- Horarios por rango (reserva pública y POS) ----- */
.rangos { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 8px; }
.rango { border: 1px solid var(--linea); background: var(--blanco); padding: 9px 10px; text-align: left; font: inherit; cursor: pointer; color: var(--texto); }
.rango b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.rango span { font-size: 11.5px; color: var(--texto-suave); }
.rango:hover { border-color: var(--verde-osc); }
.rango.sel { background: var(--verde-osc); border-color: var(--verde-osc); color: #fff; }
.rango.sel span { color: var(--verde-texto-claro); }
.rango.ocupado { background: #f3f5f4; color: #8c968f; cursor: not-allowed; border-style: dashed; }
.rango.ocupado span { color: var(--rojo-texto); font-weight: 600; }

/* ----- Página pública de reservas ----- */
.pub-portada { position: relative; min-height: 220px; background: linear-gradient(160deg, var(--verde-osc), var(--verde-osc2)); background-size: cover; background-position: center; }
.pub-portada::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 35, 26, .25), rgba(6, 35, 26, .82)); }
.pub-portada .in { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 46px 22px 26px; display: flex; gap: 18px; align-items: flex-end; color: #fff; }
.pub-portada img.logo { width: 96px; height: 96px; object-fit: contain; background: #fff; border: 3px solid #fff; flex: 0 0 96px; }
.pub-portada .logo-txt { width: 96px; height: 96px; flex: 0 0 96px; background: #fff; color: var(--verde-osc); display: grid; place-items: center; font-weight: 800; font-size: 28px; }
.pub-portada h1 { color: #fff; font-size: 1.9rem; margin: 0 0 4px; }
.pub-portada p { margin: 0; color: var(--verde-texto-claro); }
.pub-cuerpo { max-width: 1180px; margin: -18px auto 0; padding: 0 22px 40px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; position: relative; z-index: 2; }
.pub-paso { display: flex; align-items: center; gap: 10px; }
.pub-paso .nro { width: 26px; height: 26px; flex: 0 0 26px; display: grid; place-items: center; background: var(--verde-osc); color: #fff; font-weight: 700; font-size: 13px; }
.pub-resumen { position: sticky; top: 16px; align-self: start; }
.pub-resumen .fila { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--borde-suave); }
.pub-resumen .fila span { color: var(--texto-suave); }
.pub-resumen .fila b { text-align: right; }
.pub-resumen .total { font-size: 1.35rem; font-weight: 800; color: var(--verde-osc); }
.canchas-sel { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; max-height: 360px; overflow-y: auto; }
.canchas-sel label { margin: 0; font-weight: 400; }
.canchas-sel input { display: none; }
.canchas-sel .op { display: block; border: 1px solid var(--linea); padding: 11px 12px; cursor: pointer; background: var(--blanco); min-height: 70px; }
.canchas-sel .op b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.canchas-sel .op small { display: block; }
.canchas-sel input:checked + .op { border-color: var(--verde-osc); box-shadow: inset 3px 0 0 var(--verde-osc); background: var(--verde-claro); }
.pub-pie { text-align: center; color: var(--texto-suave); font-size: 12px; padding: 18px; }
.ticket-qr { text-align: center; padding: 12px; border: 1px dashed var(--linea); background: #fff; }
.ticket-qr svg { width: 220px; height: 220px; max-width: 100%; }

/* ----- Punto de venta ----- */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 430px; height: 100vh; }
.pos-izq { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--linea); min-height: 0; }
.pos-cab { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--verde-osc); color: #fff; flex-wrap: wrap; min-height: 52px; }
.pos-cab b { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.pos-cab .derecha { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pos-cab .btn { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.pos-cab .btn:hover, .pos-cab .btn.activo { background: #fff; color: var(--verde-osc); border-color: #fff; }
.pos-cab .etq { color: var(--texto); }
.pos-cab .btn-salir { width: 34px; height: 34px; flex-basis: 34px; }
.pos-tabs { display: flex; gap: 0; }
.pos-tabs .btn { border-radius: 0; }
.pos-tabs .btn + .btn { border-left-width: 0; }
.pos-cuerpo { flex: 1; overflow-y: auto; padding: 14px; min-height: 0; }
.pos-barra { display: flex; gap: 8px; margin-bottom: 10px; align-items: center; flex-wrap: wrap; }
.pos-barra input[type=search] { flex: 1; min-width: 200px; }
.cats { display: flex; gap: 0; flex-wrap: wrap; margin-bottom: 12px; border-bottom: 1px solid var(--linea); }
.cats .btn { border: 0; border-bottom: 3px solid transparent; background: transparent; min-height: 34px; padding: 6px 12px; }
.cats .btn.activo { border-bottom-color: var(--verde-osc); background: transparent; }
.prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.prod {
  background: var(--blanco); border: 1px solid var(--borde); box-shadow: var(--sombra); border-left: 3px solid #b9c3bd;
  padding: 10px 12px; cursor: pointer; text-align: left; font: inherit; color: var(--texto); min-height: 92px; display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.prod:hover { border-left-color: var(--verde-osc); }
.prod.alquiler { border-left-color: var(--verde-osc); background: #f6f9f7; }
.prod b { font-size: 13px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prod .p { margin-top: auto; font-weight: 700; font-size: 15px; color: var(--verde-osc); }
.prod .s { font-size: 11.5px; color: var(--texto-suave); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-der { display: flex; flex-direction: column; background: var(--blanco); min-height: 0; }
.cuenta-cab { padding: 12px 14px; border-bottom: 1px solid var(--linea); background: #f7f9f8; }
.cuenta-cab .modo { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cuenta-cab .modo b { font-size: 15px; color: var(--verde-osc); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.cuenta-tiempo { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--borde); background: #fff; margin-top: 8px; }
.cuenta-tiempo div { padding: 6px 8px; border-right: 1px solid var(--borde-suave); }
.cuenta-tiempo div:last-child { border-right: 0; }
.cuenta-tiempo small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .3px; }
.cuenta-tiempo b { font-variant-numeric: tabular-nums; }
.pos-carrito { flex: 1; overflow-y: auto; padding: 0 14px; }
.lin { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 9px 0; border-bottom: 1px solid var(--borde-suave); }
.lin .d { font-weight: 600; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.lin .d small { display: block; font-weight: 400; }
.lin .cant { display: flex; align-items: center; gap: 0; }
.lin .cant button { width: 30px; height: 30px; border: 1px solid var(--verde-osc); background: var(--blanco); color: var(--verde-osc); font-size: 16px; cursor: pointer; }
.lin .cant input { width: 58px; text-align: center; padding: 4px; min-height: 30px; border-left: 0; border-right: 0; }
.lin .t { font-weight: 700; text-align: right; white-space: nowrap; }
.pos-pie { border-top: 1px solid var(--verde-osc); padding: 12px 14px; background: #f7f9f8; }
.pos-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.55rem; font-weight: 800; margin: 4px 0 10px; color: var(--verde-osc); }
.tipo-doc { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-bottom: 8px; }
.tipo-doc label { margin: 0; }
.tipo-doc input { display: none; }
.tipo-doc span { display: block; text-align: center; padding: 8px; border: 1px solid var(--verde-osc); cursor: pointer; font-weight: 600; color: var(--verde-osc); background: #fff; }
.tipo-doc label + label span { border-left: 0; }
.tipo-doc input:checked + span { background: var(--verde-osc); color: #fff; }
.formas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.formas .btn.activo { background: var(--verde-osc); color: #fff; }
.lista-canchas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.duraciones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.duraciones .btn { border-radius: 0; }
.duraciones .btn + .btn { border-left-width: 0; }
.duraciones .btn.activo { background: var(--verde-osc); color: #fff; }

/* ----- POS por canchas ----- */
.seg { display: inline-flex; }
.seg .btn { border-radius: 0; }
.seg .btn + .btn { border-left-width: 0; }
.seg .btn.activo { background: var(--verde-osc); color: #fff; }
.pos-barra .crece { flex: 1; min-width: 220px; }
.lista-canchas .cancha { min-height: 168px; }
.cancha.sel { outline: 2px solid var(--verde-osc); outline-offset: -2px; background: #f6f9f7; }
.cancha .cab .etq { flex: 0 0 auto; }
.cancha .tipo { font-size: 11.5px; color: var(--texto-suave); text-transform: uppercase; letter-spacing: .3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cancha .linea.res span { color: #6b5a0f; font-weight: 600; }
.cancha.excedida .reloj, b.rojo { color: var(--rojo-texto); }
.cuenta-tiempo b.rojo { color: var(--rojo-texto); }
.acciones-cuenta { display: flex; gap: 0; margin-top: 8px; }
.acciones-cuenta .btn { flex: 1; border-radius: 0; }
.acciones-cuenta .btn + .btn { border-left-width: 0; }
.cli-txt { margin-top: 6px; display: flex; gap: 6px; align-items: center; min-width: 0; flex-wrap: wrap; }
.cli-txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px; }
.abrir-cancha { padding: 14px 0; }
.abrir-cancha h3 { font-size: .9rem; text-transform: uppercase; letter-spacing: .4px; color: var(--texto-suave); margin: 0 0 10px; }
.duraciones.d5 { grid-template-columns: repeat(5, 1fr); }
.duraciones .btn { padding-left: 4px; padding-right: 4px; }
.lin.fija { background: #f6f9f7; margin: 0 -14px; padding-left: 14px; padding-right: 14px; border-left: 3px solid var(--verde-osc); }
.agregar-cons { margin: 12px 0; border-style: dashed; }
.pago-lin { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--borde-suave); align-items: center; }
.video-cam { display: none; width: 100%; max-width: 420px; margin-top: 10px; border: 1px solid var(--verde-osc); }
#total.flash { animation: flash .45s ease; }
@keyframes flash { 0% { background: var(--amarillo-claro); } 100% { background: transparent; } }

/* ----- Escáner QR ----- */
.escaner-video { position: relative; background: #0b1410; aspect-ratio: 4 / 3; overflow: hidden; margin-bottom: 12px; }
.escaner-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.escaner-video .marco { position: absolute; inset: 16% 22%; border: 2px solid rgba(255, 255, 255, .85); box-shadow: 0 0 0 999px rgba(0, 0, 0, .28); }
.escaner-msg { position: absolute; left: 0; right: 0; bottom: 0; padding: 7px 10px; background: rgba(6, 35, 26, .85); color: #fff; font-size: 12.5px; text-align: center; }
.escaner-ayuda { font-size: 12px; color: var(--texto-suave); margin: 8px 0; }

/* ----- Validación de llegada (pantalla para celular o PC) ----- */
body.fondo-llegada { background: var(--fondo); }
.llegada { max-width: 640px; margin: 0 auto; min-height: 100vh; background: var(--blanco); border-left: 1px solid var(--borde); border-right: 1px solid var(--borde); }
.llegada-cab { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--verde-osc); color: #fff; }
.llegada-cab .txt { flex: 1; min-width: 0; }
.llegada-cab small { display: block; color: var(--verde-texto-claro); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.llegada-cab b { font-size: 1.05rem; }
.llegada-cab .btn { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.llegada-cuerpo { padding: 16px 18px 24px; }
.estado-llegada { padding: 16px 18px; margin: -16px -18px 16px; border-bottom: 1px solid var(--borde); border-left: 5px solid var(--verde-osc); background: var(--verde-claro); }
.estado-llegada b { display: block; font-size: 1.3rem; color: var(--verde-osc); }
.estado-llegada span { color: var(--texto-suave); }
.estado-llegada.listo { border-left-color: #a08519; background: var(--amarillo-claro); }
.estado-llegada.listo b { color: #5c4c0b; }
.estado-llegada.error { border-left-color: var(--rojo-texto); background: var(--rojo-suave); }
.estado-llegada.error b { color: var(--rojo-texto); }
.llegada .tabla.ficha th { width: 150px; }
.llegada-acc { display: grid; gap: 8px; margin-top: 18px; }
.llegada-acc form { margin: 0; }
.mono { font-family: Consolas, "Courier New", monospace; letter-spacing: .5px; }

/* ----- Documento de venta / compra ----- */
.emisor { display: flex; gap: 0; margin: -16px -18px 0; border-bottom: 1px solid var(--linea); background: #f7f9f8; flex-wrap: wrap; }
.emisor-dato { padding: 10px 18px; border-right: 1px solid var(--borde); min-width: 0; display: flex; flex-direction: column; }
.emisor-dato:last-child { border-right: 0; }
.emisor-dato.crece { flex: 1; min-width: 240px; }
.emisor-dato small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--texto-suave); }
.emisor-dato b, .emisor-dato span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emisor-dato span { font-size: 12.5px; color: var(--texto-suave); }
.seccion-cab { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.seccion-cab h3 { margin: 0 !important; }
.seccion-cab .busca-prod { margin-left: auto; flex: 0 1 560px; }
.dato .suave { margin-left: auto; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pie-venta { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.pie-izq { flex: 1; min-width: 320px; }
.pie-izq h3 { font-size: .9rem; text-transform: uppercase; letter-spacing: .4px; color: var(--texto-suave); margin: 0 0 10px; }
.campo.obs { max-width: 560px; }
.tarjeta-cab .busca-prod { flex: 0 1 520px; }
.barra-acciones.suelta { margin: 0 0 18px; border: 1px solid var(--borde); }
.barra-acciones { display: flex; justify-content: flex-end; gap: 8px; margin: 16px -18px -16px; padding: 12px 18px; border-top: 1px solid var(--linea); background: #f7f9f8; }

/* ----- Subida de imágenes ----- */
.img-subida { display: flex; flex-direction: column; gap: 8px; }
.prev-logo { width: 110px; height: 110px; object-fit: contain; border: 1px solid var(--borde); background: #fff; }
.prev-portada { width: 100%; max-width: 420px; height: 130px; object-fit: cover; border: 1px solid var(--borde); }
.prev-logo.vacia, .prev-portada.vacia { display: grid; place-items: center; color: var(--texto-suave); font-size: 12px; background: #f4f6f5; border-style: dashed; }

/* ==========================================================================
   Acabado ERP de alto nivel: esquinas suaves (no redondas) y sombra
   verde oscura debajo de cada panel, como el 365. El tema "plano" la quita.
   ========================================================================== */
:root {
  --radio: 8px;
  --radio-sm: 6px;
  --sombra: 0 1px 0 rgba(6, 35, 26, .06), 0 3px 0 -1px rgba(6, 35, 26, .16), 0 10px 22px -10px rgba(6, 35, 26, .42);
  --sombra-hover: 0 1px 0 rgba(6, 35, 26, .08), 0 4px 0 -1px rgba(6, 35, 26, .20), 0 16px 30px -12px rgba(6, 35, 26, .55);
  --sombra-boton: 0 2px 0 rgba(6, 35, 26, .22);
}
html[data-tema="plano"] { --sombra: none; --sombra-hover: none; --sombra-boton: none; }

/* Paneles */
.tarjeta, .kpi, .cancha, .prod, .modal, .totales, .agenda-wrap, .dato, .rango, .canchas-sel .op, .ticket-qr, .escaner-video { border-radius: var(--radio); }
.tarjeta, .modal { overflow: visible; }
.tarjeta-cab, .tarjeta > h2:first-child, .tarjeta > h3:first-child, .emisor { border-radius: var(--radio) var(--radio) 0 0; }
.modal-cab { border-radius: var(--radio) var(--radio) 0 0; }
.barra-acciones { border-radius: 0 0 var(--radio) var(--radio); }
.barra-acciones.suelta { border-radius: var(--radio); box-shadow: var(--sombra); }
.aviso { border-radius: var(--radio-sm); }
.ac-lista { border-radius: 0 0 var(--radio-sm) var(--radio-sm); }
.kpi { border-left: 0; border-top: 3px solid var(--verde-osc); }
.cancha:hover, .prod:hover, .kpi:hover { box-shadow: var(--sombra-hover); transform: translateY(-1px); }
.cancha, .prod, .kpi, .btn { transition: box-shadow .15s, transform .15s, background .15s; }
.agenda-wrap { box-shadow: inset 0 0 0 0 transparent; }
.agenda thead th:nth-child(2) { border-top-left-radius: 0; }
.bloque-res { border-radius: 4px; box-shadow: 0 1px 0 rgba(6, 35, 26, .12); }
.etq { border-radius: 4px; }

/* Botones: marco visible, sombra abajo */
.btn { box-shadow: var(--sombra-boton); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn.prim { background: linear-gradient(180deg, var(--verde) 0%, var(--verde-osc) 100%); box-shadow: 0 2px 0 var(--verde-osc2), 0 6px 14px -8px rgba(6, 35, 26, .7); }
.btn.prim:hover { background: linear-gradient(180deg, #175a37 0%, var(--verde) 100%); }
.btn[disabled]:hover { transform: none; }
.cats .btn, .menu .btn, .ojito { box-shadow: none; }
.cats .btn:hover { transform: none; }

/* Grupos pegados: solo las puntas con esquina */
.seg .btn, .pos-tabs .btn, .duraciones .btn, .acciones-cuenta .btn, .grupo-input > * { border-radius: 0; box-shadow: none; }
.seg .btn:hover, .pos-tabs .btn:hover, .duraciones .btn:hover, .acciones-cuenta .btn:hover { transform: none; }
.seg > :first-child, .pos-tabs > :first-child, .duraciones > :first-child, .acciones-cuenta > :first-child { border-radius: var(--radio-sm) 0 0 var(--radio-sm); }
.seg > :last-child, .pos-tabs > :last-child, .duraciones > :last-child, .acciones-cuenta > :last-child { border-radius: 0 var(--radio-sm) var(--radio-sm) 0; }
.seg, .duraciones, .acciones-cuenta { box-shadow: var(--sombra-boton); border-radius: var(--radio-sm); }
.grupo-input > :first-child, .grupo-input > :first-child > input { border-radius: var(--radio-sm) 0 0 var(--radio-sm); }
.grupo-input > :last-child, .grupo-input > :last-child > input { border-radius: 0 var(--radio-sm) var(--radio-sm) 0; }
.grupo-input > :only-child, .grupo-input > :only-child > input { border-radius: var(--radio-sm); }
.tipo-doc label:first-child span { border-radius: var(--radio-sm) 0 0 var(--radio-sm); }
.tipo-doc label:last-child span { border-radius: 0 var(--radio-sm) var(--radio-sm) 0; }
.tipo-doc label:only-child span { border-radius: var(--radio-sm); }
.lin .cant button:first-child { border-radius: var(--radio-sm) 0 0 var(--radio-sm); }
.lin .cant button:last-child { border-radius: 0 var(--radio-sm) var(--radio-sm) 0; }
.cuenta-tiempo { border-radius: var(--radio-sm); overflow: hidden; }

/* Campos */
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time],
input[type=search], input[type=tel], input[type=file], select, textarea { box-shadow: inset 0 1px 2px rgba(6, 35, 26, .08); }

/* Menú lateral */
.menu { box-shadow: 4px 0 18px -6px rgba(0, 0, 0, .45); }
.menu-seccion > button, .menu a.item, .menu .sub a, .menu .volver { border-radius: var(--radio-sm); }
.menu .marca .cir, .menu .marca img { border-radius: var(--radio-sm); }
.btn-salir { border-radius: var(--radio-sm); }
.barra { box-shadow: 0 4px 14px -10px rgba(6, 35, 26, .6); }

/* POS */
.pos-cab { box-shadow: 0 4px 14px -8px rgba(0, 0, 0, .5); position: relative; z-index: 2; }
.pos-der { box-shadow: -6px 0 18px -12px rgba(6, 35, 26, .6); }
.pos-cliente, .cuenta-cab { position: relative; }

/* Login */
.login-lado { background: radial-gradient(1200px 600px at 0% 0%, #0d3d26 0%, var(--verde-osc2) 55%, #041912 100%); }
.logo-365 .cir { border-radius: var(--radio); box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .55); }
.login-modulos { border-top: 0; display: grid; gap: 10px; }
.login-modulos .mod { border: 1px solid rgba(255, 255, 255, .10); border-radius: var(--radio); padding: 12px 14px; background: rgba(255, 255, 255, .035);
  box-shadow: 0 3px 0 -1px rgba(0, 0, 0, .35), 0 12px 22px -14px rgba(0, 0, 0, .8); }
.login-modulos .mod .ic { border-radius: var(--radio-sm); background: linear-gradient(180deg, var(--verde) 0%, var(--verde-osc) 100%); }
.login-caja { background: linear-gradient(180deg, #f3f5f4 0%, #e6ebe8 100%); }
.login-caja .tarjeta { border-radius: 10px; overflow: hidden; box-shadow: 0 2px 0 rgba(6, 35, 26, .12), 0 6px 0 -2px rgba(6, 35, 26, .22), 0 30px 60px -24px rgba(6, 35, 26, .55); }

/* Página pública y llegada */
.pub-portada img.logo, .pub-portada .logo-txt { border-radius: var(--radio); box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .6); }
.llegada { box-shadow: var(--sombra); }

/* ==========================================================================
   Panel del dueño (plataforma): cabecera con pestañas, como el 365
   ========================================================================== */
body.pl { background: var(--fondo); }
.pl-in { max-width: 1480px; margin: 0 auto; padding: 0 28px; width: 100%; }
.pl-cab { background: linear-gradient(90deg, var(--verde-osc2) 0%, #0b3b24 100%); color: #fff; box-shadow: 0 4px 16px -8px rgba(0, 0, 0, .55); position: relative; z-index: 3; }
.pl-cab .pl-in { display: flex; align-items: center; gap: 14px; min-height: 66px; flex-wrap: wrap; }
.pl-marca { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.pl-marca:hover { text-decoration: none; }
.pl-marca img { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; }
.pl-marca .cir { width: 38px; height: 38px; display: grid; place-items: center; background: #fff; color: var(--verde-osc); font-weight: 800; font-size: 13px; border-radius: var(--radio); box-shadow: 0 3px 10px -4px rgba(0, 0, 0, .6); }
.pl-marca b { font-size: 18px; letter-spacing: .2px; }
.pl-pill { font-size: 11.5px; font-weight: 700; letter-spacing: .8px; padding: 4px 10px; border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .08); border-radius: var(--radio-sm); }
.pl-der { margin-left: auto; display: flex; align-items: center; gap: 12px; min-width: 0; }
.pl-correo { color: var(--verde-texto-claro); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.pl-cab .btn { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); box-shadow: none; }
.pl-cab .btn:hover { background: rgba(255, 255, 255, .12); }
.pl-cab .pl-tema { background: #fff; color: var(--verde-osc); border-color: #fff; }
.pl-tabs { background: var(--blanco); border-bottom: 1px solid var(--borde); box-shadow: 0 3px 10px -8px rgba(6, 35, 26, .5); position: sticky; top: 0; z-index: 2; }
.pl-tabs .pl-in { display: flex; gap: 4px; overflow-x: auto; }
.pl-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 15px 16px 13px; color: var(--texto-suave); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; }
.pl-tabs a:hover { color: var(--verde-osc); text-decoration: none; }
.pl-tabs a.activo { color: var(--verde-osc); border-bottom-color: var(--verde-osc); }
.pl-num { background: #b8971c; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 9px; }
.pl-main { padding-top: 26px; padding-bottom: 50px; }
.pl-titulo { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.pl-titulo .tit { min-width: 0; flex: 1; }
.pl-titulo h1 { font-size: 1.75rem; margin: 0; color: var(--texto); overflow-wrap: anywhere; }
.pl-titulo p { margin: 4px 0 0; color: var(--texto-suave); }
.pl-titulo .acciones { display: flex; gap: 8px; flex-wrap: wrap; }
.pl-volver { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; text-decoration: none; margin-bottom: 4px; }
.pl-volver .ico { width: 15px; height: 15px; }

/* Indicadores */
.pl-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 16px; margin-bottom: 18px; }
.pl-kpi { display: block; background: var(--blanco); border: 1px solid var(--borde); border-left: 4px solid var(--verde-osc); border-radius: var(--radio);
  box-shadow: var(--sombra); padding: 16px 20px; text-decoration: none; color: var(--texto); transition: box-shadow .15s, transform .15s; }
.pl-kpi:hover { box-shadow: var(--sombra-hover); transform: translateY(-1px); text-decoration: none; }
.pl-kpi span { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--texto-suave); }
.pl-kpi b { display: block; font-size: 2rem; line-height: 1.15; margin-top: 6px; color: var(--verde-osc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-kpi.c-ok { border-left-color: #1f8a4c; } .pl-kpi.c-ok b { color: #1f7a45; }
.pl-kpi.c-am { border-left-color: #c99a12; } .pl-kpi.c-am b { color: #9a7406; }
.pl-kpi.c-na { border-left-color: #d1661c; } .pl-kpi.c-na b { color: #b4520f; }
.pl-kpi.c-rojo { border-left-color: #b42323; } .pl-kpi.c-rojo b { color: #a11d1d; }
.pl-kpi.c-gr { border-left-color: #9aa5a0; } .pl-kpi.c-gr b { color: #4a554e; }

/* Barra de estado */
.barra-estado { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #e5e9e7; gap: 2px; }
.barra-estado i, .leyenda-estado i { display: block; }
.barra-estado .ok, .leyenda-estado .ok { background: #1f8a4c; }
.barra-estado .am, .leyenda-estado .am { background: #d9a514; }
.barra-estado .na, .leyenda-estado .na { background: #e07326; }
.barra-estado .rojo, .leyenda-estado .rojo { background: #c22b2b; }
.barra-estado .gr, .leyenda-estado .gr { background: #b4bdb8; }
.leyenda-estado { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; }
.leyenda-estado a { color: var(--texto-suave); text-decoration: none; display: inline-flex; align-items: center; gap: 7px; }
.leyenda-estado a:hover { color: var(--verde-osc); }
.leyenda-estado i { width: 10px; height: 10px; border-radius: 50%; }

/* Etiquetas extra */
.etq.na { background: #fde9d9; border-color: #f2c29b; color: #8a3d08; }
.etq.gr { background: #eef0ef; border-color: #d3d9d5; color: #4a554e; }
.enlace { font-weight: 600; text-decoration: none; font-size: 13px; }
.bloque { display: block; }
small.bloque { font-size: 11.5px; color: var(--texto-suave); }

/* Empresa en tablas y listas */
.pl-emp { display: block; text-decoration: none; color: var(--texto); min-width: 0; }
.pl-emp b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 380px; }
.pl-emp small { display: block; color: var(--texto-suave); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 380px; }
.pl-emp:hover b { color: var(--verde-osc); text-decoration: underline; }
.lista-atencion a { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 2px 12px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--borde-suave); color: var(--texto); text-decoration: none; }
.lista-atencion a:last-child { border-bottom: 0; }
.lista-atencion a:hover { background: #f7f9f8; }
.lista-atencion .etq { grid-row: span 2; justify-self: start; }
.lista-atencion b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lista-atencion small { color: var(--texto-suave); }

/* Filtros por estado */
.pl-filtros { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--borde-suave); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--borde); border-radius: 18px; color: var(--texto); text-decoration: none; font-weight: 600; font-size: 13px; background: var(--blanco); }
.chip span { background: #eef0ef; border-radius: 9px; padding: 0 7px; font-size: 11.5px; }
.chip:hover { border-color: var(--verde-osc); text-decoration: none; }
.chip.activo { background: var(--verde-osc); border-color: var(--verde-osc); color: #fff; }
.chip.activo span { background: rgba(255, 255, 255, .2); color: #fff; }
.buscador { flex: 0 1 460px; }

/* Ficha de la empresa */
.pl-resumen { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); margin-bottom: 16px; }
.pl-resumen .dato-r { padding: 14px 18px; border-right: 1px solid var(--borde-suave); display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.pl-resumen .dato-r:last-child { border-right: 0; }
.pl-resumen small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--texto-suave); }
.pl-resumen b { color: var(--verde-osc); }
.pl-resumen span:not(.etq) { font-size: 12.5px; color: var(--texto-suave); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pl-subtabs { display: flex; gap: 2px; border-bottom: 2px solid var(--borde); margin-bottom: 16px; overflow-x: auto; }
.pl-subtabs a { padding: 11px 16px; font-weight: 600; color: var(--texto-suave); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; border-radius: var(--radio-sm) var(--radio-sm) 0 0; }
.pl-subtabs a:hover { color: var(--verde-osc); background: rgba(10, 53, 32, .04); text-decoration: none; }
.pl-subtabs a.activo { color: var(--verde-osc); border-bottom-color: var(--verde-osc); background: var(--blanco); }
.g-firma { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); align-items: start; }
.seccion.primera { border-top: 0; margin-top: 0; padding-top: 0; }
.campo.checks { align-self: end; }
.campo.checks .check { margin-bottom: 6px; }
.sub-tit { font-size: .9rem; text-transform: uppercase; letter-spacing: .4px; color: var(--texto-suave); margin: 18px 0 8px; }
.tabla.puntos input, .tabla.puntos select { min-height: 32px; }
.w-cod { width: 62px; } .w-nom { min-width: 170px; } .w-can { width: 84px; } .w-sec { width: 92px; text-align: right; }
.aviso { overflow-wrap: anywhere; }
.etiqueta-fila { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.etiqueta-fila a { font-size: 12.5px; font-weight: 600; text-decoration: none; }
@media (max-width: 1150px) {
  .g4 > .span3 { grid-column: span 2; }
}
@media (max-width: 1100px) {
  .pl-resumen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pl-resumen .dato-r { border-bottom: 1px solid var(--borde-suave); }
  .g-firma { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .pl-in { padding: 0 14px; }
  .pl-correo, .pl-pill { display: none; }
  .pl-resumen { grid-template-columns: minmax(0, 1fr); }
}

/* ----- Responsivo ----- */
@media (max-width: 1150px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pos { grid-template-columns: minmax(0, 1fr) 370px; }
  .pub-cuerpo { grid-template-columns: 1fr; }
  .pub-resumen { position: static; }
}
@media (max-width: 860px) {
  .menu { position: fixed; left: -280px; z-index: 50; transition: left .2s; }
  body.menu-abierto .menu { left: 0; }
  body.menu-cerrado .menu { display: flex; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span2, .span3 { grid-column: auto; }
  .contenido { padding: 14px; }
  .login-fondo { grid-template-columns: 1fr; }
  .login-lado { display: none; }
  .pos { grid-template-columns: 1fr; height: auto; }
  .pos-der { border-top: 2px solid var(--verde-osc); }
  .barra { padding: 8px 14px; }
  .pub-portada .in { flex-direction: column; align-items: flex-start; padding-top: 30px; }
  .pagina-cab .acciones { margin-left: 0; }
}

/* ----- Impresión ----- */
@media print {
  .no-print, .menu, .barra, .paginacion, .filtros, .btn { display: none !important; }
  body { background: #fff; }
  .contenido { padding: 0; }
  .tarjeta, .kpi, .cancha { box-shadow: none; border-color: #999; }
}

/* ==========================================================================
   Mejoras oct-2026: buscadores, avisos flotantes, fichas, paneles centrados
   ========================================================================== */
/* Buscador (autocompletar y listas con búsqueda) */
.ac-lista div { line-height: 1.3; }
.ac-lista .ac-tit { cursor: default; font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--texto-suave); background: #f4f6f5; padding: 5px 10px; }
.ac-lista .ac-tit:hover { background: #f4f6f5; }
.ac-lista .ac-vacio { cursor: default; color: var(--texto-suave); }
.ac-lista .ac-sub { display: block; font-size: 11.5px; color: var(--texto-suave); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-lista div.elegido { font-weight: 700; box-shadow: inset 3px 0 0 var(--verde-osc); }
.sb { position: relative; min-width: 0; }
.sb .sb-oculto { position: absolute !important; left: 0; bottom: 0; width: 100% !important; height: 1px !important; opacity: 0; pointer-events: none; padding: 0 !important; border: 0 !important; min-height: 0 !important; }
.sb .sb-input { width: 100%; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--texto-suave) 50%), linear-gradient(135deg, var(--texto-suave) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; text-overflow: ellipsis; }
.sb .ac-lista { min-width: 260px; }
.tabla .sb .sb-input { min-height: 32px; padding-top: 5px; padding-bottom: 5px; }
.grupo-input > .sb { flex: 1; min-width: 0; }

/* Ficha del cliente / proveedor elegido */
.ficha-ter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 14px; border: 1px solid var(--borde); border-left: 3px solid var(--verde-osc); background: var(--verde-claro); padding: 9px 12px; border-radius: var(--radio-sm); }
.ficha-ter b { grid-column: 1 / -1; font-size: 14.5px; color: var(--verde-osc); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ficha-ter span { font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ficha-ter span i { display: block; font-style: normal; font-size: 10.5px; text-transform: uppercase; letter-spacing: .3px; color: var(--texto-suave); }
.ficha-ter .dir { grid-column: 1 / -1; }
.ficha-ter.cf { background: #f7f9f8; border-left-color: #a08519; }
@media (max-width: 700px) { .ficha-ter { grid-template-columns: 1fr; } }

/* Avisos flotantes (no bloquean la pantalla) */
.avisos-flot { position: fixed; left: 16px; bottom: 16px; z-index: 400; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.aviso-flot { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; background: var(--verde-osc); color: #fff; border-radius: var(--radio-sm); box-shadow: 0 12px 28px -10px rgba(6, 35, 26, .6); font-weight: 600; white-space: pre-line; animation: aparece .2s ease; }
.aviso-flot.error { background: #8c1d1d; }
.aviso-flot.am { background: #6b5a0f; }
.aviso-flot span { flex: 1; }
.aviso-flot button { background: none; border: 0; color: #fff; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
@keyframes aparece { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Paneles centrados (formularios de una sola columna) */
.centro { margin-left: auto !important; margin-right: auto !important; }
.ancho-form { max-width: 920px; }

/* Pestañas de módulo */
.pestanas { display: flex; gap: 0; border-bottom: 1px solid var(--linea); margin: -4px 0 16px; flex-wrap: wrap; }
.pestanas a { padding: 9px 16px; font-weight: 600; color: var(--texto-suave); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.pestanas a:hover { color: var(--verde-osc); text-decoration: none; }
.pestanas a.activo { color: var(--verde-osc); border-bottom-color: var(--verde-osc); }
.pestanas .n { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 6px; font-size: 11px; background: var(--verde-claro); border-radius: 10px; text-align: center; }

/* Barra de acciones de filas marcadas */
.barra-marcas { position: sticky; bottom: 0; z-index: 20; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; margin: 10px 0 0; background: var(--verde-osc); color: #fff; border-radius: var(--radio-sm); }
.barra-marcas .btn { background: #fff; color: var(--verde-osc); border-color: #fff; }
.barra-marcas[hidden] { display: none; }
.tabla td.marca, .tabla th.marca { width: 32px; text-align: center; }
.tabla td.marca input, .tabla th.marca input { width: 16px; height: 16px; min-height: 0; }

/* Menú de acciones por fila */
.acc .btn + .btn, .acc .btn + form, .acc form + .btn { margin-left: 4px; }
.acc form { display: inline; }

/* Totales desglosados (factura y compra) */
.totales.desglose { min-width: 340px; padding: 0; background: var(--blanco); overflow: hidden; }
.totales.desglose .fila { padding: 7px 16px; border-bottom: 1px solid var(--borde-suave); }
.totales.desglose .fila span { color: var(--texto-suave); }
.totales.desglose .fila.sub { background: #f7f9f8; }
.totales.desglose .fila.sub span { color: var(--texto); font-weight: 600; }
.totales.desglose .gran { margin: 0; padding: 12px 16px; border-top: 2px solid var(--verde-osc); border-bottom: 0; background: var(--verde-claro); font-size: 1.35rem; }
.totales.desglose .gran span { color: var(--verde-osc); }
.totales.desglose .fila.cero b { color: var(--texto-suave); font-weight: 500; }

/* Línea en blanco para agregar productos en la tabla de detalle */
.tabla tr.linea-nueva td { background: #fbfcfb; border-bottom: 1px dashed var(--linea); }
.tabla tr.linea-nueva input.busca-linea { border-style: dashed; background: #fff; }

/* Asiento contable plegable */
.asiento-plegable { margin-top: 14px; }
.asiento-plegable > .btn { margin-bottom: 8px; }

/* Ticket dentro de la pantalla (POS) */
.marco-ticket { width: 100%; height: 62vh; border: 1px solid var(--borde); background: #fff; border-radius: var(--radio-sm); }

/* Línea de tiempo de reservas del día (POS) */
.dia-horas { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 4px; margin: 6px 0 12px; }
.dia-horas span { font-size: 11.5px; text-align: center; padding: 5px 2px; border: 1px solid var(--borde); border-radius: 4px; background: #fff; font-variant-numeric: tabular-nums; }
.dia-horas span.ocup { background: var(--rojo-suave); border-color: #eab4b4; color: var(--rojo-texto); font-weight: 700; }
.dia-horas span.pas { background: #f3f5f4; color: #9aa39d; }
.dia-horas span.lib { background: var(--verde-claro); }

/* Cuentas abiertas (POS) */
.lista-cuentas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cta-ab { background: var(--blanco); border: 1px solid var(--borde); border-top: 3px solid #a08519; border-radius: var(--radio); padding: 10px 12px; text-align: left; font: inherit; color: var(--texto); cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-height: 120px; box-shadow: var(--sombra); }
.cta-ab:hover { box-shadow: var(--sombra-hover); }
.cta-ab b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cta-ab small { color: var(--texto-suave); }
.cta-ab .t { margin-top: auto; font-weight: 800; font-size: 1.15rem; color: var(--verde-osc); }
.cta-ab.sel { outline: 2px solid var(--verde-osc); outline-offset: -2px; }

/* Reportes contables */
.rep-cab { text-align: center; margin: 0 0 14px; }
.rep-cab h2 { margin: 0; font-size: 1.15rem; }
.rep-cab p { margin: 2px 0 0; color: var(--texto-suave); }
.tabla.rep td.grupo { font-weight: 700; }
.tabla.rep tr.n1 td { background: #eef3f0; font-weight: 800; text-transform: uppercase; }
.tabla.rep tr.n2 td { font-weight: 700; }
.tabla.rep tr.total td { border-top: 2px solid var(--verde-osc); font-weight: 800; background: var(--verde-claro); }

/* Tipo de compra (gasto / inventario) */
.tipo-compra { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tipo-compra label { margin: 0; cursor: pointer; }
.tipo-compra input { position: absolute; opacity: 0; pointer-events: none; }
.tipo-compra span { display: block; height: 100%; border: 1px solid var(--linea); border-radius: var(--radio); padding: 12px 14px; background: var(--blanco); }
.tipo-compra b { display: block; font-size: 15px; color: var(--verde-osc); }
.tipo-compra small { color: var(--texto-suave); }
.tipo-compra input:checked + span { border-color: var(--verde-osc); box-shadow: inset 4px 0 0 var(--verde-osc); background: var(--verde-claro); }
@media (max-width: 700px) { .tipo-compra { grid-template-columns: 1fr; } }
.bloque-seg { display: flex; width: 100%; }
.bloque-seg .btn { flex: 1; }
.grupo-lote { border: 1px solid var(--borde); border-radius: var(--radio); margin-bottom: 14px; overflow: hidden; }
.grupo-lote .cab { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 9px 14px; background: #f7f9f8; border-bottom: 1px solid var(--borde); }
.grupo-lote .cab b { color: var(--verde-osc); }
.grupo-lote .cab .tot { margin-left: auto; font-weight: 800; }
.grupo-lote .cuerpo { padding: 10px 14px; }
.grupo-lote .datos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
@media (max-width: 800px) { .grupo-lote .datos { grid-template-columns: 1fr; } }
.tabla.rep td:first-child { width: 190px; }
.tabla.rep td:last-child, .tabla.rep th:last-child { width: 150px; }

/* ----- POS: pestañas de categorías y uso en celular / tablet ----- */
.cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.cats .btn { flex: 0 0 auto; }
.cats .btn .n { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; font-size: 10.5px; border-radius: 9px; background: var(--verde-claro); color: var(--verde-osc); }
.cats .btn.activo .n { background: var(--verde-osc); color: #fff; }
.cats .cat-nueva { color: var(--texto-suave); border-bottom-style: dashed !important; }
.pos-barra-movil { display: none; }
.solo-movil { display: none; }
#barraMovil.flash { animation: flash .45s ease; }
@media (max-width: 860px) {
  .pos { display: block; height: auto; min-height: 100vh; }
  .pos-izq { border-right: 0; min-height: 100vh; padding-bottom: 70px; }
  .pos-cab { position: sticky; top: 0; z-index: 30; }
  .pos-cab b { max-width: 150px; }
  .pos-tabs { overflow-x: auto; max-width: 100%; }
  .pos-cab .derecha .etq.bl, .pos-cab .derecha a.btn { display: none; }
  .prods { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
  .prod { min-height: 82px; padding: 8px 10px; }
  .lista-canchas, .lista-cuentas { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .pos-der { position: fixed; inset: 0; z-index: 90; display: none; border-top: 0; overflow-y: auto; }
  body.ver-cuenta .pos-der { display: flex; }
  body.ver-cuenta { overflow: hidden; }
  .pos-carrito { flex: 1 0 auto; }
  .solo-movil { display: inline-flex; }
  .pos-barra-movil { display: flex; align-items: center; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; border: 0; padding: 12px 16px;
    background: var(--verde-osc); color: #fff; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 -6px 18px -8px rgba(0,0,0,.45); }
  .pos-barra-movil span:first-child { flex: 1; min-width: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pos-barra-movil b { font-size: 1.25rem; }
  .pos-barra-movil .ver { background: #fff; color: var(--verde-osc); padding: 6px 12px; border-radius: var(--radio-sm); }
  .avisos-flot { bottom: 74px; }
}

/* ==========================================================================
   Cuadre general de campos y botones (oct-2026): todo del mismo alto,
   sin saltos al pasar el mouse y con las listas desplegables iguales.
   ========================================================================== */
:root { --alto-ctrl: 38px; --borde-ctrl: #a7b1ab; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time],
input[type=search], input[type=tel], select { height: var(--alto-ctrl); min-height: var(--alto-ctrl); padding-top: 0; padding-bottom: 0; line-height: normal; border-color: var(--borde-ctrl); }
input[type=file] { height: auto; padding: 6px 8px; }
.btn { min-height: var(--alto-ctrl); padding-top: 0; padding-bottom: 0; vertical-align: middle; }
.btn.sm { min-height: 30px; padding: 0 10px; }
.btn.lg { min-height: 46px; padding: 0 22px; }
.btn:hover, .btn:active { transform: none; }
/* Listas desplegables con la misma flecha que los buscadores */
select { -webkit-appearance: none; appearance: none; padding-right: 30px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--texto-suave) 50%), linear-gradient(135deg, var(--texto-suave) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
select[multiple] { height: auto; background-image: none; padding-right: 10px; }
/* En tablas: un poco más bajos, todos iguales */
.tabla input[type=text], .tabla input[type=number], .tabla input[type=date], .tabla select, .tabla .sb .sb-input { height: 32px; min-height: 32px; }
.tabla .btn.sm { min-height: 28px; }
/* Campo con botones pegados: mismo alto, mismo borde, sin sombras */
.grupo-input { align-items: stretch; }
.grupo-input > *, .grupo-input > .ac > input, .grupo-input > .sb > .sb-input { height: var(--alto-ctrl); min-height: var(--alto-ctrl); }
.grupo-input > .btn { box-shadow: none !important; border-color: var(--borde-ctrl); background: #f7f9f8; color: var(--verde-osc); padding: 0 14px; }
.grupo-input > .btn:hover { background: var(--verde-claro); }
.grupo-input > .btn.prim { background: var(--verde-osc); border-color: var(--verde-osc); color: #fff; }
.grupo-input > :not(:first-child), .grupo-input > :not(:first-child) > input { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.grupo-input > :not(:last-child), .grupo-input > :not(:last-child) > input { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.grupo-input > input:focus, .grupo-input > .ac > input:focus { position: relative; z-index: 1; }
/* Acciones en filas y cabeceras alineadas */
.acc { vertical-align: middle; }
.acc > .btn, .acc > form { vertical-align: middle; }
.tarjeta-cab .acciones form, .pagina-cab .acciones form { display: inline-flex; margin: 0; }
.filtros .btn { align-self: flex-end; }
.filtros .check { align-self: center; margin: 18px 0 0; }
/* Botón tipo enlace (p. ej. "+ Nueva categoría" junto a la etiqueta) */
.enlace-btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--verde-osc); cursor: pointer; }
.enlace-btn .ico { width: 14px; height: 14px; }
.enlace-btn:hover { text-decoration: underline; }
.etiqueta-fila { margin-bottom: 4px; }
.etiqueta-fila label { margin-bottom: 0; }
/* Panelito para crear algo sin salir del formulario */
.mini-panel { margin-top: 8px; padding: 12px; border: 1px solid var(--borde); border-left: 3px solid var(--verde-osc); border-radius: var(--radio-sm); background: #f7f9f8; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--sombra); }
.mini-panel[hidden] { display: none; }
.mini-panel b { font-size: 13px; color: var(--verde-osc); }
.mini-panel-acc { display: flex; justify-content: flex-end; gap: 6px; }
.etiqueta-fila { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 18px; margin-bottom: 4px; }
.etiqueta-fila .enlace-btn { line-height: 1; }
/* Filtros en una sola línea, check y botón a la altura de los campos */
.filtros .crece { min-width: 160px; }
.filtros .check { align-self: flex-end; height: var(--alto-ctrl, 38px); display: inline-flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; }
.filtros > .btn { height: var(--alto-ctrl, 38px); }
/* Espaciado parejo entre filas de campos dentro de grillas */
.grid > .campo { margin-bottom: 0; }
.grid:has(> .campo) { row-gap: 14px; }
.grid + #bloqueStock, .grid + .check, .grid + div > .check:first-child { margin-top: 14px; }
.tarjeta .grid + h3 { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--borde-suave); }
.tabla-wrap { overflow-x: auto; }
.tabla td.num input[type=number] { text-align: right; }
.txt-rojo { color: var(--rojo, #b42318); font-weight: 600; }

/* ===================== Portal del cliente · app · publicidad ===================== */
.pub-barra { position: absolute; top: 0; left: 0; right: 0; z-index: 3; }
.pub-barra .in { max-width: 1180px; margin: 0 auto; padding: 10px 22px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.pub-barra a, .pub-barra button { color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .35); padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; border-radius: var(--radio); }
.pub-barra a:hover, .pub-barra button:hover { background: #fff; color: var(--verde-osc); }
.pub-barra .prim { background: #fff; color: var(--verde-osc); }

.promos { max-width: 1180px; margin: 0 auto; padding: 0 22px; position: relative; z-index: 2; }
.promos ~ form > .pub-cuerpo { margin-top: 12px; }
.portal-cab + .promos { max-width: 1080px; }
.portal-cab + .promos + .portal-cuerpo { padding-top: 8px; }
.promos-tira { display: flex; gap: 10px; overflow-x: auto; padding: 14px 0 4px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.promo-mini { flex: 0 0 260px; display: flex; gap: 10px; align-items: center; background: var(--blanco); border: 1px solid var(--borde); box-shadow: var(--sombra); padding: 7px; text-decoration: none; color: var(--texto); scroll-snap-align: start; border-radius: var(--radio); min-width: 0; }
.promo-mini:hover { box-shadow: var(--sombra-hover); border-color: var(--verde-acento); }
.promo-mini img { width: 78px; height: 52px; object-fit: cover; flex: 0 0 78px; border-radius: var(--radio); }
.promo-mini b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.promo-mini small { display: block; color: var(--texto-suave); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.promo-mini .txt { min-width: 0; }
.promo-mini .ir { font-size: 11px; font-weight: 700; color: var(--verde-acento); }

.promo-flot { position: fixed; right: 16px; bottom: 16px; width: 300px; max-width: calc(100vw - 32px); background: var(--blanco); border: 1px solid var(--borde); border-top: 3px solid var(--verde-osc); box-shadow: 0 20px 40px -12px rgba(6, 35, 26, .55); z-index: 90; border-radius: var(--radio); transform: translateY(20px); opacity: 0; transition: .25s; pointer-events: none; }
.promo-flot.ver { transform: none; opacity: 1; pointer-events: auto; }
.promo-flot img { display: block; width: 100%; max-height: 190px; object-fit: cover; }
.promo-flot .cuerpo { padding: 10px 12px 12px; }
.promo-flot .cuerpo b { display: block; font-size: 14px; }
.promo-flot .cuerpo p { margin: 3px 0 10px; color: var(--texto-suave); font-size: 12.5px; }
.promo-flot .cuerpo .btn { justify-content: center; text-align: center; }
.promo-flot .x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 16px; cursor: pointer; border-radius: 50%; line-height: 1; }
.promo-flot .et { position: absolute; top: 8px; left: 8px; background: var(--verde-osc); color: #fff; font-size: 10.5px; font-weight: 700; padding: 2px 7px; letter-spacing: .4px; text-transform: uppercase; border-radius: var(--radio); }

.app-aviso { display: flex; gap: 12px; align-items: center; background: var(--verde-claro); border: 1px solid #a9c4b3; padding: 10px 14px; margin-bottom: 14px; border-radius: var(--radio); }
.app-aviso .ico-app { width: 38px; height: 38px; flex: 0 0 38px; background: var(--verde-osc); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 12px; border-radius: 8px; }
.app-aviso .txt { flex: 1; min-width: 0; font-size: 13px; }
.app-aviso .txt b { display: block; }

.rango.ocupado.avisable { cursor: pointer; }
.rango.ocupado.avisable:hover { border-color: var(--verde-acento); background: #eef3f0; }
.rango.ocupado.avisable em { display: block; font-style: normal; font-size: 11px; color: var(--verde-acento); font-weight: 700; }
.rango.ocupado.esperando em { color: var(--verde-osc); }

.portal-cab { background: var(--verde-osc); color: #fff; }
.portal-cab .in { max-width: 1080px; margin: 0 auto; padding: 12px 22px; display: flex; align-items: center; gap: 12px; }
.portal-cab img, .portal-cab .logo-txt { width: 44px; height: 44px; flex: 0 0 44px; object-fit: contain; background: #fff; border-radius: var(--radio); }
.portal-cab .logo-txt { display: grid; place-items: center; color: var(--verde-osc); font-weight: 800; }
.portal-cab .nom { min-width: 0; }
.portal-cab .nom b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portal-cab .nom small { color: var(--verde-texto-claro); }
.portal-cab nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.portal-cab nav a, .portal-cab nav button { color: #fff; text-decoration: none; padding: 6px 11px; border: 1px solid rgba(255, 255, 255, .3); background: transparent; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; border-radius: var(--radio); }
.portal-cab nav a:hover, .portal-cab nav button:hover, .portal-cab nav .activo { background: #fff; color: var(--verde-osc); }
.portal-cuerpo { max-width: 1080px; margin: 0 auto; padding: 18px 22px 40px; }
.portal-caja { max-width: 440px; margin: 26px auto; }
.portal-caja h1 { margin-bottom: 4px; }
.portal-kpis .kpi .val { font-size: 1.5rem; }
.reserva-item { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--borde-suave); }
.reserva-item:last-child { border-bottom: 0; }
.reserva-item .dia { width: 54px; flex: 0 0 54px; text-align: center; background: var(--verde-claro); padding: 6px 0; border-radius: var(--radio); }
.reserva-item .dia b { display: block; font-size: 20px; line-height: 1; color: var(--verde-osc); }
.reserva-item .dia small { font-size: 11px; text-transform: uppercase; color: var(--texto-suave); }
.reserva-item .det { flex: 1; min-width: 0; }
.reserva-item .det b { white-space: nowrap; }
@media (max-width: 720px) {
  .portal-cab .in { flex-wrap: wrap; }
  .portal-cab nav { margin-left: 0; width: 100%; justify-content: flex-start; }
  .promo-mini { flex-basis: 230px; }
  .pub-barra { position: relative; }
  .pub-portada .pub-barra .in { flex-direction: row; align-items: center; justify-content: flex-end; padding: 10px 16px 0; }
  .app-aviso { flex-wrap: wrap; }
  .app-aviso .txt { flex: 1 1 calc(100% - 52px); }
  .app-aviso .btn { flex: 0 0 auto; }
  .promo-flot { right: 12px; bottom: 12px; width: 260px; }
  .reserva-item { flex-wrap: wrap; }
}

/* ===================== Cuentas parametrizadas y plan de cuentas (como 365) ===================== */
details.grupo-roles { padding: 0; margin-bottom: 12px; }
.grupo-titulo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; font-weight: 700; font-size: 14px; color: var(--verde-osc); cursor: pointer; list-style: none; }
.grupo-titulo::-webkit-details-marker { display: none; }
.grupo-titulo::before { content: "▸"; color: var(--texto-suave); margin-right: 8px; }
details[open] > .grupo-titulo::before { content: "▾"; }
.grupo-titulo > span:first-child { flex: 1; }
details[open] > .grupo-titulo { border-bottom: 1px solid var(--linea); }
.fila-rol { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px) 96px; gap: 14px; align-items: center; padding: 9px 18px; border-bottom: 1px solid var(--borde-suave); }
.fila-rol:last-child { border-bottom: 0; }
.fila-rol .rol-etiqueta small { display: block; }
.fila-rol .rol-estado { text-align: right; }

.arbol { font-size: 13.5px; }
.arbol details > summary { list-style: none; cursor: pointer; }
.arbol details > summary::-webkit-details-marker { display: none; }
.arbol .fila-cuenta { display: grid; grid-template-columns: 18px minmax(130px, auto) minmax(0, 1fr) 96px 104px 116px; gap: 10px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--borde-suave); }
.arbol .fila-cuenta:hover { background: #f5f8f6; }
.arbol .fila-cuenta .flecha { color: var(--texto-suave); font-size: 11px; }
.arbol details[open] > summary .flecha::before { content: "▾"; }
.arbol details:not([open]) > summary .flecha::before { content: "▸"; }
.arbol .codigo { font-variant-numeric: tabular-nums; white-space: nowrap; }
.arbol .nombre { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arbol .grupo > .fila-cuenta .codigo, .arbol .grupo > summary .codigo, .arbol .grupo > summary .nombre { font-weight: 700; }
.arbol .hijos { padding-left: 18px; border-left: 1px dashed var(--borde); margin-left: 18px; }
.arbol .acciones { display: flex; gap: 4px; justify-content: flex-end; }
.arbol .fila-form { display: none; padding: 8px 10px 10px 46px; background: #f7f9f8; border-bottom: 1px solid var(--borde-suave); }
.arbol .fila-form.ver { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.arbol .fila-form input[type=text] { flex: 1 1 260px; max-width: 460px; }
@media (max-width: 720px) {
  .fila-rol { grid-template-columns: 1fr; }
  .fila-rol .rol-estado { text-align: left; }
  .arbol .fila-cuenta { grid-template-columns: 16px auto minmax(0, 1fr) auto; }
  .arbol .fila-cuenta .tipo, .arbol .fila-cuenta .mov { display: none; }
}

/* ===================== Control de tiempo por persona (parques) ===================== */
.lista-ninos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.nino-card { background: var(--blanco); border: 1px solid var(--borde); border-top: 3px solid var(--verde-acento); box-shadow: var(--sombra); padding: 10px 12px; border-radius: var(--radio); min-width: 0; }
.nino-card.pronto { border-top-color: var(--amarillo-borde); background: #fffdf3; }
.nino-card.vencido { border-top-color: var(--rojo-texto); background: var(--rojo-suave); animation: parpadeo 1.6s ease-in-out infinite; }
@keyframes parpadeo { 50% { box-shadow: 0 0 0 3px rgba(143, 29, 29, .25); } }
.nino-card .cab { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.nino-card .cab b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nino-card .reloj { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--verde-osc); margin: 4px 0 6px; }
.nino-card.pronto .reloj { color: #7a5a00; }
.nino-card.vencido .reloj { color: var(--rojo-texto); }
.nino-card .fila { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 2px 0; }
.nino-card .fila span { color: var(--texto-suave); white-space: nowrap; }
.nino-card .fila b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; text-align: right; }
.nino-card .acc { display: flex; gap: 6px; align-items: center; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--borde-suave); }
.nino-card .acc .suave { font-size: 11.5px; margin-right: auto; white-space: nowrap; }
.ninos-form .nino-fila { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 36px; gap: 8px; align-items: end; margin-bottom: 8px; }
.paquetes-sel { display: flex; flex-wrap: wrap; gap: 4px; }
.paquetes-sel .btn.activo { background: var(--verde-osc); color: #fff; border-color: var(--verde-osc); }
.aviso-ingreso { background: var(--amarillo-claro); border: 1px solid var(--amarillo-borde); padding: 8px 10px; font-size: 12.5px; margin-bottom: 8px; border-radius: var(--radio); }
@media (max-width: 720px) { .ninos-form .nino-fila { grid-template-columns: 1fr 36px; } .ninos-form .nino-fila .paquetes-sel { grid-column: 1 / -1; order: 3; } }

/* ===================== Marca del sistema, barra superior y menú plegado ===================== */
.menu a.marca { text-decoration: none; }
.menu .marca img.logo-sistema { background: transparent; border: 0; width: 42px; height: 42px; flex-basis: 42px; }
.sub-tit { display: none; }
.barra .empresa-barra { font-weight: 500; }
.chip-empresa, .chip-usuario { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--borde); background: var(--blanco); border-radius: 999px; min-width: 0; max-width: 300px; }
.chip-empresa img, .chip-usuario img, .chip-empresa .ini, .chip-usuario .ini { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; object-fit: cover; background: var(--verde-claro); display: grid; place-items: center; font-weight: 800; color: var(--verde-osc); border: 1px solid var(--borde); }
.chip-empresa { text-decoration: none; color: var(--texto); }
a.chip-empresa:hover { border-color: var(--verde-acento); background: var(--verde-claro); }
.chip-empresa .engrane { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; display: grid; place-items: center; background: var(--verde-claro); color: var(--verde-osc); border: 1px solid var(--borde); }
.chip-empresa .engrane .ico { width: 18px; height: 18px; transition: transform .4s; }
a.chip-empresa:hover .engrane .ico { transform: rotate(90deg); }
.chip-empresa .txt, .chip-usuario .txt { min-width: 0; line-height: 1.15; }
.chip-empresa b, .chip-usuario b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-empresa small, .chip-usuario small { display: block; font-size: 11px; color: var(--texto-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-usuario { position: relative; cursor: pointer; }
.chip-usuario .chip-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 200px; background: var(--blanco); border: 1px solid var(--borde); box-shadow: 0 14px 30px -12px rgba(6, 35, 26, .45); border-radius: var(--radio); padding: 6px; z-index: 40; }
.chip-usuario:hover .chip-menu, .chip-usuario:focus-within .chip-menu { display: block; }
.chip-usuario .chip-menu a, .chip-usuario .chip-menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; background: none; border: 0; font: inherit; font-size: 13px; color: var(--texto); text-decoration: none; cursor: pointer; border-radius: var(--radio-sm); }
.chip-usuario .chip-menu a:hover, .chip-usuario .chip-menu button:hover { background: var(--verde-claro); }
.chip-usuario .chip-menu form { margin: 0; border-top: 1px solid var(--borde-suave); margin-top: 4px; padding-top: 4px; }
@media (min-width: 861px) {
  body.menu-cerrado { --menu-ancho: 66px; }
  body.menu-cerrado .menu { width: 66px; flex-basis: 66px; padding: 14px 8px; overflow: visible; z-index: 30; }
  body.menu-cerrado .menu .tx, body.menu-cerrado .menu .flecha, body.menu-cerrado .menu .marca .txt { display: none; }
  body.menu-cerrado .menu .marca { justify-content: center; padding: 2px 0 14px; }
  body.menu-cerrado .menu-seccion { position: relative; }
  body.menu-cerrado .menu-seccion > button, body.menu-cerrado .menu a.item { justify-content: center; padding: 10px 0; border-left-width: 0; position: relative; }
  body.menu-cerrado .menu-seccion > button .ico, body.menu-cerrado .menu a.item .ico { width: 21px; height: 21px; }
  /* Plegado: solo íconos. Al pasar el mouse se ve SOLO el nombre; al dar clic se abre el menú completo en esa sección. */
  body.menu-cerrado .menu-seccion .sub, body.menu-cerrado .sub-tit { display: none !important; }
  body.menu-cerrado .menu-seccion.abierta > button { background: none; }
  body.menu-cerrado .menu-seccion:has(.sub a.activo) > button { background: rgba(255, 255, 255, .14); }
  body.menu-cerrado .menu-seccion > button:hover::after, body.menu-cerrado .menu a.item:hover::after {
    content: attr(data-nombre); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
    white-space: nowrap; background: var(--verde-osc); color: #fff; padding: 7px 12px; border-radius: var(--radio);
    font-size: 13px; font-weight: 600; box-shadow: 0 10px 22px -8px rgba(0, 0, 0, .5); z-index: 60; pointer-events: none;
  }
}
@media (max-width: 1100px) { .chip-empresa .txt small { display: none; } }
@media (max-width: 720px) { .chip-empresa, .barra .empresa-barra { display: none; } .chip-usuario .txt { display: none; } .chip-usuario { padding: 3px; } }

/* ===================== Inicio (dashboard) ===================== */
.aviso-accion { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
.dash-kpis { margin-bottom: 18px; }
.dash-kpis .kpi .det { font-size: 12.5px; }
.vivo-pt { color: var(--verde-acento); font-weight: 700; margin-left: 6px; font-size: 10.5px; animation: vivo 2s ease-in-out infinite; }
@keyframes vivo { 50% { opacity: .35; } }
.dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.dash-grid > .tarjeta, .grid.g3 > .tarjeta { margin-bottom: 0; }
.grid.g3 { margin-bottom: 18px; }
.barras-horas { height: 170px; gap: 4px; }
.barras-horas .b span { font-size: 10.5px; }
.chips-formas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.obligacion { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--borde-suave); }
.obligacion:last-child { border-bottom: 0; }
.obligacion .dia { width: 56px; flex: 0 0 56px; text-align: center; background: var(--verde-claro); border: 1px solid #a9c4b3; border-radius: var(--radio); padding: 6px 0; }
.obligacion .dia.pronto { background: var(--amarillo-claro); border-color: var(--amarillo-borde); }
.obligacion .dia.urgente { background: var(--rojo-suave); border-color: #eab4b4; }
.obligacion .dia b { display: block; font-size: 22px; line-height: 1; color: var(--verde-osc); }
.obligacion .dia.urgente b { color: var(--rojo-texto); }
.obligacion .dia small { font-size: 11px; text-transform: uppercase; color: var(--texto-suave); }
.obligacion .txt { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.obligacion .txt > span:not(.etq) { font-size: 12.5px; color: var(--texto-suave); }
.progreso { position: relative; height: 26px; background: var(--borde-suave); border-radius: 999px; overflow: hidden; }
.progreso i { position: absolute; inset: 0 auto 0 0; background: var(--amarillo-borde); border-radius: 999px; transition: width .4s; }
.progreso.ok i { background: var(--verde-acento); }
.progreso span { position: relative; display: block; text-align: center; line-height: 26px; font-weight: 800; font-size: 13px; }
.fila-dato { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--borde-suave); font-size: 13px; align-items: center; min-width: 0; }
.fila-dato:last-of-type { border-bottom: 0; }
.fila-dato span { color: var(--texto-suave); }
.mini-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.mini-kpis > * { display: block; padding: 8px 10px; border: 1px solid var(--borde); border-radius: var(--radio); background: #f7f9f8; text-decoration: none; color: var(--texto); min-width: 0; }
.mini-kpis > a:hover { border-color: var(--verde-acento); text-decoration: none; }
.mini-kpis small { display: block; font-size: 11px; color: var(--texto-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-kpis b { font-size: 18px; white-space: nowrap; }
.mini-kpis .am { background: var(--amarillo-claro); border-color: var(--amarillo-borde); }
.mini-kpis .rojo { background: var(--rojo-suave); border-color: #eab4b4; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
/* Inicio en una sola pantalla: el cuerpo ocupa el alto disponible y cada cuadro desplaza por dentro */
.contenido:has(> .dash) > .pagina-cab { display: none; }
.contenido:has(> .dash) { padding-top: 14px; padding-bottom: 14px; max-width: none; }
.dash { display: flex; flex-direction: column; gap: 12px; height: calc(100vh - 92px); min-height: 600px; }
.dash > * { flex: 0 0 auto; }
.dash-avisos { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; overflow-x: auto; padding: 7px 12px; background: var(--amarillo-claro); border: 1px solid var(--amarillo-borde); border-radius: var(--radio); scrollbar-width: none; }
.dash-horarios { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border: 1px solid #eab4b4; background: var(--rojo-suave); border-radius: var(--radio); font-size: 13.5px; }
.dash-horarios .acc { display: flex; gap: 6px; }
.dash-avisos .tit { font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.dash-avisos .etq { white-space: nowrap; text-decoration: none; background: var(--blanco); }
.dash-avisos a.etq:hover { border-color: var(--verde-acento); }
.dash .dash-kpis { margin: 0; gap: 12px; }
.dash .kpi { padding: 9px 14px; }
.dash .kpi .val { font-size: 1.4rem; margin-top: 2px; }
.dash-cuerpo { flex: 1 1 auto; min-height: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 2.3fr) minmax(300px, 1fr); grid-template-rows: minmax(0, 1.8fr) minmax(0, 1fr); }
.dash-cuerpo > .tarjeta { margin: 0; display: flex; flex-direction: column; min-height: 0; padding-bottom: 12px; }
.dash-cuerpo > .tarjeta > .tarjeta-cab { margin-bottom: 10px; min-height: 42px; padding-top: 6px; padding-bottom: 6px; flex: 0 0 auto; }
.dash-cuerpo .cuerpo { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.dash-vivo { grid-column: 1; grid-row: 1; }
.dash-tendencia { grid-column: 1; grid-row: 2; }
.dash-lado { grid-column: 2; grid-row: 1 / span 2; }
.dash-tendencia .cuerpo { display: flex; overflow: hidden; }
.dash-tendencia .barras, .dash-vivo .barras-horas { height: 100%; min-height: 90px; padding-top: 4px; flex: 1; }
.dash-vivo .barras-horas { height: 100%; }
.dash .barras .b span { font-size: 11px; }
.dash-vivo .resumen-vivo { margin-bottom: 8px; }
.dash-vivo .tablero { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.dash-vivo .cancha { min-height: 0; padding: 9px 12px; gap: 2px; }
.dash-vivo .cancha .reloj { font-size: 1.35rem; }
.dash-vivo .nino-card .reloj { font-size: 24px; margin: 2px 0 4px; }
.dash-panel[hidden], .dash-vivo [data-ver][hidden] { display: none; }
.dash-tabs { display: flex; gap: 4px; }
.dash-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 6px 10px; font: inherit; font-weight: 700; font-size: 15px; color: var(--texto-suave); cursor: pointer; }
.dash-tabs button.activo { color: var(--verde-osc); border-bottom-color: var(--verde-osc); }
.dash-lado .mini-kpis { margin-bottom: 4px; }
.dash-lado .mini-kpis > * { padding: 6px 10px; }
.dash-lado .mini-kpis b { font-size: 17px; }
.dash-sub { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--texto-suave); margin: 12px 0 4px; }
.dash-lado .chips-formas { margin-top: 2px; }
.oblig { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--borde-suave); text-decoration: none; color: var(--texto); min-width: 0; }
.oblig:last-child { border-bottom: 0; }
a.oblig:hover { text-decoration: none; background: #f7f9f8; }
.oblig .dia { width: 44px; flex: 0 0 44px; text-align: center; background: var(--verde-claro); border: 1px solid #a9c4b3; border-radius: var(--radio-sm); padding: 3px 0; line-height: 1.05; }
.oblig .dia.pronto { background: var(--amarillo-claro); border-color: var(--amarillo-borde); }
.oblig .dia.urgente { background: var(--rojo-suave); border-color: #eab4b4; }
.oblig .dia b { display: block; font-size: 16px; color: var(--verde-osc); }
.oblig .dia.urgente b { color: var(--rojo-texto); }
.oblig .dia small { font-size: 10px; text-transform: uppercase; color: var(--texto-suave); }
.oblig .txt { flex: 1; min-width: 0; line-height: 1.2; }
.oblig .txt b { display: block; font-size: 13px; }
.oblig .txt small { display: block; font-size: 11.5px; color: var(--texto-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oblig .etq { white-space: nowrap; }
.txt-ok { color: var(--verde-acento); font-weight: 700; }
@media (max-width: 1100px), (max-height: 640px) {
  .dash { height: auto; min-height: 0; }
  .dash-cuerpo { grid-template-columns: 1fr; grid-template-rows: none; }
  .dash-vivo, .dash-tendencia, .dash-lado { grid-column: auto; grid-row: auto; }
  .dash-tendencia .cuerpo { height: 170px; }
  .dash-cuerpo .cuerpo { overflow: visible; }
}

/* ===================== Mi empresa ===================== */
.empresa-cab { display: flex; gap: 16px; align-items: center; }
.empresa-cab img, .empresa-cab .ini { width: 72px; height: 72px; flex: 0 0 72px; object-fit: contain; border: 1px solid var(--borde); border-radius: var(--radio); background: #fff; display: grid; place-items: center; font-size: 30px; font-weight: 800; color: var(--verde-osc); }
.empresa-cab .txt { min-width: 0; }
.empresa-cab .etqs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ico.candado { width: 13px; height: 13px; vertical-align: -2px; }
.establecimiento .punto-fila { display: grid; grid-template-columns: 120px minmax(160px, 1fr) minmax(0, 3fr) 80px 80px; gap: 14px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--borde-suave); }
.establecimiento .punto-fila:last-of-type { border-bottom: 0; }
.punto-fila .serie { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.punto-fila .serie b { font-size: 16px; font-variant-numeric: tabular-nums; }
.punto-fila .nom b { display: block; }
.punto-fila .nom span { font-size: 12px; color: var(--texto-suave); }
.punto-fila .secs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.punto-fila .secs span { background: #f7f9f8; border: 1px solid var(--borde-suave); border-radius: var(--radio-sm); padding: 4px 6px; text-align: center; min-width: 0; }
.punto-fila .secs small { display: block; font-size: 10px; color: var(--texto-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.punto-fila .secs b { font-variant-numeric: tabular-nums; }
.punto-fila .acc { text-align: right; }
@media (max-width: 1100px) { .establecimiento .punto-fila { grid-template-columns: 110px 1fr 80px; } .punto-fila .secs { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(3, minmax(0, 1fr)); } .punto-fila .est { display: none; } }

/* ===================== Horarios (semana y eventos) ===================== */
.form-linea { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.form-pie { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--borde-suave); }
.semana-tabla { display: flex; flex-direction: column; border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; }
.st-cab, .st-fila { display: grid; grid-template-columns: 130px 150px 120px 120px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px 16px; }
.st-cab { background: #f4f6f5; font-size: 11.5px; font-weight: 700; text-transform: uppercase; color: var(--texto-suave); border-bottom: 1px solid var(--borde); }
.st-fila + .st-fila { border-top: 1px solid var(--borde-suave); }
.st-fila.cerrado { background: #fafbfa; }
.st-fila.cerrado .st-dia { color: var(--texto-suave); }
.st-fila select { min-height: 36px; height: 36px; }
.st-fila select:disabled { opacity: .45; }
.st-regla { position: relative; height: 14px; }
.st-regla i { position: absolute; transform: translateX(-50%); font-style: normal; font-weight: 600; }
.st-regla i:first-child { transform: none; }
.st-regla i:last-child { transform: translateX(-100%); }
.interruptor { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.interruptor input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.interruptor .pista { position: relative; width: 40px; height: 22px; border-radius: 11px; background: #c9d1cc; transition: background .2s; flex: 0 0 40px; }
.interruptor .pista::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: left .2s; }
.interruptor input:checked + .pista { background: var(--verde-acento); }
.interruptor input:checked + .pista::after { left: 21px; }
.interruptor input:focus-visible + .pista { outline: 2px solid var(--verde-osc); outline-offset: 2px; }
.interruptor .txt { font-weight: 600; font-size: 13.5px; }
.linea-tiempo { position: relative; height: 14px; border-radius: 7px; background: repeating-linear-gradient(90deg, var(--borde-suave) 0 1px, #f3f5f4 1px calc(100% / 24)); border: 1px solid var(--borde); overflow: hidden; }
.linea-tiempo i { position: absolute; top: 0; bottom: 0; background: var(--verde-acento); border-radius: 6px; }
.linea-tiempo i.mal { background: var(--rojo-texto); }
.canchas-evento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; margin: 4px 0 0 26px; }
@media (max-width: 860px) {
  .st-cab { display: none; }
  .st-fila { grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .st-fila .linea-tiempo { grid-column: 1 / -1; }
  .canchas-evento { grid-template-columns: 1fr 1fr; }
}

/* ===================== Calendario de reservas ===================== */
.aviso.bl { background: #eef4fb; border-left-color: #3d6fa3; }
.txt-am { color: #7a5a00; font-weight: 600; }
.agenda td.cerrado { background: repeating-linear-gradient(135deg, #eceeed, #eceeed 5px, #e2e5e3 5px, #e2e5e3 10px); }
.leyenda i.c { border-left-color: #b4bdb8; background: repeating-linear-gradient(135deg, #eceeed, #eceeed 3px, #d6dad8 3px, #d6dad8 6px); }
.leyenda i.e { border-left-color: #3d6fa3; background: #e6eff9; }
.bloque-res.evento { border-left-color: #3d6fa3; background: #e6eff9; cursor: default; }
.ev-mes { display: block; font-size: 11px; padding: 1px 6px; border-left: 3px solid #3d6fa3; background: #e6eff9; border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--texto); }
.leyenda i.o1 { border-left-color: #8fc9a5; background: #e6f4ea; }
.leyenda i.o2 { border-left-color: #b8971c; background: var(--amarillo-claro); }
.leyenda i.o3 { border-left-color: var(--rojo-texto); background: var(--rojo-suave); }
.agenda.semana { width: 100%; }
.agenda.semana th, .agenda.semana td { height: 40px; }
.agenda.semana thead th:not(.hora) { width: auto; min-width: 110px; max-width: none; }
.cal-mes .dia small.txt-rojo { color: var(--rojo-texto); font-weight: 600; }
.agenda.semana thead th a { color: inherit; text-decoration: none; display: block; }
.agenda.semana thead th.hoy { background: var(--verde-claro); }
.agenda.semana .hora { width: 76px; min-width: 76px; max-width: 76px; }
.agenda td.ocup a { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 39px; font-weight: 700; font-size: 13px; color: var(--texto); text-decoration: none; }
.agenda td.ocup:hover { background: #f6f9f7; }
.agenda td.ocup.o1 { background: #e6f4ea; }
.agenda td.ocup.o2 { background: var(--amarillo-claro); }
.agenda td.ocup.o3 { background: var(--rojo-suave); }
.agenda td.ocup.pasado { opacity: .55; }
.cal-mes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--linea); border-left: 1px solid var(--linea); }
.cal-mes .cab { padding: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--texto-suave); background: #f4f6f5; border-right: 1px solid var(--linea); border-bottom: 1px solid var(--linea); text-align: center; }
.cal-mes .dia { min-height: 104px; padding: 8px 9px; border-right: 1px solid var(--linea); border-bottom: 1px solid var(--linea); color: var(--texto); text-decoration: none; display: flex; flex-direction: column; gap: 3px; min-width: 0; background: var(--blanco); }
.cal-mes .dia:hover { background: #f6f9f7; text-decoration: none; }
.cal-mes .dia.fuera { background: #f8f9f8; color: #a3aca7; }
.cal-mes .dia .nd { font-weight: 700; font-size: 15px; }
.cal-mes .dia.hoy .nd { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--verde-osc); color: #fff; }
.cal-mes .dia b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-mes .dia small { font-size: 11.5px; color: var(--texto-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-oc { display: block; height: 6px; border-radius: 3px; background: var(--borde-suave); overflow: hidden; margin-top: auto; }
.barra-oc i { display: block; height: 100%; background: var(--verde-acento); }
@media (max-width: 720px) { .cal-mes .dia { min-height: 70px; padding: 5px; } .cal-mes .dia b, .cal-mes .dia small { display: none; } .cal-mes .cab { font-size: 10px; padding: 6px 2px; } }

/* ===================== Usuario de solo consulta ===================== */
/* El servidor bloquea igual cualquier registro; aquí solo se esconden los botones que no puede usar. */
body.solo-consulta form[method="POST" i]:not(.permitir),
body.solo-consulta a[href$="/crear"],
body.solo-consulta [data-abrir-modal],
body.solo-consulta [data-nueva-reserva],
body.solo-consulta [data-abrir-escaner],
body.solo-consulta .solo-escritura { display: none !important; }
.btn-excel .ico { color: #1d6f42; }

/* ===================== Mi suscripción ===================== */
.planes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.plan-card { background: var(--blanco); border: 1px solid var(--borde); box-shadow: var(--sombra); border-radius: var(--radio); padding: 16px 18px; }
.plan-card.actual { outline: 2px solid var(--verde-osc); }
.plan-card .cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 16px; }
.plan-card .precio { font-size: 26px; font-weight: 800; color: var(--verde-osc); margin: 6px 0 2px; }
.plan-card .precio small { font-size: 13px; font-weight: 600; color: var(--texto-suave); }
.plan-card .total { font-size: 13.5px; }
.plan-card p { font-size: 13px; margin: 8px 0 0; }
.datos-pago { background: var(--amarillo-claro); border: 1px solid var(--amarillo-borde); border-radius: var(--radio-sm); padding: 10px 14px; margin-bottom: 12px; }
.datos-pago pre { margin: 6px 0 0; white-space: pre-wrap; font: inherit; font-size: 13.5px; }

/* ===================== Evento de la publicidad (portal) ===================== */
button.promo-mini { font: inherit; text-align: left; cursor: pointer; }
.promo-flot button.img { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.promo-modal { position: fixed; inset: 0; background: rgba(6, 20, 13, .6); z-index: 120; display: flex; align-items: center; justify-content: center; padding: 16px; }
.promo-modal[hidden] { display: none; }
.pm-caja { position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--blanco); border-radius: 12px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); }
.pm-caja .x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 20px; cursor: pointer; z-index: 2; }
.pm-img { display: block; width: 100%; max-height: 300px; object-fit: cover; }
.pm-cuerpo { padding: 16px 20px 20px; }
.pm-cuerpo h3 { margin: 6px 0 4px; font-size: 20px; color: var(--verde-osc); }
.pm-desc { margin: 0 0 10px; color: var(--texto-suave); }
.pm-red { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 3px 8px; border-radius: 999px; background: #eef4fb; border: 1px solid #c7d8ec; color: var(--texto); }
.pm-red.instagram, .pm-red.tiktok { background: var(--amarillo-claro); border-color: var(--amarillo-borde); }
.pm-datos { list-style: none; margin: 8px 0 12px; padding: 0; border-top: 1px solid var(--borde-suave); }
.pm-datos li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--borde-suave); font-size: 14px; }
.pm-datos li span { color: var(--texto-suave); }
.pm-datos li b { text-align: right; }
.pm-detalle { font-size: 14px; line-height: 1.55; margin-bottom: 14px; }
.pm-cuerpo .btn.bloque { display: flex; width: 100%; justify-content: center; align-items: center; text-align: center; }

/* ===================== Pantalla suelta (usuarios solo POS) ===================== */
.simple-barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 22px; background: var(--verde-osc); }
.simple-marca { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.simple-marca img { width: 34px; height: 34px; border-radius: 9px; }
.simple-marca b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===================== Conciliación de inventario ===================== */
.conteo-tabla td.conteo { width: 130px; }
.conteo-tabla td.conteo input { width: 110px; text-align: right; font-size: 15px; font-weight: 700; }
.conteo-tabla tr.dif-mas td { background: #eef4fb; }
.conteo-tabla tr.dif-menos td { background: var(--rojo-suave); }
.conteo-tabla tr.cat td { background: #f4f6f5; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--texto-suave); }
.conteo-tabla tr[hidden] { display: none; }
.conteo-barra { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin: 14px -18px -16px; background: var(--blanco); border-top: 1px solid var(--borde); box-shadow: 0 -8px 18px -12px rgba(6, 35, 26, .35); }
.conteo-barra .res { display: flex; gap: 8px; flex-wrap: wrap; }
.ocr-caja { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border: 1px dashed var(--borde); border-radius: var(--radio); margin-bottom: 12px; background: #fafbfa; }
.ocr-caja input[type=file] { max-width: 260px; }
