/* Frontend Theme Override for Backend */

:root {
  --primary-color: #0047AB !important;
  --secondary-color: #0047AB !important;
}

body {
  font-family: "Roboto", Arial, Helvetica, sans-serif !important;
}

/* Headers */
.dashboard-header,
.page-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e5e7eb !important;
  color: #1f2937 !important;
}

.dashboard-header h1,
.page-header h1 {
  color: #0f172a !important;
}

/* Sidebar */
.sidebar {
  background: #ffffff !important;
  border-right: 1px solid #e5e7eb !important;
}

.sidebar-nav a {
  color: #374151 !important;
}

.sidebar-nav a:hover {
  background: #eff6ff !important;
  color: #0047AB !important;
}

.sidebar-nav a.active {
  background: #0047AB !important;
  color: #ffffff !important;
}

/* Buttons */
.admin-btn,
.btn-primary,
button[type="submit"] {
  background: #0047AB !important;
  color: #ffffff !important;
  border-radius: 0.5rem !important;
}

.admin-btn:hover,
.btn-primary:hover {
  background: #003d8f !important;
}

/* Cards */
.stat-card,
.info-card,
.chart-card,
.data-card {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 0.5rem !important;
}

/* Tables */
table {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
}

table th {
  background: #f8fafc !important;
  color: #374151 !important;
}

/* Inputs */
input,
textarea,
select {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important;
  color: #1f2937 !important;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #0047AB !important;
  box-shadow: 0 0 0 3px rgba(0,71,171,0.1) !important;
}

/* DARK MODE */
body.dark-mode {
  background-color: #0f172a !important;
  color: #e2e8f0 !important;
}

body.dark-mode .dashboard-header,
body.dark-mode .page-header {
  background: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-mode .dashboard-header h1,
body.dark-mode .page-header h1 {
  color: #f1f5f9 !important;
}

body.dark-mode .sidebar {
  background: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-mode .sidebar-nav a {
  color: #cbd5e1 !important;
}

body.dark-mode .sidebar-nav a:hover {
  background: #334155 !important;
  color: #93c5fd !important;
}

body.dark-mode .stat-card,
body.dark-mode .info-card,
body.dark-mode .chart-card,
body.dark-mode .data-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-mode table {
  background: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-mode table th {
  background: #0f172a !important;
  color: #e2e8f0 !important;
}

body.dark-mode table td {
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

/* Dark mode inline white backgrounds */
body.dark-mode div[style*="background: white"],
body.dark-mode div[style*="background:#fff"],
body.dark-mode div[style*="background: #fff"] {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}

body.dark-mode div[style*="background: white"] h3,
body.dark-mode div[style*="background: white"] h4,
body.dark-mode div[style*="background: white"] p,
body.dark-mode div[style*="background:#fff"] h3,
body.dark-mode div[style*="background:#fff"] h4,
body.dark-mode div[style*="background:#fff"] p {
  color: #e2e8f0 !important;
}

/* Login page */
.login-left {
  background: #ffffff !important;
}

.logo-text h1 {
  color: #0f172a !important;
}

.logo-text p {
  color: #0047AB !important;
}

/* Dark mode login */
body.dark-mode .login-left {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-right-color: #334155 !important;
}

body.dark-mode .logo-text h1 {
  color: #f1f5f9 !important;
}

body.dark-mode .logo-text p {
  color: #93c5fd !important;
}

body.dark-mode .login-info {
  background: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-mode .login-info h2,
body.dark-mode .login-info p,
body.dark-mode .login-info li {
  color: #e2e8f0 !important;
}

body.dark-mode .info-box {
  background: #0f172a !important;
}

body.dark-mode .info-box h3,
body.dark-mode .info-box p {
  color: #e2e8f0 !important;
}

/* Flash messages dark mode */
body.dark-mode .flash-warning,
body.dark-mode .flash-info,
body.dark-mode .flash-success,
body.dark-mode .flash-error {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}

/* Filter boxes dark mode */
body.dark-mode .filter-box,
body.dark-mode .search-box,
body.dark-mode .filter-section {
  background: #1e293b !important;
  border-color: #475569 !important;
}

body.dark-mode .filter-box h3,
body.dark-mode .filter-box label,
body.dark-mode .search-box h3 {
  color: #e2e8f0 !important;
}

/* Chart cards dark mode */
body.dark-mode .chart-container,
body.dark-mode .stats-container {
  background: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-mode .chart-container h3,
body.dark-mode .stats-container h3 {
  color: #f1f5f9 !important;
}

/* Admin specific dark mode */
body.dark-mode .admin-sidebar,
body.dark-mode .admin-main,
body.dark-mode .admin-profile-btn {
  background: #1e293b !important;
  border-color: #475569 !important;
}

body.dark-mode .admin-profile-btn:hover {
  background: #334155 !important;
}

/* Dropdowns dark mode */
body.dark-mode .profile-dropdown {
  background: #1e293b !important;
  border-color: #475569 !important;
}

body.dark-mode .profile-dropdown a {
  color: #e2e8f0 !important;
}

body.dark-mode .profile-dropdown a:hover {
  background: #334155 !important;
}
