/* ==========================================================================
   SWARN KALA JEWELLERS - LUXURY BLACK & GOLD AUTHENTICATION DESIGN SYSTEM
   ========================================================================== */

:root {
  --gold-primary: #D4AF37;
  --gold-highlight: #F5C542;
  --gold-soft: #FFE08A;
  --gold-dark: #A38020;
  --gold-border: rgba(212, 175, 55, 0.45);
  --gold-border-hover: rgba(245, 197, 66, 0.75);
  --gold-glow: rgba(212, 175, 55, 0.25);
  --gold-glow-intense: rgba(245, 197, 66, 0.45);
  
  --bg-obsidian: #050505;
  --bg-glass-card: rgba(12, 12, 12, 0.55);
  --bg-glass-input: rgba(10, 10, 10, 0.45);
  --bg-glass-input-focus: rgba(18, 18, 18, 0.85);

  --text-white: #FFFFFF;
  --text-light: #E0E0E0;
  --text-gold: #E6CA65;
  --text-muted: #BEBEBE;

  --gold-gradient: linear-gradient(135deg, #D4AF37 0%, #F5C542 50%, #C79A2B 100%);
  --gold-gradient-hover: linear-gradient(135deg, #F5C542 0%, #FFE08A 50%, #D4AF37 100%);
}

/* --------------------------------------------------------------------------
   Global Layout & Full-Screen Hero Backgrounds (No Blur on Body Background)
   -------------------------------------------------------------------------- */
html, body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  color: var(--text-light);
  overflow-x: hidden;
}

/* Login Page Hero Background (mem_assets/gold_img/1.png with 35%-45% subtle overlay) */
body.auth-bg-login {
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.38) 0%, rgba(5, 5, 5, 0.45) 100%), url('../gold_img/1.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: var(--bg-obsidian);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Registration Page Hero Background (mem_assets/gold_img/3.jpg with 35%-45% subtle overlay) */
body.auth-bg-register {
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.38) 0%, rgba(5, 5, 5, 0.45) 100%), url('../gold_img/3.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: var(--bg-obsidian);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Account Created Page Distinct Background (mem_assets/gold_img/2.jpg) */
body.auth-bg-created {
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.38) 0%, rgba(5, 5, 5, 0.45) 100%), url('../gold_img/2.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: var(--bg-obsidian);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Forgot Password Page Distinct Background (mem_assets/gold_img/4.jpg) */
body.auth-bg-forgot {
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.38) 0%, rgba(5, 5, 5, 0.45) 100%), url('../gold_img/4.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: var(--bg-obsidian);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Gold Particles Ambiance Overlay Layer */
.auth-particles-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.gold-particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 197, 66, 0.75) 0%, rgba(212, 175, 55, 0) 70%);
  animation: floatParticle 9s infinite ease-in-out;
}

@keyframes floatParticle {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.15;
  }
  50% {
    transform: translateY(-45px) scale(1.35);
    opacity: 0.65;
  }
  100% {
    transform: translateY(-90px) scale(0.9);
    opacity: 0;
  }
}

/* --------------------------------------------------------------------------
   Main Container & Grid Layout
   -------------------------------------------------------------------------- */
.auth-main-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.auth-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  width: 100%;
  align-items: center;
  justify-content: center;
}

@media (min-width: 992px) {
  .auth-wrapper-split {
    grid-template-columns: 1fr 1fr; /* Equal 50/50 split */
    align-items: center; /* Natural centered card height without blank gaps */
  }
  .auth-wrapper-center {
    grid-template-columns: minmax(320px, 480px);
  }
}

/* --------------------------------------------------------------------------
   Left Information Card (Compact & Natural Wrap - No Blank Space)
   -------------------------------------------------------------------------- */
.auth-left-hero {
  background: var(--bg-glass-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--gold-border);
  border-radius: 24px;
  padding: 2.2rem 2.2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 25px var(--gold-glow), inset 0 0 20px rgba(212, 175, 55, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1.25rem;
  position: relative;
  overflow: visible;
  height: auto;
  box-sizing: border-box;
  animation: fadeInHero 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInHero {
  from {
    opacity: 0;
    transform: translateX(-25px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-top-content {
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold-highlight);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 50px;
  margin-bottom: 1.25rem;
  width: fit-content;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-title {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 1rem 0;
  background: linear-gradient(135deg, #FFF0B3 0%, #F5C542 40%, #D4AF37 70%, #C79A2B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 15px rgba(212, 175, 55, 0.25));
}

.hero-description {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.8rem;
  font-weight: 400;
}

/* Feature List */
.hero-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: 100%;
}

.hero-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.hero-feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(212, 175, 55, 0.16);
  border: 1px solid rgba(212, 175, 55, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-highlight);
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), 0 0 14px var(--gold-glow);
}

.hero-feature-text h4 {
  margin: 0 0 3px 0;
  color: #FFFFFF;
  font-size: 1.02rem;
  font-weight: 700;
}

.hero-feature-text p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.88rem;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   Right Authentication Card
   -------------------------------------------------------------------------- */
.auth-card {
  background: var(--bg-glass-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--gold-border);
  border-radius: 24px;
  padding: 2.2rem 2.2rem 1.8rem 2.2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 25px var(--gold-glow), inset 0 0 20px rgba(212, 175, 55, 0.1);
  position: relative;
  overflow: visible;
  height: auto; /* Natural content-based height without blank gaps */
  align-self: center; /* Centered layout */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
  animation: cardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.auth-card:hover {
  border-color: var(--gold-border-hover);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 35px var(--gold-glow-intense), inset 0 0 25px rgba(245, 197, 66, 0.15);
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(25px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --------------------------------------------------------------------------
   Centered Logo Branding Block
   -------------------------------------------------------------------------- */
.auth-card-header {
  text-align: center;
  margin-bottom: 1.8rem;
  width: 100%;
}

.auth-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.auth-brand-logo {
  max-width: 150px;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 4px 20px rgba(212, 175, 55, 0.4));
  transition: transform 0.3s ease;
}

.auth-brand-logo:hover {
  transform: scale(1.04);
}

.auth-brand-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  margin: 0 0 5px 0;
  background: linear-gradient(135deg, #FFF0B3 0%, #F5C542 40%, #D4AF37 75%, #A38020 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(212, 175, 55, 0.3));
  text-transform: uppercase;
}

.auth-brand-subtitle {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Form Inputs & Glass Aesthetics
   -------------------------------------------------------------------------- */
.auth-form-group {
  margin-bottom: 1.25rem;
  width: 100%;
}

.auth-form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-gold);
  font-weight: 600;
  font-size: 0.91rem;
  margin-bottom: 0.45rem;
  letter-spacing: 0.3px;
}

.auth-form-label i {
  color: var(--gold-primary);
  margin-right: 6px;
  font-size: 0.98rem;
  filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.4));
}

.auth-input-group {
  display: flex;
  align-items: center;
  background: var(--bg-glass-input);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--gold-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.auth-input-group:focus-within {
  border-color: var(--gold-highlight);
  background: var(--bg-glass-input-focus);
  box-shadow: 0 0 18px var(--gold-glow-intense), inset 0 0 10px rgba(245, 197, 66, 0.15);
}

.auth-input-icon {
  padding: 0.8rem 0.2rem 0.8rem 1rem;
  color: var(--gold-primary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.3));
}

.auth-control {
  flex: 1;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: var(--text-white) !important;
  font-size: 0.96rem;
  padding: 0.8rem 1rem;
  box-shadow: none !important;
}

.auth-control::placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
  font-weight: 400;
}

/* Datalist Options Styling */
datalist option {
  background: #121212;
  color: #FFFFFF;
}

/* Password Toggle Icon Button */
.auth-toggle-btn {
  background: transparent;
  border: none;
  color: var(--gold-primary);
  padding: 0.8rem 1rem;
  cursor: pointer;
  font-size: 1.05rem;
  transition: color 0.2s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-toggle-btn:hover {
  color: var(--gold-highlight);
  transform: scale(1.1);
}

/* Captcha Badge */
.auth-captcha-badge {
  background: rgba(212, 175, 55, 0.18);
  border-right: 1px solid var(--gold-border);
  color: var(--gold-highlight);
  font-weight: 700;
  font-size: 1.02rem;
  padding: 0.8rem 1rem;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* Checkbox Styling */
.auth-check-group {
  display: flex;
  align-items: center;
  margin-bottom: 1.25rem;
  user-select: none;
}

.auth-check-input {
  appearance: none;
  -webkit-appearance: none;
  width: 19px;
  height: 19px;
  border: 1.5px solid var(--gold-primary);
  border-radius: 6px;
  background: rgba(10, 10, 10, 0.5);
  cursor: pointer;
  position: relative;
  margin-right: 10px;
  transition: all 0.2s ease;
}

.auth-check-input:checked {
  background: var(--gold-gradient);
  border-color: var(--gold-highlight);
  box-shadow: 0 0 10px var(--gold-glow-intense);
}

.auth-check-input:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #000000;
  font-weight: 900;
  font-size: 0.82rem;
}

.auth-check-label {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.91rem;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Luxury Action Buttons
   -------------------------------------------------------------------------- */
.btn-gold-action {
  width: 100%;
  padding: 0.9rem 1.4rem;
  border-radius: 12px;
  border: none;
  background: var(--gold-gradient);
  color: #000000;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.35);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn-gold-action:hover {
  transform: translateY(-2px);
  background: var(--gold-gradient-hover);
  box-shadow: 0 12px 35px rgba(245, 197, 66, 0.55);
  color: #000000;
}

.btn-gold-action:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-gold-action.loading span {
  visibility: hidden;
}

.btn-gold-action.loading::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.4rem;
  height: 1.4rem;
  border: 3px solid #000000;
  border-top: 3px solid transparent;
  border-radius: 50%;
  animation: spinGold 0.7s linear infinite;
  transform: translate(-50%, -50%);
}

@keyframes spinGold {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* --------------------------------------------------------------------------
   Links & Navigation Footer
   -------------------------------------------------------------------------- */
.auth-link {
  color: var(--gold-highlight);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.auth-link:hover {
  color: var(--gold-soft);
  text-shadow: 0 0 8px var(--gold-glow-intense);
  text-decoration: underline;
}

.auth-card-footer {
  margin-top: 1.5rem; /* ~24px spacing below SIGN IN button */
  padding-top: 1rem;
  border-top: 1px solid rgba(212, 175, 55, 0.15); /* Soft divider */
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-size: 0.91rem;
}

.auth-footer-text {
  color: var(--text-muted); /* Muted Light Gray */
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

.auth-footer-text i {
  color: var(--gold-primary);
}

.auth-footer-link {
  color: var(--gold-highlight); /* Gold Accent */
  font-weight: 700;
  text-decoration: none !important; /* No underline by default */
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: all 0.25s ease;
}

.auth-footer-link:hover {
  color: var(--gold-soft);
  text-shadow: 0 0 10px var(--gold-glow-intense);
  transform: translateX(2px);
  text-decoration: none !important;
}

/* --------------------------------------------------------------------------
   Alerts & Validation Errors
   -------------------------------------------------------------------------- */
.auth-alert-danger {
  background: rgba(180, 20, 20, 0.35);
  border: 1px solid rgba(255, 100, 100, 0.5);
  color: #FFD4D4;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.35rem;
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-error-msg {
  color: #FF8B8B;
  font-size: 0.84rem;
  font-weight: 600;
  margin-top: 4px;
  display: block;
}

/* Sponsor name lookup output box */
#sponhtml {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold-highlight);
  margin-top: 5px;
  text-shadow: 0 0 6px rgba(245, 197, 66, 0.4);
}

/* --------------------------------------------------------------------------
   Responsive Rules
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .auth-left-hero {
    display: none; /* Stack to single card on tablet & mobile */
  }
  .auth-main-container {
    padding: 2rem 1rem;
  }
  .auth-card {
    padding: 2.2rem 1.8rem 1.8rem 1.8rem;
    border-radius: 20px;
    height: auto;
  }
  .auth-brand-title {
    font-size: 1.45rem;
  }
}

@media (max-width: 480px) {
  .auth-main-container {
    padding: 1.25rem 0.75rem;
  }
  .auth-card {
    padding: 1.8rem 1.2rem 1.5rem 1.2rem;
    border-radius: 16px;
  }
  .auth-brand-logo {
    max-width: 125px;
  }
  .auth-brand-title {
    font-size: 1.3rem;
  }
  .btn-gold-action {
    padding: 0.85rem 1.2rem;
    font-size: 0.95rem;
  }
}

/* Success Alert & Information Table Styling */
.auth-alert-success {
  background: rgba(20, 140, 60, 0.3);
  border: 1px solid rgba(80, 220, 120, 0.5);
  color: #D4FFDA;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.35rem;
  font-size: 0.92rem;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-success-table {
  width: 100%;
  margin: 1.25rem 0 1.5rem 0;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.auth-success-table tr {
  background: rgba(10, 10, 10, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 8px;
  transition: background 0.25s ease;
}

.auth-success-table tr:hover {
  background: rgba(212, 175, 55, 0.12);
}

.auth-success-table th,
.auth-success-table td {
  padding: 0.8rem 1rem;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.auth-success-table th {
  color: var(--gold-highlight);
  font-weight: 700;
  width: 40%;
}

.auth-success-table td {
  color: var(--text-white);
  font-weight: 600;
  word-break: break-all;
}
