/* ==========================================================================
   LAPSI.MX — PANEL CLÍNICO PSICOLÓGICO
   Tema: sidebar oscuro morado + contenido claro
   ========================================================================== */


html { scroll-behavior: smooth; }
.card[id^="sec-"] { scroll-margin-top: 96px; }

:root {
  --lp-primary: #6366f1;
  --lp-primary-dark: #4f46e5;
  --lp-primary-soft: #eef2ff;
  --lp-teal: #0ea5b7;
  --lp-teal-soft: #e6f7f9;
  --lp-bg: #f4f5fa;
  --lp-bg-card: #ffffff;
  --lp-sidebar-bg: #101024;
  --lp-sidebar-bg-2: #1a1233;
  --lp-border: #e6e8f0;
  --lp-text: #232538;
  --lp-text-muted: #6b7280;
  --lp-success: #16a34a;
  --lp-danger: #dc2626;
  --lp-warning: #d97706;
  --lp-radius: 14px;
  --lp-shadow: 0 4px 20px rgba(31, 27, 82, 0.06);
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--lp-bg);
  color: var(--lp-text);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, .card-title, .brand-title {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

#wrapper { min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: 264px;
  min-width: 264px;
  background: linear-gradient(180deg, var(--lp-sidebar-bg) 0%, var(--lp-sidebar-bg-2) 100%);
  color: #cbd2e9;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 1040;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.psi-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--lp-primary), var(--lp-teal));
  color: #fff;
  font-weight: 800;
  border-radius: 12px;
  font-size: 1.25rem;
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.brand-title { color: #fff; font-size: 1.15rem; line-height: 1.1; }
.brand-title span { color: var(--lp-teal); }
.brand-sub { font-size: 0.72rem; color: #8b93b5; letter-spacing: 0.04em; text-transform: uppercase; }

.sidebar-nav { padding: 0.75rem 0.75rem; flex-grow: 1; overflow-y: auto; }
.sidebar-nav::-webkit-scrollbar { width: 5px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

.nav-section {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #8b93b5;
  padding: 0.9rem 0.85rem 0.35rem;
  font-weight: 600;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #aab2d6;
  border-radius: 10px;
  padding: 0.62rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 2px;
  transition: all 0.15s ease;
}
.sidebar-nav .nav-link i { font-size: 1.05rem; width: 22px; text-align: center; }
.sidebar-nav .nav-link:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.sidebar-nav .nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.85), rgba(14, 165, 183, 0.7));
  box-shadow: 0 6px 14px rgba(99, 102, 241, 0.35);
}

.sidebar-footer { padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,0.07); }
.sidebar-user { display: flex; align-items: center; gap: 0.6rem; color: #fff; }
.sidebar-user-rol { font-size: 0.72rem; color: #8b93b5; }

.avatar-sm, .avatar {
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: linear-gradient(135deg, var(--lp-primary), var(--lp-teal));
  color: #fff;
  flex-shrink: 0;
}
.avatar-sm { width: 36px; height: 36px; font-size: 0.95rem; }
.avatar { width: 40px; height: 40px; font-size: 1rem; }

.btn-logout {
  border: 1px solid rgba(255,255,255,0.14);
  color: #cbd2e9;
  background: transparent;
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
}
.btn-logout:hover { background: rgba(220, 38, 38, 0.12); border-color: rgba(220,38,38,0.4); color: #fff; }

/* ---------- Topbar / contenido ---------- */
.content-wrap { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  background: var(--lp-bg-card);
  border-bottom: 1px solid var(--lp-border);
  padding: 0.7rem 1.25rem;
  gap: 0.5rem;
  position: sticky;
  top: 0;
  z-index: 1030;
}
.topbar-badge {
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--lp-teal);
  background: var(--lp-teal-soft);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-weight: 600;
}
.topbar-date { font-size: 0.8rem; color: var(--lp-text-muted); }

main { flex-grow: 1; }

/* Cabecera de página: el título queda a la izquierda y sus botones (último hijo) al borde derecho; el subtítulo
   (.lead) baja a su propio renglón. El div del título se "disuelve" (display: contents) para que el
   h1 y el .lead sean hijos flex directos de .page-heading. Las acciones (último hijo) se pegan al borde
   derecho con margen automático: así quedan a la derecha aunque la fila se envuelva (con
   justify-content: space-between un renglón con un solo elemento quedaría suelto a la izquierda,
   porque no hay espacio que repartir). */
.page-heading { display: flex; align-items: center; justify-content: flex-start; gap: .25rem .75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-heading > div:first-child { display: contents; }
.page-heading > div:first-child .lead { order: 99; flex-basis: 100%; }
.page-heading > :last-child { margin-left: auto; }
.page-heading h1 { font-size: 1.55rem; margin: 0; }
/* ---------- Tarjetas / tablas ---------- */
.card {
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  box-shadow: var(--lp-shadow);
  background: var(--lp-bg-card);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--lp-border);
  font-weight: 600;
  padding: 0.9rem 1.25rem;
}

.table { margin-bottom: 0; }
.table thead th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lp-text-muted);
  border-bottom-width: 1px;
  white-space: nowrap;
}
.table td { vertical-align: middle; font-size: 0.9rem; }
.table tbody tr:hover { background: #f8f9fd; }

/* ---------- KPI cards (dashboard) ---------- */
.kpi-card {
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  background: var(--lp-bg-card);
  box-shadow: var(--lp-shadow);
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
}
.kpi-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.kpi-icon.indigo { background: var(--lp-primary-soft); color: var(--lp-primary); }
.kpi-icon.teal   { background: var(--lp-teal-soft);   color: var(--lp-teal); }
.kpi-icon.green  { background: #e7f6ec; color: var(--lp-success); }
.kpi-icon.amber  { background: #fdf3e2; color: var(--lp-warning); }
.kpi-value { font-size: 1.6rem; font-weight: 800; line-height: 1.1; font-family: 'Outfit', sans-serif; }
.kpi-label { font-size: 0.82rem; color: var(--lp-text-muted); }

/* ---------- Badges de estado ---------- */
.badge-soft-success { background: #e7f6ec; color: #15803d; }
.badge-soft-danger  { background: #fde8e8; color: #b91c1c; }
.badge-soft-warning { background: #fdf3e2; color: #b45309; }
.badge-soft-info    { background: #e6f7f9; color: #0e7490; }
.badge-soft-secondary{ background: #eef0f5; color: #4b5563; }
.badge-soft-primary { background: var(--lp-primary-soft); color: var(--lp-primary-dark); }

/* ---------- Formularios ---------- */
.form-label { font-weight: 600; font-size: 0.85rem; }
.form-control, .form-select { border-radius: 10px; font-size: 0.92rem; }
.form-control:focus, .form-select:focus {
  border-color: var(--lp-primary);
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.15);
}
.form-hint { font-size: 0.75rem; color: var(--lp-text-muted); margin-top: 0.25rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--lp-primary), var(--lp-primary-dark));
  border: none;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 6px 14px rgba(99, 102, 241, 0.3);
}
.btn-outline-primary { border-radius: 10px; font-weight: 600; }
.btn-outline-danger { border-radius: 10px; font-weight: 600; }
.btn-secondary { border-radius: 10px; font-weight: 600; }

/* ---------- Detalles de expediente ---------- */
.detail-row { display: flex; border-bottom: 1px dashed var(--lp-border); padding: 0.55rem 0; }
.detail-row dt { width: 45%; color: var(--lp-text-muted); font-size: 0.84rem; font-weight: 600; }
.detail-row dd { width: 55%; font-size: 0.9rem; margin: 0; }

.progress { background: #eef0f5; border-radius: 999px; height: 8px; }
.progress-bar { background: linear-gradient(90deg, var(--lp-primary), var(--lp-teal)); border-radius: 999px; }

/* ---------- Login ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(99,102,241,0.18), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(14,165,183,0.16), transparent 45%),
    linear-gradient(180deg, #101024, #1a1233);
  padding: 1rem;
}
.login-card {
  width: 100%;
  max-width: 430px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 2rem 2.25rem;
  backdrop-filter: blur(12px);
  color: #fff;
}
.login-card .form-control { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); color: #fff; }
.login-card .form-control::placeholder { color: #8b93b5; }
.login-card .form-control:focus { background: rgba(255,255,255,0.09); border-color: var(--lp-primary); color:#fff; }
.login-card .form-label { color: #cbd2e9; }
.login-logo { display: flex; align-items: center; gap: 0.75rem; justify-content: center; margin-bottom: 1.25rem; }
.login-logo .brand-title { font-size: 1.5rem; }
.login-hint { font-size: 0.8rem; color: #8b93b5; text-align: center; margin-top: 1rem; }
.login-hint a { color: #a5b4fc; }

/* ---------- Casillas legales en pantallas de acceso ----------
   El recuadro es claro (#f7f8ff) pero vive dentro de .login-card, que fija
   color:#fff; sin estas reglas el texto queda blanco sobre blanco. */
.login-card .legal-box {
  background: #f7f8ff;
  border: 1px solid #d9ddef;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: var(--lp-text);                 /* #232538 → 13,98:1 sobre #f7f8ff */
}
.login-card .legal-box .form-check-label { color: var(--lp-text); }
.login-card .legal-box a { color: var(--lp-primary-dark); text-decoration: underline; }
.login-card .legal-box a:hover { color: var(--lp-primary); }
.login-card .legal-box .form-hint { color: var(--lp-text-muted); }
.login-card .legal-box .text-danger { color: var(--lp-danger) !important; }
.login-card .legal-box .form-check-input { border-color: var(--lp-text-muted); }
.login-card .legal-box .form-check-input:checked {
  background-color: var(--lp-primary);
  border-color: var(--lp-primary);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 0 0 40px rgba(0,0,0,0.4);
  }
  .sidebar.open { transform: translateX(0); }
}



/* ---------- Refuerzo: sidebar siempre en una sola columna ---------- */
.sidebar-nav { flex-direction: column !important; }
.sidebar-nav .nav-item { width: 100%; flex: 0 0 auto; }
.sidebar-nav .nav-link { white-space: nowrap; }

/* ---------- Menu de usuario (dropdown superior) ---------- */
.topbar-avatar-btn { text-decoration: none; }
.topbar-avatar-btn::after { display: none; }
.topbar-avatar-btn .avatar { transition: box-shadow 0.2s ease; }
.topbar-avatar-btn:hover .avatar { box-shadow: 0 0 0 3px rgba(99,102,241,0.35); }
.dropdown-menu { border-radius: 12px; border: 1px solid var(--lp-border); }
.dropdown-header { font-size: 0.85rem; }
.dropdown-item { font-size: 0.9rem; }
.dropdown-item i { width: 20px; text-align: center; }

/* ---------- Submenu de Intervenciones ---------- */
.nav-parent { position: relative; }
.nav-parent .nav-link { flex: 1; }
.submenu-toggle {
  background: transparent;
  border: none;
  color: var(--lp-text-muted, #94a3b8);
  padding: 0 10px 0 4px;
  line-height: 1;
  outline: none;
  cursor: pointer;
}
.submenu-toggle i { transition: transform 0.2s ease; }
.submenu-toggle:focus { box-shadow: none; }
.submenu { padding-left: 6px; margin-top: 2px; }
.submenu .nav-link {
  padding: 0.45rem 0.6rem 0.45rem 0.7rem;
  font-size: 0.87rem;
  border-left: 2px solid transparent;
  border-radius: 0;
}
.submenu .nav-link i { font-size: 0.9rem; }
.submenu .nav-link.active { border-left-color: var(--lp-primary, #6366f1); }

/* ---------- Scroll vertical del submenú clínico del Administrador ---------- */
#subClinicaAdmin {
  max-height: 55vh;
  overflow-y: auto;
  overflow-x: hidden;
}
#subClinicaAdmin::-webkit-scrollbar { width: 5px; }
#subClinicaAdmin::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

/* ---------- Menú superior (navbar) ---------- */
.navbar-top {
  background: linear-gradient(90deg, var(--lp-sidebar-bg) 0%, var(--lp-sidebar-bg-2) 100%);
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 4px 20px rgba(16, 16, 36, 0.3);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.navbar-top .navbar-brand { color: #fff; }
.navbar-top .psi-icon { width: 36px; height: 36px; font-size: 1.05rem; }
.navbar-top .nav-link {
  color: #aab2d6;
  font-weight: 500;
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
}
.navbar-top .nav-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.navbar-top .nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(99,102,241,0.85), rgba(14,165,183,0.7));
}
.navbar-top .navbar-toggler { border-color: rgba(255,255,255,0.25); }
.navbar-top .navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(99,102,241,0.35); }
.navbar-top .topbar-badge {
  font-size: 0.72rem;
  color: #8b93b5;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 0.25rem 0.7rem;
  gap: 0.4rem;
}
.navbar-top .topbar-date { font-size: 0.8rem; color: #8b93b5; }
.navbar-top .dropdown-menu { border-radius: 12px; border: 1px solid var(--lp-border); }
.navbar-top .dropdown-item { font-size: 0.9rem; border-radius: 8px; }
.navbar-top .dropdown-item.active { background: var(--lp-primary-soft); color: var(--lp-primary); }

/* Submenú anidado dentro de dropdown (hover) */
.dropdown-submenu { position: relative; }
.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -6px;
  display: none;
  border-radius: 10px;
}
.dropdown-submenu:hover > .dropdown-menu,
.dropdown-submenu:focus-within > .dropdown-menu { display: block; }
.dropdown-submenu > a::after {
  float: right;
  margin-top: 5px;
  content: "›";
  font-size: 1.1rem;
  line-height: 1;
}
/* Ayuda de campos: se despliega al hacer clic o tocar el icono */
.help-hint { display: none; }
.help-trigger { cursor: pointer; font-size: 0.9rem; line-height: 1; }
.help-trigger:hover { color: var(--lp-primary); }/* ==== Ciclo conductual: fases ==== */
.fase-banner { padding: .6rem 1rem; border-radius: .5rem; border-left: 4px solid; display: flex; align-items: center; }
.fase-evaluacion { background: rgba(99,102,241,.08); border-color: #6366f1; }
.fase-intervencion { background: rgba(245,158,11,.08); border-color: #f59e0b; }
.fase-cambio { background: rgba(16,185,129,.08); border-color: #10b981; }
.scroll-mt { scroll-margin-top: 1rem; }

/* Ancla a la conducta o registro concreto del expediente (compensa el navbar fijo) */
.ancla-destello { scroll-margin-top: 5rem; }

/* Destello al llegar por el ancla de la URL (p. ej. al volver de editar una conducta) */
.ancla-destello:target { animation: lpAnclaDestello 2.2s ease-out; }
@keyframes lpAnclaDestello {
  from { background-color: rgba(99,102,241,.14); box-shadow: inset 3px 0 0 0 #6366f1; }
  to   { background-color: transparent; box-shadow: inset 3px 0 0 0 transparent; }
}

/* Chevron direccional en botones colapsables de módulos y en el desplegable de cada fase */
[data-bs-toggle="collapse"] .bi-chevron-down,
.fase-toggle .bi-chevron-down {
  transition: transform .2s ease;
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 700;
}
[data-bs-toggle="collapse"].m-open .bi-chevron-down,
.fase-toggle.m-open .bi-chevron-down {
  transform: rotate(180deg);
}
[data-bs-toggle="collapse"]:not(.m-open) .bi-chevron-down,
.fase-toggle:not(.m-open) .bi-chevron-down {
  transform: rotate(0deg);
}


#accHistorialAF {
  scroll-margin-top: 100px;
}


#tablaLineasBase {
  scroll-margin-top: 100px;
}

/* ==========================================================================
   Ciclo conductual: densidad y navegación por fases
   (expediente por conducta: p/conductas/ver.php)
   ========================================================================== */

/* --- Resumen del expediente (chips de contexto) --- */
.ciclo-fact { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; }
.ciclo-fact .chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .78rem; font-weight: 600; color: var(--lp-text-muted);
  background: var(--lp-bg-card); border: 1px solid var(--lp-border);
  border-radius: 999px; padding: .3rem .7rem;
}
.ciclo-fact .chip i { color: var(--lp-primary); font-size: .85rem; }
.ciclo-fact .chip.ok i { color: var(--lp-success); }
.ciclo-fact .chip.warn i { color: var(--lp-warning); }

/* --- Vista lineal del ciclo conductual: las tres fases se apilan en la misma página --- */
.fase-bloque + .fase-bloque {
  margin-top: 1.75rem; padding-top: 1.5rem;
  border-top: 1px solid var(--lp-border);
}

/* --- Banner de fase compacto --- */
.fase-banner { justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.fase-banner .fase-que { font-size: .8rem; }

/* --- Desplegable de fase: el banner (con su botón) queda siempre visible y lo que se pliega es
       el contenido de la fase; al desplegarla, sus módulos se muestran plegados --- */
.fase-banner .fase-toggle { flex-shrink: 0; }
.fase-bloque.fase-cerrada > *:not(.fase-banner) { display: none; }
.fase-bloque.fase-abriendo > *:not(.fase-banner) { animation: lpFaseDesplegar .22s ease-out; }
@keyframes lpFaseDesplegar {
  from { opacity: .35; }
  to   { opacity: 1; }
}

/* --- Cabeceras de módulo más compactas --- */
.card-header.ch-compact { padding: .6rem .9rem; }
.card-header .ch-sub {
  display: block; font-weight: 400; font-size: .76rem; color: var(--lp-text-muted); line-height: 1.3;
}
.card-header .ch-actions { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }
/* --- Cabeceras de módulo: título a la izquierda y acciones en el borde derecho --- */
/* El span del título se
   "disuelve" (display: contents) para que icono+título, distintivo y descripción sean hijos flex de la
   cabecera; la descripción (.ch-sub) se recoloca al final (order) y ocupa su propio renglón. Las acciones
   (grupo .ch-actions, botón suelto, enlace, distintivo o formulario final) se pegan al borde derecho con
   margen automático: quedan a la derecha también cuando la fila se envuelve y el grupo baja de renglón
   (con justify-content: space-between quedaría suelto a la izquierda, porque en un renglón con un solo
   elemento no hay espacio que repartir). */
.card-header.d-flex { justify-content: flex-start !important; align-items: center; column-gap: .5rem; row-gap: .35rem; flex-wrap: wrap; }
.card-header.d-flex > span:first-child { display: contents; }
.card-header.d-flex .ch-sub { order: 99; flex-basis: 100%; }
.card-header.d-flex > .ch-actions,
.card-header.d-flex > :last-child { margin-left: auto; }

/* --- Acciones de bloque de registro (expediente) --- */
/* El grupo Editar/Ver/Eliminar se va al borde derecho cuando la fila se envuelve (margin-left:auto
   no hace nada si la fila no se envuelve, así que en escritorio queda igual). En pantallas
   estrechas ocupa su propio renglón, alineado a la derecha, con un objetivo táctil cómodo. */
.acciones-bloque { margin-left: auto; }
@media (max-width: 575.98px) {
  .acciones-bloque { flex-basis: 100%; justify-content: flex-end; }
  .acciones-bloque .btn { padding: .45rem .7rem; }
  /* Cabeceras de página y de módulo: si las acciones se parten en varios renglones, todos a la derecha
     (y con un objetivo táctil cómodo). */
  .page-heading > .d-flex.flex-wrap { justify-content: flex-end; }
  .card-header.d-flex .ch-actions .btn,
  .card-header.d-flex > .btn { padding: .45rem .7rem; }
}

/* --- Tablas densas: cabecera fija y cifras alineadas --- */
.tabla-density { max-height: 60vh; overflow: auto; }
.tabla-density thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--lp-bg-card);
  box-shadow: inset 0 -1px 0 var(--lp-border);
}
.tabla-density tbody td { font-size: .84rem; padding-top: .35rem; padding-bottom: .35rem; }
.tabla-density .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabla-density .celda-texto { white-space: normal; min-width: 12rem; max-width: 22rem; }
.tabla-density .celda-tipo { min-width: 10rem; }

/* --- Chips de técnicas de la intervención --- */
.tec-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.tec-chips .tec-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .78rem; font-weight: 600; color: var(--lp-primary-dark);
  background: var(--lp-primary-soft); border-radius: 999px; padding: .25rem .6rem;
}
.tec-chips .tec-chip .tec-tipo { font-weight: 400; color: var(--lp-text-muted); }

/* --- Acciones por fila (dropdown compacto) --- */
.acc-menu .btn-acc { padding: 0 .35rem; line-height: 1.4; border: 0; color: var(--lp-text-muted); }
.acc-menu .btn-acc:hover { color: var(--lp-primary); background: var(--lp-primary-soft); border-radius: 8px; }
.acc-menu .dropdown-menu { font-size: .85rem; border-radius: 10px; border: 1px solid var(--lp-border); }
.acc-menu .dropdown-item { border-radius: 8px; }
.acc-menu .dropdown-item.text-danger:hover { background: #fde8e8; }

