.electronic-documents { margin: 0 32px 32px; background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; box-shadow: 0 2px 8px rgba(38,35,58,.08); overflow: hidden; }
.electronic-documents__header { border-bottom: 1px solid #e5e7eb; }
.sri-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; background: #f8fafc; border-bottom: 1px solid #e5e7eb; }
.sri-checkbox { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; font-size: 13px; color: #475569; }
.sri-context { padding: 0 16px 12px; color: #64748b; font-size: 13px; }
.sri-notice { margin: 12px 16px 0; padding: 10px 12px; border-radius: 6px; background: #fff7ed; color: #9a3412; font-size: 13px; }
.sri-filter-help { margin: 0 16px 12px; color: #64748b; font-size: 12px; }
.electronic-documents__table-wrapper { overflow-x: auto; }
.sri-filters .search_input { transition: border-color .15s ease, box-shadow .15s ease; }
.sri-filters .search_input:focus { border-color: #a8cfa3; box-shadow: 0 0 0 2px rgba(93,189,81,.12); outline: none; }
.sri-filters select.search_input:hover { border-color: #c4d4c1; }
.sri-error { color: #b91c1c; }
.sri-active-client { display: flex; flex-direction: column; justify-content: center; min-width: 190px; min-height: 32px; padding: 3px 10px; border-left: 3px solid #5dbd51; background: #fff; }
.sri-active-client span { color: #64748b; font-size: 10px; }
.sri-active-client strong { overflow: hidden; color: #26233a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.electronic-documents .datatable_button, .electronic-documents .sri-detail-button { min-height: 32px; cursor: pointer; font-weight: 600; opacity: 1; visibility: visible; }
.electronic-documents .sri-detail-button { padding: 5px 10px; border: 0; border-radius: 4px; background: #5dbd51; color: #ffffff; }
.electronic-documents .datatable_button:hover, .electronic-documents .sri-detail-button:hover { filter: brightness(.92); }
.sri-dashboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 16px; }
.sri-summary-card { min-height: 68px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; color: #475569; font-size: 12px; }
.sri-summary-card strong, .sri-summary-card span { display: block; }
.sri-summary-card strong { color: #26233a; margin-bottom: 8px; }
.sri-badge { display: inline-block; padding: 3px 7px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.sri-badge--verde { background: #dcfce7; color: #166534; }.sri-badge--ambar { background: #fef3c7; color: #92400e; }.sri-badge--rojo { background: #fee2e2; color: #991b1b; }.sri-badge--gris { background: #e5e7eb; color: #374151; }
.sri-badge--state { background: #eef2ff; color: #3730a3; }
.sri-thumb-icon { color: #2563eb; }
.sri-detail-section { margin-bottom: 22px; }.sri-detail-section h3, .sri-plate-alert h3 { margin: 0 0 10px; color: #475569; font-size: 15px; }.sri-detail-section p, .sri-plate-alert p { margin: 6px 0; font-size: 13px; color: #475569; white-space: normal; }
.sri-config-rule { display: flex; flex-direction: column; gap: 5px; color: #475569; font-size: 12px; margin-bottom: 10px; }.sri-config-rule select { width: 100%; }.sri-config-rule { margin-bottom: 12px; }
.sri-plate-alert { margin: 18px 0; padding: 14px; border-left: 4px solid #f59e0b; background: #fffbeb; border-radius: 6px; }
.sri-evidence { display: block; width: 100%; max-height: 340px; object-fit: contain; border-radius: 8px; background: #f1f5f9; }
@media (max-width: 1024px) { .sri-dashboard { grid-template-columns: repeat(2, 1fr); } .electronic-documents { margin: 0 16px 16px; overflow-x: auto; } }

/* One readable validation cell; the two business values remain independent. */
.electronic-documents .sri-validation-cell { width: 215px; text-align: left; }
.electronic-documents th.sri-validation-cell { padding: 8px 10px; vertical-align: middle; font-size: 12px; font-weight: 700; line-height: 1.25; }
.electronic-documents th.sri-validation-cell small { display: block; margin-top: 4px; color: #475569; font-size: 10px; font-weight: 500; letter-spacing: .02em; line-height: 1.2; }
.electronic-documents td.sri-validation-cell { padding: 6px 8px; vertical-align: middle; white-space: normal; overflow-wrap: anywhere; text-overflow: clip; }
.sri-validation-legend { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; margin: 0 16px 12px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; color: #1f2937; font-size: 12px; }
.sri-validation-legend__item { display: flex; align-items: flex-start; gap: 8px; min-width: 0; padding: 2px 4px; }
.sri-validation-legend__item > span:last-child { min-width: 0; }
.sri-validation-legend__item strong { display: block; color: #111827; font-size: 12.5px; line-height: 1.25; }
.sri-validation-legend__swatch { width: 10px; height: 10px; flex: 0 0 10px; margin-top: 2px; border-radius: 50%; }
.sri-validation-legend__item--verde .sri-validation-legend__swatch { background: #166534; }.sri-validation-legend__item--ambar .sri-validation-legend__swatch { background: #92400e; }.sri-validation-legend__item--rojo .sri-validation-legend__swatch { background: #991b1b; }.sri-validation-legend__item--gris .sri-validation-legend__swatch { background: #374151; }
.sri-validation-legend__description { display: block; margin-top: 2px; color: #374151; font-size: 11.5px; line-height: 1.3; }
.electronic-documents td.sri-validation-cell--verde { --sri-validation-bg: #eef8f0; --sri-validation-hover: #e6f4e9; --sri-validation-selected: #dff0e3; --sri-validation-accent: #2f855a; }
.electronic-documents td.sri-validation-cell--ambar { --sri-validation-bg: #fff8e7; --sri-validation-hover: #fff3d5; --sri-validation-selected: #ffedc2; --sri-validation-accent: #b7791f; }
.electronic-documents td.sri-validation-cell--rojo { --sri-validation-bg: #fff1f1; --sri-validation-hover: #fde7e7; --sri-validation-selected: #fbdcdc; --sri-validation-accent: #c24141; }
.electronic-documents td.sri-validation-cell--gris { --sri-validation-bg: #f3f4f6; --sri-validation-hover: #eceff3; --sri-validation-selected: #e4e7ec; --sri-validation-accent: #667085; }
.electronic-documents td.sri-validation-cell {
  box-sizing: border-box;
  background-color: var(--sri-validation-bg);
  box-shadow: inset 3px 0 0 var(--sri-validation-accent);
  color: #111827;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}
.electronic-documents .datatable_content tbody tr:hover td.sri-validation-cell,
.electronic-documents .datatable_content tbody tr:focus-within td.sri-validation-cell {
  background-color: var(--sri-validation-hover);
  box-shadow: inset 3px 0 0 var(--sri-validation-accent), inset 0 0 0 1px rgba(17, 24, 39, .06);
  color: #111827;
}
.electronic-documents .datatable_content tbody tr[aria-selected="true"] td.sri-validation-cell,
.electronic-documents .datatable_content tbody tr.selected td.sri-validation-cell,
.electronic-documents .datatable_content tbody tr.is-selected td.sri-validation-cell {
  background-color: var(--sri-validation-selected);
  box-shadow: inset 3px 0 0 var(--sri-validation-accent), inset 0 0 0 1px rgba(17, 24, 39, .1);
  color: #111827;
}
@media (prefers-reduced-motion: reduce) {
  .electronic-documents td.sri-validation-cell { transition: none; }
}
.electronic-documents td.sri-validation-cell .sri-validation-status__sri { color: #111827; font-weight: 600; }
.electronic-documents td.sri-validation-cell .sri-validation-status__reason { color: #374151; opacity: 1; }
.sri-validation-status { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; line-height: 1.25; text-align: left; }
.sri-validation-status .sri-badge { max-width: 100%; box-sizing: border-box; border-radius: 5px; white-space: normal; overflow-wrap: anywhere; }
.sri-validation-status__sri { color: #334155; font-size: 11px; font-weight: 500; }
.sri-validation-status__reason { color: #64748b; font-size: 10.5px; line-height: 1.25; opacity: .82; }

@media (max-width: 800px) { .sri-validation-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .sri-validation-legend { grid-template-columns: minmax(0, 1fr); } }
#sri-detail-panel .sri-invoice-card { flex-wrap: wrap; }
#sri-detail-panel .sri-invoice-card__status { flex-basis: 100%; align-items: flex-start; justify-content: flex-start; padding-top: 10px; border-top: 1px solid #e2e8f0; }

/* Administrative settings, scoped to SRI so legacy editors are unaffected. */
.sri-config-panel .entity_editor_body { overflow-wrap: anywhere; }
.sri-config-panel p { margin: 6px 0 14px; color: #64748b; font-size: 12px; line-height: 1.5; }
.sri-config-panel .sri-config-intro { margin-top: 0; color: #475569; }
.sri-config-panel .sri-config-section { min-width: 0; margin: 0 0 20px; padding: 0 0 12px; border: 0; border-bottom: 1px solid #e2e8f0; }
.sri-config-panel legend { margin-bottom: 12px; padding: 0; color: #26233a; font-size: 14px; font-weight: 600; }
.sri-config-panel label { display: block; margin-bottom: 6px; color: #334155; font-size: 12px; }
.sri-config-panel .input_filled { display: block; width: 100%; min-width: 0; box-sizing: border-box; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 5px; background: #fff; font: inherit; font-size: 13px; }
.sri-config-panel textarea.input_filled { min-height: 72px; resize: vertical; }
.sri-config-panel .input_filled:focus { outline: 2px solid #a8cfa3; outline-offset: 1px; }
.sri-config-panel .sri-config-caution { padding-left: 9px; border-left: 2px solid #d6a34e; color: #75511c; }
.sri-config-panel .sri-config-capacity { margin-bottom: 0; padding: 10px; border-radius: 5px; background: #f1f5f9; color: #334155; }
.sri-config-panel .sri-config-footnote { font-size: 11px; }
.sri-config-panel .datatable_button:disabled { opacity: .65; cursor: wait; }

/* Ajuste: main.css aplica elipsis a todas las celdas
   (.datatable_content tbody tr td) y a 1366 px ocultaba el botón PDF de la columna Detalle. */
.electronic-documents__table-wrapper th:last-child,
.electronic-documents__table-wrapper td:last-child {
  width: 132px;
  text-overflow: clip;
}

/* El atributo hidden debe ocultar de verdad: las reglas de botones (display:flex) lo anulaban
   y el botón Configuración se veía aunque el backend devolviera configure=false. */
.electronic-documents [hidden] { display: none !important; }
/* Entrada del menú: oculta hasta que el backend concede acceso SRI (solo UX; el backend sigue autorizando). */
#render-electronic-documents[hidden] { display: none !important; }

/* Detalle de documento electrónico: resumen, alertas, resolución, información,
   justificación y pie fijo. Solo afecta a #sri-detail-panel; los colores son los
   mismos del módulo (.sri-badge, .sri-plate-alert, botón verde de NetGuard). */
#sri-detail-panel {
  --sri-ink: #26233a;
  --sri-muted: #706f8e;
  --sri-line: #e9eaef;
  --sri-surface: #f5f6fa;
  --sri-ok-bg: #dcfce7;
  --sri-ok-fg: #166534;
  --sri-warn-bg: #fef3c7;
  --sri-warn-fg: #92400e;
  --sri-warn-soft: #fffbeb;
  --sri-warn-line: #f59e0b;
  --sri-bad-bg: #fee2e2;
  --sri-bad-fg: #991b1b;
  --sri-neutral-bg: #e5e7eb;
  --sri-neutral-fg: #374151;
  --sri-info-bg: #eef2ff;
  --sri-info-fg: #3730a3;
  --sri-action: #5dbd51;
  --sri-focus: #6f7add;
  --sri-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  display: flex;
  flex-direction: column;
  max-width: min(560px, 100%);
  overflow: hidden;
}
#sri-detail-panel .entity_editor_header {
  flex: 0 0 auto;
  gap: 12px;
  height: auto;
  min-height: 68px;
  padding: 14px 20px;
  background: #fff;
}
#sri-detail-panel .entity_editor_header .user_info { min-width: 0; }
#sri-detail-panel .entity_editor_header .avatar { flex: 0 0 36px; width: 36px; height: 36px; margin-right: 10px; border-radius: 10px; background: #e8eafa; }
#sri-detail-panel .entity_editor_header .avatar .fa-regular { color: #4c4673; font-size: 16px; }
#sri-detail-panel .entity_editor_title { font-size: 18px; font-weight: 700; line-height: 1.25; }
#sri-detail-panel .entity_editor_title small { font-size: 13px; font-weight: 400; }
#sri-detail-panel .btn_close_editor { flex: 0 0 40px; width: 40px; border-radius: 8px; color: var(--sri-muted); font-size: 22px; line-height: 1; }
#sri-detail-panel .entity_editor_body {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  padding: 16px 20px 0;
  overflow-y: auto;
  background: var(--sri-surface);
  container-type: inline-size;
  display: flex;
  flex-direction: column;
}
/* El pie queda abajo aunque el contenido sea corto (usuario sin acciones). */
#sri-detail-panel .sri-detail-workflow { display: flex; flex: 1 0 auto; flex-direction: column; }
#sri-detail-panel .entity_editor_body > p { color: var(--sri-muted); font-size: 13px; }

#sri-detail-panel .sri-detail-card {
  min-width: 0;
  margin: 0 0 12px;
  padding: 16px 18px;
  border: 1px solid var(--sri-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(38, 35, 58, .05);
}
#sri-detail-panel .sri-detail-card__title { margin: 0 0 12px; color: var(--sri-ink); font-size: 14px; font-weight: 700; line-height: 1.3; }

/* Resumen */
#sri-detail-panel .sri-detail-summary__identity { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#sri-detail-panel .sri-detail-eyebrow { color: var(--sri-muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
#sri-detail-panel .sri-detail-summary__issuer { color: var(--sri-ink); font-size: 16px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
#sri-detail-panel .sri-detail-summary__ruc { color: var(--sri-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
#sri-detail-panel .sri-detail-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
#sri-detail-panel .sri-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  box-sizing: border-box;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: normal;
  overflow-wrap: anywhere;
}
#sri-detail-panel .sri-chip--verde { background: var(--sri-ok-bg); color: var(--sri-ok-fg); }
#sri-detail-panel .sri-chip--ambar { background: var(--sri-warn-bg); color: var(--sri-warn-fg); }
#sri-detail-panel .sri-chip--rojo { background: var(--sri-bad-bg); color: var(--sri-bad-fg); }
#sri-detail-panel .sri-chip--gris { background: var(--sri-neutral-bg); color: var(--sri-neutral-fg); }
#sri-detail-panel .sri-chip--info { background: var(--sri-info-bg); color: var(--sri-info-fg); }
#sri-detail-panel .sri-detail-summary__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--sri-line); }
#sri-detail-panel .sri-detail-verified { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 0; color: var(--sri-muted); font-size: 12px; line-height: 1.4; }
#sri-detail-panel .sri-detail-verified i { margin-top: 1px; }
#sri-detail-panel .sri-detail-verified--ok i { color: var(--sri-ok-fg); }
#sri-detail-panel #sri-evidence-container:empty { display: none; }

/* Botones */
#sri-detail-panel .sri-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, filter .15s ease;
}
#sri-detail-panel .sri-btn--secondary { border: 1px solid #d5d8e3; background: #fff; color: var(--sri-ink); }
#sri-detail-panel .sri-btn--secondary:hover:not(:disabled) { border-color: #c4c8d6; background: var(--sri-surface); }
#sri-detail-panel .sri-btn--success { border: 1px solid var(--sri-action); background: var(--sri-action); color: #fff; }
#sri-detail-panel .sri-btn--success i { color: #fff; }
#sri-detail-panel .sri-btn--success:hover:not(:disabled) { filter: brightness(.92); }
#sri-detail-panel .sri-btn:disabled { cursor: not-allowed; opacity: .55; }
#sri-detail-panel .sri-btn:focus-visible,
#sri-detail-panel .sri-icon-button:focus-visible,
#sri-detail-panel .btn_close_editor:focus-visible { outline: 2px solid var(--sri-focus); outline-offset: 2px; }

/* Alertas */
#sri-detail-panel .sri-detail-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #fde68a;
  border-left: 4px solid var(--sri-warn-line);
  border-radius: 10px;
  background: var(--sri-warn-soft);
}
#sri-detail-panel .sri-detail-alert i { margin-top: 2px; color: #d97706; font-size: 16px; }
#sri-detail-panel .sri-detail-alert strong { display: block; color: #78350f; font-size: 14px; }
#sri-detail-panel .sri-detail-alert p { margin: 2px 0 0; color: var(--sri-warn-fg); font-size: 13px; line-height: 1.45; }
#sri-detail-panel #sri-detail-alerts .sri-plate-alert { margin: 0 0 12px; }

/* Resolución SRI */
#sri-detail-panel .sri-resolution-outcome { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; }
#sri-detail-panel .sri-resolution-outcome i { margin-top: 1px; font-size: 18px; }
#sri-detail-panel .sri-resolution-outcome p { margin: 0; }
#sri-detail-panel .sri-resolution-outcome__title { color: var(--sri-ink); font-size: 14px; font-weight: 700; line-height: 1.35; }
#sri-detail-panel .sri-resolution-outcome__detail { margin-top: 2px; color: var(--sri-muted); font-size: 13px; line-height: 1.4; }
#sri-detail-panel .sri-resolution-outcome--ok { background: #f0fdf4; }
#sri-detail-panel .sri-resolution-outcome--ok i { color: var(--sri-ok-fg); }
#sri-detail-panel .sri-resolution-outcome--review { background: var(--sri-warn-soft); }
#sri-detail-panel .sri-resolution-outcome--review i { color: #d97706; }

#sri-detail-panel .sri-plate-compare { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; margin-bottom: 10px; }
#sri-detail-panel .sri-plate { display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 8px 10px; border: 1px solid var(--sri-line); border-radius: 10px; background: var(--sri-surface); }
#sri-detail-panel .sri-plate__label { color: var(--sri-muted); font-size: 11px; font-weight: 600; }
#sri-detail-panel .sri-plate__value {
  align-self: flex-start;
  max-width: 100%;
  box-sizing: border-box;
  padding: 3px 10px;
  border: 2px solid var(--sri-ink);
  border-radius: 6px;
  background: #fff;
  color: var(--sri-ink);
  font-family: var(--sri-mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .08em;
  overflow-wrap: anywhere;
}
#sri-detail-panel .sri-plate-compare__indicator { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 88px; color: var(--sri-muted); font-size: 10px; font-weight: 600; line-height: 1.25; text-align: center; }
#sri-detail-panel .sri-plate-compare__indicator i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sri-neutral-bg); color: var(--sri-neutral-fg); font-size: 13px; }
#sri-detail-panel .sri-plate-compare--match .sri-plate-compare__indicator { color: var(--sri-ok-fg); }
#sri-detail-panel .sri-plate-compare--match .sri-plate-compare__indicator i { background: var(--sri-ok-bg); color: var(--sri-ok-fg); }
#sri-detail-panel .sri-plate-compare--corrected .sri-plate-compare__indicator { color: var(--sri-info-fg); }
#sri-detail-panel .sri-plate-compare--corrected .sri-plate-compare__indicator i { background: var(--sri-info-bg); color: var(--sri-info-fg); }
#sri-detail-panel .sri-plate-note { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 10px; color: var(--sri-muted); font-size: 12px; line-height: 1.4; }
#sri-detail-panel .sri-plate-note i { margin-top: 2px; }
#sri-detail-panel .sri-plate-note--warning { color: var(--sri-warn-fg); }
#sri-detail-panel .sri-plate-note--warning i { color: #d97706; }

/* Filas etiqueta / valor */
#sri-detail-panel .sri-detail-rows { margin: 0; }
#sri-detail-panel .sri-detail-rows > div { display: grid; grid-template-columns: minmax(120px, 40%) minmax(0, 1fr); gap: 12px; padding: 8px 0; border-top: 1px solid var(--sri-line); }
#sri-detail-panel .sri-detail-rows dt { color: var(--sri-muted); font-size: 12px; font-weight: 600; line-height: 1.4; }
#sri-detail-panel .sri-detail-rows dd { min-width: 0; margin: 0; color: var(--sri-ink); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }

/* Clave de acceso: completa, monoespaciada y seleccionable de una vez */
#sri-detail-panel .sri-access-key { padding-bottom: 10px; }
#sri-detail-panel .sri-access-key__label { display: block; margin-bottom: 6px; color: var(--sri-muted); font-size: 12px; font-weight: 600; }
#sri-detail-panel .sri-access-key__row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border: 1px solid var(--sri-line); border-radius: 8px; background: var(--sri-surface); }
#sri-detail-panel .sri-access-key__value { flex: 1 1 auto; min-width: 0; padding: 0; background: none; color: var(--sri-ink); font-family: var(--sri-mono); font-size: 13px; letter-spacing: .04em; line-height: 1.55; word-break: break-all; user-select: all; }
#sri-detail-panel .sri-icon-button { flex: 0 0 32px; width: 32px; height: 32px; border: 1px solid #d5d8e3; border-radius: 6px; background: #fff; color: var(--sri-muted); cursor: pointer; }
#sri-detail-panel .sri-icon-button:hover { color: var(--sri-ink); }
#sri-detail-panel .sri-icon-button.is-copied { border-color: #86efac; background: var(--sri-ok-bg); color: var(--sri-ok-fg); }

/* Justificación y corrección */
#sri-detail-panel .sri-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#sri-detail-panel .sri-field--separated { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--sri-line); }
#sri-detail-panel .sri-field label { color: var(--sri-ink); font-size: 12px; font-weight: 600; }
#sri-detail-panel .sri-field .input_filled { display: block; width: 100%; min-width: 0; box-sizing: border-box; padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; font: inherit; font-size: 13px; }
#sri-detail-panel .sri-field textarea.input_filled { min-height: 64px; resize: vertical; }
#sri-detail-panel .sri-field .input_filled:focus { border-color: #a8cfa3; outline: 2px solid #a8cfa3; outline-offset: 1px; }
#sri-detail-panel .sri-field__actions { display: flex; justify-content: flex-end; }
#sri-detail-panel .sri-field__inline { display: flex; flex-wrap: wrap; gap: 8px; }
#sri-detail-panel .sri-field__inline .sri-plate-input { flex: 1 1 140px; width: auto; font-family: var(--sri-mono); letter-spacing: .06em; text-transform: uppercase; }
#sri-detail-panel .sri-field__hint { margin: 0; color: var(--sri-muted); font-size: 12px; line-height: 1.45; }

/* Pie fijo: siempre visible al desplazar el detalle */
#sri-detail-panel .sri-detail-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: auto -20px 0;
  padding: 10px 20px 12px;
  border-top: 1px solid var(--sri-line);
  background: #fff;
  box-shadow: 0 -6px 16px rgba(38, 35, 58, .06);
}
#sri-detail-panel .sri-detail-footer__message { margin: 0 0 6px; color: var(--sri-muted); font-size: 12px; line-height: 1.4; }
#sri-detail-panel .sri-detail-footer__message:empty { display: none; }
#sri-detail-panel .sri-detail-footer__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

@container (max-width: 400px) {
  #sri-detail-panel .sri-plate-compare { grid-template-columns: minmax(0, 1fr); }
  #sri-detail-panel .sri-plate-compare__indicator { flex-direction: row; justify-content: flex-start; max-width: none; padding-left: 12px; }
  #sri-detail-panel .sri-plate-compare--corrected .sri-plate-compare__indicator i { transform: rotate(90deg); }
  #sri-detail-panel .sri-detail-rows > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  #sri-detail-panel .sri-detail-footer__actions .sri-btn { flex: 1 1 100%; }
}
@media (max-width: 480px) {
  #sri-detail-panel .entity_editor_header { padding: 12px 16px; }
  #sri-detail-panel .entity_editor_body { padding: 16px 16px 0; }
  #sri-detail-panel .sri-detail-card { padding: 14px; }
  #sri-detail-panel .sri-detail-footer { margin: auto -16px 0; padding: 10px 16px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  #sri-detail-panel .sri-btn { transition: none; }
}
