/* Google Fonts for Web3 Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Rajdhani:wght@500;600;700;800&display=swap');

/* =========================================
   1. DESIGN TOKENS (Variables)
   Remapped for Web3/Blockchain Gaming Theme
========================================= */
:root {
  /* Core Brand Colors (Remapped to Dark/Neon Web3 Theme) */
  --green: #0b0e14;       /* Deepest dark for sidebar/topbar */
  --green2: #00f0ff;      /* Primary Neon Cyan Accent */
  --mint: #151b2b;        /* Surface/Panel background */
  --lime: #fadb14;        /* Gold/Crypto accent for rewards/coins */
  --ink: #ffffff;         /* Primary text */
  --muted: #8b9bb4;       /* Secondary text */
  --line: #1e293b;        /* Borders */
  --bg: #05080f;          /* Main canvas background */

  /* Web3 Gamified Additions */
  --glow-cyan: 0 0 12px rgba(0, 240, 255, 0.3);
  --glow-cyan-strong: 0 0 24px rgba(0, 240, 255, 0.6);
  --glass-bg: rgba(21, 27, 43, 0.75);
  --glass-border: 1px solid rgba(0, 240, 255, 0.15);
  
  /* Standardized Spacing Scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-16: 64px;

  /* Border Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 99px;

  /* Layout Architecture */
  --sidebar-width: 280px;
  --topbar-height: 78px;
  --transition-base: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --font-base: 'Rajdhani', 'Inter', system-ui, -apple-system, sans-serif;
}

/* =========================================
   2. RESET, BASE & SCROLLBARS
========================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--green2) var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  /* Web3 Tech Grid Background */
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 30px 30px;
  color: var(--ink);
  font-family: var(--font-base);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font: inherit;
  margin: 0;
}

/* Cyberpunk Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { 
  background: var(--green2); 
  box-shadow: var(--glow-cyan);
}

/* =========================================
   3. TYPOGRAPHY & UTILITIES
========================================= */
.eyebrow { color: var(--green2); font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; text-shadow: var(--glow-cyan); }
.page-title {
    font-size: clamp(26px, 3.5vw, 32px);
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 6px 0 4px;
    line-height: 1.2;
    text-transform: uppercase;
}
.subtext { color: var(--muted); margin: 0; line-height: 1.5; font-weight: 500;}

.txt-base { font-size: 15px; }
.txt-sm { font-size: 13px; }
.txt-xs { font-size: 12px; }

/* Status Badges - Gamified Outlines */
.status { font-size: 11px; font-weight: 700; border-radius: var(--radius-full); padding: 5px 12px; display: inline-flex; align-items: center; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.5px;}
.status-active { background: rgba(0, 240, 255, 0.1); color: var(--green2); border: 1px solid var(--green2); box-shadow: var(--glow-cyan); }
.status-pending { background: rgba(250, 219, 20, 0.1); color: var(--lime); border: 1px solid var(--lime); }
.status-inactive { background: rgba(139, 155, 180, 0.1); color: var(--muted); border: 1px solid var(--muted); }

/* Theme Colors */
.theme-info { background: rgba(56, 189, 248, 0.1); color: #38bdf8; border: 1px solid #38bdf8;}
.theme-danger { background: rgba(248, 113, 113, 0.1); color: #f87171; border: 1px solid #f87171; }
.theme-warning { background: rgba(250, 219, 20, 0.1); color: var(--lime); border: 1px solid var(--lime);}
.metric-icon.theme-warning { background: rgba(250, 219, 20, 0.1); color: var(--lime); border: 1px solid var(--lime); box-shadow: 0 0 15px rgba(250, 219, 20, 0.2);}

/* Avatars & Icons */
.avatar { width: 39px; height: 39px; border-radius: var(--radius-md); background: var(--line); color: var(--ink); display: grid; place-items: center; font-weight: 700; border: 1px solid rgba(255,255,255,0.1); }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; border-radius: var(--radius-sm); }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: var(--green2); color: #000; display: grid; place-items: center; font-size: 23px; box-shadow: var(--glow-cyan); }

/* =========================================
   4. FORMS & BUTTONS (Web3 Aesthetic)
========================================= */
.form-control,
.form-select {
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  width: 100%;
  font-size: 14px;
  min-height: 42px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--ink);
  transition: all var(--transition-base);
  backdrop-filter: blur(4px);
}

.form-control::placeholder { color: var(--muted); }

.form-control:focus-visible, 
.form-select:focus-visible, 
textarea:focus-visible {
  outline: none !important;
  border-color: var(--green2) !important;
  box-shadow: var(--glow-cyan) !important;
  background-color: var(--green) !important;
  color: #fff;
}

/* Global Button Logic - Neon Gaming Style */
.btn-erp, .btn-icon, .btn-outline {
  transition: all var(--transition-base);
  cursor: pointer;
  white-space: nowrap !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-erp:active, .btn-outline:active { transform: scale(0.95); }
.btn-icon:active { transform: scale(0.85); }

.btn-erp {
  background: var(--green2);
  color: #000;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--glow-cyan);
}
.btn-erp:hover { 
  background: #00c3d0; 
  box-shadow: var(--glow-cyan-strong); 
  transform: translateY(-2px);
}

.btn-outline {
  padding: 10px 24px;
  background: transparent;
  color: var(--green2);
  border: 1px solid var(--green2);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
}
.btn-outline:hover { 
  background: rgba(0, 240, 255, 0.1); 
  box-shadow: var(--glow-cyan);
  color: var(--green2);
}

/* Fix blurry Export/Print button */
#exportToexcel, #printbtn {
  transform: none !important;
  filter: none !important;
  -webkit-filter: none !important;
  backdrop-filter: none !important;
  will-change: auto !important;
  backface-visibility: visible !important;
  -webkit-font-smoothing: subpixel-antialiased !important;
  transition: all 0.2s ease !important;
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: inline-grid;
  place-items: center;
}
.btn-icon:hover { 
  background: rgba(0, 240, 255, 0.1); 
  color: var(--green2); 
  border-color: var(--green2); 
  box-shadow: var(--glow-cyan);
}

.w-auto { width: auto !important; }

/* Action Links */
.link-action { color: var(--green2); font-size: 13px; font-weight: 700; text-decoration: none; transition: all var(--transition-base); text-shadow: var(--glow-cyan); }
.link-action:hover { color: #fff; text-decoration: none; text-shadow: 0 0 10px #fff; }

/*=========================================
   5. LAYOUT & SIDEBAR (Glass/Neon)
=========================================*/
.app { display: block; min-height: 100dvh; }

.sidebar {
  width: var(--sidebar-width);
  position: fixed;
  inset: 0 auto 0 0;
  min-height: 100dvh;
  padding: var(--space-5) var(--space-4);
  background: rgba(11, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--line);
  color: #fff;
  overflow-y: auto;
  z-index: 20;
  transition: transform 0.3s ease;
  scrollbar-color: var(--line) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--line); border: none; border-radius: 10px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--green2); }

@media (max-width: 850px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: translateX(0); }
}

.sidebar-brand { display: flex; align-items: center; gap: var(--space-3); padding: 5px 10px var(--space-6); border-bottom: 1px solid rgba(255,255,255,0.05); margin-bottom: 15px;}
.sidebar-brand small { margin-top: 3px; color: var(--green2); display: block; font-weight: 600; letter-spacing: 2px;}
.sidebar-brand strong { display: block; font-size: 20px; font-weight: 800; letter-spacing: 1px; }

.nav-label { margin: var(--space-4) var(--space-3) var(--space-2); color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }

.side-link {
  width: 100%; min-height: 46px; display: flex; align-items: center; gap: var(--space-3);
  margin-bottom: 6px; padding: 11px 13px; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--muted);
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; transition: all var(--transition-base);
}
.side-link i { font-size: 18px; transition: color var(--transition-base); }
.side-link:hover { background: rgba(0, 240, 255, 0.05); color: var(--ink); border-color: rgba(0, 240, 255, 0.2); }
.side-link:hover i { color: var(--green2); text-shadow: var(--glow-cyan); }
.side-link.active { background: rgba(0, 240, 255, 0.1); color: var(--green2); font-weight: 700; border-color: var(--green2); box-shadow: inset 2px 0 0 var(--green2); }

.menu-toggle { display: flex; justify-content: space-between; width: 100%; border: 0; background: none; }
.menu-title { display: flex; align-items: center; gap: var(--space-3); }
.menu-arrow { font-size: 12px; transition: transform 0.25s ease; }
.menu-toggle[aria-expanded="true"] .menu-arrow { transform: rotate(180deg); color: var(--green2); }

.submenu { position: relative; }
.submenu.level-2 { margin-left: 19px; padding-left: 10px; border-left: 1px solid var(--line); }
.submenu.level-3 { margin-left: 21px; padding-left: 9px; border-left: 1px dashed var(--line); }
.sub-link { min-height: 40px; padding: 9px 11px; font-size: 13px; }
.level-3 .sub-link { font-size: 12px; color: var(--muted); }
.sub-link.active, .sub-link:hover { color: var(--green2); }

.sidebar-foot { margin-top: 35px; padding: var(--space-4) 10px 5px; border-top: 1px solid var(--line); }
.sidebar-foot small { color: var(--muted); display: block; font-weight: 600;}
.sidebar-foot strong { margin-top: 4px; display: block; color: var(--green2); }

/* =========================================
   6. MAIN CONTENT & TOPBAR
========================================= */
.main { margin-left: var(--sidebar-width); min-height: 100dvh; }
@media (max-width: 850px) { .main { margin-left: 0; } }

.topbar {
  height: var(--topbar-height);
  background: rgba(5, 8, 15, 0.8); 
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--space-7); position: sticky; top: 0; z-index: 10;
}
@media (max-width: 850px) { .topbar { padding: 0 var(--space-4); } }

.mobile-menu-btn { display: none; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--ink); }
@media (max-width: 850px) { .mobile-menu-btn { display: block; } }

#menu { display: none !important; width: auto !important; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--green2); text-shadow: var(--glow-cyan); }
@media (max-width: 850px) { #menu { display: inline-flex !important; align-items: center; justify-content: center; } }

.search { width: min(400px, 40vw); position: relative; }
@media (max-width: 520px) { .search { display: none; } }
.search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--green2); }
.search input { padding-left: 40px; background: rgba(0,0,0,0.5); border: 1px solid var(--line); border-radius: var(--radius-full); }
.search input:focus-visible { border-color: var(--green2); box-shadow: var(--glow-cyan); }

.user-chip { display: flex; align-items: center; gap: 11px; font-weight: 600; cursor: pointer;}
.user-chip:hover .avatar { border-color: var(--green2); box-shadow: var(--glow-cyan); }
@media (max-width: 520px) { .user-chip span { display: none; } }

.content { padding: var(--space-7); }
@media (max-width: 850px) { .content { padding: var(--space-5); } }
@media (max-width: 520px) { .content { padding: var(--space-4); } }

.screen { display: none; }
.screen.active { display: block; animation: fadeIn 0.4s ease-out forwards; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   7. PANELS, CARDS & METRICS (Glassmorphism)
========================================= */
.panel { background: var(--glass-bg); backdrop-filter: blur(10px); border: var(--glass-border); border-radius: var(--radius-lg); height: 100%; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 15px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.panel-title { font-size: 16px; font-weight: 800; margin: 0; text-transform: uppercase; letter-spacing: 1px; color: var(--ink); }

.metric { background: var(--glass-bg); backdrop-filter: blur(10px); border: var(--glass-border); border-radius: var(--radius-lg); padding: var(--space-5); height: 100%; box-shadow: 0 4px 20px rgba(0,0,0,0.5); position: relative; overflow: hidden; }
/* Subtle internal neon accent */
.metric::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: linear-gradient(90deg, var(--green2), transparent); opacity: 0.5; }
.metric-top { display: flex; justify-content: space-between; }
.metric h3 { font-size: clamp(23px, 2vw, 28px); font-weight: 800; letter-spacing: 1px; margin: 20px 0 4px; color: var(--ink); }
.metric small { color: var(--muted); font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; }
.metric small .text-muted { opacity: 0.8; }
.metric-icon { width: 44px; height: 44px; border-radius: var(--radius-md); display: grid; place-items: center; background: rgba(0, 240, 255, 0.1); color: var(--green2); font-size: 20px; border: 1px solid rgba(0, 240, 255, 0.3); box-shadow: var(--glow-cyan); }

.trend { font-size: 12px; font-weight: 700; border-radius: var(--radius-sm); padding: 4px 8px; display: inline-flex; align-items: center; gap: 4px; border: 1px solid transparent; }
.trend i { font-size: 14px; margin-left: -2px; }
.trend-up { color: #00ff88; background: rgba(0, 255, 136, 0.1); border-color: rgba(0, 255, 136, 0.3); box-shadow: 0 0 10px rgba(0, 255, 136, 0.2); }
.trend-down { color: #ff3366; background: rgba(255, 51, 102, 0.1); border-color: rgba(255, 51, 102, 0.3); box-shadow: 0 0 10px rgba(255, 51, 102, 0.2); }

.hover-lift { transition: all var(--transition-base); cursor: pointer; }
.hover-lift:hover { transform: translateY(-5px); border-color: var(--green2); box-shadow: 0 10px 30px rgba(0, 240, 255, 0.15); }
.hover-lift-row { transition: background-color 0.2s ease; cursor: default; }
.hover-lift-row:hover { background-color: rgba(0, 240, 255, 0.05) !important; }

/* Modules Grid */
.modules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
@media (max-width: 1100px) { .modules { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 850px)  { .modules { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .modules { grid-template-columns: 1fr; } }

.module-card { padding: var(--space-5); color: var(--ink); text-align: left; transition: all var(--transition-base); min-height: 146px; position: relative; text-decoration: none; border: var(--glass-border); border-radius: var(--radius-lg); background: var(--glass-bg); backdrop-filter: blur(10px); }
.module-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0, 240, 255, 0.1); border-color: var(--green2); background: rgba(21, 27, 43, 0.9); }
.module-card .metric-icon { margin-bottom: 18px; }
.module-card strong { display: block; font-size: 16px; font-weight: 700; letter-spacing: 0.5px; }
.module-card small { color: var(--muted); font-weight: 500; }
.module-card .bi-arrow-up-right { position: absolute; right: 17px; top: 17px; color: var(--muted); transition: all 0.3s ease; }
.module-card:hover .bi-arrow-up-right { color: var(--green2); transform: translate(2px, -2px); text-shadow: var(--glow-cyan); }

/* =========================================
   8. CHARTS & ACTIVITY (Neon Aesthetic)
========================================= */
.chart { 
  height: 240px; 
  display: flex; 
  align-items: flex-end; 
  gap: var(--space-3); 
  padding: 20px 24px 30px 24px !important; 
  border-bottom: 1px solid var(--line); 
  /* Tech Grid Background for Charts */
  background: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
}

.bar { 
  flex: 1; 
  background: linear-gradient(180deg, var(--green2), #0077ff); 
  border-radius: 4px 4px 0 0; 
  min-width: 12px; 
  position: relative;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
  transition: height 1s ease-out, filter 0.3s ease;
}
.bar:hover { filter: brightness(1.3); }

.bar::after { 
  content: attr(data-label); 
  position: absolute; 
  bottom: -24px; 
  left: 50%; 
  transform: translateX(-50%); 
  font-size: 11px; 
  font-weight: 700;
  color: var(--muted); 
  white-space: nowrap;
}

.h-85 { height: 85% !important; }
.h-70 { height: 70% !important; }
.h-60 { height: 60% !important; }
.h-45 { height: 45% !important; }
.h-30 { height: 30% !important; }

.activity { display: flex; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.activity:last-child { border: 0; }
.activity .dot { width: 36px; height: 36px; border-radius: var(--radius-sm); background: rgba(0, 240, 255, 0.1); border: 1px solid var(--green2); display: grid; place-items: center; color: var(--green2); flex: none; box-shadow: var(--glow-cyan); }
.activity p { font-size: 14px; margin: 0; font-weight: 500; color: var(--ink); }
.activity small { color: var(--muted); font-size: 12px;}

/* =========================================
   9. DATA TABLES & MOBILE SCROLL (Dark Mode)
========================================= */
.table-responsive {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 0;
  background: rgba(10, 14, 23, 0.6);
  width: 100%;
}

.table-container {
  max-height: 65vh; 
  overflow-y: auto;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.table { width: 100%; border-collapse: collapse; margin-bottom: 0; }

.table > thead th, .sticky-th {
  position: sticky;
  top: 0;
  background-color: #0d121c !important; 
  color: var(--muted) !important; 
  font-size: 12px !important; 
  font-weight: 800 !important;
  letter-spacing: 1px;
  text-transform: uppercase;
  z-index: 10;
  border-bottom: 1px solid var(--green2) !important; 
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.1); 
  padding: 16px;
  text-align: center;
}

.table > tbody > tr > td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  text-align: center; 
  color: var(--ink);
  font-weight: 500;
}

/* =========================================
   10. LOGIN VIEW (Inspired by image_04dae4.jpg)
========================================= */
.login-view { 
  min-height: 100dvh; 
  display: grid; 
  grid-template-columns: 1.2fr 0.8fr; 
  background: var(--bg); 
  /* Full screen grid mimicking the provided image */
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}
@media (max-width: 850px) { .login-view { grid-template-columns: 1fr; } }

.login-art { 
  position: relative; 
  overflow: hidden; 
  padding: var(--space-10); 
  color: #fff; 
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (max-width: 850px) { .login-art { display: none; } }

/* Holographic / Glowing Orbs matching the web3 game style */
.login-art::before, .login-art::after { 
  content: ""; 
  position: absolute; 
  border-radius: 50%; 
  filter: blur(80px);
  z-index: 0;
}
.login-art::before { 
  width: 400px; height: 400px; 
  background: rgba(0, 240, 255, 0.15);
  top: 20%; left: 10%; 
  animation: floatOrb 8s infinite alternate ease-in-out;
}
.login-art::after { 
  width: 500px; height: 500px; 
  background: rgba(147, 51, 234, 0.15); /* Purple accent from web3 themes */
  bottom: 10%; right: 10%; 
  animation: floatOrb 10s infinite alternate-reverse ease-in-out;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -50px) scale(1.1); }
}

.login-panel { 
  display: grid; 
  place-items: center; 
  padding: var(--space-8); 
  position: relative;
  z-index: 10;
}
@media (max-width: 520px) { .login-panel { padding: var(--space-4); } }

/* The specific floating dark card container for login */
.login-box { 
  width: min(440px, 100%); 
  background: rgba(13, 17, 28, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: 0 20px 50px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(0, 240, 255, 0.1);
}

/* Ensure headings inside login box match the bold game aesthetic */
.login-box h1, .login-box h2, .login-box h3 {
  color: var(--ink);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* =========================================
   11. BOOTSTRAP STRICT OVERRIDES (Fixing Light Theme Conflicts)
========================================= */
/* Prevents Bootstrap from turning text dark/grey on the dark theme */
.text-muted, .text-secondary { color: var(--muted) !important; }
.text-dark { color: #000 !important; } 
.bg-light, .bg-white { background-color: transparent !important; color: var(--ink) !important; }

/* Form label/input colors */
.form-label { color: var(--ink) !important; font-weight: 600; }

/* Ensure list groups (like Quick Exports) inherit dark theme */
.list-group-item {
    background-color: transparent !important;
    color: var(--ink) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}
.list-group-item:hover {
    background-color: rgba(0, 240, 255, 0.05) !important;
}

/* Ensure tables inherit dark theme variables */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ink);
    color: var(--ink) !important;
}
.table > tbody > tr > td {
    color: var(--muted) !important;
}
.table > tbody > tr > td strong {
    color: var(--ink) !important;
}

/* Override Bootstrap Progress Bars */
.progress {
    background-color: rgba(255, 255, 255, 0.1) !important;
}
.progress-bar {
    color: #000 !important; 
    font-weight: 700;
}
.bg-success { background-color: #00ff88 !important; }
.bg-warning { background-color: #fadb14 !important; }
.bg-info, .bg-cyan { background-color: #00f0ff !important; color: #000 !important; }
.bg-secondary { background-color: #8b9bb4 !important; color: #fff !important; }

/* Custom Toast override to fit the glassmorphism theme */
.custom-toast {
    border-radius: var(--radius-md);
    background: var(--glass-bg) !important;
    backdrop-filter: blur(10px);
    border: var(--glass-border);
}
/* Google Fonts for Web3 Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Rajdhani:wght@500;600;700;800&display=swap');

/* =========================================
   1. DESIGN TOKENS (Variables)
========================================= */
:root {
  --green: #0b0e14;       
  --green2: #00f0ff;      /* Neon Cyan Accent */
  --mint: #151b2b;        
  --lime: #fadb14;        /* Crypto Gold */
  --ink: #ffffff;         /* Primary text */
  --muted: #8b9bb4;       /* Safe visible blue-grey for dark mode */
  --line: #1e293b;        
  --bg: #05080f;          

  --glow-cyan: 0 0 12px rgba(0, 240, 255, 0.3);
  --glow-cyan-strong: 0 0 24px rgba(0, 240, 255, 0.6);
  --glass-bg: rgba(21, 27, 43, 0.75);
  --glass-border: 1px solid rgba(0, 240, 255, 0.15);
  
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-7: 28px; --space-8: 32px;
  
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px; --radius-full: 99px;
  --sidebar-width: 280px; --topbar-height: 78px;
  --transition-base: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --font-base: 'Rajdhani', 'Inter', system-ui, -apple-system, sans-serif;
}

/* =========================================
   2. RESET, BASE & SCROLLBARS
========================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-width: thin; scrollbar-color: var(--green2) var(--bg); scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 30px 30px;
  color: var(--ink);
  font-family: var(--font-base);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; margin: 0; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--green2); box-shadow: var(--glow-cyan); }

/* =========================================
   3. THEME UTILITIES & OVERRIDES
========================================= */
.txt-theme-muted { color: var(--muted) !important; }
.text-white { color: #ffffff !important; }
.text-cyan { color: var(--green2) !important; }
.text-neon-green { color: #00ff88 !important; }
.text-neon-red { color: #ff3366 !important; }
.text-ink { color: var(--ink) !important; }

/* Force background overrides to drop Bootstrap light colors */
.bg-light { background-color: rgba(255,255,255,0.05) !important; color: var(--ink) !important; }
.bg-white { background-color: transparent !important; }
.text-dark { color: #000 !important; }

.tracking-wide { letter-spacing: 0.5px; }

/* =========================================
   4. TYPOGRAPHY
========================================= */
.eyebrow { color: var(--green2); font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; text-shadow: var(--glow-cyan); margin-bottom: 2px !important;}
.page-title { font-size: clamp(26px, 3.5vw, 32px); font-weight: 800; letter-spacing: -0.5px; margin: 6px 0 4px !important; line-height: 1.2 !important; text-transform: uppercase; }
.subtext { margin: 0; line-height: 1.4 !important; font-weight: 500;}

.txt-md { font-size: 16px; }
.txt-base { font-size: 15px; } 
.txt-sm { font-size: 13px; } 
.txt-xs { font-size: 12px; }

.status { font-size: 11px; font-weight: 700; border-radius: var(--radius-full); padding: 5px 12px; display: inline-flex; align-items: center; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.5px;}
.status-active { background: rgba(0, 240, 255, 0.1); color: var(--green2); border: 1px solid var(--green2); box-shadow: var(--glow-cyan); }
.status-pending { background: rgba(250, 219, 20, 0.1); color: var(--lime); border: 1px solid var(--lime); }
.status-inactive { background: rgba(139, 155, 180, 0.1); color: var(--muted); border: 1px solid var(--muted); }

.theme-info { background: rgba(56, 189, 248, 0.1); color: #38bdf8; border: 1px solid #38bdf8;}
.theme-danger { background: rgba(248, 113, 113, 0.1); color: #f87171; border: 1px solid #f87171; }
.theme-warning { background: rgba(250, 219, 20, 0.1); color: var(--lime); border: 1px solid var(--lime);}

.avatar { width: 39px; height: 39px; border-radius: var(--radius-md); background: var(--line); color: var(--ink); display: grid; place-items: center; font-weight: 700; border: 1px solid rgba(255,255,255,0.1); }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: var(--green2); color: #000; display: grid; place-items: center; font-size: 23px; box-shadow: var(--glow-cyan); }

/* =========================================
   5. FORMS, BUTTONS & MODULE CLASSES
========================================= */
.form-control, .form-select {
  border: 1px solid var(--line); padding: 10px 16px; border-radius: var(--radius-sm);
  width: 100%; font-size: 14px; min-height: 42px; background: rgba(0, 0, 0, 0.4);
  color: var(--ink); transition: all var(--transition-base); backdrop-filter: blur(4px);
}
.form-control::placeholder { color: var(--muted); }
.form-control:focus-visible, .form-select:focus-visible, .web3-textarea:focus-visible { outline: none !important; border-color: var(--green2) !important; box-shadow: var(--glow-cyan) !important; color: #fff;}

.web3-input-sm { height: 36px; font-size: 13px; }
.web3-textarea { font-size: 13px; }
.web3-input-disabled { background-color: var(--bg); cursor: not-allowed; }

.btn-erp, .btn-icon, .btn-outline { transition: all var(--transition-base); cursor: pointer; white-space: nowrap !important; text-transform: uppercase; letter-spacing: 0.5px; }
.btn-erp:active, .btn-outline:active { transform: scale(0.95); }

.btn-erp {
  background: var(--green2); color: #000; border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 10px 24px; font-size: 14px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--glow-cyan);
}
.btn-erp:hover { background: #00c3d0; box-shadow: var(--glow-cyan-strong); transform: translateY(-2px); }

.btn-danger {
  background: #b3261e; border-color: #b3261e; color: #fff;
  border-radius: var(--radius-sm); padding: 10px 24px; font-size: 14px; font-weight: 800; display: inline-flex; justify-content: center;
}
.btn-danger:hover { background: #961b15; }

.btn-outline {
  padding: 8px 24px; background: transparent; color: var(--green2); border: 1px solid var(--green2);
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 700;
}
.btn-outline:hover { background: rgba(0, 240, 255, 0.1); box-shadow: var(--glow-cyan); color: var(--green2); }
.btn-outline-sm { height: 34px; padding: 0 16px; }
.btn-outline-xs { padding: 4px 12px; height: 32px; }

.btn-icon {
  background: transparent; border: 1px solid var(--line); color: var(--muted); width: 36px; height: 36px;
  border-radius: var(--radius-sm); display: inline-grid; place-items: center; position: relative;
}
.btn-icon:hover { background: rgba(0, 240, 255, 0.1); color: var(--green2); border-color: var(--green2); box-shadow: var(--glow-cyan); }
.btn-icon-sq { height: 34px; width: 34px; padding: 0; }

.web3-btn-md { height: 36px; padding: 0 20px; }
.pe-none { pointer-events: none; }

/* =========================================
   6. PANELS, MODULES & SEARCH ACCORDIONS
========================================= */
.panel, .web3-panel { background: var(--glass-bg); backdrop-filter: blur(10px); border: var(--glass-border); border-radius: var(--radius-lg); height: 100%; box-shadow: 0 4px 20px rgba(0,0,0,0.5); overflow: hidden;}
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 15px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.panel-title { font-size: 16px; font-weight: 800; margin: 0; text-transform: uppercase; letter-spacing: 1px; color: var(--ink); }

.web3-panel-head { border-color: var(--line) !important; padding: 16px 24px; }
.web3-accordion-head { border-bottom: 1px solid transparent; cursor: pointer; transition: background-color 0.2s; }
.web3-accordion-head:hover { background-color: rgba(255,255,255,0.02); }
.web3-accordion-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease; }
.web3-accordion-body.expanded { grid-template-rows: 1fr; }
.web3-search-collapse { max-width: 0px; opacity: 0; overflow: hidden; transition: all 0.3s ease; }
.web3-search-collapse.expanded { max-width: 250px; opacity: 1; }
.web3-search-input { width: 220px; font-size: 13px; height: 34px; }

/* =========================================
   7. MODALS
========================================= */
.web3-modal-content { border-radius: var(--radius-lg); overflow: hidden; background: var(--glass-bg); backdrop-filter: blur(16px); border: var(--glass-border); }
.web3-modal-header { border-bottom: 1px solid rgba(255,255,255,0.05); padding: 16px 24px; }
.web3-modal-title { font-size: 18px; color: var(--ink); font-weight: bold; display: flex; align-items: center; }
.web3-modal-icon { width: 32px; height: 32px; display: inline-grid; background: rgba(255,255,255,0.05); }
.web3-modal-body { padding: 16px 24px; }
.web3-modal-footer { border-top: 1px solid rgba(255,255,255,0.05); padding: 16px 24px; background: rgba(0,0,0,0.2); }
.web3-help-icon { cursor: pointer; }

/* =========================================
   8. TABLES & EMPTY STATES (Dark Mode Fixes)
========================================= */
.web3-border-top { border-top: 1px solid var(--line); }
.web3-border-bottom { border-bottom: 1px solid var(--line); }
.web3-row-border { border-bottom: 1px solid rgba(255,255,255,0.05); }

.web3-table-wrapper { border-radius: var(--radius-md); border: 1px solid var(--line); overflow: hidden; }
.table-container { max-height: 65vh; overflow-y: auto; overflow-x: auto !important; -webkit-overflow-scrolling: touch; width: 100%; }

.table { --bs-table-bg: transparent; --bs-table-color: var(--ink); --bs-table-border-color: rgba(255,255,255,0.05); margin-bottom: 0; width: 100%; color: var(--ink) !important;}
.table > thead th {
  position: sticky; top: 0; background-color: #0d121c !important; color: var(--muted) !important; 
  font-size: 12px !important; font-weight: 800 !important; z-index: 10; padding: 16px;
}
.web3-th { border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--green2) !important; box-shadow: 0 4px 15px rgba(0, 240, 255, 0.1); white-space: nowrap;}
.web3-td { border-right: 1px solid var(--line) !important; border-bottom: 1px solid rgba(255,255,255,0.05) !important; vertical-align: middle; }

.hover-lift-row { transition: background-color 0.2s ease; cursor: default; }
.hover-lift-row:hover { background-color: rgba(0, 240, 255, 0.05) !important; }

.avatar-empty { width: 72px; height: 72px; font-size: 32px; background: var(--bg); border-radius: 50%; display: grid; place-items: center; }
.avatar-danger-lg { background: #fce8e6; color: #b3261e; width: 64px; height: 64px; font-size: 28px; }

/* =========================================
   9. PAGINATION
========================================= */
.web3-pagination-wrapper { border-top: 1px solid var(--line); margin: 0; padding: 16px 24px; background: rgba(0,0,0,0.2); }
.gap-1 { gap: 4px; }
.web3-page-active { background-color: var(--lime); color: var(--green); border-radius: 6px; font-weight: bold; border: none; }
.web3-page-link { border-radius: 6px; background: transparent; border: none; color: var(--muted); }
.web3-page-link:hover { background: rgba(0, 240, 255, 0.1); color: var(--green2); }

/* =========================================
   10. ALERTS & ALERTS MESSAGES
========================================= */
.web3-alert-success { background-color: rgba(0, 255, 136, 0.1); color: #00ff88; border: none; border-radius: var(--radius-md); }
.web3-alert-danger { background-color: rgba(255, 51, 102, 0.1); color: #ff3366; border: none; border-radius: var(--radius-md); }

/* =========================================
   11. PRINT STYLES
========================================= */
@media print {
  .table-container { max-height: none !important; overflow: visible !important; }
  .printnodisplay, .action-col, .sidebar, .topbar, header, nav { display: none !important; }
  .main, .content, .app { margin: 0 !important; padding: 0 !important; }
  .panel, .border, .web3-table-wrapper { border: none !important; box-shadow: none !important; margin: 0 !important; }
  body { background: #fff; color: #000; }
  .web3-th, .web3-td { border: 1px solid #ccc !important; color: #000 !important; }
  @page { margin: 0.5cm; }
}