@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Light Theme Maroon Palette */
  --maroon-950: #26070d; /* Primary dark maroon for headings & prominent elements */
  --maroon-900: #3b0a13;
  --maroon-850: #4e0d19;
  --maroon-800: #631221;
  --maroon-750: #7a172a;
  --maroon-700: #931d33;
  --maroon-600: #ad263f;
  --maroon-100: #faedf0;
  --maroon-50:  #fdf6f7;
  
  /* Light Golden Palette */
  --gold-50:  #fffdf7;
  --gold-100: #fef9ec;
  --gold-200: #faecc2;
  --gold-300: #e8c769;
  --gold-400: #c99e2a;
  --gold-500: #b3820a;
  --gold-600: #946903;
  
  /* Light Theme Surfaces & Backgrounds */
  --body-bg: #f8f6f1;
  --card-bg: #ffffff;
  --card-border: 1px solid rgba(212, 175, 55, 0.32);
  --card-shadow: 0 4px 20px rgba(38, 7, 13, 0.05);
  --box-bg-light: #fbf8f2;
  
  /* Text */
  --text-main: #26070d;
  --text-muted: #735b61;
  --text-gold: #9e7104;
  
  /* Accent & Gradients */
  --gold-gradient: linear-gradient(135deg, #ecd17d 0%, #faecc2 50%, #d4af37 100%);
  --gold-gradient-hover: linear-gradient(135deg, #faecc2 0%, #eed588 50%, #c99e2a 100%);
  --gold-glow: 0 0 20px rgba(212, 175, 55, 0.25);
  --gold-glow-sm: 0 2px 10px rgba(212, 175, 55, 0.2);
  --gold-border: rgba(212, 175, 55, 0.35);
  --gold-border-light: rgba(212, 175, 55, 0.2);
  
  /* Status Colors */
  --success: #0d8a7c;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0284c7;
  
  /* Layout sizing */
  --sidebar-width: 270px;
  --header-height: 70px;
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--body-bg);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1ede4;
}
::-webkit-scrollbar-thumb {
  background: #d4af37;
  border-radius: 4px;
  border: 2px solid #f1ede4;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--maroon-800);
}

/* Typography Enhancements */
.font-brand {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.8px;
}

.text-gold {
  color: var(--text-gold) !important;
}
.text-gold-light {
  color: var(--maroon-950) !important;
}
.text-gold-gradient {
  background: linear-gradient(135deg, #7a172a 0%, #b3820a 60%, #520b17 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.text-maroon-muted {
  color: var(--text-muted) !important;
}

/* Buttons */
.btn-gold {
  background: var(--gold-gradient);
  color: var(--maroon-950);
  font-weight: 700;
  letter-spacing: 0.5px;
  border: 1px solid rgba(179, 130, 10, 0.4);
  box-shadow: 0 3px 12px rgba(212, 175, 55, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  padding: 0.65rem 1.4rem;
}
.btn-gold:hover, .btn-gold:focus {
  background: var(--gold-gradient-hover);
  color: var(--maroon-900);
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(212, 175, 55, 0.45);
}

.btn-outline-gold {
  background: #ffffff;
  color: var(--maroon-850);
  border: 1.5px solid var(--gold-400);
  font-weight: 600;
  border-radius: 8px;
  padding: 0.6rem 1.3rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.btn-outline-gold:hover {
  background: var(--maroon-850);
  color: #ffffff;
  border-color: var(--maroon-850);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(78, 13, 25, 0.2);
}

.btn-maroon-soft {
  background: #fbf8f2;
  color: var(--maroon-950);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 8px;
  font-weight: 600;
}
.btn-maroon-soft:hover {
  background: rgba(212, 175, 55, 0.2);
  color: var(--maroon-900);
  border-color: var(--gold-400);
}

/* Cards */
.gold-card {
  background: var(--card-bg);
  border: var(--card-border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.gold-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #d4af37 0%, #631221 50%, #d4af37 100%);
  opacity: 0.9;
}
.gold-card.card-hover:hover {
  transform: translateY(-3px);
  border-color: var(--gold-400);
  box-shadow: 0 10px 28px rgba(38, 7, 13, 0.1), var(--gold-glow-sm);
}

/* Form Controls */
.form-label {
  color: var(--maroon-950);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.form-control, .form-select {
  background-color: #ffffff !important;
  border: 1px solid rgba(122, 23, 42, 0.22) !important;
  color: var(--maroon-950) !important;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}
.form-control:focus, .form-select:focus {
  background-color: #ffffff !important;
  border-color: var(--maroon-800) !important;
  box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25) !important;
  color: var(--maroon-950) !important;
}
.form-control::placeholder {
  color: #9c8489 !important;
}
.input-group-text {
  background-color: #f7f2e8;
  border: 1px solid rgba(122, 23, 42, 0.22);
  color: var(--maroon-850);
  font-weight: 600;
}

/* Badges */
.badge-gold {
  background: #fbf5e2;
  color: #8c6300;
  border: 1px solid rgba(212, 175, 55, 0.45);
  font-weight: 600;
  padding: 0.4em 0.75em;
  border-radius: 6px;
}
.badge-success-soft {
  background: #e6f9f6;
  color: #0d8a7c;
  border: 1px solid rgba(13, 138, 124, 0.35);
  font-weight: 600;
}
.badge-warning-soft {
  background: #fff8eb;
  color: #b45309;
  border: 1px solid rgba(180, 83, 9, 0.35);
  font-weight: 600;
}
.badge-danger-soft {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.35);
  font-weight: 600;
}

/* Tables - Compact Sleek Height */
.table-gold {
  color: var(--maroon-950);
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}
.table-gold th {
  background-color: #f8f4ec;
  color: var(--maroon-900);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.74rem;
  letter-spacing: 0.6px;
  padding: 0.55rem 0.85rem !important;
  border-bottom: 2px solid rgba(212, 175, 55, 0.4);
  white-space: nowrap;
}
.table-gold td {
  padding: 0.55rem 0.85rem !important;
  vertical-align: middle;
  border-bottom: 1px solid rgba(212, 175, 55, 0.18);
  background-color: transparent;
  color: var(--maroon-950);
  font-size: 0.88rem;
}
.table-gold tbody tr {
  transition: background-color 0.2s ease;
}
.table-gold tbody tr:hover {
  background-color: #fbf8f2;
}

/* Layout: Sidebar & App Shell */
.app-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  background: #ffffff;
  border-right: 1px solid rgba(212, 175, 55, 0.3);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 2px 0 20px rgba(38, 7, 13, 0.05);
}

.sidebar-header {
  height: var(--header-height);
  padding: 1rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  background: #ffffff;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-icon-emblem {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--maroon-950);
  font-size: 1.25rem;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(212, 175, 55, 0.35);
}
.brand-name {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--maroon-900);
}
.brand-tagline {
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #946903;
  font-weight: 600;
}

.sidebar-menu {
  flex: 1;
  padding: 1.2rem 0.8rem;
  overflow-y: auto;
}

.menu-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #946903;
  font-weight: 700;
  padding: 0.8rem 0.9rem 0.4rem;
}

.nav-link-custom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 9px;
  color: var(--maroon-900);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.3rem;
  transition: all 0.25s ease;
  position: relative;
}
.nav-link-custom .nav-icon {
  width: 22px;
  font-size: 1rem;
  color: #9e7104;
  margin-right: 12px;
  text-align: center;
  transition: transform 0.2s ease;
}
.nav-link-custom:hover {
  color: var(--maroon-800);
  background: #fbf6ec;
  transform: translateX(3px);
}
.nav-link-custom:hover .nav-icon {
  transform: scale(1.15);
  color: var(--maroon-800);
}
.nav-link-custom.active {
  background: linear-gradient(90deg, #f7eee0 0%, #ffffff 100%);
  color: var(--maroon-800);
  font-weight: 700;
  border-left: 3px solid var(--maroon-800);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}
.nav-link-custom.active .nav-icon {
  color: var(--maroon-800);
}

.submenu-collapse {
  padding-left: 1.2rem;
  margin-bottom: 0.4rem;
}
.submenu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.55rem 0.9rem;
  font-size: 0.86rem;
  color: #55383e;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-weight: 500;
}
.submenu-link::before {
  content: '•';
  color: #b3820a;
  font-size: 1.1rem;
  line-height: 0;
}
.submenu-link:hover {
  color: var(--maroon-800);
  background: #fbf6ec;
  padding-left: 1.1rem;
}
.submenu-link.active {
  color: var(--maroon-800);
  font-weight: 700;
  background: #f7eee0;
}

.sidebar-footer {
  padding: 1.2rem;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  background: #faf7f2;
}
.user-quick-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar-gold {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--gold-400);
  background: var(--gold-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--maroon-900);
  font-weight: 700;
  box-shadow: var(--gold-glow-sm);
}

/* Main Content Area */
.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease;
  background-color: var(--body-bg);
  background-image: radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.08) 0%, transparent 40%),
                    radial-gradient(circle at 90% 80%, rgba(122, 23, 42, 0.04) 0%, transparent 40%);
}

/* Header Navbar */
.app-navbar {
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  padding: 0 1.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.nav-toggle-btn {
  background: #ffffff;
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--maroon-900);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.nav-toggle-btn:hover {
  background: var(--maroon-850);
  color: #fff;
}

.page-title-header {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--maroon-950);
}

.app-content {
  flex: 1;
  padding: 1.8rem;
}

/* Auth Pages (Login, Register, Forgot, Thank you) */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: radial-gradient(circle at 50% 30%, #fffdf8 0%, #f7f1e6 70%, #ebdcc7 100%);
  position: relative;
}
.auth-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23b3820a' fill-opacity='0.04' fill-rule='evenodd'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.auth-card {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 18px;
  box-shadow: 0 15px 45px rgba(38, 7, 13, 0.08), 0 0 25px rgba(212, 175, 55, 0.15);
  padding: 2.5rem;
  position: relative;
  z-index: 1;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-header .emblem-lg {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--gold-gradient);
  color: var(--maroon-950);
  font-size: 2rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.35);
}

/* Stat Widgets */
.stat-widget {
  padding: 1.4rem;
  position: relative;
  border-radius: 14px;
  background: #ffffff;
}
.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #fbf4e2;
  border: 1px solid rgba(212, 175, 55, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #9e7104;
}

/* Modal Customization */
.modal-content.gold-modal {
  background: #ffffff;
  border: 1px solid var(--gold-border);
  color: var(--maroon-950);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(38, 7, 13, 0.15);
}
.modal-header.gold-modal-header {
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  padding: 1.2rem 1.5rem;
  background: #fcf9f2;
}
.modal-footer.gold-modal-footer {
  border-top: 1px solid rgba(212, 175, 55, 0.25);
  padding: 1.2rem 1.5rem;
  background: #fcf9f2;
}

/* In-card sub panels & boxes override for light mode */
.sub-panel,
[style*="background: rgba(0,0,0"],
[style*="background: rgba(0, 0, 0"] {
  background: #faf6ee !important;
  border: 1px solid rgba(212, 175, 55, 0.3) !important;
  color: var(--maroon-950) !important;
}

/* Virtual Card in wallet-balance remains classic luxury maroon card */
.virtual-luxury-card {
  background: linear-gradient(135deg, #420d17 0%, #1f0509 60%, #0d0204 100%) !important;
  border: 1.5px solid rgba(212, 175, 55, 0.6) !important;
  box-shadow: 0 15px 35px rgba(38, 7, 13, 0.25), var(--gold-glow) !important;
}
.virtual-luxury-card * {
  color: #ffffff !important;
}
.virtual-luxury-card .text-gold-gradient {
  background: var(--gold-gradient) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
.virtual-luxury-card .text-gold {
  color: #faecc2 !important;
}
.virtual-luxury-card .text-maroon-muted {
  color: rgba(254, 248, 231, 0.7) !important;
}

/* Navbar User Profile Dropdown */
.app-navbar .dropdown > button {
  background: #ffffff !important;
  border: 1.5px solid rgba(212, 175, 55, 0.45) !important;
  border-radius: 50rem !important;
  padding: 0.3rem 0.85rem 0.3rem 0.4rem !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.25s ease !important;
}
.app-navbar .dropdown > button:hover,
.app-navbar .dropdown > button:focus,
.app-navbar .dropdown > button.show,
.app-navbar .dropdown.show > button {
  background: #fbf5e8 !important;
  border-color: var(--gold-400) !important;
  box-shadow: 0 3px 10px rgba(212, 175, 55, 0.25) !important;
}
.app-navbar .dropdown > button span {
  color: var(--maroon-950) !important;
  font-weight: 600 !important;
}
.app-navbar .dropdown > button i {
  color: var(--text-gold) !important;
}

/* Dropdown menus - Clean Light & Gold */
.dropdown-menu {
  background: #ffffff !important;
  border: 1.5px solid rgba(212, 175, 55, 0.35) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 30px rgba(38, 7, 13, 0.12) !important;
  padding: 0.5rem 0 !important;
}
.dropdown-menu .dropdown-header {
  color: var(--text-gold) !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  padding: 0.4rem 1.2rem !important;
}
.dropdown-item {
  color: var(--maroon-950) !important;
  padding: 0.55rem 1.2rem !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  background-color: transparent !important;
  transition: all 0.2s ease !important;
}
.dropdown-item i {
  color: var(--text-gold) !important;
}
.dropdown-item:hover,
.dropdown-item:focus {
  background-color: #fbf5e8 !important;
  color: var(--maroon-800) !important;
}
/* Overriding Bootstrap default blue active highlight */
.dropdown-item.active,
.dropdown-item:active {
  background-color: #fbf5e8 !important;
  color: var(--maroon-800) !important;
  font-weight: 700 !important;
  border-left: 3px solid var(--maroon-800) !important;
}
.dropdown-item.active i {
  color: var(--maroon-800) !important;
}
.dropdown-item.text-danger {
  color: #dc2626 !important;
}
.dropdown-item.text-danger i {
  color: #dc2626 !important;
}
.dropdown-item.text-danger:hover,
.dropdown-item.text-danger:focus {
  background-color: #fee2e2 !important;
  color: #b91c1c !important;
}

/* Overlay for Mobile Sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(38, 7, 13, 0.4);
  backdrop-filter: blur(3px);
  z-index: 1035;
}
.sidebar-overlay.active {
  display: block;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.show {
    transform: translateX(0);
  }
  .app-main {
    margin-left: 0;
  }
  .nav-toggle-btn {
    display: inline-flex;
  }
  .app-content {
    padding: 1.2rem;
  }
}

@media (max-width: 575.98px) {
  .auth-card {
    padding: 1.8rem 1.2rem;
  }
  .app-navbar {
    padding: 0 1rem;
  }
}

/* ===== Flash / validation alerts ===== */
.alert-maroon {
  background: #fdf0f2;
  color: #7a172a;
  border: 1px solid rgba(122, 23, 42, 0.3);
  border-radius: 10px;
  font-size: 0.88rem;
}
.alert-gold {
  background: #fbf5e2;
  color: #7a5400;
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 10px;
  font-size: 0.88rem;
}

/* Banner shown while an admin views a member panel */
.admin-view-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  background: #7a172a;
  color: #fff;
  font-size: 0.9rem;
}
