/* Dark Corporate Theme - Inverse of clean white theme */
:root {
  /* Dark Corporate Colors */
  --primary-green: #3385D6;
  /* Light blue for dark mode */
  --primary-green-dark: #5599DD;
  /* Brighter blue */
  --primary-green-light: #6BAAE0;
  /* Very light blue */
  --forest-emerald: #40A0FF;
  /* Bright accent blue */
  --sage-green: #5599DD;
  /* Medium blue */

  /* Dark Mode Accents */
  --secondary-blue: #33B5E5;
  /* Bright cyan */
  --secondary-blue-dark: #00A3E0;
  /* Vibrant cyan */
  --secondary-blue-light: #66CCF5;
  /* Light cyan */
  --powder-blue: #99D6F0;
  /* Powder blue */
  --steel-blue: #33B5E5;
  /* Steel cyan */

  /* Dark Accents */
  --accent-earth: #FF8C69;
  /* Light coral */
  --accent-sunrise: #B36500;
  /* Darker orange */
  --accent-mist: #1A1D23;
  /* Deep dark blue */

  /* Dark Grays - Inverted */
  --white: #E8E9EB;
  /* Off-white for text */
  --cloud-white: #F5F5F5;
  --mist-white: #EEEEEE;
  --gray-50: #1A1D23;
  /* Very dark */
  --gray-100: #22252C;
  /* Dark */
  --gray-200: #2C2F36;
  /* Medium dark */
  --gray-300: #383C45;
  /* Medium */
  --gray-400: #757575;
  /* Medium gray */
  --gray-500: #9E9E9E;
  /* Light gray */
  --gray-600: #B8B9BC;
  /* Lighter gray */
  --gray-700: #D0D1D4;
  /* Very light */
  --gray-800: #E0E1E3;
  /* Almost white */
  --gray-900: #E8E9EB;
  /* Off-white for body text */

  /* Dark mode semantic colors */
  --success: #4CAF50;
  /* Light green */
  --success-light: #1B5E20;
  /* Dark green background */
  --warning: #FFB300;
  /* Light amber */
  --warning-light: #E65100;
  /* Dark orange background */
  --error: #EF5350;
  /* Light red */
  --error-light: #C62828;
  /* Dark red background */
  --info: #29B6F6;
  /* Light teal */
  --info-light: #01579B;
  /* Dark blue background */

  /* Dark corporate glassmorphism */
  --glass-bg: rgba(26, 29, 35, 0.95);
  /* Dark translucent */
  --glass-bg-light: rgba(34, 37, 44, 0.95);
  /* Slightly lighter dark */
  --glass-bg-modal: rgba(26, 29, 35, 0.98);
  /* More opaque for modals */
  --glass-bg-dark: rgba(0, 0, 0, 0.3);
  /* Darker overlay */
  --glass-border: rgba(51, 133, 214, 0.75);
  /* Light blue border - significantly brightened for visibility */
  --glass-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  /* Strong shadow */
  --glass-backdrop: blur(8px);
}

body,
.bg-nature {
  background: linear-gradient(135deg, #1A1D23 0%, #22252C 50%, #2C2F36 100%);
  color: #E8E9EB;
}

html {
  background-color: #1A1D23;
}

/* Dark corporate text overrides */
body,
.glass-card,
.glass-nav,
.navbar,
.card,
.card-body,
h1, h2, h3, h4, h5, h6,
p, span, div, li, a {
  color: #E8E9EB !important;
}

/* Table cells need very light grey, not the global text color */
table td,
table th,
.table td,
.table th {
  color: #E8E8E8 !important;
}

.text-muted {
  color: #B8B9BC !important;
}

/* Navigation - Blue background for logo visibility (overrides dark theme) */
.navbar,
.glass-nav {
  background: rgba(6, 147, 227, 0.95) !important;
  /* Blue background #0693e3 */
  border-bottom: 1px solid rgba(6, 147, 227, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.navbar-brand,
.nav-link {
  color: #FFFFFF !important;
  /* White text for blue navbar */
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: #FFFFFF !important;
}

.nav-link.active {
  background-color: #1B4D2A !important;
  color: #FFFFFF !important;
}

/* Dark cards and containers */
.glass-card {
  background-color: rgba(34, 37, 44, 0.9) !important;
  border: 1px solid rgba(51, 133, 214, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Form inputs in dark mode */
.glass-input,
.form-control {
  background-color: rgba(44, 47, 54, 0.8);
  border: 1px solid rgba(51, 133, 214, 0.3);
  color: #E8E9EB !important;
}

.glass-input:focus,
.form-control:focus {
  border-color: #3385D6;
  box-shadow: 0 0 0 0.2rem rgba(51, 133, 214, 0.25);
  background-color: rgba(44, 47, 54, 0.95);
}

.glass-input::placeholder,
.form-control::placeholder {
  color: rgba(158, 158, 158, 0.7) !important;
}

/* Buttons in dark mode */
.btn,
.glass-button {
  border: 1px solid rgba(51, 133, 214, 0.4);
}

.btn-primary,
.btn-success {
  background-color: #3385D6 !important;
  border-color: #3385D6 !important;
  color: #FFFFFF !important;
}

.btn-primary:hover {
  background-color: #5599DD !important;
  border-color: #5599DD !important;
}

/* Navigation - removed duplicate rule (navbar uses light green from above) */

/* Tables in dark mode - Maximum specificity to override all other styles */
table, .table {
  color: #E8E8E8 !important;
  background-color: #22252C !important;
}

table thead, .table thead {
  background-color: #1A1D23 !important;
  color: #E8E8E8 !important;
}

table thead th, .table thead th {
  border-color: #383C45 !important;
  color: #E8E8E8 !important;
  background-color: #1A1D23 !important;
}

table thead th i, .table thead th i,
table thead th .bi, .table thead th .bi,
table thead th span, .table thead th span {
  color: #E8E8E8 !important;
}

.glass-card table thead th,
.glass-card .table thead th {
  color: #E8E8E8 !important;
}

.glass-card table thead th i,
.glass-card table thead th .bi,
.glass-card table thead th span,
.glass-card .table thead th i,
.glass-card .table thead th .bi,
.glass-card .table thead th span {
  color: #E8E8E8 !important;
}

table tbody tr, .table tbody tr {
  background-color: #22252C !important;
  border-bottom: 1px solid #383C45 !important;
}

table tbody tr:hover, .table tbody tr:hover {
  background-color: #2C2F36 !important;
}

table tbody td, .table tbody td {
  color: #E8E8E8 !important;
  border-color: #383C45 !important;
  background-color: #22252C !important;
}

table tbody td strong, .table tbody td strong,
table tbody td a, .table tbody td a,
table tbody td span, .table tbody td span,
table tbody td div, .table tbody td div {
  color: #E8E8E8 !important;
}

/* Override any black text in table cells */
table tbody td :not(.badge):not(.btn),
.table tbody td :not(.badge):not(.btn) {
  color: #E8E8E8 !important;
}

table tbody tr:hover td, .table tbody tr:hover td {
  background-color: #2C2F36 !important;
  color: #E8E8E8 !important;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: #1A1D23 !important;
}

.table-striped tbody tr:nth-of-type(odd):hover {
  background-color: #2C2F36 !important;
}

/* Override glass-card table styles to use light grey text */
.glass-card table, .glass-card .table {
  color: #E8E8E8 !important;
}

.glass-card table tbody td,
.glass-card .table tbody td {
  color: #E8E8E8 !important;
  background-color: #22252C !important;
}

.glass-card table tbody td strong,
.glass-card table tbody td a,
.glass-card table tbody td span,
.glass-card table tbody td div,
.glass-card .table tbody td strong,
.glass-card .table tbody td a,
.glass-card .table tbody td span,
.glass-card .table tbody td div {
  color: #E8E8E8 !important;
}

.glass-card table tbody tr:hover td,
.glass-card .table tbody tr:hover td {
  color: #E8E8E8 !important;
  background-color: #2C2F36 !important;
}

/* Dropdown menus in dark mode */
.dropdown-menu {
  background-color: rgba(34, 37, 44, 0.98);
  border: 1px solid rgba(51, 133, 214, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.dropdown-item {
  color: #E8E9EB !important;
}

.dropdown-item:hover {
  background-color: rgba(51, 133, 214, 0.2);
  color: #3385D6 !important;
}

/* Alerts and Flash messages in dark mode */
.alert {
  color: #E8E9EB !important;
  font-weight: 500;
  background-color: rgba(44, 47, 54, 0.9) !important;
  border-color: rgba(51, 133, 214, 0.3);
}

.alert-success {
  background-color: rgba(27, 94, 32, 0.9) !important;
  border-color: #4CAF50;
  color: #E8E9EB !important;
}

.alert-danger,
.alert-error {
  background-color: rgba(198, 40, 40, 0.9) !important;
  border-color: #EF5350;
  color: #E8E9EB !important;
}

.alert-warning {
  background-color: rgba(230, 81, 0, 0.9) !important;
  border-color: #FFB300;
  color: #E8E9EB !important;
}

.alert-info {
  background-color: rgba(1, 87, 155, 0.9) !important;
  border-color: #29B6F6;
  color: #E8E9EB !important;
}

/* Modal dialogs in dark mode */
.modal-content {
  background-color: rgba(26, 29, 35, 0.98);
  color: #E8E9EB;
  border: 1px solid rgba(51, 133, 214, 0.25);
}

.modal-header,
.modal-footer {
  border-color: rgba(51, 133, 214, 0.2);
}

.modal-title {
  color: #E8E9EB;
}

/* Make form helper text brighter */
.form-text.text-muted,
small.form-text.text-muted {
  color: rgba(255, 255, 255, 0.8) !important;
}
