/* =====================================================================
   ERP UDIF · ORTHEM — hoja de estilos
   Paleta tomada de los logotipos: verde UDIF, rojo llama, coral Orthem
   ===================================================================== */
:root {
  --verde-900: #082e28;
  --verde-800: #0b3d35;
  --verde-700: #0f5546;
  --verde-600: #0f6b5a;
  --verde-500: #1a8a72;
  --verde-100: #e3f1ec;
  --verde-50:  #f1f8f5;
  --rojo:      #c8102e;
  --rojo-50:   #fdecee;
  --coral:     #ef6f7c;
  --ambar:     #b45309;
  --ambar-50:  #fff4e0;
  --azul:      #1d4ed8;
  --azul-50:   #e8efff;
  --gris-900:  #18201e;
  --gris-700:  #3d4845;
  --gris-500:  #6b7773;
  --gris-300:  #c9d1ce;
  --gris-200:  #e1e6e4;
  --gris-100:  #eef1f0;
  --fondo:     #f5f7f6;
  --blanco:    #ffffff;
  --radio:     10px;
  --sombra:    0 1px 2px rgba(8, 46, 40, .06), 0 1px 1px rgba(8, 46, 40, .04);
  --sombra-2:  0 10px 30px rgba(8, 46, 40, .16);
  --fuente: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--fuente); font-size: 14.5px; color: var(--gris-900); background: var(--fondo); line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--verde-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 650; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 14.5px; font-weight: 650; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--gris-500); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
hr { border: 0; border-top: 1px solid var(--gris-200); margin: 16px 0; }

/* ---------------- Layout ---------------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--verde-800); color: #d8ebe5; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sb-marca { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sb-marca img { width: 44px; height: 44px; border-radius: 50%; background: #fff; }
.sb-marca b { display: block; color: #fff; font-size: 15px; letter-spacing: .02em; }
.sb-marca span { font-size: 11.5px; color: #9cc5b9; line-height: 1.25; display: block; }
.sb-nav { padding: 10px 10px; flex: 1; }
.sb-grupo { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: #7fb0a3; padding: 14px 10px 6px; }
.sb-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #d8ebe5; font-weight: 500; }
.sb-nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.sb-nav a.activo { background: var(--verde-600); color: #fff; }
.sb-nav a svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.sb-nav .contador { margin-left: auto; background: var(--coral); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.sb-pie { background: #fff; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sb-pie img { height: 26px; }
.sb-pie img.carm { height: 38px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; background: var(--blanco); border-bottom: 1px solid var(--gris-200); display: flex; align-items: center; gap: 12px; padding: 0 24px; position: sticky; top: 0; z-index: 20; }
.topbar .titulo { font-weight: 600; color: var(--gris-700); }
.topbar .espacio { flex: 1; }
.btn.btn-menu { display: none; }
.usuario-chip { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 4px; border-radius: 99px; cursor: pointer; border: 1px solid transparent; background: none; font: inherit; color: inherit; }
.usuario-chip:hover { background: var(--gris-100); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--verde-100); color: var(--verde-700); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.avatar.grande { width: 64px; height: 64px; font-size: 22px; }
.usuario-chip .datos { text-align: left; line-height: 1.15; }
.usuario-chip .datos b { display: block; font-size: 13px; }
.usuario-chip .datos span { font-size: 11.5px; color: var(--gris-500); }
.campana { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 0; background: none; cursor: pointer; color: var(--gris-700); display: grid; place-items: center; }
.campana:hover { background: var(--gris-100); }
.campana svg { width: 20px; height: 20px; }
.campana .punto { position: absolute; top: 4px; right: 3px; background: var(--rojo); color: #fff; font-size: 10px; font-weight: 700; border-radius: 99px; min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; border: 2px solid #fff; }

.contenido { padding: 24px; max-width: 1400px; width: 100%; }
.cabecera { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.cabecera p { margin: 4px 0 0; color: var(--gris-500); }
.migas { font-size: 12.5px; color: var(--gris-500); margin-bottom: 6px; }
.migas a { color: var(--gris-500); }

/* ---------------- Tarjetas ---------------- */
.card { background: var(--blanco); border: 1px solid var(--gris-200); border-radius: var(--radio); box-shadow: var(--sombra); }
.card-h { padding: 14px 18px; border-bottom: 1px solid var(--gris-200); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-b { padding: 18px; }
.card-b.p0 { padding: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-ficha { grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
.g-detalle { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }

.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi .v { font-size: 28px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--gris-500); font-size: 12.5px; }
.kpi.alerta .v { color: var(--ambar); }
.kpi.accion { cursor: pointer; transition: border-color .15s; }
.kpi.accion:hover { border-color: var(--verde-500); }

/* ---------------- Botones y formularios ---------------- */
.btn { display: inline-flex; align-items: center; gap: 7px; justify-content: center; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--gris-300); background: var(--blanco); color: var(--gris-900); font: inherit; font-weight: 550; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--gris-100); text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn.primario { background: var(--verde-600); border-color: var(--verde-600); color: #fff; }
.btn.primario:hover { background: var(--verde-700); }
.btn.peligro { background: var(--rojo); border-color: var(--rojo); color: #fff; }
.btn.peligro:hover { background: #a50d26; }
.btn.exito { background: #15803d; border-color: #15803d; color: #fff; }
.btn.exito:hover { background: #126c34; }
.btn.fantasma { border-color: transparent; background: none; }
.btn.fantasma:hover { background: var(--gris-100); }
.btn.peq { height: 30px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.acciones { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

label.campo { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--gris-700); }
label.campo .ayuda { font-weight: 400; color: var(--gris-500); }
input, select, textarea { font: inherit; color: inherit; border: 1px solid var(--gris-300); border-radius: 8px; padding: 0 10px; height: 38px; background: var(--blanco); width: 100%; min-width: 0; }
textarea { padding: 9px 10px; height: auto; min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--verde-500); outline-offset: 1px; border-color: var(--verde-500); }
input[readonly], input:disabled, select:disabled, textarea:disabled { background: var(--gris-100); color: var(--gris-700); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 16px; }
.form-grid .ancho { grid-column: 1 / -1; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; }

.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--gris-200); }
.filtros input, .filtros select { width: auto; height: 34px; }
.filtros .buscar { flex: 1; min-width: 200px; }

/* ---------------- Tablas ---------------- */
.tabla-wrap { overflow-x: auto; }
table.tabla { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tabla th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--gris-500); font-weight: 600; padding: 10px 14px; background: var(--gris-100); border-bottom: 1px solid var(--gris-200); white-space: nowrap; position: sticky; top: 0; }
.tabla td { padding: 10px 14px; border-bottom: 1px solid var(--gris-100); vertical-align: middle; }
.tabla tr.clic { cursor: pointer; }
.tabla tr.clic:hover td { background: var(--verde-50); }
.tabla tr.inactivo td { color: var(--gris-500); }
.tabla .nombre b { display: block; font-weight: 600; }
.tabla .nombre span { font-size: 12px; color: var(--gris-500); }
.paginador { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; font-size: 13px; color: var(--gris-500); }
.vacio { padding: 40px 20px; text-align: center; color: var(--gris-500); }

/* ---------------- Etiquetas ---------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.sin-punto::before { display: none; }
.e-PENDIENTE { background: var(--ambar-50); color: var(--ambar); }
.e-VALIDADA { background: var(--azul-50); color: var(--azul); }
.e-AUTORIZADA { background: #e6f6ec; color: #15803d; }
.e-DENEGADA { background: var(--rojo-50); color: var(--rojo); }
.e-ANULADA { background: #eceff1; color: #37474f; text-decoration: line-through; }
.e-CANCELADA { background: var(--gris-100); color: var(--gris-500); }
.tipo { display: inline-flex; align-items: center; gap: 7px; font-weight: 550; }
.tipo i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--gris-100); color: var(--gris-700); font-size: 12px; font-weight: 600; }
.pill.verde { background: var(--verde-100); color: var(--verde-700); }
.pill.rojo { background: var(--rojo-50); color: var(--rojo); }

.aviso { display: flex; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 13px; background: var(--ambar-50); color: #7c3d06; border: 1px solid #f5d9a8; }
.aviso + .aviso { margin-top: 8px; }
.aviso svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.aviso.info { background: var(--verde-50); color: var(--verde-700); border-color: var(--verde-100); }
.aviso.error { background: var(--rojo-50); color: var(--rojo); border-color: #f6c6cd; }

/* ---------------- Ficha ---------------- */
.ficha-id { text-align: center; padding: 22px 18px; }
.ficha-id .avatar { margin: 0 auto 10px; }
.ficha-id h2 { font-size: 18px; }
.ficha-id .cat { color: var(--gris-500); margin-top: 3px; }
.dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 13.5px; }
.dl dt { color: var(--gris-500); }
.dl dd { margin: 0; font-weight: 500; word-break: break-word; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--gris-200); padding: 0 12px; overflow-x: auto; }
.tabs button { border: 0; background: none; font: inherit; padding: 13px 12px; cursor: pointer; color: var(--gris-500); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.activo { color: var(--verde-700); border-bottom-color: var(--verde-600); }
.saldo { border: 1px solid var(--gris-200); border-radius: 10px; padding: 14px; }
.saldo .t { font-size: 12px; color: var(--gris-500); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.saldo .v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.saldo .v small { font-size: 13px; color: var(--gris-500); font-weight: 500; }
.barra { height: 6px; background: var(--gris-100); border-radius: 99px; overflow: hidden; display: flex; margin: 8px 0 6px; }
.barra span { display: block; height: 100%; }
.barra .b1 { background: var(--verde-600); }
.barra .b2 { background: #f0b45a; }

/* ---------------- Flujo / timeline ---------------- */
.flujo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; position: relative; padding: 6px 0 2px; }
.paso { text-align: center; position: relative; padding: 0 6px; }
.paso::before { content: ""; position: absolute; top: 15px; left: -50%; right: 50%; height: 2px; background: var(--gris-200); z-index: 0; }
.paso:first-child::before { display: none; }
.paso.hecho::before, .paso.actual::before { background: var(--verde-500); }
.paso .circ { width: 32px; height: 32px; border-radius: 50%; margin: 0 auto 6px; display: grid; place-items: center; background: var(--blanco); border: 2px solid var(--gris-300); color: var(--gris-500); position: relative; z-index: 1; font-weight: 700; font-size: 13px; }
.paso.hecho .circ { background: var(--verde-600); border-color: var(--verde-600); color: #fff; }
.paso.actual .circ { border-color: var(--ambar); color: var(--ambar); background: var(--ambar-50); }
.paso.ko .circ { background: var(--rojo); border-color: var(--rojo); color: #fff; }
.paso.ko::before { background: var(--rojo); }
.paso .circ svg { width: 16px; height: 16px; }
.paso b { display: block; font-size: 12.5px; }
.paso span { font-size: 11.5px; color: var(--gris-500); }

.historial { list-style: none; margin: 0; padding: 0; }
.historial li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; padding-bottom: 14px; position: relative; }
.historial li::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--gris-200); }
.historial li:last-child::before { display: none; }
.historial .pt { width: 14px; height: 14px; border-radius: 50%; background: var(--verde-100); border: 3px solid var(--verde-600); margin-top: 3px; }
.historial .t { font-size: 13px; }
.historial .f { font-size: 11.5px; color: var(--gris-500); }

.mensajes { display: flex; flex-direction: column; gap: 10px; max-height: 460px; overflow-y: auto; padding: 4px 2px; }
.msg { max-width: 85%; padding: 9px 12px; border-radius: 12px; background: var(--gris-100); font-size: 13.5px; word-break: break-word; }
.msg .txt { white-space: pre-wrap; }
.msg.propio { align-self: flex-end; background: var(--verde-100); }
.msg.interno { background: #fff8e6; border: 1px dashed #e9c46a; }
.msg .meta { font-size: 11px; color: var(--gris-500); margin-bottom: 3px; white-space: normal; }

/* ---------------- Calendario ---------------- */
.cal-wrap { overflow-x: auto; }
table.cal { border-collapse: separate; border-spacing: 0; font-size: 12px; min-width: 100%; }
.cal th, .cal td { border-bottom: 1px solid var(--gris-100); border-right: 1px solid var(--gris-100); text-align: center; padding: 0; height: 30px; min-width: 28px; }
.cal th { background: var(--gris-100); font-weight: 600; color: var(--gris-500); font-size: 11px; position: sticky; top: 0; z-index: 2; }
.cal th.fs, .cal td.fs { background: #f6f3ee; }
.cal th.hoy { background: var(--verde-600); color: #fff; }
.cal .persona { text-align: left; padding: 0 10px; white-space: nowrap; min-width: 220px; position: sticky; left: 0; background: var(--blanco); z-index: 1; font-size: 12.5px; }
.cal th.persona { background: var(--gris-100); z-index: 3; }
.cal tr.grupo td { background: var(--verde-50); font-weight: 700; color: var(--verde-700); text-align: left; padding: 6px 10px; font-size: 12px; position: sticky; left: 0; }
.cal .celda { display: block; height: 22px; margin: 0 -1px; border-radius: 4px; cursor: pointer; }
.cal .celda.prov { opacity: .45; background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.5) 0 3px, transparent 3px 6px); }
.leyenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--gris-700); }

/* ---------------- Modal, toast, menú ---------------- */
.modal-fondo { position: fixed; inset: 0; background: rgba(8, 30, 26, .45); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .15s; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: var(--sombra-2); }
.modal.ancho { max-width: 820px; }
.modal-h { padding: 16px 20px; border-bottom: 1px solid var(--gris-200); display: flex; justify-content: space-between; align-items: center; }
.modal-b { padding: 20px; }
.modal-p { padding: 14px 20px; border-top: 1px solid var(--gris-200); display: flex; justify-content: flex-end; gap: 8px; background: var(--gris-100); border-radius: 0 0 14px 14px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--gris-900); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--sombra-2); font-size: 13.5px; max-width: 380px; animation: fade .2s; }
.toast.ok { background: #14532d; }
.toast.error { background: #8b0a1f; }
.desplegable { position: absolute; top: 54px; right: 16px; width: 380px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--gris-200); border-radius: 12px; box-shadow: var(--sombra-2); z-index: 50; overflow: hidden; }
.desplegable .item { display: block; padding: 11px 14px; border-bottom: 1px solid var(--gris-100); color: inherit; font-size: 13px; }
.desplegable .item:hover { background: var(--verde-50); text-decoration: none; }
.desplegable .item.nueva { background: #f2faf7; }
.desplegable .item b { display: block; font-size: 13px; }
.desplegable .menu-a { display: block; padding: 10px 14px; color: inherit; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; font: inherit; }
.desplegable .menu-a:hover { background: var(--gris-100); text-decoration: none; }

/* ---------------- Login ---------------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-arte { background: var(--verde-800); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-arte::after { content: ""; position: absolute; right: -180px; bottom: -180px; width: 520px; height: 520px; border-radius: 50%; border: 70px solid rgba(239, 111, 124, .16); }
.login-arte::before { content: ""; position: absolute; right: -60px; bottom: -60px; width: 280px; height: 280px; border-radius: 50%; border: 30px solid rgba(255,255,255,.05); }
.login-arte h1 { font-size: 34px; line-height: 1.15; max-width: 520px; font-weight: 700; }
.login-arte p { color: #b7d8ce; max-width: 480px; font-size: 15.5px; }
.login-arte .sello { display: flex; align-items: center; gap: 14px; }
.login-arte .sello img { width: 72px; height: 72px; border-radius: 50%; background: #fff; }
.login-form { display: flex; flex-direction: column; justify-content: center; padding: 48px; background: #fff; }
.login-form form { width: 100%; max-width: 380px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.login-form .logos { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 380px; margin: 0 auto 36px; width: 100%; }
.login-form .logos img { height: 40px; }
.login-form .logos img.carm { height: 52px; }
.login-form .btn { height: 42px; }

/* ---------------- Impresión (justificante) ---------------- */
.solo-impresion { display: none; }
@media print {
  .sidebar, .topbar, .no-imprimir, .toasts { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
  .contenido { padding: 0; }
  .solo-impresion { display: block; }
  .card { box-shadow: none; border-color: #999; }
  .g-detalle { grid-template-columns: 1fr; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-ficha, .g-detalle { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .app.menu-abierto .sidebar { transform: none; box-shadow: var(--sombra-2); }
  .app.menu-abierto::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 55; }
  .btn.btn-menu { display: inline-flex; }
  .topbar { padding: 0 12px; }
  .contenido { padding: 16px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .usuario-chip .datos { display: none; }
  .login { grid-template-columns: 1fr; }
  .login-arte { display: none; }
  .login-form { padding: 28px 20px; }
  .ocultar-movil { display: none; }
  .dl { grid-template-columns: 110px 1fr; }
}
@media (max-width: 520px) {
  .g4 { grid-template-columns: 1fr 1fr; }
  .kpi .v { font-size: 22px; }
}
.ic-inline { width: 14px; height: 14px; vertical-align: -2px; display: inline-block; }
.texto-rojo { color: var(--rojo); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; padding: 0; accent-color: var(--verde-600); flex: none; }
.bloque-botones .btn { white-space: normal; height: auto; min-height: 36px; padding: 8px 12px; text-align: center; }

/* ---------------- Justificantes ---------------- */
.adjuntar { border: 1.5px dashed var(--gris-300); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 12px; background: var(--gris-100); }
.adjuntar.oblig { border-color: #f0a3ae; background: #fff7f8; }
.adj-cab { display: flex; gap: 10px; align-items: flex-start; }
.adj-cab > svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--gris-700); }
.adjuntar label.btn { cursor: pointer; }
.adj-lista { display: flex; flex-direction: column; gap: 8px; }
.adj-lista:empty { display: none; }
.adj-item { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--gris-200); border-radius: 8px; padding: 6px 8px; }
.adj-item img, .adj-pdf { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; flex: none; }
.adj-pdf { display: grid; place-items: center; background: var(--rojo-50); color: var(--rojo); font-weight: 800; font-size: 12px; }
.adj-n { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adj-n b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.miniatura { border: 1px solid var(--gris-200); border-radius: 10px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.miniatura a.vista { display: block; aspect-ratio: 4 / 3; background: var(--gris-100); }
.miniatura a.vista img { width: 100%; height: 100%; object-fit: cover; display: block; }
.miniatura a.vista .adj-pdf { width: 100%; height: 100%; border-radius: 0; font-size: 22px; }
.miniatura .pie { padding: 8px 10px; font-size: 12px; display: flex; gap: 6px; align-items: center; }
.miniatura .pie span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visor { max-width: 100%; max-height: 75vh; display: block; margin: 0 auto; border-radius: 8px; }
