@import url('bootstrap.css');
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.nav-link:focus-visible {
  box-shadow: none;
}

.container-ecm {
  height: 100vh;
  overflow-y: scroll;
}

.navbar-ecm {
  position: sticky;
  top: 0;
  background-color: white;
  z-index: 9999;
}

.vh-50 {
  height: 50vh !important;
}

.vh-60 {
  height: 60vh !important;
}

.vh-75 {
  height: 75vh !important;
}

.text-pre {
  white-space: pre !important;
}

.text-justify {
  text-align: justify !important;
}

/* Style for password inputs */
.toggle-password {
  border-left: none;
  background-color: transparent;
}
.toggle-password:focus {
  box-shadow: none;
}

/* Style for header */
.dropdown-languaje .dropdown-menu {
  --bs-dropdown-min-width: auto !important;
}

/* Styles for sidebar menu */
#sidebar-menu {
  width: 100%;
  min-width: 100%;
  background-color: #1e293b;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease, min-width 0.3s ease;
  position: fixed;
  z-index: 10001;
  color: rgba(255, 255, 255, 0.8);
}
#sidebar-menu .text-menu,
#sidebar-menu span:not(.visually-hidden) {
  color: rgba(255, 255, 255, 0.85);
}
#sidebar-menu .btn-close {
  filter: invert(1) opacity(0.7);
}
#sidebar-menu .btn-ecm-action {
  --bs-btn-color: rgba(255, 255, 255, 0.75);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: rgba(2, 132, 199, 0.2);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: rgba(2, 132, 199, 0.25);
  --bs-btn-active-border-color: transparent;
}

#sidebar-menu.collapsed {
  /* display: none; */
  opacity: 0;
  width: 0px;
  min-width: 0px;
  transition: width 0.3s ease, min-width 0.3s ease, opacity 0.3s ease;
}

/* Mobile only: hide collapsed sidebar from receiving pointer events */
@media (max-width: 767px) {
  #sidebar-menu.collapsed {
    overflow: hidden;
    pointer-events: none;
  }
  /* Mobile: always hide icon-only logo, show full logo */
  #logo-menu-icon { display: none; }
  #logo-menu-full { display: block; }
}

#sidebar-menu .text-menu {
  transition: font-size 0.3s ease;
}

#sidebar-menu:not(:hover).collapsed .text-menu {
  font-size: 0rem !important;
  transition: font-size 0.3s ease;
}

@media (min-width: 768px) {
  #sidebar-menu {
    position: relative;
  }
  #sidebar-menu, #sidebar-menu:hover {
    display: flex;
    opacity: 1;
    width: 250px;
    min-width: 250px;
  }

  #sidebar-menu:not(:hover).collapsed {
    display: flex;
    opacity: 1;
    width: 70px;
    min-width: 70px;
  }

  /* Collapsed: show icon only, hide full logo */
  #sidebar-menu:not(:hover).collapsed #logo-menu-icon { display: block; }
  #sidebar-menu:not(:hover).collapsed #logo-menu-full { display: none; }
  /* Expanded (or hovering collapsed): hide icon, show full logo */
  #sidebar-menu #logo-menu-icon { display: none; }
  #sidebar-menu #logo-menu-full { display: block; }
}

:root {
  --bs-ecm-rgb: 2, 132, 199;
}

.text-ecm {
  --bs-text-opacity: 1;
  color: rgba(var(--bs-ecm-rgb), var(--bs-text-opacity)) !important;
}
.bg-ecm {
  --bs-bg-opacity: 1;
  background-color: rgba(var(--bs-ecm-rgb), var(--bs-bg-opacity)) !important;
}

.border-ecm {
  --bs-border-opacity: 1;
  border-color: rgba(var(--bs-ecm-rgb), var(--bs-border-opacity)) !important;
}

.btn-ecm {
  --bs-btn-color: #fff;
  --bs-btn-bg: #0284c7;
  --bs-btn-border-color: #0284c7;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #0369a1;
  --bs-btn-hover-border-color: #0369a1;
  --bs-btn-focus-shadow-rgb: 49, 132, 253;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #0369a1;
  --bs-btn-active-border-color: #0369a1;
  --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #0284c7;
  --bs-btn-disabled-border-color: #0284c7;
}

.btn-ecm-action {
  --bs-btn-color: #000;
  --bs-btn-bg: #f8f9fa;
  --bs-btn-border-color: #f8f9fa;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #0284c7;
  --bs-btn-hover-border-color: #0284c7;
  --bs-btn-focus-shadow-rgb: 211, 212, 213;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #0284c7;
  --bs-btn-active-border-color: #0284c7;
  --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  --bs-btn-disabled-color: #000;
  --bs-btn-disabled-bg: #f8f9fa;
  --bs-btn-disabled-border-color: #f8f9fa;
}

.btn-outline-ecm {
  --bs-btn-color: #0284c7;
  --bs-btn-border-color: #0284c7;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #0284c7;
  --bs-btn-hover-border-color: #0284c7;
  --bs-btn-focus-shadow-rgb: 13, 110, 253;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #0284c7;
  --bs-btn-active-border-color: #0284c7;
  --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  --bs-btn-disabled-color: #0284c7;
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: #0284c7;
  --bs-gradient: none;
}

.form-range-primary {
  accent-color: var(--bs-primary) !important;
}

.form-range-secondary {
  accent-color: var(--bs-secondary) !important;
}

.form-range-success {
  accent-color: var(--bs-success) !important;
}

.form-range-info {
  accent-color: var(--bs-info) !important;
}

.form-range-warning {
  accent-color: var(--bs-warning) !important;
}

.form-range-danger {
  accent-color: var(--bs-danger) !important;
}

.form-range-light {
  accent-color: var(--bs-light) !important;
}

.form-range-dark {
  accent-color: var(--bs-dark) !important;
}

/* GTranslate */
.gt_option {
  position: fixed !important;
}

.gt_selected, .gt_selected a {
  border-radius: 0.5rem !important;
}

/* Spinner */
.ecm-loader {
  position: fixed;
  width: 100%;
  height: 100vh;
  display: none;
  justify-content: center;
  align-items: center;
  background-color: #fff;
  opacity: 0.9;
  z-index: 9999;
}

.ecm-loader.show {
  display: flex;
}

.ecm-loader .spinner-border {
  --bs-spinner-width: 5rem !important;
  --bs-spinner-height: 5rem !important;
  --bs-spinner-border-width: 0.45rem !important;
}

/* General */
.transition-opacity {
    transition: opacity 1s;
}

/* =============================================
   NAVBAR — light default, dark-mode override
   ============================================= */
.navbar-ecm {
  background-color: #ffffff;
  border-bottom: 1px solid #dee2e6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn-navbar {
  color: #555;
  background-color: transparent;
  border-color: transparent;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn-navbar:hover,
.btn-navbar:focus {
  color: #212529;
  background-color: #f1f1f1;
  border-color: transparent;
  box-shadow: none;
}

.form-control-navbar {
  background-color: #fff;
  border: 1px solid #ced4da;
  color: #212529;
}
.form-control-navbar::placeholder {
  color: #adb5bd;
}
.form-control-navbar:focus {
  background-color: #fff;
  border-color: rgba(2, 132, 199, 0.6);
  color: #212529;
  box-shadow: none;
}

.btn-navbar-user {
  color: #555;
  background-color: transparent;
  border: none;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn-navbar-user:hover,
.btn-navbar-user:focus,
.btn-navbar-user.show {
  color: #212529;
  background-color: #f1f1f1;
  border-color: transparent;
  box-shadow: none;
}
.navbar-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0d6efd;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  flex-shrink: 0;
  line-height: 1;
}

.navbar-divider {
  width: 1px;
  height: 24px;
  background-color: #dee2e6;
  display: inline-block;
  vertical-align: middle;
}

/* =============================================
   DARK MODE
   ============================================= */
html.dark-mode body {
  background-color: #0f0f1e;
  color: #d0d0e8;
}

/* Topbar */
html.dark-mode .navbar-ecm {
  background-color: #1a1a2e;
  border-bottom-color: #2a2a45;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
html.dark-mode .btn-navbar {
  color: rgba(255, 255, 255, 0.85);
}
html.dark-mode .btn-navbar:hover,
html.dark-mode .btn-navbar:focus {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}
html.dark-mode .form-control-navbar {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}
html.dark-mode .form-control-navbar::placeholder {
  color: rgba(255, 255, 255, 0.4);
}
html.dark-mode .form-control-navbar:focus {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(2, 132, 199, 0.6);
  color: #fff;
}
html.dark-mode .btn-navbar-user {
  color: rgba(255, 255, 255, 0.85);
  background-color: transparent;
  border-color: transparent;
}
html.dark-mode .btn-navbar-user:hover,
html.dark-mode .btn-navbar-user:focus,
html.dark-mode .btn-navbar-user.show {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  border-color: transparent;
}
html.dark-mode .navbar-divider {
  background-color: rgba(255, 255, 255, 0.15);
}

/* ── Notification Bell ── */
/* Explicit position:relative so dropdown is anchored to wrapper, not the nav */
#notif-wrapper {
  position: relative !important;
}
nav.navbar-ecm {
  z-index: 9999 !important;
}
nav.navbar-ecm .dropdown-menu,
nav.navbar-ecm .notif-dropdown {
  z-index: 10000 !important;
}
.btn-navbar-bell {
  position: relative;
}
.notif-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 16px;
  height: 16px;
  background: #dc3545;
  color: #fff;
  border-radius: 99px;
  font-size: .6rem;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid #fff;
  pointer-events: none;
}
.notif-badge.d-none { display: none !important; }

/* Sidebar section dividers */
.sidebar-section-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 6px;
    margin-left: 8px;
    margin-right: 8px;
}
.sidebar-section-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(255, 255, 255, 0.35);
    padding-left: 6px;
    margin-bottom: 4px;
}
/* Hide label text when sidebar is collapsed (icon-only mode) */
#sidebar-menu.collapsed .sidebar-section-label { display: none; }
/* Slim down divider line when collapsed */
#sidebar-menu.collapsed .sidebar-section-divider {
    margin-left: 4px;
    margin-right: 4px;
}

/* Notification dropdown */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 360px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.16);
  border: 1px solid #e2e8f0;
  z-index: 1055;
  overflow: hidden;
  display: none;
}
.notif-dropdown.show { display: block; }
.notif-dropdown-header {
  padding: 12px 14px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
}
.notif-dropdown-title {
  font-size: .85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
}
/* Use #notif-dropdown prefix for higher specificity — overrides Bootstrap button resets */
#notif-dropdown .notif-mark-all {
  font-size: .72rem;
  color: #0284c7;
  background: none !important;
  border: none !important;
  cursor: pointer;
  font-weight: 600;
  padding: 0;
  outline: none;
  box-shadow: none;
}
#notif-dropdown .notif-mark-all:hover { text-decoration: underline; }

/* Notification tabs */
.notif-tabs {
  display: flex;
  border-bottom: 1px solid #f1f5f9;
}
#notif-dropdown .notif-tab-btn {
  flex: 1;
  padding: 7px 4px;
  font-size: .72rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  color: #94a3b8;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  background: none !important;
  border-radius: 0 !important;
  outline: none;
  box-shadow: none;
  transition: all .15s;
}
#notif-dropdown .notif-tab-btn.active { color: #0284c7; border-bottom-color: #0284c7 !important; }

/* Notification list */
.notif-list {
  max-height: 340px;
  overflow-y: auto;
}
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #f8fafc;
  cursor: pointer;
  transition: background .1s;
  position: relative;
  text-decoration: none;
  color: inherit;
}
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { background: #f0f9ff; }
.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #0284c7;
}
.notif-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  flex-shrink: 0;
}
.ni-workflow  { background: #dbeafe; color: #2563eb; }
.ni-upload    { background: #ede9fe; color: #7c3aed; }
.ni-accept    { background: #dcfce7; color: #16a34a; }
.ni-reject    { background: #fee2e2; color: #dc2626; }
.ni-sla       { background: #fef9c3; color: #854d0e; }
.ni-complete  { background: #f0fdf4; color: #16a34a; }
.ni-default   { background: #f1f5f9; color: #64748b; }
.notif-body { flex: 1; min-width: 0; }
.notif-text { font-size: .78rem; color: #1e293b; line-height: 1.4; font-weight: 500; }
.notif-text strong { color: #0284c7; }
.notif-subtext { font-size: .68rem; color: #94a3b8; margin-top: 2px; }
.notif-time { font-size: .67rem; color: #94a3b8; white-space: nowrap; flex-shrink: 0; padding-top: 2px; }
.notif-unread-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #0284c7;
  flex-shrink: 0;
  margin-top: 6px;
}

.notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: .82rem;
}
.notif-empty i { font-size: 1.8rem; display: block; margin-bottom: 8px; color: #cbd5e1; }

.notif-dropdown-footer {
  padding: 8px;
  text-align: center;
  border-top: 1px solid #f1f5f9;
}
.notif-dropdown-footer a {
  font-size: .75rem;
  color: #0284c7;
  font-weight: 600;
  text-decoration: none;
}
.notif-dropdown-footer a:hover { text-decoration: underline; }

/* Dark mode notifications */
html.dark-mode .notif-dropdown {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
html.dark-mode .notif-dropdown-header,
html.dark-mode .notif-tabs,
html.dark-mode .notif-dropdown-footer { border-color: #334155; }
html.dark-mode .notif-item { border-color: #1e293b; }
html.dark-mode .notif-item:hover { background: #273449; }
html.dark-mode .notif-item.unread { background: #1a2942; }
html.dark-mode .notif-text { color: #e2e8f0; }
html.dark-mode .notif-badge { border-color: #1e293b; }
html.dark-mode .notif-dropdown-title { color: #e2e8f0; }
html.dark-mode #notif-dropdown .notif-tab-btn { color: #64748b; }
html.dark-mode #notif-dropdown .notif-tab-btn.active { color: #38bdf8; border-bottom-color: #38bdf8 !important; }

/* Sidebar */
html.dark-mode #sidebar-menu {
  background-color: #0f172a;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
}
html.dark-mode .btn-ecm-action {
  --bs-btn-color: #d0d0e8;
  --bs-btn-bg: #1e1e35;
  --bs-btn-border-color: #1e1e35;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #0284c7;
  --bs-btn-hover-border-color: #0284c7;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #0284c7;
  --bs-btn-active-border-color: #0284c7;
}

/* Cards */
html.dark-mode .card {
  background-color: #1a1a2e;
  border-color: #2a2a45;
  color: #d0d0e8;
}

/* Modals */
html.dark-mode .modal-content {
  background-color: #1e293b;
  border-color: #334155;
  color: #e2e8f0;
}
html.dark-mode .modal-header,
html.dark-mode .modal-footer {
  background-color: #162032;
  border-color: #334155;
}
html.dark-mode .modal-title {
  color: #e2e8f0;
}
html.dark-mode .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Inputs */
html.dark-mode .form-control,
html.dark-mode .form-select {
  background-color: #252540;
  border-color: #3a3a5a;
  color: #d0d0e8;
}
html.dark-mode .form-control:disabled,
html.dark-mode .form-select:disabled {
  background-color: #1e1e35;
  color: #5a5a80;
}
html.dark-mode .form-control:focus,
html.dark-mode .form-select:focus {
  background-color: #252540;
  border-color: rgba(2, 132, 199, 0.6);
  color: #d0d0e8;
}

/* Text */
html.dark-mode label,
html.dark-mode .form-label {
  color: #9999bb;
}
html.dark-mode h1, html.dark-mode h2, html.dark-mode h3,
html.dark-mode h4, html.dark-mode h5, html.dark-mode h6 {
  color: #e0e0f0;
}
html.dark-mode p {
  color: #8888aa;
}
html.dark-mode .text-muted {
  color: #6666aa !important;
}

/* Dropdowns */
html.dark-mode .dropdown-menu {
  background-color: #1a1a2e;
  border-color: #2a2a45;
}
html.dark-mode .dropdown-item {
  color: #d0d0e8;
}
html.dark-mode .dropdown-item:hover,
html.dark-mode .dropdown-item:focus {
  background-color: rgba(255, 255, 255, 0.07);
  color: #fff;
}

/* =============================================
   DASHBOARD METRIC CARDS
   ============================================= */
.metric-card {
  background-color: #f8f7f4;
  border-radius: 10px;
  padding: 14px 16px;
  border: none;
}
.metric-card .metric-label {
  font-size: 12px;
  color: #6c757d;
  margin: 0 0 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.metric-card .metric-value {
  font-size: 26px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0;
  line-height: 1.1;
}
.metric-card .metric-value.text-ecm-gold {
  color: #0284c7;
}
.metric-card .metric-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  margin-bottom: 10px;
}
.metric-card .metric-icon.icon-gold {
  background-color: #e0f2fe;
  color: #0284c7;
}
.metric-card .metric-icon.icon-dark {
  background-color: #e8e8f0;
  color: #1a1a2e;
}

/* =============================================
   DASHBOARD ACTION CARDS (Opción A)
   ============================================= */
.card-action {
  border: 1px solid #e5e3de;
  border-radius: 12px;
  padding: 18px;
  height: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background-color: #fff;
}
.card-action:hover {
  border-color: #0284c7;
  box-shadow: 0 2px 12px rgba(2, 132, 199, 0.12);
}
.card-action.card-action-featured {
  border-color: #0284c7;
}
.card-action .card-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 10px;
}
.card-action .card-action-icon.icon-gold {
  background-color: #e0f2fe;
  color: #0284c7;
}
.card-action .card-action-icon.icon-dark {
  background-color: #eeedf5;
  color: #1a1a2e;
}
.card-action h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 5px;
  color: #1a1a2e;
}
.card-action p {
  font-size: 12px;
  color: #6c757d;
  margin: 0 0 14px;
  flex-grow: 1;
}

/* Topbar mobile fixes */
@media (max-width: 767px) {
  .btn-navbar {
    padding: 4px 7px;
    font-size: 13px;
  }
  .btn-navbar-user {
    padding: 4px 7px;
    font-size: 13px;
  }
  .navbar-divider {
    display: none;
  }
  .navbar-ecm .container-fluid {
    flex-wrap: nowrap;
  }
}

/* Google Translate widget — flat icon style matching btn-navbar */
.gtranslate_wrapper {
  display: inline-flex;
  align-items: center;
}
.gtranslate_wrapper a,
.gtranslate_wrapper .gt_switcher_open {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  color: #555 !important;
  background-color: transparent !important;
  border: none !important;
  border-radius: 7px !important;
  padding: 0 8px !important;
  height: 34px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  letter-spacing: .3px !important;
  transition: background-color 0.15s ease, color 0.15s ease !important;
}
.gtranslate_wrapper a:hover,
.gtranslate_wrapper .gt_switcher_open:hover {
  background-color: #f1f1f1 !important;
  color: #212529 !important;
}
/* Hide flag, show globe icon via ::before */
.gtranslate_wrapper .gt_switcher img {
  display: none !important;
}
.gtranslate_wrapper a::before,
.gtranslate_wrapper .gt_switcher_open::before {
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  content: '\f0ac';
  font-size: 14px;
  color: #555;
}

/* Dashboard dark mode */
html.dark-mode .metric-card {
  background-color: #1e293b;
}
html.dark-mode .metric-card .metric-label {
  color: #94a3b8;
}
html.dark-mode .metric-card .metric-value {
  color: #e2e8f0;
}
html.dark-mode .metric-card .metric-icon.icon-dark {
  background-color: #334155;
  color: #e2e8f0;
}
html.dark-mode .metric-card .metric-icon.icon-gold {
  background-color: rgba(2, 132, 199, 0.18);
  color: #38bdf8;
}
html.dark-mode .card-action {
  background-color: #1e293b;
  border-color: #334155;
}
html.dark-mode .card-action:hover {
  border-color: #0284c7;
  box-shadow: 0 2px 12px rgba(2, 132, 199, 0.15);
}
html.dark-mode .card-action h3 {
  color: #e2e8f0;
}
html.dark-mode .card-action p {
  color: #94a3b8;
}
html.dark-mode .card-action .card-action-icon.icon-dark {
  background-color: #334155;
  color: #e2e8f0;
}
html.dark-mode .card-action .card-action-icon.icon-gold {
  background-color: rgba(2, 132, 199, 0.18);
  color: #38bdf8;
}

/* DataTables dark mode */
html.dark-mode .dataTables_wrapper {
  color: #d0d0e8;
}
html.dark-mode .dataTables_wrapper .dataTables_length select,
html.dark-mode .dataTables_wrapper .dataTables_filter input {
  background-color: #252540;
  border-color: #3a3a5a;
  color: #d0d0e8;
}
html.dark-mode table.dataTable {
  --bs-table-bg: #1a1a2e;
  --bs-table-striped-bg: #16162a;
  --bs-table-hover-bg: #252540;
  --bs-table-color: #d0d0e8;
  --bs-table-border-color: #2a2a45;
  --bs-table-striped-color: #d0d0e8;
  --bs-table-hover-color: #d0d0e8;
  border-color: #2a2a45;
}
html.dark-mode table.dataTable thead th,
html.dark-mode table.dataTable thead td {
  background-color: #111120;
  color: #d0d0e8;
  border-bottom-color: #2a2a45;
}
html.dark-mode table.dataTable tbody tr {
  background-color: #1a1a2e;
  color: #d0d0e8;
}
html.dark-mode table.dataTable tbody tr.odd > * {
  background-color: #1a1a2e;
  color: #d0d0e8;
}
html.dark-mode table.dataTable tbody tr.even > * {
  background-color: #16162a;
  color: #d0d0e8;
}
html.dark-mode table.dataTable tbody td {
  border-color: #2a2a45;
}
html.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button {
  color: #d0d0e8 !important;
}
html.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: #252540 !important;
  border-color: #3a3a5a !important;
  color: #fff !important;
}
html.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
html.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  color: #5a5a80 !important;
}
html.dark-mode .dataTables_wrapper .dataTables_info {
  color: #8888bb;
}

/* Upload page */
html.dark-mode .upload-box {
  background-color: #1e1e35;
  border-color: #3a3a5a;
  color: #d0d0e8;
}
html.dark-mode .upload-box .text-muted {
  color: #8888bb !important;
}
html.dark-mode .upload-box p {
  color: #d0d0e8;
}
html.dark-mode .upload-box .text-primary {
  color: #4a9eff !important;
}
html.dark-mode .nav-tabs {
  border-bottom-color: #334155;
}
html.dark-mode .nav-tabs .nav-link {
  color: #94a3b8;
}
html.dark-mode .nav-tabs .nav-link:hover {
  color: #cbd5e1;
  border-color: #334155 #334155 transparent;
}
html.dark-mode .nav-tabs .nav-link.active {
  background-color: #1e293b;
  border-color: #334155 #334155 #1e293b;
  color: #e2e8f0;
}
html.dark-mode .tab-content {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}
html.dark-mode .bg-light {
  background-color: #1e1e35 !important;
  color: #d0d0e8 !important;
}

/* ── Dashboard new layout ───────────────────────────────────────────────── */
.card-header {
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}
.db-recent-table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  background: #f8fafc;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.db-recent-table td { padding: 10px 14px; vertical-align: middle; font-size: 13px; }
.db-doc-name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
.db-upload-zone {
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  padding: 20px 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.db-upload-zone:hover { border-color: #0284c7; background: rgba(2,132,199,.04); }
.db-inbox-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #e2e8f0;
}
.db-inbox-item:last-child { border-bottom: none; }
.db-inbox-dot { width: 8px; height: 8px; border-radius: 50%; background: #0284c7; flex-shrink: 0; margin-top: 5px; }
.db-inbox-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-inbox-from { font-size: 12px; color: #64748b; margin-top: 2px; }
.db-quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; }
.db-quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  color: #1e293b;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  transition: all .15s;
}
.db-quick-item i { font-size: 18px; color: #0284c7; }
.db-quick-item:hover { background: #e0f2fe; border-color: #0284c7; color: #0284c7; }

/* Dark mode — dashboard */
html.dark-mode .card-header {
  background-color: #162032;
  border-bottom-color: #334155;
  color: #e2e8f0;
}
html.dark-mode .db-recent-table th {
  background: #162032;
  color: #94a3b8;
  border-bottom-color: #334155;
}
html.dark-mode .db-recent-table tbody tr { background-color: #1e293b; }
html.dark-mode .db-recent-table td {
  color: #e2e8f0;
  border-color: #334155;
  background-color: #1e293b;
}
html.dark-mode .db-recent-table tbody tr:hover td { background-color: rgba(2,132,199,.1) !important; }
html.dark-mode .db-upload-zone { border-color: #334155; }
html.dark-mode .db-upload-zone:hover { border-color: #0284c7; background: rgba(2,132,199,.08); }
html.dark-mode .db-inbox-item { border-bottom-color: #334155; }
html.dark-mode .db-inbox-name { color: #e2e8f0; }
html.dark-mode .db-inbox-from { color: #64748b; }
html.dark-mode .db-quick-item { background: #162032; border-color: #334155; color: #e2e8f0; }
html.dark-mode .db-quick-item:hover { background: rgba(2,132,199,.15); border-color: #0284c7; color: #38bdf8; }
html.dark-mode .db-quick-item i { color: #38bdf8; }

/* GTranslate dark mode — flat, matches other btn-navbar dark style */
html.dark-mode .gtranslate_wrapper a,
html.dark-mode .gtranslate_wrapper .gt_switcher_open {
  color: rgba(255, 255, 255, 0.85) !important;
  background-color: transparent !important;
  border-color: transparent !important;
}
html.dark-mode .gtranslate_wrapper a:hover,
html.dark-mode .gtranslate_wrapper .gt_switcher_open:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}
html.dark-mode .gtranslate_wrapper a::before,
html.dark-mode .gtranslate_wrapper .gt_switcher_open::before {
  color: rgba(255, 255, 255, 0.85);
}
