.auth-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 40%, #14b8a6 100%);
}

.auth-gate__card {
  width: min(480px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
  animation: authSlideIn 0.45s ease;
}

.auth-screen--wide {
  width: min(540px, 100%);
}

.auth-switch {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: #64748b;
}

.auth-switch a {
  color: #4338ca;
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-verify-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: #eef2ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.auth-verify-icon--success {
  background: #ecfdf5;
  color: #059669;
  font-weight: 700;
}

.auth-verify-text {
  text-align: center;
  color: #334155;
  line-height: 1.5;
}

.auth-screen h2 {
  text-align: center;
  margin-bottom: 0.75rem;
}

.auth-screen .secondary-btn,
.auth-screen .auth-submit--link {
  display: block;
  width: 100%;
  margin-top: 1rem;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

.dev-verify-link {
  margin: 1rem 0;
  padding: 0.75rem;
  background: #fffbeb;
  border-radius: 8px;
  font-size: 0.85rem;
  word-break: break-all;
}

.dev-verify-link a {
  color: #4338ca;
}

@keyframes authSlideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-gate__brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.auth-gate__brand .brand__icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #6366f1, #14b8a6);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  background: #f1f5f9;
  padding: 0.25rem;
  border-radius: 12px;
}

.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.65rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  color: #64748b;
  transition: all 0.2s;
}

.auth-tab.active {
  background: #fff;
  color: #4338ca;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.auth-form label {
  display: block;
  margin-bottom: 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #334155;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form input:focus,
.auth-form select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.auth-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.auth-submit {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.85rem;
  font-size: 1rem;
}

.auth-hint {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 1rem;
  text-align: center;
}

.registration-template {
  margin: 1rem 0;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
  animation: authSlideIn 0.3s ease;
}

.registration-template.hidden {
  display: none;
}

.registration-template h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.registration-fields label {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
}

.auth-gate-toast {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #ecfdf5;
  color: #047857;
  border-radius: 8px;
  font-size: 0.9rem;
  text-align: center;
}

body.auth-locked {
  overflow: hidden;
}

body.auth-locked .app {
  display: none !important;
}

body:not(.auth-locked) #auth-gate {
  display: none !important;
}

.auth-screen[hidden] {
  display: none !important;
}

/* Payment center */
.payment-hero {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  padding: 1.5rem;
  border-radius: 16px;
  margin-bottom: 1rem;
}

.payment-hero--admin {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
}

.payment-hero--owner {
  background: linear-gradient(135deg, #7c3aed, #db2777);
}

.payment-stats .stat-card--owe {
  border-top: 3px solid #f59e0b;
}

.payment-stats .stat-card--paid {
  border-top: 3px solid #10b981;
}

.payment-item-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.config-form label {
  display: block;
  margin-bottom: 0.75rem;
}

.preview-box {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 10px;
}

.form-footer {
  margin-top: 1rem;
}

.muted {
  color: #64748b;
}

.mt-lg {
  margin-top: 1rem;
}

.hidden {
  display: none !important;
}
