/* ============================================================
   Candado de acceso (misma clave que documentos.html del sitio)
   ============================================================ */
html.sa-locked { overflow: hidden; }
html.sa-locked .md-header,
html.sa-locked .md-tabs,
html.sa-locked .md-container,
html.sa-locked .md-footer,
html.sa-locked .md-dialog { display: none !important; }

#sa-gate { display: none; }
html.sa-locked #sa-gate { display: flex; }

#sa-gate {
  position: fixed; inset: 0; z-index: 9999;
  align-items: center; justify-content: center;
  background: var(--bg-base, #F4F5F7);
  padding: 1.5rem;
  font-family: var(--font-sans, "Figtree", sans-serif);
}
.sa-gate-card {
  width: 100%; max-width: 400px;
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border-light, #e2e5ea);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .15);
  padding: 2.5rem 2rem; text-align: center;
}
.sa-gate-ic {
  width: 56px; height: 56px; margin: 0 auto 1.2rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--sa-primary-light, #e8eefb);
  color: var(--sa-primary, #3A5A9A);
}
.sa-gate-ic svg { width: 26px; height: 26px; }
.sa-gate-card h2 { margin: 0 0 .5rem; font-size: 1.25rem; color: var(--text-primary, #1E2430); font-weight: 700; }
.sa-gate-card p { margin: 0 0 1.4rem; font-size: .85rem; color: var(--text-muted, #6b7280); line-height: 1.5; }
#sa-gate-input {
  width: 100%; box-sizing: border-box;
  padding: 12px 14px; font-size: 1rem; font-family: inherit;
  color: var(--text-primary, #1E2430);
  background: var(--bg-raised, #f4f5f7);
  border: 1px solid var(--border-strong, #cbd2da);
  border-radius: 7px; text-align: center; letter-spacing: .12em;
}
#sa-gate-input:focus { outline: none; border-color: var(--sa-primary, #3A5A9A); box-shadow: 0 0 0 3px rgba(58, 90, 154, .2); }
#sa-gate-btn {
  width: 100%; margin-top: 1rem; padding: 12px 14px;
  font-size: 1rem; font-weight: 600; font-family: inherit;
  color: #fff; background: var(--sa-primary, #3A5A9A);
  border: none; border-radius: 7px; cursor: pointer;
}
#sa-gate-btn:hover { background: var(--sa-primary-hover, #2f4a80); }
#sa-gate-err { display: none; margin: 1rem 0 0; font-size: .85rem; color: #c0392b; font-weight: 500; }
.sa-gate-ask {
  display: inline-block; margin-top: 1.4rem;
  font-size: .85rem; font-weight: 500;
  color: var(--sa-primary, #3A5A9A); text-decoration: none;
  border-bottom: 1px solid transparent;
}
.sa-gate-ask:hover { border-bottom-color: currentColor; }
