:root {
  --khmer-red: #7c1f1f;
  --khmer-gold: #d4a648;
  --khmer-brown: #3a2318;
  --khmer-cream: #f7efe3;
  --khmer-dark: #140c09;
  --text-light: #f6f1e8;
  --shadow: 0 20px 45px rgba(20, 12, 9, 0.25);
  --transition: 0.35s ease;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Battambang", sans-serif;
  background:
    radial-gradient(circle at top, rgba(212, 166, 72, 0.12), transparent 35%),
    linear-gradient(135deg, #1f130e 0%, #4a1d15 45%, #1a0f0c 100%);
  color: var(--text-light);
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

body.dark-mode {
  background:
    radial-gradient(circle at top, rgba(124, 31, 31, 0.22), transparent 35%),
    linear-gradient(135deg, #080606 0%, #251713 45%, #090606 100%);
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.navbar-brand {
  font-family: "Cinzel", serif;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand-mark {
  color: var(--khmer-gold);
}

.site-navbar {
  background: rgba(20, 12, 9, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(212, 166, 72, 0.18);
}

.nav-link,
.navbar-brand,
.footer-link {
  color: var(--text-light) !important;
}

.nav-link:hover,
.footer-link:hover {
  color: var(--khmer-gold) !important;
}

.hero-section,
.inner-hero {
  position: relative;
  overflow: hidden;
}

.hero-section::before,
.inner-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(20, 12, 9, 0.4), rgba(20, 12, 9, 0.72)),
    url("https://images.unsplash.com/photo-1504674900247-0877df9cc836?auto=format&fit=crop&w=1600&q=80") center/cover no-repeat;
  z-index: -2;
}

.hero-section::after,
.inner-hero::after {
  content: "";
  position: absolute;
  inset: auto -15% -20% -15%;
  height: 250px;
  background: radial-gradient(circle, rgba(212, 166, 72, 0.3), transparent 65%);
  z-index: -1;
}

.hero-title,
.section-title {
  font-family: "Cinzel", serif;
  font-weight: 700;
}

.hero-title {
  color: white;
}

.hero-copy {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.85);
}

.section-kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--khmer-gold);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.glass-card,
.info-card,
.food-card,
.review-card {
  border: 1px solid rgba(212, 166, 72, 0.18);
  box-shadow: var(--shadow);
}

.glass-card {
  background: rgba(255, 248, 236, 0.08);
  backdrop-filter: blur(18px);
  border-radius: 24px;
}

.info-card,
.review-card {
  background: rgba(58, 35, 24, 0.78);
  border-radius: 20px;
  padding: 1.5rem;
}

.warm-section {
  background: linear-gradient(180deg, rgba(212, 166, 72, 0.08), rgba(124, 31, 31, 0.08));
}

.btn-brand,
.btn-outline-brand:hover {
  background: linear-gradient(135deg, var(--khmer-gold), #f1c66d);
  color: var(--khmer-dark);
  border: none;
  box-shadow: 0 12px 28px rgba(212, 166, 72, 0.25);
}

.btn-brand:hover {
  transform: translateY(-2px);
}

.btn-outline-brand {
  color: var(--khmer-gold);
  border: 1px solid var(--khmer-gold);
}

.btn,
.form-control,
.form-select {
  border-radius: 14px;
  transition: var(--transition);
}

.form-control,
.form-select {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.form-control:focus,
.form-select:focus {
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border-color: var(--khmer-gold);
  box-shadow: 0 0 0 0.25rem rgba(212, 166, 72, 0.15);
}

.form-select option {
  background-color: #000;
  color: #fff;
}

.food-card {
  background: rgba(42, 24, 18, 0.92);
  border-radius: 24px;
  overflow: hidden;
  height: 100%;
  transform: translateY(0);
}

.food-card:hover,
.review-card:hover,
.info-card:hover {
  transform: translateY(-6px);
}

.food-card img {
  height: 230px;
  width: 100%;
  object-fit: cover;
}

.food-card .card-body {
  padding: 1.5rem;
}

.food-price {
  color: var(--khmer-gold);
  font-weight: 700;
  font-size: 1.1rem;
}

.badge-category {
  background: rgba(212, 166, 72, 0.14);
  color: var(--khmer-gold);
  border: 1px solid rgba(212, 166, 72, 0.28);
}

.footer {
  background: rgba(9, 6, 6, 0.94);
  border-top: 1px solid rgba(212, 166, 72, 0.15);
}

.footer-note {
  color: rgba(255, 255, 255, 0.65);
}

.floating-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1050;
}

.page-banner {
  min-height: calc(100vh - 80px);
}

.payment-mockup,
.cart-item {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-item + .cart-item {
  margin-top: 1rem;
}

.dashboard-number {
  font-size: 2.2rem;
  color: var(--khmer-gold);
  margin: 0;
}

.modal-theme {
  background: linear-gradient(180deg, #2b1912, #120b08);
  color: var(--text-light);
  border: 1px solid rgba(212, 166, 72, 0.22);
  border-radius: 24px;
}

.table-dark {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
  --bs-table-hover-bg: rgba(212, 166, 72, 0.08);
}

.toast-container {
  z-index: 2000;
}

.fade-in-up {
  animation: fadeInUp 0.7s ease both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.text-gold {
  color: var(--khmer-gold) !important;
}

/* ================================================================
   AUTH SPLIT-SCREEN STYLES
   ================================================================ */

body[data-page="login"] {
  background: #0f0f0f;
}

body[data-page="login"] .floating-toggle {
  z-index: 1100;
}

.auth-split {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.auth-promo {
  position: relative;
  flex: 0 0 58%;
  background:
    url("https://images.unsplash.com/photo-1515003197210-e0cd71810b5f?auto=format&fit=crop&w=1400&q=80")
    center / cover no-repeat;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.auth-promo-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(15, 15, 15, 0.25) 0%, rgba(15, 15, 15, 0.82) 100%),
    linear-gradient(to top, rgba(15, 15, 15, 0.7) 0%, transparent 50%);
  z-index: 1;
}

.auth-promo-content {
  position: relative;
  z-index: 2;
  padding: 3.5rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
}

.auth-logo {
  position: absolute;
  top: 2rem;
  left: 2.5rem;
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff !important;
  letter-spacing: 1px;
}

.auth-logo-mobile {
  display: block;
  text-align: center;
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-light) !important;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.auth-promo-text {
  max-width: 460px;
  margin-bottom: 3rem;
}

.auth-promo-title {
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 3.2rem;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 1rem;
}

.auth-promo-sub {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.auth-promo-features {
  display: flex;
  gap: 2.5rem;
}

.auth-feature {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

.auth-feature i {
  font-size: 1.5rem;
  color: var(--khmer-gold);
}

.auth-feature span {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.5px;
}

.auth-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f0f0f;
  padding: 2rem;
  overflow-y: auto;
}

.auth-form-wrapper {
  width: 100%;
  max-width: 420px;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 2rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: 0.65rem 1rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-family: "Battambang", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.auth-tab:hover {
  color: rgba(255, 255, 255, 0.8);
}

.auth-tab.active {
  background: linear-gradient(135deg, var(--khmer-gold), #f1c66d);
  color: var(--khmer-dark);
  box-shadow: 0 4px 16px rgba(212, 166, 72, 0.3);
}

.auth-panel {
  animation: authFadeIn 0.35s ease;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-heading {
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: 1.75rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.auth-subheading {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.auth-field {
  margin-bottom: 1.25rem;
}

.auth-label {
  display: block;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.45rem;
  font-weight: 400;
}

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

.auth-input-icon {
  position: absolute;
  left: 14px;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
  transition: color 0.3s ease;
  z-index: 2;
}

.auth-input-wrap:focus-within .auth-input-icon {
  color: var(--khmer-gold);
}

.auth-input {
  width: 100%;
  height: 52px;
  padding: 0 14px 0 44px;
  background: #1e1e1e;
  border: 2px solid #333;
  border-radius: 10px;
  color: #fff;
  font-family: "Battambang", sans-serif;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  outline: none;
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.auth-input:focus {
  border-color: var(--khmer-gold);
  background: #222;
  box-shadow: 0 0 0 3px rgba(212, 166, 72, 0.12);
}

.auth-eye-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 4px;
  transition: color 0.3s ease;
  z-index: 2;
}

.auth-eye-btn:hover {
  color: var(--khmer-gold);
}

.auth-options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  user-select: none;
}

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

.auth-remember-checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid #444;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.auth-remember-checkmark::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--khmer-gold);
  transform: scale(0);
  transition: transform 0.2s ease;
}

.auth-remember input:checked + .auth-remember-checkmark {
  border-color: var(--khmer-gold);
}

.auth-remember input:checked + .auth-remember-checkmark::after {
  transform: scale(1);
}

.auth-forgot {
  font-size: 0.85rem;
  color: var(--khmer-gold);
  transition: opacity 0.3s ease;
}

.auth-forgot:hover {
  opacity: 0.8;
  color: var(--khmer-gold);
}

.auth-submit-btn {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--khmer-gold), #f1c66d);
  color: var(--khmer-dark);
  font-family: "Battambang", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(212, 166, 72, 0.25);
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(212, 166, 72, 0.35);
}

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

.auth-switch-text {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.45);
}

.auth-switch-link {
  color: var(--khmer-gold);
  font-weight: 700;
  transition: opacity 0.3s ease;
}

.auth-switch-link:hover {
  opacity: 0.8;
  color: var(--khmer-gold);
}

#authMessage .alert {
  border-radius: 10px;
  font-size: 0.9rem;
  margin-top: 1rem;
}

@media (max-width: 991px) {
  .auth-split {
    flex-direction: column;
  }
  .auth-promo {
    flex: 0 0 auto;
    min-height: 280px;
  }
  .auth-promo-content {
    padding: 2rem 1.5rem;
    min-height: auto;
    justify-content: flex-end;
  }
  .auth-promo-title { font-size: 2rem; }
  .auth-promo-sub { font-size: 0.92rem; }
  .auth-promo-features { display: none; }
  .auth-form-side { flex: 1; padding: 1.5rem; }
}

@media (max-width: 575px) {
  .auth-promo { min-height: 200px; }
  .auth-logo { top: 1rem; left: 1.25rem; font-size: 1.05rem; }
  .auth-promo-title { font-size: 1.6rem; }
  .auth-heading { font-size: 1.4rem; }
  .auth-input { height: 48px; font-size: 0.9rem; }
  .auth-submit-btn { height: 48px; font-size: 0.95rem; }
}

@media (max-width: 767px) {
  .section-title {
    font-size: 2rem;
  }

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

  .glass-card,
  .info-card,
  .food-card,
  .review-card {
    border-radius: 18px;
  }
}
