:root {
  --bg-primary: #000000;
  --bg-secondary: #121212;
  --bg-accent: #262626;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --accent: #4f46e5;
  --accent-hover: #6366f1;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --neon-blue: #00d9ff;
  --neon-green: #39ff14;
  --neon-purple: #bf00ff;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: auto;
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: transparent !important;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-accent);
  border-radius: 10px;
  border: none !important;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--bg-accent);
}

.btn-primary {
  background-color: var(--accent);
  color: white;
  transition: all 0.3s;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--bg-accent);
  transition: all 0.3s;
}

.btn-secondary:hover {
  background-color: var(--bg-accent);
  box-shadow: 0 0 10px rgba(148, 163, 184, 0.3);
}

.btn-danger {
  background-color: var(--error);
  color: white;
  transition: all 0.3s;
}

.btn-danger:hover {
  background-color: #f87171;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.card {
  background-color: var(--bg-secondary);
  border-radius: 0.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.sidebar-item {
  transition: all 0.3s;
  color: var(--text-secondary);
}

.sidebar-item:hover {
  background-color: var(--bg-accent);
  color: var(--text-primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.neon-border {
  border: 1px solid var(--neon-blue);
  box-shadow: 0 0 10px var(--neon-blue), inset 0 0 5px var(--neon-blue);
}

.neon-text {
  text-shadow: 0 0 5px currentColor, 0 0 10px currentColor;
}

.tab-button {
  transition: all 0.3s ease;
}

.tab-button.active {
  color: white;
  border-color: #6366f1 !important;
}

.input-dark {
  background-color: #121212 !important;
  border: 1px solid #262626 !important;
  color: var(--text-primary);
  transition: all 0.3s;
}

.input-dark:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.table-dark {
  background-color: var(--bg-secondary);
}

.table-dark th {
  background-color: #1a2435;
  color: var(--text-primary);
}

.table-dark td {
  border-color: #2d3748;
  color: var(--text-secondary);
}

tr:hover {
  background-color: var(--bg-accent) !important;
}

.glow-effect {
  animation: pulseGlow 3s infinite;
}

.light-mode {
  display: none !important;
}

.dark-mode {
  display: block !important;
}

nav a {
  background-color: transparent !important;
  color: white !important;
}

.active {
  background: var(--bg-accent) !important;
}

@media(min-width:768px) {
  section {
    height: 300px !important;
  }

  #sidebar-toggle {
    display: none !important;
  }
}

input[type="date"] {
  color: rgb(252, 252, 252) !important;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.8;
}

input[type="date"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M20 10V7a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v3m16 0V19a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-9m16 0H4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 30px;
}

/* Force pure black background across the system */
html,
body,
#app,
#auth-screen,
.bg-gray-900,
.bg-slate-900,
.bg-black {
  background-color: #000000 !important;
}

/* Make headers and cards slightly stand out if they were bg-gray-800 */
.bg-gray-800,
.bg-slate-800 {
  background-color: #121212 !important;
  border-color: #262626 !important;
}

.border-gray-700,
.border-slate-700 {
  border-color: #262626 !important;
}

/* Auth split screen mobile overrides */
@media (max-width: 767px) {
  #auth-welcome-message,
  #register-welcome-message {
    display: none !important;
  }
  #auth-left-section {
    background: #0a0a0a !important;
  }
  #auth-left-section,
  #auth-right-section {
    width: 100% !important;
    border: none !important;
    padding: 1.5rem !important;
  }
}

/* Style select dropdown options for dark theme */
select option {
  background-color: #0a0a0a !important;
  color: #e2e8f0 !important;
}

/* Premium corporate styling for table headers */
th, 
thead th, 
.table-dark th {
  background-color: #0e0e11 !important;
  color: #818cf8 !important; /* Premium Indigo Accent */
  border-bottom: 2px solid #1f1f23 !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.05em !important;
}

/* Button Loading Spinner */
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.75;
}

.btn-loading .btn-text {
  visibility: hidden;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.2em;
  height: 1.2em;
  margin-top: -0.6em;
  margin-left: -0.6em;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}