:root {
  --primary: #4f46e5;
  --primary-light: #6366f1;
  --primary-lighter: #e0e7ff;
  --primary-dark: #3730a3;
  --secondary: #64748b;
  --success: #10b981;
  --success-light: #d1fae5;
  --info: #06b6d4;
  --info-light: #cffafe;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --dark: #0f172a;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.08), 0 8px 10px -6px rgba(0,0,0,.04);
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-xs: 0.375rem;
  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: 72px;
}

/* ===== NAVBAR ===== */
.navbar {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(15, 23, 42, 0.92) !important;
  border-bottom: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  padding: 0.5rem 1rem;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 60%, rgba(255,255,255,.6));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255,255,255,.7);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
  color: #fff;
  background: rgba(255,255,255,.08);
}

.navbar-dark .navbar-nav .nav-link.dropdown-toggle::after {
  opacity: .6;
}

.dropdown-menu {
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-sm);
  padding: 0.375rem;
}

.dropdown-item {
  border-radius: var(--radius-xs);
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  transition: all var(--transition);
}

.dropdown-item:hover {
  background: var(--primary-lighter);
  color: var(--primary-dark);
}

.dropdown-divider {
  margin: 0.25rem 0;
}

/* ===== CARDS ===== */
.card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  background: #fff;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card.border-primary,
.card.border-success,
.card.border-info,
.card.border-warning,
.card.border-danger,
.card.border-secondary {
  border-width: 1px;
  position: relative;
  overflow: hidden;
}

.card.border-primary::before,
.card.border-success::before,
.card.border-info::before,
.card.border-warning::before,
.card.border-danger::before,
.card.border-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.card.border-primary::before { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.card.border-success::before { background: linear-gradient(90deg, #059669, #34d399); }
.card.border-info::before { background: linear-gradient(90deg, #0891b2, #22d3ee); }
.card.border-warning::before { background: linear-gradient(90deg, #d97706, #fbbf24); }
.card.border-danger::before { background: linear-gradient(90deg, #dc2626, #f87171); }
.card.border-secondary::before { background: linear-gradient(90deg, #64748b, #94a3b8); }

.card-body {
  padding: 1.25rem;
}

.card-header {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-weight: 600;
  padding: 0.875rem 1.25rem;
}

.card-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card .material-symbols-outlined {
  opacity: .85;
}

/* Dashboard stat cards hover */
.card.border-primary:hover,
.card.border-success:hover,
.card.border-info:hover,
.card.border-warning:hover,
.card.border-danger:hover,
.card.border-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ===== BUTTONS ===== */
.btn {
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-xs);
}

.btn-close:focus {
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, .25);
}

/* ===== FORMS ===== */
.form-control, .form-select, .input-group-text {
  border-radius: var(--radius-sm);
  border-color: var(--gray-300);
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  transition: all var(--transition);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}

.form-control:disabled, .form-control[readonly] {
  background: var(--gray-100);
  cursor: not-allowed;
}

.form-label {
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--gray-700);
  margin-bottom: 0.375rem;
}

.input-group-text {
  background: var(--gray-100);
  font-weight: 500;
  color: var(--gray-600);
}

/* ===== TABLES ===== */
.table {
  font-size: 0.875rem;
  margin-bottom: 0;
}

.table thead th {
  background: var(--gray-50);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
  border-bottom: 1px solid var(--gray-200);
  padding: 0.75rem;
  vertical-align: middle;
}

.table tbody td {
  padding: 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--gray-100);
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  background: var(--gray-50);
}

.table > :not(:first-child) {
  border-top: none;
}

/* DataTables integration */
.dataTables_wrapper .dataTables_filter input {
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--gray-300) !important;
  padding: 0.375rem 0.75rem !important;
  font-size: 0.875rem !important;
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--primary-light) !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .12) !important;
}

.dataTables_wrapper .dataTables_length select {
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--gray-300) !important;
  padding: 0.25rem 1.5rem 0.25rem 0.5rem !important;
}

.dataTables_wrapper .dataTables_info {
  font-size: 0.8125rem !important;
  color: var(--gray-500) !important;
}

.dataTables_wrapper .dataTables_paginate {
  font-size: 0.8125rem !important;
}

.page-item.active .page-link {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

.page-link {
  color: var(--primary) !important;
  border-radius: var(--radius-xs) !important;
  margin: 0 1px !important;
}

/* ===== BADGES ===== */
.badge {
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.3em 0.65em;
}

.badge.fs-6 {
  font-size: 0.8125rem !important;
}

/* ===== ALERTS ===== */
.alert {
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.alert-success {
  background: var(--success-light);
  color: #065f46;
}

.alert-danger {
  background: var(--danger-light);
  color: #991b1b;
}

.alert-warning {
  background: var(--warning-light);
  color: #92400e;
}

/* ===== MODALS ===== */
.modal-content {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
}

.modal-header {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1rem 1.25rem;
}

.modal-header .modal-title {
  font-weight: 600;
  font-size: 1rem;
}

.modal-body {
  padding: 1.25rem;
}

.modal-footer {
  border-top: 1px solid var(--gray-200);
  padding: 0.875rem 1.25rem;
}

.modal.fade .modal-dialog {
  transform: scale(0.95) translateY(-10px);
  transition: transform 200ms ease-out;
}

.modal.show .modal-dialog {
  transform: scale(1) translateY(0);
}

/* ===== TABS ===== */
.nav-tabs {
  border-bottom: 1px solid var(--gray-200);
  gap: 0.25rem;
}

.nav-tabs .nav-link {
  border: none;
  color: var(--gray-500);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: all var(--transition);
}

.nav-tabs .nav-link:hover {
  color: var(--gray-700);
  background: var(--gray-100);
}

.nav-tabs .nav-link.active {
  color: var(--primary);
  background: transparent;
  box-shadow: inset 0 -2px 0 var(--primary);
}

.tab-content {
  background: #fff;
  border: 1px solid var(--gray-200) !important;
  border-top: none !important;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 1.25rem;
}

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.5);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  animation: loginFadeIn 0.5s ease-out;
}

.login-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  text-align: center;
  margin-bottom: 0.25rem;
}

.login-card .login-subtitle {
  font-size: 0.875rem;
  color: var(--gray-500);
  text-align: center;
  margin-bottom: 2rem;
}

.login-card .form-control {
  padding: 0.625rem 0.875rem;
}

.login-card .btn {
  padding: 0.625rem 1rem;
  width: 100%;
}

.login-card .form-label {
  font-size: 0.8125rem;
}

@keyframes loginFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== SPINNER ===== */
.spinner-border {
  color: var(--primary) !important;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.7);
  cursor: pointer;
  transition: all var(--transition);
  margin-right: 0.5rem;
}

.theme-toggle:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
}

.theme-toggle .material-symbols-outlined {
  font-size: 1.25rem;
}

/* ===== NOTIFICATIONS ===== */
.notification-unread {
  background: var(--gray-50);
}

.notification-link {
  color: var(--gray-800);
  font-weight: 500;
}
.notification-link:hover {
  color: var(--primary);
}

/* ===== DARK MODE ===== */
[data-bs-theme="dark"] body {
  background: #0b1120;
  color: #e2e8f0;
}

[data-bs-theme="dark"] .navbar {
  background: rgba(11, 17, 32, 0.95) !important;
  border-bottom-color: rgba(255,255,255,.05);
}

[data-bs-theme="dark"] .dropdown-menu {
  background: #1e293b;
  border-color: #334155;
}

[data-bs-theme="dark"] .dropdown-item {
  color: #cbd5e1;
}

[data-bs-theme="dark"] .dropdown-item:hover {
  background: rgba(79, 70, 229, .15);
  color: #a5b4fc;
}

[data-bs-theme="dark"] .card {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

[data-bs-theme="dark"] .card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}

[data-bs-theme="dark"] .card-header {
  background: #1a2332;
  border-bottom-color: #334155;
}

[data-bs-theme="dark"] .card.border-primary,
[data-bs-theme="dark"] .card.border-success,
[data-bs-theme="dark"] .card.border-info,
[data-bs-theme="dark"] .card.border-warning,
[data-bs-theme="dark"] .card.border-danger,
[data-bs-theme="dark"] .card.border-secondary {
  border-color: #334155;
}

[data-bs-theme="dark"] .card-subtitle {
  color: #64748b !important;
}

[data-bs-theme="dark"] .table {
  color: #e2e8f0;
}

[data-bs-theme="dark"] .table thead th {
  background: #1a2332;
  color: #94a3b8;
  border-bottom-color: #334155;
}

[data-bs-theme="dark"] .table tbody td {
  border-bottom-color: #1e293b;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
  background: rgba(255,255,255,.02);
}

[data-bs-theme="dark"] .table > :not(caption) > * > * {
  border-bottom-color: #334155;
}

[data-bs-theme="dark"] .table-bordered > :not(caption) > * {
  border-color: #334155;
}

[data-bs-theme="dark"] .modal-content {
  background: #1e293b;
}

[data-bs-theme="dark"] .modal-header {
  background: #1a2332;
  border-bottom-color: #334155;
}

[data-bs-theme="dark"] .modal-footer {
  border-top-color: #334155;
}

[data-bs-theme="dark"] .tab-content {
  background: #1e293b;
  border-color: #334155 !important;
}

[data-bs-theme="dark"] .nav-tabs {
  border-bottom-color: #334155;
}

[data-bs-theme="dark"] .nav-tabs .nav-link {
  color: #64748b;
}

[data-bs-theme="dark"] .nav-tabs .nav-link:hover {
  color: #e2e8f0;
  background: rgba(255,255,255,.04);
}

[data-bs-theme="dark"] .nav-tabs .nav-link.active {
  color: #818cf8;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .15);
}

[data-bs-theme="dark"] .form-control:disabled,
[data-bs-theme="dark"] .form-control[readonly] {
  background: #1a2332;
}

[data-bs-theme="dark"] .form-label {
  color: #cbd5e1;
}

[data-bs-theme="dark"] .input-group-text {
  background: #1a2332;
  border-color: #334155;
  color: #94a3b8;
}

[data-bs-theme="dark"] .alert-success {
  background: rgba(16, 185, 129, .12);
  color: #6ee7b7;
}

[data-bs-theme="dark"] .alert-danger {
  background: rgba(239, 68, 68, .12);
  color: #fca5a5;
}

[data-bs-theme="dark"] .alert-warning {
  background: rgba(245, 158, 11, .12);
  color: #fcd34d;
}

[data-bs-theme="dark"] .btn:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

[data-bs-theme="dark"] .page-link {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}

[data-bs-theme="dark"] .page-item.active .page-link {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

[data-bs-theme="dark"] .page-item.disabled .page-link {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #475569 !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_info {
  color: #64748b !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length select {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .table-hover > tbody > tr:hover > * {
  background: rgba(255,255,255,.04);
  color: #e2e8f0;
}

[data-bs-theme="dark"] .table-primary { background: rgba(79,70,229,.15); color: #c7d2fe; }
[data-bs-theme="dark"] .table-secondary { background: rgba(100,116,139,.15); color: #cbd5e1; }
[data-bs-theme="dark"] .table-success { background: rgba(16,185,129,.15); color: #a7f3d0; }
[data-bs-theme="dark"] .table-danger { background: rgba(239,68,68,.15); color: #fecaca; }
[data-bs-theme="dark"] .table-warning { background: rgba(245,158,11,.15); color: #fde68a; }
[data-bs-theme="dark"] .table-info { background: rgba(6,182,212,.15); color: #a5f3fc; }

[data-bs-theme="dark"] .table-bordered th,
[data-bs-theme="dark"] .table-bordered td {
  border-color: #334155;
}

[data-bs-theme="dark"] .table > thead {
  border-bottom: 2px solid #334155;
}

[data-bs-theme="dark"] .btn-close {
  filter: invert(1) brightness(200%);
}

[data-bs-theme="dark"] .progress {
  background: #1a2332;
}

[data-bs-theme="dark"] .list-group-item {
  background: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}

[data-bs-theme="dark"] .list-group-item-action:hover {
  background: rgba(255,255,255,.04);
  color: #f1f5f9;
}

[data-bs-theme="dark"] .list-group-item.active {
  background: var(--primary);
  border-color: var(--primary);
}

[data-bs-theme="dark"] .modal-backdrop.show {
  opacity: .7;
}

[data-bs-theme="dark"] .text-dark {
  color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .text-muted {
  color: #94a3b8 !important;
}

[data-bs-theme="dark"] .bg-light {
  background: #1a2332 !important;
}

[data-bs-theme="dark"] .bg-white {
  background: #1e293b !important;
}

[data-bs-theme="dark"] .navbar-dark.bg-dark {
  background: rgba(11,17,32,.95) !important;
}

[data-bs-theme="dark"] .bg-warning.text-dark {
  color: #0f172a !important;
}

[data-bs-theme="dark"] .badge.bg-warning {
  color: #0f172a !important;
}

[data-bs-theme="dark"] .badge.bg-info {
  color: #0f172a !important;
}

[data-bs-theme="dark"] .text-danger {
  color: #fca5a5 !important;
}

[data-bs-theme="dark"] .card-header.bg-danger.text-white {
  background: rgba(239,68,68,.15) !important;
  color: #fca5a5 !important;
  border-bottom: 1px solid #334155;
}

[data-bs-theme="dark"] .card-header.bg-warning.text-dark {
  background: rgba(245,158,11,.15) !important;
  color: #fde68a !important;
  border-bottom: 1px solid #334155;
}

[data-bs-theme="dark"] .login-card {
  background: #1e293b;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.7);
}

[data-bs-theme="dark"] .login-card h1 {
  color: #f1f5f9;
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6 {
  color: #f1f5f9;
}

[data-bs-theme="dark"] code {
  background: #1a2332;
  color: #fca5a5;
}

[data-bs-theme="dark"] a:not(.btn):not(.nav-link):not(.dropdown-item):not(.page-link) {
  color: #818cf8;
}

[data-bs-theme="dark"] a:not(.btn):not(.nav-link):not(.dropdown-item):not(.page-link):hover {
  color: #a5b4fc;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #334155;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

[data-bs-theme="dark"] .notification-unread {
  background: rgba(255,255,255,.04) !important;
}

[data-bs-theme="dark"] .notification-link {
  color: #e2e8f0 !important;
}
[data-bs-theme="dark"] .notification-link:hover {
  color: #a5b4fc !important;
}

[data-bs-theme="dark"] .dropdown-item.border-bottom {
  border-bottom-color: #334155 !important;
}

[data-bs-theme="dark"] .dropdown-menu .text-muted {
  color: #64748b !important;
}

[data-bs-theme="dark"] .btn-outline-secondary {
  color: #94a3b8;
  border-color: #334155;
}
[data-bs-theme="dark"] .btn-outline-secondary:hover {
  background: rgba(255,255,255,.08);
  color: #e2e8f0;
  border-color: #475569;
}

[data-bs-theme="dark"] .btn-outline-info {
  color: #67e8f9;
  border-color: rgba(6,182,212,.4);
}
[data-bs-theme="dark"] .btn-outline-info:hover {
  background: rgba(6,182,212,.15);
  color: #a5f3fc;
  border-color: #06b6d4;
}

[data-bs-theme="dark"] pre {
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: var(--radius-xs);
  padding: 0.5rem;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button {
  color: #94a3b8 !important;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  color: #e2e8f0 !important;
  background: rgba(255,255,255,.05) !important;
  border-color: #334155 !important;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

/* ===== UTILITIES ===== */
h1 {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--gray-900);
}

h2, h3, h4, h5, h6 {
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--gray-900);
}

code {
  background: var(--gray-100);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-xs);
  font-size: 0.8125rem;
  color: var(--danger);
}

a:not(.btn):not(.nav-link):not(.dropdown-item):not(.page-link) {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition);
}

a:not(.btn):not(.nav-link):not(.dropdown-item):not(.page-link):hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* HTMX fade-in for dynamic content */
.htmx-added {
  animation: fadeIn 0.3s ease-out;
}

/* Flex columns that auto-fill: equal width when multiple present, 100% when alone */
.col-auto-fill {
  flex: 1 0 0;
  min-width: 280px;
}
.col-auto-fill:empty {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive containers */
@media (max-width: 768px) {
  .card-body {
    padding: 1rem;
  }
  .login-card {
    padding: 1.5rem;
  }
}
