/* Panel de Firmas — hoja de estilos única para el panel y la vista de cliente. */

/* ------------------------------------------------------------------ *
 * Temas
 *
 * El tema OSCURO es el predeterminado: sus tokens viven en `:root` pelado,
 * así que se aplican aunque JavaScript falle o tarde en ejecutarse.
 * El tema claro sólo redefine los tokens bajo [data-theme="light"].
 * Ningún color se define únicamente dentro de un bloque de tema.
 * ------------------------------------------------------------------ */

:root {
  color-scheme: dark;

  --bg: #0f1117;
  --surface: #171a21;
  --surface-2: #1e222b;
  --border: #282d38;
  --border-strong: #3a4150;
  --text: #e7e9ee;
  --text-muted: #98a1b2;
  --label: #c3cad6;

  --brand: #8b7ff5;
  --brand-hover: #9d93f7;
  --brand-soft: #221f3d;
  --brand-border: #3b3468;
  --focus-ring: rgb(139 127 245 / 28%);

  --admin: #8b7ff5;
  --client: #2dd4bf;

  --danger: #f87171;
  --danger-soft: #2b1618;
  --danger-border: #5c2b2e;
  --danger-hover: #3a1d20;
  --warn: #fbbf24;
  --warn-soft: #2b2210;
  --ok: #4ade80;
  --ok-soft: #12251b;

  --chip-text: #aab3c2;
  --chip-bg: #232833;

  --notice-info-text: #bfdbfe;
  --notice-info-bg: #16223a;
  --notice-info-border: #2c4a7a;
  --notice-ok-text: #bbf7d0;
  --notice-ok-border: #235c3a;
  --notice-error-text: #fecaca;
  --notice-error-border: #6b2f33;

  --viewer-bg: #0b0d12;
  --toast-bg: #2a3040;
  --on-brand: #ffffff;
  --page: #ffffff;
  --scrim: rgb(3 5 10 / 66%);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 30%), 0 1px 3px rgb(0 0 0 / 22%);
  --shadow-md: 0 4px 12px rgb(0 0 0 / 38%), 0 2px 4px rgb(0 0 0 / 26%);
  --shadow-lg: 0 20px 45px rgb(0 0 0 / 52%);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-muted: #64748b;
  --label: #334155;

  --brand: #4338ca;
  --brand-hover: #3730a3;
  --brand-soft: #eef2ff;
  --brand-border: #c7d2fe;
  --focus-ring: rgb(67 56 202 / 12%);

  --admin: #4338ca;
  --client: #0d9488;

  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --danger-border: #fecaca;
  --danger-hover: #fee2e2;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --ok: #15803d;
  --ok-soft: #f0fdf4;

  --chip-text: #475569;
  --chip-bg: #f1f5f9;

  --notice-info-text: #1e3a8a;
  --notice-info-bg: #eff6ff;
  --notice-info-border: #bfdbfe;
  --notice-ok-text: #14532d;
  --notice-ok-border: #bbf7d0;
  --notice-error-text: #7f1d1d;
  --notice-error-border: #fecaca;

  --viewer-bg: #eceff5;
  --toast-bg: #1e293b;
  --on-brand: #ffffff;
  --page: #ffffff;
  --scrim: rgb(15 23 42 / 46%);

  --shadow-sm: 0 1px 2px rgb(15 23 42 / 6%), 0 1px 3px rgb(15 23 42 / 5%);
  --shadow-md: 0 4px 12px rgb(15 23 42 / 8%), 0 2px 4px rgb(15 23 42 / 4%);
  --shadow-lg: 0 20px 45px rgb(15 23 42 / 16%);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 1.3rem; }
h2 { font-size: 1.05rem; }
h3 { font-size: 0.95rem; }
p { margin: 0; }
a { color: var(--brand); }

[hidden] { display: none !important; }

/* ---------------------------------------------------------------- *
 * Estructura
 * ---------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.topbar__logo {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
}

.topbar__spacer { flex: 1; }

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.muted { color: var(--text-muted); }
.small { font-size: 0.83rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.82rem; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.card__body { padding: 18px; }

/* ---------------------------------------------------------------- *
 * Métricas
 * ---------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}
.stat {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.stat__value { font-size: 1.7rem; font-weight: 680; letter-spacing: -0.02em; }
.stat__label { font-size: 0.8rem; color: var(--text-muted); }
.stat--pending .stat__value { color: var(--warn); }
.stat--done .stat__value { color: var(--ok); }

/* ---------------------------------------------------------------- *
 * Controles
 * ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 15px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 550;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, opacity 0.12s;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { background: var(--surface-2); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.btn--primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn--primary:hover:not(:disabled) { background: var(--brand-hover); border-color: var(--brand-hover); }

.btn--client { background: var(--client); border-color: var(--client); color: var(--on-brand); }
.btn--client:hover:not(:disabled) { filter: brightness(0.93); }

.btn--danger { color: var(--danger); border-color: var(--danger-border); background: var(--danger-soft); }
.btn--danger:hover:not(:disabled) { background: var(--danger-hover); }

.btn--ghost { border-color: transparent; background: transparent; }
.btn--ghost:hover:not(:disabled) { background: var(--surface-2); }

.btn--sm { padding: 5px 10px; font-size: 0.8rem; }
.btn--lg { padding: 12px 22px; font-size: 0.95rem; }
.btn--block { width: 100%; }

.field { display: grid; gap: 5px; }
.field > label { font-size: 0.82rem; font-weight: 550; color: var(--label); }
.field__hint { font-size: 0.78rem; color: var(--text-muted); }

input[type="text"], input[type="email"], input[type="password"], input[type="file"], textarea, select {
  width: 100%;
  padding: 9px 11px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
textarea { resize: vertical; min-height: 68px; }
input[type="file"] { padding: 7px; background: var(--surface-2); cursor: pointer; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- *
 * Estados
 * ---------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--draft { color: var(--chip-text); background: var(--chip-bg); }
.badge--pending_client { color: var(--warn); background: var(--warn-soft); }
.badge--completed { color: var(--ok); background: var(--ok-soft); }

/* ---------------------------------------------------------------- *
 * Listado de contratos
 * ---------------------------------------------------------------- */

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters .btn.is-active { background: var(--brand-soft); border-color: var(--brand-border); color: var(--brand); }

.contract-list { display: grid; }
.contract {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.contract:last-child { border-bottom: 0; }
.contract:hover { background: var(--surface-2); }
.contract__title { font-weight: 600; margin-bottom: 3px; }
.contract__meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 0.82rem; color: var(--text-muted); }
.contract__meta span { display: inline-flex; align-items: center; gap: 4px; }
.contract__actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 700px) {
  .contract { grid-template-columns: 1fr; }
  .contract__actions { justify-content: flex-start; }
}

.empty { padding: 44px 18px; text-align: center; color: var(--text-muted); }
.empty__icon { font-size: 2rem; opacity: 0.5; margin-bottom: 8px; }

/* ---------------------------------------------------------------- *
 * Visor de PDF y cajas de firma
 * ---------------------------------------------------------------- */

.viewer {
  display: grid;
  gap: 20px;
  /* `safe center` centra mientras quepa, pero cae a `start` cuando el documento
     desborda. Con `center` a secas, la parte izquierda queda fuera del origen
     de scroll y resulta imposible llegar a ella. */
  justify-items: safe center;
  padding: 20px;
  background: var(--viewer-bg);
  border-radius: var(--radius);
  overflow-x: auto;
}

.pdf-page {
  position: relative;
  background: var(--page);
  box-shadow: var(--shadow-md);
  flex: none;
}
.pdf-page canvas { display: block; border-radius: 2px; }
.pdf-page__num {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 8px;
  font-size: 0.72rem;
  color: #fff;
  background: rgb(15 23 42 / 62%);
  border-radius: 999px;
  pointer-events: none;
}

/* Caja arrastrable sobre la página */
.sigbox {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px dashed var(--admin);
  border-radius: 6px;
  background: rgb(67 56 202 / 9%);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.sigbox--client { border-color: var(--client); background: rgb(13 148 136 / 10%); }
.sigbox.is-dragging { cursor: grabbing; box-shadow: var(--shadow-md); }
.sigbox__label {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--admin);
  text-align: center;
  padding: 0 6px;
  pointer-events: none;
}
.sigbox--client .sigbox__label { color: var(--client); }
.sigbox__handle {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: var(--admin);
  border: 2px solid #fff;
  border-radius: 3px;
  cursor: nwse-resize;
}
.sigbox--client .sigbox__handle { background: var(--client); }
.sigbox__preview { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; }
.sigbox--placed { border-style: solid; background: transparent; }

/* ---------------------------------------------------------------- *
 * Editor
 * ---------------------------------------------------------------- */

/* ---------------------------------------------------------------- *
 * Editor: barra lateral + documento
 *
 * Con rejilla, un elemento conserva `min-width: auto` aunque la pista sea
 * minmax(0,1fr), así que el visor podía ensanchar su columna e invadir la
 * barra lateral. Con flexbox el reparto es explícito y no admite sorpresas:
 * la barra tiene ancho fijo (`flex: 0 0`) y el documento se queda el resto
 * con `min-width: 0`, que es lo que le permite encogerse.
 *
 * Un documento de más de ~1000 px no se lee mejor: sólo aplasta la barra.
 * ---------------------------------------------------------------- */

/* El editor ocupa todo el ancho de la ventana: la barra de información queda
   pegada a la izquierda y el documento se lleva todo el espacio restante.
   El resto del panel (listado, etc.) sigue centrado con su ancho máximo. */
#view-editor.page {
  max-width: none;
  padding: 20px 20px 48px;
}

.editor {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.editor__side {
  flex: 0 0 290px;
  width: 290px;
  max-width: 290px;
  min-width: 0;
  position: sticky;
  top: 78px;
  z-index: 2;
  display: grid;
  gap: 16px;
}
.editor__side .card { overflow-wrap: anywhere; }

.editor__doc {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

@media (max-width: 1150px) {
  .editor { gap: 14px; }
  .editor__side { flex-basis: 250px; width: 250px; max-width: 250px; }
}

@media (max-width: 940px) {
  .editor { flex-direction: column; }
  .editor__side {
    position: static;
    flex: none;
    width: 100%;
    max-width: none;
  }
  .editor__doc { width: 100%; }
}

.steps { display: grid; gap: 2px; counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  padding: 9px 0;
  align-items: start;
  font-size: 0.86rem;
  color: var(--text-muted);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--text-muted);
  background: var(--chip-bg);
  border-radius: 50%;
}
.step.is-active { color: var(--text); font-weight: 550; }
.step.is-active::before { background: var(--brand); color: var(--on-brand); }
.step.is-done::before { content: "✓"; background: var(--ok-soft); color: var(--ok); }

.legend { display: grid; gap: 8px; font-size: 0.83rem; }
.legend__item { display: flex; align-items: center; gap: 8px; }
.legend__swatch { width: 13px; height: 13px; border-radius: 4px; border: 2px dashed var(--admin); background: rgb(67 56 202 / 12%); }
.legend__swatch--client { border-color: var(--client); background: rgb(13 148 136 / 12%); }

/* ---------------------------------------------------------------- *
 * Modal
 * ---------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--scrim);
  backdrop-filter: blur(2px);
}
.modal__card {
  width: min(560px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}
.modal__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal__head h2 { flex: 1; }
.modal__body { padding: 20px; display: grid; gap: 14px; }
.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 14px 14px;
}

/* ---------------------------------------------------------------- *
 * Pad de firma
 * ---------------------------------------------------------------- */

.sigpad {
  position: relative;
  background: var(--surface-2);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.sigpad canvas { display: block; width: 100%; height: 190px; cursor: crosshair; }
.sigpad__baseline {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 42px;
  border-bottom: 1px solid var(--border-strong);
  pointer-events: none;
}
.sigpad__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}
.sigpad.is-filled .sigpad__placeholder { display: none; }

/* ---------------------------------------------------------------- *
 * Enlace compartible
 * ---------------------------------------------------------------- */

.linkbox {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-sm);
}
.linkbox input {
  border: 0;
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  padding: 0;
}
.linkbox input:focus { box-shadow: none; }

/* ---------------------------------------------------------------- *
 * Login
 * ---------------------------------------------------------------- */

.login { display: grid; place-items: center; min-height: 100dvh; padding: 20px; }
.login__card { width: min(400px, 100%); padding: 30px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); }
.login__logo { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 16px; background: var(--brand); color: var(--on-brand); border-radius: 13px; font-size: 22px; }

/* ---------------------------------------------------------------- *
 * Vista de cliente
 * ---------------------------------------------------------------- */

.client-header { padding: 22px 24px; background: var(--surface); border-bottom: 1px solid var(--border); }
.client-header__inner { max-width: 1000px; margin: 0 auto; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

.notice {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  border: 1px solid;
}
.notice--info { color: var(--notice-info-text); background: var(--notice-info-bg); border-color: var(--notice-info-border); }
.notice--ok { color: var(--notice-ok-text); background: var(--ok-soft); border-color: var(--notice-ok-border); }
.notice--error { color: var(--notice-error-text); background: var(--danger-soft); border-color: var(--notice-error-border); }
.notice__icon { font-size: 1.1rem; line-height: 1.3; }

.signbar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  padding: 14px 24px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgb(15 23 42 / 7%);
}
.signbar__inner { max-width: 1000px; margin: 0 auto; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

.done-panel { display: grid; place-items: center; gap: 16px; padding: 46px 20px; text-align: center; }
.done-panel__icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  font-size: 30px;
  color: var(--ok);
  background: var(--ok-soft);
  border-radius: 50%;
}

/* ---------------------------------------------------------------- *
 * Historial de auditoría
 * ---------------------------------------------------------------- */

.timeline { display: grid; gap: 0; }
.timeline__item { display: grid; grid-template-columns: 16px 1fr; gap: 12px; padding-bottom: 14px; }
.timeline__dot { position: relative; }
.timeline__dot::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
}
.timeline__item:not(:last-child) .timeline__dot::after {
  content: "";
  position: absolute;
  top: 17px;
  bottom: -14px;
  left: 8px;
  width: 1px;
  background: var(--border);
}

/* ---------------------------------------------------------------- *
 * Toasts y overlay de carga
 * ---------------------------------------------------------------- */

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: grid; gap: 8px; justify-items: end; }
.toast {
  max-width: 380px;
  padding: 11px 15px;
  font-size: 0.86rem;
  color: #fff;
  background: var(--toast-bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.18s ease-out;
}
.toast--error { background: var(--danger); }
.toast--success { background: var(--ok); }
.toast.is-leaving { opacity: 0; transition: opacity 0.24s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.busy { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: var(--scrim); }
.busy__card {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 26px 34px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
}
.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Botón de icono (alternar tema) */
.btn--icon {
  padding: 6px 9px;
  font-size: 1rem;
  line-height: 1;
}

/* Registro de accesos */
.seclog { display: grid; gap: 0; font-size: 0.83rem; }
.seclog__row {
  display: grid;
  grid-template-columns: 150px 110px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.seclog__row:last-child { border-bottom: 0; }
.seclog__ip { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.seclog__ua { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
  .seclog__row { grid-template-columns: 1fr auto; }
  .seclog__ua { display: none; }
}

/* Datos de conexión del firmante y aperturas del enlace */
.conexion { display: grid; gap: 3px; margin-top: 6px; font-size: 0.8rem; color: var(--text-muted); }
.conexion > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.visita { padding: 9px 0; border-bottom: 1px solid var(--border); }
.visita:last-child { border-bottom: 0; padding-bottom: 0; }
.visita__cab { font-size: 0.83rem; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }

/* Diálogo de confirmación */
.dlg-msg { font-size: 0.9rem; line-height: 1.55; }
.dlg-detalle {
  padding: 9px 12px;
  font-size: 0.85rem;
  font-weight: 550;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-wrap: anywhere;
}

/* Testigo de final del documento en la vista de cliente */
#fin-documento { height: 1px; }

/* Barra de zoom del visor */
.zoombar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.zoombar__nivel {
  min-width: 52px;
  text-align: center;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}
