/* ── Tarjetas de expediente (lista principal) ── */
.expediente-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.expediente-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light, #93c5fd);
}
.expediente-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}
.expediente-numero {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 2px;
  font-family: monospace;
}
.expediente-caratula {
  font-weight: 600;
  font-size: .95rem;
  color: var(--text);
  line-height: 1.35;
}
.expediente-juzgado {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .35rem;
}
.expediente-meta {
  display: flex;
  align-items: center;
  margin-top: .6rem;
  font-size: .78rem;
  color: var(--text-light);
  gap: .5rem;
}
.expediente-fecha { flex: 1; }

/* Expedientes */
.exp-filters { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:1.25rem; }
.exp-filters input,.exp-filters select { padding:8px 12px; border:1.5px solid var(--border); border-radius:var(--radius); font-size:14px; background:var(--surface); }
.exp-filters input { min-width:200px; }
.exp-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); padding:1.25rem; margin-bottom:12px; box-shadow:var(--shadow); transition:box-shadow var(--transition); }
.exp-card:hover { box-shadow:var(--shadow-md); }
.exp-card-title { font-weight:600; font-size:15px; margin-bottom:5px; color:var(--text); }
.exp-card-meta { font-size:13px; color:var(--text-muted); }
.exp-card-footer { display:flex; justify-content:space-between; align-items:center; margin-top:14px; }
.exp-detail-header { margin-bottom:1.5rem; }
.exp-detail-header h2 { margin-bottom:6px; }
.exp-meta { display:flex; flex-wrap:wrap; gap:18px; font-size:14px; color:var(--text-muted); margin:0.75rem 0; }
.exp-meta span strong { color:var(--text); }
.actuaciones-list { }
.act-item { padding:12px 0; border-bottom:1px solid var(--border-lt); }
.act-item:last-child { border-bottom:none; }
.act-texto { font-size:14px; line-height:1.6; }
.act-fecha { font-size:12px; color:var(--text-light); margin-top:3px; }
.nueva-act textarea { min-height:80px; }

/* ── Glosario Jurídico — Tooltips ───────────────────────────────────────── */
.glosario-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: help;
  border-bottom: 1px dashed currentColor;
  text-decoration: none;
}
.glosario-info-icon {
  font-size: .72em;
  opacity: .55;
  line-height: 1;
  flex-shrink: 0;
  font-style: normal;
}
.glosario-tipbox {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #f1f5f9;
  font-size: .74rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: 8px;
  width: 230px;
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .16s ease, visibility .16s ease;
  z-index: 9999;
  white-space: normal;
  text-align: left;
}
/* Flecha del tooltip */
.glosario-tipbox::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1e293b;
}
/* Desktop: mostrar con hover */
@media (hover: hover) {
  .glosario-tooltip:hover .glosario-tipbox {
    opacity: 1;
    visibility: visible;
  }
}
/* Móvil: mostrar con clase .gl-open (JS toggle) */
.glosario-tooltip.gl-open .glosario-tipbox {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
/* Responsivo: achicar en pantallas pequeñas */
@media (max-width: 480px) {
  .glosario-tipbox {
    width: 185px;
    font-size: .71rem;
    left: 0;
    transform: none;
  }
  .glosario-tipbox::after {
    left: 20px;
    transform: none;
  }
}
