:root {
  /* NUPRC & Institutional Palette */
  --portal-primary: #025416;
  /* Deep Forest Green (Sidebar & Brand) */
  --portal-action: #21983E;
  /* Action Green (Buttons, Active States) */
  --portal-action-hover: #1b7a32;
  /* Darker Action Green */
  --portal-accent-yellow: #EFEB09;
  /* Accent Yellow (Active menu link) */
  --portal-sub-active: #3D7B2D;
  /* Submenu Active Pill */

  /* NUPRC Brand Orange (replaces Bootstrap blue / info) */
  --nuprc-orange: #E87722;
  /* NUPRC Amber-Orange */
  --nuprc-orange-dark: #B85A0A;
  /* Darker orange for text on light bg */
  --nuprc-orange-darker: #7C3D08;
  /* Deep orange for headings/emphasis */
  --nuprc-orange-subtle: #FFF3E0;
  /* Very light orange bg (replaces #eff6ff) */
  --nuprc-orange-subtle-2: #FEE0B6;
  /* Subtle orange border (replaces #bfdbfe) */
  --nuprc-orange-mid: #FDBA74;
  /* Mid orange for borders */

  /* Surface & Backgrounds */
  --portal-bg: #f8fafc;
  --portal-surface: #ffffff;
  --portal-surface-subtle: #f1f5f9;
  --portal-surface-active: #e2e8f0;
  --portal-border: #e2e8f0;
  --portal-border-subtle: #cbd5e1;
  --portal-text: #0f172a;
  --portal-text-muted: #64748b;
  --portal-header-bg: #ffffff;
  --portal-footer-bg: #ffffff;
  --portal-notice-bg: #f8fafc;
  --portal-notice-border: #e2e8f0;
  --portal-success-bg: #eafbee;
  --portal-success-border: #bbf7d0;
  --portal-input-bg: #ffffff;
  --portal-input-readonly-bg: #f1f5f9;

  /* Bootstrap Overrides — remap primary to NUPRC orange */
  --bs-primary: var(--nuprc-orange);
  --bs-primary-rgb: 232, 119, 34;
  --bs-primary-text-emphasis: var(--nuprc-orange-darker);
  --bs-primary-bg-subtle: var(--nuprc-orange-subtle);
  --bs-primary-border-subtle: var(--nuprc-orange-mid);

  /* Remap Bootstrap info → also NUPRC orange */
  --bs-info: var(--nuprc-orange);
  --bs-info-rgb: 232, 119, 34;
  --bs-info-text-emphasis: var(--nuprc-orange-darker);
  --bs-info-bg-subtle: var(--nuprc-orange-subtle);
  --bs-info-border-subtle: var(--nuprc-orange-mid);

  --bs-success: var(--portal-action);
  --bs-body-font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --bs-body-bg: var(--portal-bg);
  --bs-body-color: var(--portal-text);
  --bs-border-color: var(--portal-border);
  --bs-link-color: var(--nuprc-orange-dark);
  --bs-link-hover-color: var(--nuprc-orange-darker);
}

/* ── Bootstrap primary / info class overrides ───────────────────────────── */
/* text-primary → NUPRC orange */
.text-primary {
  color: var(--nuprc-orange) !important;
}

a.text-primary:hover,
a.text-primary:focus {
  color: var(--nuprc-orange-dark) !important;
}

/* bg-primary → NUPRC orange */
.bg-primary {
  background-color: var(--nuprc-orange) !important;
}

/* bg-primary-subtle + border-primary-subtle → orange tones */
.bg-primary-subtle {
  background-color: var(--nuprc-orange-subtle) !important;
}

.border-primary-subtle {
  border-color: var(--nuprc-orange-mid) !important;
}

.text-primary-emphasis {
  color: var(--nuprc-orange-darker) !important;
}

/* bg-info-subtle + text-info → orange tones */
.bg-info-subtle {
  background-color: var(--nuprc-orange-subtle) !important;
}

.border-info-subtle {
  border-color: var(--nuprc-orange-mid) !important;
}

.text-info,
.text-info-emphasis {
  color: var(--nuprc-orange-dark) !important;
}

/* alert-info → orange-themed */
.alert-info {
  --bs-alert-color: var(--nuprc-orange-darker);
  --bs-alert-bg: var(--nuprc-orange-subtle);
  --bs-alert-border-color: var(--nuprc-orange-mid);
  color: var(--nuprc-orange-darker) !important;
  background-color: var(--nuprc-orange-subtle) !important;
  border-color: var(--nuprc-orange-mid) !important;
}

.alert-info .bi {
  color: var(--nuprc-orange) !important;
}

/* btn-primary → NUPRC orange */
.btn-primary {
  --bs-btn-bg: var(--nuprc-orange);
  --bs-btn-border-color: var(--nuprc-orange);
  --bs-btn-hover-bg: var(--nuprc-orange-dark);
  --bs-btn-hover-border-color: var(--nuprc-orange-dark);
  --bs-btn-active-bg: var(--nuprc-orange-darker);
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
}

/* btn-outline-primary → orange outline */
.btn-outline-primary {
  --bs-btn-color: var(--nuprc-orange);
  --bs-btn-border-color: var(--nuprc-orange);
  --bs-btn-hover-bg: var(--nuprc-orange);
  --bs-btn-hover-border-color: var(--nuprc-orange);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--nuprc-orange-dark);
}

/* form-control:focus ring → orange */
.form-control:focus,
.form-select:focus {
  border-color: var(--nuprc-orange) !important;
  box-shadow: 0 0 0 0.2rem rgba(232, 119, 34, 0.18) !important;
}

/* nav-link active / tab active → orange */
.nav-pills .nav-link.active,
.nav-pills .show>.nav-link {
  background-color: var(--nuprc-orange) !important;
  color: #fff !important;
}

/* pagination active → orange */
.page-item.active .page-link {
  background-color: var(--nuprc-orange) !important;
  border-color: var(--nuprc-orange) !important;
  color: #fff !important;
}

.page-link {
  color: var(--nuprc-orange) !important;
}

.page-link:hover {
  color: var(--nuprc-orange-dark) !important;
}



/* Dark Theme Overrides */
[data-bs-theme="dark"] {
  --portal-primary: #025416;
  --portal-action: #21983E;
  --portal-action-hover: #29b44b;
  --portal-accent-yellow: #EFEB09;
  --portal-sub-active: #3D7B2D;

  /* NUPRC orange in dark mode — slightly brighter for contrast */
  --nuprc-orange: #F4892A;
  --nuprc-orange-dark: #FDBA74;
  --nuprc-orange-darker: #FED7AA;
  --nuprc-orange-subtle: rgba(232, 119, 34, 0.15);
  --nuprc-orange-subtle-2: rgba(232, 119, 34, 0.25);
  --nuprc-orange-mid: rgba(232, 119, 34, 0.4);

  --portal-sidebar-bg: #000000;
  --portal-content-bg: #0b1120;
  --portal-card-bg: #131d31;
  --portal-border-color: #24344d;

  --portal-bg: #0b1120;
  --portal-surface: #131d31;
  --portal-surface-subtle: #1e293b;
  --portal-surface-active: #334155;
  --portal-border: #24344d;
  --portal-border-subtle: #334155;
  --portal-text: #f8fafc;
  --portal-text-muted: #94a3b8;
  --portal-header-bg: #0f172a;
  --portal-footer-bg: #0f172a;
  --portal-notice-bg: #1e293b;
  --portal-notice-border: #334155;
  --portal-success-bg: rgba(33, 152, 62, 0.16);
  --portal-success-border: rgba(33, 152, 62, 0.4);
  --portal-input-bg: #1e293b;
  --portal-input-readonly-bg: #141f32;

  --bs-body-bg: var(--portal-bg);
  --bs-body-color: var(--portal-text);
  --bs-border-color: var(--portal-border);
}

body {
  font-family: var(--bs-body-font-family);
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   Landing Page (Home) Styles - 1:1 Fidelity with Angular Reference
   ========================================================================== */

.home-container {
  min-height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: #0b0f0e;
  background-image: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.72)), url('/assets/images/home.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-attachment: fixed;
  overflow-x: hidden;
}

/* Landing Top Navigation */
.landing-header {
  width: 100%;
  padding: 2rem 5rem 1rem 5rem;
  z-index: 20;
}

@media (max-width: 991.98px) {
  .landing-header {
    padding: 1.5rem 1.75rem 1rem 1.75rem;
  }
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.brand-logo-img {
  height: 46px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.brand-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.5px;
}

.nav-links-center {
  display: flex;
  align-items: center;
  gap: 4.5rem;
}

@media (max-width: 1200px) {
  .nav-links-center {
    gap: 2.5rem;
  }
}

.landing-nav-link {
  color: #ffffff;
  font-weight: 500;
  font-size: 1.05rem;
  text-decoration: none;
  opacity: 0.9;
  cursor: pointer;
  position: relative;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.landing-nav-link:hover {
  opacity: 1;
  color: #EFEB09;
  text-decoration: none;
}

/* Register Button */
.btn-nav-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.55rem 2rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.45);
  text-decoration: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(4px);
}

.btn-nav-register:hover {
  background-color: #ffffff;
  color: #0b0f0e !important;
  border-color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.25);
}

/* Mobile Menu Trigger */
.mobile-menu-btn {
  background: #000000;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.mobile-menu-btn:hover {
  transform: scale(1.05);
}

/* Mobile Drawer Overlay */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transition: opacity 0.3s ease;
}

.mobile-menu-box {
  background-color: #1a1a1a;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  align-items: center;
}

.mobile-nav-links .landing-nav-link {
  font-size: 1.25rem;
}

/* Hero Section */
.hero-centralize {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 6rem 1.5rem;
  text-align: center;
  z-index: 10;
}

.hero-title {
  font-weight: 700;
  font-size: 3.5rem;
  color: #F6F6F6;
  margin-bottom: 1rem;
  line-height: 1.2;
  letter-spacing: -0.5px;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.7);
}

@media (max-width: 991.98px) {
  .hero-title {
    font-size: 2.75rem;
  }
}

@media (max-width: 575.98px) {
  .hero-title {
    font-size: 2.15rem;
  }
}

.hero-subtitle {
  font-weight: 500;
  font-size: 1.35rem;
  color: #D8D8D8;
  line-height: 1.6;
  margin-bottom: 2.75rem;
  max-width: 780px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

@media (max-width: 575.98px) {
  .hero-subtitle {
    font-size: 1.05rem;
    margin-bottom: 2rem;
  }
}

/* Hero Action Buttons */
.hero-btn-group {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

@media (max-width: 575.98px) {
  .hero-btn-group {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    gap: 1.25rem;
  }
}

/* Login Green Button */
.btn-hero-login {
  background-color: #21983E;
  color: #ffffff !important;
  font-size: 1.35rem;
  font-weight: 600;
  padding: 0.85rem 3.75rem;
  border-radius: 8px;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(33, 152, 62, 0.45);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 170px;
}

.btn-hero-login:hover {
  background-color: #1b7a32;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(33, 152, 62, 0.6);
  color: #ffffff !important;
}

.btn-hero-login:active {
  transform: translateY(0);
}

/* Watch Video Guide White Button */
.btn-hero-video {
  background-color: #ffffff;
  color: #2E2E2E !important;
  font-size: 1.35rem;
  font-weight: 600;
  padding: 0.85rem 2.25rem;
  border-radius: 8px;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-hero-video img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.btn-hero-video:hover {
  background-color: #f8f9fa;
  color: #111111 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.btn-hero-video:active {
  transform: translateY(0);
}

@media (max-width: 575.98px) {

  .btn-hero-login,
  .btn-hero-video {
    width: 100%;
    font-size: 1.2rem;
    padding: 0.8rem 1.5rem;
  }
}

/* Modal Enhancements */
.portal-modal .modal-content {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Institutional Admin Colors */
.bg-portal-primary {
  background-color: #025416 !important;
}

.text-portal-primary {
  color: #025416 !important;
}

.btn-action {
  background-color: #21983E !important;
  border-color: #21983E !important;
  color: #fff !important;
}

.btn-action:hover {
  background-color: #1b7a32 !important;
  border-color: #1b7a32 !important;
}

/* Signature Active Nav Item (Gold Indicator) */
.active-nav-item {
  background-color: #EFEB09 !important;
  color: #025416 !important;
  font-weight: 700 !important;
}

.active-nav-item .material-icons,
.active-nav-item i {
  color: #025416 !important;
}

.hover-nav:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
}

.hover-subnav:hover {
  background-color: #3D7B2D;
  color: #ffffff !important;
  border-radius: 4px;
}

/* Sidebar Responsive Transition */
.sidebar-wrapper {
  width: 260px;
  min-width: 260px;
  height: 100vh;
}

.badge-initiated {
  background-color: #fff3cd;
  color: #856404;
}

.badge-processing {
  background-color: #cfe2ff;
  color: #084298;
}

.badge-approved {
  background-color: #d1e7dd;
  color: #0f5132;
}

.badge-rejected {
  background-color: #f8d7da;
  color: #842029;
}

/* ==========================================================================
   Comprehensive Light Mode Styles & Contrast Enforcement
   ========================================================================== */
[data-bs-theme="light"],
:root:not([data-bs-theme="dark"]) {
  --portal-bg: #f8fafc;
  --portal-surface: #ffffff;
  --portal-surface-subtle: #f1f5f9;
  --portal-surface-active: #e2e8f0;
  --portal-border: #e2e8f0;
  --portal-border-subtle: #cbd5e1;
  --portal-text: #0f172a;
  --portal-text-muted: #64748b;
  --portal-text-secondary: #334155;
}

[data-bs-theme="light"] .text-dark,
:root:not([data-bs-theme="dark"]) .text-dark {
  color: #0f172a !important;
}

[data-bs-theme="light"] .text-secondary,
:root:not([data-bs-theme="dark"]) .text-secondary {
  color: #334155 !important;
}

[data-bs-theme="light"] .text-muted,
:root:not([data-bs-theme="dark"]) .text-muted {
  color: #64748b !important;
}

[data-bs-theme="light"] thead.bg-light th,
[data-bs-theme="light"] thead.table-light th,
[data-bs-theme="light"] .table thead th,
:root:not([data-bs-theme="dark"]) thead.bg-light th,
:root:not([data-bs-theme="dark"]) thead.table-light th,
:root:not([data-bs-theme="dark"]) .table thead th {
  background-color: #f1f5f9 !important;
  color: #1e293b !important;
  font-weight: 700 !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

[data-bs-theme="light"] .table tbody td,
:root:not([data-bs-theme="dark"]) .table tbody td {
  color: #0f172a;
}

[data-bs-theme="light"] .badge.bg-light,
:root:not([data-bs-theme="dark"]) .badge.bg-light {
  background-color: #f1f5f9 !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
}

.text-xs {
  font-size: 0.75rem !important;
  line-height: 1.25 !important;
}

/* ==========================================================================
   Comprehensive Dark Mode Styles for Forms, Inputs, Cards, and Portals
   ========================================================================== */

/* Topbar Buttons */
.portal-topbar-btn {
  width: 36px;
  height: 36px;
  background-color: var(--portal-surface-subtle, #f1f5f9) !important;
  color: var(--portal-text, #0f172a) !important;
  border: 1px solid var(--portal-border, transparent) !important;
  transition: all 0.2s ease;
}

.portal-topbar-btn:hover {
  background-color: var(--portal-surface-active, #e2e8f0) !important;
  color: var(--portal-text, #0f172a) !important;
}

[data-bs-theme="dark"] .portal-wrapper,
[data-bs-theme="dark"] .main-viewport,
[data-bs-theme="dark"] main,
[data-bs-theme="dark"] .scrollable-content {
  background-color: var(--portal-bg) !important;
  color: var(--portal-text) !important;
}

[data-bs-theme="dark"] .portal-header,
[data-bs-theme="dark"] header.bg-white {
  background-color: var(--portal-header-bg) !important;
  border-color: var(--portal-border) !important;
}

[data-bs-theme="dark"] .portal-footer {
  background-color: var(--portal-footer-bg) !important;
  border-color: var(--portal-border) !important;
  color: var(--portal-text-muted) !important;
}

/* Forms, Inputs, Selects in Dark Mode */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] input[type="text"],
[data-bs-theme="dark"] input[type="email"],
[data-bs-theme="dark"] input[type="tel"],
[data-bs-theme="dark"] input[type="password"],
[data-bs-theme="dark"] input[type="number"],
[data-bs-theme="dark"] select,
[data-bs-theme="dark"] textarea {
  background-color: var(--portal-input-bg) !important;
  color: #f8fafc !important;
  border-color: var(--portal-border) !important;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background-color: var(--portal-input-bg) !important;
  color: #ffffff !important;
  border-color: #21983E !important;
  box-shadow: 0 0 0 0.25rem rgba(33, 152, 62, 0.25) !important;
}

[data-bs-theme="dark"] .form-control::placeholder {
  color: #64748b !important;
  opacity: 0.85;
}

[data-bs-theme="dark"] .form-control[readonly],
[data-bs-theme="dark"] .form-control:disabled {
  background-color: var(--portal-input-readonly-bg) !important;
  color: #94a3b8 !important;
  border-color: var(--portal-border) !important;
}

[data-bs-theme="dark"] .input-group-text {
  background-color: var(--portal-input-bg) !important;
  color: var(--portal-text-muted) !important;
  border-color: var(--portal-border) !important;
}

[data-bs-theme="dark"] .input-group>.form-control,
[data-bs-theme="dark"] .input-group>.input-group-text,
[data-bs-theme="dark"] .input-group>.btn {
  border-color: var(--portal-border) !important;
}

/* Cards & Containers */
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .modal-content {
  background-color: var(--portal-surface) !important;
  border-color: var(--portal-border) !important;
  color: var(--portal-text) !important;
}

/* Background Utility Classes in Dark Mode */
[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-light-subtle,
[data-bs-theme="dark"] .bg-body-tertiary {
  background-color: var(--portal-surface-subtle, #1e293b) !important;
  border-color: var(--portal-border, #24344d) !important;
  color: var(--portal-text, #f8fafc) !important;
}

[data-bs-theme="dark"] .bg-white {
  background-color: var(--portal-surface, #131d31) !important;
  border-color: var(--portal-border, #24344d) !important;
  color: var(--portal-text, #f8fafc) !important;
}

[data-bs-theme="dark"] .portal-surface {
  background-color: var(--portal-surface) !important;
  border-color: var(--portal-border) !important;
  color: var(--portal-text) !important;
}

[data-bs-theme="dark"] code,
[data-bs-theme="dark"] code.text-dark {
  color: #38bdf8 !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* Tables in Dark Mode */
[data-bs-theme="dark"] .table {
  color: var(--portal-text) !important;
  border-color: var(--portal-border) !important;
}

[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] thead.table-light,
[data-bs-theme="dark"] thead.bg-light,
[data-bs-theme="dark"] thead.table-light th,
[data-bs-theme="dark"] thead.bg-light th,
[data-bs-theme="dark"] .table thead th {
  background-color: var(--portal-surface-subtle, #1e293b) !important;
  color: var(--portal-text-muted, #94a3b8) !important;
  border-color: var(--portal-border, #24344d) !important;
}

[data-bs-theme="dark"] .table> :not(caption)>*>* {
  background-color: transparent !important;
  color: inherit !important;
  border-bottom-color: var(--portal-border) !important;
}

[data-bs-theme="dark"] .table-hover>tbody>tr:hover>* {
  background-color: rgba(255, 255, 255, 0.04) !important;
}

/* Lists & Dropdowns in Dark Mode */
[data-bs-theme="dark"] .list-group-item {
  background-color: var(--portal-surface) !important;
  border-color: var(--portal-border) !important;
  color: var(--portal-text) !important;
}

[data-bs-theme="dark"] .dropdown-menu {
  background-color: var(--portal-surface) !important;
  border: 1px solid var(--portal-border) !important;
  color: var(--portal-text) !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

[data-bs-theme="dark"] .dropdown-item {
  color: var(--portal-text) !important;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
  background-color: var(--portal-surface-subtle) !important;
  color: #ffffff !important;
}

/* Notice & Status Box Tinting */
[data-bs-theme="dark"] div[style*="background-color: #f8fafc"],
[data-bs-theme="dark"] div[style*="background-color: rgb(248, 250, 252)"] {
  background-color: var(--portal-notice-bg) !important;
  border-color: var(--portal-notice-border) !important;
}

[data-bs-theme="dark"] div[style*="background-color: #eafbee"],
[data-bs-theme="dark"] div[style*="background-color: rgb(234, 251, 238)"],
[data-bs-theme="dark"] div[style*="background-color: #f0fdf4"],
[data-bs-theme="dark"] div[style*="background-color: rgb(240, 253, 244)"],
[data-bs-theme="dark"] div[style*="background-color: #dcfce7"] {
  background-color: rgba(33, 152, 62, 0.12) !important;
  border-color: rgba(33, 152, 62, 0.3) !important;
}

[data-bs-theme="dark"] div[style*="background-color: #fef2f2"],
[data-bs-theme="dark"] div[style*="background-color: rgb(254, 242, 242)"],
[data-bs-theme="dark"] div[style*="background-color: #fee2e2"] {
  background-color: rgba(239, 68, 68, 0.12) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

[data-bs-theme="dark"] div[style*="background-color: #e0f2fe"],
[data-bs-theme="dark"] div[style*="background-color: rgb(224, 242, 254)"],
[data-bs-theme="dark"] div[style*="background-color: #eff6ff"] {
  background-color: rgba(59, 130, 246, 0.12) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}

[data-bs-theme="dark"] div[style*="background-color: #f1f5f9"],
[data-bs-theme="dark"] div[style*="background-color: rgb(241, 245, 249)"] {
  background-color: var(--portal-surface-subtle, #1e293b) !important;
  border-color: var(--portal-border, #24344d) !important;
  color: var(--portal-text) !important;
}

/* Badges & Pills */
[data-bs-theme="dark"] .badge.bg-light {
  background-color: var(--portal-surface-subtle) !important;
  color: var(--portal-text-muted) !important;
  border-color: var(--portal-border) !important;
}

[data-bs-theme="dark"] .badge.bg-secondary-subtle {
  background-color: rgba(148, 163, 184, 0.15) !important;
  color: #cbd5e1 !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
}

[data-bs-theme="dark"] .badge.bg-warning-subtle {
  background-color: rgba(234, 179, 8, 0.15) !important;
  color: #fde047 !important;
  border-color: rgba(234, 179, 8, 0.3) !important;
}

/* Tabs & Links */
[data-bs-theme="dark"] .nav-underline .nav-link.text-dark {
  color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .nav-underline .nav-link.active {
  color: #21983E !important;
  border-color: #21983E !important;
}

/* Text & Border Overrides */
[data-bs-theme="dark"] .text-dark {
  color: #f8fafc !important;
}

[data-bs-theme="dark"] .text-secondary {
  color: #94a3b8 !important;
}

[data-bs-theme="dark"] .text-muted {
  color: #94a3b8 !important;
}

[data-bs-theme="dark"] .border-bottom {
  border-color: var(--portal-border) !important;
}

[data-bs-theme="dark"] .border-top {
  border-color: var(--portal-border) !important;
}

[data-bs-theme="dark"] .border {
  border-color: var(--portal-border) !important;
}

[data-bs-theme="dark"] .btn-outline-secondary {
  color: #cbd5e1 !important;
  border-color: var(--portal-border) !important;
}

[data-bs-theme="dark"] .btn-outline-secondary:hover {
  background-color: var(--portal-surface-subtle) !important;
  color: #ffffff !important;
}

/* Google Places Autocomplete Dropdown Styling */
.pac-container {
  z-index: 10050 !important;
  font-family: inherit;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border: 1px solid #e2e8f0;
  margin-top: 4px;
}

[data-bs-theme="dark"] .pac-container {
  background-color: #131d31 !important;
  border-color: #24344d !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

[data-bs-theme="dark"] .pac-item {
  color: #cbd5e1 !important;
  border-color: #24344d !important;
  background-color: transparent !important;
}

[data-bs-theme="dark"] .pac-item:hover,
[data-bs-theme="dark"] .pac-item-selected {
  background-color: #1e293b !important;
  color: #ffffff !important;
}

[data-bs-theme="dark"] .pac-item-query {
  color: #f8fafc !important;
}

/* Custom OnSP Places Dropdown - Sits cleanly below input without covering */
.onsp-places-dropdown {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  margin-top: 4px !important;
  z-index: 10050 !important;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
  border: 1px solid #e2e8f0 !important;
}

[data-bs-theme="dark"] .onsp-places-dropdown {
  background-color: #131d31 !important;
  border-color: #24344d !important;
  color: #cbd5e1 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

[data-bs-theme="dark"] .onsp-places-dropdown .hover-bg-light:hover {
  background-color: #1e293b !important;
  color: #ffffff !important;
}


[data-bs-theme="dark"] .pac-matched {
  color: #21983E !important;
}

/* OnSP Resilient Address Autocomplete Dropdown Styling */
.address-autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10050;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  margin-top: 4px;
  max-height: 280px;
  overflow-y: auto;
}

[data-bs-theme="dark"] .address-autocomplete-dropdown {
  background-color: #131d31 !important;
  border-color: #24344d !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

.address-suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: background-color 0.15s ease;
}

.address-suggestion-item:last-child {
  border-bottom: none;
}

.address-suggestion-item:hover,
.address-suggestion-item.active {
  background-color: #f8fafc;
}

[data-bs-theme="dark"] .address-suggestion-item {
  border-color: #24344d !important;
  color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .address-suggestion-item:hover,
[data-bs-theme="dark"] .address-suggestion-item.active {
  background-color: #1e293b !important;
  color: #ffffff !important;
}

.address-suggestion-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1e293b;
}

[data-bs-theme="dark"] .address-suggestion-title {
  color: #f8fafc !important;
}

.address-suggestion-subtitle {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 2px;
}

[data-bs-theme="dark"] .address-suggestion-subtitle {
  color: #94a3b8 !important;
}

/* ==========================================================================
   User Portal Collapsible Sidebar Styling
   ========================================================================== */
#userSidebar {
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: width, min-width;
}

#userSidebar.sidebar-collapsed,
.sidebar-init-collapsed #userSidebar {
  width: 72px !important;
  min-width: 72px !important;
}

#userSidebar.sidebar-collapsed .sidebar-text,
.sidebar-init-collapsed #userSidebar .sidebar-text,
#userSidebar.sidebar-collapsed .brand-title,
.sidebar-init-collapsed #userSidebar .brand-title,
#userSidebar.sidebar-collapsed .user-details,
.sidebar-init-collapsed #userSidebar .user-details,
#userSidebar.sidebar-collapsed .logout-text,
.sidebar-init-collapsed #userSidebar .logout-text {
  display: none !important;
}

#userSidebar.sidebar-collapsed .brand-header,
.sidebar-init-collapsed #userSidebar .brand-header {
  justify-content: center !important;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

#userSidebar.sidebar-collapsed .brand-link,
.sidebar-init-collapsed #userSidebar .brand-link {
  display: none !important;
}

#userSidebar.sidebar-collapsed .nav-link,
.sidebar-init-collapsed #userSidebar .nav-link {
  justify-content: center !important;
  padding: 0.65rem 0 !important;
  gap: 0 !important;
}

#userSidebar.sidebar-collapsed .nav-link i,
.sidebar-init-collapsed #userSidebar .nav-link i {
  font-size: 1.35rem !important;
  margin: 0 !important;
}

#userSidebar.sidebar-collapsed .sidebar-bottom,
.sidebar-init-collapsed #userSidebar .sidebar-bottom {
  padding: 0.75rem 0.5rem !important;
}

#userSidebar.sidebar-collapsed .user-info-wrapper,
.sidebar-init-collapsed #userSidebar .user-info-wrapper {
  justify-content: center !important;
  margin-bottom: 0.75rem !important;
}

#userSidebar.sidebar-collapsed .sidebar-nav-container,
.sidebar-init-collapsed #userSidebar .sidebar-nav-container {
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

/* ==========================================================================
   Universal Portal Table Sorting & Interactive Headers
   ========================================================================== */
th.table-sortable-th {
  cursor: pointer !important;
  user-select: none !important;
  position: relative;
  transition: background-color 0.15s ease, color 0.15s ease;
}

th.table-sortable-th:hover {
  background-color: rgba(2, 84, 22, 0.06) !important;
  color: #025416 !important;
}

[data-bs-theme="dark"] th.table-sortable-th:hover {
  background-color: rgba(74, 222, 128, 0.1) !important;
  color: #4ade80 !important;
}

th.table-sortable-th .sort-indicator-icon {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  font-size: 0.72rem;
  vertical-align: middle;
  opacity: 0.45;
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease;
}

th.table-sortable-th:hover .sort-indicator-icon {
  opacity: 0.9;
}

th.table-sortable-th.th-sort-asc .sort-indicator-icon {
  opacity: 1;
  color: #025416 !important;
}

[data-bs-theme="dark"] th.table-sortable-th.th-sort-asc .sort-indicator-icon {
  color: #4ade80 !important;
}

th.table-sortable-th.th-sort-desc .sort-indicator-icon {
  opacity: 1;
  color: #025416 !important;
}

[data-bs-theme="dark"] th.table-sortable-th.th-sort-desc .sort-indicator-icon {
  color: #4ade80 !important;
}

/* Pagination bar active theme */
.pagination .page-item.active .page-link {
  background-color: #025416 !important;
  border-color: #025416 !important;
  color: #ffffff !important;
}

.pagination .page-link {
  color: #334155;
  border-radius: 6px;
  margin: 0 2px;
  font-size: 0.8rem;
}

.pagination .page-link:hover {
  background-color: rgba(2, 84, 22, 0.08);
  color: #025416;
}

/* ==========================================================================
   Offcanvas Drawer Fullscreen Modes & Smooth Resizing
   ========================================================================== */
.offcanvas.offcanvas-end {
  transition: transform 0.3s ease-in-out, width 0.3s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.offcanvas.drawer-fullscreen,
.offcanvas.is-fullscreen {
  width: 100vw !important;
  max-width: 100vw !important;
}

.offcanvas.drawer-fullscreen .offcanvas-body,
.offcanvas.is-fullscreen .offcanvas-body {
  max-width: 100%;
}