/* ============================================================
   INFINITY Topup — Main Stylesheet
   All CSS consolidated here. No inline styles in PHP files.
   ============================================================ */

/* ---------- Google Font Import ---------- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --primary:        #e53935;
  --primary-dark:   #b71c1c;
  --secondary:      #ff9800;
  --dark:           #1a1a2e;
  --light:          #f8f9fa;
  --gray:           #6c757d;
  --white:          #ffffff;
  --shadow:         0 10px 30px rgba(0,0,0,0.08);
  --border-radius:  16px;
  --transition:     all 0.3s ease;
  --blue:           #1d4ed8;
  --indigo:         #4f46e5;
}

/* ---------- Reset & Base ---------- */
* { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f0f4f8;
  color: var(--dark);
  line-height: 1.5;
  overflow-x: hidden;
}

a { text-decoration: none; }

/* ---------- User-select ---------- */
* {
  -webkit-user-select: none;
  -moz-user-select:    none;
  -ms-user-select:     none;
  user-select:         none;
}
input, textarea, button {
  -webkit-user-select: text;
  user-select: text;
}

/* ============================================================
   LOGO  — transparent background, brand colours
   ============================================================ */
.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  text-decoration: none;
  padding: 0;
}

.site-logo .logo-icon {
  height: 46px;
  background: transparent !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: none;
  overflow: visible;
  padding: 0;
}

/* Custom logo image in navbar */
.navbar-logo-img {
  width: auto;
  height: 100%;
  max-height: 46px;
  object-fit: contain;
  display: block;
  background: transparent;
}

.site-logo .logo-text {
  background: transparent;
  line-height: 1.1;
}

.site-logo .logo-text .logo-main {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  background: transparent;
  letter-spacing: 0.03em;
}

.site-logo .logo-text .logo-sub {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--secondary);
  background: transparent;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Image logo (if logo.png is used via settings) */
.site-logo > img {
  background: transparent;
  max-height: 46px;
  width: auto;
  display: block;
}

/* ============================================================
   TOP NAVBAR (user-facing sticky header)
   ============================================================ */
.top-navbar {
  background: var(--white);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  position: sticky;
  top: 0;
  z-index: 20;
}

.top-navbar .wallet-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff5f5;
  border: 1.5px solid #ffcdd2;
  padding: 6px 14px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary-dark);
}

.top-navbar .btn-login {
  background: var(--primary);
  color: var(--white);
  padding: 8px 18px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.88rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}
.top-navbar .btn-login:hover { background: var(--primary-dark); }

/* ============================================================
   MARQUEE
   ============================================================ */
.marquee {
  display: flex;
  overflow: hidden;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 10px 0;
  font-weight: 600;
  font-size: 14px;
  position: sticky;
  top: 0;
  z-index: 30;
}
.marquee-content {
  animation: scroll-left 15s linear infinite;
  white-space: nowrap;
  display: flex;
  gap: 50px;
}
@keyframes scroll-left {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ============================================================
   SLIDER
   ============================================================ */
.slider-container {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}
.slider {
  display: flex;
  transition: transform 0.5s ease-in-out;
}
.slide       { min-width: 100%; }
.slide img   { width: 100%; height: auto; display: block; }
.slider-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.dot {
  width: 8px;
  height: 8px;
  background: rgba(255,255,255,0.5);
  border-radius: 50%;
  cursor: pointer;
}
.dot.active {
  background: var(--white);
  width: 24px;
  border-radius: 4px;
}

/* ============================================================
   GAME / TOPUP CARDS
   ============================================================ */
.card-hover {
  transition: var(--transition);
  cursor: pointer;
}
.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.topup-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
}
.topup-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 35px rgba(0,0,0,0.12);
}
.topup-card h3 {
  font-size: 1.3rem;
  margin: 10px 0;
  color: var(--primary-dark);
}

.price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin: 10px 0;
}
.price small { font-size: 0.9rem; font-weight: normal; color: var(--gray); }

.btn-buy {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  font-size: 1rem;
}
.btn-buy:hover { background: var(--primary-dark); transform: scale(0.98); }

/* ============================================================
   TRUST / RESELLER BADGE
   ============================================================ */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--secondary);
  color: var(--dark);
  padding: 8px 20px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.9rem;
  animation: badgePulse 2s infinite;
}
.trust-badge::before { content: "✓"; font-weight: bold; font-size: 1.2rem; }
@keyframes badgePulse {
  0%   { box-shadow: 0 0 0 0   rgba(255,152,0,0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(255,152,0,0); }
  100% { box-shadow: 0 0 0 0   rgba(255,152,0,0); }
}

/* ============================================================
   STATS CARDS
   ============================================================ */
.stat-card {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
}
.stat-icon     { font-size: 2.5rem; }
.stat-info h4  { font-size: 0.9rem; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; }
.stat-number   { font-size: 1.8rem; font-weight: 700; color: var(--primary); }

/* ============================================================
   LEFT SIDEBAR (user-facing)
   ============================================================ */
.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.65);
  z-index: 999;
  display: none;
  backdrop-filter: blur(3px);
}
.overlay.show { display: block; }

.left-sidebar {
  position: fixed;
  top: 0;
  left: -290px;
  width: 270px;
  height: 100%;
  background: linear-gradient(160deg, #1b4332 0%, #0a1f15 60%, #081a11 100%);
  box-shadow: 4px 0 20px rgba(0,0,0,0.7);
  z-index: 1000;
  transition: left 0.32s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.left-sidebar.open { left: 0; }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 20px 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-brand .sb-icon {
  height: 42px;
  background: transparent !important;
  display: flex; align-items: center; justify-content: center;
  overflow: visible;
  padding: 0;
  box-shadow: none;
  flex-shrink: 0;
}

/* Custom logo image in sidebar */
.sidebar-logo-img {
  width: auto;
  height: 100%;
  max-height: 42px;
  object-fit: contain;
  display: block;
  background: transparent;
}
.sidebar-brand .sb-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
}
.sidebar-brand .sb-name span {
  display: block;
  font-size: 0.6rem;
  color: var(--secondary);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.close-sidebar {
  font-size: 22px; cursor: pointer;
  color: #94a3b8; padding: 4px 8px;
  border-radius: 6px; transition: background 0.2s, color 0.2s;
}
.close-sidebar:hover { background: rgba(255,255,255,0.1); color: var(--white); }

.sidebar-nav            { padding: 12px 10px; flex: 1; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px; color: #cbd5e1;
  text-decoration: none; font-weight: 500; font-size: 0.97rem;
  border-radius: 10px; margin-bottom: 4px;
  transition: all 0.2s; letter-spacing: 0.01em;
}
.sidebar-nav a:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  transform: translateX(5px);
}
.sidebar-nav a .nav-icon { width: 26px; text-align: center; font-size: 1.05rem; flex-shrink: 0; }
.sidebar-divider         { border: none; border-top: 1px solid rgba(255,255,255,0.08); margin: 10px 14px; }
.sidebar-nav a.logout-link       { color: #fca5a5; }
.sidebar-nav a.logout-link:hover { background: rgba(239,68,68,0.15); color: #ef4444; }
.sidebar-nav a.login-link        { color: #ff8a80; }
.sidebar-nav a.login-link:hover  { background: rgba(34,197,94,0.15); color: #22c55e; }

/* ============================================================
   BOTTOM NAV (mobile)
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 2px solid #e5e7eb;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  z-index: 50;
  display: flex;
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  color: var(--gray);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  gap: 3px;
  transition: color 0.2s, background 0.2s;
}
.bottom-nav a i   { font-size: 1.3rem; }
.bottom-nav a:hover           { color: var(--primary); background: #fff5f5; }
.bottom-nav a.active          { color: var(--primary); }
body.has-bottom-nav           { padding-bottom: 72px; }

/* ============================================================
   PAYMENT PAGE
   ============================================================ */
.payment-container { font-family: 'Poppins', 'Segoe UI', sans-serif; }
.product-card      { transition: all 0.2s; }
.quantity-selector button:active { transform: scale(0.95); }
.payment-option {
  transition: all 0.2s ease;
  cursor: pointer;
}
.payment-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.proceed-btn            { transition: all 0.2s; }
.proceed-btn:hover      { opacity: 0.9; transform: scale(1.02); }
.check-id-btn:active    { transform: scale(0.98); }
@media (max-width: 500px) {
  .payment-container { margin: 10px !important; padding: 15px !important; }
  .payment-options.wallet-options { flex-direction: column; gap: 10px !important; }
  .auto-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .total-section { flex-direction: column; gap: 15px; align-items: stretch; }
  .proceed-btn   { justify-content: center; }
}

/* ============================================================
   FLOATING HELP BUTTON (footer.php)
   ============================================================ */
.help-fab-wrap {
  position: fixed;
  bottom: 80px; right: 18px;
  z-index: 999;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 10px;
}
.help-fab-main {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
  color: var(--white);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 18px rgba(229,62,62,0.55);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fabPulse 2.2s infinite;
  position: relative; z-index: 2;
}
.help-fab-main:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(229,62,62,0.7); }
.help-fab-main.is-open { background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%); animation: none; }
@keyframes fabPulse {
  0%,100% { box-shadow: 0 4px 18px rgba(229,62,62,0.55); }
  50%      { box-shadow: 0 4px 28px rgba(229,62,62,0.85); }
}
.help-fab-label {
  position: absolute;
  right: 68px; bottom: 14px;
  background: #e53e3e; color: var(--white);
  font-size: 13px; font-weight: 700;
  padding: 6px 14px; border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  pointer-events: none;
  animation: labelBounce 2.2s infinite;
}
@keyframes labelBounce {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.help-fab-sub {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 10px;
  overflow: hidden;
  max-height: 0; opacity: 0;
  transition: max-height 0.38s cubic-bezier(.4,0,.2,1), opacity 0.28s ease;
  pointer-events: none;
}
.help-fab-sub.open { max-height: 300px; opacity: 1; pointer-events: auto; }
.help-fab-sub a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 30px;
  color: var(--white); font-size: 14px; font-weight: 700;
  text-decoration: none;
  box-shadow: 0 3px 12px rgba(0,0,0,0.18);
  transition: transform 0.18s; white-space: nowrap;
}
.help-fab-sub a:hover    { transform: scale(1.05); }
.help-fab-sub a.whatsapp-btn { background: #25d366; }
.help-fab-sub a.telegram-btn { background: #229ed9; }
.help-fab-sub a.contact-btn  { background: #6c47ff; }
.help-fab-sub a i { font-size: 18px; }

/* ============================================================
   UTILITIES
   ============================================================ */
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 8px 20px; border-radius: 30px;
  font-weight: 600; cursor: pointer;
  transition: var(--transition);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }
.text-center  { text-align: center; }
.mt-4         { margin-top: 24px; }
.mb-4         { margin-bottom: 24px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .stat-card   { padding: 14px; }
  .stat-number { font-size: 1.4rem; }
  .topup-card  { padding: 18px; }
}
@media (max-width: 480px) {
  .price { font-size: 1.6rem; }
  .site-logo .logo-text .logo-main { font-size: 1.1rem; }
}

/* ============================================================
   ADMIN PANEL STYLES
   ============================================================ */

/* Admin hamburger toggle button */
.menu-toggle-btn {
  position: fixed; top: 15px; left: 15px;
  z-index: 1000;
  background: var(--primary);
  color: var(--white);
  border: none; border-radius: 8px;
  padding: 8px 12px; font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  display: none;
}

/* Admin left sidebar */
.admin-left-sidebar {
  width: 260px;
  background: linear-gradient(160deg, #1b4332 0%, #0a1f15 60%, #081a11 100%);
  color: var(--white);
  position: fixed; top: 0; left: 0;
  height: 100%; overflow-y: auto;
  transition: transform 0.3s ease;
  z-index: 999; transform: translateX(0);
}

/* Admin brand in sidebar */
.admin-sidebar-brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; gap: 12px;
}
.admin-sidebar-brand .ab-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 1.2rem;
  box-shadow: 0 3px 10px rgba(229,57,53,0.4);
}
.admin-sidebar-brand .ab-text { line-height: 1.15; }
.admin-sidebar-brand .ab-name {
  display: block; font-size: 1.05rem; font-weight: 700;
  color: var(--white); background: transparent;
}
.admin-sidebar-brand .ab-sub {
  display: block; font-size: 0.6rem; font-weight: 600;
  color: var(--secondary); text-transform: uppercase; letter-spacing: 0.1em;
}

/* Admin main content */
.admin-main-content { margin-left: 260px; transition: margin-left 0.3s ease; min-height: 100vh; }

/* Sidebar links */
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; color: #d1fae5;
  text-decoration: none; transition: all 0.2s;
  border-radius: 8px; margin: 4px 12px;
}
.sidebar-link:hover   { background: rgba(255,255,255,0.12); color: var(--white); }
.sidebar-link.active  { background: var(--primary); color: var(--white); }

/* Modal */
.modal {
  display: none; position: fixed; z-index: 1100;
  left: 0; top: 0; width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
  animation: fadeInModal 0.3s;
}
@keyframes fadeInModal { from { opacity:0; } to { opacity:1; } }
.modal-content {
  background-color: var(--white);
  margin: auto; padding: 25px; border-radius: 12px;
  max-width: 600px; position: relative;
  top: 50%; transform: translateY(-50%);
  animation: slideUpModal 0.3s;
  max-height: 90vh; overflow-y: auto;
}
@keyframes slideUpModal {
  from { transform: translateY(0); opacity: 0; }
  to   { transform: translateY(-50%); opacity: 1; }
}

/* Admin table */
table { width: 100%; border-collapse: collapse; }
table th { background: #f3f4f6; padding: 12px; text-align: left; font-weight: bold; color: #374151; border-bottom: 2px solid #e5e7eb; }
table td { padding: 12px; border-bottom: 1px solid #e5e7eb; }
table tr:hover { background: #f9fafb; }

/* Loading dots */
.loading {
  width: 12px; height: 12px;
  border-radius: 50%; background: var(--primary);
  animation: loadingBounce 0.6s infinite alternate;
}
.loading:nth-child(2) { animation-delay: 0.2s; }
.loading:nth-child(3) { animation-delay: 0.4s; }
@keyframes loadingBounce { from { transform: translateY(0); } to { transform: translateY(-12px); } }

/* Button slide effect */
.btn-slide { position: relative; overflow: hidden; }
.btn-slide span { position: relative; z-index: 1; }
.btn-slide::before {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.07);
  transition: left 0.3s ease;
}
.btn-slide:hover::before { left: 0; }

/* Admin mobile */
@media (max-width: 768px) {
  .menu-toggle-btn      { display: block; }
  .admin-left-sidebar   { transform: translateX(-100%); }
  .admin-left-sidebar.open { transform: translateX(0); }
  .admin-main-content   { margin-left: 0; padding-top: 60px; }
}
@media (min-width: 769px) {
  .admin-left-sidebar   { transform: translateX(0) !important; }
  .menu-toggle-btn      { display: none; }
}

/* ============================================================
   CUSTOM LOGO IMAGE (footer)
   ============================================================ */
.footer-logo-img {
  width: auto;
  height: 20px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  margin-right: 2px;
}

/* ============================================================
   DARK THEME
   ============================================================ */

/* Dark mode CSS variables */
body.dark-mode {
  --dark: #e2e8f0;
  --light: #1a1a2e;
  background: #0f0f1a !important;
  color: #e2e8f0;
}

/* Dark theme switch toggle */
.dark-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.dark-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.dark-toggle-track {
  width: 40px;
  height: 22px;
  background: #cbd5e1;
  border-radius: 11px;
  transition: background 0.3s;
  position: relative;
  display: flex;
  align-items: center;
  padding: 2px;
}
.dark-toggle-thumb {
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.dark-toggle input:checked ~ .dark-toggle-track {
  background: #6366f1;
}
.dark-toggle input:checked ~ .dark-toggle-track .dark-toggle-thumb {
  transform: translateX(18px);
}

/* ----- User-facing dark styles ----- */
body.dark-mode .top-navbar,
body.dark-mode header.top-navbar {
  background: #1e1e30 !important;
  border-bottom: 1px solid #2d2d45;
}
body.dark-mode .left-sidebar {
  background: #1e1e30 !important;
  border-right: 1px solid #2d2d45;
}
body.dark-mode .bottom-nav {
  background: #1e1e30 !important;
  border-top: 1px solid #2d2d45;
}
body.dark-mode .bottom-nav a {
  color: #94a3b8;
}
body.dark-mode .bottom-nav a.active,
body.dark-mode .bottom-nav a:hover {
  color: #818cf8;
}
body.dark-mode .game-card,
body.dark-mode .product-card,
body.dark-mode .bg-white,
body.dark-mode .card,
body.dark-mode [class*="bg-white"] {
  background: #1e1e30 !important;
  color: #e2e8f0 !important;
  border-color: #2d2d45 !important;
}
body.dark-mode .text-gray-800,
body.dark-mode .text-gray-700,
body.dark-mode .text-gray-600,
body.dark-mode .text-gray-500 {
  color: #cbd5e1 !important;
}
body.dark-mode .bg-gray-50,
body.dark-mode .bg-gray-100 {
  background: #16162a !important;
}
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
  background: #16162a !important;
  color: #e2e8f0 !important;
  border-color: #3d3d5c !important;
}
body.dark-mode .shadow,
body.dark-mode .shadow-sm,
body.dark-mode .shadow-md {
  box-shadow: 0 4px 16px rgba(0,0,0,0.5) !important;
}
body.dark-mode .border,
body.dark-mode .border-b,
body.dark-mode .border-gray-200,
body.dark-mode .border-gray-100 {
  border-color: #2d2d45 !important;
}
body.dark-mode .sidebar-nav a {
  color: #94a3b8 !important;
}
body.dark-mode .sidebar-nav a:hover {
  background: #2d2d45 !important;
  color: #e2e8f0 !important;
}
body.dark-mode .marquee {
  background: #16162a !important;
  color: #cbd5e1 !important;
}

/* ----- Admin panel dark styles ----- */
body.dark-mode .admin-sidebar {
  background: #1e1e30 !important;
  border-right: 1px solid #2d2d45 !important;
}
body.dark-mode .admin-main {
  background: #0f0f1a !important;
}
body.dark-mode .admin-sidebar nav a {
  color: #94a3b8 !important;
}
body.dark-mode .admin-sidebar nav a:hover {
  background: #2d2d45 !important;
  color: #e2e8f0 !important;
}
body.dark-mode .admin-sidebar nav a.bg-indigo-100 {
  background: #312e81 !important;
  color: #a5b4fc !important;
}
body.dark-mode .modal-box {
  background: #1e1e30 !important;
  color: #e2e8f0 !important;
}
body.dark-mode table thead {
  background: #16162a !important;
}
body.dark-mode table tr:hover {
  background: #1a1a2c !important;
}
body.dark-mode table td,
body.dark-mode table th {
  color: #cbd5e1 !important;
  border-color: #2d2d45 !important;
}

/* Dark mode logo text */
body.dark-mode .logo-main {
  color: #f87171 !important;
}
body.dark-mode .logo-sub {
  color: #94a3b8 !important;
}

/* ============================================================
   DARK MODE — ADMIN PANEL (complete fix)
   ============================================================ */

/* Admin layout background */
body.dark-mode .admin-layout,
body.dark-mode .admin-main {
  background: #0f0f1a !important;
}

/* Admin sidebar (white by default) */
body.dark-mode .admin-sidebar {
  background: #1e1e30 !important;
  border-right: 1px solid #2d2d45 !important;
}

/* Sidebar brand text */
body.dark-mode .admin-sidebar .font-bold,
body.dark-mode .admin-sidebar p {
  color: #e2e8f0 !important;
}

/* Sidebar nav links */
body.dark-mode .admin-sidebar nav a {
  color: #94a3b8 !important;
}
body.dark-mode .admin-sidebar nav a:hover {
  background: #2d2d45 !important;
  color: #e2e8f0 !important;
}
body.dark-mode .admin-sidebar nav a.bg-indigo-100 {
  background: #312e81 !important;
  color: #a5b4fc !important;
}
body.dark-mode .admin-sidebar nav a.text-red-600 {
  color: #fca5a5 !important;
}

/* Admin header */
body.dark-mode .admin-main header,
body.dark-mode .admin-main .bg-white {
  background: #1e1e30 !important;
  border-color: #2d2d45 !important;
}
body.dark-mode .admin-main header h1,
body.dark-mode .admin-main header strong,
body.dark-mode .admin-main header span {
  color: #e2e8f0 !important;
}

/* Admin stat cards & content boxes — but never clobber a badge/button that
   already carries its own semantic color (bg-blue-100, bg-green-600, etc.),
   or its background disappears into the dark panel behind it. */
body.dark-mode .admin-main .rounded-xl:not([class*="bg-blue-"]):not([class*="bg-green-"]):not([class*="bg-red-"]):not([class*="bg-yellow-"]):not([class*="bg-purple-"]):not([class*="bg-indigo-"]):not([class*="bg-pink-"]):not([class*="bg-orange-"]),
body.dark-mode .admin-main .rounded-lg:not([class*="bg-blue-"]):not([class*="bg-green-"]):not([class*="bg-red-"]):not([class*="bg-yellow-"]):not([class*="bg-purple-"]):not([class*="bg-indigo-"]):not([class*="bg-pink-"]):not([class*="bg-orange-"]) {
  background: #1e1e30 !important;
  border-color: #2d2d45 !important;
}
body.dark-mode .admin-main p,
body.dark-mode .admin-main span,
body.dark-mode .admin-main label,
body.dark-mode .admin-main h1,
body.dark-mode .admin-main h2,
body.dark-mode .admin-main h3 {
  color: #e2e8f0 !important;
}
body.dark-mode .admin-main .text-gray-800,
body.dark-mode .admin-main .text-gray-700,
body.dark-mode .admin-main .text-gray-600,
body.dark-mode .admin-main .text-gray-500,
body.dark-mode .admin-main .text-gray-400 {
  color: #94a3b8 !important;
}

/* Admin tables */
body.dark-mode .admin-main table thead,
body.dark-mode .admin-main .bg-gray-50 {
  background: #16162a !important;
}
body.dark-mode .admin-main table tr:hover {
  background: #1a1a2c !important;
}
body.dark-mode .admin-main table td,
body.dark-mode .admin-main table th {
  color: #cbd5e1 !important;
  border-color: #2d2d45 !important;
}

/* Admin inputs */
body.dark-mode .admin-main input,
body.dark-mode .admin-main textarea,
body.dark-mode .admin-main select {
  background: #16162a !important;
  color: #e2e8f0 !important;
  border-color: #3d3d5c !important;
}
body.dark-mode .admin-main input::placeholder,
body.dark-mode .admin-main textarea::placeholder {
  color: #64748b !important;
}

/* Admin modal */
body.dark-mode .modal-overlay .modal-box,
body.dark-mode .modal-overlay > div {
  background: #1e1e30 !important;
  color: #e2e8f0 !important;
}
body.dark-mode .modal-overlay .modal-box input,
body.dark-mode .modal-overlay .modal-box textarea,
body.dark-mode .modal-overlay .modal-box select {
  background: #16162a !important;
  color: #e2e8f0 !important;
  border-color: #3d3d5c !important;
}
body.dark-mode .modal-overlay .modal-box label,
body.dark-mode .modal-overlay .modal-box p,
body.dark-mode .modal-overlay .modal-box h3 {
  color: #e2e8f0 !important;
}

/* Admin bg-gray-100 buttons */
body.dark-mode .admin-main .bg-gray-100,
body.dark-mode .admin-main .bg-gray-200,
body.dark-mode .modal-overlay .bg-gray-100 {
  background: #2d2d45 !important;
  color: #e2e8f0 !important;
}

/* Border separator */
body.dark-mode .admin-main hr,
body.dark-mode .admin-sidebar hr {
  border-color: #2d2d45 !important;
}

/* User-facing pages dark mode fixes */
body.dark-mode .modal-content {
  background: #1e1e30 !important;
  color: #e2e8f0 !important;
}
body.dark-mode .modal-content input,
body.dark-mode .modal-content textarea {
  background: #16162a !important;
  color: #e2e8f0 !important;
  border-color: #3d3d5c !important;
}
body.dark-mode .modal-content h3,
body.dark-mode .modal-content label,
body.dark-mode .modal-content p {
  color: #e2e8f0 !important;
}
body.dark-mode .modal-content .bg-gray-100 {
  background: #2d2d45 !important;
  color: #e2e8f0 !important;
}

/* User page card fixes */
body.dark-mode .bg-gray-50.rounded-xl {
  background: #16162a !important;
}
body.dark-mode header.bg-white,
body.dark-mode header.shadow-sm {
  background: #1e1e30 !important;
  border-color: #2d2d45 !important;
}
body.dark-mode header h1,
body.dark-mode header .text-gray-800,
body.dark-mode header .text-gray-600 {
  color: #e2e8f0 !important;
}
