/**
 * Bloqueio do site público — só entra com celular cadastrado.
 */

html.pub-gate-locked .pub-shell,
html.pub-gate-locked .pub-page-main,
html.pub-gate-locked main:not(.pub-access-gate-card *) {
  visibility: hidden;
}

html.pub-gate-locked body {
  overflow: hidden;
}

.pub-access-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: var(--cp-bg, #f1f5f9);
}

.pub-access-gate.hidden {
  display: none;
}

.pub-access-gate-card {
  width: 100%;
  max-width: 22rem;
  padding: 1.75rem 1.5rem;
  border-radius: 1rem;
  background: var(--cp-surface, #fff);
  border: 1px solid var(--cp-border-soft, #e2e8f0);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.pub-access-gate-logo {
  width: 4.5rem;
  height: auto;
  margin: 0 auto 1rem;
  display: block;
}

.pub-access-gate-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cp-text, #0f172a);
}

.pub-access-gate-lead {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--cp-text-muted, #64748b);
  line-height: 1.5;
}

.pub-access-form {
  text-align: left;
}

.pub-access-form .label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.pub-access-form .input {
  width: 100%;
  margin-bottom: 0.75rem;
}

.pub-access-error {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: #b91c1c;
}

.pub-access-gate-foot {
  margin: 1.25rem 0 0;
  font-size: 0.875rem;
  color: var(--cp-text-muted, #64748b);
}

.pub-access-gate-foot a {
  color: var(--cp-accent, #7c3aed);
  font-weight: 600;
  text-decoration: none;
}

.pub-access-gate-foot a:hover {
  text-decoration: underline;
}

html[data-theme='dark'] .pub-access-gate {
  background: #0f172a;
}

html[data-theme='dark'] .pub-access-gate-card {
  background: #1e293b;
  border-color: #334155;
}
