:root {
  --auth-wine: #E7003E;
  --auth-orange: #FF9D00;
  --auth-amber: #FF9D00;
  --auth-cream: #fffaf0;
  --auth-ink: #0f172a;
  --auth-muted: #64748b;
  --auth-border: #fed7aa;
}

body.auth-page {
  background:
    radial-gradient(circle at 12% 12%, rgba(242, 173, 63, .20), transparent 29rem),
    radial-gradient(circle at 90% 88%, rgba(216, 92, 47, .13), transparent 32rem),
    linear-gradient(145deg, #fffaf4 0%, #f8efea 100%);
  color: var(--auth-ink);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-shell {
  width: 100%;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
}

.auth-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 27rem;
  padding: clamp(1.5rem, 5vw, 2.75rem);
  border: 1px solid rgba(159, 29, 44, .10);
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 1.5rem 4rem rgba(90, 37, 29, .12);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: .3rem;
  background: linear-gradient(90deg, var(--auth-wine), var(--auth-orange) 62%, var(--auth-amber));
}

.auth-brand-mark {
  width: 3.75rem;
  height: 3.75rem;
  color: #fff;
  background: linear-gradient(145deg, var(--auth-wine), var(--auth-orange));
  box-shadow: 0 .75rem 1.5rem rgba(159, 29, 44, .24);
}

.auth-title {
  color: var(--auth-ink);
  letter-spacing: -.035em;
}

.auth-subtitle,
.auth-footer {
  color: var(--auth-muted) !important;
  font-size: 8px;
}

.app-footer-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.22rem 0.65rem;
  font-size: 0.68125rem;
  font-weight: 600;
  color: #128c7e;
  background-color: #e8f7ee;
  border: 1px solid #c2e9cf;
  border-radius: 999px;
  text-decoration: none;
  line-height: 1.25;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(18, 140, 126, 0.05);
}

.app-footer-whatsapp i {
  font-size: 0.875rem;
  color: #25d366;
  transition: transform 0.2s ease, color 0.2s ease;
}

.app-footer-whatsapp:hover {
  background-color: #25d366;
  border-color: #25d366;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(37, 211, 102, 0.28);
  transform: translateY(-1px);
}

.app-footer-whatsapp:hover i {
  color: #ffffff;
  transform: scale(1.12);
}

.app-footer-whatsapp:active {
  transform: translateY(0);
}


.auth-label {
  color: #4b3638;
  font-size: .875rem;
}

.auth-input-group {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  width: 100%;
  height: 3.25rem;
  overflow: hidden;
  border: 1.5px solid var(--auth-border);
  border-radius: .875rem;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.auth-input-group:focus-within {
  border-color: var(--auth-orange) !important;
  box-shadow: 0 0 0 .25rem rgba(255, 157, 0, .20) !important;
  background: var(--auth-cream);
}

.auth-input-group .input-group-text {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 0.5rem 0 1rem;
  color: var(--auth-orange);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.auth-input-group .form-control {
  flex: 1 1 auto !important;
  width: 1% !important;
  min-width: 0 !important;
  height: 100% !important;
  min-height: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 0.5rem 0.75rem 0.5rem 0.25rem !important;
  color: var(--auth-ink);
  font-size: 1rem;
  box-shadow: none !important;
  outline: none !important;
}

.auth-input-group .btn-pw-toggle {
  background: transparent;
  border: 0;
  color: var(--auth-muted);
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 1.15rem;
  transition: color .15s ease;
  outline: none;
}

.auth-input-group .btn-pw-toggle:hover {
  color: var(--auth-wine);
}

.auth-input-group .btn-pw-toggle:focus {
  outline: none;
  box-shadow: none;
}

.form-check-input:checked {
  background-color: var(--auth-wine);
  border-color: var(--auth-wine);
}

.form-check-input:focus {
  border-color: var(--auth-orange);
  box-shadow: 0 0 0 .2rem rgba(255, 157, 0, .25);
}

/* ==========================================================================
   Modern & Stylish Toggle Switch
   ========================================================================== */
.auth-switch-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
  margin: 0;
  transition: opacity 0.2s ease;
}

.auth-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.auth-switch-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

.auth-switch-track {
  position: absolute;
  inset: 0;
  background-color: #e2e8f0;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  transition: background 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.auth-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 17px;
  height: 17px;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.16), 0 1px 2px rgba(15, 23, 42, 0.1);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              width 0.2s ease,
              background-color 0.2s ease;
}

/* Hover state */
.auth-switch-wrapper:hover .auth-switch-track {
  border-color: #94a3b8;
  background-color: #e2e8f0;
}

/* Checked state */
.auth-switch-input:checked + .auth-switch-track {
  background: linear-gradient(135deg, var(--auth-wine) 0%, var(--auth-orange) 100%);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(231, 0, 62, 0.32);
}

.auth-switch-input:checked + .auth-switch-track .auth-switch-thumb {
  transform: translateX(20px);
}

/* Active / pressed state */
.auth-switch-wrapper:active .auth-switch-thumb {
  width: 21px;
}

.auth-switch-input:checked:active + .auth-switch-track .auth-switch-thumb {
  transform: translateX(16px);
}

/* Focus ring for accessibility */
.auth-switch-input:focus-visible + .auth-switch-track {
  outline: none;
  box-shadow: 0 0 0 3px rgba(231, 0, 62, 0.25), 0 2px 8px rgba(231, 0, 62, 0.2);
}

/* Switch label text */
.auth-switch-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--auth-muted);
  transition: color 0.2s ease;
}

.auth-switch-wrapper:hover .auth-switch-label {
  color: var(--auth-ink);
}

.auth-switch-input:checked ~ .auth-switch-label,
.auth-switch-wrapper:has(.auth-switch-input:checked) .auth-switch-label {
  color: #334155;
  font-weight: 600;
}

.auth-input-group .form-control::placeholder { color: #a79698; }
.auth-input-group .form-control:focus { background: transparent !important; box-shadow: none !important; }

.auth-input-group .form-control:-webkit-autofill,
.auth-input-group .form-control:-webkit-autofill:hover,
.auth-input-group .form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--auth-ink);
  box-shadow: 0 0 0 1000px var(--auth-cream) inset;
  transition: background-color 9999s ease-out 0s;
}

.auth-submit {
  min-height: 3.25rem;
  border: 0;
  border-radius: .875rem;
  color: #fff;
  background: linear-gradient(110deg, var(--auth-wine), #ba302c 52%, var(--auth-orange));
  box-shadow: 0 .75rem 1.5rem rgba(159, 29, 44, .22);
  font-weight: 700;
  letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.auth-submit:hover {
  color: #fff;
  filter: brightness(.96) saturate(1.08);
  transform: translateY(-1px);
  box-shadow: 0 1rem 1.75rem rgba(159, 29, 44, .26);
}

.auth-submit:focus-visible {
  color: #fff;
  box-shadow: 0 0 0 .25rem rgba(242, 173, 63, .40), 0 .75rem 1.5rem rgba(159, 29, 44, .22);
}

.auth-submit:active { color: #fff !important; transform: translateY(0); }

@media (max-width: 359.98px) {
  .auth-shell { padding-inline: .75rem; }
  .auth-card { padding: 1.25rem; border-radius: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-input-group,
  .auth-submit { transition: none; }
}
