/* ═══════════════════════════════════════════════════
   login.css — Estate Web Auth Pages
   Mobile-first. Luxury editorial dark theme.
   ═══════════════════════════════════════════════════ */

:root {
  --ink: #0d1117;
  --ink-soft: #1c2733;
  --ink-mid: #243447;
  --gold: #c19b76;
  --gold-lt: #d4b896;
  --gold-dk: #9a7655;
  --ivory: #faf8f4;
  --mist: #f0ede8;
  --slate: #8a8f98;
  --border: rgba(255, 255, 255, .09);
  --border-lt: rgba(193, 155, 118, .2);
  --shadow-gold: 0 8px 40px rgba(193, 155, 118, .2);
  --shadow-dark: 0 16px 56px rgba(13, 17, 23, .5);
  --radius: 16px;
  --radius-sm: 8px;
  --ease: all 0.26s ease;
  --display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --body: 'Poppins', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body);
  background: var(--ink);
  color: #fff;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}


/* ══════════════════════════════════════════════════
   MESSAGES
   ══════════════════════════════════════════════════ */
.messages-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.alert {
  border-radius: 10px;
  padding: 0.8rem 1rem;
  font-size: 0.85rem;
  font-family: var(--body);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: none;
  box-shadow: var(--shadow-dark);
}


/* ══════════════════════════════════════════════════
   PAGE LAYOUT
   ══════════════════════════════════════════════════ */
.login-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  min-height: 100svh;
  position: relative;
}

/* Background texture */
.login-wrapper::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(193, 155, 118, .07) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(193, 155, 118, .05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.login-container {
  display: flex;
  width: 100%;
  max-width: 900px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-dark);
  border: 1px solid var(--border);
  position: relative;
  z-index: 1;
  animation: fadeUp 0.7s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ══════════════════════════════════════════════════
   LOGIN CARD (form side)
   ══════════════════════════════════════════════════ */
.login-card {
  background: var(--ink-soft);
  flex: 1;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}


/* ══════════════════════════════════════════════════
   BRAND HEADER
   ══════════════════════════════════════════════════ */
.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.brand-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--gold-dk), var(--gold));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--ink);
  margin: 0 auto 1rem;
  box-shadow: 0 4px 20px rgba(193, 155, 118, .3);
}

.brand-name {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.login-title {
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.3rem;
}

.login-subtitle {
  font-size: 0.82rem;
  color: var(--slate);
  margin: 0;
}


/* ══════════════════════════════════════════════════
   QUICK NAV — switch between login/register
   ══════════════════════════════════════════════════ */
.auth-nav {
  display: flex;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
  margin-bottom: 1.75rem;
}

.auth-nav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--body);
  cursor: pointer;
  transition: var(--ease);
  text-decoration: none;
  border: none;
  background: none;
  color: var(--slate);
  white-space: nowrap;
}

.auth-nav-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, .06);
}

.auth-nav-btn.active {
  background: var(--gold);
  color: var(--ink);
}

.auth-nav-btn i {
  font-size: 0.85rem;
}


/* ══════════════════════════════════════════════════
   FORM FIELDS
   ══════════════════════════════════════════════════ */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--slate);
}

.form-label i {
  color: var(--gold);
}

.form-input {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, .05);
  border: 1.5px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.9rem;
  font-family: var(--body);
  outline: none;
  transition: var(--ease);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, .25);
}

.form-input:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, .07);
  box-shadow: 0 0 0 3px rgba(193, 155, 118, .12);
}


/* ══════════════════════════════════════════════════
   SUBMIT BUTTON
   ══════════════════════════════════════════════════ */
.btn-submit {
  width: 100%;
  padding: 0.9rem 1.5rem;
  background: var(--gold);
  color: var(--ink);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  font-family: var(--body);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--ease);
  margin-top: 0.5rem;
  letter-spacing: 0.3px;
}

.btn-submit:hover {
  background: var(--gold-lt);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

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


/* ══════════════════════════════════════════════════
   FORM LINKS (forgot password etc)
   ══════════════════════════════════════════════════ */
.form-links {
  text-align: center;
  margin-top: 0.5rem;
}

.form-link {
  font-size: 0.78rem;
  color: var(--slate);
  text-decoration: none;
  transition: color 0.2s;
}

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


/* ══════════════════════════════════════════════════
   REGISTER SECTION (below login form)
   ══════════════════════════════════════════════════ */
.register-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.register-text {
  font-size: 0.8rem;
  color: var(--slate);
  margin-bottom: 0.75rem;
}

.btn-register {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold-dk);
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.82rem;
  font-family: var(--body);
  cursor: pointer;
  transition: var(--ease);
}

.btn-register:hover {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

.dropdown-menu {
  background: var(--ink-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  box-shadow: var(--shadow-dark);
  min-width: 240px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: rgba(255, 255, 255, .78);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  transition: var(--ease);
  text-decoration: none;
}

.dropdown-item:hover {
  background: rgba(193, 155, 118, .14);
  color: var(--gold);
}

.dropdown-item i {
  color: var(--gold);
  font-size: 1.05rem;
}

.dropdown-item small {
  color: rgba(255, 255, 255, .38) !important;
  font-size: 0.72rem;
}

.dropdown-divider {
  border-color: var(--border);
  margin: 0.25rem 0;
}


/* ══════════════════════════════════════════════════
   SIDE PANEL — hidden on mobile, shown on desktop
   ══════════════════════════════════════════════════ */
.side-panel {
  display: none;
  background: linear-gradient(160deg, var(--gold-dk) 0%, var(--gold) 60%, var(--gold-lt) 100%);
  width: 280px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.side-panel::before {
  content: 'EW';
  position: absolute;
  font-family: var(--display);
  font-size: 11rem;
  font-weight: 700;
  color: rgba(13, 17, 23, .08);
  bottom: -2rem;
  right: -2rem;
  line-height: 1;
  pointer-events: none;
  letter-spacing: -4px;
}

.side-content {
  position: relative;
  z-index: 1;
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  color: var(--ink);
}

.side-content>i {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  opacity: 0.7;
}

.side-content h3 {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.side-content>p {
  font-size: 0.85rem;
  color: rgba(13, 17, 23, .65);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.82rem;
  color: rgba(13, 17, 23, .75);
}

.feature-item i {
  color: var(--ink);
  font-size: 0.9rem;
  margin-top: 1px;
  flex-shrink: 0;
}


/* ══════════════════════════════════════════════════
   640px+ — show side panel
   ══════════════════════════════════════════════════ */
@media (min-width: 640px) {
  .side-panel {
    display: flex;
    align-items: center;
  }

  .login-card {
    padding: 3rem 2.5rem;
  }
}


/* ══════════════════════════════════════════════════
   900px+ — wider layout
   ══════════════════════════════════════════════════ */
@media (min-width: 900px) {
  .side-panel {
    width: 320px;
  }

  .login-card {
    padding: 3.5rem 3rem;
  }

  .login-title {
    font-size: 2.2rem;
  }
}


/* ══════════════════════════════════════════════════
   Reduced motion
   ══════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Mobile auth nav fix ───────────────────────────────── */
@media (max-width: 480px) {

  /* Make the tab bar scroll horizontally instead of clipping */
  .auth-nav {
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .auth-nav::-webkit-scrollbar {
    display: none;
  }

  /* Shrink tab text and padding so all 4 fit */
  .auth-nav-btn {
    font-size: 0.68rem;
    padding: 0.5rem 0.6rem;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .auth-nav-btn i {
    font-size: 0.78rem;
  }

  /* Fix card horizontal overflow */
  .login-card {
    padding: 1.75rem 1.25rem;
    min-width: 0;
    overflow: hidden;
  }

  .login-container {
    overflow: hidden;
    width: 100%;
  }
}

/* ── Fix purple Bootstrap body background ──────────────── */
body {
  background: var(--ink) !important;
}

/* ══════════════════════════════════════════════════
   GOOGLE BUTTON + OR DIVIDER
   ══════════════════════════════════════════════════ */
.gc-or-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.25rem 0;
}

.gc-or-divider::before,
.gc-or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, .1);
}

.gc-or-divider span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--slate);
  letter-spacing: 1px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.gc-google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.8rem 1.25rem;
  background: #ffffff;
  color: #1f1f1f;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--body);
  text-decoration: none;
  transition: all 0.22s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
  cursor: pointer;
}

.gc-google-btn:hover {
  background: #f5f5f5;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .45);
  transform: translateY(-1px);
  color: #1f1f1f;
}

.gc-google-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}

.gc-google-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════
   SECURITY NOTICE
   ══════════════════════════════════════════════════ */
.security-notice {
  background: rgba(193, 155, 118, 0.08);
  border: 1px solid rgba(193, 155, 118, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

.security-notice i {
  color: var(--gold);
  font-size: 1.1rem;
  margin-top: 1px;
}

.security-notice strong {
  color: var(--gold);
  font-weight: 600;
}