:root {
  --tinta: #18233A;
  --tinta-2: #2E3A50;
  --pizarra: #4B5568;
  --linea: #E1E6ED;
  --fondo: #F4F6F9;
  --ambar: #FFC53D;
  --ok: #1F8A4C; --ok-bg: #E6F5EC;
  --yo: #B7800B; --yo-bg: #FFF4D6;
  --red: #C23B3B; --red-bg: #FDECEC;
  --gr: #7A879B; --gr-bg: #F1F3F6;
  --ia: #2F6FDB; --ia-bg: #E8F0FE;
}
/* Atlas mantiene el diseño de la plataforma con identidad propia en grafito. */
body.espacio-atlas { --tinta: #23262D; --tinta-2: #3C414A; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-optical-sizing: auto; color: var(--tinta); background: var(--fondo);
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--tinta); }
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; }
input, select, textarea, button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--tinta); outline-offset: 2px; border-radius: 6px; }

/* Estructura */
.app { display: flex; min-height: 100vh; }
.lateral { flex: 0 0 236px; background: var(--tinta); color: #fff; display: flex; flex-direction: column; gap: 4px;
  padding: 20px 14px; position: sticky; top: 0; height: 100vh; }
.marca { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; color: #fff; text-decoration: none; }
.marca span { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: #C5CDDA; text-decoration: none; font-size: 15px; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.activa { background: rgba(255,255,255,.12); color: #fff; font-weight: 700; }
.nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.nav .num { margin-left: auto; padding: 0 8px; border-radius: 999px; background: var(--ambar); color: var(--tinta); font-size: 12.5px; font-weight: 800; }
.usuario { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px; border-top: 1px solid rgba(255,255,255,.14); color: #fff; text-decoration: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ambar); color: var(--tinta); display: inline-flex;
  align-items: center; justify-content: center; font-weight: 800; font-size: 14.5px; flex: 0 0 auto; }
.usuario small { display: block; color: #C5CDDA; font-size: 12.5px; }
.contenido { flex: 1 1 auto; min-width: 0; padding: 24px 32px 48px; display: flex; flex-direction: column; gap: 18px; max-width: 1840px; margin: 0 auto; width: 100%; box-sizing: border-box; }

/* Componentes */
.tarjeta { background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.tarjeta.ia { background: #FAFCFF; border-color: #C9DAF8; }
.tarjeta.red { background: #FFF9F9; border-color: #F2CACA; }
.cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cab h2 { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.cuenta { padding: 1px 9px; border-radius: 999px; font-size: 13.5px; font-weight: 800; }
.muted { color: var(--pizarra); font-size: 13.5px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.chip .punto { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.ok { color: var(--ok); } .chip.ok, .cuenta.ok { background: var(--ok-bg); color: var(--ok); }
.yo { color: var(--yo); } .chip.yo, .cuenta.yo { background: var(--yo-bg); color: var(--yo); }
.red { color: var(--red); } .chip.red, .cuenta.red { background: var(--red-bg); color: var(--red); }
.gr, .wait { color: var(--gr); } .chip.gr, .chip.wait, .cuenta.gr, .cuenta.wait { background: var(--gr-bg); color: var(--gr); }
.ia { color: var(--ia); } .chip.ia, .cuenta.ia { background: var(--ia-bg); color: var(--ia); }
.punto-grande { width: 10px; height: 10px; border-radius: 50%; background: currentColor; display: inline-block; flex: 0 0 auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 8px;
  border: 1.5px solid #C2CAD6; background: #fff; color: var(--tinta); font-size: 14.5px; font-weight: 600; cursor: pointer;
  text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--tinta); }
.btn.pri { background: var(--tinta); color: #fff; border-color: var(--tinta); }
.btn.verde { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.ambar { background: var(--ambar); color: var(--tinta); border-color: var(--ambar); }
.btn.peligro { color: var(--red); border-color: #E7B4B4; }
.btn:disabled, .btn.off { background: #F1F3F6; color: #9AA4B5; border-color: var(--linea); cursor: not-allowed; }
.btn.enlace { border: 0; background: none; padding: 0; height: auto; text-decoration: underline; text-underline-offset: 3px; }

.fila { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid #EEF1F5; }
.fila:first-of-type { border-top: 0; }
.fila .principal { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fila .principal strong { font-size: 15px; }
.fila .acciones { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ref { padding: 1px 7px; border-radius: 5px; background: var(--gr-bg); font-size: 12.5px; font-weight: 700; color: var(--tinta); text-decoration: none; }

.rejilla { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.columna { display: flex; flex-direction: column; gap: 18px; }
.contadores { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.contador { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid var(--linea); border-radius: 12px; text-decoration: none; }
.contador b { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.contador span { font-size: 14.5px; font-weight: 600; line-height: 1.25; }

.barra { display: inline-block; width: 110px; height: 6px; border-radius: 3px; background: #E6EAF0; overflow: hidden; vertical-align: middle; }
.barra i { display: block; height: 100%; background: var(--gr); }

/* Formularios */
label.campo { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; font-weight: 600; }
.entrada, select.entrada, textarea.entrada { height: 38px; padding: 0 10px; border: 1.5px solid #7A879B; border-radius: 8px; background: #fff; font-size: 14.5px; font-weight: 400; }
textarea.entrada { height: auto; min-height: 90px; padding: 8px 10px; line-height: 1.45; }
.formulario { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.formulario .ancho { flex: 1 1 260px; }
.pin { width: 110px; letter-spacing: .25em; }

/* Ficha */
.migas { font-size: 14.5px; color: var(--pizarra); }
.migas a { color: var(--pizarra); }
.cabecera-exp { background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; }
.cabecera-exp h1 { font-size: 28px; font-weight: 800; }
.datos-cab { display: grid; grid-template-columns: repeat(4, auto); gap: 4px 28px; font-size: 13.5px; }
.datos-cab span { color: var(--pizarra); }
.datos-cab b { font-size: 16px; }
.carril { display: flex; gap: 8px; }
.carril a { flex: 1 1 0; display: flex; flex-direction: column; gap: 6px; text-decoration: none; font-size: 13.5px; color: var(--pizarra); }
.carril a i { height: 6px; border-radius: 3px; background: #D6DCE5; }
.carril a.ok i { background: var(--ok); } .carril a.yo i { background: var(--yo); } .carril a.red i { background: var(--red); }
.carril a.ia i { background: var(--ia); } .carril a.wait i { background: #AEB8C6; }
.carril a.actual { color: var(--tinta); font-weight: 700; }
.pestanas { display: flex; gap: 24px; border-bottom: 1px solid #D6DCE5; flex-wrap: wrap; }
.pestanas a { padding: 10px 2px; text-decoration: none; color: var(--pizarra); border-bottom: 2.5px solid transparent; font-size: 15px; }
.pestanas a.activa { color: var(--tinta); font-weight: 700; border-bottom-color: var(--tinta); }
.leyenda { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

details.caja { background: #fff; border: 1px solid var(--linea); border-radius: 12px; }
details.caja > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
details.caja > summary::-webkit-details-marker { display: none; }
details.caja .numero { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex: 0 0 auto; }
details.caja.ok .numero { background: var(--ok-bg); color: var(--ok); } details.caja.yo .numero { background: var(--yo-bg); color: var(--yo); }
details.caja.red .numero { background: var(--red-bg); color: var(--red); } details.caja.ia .numero { background: var(--ia-bg); color: var(--ia); }
details.caja.gr .numero, details.caja.wait .numero { background: var(--gr-bg); color: var(--gr); }
details.caja .tit { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
details.caja .tit b { font-size: 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
details.caja .meta { font-size: 13.5px; color: var(--pizarra); text-align: right; flex: 0 0 auto; }
details.caja .flecha { transition: transform .2s; flex: 0 0 auto; }
details.caja[open] .flecha { transform: rotate(180deg); }
details.caja[open] { border-width: 1.5px; }
details.caja.yo[open] { border-color: #E0A419; background: #FFFCF3; }
details.caja.red[open] { border-color: #E7B4B4; }
details.caja.ia[open] { border-color: #A9C3F2; }
.cuerpo-caja { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.seccion { background: #fff; border: 1px solid var(--linea); border-radius: 10px; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.seccion h3 { font-size: 15px; display: flex; align-items: center; gap: 10px; }

table.tabla { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tabla th { text-align: left; font-weight: 600; color: var(--pizarra); padding: 6px 8px; border-bottom: 1px solid #D6DCE5; }
.tabla td { padding: 8px; border-bottom: 1px solid #EEF1F5; vertical-align: top; }
.tabla tr.ia td { background: #F6F9FF; }
.scroll { overflow-x: auto; }
.dato-ia { background: var(--ia-bg); outline: 1px dashed var(--ia); padding: 0 3px; border-radius: 3px; }

/* Avisos flotantes: visibles estés donde estés de la página (también al volver a una sección concreta) */
.mensajes { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 1000; width: min(640px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.mensaje { padding: 10px 40px 10px 14px; border-radius: 10px; font-size: 14.5px; position: relative; pointer-events: auto;
  box-shadow: 0 10px 30px -12px rgba(16, 24, 40, .35); transition: opacity .3s ease, transform .3s ease; }
.mensaje .cerrar-mensaje { position: absolute; top: 6px; right: 8px; border: 0; background: transparent; font-size: 20px;
  line-height: 1; color: inherit; cursor: pointer; padding: 2px 6px; opacity: .7; }
.mensaje .cerrar-mensaje:hover { opacity: 1; }
.mensaje.oculto { opacity: 0; transform: translateY(-8px); }
.mensaje.success { background: var(--ok-bg); color: #145C33; } .mensaje.error { background: var(--red-bg); color: #8A1C1C; }
.mensaje.info, .mensaje.warning { background: var(--yo-bg); color: #6B4A00; }

/* Tablero */
.tablero { display: grid; grid-template-columns: repeat(7, minmax(190px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.columna-t { background: #EBEEF3; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 200px; }
.columna-t h3 { font-size: 14.5px; padding: 4px 4px 6px; display: flex; justify-content: space-between; }
.tarjeta-exp { background: #fff; border: 1px solid var(--linea); border-radius: 10px; padding: 10px 12px; text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.tarjeta-exp:hover { border-color: var(--tinta); }
.tarjeta-exp b { font-size: 14.5px; }
.embudo .paso { display: grid; grid-template-columns: 200px 1fr 50px; gap: 12px; align-items: center; padding: 6px 0; }
.cifras-web { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cifras-web div { background: var(--fondo, #F4F6F9); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.cifras-web b { font-size: 26px; } .cifras-web span { font-size: 13.5px; color: var(--muted, #5B6475); }
.grafico-dias { display: flex; align-items: flex-end; gap: 2px; height: 110px; padding: 6px 0; border-bottom: 1px solid rgba(0,0,0,.08); }
.grafico-dias i { flex: 1 1 0; min-height: 2px; background: var(--tinta); border-radius: 3px 3px 0 0; opacity: .85; }
.dos-col-web { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.embudo i { display: block; height: 22px; border-radius: 6px; background: var(--tinta); min-width: 2px; }

.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login .tarjeta { width: 380px; }

@media (max-width: 1100px) { .rejilla { grid-template-columns: 1fr; } .datos-cab { grid-template-columns: repeat(2, auto); } }
@media (max-width: 800px) { .contenido { padding: 16px; } }

/* Las cajas y el carril usan el color solo en su indicador, no en todo el texto */
details.caja.ok, details.caja.yo, details.caja.red, details.caja.gr, details.caja.wait, details.caja.ia { color: var(--tinta); }
.carril a.ok, .carril a.yo, .carril a.red, .carril a.gr, .carril a.wait, .carril a.ia { color: var(--pizarra); }
.carril a.actual { color: var(--tinta); }

/* Interruptores */
.interruptor { position: relative; display: inline-flex; flex: 0 0 auto; width: 44px; height: 24px; }
.interruptor input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.interruptor span { width: 44px; height: 24px; border-radius: 999px; background: #C2CAD6; position: relative; transition: background .15s; }
.interruptor span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.interruptor input:checked + span { background: var(--ok); }
.interruptor input:checked + span::after { left: 23px; }
.interruptor input:focus-visible + span { outline: 3px solid var(--tinta); outline-offset: 2px; }

.contador b { white-space: nowrap; }

/* Menú lateral: estructura, pie y modo minimizado */
.lateral { overflow-y: auto; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { position: relative; }
.pie-lateral { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 10px; }
.plegar { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 0; border-radius: 8px; background: none; color: #C5CDDA; font-size: 14.5px; cursor: pointer; text-align: left; }
.plegar:hover { background: rgba(255,255,255,.06); color: #fff; }
.plegar svg, .salir svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.plegar .ico-max, .salir .solo-mini { display: none; }
.usuario { margin-top: 0; }
.salir { padding: 0 8px; }
.salir .btn { color: #C5CDDA; }
.volver { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,.06); color: #fff; text-decoration: none; font-size: 14.5px; font-weight: 600; }
.volver:hover { background: rgba(255,255,255,.12); }
.volver svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.exp-lateral { display: flex; flex-direction: column; gap: 2px; padding: 14px 12px 10px; margin-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.14); color: #fff; }
.exp-lateral b { font-size: 16px; line-height: 1.25; }
.exp-lateral small { color: #C5CDDA; font-size: 13.5px; }

.menu-mini .lateral { flex-basis: 76px; padding: 20px 10px; }
.menu-mini .lateral .txt, .menu-mini .exp-lateral { display: none; }
.menu-mini .marca { justify-content: center; padding: 4px 0 18px; }
.menu-mini .nav { gap: 10px; }
.menu-mini .nav a, .menu-mini .volver, .menu-mini .plegar { justify-content: center; padding: 12px 0; }
.menu-mini .nav svg, .menu-mini .volver svg, .menu-mini .plegar svg, .menu-mini .salir svg { width: 23px; height: 23px; }
.menu-mini .volver { margin-bottom: 12px; }
.menu-mini .nav .num { position: absolute; top: 3px; right: 6px; margin: 0; min-width: 18px; height: 18px; padding: 0 5px; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; }
.menu-mini .plegar .ico-min { display: none; }
.menu-mini .plegar .ico-max { display: block; }
.menu-mini .usuario { justify-content: center; padding: 12px 0; }
.menu-mini .salir { padding: 0; display: flex; justify-content: center; }
.menu-mini .salir .solo-mini { display: block; }

/* Fichas de los pasos y caja del paso elegido */
.fichas { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.ficha { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--linea); box-shadow: inset 0 4px 0 #D6DCE5; text-decoration: none; color: var(--tinta); }
.ficha:hover { border-color: var(--tinta); }
.ficha.elegida { border: 2px solid var(--tinta); padding: 9px 11px; }
.ficha-tit { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ficha-num { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 800; background: var(--gr-bg); color: var(--gr); }
.ficha-nombre { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ficha.elegida .ficha-nombre { font-weight: 800; }
.ficha-estado { font-size: 12.5px; font-weight: 700; color: var(--gr); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ficha.ok { box-shadow: inset 0 4px 0 var(--ok); } .ficha.ok .ficha-num { background: var(--ok-bg); color: var(--ok); } .ficha.ok .ficha-estado { color: var(--ok); }
.ficha.yo { box-shadow: inset 0 4px 0 var(--yo); } .ficha.yo .ficha-num { background: var(--yo-bg); color: var(--yo); } .ficha.yo .ficha-estado { color: var(--yo); }
.ficha.red { box-shadow: inset 0 4px 0 var(--red); } .ficha.red .ficha-num { background: var(--red-bg); color: var(--red); } .ficha.red .ficha-estado { color: var(--red); }
.ficha.ia { box-shadow: inset 0 4px 0 var(--ia); } .ficha.ia .ficha-num { background: var(--ia-bg); color: var(--ia); } .ficha.ia .ficha-estado { color: var(--ia); }
.ficha.wait { box-shadow: inset 0 4px 0 #AEB8C6; }
.caja-paso { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px; background: #fff; border: 1.5px solid var(--linea); border-radius: 12px; }
.caja-paso.yo { background: #FFFCF3; border-color: #E0A419; }
.caja-paso.red { border-color: #E7B4B4; }
.caja-paso.ia { border-color: #A9C3F2; background: #FAFCFF; }
.caja-paso.ok { border-color: #B9DFC8; }
.tarjeta-exp .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* Siempre en una sola fila: en pantallas estrechas se desliza en horizontal en vez de partirse */
@media (max-width: 1100px) { .fichas { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; } .ficha { scroll-snap-align: start; } }

/* Tareas */
.tarea { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid #EEF1F5; }
.tarea:first-of-type { border-top: 0; }
.tarea-cab { display: flex; align-items: flex-start; gap: 12px; }
.tarea-cab .principal { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.estado-tarea { height: 32px; font-size: 13.5px; font-weight: 700; border-width: 1.5px; flex: 0 0 auto; }
.estado-tarea.gr { background: var(--gr-bg); color: #4B5568; border-color: #C2CAD6; }
.estado-tarea.yo { background: var(--yo-bg); color: #6B4A00; border-color: #E0A419; }
.estado-tarea.ok { background: var(--ok-bg); color: #145C33; border-color: #8CCBA5; }
.comentarios { padding-left: 4px; }
.comentarios > summary { list-style: none; cursor: pointer; font-size: 13.5px; }
.comentarios > summary::-webkit-details-marker { display: none; }
.comentario { margin: 8px 0 0; padding: 8px 12px; border-radius: 8px; background: #F7F8FA; font-size: 14.5px; }
.comentario p { margin: 4px 0 0; }
.caja-paso.ok, .caja-paso.yo, .caja-paso.red, .caja-paso.gr, .caja-paso.wait, .caja-paso.ia { color: var(--tinta); }
.chip .punto { flex: 0 0 8px; }
.tablero { grid-template-columns: repeat(7, minmax(210px, 1fr)); }
.tarjeta-exp .chip { font-size: 12.5px; padding: 3px 9px; gap: 5px; align-self: flex-start; }

/* Hoy rediseñado */
.cab-hoy { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.saludo { font-size: 28px; font-weight: 800; }
.acciones-hoy { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.buscador { display: flex; align-items: center; gap: 8px; width: 340px; max-width: 100%; height: 40px; padding: 0 12px; border: 1.5px solid #C2CAD6; border-radius: 10px; background: #fff; }
.buscador svg { width: 16px; height: 16px; fill: none; stroke: var(--pizarra); stroke-width: 2; stroke-linecap: round; flex: 0 0 auto; }
.buscador input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: none; font-size: 14.5px; }
.rejilla-hoy { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tarjeta.sin-relleno { padding: 0; gap: 0; overflow: hidden; }
.cab-lista { display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 14px; }
.cab-bloque { padding: 16px 18px 10px; }
.filtros { display: flex; gap: 8px; flex-wrap: wrap; }
.filtro { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--linea); background: #fff; font-size: 13.5px; font-weight: 600; text-decoration: none; color: var(--tinta); white-space: nowrap; }
.filtro.activo { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.filtro .n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 12.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; background: var(--gr-bg); color: var(--pizarra); }
.filtro .n-nuevas, .filtro .n-acciones, .filtro .n-duplicados { background: var(--yo-bg); color: var(--yo); }
.filtro .n-ia { background: var(--ia-bg); color: var(--ia); }
.filtro .n-vencidos { background: var(--red-bg); color: var(--red); }
.filtro.activo .n { background: rgba(255,255,255,.18); color: #fff; }
.fila-hoy { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 18px; border-top: 1px solid #EEF1F5; }
.etiqueta-tipo { justify-self: start; padding: 3px 9px; border-radius: 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; }
.etiqueta-tipo.yo { background: var(--yo-bg); color: var(--yo); } .etiqueta-tipo.red { background: var(--red-bg); color: var(--red); }
.etiqueta-tipo.ia { background: var(--ia-bg); color: var(--ia); }
.texto-fila { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.texto-fila .nombre { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.texto-fila .desc { font-size: 13.5px; color: var(--tinta-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-texto { font-size: 12.5px; font-weight: 600; color: var(--pizarra); }
.vacio { margin: 0; padding: 18px; border-top: 1px solid #EEF1F5; }
.fila-espera { display: grid; grid-template-columns: minmax(0, 1fr) 150px; align-items: center; gap: 16px; padding: 12px 18px; border-top: 1px solid #EEF1F5; text-decoration: none; color: var(--tinta); }
.fila-espera:hover { background: #FAFBFC; }
.fila-espera .nombre { font-size: 14.5px; }
.avance { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; min-width: 0; }
.avance span:first-child { font-size: 12.5px; font-weight: 700; color: var(--pizarra); white-space: nowrap; }
.avance .barra { width: 150px; max-width: 100%; }
.avance .barra i { background: #9AA6B8; }
.grupo-agenda { font-size: 12.5px; font-weight: 800; color: var(--pizarra); padding-top: 4px; }
.fila-agenda { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid #EEF1F5; text-decoration: none; color: var(--tinta); min-width: 0; }
.fila-agenda:hover .nombre { text-decoration: underline; }
.fecha-agenda { flex: 0 0 46px; text-align: center; padding: 5px 0; border-radius: 8px; font-size: 12.5px; font-weight: 800; line-height: 1.2; background: var(--gr-bg); color: var(--gr); }
.fecha-agenda.yo { background: var(--yo-bg); color: var(--yo); } .fecha-agenda.red { background: var(--red-bg); color: var(--red); }
.tipo-agenda { font-size: 12.5px; font-weight: 800; letter-spacing: .04em; color: var(--pizarra); }
.fila-agenda .nombre { font-size: 14.5px; white-space: normal; }
.enlace-sutil { font-size: 13.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; color: var(--tinta); white-space: nowrap; }
.fila-cobro { flex-direction: row; justify-content: space-between; align-items: center; }
.importe { font-size: 22px; font-weight: 800; white-space: nowrap; }
.aviso-tecnico { flex-direction: row; align-items: center; gap: 10px; padding: 14px 18px; text-decoration: none; color: var(--tinta-2); font-size: 13.5px; }
.aviso-tecnico span:nth-child(2) { flex: 1 1 auto; min-width: 0; }
@media (max-width: 1100px) { .rejilla-hoy { grid-template-columns: 1fr; } .fila-hoy { grid-template-columns: minmax(0, 1fr) auto; } .fila-hoy .etiqueta-tipo { grid-column: 1 / -1; } }

/* Botón de plegar arriba, bajo el logo */
.lateral > .plegar { margin: -8px 0 10px; }
.menu-mini .lateral > .plegar { margin: -8px 0 8px; }
.menu-mini .nav { gap: 6px; }
.menu-mini .nav a, .menu-mini .volver { padding: 11px 0; }
.menu-mini .marca { padding-bottom: 14px; }

/* Contador de tareas del menú: pastilla redonda, sin deformarse */
.nav .num { margin-left: auto; flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 800; background: var(--ambar); color: var(--tinta); }
.menu-mini .nav .num { position: absolute; top: 2px; right: 8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; font-size: 12.5px;
  box-shadow: 0 0 0 2px var(--tinta); }

/* Estado de las tareas: el desplegable no se encoge */
.tarea-cab > form { flex: 0 0 auto; }
.estado-tarea { min-width: 128px; padding-right: 26px; }

/* Ningún texto sale de su caja */
.contenido, .columna, .tarjeta, .seccion, .caja-paso, .fila .principal, .cabecera-exp > div { min-width: 0; }
.tarjeta, .seccion, .caja-paso, .mensaje, .fila .principal, .comentario, .tabla td { overflow-wrap: break-word; }
/* En una tabla, «anywhere» deja que cada columna se encoja a una sola letra: se usa «break-word» */
table th, table td { overflow-wrap: break-word; word-break: normal; } table th { white-space: nowrap; }
.tabla-historial td:nth-child(1), .tabla-historial td:nth-child(2) { white-space: nowrap; }
.tabla-historial td:nth-child(3) { min-width: 180px; } .tabla-historial td:nth-child(4) { min-width: 260px; }
.btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.contador { min-width: 0; } .contador span { min-width: 0; overflow-wrap: anywhere; }
.datos-cab { min-width: 0; } .datos-cab b, .datos-cab span { overflow-wrap: anywhere; }
.exp-lateral b, .exp-lateral small { overflow-wrap: anywhere; }
.usuario .txt { min-width: 0; overflow-wrap: anywhere; }
/* Filas con muchas acciones: las acciones bajan de línea si no caben */
.fila { flex-wrap: wrap; }
.fila .principal { flex: 1 1 260px; }
.fila .acciones { min-width: 0; flex-wrap: wrap; }
.fila .acciones form { flex-wrap: wrap; }
.fila .acciones { flex: 0 1 auto; max-width: 100%; }

/* Correo sin asignar */
.correo-sin { border-top: 1px solid #EEF1F5; padding: 10px 0; }
.correo-sin:first-of-type { border-top: 0; }
.correo-sin > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.correo-sin > summary::-webkit-details-marker { display: none; }
.correo-sin[open] { display: flex; flex-direction: column; gap: 10px; }

/* Deshacer: enlace discreto junto al dato registrado */
form.deshacer { display: inline; margin: 0; }
form.deshacer button { background: none; border: 0; padding: 0 2px; font: inherit; font-size: 12.5px; font-weight: 500; color: #7A879B; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
form.deshacer button:hover { color: #C23B3B; }

/* Revisión automática y comprobaciones de firma */
.revision { border: 1px solid #F3D9A4; background: #FFFBEF; border-radius: 10px; padding: 10px 14px; font-size: 14.5px; }
.revision ul, ul.comprobaciones { margin: 6px 0 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.revision li, ul.comprobaciones li { padding-left: 20px; position: relative; }
.revision li::before, ul.comprobaciones li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: #C9A227; }
.revision li.red::before, ul.comprobaciones li.red::before { background: #C23B3B; }
ul.comprobaciones li.ok::before { background: #2E8B57; }
ol.pasos-firma { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
ol.pasos-firma li { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
label.casilla { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; }

/* Acciones en bloque */
.barra-bloque { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: 10px; border-radius: 12px; background: var(--tinta, #18233A); color: #fff; }
.barra-bloque .entrada { height: 38px; min-width: 0; }
.barra-bloque #n-sel { font-weight: 700; margin-right: 6px; }
.tabla .col-sel { width: 34px; text-align: center; }
.respuestas-rapidas { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
details.nueva-llamada { margin: 4px 0 6px; }

/* Editor de plantillas */
.editor-plantilla { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 16px; align-items: start; }
@media (max-width: 980px) { .editor-plantilla { grid-template-columns: minmax(0, 1fr); } }
.entrada.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; line-height: 1.55; }
.campos-plantilla { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-campo { border: 1px solid #C9D2DE; background: #EEF1F5; color: #18233A; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.chip-campo:hover { border-color: #18233A; }
details.fila-detalle { border-top: 1px solid #EEF1F5; padding: 10px 0; }
details.fila-detalle > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
details.fila-detalle > summary::-webkit-details-marker { display: none; }
details.fila-detalle[open] { display: flex; flex-direction: column; gap: 10px; }

/* Filtros en chips */
.filtros-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-filtro { padding: 6px 12px; border-radius: 999px; border: 1px solid #D5DCE5; background: #fff; color: #18233A; font-size: 13.5px; font-weight: 600; text-decoration: none; }
.chip-filtro.activo { background: #18233A; border-color: #18233A; color: #fff; }

/* Ajustes de la revisión visual */
.linea-dato { margin: 0; font-size: 15px; line-height: 1.5; }
.seccion > h3 { flex-wrap: wrap; row-gap: 6px; }
input[type="file"] { max-width: 100%; min-width: 0; }
ol.pasos-firma { list-style: none; padding-left: 0; counter-reset: paso; }
ol.pasos-firma > li { counter-increment: paso; position: relative; padding-left: 34px; }
ol.pasos-firma > li::before { content: counter(paso); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; background: #EEF1F5; color: #18233A; font-size: 13.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
ol.pasos-firma > li > * { max-width: 100%; }
.barra-bloque .entrada { color: #18233A; background: #fff; }

/* Aviso de plantillas compartidas */
.aviso-plantillas { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: #FFF6DB; border: 1px solid #F3D78A; color: #3D3420; font-size: 14.5px; line-height: 1.5; }
.aviso-plantillas svg { flex: 0 0 22px; width: 22px; height: 22px; fill: none; stroke: #B07D00; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.aviso-plantillas b { color: #18233A; }
details.vista-diseno { margin: 2px 0; }
ul.comprobaciones li { display: flex; justify-content: space-between; gap: 10px; }
ul.comprobaciones li.ok { color: #1F6B3E; } ul.comprobaciones li.red { color: #A12F2F; }
ul.comprobaciones .resultado { font-weight: 700; flex: 0 0 auto; }

/* Trámite firmado: ilustración en lugar de textos */
.firmado { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 14px; background: #F4FAF6; border: 1px solid #CFE8D9; }
.firmado-ilu { width: 84px; height: 84px; flex: 0 0 84px; }
.firmado-texto { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.firmado-texto b { font-size: 16px; color: #18233A; }
.firmado-texto a { font-size: 14.5px; }
ul.fallos { margin: 0; padding: 10px 14px 10px 32px; border-radius: 10px; background: #FDECEC; border: 1px solid #F3C4C4; color: #A12F2F; font-size: 14.5px; font-weight: 600; display: flex; flex-direction: column; gap: 4px; }
.ficha.bloqueada { opacity: .55; cursor: not-allowed; pointer-events: none; }
.ficha.bloqueada .ficha-estado::before { content: "🔒 "; }

/* Cabecera del expediente: cliente y parte contraria */
.cab-cliente { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 28px; align-items: center; flex: 1 1 520px; min-width: 0; }
.parte-contraria { display: flex; flex-direction: column; gap: 2px; padding-left: 20px; border-left: 1px solid #E1E6ED; font-size: 14.5px; min-width: 0; }
@media (max-width: 700px) { .cab-cliente { grid-template-columns: minmax(0, 1fr); } .parte-contraria { padding-left: 0; border-left: 0; } }
/* Pestaña Cliente: datos y cotitulares en dos columnas */
.cliente-columnas { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 980px) { .cliente-columnas { grid-template-columns: minmax(0, 1fr); } }
.pasos-portal { display: flex; flex-direction: column; gap: 4px; }
.fila-paso { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 118px; gap: 10px; align-items: center; font-size: 14.5px; padding: 3px 0; border-bottom: 1px solid #F0F2F5; }
.fila-paso .num { color: var(--tinta-2); font-weight: 700; text-align: right; }
@media (max-width: 600px) { .fila-paso { grid-template-columns: 22px minmax(0, 1fr) auto; } .fila-paso select { grid-column: 2 / -1; } }
.aviso-manual { background: #FFF6E6; border: 1px solid #F0C27A; }
.aviso-manual h3 { color: #8A4B00; }
details.usuario-fila { border-bottom: 1px solid var(--linea); padding: 8px 0; }
details.usuario-fila summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
details.usuario-fila summary::-webkit-details-marker { display: none; }
details.usuario-fila summary .principal { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
details.usuario-fila form { margin-top: 10px; }
.nota-firma { margin: 4px 0 0; padding: 8px 12px; border-radius: 8px; background: #EEF3F9; border: 1px solid #D5E0EE; color: #3E5675; font-size: 13.5px; line-height: 1.45; max-width: 640px; }
ul.notas-modelo { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; line-height: 1.5; }
.alerta-firma { display: flex; gap: 14px; align-items: flex-start; margin: 4px 0 0; padding: 14px 16px; border-radius: 12px; background: #FFF1DE; border: 1px solid #F3C27E; border-left: 6px solid #E8870E; color: #5C2E00; }
.alerta-firma.fuerte { background: #FFEBD1; }
.alerta-firma .alerta-icono { flex: 0 0 auto; margin-top: 2px; }
.alerta-firma .alerta-texto { display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; line-height: 1.5; }
.alerta-firma .alerta-texto b { font-size: 16px; color: #4A2400; }
.alerta-firma .alerta-texto p { margin: 0; }
.alerta-firma ul { margin: 0; padding-left: 18px; }
.alerta-firma a { color: #7A3E00; font-weight: 700; }
/* Paso 8 · Juicio verbal */
.ruta-juicio { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 4px; }
.ruta-juicio li a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 999px; border: 1px solid var(--linea); background: #fff; font-size: 13.5px; text-decoration: none; color: var(--tinta-2); }
.ruta-juicio li:not(:last-child)::after { content: "›"; margin-left: 4px; color: #A7B0BE; font-weight: 700; }
.ruta-juicio .punto { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 800; background: #EEF1F5; color: var(--tinta-2); }
.ruta-juicio li.ok a { border-color: #BFE3CC; } .ruta-juicio li.ok .punto { background: var(--ok, #1E8A4C); color: #fff; }
.ruta-juicio li.actual a { border-color: #F2C14E; background: #FFF8E1; color: var(--tinta); font-weight: 700; } .ruta-juicio li.actual .punto { background: #FFC53D; color: var(--tinta); }
.ruta-juicio li.omitida a { opacity: .5; text-decoration: line-through; }
.tabla-plazos { display: flex; flex-direction: column; border: 1px solid var(--linea); border-radius: 10px; overflow: hidden; }
.tabla-plazos .fila { display: grid; grid-template-columns: minmax(0, 1fr) 96px 110px; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid #F0F2F5; font-size: 14.5px; }
.tabla-plazos .fila:last-child { border-bottom: 0; }
.tabla-plazos .fila small { display: block; color: var(--tinta-2); font-size: 12.5px; }
.tabla-plazos .fila.vencido { background: #FDECEC; } .tabla-plazos .fila.cerca { background: #FFF8E1; }
.seccion.etapa.omitida { opacity: .6; }
@media (max-width: 600px) { .tabla-plazos .fila { grid-template-columns: 1fr auto; } .tabla-plazos .fila span:nth-child(2) { display: none; } }

/* Expediente cerrado: todo bloqueado salvo reabrir */
.aviso-cerrado { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #EEF1F5; border: 1px solid #D6DCE5; font-size: 14.5px; }
.expediente-cerrado form:not(.permitido) button, .expediente-cerrado form:not(.permitido) input, .expediente-cerrado form:not(.permitido) select,
.expediente-cerrado form:not(.permitido) textarea { pointer-events: none; opacity: .5; }
/* Cantidades adeudadas */
.tabla-liquidacion { display: flex; flex-direction: column; border: 1px solid var(--linea); border-radius: 10px; overflow: hidden; }
.tabla-liquidacion .fila { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 14px; border-bottom: 1px solid #F0F2F5; font-size: 14.5px; flex-wrap: wrap; }
.tabla-liquidacion .fila:last-child { border-bottom: 0; }
.tabla-liquidacion .fila.sub { padding-left: 30px; color: var(--tinta-2); font-size: 13.5px; }
.tabla-liquidacion .fila.destacada { background: #F7F9FC; }
.tabla-liquidacion .fila.destacada b { font-size: 16px; }

.despacho-form input, .despacho-form textarea, .despacho-form select { font: inherit; padding: 7px 10px; border: 1px solid var(--linea); border-radius: 8px; }
.despacho-form textarea { width: 100%; }
.despacho-form .error { color: #A42222; font-size: 12.5px; }

.resultado-ia { padding: 10px 12px; border-radius: 10px; background: #FFFBEA; border: 1px solid #F3E0A1; font-size: 14.5px; }

/* IA por pestaña */
.ia-barra { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: 10px; background: #F6F3FF; border: 1px solid #E2DAFB; font-size: 14.5px; }
.ia-barra .ia-texto { flex: 1 1 300px; color: var(--tinta-2); }
.ia-barra form { margin: 0; }
.ia-pendiente, .entrada.ia-pendiente { background: #FFF2A8 !important; }
.ia-caja { padding: 12px 14px; border-radius: 10px; background: #FFFBEA; border: 1px solid #F3E0A1; font-size: 14.5px; display: flex; flex-direction: column; gap: 6px; }
.ia-caja ul { margin: 0; padding-left: 18px; }

/* Pagos del cliente: columnas que caben, factura en un desplegable y botones apilados */
.tabla-pagos td { vertical-align: top; }
.tabla-pagos td .muted { font-size: 13.5px; margin-top: 2px; }
.tabla-pagos .num { text-align: right; }
.factura-pago summary { cursor: pointer; }
.formulario-factura { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; min-width: 170px; }
.formulario-factura .entrada { height: 32px; }
.acciones-pago { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 140px; }
.acciones-pago form { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.acciones-pago .entrada { height: 32px; flex: 1 1 120px; }

/* Calendario: el texto nunca sale de su casilla; en móvil, solo puntos de color */
.cal-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cal-nav h2 { min-width: 180px; text-align: center; }
.cal-leyenda { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--muted, #5B6475); }
.cal-leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.cal { display: flex; flex-direction: column; border: 1px solid var(--linea, #E3E7EE); border-radius: 12px; overflow: hidden; }
.cal-fila { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cal-cab div { padding: 8px; font-size: 12.5px; font-weight: 700; text-align: center; background: var(--fondo, #F4F6F9); }
.cal-dia { min-width: 0; min-height: 104px; padding: 6px; border-top: 1px solid var(--linea, #E3E7EE); border-left: 1px solid var(--linea, #E3E7EE);
  display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.cal-fila .cal-dia:first-child { border-left: 0; }
.cal-dia.fuera { background: #FAFBFC; color: #A0A8B5; }
.cal-dia.hoy { box-shadow: inset 0 0 0 2px #FFC53D; }
.cal-num { font-size: 12.5px; font-weight: 700; }
.cal-ev { display: flex; align-items: center; gap: 5px; min-width: 0; padding: 2px 5px; border-radius: 6px; font-size: 12.5px; line-height: 1.3;
  text-decoration: none; color: inherit; background: #F1F4F8; }
.cal-ev:hover { background: #E6EBF2; }
.cal-ev.hecho { opacity: .55; }
.cal-ev.vencido { background: #FDECEC; color: #8A1F1F; }
.cal-texto { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-mas { font-size: 12.5px; font-weight: 600; }
.cal-punto { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #8792A4; }
/* El color del tipo va solo en el punto: la entrada mantiene su fondo claro y el texto se lee siempre */
.cal-punto.t-vista { background: #C23B3B; } .cal-punto.t-juicio { background: #D97706; } .cal-punto.t-reclamacion { background: #2563EB; }
.cal-punto.t-cliente { background: #7C3AED; } .cal-punto.t-pago { background: #059669; } .cal-punto.t-tarea { background: #18233A; }
.cal-punto.t-hito { background: #A0A8B5; }
.agenda-dia { display: flex; flex-direction: column; gap: 6px; scroll-margin-top: 80px; }
.agenda-dia h3 { margin: 6px 0 0; font-size: 15px; text-transform: capitalize; }
.agenda-ev { display: grid; grid-template-columns: auto minmax(92px, max-content) minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: 10px; background: #F7F8FA; text-decoration: none; color: inherit; }
.agenda-ev:hover { background: #EEF1F5; }
.agenda-ev.vencido { background: #FDECEC; }
.agenda-ev.hecho { opacity: .7; }
.agenda-hora { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.agenda-cuerpo { display: flex; flex-direction: column; min-width: 0; }
.agenda-cuerpo b { overflow-wrap: anywhere; } .agenda-cuerpo .muted { font-size: 13.5px; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .cal-dia { min-height: 58px; padding: 4px; }
  .cal-ev { padding: 0; background: none; }
  .cal-ev .cal-texto { display: none; }
  .cal-mas { font-size: 12.5px; }
  .agenda-ev { grid-template-columns: auto minmax(0, 1fr); }
  .agenda-ev .agenda-hora { grid-column: 2; } .agenda-ev .agenda-cuerpo { grid-column: 2; } .agenda-ev .chip { grid-column: 2; justify-self: start; }
}

/* Interruptores tipo iPhone para las opciones que se encienden y apagan */
.conmutador { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.conmutador input[type="checkbox"] { -webkit-appearance: none; appearance: none; flex: 0 0 auto; width: 51px; height: 31px; margin: 0;
  border-radius: 31px; background: #E2E5EA; position: relative; cursor: pointer; transition: background .2s ease; }
.conmutador input[type="checkbox"]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #FFFFFF; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); transition: transform .2s ease; }
.conmutador input[type="checkbox"]:checked { background: #34C759; }
.conmutador input[type="checkbox"]:checked::after { transform: translateX(20px); }
.conmutador input[type="checkbox"]:focus-visible { outline: 3px solid #FFC53D; outline-offset: 2px; }
.interruptor-fila { display: flex; align-items: center; gap: 10px; margin: 0; }
/* Secciones desplegables de Datos */
details.plegable > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
details.plegable > summary::-webkit-details-marker { display: none; }
details.plegable > summary h2::before { content: "▸"; display: inline-block; margin-right: 8px; transition: transform .2s ease; color: #8792A4; }
details.plegable[open] > summary h2::before { transform: rotate(90deg); }
details.plegable[open] > summary { margin-bottom: 10px; }
/* Móvil: el menú queda siempre en su versión de iconos, para poder navegar */
@media (max-width: 800px) {
  .lateral { display: flex; flex: 0 0 64px; width: 64px; padding: 14px 6px; position: sticky; top: 0; height: 100vh; }
  .lateral .plegar { display: none; }
  .lateral { flex-basis: 76px; padding: 20px 10px; }
  .lateral .txt, .exp-lateral { display: none; }
  .marca { justify-content: center; padding: 4px 0 18px; }
  .nav { gap: 10px; }
  .nav a, .volver, .plegar { justify-content: center; padding: 12px 0; }
  .nav svg, .volver svg, .plegar svg, .salir svg { width: 23px; height: 23px; }
  .volver { margin-bottom: 12px; }
  .nav .num { position: absolute; top: 3px; right: 6px; margin: 0; min-width: 18px; height: 18px; padding: 0 5px; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; }
  .plegar .ico-min { display: none; }
  .plegar .ico-max { display: block; }
  .usuario { justify-content: center; padding: 12px 0; }
  .salir { padding: 0; display: flex; justify-content: center; }
  .salir .solo-mini { display: block; }
  .lateral > .plegar { margin: -8px 0 8px; }
  .nav { gap: 6px; }
  .nav a, .volver { padding: 11px 0; }
  .marca { padding-bottom: 14px; }
  .nav .num { position: absolute; top: 2px; right: 8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; font-size: 12.5px;
    box-shadow: 0 0 0 2px var(--tinta); }
}
@media (max-width: 760px) {
  .cal-cab div { font-size: 12.5px; padding: 6px 1px; white-space: nowrap; overflow: hidden; text-overflow: clip; }
  .cal-nav { gap: 6px; } .cal-nav h2 { min-width: 0; font-size: 18px; }
}

.revision-final { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 10px; background: #F7F8FA; }
.revision-final form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0; }
/* Interruptores y casillas: el texto corta solo entre palabras (nunca letra a letra) y, en pantallas estrechas,
   cada interruptor ocupa su fila con el texto al lado del botón */
label.casilla { overflow-wrap: normal; word-break: normal; min-width: 0; }
.conmutador { display: flex; flex: 1 1 100%; max-width: 100%; align-items: center; line-height: 1.4; }
.conmutador > span, .conmutador { overflow-wrap: normal; word-break: normal; }
.interruptor-fila { flex-wrap: wrap; }

/* Encargo: hoja de encargo y autorización en dos columnas (en el móvil, una debajo de otra) y la petición al cliente debajo */
.encargo-dividido { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; align-items: start; }
.encargo-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 14px; border: 1px solid var(--linea, #E3E7EE); border-radius: 12px; background: #FCFCFD; }
.encargo-tit { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 18px; }
.num-col { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: #18233A; color: #fff; font-size: 14.5px; }
.envio-encargo { border: 2px dashed var(--linea, #E3E7EE); }
.envio-encargo.listo { border: 2px solid #FFC53D; }
.lista-requisitos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; }
.lista-requisitos .ok { color: #145C33; } .lista-requisitos .falta { color: #8A5A00; }

/* Validación por un abogado */
.validacion-caja { padding: 10px 12px; border-radius: 10px; background: #FFF6DC; line-height: 1.7; }
.validacion-caja form { display: inline; }
fieldset.validadores { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
fieldset.validadores legend { font-size: 13.5px; font-weight: 700; margin-bottom: 4px; padding: 0; }

.formulario.en-fila { flex-wrap: wrap; align-items: center; }
.en-linea { display: inline-block; }

.btn-dorado { background: linear-gradient(180deg,#F5C451,#D9A528); color: #3A2D05; border: 1.5px solid #C6951F; border-radius: 10px; padding: 10px 20px; font: inherit; font-weight: 800; }
.grupo-permisos { padding: 12px; border: 1px solid var(--linea,#E3E7EE); border-radius: 10px; margin-bottom: 10px; }

.ia-botones { display: flex; gap: 8px; flex-wrap: wrap; }
.ia-botones form { margin: 0; }

.festivos-resumen { display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }
.enlaces-ccaa { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 13.5px; }
.enlaces-ccaa a { color: #2F6FAD; }

/* Tarjeta «Pendiente de tu validación» (Hoy) */
.validar-tarjeta { border: 1px solid var(--linea,#E3E7EE); border-radius: 12px; padding: 16px 18px; margin-top: 12px; background: #FBFCFD; display: flex; flex-direction: column; gap: 8px; }
.validar-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.validar-cab .muted { font-size: 12.5px; letter-spacing: .03em; }
.validar-asunto { font-size: 18px; font-weight: 700; color: #18233A; }
.validar-autor { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--linea,#EDF0F4); border-bottom: 1px solid var(--linea,#EDF0F4); }
.validar-autor > div { flex: 1; font-size: 14.5px; }
.validar-ico svg { stroke: #18233A; fill: none; stroke-width: 1.6; }
.validar-acciones { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.validar-acciones form { margin: 0; }
.validar-acciones .btn, .validar-acciones button { width: 100%; justify-content: center; }
.btn.rojo-borde { background: #fff; color: #C0392B; border: 1.5px solid #E6B8B2; }
@media (max-width: 620px) { .validar-acciones { grid-template-columns: 1fr; } }

.tabla-docs td, .tabla-docs th { vertical-align: middle; }
.tabla-docs .col-archivo { max-width: 220px; word-break: break-word; white-space: normal; }
.tabla-docs th { white-space: nowrap; }
.tabla-docs td.muted { white-space: nowrap; }

.bloque-permisos { border: 1px solid var(--linea,#E3E7EE); border-radius: 10px; padding: 10px 12px; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); align-items: center; gap: 8px; }
.bloque-permisos legend { grid-column: 1 / -1; font-weight: 700; font-size: 13.5px; padding: 0 6px; }
.grupo-colaborador-permisos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); align-items: center; gap: 10px; margin: 10px 0; padding: 12px; border: 1px solid var(--linea); border-radius: 12px; }
.grupo-colaborador-permisos > b { grid-column: 1 / -1; }
.grupo-colaborador-opciones { display: contents; }

.nav a.arrastrando { opacity: .5; }
.nav a[data-seccion] { touch-action: pan-y; }

/* ===================== Inicio (Hoy) · rediseño visual (prefijo h-) ===================== */
.h-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.h-fecha { font-size: 12.5px; font-weight: 600; letter-spacing: .03em; color: var(--gr); text-transform: uppercase; }
.h-saludo { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 0; }
.h-estado { display: inline-flex; align-items: center; gap: 7px; background: var(--ok-bg); color: var(--ok); font-weight: 700; font-size: 12.5px; padding: 5px 12px; border-radius: 999px; }
.h-estado .h-punto { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.h-estado.atencion { background: var(--red-bg); color: var(--red); }

.h-barra { display: flex; gap: 12px; margin-bottom: 16px; }
.h-buscar { flex: 1; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--linea); border-radius: 11px; padding: 0 14px; height: 46px; }
.h-buscar svg { width: 18px; height: 18px; stroke: var(--gr); fill: none; stroke-width: 2; flex: 0 0 auto; }
.h-buscar input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 15px; background: transparent; color: var(--tinta); min-width: 0; }
.h-buscar:focus-within { border-color: var(--tinta); }
.h-nuevo { height: 46px; gap: 8px; }
.h-nuevo svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

.h-siguiente { display: flex; align-items: center; gap: 16px; background: var(--tinta); color: #fff; border-radius: 14px; padding: 16px 20px; margin-bottom: 16px; text-decoration: none; }
.h-siguiente:hover { background: var(--tinta-2); }
.h-sig-ico { width: 42px; height: 42px; border-radius: 11px; background: rgba(255,197,61,.18); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.h-sig-ico svg { width: 22px; height: 22px; stroke: var(--ambar); fill: none; stroke-width: 1.9; }
.h-sig-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.h-sig-eslabon { font-size: 12.5px; color: var(--ambar); font-weight: 700; }
.h-sig-tit { font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-sig-sub { font-size: 13.5px; color: #B9C2D1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-sig-btn { background: #fff; color: var(--tinta); border-color: #fff; flex: 0 0 auto; }

.h-rejilla { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.h-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.h-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.h-kpi { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--linea); border-radius: 13px; padding: 14px 16px; text-decoration: none; color: var(--tinta); }
.h-kpi:hover { border-color: #C2CAD6; }
.h-kpi-et { font-size: 13.5px; color: var(--gr); font-weight: 600; }
.h-kpi-n { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.h-kpi.alerta .h-kpi-n { color: var(--red); }

.h-lista-cab .cab { padding: 16px 18px 8px; }
.h-filtros { padding: 0 18px 12px; }
/* Fila: el nombre manda, la referencia va subordinada y una sola acción clara; nunca se solapan */
.h-fila, .h-esp-fila { display: flex; align-items: center; gap: 16px; padding: 13px 18px; border-top: 1px solid var(--linea); text-decoration: none; color: var(--tinta); }
.h-esp-fila:hover { background: #FAFBFC; }
.h-fila-cuerpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.h-nombre { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-sub { font-size: 13.5px; color: var(--gr); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-ref { font-variant-numeric: tabular-nums; }
.h-fila-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; flex: 0 0 auto; }
.h-tipo { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; background: var(--gr-bg); color: var(--tinta-2); }
.h-tipo.yo { background: var(--yo-bg); color: var(--yo); }
.h-tipo.red { background: var(--red-bg); color: var(--red); }
.h-tipo.ia { background: var(--ia-bg); color: var(--ia); }
.h-accion { height: 34px; padding: 0 14px; font-size: 13.5px; }

.h-avance { flex: 0 0 170px; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.h-prog { display: block; width: 100%; height: 7px; border-radius: 999px; background: var(--gr-bg); overflow: hidden; }
.h-prog > i { display: block; height: 100%; border-radius: 999px; background: var(--ambar); }
.h-prog.alta > i { background: var(--red); }
.h-avance-txt { font-size: 12.5px; color: var(--gr); }

.h-res-fila { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-top: 1px solid var(--linea); text-decoration: none; color: var(--tinta); }
.h-res-fila:hover { background: #FAFBFC; }
.h-res-fila > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.h-res-ico { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.h-res-ico svg { width: 19px; height: 19px; fill: none; stroke-width: 1.9; }
.h-res-ico.ok { background: var(--ok-bg); } .h-res-ico.ok svg { stroke: var(--ok); }
.h-res-ico.ia { background: var(--ia-bg); } .h-res-ico.ia svg { stroke: var(--ia); }
.h-res-ico.red { background: var(--red-bg); } .h-res-ico.red svg { stroke: var(--red); }
.h-res-n { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.h-res-aviso { font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.h-res-lab { font-size: 12.5px; color: var(--gr); margin-top: 2px; }

.h-ag-grupo { display: block; padding: 10px 18px 4px; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--gr); border-top: 1px solid var(--linea); }
.h-ag-fila { display: flex; align-items: center; gap: 12px; padding: 9px 18px; text-decoration: none; color: var(--tinta); }
.h-ag-fila:hover { background: #FAFBFC; }
.h-ag-fecha { width: 44px; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.h-ag-fecha b { font-size: 20px; font-weight: 800; }
.h-ag-fecha small { font-size: 12.5px; color: var(--gr); text-transform: uppercase; margin-top: 3px; }
.h-ag-fecha.red b { color: var(--red); } .h-ag-fecha.yo b { color: var(--yo); }
.h-ag-tipo { font-weight: 700; font-size: 12.5px; letter-spacing: .03em; }
.h-ag-sinfecha { display: block; padding: 10px 18px 14px; border-top: 1px solid var(--linea); }

@media (max-width: 1020px) { .h-rejilla { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .h-barra { flex-direction: column; }
  .h-barra .h-buscar { flex: 0 0 auto; }
  .h-kpis { gap: 8px; } .h-kpi { padding: 10px 12px; } .h-kpi-n { font-size: 26px; }
  .h-siguiente { flex-wrap: wrap; } .h-sig-tit, .h-sig-sub { white-space: normal; }
  .h-sig-txt { flex: 1 1 calc(100% - 60px); } .h-sig-btn { flex: 1 0 100%; justify-content: center; }
  .h-fila { flex-wrap: wrap; } .h-fila-meta { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  .h-esp-fila { flex-wrap: wrap; } .h-avance { flex-basis: 100%; align-items: stretch; }
}

/* Requisitos de validez de la reclamación previa: uno debajo de otro */
.rq-lista { border: 1px solid var(--linea); border-radius: 10px; padding: 10px 14px 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.rq-lista legend { font-weight: 700; font-size: 13.5px; padding: 0 6px; }
.rq-item { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; cursor: pointer; }
.rq-item input { margin-top: 3px; width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--ok); }
.rq-item > span { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.rq-linea { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rq-et { font-weight: 600; }
.rq-motivo { font-size: 12.5px; color: var(--gr); }
.rq-docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.rq-docs > div { display: flex; flex-direction: column; gap: 3px; background: #F7F8FA; border-radius: 9px; padding: 10px 12px; font-size: 14.5px; }
.rq-docs a { color: var(--ia); word-break: break-word; }
.rq-falta { color: var(--yo); font-weight: 600; }

/* Inicio: trabajo devuelto por un abogado */
.devuelta-comentario { margin: 2px 0 0; padding: 10px 14px; border-left: 3px solid var(--ambar); background: #fff; border-radius: 0 9px 9px 0; font-size: 14.5px; }
.devuelta-comentario span { display: block; margin-top: 4px; font-size: 12.5px; color: var(--gr); }
.devuelta-acciones { display: flex; gap: 10px; flex-wrap: wrap; }
.devuelta-acciones form { margin: 0; }

.cotitular { border-top: 1px solid var(--linea); padding: 10px 0; }
.cotitular > summary { cursor: pointer; list-style: none; }
.cotitular > summary::-webkit-details-marker { display: none; }

.programados { display: flex; flex-direction: column; gap: 4px; }
.programados a { text-decoration: none; color: var(--tinta); }

/* ===================== Calendario · rediseño visual (prefijo k-) ===================== */
.k-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.k-titulo { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 0; }
.k-controles { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.k-vistas { display: flex; background: #fff; border: 1px solid var(--linea); border-radius: 11px; padding: 3px; }
.k-vistas a { padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 14.5px; color: var(--gr); text-decoration: none; }
.k-vistas a.on { background: var(--tinta); color: #fff; }
.k-nav { display: flex; gap: 6px; }
.k-nav .btn { height: 40px; }
.k-rejilla { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; margin-bottom: 18px; }
.k-lateral { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.k-kpis { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.k-kpis .h-kpi { padding: 10px 12px; } .k-kpis .h-kpi-n { font-size: 26px; } .k-kpis .h-kpi-et { font-size: 12.5px; }

/* Mes */
.k-semana-cab, .k-fila { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.k-semana-cab div { padding: 10px 10px 8px; font-size: 12.5px; font-weight: 700; color: var(--gr); text-transform: uppercase; letter-spacing: .04em; }
.k-dia { min-height: 112px; border-top: 1px solid var(--linea); border-left: 1px solid var(--linea); padding: 6px 6px 8px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.k-fila .k-dia:first-child { border-left: 0; }
.k-dia.fuera { background: #FAFBFC; } .k-dia.fuera .k-num { color: #B4BCC9; }
.k-dia.inhabil { background: #F6F7F9; }
.k-dia.festivo { background: repeating-linear-gradient(135deg, #F6F7F9, #F6F7F9 6px, #EEF0F4 6px, #EEF0F4 12px); }
.k-dia-cab { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 24px; }
.k-num { font-size: 13.5px; font-weight: 700; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.k-dia.hoy .k-num { background: var(--ambar); color: var(--tinta); }
.k-inh { font-size: 12.5px; font-weight: 600; color: var(--gr); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-ev { display: block; font-size: 12.5px; line-height: 1.3; padding: 3px 7px; border-radius: 6px; background: var(--gr-bg); color: var(--tinta); text-decoration: none;
        border-left: 3px solid var(--gr); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word;
        max-height: calc(2.6em + 6px); }
.k-ev:hover { filter: brightness(.97); }
/* Mismos colores que la leyenda */
.k-ev.t-vista { background: #FBEAEA; border-color: #C23B3B; } .k-ev.t-juicio { background: #FDF1E1; border-color: #D97706; }
.k-ev.t-reclamacion { background: #E8EFFD; border-color: #2563EB; } .k-ev.t-cliente { background: #F1EBFD; border-color: #7C3AED; }
.k-ev.t-pago { background: #E3F5EE; border-color: #059669; } .k-ev.t-tarea { background: #E9ECF1; border-color: #18233A; }
.k-ev.t-hito { background: #F1F3F6; border-color: #A0A8B5; }
.k-ev.vencido { background: var(--red); border-color: #8F2323; color: #fff; font-weight: 600; }
.k-ev.hecho { opacity: .55; text-decoration: line-through; }
.k-mas { font-size: 12.5px; font-weight: 700; color: var(--ia); padding: 0 4px; text-decoration: none; }

/* Semana */
.k-sem { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.k-sem-col { border-left: 1px solid var(--linea); padding: 10px 8px 14px; display: flex; flex-direction: column; gap: 6px; min-height: 420px; min-width: 0; }
.k-sem-col:first-child { border-left: 0; } .k-sem-col.inhabil { background: #F6F7F9; }
.k-sem-cab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--linea); margin-bottom: 4px; }
.k-sem-cab span:first-child { font-size: 12.5px; font-weight: 700; color: var(--gr); text-transform: uppercase; }
.k-sem-cab b { font-size: 20px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.k-sem-col.hoy .k-sem-cab b { background: var(--ambar); }
.k-ev.grande { white-space: normal; display: flex; max-height: none; flex-direction: column; gap: 1px; padding: 6px 8px; }
.k-ev-tit { font-weight: 600; } .k-ev-sub { font-size: 12.5px; color: var(--gr); }
.k-vacio { font-size: 12.5px; color: #B4BCC9; text-align: center; margin-top: 8px; }

/* Lista */
.k-lista-dia { display: flex; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--linea); scroll-margin-top: 20px; }
.k-lista-dia:first-child { border-top: 0; }
.k-lista-fecha { width: 44px; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; }
.k-lista-fecha b { font-size: 22px; font-weight: 800; line-height: 1.1; } .k-lista-fecha span { font-size: 12.5px; color: var(--gr); text-transform: uppercase; }
.k-lista-evs { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.k-lista-ev { display: flex; align-items: center; gap: 12px; padding: 7px 0; text-decoration: none; color: var(--tinta); }
.k-lista-ev + .k-lista-ev { border-top: 1px dashed var(--linea); }
.k-lista-ev.vencido .h-nombre { color: var(--red); }

/* Leyenda */
.k-leyenda { gap: 8px; font-size: 13.5px; }
.k-leyenda span { display: flex; align-items: center; gap: 8px; }
.k-muestra-inh { width: 12px; height: 12px; border-radius: 3px; background: repeating-linear-gradient(135deg, #F1F3F6, #F1F3F6 3px, #DDE2E9 3px, #DDE2E9 6px); border: 1px solid var(--linea); }

@media (max-width: 1100px) { .k-rejilla { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .k-dia { min-height: 64px; padding: 4px; } .k-ev { font-size: 0; padding: 0; height: 6px; border-left-width: 0; border-radius: 3px; }
  .k-inh { display: none; } .k-sem { grid-template-columns: 1fr; } .k-sem-col { min-height: 0; border-left: 0; border-top: 1px solid var(--linea); }
  .k-sem-cab { flex-direction: row; justify-content: flex-start; gap: 10px; }
}

/* ===================== Ficha del expediente · rediseño visual (prefijo f-) ===================== */
.f-progreso-caja { background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.f-progreso-et { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.f-progreso { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.f-progreso .ficha { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 10px 8px 9px;
  border-radius: 11px; background: var(--gr-bg); border: 1.5px solid transparent; text-decoration: none; color: var(--tinta-2); min-width: 0; }
.f-progreso .ficha-tit { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.f-progreso .ficha-num { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1.5px solid var(--linea); color: var(--gr);
  font-size: 12.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.f-progreso .ficha-nombre { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.f-progreso .ficha-estado { font-size: 12.5px; color: var(--gr); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.f-progreso .ficha.ok { background: var(--ok-bg); } .f-progreso .ficha.ok .ficha-num { background: var(--ok); border-color: var(--ok); color: #fff; }
.f-progreso .ficha.ok .ficha-nombre { color: var(--ok); }
.f-progreso .ficha.yo .ficha-estado { color: var(--yo); } .f-progreso .ficha.red .ficha-estado { color: var(--red); font-weight: 700; }
.f-progreso .ficha.red { background: var(--red-bg); }
.f-progreso .ficha.elegida { background: var(--tinta); border-color: var(--tinta); }
.f-progreso .ficha.elegida .ficha-num { background: var(--ambar); border-color: var(--ambar); color: var(--tinta); }
.f-progreso .ficha.elegida .ficha-nombre { color: #fff; } .f-progreso .ficha.elegida .ficha-estado { color: var(--ambar); }
.f-progreso .ficha.bloqueada { opacity: .55; cursor: not-allowed; }
.f-progreso .ficha, .f-progreso .ficha.ok, .f-progreso .ficha.yo, .f-progreso .ficha.red, .f-progreso .ficha.wait, .f-progreso .ficha.gr { border-top: 1.5px solid transparent; box-shadow: none; }
.f-progreso .ficha.elegida { border-color: var(--tinta); }
.f-progreso .ficha:hover:not(.elegida):not(.bloqueada) { border-color: #C2CAD6; }

/* Línea de progreso de cada documento */
.f-hilo { list-style: none; margin: 4px 0 12px; padding: 0; display: flex; align-items: flex-start; }
.f-hilo li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; min-width: 0; }
.f-hilo li + li::before { content: ""; position: absolute; top: 12px; right: 50%; width: 100%; height: 2px; background: var(--linea); z-index: 0; }
.f-hilo li.ok + li::before, .f-hilo li.ok + li.ok::before { background: var(--ok); }
.f-bola { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 2px solid var(--linea); color: var(--gr); font-size: 12.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.f-bola svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 2.6; fill: none; }
.f-hilo li.ok .f-bola { background: var(--ok); border-color: var(--ok); }
.f-hilo li.ahora .f-bola { border-color: var(--ambar); background: var(--yo-bg); color: var(--yo); }
.f-et { font-size: 12.5px; font-weight: 600; color: var(--gr); text-align: center; line-height: 1.25; padding: 0 2px; }
.f-hilo li.ok .f-et { color: var(--ok); } .f-hilo li.ahora .f-et { color: var(--yo); }
.f-doc-cab { background: #fff; border: 1px solid var(--linea); border-radius: 12px; padding: 12px 16px 0; margin-bottom: 4px; }
.f-doc-cab h3 { margin: 0 0 8px; font-size: 15px; }
.f-seguimiento { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--linea); padding-top: 12px; margin-top: 4px; }
.f-plazo { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.f-plazo > div { background: var(--gr-bg); border-radius: 9px; padding: 9px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.f-plazo span { font-size: 12.5px; color: var(--gr); } .f-plazo b { font-size: 14.5px; }
.f-plazo .vence { background: var(--yo-bg); } .f-plazo .vence b { color: var(--yo); }
.f-plazo .vencido { background: var(--red-bg); } .f-plazo .vencido b { color: var(--red); }
@media (max-width: 700px) { .f-plazo { grid-template-columns: repeat(2, 1fr); } .f-et { font-size: 12.5px; } }

/* ===================== Expedientes · rediseño visual (prefijo x-) ===================== */
.x-filtros { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.x-buscar { flex: 1 1 320px; }
.x-sel { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 6px 0 12px; background: #fff; border: 1px solid var(--linea); border-radius: 11px; font-size: 13.5px; color: var(--gr); font-weight: 600; }
.x-sel select { border: 0; background: transparent; font: inherit; font-size: 14.5px; color: var(--tinta); font-weight: 600; height: 100%; padding-right: 4px; cursor: pointer; }
.x-sel:focus-within { border-color: var(--tinta); }
.x-tabla { width: 100%; border-collapse: collapse; }
.x-tabla th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--gr); text-transform: uppercase; letter-spacing: .04em; padding: 12px 14px 10px; border-bottom: 1px solid var(--linea); white-space: nowrap; }
.x-tabla td { padding: 12px 14px; border-bottom: 1px solid var(--linea); vertical-align: middle; font-size: 14.5px; }
.x-tabla tbody tr:hover { background: #FAFBFC; }
.x-tabla tbody tr:last-child td { border-bottom: 0; }
.x-tabla tr.x-cerrado td { opacity: .6; }
.x-cliente { min-width: 220px; max-width: 320px; }
.x-cliente > a { text-decoration: none; color: var(--tinta); display: block; }
.x-cliente .h-sub a { color: var(--gr); text-decoration: none; }
.x-banco { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-fase { min-width: 150px; }
.x-fase-txt { display: block; font-size: 13.5px; white-space: nowrap; }
.x-avance { display: flex; gap: 3px; margin-top: 6px; }
.x-avance i { flex: 1; height: 5px; border-radius: 3px; background: var(--linea); max-width: 22px; }
.x-avance i.ok { background: var(--ok); } .x-avance i.yo { background: var(--ambar); } .x-avance i.red { background: var(--red); } .x-avance i.wait { background: #9DB8E8; }
.x-der { text-align: right !important; }
.x-importe { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.x-resp { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.x-ini { width: 26px; height: 26px; border-radius: 50%; background: var(--tinta); color: #fff; font-size: 12.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.x-fecha { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Tablero */
.x-tablero { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.x-col { background: #EEF1F5; border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 200px; }
.x-col h3 { display: flex; align-items: center; justify-content: space-between; margin: 2px 4px 4px; font-size: 14.5px; }
.x-col h3 > span:first-child { display: flex; align-items: center; gap: 8px; }
.x-col-num { width: 22px; height: 22px; border-radius: 50%; background: var(--tinta); color: #fff; font-size: 12.5px; display: inline-flex; align-items: center; justify-content: center; }
.x-col-n { font-size: 12.5px; font-weight: 800; background: #fff; border-radius: 999px; padding: 1px 9px; color: var(--gr); }
.x-tarjeta { display: flex; flex-direction: column; gap: 5px; background: #fff; border: 1px solid var(--linea); border-radius: 11px; padding: 11px 12px; text-decoration: none; color: var(--tinta); min-width: 0; }
.x-tarjeta:hover { border-color: #C2CAD6; box-shadow: 0 2px 8px rgba(24,35,58,.06); }
.x-tarjeta-pie { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.x-tarjeta .x-importe { font-size: 13.5px; }
.x-vacia { font-size: 12.5px; color: #A0A8B5; text-align: center; padding: 10px; }
.x-filtros { min-width: 0; } .x-sel { min-width: 0; } .x-sel select { min-width: 0; max-width: 220px; text-overflow: ellipsis; }
.x-tabla th, .x-tabla td { padding-left: 12px; padding-right: 12px; }
.x-tabla td.x-fecha { font-size: 13.5px; }
.x-cliente { min-width: 190px; } .x-fase { min-width: 140px; } .x-banco { max-width: 140px; }
#barra-bloque .btn.pri { background: var(--ambar); color: var(--tinta); border-color: var(--ambar); }
@media (max-width: 640px) {
  .x-filtros { flex-direction: column; align-items: stretch; }
  .x-buscar { flex: 0 0 auto; }
  .x-sel { justify-content: space-between; } .x-sel select { flex: 1; max-width: none; width: 100%; text-align: right; }
}

/* ===================== Correo · dos paneles al estilo Karbon (prefijo m-) ===================== */
.m-dos { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.m-lista { max-height: calc(100vh - 210px); overflow: auto; position: sticky; top: 16px; }
.m-pestanas { display: flex; gap: 4px; padding: 10px 10px 8px; border-bottom: 1px solid var(--linea); position: sticky; top: 0; background: #fff; z-index: 1; }
.m-pestanas a { padding: 7px 12px; border-radius: 8px; font-weight: 600; font-size: 14.5px; color: var(--gr); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.m-pestanas a.on { background: var(--tinta); color: #fff; }
.m-n { background: var(--ambar); color: var(--tinta); border-radius: 999px; font-size: 12.5px; font-weight: 800; padding: 0 7px; }
.m-item { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-bottom: 1px solid var(--linea); text-decoration: none; color: var(--tinta); border-left: 3px solid transparent; }
.m-item:hover { background: #FAFBFC; }
.m-item.on { background: #EEF3FC; border-left-color: var(--ia); }
.m-item-cab { display: flex; justify-content: space-between; gap: 8px; font-size: 14.5px; }
.m-item-cab b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-item-cab span { font-size: 12.5px; color: var(--gr); white-space: nowrap; }
.m-item.nuevo .m-item-cab b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ia); margin-right: 6px; vertical-align: middle; }
.m-asunto { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-extracto { font-size: 13.5px; color: var(--gr); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; } .m-chips:empty { display: none; }
.m-chips .chip { font-size: 12.5px; padding: 1px 8px; }
.m-correo { gap: 14px; min-height: 420px; }
.m-correo-cab { display: flex; flex-direction: column; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--linea); }
.m-correo-cab h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.m-de { display: flex; gap: 12px; align-items: center; font-size: 14.5px; }
.m-de .x-ini { width: 36px; height: 36px; font-size: 14.5px; }
.m-cuerpo { white-space: pre-wrap; font-size: 15px; line-height: 1.6; max-height: 55vh; overflow: auto; overflow-wrap: anywhere; }
.m-acciones { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 14px; border-top: 1px solid var(--linea); }
.m-asignar { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 360px; }
.m-sel { flex: 1 1 260px; } .m-sel select { max-width: none; width: 100%; }
.m-sugerencia { flex-basis: 100%; margin: 0; font-size: 13.5px; background: var(--ok-bg); color: var(--ok); border-radius: 9px; padding: 8px 12px; }
.m-vacio { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--gr); min-height: 380px; text-align: center; }
.m-vacio svg { width: 44px; height: 44px; stroke: #C2CAD6; fill: none; stroke-width: 1.6; }
@media (max-width: 900px) { .m-dos { grid-template-columns: 1fr; } .m-lista { position: static; max-height: 46vh; } }

.x-sel > span { white-space: nowrap; }

/* ===================== Tareas · rediseño visual (prefijo t-) ===================== */
.t-nueva { margin-bottom: 16px; }
.t-nueva > summary { list-style: none; cursor: pointer; display: none; }
.t-nueva > summary::-webkit-details-marker { display: none; }
.t-nueva:not([open]) { display: none; }
.t-grupo { margin-bottom: 16px; }
.t-n { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--gr-bg); color: var(--gr); font-size: 12.5px; font-weight: 800; margin-left: 6px; vertical-align: middle; }
.t-vencidas .t-n { background: var(--red); color: #fff; } .t-hoy .t-n { background: var(--ambar); color: var(--tinta); }
.t-vencidas { border-top: 3px solid var(--red); } .t-hoy { border-top: 3px solid var(--ambar); }
.t-lista .tarea { border: 0; border-top: 1px solid var(--linea); border-radius: 0; background: transparent; padding: 12px 18px; margin: 0; }
.t-lista .tarea:hover { background: #FAFBFC; }
.t-lista .tarea-cab strong { font-size: 15px; }
.t-lista .tarea-cab strong a { color: var(--tinta); text-decoration: none; }
.t-lista .tarea-cab strong a:hover { text-decoration: underline; }
.t-lista .estado-tarea { height: 32px; border-radius: 999px; font-size: 13.5px; font-weight: 700; padding: 0 10px; }
.t-lista .comentarios { margin-top: 6px; }
.t-completadas .tarea-cab strong { color: var(--gr); }

.p-deudas { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--linea); border-radius: 11px; background: #FBFCFD; }
.p-deudas .fila { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--linea); }
.p-deudas .fila:first-of-type { border-top: 0; }

[data-deuda][hidden], [data-cobro][hidden] { display: none !important; }

/* ===================== Documentos · rediseño visual (prefijo d-) ===================== */
.d-subir { padding: 16px; margin-bottom: 16px; }
.d-subir-form { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.d-zona { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 150px; padding: 18px;
  border: 2px dashed #C2CAD6; border-radius: 13px; background: #FBFCFD; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.d-zona input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.d-zona svg { width: 34px; height: 34px; stroke: var(--gr); fill: none; stroke-width: 1.7; }
.d-zona b { font-size: 15px; } .d-zona .muted { font-size: 12.5px; }
.d-zona.encima { border-color: var(--ia); background: var(--ia-bg); } .d-zona.con { border-style: solid; border-color: var(--ok); background: var(--ok-bg); }
.d-subir-lado { display: flex; flex-direction: column; gap: 10px; justify-content: space-between; }
.d-aviso { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--tinta-2); background: var(--yo-bg); border-radius: 10px; padding: 10px 12px; }
.d-tabla { width: 100%; border-collapse: collapse; }
.d-tabla th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--gr); text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--linea); white-space: nowrap; }
.d-tabla td { padding: 10px 12px; border-bottom: 1px solid var(--linea); vertical-align: middle; }
.d-tabla tbody tr:hover { background: #FAFBFC; } .d-tabla tbody tr:last-child td { border-bottom: 0; }
.d-doc { display: flex; align-items: center; gap: 12px; min-width: 240px; max-width: 360px; }
.d-ico { flex: 0 0 auto; width: 38px; height: 44px; border-radius: 7px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .04em; color: #fff; background: #8792A4; position: relative; }
.d-ico::before { content: ""; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 10px 10px 0; border-color: transparent #fff transparent transparent; opacity: .55; }
.d-ico.pdf { background: #C23B3B; } .d-ico.word { background: #2F6FDB; } .d-ico.img { background: #1F8A4C; }
.d-doc-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.d-doc-txt a { font-weight: 600; color: var(--tinta); word-break: break-word; text-decoration: none; } .d-doc-txt a:hover { text-decoration: underline; }
.d-doc-txt .muted { font-size: 12.5px; }
.d-tipo { display: flex; gap: 4px; } .d-tipo .entrada { height: 34px; min-width: 170px; }
.d-si-no { height: 34px; border-radius: 999px; font-weight: 700; font-size: 13.5px; padding: 0 10px; }
.d-si-no.si { background: var(--ok-bg); color: var(--ok); border-color: #BFE3CD; } .d-si-no.no { background: var(--red-bg); color: var(--red); border-color: #F0C2C2; }
.d-nota { font-size: 12.5px; max-width: 260px; }
.d-acciones { display: flex; gap: 4px; justify-content: flex-end; }
@media (max-width: 760px) { .d-subir-form { grid-template-columns: 1fr; } }

.d-doc-td { min-width: 240px; }

.casilla.conmutador.bloqueado { opacity: .5; cursor: not-allowed; }

/* Expediente cerrado: los pasos se ven pero no se editan */
.paso-contenido { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: inherit; }
.caja-paso > .paso-contenido { gap: 14px; }
.solo-lectura button, .solo-lectura input, .solo-lectura select, .solo-lectura textarea { cursor: not-allowed; }
.solo-lectura button:not(.enlace), .solo-lectura input[type="file"], .solo-lectura .d-zona { opacity: .45; }
.solo-lectura a.btn[href*="accion"], .solo-lectura .ia-botones { pointer-events: none; opacity: .45; }
.solo-lectura-aviso a { font-weight: 700; }

.pasos-ia ol { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; line-height: 1.5; }
.pasos-ia li { list-style: none; margin-left: -20px; }

/* Tribunales */
.t-respuesta { gap: 14px; }
.t-cuatro { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.t-caja { background: var(--gr-bg); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.t-caja span { font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--gr); }
.t-caja b { font-size: 16px; line-height: 1.3; } .t-caja small { font-size: 13.5px; color: var(--gr); }
.t-caja.oscura { background: var(--tinta); color: #fff; } .t-caja.oscura span { color: var(--ambar); } .t-caja.oscura small { color: #DCE2EC; }
.t-ccaa { border-top: 1px solid var(--linea); padding: 12px 18px; } .t-ccaa > summary { cursor: pointer; font-size: 15px; }
.t-prov { margin: 8px 0 0 14px; } .t-prov > summary { cursor: pointer; font-weight: 600; }
.propuesta-ia { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; font-size: 13.5px; }
.propuesta-ia form { display: inline-flex; gap: 4px; } .propuesta-ia .btn { height: 30px; padding: 0 10px; font-size: 12.5px; }
@media (max-width: 900px) { .t-cuatro { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.encabezamiento-demanda { background: #FBFCFD; border: 1px dashed #C2CAD6; border-radius: 10px; padding: 12px 14px; font-family: "Times New Roman", Times, serif; font-size: 16px; letter-spacing: .02em; }

/* Tipo de documento: desplegable agrupado con lo que provoca cada tipo */
.d-tipo-sel { height: 46px; font-weight: 600; }
.d-tipo-sel optgroup { font-weight: 800; color: #3A4659; }
.d-tipo-sel option { font-weight: 500; color: var(--tinta); }
.d-efecto { margin: 0; font-size: 13.5px; line-height: 1.5; background: var(--ia-bg); color: #1E3F8A; border-radius: 10px; padding: 10px 12px; }
.d-efecto.firma { background: var(--yo-bg); color: #7A4B00; }
.d-tipo-fila { height: 36px; min-width: 230px; max-width: 300px; font-size: 13.5px; }

.h-altas { gap: 10px; } .h-alta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--linea); }
.h-alta .h-fila-cuerpo { flex: 1 1 280px; } .h-alta form { display: inline; }

/* Indicador de uso (Ajustes › Usuarios) */
.en-uso { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; }
.en-uso::before { content: ""; width: 9px; height: 9px; border-radius: 50%; }
.en-uso.si { color: #1F6B45; } .en-uso.si::before { background: #1F9D55; box-shadow: 0 0 0 3px rgba(31,157,85,.18); }
.en-uso.no { color: #A33A3A; } .en-uso.no::before { background: #D64545; }

.vf-qr svg { width: 72px; height: 72px; display: block; } .vf-declaracion { white-space: pre-wrap; font-size: 12.5px; background: var(--gr-bg); padding: 12px; border-radius: 10px; margin: 8px 0 0; }

.df-codigos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; } .df-codigos code { background: var(--gr-bg); padding: 8px; border-radius: 8px; text-align: center; font-size: 15px; }
.df-pasos { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 16px; } .df-qr svg { width: 200px; height: 200px; display: block; margin: 10px 0; }
.df-usuario { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--linea); margin-bottom: 8px; }
@media (max-width: 600px) { .df-codigos { grid-template-columns: repeat(2, 1fr); } }

/* Cronología del expediente */
.cr-cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.cr-buscar { min-width: 280px; }
.cr-filtros { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cr-filtros a { height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--linea); background: #fff; color: var(--tinta); font-weight: 600; font-size: 14.5px; text-decoration: none; }
.cr-filtros a span { opacity: .7; font-size: 12.5px; } .cr-filtros a.on { background: var(--tinta); color: #fff; border-color: var(--tinta); }
.cr-rejilla { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.cr-linea { padding: 4px 20px 14px; }
.cr-dia { margin: 14px 0 4px; font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--gr); }
.cr-ev { display: grid; grid-template-columns: 48px 18px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid #EEF1F5; }
.cr-hora { font-size: 12.5px; color: var(--gr); font-variant-numeric: tabular-nums; padding-top: 2px; }
.cr-punto { width: 11px; height: 11px; border-radius: 50%; margin-top: 5px; background: var(--gr); }
.cr-cuerpo { display: flex; flex-direction: column; gap: 3px; min-width: 0; } .cr-tit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cr-chip { font-size: 12.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--gr-bg); color: #3A4659; }
.cr-det { font-size: 13.5px; color: #3A4659; line-height: 1.45; overflow-wrap: break-word; } .cr-quien { font-size: 12.5px; color: var(--gr); }
.cr-imp { font-size: 12.5px; font-weight: 700; color: #A06A00; }
.cr-punto.t-juzgado, .cr-chip.t-juzgado { background: var(--tinta); color: #fff; } .cr-punto.t-documento { background: #1F7A4D; } .cr-chip.t-documento { background: #E3F3EA; color: #1A5E3C; }
.cr-punto.t-correo { background: #2F5FD0; } .cr-chip.t-correo { background: #E4ECFB; color: #1E4296; } .cr-punto.t-ia { background: #6B4FD6; } .cr-chip.t-ia { background: #EEEAFD; color: #4A33A8; }
.cr-punto.t-decision { background: #B3261E; } .cr-chip.t-decision { background: #FBE7E6; color: #8C1D17; } .cr-punto.t-nota { background: #C77700; } .cr-chip.t-nota { background: #FFF1D6; color: #7A4B00; }
.cr-lado { display: flex; flex-direction: column; gap: 14px; }
.cr-proximo { background: var(--tinta); color: #fff; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.cr-proximo h3 { margin: 0; font-size: 12.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--ambar); }
.cr-proximo div { display: flex; flex-direction: column; gap: 2px; padding-top: 8px; border-top: 1px solid #2A3852; } .cr-proximo span { font-size: 13.5px; color: #DCE2EC; }
.cr-proximo a { color: var(--ambar); font-weight: 700; font-size: 13.5px; } .cr-vacio { font-size: 13.5px; color: #DCE2EC; }
.cr-nota { display: flex; flex-direction: column; gap: 8px; } .cr-nota textarea { min-height: 70px; }
@media (max-width: 1000px) { .cr-rejilla { grid-template-columns: 1fr; } }

.fila-vinculo { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--linea); }
.vinculo-chip { text-decoration: none; }

.df-ayuda { border-top: 4px solid var(--ambar); } .df-apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.df-apps > div { background: var(--gr-bg); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; line-height: 1.45; }
@media (max-width: 900px) { .df-apps { grid-template-columns: 1fr; } }

.banda-suplantacion { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 10px 16px; border-radius: 12px; background: #B3261E; color: #fff; font-size: 14.5px; }
.banda-suplantacion .btn { background: #fff; color: #B3261E; border-color: #fff; font-weight: 700; }

.banda-mantenimiento { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding: 10px 16px; border-radius: 12px; background: #FFC53D; color: #18233A; font-size: 14.5px; }
.banda-mantenimiento .btn { background: #18233A; color: #fff; border-color: #18233A; font-weight: 700; }

.mis-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 18px; }
.mis-datos small { font-weight: 400; font-size: 12.5px; color: var(--gr); line-height: 1.4; }
.primer-acceso { display: flex; flex-direction: column; gap: 18px; max-width: 980px; }

.perfil-grupo { margin: 10px 0 -4px; font-size: 13.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--gr); }

/* Cobros: cuenta del cliente */
.cb-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.cb-caja { background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.cb-caja span { font-size: 13.5px; color: var(--gr); font-weight: 600; } .cb-caja b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; } .cb-caja small { font-size: 12.5px; color: var(--gr); }
.cb-caja.oscura { background: var(--tinta); border-color: var(--tinta); color: #fff; } .cb-caja.oscura span { color: var(--ambar); font-weight: 700; } .cb-caja.oscura small { color: #DCE2EC; }
.cb-verde { color: #1A5E3C; }
.cb-cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.cb-cifras > div { background: var(--gr-bg); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.cb-cifras span { font-size: 13.5px; color: var(--gr); } .cb-cifras b { font-size: 20px; font-variant-numeric: tabular-nums; } .cb-cifras small { font-size: 12.5px; color: var(--gr); }
.cb-en-linea { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cb-tabla td { vertical-align: top; } .cb-abierta { background: #FFFBF0; }
.cb-acciones { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; } .cb-acciones form { margin: 0; }
.cb-anadir { display: flex; flex-direction: column; gap: 10px; } .cb-anadir-btn { border-style: dashed; list-style: none; width: fit-content; }
.cb-anadir-btn::-webkit-details-marker { display: none; }
.cb-dialogo { border: 0; border-top: 5px solid var(--ambar); border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 32px)); color: var(--tinta); text-align: left; }
.cb-dialogo::backdrop { background: rgba(24, 35, 58, .55); }
.cb-dialogo-form { padding: 26px; display: flex; flex-direction: column; gap: 14px; } .cb-dialogo h2 { margin: 0 0 4px; font-size: 22px; }
.cb-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .cb-nota { margin: -6px 0 0; font-size: 13.5px; }
.cb-factura { background: var(--gr-bg); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.cb-botones { display: flex; justify-content: flex-end; gap: 10px; }
.chip.az { background: #E4ECFB; color: #1E4296; }
@media (max-width: 600px) { .cb-dos { grid-template-columns: 1fr; } }

.cb-barra { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; } .cb-buscar { min-width: 280px; }
.cb-naranja { color: #A04A00; font-weight: 700; } .cb-atrasada { background: #FFF6EC; }

.perfil-form { display: flex; flex-direction: column; gap: 14px; }
.pt-telefono { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; margin-top: 4px; background: var(--gr-bg); border-radius: 10px; } .pt-telefono select { max-width: 420px; }

.banda-ia-parada { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: #FBE7E6; color: #8C1D17; border: 1px solid #F2C4C1; font-size: 14.5px; line-height: 1.45; }

/* Presentar en LexNET */
.lx-paso { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--linea); }
.lx-num { width: 30px; height: 30px; border-radius: 50%; background: var(--tinta); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.lx-cuerpo { display: flex; flex-direction: column; gap: 8px; min-width: 0; } .lx-cuerpo form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.lx-datos th { text-align: left; white-space: nowrap; color: var(--gr); font-weight: 600; width: 1%; } .lx-sel { min-width: 190px; }
.lx-relacion { white-space: pre-wrap; font: inherit; font-size: 13.5px; background: var(--gr-bg); padding: 10px 12px; border-radius: 10px; margin: 6px 0 0; }
.lx-cuerpo form.lx-justificante { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 12px; }

/* Evolutivo: más aire en los márgenes */
.tarjeta.cr-linea { padding: 10px 28px 22px; }
.cr-ev { grid-template-columns: 56px 18px minmax(0, 1fr); gap: 14px; padding: 14px 4px; }
.cr-dia { margin: 20px 4px 6px; } .cr-cuerpo { padding-right: 8px; gap: 5px; }
.cr-lado .tarjeta, .cr-proximo { padding: 18px 20px; }
.cr-titulo { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
@media (max-width: 600px) { .tarjeta.cr-linea { padding: 6px 16px 16px; } .cr-ev { grid-template-columns: 44px 14px minmax(0, 1fr); gap: 10px; } }
/* Minuta de tiempos */
.mn-tabla td { vertical-align: top; } .mn-tabla textarea { width: 100%; min-height: 54px; resize: vertical; }
.mn-horas { width: 84px; text-align: right; } .mn-excluida td { opacity: .5; }
.mn-resumen { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }

.ia-trabajando { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; } .ia-cancelar { display: flex; gap: 8px; flex-wrap: wrap; } .ia-cancelar form { margin: 0; }

.av-fila { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--linea); } .av-amenaza { color: #B3261E; font-weight: 600; }
.av-decision { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; }
.av-analizando { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; background: rgba(24,35,58,.45); }
.av-analizando > div { background: #fff; border-radius: 16px; padding: 22px 26px; display: flex; align-items: center; gap: 14px; font-weight: 600; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.av-girar { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #E1E6ED; border-top-color: var(--tinta); animation: avgira .8s linear infinite; } @keyframes avgira { to { transform: rotate(360deg); } }

.sala-av { border-top: 4px solid #B3261E; } .sala-fila { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--linea); }
.sala-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; } .sala-acciones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .sala-aprobar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }

.h-franja { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.h-dudas { flex: 0 1 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; background: #fff; border: 1px solid var(--linea); border-left: 4px solid var(--ambar); border-radius: 14px; padding: 9px 10px 9px 14px; }
.h-dudas > div, .h-atlas > div { display: flex; flex-direction: column; gap: 1px; line-height: 1.3; }
.h-dudas .muted, .h-atlas .muted { font-size: 13px; }
.h-atlas { flex: 0 1 auto; display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--linea); border-radius: 14px; padding: 9px 16px 9px 12px; }
.h-atlas b { font-size: 15px; letter-spacing: -0.01em; }

/* Calendario a todo el ancho; debajo, en fila: contadores, próximas fechas y leyenda */
.k-rejilla { grid-template-columns: minmax(0, 1fr); }
.k-lateral { display: grid; grid-template-columns: minmax(200px, .75fr) minmax(0, 1.7fr) minmax(220px, 1fr); gap: 16px; align-items: start; }
.k-lateral > .k-kpis { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0; }
.k-lateral > .tarjeta { margin: 0; height: 100%; }
.k-dia { min-height: 132px; }
@media (max-width: 1000px) { .k-lateral { grid-template-columns: minmax(0, 1fr); } .k-lateral > .k-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.firmas-titulares { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; } .firmas-titulares > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.otras-partes { display: flex; flex-direction: column; gap: 8px; padding: 12px 0 4px; } .otra-parte { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }

/* Hoy › Jurisprudencia PUF */
.h-juris-fila { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; border-top: 1px solid var(--linea); color: inherit; text-decoration: none; }
.h-juris-fila:hover .h-juris-tit { text-decoration: underline; }
.h-juris-meta { font-size: 12.5px; color: var(--gris, #5B6577); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.h-juris-tit { font-weight: 700; font-size: 14.5px; }
.h-juris-res { font-size: 13.5px; color: var(--gris, #5B6577); }
.h-juris-pie { font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 10px; border-top: 1px solid var(--linea); }

/* Ventanas emergentes */
.dialogo { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 0; border: 0; border-radius: 16px; box-shadow: 0 24px 60px rgba(24,35,58,.28); display: flex; flex-direction: column; }
.dialogo:not([open]) { display: none; }
.dialogo::backdrop { background: rgba(24,35,58,.45); }
.dialogo-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--linea); }
.dialogo-cab h2 { margin: 0; font-size: 18px; }
.dialogo-cuerpo { overflow-y: auto; padding: 4px 20px; }
.dialogo .h-juris-pie { padding: 12px 20px 16px; }
.h-juris { display: flex; flex-direction: column; gap: 10px; }

/* Hoy › franja de avisos y «Ver todas» */
.h-avisos { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.h-avisos-tit { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gris, #5B6577); margin-right: 4px; }
.h-aviso { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--linea); background: var(--blanco, #fff); color: inherit;
  border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.h-aviso b { background: #EEF1F5; border-radius: 999px; padding: 1px 8px; font-size: 12.5px; }
.h-aviso.rojo { border-color: #F3C4C0; } .h-aviso.rojo b { background: #FDECEA; color: #B3261E; }
.h-aviso.ambar { border-color: #F5DFA0; } .h-aviso.ambar b { background: #FFF4D6; color: #8A5F00; }
.h-aviso:hover { border-color: var(--tinta, #18233A); }
.h-ver-todo { align-self: center; }
.h-ver-todo-pie { display: flex; justify-content: center; padding: 12px; border-top: 1px solid var(--linea); }
.dialogo .h-alta, .dialogo .validar-tarjeta, .dialogo .h-fila, .dialogo .h-esp-fila { margin-top: 10px; }

.h-juris .cab-bloque { padding: 0; }

/* Calendario de lunes a viernes: marca de la fecha real de lo que cae en fin de semana */
.k-finde { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 0 5px; border-radius: 4px; background: rgba(24,35,58,.08); }
.k-ev.grande .k-finde { align-self: flex-start; }

/* Tareas › Pendiente de tu validación: tarjetas en crudo (paleta beige) que combinan con el azul de los botones */
.validar-bloque { display: flex; flex-direction: column; gap: 12px; margin: 0 0 20px; }
.validar-bloque .cab { display: flex; align-items: center; gap: 10px; }
.validar-n { background: #18233A; color: #fff; border-radius: 999px; padding: 1px 10px; font-size: 13.5px; font-weight: 700; }
.validar-tarjeta.beige { background: #F3EEE4; border: 1px solid #E2D8C6; border-left: 4px solid #BFA77F; }
.validar-tarjeta.beige .validar-autor { background: #FBF8F2; border-color: #E8DFD0; }
.validar-exp { font-size: 13.5px; color: var(--gr, #5B6577); text-decoration: none; }
.validar-exp:hover { text-decoration: underline; color: var(--tinta, #18233A); }
.btn.amarillo { background: #FFC53D; border-color: #F0B21E; color: #18233A; font-weight: 700; }
.btn.amarillo:hover { background: #F5B92A; }

/* Tipografía: cifras de ancho fijo donde se comparan importes y fechas, y párrafos largos más aireados */
table, .h-kpi-n, .h-res-n, .cifra, .importe, .num, .t-n, .agenda-hora, .k-lista-fecha { font-variant-numeric: tabular-nums; }
.tarjeta p, .dialogo-cuerpo p { line-height: 1.6; }

/* Mi perfil › Seguridad, y aviso en Hoy si hay protecciones desactivadas */
.seg-fila { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--linea); flex-wrap: wrap; }
.seg-texto { display: flex; flex-direction: column; gap: 4px; flex: 1 1 420px; min-width: 0; }
.seg-texto b { display: inline-flex; align-items: center; gap: 8px; }
.seg-texto .chip { align-self: flex-start; }
.aviso-seguridad { background: #FDECEA; border: 1px solid #F3C4C0; color: #8C1D15; border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; font-size: 14.5px; }

.seg-grupo { margin: 14px 0 0; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gr, #5B6577); }

/* ---------- Atlas: espacios ---------- */
/* Accidentia: la misma plataforma en verde (la variable de tinta colorea el menú, los botones principales y los títulos) */
body.espacio-accidentia { --tinta: #2F4A40; --tinta-2: #3E5E53; --ambar: #8FBBA2; }
/* Cambiar de espacio desde el logo */
.marca-espacio { position: relative; }
.marca-espacio > summary { list-style: none; cursor: pointer; border-radius: 10px; }
.marca-espacio > summary::-webkit-details-marker { display: none; }
.marca-espacio > summary:hover { background: rgba(255,255,255,.07); }
.marca-flecha { margin-left: auto; fill: none; stroke: #fff; stroke-width: 2.2; opacity: .8; transition: transform .15s; }
.marca-espacio[open] .marca-flecha { transform: rotate(180deg); }
.espacios-menu { position: fixed; z-index: 60; top: 64px; left: 14px; width: 300px;  /* fijo: el lateral recorta lo que sobresale */ background: #fff; color: #18233A; border-radius: 14px;
  box-shadow: 0 18px 48px rgba(11,18,32,.28); padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.espacios-menu-tit { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5B6577; padding: 4px 8px 6px; }
.espacios-menu form { margin: 0; }
.espacios-menu button, .espacios-menu-actual { display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center;
  width: 100%; text-align: left; border: 0; background: none; border-radius: 10px; padding: 8px; color: #18233A; font: inherit; cursor: pointer; }
.espacios-menu button:hover { background: #F3F5F8; }
.espacios-menu svg { grid-row: span 2; border-radius: 9px; padding: 4px; box-sizing: content-box; }
.espacios-menu b { font-size: 15px; }
.espacios-menu span:not(.espacios-menu-tit) { font-size: 12.5px; color: #5B6577; line-height: 1.35; }
.espacios-menu-actual { cursor: default; background: #F3F5F8; }
.espacio-opcion-reintegra svg { background: #18233A; }
.espacio-opcion-accidentia svg { background: #2F4A40; }
.menu-mini .espacios-menu { left: 0; }
/* Pantalla para elegir espacio al entrar */
.elegir-espacio { min-height: 100vh; max-width: 900px; margin: 0 auto; padding: 56px 24px; display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.elegir-cab { display: flex; align-items: center; gap: 14px; }
.elegir-cab h1 { font-size: 28px; }
.elegir-cab p { margin: 2px 0 0; font-size: 16px; }
.elegir-opciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.elegir-opciones form { margin: 0; display: flex; }
.espacio-tarjeta { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; border: 0; border-radius: 18px; padding: 26px;
  color: #fff; font: inherit; cursor: pointer; box-shadow: 0 10px 30px rgba(11,18,32,.16); transition: transform .12s, box-shadow .12s; min-height: 240px; }
.espacio-tarjeta:hover, .espacio-tarjeta:focus-visible { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(11,18,32,.24); }
.espacio-tarjeta-reintegra { background: #18233A; }
.espacio-tarjeta-accidentia { background: #2F4A40; }
.espacio-tarjeta-nombre { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.espacio-tarjeta-desc { font-size: 15px; line-height: 1.5; opacity: .85; }
.espacio-tarjeta-entrar { margin-top: auto; font-weight: 700; font-size: 14.5px; border-radius: 10px; padding: 9px 16px; color: #18233A; }
.espacio-tarjeta-reintegra .espacio-tarjeta-entrar { background: #FFC53D; }
.espacio-tarjeta-accidentia .espacio-tarjeta-entrar { background: #8FBBA2; color: #1B2B25; }
.elegir-pie { margin: 0; font-size: 14px; }
.elegir-salir { margin: -16px 0 0; }
.elegir-salir button { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: #5B6577; text-decoration: underline; cursor: pointer; }

/* Acceso a los espacios */
.acceso-tabla td, .acceso-tabla th { vertical-align: middle; }
.acceso-casilla { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; }
.acceso-casilla input { width: 20px; height: 20px; }
@media (max-width: 1365px) {  /* portátiles: el aviso de la guía y Atlas siguen cabiendo en una sola fila */
  .h-dudas .muted, .h-atlas .muted { font-size: 12.5px; }
  .h-dudas b, .h-atlas b { font-size: 14px; }
  .h-dudas { gap: 10px; }
  .h-dudas .btn { padding-left: 12px; padding-right: 12px; }
  .h-atlas svg { width: 26px; height: 26px; }
  .h-franja { gap: 10px; }
}

/* ---------- Atlas: inicio de sesión con panel lateral (Iustitia) ---------- */
.acceso { min-height: 100vh; display: flex; flex-wrap: wrap; }
.acceso-panel { flex: 1 1 560px; color: #fff; padding: 48px 56px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.acceso-marca { display: flex; align-items: center; gap: 14px; }
.acceso-marca > div { display: flex; flex-direction: column; gap: 2px; }
.acceso-nombre { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.acceso-lema { font-size: 14.5px; color: #D5DBE3; }
.acceso-figura { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.iustitia { display: block; width: auto; height: min(56vh, 520px); max-width: 100%; }
.acceso-cita { margin: 0; display: flex; flex-direction: column; gap: 6px; max-width: 460px; }
.acceso-cita blockquote { margin: 0; font-size: 17px; line-height: 1.5; font-style: italic; color: #F1F3F6; }
.acceso-cita figcaption { font-size: 13.5px; color: #C9D1DC; }
.acceso-lado { flex: 1 1 480px; background: var(--fondo); padding: 48px 32px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
.acceso-form { width: 100%; max-width: 400px; padding: 32px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 14px 40px rgba(11,18,32,.08); }
.acceso-titulo h1 { font-size: 24px; }
.acceso-titulo p { margin: 4px 0 0; font-size: 14.5px; }
.acceso-olvido { font-size: 14.5px; color: #4E5869; text-align: center; }
@media (max-width: 900px) {  /* móvil: el panel arriba, compacto, y el formulario enseguida */
  .acceso-panel { flex-basis: 100%; padding: 24px; gap: 0; }
  .acceso-figura, .acceso-cita { display: none; }
  .acceso-lado { padding: 24px 16px 40px; }
}

/* Elegir espacio: Iustitia en el centro, entre los dos espacios (ámbar del lado de Reintegra, verde del de Accidentia) */
.elegir-espacio { max-width: 1120px; }
.elegir-con-figura { grid-template-columns: minmax(260px, 1fr) auto minmax(260px, 1fr); align-items: center; }
.elegir-figura { display: flex; align-items: center; justify-content: center; padding: 0 8px; }
.elegir-figura .iustitia { height: 380px; }
@media (max-width: 860px) {
  .elegir-con-figura { grid-template-columns: minmax(0, 1fr); }
  .elegir-figura { order: -1; }
  .elegir-figura .iustitia { height: 180px; }
}

/* Atlas: primer acceso (página propia, fuera de los espacios) */
.atlas-pagina { max-width: 1040px; margin: 0 auto; padding: 40px 24px 56px; display: flex; flex-direction: column; gap: 20px; }
.atlas-pagina-marca { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.atlas-pagina .primer-acceso { display: flex; flex-direction: column; gap: 18px; }
.atlas-pagina-acciones { display: flex; align-items: center; gap: 14px; }


/* Los permisos del colaborador se presentan en una fila flexible y solo saltan de línea si falta espacio. */
.grupo-colaborador-permisos > .mis-datos {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: 10px 18px;
}
.grupo-colaborador-permisos > .mis-datos > .casilla {
  flex: 0 1 auto;
  min-width: min(220px, 100%);
}


/* Aviso transparente del seguimiento mínimo de actividad. */
.aviso-actividad {
  margin: 0 0 12px;
  padding: 7px 11px;
  border: 1px solid var(--linea);
  border-radius: 8px;
  color: var(--gr);
  background: var(--fondo-suave, #F7F8FA);
  font-size: 12px;
  line-height: 1.45;
}


.x-paginacion { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; color: var(--gr); font-size: 13px; }
.x-paginacion > span:last-child { display: flex; gap: 14px; }
.x-paginacion a { color: var(--tinta); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
