/* =====================================================
   LOGIN y SOLICITAR ACCESO — rediseño oct-2026
   · Foto de la hermandad a sangre + panel sobrio.
   · Pensado primero para el móvil (sin desbordes, campos de 16px
     para que iOS no haga zoom, botones de 52px).
   · SIEMPRE oscuro: no responde a data-theme (decisión jul-2026).
   · Toma el color de la hermandad (--brand-primary) para el botón.
   ===================================================== */
.auth {
  --a-bg: #0d0c12;
  --a-panel: #121119;
  --a-text: #f3f0ea;
  --a-muted: #a29db0;
  --a-soft: #7a7588;
  --a-line: rgba(255, 255, 255, 0.1);
  --a-field: rgba(255, 255, 255, 0.045);
  --a-field-hover: rgba(255, 255, 255, 0.07);
  --a-gold: #c8a96b;
  --a-brand: var(--brand-primary, #5b21b6);
  --a-danger: #f87171;
  --a-serif: "Palatino Linotype", "Book Antiqua", Palatino, "Iowan Old Style", Georgia, serif;

  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 40%);
  background: var(--a-bg);
  color: var(--a-text);
}

/* ================= MARCA (foto) ================= */
.auth-brand {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 3.4vw, 56px);
  background: #1a1724;
}
.auth-brand__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  animation: authPhoto 1.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes authPhoto {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: none; }
}
.auth-brand__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(8, 7, 12, 0.55) 0%, rgba(8, 7, 12, 0) 26%),
    linear-gradient(0deg, rgba(8, 7, 12, 0.88) 0%, rgba(8, 7, 12, 0.35) 34%, rgba(8, 7, 12, 0) 58%);
}
/* Sin foto: fondo de marca liso y elegante */
.auth-brand--plain {
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(91, 33, 182, 0.55), transparent 60%),
    radial-gradient(90% 80% at 100% 100%, rgba(200, 169, 107, 0.18), transparent 60%),
    #15121e;
}
.auth-brand--plain .auth-brand__shade,
.auth-brand--plain .auth-brand__crest { display: none; } /* el escudo va grande en el centro */
.auth-brand__mark {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.auth-brand__mark img {
  width: clamp(120px, 16vw, 200px);
  aspect-ratio: 1;
  object-fit: contain;
  padding: clamp(18px, 2.4vw, 30px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.05), 0 30px 80px rgba(0, 0, 0, 0.45);
}

.auth-brand__top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.auth-brand__crest {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.auth-brand__crest img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.auth-brand__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}
.auth-brand__bottom {
  max-width: 34ch;
}
.auth-brand__bottom::before {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  margin-bottom: 18px;
  background: var(--a-gold);
}
.auth-brand__name {
  margin: 0;
  font-family: var(--a-serif);
  font-size: clamp(28px, 2.6vw, 40px);
  font-weight: 400;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
  text-wrap: balance;
}
.auth-brand__sub {
  margin: 10px 0 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.78);
}

/* ================= PANEL (formulario) ================= */
.auth-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 5vw, 72px) clamp(24px, 4vw, 64px);
  background: var(--a-panel);
  border-left: 1px solid var(--a-line);
}
.auth-form {
  width: 100%;
  max-width: 380px;
  animation: authRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
@keyframes authRise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.auth-head { margin-bottom: 28px; }
.auth-title {
  margin: 0;
  font-family: var(--a-serif);
  font-size: clamp(32px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.1;
  color: #fff;
}
.auth-lead {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--a-muted);
}

/* Campos */
.auth-fields { display: grid; gap: 18px; }
.auth-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--a-text);
}
.auth-optional {
  margin-left: 4px;
  font-weight: 400;
  color: var(--a-soft);
}
.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"] {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font: inherit;
  font-size: 16px; /* 16px: iOS no amplía la página al enfocar */
  color: #fff;
  background: var(--a-field);
  border: 1px solid var(--a-line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.auth-field input::placeholder { color: var(--a-soft); opacity: 1; }
.auth-field input:hover { background: var(--a-field-hover); }
.auth-field input:focus {
  background: var(--a-field-hover);
  border-color: rgba(200, 169, 107, 0.75);
  box-shadow: 0 0 0 4px rgba(200, 169, 107, 0.16);
}
/* Autorrelleno del navegador: que no ponga fondo amarillo/blanco */
.auth-field input:-webkit-autofill {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px #1c1a24 inset;
  caret-color: #fff;
}

.auth-pass { position: relative; }
.auth-pass input[type] { padding-right: 52px; }
.auth-eye {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--a-muted);
  cursor: pointer;
}
.auth-eye:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.auth-eye:focus-visible { outline: 2px solid var(--a-gold); outline-offset: -2px; }
.auth-eye svg,
.auth-alert svg,
.auth-done svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.auth-eye__off { display: none; }
.auth-eye[aria-pressed="true"] .auth-eye__on { display: none; }
.auth-eye[aria-pressed="true"] .auth-eye__off { display: block; }

.auth-hint { margin: 8px 0 0; font-size: 13px; color: var(--a-gold); }
.auth-error { display: none; margin: 8px 0 0; font-size: 13px; color: var(--a-danger); }
.auth-field.is-invalid .auth-error { display: block; }
.auth-field.is-invalid input[type="text"],
.auth-field.is-invalid input[type="email"],
.auth-field.is-invalid input[type="password"] { border-color: var(--a-danger); }

/* Casilla de aceptación */
.auth-check label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: var(--a-muted);
  cursor: pointer;
}
.auth-check input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--a-brand);
}

/* Botones */
.auth-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  margin-top: 6px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #fff;
  text-decoration: none;
  background: var(--a-brand);
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, 0.8);
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease, background 0.15s ease, border-color 0.15s ease;
}
.auth-btn:hover { color: #fff; filter: brightness(1.15); }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:focus-visible { outline: 2px solid var(--a-gold); outline-offset: 3px; }
.auth-btn--ghost {
  margin-top: 0;
  background: transparent;
  border-color: var(--a-line);
  box-shadow: none;
}
.auth-btn--ghost:hover {
  filter: none;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.24);
}
.auth-btn__spin {
  display: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: authSpin 0.7s linear infinite;
}
.auth-btn.is-loading { cursor: progress; }
.auth-btn.is-loading .auth-btn__text { display: none; }
.auth-btn.is-loading .auth-btn__spin { display: block; }
@keyframes authSpin { to { transform: rotate(360deg); } }

.auth-sep {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0 14px;
  font-size: 13px;
  color: var(--a-soft);
}
.auth-sep::before,
.auth-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--a-line);
}

.auth-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  color: #fecaca;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
}
.auth-alert svg { flex: 0 0 auto; margin-top: 1px; color: var(--a-danger); }
.auth-alert--warn {
  color: #fde7b0;
  background: rgba(200, 169, 107, 0.12);
  border-color: rgba(200, 169, 107, 0.4);
}
.auth-alert--warn svg { color: var(--a-gold); }

.auth-done {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  border-radius: 50%;
  color: var(--a-gold);
  border: 1px solid rgba(200, 169, 107, 0.5);
}
.auth-done svg { width: 26px; height: 26px; }

.auth-help {
  margin: 22px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--a-muted);
}
.auth-help a,
.auth-check a { color: var(--a-text); text-underline-offset: 3px; }
.auth-help a:hover,
.auth-check a:hover { color: var(--a-gold); }

.auth-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--a-line);
  font-size: 12.5px;
}
.auth-legal a { color: var(--a-soft); text-decoration: none; }
.auth-legal a:hover { color: var(--a-text); text-decoration: underline; }

/* Campo trampa anti-robots: fuera de pantalla, no display:none */
.auth-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ================= MÓVIL Y TABLETA ================= */
@media (max-width: 959.98px) {
  .auth {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }
  .auth-brand {
    min-height: clamp(230px, 36vh, 340px);
    padding: 20px 20px 48px;
  }
  .auth-brand__crest { width: 52px; height: 52px; padding: 6px; border-radius: 13px; }
  .auth-brand__label { font-size: 11px; }
  .auth-brand__bottom::before { width: 36px; margin-bottom: 12px; }
  .auth-brand__name { font-size: clamp(22px, 6vw, 30px); }
  .auth-brand--plain .auth-brand__mark { display: none; }
  .auth-brand--plain .auth-brand__crest { display: grid; }
  .auth-brand__sub { font-size: 14px; margin-top: 6px; }
  .auth-panel {
    align-items: flex-start;
    margin-top: -24px; /* la hoja del formulario monta sobre la foto */
    padding: 32px 20px calc(28px + env(safe-area-inset-bottom));
    border-left: 0;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.35);
  }
  .auth-form { max-width: 440px; margin: 0 auto; }
  .auth-head { margin-bottom: 22px; }
  .auth-title { font-size: 30px; }
}
@media (max-width: 380px) {
  .auth-row2 { grid-template-columns: 1fr; }
  .auth-panel { padding-left: 16px; padding-right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-brand__photo,
  .auth-form { animation: none; }
}

/* =========================================================
   PORTAL / APP — shell global (reconstruido)
   Layout, sidebar, topbar, menú, cards, botones y tema claro/oscuro.
   Las vistas concretas conservan sus propios <style> (heroes, etc.).
   ========================================================= */
:root {
  --app-bg: #eceef5;
  --app-surface: #ffffff;
  --app-surface-2: #f5f6fb;
  --app-text: #1e2330;
  --app-muted: #6b7183;
  --app-heading: #141824;
  --app-border: rgba(20, 22, 45, 0.1);
  --app-radius: 16px;
  --app-shadow: 0 12px 32px rgba(20, 22, 45, 0.1);

  /* Sidebar — CLARO por defecto (sigue el tema) */
  --side-bg: linear-gradient(185deg, #ffffff 0%, #f5f4fc 100%);
  --side-text: #241d3d;
  --side-muted: #6c6788;
  --side-border: rgba(20, 22, 45, 0.09);
  --side-hover: rgba(124, 58, 237, 0.08);
  --side-active: linear-gradient(90deg, var(--brand-primary, #6d28d9), #7c3aed);
  --side-btn-bg: rgba(20, 22, 45, 0.05);
  --side-btn-hover: rgba(124, 58, 237, 0.12);
  --side-logo-shadow: 0 4px 10px rgba(20, 22, 45, 0.18);
}
:root[data-theme="dark"] {
  --app-bg: #0e0b1a;
  --app-surface: #17132a;
  --app-surface-2: #1d1836;
  --app-text: #e9e6f6;
  --app-muted: #a79fc6;
  --app-heading: #ffffff;
  --app-border: rgba(255, 255, 255, 0.09);
  --app-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);

  /* Sidebar — OSCURO de marca en modo oscuro */
  --side-bg: linear-gradient(185deg, #1d1738 0%, #140f28 62%, #100b20 100%);
  --side-text: #ece9f8;
  --side-muted: #a79fc6;
  --side-border: rgba(255, 255, 255, 0.08);
  --side-hover: rgba(255, 255, 255, 0.07);
  --side-btn-bg: rgba(255, 255, 255, 0.08);
  --side-btn-hover: rgba(255, 255, 255, 0.16);
  --side-logo-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

body {
  background: var(--app-bg);
  color: var(--app-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- LAYOUT ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(238px, 266px) minmax(0, 1fr);
  align-items: start;
  min-height: 100vh;
  min-height: 100dvh;
}
@media (max-width: 991.98px) {
  .layout {
    grid-template-columns: 1fr;
  }
}
.content {
  min-width: 0;
}

/* ---------- SIDEBAR (escritorio) ---------- */
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  padding: 20px 14px 18px;
  background: var(--side-bg);
  color: var(--side-text);
  border-right: 1px solid var(--side-border);
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 18px;
}
.sidebar .brand img {
  height: 46px;
  width: auto;
  flex: 0 0 auto;
  filter: drop-shadow(var(--side-logo-shadow));
}
.sidebar .brand .title {
  font-weight: 700;
  font-size: 14.5px;
  line-height: 1.25;
  color: var(--side-text);
}

/* ---------- NAVEGACIÓN (sidebar + offcanvas móvil) ---------- */
.nav-section {
  gap: 3px;
}
.sidebar .nav-link,
.offcanvas-dark .nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--side-muted);
  transition:
    background 0.16s ease,
    color 0.16s ease,
    transform 0.12s ease;
}
.sidebar .nav-link:hover,
.offcanvas-dark .nav-link:hover {
  background: var(--side-hover);
  color: var(--side-text);
  transform: translateX(2px);
}
.sidebar .nav-link.active,
.offcanvas-dark .nav-link.active {
  background: var(--side-active);
  color: #fff;
  box-shadow: 0 8px 20px rgba(109, 40, 217, 0.35);
}
.sidebar .nav-link.disabled,
.offcanvas-dark .nav-link.disabled {
  opacity: 0.45;
  pointer-events: none;
}
.sidebar hr,
.offcanvas-dark hr {
  border-color: var(--side-border);
  opacity: 1;
  margin: 12px 4px;
}

/* ---------- TOPBAR (móvil) ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--side-bg);
  color: var(--side-text);
  border-bottom: 1px solid var(--side-border);
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1 1 auto;
}
.topbar-crest {
  height: 30px;
  width: auto;
  flex: 0 0 auto;
  border-radius: 7px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.28));
}
.topbar .slug {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.15;
  color: var(--side-text);
  margin: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar .user {
  font-size: 13px;
  color: var(--side-muted);
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- OFFCANVAS oscuro (menú móvil) ---------- */
.offcanvas-dark {
  background: var(--side-bg);
  color: var(--side-text);
}
.offcanvas-dark .offcanvas-header {
  border-bottom: 1px solid var(--side-border);
}

/* ---------- BOTONES ---------- */
.btn-brand {
  border: none;
  color: #fff;
  border-radius: 11px;
  font-weight: 600;
  background: linear-gradient(100deg, #6d28d9, #7c3aed);
  box-shadow: 0 8px 20px rgba(109, 40, 217, 0.3);
  transition:
    transform 0.12s ease,
    box-shadow 0.25s ease;
}
.btn-brand:hover,
.btn-brand:focus {
  color: #fff;
  background: linear-gradient(100deg, #5b21b6, #7c3aed);
  box-shadow: 0 12px 26px rgba(109, 40, 217, 0.42);
  transform: translateY(-1px);
}
.btn-theme {
  border-radius: 10px;
  font-weight: 500;
  background: var(--app-surface-2);
  border: 1px solid var(--app-border);
  color: var(--app-text);
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}
.btn-theme:hover {
  background: rgba(124, 58, 237, 0.1);
  border-color: var(--brand-accent, #a78bfa);
  color: var(--app-text);
}
/* btn-theme dentro del sidebar/topbar: sigue el tema del panel */
.sidebar .btn-theme,
.topbar .btn-theme {
  background: var(--side-btn-bg);
  border-color: var(--side-border);
  color: var(--side-text);
}
.sidebar .btn-theme:hover,
.topbar .btn-theme:hover {
  background: var(--side-btn-hover);
  color: var(--side-text);
}

/* ---------- CARDS ---------- */
.layout .card {
  background: var(--app-surface);
  color: var(--app-text);
  border: 1px solid var(--app-border);
  border-radius: var(--app-radius);
}
.layout .card .card-title,
.layout .card h1,
.layout .card h2,
.layout .card h3,
.layout .card h4,
.layout .card h5 {
  color: var(--app-heading);
}
.hover-rise {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}
.hover-rise:hover {
  transform: translateY(-3px);
  box-shadow: var(--app-shadow);
  border-color: rgba(124, 58, 237, 0.35);
}
.layout .text-muted {
  color: var(--app-muted) !important;
}

/* Selección de fila en tablas (app.js -> .has-check) */
.layout tr.has-check > * {
  background: rgba(124, 58, 237, 0.12) !important;
}

/* Enlaces del contenido (no toca login: login no está en .layout) */
.layout .content a:not(.nav-link):not(.btn):not(.page-link):not(.dropdown-item) {
  color: #7c3aed;
}
:root[data-theme="dark"]
  .layout
  .content
  a:not(.nav-link):not(.btn):not(.page-link):not(.dropdown-item) {
  color: var(--brand-accent, #a78bfa);
}

/* ---------- MODO OSCURO: superficies Bootstrap (solo dentro de .layout) ---------- */
:root[data-theme="dark"] .layout .form-control,
:root[data-theme="dark"] .layout .form-select {
  background: var(--app-surface-2);
  border-color: var(--app-border);
  color: var(--app-text);
}
:root[data-theme="dark"] .layout .form-control::placeholder {
  color: var(--app-muted);
}
:root[data-theme="dark"] .layout .table {
  --bs-table-color: var(--app-text);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--app-border);
}
:root[data-theme="dark"] .layout .list-group-item {
  background: transparent;
  color: var(--app-text);
  border-color: var(--app-border);
}

/* ============================================================
   RGPD — pantalla de aceptación (incidencia nº 786)
   ============================================================ */
.rgpd-card .rgpd-icono {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  background: rgba(124, 58, 237, 0.12);
}
.rgpd-extra {
  border-left: 3px solid var(--brand-accent, #a78bfa);
  padding: 0.5rem 0.85rem;
  background: rgba(124, 58, 237, 0.06);
  border-radius: 0 10px 10px 0;
}

/* ============================================================
   DOCUMENTOS DEL EXPEDIENTE (incidencias nº 786 y 787)
   ============================================================ */
.tabla-documentos td,
.tabla-documentos th {
  vertical-align: middle;
}
.tabla-documentos .btn {
  white-space: nowrap;
}

/* ============================================================
   RECIBO DE CUOTA — respaldo HTML (incidencia nº 727)
   Página suelta: no vive dentro de .layout, así que se pinta sola.
   ============================================================ */
.recibo-body {
  background: #f1f5f9;
  color: #111827;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 1.5rem;
}
.recibo-hoja {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border-radius: 14px;
  padding: 2rem 2.25rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}
.recibo-cab {
  text-align: center;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.9rem;
  margin-bottom: 1.2rem;
}
.recibo-cab h1 {
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
  letter-spacing: 0.02em;
}
.recibo-cab div {
  font-size: 0.82rem;
  color: #6b7280;
}
.recibo-titulo {
  text-align: center;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  margin: 0 0 0.25rem;
}
.recibo-meta {
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 1.4rem;
}
.recibo-bloque {
  margin-bottom: 1.2rem;
  font-size: 0.9rem;
}
.recibo-bloque h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6b7280;
  margin: 0 0 0.4rem;
}
.recibo-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}
.recibo-tabla th,
.recibo-tabla td {
  border: 1px solid #d1d5db;
  padding: 0.55rem 0.7rem;
  text-align: left;
}
.recibo-tabla .num {
  text-align: right;
}
.recibo-texto {
  font-size: 0.9rem;
  line-height: 1.55;
}
.recibo-firma {
  margin-top: 2rem;
  font-size: 0.9rem;
}
.recibo-firma .mt {
  margin-top: 2.5rem;
}
.recibo-pie {
  margin-top: 1.8rem;
  font-size: 0.72rem;
  color: #6b7280;
  font-style: italic;
}
.recibo-acciones {
  margin-top: 1.5rem;
  text-align: center;
}
.recibo-acciones button,
.carnet-acciones button {
  border: 0;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  background: #5b21b6;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
}

/* ============================================================
   CARNET DE HERMANO — respaldo HTML (incidencia nº 850)
   Tamaño tarjeta: 85,6 × 54 mm
   ============================================================ */
.carnet-body {
  background: #f1f5f9;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 2rem 1rem;
}
.carnet {
  width: 85.6mm;
  height: 54mm;
  margin: 0 auto;
  background: #fff;
  border-radius: 3mm;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
}
.carnet-cab {
  background: #5b21b6;
  color: #fff;
  font-size: 8pt;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2.2mm 3mm;
  line-height: 1.25;
}
.carnet-cuerpo {
  flex: 1;
  padding: 2.5mm 3mm;
}
.carnet-etiqueta {
  font-size: 6pt;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6b7280;
}
.carnet-nombre {
  font-size: 11pt;
  font-weight: 700;
  margin: 1mm 0 2mm;
  line-height: 1.15;
}
.carnet-campo {
  display: flex;
  justify-content: space-between;
  gap: 3mm;
  font-size: 7.5pt;
  padding: 0.5mm 0;
}
.carnet-campo span {
  color: #6b7280;
}
.carnet-pie {
  background: #f0f0f5;
  color: #5a5a5a;
  font-size: 6pt;
  padding: 1.6mm 3mm;
  display: flex;
  justify-content: space-between;
}
.carnet-acciones {
  margin-top: 1.5rem;
  text-align: center;
}

@media print {
  .no-print {
    display: none !important;
  }
  .recibo-body,
  .carnet-body {
    background: #fff;
    padding: 0;
  }
  .recibo-hoja,
  .carnet {
    box-shadow: none;
  }
}
