/********** Template CSS **********/
:root {
  --primary: #176b74;
  /* Corporate Blue */
  --light: #f3f6f9;
  --dark: #191c24;
}

/* Searchable Select Dropdown Styling - NOW IN searchableselect.css */
/* Legacy styles removed - see static/css/searchable-select.css */

body {
  color: #4f4f4f;
  font-family: var(--font-sans, 'Inter', sans-serif);
}

.core-auth-shell {
  --font-heading: var(--font-sans, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading, 'Inter', sans-serif);
}

.text-primary {
  color: var(--bs-primary, #2e3192);
}

.text-justify {
  text-align: justify;
}

text {
  font-family: var(--font-sans, 'Inter', sans-serif) !important;
}

.icon-link {
  display: inline-flex;
  gap: 0.375rem;
  align-items: center;
  -webkit-text-decoration-color: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 0.5));
  text-decoration-color: rgba(var(--bs-link-color-rgb), var(--bs-link-opacity, 0.5));
  text-underline-offset: 0.25em;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.icon-link > .bi {
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  fill: currentcolor;
  transition: 0.2s ease-in-out transform;
}

.icon-link-hover:focus-visible > .bi,
.icon-link-hover:hover > .bi {
  transform: var(--bs-icon-link-transform, translate3d(0.25em, 0, 0));
}

/* Remove legacy leading icon/bullet before dropdown items */
.sidebar .navbar .dropdown-item:before {
  content: none !important;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bs-success) !important;
  border-color: var(--bs-success) !important;
  color: var(--bs-light) !important;
}

.back-to-top.back-to-top-footer {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1030;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;
}

.back-to-top.back-to-top-footer.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* Base user layout utilities */

/* ============================================================================
   TPGC PREMIUM FORM SYSTEM
   Mobile-First, Dynamic, Professional UI
   ============================================================================ */

/* ---------- Form Design Tokens ---------- */
:root {
  --form-font-size: 0.9rem;
  --form-font-size-sm: 0.8125rem;
  --form-font-size-lg: 1rem;
  --form-height: 38px;
  --form-height-sm: 34px;
  --form-height-lg: 46px;
  --form-padding-x: 0.75rem;
  --form-padding-y: 0.5rem;
  --form-border-radius: 2px;
  --form-border-color: #dee2e6;
  --form-border-color-focus: #86b7fe;
  --form-bg: #ffffff;
  --form-text: #212529;
  --form-placeholder: #6c757d;
  --form-label-font-size: 0.8125rem;
  --form-label-font-weight: 600;
  --form-label-color: #495057;
  --form-group-margin-bottom: 1rem;
  --form-section-margin-bottom: 1.5rem;
  --form-section-padding: 1rem;
  --form-section-bg: #f8f9fa;
  --form-section-border-radius: 2px;
}

/* ---------- Form Container ---------- */
.tpgc-form-container {
  background: #fff;
  border-radius: 2px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ---------- Form Sections ---------- */
.tpgc-form-section {
  margin-bottom: var(--form-section-margin-bottom);
  padding: var(--form-section-padding);
  background: var(--form-section-bg);
  border-radius: var(--form-section-border-radius);
}

.tpgc-form-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #2e3192;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e9ecef;
}

.tpgc-form-section-subtitle {
  font-size: 0.8125rem;
  color: #6c757d;
  margin-bottom: 1rem;
}

/* ---------- Form Rows (Grid) ---------- */
.tpgc-form-row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -0.5rem;
  margin-left: -0.5rem;
  gap: 0.5rem 0;
}

.tpgc-form-row > .tpgc-col {
  flex: 0 0 100%;
  max-width: 100%;
  padding-right: 0.5rem;
  padding-left: 0.5rem;
}

.tpgc-col-2 {
  flex: 0 0 16.666667%;
  max-width: 16.666667%;
}
.tpgc-col-3 {
  flex: 0 0 25%;
  max-width: 25%;
}
.tpgc-col-4 {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
}
.tpgc-col-5 {
  flex: 0 0 41.666667%;
  max-width: 41.666667%;
}
.tpgc-col-6 {
  flex: 0 0 50%;
  max-width: 50%;
}
.tpgc-col-7 {
  flex: 0 0 58.333333%;
  max-width: 58.333333%;
}
.tpgc-col-8 {
  flex: 0 0 66.666667%;
  max-width: 66.666667%;
}
.tpgc-col-9 {
  flex: 0 0 75%;
  max-width: 75%;
}
.tpgc-col-10 {
  flex: 0 0 83.333333%;
  max-width: 83.333333%;
}
.tpgc-col-12 {
  flex: 0 0 100%;
  max-width: 100%;
}

/* ---------- Form Groups ---------- */
.tpgc-form-group {
  margin-bottom: var(--form-group-margin-bottom);
}

.tpgc-form-group:last-child {
  margin-bottom: 0;
}

/* ---------- Form Labels ---------- */
.tpgc-label {
  display: block;
  font-size: var(--form-label-font-size);
  font-weight: var(--form-label-font-weight);
  color: var(--form-label-color);
  margin-bottom: 0.375rem;
}

.tpgc-label.required::after {
  content: ' *';
  color: #dc3545;
}

.tpgc-label-secondary {
  font-size: 0.75rem;
  color: #6c757d;
  font-weight: 400;
}

/* ---------- Form Controls ---------- */
.tpgc-input,
.tpgc-select,
.tpgc-textarea {
  display: block;
  width: 100%;
  padding: var(--form-padding-y) var(--form-padding-x);
  font-size: var(--form-font-size);
  font-weight: 400;
  line-height: 1.5;
  color: var(--form-text);
  background-color: var(--form-bg);
  background-clip: padding-box;
  border: 1px solid var(--form-border-color);
  border-radius: var(--form-border-radius);
  transition:
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
  box-sizing: border-box;
}

.tpgc-input::placeholder,
.tpgc-textarea::placeholder {
  color: var(--form-placeholder);
  opacity: 1;
}

.tpgc-input:focus,
.tpgc-select:focus,
.tpgc-textarea:focus {
  outline: none;
  border-color: var(--form-border-color-focus);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.tpgc-input:disabled,
.tpgc-select:disabled,
.tpgc-textarea:disabled {
  background-color: #e9ecef;
  opacity: 1;
  cursor: not-allowed;
}

/* ---------- Input Sizes ---------- */
.tpgc-input-sm,
.tpgc-select-sm,
.tpgc-textarea-sm {
  padding: 0.25rem 0.5rem;
  font-size: var(--form-font-size-sm);
  border-radius: 2px;
  height: var(--form-height-sm);
}

.tpgc-input-lg,
.tpgc-select-lg,
.tpgc-textarea-lg {
  padding: 0.5rem 1rem;
  font-size: var(--form-font-size-lg);
  border-radius: 2px;
  height: var(--form-height-lg);
}

/* ---------- Textarea ---------- */
.tpgc-textarea {
  min-height: 80px;
  resize: vertical;
}

.tpgc-textarea-sm {
  min-height: 60px;
}
.tpgc-textarea-lg {
  min-height: 120px;
}

/* ---------- Select Dropdown ---------- */
.tpgc-select {
  appearance: none;
  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='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  padding-right: 2.5rem;
}

/* ---------- Checkbox & Radio ---------- */
.tpgc-checkbox,
.tpgc-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding-left: 0;
}

.tpgc-checkbox input,
.tpgc-radio input {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  cursor: pointer;
}

.tpgc-checkbox-inline,
.tpgc-radio-inline {
  display: inline-flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

/* ---------- File Input ---------- */
.tpgc-file {
  position: relative;
  display: block;
  width: 100%;
}

.tpgc-file-input {
  position: relative;
  z-index: 2;
  width: 100%;
  height: calc(1.5em + 0.75rem + 2px);
  margin: 0;
  opacity: 0;
}

.tpgc-file-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--form-padding-y) var(--form-padding-x);
  font-size: var(--form-font-size);
  font-weight: 400;
  color: var(--form-text);
  background-color: var(--form-bg);
  border: 1px solid var(--form-border-color);
  border-radius: var(--form-border-radius);
  cursor: pointer;
}

.tpgc-file-label::after {
  content: 'Browse';
  display: inline-block;
  padding-left: 0.75rem;
  margin-left: 0.75rem;
  border-left: 1px solid #dee2e6;
  color: #6c757d;
}

/* ---------- Help Text ---------- */
.tpgc-help-text {
  font-size: 0.75rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

/* ---------- Error States ---------- */
.tpgc-is-invalid,
.was-validated .tpgc-input:invalid,
.was-validated .tpgc-select:invalid,
.was-validated .tpgc-textarea:invalid {
  border-color: #dc3545;
}

.tpgc-is-invalid:focus,
.was-validated .tpgc-input:invalid:focus,
.was-validated .tpgc-select:invalid:focus,
.was-validated .tpgc-textarea:invalid:focus {
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.tpgc-error-message {
  font-size: 0.75rem;
  color: #dc3545;
  margin-top: 0.25rem;
}

.tpgc-error-message:empty {
  display: none;
}

/* ---------- Form Actions ---------- */
.tpgc-form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
  margin-top: 1.5rem;
}

.tpgc-form-actions .btn {
  min-width: 100px;
}

/* ---------- Inline Form ---------- */
.tpgc-form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.tpgc-form-inline .tpgc-form-group {
  margin-bottom: 0;
  flex: 0 0 auto;
}

/* ============================================================================
   MOBILE RESPONSIVE FORMS
   ============================================================================ */

@media (max-width: 768px) {
  .tpgc-form-container {
    padding: 1rem;
    border-radius: 0;
    box-shadow: none;
  }

  .tpgc-form-section {
    padding: 0.75rem;
    margin-bottom: 1rem;
  }

  .tpgc-form-row {
    flex-direction: column;
    margin-right: 0;
    margin-left: 0;
  }

  .tpgc-form-row > .tpgc-col,
  .tpgc-col-2,
  .tpgc-col-3,
  .tpgc-col-4,
  .tpgc-col-5,
  .tpgc-col-6,
  .tpgc-col-7,
  .tpgc-col-8,
  .tpgc-col-9,
  .tpgc-col-10,
  .tpgc-col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 0;
    padding-left: 0;
  }

  .tpgc-input,
  .tpgc-select,
  .tpgc-textarea {
    font-size: 1rem;
    padding: 0.625rem 0.75rem;
    height: 44px;
    min-height: 44px;
  }

  .tpgc-textarea {
    min-height: 100px;
  }

  .tpgc-label {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
  }

  .tpgc-form-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .tpgc-form-actions .btn {
    width: 100%;
    min-width: auto;
  }

  .tpgc-form-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .tpgc-form-inline .tpgc-form-group {
    flex: 0 0 100%;
  }

  .tpgc-checkbox-inline,
  .tpgc-radio-inline {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ============================================================================
   TABLET RESPONSIVE FORMS
   ============================================================================ */

@media (min-width: 769px) and (max-width: 1024px) {
  .tpgc-form-row {
    gap: 0.75rem 0;
  }

  .tpgc-col-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }

  .tpgc-col-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
  }

  .tpgc-col-3 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* ============================================================================
   PREMIUM CARD FORMS
   ============================================================================ */

.tpgc-card-form {
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.tpgc-card-form-header {
  background: linear-gradient(135deg, #2e3192 0%, #1b1d6e 100%);
  color: #fff;
  padding: 1rem 1.5rem;
}

.tpgc-card-form-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.tpgc-card-form-body {
  padding: 1.5rem;
}

.tpgc-card-form-footer {
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

@media (max-width: 768px) {
  .tpgc-card-form-header {
    padding: 1rem;
  }

  .tpgc-card-form-body {
    padding: 1rem;
  }

  .tpgc-card-form-footer {
    padding: 1rem;
  }
}

/* ============================================================================
   HORIZONTAL FORMS
   ============================================================================ */

.tpgc-form-horizontal .tpgc-form-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}

.tpgc-form-horizontal .tpgc-label {
  flex: 0 0 200px;
  max-width: 200px;
  margin-bottom: 0;
  padding-right: 1rem;
  text-align: right;
}

.tpgc-form-horizontal .tpgc-form-control {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 768px) {
  .tpgc-form-horizontal .tpgc-form-group {
    flex-direction: column;
    align-items: stretch;
  }

  .tpgc-form-horizontal .tpgc-label {
    flex: 0 0 auto;
    max-width: 100%;
    text-align: left;
    margin-bottom: 0.375rem;
  }

  .tpgc-form-horizontal .tpgc-form-control {
    width: 100%;
  }
}

/* ============================================================================
   FORM WITH ICONS
   ============================================================================ */

.tpgc-input-icon {
  position: relative;
}

.tpgc-input-icon .tpgc-input {
  padding-left: 2.5rem;
}

.tpgc-input-icon .tpgc-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 1rem;
  pointer-events: none;
}

.tpgc-input-icon:focus-within .tpgc-icon {
  color: #2e3192;
}

@media (max-width: 768px) {
  .tpgc-input-icon .tpgc-input {
    font-size: 1rem;
    padding-left: 2.75rem;
  }

  .tpgc-input-icon .tpgc-icon {
    font-size: 1.125rem;
  }
}
.user-avatar-lg {
  width: 48px;
  height: 48px;
}

.user-avatar-sm {
  width: 32px;
  height: 32px;
}

.status-dot {
  --bs-border-opacity: 0.9;
}

.text-truncate-160 {
  max-width: 160px;
}

.overflow-marquee {
  min-width: 0;
  overflow: hidden !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}

.overflow-marquee .overflow-marquee__track {
  display: inline-flex;
  flex: 0 0 auto;
  max-width: none;
  min-width: max-content;
  vertical-align: top;
  white-space: nowrap;
}

.overflow-marquee .overflow-marquee__track + .overflow-marquee__track {
  display: none;
  margin-left: var(--overflow-marquee-gap, 1.75rem);
}

.overflow-marquee.is-active .overflow-marquee__track {
  animation: overflow-marquee-slide var(--overflow-marquee-duration, 12s) linear infinite;
  will-change: transform;
}

.overflow-marquee.is-active .overflow-marquee__track + .overflow-marquee__track {
  display: inline-flex;
}

.overflow-marquee.is-active:hover .overflow-marquee__track,
.overflow-marquee.is-active:focus-within .overflow-marquee__track {
  animation-play-state: paused;
}

@keyframes overflow-marquee-slide {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(calc(-1 * var(--overflow-marquee-distance, 100%)));
  }
}

.notification-badge.notification-count-badge {
  --notif-badge-shift-x: 70%;
  --notif-badge-shift-y: -60%;
  font-size: 0.56rem;
  min-width: 1.15rem;
  height: 1.15rem;
  line-height: 1.15rem;
  padding: 0 0.28rem !important;
  border-radius: 999px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  left: auto !important;
  transform: translate(var(--notif-badge-shift-x), var(--notif-badge-shift-y)) !important;
  background-color: #dc3545 !important;
  color: white !important;
}

@media (max-width: 767.98px) {
  .notification-badge.notification-count-badge {
    --notif-badge-shift-x: 60%;
    --notif-badge-shift-y: -75%;
  }
}

.notification-dropdown-menu {
  min-width: 250px;
  max-height: 60vh;
  overflow-y: auto;
}

.user-menu-dropdown {
  min-width: 240px;
  max-width: 95vw;
}

/*** Spinner ***/
#spinner {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.5s ease-out,
    visibility 0s linear 0.5s;
  z-index: 99999;
}

#spinner.show {
  transition:
    opacity 0.5s ease-out,
    visibility 0s linear 0s;
  visibility: visible;
  opacity: 1;
}

/* Button styles moved to buttons.css */

/*** Layout ***/
/* Dynamic Flexbox Layout */
html {
  height: 100%;
  overflow-x: hidden;
}

body {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Navbar at Root */
.navbar.sticky-top {
  position: sticky;
  top: 0;
  z-index: 1050;
  flex: 0 0 auto;
}

/* Sidebar */
.sidebar {
  width: 250px;
  flex-shrink: 0;
  z-index: 1040;
  transition: margin-left 0.3s ease-in-out;
}

.content {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Mobile: Hide sidebar by default */
@media (max-width: 991.98px) {
  /* Layout wrapper - use flex column for proper stacking */
  body > .d-flex.flex-grow-1.overflow-hidden {
    display: flex !important;
    flex-direction: column !important;
    overflow: visible !important;
    height: calc(100vh - 1px) !important; /* Account for navbar */
  }

  /* Sidebar - flex item that can expand */
  .sidebar {
    margin-left: -250px;
    position: fixed !important;
    top: auto !important;
    left: 0 !important;
    width: 250px !important;
    height: calc(100vh - 56px) !important; /* Below navbar - fill to bottom */
    max-height: none !important;
    z-index: 1040 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: #f8f9fa !important;
    transition: margin-left 0.3s ease-in-out !important;
  }

  .sidebar.show {
    margin-left: 0 !important;
  }

  /* Content wrapper - takes remaining space */
  body > .d-flex.flex-grow-1.overflow-hidden > .d-flex.flex-column.flex-grow-1.overflow-hidden {
    display: flex !important;
    flex-direction: column !important;
    overflow: auto !important;
    flex: 1;
    min-height: 0;
  }

  /* Scrim overlay */
  .sidebar-scrim {
    position: fixed !important;
    top: 70px !important; /* Below navbar */
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1035 !important;
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.3s ease,
      visibility 0.3s ease;
    pointer-events: none;
  }

  .sidebar-scrim.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

/* Desktop: Always show sidebar */
@media (min-width: 992px) {
  .sidebar {
    margin-left: 0;
  }

  .sidebar.open {
    margin-left: -250px;
  }
}

.sidebar .navbar .dropdown-item {
  padding-left: 12px;
  border-radius: 2px;
}

.content .navbar .navbar-nav .nav-link {
  margin-left: 25px;
  padding: 12px 0;
  color: var(--dark);
  outline: none;
}

.content .navbar .navbar-nav .nav-link:hover,
.content .navbar .navbar-nav .nav-link.active {
  color: var(--primary);
}

/* Premium Sidebar Toggler */
.navbar .sidebar-toggler {
  color: var(--primary) !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  /* Premium Light Border */
  border-radius: 2px !important;
  /* Square-ish */
  outline: none !important;
  box-shadow: none !important;
  /* NO SHADOW */
  padding: 0.25rem 0.5rem;
  transition: all 0.2s ease-in-out;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  text-decoration: none !important;
}

.navbar .sidebar-toggler:hover {
  background: #f8f9fa !important;
  border-color: #dbe4ea !important;
  color: var(--primary) !important;
}

.navbar .sidebar-toggler:focus,
.navbar .sidebar-toggler:active {
  box-shadow: none !important;
  background: #e9ecef !important;
  border-color: #e2e8f0 !important;
}

.navbar .sidebar-toggler i {
  font-size: 1.4rem !important;
}

.content .navbar .sidebar-toggler,
.content .navbar .navbar-nav .nav-link i {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 2px;
}

/* For mobile screens (less than 768px width) */
@media (max-width: 767.98px) {
  .content .navbar .sidebar-toggler,
  .content .navbar .navbar-nav .nav-link i {
    width: 30px;
    height: 30px;
  }
}

.content .navbar .dropdown-toggle::after {
  margin-left: 6px;
  vertical-align: middle;
  border: none;
  content: '\f107';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  transition: 0.5s;
}

/* Hide the dropdown toggle content (icon) on screens smaller than 768px (mobile) */
@media (max-width: 767.98px) {
  .content .navbar .dropdown-toggle::after {
    content: none;
    /* Removes the content (icon) on mobile views */
  }
}

/* Default for larger screens */
/*img.rounded-circle {
  width: 40px;
  height: 40px;
}*/

/* For mobile screens (less than 768px width) */
@media (max-width: 767.98px) {
  img.rounded-circle {
    width: 30px;
    height: 30px;
  }
}

.content .navbar .dropdown-toggle[aria-expanded='true']::after {
  transform: rotate(-180deg);
}

@media (max-width: 575.98px) {
  .content .navbar .navbar-nav .nav-link {
    margin-left: 15px;
  }
}

/*** Date Picker ***/
.bootstrap-datetimepicker-widget.bottom {
  top: auto !important;
}

.bootstrap-datetimepicker-widget .table * {
  border-bottom-width: 0px;
}

.bootstrap-datetimepicker-widget .table th {
  font-weight: 500;
}

.bootstrap-datetimepicker-widget.dropdown-menu {
  padding: 10px;
  border-radius: 2px;
}

.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
  background: var(--primary);
}

.bootstrap-datetimepicker-widget table td.today::before {
  border-bottom-color: var(--primary);
}

/*** Testimonial ***/
.progress .progress-bar {
  width: 0px;
  transition: 2s;
}

/*** Testimonial ***/
.testimonial-carousel .owl-dots {
  margin-top: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.testimonial-carousel .owl-dot {
  position: relative;
  display: inline-block;
  margin: 0 5px;
  width: 15px;
  height: 15px;
  border: 5px solid var(--primary);
  border-radius: 2px;
  transition: 0.5s;
}

.testimonial-carousel .owl-dot.active {
  background: var(--dark);
  border-color: var(--primary);
}

.chat-dropdown-header:hover {
  cursor: pointer;
  background: var(--main-background-color);
}

.chat-dropdown-header {
  color: var(--light-primary-text-color);
}

.scrollable-menu {
  height: auto;
  max-height: 90vh;
  overflow-x: hidden;
}

/* For smaller screens (up to a certain breakpoint) */
@media (max-width: 576px) {
  .scrollable-menu {
    width: 60vw;
    /* Full width on small screens */
  }
}

/* For larger screens */
@media (min-width: 577px) {
  .scrollable-menu {
    width: 420px;
    /* Fixed width on larger screens */
  }
}

.notifications-material-icon {
  font-size: 28px;
}

.notifications-icon-container {
  width: 40px;
  height: 40px;
  background-color: var(--main-background-color);
}

.notifications-icon-container:hover {
  cursor: pointer;
  background-color: var(--secondary-text-color);
}

/* Default styles for larger screens */
.responsive-logo {
  width: 40px;
  /* Width for larger screens */
  border-radius: 50%;
}

.responsive-logo-report {
  width: 120px;
  /* Width for larger screens */
  border-radius: 50%;
}

/* For mobile screens (less than 768px width) */
@media (max-width: 767.98px) {
  .responsive-logo {
    width: 30px;
    /* Smaller width for mobile */
  }
}

/* Default styles for larger screens */
.notify-badge {
  position: absolute;
  background: red;
  height: 1.2rem;
  /* Height for larger screens */
  width: 1.2rem;
  /* Width for larger screens */
  right: 0.8rem;
  text-align: center;
  font-size: 0.8rem;
  /* Font size for larger screens */
  border-radius: 50%;
  color: white;
  font-weight: 350;
  top: 10%;
}

/* For mobile screens (less than 768px width) */
@media (max-width: 767.98px) {
  .notify-badge {
    height: 0.8rem;
    /* Smaller height for mobile */
    width: 0.8rem;
    /* Smaller width for mobile */
    font-size: 0.6rem;
    /* Smaller font size for mobile */
    right: 1.2rem;
    /* Adjust right positioning if necessary */
    top: 12%;
    /* Adjust top positioning if necessary */
  }
}

#id_notifications_spinner {
  margin-top: 20px;
  margin-bottom: 20px;
}

/* Custom CSS for animation and shadow on hover */
.sales-card {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.sales-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Custom CSS for vibrant and visually appealing <p> tags */
.sales-card p {
  font-size: 18px;
  color: #333;
  margin-bottom: 8px;
  font-weight: bold;
}

.sales-card h6 {
  font-size: 24px;
  color: #2e3192;
  margin-bottom: 0;
  font-family: 'DS-Digital Normal', sans-serif;
}

.nav-item.dropdown {
  position: relative;
}

.nav-link.dropdown-toggle {
  /* Just to make sure it appears */
  color: black;
}

.logo-img {
  width: 25%;
  margin-right: 1rem;
  border-radius: 50%;
}

#map {
  width: 100%;
}

#pms-map-panel .pms-map-canvas {
  min-height: 660px;
  height: 660px;
  width: 100%;
  display: block;
}

#pms-map-panel .map-monitor-shell {
  background: linear-gradient(180deg, #fbfdff 0%, #f3f7fb 100%);
}

#pms-map-panel .ol-map-sidebar {
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  bottom: 14px;
  left: 14px;
  position: absolute;
  top: 14px;
  transition:
    width 0.2s ease,
    transform 0.2s ease;
  width: 360px;
  z-index: 4;
}

#pms-map-panel .ol-map-sidebar.collapsed {
  width: 52px;
}

#pms-map-panel .ol-map-sidebar .sidebar-tabs {
  border-right: 1px solid rgba(148, 163, 184, 0.22);
  bottom: 0;
  left: 0;
  position: absolute;
  top: 0;
  width: 52px;
}

#pms-map-panel .ol-map-sidebar .sidebar-tabs ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 14px 8px;
}

#pms-map-panel .ol-map-sidebar .sidebar-tabs li {
  margin: 0;
}

#pms-map-panel .ol-map-sidebar .sidebar-tabs a {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #0f172a;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  text-decoration: none;
  width: 36px;
}

#pms-map-panel .ol-map-sidebar .sidebar-tabs li.active a,
#pms-map-panel .ol-map-sidebar .sidebar-tabs a:hover {
  background: #0d6efd;
  color: #fff;
}

#pms-map-panel .ol-map-sidebar .sidebar-content {
  bottom: 0;
  left: 52px;
  overflow: hidden;
  position: absolute;
  right: 0;
  top: 0;
}

#pms-map-panel .ol-map-sidebar.collapsed .sidebar-content {
  display: none;
}

#pms-map-panel .ol-map-sidebar .sidebar-pane {
  display: none;
  height: 100%;
  overflow: auto;
  padding: 14px;
}

#pms-map-panel .ol-map-sidebar .sidebar-pane.active {
  display: block;
}

#pms-map-panel .map-sidebar-head {
  align-items: start;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
}

#pms-map-panel .map-sidebar-title {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 2px 0 0;
}

#pms-map-panel .sidebar-close {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #334155;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

#pms-map-panel .map-toolbar-section {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #d9e2ec;
  border-radius: 12px;
  padding: 14px 16px;
}

#pms-map-panel .map-toolbar-head {
  align-items: end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

#pms-map-panel .map-toolbar-kicker,
.map-detail-kicker {
  color: #64748b;
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#pms-map-panel .map-toolbar-title {
  color: #0f172a;
  font-size: 0.94rem;
  font-weight: 700;
  margin: 0;
}

#pms-map-panel .map-toolbar-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

#pms-map-panel .map-toolbar-grid .map-field:first-child {
  grid-column: span 6;
}

#pms-map-panel .map-toolbar-grid .map-field {
  grid-column: span 3;
  min-width: 0;
}

#pms-map-panel .map-filter-label {
  color: #334155;
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.45rem;
  text-transform: uppercase;
}

#pms-map-panel .map-filter-control {
  appearance: none;
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-size: 0.86rem;
  line-height: 1.3;
  min-height: 40px;
  padding: 0.6rem 0.75rem;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  width: 100%;
}

#pms-map-panel .map-filter-control:focus {
  background: #fff;
  border-color: #2563eb;
  box-shadow: 0 0 0 0.18rem rgba(37, 99, 235, 0.12);
  outline: none;
}

#pms-map-panel .map-layer-filter-wrap {
  margin-bottom: 10px;
}

#pms-map-panel .map-layer-group + .map-layer-group {
  margin-top: 12px;
}

#pms-map-panel .map-layer-group-title {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

#pms-map-panel .map-toolbar-grid-compact .map-field {
  grid-column: span 6;
}

#pms-map-panel .map-toolbar-footer {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-start;
}

#pms-map-panel .map-filter-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

#pms-map-panel .map-action-button {
  align-items: center;
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  justify-content: center;
  min-height: 38px;
  padding: 0.6rem 0.9rem;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease;
  width: 100%;
}

#pms-map-panel .map-action-button:hover,
#pms-map-panel .map-action-button:focus {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
  outline: none;
}

#pms-map-panel .map-action-button-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

#pms-map-panel .map-action-button-primary:hover,
#pms-map-panel .map-action-button-primary:focus {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

#pms-map-panel .map-action-status {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.45;
  min-height: 1.2rem;
}

#pms-map-panel .map-hover-tooltip {
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 0.78rem;
  left: 14px;
  max-width: 280px;
  padding: 8px 10px;
  pointer-events: none;
  position: absolute;
  top: 14px;
  z-index: 3;
}

#pms-map-panel .map-hover-tooltip strong {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 2px;
}

#pms-map-panel .map-loading-overlay {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(1px);
  z-index: 2;
}

#pms-map-panel .map-monitoring-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0.35rem 0 0;
}

#pms-map-panel .map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}

#pms-map-panel .map-layer-toggle-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#pms-map-panel .map-layer-chip {
  align-items: center;
  background: #fff;
  border: 1px solid #d9e2ec;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  justify-content: flex-start;
  min-height: 38px;
  padding: 0 12px;
  width: 100%;
}

#pms-map-panel .map-layer-chip-radio .map-layer-chip-swatch {
  border-radius: 50%;
}

#pms-map-panel .map-layer-chip .form-check-input {
  margin: 0;
}

#pms-map-panel .map-layer-chip-swatch {
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: inline-block;
  height: 12px;
  width: 12px;
}

#pms-map-panel .map-legend-swatch {
  width: 12px;
  height: 12px;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

#pms-map-panel .map-legend-progress {
  border-radius: 50%;
  background: rgba(25, 135, 84, 0.95);
}

#pms-map-panel .map-legend-sor {
  background: rgba(220, 53, 69, 0.95);
  transform: rotate(45deg);
}

#pms-map-panel .map-legend-cluster {
  border-radius: 50%;
  background: #0d6efd;
}

#pms-map-panel .map-last-sync {
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.4;
  min-height: 1.5rem;
}

.mb-filters .form-label {
  margin-bottom: 4px;
}

.mb-table table th,
.mb-table table td {
  vertical-align: middle;
}

.mb-print {
  padding-top: 16px;
}

.mb-print-header {
  margin-bottom: 12px;
  text-align: center;
}

.mb-print-title {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
}

.mb-print-sub {
  font-size: 12px;
  color: #6c757d;
}

/* Map panel refinements for better responsiveness and contrast */
#pms-map-panel .form-select,
#pms-map-panel .map-filter-control {
  border-color: #e9ecef;
}

/* Searchable select (custom dropdown) alignment + fix double caret */
#pms-map-panel .searchable-select .btn.form-select {
  background: #fff;
  background-image: none;
  border: 1px solid #cbd5e1;
  box-shadow: none;
  color: #0f172a;
  font-size: 0.86rem;
  width: 100%;
  text-align: left;
}

#pms-map-panel .searchable-select .dropdown-menu {
  border: 1px solid #d9e2ec;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
  width: 100%;
}

#pms-map-panel .searchable-select .ss-search {
  margin-bottom: 0.25rem;
}

#pms-map-panel .ol-popup {
  min-width: 340px;
  max-width: min(460px, calc(100vw - 88px));
}

#pms-map-panel .ol-popup.map-popup-shell {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 14px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
  pointer-events: auto;
  display: block;
  overflow: hidden;
}

#pms-map-panel .ol-popup .card-header,
#pms-map-panel .ol-popup .card-body {
  background: #fff;
}

#pms-map-panel .ol-popup .card-header {
  border-bottom: 1px solid #e2e8f0;
  padding: 0.8rem 0.95rem;
}

#pms-map-panel .ol-popup .card-header .title {
  color: #0f172a;
  font-family: var(--font-heading, 'Inter', sans-serif);
  font-size: 0.92rem;
  font-weight: 700;
}

#pms-map-panel .ol-popup .card-body {
  max-height: min(430px, 58vh);
  overflow: auto;
  padding: 0.9rem 0.95rem;
}

#pms-map-panel .gis-popup-wrap {
  display: grid;
  gap: 12px;
}

#pms-map-panel .gis-popup-table th,
#pms-map-panel .gis-popup-table td {
  font-size: 0.82rem;
  vertical-align: top;
}

#pms-map-panel .gis-popup-table th {
  color: #495057;
  font-weight: 700;
  width: 36%;
  white-space: nowrap;
}

#pms-map-panel .gis-popup-table td {
  color: #212529;
}

#pms-map-panel .gis-popup-section-title {
  color: #0d6efd;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

#pms-map-panel .gis-popup-subcard {
  background: #f8fafc;
  border: 1px solid #e9ecef;
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
}

#pms-map-panel .gis-popup-subcard:last-child {
  margin-bottom: 0;
}

#pms-map-panel .gis-popup-subhead {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

#pms-map-panel .gis-popup-subtitle {
  color: #212529;
  font-size: 0.88rem;
  font-weight: 700;
  margin: 0;
}

#pms-map-panel .gis-popup-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
}

#pms-map-panel .gis-popup-badge-sor {
  background: rgba(220, 53, 69, 0.12);
  color: #b02a37;
}

#pms-map-panel .gis-popup-badge-progress {
  background: rgba(25, 135, 84, 0.12);
  color: #146c43;
}

#pms-map-panel .gis-popup-thumb-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  margin-top: 0.5rem;
}

#pms-map-panel .gis-popup-thumb {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.7rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.35rem;
  text-align: left;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
  width: 100%;
}

#pms-map-panel .gis-popup-thumb:hover,
#pms-map-panel .gis-popup-thumb:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.12);
  outline: none;
  transform: translateY(-1px);
}

#pms-map-panel .gis-popup-thumb-image {
  aspect-ratio: 4 / 3;
  background: #e9ecef;
  border-radius: 0.45rem;
  display: block;
  object-fit: cover;
  width: 100%;
}

#pms-map-panel .gis-popup-thumb-meta {
  color: #495057;
  display: flex;
  flex-direction: column;
  font-size: 0.72rem;
  gap: 0.15rem;
  line-height: 1.2;
}

#pms-map-panel .gis-popup-thumb-title {
  color: #212529;
  font-weight: 600;
}

#pms-map-panel .gis-popup-actions {
  margin-top: 0.75rem;
}

#pms-map-panel .gis-popup-actions .btn {
  border-width: 1px;
  font-size: 0.8rem;
  font-weight: 700;
  min-height: 36px;
}

#pms-map-panel .gis-popup-empty {
  color: #6c757d;
  font-size: 0.78rem;
  font-style: italic;
}

.map-gallery-modal .modal-body {
  padding: 1rem 1rem 1.25rem;
}

.map-detail-modal-dialog {
  max-width: min(1400px, calc(100vw - 48px));
}

.map-detail-modal {
  border: 0;
  border-radius: 0;
}

.map-detail-modal .modal-header {
  align-items: start;
  border-bottom: 1px solid #d9e2ec;
  padding: 1.1rem 1.35rem 1rem;
}

.map-detail-modal .modal-body {
  background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
  max-height: min(72vh, 820px);
  overflow: auto;
  padding: 1rem 1.35rem 1.25rem;
}

.map-detail-layout {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.map-detail-column {
  min-width: 0;
}

.map-detail-section {
  background: #fff;
  border: 1px solid #d9e2ec;
  padding: 14px 16px;
}

.map-detail-section + .map-detail-section {
  margin-top: 14px;
}

.map-detail-section-title {
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  padding-bottom: 8px;
  text-transform: uppercase;
}

.map-detail-section .gis-popup-thumb-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.map-detail-section .gis-popup-thumb-image {
  aspect-ratio: 16 / 10;
}

.map-gallery-stage {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.map-gallery-nav {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.map-gallery-figure-wrap {
  align-items: center;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 1rem;
  display: flex;
  justify-content: center;
  min-height: 420px;
  overflow: hidden;
  padding: 0.75rem;
}

.map-gallery-image {
  display: block;
  max-height: 72vh;
  max-width: 100%;
  object-fit: contain;
}

.map-gallery-empty {
  color: #6c757d;
  font-size: 0.95rem;
}

.map-gallery-meta {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 0.9rem;
}

.map-gallery-caption {
  color: #212529;
  flex: 1 1 auto;
  font-size: 0.92rem;
  min-width: 0;
}

.map-gallery-counter {
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 600;
}

@media (max-width: 767.98px) {
  #pms-map-panel .ol-map-sidebar {
    bottom: 10px;
    left: 10px;
    top: 10px;
    width: min(300px, calc(100% - 20px));
  }

  #pms-map-panel .ol-map-sidebar.collapsed {
    width: 44px;
  }

  #pms-map-panel .ol-map-sidebar .sidebar-tabs {
    width: 44px;
  }

  #pms-map-panel .ol-map-sidebar .sidebar-content {
    left: 44px;
  }

  #pms-map-panel .ol-popup {
    max-width: calc(100vw - 28px);
    min-width: 0;
  }

  #pms-map-panel .map-toolbar-grid {
    grid-template-columns: 1fr;
  }

  #pms-map-panel .map-toolbar-grid .map-field,
  #pms-map-panel .map-toolbar-grid .map-field:first-child {
    grid-column: span 1;
  }

  #pms-map-panel .map-toolbar-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  #pms-map-panel .map-filter-actions {
    grid-template-columns: 1fr;
  }

  .map-detail-modal-dialog {
    max-width: calc(100vw - 20px);
    margin: 0.5rem auto;
  }

  .map-detail-modal .modal-body {
    max-height: 78vh;
    padding: 0.9rem;
  }

  .map-detail-layout {
    grid-template-columns: 1fr;
  }

  #pms-map-panel .map-hover-tooltip {
    display: none !important;
  }

  .map-gallery-stage {
    gap: 0.75rem;
    grid-template-columns: 1fr;
  }

  .map-gallery-nav {
    justify-self: center;
  }

  .map-gallery-figure-wrap {
    min-height: 260px;
  }

  .map-gallery-meta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 575.98px) {
  #pms-map-panel .pms-map-canvas {
    min-height: 460px;
    height: 460px;
  }

  #pms-map-panel .ol-control button {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    color: #334155;
    font-size: 12px;
    height: 2.1em;
    width: 2.1em;
  }

  #pms-map-panel .ol-zoom {
    top: 0.45em !important;
    left: 0.45em !important;
  }

  #pms-map-panel .ol-fit-data {
    top: 4.55em !important;
    left: 0.45em !important;
    right: auto !important;
    bottom: auto !important;
  }

  #pms-map-panel .ol-export-png {
    top: 7.55em !important;
    left: 0.45em !important;
    right: auto !important;
    bottom: auto !important;
  }

  #pms-map-panel .layer-switcher {
    top: 0.45em !important;
    right: 0.45em !important;
    left: auto !important;
    bottom: auto !important;
  }

  #pms-map-panel .ol-full-screen {
    top: 3.45em !important;
    right: 0.45em !important;
    left: auto !important;
    bottom: auto !important;
  }

  #pms-map-panel .ol-zoomslider,
  #pms-map-panel .ol-rotate,
  #pms-map-panel .ol-overviewmap,
  #pms-map-panel .ol-mouse-position {
    display: none !important;
  }

  #pms-map-panel .ol-scale-line {
    bottom: 0.45em !important;
    left: 0.45em !important;
    right: auto !important;
    top: auto !important;
    max-width: calc(100% - 0.9em);
  }

  #pms-map-panel .pms-map-canvas {
    min-height: 340px;
    height: 340px;
  }
}

.rabill-lines-card .table-responsive {
  width: 100%;
  overflow-x: auto;
}

.rabill-lines-table {
  width: 100%;
  table-layout: auto;
}

.rabill-lines-table th,
.rabill-lines-table td {
  white-space: nowrap;
}

.rabill-lines-table .rabill-text-safe {
  display: block;
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-badge {
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
}

.icon-outer {
  width: 40px;
  height: 35px;
}

/* CSS for the Dashboard page */

/* Make the chart container responsive */
#chart_div,
#chart_div,
#inventory_chart_div {
  width: 100%;
  height: 100%;
}

/* Add some spacing and padding */
.chart-container {
  padding: 20px;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  flex: 1;
  width: 100%;
  overflow-x: auto;
  /* Allow horizontal scrolling on smaller screens */
  overflow-y: auto;
  /* Enable vertical scrolling for larger charts */
  max-height: 600px;
  /* Set max height to control vertical scroll */
  position: relative;
}

/* Style the Gantt chart container */
.google-visualization-chart-gantt {
  background-color: #fff;
  border-radius: 2px;
}

/* Style the Gantt chart elements */
.google-visualization-gantt-bar {
  fill: #5e97f6;
}

/* Add padding to the chart containers */
.bg-light.text-center.rounded.p-4 {
  padding: 20px;
}

/* Add margin between the two charts */
.mb-4 {
  margin-bottom: 1rem;
}

/* Container should take full width and adjust height automatically */
#chart_div {
  width: 100%;
  min-width: 500px;
  position: relative;
  overflow: auto;
  max-height: 200px;
}

#chart_div1 {
  width: 100%;
  min-width: 700px;
  position: relative;
  overflow: auto;
  max-height: 500px;
}

/* Adjust the SVG element */
#chart_div > div > div > svg {
  width: 100%;
  height: auto;
  /* Allow the height to be flexible */
}

/* Handle text overflow for long task names */
.google-visualization-gantt-task-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Add ellipsis for overflowing text */
  max-width: 250px;
  /* Set a maximum width for task labels */
}

/* Adjust the SVG element */
#chart_div1 > div > div > svg {
  width: 100%;
  height: auto;
  /* Allow the height to be flexible */
  overflow-y: auto;
  /* Add scrollbars if content overflows */
}

/* Extended button styles moved to buttons.css */

/* CSS for the dropdown info button */
.dropdown {
  position: relative;
  display: inline-block;
}

.details-section {
  display: flex;
  align-items: center;
}

.dropbtn {
  border: none;
  outline: none;

  cursor: pointer;
}

/*.rounded-circle {
  border-radius: 50%;
}*/

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: max-content;
  border: 1px solid #ddd;
  padding: 15px;
  z-index: 1;
}

/* Set the custom link for user manual */
.btn1.custom-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  color: #2e3192;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  overflow: hidden;
  border: 0.5px solid #2e3192;
  border-radius: 2px;
  transition:
    color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
}

.btn1.custom-link:hover {
  color: #fff;
  background: #2196f3;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 3px 10px rgba(0, 0, 0, 0.1);
}

.btn1.custom-link span {
  position: absolute;
  display: block;
  background: #2196f3;
  /* transition: all 0.3s ease; */
}

.btn1.custom-link span:nth-child(1) {
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
}

.btn1.custom-link span:nth-child(2) {
  top: -100%;
  right: 0;
  width: 2px;
  height: 100%;
}

.btn1.custom-link span:nth-child(3) {
  bottom: 0;
  right: -100%;
  width: 100%;
  height: 2px;
}

.btn1.custom-link span:nth-child(4) {
  bottom: -100%;
  left: 0;
  width: 2px;
  height: 100%;
}

.btn1.custom-link:hover span:nth-child(1) {
  left: 100%;
}

.btn1.custom-link:hover span:nth-child(2) {
  top: 100%;
}

.btn1.custom-link:hover span:nth-child(3) {
  right: 100%;
}

.btn1.custom-link:hover span:nth-child(4) {
  bottom: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .btn1.custom-link {
    padding: 10px 20px;
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .btn1.custom-link {
    padding: 7px 7px;
    font-size: 7px;
  }
}

.expenditure-value {
  font-size: 16px;
  /* Set the font size for the expenditure value */
}

@media (max-width: 720px) {
  .expenditure-value {
    font-size: 12px;
    /* Reduce font size for smaller screens */
  }
}

.dropdown-content p {
  margin: 5px 0;
}

/* Show dropdown content on button click */
.show {
  display: block;
}

/* Summary bar mobile overrides moved to components.css */

/* Table mobile overrides moved to components.css */

/* Additional styles for the icon animations */

.animated-card:hover .fa-chart-line,
.animated-card:hover .fa-chart-bar,
.animated-card:hover .fa-chart-area,
.animated-card:hover .fa-chart-pie {
  animation: rotate 1s;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Base logo styles */
.logo-image {
  margin-right: 15px;
  /* spacing between images */
  border-radius: 2px; /* rounded corners */
  height: 70%;
  /* relative to container */
  max-height: 75px;
  /* safety cap */
  object-fit: contain;
  /* prevent distortion */
}

/* Tablet */
@media (min-width: 768px) {
  .logo-image {
    height: 60%;
  }
}

/* Desktop */
@media (min-width: 992px) {
  .logo-image {
    height: 50%;
  }
}

/* Large Desktop */
@media (min-width: 1200px) {
  .logo-image {
    height: 40%;
  }
}

/* --- Digital Engraved Footer --- */
/* --- "Next Gen" Professional Footer --- */
.footer-digital {
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  font-family:
    'Inter',
    system-ui,
    -apple-system,
    sans-serif;
  letter-spacing: 0.01em;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  /* Modern glass feel if applicable */
}

.footer-digital .footer-text {
  color: #64748b;
  /* Slate 500 - Professional Grey */
  font-size: 0.85rem;
  font-weight: 500;
}

.footer-digital .footer-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}

.footer-digital .footer-link:hover {
  color: #0f172a;
  /* Darker slate hover */
}

/* "Digital Footprint" Mark - Minimal & Clean */
.footer-digital .digital-mark {
  font-family:
    'Inter',
    system-ui,
    -apple-system,
    sans-serif;
  /* Clean Sans */
  font-size: 0.8rem;
  font-weight: 700;
  /* Bold standout */
  text-transform: uppercase;
  color: var(--primary);
  /* Corporate Blue */
  letter-spacing: 0.05em;
  padding: 0;
  /* No box */
  background: transparent;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  vertical-align: middle;
  /* Fix alignment */
  margin-top: -2px;
}

.footer-digital .digital-mark:hover {
  color: #0f172a;
  /* Dark hover */
  background: transparent;
  border-color: transparent;
}

.footer-digital .digital-mark::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: #22c55e;
  /* Green for 'Live/Active' */
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
  /* Gentle glow */
}

/* --- Notification Dropdown (Premium & Responsive) --- */
.notification-dropdown-menu {
  width: 360px !important;
  max-width: 95vw !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  /* Slightly more defined border */
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08) !important;
  border-radius: 0 !important;
  /* Fully square sharp Look */
  right: 0 !important;
  left: auto !important;
  margin-top: 15px !important;
  /* Align with navbar bottom edge */
  overflow: hidden !important;
  background-color: #ffffff !important;
  z-index: 1050 !important;
  transform-origin: top right;
  /* Scale/Slide from top right */
}

/* Mobile Alignment (Full width near-edge) */
@media (max-width: 575.98px) {
  .notification-dropdown-menu {
    position: fixed !important;
    top: 64px !important;
    /* Navbar bottom */
    left: 15px !important;
    right: 15px !important;
    width: auto !important;
    max-width: calc(100vw - 30px) !important;
    margin: 0 !important;
    transform: none !important;
    border-radius: 0 !important;
    /* Fully square */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
  }
}

@keyframes slideInDropdown {
  from {
    opacity: 0;
    transform: translateY(-5px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.notification-item {
  transition: background-color 0.15s ease;
}

.notification-item:hover {
  background-color: #f8f9fa;
}

.notification-item.unread {
  background-color: #f0fdf4;
  /* Very subtle green/blue tint (Corporate clean) */
}

.notification-item.unread::before {
  /* Left edge accent for unread */
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--primary);
}

/* Keep header/footer fixed in dropdown and scroll only the list content */
.notification-dropdown-menu .notification-list {
  max-height: min(52vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Scrollbar refinement */
.custom-scrollbar::-webkit-scrollbar {
  width: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 2px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Global fix for overlapping dropdown arrows */
.bi-caret-down-fill::before {
  content: none !important;
}

/* Global fix for unprofessional focus glow (Bootstrap box-shadow) */
:focus,
.form-control:focus,
.btn:focus,
.dropdown-item:focus,
.nav-link:focus,
.navbar-toggler:focus {
  box-shadow: none !important;
  outline: none !important;
}

/* RA Bill detail tweaks (use base stylesheet, no inline styles) */
.rabill-attachment-name {
  max-width: 200px;
}

/* Timeline styles moved from template */
.timeline-v2 {
  position: relative;
  padding-left: 20px;
}

.timeline-v2::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 5px;
  bottom: 5px;
  width: 2px;
  background: #e9ecef;
}

.timeline-step {
  position: relative;
  padding-bottom: 12px;
}

.timeline-step:last-child {
  padding-bottom: 0;
}

.step-marker {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #dee2e6;
  border: 2px solid #fff;
  transition: all 0.3s;
}

.timeline-step.active .step-marker {
  background: var(--bs-primary);
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
}

.timeline-step.active .fw-bold {
  color: var(--bs-primary);
}

/* RA Bill detail layout refinements */
.rabill-spec-card {
  overflow: visible;
}

.rabill-spec-header {
  align-items: center;
  flex-wrap: nowrap;
  overflow: hidden;
}

.rabill-spec-header .badge {
  white-space: nowrap;
  margin-left: auto;
  flex: 0 0 auto;
}

.rabill-spec-title {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rabill-spec-body {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.rabill-spec-body .row {
  row-gap: 0.5rem;
}

.rabill-lines-table th,
.rabill-lines-table td {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.rabill-lines-card .table {
  margin-bottom: 0;
}

.rabill-workflow {
  overflow: visible;
}

.rabill-workflow-header {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.rabill-workflow-actions .btn {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  font-size: 0.8rem;
}

.rabill-workflow .bg-warning {
  padding: 0.35rem;
  margin-bottom: 0.5rem !important;
}

.rabill-workflow .x-small {
  font-size: 0.7rem;
}

.rabill-attachments .d-flex {
  gap: 0.5rem;
}

/* ============================================================================
   TPGC MOBILE ENHANCEMENTS
   Generated from template analysis
   Templates analyzed: 437
   Unique classes: 456
   ============================================================================ */

/* Found 10 buttons with icons that need mobile handling */

/* --- Mobile: Buttons with icons --- */
@media (max-width: 768px) {
  /* All buttons in action areas - icon only */
  .action-col .btn {
    min-width: 36px !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0.25rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Hide text in action buttons, keep icons */
  .action-col .btn {
    overflow: hidden !important;
  }

  .action-col .btn i,
  .action-col .btn .bi,
  .action-col .btn [class*='fa-'] {
    margin: 0 !important;
    font-size: 1rem !important;
  }

  /* --- Mobile: Tables --- */
  .table-responsive {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
  }

  /* Action column - sticky with solid background */
  .action-col {
    position: sticky !important;
    right: 0 !important;
    background: #ffffff !important;
    z-index: 10 !important;
    border-left: 1px solid #dee2e6 !important;
    min-width: 70px !important;
    max-width: 80px !important;
  }

  /* Table cells - single line */
  .table td,
  .table th {
    white-space: nowrap !important;
    font-size: 0.8125rem !important;
    padding: 0.5rem 0.75rem !important;
  }

  /* --- Mobile: Form Toolbar Buttons (icon-only) --- */
  /* Square buttons with proper spacing - remove gap, me-*, ms-* from icons */
  .border-bottom .d-flex .btn,
  .card-header .d-flex .btn,
  .d-flex.align-items-center .btn {
    min-width: 36px !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0.35rem 0.35rem !important;
    border-radius: 2px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Remove gap from button containers */
  .border-bottom .d-flex,
  .card-header .d-flex {
    gap: 0.5rem !important;
  }

  /* Hide text by setting font-size to 0 */
  .border-bottom .d-flex .btn,
  .card-header .d-flex .btn,
  .d-flex.align-items-center .btn {
    font-size: 0 !important;
  }

  /* Restore icon size and remove me-*, ms-* spacing */
  .border-bottom .d-flex .btn i,
  .border-bottom .d-flex .btn svg,
  .border-bottom .d-flex .btn .bi,
  .border-bottom .d-flex .btn [class*='fa-'],
  .border-bottom .d-flex .btn [class*='me-'],
  .border-bottom .d-flex .btn [class*='ms-'],
  .card-header .d-flex .btn i,
  .card-header .d-flex .btn svg,
  .card-header .d-flex .btn .bi,
  .card-header .d-flex .btn [class*='fa-'],
  .card-header .d-flex .btn [class*='me-'],
  .card-header .d-flex .btn [class*='ms-'],
  .d-flex.align-items-center .btn i,
  .d-flex.align-items-center .btn svg,
  .d-flex.align-items-center .btn .bi,
  .d-flex.align-items-center .btn [class*='fa-'],
  .d-flex.align-items-center .btn [class*='me-'],
  .d-flex.align-items-center .btn [class*='ms-'] {
    font-size: 1rem !important;
    margin: 0 !important;
    margin-inline-end: 0 !important;
    margin-inline-start: 0 !important;
    padding: 0 !important;
  }

  /* List controls - compact and proper on mobile */
  .list-controls-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
    align-items: center !important;
    padding: 0.5rem !important;
  }

  .list-controls-grid .search-wrapper {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .list-controls-grid form {
    margin-bottom: 0 !important;
  }

  .list-controls-grid .input-group {
    font-size: 0.85rem !important;
  }

  .list-controls-grid .input-group-text {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.85rem !important;
    background: #fff !important;
    border-color: #dee2e6 !important;
  }

  .list-controls-grid .input-group-text i {
    margin: 0 !important;
    font-size: 0.9rem !important;
  }

  .list-controls-grid .form-control {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.6rem !important;
    border-color: #dee2e6 !important;
  }

  .list-controls-grid .form-select {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.6rem !important;
    border-color: #dee2e6 !important;
  }

  .list-controls-grid .btn {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.8rem !important;
    border-radius: 2px !important;
  }

  .list-controls-grid .btn i {
    margin: 0 !important;
    font-size: 0.85rem !important;
  }

  .list-controls-grid .btn .btn-label {
    display: none !important;
  }

  .list-controls-grid .action-btn-group {
    display: flex !important;
    gap: 0.35rem !important;
    flex-shrink: 0 !important;
  }

  .list-controls-grid .search-wrapper {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .list-controls-grid .search-wrapper .form-control {
    font-size: 0.85rem !important;
    padding: 0.35rem 0.5rem !important;
  }

  .list-controls-grid .search-wrapper .input-group-text {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.85rem !important;
  }

  .list-controls-grid .action-btn-group {
    display: flex !important;
    gap: 0.35rem !important;
    flex-shrink: 0 !important;
  }

  .list-controls-grid .action-btn-group .btn {
    padding: 0.35rem 0.5rem !important;
    font-size: 0.8rem !important;
  }

  .list-controls-grid .action-btn-group .btn i {
    margin: 0 !important;
    font-size: 0.9rem !important;
  }

  .list-controls-grid .action-btn-group .btn .btn-label {
    display: none !important;
  }

  .list-controls-grid form {
    margin-bottom: 0 !important;
  }

  .list-controls-grid .search-wrapper {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .list-controls-grid .action-btn-group {
    display: flex !important;
    gap: 0.5rem !important;
    flex-shrink: 0 !important;
  }

  .list-controls-grid form {
    margin-bottom: 0 !important;
  }

  /* Search + action bar - matches template pattern */
  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
    padding: 0.75rem !important;
  }

  /* Search form wrapper - compact */
  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 .flex-grow-1 {
    flex: 1 1 auto !important;
    max-width: 100% !important;
    min-width: 200px !important;
  }

  /* Search form - compact */
  .p-3.border-bottom.d-flex.flex-wrap.just-content-between.align-items-center.gap-3 .flex-grow-1 form.d-flex {
    margin-bottom: 0 !important;
  }

  /* Search input */
  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 .form-control {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.6rem !important;
    border-color: #dee2e6 !important;
    height: auto !important;
  }

  /* Search button - icon only style */
  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 .btn-primary {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.8rem !important;
  }

  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 .btn-primary i {
    margin: 0 !important;
    font-size: 0.9rem !important;
  }

  /* Action buttons container */
  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 .d-flex.gap-2 {
    display: flex !important;
    gap: 0.5rem !important;
    flex-shrink: 0 !important;
  }

  /* Action buttons */
  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 .btn {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.8rem !important;
  }

  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 .btn i {
    margin: 0 !important;
    font-size: 0.85rem !important;
  }

  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 .btn-outline-danger,
  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 .btn-outline-secondary {
    padding: 0.35rem 0.5rem !important;
  }
}
/* Mobile Search Bar - compact and clean */
.mobile-search-bar,
.p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3.bg-light-subtle {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.5rem !important;
  background: #f8f9fa !important;
}

/* Search form wrapper - full width */
.mobile-search-bar .flex-grow-1,
.mobile-search-bar form.d-flex {
  flex: 1 1 auto !important;
  min-width: 150px !important;
  max-width: 100% !important;
  margin-bottom: 0 !important;
}

/* Search input - compact */
.mobile-search-bar .form-control,
.mobile-search-bar input[type='text'],
.mobile-search-bar input[type='search'] {
  font-size: 0.85rem !important;
  padding: 0.4rem 0.6rem !important;
  border-color: #dee2e6 !important;
  border-radius: 2px !important;
  height: auto !important;
}

/* Search button - icon only, square */
.mobile-search-bar .btn-primary,
.mobile-search-bar button[type='submit'] {
  padding: 0.4rem !important;
  border-radius: 2px !important;
  /* width: 32px !important;
  height: 32px !important; */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.mobile-search-bar .btn-primary i,
.mobile-search-bar button[type='submit'] i {
  margin: 0 !important;
  font-size: 0.9rem !important;
}

/* Action buttons container */
.mobile-search-bar .d-flex.gap-2,
.mobile-search-bar .action-btn-group {
  display: flex !important;
  gap: 0.4rem !important;
  flex-shrink: 0 !important;
}

/* All action buttons - icon only, square, small */
.mobile-search-bar .btn,
.mobile-search-bar button {
  padding: 0.35rem 0.5rem !important;
  font-size: 0 !important;
  border-radius: 2px !important;
  /* width: 32px !important;
  height: 32px !important; */
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.mobile-search-bar .btn i,
.mobile-search-bar button i {
  margin: 0 !important;
  font-size: 0.85rem !important;
}

/* Restore text for non-mobile */
@media (min-width: 769px) {
  .mobile-search-bar .btn {
    font-size: 0.875rem !important;
    width: auto !important;
    height: auto !important;
    padding: 0.4rem 0.75rem !important;
  }

  .mobile-search-bar .btn i {
    margin-right: 0.35rem !important;
  }

  .mobile-search-bar .btn .btn-text {
    display: inline !important;
  }
}

/* ============================================================================
   END TPGC MOBILE ENHANCEMENTS
   ============================================================================ */

/* ========== MOBILE NAVBAR - Remove padding ========== */
@media (max-width: 768px) {
  .navbar.px-3.py-3,
  .navbar.px-3,
  .navbar.py-3 {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }

  .navbar .container-fluid {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  /* Mobile navbar - compact brand */
  .navbar .brand-img {
    max-height: 32px !important;
  }

  .navbar .brand-title {
    font-size: 1rem !important;
  }

  .navbar .brand-sub {
    display: none !important;
  }

  .navbar .brand-sep {
    display: none !important;
  }
}

/* ========== ALL BUTTONS - Icon Only on Mobile ========== */
@media (max-width: 768px) {
  /* All buttons with icons become icon-only */
  .btn [class*='fa-'],
  .btn [class*='bi-'],
  .btn .fa,
  .btn .bi {
    margin: 0 !important;
    font-size: 1rem !important;
  }

  /* Hide all button text on mobile */
  .btn,
  .btn span:not([class*='fa-']):not([class*='bi-']):not(.fa):not(.bi) {
    /* font-size: 0.8rem !important; */
    /* padding: 0.5rem !important; */
    /* width: 36px !important;
    height: 36px !important; */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Restore icon size */
  .btn [class*='fa-'],
  .btn [class*='bi-'],
  .btn .fa,
  .btn .bi {
    font-size: 1rem !important;
  }

  /* Icon-only buttons in any container */
  .d-flex.gap-2 .btn,
  .action-btn-group .btn,
  .btn-group .btn {
    padding: 0.4rem !important;
    /* width: 32px !important;
    height: 32px !important; */
  }

  .d-flex.gap-2 .btn [class*='fa-'],
  .d-flex.gap-2 .btn [class*='bi-'],
  .action-btn-group .btn [class*='fa-'],
  .action-btn-group .btn [class*='bi-'] {
    font-size: 0.9rem !important;
    margin: 0 !important;
  }

  /* Search button specific */
  .mobile-search-bar .btn-primary,
  .search-bar .btn-primary {
    padding: 0.4rem !important;
    /* width: 32px !important;
    height: 32px !important; */
    border-radius: 2px !important;
  }

  /* Delete button */
  .btn-outline-danger {
    padding: 0.4rem !important;
    /* width: 32px !important;
    height: 32px !important; */
  }
}

/* ========== RESTORE DESKTOP ========== */
@media (min-width: 769px) {
  .btn {
    font-size: 0.875rem !important;
    padding: 0.5rem 1rem !important;
    width: auto !important;
    height: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
  }

  .btn [class*='fa-'],
  .btn [class*='bi-'] {
    font-size: inherit !important;
  }
}

/* ========== MOBILE SEARCH BAR - Compact ========== */
@media (max-width: 768px) {
  .mobile-search-bar,
  .p-3.border-bottom.d-flex.flex-wrap.justify-content-between.align-items-center.gap-3 {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem !important;
    background: #f8f9fa !important;
  }

  .mobile-search-bar .flex-grow-1 {
    flex: 1 1 auto !important;
    min-width: 120px !important;
    max-width: 100% !important;
  }

  .mobile-search-bar .form-control {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.6rem !important;
    border-radius: 2px !important;
  }

  .mobile-search-bar .d-flex.gap-2 {
    display: flex !important;
    gap: 0.4rem !important;
  }
}

/* ========== SUMMARY BAR - Mobile Responsive ========== */
.summary-bar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  padding: 1rem 1.5rem !important;
  background: #fff !important;
  border-bottom: 1px solid #e9ecef !important;
}

.summary-bar > div:first-child {
  flex: 1 !important;
  min-width: 0 !important;
}

.summary-bar h1 {
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.25rem !important;
  color: #212529 !important;
}

.summary-bar .subtitle {
  font-size: 0.875rem !important;
  margin-bottom: 0 !important;
}

.summary-bar .breadcrumb {
  margin-bottom: 0.5rem !important;
  font-size: 0.75rem !important;
}

/* Action buttons container */
.summary-bar .action-btn-group {
  display: flex !important;
  gap: 0.5rem !important;
  flex-shrink: 0 !important;
}

/* ========== MOBILE SUMMARY BAR ========== */
@media (max-width: 768px) {
  .summary-bar {
    flex-direction: row !important;
    align-items: center !important;
    padding: 0.75rem 1rem !important;
    gap: 0.75rem !important;
  }

  .summary-bar h1 {
    font-size: 1.1rem !important;
  }

  .summary-bar .subtitle {
    display: none !important;
  }

  .summary-bar .breadcrumb {
    font-size: 0.65rem !important;
    margin-bottom: 0.25rem !important;
  }

  .summary-bar .breadcrumb-item {
    padding-right: 0.25rem !important;
    padding-left: 0 !important;
  }

  .summary-bar .breadcrumb-item + .breadcrumb-item::before {
    padding-right: 0.25rem !important;
  }

  /* Action buttons - icon only, square */
  .summary-bar .action-btn-group .btn {
    padding: 0.4rem !important;
    /* width: 32px !important;
    height: 32px !important; */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 2px !important;
  }

  .summary-bar .action-btn-group .btn i {
    margin: 0 !important;
    font-size: 0.9rem !important;
  }

  .summary-bar .action-btn-group .btn .btn-label {
    display: none !important;
  }
}

/* ========== SMALL MOBILE ========== */
@media (max-width: 480px) {
  .summary-bar {
    padding: 0.5rem 0.75rem !important;
    gap: 0.5rem !important;
  }

  .summary-bar h1 {
    font-size: 1rem !important;
  }

  .summary-bar .action-btn-group .btn {
    padding: 0.35rem !important;
    width: 28px !important;
    height: 28px !important;
  }

  .summary-bar .action-btn-group .btn i {
    font-size: 0.8rem !important;
  }
}

/* ========== DESKTOP RESTORE ========== */
@media (min-width: 769px) {
  .summary-bar .action-btn-group .btn {
    font-size: 0.875rem !important;
    padding: 0.5rem 1rem !important;
  }

  .summary-bar .action-btn-group .btn i {
    margin-right: 0.35rem !important;
  }

  .summary-bar .action-btn-group .btn .btn-label {
    display: inline !important;
  }
}

/* ========== SUMMARY BAR - Modern & Responsive ========== */
.summary-bar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  padding: 1rem 1.5rem !important;
  background: #fff !important;
  border-bottom: 1px solid #e9ecef !important;
}

.summary-bar > div:first-child {
  flex: 1 !important;
  min-width: 0 !important;
}

.summary-bar h1 {
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.25rem !important;
  color: #212529 !important;
  line-height: 1.3 !important;
}

.summary-bar .subtitle {
  font-size: 0.8rem !important;
  color: #6c757d !important;
  margin-bottom: 0 !important;
  font-weight: 400 !important;
}

.summary-bar .breadcrumb {
  margin-bottom: 0.5rem !important;
  font-size: 0.75rem !important;
}

/* Action buttons container */
.summary-bar .action-btn-group {
  display: flex !important;
  gap: 0.5rem !important;
  flex-shrink: 0 !important;
}

/* ========== MOBILE SUMMARY BAR ========== */
@media (max-width: 768px) {
  .summary-bar {
    flex-direction: row !important;
    align-items: center !important;
    padding: 0.75rem 1rem !important;
    gap: 0.75rem !important;
    background: #f8f9fa !important;
  }

  .summary-bar h1 {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.15rem !important;
  }

  .summary-bar .subtitle {
    display: block !important;
    font-size: 0.7rem !important;
    color: #868e96 !important;
    margin-bottom: 0.25rem !important;
  }

  .summary-bar .breadcrumb {
    margin-bottom: 0.35rem !important;
    font-size: 0.65rem !important;
  }

  .summary-bar .breadcrumb-item a {
    color: #495057 !important;
  }

  .summary-bar .breadcrumb-item.active {
    color: #212529 !important;
  }

  /* Centered square buttons */
  .summary-bar .action-btn-group {
    display: flex !important;
    gap: 0.4rem !important;
    margin-left: auto !important;
  }

  .summary-bar .action-btn-group .btn {
    padding: 0 !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0 !important;
    border: 1px solid #dee2e6 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  .summary-bar .action-btn-group .btn:hover {
    background: #f1f3f5 !important;
    border-color: #ced4da !important;
  }

  .summary-bar .action-btn-group .btn i {
    margin: 0 !important;
    font-size: 0.95rem !important;
    color: #495057 !important;
  }

  .summary-bar .action-btn-group .btn .btn-label {
    display: none !important;
  }

  .summary-bar .action-btn-group .btn-outline-secondary {
    border-color: #dee2e6 !important;
    color: #495057 !important;
  }
}

/* ========== SMALL MOBILE ========== */
@media (max-width: 480px) {
  .summary-bar {
    padding: 0.6rem 0.75rem !important;
    gap: 0.5rem !important;
  }

  .summary-bar h1 {
    font-size: 1rem !important;
  }

  .summary-bar .subtitle {
    font-size: 0.65rem !important;
  }

  .summary-bar .action-btn-group .btn {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
  }

  .summary-bar .action-btn-group .btn i {
    font-size: 0.85rem !important;
  }
}

/* ========== DESKTOP ========== */
@media (min-width: 769px) {
  .summary-bar .action-btn-group .btn {
    font-size: 0.85rem !important;
    padding: 0.5rem 1rem !important;
    border-radius: 2px !important;
  }

  .summary-bar .action-btn-group .btn i {
    margin-right: 0.4rem !important;
  }

  .summary-bar .action-btn-group .btn .btn-label {
    display: inline !important;
  }
}

/* ========== ACTION BTTN GROUP - Icon Centered, No Text Space ========== */
.action-btn-group {
  display: flex !important;
  gap: 0.5rem !important;
  flex-shrink: 0 !important;
}

.action-btn-group .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
}

/* ========== MOBILE: Icon Only, Centered ========== */
@media (max-width: 768px) {
  .action-btn-group .btn {
    padding: 0 !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 0 !important;
    border: 1px solid #2e3192 !important;
    background: #2e3192 !important;
    color: #fff !important;
    box-shadow: none !important;
  }

  .action-btn-group .btn:hover {
    background: #252780 !important;
    border-color: #252780 !important;
  }

  .action-btn-group .btn i {
    margin: 0 !important;
    font-size: 1rem !important;
    color: #fff !important;
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  /* Remove text span completely */
  .action-btn-group .btn .btn-label {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0 !important;
    opacity: 0 !important;
  }

  .action-btn-group {
    margin-left: auto !important;
  }

  .action-btn-group .btn-outline-secondary {
    background: #2e3192 !important;
    border-color: #2e3192 !important;
    color: #fff !important;
  }

  .action-btn-group .btn-outline-secondary i {
    color: #fff !important;
  }
}

/* ========== SMALL MOBILE ========== */
@media (max-width: 480px) {
  .action-btn-group .btn {
    /* width: 32px !important;
    height: 32px !important; */
    min-width: 32px !important;
  }

  .action-btn-group .btn i {
    font-size: 0.9rem !important;
  }
}

/* ========== DESKTOP ========== */
@media (min-width: 769px) {
  .action-btn-group .btn {
    font-size: 0.85rem !important;
    padding: 0.5rem 1rem !important;
    border-radius: 2px !important;
  }

  .action-btn-group .btn i {
    margin-right: 0.4rem !important;
    position: static !important;
    transform: none !important;
  }

  .action-btn-group .btn .btn-label {
    display: inline !important;
    width: auto !important;
    height: auto !important;
    opacity: 1 !important;
  }
}

/* ========== SUMMARY BAR - Theme Colors ========== */
.summary-bar h1 {
  color: #2e3192 !important;
}

.summary-bar h1 {
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.25rem !important;
}

.summary-bar .subtitle {
  font-size: 0.8rem !important;
  color: #6c757d !important;
}

@media (max-width: 768px) {
  .summary-bar h1 {
    font-size: 1.1rem !important;
    color: #2e3192 !important;
  }

  .summary-bar .subtitle {
    display: block !important;
    font-size: 0.7rem !important;
    color: #868e96 !important;
  }

  .summary-bar {
    background: #fff !important;
  }
}

/* ========== ACTION BUTTONS - Flexbox Centering ========== */
.action-btn-group {
  display: flex !important;
  gap: 0.5rem !important;
  flex-shrink: 0 !important;
}

.action-btn-group .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ========== MOBILE: Clean Icon Buttons ========== */
@media (max-width: 768px) {
  .action-btn-group {
    margin-left: auto !important;
  }

  .action-btn-group .btn {
    padding: 0 !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    position: relative !important;
  }

  .action-btn-group .btn:hover {
    background: transparent !important;
  }

  /* Icon container - centered with flexbox */
  .action-btn-group .btn i {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.1rem !important;
    position: static !important;
    transform: none !important;
    left: auto !important;
  }

  /* Text span - COMPLETELY REMOVED from layout */
  .action-btn-group .btn .btn-label {
    display: none !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    max-width: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    clip: rect(0, 0, 0, 0) !important;
  }

  /* Square icon button with border */
  .action-btn-group .btn {
    border: 1px solid #2e3192 !important;
    background: #2e3192 !important;
  }

  .action-btn-group .btn i {
    color: #fff !important;
  }

  .action-btn-group .btn-outline-secondary {
    border: 1px solid #2e3192 !important;
    background: #2e3192 !important;
  }

  .action-btn-group .btn-outline-secondary i {
    color: #fff !important;
  }
}

/* ========== SMALL MOBILE ========== */
@media (max-width: 480px) {
  .action-btn-group .btn {
    /* width: 32px !important;
    height: 32px !important; */
    min-width: 32px !important;
  }

  .action-btn-group .btn i {
    font-size: 0.95rem !important;
  }
}

/* ========== DESKTOP ========== */
@media (min-width: 769px) {
  .action-btn-group .btn {
    font-size: 0.85rem !important;
    padding: 0.5rem 1rem !important;
    border-radius: 2px !important;
  }

  .action-btn-group .btn i {
    margin-right: 0.4rem !important;
  }

  .action-btn-group .btn .btn-label {
    display: inline !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible !important;
    pointer-events: auto !important;
    clip: none !important;
  }
}

/* ========== SUMMARY BAR ========== */
.summary-bar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  padding: 1rem 1.5rem !important;
  background: #fff !important;
  border-bottom: 1px solid #e9ecef !important;
}

.summary-bar h1 {
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.25rem !important;
  color: #2e3192 !important;
}

.summary-bar .subtitle {
  font-size: 0.8rem !important;
  color: #6c757d !important;
  margin-bottom: 0 !important;
}

@media (max-width: 768px) {
  .summary-bar {
    padding: 0.75rem 1rem !important;
    gap: 0.75rem !important;
    background: #fff !important;
  }

  .summary-bar h1 {
    font-size: 1.1rem !important;
    color: #2e3192 !important;
  }

  .summary-bar .subtitle {
    display: block !important;
    font-size: 0.7rem !important;
    color: #868e96 !important;
  }
}

/* task-output-panel accordion fixes - proper overflow handling */
.task-output-panel,
.task-output-panel .accordion-collapse,
.task-output-panel .accordion-body {
  overflow: hidden;
}

.task-output-panel .table-responsive {
  overflow-x: auto;
  overflow-y: visible;
}

.task-output-panel .searchable-select,
.task-output-panel .tpgc-searchable-select {
  position: relative;
  z-index: 3;
}

.task-output-panel .searchable-select .dropdown-menu,
.task-output-panel .tpgc-searchable-select .dropdown-menu {
  z-index: 1085;
  min-width: 100%;
}

.ss-portal-menu {
  z-index: 2000 !important;
}

/* ACCORDION FIXES - Proper overflow handling to prevent content showing behind accordions */
.task-detail-page #accordionTask {
  position: relative;
  z-index: 1;
}

.task-detail-page #accordionTask .accordion-item {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.task-detail-page #accordionTask .accordion-collapse {
  overflow: hidden;
}

.task-detail-page #accordionTask .accordion-collapse.collapse:not(.show) {
  display: none;
}

.task-detail-page #accordionTask .accordion-body {
  overflow: hidden;
}

/* ========== SEARCH INPUT GROUP - Mobile ========== */
.input-group-sm {
  font-size: 0.85rem !important;
}

@media (max-width: 768px) {
  .input-group-sm {
    font-size: 0.85rem !important;
  }

  .input-group-sm .input-group-text {
    padding: 0.4rem 0.6rem !important;
    background: #fff !important;
    border-color: #dee2e6 !important;
  }

  .input-group-sm .input-group-text i {
    margin: 0 !important;
    font-size: 0.9rem !important;
    color: #6c757d !important;
  }

  .input-group-sm .form-control {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.6rem !important;
    border-color: #dee2e6 !important;
  }

  .input-group-sm .btn-outline-primary {
    padding: 0.4rem 0.6rem !important;
    font-size: 0 !important;
    border-radius: 2px !important;
  }

  .input-group-sm .btn-outline-primary i {
    margin: 0 !important;
    font-size: 0.9rem !important;
  }

  .input-group-sm .btn-outline-primary .btn-label {
    display: none !important;
  }

  .input-group-sm .form-control.border-start-0 {
    padding-left: 0.5rem !important;
  }
}

/* ========== LIST CONTROLS GRID - Mobile ========== */
.list-controls-grid {
  display: grid !important;
  gap: 1rem !important;
  padding: 1rem !important;
}

.list-controls-grid .search-wrapper {
  width: 100% !important;
}

.list-controls-grid .search-wrapper form.d-grid {
  display: grid !important;
  gap: 0.75rem !important;
}

.list-controls-grid .row {
  margin: 0 !important;
}

.list-controls-grid .row .col-12 {
  padding: 0 0.25rem !important;
}

.list-controls-grid .form-select {
  font-size: 0.85rem !important;
  padding: 0.5rem 2rem 0.5rem 0.75rem !important;
  border-color: #dee2e6 !important;
  border-radius: 2px !important;
  background-color: #fff !important;
}

@media (max-width: 768px) {
  .list-controls-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    padding: 0.75rem !important;
    background: #f8f9fa !important;
  }

  .list-controls-grid .search-wrapper {
    width: 100% !important;
  }

  .list-controls-grid .search-wrapper form.d-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .list-controls-grid .row {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .list-controls-grid .row .col-12 {
    width: 100% !important;
    padding: 0 !important;
  }

  .list-controls-grid .form-select {
    font-size: 0.85rem !important;
    padding: 0.5rem 2rem 0.5rem 0.6rem !important;
    height: auto !important;
    min-height: 36px !important;
    border: 1px solid #dee2e6 !important;
    background-color: #fff !important;
  }

  /* Filter button */
  .list-controls-grid .d-grid .btn {
    width: 100% !important;
    padding: 0.5rem !important;
    font-size: 0 !important;
    border-radius: 2px !important;
    background: #2e3192 !important;
    border-color: #2e3192 !important;
  }

  .list-controls-grid .d-grid .btn i {
    margin: 0 !important;
    font-size: 0.95rem !important;
    color: #fff !important;
  }

  .list-controls-grid .d-grid .btn .btn-label {
    display: none !important;
  }

  /* Action buttons */
  .list-controls-grid .action-btn-group {
    display: flex !important;
    justify-content: flex-end !important;
    width: 100% !important;
  }

  .list-controls-grid .action-btn-group .btn {
    padding: 0.5rem 1rem !important;
    font-size: 0 !important;
    border-radius: 2px !important;
    background: #2e3192 !important;
    border-color: #2e3192 !important;
  }

  .list-controls-grid .action-btn-group .btn i {
    margin: 0 !important;
    font-size: 0.95rem !important;
    color: #fff !important;
  }

  .list-controls-grid .action-btn-group .btn .btn-label {
    display: none !important;
  }
}

/* ========== DESKTOP ========== */
@media (min-width: 769px) {
  .list-controls-grid {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 1rem !important;
    padding: 1rem 1.5rem !important;
  }

  .list-controls-grid .search-wrapper form.d-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 0.75rem !important;
  }

  .list-controls-grid .d-grid {
    display: grid !important;
  }

  .list-controls-grid .d-grid .btn {
    white-space: nowrap !important;
  }

  .list-controls-grid .d-grid .btn i {
    margin-right: 0.4rem !important;
  }

  .list-controls-grid .d-grid .btn .btn-label {
    display: inline !important;
  }

  .list-controls-grid .action-btn-group .btn {
    font-size: 0.85rem !important;
  }

  .list-controls-grid .action-btn-group .btn i {
    margin-right: 0.4rem !important;
  }

  .list-controls-grid .action-btn-group .btn .btn-label {
    display: inline !important;
  }
}

/* ========== LIST CONTROLS GRID - Inline Buttons ========== */
.list-controls-grid {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  gap: 1rem !important;
  padding: 1rem 1.5rem !important;
  align-items: center !important;
}

.list-controls-grid .search-wrapper {
  width: 100% !important;
}

.list-controls-grid .search-wrapper form.d-grid {
  display: grid !important;
  gap: 0.75rem !important;
}

.list-controls-grid .row {
  margin: 0 !important;
}

.list-controls-grid .row .col-12 {
  padding: 0 0.25rem !important;
}

.list-controls-grid .form-select {
  font-size: 0.85rem !important;
  padding: 0.5rem 2rem 0.5rem 0.75rem !important;
  border-color: #dee2e6 !important;
  border-radius: 2px !important;
  background-color: #fff !important;
}

/* Action buttons container */
.list-controls-grid .action-btn-group {
  display: flex !important;
  gap: 0.5rem !important;
  flex-shrink: 0 !important;
  align-items: center !important;
}

/* ========== MOBILE ========== */
@media (max-width: 768px) {
  .list-controls-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
    padding: 0.75rem !important;
    background: #f8f9fa !important;
    align-items: center !important;
  }

  .list-controls-grid .search-wrapper {
    flex: 1 1 100% !important;
    order: 1 !important;
    width: 100% !important;
  }

  .list-controls-grid .search-wrapper form.d-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .list-controls-grid .row {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .list-controls-grid .row .col-12 {
    width: 100% !important;
    padding: 0 !important;
    flex: 0 0 auto !important;
  }

  .list-controls-grid .form-select {
    font-size: 0.85rem !important;
    padding: 0.5rem 2rem 0.5rem 0.6rem !important;
    height: auto !important;
    min-height: 36px !important;
    border: 1px solid #dee2e6 !important;
    background-color: #fff !important;
    width: 100% !important;
  }

  /* Action buttons - inline with search wrapper */
  .list-controls-grid .action-btn-group {
    display: flex !important;
    gap: 0.5rem !important;
    flex: 0 0 auto !important;
    order: 2 !important;
    margin-left: auto !important;
  }

  /* All buttons - icon only */
  .list-controls-grid .d-grid .btn,
  .list-controls-grid .action-btn-group .btn {
    padding: 0.4rem 0.6rem !important;
    font-size: 0 !important;
    border-radius: 2px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #2e3192 !important;
    border-color: #2e3192 !important;
  }

  .list-controls-grid .d-grid .btn i,
  .list-controls-grid .action-btn-group .btn i {
    margin: 0 !important;
    font-size: 0.95rem !important;
    color: #fff !important;
  }

  .list-controls-grid .d-grid .btn .btn-label,
  .list-controls-grid .action-btn-group .btn .btn-label {
    display: none !important;
  }

  .list-controls-grid .btn-outline-primary {
    background: #2e3192 !important;
    border-color: #2e3192 !important;
    color: #fff !important;
  }
}

/* ========== SMALL MOBILE ========== */
@media (max-width: 480px) {
  .list-controls-grid .d-grid .btn,
  .list-controls-grid .action-btn-group .btn {
    /* width: 32px !important;
    height: 32px !important; */
    min-width: 32px !important;
    padding: 0.35rem !important;
  }

  .list-controls-grid .d-grid .btn i,
  .list-controls-grid .action-btn-group .btn i {
    font-size: 0.85rem !important;
  }
}

/* ========== DESKTOP ========== */
@media (min-width: 769px) {
  .list-controls-grid {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 1rem !important;
    padding: 1rem 1.5rem !important;
  }

  .list-controls-grid .search-wrapper form.d-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 0.75rem !important;
  }

  .list-controls-grid .row {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }

  .list-controls-grid .d-grid {
    display: grid !important;
  }

  .list-controls-grid .d-grid .btn {
    white-space: nowrap !important;
  }

  .list-controls-grid .d-grid .btn i {
    margin-right: 0.4rem !important;
  }

  .list-controls-grid .d-grid .btn .btn-label {
    display: inline !important;
  }

  .list-controls-grid .action-btn-group .btn {
    font-size: 0.85rem !important;
  }

  .list-controls-grid .action-btn-group .btn i {
    margin-right: 0.4rem !important;
  }

  .list-controls-grid .action-btn-group .btn .btn-label {
    display: inline !important;
  }
}

/* ========== PMS DASHBOARD SUMMARY BAR ========== */
.summary-bar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  padding: 1rem 1.5rem !important;
  background: #fff !important;
  border-bottom: 1px solid #e9ecef !important;
}

.summary-bar h1 {
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.25rem !important;
  color: #2e3192 !important;
}

.summary-bar .subtitle {
  font-size: 0.8rem !important;
  color: #6c757d !important;
  margin-bottom: 0 !important;
}

.summary-bar .action-btn-group {
  display: flex !important;
  gap: 0.5rem !important;
  flex-shrink: 0 !important;
}

/* PMS dashboard specific */
.summary-bar .action-btn-group > div {
  display: flex !important;
  gap: 0.5rem !important;
  align-items: center !important;
}

/* Dropdown selects */
.summary-bar .form-select {
  font-size: 0.85rem !important;
  padding: 0.5rem 2rem 0.5rem 0.75rem !important;
  border-color: #dee2e6 !important;
  border-radius: 2px !important;
  background-color: #fff !important;
}

/* ========== MOBILE PMS DASHBOARD ========== */
@media (max-width: 768px) {
  .summary-bar {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    padding: 0.75rem !important;
    gap: 0.5rem !important;
  }

  .summary-bar > div:first-child {
    flex: 1 1 auto !important;
    min-width: 50%;
  }

  .summary-bar h1 {
    font-size: 1.1rem !important;
  }

  .summary-bar .subtitle {
    display: block !important;
    font-size: 0.7rem !important;
  }

  .summary-bar .action-btn-group {
    flex-direction: row !important;
    gap: 0.5rem !important;
    width: auto !important;
  }

  .summary-bar .action-btn-group .btn {
    flex: 0 0 auto !important;
    padding: 0.4rem 0.6rem !important;
  }
}

.summary-bar .breadcrumb {
  margin-bottom: 0.35rem !important;
  font-size: 0.65rem !important;
}

/* Action buttons - wrap properly */
.summary-bar .action-btn-group {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
  width: 100% !important;
}

.summary-bar .action-btn-group > div {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
  width: 100% !important;
  margin-left: 0 !important;
}

/* Refresh button */
.summary-bar #refresh_btn {
  padding: 0.4rem !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 2px !important;
  background: #2e3192 !important;
  border-color: #2e3192 !important;
  order: 1 !important;
}

.summary-bar #refresh_btn i {
  margin: 0 !important;
  font-size: 0.95rem !important;
  color: #fff !important;
}

/* Dropdown selects - full width */
.summary-bar #office_select,
.summary-bar #project_select {
  flex: 1 1 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
  font-size: 0.85rem !important;
  padding: 0.5rem 2rem 0.5rem 0.6rem !important;
  height: auto !important;
  min-height: 36px !important;
  border: 1px solid #dee2e6 !important;
  background-color: #fff !important;
  order: 2 !important;
}

.summary-bar .form-select {
  width: 100% !important;
  max-width: 100% !important;
}

/* ========== TABLET ========== */
@media (min-width: 769px) and (max-width: 1199.98px) {
  .summary-bar .action-btn-group > div {
    flex-wrap: wrap !important;
  }

  .summary-bar #office_select,
  .summary-bar #project_select {
    min-width: 200px !important;
    max-width: 300px !important;
  }
}

/* ========== DESKTOP ========== */
@media (min-width: 1200px) {
  .summary-bar .action-btn-group > div {
    flex-direction: row !important;
    align-items: center !important;
  }

  .summary-bar #office_select,
  .summary-bar #project_select {
    min-width: 360px !important;
    max-width: 520px !important;
  }
}

/* ========== PMS DASHBOARD SUMMARY BAR ========== */
.summary-bar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  padding: 1rem 1.5rem !important;
  background: #fff !important;
  border-bottom: 1px solid #e9ecef !important;
}

.summary-bar h1 {
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.25rem !important;
  color: #2e3192 !important;
}

.summary-bar .subtitle {
  font-size: 0.8rem !important;
  color: #6c757d !important;
  margin-bottom: 0 !important;
}

.summary-bar .action-btn-group {
  display: flex !important;
  gap: 0.5rem !important;
  flex-shrink: 0 !important;
}

.summary-bar .action-btn-group > div {
  display: flex !important;
  gap: 0.5rem !important;
  align-items: center !important;
}

.summary-bar .form-select {
  font-size: 0.85rem !important;
  padding: 0.5rem 2rem 0.5rem 0.75rem !important;
  border-color: #dee2e6 !important;
  border-radius: 2px !important;
  background-color: #fff !important;
}

/* ========== MOBILE PMS ========== */
@media (max-width: 768px) {
  .summary-bar {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    padding: 0.5rem !important;
    gap: 0.5rem !important;
  }

  .summary-bar > div:first-child {
    flex: 1 1 auto !important;
    min-width: 50%;
  }

  .summary-bar h1 {
    font-size: 1rem !important;
  }

  .summary-bar .subtitle {
    display: none !important;
  }

  .summary-bar .breadcrumb {
    margin-bottom: 0.25rem !important;
  }

  .summary-bar .action-btn-group {
    flex-direction: row !important;
    gap: 0.5rem !important;
  }

  .summary-bar .action-btn-group .btn {
    flex: 0 0 auto !important;
    padding: 0.4rem 0.6rem !important;
  }
}

/* Action buttons - row on mobile */
.summary-bar .action-btn-group {
  display: flex !important;
  flex-direction: row !important;
  gap: 0.5rem !important;
  width: auto !important;
}

.summary-bar .action-btn-group > div {
  display: flex !important;
  flex-direction: row !important;
  gap: 0.5rem !important;
}

/* Refresh button */
.summary-bar #refresh_btn {
  padding: 0.5rem !important;
  width: 100% !important;
  font-size: 0 !important;
  border-radius: 2px !important;
  order: 1 !important;
}

.summary-bar #refresh_btn i {
  margin: 0 !important;
  font-size: 0.95rem !important;
}

.summary-bar #refresh_btn .btn-label {
  display: none !important;
}

/* Dropdown selects - FULL WIDTH */
.summary-bar #office_select,
.summary-bar #project_select {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
  flex: 1 1 100% !important;
  font-size: 0.9rem !important;
  padding: 0.6rem 2rem 0.6rem 0.75rem !important;
  height: 42px !important;
  border: 1px solid #dee2e6 !important;
  background-color: #fff !important;
  border-radius: 2px !important;
  cursor: pointer !important;
  order: 2 !important;
}

.summary-bar .form-select {
  width: 100% !important;
  max-width: 100% !important;
  font-size: 0.9rem !important;
  padding: 0.6rem 2rem 0.6rem 0.75rem !important;
  height: 42px !important;
  border: 1px solid #dee2e6 !important;
  background-color: #fff !important;
}

/* ========== DESKTOP ========== */
@media (min-width: 769px) {
  .summary-bar .action-btn-group > div {
    flex-direction: row !important;
    align-items: center !important;
  }

  .summary-bar #office_select,
  .summary-bar #project_select {
    min-width: 200px !important;
    max-width: 300px !important;
  }
}

/* ========== MAIN DASHBOARD SUMMARY BAR ========== */
.summary-title {
  flex: 1;
}

.summary-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-item {
  text-align: center;
  padding: 0.5rem 1rem;
}

.stat-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 600;
  color: #6c757d;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.stat-divider {
  width: 1px;
  height: 2rem;
  background: #dee2e6;
}

/* ========== MOBILE MAIN DASHBOARD ========== */
@media (max-width: 768px) {
  .summary-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0.75rem !important;
    gap: 0.75rem !important;
    background: #fff !important;
  }

  .summary-title h1 {
    font-size: 1.1rem !important;
    color: #2e3192 !important;
    margin-bottom: 0.25rem !important;
  }

  .summary-title .subtitle {
    font-size: 0.75rem !important;
    color: #6c757d !important;
    margin-bottom: 0 !important;
  }

  .summary-stats {
    display: flex !important;
    width: 100%;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem !important;
    background: #f8f9fa !important;
    border-radius: 2px !important;
    border: 1px solid #e9ecef !important;
  }

  .stat-item {
    flex: 1 !important;
    text-align: center !important;
    padding: 0.35rem !important;
  }

  .stat-label {
    font-size: 0.6rem !important;
    margin-bottom: 0.2rem !important;
  }

  .stat-value {
    font-size: 1rem !important;
  }

  .stat-divider {
    width: 1px !important;
    height: 1.5rem !important;
  }
}

/* ========== TABLET MAIN DASHBOARD ========== */
@media (min-width: 769px) and (max-width: 1199.98px) {
  .summary-stats {
    gap: 0.75rem !important;
  }

  .stat-item {
    padding: 0.35rem 0.75rem !important;
  }

  .stat-label {
    font-size: 0.6rem !important;
  }

  .stat-value {
    font-size: 1.1rem !important;
  }
}

/* ========== PMS DASHBOARD SUMMARY BAR ========== */
.summary-bar-pms {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  padding: 1rem 1.5rem !important;
  background: #fff !important;
  border-bottom: 1px solid #e9ecef !important;
}

.summary-bar-pms .summary-title {
  flex: 1;
}

.summary-bar-pms .summary-title h1 {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.25rem !important;
  color: #2e3192 !important;
}

.summary-bar-pms .summary-title .subtitle {
  font-size: 0.8rem !important;
  color: #6c757d !important;
  margin-bottom: 0 !important;
}

.summary-bar-pms .summary-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.summary-bar-pms #refresh_btn {
  padding: 0.5rem !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  border-radius: 2px !important;
  background: #2e3192 !important;
  border-color: #2e3192 !important;
  color: #fff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.summary-bar-pms #refresh_btn i {
  margin: 0 !important;
  font-size: 1rem !important;
  color: #fff !important;
}

.summary-bar-pms .form-select {
  font-size: 0.85rem !important;
  padding: 0.5rem 2rem 0.5rem 0.75rem !important;
  border-color: #dee2e6 !important;
  border-radius: 2px !important;
  background-color: #fff !important;
}

/* ========== MOBILE PMS DASHBOARD ========== */
@media (max-width: 768px) {
  .summary-bar-pms {
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0.75rem !important;
    gap: 0.75rem !important;
    background: #fff !important;
  }

  .summary-bar-pms .summary-title h1 {
    font-size: 1.1rem !important;
    color: #2e3192 !important;
  }

  .summary-bar-pms .summary-title .subtitle {
    font-size: 0.7rem !important;
    color: #868e96 !important;
  }

  .summary-bar-pms .summary-title .breadcrumb {
    margin-bottom: 0.35rem !important;
    font-size: 0.65rem !important;
  }

  .summary-bar-pms .summary-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .summary-bar-pms #refresh_btn {
    padding: 0.5rem !important;
    width: 100% !important;
    font-size: 0 !important;
    border-radius: 2px !important;
    background: #2e3192 !important;
    border-color: #2e3192 !important;
    color: #fff !important;
  }

  .summary-bar-pms #refresh_btn i {
    margin: 0 !important;
    font-size: 1rem !important;
    color: #fff !important;
  }

  .summary-bar-pms #refresh_btn .btn-label {
    display: none !important;
  }

  .summary-bar-pms #office_select,
  .summary-bar-pms #project_select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    flex: 1 1 100% !important;
    font-size: 0.9rem !important;
    padding: 0.6rem 2rem 0.6rem 0.75rem !important;
    height: 42px !important;
    border: 1px solid #dee2e6 !important;
    background-color: #fff !important;
    border-radius: 2px !important;
    cursor: pointer !important;
  }
}

/* ========== TABLET PMS DASHBOARD ========== */
@media (min-width: 769px) and (max-width: 1199.98px) {
  .summary-bar-pms .summary-actions {
    flex-wrap: wrap !important;
  }

  .summary-bar-pms #office_select,
  .summary-bar-pms #project_select {
    min-width: 150px !important;
    max-width: 250px !important;
  }
}

/* ========== DESKTOP PMS DASHBOARD ========== */
@media (min-width: 1200px) {
  .summary-bar-pms .summary-actions {
    flex-direction: row !important;
    align-items: center !important;
  }

  .summary-bar-pms #office_select,
  .summary-bar-pms #project_select {
    min-width: 280px !important;
    max-width: 400px !important;
  }
}

.wbs-tree-table.table-hover > tbody > tr.wbs-tree-detail-row:hover > * {
  --bs-table-accent-bg: transparent;
  background-color: transparent !important;
  box-shadow: none !important;
}
/* Office Wise Amount Report: summary palette for All Offices mode */
.office-wise-amount-table .office-summary-row.office-tone-1 > td { background-color: #fef3c7; }
.office-wise-amount-table .office-summary-row.office-tone-2 > td { background-color: #dbeafe; }
.office-wise-amount-table .office-summary-row.office-tone-3 > td { background-color: #dcfce7; }
.office-wise-amount-table .office-summary-row.office-tone-4 > td { background-color: #fce7f3; }
.office-wise-amount-table .office-summary-row.office-tone-5 > td { background-color: #ede9fe; }
.office-wise-amount-table .office-summary-row.office-tone-6 > td { background-color: #e0f2fe; }
.office-wise-amount-table .office-summary-row > td a {
  color: inherit;
  font-weight: 600;
}
.office-wise-amount-table thead th.office-case-sensitive {
  text-transform: none !important;
}

/* Office Wise Amount Report: dark-theme contrast-safe overrides (scoped) */
[data-bs-theme="dark"] .office-wise-report-page .report-kpi-panel,
[data-bs-theme="dark"] .office-wise-report-page .report-kpi-panel .small,
[data-bs-theme="dark"] .office-wise-report-page .report-kpi-panel .h5,
[data-bs-theme="dark"] .office-wise-report-page .report-kpi-panel .badge {
  color: var(--app-text-strong) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table .office-summary-row.office-tone-1 > td {
  background-color: rgba(250, 204, 21, 0.14) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table .office-summary-row.office-tone-2 > td {
  background-color: rgba(59, 130, 246, 0.14) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table .office-summary-row.office-tone-3 > td {
  background-color: rgba(16, 185, 129, 0.14) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table .office-summary-row.office-tone-4 > td {
  background-color: rgba(236, 72, 153, 0.14) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table .office-summary-row.office-tone-5 > td {
  background-color: rgba(139, 92, 246, 0.14) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table .office-summary-row.office-tone-6 > td {
  background-color: rgba(14, 165, 233, 0.14) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table .office-summary-row > td,
[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table .office-summary-row > td a,
[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table .table-primary > td,
[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table .table-primary > td a {
  color: var(--app-text-strong) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table .table-primary > td {
  background-color: rgba(59, 130, 246, 0.22) !important;
}

/* Office valuation semantic bands: low exposure -> high exposure */
.office-wise-report-page .office-wise-amount-table .valuation-band-success {
  background-color: rgba(22, 163, 74, 0.12) !important;
}

.office-wise-report-page .office-wise-amount-table .valuation-band-warning {
  background-color: rgba(245, 158, 11, 0.14) !important;
}

.office-wise-report-page .office-wise-amount-table .valuation-band-high {
  background-color: rgba(249, 115, 22, 0.14) !important;
}

.office-wise-report-page .office-wise-amount-table .valuation-band-danger {
  background-color: rgba(220, 38, 38, 0.14) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table .valuation-band-success {
  background-color: rgba(34, 197, 94, 0.2) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table .valuation-band-warning {
  background-color: rgba(251, 191, 36, 0.2) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table .valuation-band-high {
  background-color: rgba(251, 146, 60, 0.2) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table .valuation-band-danger {
  background-color: rgba(248, 113, 113, 0.22) !important;
}

[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table .valuation-band-success,
[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table .valuation-band-warning,
[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table .valuation-band-high,
[data-bs-theme="dark"] .office-wise-report-page .office-wise-amount-table .valuation-band-danger {
  color: var(--app-text-strong) !important;
}

/* User Access Modal: wider and taller for large project catalogs */
.user-project-access-modal-dialog {
  max-width: 98vw;
}

.user-project-access-modal-content {
  min-height: 88vh;
  border: 1px solid #d7dce5;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(9, 18, 36, 0.16);
}

.user-project-access-modal-header {
  background: linear-gradient(135deg, #1e2633 0%, #273142 100%);
  color: #fff;
  border-bottom: 1px solid #313d51;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 0.55rem;
}

.user-project-access-modal-title {
  color: #fff;
  font-weight: 600;
}

.user-project-modal-header-center {
  justify-self: stretch;
  width: 100%;
  max-width: none;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.user-project-header-search {
  min-height: 34px;
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.user-project-modal-header-right {
  justify-self: end;
  position: relative;
  z-index: 3;
}

.user-project-access-modal-header .btn-close {
  filter: invert(1) grayscale(100%);
  opacity: 0.9;
  margin: 0;
}

.user-project-access-modal-body {
  max-height: calc(100vh - 12.5rem);
  overflow-y: auto;
  background: #f5f6f8;
  scrollbar-width: thin;
  scrollbar-color: #8d99ad #e5e8ef;
}

.user-project-access-modal-body::-webkit-scrollbar,
.user-project-access-accordion::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.user-project-access-modal-body::-webkit-scrollbar-track,
.user-project-access-accordion::-webkit-scrollbar-track {
  background: #e5e8ef;
}

.user-project-access-modal-body::-webkit-scrollbar-thumb,
.user-project-access-accordion::-webkit-scrollbar-thumb {
  background: #8d99ad;
  border-radius: 999px;
}

.user-project-access-modal-body::-webkit-scrollbar-thumb:hover,
.user-project-access-accordion::-webkit-scrollbar-thumb:hover {
  background: #727f95;
}

.user-project-access-context {
  color: #1f2a3d;
  font-weight: 600;
  margin-bottom: 0.25rem !important;
}

.user-project-assigned-offices {
  color: #4b5567;
  padding: 0.5rem 0.75rem;
  border: 1px solid #dce1ea;
  border-radius: 8px;
  background: #ffffff;
}

.user-project-scope-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.55rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #dce1ea;
  border-radius: 8px;
  background: #fff;
  margin-bottom: 0.8rem;
}

.user-project-scope-meta {
  color: #3e4b61;
  font-weight: 500;
  line-height: 1.25;
}

.user-project-toolbar-inline {
  width: 100%;
  justify-content: flex-start;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: visible;
  padding-bottom: 0;
}

.user-project-toolbar-row {
  margin-top: 0.35rem;
  margin-bottom: 0.9rem !important;
}

.user-project-access-search {
  border-color: #c7cfdd;
  background: #fff;
}

.user-project-access-search:focus {
  border-color: #5f6f87;
}

.user-project-access-select-label {
  color: #586377;
  font-weight: 500;
  white-space: nowrap;
}

.user-project-selection-badge {
  background: #2f3a4c;
  color: #fff;
  border: 1px solid #273142;
}

.user-project-selected-panel {
  border: 1px solid #d8dce5;
  border-radius: 10px;
  background: #fff;
  margin-top: 0.9rem;
}

.user-project-selected-panel-head {
  color: #374256;
  border-bottom: 1px solid #e2e6ee;
  background: #f7f8fa;
}

.user-project-table-head th {
  background: #f2f4f8 !important;
  color: #364055 !important;
  border-color: #dee3eb !important;
}

.user-project-available-caption {
  color: #333f54;
  font-weight: 600;
  margin-top: 0.95rem;
}

.user-project-available-section {
  margin-top: 0.95rem;
}

.user-project-available-head {
  gap: 0.65rem;
}

.user-project-section-separator {
  height: 1px;
  background: linear-gradient(90deg, #d7dce5 0%, #e3e7ef 50%, #d7dce5 100%);
  margin-bottom: 0.55rem;
}

.user-project-group-action-btn {
  border-color: #c6cedc;
  color: #3b475d;
  background: #fff;
}

.user-project-group-action-btn:hover,
.user-project-group-action-btn:focus {
  border-color: #95a2b7;
  color: #2f3a4d;
  background: #f3f5f8;
}

.user-project-access-accordion {
  max-height: 50vh;
  overflow: auto;
  background: #f2f4f7;
  border-color: #d7dce5 !important;
  scrollbar-width: thin;
  scrollbar-color: #8d99ad #e5e8ef;
  margin-top: 0.55rem;
  padding: 0.55rem !important;
}

.user-project-office-group {
  border: 1px solid #d7dce6;
  border-radius: 8px;
  background: #fff;
  margin-bottom: 0.55rem;
  overflow: hidden;
}

.user-project-office-group + .user-project-office-group {
  margin-top: 0.35rem;
}

.user-project-office-summary {
  list-style: none;
  cursor: pointer;
  padding: 0.5rem 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 40px;
  background: #f8f9fb;
  color: #2f3a4d;
  gap: 0.6rem;
  font-weight: 600;
  border-bottom: 1px solid transparent;
}

.user-project-office-group[open] .user-project-office-summary {
  border-bottom-color: #e2e6ee;
}

.user-project-office-summary::-webkit-details-marker {
  display: none;
}

.user-project-office-count {
  background: #586273;
  color: #fff;
  border: 1px solid #4a5260;
  min-width: 2.25rem;
  text-align: center;
  font-size: 0.74rem;
  line-height: 1.1;
  padding: 0.3rem 0.45rem;
}

.user-project-office-table tbody tr:hover > * {
  background: #f5f7fa;
}

.user-project-selected-table tbody tr:hover > * {
  background: #f6f8fb;
}

.user-project-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 6px;
  padding: 0.22rem 0.5rem;
  line-height: 1.1;
  vertical-align: middle;
}

.user-project-status-cell {
  white-space: normal;
  min-width: 220px;
}

.user-project-status-cell .user-project-status-badge + .user-project-status-badge {
  margin-left: 0.35rem;
}

.user-project-status-office-scope {
  color: #724f00;
  background: #fff4d9;
  border: 1px solid #ead39c;
}

.user-project-status-override {
  color: #1d4b2b;
  background: #e9f7ee;
  border: 1px solid #bfdcc8;
}

.user-project-status-existing {
  color: #1f2f48;
  background: #eaf0fb;
  border: 1px solid #c6d3ec;
}

.user-project-status-new {
  color: #5e3a00;
  background: #fff2dd;
  border: 1px solid #ebcf9a;
}

.user-project-mode-select {
  min-width: 118px;
  max-width: 148px;
  flex: 0 0 auto;
}

.user-project-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 32px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.user-project-select-all-checkbox {
  margin-top: 0;
  flex: 0 0 auto;
  accent-color: #176b74;
  cursor: pointer;
  border-color: #8894a8;
}

.user-project-select-info {
  color: #5f6f87;
  cursor: help;
  font-size: 0.84rem;
}

.user-project-selection-badge {
  margin-left: 0;
  flex: 0 0 auto;
}

.user-project-row-mode-select {
  max-width: 132px;
}

.user-project-access-modal-content .modal-footer {
  background: #f6f7f9;
  border-top: 1px solid #dde2eb;
}

@media (min-width: 768px) {
  .user-project-access-modal-header {
    grid-template-columns: minmax(220px, auto) minmax(320px, 560px) auto;
    gap: 0.85rem;
  }

  .user-project-modal-header-center {
    justify-self: center;
    max-width: 560px;
  }

  .user-project-scope-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
  }

  .user-project-scope-toolbar {
    width: auto;
    margin-left: auto;
    padding-right: 0.25rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
    overflow: visible;
  }
}

@media (min-width: 992px) {
  .user-project-access-modal-dialog {
    max-width: min(96vw, 1480px);
  }

  .user-project-access-modal-content {
    min-height: 82vh;
  }

  .user-project-access-accordion {
    max-height: 56vh;
  }
}

@media (max-width: 767.98px) {
  .user-project-access-modal-body {
    padding: 0.85rem;
  }

  .user-project-mode-select {
    min-width: 126px;
    max-width: 100%;
  }

  .user-project-selection-badge {
    margin-left: 0;
  }

  .user-project-scope-toolbar {
    gap: 0.5rem;
    white-space: normal;
    flex-wrap: wrap;
  }

  .user-project-available-head {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .user-project-office-group,
  .user-project-group-action-btn {
    transition: none !important;
  }
}

@media (prefers-color-scheme: dark) {
  .user-project-access-modal-content {
    border-color: #3a4457;
    background: #1f2633;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  }

  .user-project-access-modal-header {
    background: linear-gradient(135deg, #171d28 0%, #212a38 100%);
    border-bottom-color: #3c475c;
  }

  .user-project-access-modal-body {
    background: #242d3c;
    scrollbar-color: #69758c #2e394b;
  }

  .user-project-access-modal-body::-webkit-scrollbar-track,
  .user-project-access-accordion::-webkit-scrollbar-track {
    background: #2e394b;
  }

  .user-project-access-modal-body::-webkit-scrollbar-thumb,
  .user-project-access-accordion::-webkit-scrollbar-thumb {
    background: #6d7891;
  }

  .user-project-access-context {
    color: #ecf1fb;
  }

  .user-project-assigned-offices {
    color: #d1d7e3;
    background: #2a3343;
    border-color: #445067;
  }

  .user-project-scope-bar {
    background: #2a3343;
    border-color: #445067;
  }

  .user-project-scope-meta {
    color: #d1d7e3;
  }

  .user-project-access-search {
    color: #eef2fb;
    background: #2a3342;
    border-color: #4a566e;
  }

  .user-project-access-search::placeholder {
    color: #9da8bc;
  }

  .user-project-access-select-label {
    color: #c4cedd;
  }

  .user-project-selection-badge {
    background: #d5deef;
    color: #1f2a3d;
    border-color: #9aa9c2;
  }

  .user-project-selected-panel {
    background: #2a3343;
    border-color: #445066;
  }

  .user-project-selected-panel-head {
    background: #313b4f;
    color: #d8deea;
    border-bottom-color: #46546c;
  }

  .user-project-table-head th {
    background: #354156 !important;
    color: #e7ecf7 !important;
    border-color: #4a5770 !important;
  }

  .user-project-available-caption {
    color: #dde3f0;
  }

  .user-project-group-action-btn {
    color: #d2d9e8;
    border-color: #546077;
    background: #2f394b;
  }

  .user-project-group-action-btn:hover,
  .user-project-group-action-btn:focus {
    color: #eff3fb;
    border-color: #6d7a92;
    background: #3a465b;
  }

  .user-project-access-accordion {
    background: #2a3445;
    border-color: #445066 !important;
    scrollbar-color: #69758c #2e394b;
  }

  .user-project-office-group {
    background: #2d3748;
    border-color: #4a5670;
  }

  .user-project-office-summary {
    background: #374155;
    color: #e1e7f3;
  }

  .user-project-office-count {
    background: #8694aa;
    color: #132034;
    border-color: #738298;
  }

  .user-project-office-table tbody tr:hover > *,
  .user-project-selected-table tbody tr:hover > * {
    background: #3a465a;
    color: #eef2fa;
  }

  .user-project-office-table thead th,
  .user-project-selected-table thead th {
    background: #354156 !important;
    color: #e7ecf7 !important;
    border-color: #4a5770 !important;
  }

  .user-project-status-office-scope {
    color: #f7d686;
    background: #4a3a16;
    border-color: #7a6341;
  }

  .user-project-status-override {
    color: #9ed3ad;
    background: #1f3b2a;
    border-color: #476c56;
  }

  .user-project-status-existing {
    color: #bfd3f5;
    background: #24344f;
    border-color: #47608a;
  }

  .user-project-status-new {
    color: #f0d197;
    background: #4a3a1f;
    border-color: #796138;
  }

  .user-project-access-modal-content .modal-footer {
    background: #262f3f;
    border-top-color: #445066;
  }
}

:root[data-bs-theme="dark"] .user-project-access-modal-content,
body.dark-mode .user-project-access-modal-content,
body.theme-dark .user-project-access-modal-content {
  border-color: #3a4457;
  background: #1f2633;
}

:root[data-bs-theme="dark"] .user-project-access-modal-header,
body.dark-mode .user-project-access-modal-header,
body.theme-dark .user-project-access-modal-header {
  background: linear-gradient(135deg, #171d28 0%, #212a38 100%);
  border-bottom-color: #3c475c;
}

:root[data-bs-theme="dark"] .user-project-access-modal-body,
body.dark-mode .user-project-access-modal-body,
body.theme-dark .user-project-access-modal-body {
  background: #242d3c;
}

:root[data-bs-theme="dark"] .user-project-access-search,
body.dark-mode .user-project-access-search,
body.theme-dark .user-project-access-search {
  color: #eef2fb;
  background: #2a3342;
  border-color: #4a566e;
}

:root[data-bs-theme="dark"] .user-project-access-search::placeholder,
body.dark-mode .user-project-access-search::placeholder,
body.theme-dark .user-project-access-search::placeholder {
  color: #9da8bc;
}

:root[data-bs-theme="dark"] .user-project-group-action-btn,
body.dark-mode .user-project-group-action-btn,
body.theme-dark .user-project-group-action-btn {
  color: #d2d9e8;
  border-color: #546077;
  background: #2f394b;
}

:root[data-bs-theme="dark"] .user-project-scope-bar,
body.dark-mode .user-project-scope-bar,
body.theme-dark .user-project-scope-bar {
  background: #2a3343;
  border-color: #445067;
}

:root[data-bs-theme="dark"] .user-project-scope-meta,
body.dark-mode .user-project-scope-meta,
body.theme-dark .user-project-scope-meta {
  color: #d1d7e3;
}

:root[data-bs-theme="dark"] .user-project-group-action-btn:hover,
:root[data-bs-theme="dark"] .user-project-group-action-btn:focus,
body.dark-mode .user-project-group-action-btn:hover,
body.dark-mode .user-project-group-action-btn:focus,
body.theme-dark .user-project-group-action-btn:hover,
body.theme-dark .user-project-group-action-btn:focus {
  color: #eff3fb;
  border-color: #6d7a92;
  background: #3a465b;
}

:root[data-bs-theme="dark"] .user-project-office-table thead th,
:root[data-bs-theme="dark"] .user-project-selected-table thead th,
body.dark-mode .user-project-office-table thead th,
body.dark-mode .user-project-selected-table thead th,
body.theme-dark .user-project-office-table thead th,
body.theme-dark .user-project-selected-table thead th {
  background: #354156 !important;
  color: #e7ecf7 !important;
  border-color: #4a5770 !important;
}

:root[data-bs-theme="dark"] .user-project-available-caption,
body.dark-mode .user-project-available-caption,
body.theme-dark .user-project-available-caption {
  color: #dde3f0;
}

:root[data-bs-theme="dark"] .user-project-access-accordion,
body.dark-mode .user-project-access-accordion,
body.theme-dark .user-project-access-accordion {
  background: #2a3445;
  border-color: #445066 !important;
  scrollbar-color: #69758c #2e394b;
}

:root[data-bs-theme="dark"] .user-project-section-separator,
body.dark-mode .user-project-section-separator,
body.theme-dark .user-project-section-separator {
  background: linear-gradient(90deg, #445066 0%, #4e5c75 50%, #445066 100%);
}

:root[data-bs-theme="dark"] .user-project-office-group,
body.dark-mode .user-project-office-group,
body.theme-dark .user-project-office-group {
  background: #2d3748;
  border-color: #4a5670;
}

:root[data-bs-theme="dark"] .user-project-office-summary,
body.dark-mode .user-project-office-summary,
body.theme-dark .user-project-office-summary {
  background: #374155;
  color: #e1e7f3;
}

:root[data-bs-theme="dark"] .user-project-office-group[open] .user-project-office-summary,
body.dark-mode .user-project-office-group[open] .user-project-office-summary,
body.theme-dark .user-project-office-group[open] .user-project-office-summary {
  border-bottom-color: #4a5770;
}

:root[data-bs-theme="dark"] .user-project-office-count,
body.dark-mode .user-project-office-count,
body.theme-dark .user-project-office-count {
  background: #8694aa;
  color: #132034;
  border-color: #738298;
}

.office-wise-amount-table thead th.office-case-sensitive {
  text-transform: none !important;
}

