/* Global Cabin Font Implementation */
* {
  font-family:
    "Cabin",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    "Noto Sans",
    "Liberation Sans",
    Arial,
    sans-serif !important;
}

/* Preserve Font Awesome icons */
.fa,
.fas,
.far,
.fab,
.fal,
.fad,
.fat,
.fa-solid,
.fa-regular,
.fa-brands,
.fa-light,
.fa-duotone,
.fa-thin {
  font-family:
    "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 6 Pro" !important;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow:
    0 0 0 0.1rem white,
    0 0 0 0.25rem rgba(188, 31, 39, 0.25);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* ===============================
   Man Power: DataTable on mobile
   - Enables horizontal scroll without Responsive (+) control
   =============================== */
.mp-table-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.mp-scroll-indicator {
  display: none;
  text-align: center;
  padding: 0.5rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 6px;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  color: #6c757d;
}

.mp-table-wrapper table.dataTable {
  width: 100% !important;
}

/* Prevent action menu from being hidden behind surrounding UI */
.mp-table-wrapper .dropdown-menu {
  z-index: 2000;
}

@media (max-width: 768px) {
  .mp-scroll-indicator {
    display: block;
  }

  .mp-table-wrapper table.dataTable {
    min-width: 900px;
  }
}

/* Make SweetAlert2 action buttons equal width */
.swal2-actions.equal-width {
  display: flex !important;
  gap: 10px;
  padding: 0 1rem !important;
}

.swal2-actions.equal-width .swal2-confirm,
.swal2-actions.equal-width .swal2-cancel {
  flex: 1 1 0;
  min-width: 0; /* prevent overflow */
  text-align: center;
}

/* Optional: make heights consistent and nice rounded corners */
.swal2-actions.equal-width .swal2-styled {
  padding: 8px 10px;
  border-radius: 6px;
}

/* ===== Override ukuran font sidebar (diperkecil 1 tingkat) ===== */
#sidebar {
  font-size: 0.7em; /* kecilkan keseluruhan di area sidebar */
}
#sidebar .menu-text {
  font-size: 13px !important;
}
#sidebar .menu-submenu .menu-text {
  font-size: 13px !important;
}
#sidebar .menu-header {
  font-size: 13px !important;
}
#sidebar .menu-icon i {
  font-size: 18px !important;
}
#sidebar .menu-link {
  padding: 5px 12px !important; /* perkecil jarak vertical */
}
#sidebar .menu-submenu .menu-link {
  padding: 5px 14px !important; /* submenu lebih rapat sedikit */
}
/* Kurangi gap antar item bertetangga (jika template memberi margin) */
#sidebar .menu .menu-item + .menu-item {
  margin-top: 2px !important;
}

/* ===== Sign Out Confirmation Popup Styling ===== */
.sign-out-confirmation-popup {
  border-radius: 12px !important;
  padding: 0 !important;
  max-width: 480px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

.sign-out-confirmation-title {
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  margin-bottom: 1rem !important;
  padding: 1.5rem 1.5rem 0.5rem 1.5rem !important;
}

.sign-out-confirmation-content {
  padding: 0 1.5rem !important;
  text-align: left !important;
  color: #4b5563 !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
}

.sign-out-confirmation-content p {
  margin-bottom: 1rem !important;
  color: #374151 !important;
}

.sign-out-confirmation-content .alert {
  border-radius: 8px !important;
  padding: 1rem !important;
  margin-bottom: 1rem !important;
  border-left: 4px solid #ffc107 !important;
}

.sign-out-confirmation-content .alert strong {
  color: #92400e !important;
  display: block !important;
  margin-bottom: 0.5rem !important;
}

.sign-out-confirmation-content .alert ul {
  margin: 0.5rem 0 0 1.25rem !important;
  padding-left: 0 !important;
}

.sign-out-confirmation-content .alert li {
  margin-bottom: 0.25rem !important;
  color: #78350f !important;
}

.sign-out-confirmation-content .alert i {
  color: #f59e0b !important;
  font-size: 1.1rem !important;
}

.sign-out-confirmation-confirm-btn,
.sign-out-confirmation-cancel-btn {
  border-radius: 8px !important;
  padding: 0.625rem 1.5rem !important;
  font-weight: 500 !important;
  font-size: 0.95rem !important;
  transition: all 0.2s ease !important;
  border: none !important;
  min-width: 120px !important;
}

.sign-out-confirmation-confirm-btn {
  background-color: #dc3545 !important;
  color: white !important;
}

.sign-out-confirmation-confirm-btn:hover {
  background-color: #c82333 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3) !important;
}

.sign-out-confirmation-cancel-btn {
  background-color: #6c757d !important;
  color: white !important;
}

.sign-out-confirmation-cancel-btn:hover {
  background-color: #5a6268 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3) !important;
}

[data-bs-theme="dark"] .sign-out-confirmation-popup {
  background-color: #1f2937 !important;
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .sign-out-confirmation-title {
  color: #f9fafb !important;
}

[data-bs-theme="dark"] .sign-out-confirmation-content {
  color: #d1d5db !important;
}

[data-bs-theme="dark"] .sign-out-confirmation-content p {
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .sign-out-confirmation-content .alert {
  background-color: #111827 !important;
  border-left-color: #f59e0b !important;
}

[data-bs-theme="dark"] .sign-out-confirmation-content .alert strong {
  color: #fbbf24 !important;
}

[data-bs-theme="dark"] .sign-out-confirmation-content .alert li {
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .sign-out-confirmation-content .alert i {
  color: #fbbf24 !important;
}

/* SweetAlert2 Actions Container */
.swal2-actions {
  gap: 0.75rem !important;
  margin-top: 1.5rem !important;
  padding: 0 1.5rem 1.5rem 1.5rem !important;
  justify-content: flex-end !important;
}

/* SweetAlert2 Icon Styling */
.swal2-icon.swal2-warning {
  border-color: #ffc107 !important;
  color: #ffc107 !important;
  margin: 1.5rem auto 0.5rem auto !important;
}

.swal2-icon.swal2-warning .swal2-icon-content {
  font-size: 3.5rem !important;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .sign-out-confirmation-popup {
    max-width: 90% !important;
    margin: 1rem !important;
  }

  .sign-out-confirmation-title {
    font-size: 1.25rem !important;
    padding: 1.25rem 1.25rem 0.5rem 1.25rem !important;
  }

  .sign-out-confirmation-content {
    padding: 0 1.25rem !important;
  }

  .swal2-actions {
    flex-direction: column !important;
    width: 100% !important;
  }

  .sign-out-confirmation-confirm-btn,
  .sign-out-confirmation-cancel-btn {
    width: 100% !important;
  }
}
#sidebar .card,
#sidebar .card .small,
#sidebar .card .text-muted,
#sidebar .card .fw-semibold,
#sidebar .card .fw-bold {
  font-size: 0.7em;
}

/* === Responsive tweaks for sidebar org card & modal === */
@media (max-width: 576px) {
  #sidebar .card {
    background: rgba(255, 255, 255, 0.12) !important;
  }
  #sidebar .card .small {
    font-size: 0.8rem !important;
  }
  #sidebar #currentOrgName {
    font-size: 0.9rem !important;
  }
  /* make modal body comfy on small screens */
  #orgSelectModal .modal-body {
    padding: 0.75rem 0.75rem;
  }
  #orgSelectModal .input-group-text,
  #orgSelectModal .form-control {
    font-size: 0.9rem;
  }
  /* widen header search autocomplete for mobile */
  #menuAutocomplete {
    left: -40px !important; /* align with icon space */
    right: -12px !important; /* stretch to screen edge padding */
    width: auto !important;
    max-width: none !important;
  }
  #menuAutocomplete .small {
    font-size: 0.9rem;
  }
}

/* === Brand Color Palette Implementation === */
/* Primary: #BC1F27 (Brand Red) */
:root {
  /* Primary Colors */
  --bs-primary: #bc1f27;
  --bs-primary-rgb: 188, 31, 39;
  --bs-primary-bg-subtle: #fdf2f2;
  --bs-primary-border-subtle: #f2a8ac;
  --bs-primary-text-emphasis: #85151a;

  /* Secondary Colors */
  --bs-secondary: #6b7280;
  --bs-secondary-rgb: 107, 114, 128;

  /* Success Colors */
  --bs-success: #059669;
  --bs-success-rgb: 5, 150, 105;

  /* Warning Colors */
  --bs-warning: #d97706;
  --bs-warning-rgb: 217, 119, 6;

  /* Danger Colors */
  --bs-danger: #85151a;
  --bs-danger-rgb: 133, 21, 26;

  /* Info Colors */
  --bs-info: #0284c7;
  --bs-info-rgb: 2, 132, 199;

  /* Link Colors */
  --bs-link-color: #bc1f27;
  --bs-link-hover-color: #9e1a20;

  /* Disabled form controls — global standard (contrast + non-color cues; use in custom UIs via these vars) */
  --app-form-disabled-bg: #cfd8e3;
  --app-form-disabled-color: #334155;
  --app-form-disabled-border: #a8b5c4;
  --app-form-disabled-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* =============================================================================
   Global disabled state — form controls (Bootstrap 5)
   Replaces low-contrast default (opacity-only) with explicit surface + text +
   border + cursor + inset shadow (WCAG: do not rely on color alone).
   Variables: --app-form-disabled-* (overridden in [data-bs-theme="dark"]).
   ============================================================================= */
.form-floating > .form-control:disabled ~ label,
.form-floating > .form-select:disabled ~ label {
  color: var(--app-form-disabled-color) !important;
  opacity: 1 !important;
}

.form-control:disabled,
.form-select:disabled {
  background-color: var(--app-form-disabled-bg) !important;
  color: var(--app-form-disabled-color) !important;
  border-color: var(--app-form-disabled-border) !important;
  opacity: 1 !important;
  cursor: not-allowed;
  box-shadow: var(--app-form-disabled-shadow);
  -webkit-text-fill-color: var(--app-form-disabled-color);
}

.form-select:disabled {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
}

[data-bs-theme="dark"] .form-select:disabled {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
}

.form-check-input:disabled {
  --bs-form-control-bg: var(--app-form-disabled-bg);
  background-color: var(--app-form-disabled-bg) !important;
  border-color: var(--app-form-disabled-border) !important;
  opacity: 1 !important;
  cursor: not-allowed;
  filter: grayscale(0.15);
}

.form-check-input:disabled:checked {
  --bs-form-check-bg: var(--app-form-disabled-border);
  background-color: var(--app-form-disabled-border) !important;
  border-color: var(--app-form-disabled-border) !important;
}

.form-range:disabled {
  opacity: 1 !important;
  filter: grayscale(0.35) brightness(0.92);
  cursor: not-allowed;
}

/* Select2 (Bootstrap 5 theme) — match global disabled look */
.select2-container--disabled .select2-selection--single,
.select2-container--disabled .select2-selection--multiple {
  background-color: var(--app-form-disabled-bg) !important;
  border-color: var(--app-form-disabled-border) !important;
  color: var(--app-form-disabled-color) !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  box-shadow: var(--app-form-disabled-shadow);
}

.select2-container--disabled .select2-selection__rendered {
  color: var(--app-form-disabled-color) !important;
}

/* Buttons: reinforce non-interactive cue (keeps existing theme colors; opacity from BS) */
.btn:disabled,
.btn.disabled,
fieldset:disabled .btn {
  cursor: not-allowed;
}

/* Primary Button */
.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #bc1f27;
  --bs-btn-border-color: #bc1f27;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #9e1a20;
  --bs-btn-hover-border-color: #85151a;
  --bs-btn-focus-shadow-rgb: 188, 31, 39;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #85151a;
  --bs-btn-active-border-color: #6b1014;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #bc1f27;
  --bs-btn-disabled-border-color: #bc1f27;
  --bs-btn-disabled-opacity: 0.5;
}

/* Outline Primary Button */
.btn-outline-primary {
  --bs-btn-color: #bc1f27;
  --bs-btn-border-color: #bc1f27;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #bc1f27;
  --bs-btn-hover-border-color: #bc1f27;
  --bs-btn-focus-shadow-rgb: 188, 31, 39;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #bc1f27;
  --bs-btn-active-border-color: #bc1f27;
  --bs-btn-disabled-color: #bc1f27;
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: #bc1f27;
  --bs-gradient: none;
}

/* Secondary Button */
.btn-secondary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #6b7280;
  --bs-btn-border-color: #6b7280;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #4b5563;
  --bs-btn-hover-border-color: #374151;
  --bs-btn-focus-shadow-rgb: 107, 114, 128;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #374151;
  --bs-btn-active-border-color: #1f2937;
}

/* Success Button */
.btn-success {
  --bs-btn-color: #fff;
  --bs-btn-bg: #059669;
  --bs-btn-border-color: #059669;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #047857;
  --bs-btn-hover-border-color: #065f46;
  --bs-btn-focus-shadow-rgb: 5, 150, 105;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #065f46;
  --bs-btn-active-border-color: #064e3b;
}

/* Warning Button */
.btn-warning {
  --bs-btn-color: #fff;
  --bs-btn-bg: #d97706;
  --bs-btn-border-color: #d97706;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #b45309;
  --bs-btn-hover-border-color: #92400e;
  --bs-btn-focus-shadow-rgb: 217, 119, 6;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #92400e;
  --bs-btn-active-border-color: #78350f;
}

/* Danger Button */
.btn-danger {
  --bs-btn-color: #fff;
  --bs-btn-bg: #85151a;
  --bs-btn-border-color: #85151a;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #6b1014;
  --bs-btn-hover-border-color: #520b0e;
  --bs-btn-focus-shadow-rgb: 133, 21, 26;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #520b0e;
  --bs-btn-active-border-color: #3a080a;
}

/* Info Button */
.btn-info {
  --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: #075985;
  --bs-btn-focus-shadow-rgb: 2, 132, 199;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #075985;
  --bs-btn-active-border-color: #0c4a6e;
}

/* Link Styling */
a {
  color: var(--bs-link-color);
  text-decoration: underline;
}

a:hover {
  color: var(--bs-link-hover-color);
}

/* Theme Button (if using .btn-theme class) */
.btn-theme {
  --bs-btn-color: #fff;
  --bs-btn-bg: #bc1f27;
  --bs-btn-border-color: #bc1f27;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #9e1a20;
  --bs-btn-hover-border-color: #85151a;
  --bs-btn-focus-shadow-rgb: 188, 31, 39;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #85151a;
  --bs-btn-active-border-color: #6b1014;
}

.btn-outline-theme {
  --bs-btn-color: #bc1f27;
  --bs-btn-border-color: #bc1f27;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #bc1f27;
  --bs-btn-hover-border-color: #bc1f27;
  --bs-btn-focus-shadow-rgb: 188, 31, 39;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #bc1f27;
  --bs-btn-active-border-color: #bc1f27;
}

/* === Global content font size to match notification page === */
/* Ukuran font konten mengikuti halaman notifikasi */
.app-content,
.content,
.page-content,
.container,
.container-fluid {
  font-size: 0.85rem;
}

/* Global horizontal padding tightening so content sits closer to sidebar and right edge */
.app-content,
.content,
.page-content,
.container-fluid {
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}
@media (min-width: 1200px) {
  .app-content,
  .content,
  .page-content,
  .container-fluid {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
}

/* Align header search area padding with page content */
.app-header,
.app-header .menu {
  padding-left: 0.25rem !important;
  padding-right: 0.5rem !important;
}
@media (min-width: 1200px) {
  .app-header,
  .app-header .menu {
    padding-left: 0.5rem !important;
    padding-right: 0.75rem !important;
  }
}

/* Header dropdown styling: outline and comfortable item spacing */
.app-header .dropdown-menu {
  border: 1px solid #bc1f27 !important; /* brand red outline */
  border-radius: 0.5rem !important;
  padding: 0.5rem !important; /* inner spacing */
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}
.app-header .dropdown-menu .dropdown-item {
  margin: 0.15rem 0; /* vertical gap between items */
  border-radius: 0.35rem;
  padding: 0.4rem 0.75rem;
}
.app-header .dropdown-menu .dropdown-item:hover {
  background: rgba(188, 31, 39, 0.08); /* brand red with opacity */
}

/* Pull search box further left */
.app-header .menu .menu-search {
  margin-left: 0 !important;
}

/* Sedikit perataan untuk tabel & form agar tetap terbaca */
.container-fluid table thead th,
.container-fluid table tbody td {
  font-size: 1em; /* ikut 0.8rem base dari container */
}

.container-fluid .form-control,
.container-fluid .form-select,
.container-fluid .form-label {
  font-size: 0.85rem; /* konsisten dengan base container */
}

.container-fluid .btn {
  font-size: 0.85rem; /* konsisten dengan base container */
}

.container-fluid .btn-sm {
  font-size: 0.75rem; /* button kecil mengikuti notifikasi page */
}

/* Headings & section titles scaled to match notification page */
.app-content h1,
.content h1,
.page-content h1,
.container-fluid h1 {
  font-size: 1.6rem;
}
.app-content h2,
.content h2,
.page-content h2,
.container-fluid h2 {
  font-size: 1.35rem;
}
.app-content h3,
.content h3,
.page-content h3,
.container-fluid h3 {
  font-size: 1.1rem;
}
.app-content h4,
.content h4,
.page-content h4,
.container-fluid h4 {
  font-size: 1rem;
}
.app-content h5,
.content h5,
.page-content h5,
.container-fluid h5 {
  font-size: 0.9rem;
}
.app-content h6,
.content h6,
.page-content h6,
.container-fluid h6 {
  font-size: 0.9rem;
}

/* Page header component */
.page-header {
  font-size: 1.35rem;
}
.page-header small {
  font-size: 0.9em;
}

/* Card / Panel titles */
.card .card-header,
.panel .panel-heading {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.card .card-header,
.card .card-header .fw-bold,
.panel .panel-title {
  font-size: 1rem;
}

/* Table header cells slightly reduced */
.table thead th {
  font-size: 1em;
}

/* Form labels to match notification page (exclude sidebar) */
.app-content .form-label,
.content .form-label,
.page-content .form-label,
.container .form-label,
.container-fluid .form-label,
:not(#sidebar) .form-label,
:not(#sidebar) label {
  font-size: 0.85rem;
}

/* Text muted small to match notification page (exclude sidebar) */
.app-content .text-muted.small,
.content .text-muted.small,
.page-content .text-muted.small,
.container-fluid .text-muted.small,
:not(#sidebar) .text-muted.small,
:not(#sidebar) .small.text-muted {
  font-size: 0.75rem !important;
}

/* List items to match notification page (exclude sidebar) */
.app-content .list-group-item,
.content .list-group-item,
.page-content .list-group-item,
.container-fluid .list-group-item,
:not(#sidebar) .list-group-item {
  font-size: 0.85rem;
}

/* Body text and paragraphs (exclude sidebar) */
.app-content p,
.content p,
.page-content p,
.container-fluid p,
:not(#sidebar) p {
  font-size: 0.85rem;
}

/* Text muted to match notification page (exclude sidebar) */
.app-content .text-muted,
.content .text-muted,
.page-content .text-muted,
.container-fluid .text-muted,
:not(#sidebar) .text-muted {
  font-size: 0.8rem;
}

/* ===== Language Selector Styling ===== */
.lang-selector-container {
  position: relative;
  margin-right: 25px !important; /* Space from notification bell - increased for full text display */
}

.lang-selector-trigger {
  cursor: pointer;
  user-select: none;
}

.lang-selector-content {
  gap: 0.5rem; /* Increased gap between icon and text */
}

.lang-globe-icon {
  font-size: 1.25rem !important;
  color: #6c757d;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.lang-selector-trigger:hover .lang-globe-icon {
  color: #bc1f27;
  transform: rotate(15deg);
}

.lang-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: #495057;
  white-space: nowrap;
  /* Desktop: Show full text, no truncation */
}

.lang-text-mobile {
  display: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: #495057;
}

.lang-selector-trigger:hover .lang-text,
.lang-selector-trigger:hover .lang-text-mobile {
  color: #bc1f27;
}

.lang-dropdown-menu {
  min-width: 200px;
  padding: 0.5rem 0 !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
  margin-top: 8px !important;
}

.lang-option {
  padding: 0.625rem 1rem !important;
  transition: all 0.2s ease;
  border: none !important;
  cursor: pointer;
}

.lang-option:hover {
  background-color: #f8f9fa !important;
  color: #bc1f27 !important;
}

.lang-option.active {
  background-color: #fff5f5 !important;
  color: #bc1f27 !important;
  font-weight: 600;
}

.lang-option.active .lang-check-icon {
  display: inline-block !important;
  color: #bc1f27;
}

.lang-flag {
  font-size: 1.25rem;
  line-height: 1;
}

.lang-check-icon {
  color: #28a745;
  font-size: 0.875rem;
}

/* Mobile Responsive */
@media (max-width: 576px) {
  .lang-text {
    display: none;
  }

  .lang-text-mobile {
    display: inline-block;
  }

  .lang-selector-content {
    gap: 0.375rem;
  }

  .lang-dropdown-menu {
    min-width: 160px;
  }

  .lang-option {
    padding: 0.5rem 0.875rem !important;
    font-size: 0.875rem;
  }

  .lang-globe-icon {
    font-size: 1.1rem !important;
  }

  .lang-selector-container {
    margin-right: 8px !important;
  }
}

/* Profile User Info Styling - Mobile */
.profile-user-info-mobile {
  padding: 0.75rem 0.75rem 0.75rem 0.75rem; /* Keep padding, adjust margins to not cover dropdown border */
  margin: 0.5rem -0.75rem 0.75rem -0.75rem; /* Changed from negative top margin to positive to preserve dropdown outline */
  background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
  border-bottom: 2px solid #f8f9fa;
}

.profile-info-card {
  padding: 1rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
}

.profile-info-header {
  display: flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c757d;
  margin-bottom: 0.35rem;
}

.profile-info-header i {
  font-size: 0.75rem;
  color: #bc1f27;
  width: 16px;
  text-align: center;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.profile-info-label {
  flex: 1;
}

.profile-info-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: #212529;
  line-height: 1.4;
  word-break: break-word;
  padding-left: 24px;
}

.profile-info-company {
  font-weight: 600;
  color: #bc1f27;
  font-size: 0.9rem;
}

@media (max-width: 576px) {
  .profile-user-info-mobile {
    padding: 0.5rem 0.75rem;
    margin: 0.5rem -0.75rem 0.5rem -0.75rem; /* Changed from negative top margin to positive to preserve dropdown outline */
  }

  .profile-info-card {
    padding: 0.875rem;
    border-radius: 10px;
  }

  .profile-info-header {
    font-size: 0.65rem;
    margin-bottom: 0.3rem;
  }

  .profile-info-header i {
    font-size: 0.7rem;
    width: 14px;
  }

  .profile-info-value {
    font-size: 0.8rem;
    padding-left: 22px;
  }

  .profile-info-company {
    font-size: 0.85rem;
  }
}

/* ===== Notification Dropdown Styling ===== */
.notif-dropdown-container {
  position: relative;
}

/* Bell Icon */
.notif-bell-icon {
  font-size: 1.35rem !important;
  color: #bc1f27;
  transition: all 0.3s ease;
}

.notif-bell-trigger:hover .notif-bell-icon {
  color: #9e1a20;
  transform: scale(1.1);
}

/* Bell Animation */
.notif-bell-animated {
  animation: bellRing 2s ease-in-out infinite;
}

@keyframes bellRing {
  0%,
  100% {
    transform: rotate(0);
  }
  5%,
  15% {
    transform: rotate(15deg);
  }
  10%,
  20% {
    transform: rotate(-15deg);
  }
  25% {
    transform: rotate(0);
  }
}

/* Badge Count */
.notif-badge-count {
  position: absolute;
  top: -0.35rem;
  right: -0.35rem;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: 50px;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Dropdown Menu */
.notif-dropdown-menu {
  width: 380px !important;
  max-width: 95vw;
  padding: 0 !important;
  border: none !important;
  border-radius: 16px !important;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(0, 0, 0, 0.05) !important;
  overflow: hidden;
  margin-top: 8px !important; /* Space from trigger button */
  animation: dropdownSlide 0.25s ease-out;
}

/* Desktop: Ensure dropdown is visible when shown */
@media (min-width: 577px) {
  .notif-dropdown-container .dropdown-menu.notif-dropdown-menu.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: absolute !important;
  }
}

@keyframes dropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
.notif-dropdown-header {
  background: linear-gradient(135deg, #bc1f27 0%, #9e1a20 50%, #85151a 100%);
  padding: 1rem 1.25rem;
  color: #fff;
}

.notif-header-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.notif-dropdown-header h6 {
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: #fff !important;
}

.notif-dropdown-header small {
  font-size: 0.75rem;
}

.notif-mark-all-read {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #fff;
  text-decoration: none !important;
  transition: all 0.2s ease;
  flex-shrink: 0;
  line-height: 1;
  padding: 0;
  margin-left: auto;
  position: relative;
}

.notif-mark-all-read i {
  font-size: 0.875rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.notif-mark-all-read:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: scale(1.05);
}

/* Body */
.notif-dropdown-body {
  max-height: 380px;
  overflow-y: auto;
  background: #fafafa;
}

.notif-dropdown-body::-webkit-scrollbar {
  width: 6px;
}

.notif-dropdown-body::-webkit-scrollbar-track {
  background: transparent;
}

.notif-dropdown-body::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.notif-dropdown-body::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Notification Item */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  text-decoration: none !important;
  background: #fff;
  border-bottom: 1px solid #f3f4f6;
  position: relative;
  transition: all 0.2s ease;
  cursor: pointer;
}

.notif-item:hover {
  background: #f9fafb;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-unread {
  background: linear-gradient(90deg, rgba(188, 31, 39, 0.03) 0%, #fff 100%);
}

.notif-unread:hover {
  background: linear-gradient(90deg, rgba(188, 31, 39, 0.06) 0%, #f9fafb 100%);
}

/* Left indicator line */
.notif-item-indicator {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.notif-item:hover .notif-item-indicator {
  opacity: 1;
}

/* Icon */
.notif-item-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.notif-item:hover .notif-item-icon {
  transform: scale(1.05);
}

/* Content */
.notif-item-content {
  flex: 1;
  min-width: 0;
}

.notif-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.notif-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-item-time {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: #9ca3af;
  font-weight: 500;
}

.notif-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.notif-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.notif-priority-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 6px;
}

.notif-priority-high {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.1);
}

.notif-priority-medium {
  color: #d97706;
  background: rgba(245, 158, 11, 0.1);
}

.notif-priority-low {
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
}

.notif-item-preview {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Unread Dot */
.notif-unread-dot {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 8px;
  height: 8px;
  background: #bc1f27;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(188, 31, 39, 0.2);
}

/* Empty State */
.notif-empty-state {
  padding: 3rem 2rem;
  text-align: center;
}

.notif-empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notif-empty-icon i {
  font-size: 2rem;
  color: #9ca3af;
}

.notif-empty-state h6 {
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.notif-empty-state p {
  font-size: 0.8rem;
  color: #9ca3af;
  margin: 0;
  line-height: 1.5;
}

/* Footer */
.notif-dropdown-footer {
  padding: 0.75rem 1.25rem;
  background: #fff;
  border-top: 1px solid #f3f4f6;
}

.notif-view-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #bc1f27;
  background: linear-gradient(
    135deg,
    rgba(188, 31, 39, 0.08),
    rgba(188, 31, 39, 0.04)
  );
  border: 1px solid rgba(188, 31, 39, 0.15);
  border-radius: 10px;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.notif-view-all-btn:hover {
  background: linear-gradient(135deg, #bc1f27, #9e1a20);
  color: #fff;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(188, 31, 39, 0.3);
}

.notif-view-all-btn i {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.notif-view-all-btn:hover i {
  transform: translateX(3px);
}

/* Dark Mode Support */
[data-bs-theme="dark"] .notif-dropdown-menu,
.dark-mode .notif-dropdown-menu {
  background: #1f2937;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .notif-dropdown-body,
.dark-mode .notif-dropdown-body {
  background: #111827;
}

[data-bs-theme="dark"] .notif-item,
.dark-mode .notif-item {
  background: #1f2937;
  border-color: #374151;
}

[data-bs-theme="dark"] .notif-item:hover,
.dark-mode .notif-item:hover {
  background: #374151;
}

[data-bs-theme="dark"] .notif-unread,
.dark-mode .notif-unread {
  background: linear-gradient(90deg, rgba(188, 31, 39, 0.1) 0%, #1f2937 100%);
}

[data-bs-theme="dark"] .notif-item-title,
.dark-mode .notif-item-title {
  color: #f9fafb;
}

[data-bs-theme="dark"] .notif-item-preview,
[data-bs-theme="dark"] .notif-item-time,
.dark-mode .notif-item-preview,
.dark-mode .notif-item-time {
  color: #9ca3af;
}

[data-bs-theme="dark"] .notif-type-badge,
.dark-mode .notif-type-badge {
  background: #374151;
  color: #d1d5db;
}

[data-bs-theme="dark"] .notif-dropdown-footer,
.dark-mode .notif-dropdown-footer {
  background: #1f2937;
  border-color: #374151;
}

[data-bs-theme="dark"] .notif-view-all-btn,
.dark-mode .notif-view-all-btn {
  background: rgba(188, 31, 39, 0.15);
  border-color: rgba(188, 31, 39, 0.3);
}

[data-bs-theme="dark"] .notif-empty-icon,
.dark-mode .notif-empty-icon {
  background: linear-gradient(135deg, #374151, #4b5563);
}

[data-bs-theme="dark"] .notif-empty-state h6,
.dark-mode .notif-empty-state h6 {
  color: #f9fafb;
}

[data-bs-theme="dark"] .notif-empty-state p,
.dark-mode .notif-empty-state p {
  color: #6b7280;
}

/* Dark mode: Header text colors */
[data-bs-theme="dark"] .notif-dropdown-header,
.dark-mode .notif-dropdown-header {
  color: #fff;
}

[data-bs-theme="dark"] .notif-dropdown-header h6,
.dark-mode .notif-dropdown-header h6 {
  color: #fff !important;
}

[data-bs-theme="dark"] .notif-dropdown-header small,
.dark-mode .notif-dropdown-header small {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Dark mode: View all button text */
[data-bs-theme="dark"] .notif-view-all-btn,
.dark-mode .notif-view-all-btn {
  color: #f87171 !important;
}

[data-bs-theme="dark"] .notif-view-all-btn:hover,
.dark-mode .notif-view-all-btn:hover {
  color: #fff !important;
}

/* Dark mode: Priority badges */
[data-bs-theme="dark"] .notif-priority-high,
.dark-mode .notif-priority-high {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.2);
}

[data-bs-theme="dark"] .notif-priority-medium,
.dark-mode .notif-priority-medium {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.2);
}

[data-bs-theme="dark"] .notif-priority-low,
.dark-mode .notif-priority-low {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.2);
}

/* Dark mode: Empty state icon */
[data-bs-theme="dark"] .notif-empty-icon i,
.dark-mode .notif-empty-icon i {
  color: #6b7280;
}

/* Dark mode: Unread dot */
[data-bs-theme="dark"] .notif-unread-dot,
.dark-mode .notif-unread-dot {
  background: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.3);
}

/* Dark mode: Mark all read button */
[data-bs-theme="dark"] .notif-mark-all-read,
.dark-mode .notif-mark-all-read {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .notif-mark-all-read:hover,
.dark-mode .notif-mark-all-read:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Responsive - Tablet */
@media (max-width: 768px) {
  .notif-dropdown-menu {
    width: 340px !important;
    max-width: calc(100vw - 20px) !important;
  }

  .notif-dropdown-body {
    max-height: 320px;
  }
}

/* Responsive - Mobile */
@media (max-width: 576px) {
  /* Hide dropdown by default on mobile */
  .notif-dropdown-container .dropdown-menu.notif-dropdown-menu:not(.show) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }

  /* Position dropdown below topbar on mobile - ONLY when shown */
  .notif-dropdown-container .dropdown-menu.notif-dropdown-menu.show {
    position: fixed !important;
    top: 60px !important; /* Below topbar header */
    bottom: auto !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    transform: translateY(0) !important;
    margin: 0 !important;
    border-radius: 12px !important;
    max-height: calc(100vh - 80px) !important;
    max-height: calc(100dvh - 80px) !important;
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1050 !important;
  }

  .notif-dropdown-header {
    padding: 1rem;
    flex-shrink: 0;
  }

  .notif-dropdown-header .d-flex {
    gap: 0.75rem;
  }

  .notif-header-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    flex-shrink: 0;
  }

  .notif-dropdown-header h6 {
    font-size: 0.9rem;
    margin: 0;
  }

  .notif-dropdown-header small {
    font-size: 0.7rem;
    display: block;
    margin-top: 0.25rem;
  }

  /* Mark as read button on mobile */
  .notif-mark-all-read {
    width: 32px;
    height: 32px;
    min-width: 32px;
    flex-shrink: 0;
  }

  .notif-mark-all-read i {
    font-size: 0.75rem;
  }

  .notif-dropdown-body {
    max-height: calc(85vh - 140px);
    max-height: calc(85dvh - 140px);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
  }

  .notif-item {
    padding: 0.875rem 1rem;
    gap: 0.75rem;
  }

  .notif-item-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 0.9rem;
    border-radius: 10px;
    flex-shrink: 0;
  }

  .notif-item-title {
    font-size: 0.85rem;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .notif-item-time {
    font-size: 0.7rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .notif-item-meta {
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
  }

  .notif-type-badge,
  .notif-priority-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    line-height: 1.2;
  }

  .notif-item-preview {
    font-size: 0.75rem;
    line-height: 1.4;
    margin-top: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .notif-unread-dot {
    width: 8px;
    height: 8px;
    top: 1rem;
    right: 1rem;
  }

  .notif-dropdown-footer {
    padding: 0.75rem 1rem;
    flex-shrink: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
  }

  .notif-view-all-btn {
    padding: 0.625rem 1rem;
    font-size: 0.85rem;
    width: 100%;
    justify-content: center;
  }

  /* Empty state mobile */
  .notif-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
  }

  .notif-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
  }

  .notif-empty-icon i {
    font-size: 1.75rem;
  }

  .notif-empty-state h6 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .notif-empty-state p {
    font-size: 0.85rem;
    margin: 0;
  }

  /* Badge count on mobile */
  .notif-badge-count {
    font-size: 0.6rem;
    min-width: 1.1rem;
    height: 1.1rem;
    line-height: 1.1rem;
  }

  /* Bell icon on mobile */
  .notif-bell-icon {
    font-size: 1.1rem;
  }
}

/* Very small screens */
@media (max-width: 380px) {
  .notif-dropdown-container .dropdown-menu.notif-dropdown-menu {
    left: 5px !important;
    right: 5px !important;
    width: calc(100vw - 10px) !important;
  }

  .notif-item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .notif-item-time {
    order: -1;
    color: #6b7280;
  }
}

/* ----- DataTables (Global) ----- */
.dataTables_wrapper .dataTables_length {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  text-align: right;
}

.dataTables_wrapper .dataTables_length label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
}

.dataTables_wrapper > .row:first-child {
  justify-content: flex-end;
}

.dataTables_wrapper > .row:first-child > div:first-child {
  flex: 0 0 100%;
  max-width: 100%;
}

/* ============================================== */
/* ===== GLOBAL DARK MODE STYLES =============== */
/* ============================================== */

/* ----- Base Colors ----- */
[data-bs-theme="dark"] {
  --bs-body-color: #e5e7eb;
  --bs-body-bg: #111827;
  --bs-secondary-color: #9ca3af;
  --bs-tertiary-color: #6b7280;
  --bs-border-color: #374151;
  --bs-card-bg: #1f2937;
  --bs-card-border-color: #374151;

  --app-form-disabled-bg: #0f172a;
  --app-form-disabled-color: #94a3b8;
  --app-form-disabled-border: #475569;
  --app-form-disabled-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* ----- Body & Content ----- */
[data-bs-theme="dark"] body,
[data-bs-theme="dark"] .app-content,
[data-bs-theme="dark"] #content {
  background-color: #111827 !important;
  color: #e5e7eb !important;
}

/* ----- Cards ----- */
[data-bs-theme="dark"] .card {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .card-header {
  background-color: #1f2937 !important;
  border-bottom-color: #374151 !important;
  color: #f9fafb !important;
}

[data-bs-theme="dark"] .card-footer {
  background-color: #1f2937 !important;
  border-top-color: #374151 !important;
}

[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] .card-header .fw-bold,
[data-bs-theme="dark"] .card h1,
[data-bs-theme="dark"] .card h2,
[data-bs-theme="dark"] .card h3,
[data-bs-theme="dark"] .card h4,
[data-bs-theme="dark"] .card h5,
[data-bs-theme="dark"] .card h6 {
  color: #f9fafb !important;
}

/* ----- Tables ----- */
[data-bs-theme="dark"] .table {
  --bs-table-bg: #1f2937;
  --bs-table-color: #e5e7eb;
  --bs-table-border-color: #374151;
  --bs-table-striped-bg: #283548;
  --bs-table-hover-bg: #374151;
}

[data-bs-theme="dark"] .table thead th {
  background-color: #1f2937 !important;
  color: #f9fafb !important;
  border-color: #374151 !important;
}

[data-bs-theme="dark"] .table tbody td {
  background-color: #1f2937 !important;
  color: #e5e7eb !important;
  border-color: #374151 !important;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > td {
  background-color: #283548 !important;
}

[data-bs-theme="dark"] .table-hover > tbody > tr:hover > td {
  background-color: #374151 !important;
}

/* ----- DataTables ----- */
[data-bs-theme="dark"] .dataTables_wrapper {
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_info,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate {
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length select,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  color: #e5e7eb !important;
}

[data-bs-theme="dark"]
  .dataTables_wrapper
  .dataTables_paginate
  .paginate_button {
  color: #e5e7eb !important;
  background-color: #374151 !important;
  border-color: #4b5563 !important;
}

[data-bs-theme="dark"]
  .dataTables_wrapper
  .dataTables_paginate
  .paginate_button.current,
[data-bs-theme="dark"]
  .dataTables_wrapper
  .dataTables_paginate
  .paginate_button:hover {
  background: linear-gradient(135deg, #bc1f27 0%, #9e1a20 100%) !important;
  border-color: #bc1f27 !important;
  color: #fff !important;
}

[data-bs-theme="dark"]
  .dataTables_wrapper
  .dataTables_paginate
  .paginate_button.disabled {
  color: #6b7280 !important;
  background-color: #1f2937 !important;
}

/* ----- Forms ----- */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  color: #e5e7eb !important;
}

/* Disabled must win over the rule above (same layer; higher specificity) */
[data-bs-theme="dark"] .form-control:disabled,
[data-bs-theme="dark"] .form-select:disabled {
  background-color: var(--app-form-disabled-bg) !important;
  color: var(--app-form-disabled-color) !important;
  border-color: var(--app-form-disabled-border) !important;
  opacity: 1 !important;
  cursor: not-allowed;
  box-shadow: var(--app-form-disabled-shadow);
  -webkit-text-fill-color: var(--app-form-disabled-color);
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background-color: #374151 !important;
  border-color: #bc1f27 !important;
  color: #f9fafb !important;
  box-shadow: 0 0 0 0.25rem rgba(188, 31, 39, 0.25) !important;
}

[data-bs-theme="dark"] .form-control::placeholder {
  color: #9ca3af !important;
}

[data-bs-theme="dark"] .form-control[readonly],
[data-bs-theme="dark"] .form-control-plaintext {
  background-color: #1f2937 !important;
  color: #9ca3af !important;
  border-color: #374151 !important;
}

[data-bs-theme="dark"] .form-label,
[data-bs-theme="dark"] label {
  color: #e5e7eb !important;
}

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

[data-bs-theme="dark"] .input-group-text {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  color: #e5e7eb !important;
}

/* ----- Select2 ----- */
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .select2-container--disabled .select2-selection--single,
[data-bs-theme="dark"] .select2-container--disabled .select2-selection--multiple {
  background-color: var(--app-form-disabled-bg) !important;
  border-color: var(--app-form-disabled-border) !important;
  color: var(--app-form-disabled-color) !important;
  box-shadow: var(--app-form-disabled-shadow);
}

[data-bs-theme="dark"]
  .select2-container--bootstrap-5
  .select2-selection--single
  .select2-selection__rendered {
  color: #e5e7eb !important;
}

[data-bs-theme="dark"]
  .select2-container--bootstrap-5.select2-container--disabled
  .select2-selection__rendered {
  color: var(--app-form-disabled-color) !important;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown {
  background-color: #1f2937 !important;
  border-color: #4b5563 !important;
}

[data-bs-theme="dark"]
  .select2-container--bootstrap-5
  .select2-results__option {
  color: #e5e7eb !important;
}

[data-bs-theme="dark"]
  .select2-container--bootstrap-5
  .select2-results__option--highlighted {
  background-color: #bc1f27 !important;
  color: #fff !important;
}

[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-search__field {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  color: #e5e7eb !important;
}

/* ----- Buttons ----- */
.btn-outline-secondary {
  border-color: #9ca3af !important;
  color: #6b7280 !important;
  background-color: transparent !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active,
.btn-outline-secondary.active,
.btn-outline-secondary:focus-visible,
.btn-check:checked + .btn-outline-secondary,
.btn-check:active + .btn-outline-secondary {
  background-color: #4b5563 !important;
  border-color: #4b5563 !important;
  color: #f9fafb !important;
}

[data-bs-theme="dark"] .btn-light {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .btn-light:hover {
  background-color: #4b5563 !important;
  border-color: #6b7280 !important;
  color: #f9fafb !important;
}

[data-bs-theme="dark"] .btn-outline-secondary {
  border-color: #6b7280 !important;
  color: #9ca3af !important;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover {
  background-color: #6b7280 !important;
  color: #fff !important;
}

/* ----- Modals ----- */
[data-bs-theme="dark"] .modal-content {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .modal-header {
  border-bottom-color: #374151 !important;
}

[data-bs-theme="dark"] .modal-header .modal-title {
  color: #f9fafb !important;
}

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

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

/* ----- Alerts ----- */
[data-bs-theme="dark"] .alert {
  border-width: 1px;
}

[data-bs-theme="dark"] .alert-info {
  background-color: rgba(2, 132, 199, 0.15) !important;
  border-color: rgba(2, 132, 199, 0.3) !important;
  color: #7dd3fc !important;
}

[data-bs-theme="dark"] .alert-success {
  background-color: rgba(5, 150, 105, 0.15) !important;
  border-color: rgba(5, 150, 105, 0.3) !important;
  color: #6ee7b7 !important;
}

[data-bs-theme="dark"] .alert-warning {
  background-color: rgba(217, 119, 6, 0.15) !important;
  border-color: rgba(217, 119, 6, 0.3) !important;
  color: #fcd34d !important;
}

[data-bs-theme="dark"] .alert-danger {
  background-color: rgba(220, 38, 38, 0.15) !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
  color: #fca5a5 !important;
}

/* ----- Badges ----- */
[data-bs-theme="dark"] .badge.bg-light {
  background-color: #374151 !important;
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .badge.bg-secondary {
  background-color: #4b5563 !important;
  color: #e5e7eb !important;
}

/* ----- Dropdowns ----- */
[data-bs-theme="dark"] .dropdown-menu {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
}

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

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
  background-color: #374151 !important;
  color: #f9fafb !important;
}

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

[data-bs-theme="dark"] .dropdown-header {
  color: #9ca3af !important;
}

/* ----- List Groups ----- */
[data-bs-theme="dark"] .list-group-item {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .list-group-item:hover {
  background-color: #374151 !important;
}

[data-bs-theme="dark"] .list-group-item.active {
  background-color: #bc1f27 !important;
  border-color: #bc1f27 !important;
  color: #fff !important;
}

/* ----- Pagination ----- */
[data-bs-theme="dark"] .pagination .page-link {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .pagination .page-link:hover {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  color: #f9fafb !important;
}

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

[data-bs-theme="dark"] .pagination .page-item.disabled .page-link {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
  color: #6b7280 !important;
}

/* ----- Breadcrumbs ----- */
[data-bs-theme="dark"] .breadcrumb {
  background-color: transparent !important;
}

[data-bs-theme="dark"] .breadcrumb-item a {
  color: #9ca3af !important;
}

[data-bs-theme="dark"] .breadcrumb-item a:hover {
  color: #f87171 !important;
}

[data-bs-theme="dark"] .breadcrumb-item.active {
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .breadcrumb-item + .breadcrumb-item::before {
  color: #6b7280 !important;
}

/* ----- Navs & Tabs ----- */
[data-bs-theme="dark"] .nav-tabs {
  border-bottom-color: #374151 !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link {
  color: #9ca3af !important;
  border-color: transparent !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link:hover {
  border-color: #374151 #374151 transparent !important;
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link.active {
  background-color: #1f2937 !important;
  border-color: #374151 #374151 #1f2937 !important;
  color: #f9fafb !important;
}

[data-bs-theme="dark"] .nav-pills .nav-link {
  color: #9ca3af !important;
}

[data-bs-theme="dark"] .nav-pills .nav-link:hover {
  background-color: #374151 !important;
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .nav-pills .nav-link.active {
  background-color: #bc1f27 !important;
  color: #fff !important;
}

/* ----- Progress Bars ----- */
[data-bs-theme="dark"] .progress {
  background-color: #374151 !important;
}

/* ----- Text Colors ----- */
[data-bs-theme="dark"] .text-dark {
  color: #e5e7eb !important;
}

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

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

[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,
[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: #f9fafb !important;
}

/* ----- Borders ----- */
[data-bs-theme="dark"] .border {
  border-color: #374151 !important;
}

[data-bs-theme="dark"] .border-top,
[data-bs-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .border-start,
[data-bs-theme="dark"] .border-end {
  border-color: #374151 !important;
}

/* ----- Backgrounds ----- */
[data-bs-theme="dark"] .bg-white {
  background-color: #1f2937 !important;
}

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

[data-bs-theme="dark"] .bg-body {
  background-color: #111827 !important;
}

/* ----- Page Header ----- */
[data-bs-theme="dark"] .page-header {
  color: #f9fafb !important;
}

[data-bs-theme="dark"] .page-header small {
  color: #9ca3af !important;
}

/* ----- Panel / Accordion ----- */
[data-bs-theme="dark"] .panel {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
}

[data-bs-theme="dark"] .panel-heading {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
  color: #f9fafb !important;
}

[data-bs-theme="dark"] .accordion-item {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
}

[data-bs-theme="dark"] .accordion-button {
  background-color: #1f2937 !important;
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
  background-color: rgba(188, 31, 39, 0.1) !important;
  color: #f87171 !important;
}

[data-bs-theme="dark"] .accordion-button::after {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* ----- SweetAlert2 ----- */
[data-bs-theme="dark"] .swal2-popup {
  background-color: #1f2937 !important;
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .swal2-title {
  color: #f9fafb !important;
}

[data-bs-theme="dark"] .swal2-html-container {
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .swal2-input,
[data-bs-theme="dark"] .swal2-textarea,
[data-bs-theme="dark"] .swal2-select {
  background-color: #374151 !important;
  border-color: #4b5563 !important;
  color: #e5e7eb !important;
}

/* ----- Scrollbar ----- */
[data-bs-theme="dark"] ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track {
  background: #1f2937;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 4px;
}

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

/* ----- HR / Dividers ----- */
[data-bs-theme="dark"] hr {
  border-color: #374151 !important;
  opacity: 1;
}

/* ----- Code ----- */
[data-bs-theme="dark"] code {
  background-color: #374151 !important;
  color: #f87171 !important;
}

[data-bs-theme="dark"] pre {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

/* ----- Tooltips ----- */
[data-bs-theme="dark"] .tooltip-inner {
  background-color: #374151 !important;
  color: #e5e7eb !important;
}

/* ----- Popovers ----- */
[data-bs-theme="dark"] .popover {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
}

[data-bs-theme="dark"] .popover-header {
  background-color: #374151 !important;
  border-bottom-color: #4b5563 !important;
  color: #f9fafb !important;
}

[data-bs-theme="dark"] .popover-body {
  color: #e5e7eb !important;
}

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

/* ----- Toasts ----- */
[data-bs-theme="dark"] .toast {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .toast-header {
  background-color: #374151 !important;
  border-bottom-color: #4b5563 !important;
  color: #f9fafb !important;
}

/* ----- Search Menu Autocomplete ----- */
.search-autocomplete-dropdown,
#menuAutocomplete {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-top: none;
  max-height: 300px;
  overflow: auto;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

[data-bs-theme="dark"] #menuAutocomplete,
[data-bs-theme="dark"] .search-autocomplete-dropdown {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] #menuAutocomplete > div {
  border-top-color: #374151 !important;
}

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

[data-bs-theme="dark"] #menuAutocomplete .fw-semibold,
[data-bs-theme="dark"] #menuAutocomplete .small {
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] #menuAutocomplete .d-flex:hover {
  background-color: #374151 !important;
}

/* Dark mode hover effect for search menu items */
[data-bs-theme="dark"]
  #menuAutocomplete
  .d-flex.align-items-center[style*="cursor: pointer"]:hover {
  background-color: rgba(188, 31, 39, 0.15) !important;
}

[data-bs-theme="dark"] #menuAutocomplete .fa-folder-open,
[data-bs-theme="dark"] #menuAutocomplete .fa-angle-right {
  color: #6b7280 !important;
}

/* Search menu item classes */
.search-menu-parent,
.search-menu-child {
  border-radius: 4px;
  transition: background-color 0.15s ease;
}

.search-menu-parent:hover,
.search-menu-child:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.search-menu-icon {
  color: #6b7280;
  font-size: 0.8rem;
}

.search-menu-label {
  font-size: 0.85rem;
  color: #374151;
}

.search-menu-parent .search-menu-label {
  font-weight: 600;
}

/* Dark mode for search menu items */
[data-bs-theme="dark"] .search-menu-parent:hover,
[data-bs-theme="dark"] .search-menu-child:hover {
  background-color: rgba(188, 31, 39, 0.15) !important;
}

[data-bs-theme="dark"] .search-menu-icon {
  color: #9ca3af !important;
}

[data-bs-theme="dark"] .search-menu-label {
  color: #e5e7eb !important;
}

[data-bs-theme="dark"] .search-menu-parent .search-menu-label {
  color: #f9fafb !important;
}

/* ----- Search Shortcut Hint ----- */
.menu-search-input {
  position: relative;
}

.search-shortcut-hint {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.15s ease;
  z-index: 1;
}

.search-shortcut-key {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 6px;
  font-size: 0.7rem;
  font-weight: 500;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  color: #6b7280;
  background: linear-gradient(180deg, #f9fafb 0%, #e5e7eb 100%);
  border: 1px solid #d1d5db;
  border-radius: 4px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  line-height: 1;
}

.search-shortcut-key .shortcut-modifier {
  font-size: 0.75rem;
  margin-right: 1px;
}

/* Dark mode for shortcut hint */
[data-bs-theme="dark"] .search-shortcut-key {
  color: #9ca3af;
  background: linear-gradient(180deg, #374151 0%, #1f2937 100%);
  border-color: #4b5563;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Adjust search input padding for shortcut hint */
.menu-search-input .form-control {
  padding-right: 50px;
}

/* Hide on small screens */
@media (max-width: 576px) {
  .search-shortcut-hint {
    display: none;
  }

  .menu-search-input .form-control {
    padding-right: 12px;
  }
}

/* ============================================== */
/* ===== SIDEBAR ORGANIZATION CARD ============= */
/* ============================================== */

/* Full view card wrapper */
.sidebar-org-card-wrapper {
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.sidebar-org-card {
  background: linear-gradient(135deg, #bc1f27 0%, #9e1a20 100%) !important;
  border: 1px solid rgba(188, 31, 39, 0.3) !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
  overflow: hidden;
}

.sidebar-org-card:hover {
  background: linear-gradient(135deg, #d12029 0%, #bc1f27 100%) !important;
  box-shadow: 0 4px 12px rgba(188, 31, 39, 0.3) !important;
}

.sidebar-org-card .card-body {
  background: transparent !important;
}

.sidebar-org-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.sidebar-org-label {
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.7) !important;
  margin-bottom: 2px;
}

.sidebar-org-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.sidebar-org-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 6px !important;
  color: #fff !important;
  transition: all 0.2s ease;
}

.sidebar-org-btn:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.sidebar-org-btn i {
  font-size: 0.65rem;
}

/* Minimized view button */
.sidebar-org-mini-wrapper {
  display: none;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
  margin: 0 8px;
}

.sidebar-org-mini-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #bc1f27 0%, #9e1a20 100%);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(188, 31, 39, 0.3);
}

.sidebar-org-mini-btn:hover {
  background: linear-gradient(135deg, #d12029 0%, #bc1f27 100%);
  color: #fff;
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(188, 31, 39, 0.4);
}

.sidebar-org-mini-btn i {
  font-size: 0.9rem;
  line-height: 1;
}

/* Sidebar Minimized State */
.app-sidebar-minified #sidebar .sidebar-org-card-wrapper,
.app-sidebar-minified .app-sidebar .sidebar-org-card-wrapper {
  display: none !important;
}

.app-sidebar-minified #sidebar .sidebar-org-mini-wrapper,
.app-sidebar-minified .app-sidebar .sidebar-org-mini-wrapper {
  display: flex !important;
}

/* Dark mode adjustments - keep same brand color, adjust subtle elements */
[data-bs-theme="dark"] .sidebar-org-card {
  background: linear-gradient(135deg, #9e1a20 0%, #85151a 100%) !important;
  border-color: rgba(133, 21, 26, 0.5) !important;
}

[data-bs-theme="dark"] .sidebar-org-card:hover {
  background: linear-gradient(135deg, #bc1f27 0%, #9e1a20 100%) !important;
}

[data-bs-theme="dark"] .sidebar-org-label {
  color: rgba(255, 255, 255, 0.6) !important;
}

[data-bs-theme="dark"] .sidebar-org-name {
  color: #f9fafb !important;
}

[data-bs-theme="dark"] .sidebar-org-btn {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
}

[data-bs-theme="dark"] .sidebar-org-btn:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #fff !important;
}

[data-bs-theme="dark"] .sidebar-org-mini-btn {
  background: linear-gradient(135deg, #9e1a20 0%, #85151a 100%);
  box-shadow: 0 2px 6px rgba(133, 21, 26, 0.4);
}

[data-bs-theme="dark"] .sidebar-org-mini-btn:hover {
  background: linear-gradient(135deg, #bc1f27 0%, #9e1a20 100%);
  box-shadow: 0 4px 12px rgba(188, 31, 39, 0.5);
}

/* ============================================== */
/* ===== SIDEBAR MOBILE MODE STYLING =========== */
/* ============================================== */

/* ----- Mobile Organization Card - Always show full card ----- */
@media (max-width: 991.98px) {
  /* Always show the full organization card on mobile */
  .sidebar-org-card-wrapper {
    display: block !important;
    padding: 0.75rem !important;
  }

  /* Always hide the mini button on mobile */
  .sidebar-org-mini-wrapper {
    display: none !important;
  }
}

/* ----- Light Mode - Mobile Sidebar ----- */
@media (max-width: 991.98px) {
  /* Sidebar background */
  .app-sidebar .app-sidebar-content {
    background-color: #1e2835 !important;
  }

  /* Menu text color */
  .app-sidebar .menu .menu-item .menu-link,
  .app-sidebar .menu .menu-item .menu-link .menu-text {
    color: rgba(255, 255, 255, 0.75) !important;
  }

  /* Menu hover */
  .app-sidebar .menu .menu-item .menu-link:hover,
  .app-sidebar .menu .menu-item .menu-link:hover .menu-text {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1) !important;
  }

  /* Menu active */
  .app-sidebar .menu .menu-item.active > .menu-link,
  .app-sidebar .menu .menu-item.active > .menu-link .menu-text {
    color: #fff !important;
    background: rgba(188, 31, 39, 0.2) !important;
  }

  /* Menu header */
  .app-sidebar .menu .menu-header {
    color: rgba(255, 255, 255, 0.5) !important;
  }

  /* Menu divider */
  .app-sidebar .menu .menu-divider {
    border-color: rgba(255, 255, 255, 0.1) !important;
  }

  /* Menu icons */
  .app-sidebar .menu .menu-item .menu-icon,
  .app-sidebar .menu .menu-item .menu-icon i {
    color: rgba(255, 255, 255, 0.6) !important;
  }

  .app-sidebar .menu .menu-item.active .menu-icon,
  .app-sidebar .menu .menu-item.active .menu-icon i {
    color: #bc1f27 !important;
  }

  /* Submenu */
  .app-sidebar .menu .menu-submenu {
    background: rgba(0, 0, 0, 0.15) !important;
  }

  .app-sidebar .menu .menu-submenu .menu-item .menu-link,
  .app-sidebar .menu .menu-submenu .menu-item .menu-link .menu-text {
    color: rgba(255, 255, 255, 0.65) !important;
  }

  .app-sidebar .menu .menu-submenu .menu-item .menu-link:hover,
  .app-sidebar .menu .menu-submenu .menu-item .menu-link:hover .menu-text {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.05) !important;
  }

  .app-sidebar .menu .menu-submenu .menu-item.active .menu-link,
  .app-sidebar .menu .menu-submenu .menu-item.active .menu-link .menu-text {
    color: #bc1f27 !important;
  }

  /* Caret */
  .app-sidebar .menu .menu-caret,
  .app-sidebar .menu .menu-caret .caret {
    color: rgba(255, 255, 255, 0.5) !important;
    border-top-color: rgba(255, 255, 255, 0.5) !important;
  }
}

/* ----- Dark Mode - Mobile Sidebar ----- */
@media (max-width: 991.98px) {
  [data-bs-theme="dark"] .app-sidebar .app-sidebar-content {
    background-color: #0f172a !important;
  }

  /* Menu text */
  [data-bs-theme="dark"] .app-sidebar .menu .menu-item .menu-link,
  [data-bs-theme="dark"] .app-sidebar .menu .menu-item .menu-link .menu-text {
    color: rgba(255, 255, 255, 0.7) !important;
  }

  /* Menu hover */
  [data-bs-theme="dark"] .app-sidebar .menu .menu-item .menu-link:hover,
  [data-bs-theme="dark"]
    .app-sidebar
    .menu
    .menu-item
    .menu-link:hover
    .menu-text {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08) !important;
  }

  /* Menu active */
  [data-bs-theme="dark"] .app-sidebar .menu .menu-item.active > .menu-link,
  [data-bs-theme="dark"]
    .app-sidebar
    .menu
    .menu-item.active
    > .menu-link
    .menu-text {
    color: #f87171 !important;
    background: rgba(248, 113, 113, 0.1) !important;
  }

  /* Menu header */
  [data-bs-theme="dark"] .app-sidebar .menu .menu-header {
    color: rgba(255, 255, 255, 0.4) !important;
  }

  /* Menu divider */
  [data-bs-theme="dark"] .app-sidebar .menu .menu-divider {
    border-color: rgba(255, 255, 255, 0.08) !important;
  }

  /* Menu icons */
  [data-bs-theme="dark"] .app-sidebar .menu .menu-item .menu-icon,
  [data-bs-theme="dark"] .app-sidebar .menu .menu-item .menu-icon i {
    color: rgba(255, 255, 255, 0.5) !important;
  }

  [data-bs-theme="dark"] .app-sidebar .menu .menu-item.active .menu-icon,
  [data-bs-theme="dark"] .app-sidebar .menu .menu-item.active .menu-icon i {
    color: #f87171 !important;
  }

  /* Submenu */
  [data-bs-theme="dark"] .app-sidebar .menu .menu-submenu {
    background: rgba(0, 0, 0, 0.2) !important;
  }

  [data-bs-theme="dark"] .app-sidebar .menu .menu-submenu .menu-item .menu-link,
  [data-bs-theme="dark"]
    .app-sidebar
    .menu
    .menu-submenu
    .menu-item
    .menu-link
    .menu-text {
    color: rgba(255, 255, 255, 0.55) !important;
  }

  [data-bs-theme="dark"]
    .app-sidebar
    .menu
    .menu-submenu
    .menu-item
    .menu-link:hover,
  [data-bs-theme="dark"]
    .app-sidebar
    .menu
    .menu-submenu
    .menu-item
    .menu-link:hover
    .menu-text {
    color: #fff !important;
  }

  [data-bs-theme="dark"]
    .app-sidebar
    .menu
    .menu-submenu
    .menu-item.active
    .menu-link,
  [data-bs-theme="dark"]
    .app-sidebar
    .menu
    .menu-submenu
    .menu-item.active
    .menu-link
    .menu-text {
    color: #f87171 !important;
  }

  /* Caret */
  [data-bs-theme="dark"] .app-sidebar .menu .menu-caret,
  [data-bs-theme="dark"] .app-sidebar .menu .menu-caret .caret {
    color: rgba(255, 255, 255, 0.4) !important;
    border-top-color: rgba(255, 255, 255, 0.4) !important;
  }
}

/* ----- Desktop Dark Mode Sidebar ----- */
[data-bs-theme="dark"] .app-sidebar .app-sidebar-content {
  background-color: #0f172a !important;
}

[data-bs-theme="dark"] .app-sidebar .menu .menu-item .menu-link,
[data-bs-theme="dark"] .app-sidebar .menu .menu-item .menu-link .menu-text {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-bs-theme="dark"] .app-sidebar .menu .menu-item .menu-link:hover,
[data-bs-theme="dark"]
  .app-sidebar
  .menu
  .menu-item
  .menu-link:hover
  .menu-text {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .app-sidebar .menu .menu-item.active > .menu-link,
[data-bs-theme="dark"]
  .app-sidebar
  .menu
  .menu-item.active
  > .menu-link
  .menu-text {
  color: #f87171 !important;
  background: rgba(248, 113, 113, 0.1) !important;
}

[data-bs-theme="dark"] .app-sidebar .menu .menu-header {
  color: rgba(255, 255, 255, 0.4) !important;
}

[data-bs-theme="dark"] .app-sidebar .menu .menu-divider {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .app-sidebar .menu .menu-item .menu-icon,
[data-bs-theme="dark"] .app-sidebar .menu .menu-item .menu-icon i {
  color: rgba(255, 255, 255, 0.5) !important;
}

[data-bs-theme="dark"] .app-sidebar .menu .menu-item.active .menu-icon,
[data-bs-theme="dark"] .app-sidebar .menu .menu-item.active .menu-icon i {
  color: #f87171 !important;
}

[data-bs-theme="dark"] .app-sidebar .menu .menu-submenu {
  background: rgba(0, 0, 0, 0.2) !important;
}

[data-bs-theme="dark"] .app-sidebar .menu .menu-submenu .menu-item .menu-link,
[data-bs-theme="dark"]
  .app-sidebar
  .menu
  .menu-submenu
  .menu-item
  .menu-link
  .menu-text {
  color: rgba(255, 255, 255, 0.55) !important;
}

[data-bs-theme="dark"]
  .app-sidebar
  .menu
  .menu-submenu
  .menu-item
  .menu-link:hover,
[data-bs-theme="dark"]
  .app-sidebar
  .menu
  .menu-submenu
  .menu-item
  .menu-link:hover
  .menu-text {
  color: #fff !important;
}

[data-bs-theme="dark"]
  .app-sidebar
  .menu
  .menu-submenu
  .menu-item.active
  .menu-link,
[data-bs-theme="dark"]
  .app-sidebar
  .menu
  .menu-submenu
  .menu-item.active
  .menu-link
  .menu-text {
  color: #f87171 !important;
}

[data-bs-theme="dark"] .app-sidebar .menu .menu-caret,
[data-bs-theme="dark"] .app-sidebar .menu .menu-caret .caret {
  color: rgba(255, 255, 255, 0.4) !important;
  border-top-color: rgba(255, 255, 255, 0.4) !important;
}

/* ============================================== */
/* ===== DELETE CONFIRMATION POPUP STYLING ===== */
/* ============================================== */

.delete-confirm-popup {
  border-radius: 16px !important;
  padding: 0 !important;
  width: 400px !important;
  max-width: 90vw !important;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
  border: none !important;
}

.posting-confirm-popup {
  width: 860px !important;
  max-width: 96vw !important;
}

.delete-confirm-title {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: #fff !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  padding: 1.25rem 1.5rem !important;
  margin: 0 !important;
  border-radius: 0 !important;
}

.delete-confirm-container {
  padding: 1.5rem !important;
  margin: 0 !important;
}

.delete-confirm-content {
  text-align: center;
}

.delete-confirm-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.25rem;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: deleteIconPulse 2s ease-in-out infinite;
}

.delete-confirm-icon i {
  font-size: 2rem;
  color: #dc2626;
}

@keyframes deleteIconPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.2);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 15px rgba(220, 38, 38, 0);
  }
}

.delete-confirm-message {
  font-size: 1rem;
  color: #374151;
  margin: 0 0 1rem;
  line-height: 1.6;
}

.delete-item-name {
  color: #dc2626;
  font-weight: 600;
  word-break: break-word;
}

.delete-confirm-additional {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0 0 1rem;
}

.delete-confirm-warning {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #92400e;
}

.delete-confirm-warning i {
  font-size: 0.9rem;
  color: #d97706;
}

.delete-confirm-actions {
  padding: 0 1.5rem 1.5rem !important;
  gap: 0.75rem !important;
  flex-direction: row-reverse !important;
}

.delete-confirm-btn {
  padding: 0.75rem 1.5rem !important;
  border-radius: 8px !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 120px !important;
}

.delete-confirm-btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.3) !important;
}

.delete-confirm-btn-danger:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 10px -1px rgba(220, 38, 38, 0.4) !important;
}

.delete-confirm-btn-secondary {
  background: #f3f4f6 !important;
  color: #374151 !important;
  border: 1px solid #d1d5db !important;
}

.delete-confirm-btn-secondary:hover {
  background: #e5e7eb !important;
  color: #1f2937 !important;
}

/* Dark Mode Support */
[data-bs-theme="dark"] .delete-confirm-popup {
  background: #1f2937 !important;
}

[data-bs-theme="dark"] .delete-confirm-title {
  background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
}

[data-bs-theme="dark"] .delete-confirm-icon {
  background: linear-gradient(
    135deg,
    rgba(220, 38, 38, 0.2) 0%,
    rgba(185, 28, 28, 0.2) 100%
  );
}

[data-bs-theme="dark"] .delete-confirm-message {
  color: #e5e7eb;
}

[data-bs-theme="dark"] .delete-item-name {
  color: #f87171;
}

[data-bs-theme="dark"] .delete-confirm-additional {
  color: #9ca3af;
}

[data-bs-theme="dark"] .delete-confirm-warning {
  background: rgba(254, 243, 199, 0.1);
  border-color: rgba(252, 211, 77, 0.3);
  color: #fcd34d;
}

[data-bs-theme="dark"] .delete-confirm-warning i {
  color: #fbbf24;
}

[data-bs-theme="dark"] .delete-confirm-btn-secondary {
  background: #374151 !important;
  color: #e5e7eb !important;
  border-color: #4b5563 !important;
}

[data-bs-theme="dark"] .delete-confirm-btn-secondary:hover {
  background: #4b5563 !important;
  color: #f9fafb !important;
}

/* Responsive */
@media (max-width: 480px) {
  .delete-confirm-popup {
    width: calc(100vw - 32px) !important;
  }

  .delete-confirm-title {
    font-size: 1rem !important;
    padding: 1rem 1.25rem !important;
  }

  .delete-confirm-container {
    padding: 1.25rem !important;
  }

  .delete-confirm-icon {
    width: 60px;
    height: 60px;
  }

  .delete-confirm-icon i {
    font-size: 1.5rem;
  }

  .delete-confirm-message {
    font-size: 0.9rem;
  }

  .delete-confirm-actions {
    flex-direction: column !important;
    padding: 0 1.25rem 1.25rem !important;
  }

  .delete-confirm-btn {
    width: 100% !important;
  }
}

/* ============================================== */
/* ===== Toast Notification Styling ===== */
/* ============================================== */

.toast-notification-container {
  position: fixed;
  top: 80px; /* Below header/topbar */
  right: 20px;
  z-index: 9999;
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none; /* Allow clicks to pass through container */
}

.toast-notification {
  position: relative;
  background: #ffffff;
  border-radius: 12px;
  border-left: 4px solid;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 2px 6px rgba(0, 0, 0, 0.08);
  padding: 16px;
  color: #1e293b;
  cursor: pointer;
  pointer-events: auto; /* Enable clicks on toast */
  transform: translateX(120%);
  opacity: 0;
  transition:
    transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55),
    opacity 0.3s ease,
    box-shadow 0.3s ease;
  overflow: hidden;
}

.toast-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-notification.hide {
  transform: translateX(120%);
  opacity: 0;
}

.toast-notification:hover {
  transform: translateX(-4px) scale(1.02);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.15),
    0 4px 10px rgba(0, 0, 0, 0.1);
}

.toast-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  z-index: 2;
}

.toast-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 18px;
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: #1e293b;
  margin: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.toast-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  margin: 0;
  font-size: 12px;
}

.toast-close:hover {
  background: #e2e8f0;
  color: #475569;
  transform: scale(1.1);
}

.toast-close:active {
  transform: scale(0.95);
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform-origin: left;
  animation: toast-progress 10s linear forwards;
  opacity: 0.6;
}

.toast-notification.hide .toast-progress {
  animation: none;
}

@keyframes toast-progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* Mobile responsive */
@media (max-width: 576px) {
  .toast-notification-container {
    top: 70px;
    right: 12px;
    left: 12px;
    max-width: none;
  }

  .toast-notification {
    padding: 14px;
  }

  .toast-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .toast-title {
    font-size: 13px;
  }
}

/* Dark mode support */
[data-bs-theme="dark"] .toast-notification {
  background: #1e293b;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.2);
  color: #e2e8f0;
}

[data-bs-theme="dark"] .toast-notification:hover {
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.4),
    0 4px 10px rgba(0, 0, 0, 0.3);
}

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

[data-bs-theme="dark"] .toast-close {
  background: #334155;
  color: #94a3b8;
}

[data-bs-theme="dark"] .toast-close:hover {
  background: #475569;
  color: #cbd5e1;
}

/* ============================================== */
/* ===== App Alert General Styling ===== */
/* ============================================== */
.app-alert-popup {
  --app-alert-accent: #2563eb;
  position: relative;
  overflow: hidden;
  border-radius: 14px !important;
  padding: 1.5rem 1.75rem !important;
  background:
    radial-gradient(
      circle at top right,
      rgba(37, 99, 235, 0.08),
      transparent 45%
    ),
    linear-gradient(180deg, #ffffff 0%, #f7f8fb 100%) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18) !important;
}

.app-alert-popup::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.2),
    var(--app-alert-accent)
  );
}

.app-alert-success {
  --app-alert-accent: #16a34a;
}

.app-alert-error {
  --app-alert-accent: #dc2626;
}

.app-alert-warning {
  --app-alert-accent: #f59e0b;
}

.app-alert-info {
  --app-alert-accent: #0ea5e9;
}

.app-alert-title {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  color: #111827 !important;
  letter-spacing: 0.01em;
  margin-bottom: 0.35rem !important;
}

.app-alert-content {
  font-size: 0.95rem !important;
  color: #4b5563 !important;
  line-height: 1.5 !important;
  margin: 0 auto !important;
  max-width: 26rem !important;
}

.app-alert-icon {
  margin: 0.5rem auto 0.75rem !important;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12) !important;
}

.app-alert-popup .swal2-icon {
  border-color: var(--app-alert-accent) !important;
  color: var(--app-alert-accent) !important;
}

.app-alert-popup .swal2-icon::after,
.app-alert-popup .swal2-icon::before {
  background: var(--app-alert-accent) !important;
}

.app-alert-popup .swal2-success-ring {
  border: 0.25em solid rgba(22, 163, 74, 0.25) !important;
}

.app-alert-actions {
  margin-top: 1.25rem !important;
  padding: 0 !important;
}

.app-alert-btn {
  padding: 0.625rem 1.5rem !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em;
  background: var(--bs-primary) !important;
  color: #ffffff !important;
  border: 1px solid var(--bs-primary) !important;
  box-shadow: 0 10px 18px rgba(13, 110, 253, 0.25) !important;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.app-alert-btn:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(13, 110, 253, 0.3) !important;
}

.app-alert-btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.3) !important;
}

[data-bs-theme="dark"] .app-alert-popup {
  background:
    radial-gradient(
      circle at top right,
      rgba(59, 130, 246, 0.18),
      transparent 45%
    ),
    linear-gradient(180deg, #0f172a 0%, #111827 100%) !important;
  border-color: rgba(148, 163, 184, 0.2) !important;
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.6) !important;
}

[data-bs-theme="dark"] .app-alert-popup::after {
  background: linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.2),
    var(--app-alert-accent)
  );
}

[data-bs-theme="dark"] .app-alert-title {
  color: #f9fafb !important;
}

[data-bs-theme="dark"] .app-alert-content {
  color: #cbd5f5 !important;
}

[data-bs-theme="dark"] .app-alert-icon {
  box-shadow: 0 12px 22px rgba(2, 6, 23, 0.55) !important;
}

[data-bs-theme="dark"] .app-alert-btn {
  box-shadow: 0 12px 20px rgba(37, 99, 235, 0.4) !important;
}

[data-bs-theme="dark"] .app-alert-btn:hover {
  box-shadow: 0 14px 22px rgba(37, 99, 235, 0.48) !important;
}

/* API validation warning (AppAlert.showApiValidationWarning) */
.app-api-validation-popup .app-alert-content {
  text-align: left !important;
}
.app-api-validation-dialog {
  max-width: 100%;
}
.app-api-validation-meta {
  font-size: 0.85rem;
  margin-bottom: 0.45rem;
}
.app-api-validation-detail-label {
  margin-top: 0.35rem;
}
.app-api-validation-code {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.78rem;
}
.app-api-validation-detail {
  white-space: pre-wrap;
  word-break: break-word;
  background: #f8fafc;
  border-color: #e2e8f0 !important;
  max-height: 240px;
  overflow-y: auto;
}
[data-bs-theme="dark"] .app-api-validation-code {
  background: rgba(245, 158, 11, 0.22);
  color: #fcd34d;
}
[data-bs-theme="dark"] .app-api-validation-detail {
  background: #1f2937;
  border-color: #374151 !important;
  color: #e5e7eb;
}

.app-toast-popup {
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* ==================== TSK Loader Component (Global Reusable) ==================== */
/* Reusable loader with centered image and rotating red circular spinner */
.tsk-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  min-height: 200px;
  width: 100%;
}

.tsk-loader-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  margin: 0 auto;
}

/* Rotating red circular spinner - melingkari gambar */
.tsk-loader-spinner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 5px solid rgba(188, 31, 39, 0.2); /* Light red background */
  border-top: 5px solid #bc1f27; /* Red color - top */
  border-right: 5px solid #bc1f27; /* Red color - right */
  border-radius: 50%;
  animation: tsk-loader-spin 0.8s linear infinite;
  z-index: 1;
  box-sizing: border-box;
  pointer-events: none;
}

/* Centered image container */
.tsk-loader-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
}

.tsk-loader-image {
  width: 50px;
  height: 50px;
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
  margin: 0 auto;
}

/* Loading text */
.tsk-loader-text {
  font-size: 0.875rem;
  color: #6c757d;
  margin-top: 1.5rem;
  text-align: center;
  font-weight: 500;
}

/* Spinner rotation animation */
@keyframes tsk-loader-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Dark mode support */
[data-bs-theme="dark"] .tsk-loader-text {
  color: #9ca3af;
}

[data-bs-theme="dark"] .tsk-loader-spinner {
  border-color: rgba(188, 31, 39, 0.3);
  border-top-color: #bc1f27;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .tsk-loader-wrapper {
    width: 60px;
    height: 60px;
  }

  .tsk-loader-content {
    width: 40px;
    height: 40px;
  }

  .tsk-loader-image {
    width: 35px;
    height: 35px;
  }

  .tsk-loader-spinner {
    border-width: 4px;
  }
}

/* ===== Approval Modal ===== */
.project-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.approval-modal-trigger {
  border: 1px solid #bc1f27;
  color: #bc1f27;
  background: #fff;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.approval-modal-trigger:hover {
  background: #bc1f27;
  color: #fff;
}

.approval-dashboard-btn {
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  animation: approval-dashboard-pulse 2.2s ease-in-out infinite;
  box-shadow: 0 10px 22px rgba(188, 31, 39, 0.25);
}

.approval-dashboard-btn:hover,
.approval-dashboard-btn:focus {
  animation: none;
  box-shadow: 0 14px 28px rgba(188, 31, 39, 0.35);
  transform: translateY(-1px);
}

@keyframes approval-dashboard-pulse {
  0% {
    box-shadow: 0 10px 22px rgba(188, 31, 39, 0.18);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 14px 30px rgba(188, 31, 39, 0.32);
    transform: translateY(-2px);
  }
  100% {
    box-shadow: 0 10px 22px rgba(188, 31, 39, 0.18);
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .approval-dashboard-btn {
    animation: none;
  }
}

.approval-modal .modal-header {
  background: var(--bs-primary, #bc1f27);
  color: #fff;
  border-bottom: none;
  position: relative;
  padding: 2.25rem 1.5rem 1.5rem;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  overflow: hidden;
}

.approval-modal .modal-dialog {
  max-width: 960px;
}

.approval-modal .modal-content {
  max-height: 80vh;
}

.approval-modal .modal-body {
  overflow-y: auto;
}

.approval-modal-header-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.approval-modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

.approval-modal-header-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.approval-modal .modal-title {
  font-weight: 700;
  letter-spacing: 0.2px;
  font-size: 1.25rem;
  color: #fff;
}

.approval-modal-subtitle {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.9;
}

.approval-modal .modal-header::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.approval-modal .modal-header::before {
  content: "";
  position: absolute;
  left: -60px;
  bottom: -80px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  pointer-events: none;
}

.approval-info {
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.approval-info-title {
  font-weight: 700;
  color: #bc1f27;
  margin-bottom: 0.25rem;
}

.approval-info-meta {
  font-size: 0.85rem;
  color: #6b7280;
}

.approval-table-wrapper {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.approval-table {
  margin: 0;
}

.approval-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.approval-table tbody td {
  font-size: 0.85rem;
  vertical-align: middle;
}

.approval-status {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  display: inline-block;
}

.approval-status-open {
  background: #fee2e2;
  color: #b91c1c;
}

.approval-status-default {
  background: #e5e7eb;
  color: #374151;
}

.approval-action-btn {
  border-radius: 999px;
  padding: 0.2rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.approval-empty {
  display: none;
  text-align: center;
  padding: 1.5rem 0;
  color: #6b7280;
  font-size: 0.9rem;
}

[data-bs-theme="dark"] .approval-modal .modal-content {
  background-color: #111827;
  color: #e5e7eb;
}

[data-bs-theme="dark"] .approval-info {
  background: #1f2937;
  border-color: #374151;
}

[data-bs-theme="dark"] .approval-table thead th {
  background: #111827;
  color: #e5e7eb;
}

[data-bs-theme="dark"] .approval-table-wrapper {
  border-color: #374151;
}

@media (max-width: 991px) {
  .project-actions {
    align-items: flex-start;
  }

  .approval-modal .modal-header {
    padding: 2rem 1.25rem 1.25rem;
  }

  .approval-modal-icon {
    width: 52px;
    height: 52px;
    font-size: 1.4rem;
  }

  .approval-modal .modal-title {
    font-size: 1.1rem;
  }
}

@media (max-width: 576px) {
  .approval-dashboard-btn {
    font-size: 0.75rem;
  }

  .approval-modal .modal-header {
    padding: 1.75rem 1rem 1rem;
  }

  .approval-modal-icon {
    width: 46px;
    height: 46px;
    font-size: 1.2rem;
  }

  .approval-modal-subtitle {
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .approval-modal .modal-dialog {
    max-width: 92%;
    margin: 0.75rem auto;
  }

  .approval-modal .modal-content {
    max-height: 85vh;
  }

  .approval-modal .modal-body {
    overflow-y: auto;
  }

  .approval-table-wrapper {
    max-height: 220px;
  }
}

[data-bs-theme="dark"] .approval-modal .modal-header {
  background: var(--bs-primary, #bc1f27);
}
/* Global status badges/chips */
.status-chip,
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.15rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.status-entry {
    background-color: #0dcaf0;
    color: #fff;
}

.status-approved {
    background-color: #198754;
    color: #fff;
}

.status-posted {
    background-color: #0d6efd;
    color: #fff;
}

.status-rejected {
    background-color: #dc3545;
    color: #fff;
}

.status-pending {
    background-color: #ffc107;
    color: #212529;
}

.status-deleted {
    background-color: #6c757d;
    color: #fff;
}

.status-unknown {
    background-color: #adb5bd;
    color: #212529;
}

/* Mobile: boxed separators for v2 tabs */
@media (max-width: 767.98px) {
  .nav.nav-tabs.nav-tabs-v2 {
    border-bottom: 0;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .nav.nav-tabs.nav-tabs-v2 > .nav-item {
    margin-right: 0 !important; /* override .me-* on nav-item */
    flex: 1 1 calc(50% - 0.5rem);
  }

  .nav.nav-tabs.nav-tabs-v2 > .nav-item > .nav-link {
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--bs-border-color);
    border-bottom: 1px solid var(--bs-border-color);
    border-radius: 0.65rem;
    background: var(--bs-body-bg);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
    text-align: center;
    white-space: nowrap;
    touch-action: manipulation;
  }

  .nav.nav-tabs.nav-tabs-v2 > .nav-item > .nav-link:hover {
    border-color: rgba(var(--bs-theme-rgb), 0.35);
  }

  .nav.nav-tabs.nav-tabs-v2 > .nav-item > .nav-link.active {
    border-color: rgba(var(--bs-theme-rgb), 0.60);
    background: rgba(var(--bs-theme-rgb), 0.08);
  }
}

@media (max-width: 419.98px) {
  .nav.nav-tabs.nav-tabs-v2 > .nav-item {
    flex-basis: 100%;
  }
}
