/* ============================
   TxMoving Admin - Custom CSS
   ============================ */

:root {
  --sidebar-bg: #ffffff;
  --sidebar-width: 240px;
  --header-height: 62px;
  --sidebar-hover: #f1f5f9;
  --sidebar-active: #2563eb;
  --brand-color: #2563eb;
  --text-sidebar: #4b5563;
  --text-sidebar-label: #9ca3af;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
}

* { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f1f5f9;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.header-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #1e293b;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  max-width: 420px;
}

.header-brand-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1e293b;
}

.header-brand-icon {
  font-size: 1.6rem;
  color: var(--brand-color);
  flex-shrink: 0;
}

.sidebar-nav {
  padding: 12px 0 16px;
  flex: 1;
}

.nav-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-sidebar-label);
  padding: 12px 20px 6px;
  font-weight: 700;
}

.sidebar-nav .nav-item {
  margin: 2px 10px;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  color: var(--text-sidebar);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.sidebar-nav .nav-link:hover {
  background: var(--sidebar-hover);
  color: #1e293b;
}

.sidebar-nav .nav-link.active {
  background: var(--sidebar-active);
  color: #fff;
  font-weight: 600;
}

.sidebar-nav .nav-link.active .nav-icon {
  color: #fff;
}

.nav-icon {
  font-size: 1.15rem;
  margin-right: 10px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  color: #6b7280;
  transition: color 0.15s;
}

.sidebar-nav .nav-link:hover .nav-icon {
  color: var(--sidebar-active);
}

/* ===== HEADER ===== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* ===== MAIN WRAPPER ===== */
.main-wrapper {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sidebar-toggle {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  border-radius: 6px;
  color: #374151 !important;
  display: none;
}

.header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #64748b;
  text-decoration: none;
  font-size: 1.25rem;
  transition: background 0.15s, color 0.15s;
  position: relative;
}

.header-icon-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #ef4444;
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.header-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #1e293b;
  text-decoration: none;
  transition: background 0.15s;
}

.header-user-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
}

.user-avatar-default {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #dbeafe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--sidebar-active);
  border: 2px solid #bfdbfe;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.2;
}

.user-role {
  font-size: 0.7rem;
  color: #64748b;
  line-height: 1;
}

/* ===== NOTIFICATION DROPDOWN ===== */
.notification-dropdown {
  width: 340px;
  max-height: 450px;
  overflow-y: auto;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12) !important;
  border-radius: 12px !important;
}

.notif-list .notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.15s;
}

.notif-list .notif-item:hover { background: #f8f9fa; }
.notif-item.unread { background: #f0f7ff; }

/* ===== PAGE CONTENT ===== */
.page-content {
  flex: 1;
  padding: 24px;
}

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.page-subtitle {
  font-size: 0.82rem;
  color: #64748b;
  margin: 2px 0 0;
}

/* ===== STAT CARDS ===== */
.stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid #f0f4f8;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.09);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon.blue   { background: #dbeafe; color: #2563eb; }
.stat-icon.green  { background: #dcfce7; color: #16a34a; }
.stat-icon.orange { background: #ffedd5; color: #ea580c; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-icon.teal   { background: #ccfbf1; color: #0d9488; }

.stat-info {
  flex: 1;
  min-width: 0;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.stat-sparkline {
  flex-shrink: 0;
  width: 80px;
  height: 38px;
  opacity: 0.75;
}

/* ===== CARDS ===== */
.card {
  border: 1px solid #e8edf3 !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
  background: #fff;
}

.card-header {
  background: #fff !important;
  border-bottom: 1px solid #f0f4f8 !important;
  padding: 16px 20px !important;
  border-radius: 14px 14px 0 0 !important;
  font-weight: 600;
  font-size: 0.9rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-body { padding: 20px; }

/* ===== WELCOME BANNER ===== */
.welcome-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%);
  color: white;
  border-radius: 14px;
  padding: 22px 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.welcome-card::after {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 140px;
  height: 140px;
  background: rgba(255,255,255,0.07);
  border-radius: 50%;
}

.welcome-card h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.welcome-card p {
  font-size: 0.875rem;
  opacity: 0.85;
  margin: 0;
}

/* ===== TABLES ===== */
.table th {
  background: #f8fafc;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
  border-bottom: 2px solid #e2e8f0 !important;
  padding: 11px 16px;
  white-space: nowrap;
}

.table td {
  padding: 12px 16px;
  vertical-align: middle;
  color: #1e293b;
  font-size: 0.875rem;
  border-bottom: 1px solid #f1f5f9 !important;
}

.table tbody tr:hover { background: #f8fafc; }
.table { border: none !important; }

/* ===== BADGES ===== */
.badge-status {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-new       { background: #dbeafe; color: #1d4ed8; }
.badge-inprocess { background: #fff7ed; color: #c2410c; }
.badge-confirmed { background: #dcfce7; color: #15803d; }
.badge-completed { background: #f3e8ff; color: #7e22ce; }

/* ===== FORMS ===== */
.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
}

.form-control, .form-select {
  border-radius: 8px;
  border: 1.5px solid #d1d5db;
  padding: 8px 13px;
  font-size: 0.875rem;
  color: #1e293b;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--sidebar-active);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
  outline: none;
}

/* ===== BUTTONS ===== */
.btn {
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 8px 16px;
  transition: all 0.18s;
}

.btn-primary {
  background: var(--sidebar-active) !important;
  border-color: var(--sidebar-active) !important;
  color: #fff !important;
}

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

.btn-sm {
  padding: 5px 11px;
  font-size: 0.8rem;
}

/* ===== ALERTS ===== */
.alert {
  border-radius: 10px;
  border: none;
  padding: 12px 16px;
  font-size: 0.875rem;
}

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  background: #fff;
}

.login-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #fff;
}

.login-right {
  width: 45%;
  background: linear-gradient(160deg, #1e3a8a 0%, #2563eb 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  color: white;
}

.login-form-box {
  width: 100%;
  max-width: 420px;
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.login-logo i {
  font-size: 2.5rem;
  color: var(--sidebar-active);
}

.login-logo-text {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--sidebar-active);
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 32px;
}

.feature-card {
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
}

.feature-card h5 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.feature-card p  { font-size: 0.85rem; opacity: 0.85; margin: 0; }

/* ===== CALENDAR PAGE ===== */
#calendar { background: white; border-radius: 12px; padding: 16px; }

/* ===== PROFILE PAGE ===== */
.profile-photo-container { position: relative; display: inline-block; }

.profile-photo {
  width: 120px; height: 120px; border-radius: 50%;
  object-fit: cover; border: 4px solid #e2e8f0;
}

.profile-photo-placeholder {
  width: 120px; height: 120px; border-radius: 50%;
  background: var(--sidebar-active);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: rgba(255,255,255,0.8); border: 4px solid #e2e8f0;
}

/* ===== CALCULATOR ===== */
.calc-result-box {
  background: linear-gradient(135deg, #1e3a8a, var(--sidebar-active));
  color: white; border-radius: 12px; padding: 24px; text-align: center;
}
.calc-result-box .result-label { font-size: 0.85rem; opacity: 0.75; margin-bottom: 4px; }
.calc-result-box .result-value { font-size: 2rem; font-weight: 700; }

/* ===== SIDEBAR OVERLAY ===== */
.sidebar-overlay {
  display: none; position: fixed; top: 0; left: 0;
  width: 100%; height: 100%; background: rgba(0,0,0,0.4); z-index: 999;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1280px) and (min-width: 992px) {
  :root { --sidebar-width: 220px; }
  .header-brand-link { max-width: 280px; }
  .page-content { padding: 18px; }
}

@media (max-width: 1100px) and (min-width: 992px) {
  :root { --sidebar-width: 200px; }
  .sidebar-nav .nav-link { font-size: 0.82rem; padding: 9px 10px; }
  .header-brand-link { max-width: 200px; }
  .header-brand-link img { height: 30px !important; width: 30px !important; }
}

@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); width: 260px; }
  .sidebar.show { transform: translateX(0); }
  .sidebar-overlay.show { display: block; }
  .main-wrapper { margin-left: 0; }
  .sidebar-toggle { display: flex !important; }
  .login-right { display: none; }
  .login-left { padding: 24px; }
  .header-brand-link { max-width: 55vw; }
  .page-content { padding: 16px; }
  .col-xl-8, .col-xl-4 { width: 100%; }
}

@media (max-width: 576px) {
  .page-content { padding: 12px; }
  .stat-number { font-size: 1.5rem; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .page-header .btn { width: 100%; }
  .header-brand-name { max-width: 40vw; }
  .est-page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .stat-sparkline { display: none; }
}

.main-wrapper { overflow-x: hidden; }
.page-content { overflow-x: hidden; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ===== DATATABLES OVERRIDES ===== */
.dataTables_wrapper .dataTables_filter input {
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.875rem;
}

.dataTables_wrapper .dataTables_length label {
  display: flex; align-items: center; gap: 6px; margin-bottom: 0; white-space: nowrap;
}
.dataTables_wrapper .dataTables_length select {
  display: inline-block !important; width: auto !important;
  border: 1.5px solid #d1d5db; border-radius: 8px; padding: 4px 28px 4px 8px;
}

/* ===== ACTION BUTTONS ===== */
.action-btns { display: flex; gap: 6px; align-items: center; }

.action-btns .btn {
  width: 32px; height: 32px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 0.95rem;
  transition: all 0.15s ease; border-width: 1.5px;
}

.action-btns .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

/* ===== JOB ORDER ===== */
.job-order-badge {
  font-family: monospace;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--sidebar-active);
}

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 60px 20px; color: #94a3b8; }
.empty-state i { font-size: 4rem; margin-bottom: 16px; display: block; }
.empty-state h5 { font-size: 1rem; font-weight: 600; color: #64748b; margin-bottom: 8px; }

/* ===== 404 page ===== */
.error-page {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; background: #f1f5f9;
}

/* ===== SCROLLBARS ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 4px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ===== DARK MODE ===== */
body.dark-mode {
  background: #0f1117;
  color: #e2e8f0;
}
body.dark-mode .main-wrapper,
body.dark-mode .page-content { background: #0f1117; }

/* Scrollbars */
body.dark-mode ::-webkit-scrollbar-track { background: #0d1117; }
body.dark-mode ::-webkit-scrollbar-thumb { background: #2d3748; border-radius: 4px; }
body.dark-mode ::-webkit-scrollbar-thumb:hover { background: #4a5568; }
body.dark-mode { scrollbar-color: #2d3748 #0d1117; scrollbar-width: thin; }

/* Sidebar + header */
body.dark-mode .sidebar {
  background: #0d1117;
  border-right: 1px solid #1e2535;
}
body.dark-mode .main-header {
  background: #0d1117;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  border-bottom: 1px solid #1e2535;
}
body.dark-mode .header-brand-link { color: #e2e8f0; }
body.dark-mode .header-brand-name { color: #e2e8f0; }
body.dark-mode .header-brand-icon { color: #00e676; }
body.dark-mode .header-icon-btn { color: #94a3b8; }
body.dark-mode .header-icon-btn:hover { color: #e2e8f0; background: #1e2535; }
body.dark-mode .header-user-btn { color: #94a3b8; }
body.dark-mode .user-name { color: #e2e8f0; }
body.dark-mode .user-role { color: #64748b; }
body.dark-mode .sidebar-toggle { color: #94a3b8 !important; }
body.dark-mode .sidebar-toggle:hover { color: #e2e8f0 !important; }
body.dark-mode .nav-label { color: #475569; }
body.dark-mode .nav-icon { color: #64748b; }
body.dark-mode .sidebar-nav .nav-link { color: #94a3b8; }
body.dark-mode .sidebar-nav .nav-link:hover { background: #1e2535; color: #e2e8f0; }
body.dark-mode .sidebar-nav .nav-link:hover .nav-icon { color: #60a5fa; }
body.dark-mode .sidebar-nav .nav-link.active { background: #1e3a5f; color: #60a5fa; }
body.dark-mode .sidebar-nav .nav-link.active .nav-icon { color: #60a5fa; }
body.dark-mode .sidebar-overlay { background: rgba(0,0,0,0.7); }
body.dark-mode .page-title,
body.dark-mode .page-subtitle,
body.dark-mode h1,body.dark-mode h2,body.dark-mode h3,
body.dark-mode h4,body.dark-mode h5,body.dark-mode h6 { color: #e2e8f0; }
body.dark-mode .text-muted { color: #a0aec0 !important; }
body.dark-mode .text-dark  { color: #e2e8f0 !important; }

/* Cards */
body.dark-mode .card {
  --bs-card-border-color: #2d3748;
  background: #1a1f2e !important;
  border: 1px solid #2d3748 !important;
  color: #e2e8f0;
}
body.dark-mode .card-header {
  background: #1e2535 !important;
  border-color: #2d3748 !important;
  color: #e2e8f0 !important;
}
body.dark-mode .card-body { background: #1a1f2e; }
body.dark-mode .card-footer { background: #1e2535; border-color: #2d3748; }

/* Forms */
body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode .input-group-text {
  background: #2d3748; border-color: #4a5568; color: #e2e8f0;
}
body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
  background: #2d3748; color: #e2e8f0;
  border-color: #3b82f6;
  box-shadow: 0 0 0 0.2rem rgba(59,130,246,0.25);
}
body.dark-mode .form-control::placeholder { color: #718096; }
body.dark-mode .form-label { color: #cbd5e0; }
body.dark-mode .form-check-label { color: #cbd5e0; }

/* Tables */
body.dark-mode .table {
  color: #e2e8f0;
  --bs-table-bg: #1a1f2e;
  --bs-table-striped-bg: #1e2535;
  --bs-table-hover-bg: #252d3f;
  border-color: #2d3748;
}
body.dark-mode .table thead th { background: #1e2535; border-color: #2d3748; color: #a0aec0; }
body.dark-mode .table td,
body.dark-mode .table th { border-color: #2d3748 !important; }
body.dark-mode .table tbody tr:hover { background: #252d3f; }

/* Modals */
body.dark-mode .modal-content { background: #1a1f2e; border-color: #2d3748; color: #e2e8f0; }
body.dark-mode .modal-header, body.dark-mode .modal-footer { border-color: #2d3748; }
body.dark-mode .btn-close { filter: invert(1); }

/* Dropdowns */
body.dark-mode .dropdown-menu { background: #1a1f2e; border-color: #2d3748; }
body.dark-mode .dropdown-item { color: #e2e8f0; }
body.dark-mode .dropdown-item:hover,
body.dark-mode .dropdown-item:focus { background: #252d3f; color: #fff; }
body.dark-mode .dropdown-divider { border-color: #2d3748; }

/* List groups */
body.dark-mode .list-group-item { background: #1a1f2e; border-color: #2d3748; color: #e2e8f0; }
body.dark-mode .list-group-item:hover { background: #252d3f; }

/* Alerts */
body.dark-mode .alert-success  { background: #1a3a2a; border-color: #276749; color: #9ae6b4; }
body.dark-mode .alert-danger   { background: #3a1a1a; border-color: #742a2a; color: #feb2b2; }
body.dark-mode .alert-warning  { background: #3a2e1a; border-color: #744d1a; color: #fbd38d; }
body.dark-mode .alert-info     { background: #1a2a3a; border-color: #2a6496; color: #90cdf4; }

/* Borders */
body.dark-mode hr,
body.dark-mode .border-bottom,
body.dark-mode .border-top { border-color: #2d3748 !important; }

/* DataTables */
body.dark-mode .dataTables_wrapper .dataTables_filter input,
body.dark-mode .dataTables_wrapper .dataTables_length select {
  background: #2d3748; border-color: #4a5568; color: #e2e8f0;
}
body.dark-mode .dataTables_wrapper .dataTables_info { color: #64748b !important; }
body.dark-mode .dataTables_wrapper .dataTables_paginate .page-link {
  background: #1a1f2e !important; border-color: #2d3748 !important; color: #94a3b8 !important;
}
body.dark-mode .dataTables_wrapper .dataTables_paginate .page-link:hover {
  background: #252d3f !important; border-color: #4a5568 !important; color: #e2e8f0 !important;
}
body.dark-mode .dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
  background: #1e3a5f !important; border-color: #3b82f6 !important; color: #60a5fa !important;
}
body.dark-mode .dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link {
  background: #0f1117 !important; border-color: #1e2535 !important; color: #475569 !important;
}
body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button { color: #94a3b8 !important; }

/* Action buttons in dark mode */
body.dark-mode .action-btns .btn-outline-primary {
  border-color: #3b82f6; color: #60a5fa; background: rgba(59,130,246,0.08);
}
body.dark-mode .action-btns .btn-outline-primary:hover {
  background: rgba(59,130,246,0.2); border-color: #60a5fa; color: #93c5fd;
}
body.dark-mode .action-btns .btn-outline-success {
  border-color: #00e676; color: #00e676; background: rgba(0,230,118,0.08);
}
body.dark-mode .action-btns .btn-outline-success:hover {
  background: rgba(0,230,118,0.2); border-color: #00e676; color: #6effc3;
}
body.dark-mode .action-btns .btn-outline-warning {
  border-color: #fbbf24; color: #fbbf24; background: rgba(251,191,36,0.08);
}
body.dark-mode .action-btns .btn-outline-warning:hover {
  background: rgba(251,191,36,0.2); border-color: #fcd34d; color: #fcd34d;
}
body.dark-mode .action-btns .btn-outline-danger {
  border-color: #f87171; color: #f87171; background: rgba(248,113,113,0.08);
}
body.dark-mode .action-btns .btn-outline-danger:hover {
  background: rgba(248,113,113,0.2); border-color: #fca5a5; color: #fca5a5;
}

/* Stat cards */
body.dark-mode .stat-card { background: #1a1f2e !important; border-color: #2d3748 !important; }
body.dark-mode .stat-number { color: #f0f4f8; }
body.dark-mode .stat-label { color: #94a3b8; }
body.dark-mode .stat-icon.blue   { background: rgba(37,99,235,0.2); color: #60a5fa; }
body.dark-mode .stat-icon.green  { background: rgba(22,163,74,0.2);  color: #4ade80; }
body.dark-mode .stat-icon.orange { background: rgba(234,88,12,0.2);  color: #fb923c; }
body.dark-mode .stat-icon.purple { background: rgba(124,58,237,0.2); color: #a78bfa; }
body.dark-mode .stat-icon.teal   { background: rgba(13,148,136,0.2); color: #2dd4bf; }

/* Welcome card */
body.dark-mode .welcome-card { opacity: 0.9; }

/* Page header */
body.dark-mode .page-header { border-color: #2d3748; }

/* Settings */
body.dark-mode .settings-menu-list li { border-color: #2d3748; }
body.dark-mode .settings-menu-list li a { color: #cbd5e0; }
body.dark-mode .settings-menu-list li a:hover { background: #252d3f; }

/* Badges */
body.dark-mode .badge.bg-light { background: #2d3748 !important; color: #e2e8f0 !important; }
body.dark-mode .badge.bg-secondary { background: #4a5568 !important; }
body.dark-mode select option { background: #1a1f2e; color: #e2e8f0; }

/* Error page */
body.dark-mode .error-page { background: #0f1117; }

/* Status badges */
body.dark-mode .badge-confirmed,
body.dark-mode .badge-completed { background: rgba(0,230,118,0.12) !important; color: #00e676 !important; }
body.dark-mode .badge-new { background: rgba(13,110,253,0.15) !important; color: #60a5fa !important; }
body.dark-mode .badge-inprocess { background: rgba(253,126,20,0.15) !important; color: #fb923c !important; }
body.dark-mode .badge.bg-success,
body.dark-mode .bg-success {
  background: rgba(0,230,118,0.15) !important; color: #00e676 !important;
  border-color: rgba(0,230,118,0.3) !important;
}
body.dark-mode .badge.bg-success-subtle,
body.dark-mode .bg-success-subtle { background: rgba(0,230,118,0.12) !important; }
body.dark-mode .text-success { color: #00e676 !important; }
body.dark-mode .border-success-subtle { border-color: rgba(0,230,118,0.3) !important; }

/* Estimate Form rows */
body.dark-mode .dist-bar { background: #1a2035 !important; border-color: #2d4a6f !important; }
body.dark-mode .svc-thead-row { background: #1e2535 !important; }
body.dark-mode .svc-thead-row td { color: #e2e8f0 !important; }
body.dark-mode .svc-cuft-row { background: #252d3f !important; }
body.dark-mode .svc-cuft-input { background: #252d3f !important; color: #90cdf4 !important; border-color: #4a5568 !important; }
body.dark-mode .svc-total-row { background: #1a202c !important; }
body.dark-mode .svc-total-row input { background: #2d3748 !important; }
body.dark-mode .svc-grand-row { background: #1a2535 !important; }
body.dark-mode .svc-grand-input { background: #1a2535 !important; color: #e2e8f0 !important; border-color: #4a5568 !important; }
body.dark-mode .svc-charges-section { border-color: #2d3748 !important; }
body.dark-mode .section-card { background: #1a1f2e !important; border-color: #2d3748 !important; color: #e2e8f0; }
body.dark-mode .section-card .section-header { background: #1e2535 !important; border-color: #2d3748 !important; color: #e2e8f0 !important; }
body.dark-mode .svc-table td { border-color: #2d3748; }
body.dark-mode .svc-table .svc-label { color: #a0aec0; }
body.dark-mode .svc-table .svc-dollar { color: #e2e8f0; }
body.dark-mode .svc-table input[type="number"],
body.dark-mode .svc-table input[type="text"].svc-num,
body.dark-mode .svc-table input.svc-num,
body.dark-mode #proc_fee_amt,
body.dark-mode #proc_fee_pct { background: #2d3748 !important; border-color: #4a5568 !important; color: #e2e8f0 !important; }
body.dark-mode .svc-total-row input { background: #2d3748 !important; color: #e2e8f0 !important; }
body.dark-mode .declaration-warning { background: #2a2a1a !important; border-color: #4a4a20 !important; color: #e2e8f0 !important; }

/* Inventory panel */
body.dark-mode .inv-quick-card { background: #1e2535 !important; border-color: #2d3748 !important; }
body.dark-mode .inv-quick-icon-wrap { background: #252d3f !important; }
body.dark-mode .inv-quick-icon-wrap svg { stroke: #90cdf4 !important; }
body.dark-mode .inv-quick-card .inv-item-label { color: #94a3b8 !important; }
body.dark-mode .inv-quick-count { color: #90cdf4 !important; }
body.dark-mode .stp-btn { color: #90cdf4 !important; }
body.dark-mode .stp-btn:hover { color: #fc8181 !important; }
body.dark-mode .inv-col { border-color: #2d3748 !important; }
body.dark-mode .inv-row { border-color: #2d3748 !important; }
body.dark-mode .inv-item-name { color: #e2e8f0 !important; }
body.dark-mode .inv-qty-input { background: #2d3748 !important; border-color: #4a5568 !important; color: #e2e8f0 !important; }
body.dark-mode .inv-stats { color: #718096 !important; }
body.dark-mode .inv-search-dropdown { background: #1a1f2e !important; border-color: #4a5568 !important; }
body.dark-mode .inv-sd-item { border-color: #2d3748 !important; color: #e2e8f0 !important; }
body.dark-mode .inv-sd-item:hover,
body.dark-mode .inv-sd-item.active { background: #252d3f !important; }
body.dark-mode .inv-sd-meta { color: #718096 !important; }

/* Quill */
body.dark-mode .ql-toolbar { background: #1e2535 !important; border-color: #4a5568 !important; }
body.dark-mode .ql-container { background: #2d3748 !important; border-color: #4a5568 !important; color: #e2e8f0 !important; }
body.dark-mode .ql-editor { color: #e2e8f0 !important; }
body.dark-mode .ql-editor.ql-blank::before { color: #718096 !important; }
body.dark-mode .ql-toolbar .ql-stroke { stroke: #a0aec0 !important; }
body.dark-mode .ql-toolbar .ql-fill { fill: #a0aec0 !important; }
body.dark-mode .ql-toolbar .ql-picker-label { color: #a0aec0 !important; }
body.dark-mode .ql-toolbar button:hover .ql-stroke,
body.dark-mode .ql-toolbar button.ql-active .ql-stroke { stroke: #e2e8f0 !important; }
body.dark-mode .ql-picker-options { background: #1a1f2e !important; border-color: #4a5568 !important; color: #e2e8f0 !important; }

/* General text */
body.dark-mode p,
body.dark-mode span,
body.dark-mode td,
body.dark-mode li,
body.dark-mode label { color: inherit; }
body.dark-mode .text-muted { color: #94a3b8 !important; }

/* Job order badge */
body.dark-mode .job-order-badge { color: #60a5fa; }

/* ===== FULLCALENDAR DARK MODE ===== */
body.dark-mode .fc {
  color: #e2e8f0;
  --fc-border-color: #2d3748;
  --fc-page-bg-color: #0f1117;
  --fc-neutral-bg-color: #161b27;
  --fc-neutral-text-color: #94a3b8;
  --fc-today-bg-color: #1a2035;
}
body.dark-mode .fc,
body.dark-mode .fc .fc-toolbar,
body.dark-mode .fc .fc-view-harness,
body.dark-mode .fc .fc-scrollgrid,
body.dark-mode .fc .fc-scrollgrid-section-body { background: #1a1f2e !important; }
body.dark-mode .fc .fc-toolbar-title { color: #e2e8f0 !important; }
body.dark-mode .fc .fc-button-primary { background: #1e2535 !important; border-color: #2d3748 !important; color: #94a3b8 !important; }
body.dark-mode .fc .fc-button-primary:hover { background: #252d3f !important; border-color: #4a5568 !important; color: #e2e8f0 !important; }
body.dark-mode .fc .fc-button-primary:not(:disabled).fc-button-active,
body.dark-mode .fc .fc-button-primary:not(:disabled):active { background: #1e3a5f !important; border-color: #3b82f6 !important; color: #60a5fa !important; }
body.dark-mode .fc .fc-button-primary:focus { box-shadow: 0 0 0 0.2rem rgba(59,130,246,0.25) !important; }
body.dark-mode .fc .fc-daygrid-day-number { color: #94a3b8 !important; }
body.dark-mode .fc .fc-day-today .fc-daygrid-day-number { color: #60a5fa !important; font-weight: 700; }
body.dark-mode .fc .fc-day-other .fc-daygrid-day-top { opacity: 0.35; }
body.dark-mode .fc .fc-daygrid-more-link { color: #60a5fa !important; }
body.dark-mode .fc .fc-popover { background: #1a1f2e !important; border-color: #2d3748 !important; }
body.dark-mode .fc .fc-popover-header { background: #161b27 !important; color: #e2e8f0 !important; }
body.dark-mode #eventModal .modal-content { background: #1a1f2e !important; color: #e2e8f0 !important; }
body.dark-mode #eventModal .modal-footer { background: #161b27 !important; border-color: #2d3748 !important; }
body.dark-mode #eventModal .btn-outline-secondary { border-color: #4a5568 !important; color: #94a3b8 !important; }
body.dark-mode #eventModal .btn-outline-secondary:hover { background: #252d3f !important; color: #e2e8f0 !important; }
