/* Customer auth pages — Sparkwell branded UI (UI-first, no API required) */

.auth-page {
  min-height: calc(100vh - 80px);
  background-image: linear-gradient(180deg, #F5FAFF 0%, #FFFFFF 55%, #F0F7FE 100%);
  padding-top: 120px;
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 10% 20%, rgba(43, 113, 184, 0.08), transparent 60%),
    radial-gradient(ellipse 50% 35% at 90% 80%, rgba(0, 75, 151, 0.06), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.auth-page > .container {
  position: relative;
  z-index: 1;
}

.auth-shell {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(128, 128, 128, 0.2);
  box-shadow: 0 12px 40px -8px rgba(43, 113, 184, 0.18);
  background: var(--color_white);
}

/* Brand panel (left) */
.auth-brand {
  background: radial-gradient(70% 55% at 50% 35%, #2B71B8 0%, #004B97 100%);
  color: var(--color_white);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 560px;
  position: relative;
}

.auth-brand::after {
  content: "";
  position: absolute;
  right: -20%;
  bottom: -10%;
  width: 70%;
  height: 55%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.auth-brand-top .auth-brand-logo {
  height: 36px;
  width: auto;
  margin-bottom: 36px;
  filter: brightness(0) invert(1);
}

.auth-brand-kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 12px;
  font-family: var(--titleFont);
}

.auth-brand h1 {
  font-size: 32px;
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 16px;
  font-family: var(--titleFont);
  color: var(--color_white);
}

.auth-brand p {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.55;
  opacity: 0.9;
  margin: 0;
  max-width: 320px;
}

.auth-brand-product {
  margin-top: 40px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.auth-brand-product img {
  max-width: 220px;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.25));
  animation: auth-float 5s ease-in-out infinite;
}

@keyframes auth-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.auth-brand-foot {
  font-size: 13px;
  font-weight: 300;
  opacity: 0.75;
  margin-top: 24px;
  position: relative;
  z-index: 1;
}

/* Form panel (right) */
.auth-panel {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color_white);
}

.auth-panel-header {
  margin-bottom: 28px;
}

.auth-panel-header .title-btn {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 13px;
  padding: 6px 16px;
}

.auth-panel-header h2 {
  font-size: 28px;
  font-weight: 500;
  color: var(--primary1);
  margin: 0 0 8px;
  font-family: var(--titleFont);
}

.auth-panel-header p {
  font-size: 15px;
  font-weight: 300;
  color: var(--primary2);
  margin: 0;
}

.auth-card {
  display: block;
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.auth-card .form-group {
  margin-bottom: 4px;
}

.auth-card .form-group label.form-label {
  font-size: 14px;
  font-weight: 400;
  color: var(--primary3);
  margin-bottom: 6px;
}

.auth-card .form-group .form-control {
  border: 1px solid rgba(128, 128, 128, 0.3) !important;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 400;
  color: var(--primary3);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-card .form-group .form-control:focus {
  border-color: var(--primary1) !important;
  box-shadow: 0 0 0 3px rgba(43, 113, 184, 0.15);
}

.auth-card .form-group .form-control.is-invalid {
  border-color: #dc3545 !important;
  box-shadow: none;
}

.auth-card .form-group .form-control::placeholder {
  color: #a8a8a8;
  font-weight: 300;
}

.auth-card .invalid-feedback {
  display: block;
  font-size: 12px;
  color: #dc3545;
  margin-top: 6px;
  min-height: 0;
}

/* Mobile +91 prefix */
.auth-input-prefix {
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(128, 128, 128, 0.3);
  border-radius: 10px;
  overflow: hidden;
  background: var(--color_white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input-prefix:focus-within {
  border-color: var(--primary1);
  box-shadow: 0 0 0 3px rgba(43, 113, 184, 0.15);
}

.auth-input-prefix.is-invalid {
  border-color: #dc3545;
  box-shadow: none;
}

.auth-input-prefix .prefix {
  display: flex;
  align-items: center;
  padding: 0 12px 0 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--primary3);
  background: #F5FAFF;
  border-right: 1px solid rgba(128, 128, 128, 0.25);
  white-space: nowrap;
  user-select: none;
}

.auth-input-prefix .form-control {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  flex: 1;
  min-width: 0;
}

.auth-input-prefix .form-control:focus {
  box-shadow: none !important;
}

/* Password with show/hide */
.auth-password-wrap {
  position: relative;
}

.auth-password-wrap .form-control {
  padding-right: 48px !important;
}

.auth-password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--primary2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.auth-password-toggle:hover {
  color: var(--primary1);
  background: rgba(43, 113, 184, 0.06);
}

.auth-password-toggle:focus-visible {
  outline: 2px solid var(--primary1);
  outline-offset: 1px;
}

.auth-card .form-check,
.auth-modal .form-check {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  margin: 4px 0 0;
  padding: 4px 0;
  padding-left: 0 !important;
  text-align: left;
  float: none;
}

.auth-card .form-check-input,
.auth-modal .form-check-input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  margin-left: 0 !important;
  margin-right: 0;
  float: none;
  position: static;
  flex-shrink: 0;
  border-color: rgba(128, 128, 128, 0.45);
  cursor: pointer;
}

.auth-card .form-check-input:checked,
.auth-modal .form-check-input:checked {
  background-color: var(--primary1);
  border-color: var(--primary1);
}

.auth-card .form-check-label,
.auth-modal .form-check-label {
  font-size: 14px;
  font-weight: 400;
  color: var(--primary2);
  line-height: 1.45;
  cursor: pointer;
  text-align: left;
  flex: 1;
  padding-left: 0;
}

.auth-card .form-check-label a,
.auth-modal .form-check-label a {
  color: var(--primary1);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-modal .form-group:has(.form-check) {
  text-align: left;
}

.auth-card .submit-btn {
  text-align: center;
  display: block;
  width: 100%;
  padding: 14px 20px;
  background-color: var(--primary1);
  color: var(--color_white);
  border-radius: 30px;
  margin-top: 12px;
  border: 1px solid var(--primary1);
  transition: 0.35s all ease;
  font-family: var(--titleFont);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.auth-card .submit-btn:hover:not(:disabled) {
  background-color: var(--color_white);
  color: var(--primary1);
}

.auth-card .submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-card .auth-alert {
  display: none;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.auth-card .auth-alert.show {
  display: block;
  animation: auth-alert-in 0.25s ease;
}

@keyframes auth-alert-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-card .auth-alert-error {
  background: #fdecea;
  color: #b42318;
  border: 1px solid #f5c2c0;
}

.auth-card .auth-alert-success {
  background: #eaf7ef;
  color: #0f7a3a;
  border: 1px solid #b7e0c5;
}

.auth-card .auth-alert-info {
  background: #eef5fc;
  color: #1a4f7a;
  border: 1px solid #c5daf0;
}

.auth-meta {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 300;
  color: var(--primary2);
}

.auth-meta a {
  color: var(--primary1);
  font-weight: 500;
  text-decoration: none;
}

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

.auth-hint {
  display: block;
  font-size: 12px;
  font-weight: 300;
  color: var(--primary2);
  margin-top: 6px;
}

.auth-nav-current .nav-link[aria-current="page"] {
  color: var(--primary1) !important;
  opacity: 1 !important;
  font-weight: 500;
}

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

  .auth-brand {
    min-height: auto;
    padding: 36px 32px 28px;
  }

  .auth-brand h1 {
    font-size: 26px;
  }

  .auth-brand-product {
    display: none;
  }

  .auth-brand-foot {
    display: none;
  }

  .auth-panel {
    padding: 36px 28px 40px;
  }
}

@media (max-width: 575px) {
  .auth-page {
    padding-top: 100px;
    padding-bottom: 48px;
  }

  .auth-shell {
    border-radius: 16px;
  }

  .auth-brand {
    padding: 28px 22px 22px;
  }

  .auth-brand h1 {
    font-size: 22px;
  }

  .auth-panel {
    padding: 28px 20px 32px;
  }

  .auth-panel-header h2 {
    font-size: 24px;
  }
}

/* ——— Auth popups (modals) ——— */
.auth-modal .modal-dialog {
  max-width: 440px;
}

.auth-modal.auth-modal-lg .modal-dialog {
  max-width: 520px;
}

.auth-modal .modal-content {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px -12px rgba(0, 75, 151, 0.35);
}

.auth-modal .modal-header {
  border-bottom: none;
  padding: 28px 28px 0;
  position: relative;
  background: linear-gradient(180deg, #F5FAFF 0%, #ffffff 100%);
}

.auth-modal .modal-header .btn-close {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 2;
  opacity: 0.55;
}

.auth-modal .modal-header .btn-close:hover {
  opacity: 1;
}

.auth-modal .auth-modal-kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary1);
  margin-bottom: 8px;
  font-family: var(--titleFont);
}

.auth-modal .modal-title {
  font-size: 26px;
  font-weight: 500;
  color: var(--primary1);
  font-family: var(--titleFont);
  margin: 0;
  padding-right: 28px;
}

.auth-modal .auth-modal-sub {
  font-size: 14px;
  font-weight: 300;
  color: var(--primary2);
  margin: 8px 0 0;
}

.auth-modal .modal-body {
  padding: 20px 28px 8px;
}

.auth-modal .modal-footer {
  border-top: none;
  padding: 8px 28px 28px;
  flex-direction: column;
  align-items: stretch;
}

.auth-modal .auth-card {
  padding: 0;
  border: none;
  box-shadow: none;
}

.auth-modal .auth-meta {
  margin-top: 16px;
  margin-bottom: 0;
}

.auth-modal .submit-btn {
  margin-top: 8px;
}

@media (max-width: 575px) {
  .auth-modal .modal-dialog {
    margin: 0.75rem;
  }

  .auth-modal .modal-header,
  .auth-modal .modal-body,
  .auth-modal .modal-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .auth-modal .modal-title {
    font-size: 22px;
  }
}

/* ——— Profile popup ——— */
.auth-profile-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 0 8px;
}

.auth-profile-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.18);
}

.auth-profile-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.auth-profile-label {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary2);
  font-family: var(--titleFont);
}

.auth-profile-value {
  font-size: 16px;
  color: var(--primary1);
  font-weight: 500;
}

.auth-logout-btn,
.auth-modal .auth-logout-btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  margin-top: 4px;
  background-color: var(--primary1) !important;
  color: var(--color_white) !important;
  border: 1px solid var(--primary1) !important;
  border-radius: 30px;
  font-family: var(--titleFont);
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: 0.35s all ease;
  box-shadow: none;
}

.auth-logout-btn:hover,
.auth-modal .auth-logout-btn:hover {
  background-color: var(--color_white) !important;
  color: var(--primary1) !important;
  border-color: var(--primary1) !important;
}

.auth-logout-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
