/* =============================================
   HFE SIGNS — THEME SYSTEM (Light / Dark)
   ============================================= */

/* ---------- CSS Custom Properties ---------- */
:root {
  --t-bg-primary:          #ffffff;
  --t-bg-secondary:        #f0f0f0;
  --t-bg-topbar:           #f2f2f2;
  --t-bg-logo:             #ffffff;
  --t-bg-logo-border:      #f0f0f0;
  --t-bg-card:             #ffffff;
  --t-bg-dropdown:         #ffffff;
  --t-bg-dropdown-hover:   #f3f4f6;
  --t-border-subtle:       #e5e7eb;
  --t-border-card:         rgba(0,0,0,0.08);
  --t-text-primary:        #222222;
  --t-text-secondary:      #555555;
  --t-text-muted:          #888888;
  --t-text-topbar:         #4b5563;
  --t-shadow-card:         0 1px 3px rgba(0,0,0,0.06);
  --t-shadow-card-hover:   0 4px 12px rgba(0,0,0,0.10);
  --t-footer-links-bg:     #f5f5f5;
  --t-footer-bg:           #f0f0f0;
  --t-payment-bg:          #ffffff;
  --t-payment-border:      #dddddd;
  --t-payment-text:        #555555;
  --t-slider-btn-bg:       #d1d5db;
  --t-slider-btn-text:     #374151;
  /* Feature bar */
  --t-feature-bg:          #333333;
  --t-feature-border:      #444444;
  /* Breadcrumb */
  --t-bc-bg:               #e8e8e8;
  --t-bc-border:           #dddddd;
}

html.dark {
  --t-bg-primary:          #111118;
  --t-bg-secondary:        #0c0c12;
  --t-bg-topbar:           #0c0c12;
  --t-bg-logo:             #111118;
  --t-bg-logo-border:      rgba(255,255,255,0.06);
  --t-bg-card:             #1a1a24;
  --t-bg-dropdown:         #16161f;
  --t-bg-dropdown-hover:   #1f2937;
  --t-border-subtle:       rgba(255,255,255,0.10);
  --t-border-card:         rgba(255,255,255,0.10);
  --t-text-primary:        #f3f4f6;
  --t-text-secondary:      rgba(255,255,255,0.65);
  --t-text-muted:          rgba(255,255,255,0.40);
  --t-text-topbar:         rgba(255,255,255,0.60);
  --t-shadow-card:         0 1px 4px rgba(0,0,0,0.40);
  --t-shadow-card-hover:   0 4px 16px rgba(0,0,0,0.55);
  --t-footer-links-bg:     #0c0c12;
  --t-footer-bg:           #111118;
  --t-payment-bg:          #1f2937;
  --t-payment-border:      #374151;
  --t-payment-text:        #e5e7eb;
  --t-slider-btn-bg:       rgba(255,255,255,0.08);
  --t-slider-btn-text:     #ffffff;
  /* Feature bar */
  --t-feature-bg:          #1a1a24;
  --t-feature-border:      rgba(255,255,255,0.08);
  /* Breadcrumb */
  --t-bc-bg:               #1a1a24;
  --t-bc-border:           rgba(255,255,255,0.08);
}

/* ---------- Smooth Transitions ---------- */
.t-topbar,
.t-topbar a,
.t-logo-bar,
.t-section,
.t-section-alt,
.t-card,
.t-feature-box,
.t-footer-links,
.t-footer,
.t-footer-link,
.t-footer-links-link,
.t-footer-text,
.t-payment-badge,
.t-slider-btn,
.t-dropdown,
#theme-switcher-dropdown {
  transition: background-color 0.25s ease, color 0.25s ease,
              border-color 0.25s ease, box-shadow 0.25s ease;
}

/* ---------- TOP BAR ---------- */
.t-topbar {
  background-color: var(--t-bg-topbar) !important;
  border-bottom-color: var(--t-border-subtle) !important;
}
.t-topbar-link {
  color: var(--t-text-topbar) !important;
}
.t-topbar-link:hover {
  color: var(--t-text-primary) !important;
}

/* ---------- LOGO BAR ---------- */
.t-logo-bar {
  background-color: var(--t-bg-logo) !important;
  border-bottom-color: var(--t-bg-logo-border) !important;
}
.t-logo-tagline {
  color: var(--t-text-muted) !important;
}

/* ---------- DROPDOWN ---------- */
.t-dropdown {
  background-color: var(--t-bg-dropdown) !important;
  color: var(--t-text-primary) !important;
  border-color: var(--t-border-subtle) !important;
}
.t-dropdown-item {
  color: var(--t-text-primary) !important;
}
.t-dropdown-item:hover {
  background-color: var(--t-bg-dropdown-hover) !important;
}
.t-dropdown-divider {
  border-color: var(--t-border-subtle) !important;
}

/* ---------- PAGE SECTIONS ---------- */
.t-body {
  background-color: var(--t-bg-primary) !important;
  color: var(--t-text-primary) !important;
}
.t-section {
  background-color: var(--t-bg-primary) !important;
  color: var(--t-text-primary) !important;
}
.t-section-alt {
  background-color: var(--t-bg-secondary) !important;
  color: var(--t-text-primary) !important;
}

/* ---------- TEXT ---------- */
.t-text-primary   { color: var(--t-text-primary)   !important; }
.t-text-secondary { color: var(--t-text-secondary) !important; }
.t-text-muted     { color: var(--t-text-muted)     !important; }

/* ---------- CARDS & FEATURE BOXES ---------- */
.t-card {
  background-color: var(--t-bg-card) !important;
  border-color: var(--t-border-card) !important;
}
.t-feature-box {
  background-color: var(--t-bg-card) !important;
  border: 1px solid var(--t-border-card) !important;
  box-shadow: var(--t-shadow-card) !important;
}

/* ---------- SLIDER BUTTONS ---------- */
.t-slider-btn {
  background-color: var(--t-slider-btn-bg) !important;
  color: var(--t-slider-btn-text) !important;
}
.t-slider-btn:hover {
  background-color: #cc0000 !important;
  color: #ffffff !important;
}

/* ---------- FOOTER ---------- */
.t-footer-links {
  background-color: var(--t-footer-links-bg) !important;
  border-color: var(--t-border-subtle) !important;
}
.t-footer-links-link {
  color: var(--t-text-secondary) !important;
}
.t-footer-links-link:hover {
  color: var(--t-text-primary) !important;
}
.t-footer {
  background-color: var(--t-footer-bg) !important;
  border-color: var(--t-border-subtle) !important;
}
.t-footer-text {
  color: var(--t-text-muted) !important;
}
.t-footer-link {
  color: var(--t-text-muted) !important;
}
.t-footer-link:hover {
  color: var(--t-text-primary) !important;
}
.t-payment-badge {
  background-color: var(--t-payment-bg) !important;
  border-color: var(--t-payment-border) !important;
  color: var(--t-payment-text) !important;
}

/* ---------- THEME SWITCHER UI ---------- */
#theme-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
}

#theme-switcher-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--t-border-subtle);
  border-radius: 6px;
  cursor: pointer;
  padding: 3px 8px;
  font-size: 12px;
  color: var(--t-text-topbar);
  line-height: 1.5;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
#theme-switcher-btn:hover {
  background-color: var(--t-bg-dropdown-hover);
  color: var(--t-text-primary);
  border-color: var(--t-text-muted);
}

#theme-switcher-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background-color: var(--t-bg-dropdown);
  border: 1px solid var(--t-border-subtle);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  padding: 6px;
  min-width: 196px;
  z-index: 99999;
  display: none;
}
html.dark #theme-switcher-dropdown {
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
}
#theme-switcher-dropdown.open {
  display: block;
}

.ts-label {
  font-size: 10px;
  padding: 4px 10px 6px;
  color: var(--t-text-muted);
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.theme-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 8px;
  font-size: 13px;
  color: var(--t-text-secondary);
  text-align: left;
  transition: background-color 0.15s, color 0.15s;
}
.theme-opt:hover {
  background-color: var(--t-bg-dropdown-hover);
  color: var(--t-text-primary);
}
.theme-opt.active {
  background-color: rgba(204,0,0,0.08);
  color: #cc0000;
  font-weight: 600;
}
.theme-opt .ts-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.theme-opt .ts-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cc0000;
  margin-left: auto;
  opacity: 0;
}
.theme-opt.active .ts-dot {
  opacity: 1;
}

/* =============================================
   GLOBAL DARK MODE — Bootstrap page overrides
   (blog, user dashboard, cart, orders, etc.)
   ============================================= */

html.dark body {
  background-color: #111118 !important;
  color: #f3f4f6 !important;
}

/* Bootstrap cards */
html.dark .card {
  background-color: #1a1a24 !important;
  border-color: rgba(255,255,255,0.10) !important;
  color: #f3f4f6 !important;
}
html.dark .card-header,
html.dark .card-footer {
  background-color: rgba(255,255,255,0.05) !important;
  border-color: rgba(255,255,255,0.10) !important;
  color: #f3f4f6 !important;
}
html.dark .card-body { color: #f3f4f6 !important; }

/* Bootstrap tables */
html.dark .table {
  color: #e5e7eb !important;
  border-color: rgba(255,255,255,0.10) !important;
}
html.dark .table th,
html.dark .table td { border-color: rgba(255,255,255,0.10) !important; }
html.dark .table-light,
html.dark .table-light th,
html.dark .table-light td {
  background-color: rgba(255,255,255,0.07) !important;
  color: #e5e7eb !important;
}
html.dark .table-bordered { border-color: rgba(255,255,255,0.12) !important; }
html.dark .table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(255,255,255,0.04) !important;
}

/* Bootstrap navigation */
html.dark .nav-link { color: #d1d5db !important; }
html.dark .nav-link:hover { color: #ffffff !important; }
html.dark .nav-link.active { color: #cc0000 !important; }
html.dark .dashboard-menu { background-color: #1a1a24; border-radius: 8px; padding: 8px; }

/* Bootstrap list groups */
html.dark .list-group-item {
  background-color: #1a1a24 !important;
  border-color: rgba(255,255,255,0.10) !important;
  color: #e5e7eb !important;
}

/* Bootstrap forms */
html.dark .form-control,
html.dark .form-select {
  background-color: #1a1a24 !important;
  border-color: rgba(255,255,255,0.15) !important;
  color: #f3f4f6 !important;
}
html.dark .form-control::placeholder { color: rgba(255,255,255,0.35) !important; }
html.dark .form-control:focus,
html.dark .form-select:focus {
  background-color: #1f1f2e !important;
  border-color: #cc0000 !important;
  box-shadow: 0 0 0 0.2rem rgba(204,0,0,0.25) !important;
  color: #f3f4f6 !important;
}
html.dark .form-label { color: #d1d5db !important; }
html.dark .input-group-text {
  background-color: #1a1a24 !important;
  border-color: rgba(255,255,255,0.15) !important;
  color: #d1d5db !important;
}

/* Bootstrap modals */
html.dark .modal-content {
  background-color: #1a1a24 !important;
  border-color: rgba(255,255,255,0.10) !important;
  color: #f3f4f6 !important;
}
html.dark .modal-header,
html.dark .modal-footer {
  border-color: rgba(255,255,255,0.10) !important;
}
html.dark .btn-close { filter: invert(1) grayscale(1) brightness(2); }

/* Text utilities */
html.dark .text-dark   { color: #f3f4f6 !important; }
html.dark .text-muted  { color: rgba(255,255,255,0.45) !important; }
html.dark h1,html.dark h2,html.dark h3,html.dark h4,html.dark h5,html.dark h6 {
  color: #f3f4f6 !important;
}
html.dark p { color: #d1d5db !important; }

/* Borders & separators */
html.dark .border,
html.dark .border-top,
html.dark .border-bottom,
html.dark .border-start,
html.dark .border-end { border-color: rgba(255,255,255,0.10) !important; }
html.dark hr { border-color: rgba(255,255,255,0.10) !important; }
html.dark .border-bottom { border-bottom-color: rgba(255,255,255,0.10) !important; }

/* Bootstrap pagination */
html.dark .pagination .page-link {
  background-color: #1a1a24 !important;
  border-color: rgba(255,255,255,0.10) !important;
  color: #d1d5db !important;
}
html.dark .pagination .page-link:hover {
  background-color: #cc0000 !important;
  color: #fff !important;
}
html.dark .pagination .page-item.active .page-link {
  background-color: #cc0000 !important;
  border-color: #cc0000 !important;
}
html.dark .pagination .page-item.disabled .page-link {
  background-color: rgba(255,255,255,0.03) !important;
  color: rgba(255,255,255,0.25) !important;
}

/* Bootstrap alerts */
html.dark .alert { border-color: rgba(255,255,255,0.12) !important; }
html.dark .alert-light {
  background-color: #1a1a24 !important;
  color: #e5e7eb !important;
}

/* Bootstrap badges */
html.dark .badge.bg-light  { background-color: #2d2d3a !important; color: #e5e7eb !important; }
html.dark .badge.bg-secondary { background-color: #374151 !important; }

/* Sidebar widgets */
html.dark .sidebar-widget,
html.dark .widget-area {
  background-color: transparent !important;
  color: #e5e7eb !important;
}

/* Blog specific */
html.dark .single-header { border-bottom-color: rgba(255,255,255,0.10) !important; }
html.dark .loop-grid .article-card,
html.dark .post-card {
  background-color: #1a1a24 !important;
  border-color: rgba(255,255,255,0.10) !important;
}

/* Login page */
html.dark .login-card {
  background-color: #1a1a24 !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
  color: #f3f4f6 !important;
}

/* product/category page */
html.dark .container-fluid,
html.dark .main { color: #f3f4f6 !important; }
html.dark .breadcrumb-item { color: rgba(255,255,255,0.55) !important; }
html.dark .breadcrumb-item a { color: #cc0000 !important; }
html.dark .breadcrumb-item.active { color: rgba(255,255,255,0.35) !important; }

/* =============================================
   DARK MODE — Tailwind text-gray-* overrides
   Tailwind CDN has no dark: prefix so we patch globally.
   ============================================= */
html.dark .text-gray-900,
html.dark .text-gray-800,
html.dark .text-gray-700 { color: #e5e7eb !important; }

html.dark .text-gray-600,
html.dark .text-gray-500 { color: #9ca3af !important; }

html.dark .text-gray-400 { color: #6b7280 !important; }
html.dark .text-black    { color: #f3f4f6 !important; }

/* =============================================
   DARK MODE — Headings inside themed sections
   (only when no explicit t-text-* class is set)
   ============================================= */
html.dark .t-section h1:not([class*="t-text"]),
html.dark .t-section h2:not([class*="t-text"]),
html.dark .t-section h3:not([class*="t-text"]),
html.dark .t-section h4:not([class*="t-text"]),
html.dark .t-section h5:not([class*="t-text"]),
html.dark .t-section h6:not([class*="t-text"]),
html.dark .t-section-alt h1:not([class*="t-text"]),
html.dark .t-section-alt h2:not([class*="t-text"]),
html.dark .t-section-alt h3:not([class*="t-text"]),
html.dark .t-section-alt h4:not([class*="t-text"]),
html.dark .t-section-alt h5:not([class*="t-text"]),
html.dark .t-section-alt h6:not([class*="t-text"]) { color: #f3f4f6 !important; }

/* Paragraphs & list items in themed sections (no inline style) */
html.dark .t-section p:not([style]),
html.dark .t-section li:not([style]),
html.dark .t-section-alt p:not([style]),
html.dark .t-section-alt li:not([style]) { color: #d1d5db !important; }

/* =============================================
   DARK MODE — Search results dropdown
   ============================================= */
html.dark #searchResults {
  background-color: #1a1a24 !important;
  color: #f3f4f6 !important;
  border-color: rgba(255,255,255,0.10) !important;
}
html.dark #searchResults > div {
  color: #e5e7eb !important;
}
html.dark #searchResults > div:hover {
  background-color: #1f2937 !important;
  color: #ffffff !important;
}

/* =============================================
   DARK MODE — Footer rating text
   ============================================= */
html.dark .t-footer-text,
html.dark .t-footer-text.text-gray-500 { color: rgba(255,255,255,0.45) !important; }

/* =============================================
   LIGHT MODE — ensure slider buttons readable
   ============================================= */
.t-slider-btn { font-size: 12px; }

/* =============================================
   HFE PAGE COMPONENTS — matches reference design
   ============================================= */

/* Page background (gray, same as reference --bg:#f0f0f0) */
.t-page { background-color: var(--t-bg-secondary) !important; }

/* ---- Generic HFE card ---- */
.hfe-card {
  background: var(--t-bg-card) !important;
  border-radius: 4px !important;
  box-shadow: var(--t-shadow-card) !important;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.hfe-card:hover {
  box-shadow: var(--t-shadow-card-hover) !important;
  transform: translateY(-2px);
}

/* ---- Category cards (.hfe-cat-card) ---- */
.hfe-cat-card {
  display: block; text-decoration: none; color: inherit;
}
.hfe-cat-card img {
  width: 100%; height: 128px; object-fit: cover;
  transition: transform 0.3s;
}
.hfe-cat-card:hover img { transform: scale(1.05); }
.hfe-cat-card .body { padding: 12px; }
.hfe-cat-card h4 {
  font-size: 11.5px; font-weight: 700;
  color: #cc0000; text-transform: uppercase; margin: 0;
}
html.dark .hfe-cat-card h4 { color: #ff6666; }
.hfe-cat-card .sub { font-size: 11px; color: var(--t-text-muted); margin-top: 2px; }

/* ---- Popular product cards (.hfe-pop-card) ---- */
.hfe-pop-card {
  display: block; text-decoration: none; color: inherit; text-align: center;
}
.hfe-pop-card img {
  width: 100%; height: 128px; object-fit: cover;
  transition: transform 0.3s;
}
.hfe-pop-card:hover img { transform: scale(1.05); }
.hfe-pop-card .body { padding: 12px; }
.hfe-pop-card h4 { font-size: 12px; font-weight: 700; color: var(--t-text-primary); margin: 0; }
.hfe-pop-card .price { font-size: 12px; color: #cc0000; font-weight: 500; margin-top: 4px; }

/* ---- Category product cards (.hfe-prod-card) ---- */
.hfe-prod-card {
  display: block; text-decoration: none; color: inherit;
}
.hfe-prod-card img { width: 100%; height: 180px; object-fit: cover; transition: transform 0.3s; }
.hfe-prod-card:hover img { transform: scale(1.03); }
.hfe-prod-card .body { padding: 12px; }
.hfe-prod-card h4 { font-size: 13px; font-weight: 700; color: var(--t-text-primary); margin: 0 0 4px; }
.hfe-prod-card .cat { font-size: 11px; color: var(--t-text-muted); }
.hfe-prod-card .price { font-size: 13px; color: #cc0000; font-weight: 600; margin-top: 6px; }

/* ---- Feature bar (4-cell dark strip) ---- */
.hfe-feature-bar {
  display: grid; grid-template-columns: repeat(4,1fr);
}
.hfe-feature-item {
  background: var(--t-feature-bg);
  border-right: 1px solid var(--t-feature-border);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 10px;
  transition: background-color 0.25s;
}
.hfe-feature-item:last-child { border-right: 0; }
.hfe-feature-item h3 {
  font-size: 11px; color: #fff; text-transform: uppercase;
  font-weight: 700; margin: 0; line-height: 1.3;
}
html.dark .hfe-feature-item h3 { color: #e5e7eb; }
.hfe-feature-ico { color: #4da6ff; font-size: 18px; flex-shrink: 0; }
@media (max-width: 768px) { .hfe-feature-bar { grid-template-columns: repeat(2,1fr); } }

/* ---- Breadcrumb bar ---- */
.hfe-bc {
  background: var(--t-bc-bg);
  border-bottom: 1px solid var(--t-bc-border);
  font-size: 12px;
  transition: background-color 0.25s, border-color 0.25s;
}
.hfe-bc a { color: #cc0000; text-decoration: none; }
.hfe-bc a:hover { text-decoration: underline; }
.hfe-bc .sep { color: var(--t-text-muted); margin: 0 6px; }
.hfe-bc .cur { color: var(--t-text-muted); }

/* ---- Category sidebar ---- */
.hfe-sidebar {
  background: var(--t-bg-card) !important;
  border-radius: 4px !important;
  box-shadow: var(--t-shadow-card) !important;
  overflow: hidden;
}
.hfe-sidebar-head {
  background: #cc0000; color: #fff;
  font-size: 13px; font-weight: 700;
  padding: 12px 16px; text-transform: uppercase;
}
.hfe-sidebar-link {
  display: block; padding: 10px 16px;
  font-size: 13px; color: var(--t-text-secondary);
  border-bottom: 1px solid var(--t-border-subtle);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.hfe-sidebar-link:last-child { border-bottom: 0; }
.hfe-sidebar-link:hover, .hfe-sidebar-link.active {
  background: rgba(204,0,0,0.06); color: #cc0000;
}
html.dark .hfe-sidebar-link:hover,
html.dark .hfe-sidebar-link.active {
  background: rgba(204,0,0,0.14); color: #ff6666;
}

/* ---- Category hero section ---- */
.hfe-cat-hero { position: relative; height: 340px; overflow: hidden; }
.hfe-cat-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.75), rgba(0,0,0,.35) 55%, rgba(0,0,0,.1));
}
.hfe-cat-hero-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; z-index: 5;
}
.hfe-cat-hero .nav-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.30); color: #fff; border: 0;
  padding: 8px; border-radius: 50%; width: 38px; height: 38px;
  font-size: 20px; line-height: 1; z-index: 10; cursor: pointer;
}
.hfe-cat-hero .nav-arrow:hover { background: rgba(0,0,0,.55); }

/* ---- Why-use numbered bubble ---- */
.hfe-num-bubble {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  background: #cc0000; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}

/* ---- White content panel (used below category / home) ---- */
.hfe-white-panel {
  background: var(--t-bg-card) !important;
  border-top: 1px solid var(--t-border-subtle);
  transition: background-color 0.25s, border-color 0.25s;
}

/* ---- Banners heading strip ---- */
.hfe-banners-heading {
  background: #cc0000; color: #fff;
  text-align: center; padding: 16px;
  font-weight: 700; font-size: 19px;
  text-transform: uppercase; margin: 0;
}

/* ---- Cat arrow (carousel prev/next) ---- */
.hfe-cat-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: var(--t-bg-card); border: 0; border-radius: 50%;
  width: 32px; height: 32px;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  color: #cc0000; font-size: 16px; z-index: 5; cursor: pointer;
  transition: box-shadow 0.2s, background-color 0.25s;
}
.hfe-cat-arrow:hover { box-shadow: 0 3px 10px rgba(0,0,0,.25); }

/* =============================================
   DARK MODE — Bootstrap pagination
   ============================================= */
html.dark .page-link {
  background-color: var(--t-bg-card) !important;
  border-color: var(--t-border-subtle) !important;
  color: #cc0000 !important;
}
html.dark .page-item.active .page-link {
  background-color: #cc0000 !important;
  border-color: #cc0000 !important;
  color: #fff !important;
}
html.dark .page-item.disabled .page-link {
  background-color: var(--t-bg-secondary) !important;
  border-color: var(--t-border-subtle) !important;
  color: var(--t-text-muted) !important;
}
html.dark .page-link:hover {
  background-color: rgba(204,0,0,0.14) !important;
  color: #ff6666 !important;
}

/* =============================================
   DARK MODE — Bootstrap form controls (global)
   ============================================= */
html.dark .form-select,
html.dark .form-control {
  background-color: var(--t-bg-primary) !important;
  border-color: var(--t-border-subtle) !important;
  color: var(--t-text-primary) !important;
}
html.dark .form-check-label { color: var(--t-text-secondary) !important; }
html.dark .form-label { color: var(--t-text-secondary) !important; }

/* =============================================
   DARK MODE — Bootstrap nav-tabs
   ============================================= */
html.dark .nav-tabs {
  border-color: var(--t-border-subtle) !important;
}
html.dark .nav-tabs .nav-link {
  color: var(--t-text-secondary) !important;
  border-color: transparent !important;
}
html.dark .nav-tabs .nav-link.active {
  background-color: var(--t-bg-card) !important;
  border-color: var(--t-border-subtle) var(--t-border-subtle) var(--t-bg-card) !important;
  color: #ff6666 !important;
}
html.dark .nav-tabs .nav-link:hover:not(.active) {
  border-color: var(--t-border-subtle) !important;
  color: var(--t-text-primary) !important;
}

/* =============================================
   DARK MODE — Bootstrap modal
   ============================================= */
html.dark .modal-content {
  background-color: var(--t-bg-card) !important;
  border-color: var(--t-border-subtle) !important;
  color: var(--t-text-primary) !important;
}
html.dark .modal-footer {
  border-top-color: var(--t-border-subtle) !important;
}
html.dark .btn-outline-secondary {
  color: var(--t-text-secondary) !important;
  border-color: var(--t-border-subtle) !important;
}
html.dark .btn-outline-secondary:hover {
  background-color: rgba(255,255,255,0.08) !important;
  color: var(--t-text-primary) !important;
}

