/* ==========================================================================
   KADOSYS Igrejas - Autenticacao (visual futurista Tech/IA)
   ========================================================================== */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  z-index: 1;
}

/* ---- Painel lateral -------------------------------------------------------- */

.auth-aside {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--glass-border);
  background:
    radial-gradient(ellipse 70% 50% at 20% 15%, rgba(59, 130, 246, 0.16), transparent 60%),
    radial-gradient(ellipse 60% 45% at 85% 80%, rgba(139, 92, 246, 0.16), transparent 62%),
    rgba(8, 12, 20, 0.6);
}

.auth-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 25%, transparent 75%);
  pointer-events: none;
}

.auth-aside-brand {
  position: relative;
}

.auth-aside-quote {
  position: relative;
  max-width: 420px;
}

.auth-aside-quote h2 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1.25;
  font-weight: 700;
  margin: 1.2rem 0 1.8rem;
  color: var(--white);
}

.auth-aside-points {
  display: grid;
  gap: 0.8rem;
}

.auth-aside-points div {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.auth-aside-points i {
  color: var(--primary-soft);
  font-size: 1.05rem;
}

.auth-aside-foot {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-dim);
}

/* ---- Lado do formulario ------------------------------------------------------ */

.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
}

.auth-form-card {
  width: 100%;
  max-width: 420px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.4rem 2.2rem;
  box-shadow: 0 0 40px rgba(59, 130, 246, 0.1), 0 24px 60px rgba(0, 0, 0, 0.35);
}

.auth-form-card .eyebrow {
  margin-bottom: 1rem;
}

.auth-form-card h1 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--white);
}

.auth-form-card .subtitle {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 2rem;
}

.auth-field {
  margin-bottom: 1.2rem;
}

.auth-field label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.45rem;
}

.auth-field .form-control {
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border-strong);
  background: rgba(15, 23, 42, 0.72);
  color: var(--white);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: var(--transition);
}

.auth-field .form-control::placeholder {
  color: var(--text-dim);
}

.auth-field .form-control:focus {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(96, 165, 250, 0.75);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
  color: var(--white);
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.6rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.auth-options input[type="checkbox"] {
  accent-color: var(--primary);
}

.auth-options a {
  color: var(--primary-soft);
  font-weight: 600;
  transition: var(--transition);
}

.auth-options a:hover {
  color: var(--accent-soft);
}

.auth-alert {
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  font-size: 0.86rem;
  margin-bottom: 1.3rem;
}

.auth-alert.error {
  background: rgba(248, 113, 113, 0.1);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.auth-alert.success {
  background: rgba(52, 211, 153, 0.1);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.auth-form-card .btn-k {
  width: 100%;
  margin-top: 0.4rem;
}

/* ---- Cadastro publico (igreja + admin + plano) --------------------------- */

.auth-form-card-wide {
  max-width: 560px;
}

.auth-field-row {
  display: flex;
  gap: 1rem;
}

.auth-field-row .auth-field {
  flex: 1;
  min-width: 0;
}

.auth-slug-input {
  display: flex;
  align-items: stretch;
}

.auth-slug-input .form-control {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  min-width: 0;
}

.auth-slug-suffix {
  display: flex;
  align-items: center;
  padding: 0 0.9rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--glass-border-strong);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.auth-field-hint {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.76rem;
  color: var(--text-dim);
}

.plano-escolha {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.8rem;
}

.plano-escolha-card {
  position: relative;
  border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.4);
  transition: var(--transition);
}

.plano-escolha-card:hover {
  border-color: rgba(96, 165, 250, 0.5);
}

.plano-escolha-card.selecionado {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.plano-escolha-card input[type="radio"],
.plano-escolha-card input[type="checkbox"] {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  accent-color: var(--primary);
}

[data-permissoes-grid] {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

[data-permissoes-grid] .plano-escolha-card {
  padding: 0.9rem 2rem 0.9rem 1rem;
}

[data-permissoes-grid] .plano-escolha-card .nome {
  padding-right: 0;
  word-break: break-word;
}

.plano-escolha-card .nome {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--white);
  margin-bottom: 0.3rem;
  padding-right: 1.4rem;
}

.plano-escolha-card .preco {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary-soft);
}

.plano-escolha-card .preco small {
  font-weight: 500;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.plano-escolha-card .desc {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---- Cobranca Pix (cadastro) ---------------------------------------------- */

.pix-valor {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--white);
  text-align: center;
  margin: 0.4rem 0 1.2rem;
}

.pix-qr-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.3rem;
}

.pix-qr-wrap img {
  width: 220px;
  height: 220px;
  border-radius: var(--radius-sm);
  background: var(--white);
  padding: 0.6rem;
}

.pix-copiar-btn {
  border: 1px solid var(--glass-border-strong);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(15, 23, 42, 0.5);
  color: var(--text-muted);
  padding: 0 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.pix-copiar-btn:hover {
  color: var(--primary-soft);
}

.pix-copiar-btn.copiado {
  color: var(--success);
}

.pix-status,
.provisionamento-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.4rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(212, 161, 63, 0.1);
  color: #d4a13f;
  border: 1px solid rgba(212, 161, 63, 0.3);
  font-size: 0.88rem;
  font-weight: 600;
}

.pix-status.confirmado,
.provisionamento-status.confirmado {
  background: rgba(52, 211, 153, 0.1);
  color: var(--success);
  border-color: rgba(52, 211, 153, 0.3);
}

.pix-status.erro,
.provisionamento-status.erro {
  background: rgba(248, 113, 113, 0.1);
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.3);
}

.spin {
  display: inline-block;
  animation: kadosys-spin 1.4s linear infinite;
}

@keyframes kadosys-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.auth-signup-hint {
  margin: 1.4rem 0 0;
  text-align: center;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.auth-signup-hint a {
  color: var(--primary-soft);
  font-weight: 600;
  transition: var(--transition);
}

.auth-signup-hint a:hover {
  color: var(--accent-soft);
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.6rem;
  font-size: 0.86rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.auth-back-link:hover {
  color: var(--primary-soft);
}

/* ---- Responsivo --------------------------------------------------------------- */

@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-aside {
    display: none;
  }

  .auth-form-card {
    padding: 2rem 1.6rem;
  }

  .auth-field-row,
  .plano-escolha {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}
