/* ═══════════════════════════════════════════════════════════
   DCC – Login / Register Page Styles
   File: public/css/login.css
   ═══════════════════════════════════════════════════════════ */

/* ─── AUTH SECTION (full-page wrapper) ────────────────── */
.auth-section {
  min-height: calc(100vh - 180px);
  background: linear-gradient(135deg, #f5f7f5 0%, #e8f8ef 50%, #f0fdf4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 2rem;
}

/* ─── AUTH CARD (main container) ─────────────────────── */
.auth-card {
  width: 100%;
  max-width: 1060px;
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.12);
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  overflow: hidden;
  border: 1px solid var(--gray-light);
}

/* ═══════════════════════════════════════════════════════
   LEFT — WELCOME PANEL
   ═══════════════════════════════════════════════════════ */
.auth-welcome {
  background: linear-gradient(145deg, var(--navy) 0%, #0a2540 55%, #0f3d2e 100%);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Decorative paw */
.auth-welcome__paw-pattern {
  position: absolute;
  bottom: -20px;
  right: -20px;
  font-size: 12rem;
  opacity: .04;
  line-height: 1;
  pointer-events: none;
  animation: floatPawAuth 6s ease-in-out infinite;
}
@keyframes floatPawAuth {
  0%,100% { transform: rotate(0) scale(1); }
  50%     { transform: rotate(8deg) scale(1.05); }
}

/* Dot pattern overlay */
.auth-welcome::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}

.auth-welcome__inner {
  position: relative;
  z-index: 2;
}

.auth-welcome__logo {
  display: inline-block;
  margin-bottom: 2rem;
}
.auth-welcome__logo-img {
  height: 48px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.3));
  transition: transform .3s ease;
}
.auth-welcome__logo:hover .auth-welcome__logo-img {
  transform: scale(1.06);
}

.auth-welcome__title {
  font-family: 'Lora', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: .6rem;
}

.auth-welcome__sub {
  color: rgba(255,255,255,.6);
  font-size: .92rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 320px;
}

/* Perks list */
.auth-welcome__perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  margin-bottom: 2.5rem;
}
.auth-welcome__perks li {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: rgba(255,255,255,.75);
  font-size: .88rem;
  font-weight: 600;
}
.perk-icon {
  width: 36px;
  height: 36px;
  background: rgba(29,185,84,.18);
  border: 1px solid rgba(29,185,84,.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  transition: var(--transition);
}
.auth-welcome__perks li:hover .perk-icon {
  background: rgba(29,185,84,.3);
  transform: scale(1.08);
}

/* Floating emojis */
.auth-welcome__visual {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}
.auth-welcome__emoji {
  font-size: 3.5rem;
  animation: floatEmoji 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.3));
}
.auth-welcome__emoji--cat {
  animation-delay: .8s;
}
@keyframes floatEmoji {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-10px); }
}

/* ═══════════════════════════════════════════════════════
   RIGHT — FORM PANEL
   ═══════════════════════════════════════════════════════ */
.auth-form-panel {
  padding: 2.5rem 2.8rem;
  display: flex;
  flex-direction: column;
}

/* Trust strip */
.auth-trust-strip {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: rgba(29,185,84,.07);
  color: var(--green-dark);
  font-size: .72rem;
  font-weight: 700;
  padding: .45rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  letter-spacing: .02em;
}
.auth-trust-strip i {
  color: var(--green);
  font-size: .85rem;
}

/* Auth heading */
.auth-heading {
  font-family: 'Lora', serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .3rem;
}
.auth-subheading {
  font-size: .88rem;
  color: var(--gray);
  margin-bottom: 1.5rem;
}

/* ─── MAIN TABS (Login / Register) ────────────────────── */
.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--gray-light);
  margin-bottom: 1.5rem;
  gap: 0;
}
.main-tab {
  flex: 1;
  padding: .75rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: .88rem;
  font-weight: 700;
  color: var(--gray);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  position: relative;
}
.main-tab:hover {
  color: var(--navy);
}
.main-tab.active {
  color: var(--navy);
  border-bottom-color: var(--green);
  font-weight: 800;
}

/* ─── AUTH PANELS ─────────────────────────────────────── */
.auth-panel {
  display: none;
  animation: fadeSlideIn .3s ease both;
}
.auth-panel.active {
  display: block;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── METHOD TABS (OTP / Email pills) ─────────────────── */
.method-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.login-method-tab,
.register-method-tab {
  flex: 1;
  padding: .55rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: .78rem;
  font-weight: 700;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  background: var(--gray-light);
  color: var(--navy);
}
.login-method-tab:hover,
.register-method-tab:hover {
  background: #d4ddd4;
}
.login-method-tab.active,
.register-method-tab.active {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 3px 10px rgba(29,185,84,.28);
}

/* ─── METHOD FORMS ─────────────────────────────────────── */
.method-form {
  display: none;
  animation: fadeSlideIn .25s ease both;
}
.method-form.active {
  display: block;
}

/* ─── FORM GROUP ──────────────────────────────────────── */
.auth-form-panel .form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: 1rem;
}
.auth-form-panel .form-group label {
  font-size: .78rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: .02em;
}

/* Input with icon */
.input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: .9rem;
  font-size: 1rem;
  z-index: 2;
  pointer-events: none;
  line-height: 1;
}
.input-icon-wrap input {
  width: 100%;
  padding: .82rem 1rem .82rem 2.8rem;
  border: 1.5px solid var(--gray-light);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: .92rem;
  color: var(--navy);
  background: var(--white);
  transition: border-color .2s ease, box-shadow .2s ease;
  outline: none;
}
.input-icon-wrap input::placeholder {
  color: #a8b5a8;
}
.input-icon-wrap input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(29,185,84,.12);
}

/* ─── PASSWORD TOGGLE ─────────────────────────────────── */
.input-password-wrap {
  position: relative;
}
.toggle-password {
  position: absolute;
  right: .8rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray);
  font-size: .9rem;
  cursor: pointer;
  padding: .3rem;
  border-radius: 6px;
  transition: var(--transition);
  z-index: 2;
}
.toggle-password:hover {
  color: var(--green);
  background: rgba(29,185,84,.08);
}

/* ─── PASSWORD STRENGTH METER ─────────────────────────── */
.password-strength {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: .3rem;
}
.strength-bars {
  display: flex;
  gap: 3px;
  flex: 1;
}
.strength-bars .bar {
  height: 4px;
  flex: 1;
  background: var(--gray-light);
  border-radius: 4px;
  transition: background .3s ease;
}
.strength-label {
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
  min-width: 60px;
  text-align: right;
}

/* Strength levels */
.password-strength[data-level="1"] .bar:nth-child(1) { background: #ef4444; }
.password-strength[data-level="1"] .strength-label { color: #ef4444; }
.password-strength[data-level="2"] .bar:nth-child(-n+2) { background: #f59e0b; }
.password-strength[data-level="2"] .strength-label { color: #f59e0b; }
.password-strength[data-level="3"] .bar:nth-child(-n+3) { background: #eab308; }
.password-strength[data-level="3"] .strength-label { color: #eab308; }
.password-strength[data-level="4"] .bar:nth-child(-n+4) { background: #22c55e; }
.password-strength[data-level="4"] .strength-label { color: #22c55e; }
.password-strength[data-level="5"] .bar:nth-child(-n+5) { background: var(--green); }
.password-strength[data-level="5"] .strength-label { color: var(--green); }

/* ─── OTP BOXES ───────────────────────────────────────── */
.otp-section {
  margin-top: 1.2rem;
  animation: fadeSlideIn .3s ease both;
}
.otp-section label {
  font-size: .78rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: .6rem;
  display: block;
}
.otp-boxes {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin-bottom: 1rem;
}
.otp-box {
  width: 46px;
  height: 52px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 800;
  font-family: 'Inter', sans-serif;
  color: var(--navy);
  border: 2px solid var(--gray-light);
  border-radius: 10px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  background: var(--white);
  caret-color: var(--green);
}
.otp-box:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(29,185,84,.15);
  background: rgba(29,185,84,.03);
}
.otp-box.filled {
  border-color: var(--green);
  background: rgba(29,185,84,.06);
}

/* OTP timer / resend */
.otp-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  margin-bottom: 1rem;
  font-size: .78rem;
  color: var(--gray);
}
.otp-resend {
  background: none;
  border: none;
  color: var(--green);
  font-weight: 700;
  font-size: .78rem;
  cursor: pointer;
  transition: var(--transition);
  display: none;
}
.otp-resend.show {
  display: inline-block;
}
.otp-resend:hover {
  text-decoration: underline;
}
.otp-resend:disabled {
  color: var(--gray);
  cursor: not-allowed;
}

/* ─── SUBMIT BUTTON ───────────────────────────────────── */
.btn-submit {
  width: 100%;
  padding: .88rem 1.5rem;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: .02em;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  margin-top: .5rem;
}
.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(29,185,84,.35);
}
.btn-submit:active {
  transform: translateY(0);
}
/* Shimmer */
.btn-submit::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  transition: left .5s ease;
}
.btn-submit:hover::after { left: 100%; }

/* Loading state */
.btn-submit.loading {
  pointer-events: none;
  opacity: .8;
}
.btn-submit.loading::before {
  content: '';
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
  margin-right: .5rem;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── CHECKBOXES (custom) ─────────────────────────────── */
.checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  cursor: pointer;
  font-size: .82rem;
  color: var(--navy);
  line-height: 1.4;
  font-weight: 500;
}
.checkbox-wrap input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.custom-check {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 2px solid var(--green);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
  margin-top: 1px;
}
.custom-check::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .2s ease;
}
.checkbox-wrap input:checked + .custom-check {
  background: var(--green);
  border-color: var(--green);
}
.checkbox-wrap input:checked + .custom-check::after {
  transform: rotate(45deg) scale(1);
}
.checkbox-wrap input:focus-visible + .custom-check {
  box-shadow: 0 0 0 3px rgba(29,185,84,.2);
}
.checkbox-wrap a {
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.checkbox-wrap a:hover {
  color: var(--green-dark);
}
.required { color: #ef4444; font-weight: 700; }
.checkbox-optional { margin-top: .5rem; }

/* ─── REMEMBER ME + FORGOT ROW ────────────────────────── */
.form-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.link-small {
  font-size: .78rem;
  font-weight: 700;
  color: var(--green);
  transition: var(--transition);
}
.link-small:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

/* ─── REGISTER TERMS ──────────────────────────────────── */
.register-terms {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-light);
}

/* ─── AUTH DIVIDER ────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-light);
}
.auth-divider span {
  font-size: .75rem;
  color: var(--gray);
  font-weight: 600;
}

/* ─── GOOGLE BUTTON ───────────────────────────────────── */
.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  padding: .78rem 1rem;
  background: var(--white);
  border: 1.5px solid var(--gray-light);
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: .88rem;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  transition: var(--transition);
}
.btn-google:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
  transform: translateY(-1px);
}
.btn-google:active {
  transform: translateY(1px);
}
.btn-google svg {
  flex-shrink: 0;
}

/* ─── AUTH TOGGLE ─────────────────────────────────────── */
.auth-toggle {
  text-align: center;
  font-size: .82rem;
  color: var(--gray);
  margin-top: 1.2rem;
}
.toggle-link {
  background: none;
  border: none;
  color: var(--green);
  font-weight: 800;
  font-size: .82rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Inter', sans-serif;
}
.toggle-link:hover {
  color: var(--green-dark);
  text-decoration: underline;
}

/* ─── AUTH MESSAGE (success / error) ──────────────────── */
.auth-message {
  margin-top: 1rem;
  padding: 0;
  font-size: .82rem;
  font-weight: 600;
  border-radius: 8px;
  transition: var(--transition);
  line-height: 1.5;
}
.auth-message:empty {
  display: none;
}
.auth-message:not(:empty) {
  padding: .7rem 1rem;
  animation: fadeSlideIn .3s ease both;
}
.auth-message.error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.auth-message:not(.error):not(:empty) {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* ─── TRUST BADGES (bottom) ───────────────────────────── */
.auth-trust-badges {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--gray-light);
}
.trust-badge-item {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .68rem;
  color: var(--gray);
  font-weight: 600;
}
.trust-badge-item i {
  color: var(--green);
  font-size: .72rem;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */

/* Tablet — stack layout */
@media (max-width: 1024px) {
  .auth-card {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
  .auth-welcome {
    padding: 2.2rem 2rem;
  }
  .auth-welcome__visual { display: none; }
  .auth-welcome__perks { gap: .6rem; margin-bottom: 0; }
  .auth-welcome__paw-pattern { display: none; }
  .auth-welcome__sub { margin-bottom: 1.2rem; }
  .auth-form-panel { padding: 2rem; }
}

/* Mobile */
@media (max-width: 768px) {
  .auth-section { padding: 2rem 1rem; }
  .auth-card { max-width: 100%; border-radius: 18px; }

  .auth-welcome {
    padding: 1.8rem 1.5rem;
  }
  .auth-welcome__title { font-size: 1.5rem; }
  .auth-welcome__perks li { font-size: .82rem; }
  .perk-icon { width: 30px; height: 30px; font-size: .85rem; }

  .auth-form-panel { padding: 1.5rem; }
  .auth-heading { font-size: 1.4rem; }
  .auth-trust-badges { gap: .8rem; flex-wrap: wrap; justify-content: center; }

  .otp-box { width: 40px; height: 46px; font-size: 1.1rem; }
}

/* Small mobile */
@media (max-width: 480px) {
  .auth-welcome {
    display: none;
  }
  .auth-card {
    border-radius: 16px;
  }
  .auth-section { padding: 1rem .5rem; }
  .auth-form-panel { padding: 1.5rem 1.2rem; }

  .method-tabs { flex-direction: column; }
  .login-method-tab,
  .register-method-tab { text-align: center; }

  .otp-box { width: 36px; height: 42px; font-size: 1rem; }
  .otp-boxes { gap: .35rem; }

  .auth-trust-badges { flex-direction: column; align-items: center; gap: .5rem; }

  .form-row-between { flex-direction: column; align-items: flex-start; gap: .5rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .auth-panel,
  .method-form,
  .otp-section,
  .auth-message:not(:empty) {
    animation: none;
  }
}
