/* Velia 1.6 — estilo inspirado en Big School (titulares Bebas Neue, fondo casi negro, cifras grandes)
   y MKT Hackers (botones con degradado, tarjetas translúcidas, etiquetas píldora, barra de anuncio) */
@font-face { font-family: "Bebas Neue"; src: url(fonts/bebas-neue-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Manrope"; src: url(fonts/manrope-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Manrope"; src: url(fonts/manrope-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Manrope"; src: url(fonts/manrope-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Manrope"; src: url(fonts/manrope-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Manrope"; src: url(fonts/manrope-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Titillium Web"; src: url(fonts/titillium-web-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Titillium Web"; src: url(fonts/titillium-web-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --font: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-display: "Titillium Web", "Segoe UI", sans-serif;
  --font-titular: "Bebas Neue", "Impact", "Arial Narrow", sans-serif;
  --bg: #f6f5f4;
  --surface: #ffffff;
  --surface-2: #f8f7f6;
  --border: #e6e3e1;
  --text: #121214;
  --text-2: #55545b;
  --accent: #9e1f32;
  --accent-2: #c42d45;
  --accent-soft: #f7e4e8;
  --grad: linear-gradient(135deg, #c42d45 0%, #8e1a2c 100%);
  --glow: 0 10px 28px rgba(179, 38, 58, .32);
  --radius: 16px;
}
:root[data-theme="dark"] {
  --bg: #0e0e10;
  --surface: #17171a;
  --surface-2: #1e1e22;
  --border: #2a2a30;
  --text: #f4f3f5;
  --text-2: #b9b7be;
  --muted: #85838b;
  --accent: #e24a62;
  --accent-2: #ff7086;
  --accent-soft: #2e141a;
  --warm-soft: #1d1d22;
  --side: #09090a;
  --side-active: #1c1114;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 12px 32px rgba(0,0,0,.35);
}

body { font-family: var(--font); font-weight: 500; letter-spacing: -.005em; }
h1, .hello h1 { font-family: var(--font-titular); font-weight: 400; text-transform: uppercase; letter-spacing: .02em; font-size: 46px; line-height: .95; }
.hello h1 { font-size: 56px; }
h2 { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: 0; }
h3 { font-family: var(--font-display); font-weight: 700; }
.page-head p { font-size: 15px; }

/* Marca */
.brand b { font-family: var(--font-titular); font-weight: 400; font-size: 27px; letter-spacing: .06em; line-height: 1; }
.brand small { font-size: 11px; }

/* Barra de anuncio (cuenta atrás del próximo plazo) */
.anuncio { background: linear-gradient(90deg, #6e1222, #b3263a 50%, #6e1222); color: #fff; font-size: 13px; font-weight: 600; text-align: center; padding: 7px 14px; display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.anuncio a { color: #fff; text-decoration: underline; }
.anuncio .cd { font-family: var(--font-titular); font-size: 17px; letter-spacing: .05em; background: rgba(0,0,0,.25); border-radius: 6px; padding: 0 7px; }
.anuncio:empty { display: none; }
/* Aviso sin abrir: parpadea en amarillo y rojo hasta que el usuario lo abre */
.anuncio.parpadea { animation: anuncioParpadeo 1s steps(1, end) infinite; font-size: 14px; padding: 9px 14px; box-shadow: 0 0 0 3px #ffd400 inset; }
.anuncio.parpadea .cd { background: rgba(0,0,0,.35); }
@keyframes anuncioParpadeo { 0% { background: linear-gradient(90deg, #6e1222, #e0102a 50%, #6e1222); color: #fff; } 50% { background: #ffd400; color: #6e1222; } }
.anuncio.parpadea:nth-child(n) a { color: inherit; font-weight: 800; }

/* Botones */
.btn { border-radius: 8px; font-weight: 700; padding: 9px 16px; }
.btn.sm { font-weight: 700; }
.btn.primary { background: var(--grad); border: 0; color: #fff; box-shadow: var(--glow); }
.btn.primary:hover { color: #fff; filter: brightness(1.08); transform: translateY(-1px); }
:root[data-theme="dark"] .btn.primary { color: #fff; }
:root[data-theme="dark"] .btn:not(.primary):not(.ghost) { background: rgba(255,255,255,.04); border-color: #33333a; }
:root[data-theme="dark"] .btn:not(.primary):hover { border-color: var(--accent); color: #fff; }

/* Tarjetas */
.card { border-radius: var(--radius); transition: transform .15s, border-color .15s; }
:root[data-theme="dark"] .card { background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015)), var(--surface); }
.card.kpi:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.kpi .l { text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; font-weight: 700; }
.kpi .v { font-family: var(--font-titular); font-weight: 400; font-size: 42px; letter-spacing: .02em; line-height: 1.05; }

/* Cabecera de bienvenida tipo "hero" */
.hello { border-radius: 22px; padding: 28px 30px; border: 1px solid var(--border); background: radial-gradient(circle at 92% -10%, rgba(179, 38, 58, .28), transparent 55%), var(--surface); }
:root[data-theme="dark"] .hello { background: radial-gradient(circle at 92% -10%, rgba(226, 74, 98, .30), transparent 55%), radial-gradient(circle at 0% 120%, rgba(255,255,255,.05), transparent 50%), #121215; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); margin-bottom: 12px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }

/* Barra lateral */
.side { background: var(--side); }
.nav-group > span { text-transform: uppercase; letter-spacing: .1em; font-size: 10.5px; }
.nav a { font-weight: 600; }
.nav a.active { background: rgba(196, 45, 69, .16); box-shadow: inset 3px 0 0 #e24a62; }

/* Formularios, pestañas y píldoras */
:root[data-theme="dark"] input[type=text], :root[data-theme="dark"] input[type=number], :root[data-theme="dark"] input[type=date], :root[data-theme="dark"] input[type=time], :root[data-theme="dark"] input[type=datetime-local], :root[data-theme="dark"] input[type=email], :root[data-theme="dark"] input[type=tel], :root[data-theme="dark"] input[type=search], :root[data-theme="dark"] input[type=password], :root[data-theme="dark"] select, :root[data-theme="dark"] textarea { background: #121215; border-color: #2e2e34; }
.tabs a { font-weight: 700; }
.tabs a.active { border-bottom-width: 3px; }
.pill { font-weight: 700; }
.topbar { backdrop-filter: none; }
.search { border-radius: 10px; }
.modal { border-radius: 20px; }
:root[data-theme="dark"] .modal { background: #151518; }
:root[data-theme="dark"] .doc-preview { background: #fff; }

/* ===== 1.3: asistente y voz ===== */
.mic-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 7px 10px; cursor: pointer; font-weight: 700; font-size: 13px; transition: all .15s; }
.mic-btn:hover { color: var(--accent); border-color: var(--accent); }
.mic-btn.top { margin-left: 4px; }
.mic-btn.modal-mic { padding: 6px; margin-right: 4px; }
body.escuchando .mic-btn { background: var(--grad); color: #fff; border-color: transparent; animation: pulso 1.2s ease-in-out infinite; }
@keyframes pulso { 0%, 100% { box-shadow: 0 0 0 0 rgba(196, 45, 69, .55); } 50% { box-shadow: 0 0 0 9px rgba(196, 45, 69, 0); } }
.voz-burbuja { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 90; display: flex; gap: 14px; align-items: center; background: #18181b; color: #fff; padding: 14px 20px; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.35); border: 1px solid #333; max-width: min(640px, 92vw); }
.voz-burbuja b { font-size: 13px; color: #f08c9b; } .voz-t { font-size: 15px; margin-top: 2px; }
.onda { display: inline-flex; gap: 3px; align-items: center; height: 22px; } .onda i { width: 4px; background: #e24a62; border-radius: 3px; animation: onda 0.9s ease-in-out infinite; } .onda i:nth-child(2) { animation-delay: .15s; } .onda i:nth-child(3) { animation-delay: .3s; } .onda i:nth-child(4) { animation-delay: .45s; }
@keyframes onda { 0%, 100% { height: 6px; } 50% { height: 22px; } }
.asis-fab { position: fixed; right: 22px; bottom: 22px; z-index: 45; display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; background: var(--grad); color: #fff; font-weight: 800; padding: 12px 18px; border-radius: 999px; box-shadow: var(--glow); font-family: var(--font); font-size: 14px; }
.asis-fab:hover { filter: brightness(1.08); transform: translateY(-1px); }
.asis-ov { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.asis-ov.on { pointer-events: auto; }
.asis { position: absolute; right: 18px; bottom: 18px; top: 18px; width: min(420px, calc(100vw - 36px)); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.35); display: flex; flex-direction: column; transform: translateX(calc(100% + 40px)); transition: transform .25s ease; }
.asis-ov.on .asis { transform: none; }
.asis-h { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.asis-h b { font-family: var(--font-titular); font-weight: 400; font-size: 22px; letter-spacing: .04em; display: block; line-height: 1; } .asis-h small { color: var(--muted); font-size: 11.5px; }
.asis-b { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.asis-m { display: flex; flex-direction: column; gap: 6px; max-width: 92%; }
.asis-m.yo { align-self: flex-end; } .asis-m.yo .burbuja { background: var(--grad); color: #fff; border-radius: 16px 16px 4px 16px; }
.asis-m.bot .burbuja { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px 16px 16px 4px; }
.burbuja { padding: 10px 13px; line-height: 1.5; font-size: 13.5px; } .burbuja ol { margin: 6px 0 0; padding-left: 18px; } .burbuja li { margin: 3px 0; }
.asis-acc { display: flex; gap: 6px; flex-wrap: wrap; }
.link-art { display: block; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 3px 0; text-align: left; font: inherit; font-size: 13px; text-decoration: underline; }
.asis-sug { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 10px; }
.chip-s { border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); border-radius: 999px; padding: 5px 10px; font-size: 12px; cursor: pointer; font-family: var(--font); }
.chip-s:hover { border-color: var(--accent); color: var(--accent); }
.asis-f { display: flex; gap: 6px; padding: 12px; border-top: 1px solid var(--border); align-items: center; }
.asis-f input { flex: 1; }
.puntos { display: inline-flex; gap: 4px; } .puntos i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: onda2 1s infinite; } .puntos i:nth-child(2) { animation-delay: .15s; } .puntos i:nth-child(3) { animation-delay: .3s; }
@keyframes onda2 { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
@media (max-width: 800px) { .mic-btn.top span { display: none; } .asis-fab span { display: none; } .asis-fab { padding: 14px; } }
@media print { .asis-fab, .asis-ov, .mic-btn { display: none !important; } }

.toasts { bottom: 84px; }

/* Botón Salir (amarillo fosforito) y pantalla de despedida */
.btn-salir { background: #d4ff00; color: #111; border: 0; font-weight: 800; font-family: var(--font); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; padding: 8px 16px; border-radius: 8px; cursor: pointer; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 4px 14px rgba(212, 255, 0, .45); margin-left: 4px; }
.btn-salir:hover { background: #e4ff4d; box-shadow: 0 0 0 1px rgba(0,0,0,.1), 0 6px 20px rgba(212, 255, 0, .65); }
.adios { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; background: var(--bg); color: var(--text); font-family: var(--font); }
.adios p { color: var(--text-2); line-height: 1.6; }
@media print { .btn-salir { display: none !important; } }

/* 1.4 — Datos de programas anteriores */
#refDocs { margin-top: 16px; }
.lg-tab { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: 10px; color: var(--text); text-decoration: none; }
.lg-tab span { font-size: 12px; color: var(--muted); }
.lg-tab:hover { background: var(--surface-2); }
.lg-tab.on { background: var(--accent-soft); color: var(--accent); }
.lg-cols td { background: var(--surface); }
@media (max-width: 760px) { #lgGrid { grid-template-columns: 1fr !important; } }

/* 1.5 — Expediente: correo, agenda y LexNET */
@media (max-width: 1100px) { #mailGrid { grid-template-columns: 1fr !important; } }
#mailGrid .check { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; line-height: 1.4; }
.tabs { overflow-x: auto; scrollbar-width: thin; }
.tabs a { white-space: nowrap; }

/* 1.6 — Agenda por día, semana y mes */
.ag-vistas { gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; }
.ag-dia { display: flex; flex-direction: column; gap: 8px; }
.ag-item { display: flex; gap: 14px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--info); cursor: pointer; }
.ag-item.senalamiento { border-left-color: var(--bad); } .ag-item.termino { border-left-color: var(--warn); } .ag-item.aviso { border-left-color: var(--accent-2); }
.ag-item.done { opacity: .6; } .ag-item:hover { background: var(--accent-soft); }
.ag-hora { min-width: 64px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ag-semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); min-height: 420px; }
.ag-col { border-right: 1px solid var(--border); padding: 4px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; min-width: 0; }
.ag-col:last-child { border-right: 0; }
.ag-col.today { background: var(--accent-soft); }
.ag-col.inh { background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(128,128,128,.07) 8px 16px); }
.ag-cab { text-align: center; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.ag-cab:hover { color: var(--accent); }
.ag-col .ev { white-space: normal; }
@media (max-width: 900px) { .ag-semana { grid-template-columns: 1fr; } .ag-col { border-right: 0; border-bottom: 1px solid var(--border); } }

/* 1.7 — Documentos y correos de cada anotación del historial */
.adjs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.adj { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 12.5px; color: var(--text); text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adj:hover { border-color: var(--accent); color: var(--accent); }
.adj.mail { background: var(--info-soft); color: var(--info); border-color: transparent; }

/* 1.8 — Documentos sueltos en el seguimiento */
.tl.doc { opacity: .95; } .tl.doc .h b { font-weight: 600; }

/* 1.8 — Aviso en verde */
.banner.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }

/* 1.9 — Alertas inteligentes */
.alertas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.alerta { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--info); color: var(--text); text-decoration: none; }
.alerta b { font-size: 22px; min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }
.alerta span { font-size: 13px; line-height: 1.3; }
.alerta.bad { border-left-color: var(--bad); } .alerta.bad b { color: var(--bad); }
.alerta.warn { border-left-color: var(--warn); } .alerta.warn b { color: var(--warn); }
.alerta:hover, .alerta.on { background: var(--accent-soft); }

/* 1.11 — Navegación repartida: menús de gestión en la barra superior */
.topnav { display: flex; gap: 4px; padding: 6px 22px; background: var(--surface); border-bottom: 1px solid var(--border); position: relative; z-index: 30; flex-wrap: wrap; }
.tn-menu { position: relative; }
.tn-btn { display: inline-flex; align-items: center; gap: 7px; background: transparent; border: 1px solid transparent; color: var(--text-2); font-weight: 600; font-size: 13.5px; padding: 6px 12px; border-radius: 9px; cursor: pointer; }
.tn-btn:hover, .tn-menu.open .tn-btn { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.tn-btn.active { color: var(--text); box-shadow: inset 0 -2px 0 #e24a62; }
.tn-btn .badge.red { background: #b3263a; color: #fff; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 7px; }
.tn-car { font-size: 10px; opacity: .7; }
.tn-pop { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 250px; background: var(--side); border: 1px solid var(--border); border-radius: 12px; padding: 6px; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.tn-menu.open .tn-pop { display: block; }
.tn-pop a { white-space: nowrap; }
.nav-group.solo-movil { display: none; }
@media (max-width: 800px) { .topnav { display: none; } .nav-group.solo-movil { display: block; } }
/* 1.12 — Usabilidad: menús del expediente, vista dividida, densidad, móvil y guía */
.dd { position: relative; display: inline-block; }
.dd-pop { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 35; min-width: 230px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 6px; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.dd.open .dd-pop { display: block; }
.dd-pop button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit; }
.dd-pop button:hover { background: var(--surface-2); }
.content.split { display: grid; grid-template-columns: minmax(420px, 42%) 1fr; grid-template-rows: auto auto 1fr; gap: 0 16px; }
.content.split > .page-head, .content.split > .toolbar { grid-column: 1 / -1; }
.content.split .split-lista { overflow: auto; max-height: calc(100vh - 230px); }
.content.split .split-lista tr.sel td { background: var(--accent-soft); }
.split-ficha { overflow: auto; max-height: calc(100vh - 230px); padding: 14px; }
.split-ficha .page-head h1 { font-size: 22px; }
body.compacta .card-b, body.compacta .card-h { padding: 8px 12px; } body.compacta .t td, body.compacta .t th { padding: 4px 8px; } body.compacta .list-item { padding: 5px 0; } body.compacta .nav a { padding: 4px 10px; } body.compacta .content { padding: 14px 18px 60px; }
body.amplia .card-b { padding: 22px; } body.amplia .t td { padding: 12px 12px; } body.amplia .list-item { padding: 12px 0; }
.hoy-it { align-items: center; gap: 10px; } .bq-sel, .hoy-sel { width: 16px; height: 16px; flex: none; }
.toolbar.bloque { position: sticky; top: 0; z-index: 20; background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; }
#barraMovil { display: none; }
@media (max-width: 800px) {
  #barraMovil { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--side); border-top: 1px solid var(--border); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  #barraMovil button { flex: 1; background: none; border: 0; color: var(--side-text); font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; }
  #barraMovil button span { font-size: 19px; }
  .content { padding-bottom: 90px !important; } .asis-fab { bottom: 76px; }
  .page-head .actions .btn { padding: 6px 9px; } .dd-pop { right: auto; left: 0; }
  .t { font-size: 13px; } .tablewrap { overflow-x: auto; }
}
#guia { position: fixed; inset: 0; z-index: 10000; pointer-events: none; }
.guia-hueco { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,.6); border: 2px solid #e24a62; transition: all .25s; }
.guia-caja { position: fixed; width: 320px; background: var(--surface); color: var(--text); border-radius: 14px; padding: 16px; box-shadow: 0 16px 40px rgba(0,0,0,.5); pointer-events: auto; }
.guia-caja h3 { margin: 4px 0 6px; }
@media (max-width: 800px) { .hoy-it { flex-wrap: wrap; } .hoy-it > .row:last-child { width: 100%; justify-content: flex-end; } .page-head h1 { font-size: 24px; } }

/* 1.12.2 — Nombres de la barra lateral y de la superior más visibles */
.nav a, :root[data-theme="dark"] .nav a { color: #f1eff4; font-size: 14.5px; font-weight: 650; letter-spacing: .01em; }
.nav a .ico, :root[data-theme="dark"] .nav a .ico { color: #f0a3af; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.09); }
.nav a.active, :root[data-theme="dark"] .nav a.active { color: #fff; font-weight: 750; background: rgba(226, 74, 98, .28); }
.nav-group > span, :root[data-theme="dark"] .nav-group > span { color: #f3c2ca; font-size: 11.5px; font-weight: 800; letter-spacing: .12em; }
.tn-btn { color: var(--text); font-size: 14.5px; font-weight: 750; letter-spacing: .01em; }
.tn-btn:hover, .tn-menu.open .tn-btn { color: var(--text); }
.tn-btn.active { box-shadow: inset 0 -3px 0 #e24a62; }
.tn-pop a { color: #f1eff4; font-weight: 650; font-size: 14px; }
.tn-pop a .ico { color: #f0a3af; }
/* 1.15.2 — Seguimiento del expediente: línea de tiempo más legible */
.seg-sec .card-h { display: flex; align-items: baseline; gap: 10px; }
.seg-sec.prox { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.seg-mes { font-family: var(--font-display); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #85838b); margin: 18px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.seg-mes:first-child { margin-top: 0; }
.seg-lista { display: flex; flex-direction: column; gap: 10px; }
.seg-it { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); border-left: 4px solid var(--border); transition: border-color .15s, background .15s; }
.seg-it:hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.seg-it.senalamiento { border-left-color: var(--bad); } .seg-it.termino { border-left-color: var(--warn); } .seg-it.agenda { border-left-color: var(--info); }
.seg-it.historial { border-left-color: var(--text-2); } .seg-it.aviso { border-left-color: var(--accent-2); } .seg-it.doc { border-left-color: var(--border); padding: 8px 14px; }
.seg-it.hecho { opacity: .62; } .seg-it.hecho .seg-t { text-decoration: line-through; text-decoration-thickness: 1px; }
.seg-ic { flex: 0 0 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: var(--surface); border: 1px solid var(--border); }
.seg-it.senalamiento .seg-ic { background: var(--bad-soft); border-color: transparent; } .seg-it.termino .seg-ic { background: var(--warn-soft); border-color: transparent; } .seg-it.agenda .seg-ic { background: var(--info-soft); border-color: transparent; }
.seg-c { flex: 1; min-width: 0; }
.seg-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.seg-meta b { color: var(--text); font-size: 13px; }
.seg-tipo { text-transform: uppercase; font-size: 11px; font-weight: 700; letter-spacing: .05em; }
.seg-it.senalamiento .seg-tipo { color: var(--bad); } .seg-it.termino .seg-tipo { color: var(--warn); } .seg-it.agenda .seg-tipo { color: var(--info); }
.seg-acc { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; opacity: .35; transition: opacity .15s; }
.seg-it:hover .seg-acc, .seg-acc:focus-within { opacity: 1; }
.seg-t { font-weight: 700; font-size: 15px; line-height: 1.35; margin-top: 4px; color: var(--text); }
.seg-lugar { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.seg-d { margin-top: 6px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.seg-dt { white-space: pre-wrap; }
.seg-d.corto .seg-dt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.seg-d.corto.abierto .seg-dt { display: block; }
.seg-cita { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--border); background: var(--surface); border-radius: 0 10px 10px 0; font-size: 13px; color: var(--text-2); font-style: italic; }
.seg-cita span { display: block; font-style: normal; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #85838b); margin-bottom: 2px; }
.seg-av { margin-top: 8px; }
.seg-avl { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; padding-left: 4px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
@media (max-width: 700px) { .seg-ic { display: none; } .seg-acc { opacity: 1; } }
/* Estado de cada actuación: desplegable en forma de etiqueta, con color según el estado */
.seg-estado { margin-left: auto; width: auto; height: auto; min-height: 0; font-size: 12px; font-weight: 700; padding: 3px 26px 3px 11px; border-radius: 999px; border: 1px solid var(--border); background-color: var(--surface-2); color: var(--text-2); cursor: pointer; }
.seg-estado + .seg-acc { margin-left: 4px; }
.seg-estado.e-hecho { background-color: var(--ok-soft, #e3f4ea); color: var(--ok, #1f7a45); border-color: transparent; }
.seg-estado.e-pendiente { background-color: var(--warn-soft); color: var(--warn); border-color: transparent; }
.seg-estado.e-encurso { background-color: var(--info-soft); color: var(--info); border-color: transparent; }
.seg-estado.e-espera { background-color: var(--surface-2); color: var(--text-2); border-style: dashed; }
.seg-estado.e-agenda { background-color: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); border-color: transparent; }
/* Cajas de actuación más resaltadas: fondo propio, borde y sombra marcados, franja lateral de color más gruesa */
.seg-lista { gap: 12px; }
.seg-it { background: var(--surface); border: 1px solid color-mix(in srgb, var(--text) 18%, var(--border)); border-left-width: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 3px 10px rgba(0,0,0,.07); }
.seg-it.historial { border-left-color: var(--accent); }
.seg-it:hover { box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 8px 20px rgba(0,0,0,.10); transform: translateY(-1px); transition: box-shadow .15s, transform .15s, border-color .15s; }
.seg-it .seg-t { font-size: 15.5px; }
.seg-it.doc { box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.seg-avl[hidden] { display: none; }

/* 1.15.3 — Buscador autocompletable (asociar correos a expedientes y referencias) */
.ac-wrap { position: relative; }
.ac-lista { position: absolute; z-index: 50; left: 0; right: 0; top: 100%; margin-top: 4px; max-height: 300px; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 28px rgba(0,0,0,.25); }
.ac-lista[hidden] { display: none; }
.ac-op { padding: 8px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--border); }
.ac-op:last-child { border-bottom: 0; }
.ac-op span { font-size: 12px; color: var(--text-2); }
.ac-op.on, .ac-op:hover { background: var(--accent-soft); }
.ac-vacio { padding: 10px 12px; font-size: 13px; color: var(--text-2); }
.seg-modo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--border); }

/* 1.15.4 — Expedientes: situación en botones y sentido del orden */
.exp-sit { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chip-sit { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip-sit span { margin-left: 4px; font-size: 11.5px; opacity: .7; }
.chip-sit:hover { border-color: var(--accent); color: var(--accent); }
.chip-sit.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

/* LexNET: segundo contador (escritos listos para presentar) */
.nav a .badge + .badge { margin-left: 4px; }
.nav a .badge.listos { background: #b7791f; color: #fff; }


/* Guía paso a paso: textos literales de la interfaz, índice, tarjeta flotante y elementos señalados */
.ui-txt { background: var(--accent-soft, rgba(158,31,50,.1)); color: var(--accent); border-radius: 4px; padding: 0 5px; font-weight: 600; }
.guia-w { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 16px; min-height: 60vh; }
.guia-i { border-right: 1px solid var(--border); padding-right: 12px; max-height: 68vh; overflow: auto; }
.guia-i input { width: 100%; margin-bottom: 8px; }
.guia-l details { margin-bottom: 4px; } .guia-l summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.guia-l .link-art { text-decoration: none; padding: 4px 6px; border-radius: 6px; width: 100%; }
.guia-l .link-art:hover, .guia-l .link-art.on { background: var(--accent-soft, rgba(158,31,50,.1)); }
.guia-a { max-height: 68vh; overflow: auto; }
.guia-pasos li { margin: 0 0 8px; line-height: 1.6; }
@media (max-width: 760px) { .guia-w { grid-template-columns: 1fr; } .guia-i { border-right: 0; max-height: 34vh; } }
.guia-flota { position: fixed; left: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px)); z-index: 9999; background: var(--surface); color: var(--text); border: 2px solid #f5b301; border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.3); padding: 12px 14px; display: grid; gap: 8px; }
.guia-flota .gf-h { display: flex; align-items: center; gap: 8px; } .guia-flota .gf-h b { flex: 1; }
.guia-flota .gf-p { line-height: 1.55; } .guia-flota .gf-nota { color: var(--muted); }
.guia-foco { outline: 3px solid #f5b301 !important; outline-offset: 2px; box-shadow: 0 0 0 7px rgba(245,179,1,.35) !important; border-radius: 6px; animation: guiaPulso 1.3s ease-in-out infinite; }
@keyframes guiaPulso { 50% { box-shadow: 0 0 0 12px rgba(245,179,1,.12) !important; } }
@media (prefers-reduced-motion: reduce) { .guia-foco { animation: none; } }
