/* Línea gráfica de www.surtika.cl: azul marino, naranja de acción, Inter para el texto y Space Grotesk para los títulos. */
@import url("fuentes/fuentes.css");
:root {
  --marino: #1B3A5C; --marino-2: #0A1A30; --azul: #2A5B8C; --naranja: #E8712B; --naranja-2: #D4621F;
  --teal: #0E8C8C; --teal-2: #2BB7B3; --teal-claro: #E3F3F2;
  --texto: #1A202C; --suave: #4A5568; --borde: #E2E8F0; --fondo: #F5F7FA; --blanco: #fff;
  --sombra: 0 4px 6px -1px rgba(10,26,48,.08), 0 2px 4px -1px rgba(10,26,48,.05); --radio: 12px;
  --rojo: #b3261e; --rojo-claro: #fbe9e7; --ambar: #8a5a00; --ambar-claro: #fff4d6; --verde: #1d6b45; --verde-claro: #e3f2e9;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Inter', 'Segoe UI', system-ui, sans-serif; font-size: 14px; line-height: 1.5; color: var(--texto); background: linear-gradient(180deg, #E6ECF4 0, var(--fondo) 260px) no-repeat, var(--fondo); -webkit-font-smoothing: antialiased; }
a { color: var(--azul); text-decoration: none; }
a:hover { text-decoration: underline; }
header { background: linear-gradient(90deg, var(--marino-2), var(--marino)); color: #fff; display: flex; align-items: center; gap: 24px; padding: 0 24px; height: 60px; box-shadow: 0 2px 10px rgba(10,26,48,.25); position: sticky; top: 0; z-index: 30; }
header .marca { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
header .marca img { height: 26px; width: auto; display: block; }
header .marca .separa { width: 1px; height: 22px; background: rgba(255,255,255,.3); }
header .marca .producto { font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 600; font-size: 13px; border: 1px solid var(--naranja); color: #FBD3B6; border-radius: 6px; padding: 2px 8px; letter-spacing: .02em; }
header nav { display: flex; gap: 4px; flex-wrap: wrap; }
header nav a { color: #c9d4e3; padding: 8px 12px; border-radius: 6px; }
header nav a.activo, header nav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; box-shadow: inset 0 -2px 0 var(--naranja); }
header .version { margin-left: auto; color: #8796ab; font-size: 12px; }
main { padding: 28px 28px 60px; max-width: 1440px; margin: 0 auto; }
h1, h2, h3, .cifra { font-family: 'Space Grotesk', 'Inter', sans-serif; color: var(--marino); }
h1 { font-size: 26px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 600; margin: 22px 0 10px; }
.sub { color: var(--suave); margin: 0 0 20px; max-width: 980px; }
.tarjeta { background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--sombra); }
.rejilla { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(520px, 1fr)); }
.dos { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .dos { grid-template-columns: 1fr; } }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--borde); vertical-align: top; }
th { font-size: 12px; color: var(--marino); font-weight: 600; background: #EEF2F7; text-transform: none; }
tbody tr:hover td { background: #F8FAFC; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
.etiqueta { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: var(--teal-claro); color: var(--teal); white-space: nowrap; }
.etiqueta.nortika { background: #efe7f7; color: #5B3F8C; }
.etiqueta.vencido { background: var(--rojo-claro); color: var(--rojo); }
.etiqueta.hoy { background: var(--ambar-claro); color: var(--ambar); }
.etiqueta.ganado { background: var(--verde-claro); color: var(--verde); }
.etiqueta.gris { background: #eceff3; color: var(--suave); }
form.filtros { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 14px; }
label { display: block; font-size: 12px; color: var(--suave); margin-bottom: 3px; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #CBD5E1; border-radius: 6px; background: #fff; color: var(--texto); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(42,91,140,.15); }
textarea { width: 100%; resize: vertical; }
.campo { margin-bottom: 10px; }
.campo input, .campo select { width: 100%; }
td form button { padding: 3px 9px; font-size: 12px; }
.fichas-dia, .fichas-hora { display: flex; flex-wrap: wrap; gap: 6px; }
.ficha-dia { background: #fff; color: var(--texto); border: 1px solid var(--borde); font-size: 12px; line-height: 1.3; padding: 6px 10px; text-align: center; }
.ficha-dia.elegida { background: var(--marino); color: #fff; border-color: var(--marino); }
.ficha-hora { display: inline-block; margin: 0; font-size: 13px; color: var(--texto); }
.ficha-hora input { position: absolute; opacity: 0; width: 1px; }
.ficha-hora span { display: inline-block; border: 1px solid var(--borde); border-radius: 6px; padding: 6px 12px; background: #fff; cursor: pointer; }
.ficha-hora input:checked + span { background: var(--marino); color: #fff; border-color: var(--marino); }
.ficha-hora input:focus-visible + span { outline: 2px solid var(--teal); }
td:has(> form) { white-space: nowrap; }
.campo input[type=checkbox],.campo input[type=radio] { width: auto; margin: 0 6px 0 0; vertical-align: middle; }
.campo label:has(input[type=checkbox]) { font-size: 13px; color: var(--texto); cursor: pointer; }
button, .boton { font: inherit; font-weight: 600; background: var(--naranja); color: #fff; border: 0; border-radius: 6px; padding: 8px 16px; cursor: pointer; display: inline-block; transition: background .2s, box-shadow .2s; }
button:hover, .boton:hover { background: var(--naranja-2); text-decoration: none; box-shadow: 0 4px 10px rgba(232,113,43,.25); }
button.secundario, .boton.secundario { background: #fff; color: var(--marino); border: 1px solid var(--marino); }
button.secundario:hover, .boton.secundario:hover { background: var(--marino); color: #fff; box-shadow: none; }
button.peligro { background: var(--rojo); }
.aviso { background: var(--verde-claro); color: var(--verde); padding: 8px 12px; border-radius: 6px; margin-bottom: 14px; }
.vacio { color: var(--suave); font-style: italic; }
.paginas { display: flex; gap: 6px; align-items: center; margin-top: 12px; }
.muted { color: var(--suave); font-size: 12px; }
.linea-tiempo { list-style: none; padding: 0; margin: 0; }
.linea-tiempo li { padding: 8px 0; border-bottom: 1px solid var(--borde); }
.linea-tiempo .cuando { color: var(--suave); font-size: 12px; }
.cifra { font-size: 26px; font-weight: 700; color: var(--marino); }
/* Embudo */
.embudo { display: grid; grid-template-columns: repeat(7, minmax(168px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.columna { background: #EAEFF5; border-radius: var(--radio); padding: 8px; min-height: 360px; border-top: 3px solid var(--marino); }
.columna.sobre { outline: 2px dashed var(--teal); }
.columna h3 { font-size: 13px; margin: 2px 4px 8px; display: flex; justify-content: space-between; }
.ficha { background: #fff; border: 1px solid var(--borde); border-left: 3px solid var(--naranja); border-radius: 8px; padding: 9px 11px; margin-bottom: 8px; cursor: grab; box-shadow: var(--sombra); }
.ficha .nombre { font-weight: 600; display: block; margin-bottom: 3px; color: var(--texto); }
.ficha .paso { font-size: 12px; color: var(--suave); margin-top: 4px; }
.ficha.arrastrando { opacity: .4; }
pre.cuerpo { white-space: pre-wrap; font-family: inherit; margin: 0; }
/* Menús desplegables, usuario y avisos */
details.menu { position: relative; }
details.menu summary { list-style: none; cursor: pointer; color: #c9d4e3; padding: 8px 12px; border-radius: 6px; }
details.menu summary::-webkit-details-marker { display: none; }
details.menu[open] summary, details.menu summary:hover, details.menu.activo summary { background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 0 -2px 0 var(--naranja); }
details.menu > div { position: absolute; top: 44px; left: 0; z-index: 20; background: #fff; border: 1px solid var(--borde); border-radius: 8px; box-shadow: 0 8px 24px rgba(18,36,63,.18); min-width: 220px; padding: 6px 0; }
details.menu.derecha > div { left: auto; right: 0; }
details.menu > div a { display: block; color: var(--texto); padding: 7px 14px; border-radius: 0; }
details.menu > div a:hover { background: #FFF1E8; color: var(--naranja-2); text-decoration: none; }
header .usuario { margin-left: auto; display: flex; align-items: center; gap: 8px; }
header .campana { color: #c9d4e3; padding: 8px 10px; }
.globo { background: var(--naranja); color: #fff; border-radius: 999px; padding: 1px 7px; font-size: 11px; font-weight: 700; }
.desliza { overflow-x: auto; }
.barra { background: var(--teal-claro); border-radius: 4px; height: 14px; position: relative; min-width: 2px; }
.barra > span { position: absolute; inset: 0 auto 0 0; background: var(--teal); border-radius: 4px; }
.alerta { background: var(--ambar-claro); color: var(--ambar); padding: 8px 12px; border-radius: 6px; margin-bottom: 14px; }
.chat { max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.chat .msg { padding: 7px 10px; border-radius: 8px; max-width: 80%; background: #eceff3; }
.chat .msg.usuario, .chat .msg.bot { align-self: flex-end; background: var(--teal-claro); }
@media (max-width: 760px) {
  header { height: auto; flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
  header nav { width: 100%; }
  main { padding: 14px 12px 40px; }
  .embudo { grid-template-columns: repeat(7, 240px); }
}
/* Pie con las dos marcas, enlazadas a sus sitios */
footer.pie { background: linear-gradient(90deg, var(--marino-2), var(--marino)); color: #B8C4D6; padding: 22px 24px; text-align: center; font-size: 12px; line-height: 1.7; margin-top: 20px; }
footer.pie .pie-marcas { display: flex; justify-content: center; align-items: center; gap: 18px; margin-bottom: 10px; }
footer.pie img { height: 28px; width: auto; display: block; opacity: .95; }
footer.pie a:hover img { opacity: 1; }
footer.pie .separa { width: 1px; height: 24px; background: rgba(255,255,255,.3); }
footer.pie a { color: #FBD3B6; }
body { min-height: 100vh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; width: 100%; }
/* Ingreso, primer administrador y activación */
form.tarjeta[method=post]:has(> h1:first-child) { border-top: 4px solid var(--naranja); padding: 28px 30px; }
header .marca a { display: block; }

/* Acabado: títulos con acento de marca, tablas dentro de tarjetas, etiquetas y avisos más sobrios */
main > h1:first-child, main > div > h1:first-child { position: relative; padding-left: 14px; }
main > h1:first-child::before, main > div > h1:first-child::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 4px; border-radius: 2px; background: var(--naranja); }
.tarjeta > h2:first-child, .tarjeta > h2[style] { font-size: 16px; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--borde); }
.tarjeta table th:first-child { border-top-left-radius: 8px; }
.tarjeta table th:last-child { border-top-right-radius: 8px; }
th, td { padding: 9px 10px; }
.etiqueta { font-weight: 500; letter-spacing: .01em; }
.aviso { background: #E8F5EE; color: #1d6b45; border: 1px solid #BFE3CD; border-radius: 8px; }
.alerta { border: 1px solid #F3D9A4; border-radius: 8px; }
.cifra { font-size: 30px; }
.muted a, .sub a { color: var(--azul); font-weight: 500; }
a:hover { color: var(--naranja-2); }
details.menu > div { border-radius: 10px; overflow: hidden; }
details.menu > div a { padding: 8px 16px; }
.columna h3 { color: var(--marino); font-family: 'Space Grotesk', 'Inter', sans-serif; }
.ficha:hover { box-shadow: 0 8px 18px rgba(10,26,48,.12); transform: translateY(-1px); transition: box-shadow .15s, transform .15s; }
