/* ═══════════════════════════════════════════════════
   PAWLINE AUTH — REBRAND
   Wordmark-first · Cream/Brown · Editorial restraint
════════════════════════════════════════════════════ */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --pawline-brown: #5A3A14;
  --pawline-cream: #ECE3D0;
  --soft-tan: #7B5A35;

  --ballet: #E5C5C0;
  --mist: #BCC6CD;
  --sand: #CBB89C;

  --onyx: #2A2723;
  --bone: #EAE2D5;
  --espresso: #3D2817;

  --danger: #9F3A2E;
  --success: #5F7A5B;

  --radius: 20px;
  --radius-sm: 12px;

  --shadow-soft: 0 12px 40px rgba(61, 40, 23, .08);
  --shadow-card: 0 24px 70px rgba(61, 40, 23, .12), 0 2px 12px rgba(61, 40, 23, .05);
}

html,
body {
  min-height: 100%;
  width: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--pawline-cream);
  color: var(--espresso);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

/* Layout */
.wrapper {
  min-height: 100vh;
  display: flex;
  background: var(--pawline-cream);
}

/* Left panel */
.panel-left {
  position: relative;
  width: 46%;
  min-width: 390px;
  background:
    linear-gradient(180deg, rgba(239, 227, 208, .07) 0%, rgba(61, 40, 23, .05) 100%),
    var(--pawline-brown);
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.panel-left::after {
  content: "";
  position: absolute;
  top: 48px;
  right: 0;
  width: 1px;
  height: calc(100% - 96px);
  background: rgba(236, 227, 208, .22);
}

.panel-left__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 36px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
}

.brand__wordmark {
  display: block;
  width: 230px;
  max-width: 100%;
  height: auto;
}

/* Hero */
.headline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.headline__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: rgba(236, 227, 208, .74);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.badge-dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--pawline-cream);
  opacity: .72;
}

.headline__title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(2.7rem, 4.2vw, 3.85rem);
  font-weight: 500;
  line-height: 1.02;
  color: var(--pawline-cream);
  letter-spacing: -0.025em;
}

.headline__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--pawline-cream);
}

.headline__sub {
  max-width: 365px;
  font-size: .92rem;
  line-height: 1.75;
  color: rgba(236, 227, 208, .68);
}

/* Editorial note */
.brand-note {
  max-width: 360px;
  padding: 22px 22px 24px;
  border: 1px solid rgba(236, 227, 208, .16);
  border-radius: 24px;
  background: rgba(236, 227, 208, .055);
}

.brand-note__eyebrow {
  margin-bottom: 12px;
  color: rgba(236, 227, 208, .62);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.brand-note p {
  font-family: 'EB Garamond', Georgia, serif;
  color: var(--pawline-cream);
  font-size: 1.32rem;
  line-height: 1.28;
}

/* Stats */
.stats {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: rgba(236, 227, 208, .06);
  border: 1px solid rgba(236, 227, 208, .16);
  border-radius: 18px;
  padding: 16px 20px;
}

.stat {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.stat__num {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.36rem;
  font-weight: 500;
  color: var(--pawline-cream);
  line-height: 1;
}

.stat__lbl {
  color: rgba(236, 227, 208, .55);
  font-size: .62rem;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.stat-sep {
  width: 1px;
  background: rgba(236, 227, 208, .16);
  margin: 0 12px;
}

/* Right panel */
.panel-right {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: var(--pawline-cream);
  position: relative;
  overflow: hidden;
}

/* Views */
.view {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  opacity: 0;
  transform: translateY(20px) scale(.98);
  pointer-events: none;
  transition:
    opacity .45s cubic-bezier(.4, 0, .2, 1),
    transform .45s cubic-bezier(.4, 0, .2, 1);
}

.view.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
  position: relative;
  inset: auto;
}

/* Form card */
.form-card {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 34px;
  background: rgba(234, 226, 213, .44);
  border: 1px solid rgba(90, 58, 20, .12);
  border-radius: 26px;
  box-shadow: var(--shadow-card);
}

.mobile-logo {
  display: none;
}

.mobile-logo img {
  width: 180px;
  height: auto;
}

.form-card__header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-eyebrow {
  color: var(--soft-tan);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.form-card__header h2,
.success-state h3 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 2.25rem;
  font-weight: 500;
  color: var(--pawline-brown);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.form-card__header p {
  color: var(--soft-tan);
  font-size: .9rem;
  line-height: 1.6;
}

/* Alerts */
.alert-error,
.alert-success {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: .85rem;
  line-height: 1.45;
}

.alert-error {
  border: 1px solid rgba(159, 58, 46, .22);
  background: rgba(159, 58, 46, .06);
  color: var(--danger);
}

.alert-success {
  border: 1px solid rgba(95, 122, 91, .22);
  background: rgba(95, 122, 91, .08);
  color: var(--success);
}

/* Tabs */
.tabs {
  position: relative;
  display: flex;
  background: rgba(90, 58, 20, .06);
  border: 1px solid rgba(90, 58, 20, .12);
  border-radius: 12px;
  padding: 4px;
}

.tab {
  flex: 1;
  padding: 11px 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--soft-tan);
  border-radius: 9px;
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .03em;
  position: relative;
  z-index: 2;
  transition: color .25s ease;
}

.tab--active {
  color: var(--pawline-brown);
}

.tab-slider {
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: calc(50% - 4px);
  background: var(--pawline-cream);
  border-radius: 9px;
  box-shadow: 0 4px 14px rgba(90, 58, 20, .10);
  transition: left .38s cubic-bezier(.34, 1.56, .64, 1);
  z-index: 1;
}

.tab-slider--left {
  left: 4px;
}

.tab-slider--right {
  left: calc(50%);
}

/* Forms */
.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field label {
  color: var(--pawline-brown);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: rgba(123, 90, 53, .62);
  pointer-events: none;
  transition: color .25s ease;
  flex-shrink: 0;
}

.input-wrap input {
  width: 100%;
  padding: 14px 46px 14px 42px;
  background: var(--bone);
  border: 1px solid rgba(90, 58, 20, .18);
  border-radius: 12px;
  color: var(--espresso);
  font-size: .9rem;
  outline: none;
  transition:
    background .25s ease,
    border-color .25s ease,
    box-shadow .25s ease;
}

.input-wrap input::placeholder {
  color: rgba(123, 90, 53, .58);
}

.input-wrap input:focus {
  background: var(--pawline-cream);
  border-color: var(--pawline-brown);
  box-shadow: 0 0 0 4px rgba(90, 58, 20, .08);
}

.input-wrap:focus-within .input-icon {
  color: var(--pawline-brown);
}

.eye-btn {
  position: absolute;
  right: 12px;
  display: flex;
  align-items: center;
  padding: 4px;
  background: none;
  border: none;
  color: rgba(123, 90, 53, .62);
  cursor: pointer;
  transition: color .2s ease;
}

.eye-btn:hover {
  color: var(--pawline-brown);
}

.eye-icon {
  width: 17px;
  height: 17px;
}

/* Password strength */
.strength-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity .3s ease, max-height .3s ease;
}

.strength-wrap.visible {
  opacity: 1;
  max-height: 40px;
}

.strength-bars {
  display: flex;
  gap: 4px;
  flex: 1;
}

.s-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(90, 58, 20, .14);
  transition: background .35s ease;
}

.strength-lbl {
  min-width: 72px;
  font-size: .72rem;
  font-weight: 500;
  white-space: nowrap;
  text-align: right;
  transition: color .3s ease;
}

/* Checkbox */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--soft-tan);
  font-size: .85rem;
  line-height: 1.45;
}

.checkbox-row input[type="checkbox"] {
  display: none;
}

.checkbox-box {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(90, 58, 20, .22);
  border-radius: 5px;
  background: var(--bone);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s ease;
  position: relative;
}

.checkbox-row input:checked + .checkbox-box {
  background: var(--pawline-brown);
  border-color: var(--pawline-brown);
}

.checkbox-row input:checked + .checkbox-box::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--pawline-cream);
  border-bottom: 2px solid var(--pawline-cream);
  transform: rotate(-45deg) translateY(-1px);
  display: block;
}

.gold-link {
  color: var(--pawline-brown);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

.gold-link:hover {
  color: var(--espresso);
}

/* Buttons */
.btn-primary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 24px;
  background: var(--pawline-brown);
  color: var(--pawline-cream);
  border: 1px solid var(--pawline-brown);
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .04em;
  cursor: pointer;
  overflow: hidden;
  margin-top: 4px;
  transition:
    background .25s ease,
    border-color .25s ease,
    transform .15s ease,
    box-shadow .25s ease;
  box-shadow: 0 10px 24px rgba(90, 58, 20, .16);
}

.btn-primary:hover {
  background: var(--espresso);
  border-color: var(--espresso);
  box-shadow: 0 14px 32px rgba(61, 40, 23, .20);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-arrow {
  width: 18px;
  height: 18px;
  transition: transform .2s ease;
  flex-shrink: 0;
}

.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

.btn-primary:disabled {
  opacity: .72;
  cursor: not-allowed;
}

/* Links */
.link-btn {
  background: none;
  border: none;
  color: var(--pawline-brown);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 500;
  transition: color .2s ease;
  padding: 0;
}

.link-btn:hover {
  color: var(--espresso);
}

.switch-hint {
  text-align: center;
  color: var(--soft-tan);
  font-size: .85rem;
}

.switch-hint .link-btn {
  font-size: .85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Divider */
.or {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(123, 90, 53, .65);
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.or::before,
.or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(90, 58, 20, .14);
}

/* Social buttons */
.socials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bone);
  border: 1px solid rgba(90, 58, 20, .14);
  border-radius: 12px;
  color: var(--espresso);
  cursor: pointer;
  font-size: .875rem;
  font-weight: 500;
  overflow: hidden;
  position: relative;
  transition:
    border-color .25s ease,
    box-shadow .25s ease,
    transform .15s ease;
}

.social-btn:hover {
  border-color: rgba(90, 58, 20, .34);
  box-shadow: 0 8px 20px rgba(90, 58, 20, .10);
  transform: translateY(-1px);
}

/* Forgot password */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  color: var(--soft-tan);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 500;
  transition: color .2s ease, transform .2s ease;
  width: fit-content;
}

.back-btn svg {
  width: 16px;
  height: 16px;
}

.back-btn:hover {
  color: var(--pawline-brown);
  transform: translateX(-3px);
}

.forgot-header {
  text-align: center;
  align-items: center;
}

.forgot-icon {
  width: 64px;
  height: 64px;
  background: rgba(90, 58, 20, .06);
  border: 1px solid rgba(90, 58, 20, .14);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pawline-brown);
}

.forgot-icon svg {
  width: 28px;
  height: 28px;
}

.step-badge {
  margin-bottom: -2px;
  color: var(--soft-tan);
}

.step-badge .badge-dot {
  background: var(--pawline-brown);
}

/* Success state */
.success-state {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  animation: successIn .5s cubic-bezier(.34, 1.56, .64, 1) forwards;
}

.success-state.visible {
  display: flex;
}

@keyframes successIn {
  from {
    opacity: 0;
    transform: scale(.85) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.success-icon {
  width: 72px;
  height: 72px;
  background: rgba(95, 122, 91, .08);
  border: 1px solid rgba(95, 122, 91, .22);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
}

.success-icon svg {
  width: 32px;
  height: 32px;
}

.success-state p {
  max-width: 280px;
  color: var(--soft-tan);
  font-size: .875rem;
  line-height: 1.6;
}

/* Spinner */
.btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(236, 227, 208, .35);
  border-top-color: var(--pawline-cream);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 960px) {
  .panel-left {
    min-width: 0;
    width: 42%;
  }

  .panel-left__inner {
    padding: 42px 30px;
    gap: 28px;
  }

  .brand__wordmark {
    width: 200px;
  }

  .headline__title {
    font-size: 2.45rem;
  }

  .brand-note {
    padding: 18px;
  }

  .brand-note p {
    font-size: 1.18rem;
  }
}

@media (max-width: 720px) {
  .wrapper {
    flex-direction: column;
  }

  .panel-left {
    display: none;
  }

  .panel-right {
    min-height: 100vh;
    padding: 32px 20px;
    position: static;
  }

  .view {
    position: static;
    padding: 0;
  }

  .view:not(.active) {
    display: none;
  }

  .form-card {
    padding: 28px 22px;
    border-radius: 22px;
  }

  .mobile-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 2px;
  }

  .form-card__header h2 {
    font-size: 2rem;
  }

  .field-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 480px) {
  .panel-right {
    padding: 24px 14px;
  }

  .form-card {
    gap: 18px;
    padding: 24px 18px;
  }

  .socials {
    grid-template-columns: 1fr;
  }

  .tabs {
    font-size: .8rem;
  }
}

/* Pawline common social login placeholders */
.socials--common {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.socials--common .social-btn {
  min-height: 54px;
  position: relative;
}

.socials--common .social-btn span {
  font-weight: 700;
}

.socials--common .social-btn small {
  position: absolute;
  top: 7px;
  right: 9px;
  font-size: 0.62rem;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(80, 45, 20, 0.08);
  color: rgba(80, 45, 20, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.socials--common .social-btn.is-disabled {
  cursor: not-allowed;
  opacity: 0.68;
  filter: grayscale(0.15);
}

.socials--common .social-btn.is-disabled:hover {
  transform: none;
  box-shadow: none;
}

.social-note {
  margin: 14px auto 0;
  max-width: 360px;
  color: rgba(75, 38, 13, 0.68);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 520px) {
  .socials--common {
    grid-template-columns: 1fr;
  }

  .socials--common .social-btn {
    width: 100%;
  }
}

/* Final fix: password eye button must never cover the input on mobile */
.input-wrap {
  position: relative !important;
}

#loginPwd,
#regPwd,
#regConfirm,
#resetPwd,
#resetConfirm {
  width: 100% !important;
  padding-left: 46px !important;
  padding-right: 58px !important;
}

.input-wrap > .input-icon {
  position: absolute !important;
  left: 16px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 18px !important;
  height: 18px !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

.input-wrap > .eye-btn {
  position: absolute !important;
  right: 8px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  color: inherit !important;
  border: 0 !important;
  box-shadow: none !important;
  z-index: 4 !important;
  flex: none !important;
}

.input-wrap > .eye-btn:hover {
  transform: translateY(-50%) !important;
  box-shadow: none !important;
  opacity: 0.7;
}

.input-wrap > .eye-btn .eye-icon {
  width: 18px !important;
  height: 18px !important;
  pointer-events: none !important;
}

.field-header .link-btn {
  width: auto !important;
}

@media (max-width: 640px) {
  .input-wrap > .eye-btn,
  button.eye-btn {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    padding: 0 !important;
    flex: none !important;
  }

  #loginPwd,
  #regPwd,
  #regConfirm,
  #resetPwd,
  #resetConfirm {
    padding-right: 58px !important;
  }
}

/* Active Google sign in */
.socials--common a.social-btn {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.socials--common .social-btn-google {
  cursor: pointer;
  opacity: 1;
  filter: none;
  background: rgba(255, 255, 255, 0.62);
}

.socials--common .social-btn-google:hover {
  transform: translateY(-1px);
}

/* Active Facebook sign in */
.socials--common .social-btn-facebook {
  cursor: pointer;
  opacity: 1;
  filter: none;
  background: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.socials--common .social-btn-facebook:hover {
  transform: translateY(-1px);
}
