/* ==========================================================================
   THE KINGSMEN — Member Portal & Authentication Page (login.css)
   Sunlit Royal Ivory & Champagne-Gold system matching style.css & pages.css.
   ========================================================================== */

.tk-login-stage {
  position: relative;
  padding: clamp(7.1rem, 11vw, 8.8rem) 0 clamp(3.75rem, 6.5vw, 5.25rem);
  background:
    radial-gradient(circle 540px at 14% 16%, rgba(252, 235, 168, 0.36) 0%, transparent 72%),
    radial-gradient(circle 480px at 88% 26%, rgba(242, 201, 85, 0.22) 0%, transparent 72%),
    linear-gradient(180deg, #F8ECD2 0%, #FDF6E6 42%, #FEFAF1 100%);
}

.tk-login-aside-card {
  border-radius: 1.5rem;
  background:
    radial-gradient(circle 340px at 90% 15%, rgba(252, 235, 168, 0.36) 0%, transparent 72%),
    linear-gradient(145deg, #FFFDF8 0%, #FAF0DA 65%, #F6E6C2 100%);
  border: 1px solid rgba(221, 162, 43, 0.3);
  box-shadow: 0 20px 44px -28px rgba(74, 41, 9, 0.24);
}

.tk-login-aside-arch {
  overflow: hidden;
  border-top-left-radius: 999px;
  border-top-right-radius: 999px;
  border-bottom-left-radius: 1rem;
  border-bottom-right-radius: 1rem;
  aspect-ratio: 4 / 4.2;
  border: 1px solid rgba(221, 162, 43, 0.32);
  background: #F8ECD2;
}

.tk-login-aside-arch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  display: block;
}

.tk-auth-card {
  border-radius: 1.5rem;
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(221, 162, 43, 0.3);
  box-shadow:
    0 24px 52px -30px rgba(74, 41, 9, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

/* Segmented Sign In / Sign Up Switcher */
.tk-auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
  padding: 0.35rem;
  border-radius: 1rem;
  background: rgba(248, 236, 210, 0.72);
  border: 1px solid rgba(221, 162, 43, 0.26);
}

.tk-auth-tab {
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #6B3F12;
  cursor: pointer;
  transition: background-color 200ms var(--ease-luxury), color 200ms var(--ease-luxury), border-color 200ms var(--ease-luxury), box-shadow 200ms var(--ease-luxury);
}

.tk-auth-tab:hover {
  color: #4A2909;
}

.tk-auth-tab.is-active {
  background: #FFFDF8;
  color: #4A2909;
  border-color: rgba(221, 162, 43, 0.45);
  box-shadow: 0 8px 18px -12px rgba(74, 41, 9, 0.28);
}

/* Feedback Banner */
.tk-auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.82rem 1rem;
  border-radius: 0.95rem;
  font-size: 0.84rem;
  line-height: 1.45;
  border: 1px solid transparent;
}

.tk-auth-alert[hidden] {
  display: none;
}

.tk-auth-alert[data-tone="error"] {
  background: #FDF2F0;
  border-color: rgba(185, 56, 44, 0.35);
  color: #7D1F17;
}

.tk-auth-alert[data-tone="success"] {
  background: #F1F8F3;
  border-color: rgba(34, 120, 74, 0.32);
  color: #1A5635;
}

.tk-auth-alert-icon {
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* Form Controls & Password Reveal */
.tk-pwd-wrap {
  position: relative;
}

.tk-pwd-wrap .tk-field-input {
  padding-right: 2.8rem;
}

.tk-pwd-toggle {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 0.6rem;
  border: 0;
  background: transparent;
  color: #8F5812;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 160ms var(--ease-luxury), color 160ms var(--ease-luxury);
}

.tk-pwd-toggle:hover {
  background: rgba(252, 235, 168, 0.45);
  color: #4A2909;
}

.tk-field-input[aria-invalid="true"] {
  border-color: #C24136;
  background: #FFF9F8;
}

.tk-field-hint {
  margin-top: 0.35rem;
  font-size: 0.74rem;
  line-height: 1.4;
  color: #7F5426;
}

/* Live Password Criteria Pills */
.tk-pwd-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem 0.65rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.9rem;
  background: rgba(248, 236, 210, 0.45);
  border: 1px solid rgba(221, 162, 43, 0.22);
}

@media (max-width: 520px) {
  .tk-pwd-rules {
    grid-template-columns: 1fr;
  }
}

.tk-pwd-rule {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  color: #7F5426;
  transition: color 180ms var(--ease-luxury);
}

.tk-pwd-rule-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: rgba(143, 88, 18, 0.3);
  flex-shrink: 0;
  transition: background-color 180ms var(--ease-luxury);
}

.tk-pwd-rule.is-met {
  color: #1F6840;
  font-weight: 500;
}

.tk-pwd-rule.is-met .tk-pwd-rule-dot {
  background: #23834E;
}

.tk-pwd-rule.is-bad {
  color: #8F241B;
  font-weight: 600;
}

.tk-pwd-rule.is-bad .tk-pwd-rule-dot {
  background: #C24136;
}

/* Terms Checkbox */
.tk-terms-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #5E340D;
  cursor: pointer;
}

.tk-terms-checkbox {
  margin-top: 0.2rem;
  width: 16px;
  height: 16px;
  accent-color: #8F5812;
  flex-shrink: 0;
  cursor: pointer;
}

/* 6-Digit OTP Input */
.tk-otp-input {
  text-align: center;
  letter-spacing: 0.42em;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  padding-left: 1.3rem;
}

/* Member Signed-In Card */
.tk-member-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  background: #F1F8F3;
  border: 1px solid rgba(34, 120, 74, 0.28);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1A5635;
}
