/* ==========================================================================
   Food Section Fire License - Core Common Styles & MD3 System Integration
   ========================================================================== */

/* Global Link Reset & Typography */
a {
  text-decoration: none;
  color: inherit;
  transition: color 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
}

a:focus-visible {
  outline: 0.125rem solid var(--md-sys-color-primary, #6750a4);
  outline-offset: 0.125rem;
  border-radius: var(--md-sys-shape-corner-extra-small, 0.25rem);
}

/* ==========================================================================
   Header Top App Bar & Navigation
   ========================================================================== */

.header-app-bar {
  position: sticky;
  top: 0;
  z-index: 500;
  overflow: visible !important;
  background-color: var(--md-sys-color-surface-container, #f3edf7);
  color: var(--md-sys-color-on-surface, #1d1b20);
  border-bottom: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.04);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: clamp(0rem, 100%, 85rem);
  margin: 0 auto;
  padding: 0.5rem 1.25rem;
  gap: 1rem;
  overflow: visible !important;
}

.nav-section-start,
.nav-section-center,
.nav-section-end {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: visible !important;
}

.nav-section-center {
  flex: 1;
  justify-content: center;
  overflow: visible !important;
}

.brand-icon-btn {
  color: var(--md-sys-color-primary, #6750a4) !important;
}

.brand-title {
  text-decoration: none !important;
  color: var(--md-sys-color-on-surface, #1d1b20);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.012em;
  white-space: nowrap;
}

.nav-link-btn {
  text-decoration: none !important;
  font-weight: 600;
  white-space: nowrap;
}

.icon-start {
  margin-right: 0.35rem;
  font-size: 1.25rem;
}

/* Dropdown Controls */
.dropdown-wrapper,
.nav-dropdown-wrapper {
  position: relative;
  display: inline-block;
  overflow: visible !important;
}

.nav-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none !important;
}

.dropdown-caret {
  font-size: 1.15rem;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.nav-dropdown-btn[aria-expanded="true"] .dropdown-caret {
  transform: rotate(180deg);
}

/* Categorized Dropdown Menu */
.categorized-menu {
  position: absolute;
  top: calc(100% + 0.375rem);
  left: 0;
  min-width: 14.375rem;
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  border-radius: var(--md-sys-shape-corner-medium, 0.75rem);
  box-shadow: var(--md-sys-elevation-3, 0 0.375rem 1.125rem rgba(0, 0, 0, 0.18));
  padding: 0.5rem 0;
  display: none;
  z-index: 10000;
}

.categorized-menu.is-open {
  display: block !important;
  animation: menuFadeIn 0.18s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes menuFadeIn {
  from {
    opacity: 0;
    transform: translateY(-0.375rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.menu-category-header {
  padding: 0.45rem 1rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  text-transform: uppercase;
  letter-spacing: 0.031em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.cat-icon {
  font-size: 1rem;
  color: var(--md-sys-color-primary, #6750a4);
}

.categorized-menu .md-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1rem;
  text-decoration: none !important;
  color: var(--md-sys-color-on-surface, #1d1b20);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.categorized-menu .md-menu-item:hover {
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
  color: var(--md-sys-color-primary, #6750a4);
}

.categorized-menu .md-menu-item .md-icon {
  font-size: 1.15rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
}

.categorized-menu .md-menu-item:hover .md-icon {
  color: var(--md-sys-color-primary, #6750a4);
}

/* User Profile Menu */
.user-avatar-img {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
}

.user-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  display: none;
  min-width: 17rem;
  max-width: 22rem;
  max-height: calc(100vh - 4.5rem);
  overflow-y: auto;
  overflow-x: hidden;
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  border-radius: var(--md-sys-shape-corner-medium, 0.875rem);
  box-shadow: var(--md-sys-elevation-3, 0 0.375rem 1.125rem rgba(0, 0, 0, 0.18));
  padding: 0.5rem 0;
  z-index: 10000;
  scrollbar-width: thin;
}

.user-dropdown-menu.is-open {
  display: block !important;
  animation: menuFadeIn 0.18s cubic-bezier(0.2, 0, 0, 1);
}

.user-info-header {
  display: flex;
  flex-direction: column;
  padding: 0.65rem 1.1rem;
}

.user-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--md-sys-color-on-surface, #1d1b20);
}

.user-email {
  color: var(--md-sys-color-on-surface-variant, #49454f);
  font-size: 0.8rem;
  margin-top: 0.15rem;
}

.profile-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--md-sys-shape-corner-full, 9999rem);
  background-color: var(--md-sys-color-primary-container, #eaddff);
  color: var(--md-sys-color-on-primary-container, #21005d);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.031em;
  text-transform: uppercase;
  /*   margin-top: 0.45rem; */
  width: fit-content;
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08));
}

.user-dropdown-menu .md-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1.1rem;
  text-decoration: none !important;
  color: var(--md-sys-color-on-surface, #1d1b20);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.15s ease;
}

.user-dropdown-menu .md-menu-item:hover {
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
}

/* Dashboard Group with Sub-menu in Profile Menu */
.profile-dashboard-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.25rem;
}

.profile-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--md-sys-color-primary-container, #eaddff);
  border-radius: 0.5rem;
  margin: 0 0.5rem;
  padding-right: 0.4rem;
}

.profile-dashboard-header .profile-dashboard-link {
  flex: 1;
  background-color: transparent !important;
  padding: 0.55rem 0.75rem !important;
  margin: 0;
}

.profile-dashboard-link {
  color: var(--md-sys-color-on-primary-container, #21005d) !important;
  font-weight: 600 !important;
}

.profile-dashboard-link .md-icon {
  color: var(--md-sys-color-primary, #6750a4) !important;
}

.profile-submenu-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: var(--md-sys-shape-corner-full, 9999rem);
  color: var(--md-sys-color-on-primary-container, #21005d);
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.profile-submenu-toggle:hover {
  background-color: rgba(103, 80, 164, 0.15);
}

.profile-submenu-toggle .submenu-chevron {
  font-size: 1.25rem;
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1);
}

.profile-submenu-toggle.is-open .submenu-chevron {
  transform: rotate(180deg);
}

.profile-dashboard-submenu {
  display: none;
  flex-direction: column;
  background-color: var(--md-sys-color-surface-container, #f3edf7);
  padding: 0.35rem 0;
  border-left: 0.1875rem solid var(--md-sys-color-primary, #6750a4);
  margin-left: 1.15rem;
  margin-right: 0.65rem;
  margin-top: 0.25rem;
  border-radius: 0 0.5rem 0.5rem 0;
}

.profile-dashboard-submenu.is-open {
  display: flex;
}

.profile-subnav-item {
  display: flex !important;
  align-items: center !important;
  gap: 0.65rem !important;
  padding: 0.45rem 0.75rem !important;
  font-size: 0.825rem !important;
  color: var(--md-sys-color-on-surface-variant, #49454f) !important;
  font-weight: 500 !important;
  border-radius: 0.375rem;
  margin: 0.08rem 0.35rem;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.profile-subnav-item:hover {
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9) !important;
  color: var(--md-sys-color-primary, #6750a4) !important;
}

.profile-subnav-item.is-active {
  background-color: var(--md-sys-color-primary-container, #eaddff) !important;
  color: var(--md-sys-color-on-primary-container, #21005d) !important;
  font-weight: 700 !important;
}

.profile-subnav-item .sub-icon {
  font-size: 1.15rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
}

.profile-subnav-item:hover .sub-icon,
.profile-subnav-item.is-active .sub-icon {
  color: var(--md-sys-color-primary, #6750a4);
}

.text-error {
  color: var(--md-sys-color-error, #ba1a1a) !important;
}

.text-error:hover {
  background-color: var(--md-sys-color-error-container, #ffdad6) !important;
}

/* ==========================================================================
   Page Layout Containers & MD3 Card System
   ========================================================================== */

.container {
  max-width: 80rem;
  margin: 2rem auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

.container-center {
  max-width: 80rem;
  margin: 2rem auto;
  padding: 0 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(85vh - 4.375rem);
  box-sizing: border-box;
}

/* Standalone Auth & Profile Cards */
.auth-standalone-card {
  max-width: 27.5rem !important;
  width: 100% !important;
  margin: 0 auto;
  background-color: var(--md-sys-color-surface-container-low, #f7f2fa);
  border-radius: var(--md-sys-shape-corner-extra-large, 1.75rem);
  overflow: hidden;
  box-shadow: var(--md-sys-elevation-2, 0 0.25rem 1rem rgba(0, 0, 0, 0.1));
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08));
}

.profile-card {
  max-width: 32.5rem !important;
  width: 100% !important;
  margin: 0 auto;
}

/* Data Entry Form Cards (Applicant & Application Entry / Edit) */
.applicant-entry-card,
.applicant-edit-card {
  max-width: 53.75rem !important;
  width: 100% !important;
  margin: 0 auto;
}

.application-entry-card,
.application-edit-card {
  max-width: 61.25rem !important;
  width: 100% !important;
  margin: 0 auto;
}

.md-card-media {
  width: 100%;
  object-fit: cover;
  display: block;
}

.md-card-content {
  padding: 1.5rem 1.75rem;
}

.md-card-actions {
  padding: 0.5rem 1.75rem 1.5rem;
}

.md-title-large {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface, #1d1b20);
  margin: 0 0 0.5rem;
}

.md-title-medium {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface, #1d1b20);
}

.md-body-medium {
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0 0 1rem;
}

.md-text-on-surface-variant {
  color: var(--md-sys-color-on-surface-variant, #49454f);
}

.md-text-field {
  margin: 1em 0;
}

/* Floating Snackbar Styles */
.snackbar-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.md-snackbar {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  display: none;
  min-width: 16.25rem;
  max-width: 23.75rem;
  background-color: var(--md-sys-color-inverse-surface, #313033);
  color: var(--md-sys-color-inverse-on-surface, #f4eff4);
  padding: 0.75rem 1rem;
  border-radius: var(--md-shape-corner-small, 0.5rem);
  box-shadow: var(--md-sys-elevation-3, 0 0.1875rem 0.5rem rgba(0, 0, 0, 0.24));
  z-index: 1000;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.md-snackbar.is-open {
  display: flex;
}

.md-snackbar-text {
  font-size: 0.875rem;
  line-height: 1.25rem;
  word-break: break-word;
}

.md-snackbar-action {
  background: transparent;
  border: none;
  color: var(--md-sys-color-inverse-primary, #d0bcff);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--md-sys-shape-corner-extra-small, 0.25rem);
  transition: background-color 0.15s ease;
  flex-shrink: 0;
}

.md-snackbar-action:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   Material Design 3 Dialog / Modal Styles (material-you-css compatible)
   ========================================================================== */

.md-dialog-scrim {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(0.375rem);
  backdrop-filter: blur(0.375rem);
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 99999 !important;
  box-sizing: border-box;
}

.md-dialog-scrim.is-open {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  animation: scrimFadeIn 0.18s ease-out;
}

@keyframes scrimFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.md-dialog-container {
  position: relative;
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  color: var(--md-sys-color-on-surface, #1d1b20);
  border-radius: var(--md-sys-shape-corner-extra-large, 1.75rem);
  padding: 1.75rem;
  width: 100%;
  max-width: 30rem;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.35);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 100000 !important;
  box-sizing: border-box;
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.1));
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.modal-icon {
  font-size: 1.5rem;
  color: var(--md-sys-color-primary, #6750a4);
}

.modal-title-group h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface, #1d1b20);
}

.icon-btn-close {
  background: transparent;
  border: none;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}

.icon-btn-close:hover {
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
  color: var(--md-sys-color-on-surface, #1d1b20);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.modal-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.modal-form .form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface-variant, #49454f);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.md-dialog-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.25rem;
  position: relative;
  border-radius: var(--md-sys-shape-corner-extra-large, 1.75rem) var(--md-sys-shape-corner-extra-large, 1.75rem) 0 0;
}

.md-dialog-close-btn {
  position: absolute;
  top: -0.75rem;
  right: -0.5rem;
  background: transparent;
  border: none;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
}

.md-dialog-close-btn:hover {
  background-color: var(--md-sys-color-surface-container, #f3edf7);
  color: var(--md-sys-color-on-surface, #1d1b20);
}

.md-dialog-icon-badge {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background-color: var(--md-sys-color-primary-container, #eaddff);
  color: var(--md-sys-color-on-primary-container, #21005d);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  box-shadow: 0 0.125rem 0.5rem rgba(103, 80, 164, 0.16);
}

.md-dialog-icon-badge.badge-error {
  background-color: var(--md-sys-color-error-container, #f9dedc);
  color: var(--md-sys-color-on-error-container, #410e0b);
  box-shadow: 0 0.125rem 0.5rem rgba(179, 38, 30, 0.16);
}

.md-dialog-icon-badge.badge-warning {
  background-color: var(--md-sys-color-tertiary-container, #ffdcc1);
  color: var(--md-sys-color-on-tertiary-container, #2e1500);
  box-shadow: 0 0.125rem 0.5rem rgba(178, 106, 0, 0.16);
}

.md-dialog-icon-badge.badge-danger {
  background-color: #fee2e2;
  color: #dc2626;
  box-shadow: 0 0.125rem 0.5rem rgba(220, 38, 38, 0.2);
}

.md-dialog-icon-badge.badge-info {
  background-color: #e0f2fe;
  color: #0284c7;
  box-shadow: 0 0.125rem 0.5rem rgba(2, 132, 199, 0.2);
}

.md-dialog-icon-badge.badge-success {
  background-color: #dcfce7;
  color: #16a34a;
  box-shadow: 0 0.125rem 0.5rem rgba(22, 163, 74, 0.2);
}

/* Modal Action & Standout Status Buttons */
.btn-danger,
.md-btn-danger {
  background-color: #dc2626 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
}

.btn-danger:hover,
.md-btn-danger:hover {
  background-color: #b91c1c !important;
  border-color: #b91c1c !important;
  box-shadow: 0 0.125rem 0.375rem rgba(220, 38, 38, 0.3) !important;
}

.btn-warning,
.md-btn-warning {
  background-color: #ea580c !important;
  color: #ffffff !important;
  border-color: #ea580c !important;
}

.btn-warning:hover,
.md-btn-warning:hover {
  background-color: #c2410c !important;
  border-color: #c2410c !important;
  box-shadow: 0 0.125rem 0.375rem rgba(234, 88, 12, 0.3) !important;
}

.md-dialog-icon-badge .material-symbols-rounded {
  font-size: 1.75rem;
}

.md-dialog-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface, #1d1b20);
  line-height: 1.3;
}

.md-dialog-subtitle {
  margin: 0.35rem 0 0 0;
  font-size: 0.875rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  line-height: 1.4;
}

.md-dialog-alert {
  display: none;
  padding: 0.75rem 1rem;
  border-radius: var(--md-sys-shape-corner-medium, 0.75rem);
  margin-bottom: 1rem;
  font-size: 0.85rem;
  line-height: 1.35;
  text-align: left;
  border: 0.0625rem solid transparent;
}

.md-dialog-alert.alert-error {
  display: block;
  background-color: var(--md-sys-color-error-container, #f9dedc);
  color: var(--md-sys-color-on-error-container, #410e0b);
  border-color: rgba(179, 38, 30, 0.2);
}

.md-dialog-alert.alert-success {
  display: block;
  background-color: #c4eed0;
  color: #0d5223;
  border-color: rgba(13, 82, 35, 0.2);
}

.md-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-auth-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
}

.google-btn-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  min-height: 2.75rem;
}

.modal-auth-divider {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0.25rem 0;
  color: var(--md-sys-color-outline, #79747e);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.031em;
}

.modal-auth-divider::before,
.modal-auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 0.0625rem solid var(--md-sys-color-outline-variant, #cac4d0);
}

.modal-auth-divider span {
  padding: 0 0.65rem;
}

/* Logout Dialog User Card */
.modal-user-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background-color: var(--md-sys-color-surface-container-lowest, #ffffff);
  border-radius: var(--md-sys-shape-corner-large, 1rem);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, #cac4d0);
  box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.05);
}

.modal-user-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.modal-user-avatar-placeholder {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background-color: var(--md-sys-color-primary-container, #eaddff);
  color: var(--md-sys-color-on-primary-container, #21005d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.modal-user-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
}

.modal-user-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--md-sys-color-on-surface, #1d1b20);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-user-email {
  font-size: 0.8rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-user-role-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.031em;
  padding: 0.125rem 0.375rem;
  border-radius: 0.375rem;
  margin-top: 0.1875rem;
  background-color: var(--md-sys-color-secondary-container, #e8def8);
  color: var(--md-sys-color-on-secondary-container, #1d192b);
}

.modal-logout-btn-group {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}

.modal-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--md-sys-shape-corner-medium, 0.75rem);
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.md-dialog-footer {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.md-dialog-fallback-link {
  font-size: 0.8rem;
  color: var(--md-sys-color-primary, #6750a4);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s;
}

.md-dialog-fallback-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}

/* ==========================================================================
   Navigation Drawer & Mobile / Tablet Navigation
   ========================================================================== */

.nav-hamburger-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--md-sys-color-on-surface, #1d1b20);
  background: transparent;
  border: none;
  border-radius: 50%;
  padding: 0.45rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.nav-hamburger-btn:hover {
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
}

.hamburger-notification-badge {
  position: absolute;
  top: 0.3125rem;
  right: 0.3125rem;
  width: 0.5625rem;
  height: 0.5625rem;
  border-radius: 50%;
  background-color: var(--md-sys-color-error, #ba1a1a);
  border: 0.125rem solid var(--md-sys-color-surface, #ffffff);
  box-shadow: 0 0 0.375rem rgba(186, 26, 26, 0.6);
  animation: badgePulse 2s infinite ease-in-out;
}

@keyframes badgePulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.3);
    opacity: 0.85;
  }
}

.drawer-notification-container {
  margin: 0.75rem 1rem 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Expanded State Banner Animation */
.drawer-notification-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  background-color: var(--md-sys-color-secondary-container, #e8def8);
  color: var(--md-sys-color-on-secondary-container, #1d192b);
  border-radius: var(--md-sys-shape-corner-large, 0.875rem);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08));
  box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.05);
  max-height: 11.25rem;
  opacity: 1;
  transform: scaleY(1);
  transform-origin: top center;
  overflow: hidden;
  box-sizing: border-box;
  transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease,
    transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    margin 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.25s ease;
}

.drawer-notification-container.is-collapsed .drawer-notification-banner {
  max-height: 0;
  opacity: 0;
  transform: scaleY(0);
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
  border-color: transparent;
  pointer-events: none;
}

.drawer-notif-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--md-sys-color-primary, #6750a4);
  flex-shrink: 0;
}

.drawer-notif-icon span {
  font-size: 1.35rem;
}

.drawer-notif-content {
  flex: 1;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.drawer-notif-toggle-btn {
  background: transparent;
  border: none;
  color: var(--md-sys-color-on-secondary-container, #1d192b);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: background-color 0.15s ease, opacity 0.15s ease;
  flex-shrink: 0;
}

.drawer-notif-toggle-btn:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.08);
}

.drawer-notif-toggle-btn span {
  font-size: 1.25rem;
}

/* Collapsed State Chip Animation */
.drawer-notification-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.85rem;
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  color: var(--md-sys-color-primary, #6750a4);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  border-radius: var(--md-sys-shape-corner-full, 9999rem);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  width: fit-content;
  box-shadow: 0 0.0625rem 0.25rem rgba(0, 0, 0, 0.05);
  max-height: 3rem;
  opacity: 1;
  transform: scale(1);
  transform-origin: left center;
  overflow: hidden;
  box-sizing: border-box;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.25s ease,
    transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.15s ease,
    color 0.15s ease;
}

.drawer-notification-container:not(.is-collapsed) .drawer-notification-chip {
  max-height: 0;
  opacity: 0;
  transform: scale(0.75);
  padding-top: 0;
  padding-bottom: 0;
  border-color: transparent;
  pointer-events: none;
}

.drawer-notification-chip:hover {
  background-color: var(--md-sys-color-secondary-container, #e8def8);
  color: var(--md-sys-color-on-secondary-container, #1d192b);
}

.drawer-notification-chip .chip-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.drawer-notification-chip .chip-icon {
  font-size: 1.15rem;
  color: var(--md-sys-color-primary, #6750a4);
}

.drawer-notification-chip .chip-right {
  display: flex;
  align-items: center;
  margin-left: 0.4rem;
}

.drawer-notification-chip .chip-arrow {
  font-size: 1.1rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
}

.nav-drawer-scrim {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(0.25rem);
  backdrop-filter: blur(0.25rem);
  z-index: 99990;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.nav-drawer-scrim.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  display: block;
}

.nav-drawer-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  height: 100vh;
  height: 100dvh;
  width: 24rem;
  max-width: 90vw;
  background-color: var(--md-sys-color-surface-container-low, #f7f2fa);
  color: var(--md-sys-color-on-surface, #1d1b20);
  box-shadow: -0.5rem 0 2rem rgba(0, 0, 0, 0.25);
  border-left: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  z-index: 99995;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
  box-sizing: border-box;
}

.nav-drawer-panel.is-open {
  transform: translateX(0);
}

/* User Avatar Trigger in Navbar */
.nav-drawer-avatar-btn {
  position: relative;
  padding: 0;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.nav-drawer-avatar-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.12);
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
}

.nav-drawer-avatar-btn .user-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.nav-drawer-avatar-btn .hamburger-notification-badge {
  top: -0.0625rem;
  right: -0.0625rem;
}

.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08));
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.drawer-brand-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--md-sys-shape-corner-medium, 0.75rem);
  background: linear-gradient(135deg, var(--md-sys-color-primary, #6750a4), #4f378b);
  color: var(--md-sys-color-on-primary, #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0.1875rem 0.5rem rgba(103, 80, 164, 0.3);
}

.drawer-brand-icon span {
  font-size: 1.5rem;
}

.drawer-brand-text {
  display: flex;
  flex-direction: column;
}

.drawer-brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface, #1d1b20);
}

.drawer-brand-subtitle {
  font-size: 0.75rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  letter-spacing: 0.013em;
}

.drawer-close-btn {
  color: var(--md-sys-color-on-surface-variant, #49454f);
  background: transparent;
  border: none;
  border-radius: 50%;
  padding: 0.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}

.drawer-close-btn:hover {
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
  color: var(--md-sys-color-on-surface, #1d1b20);
}

.nav-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* User Card in Drawer */
.drawer-user-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background-color: var(--md-sys-color-surface-container, #f3edf7);
  border-radius: var(--md-sys-shape-corner-large, 1rem);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08));
}

.drawer-user-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background-color: var(--md-sys-color-primary-container, #eaddff);
  color: var(--md-sys-color-on-primary-container, #21005d);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.drawer-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drawer-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.drawer-user-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface, #1d1b20);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-user-email {
  font-size: 0.78rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Drawer Nav List */
.drawer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--md-sys-shape-corner-large, 0.875rem);
  color: var(--md-sys-color-on-surface, #1d1b20);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  transition: all 0.15s ease;
}

.drawer-nav-item:hover,
.drawer-nav-item:active,
.drawer-nav-item.is-active {
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  color: var(--md-sys-color-primary, #6750a4);
}

.drawer-nav-item .nav-icon {
  font-size: 1.35rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
}

.drawer-nav-item:hover .nav-icon,
.drawer-nav-item:active .nav-icon,
.drawer-nav-item.is-active .nav-icon {
  color: var(--md-sys-color-primary, #6750a4);
}

/* Drawer Accordions */
.drawer-accordion-group {
  display: flex;
  flex-direction: column;
}

.drawer-accordion-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--md-sys-shape-corner-large, 0.875rem);
  border: none;
  background: transparent;
  color: var(--md-sys-color-on-surface, #1d1b20);
  font-weight: 500;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  text-align: left;
}

.drawer-accordion-btn:hover {
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
}

.drawer-accordion-label {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.drawer-accordion-label .nav-icon {
  font-size: 1.35rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
}

.drawer-accordion-btn:hover .nav-icon {
  color: var(--md-sys-color-primary, #6750a4);
}

.accordion-arrow {
  font-size: 1.25rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  transition: transform 0.25s ease;
}

.drawer-accordion-btn.is-open .accordion-arrow {
  transform: rotate(180deg);
}

.drawer-submenu {
  display: none;
  flex-direction: column;
  padding: 0.35rem 0 0.35rem 1.75rem;
  gap: 0.2rem;
}

.drawer-submenu.is-open {
  display: flex;
}

.drawer-submenu-category {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.038em;
  color: var(--md-sys-color-primary, #6750a4);
  padding: 0.35rem 0.75rem 0.15rem;
}

.drawer-subnav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--md-sys-shape-corner-medium, 0.625rem);
  color: var(--md-sys-color-on-surface-variant, #49454f);
  text-decoration: none;
  font-size: 0.88rem;
  transition: all 0.15s ease;
}

.drawer-subnav-item:hover {
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  color: var(--md-sys-color-primary, #6750a4);
}

.drawer-subnav-item .sub-icon {
  font-size: 1.15rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
}

.drawer-subnav-item:hover .sub-icon {
  color: var(--md-sys-color-primary, #6750a4);
}

.drawer-subnav-item.is-active {
  background-color: var(--md-sys-color-primary-container, #eaddff);
  color: var(--md-sys-color-on-primary-container, #21005d);
  font-weight: 700;
}

.drawer-subnav-item.is-active .sub-icon {
  color: var(--md-sys-color-primary, #6750a4);
}

.drawer-divider {
  border: none;
  height: 0.0625rem;
  background-color: var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08));
  margin: 0.5rem 0;
}

.nav-drawer-footer {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08));
}

.drawer-auth-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: var(--md-sys-shape-corner-medium, 0.75rem);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

/* ==========================================================================
   RESPONSIVE DESIGN BREAKPOINTS (Desktop vs Tablet vs Mobile)
   ========================================================================== */

/* Desktop (>= 64.0625rem / 1025px) */
@media (min-width: 64.0625rem) {
  .nav-hamburger-btn {
    display: inline-flex !important;
  }

  .nav-section-center {
    display: flex !important;
  }

  /* Right navigation sidebar drawer is standardized across all screens */
  .nav-drawer-panel {
    width: 24rem;
    max-width: 90vw;
  }

  /* Hide record card action button on desktop */
  .card-more-menu-wrapper,
  .card-more-btn {
    display: none !important;
  }
}

/* Tablet & Mobile Universal (<= 64rem / 1024px) */
@media (max-width: 64rem) {
  .header-app-bar {
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .nav-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .nav-section-start {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin-right: auto !important;
    flex-shrink: 0 !important;
  }

  .nav-section-center {
    display: none !important;
  }

  .nav-section-end {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }

  .theme-cycle-wrapper,
  .snackbar-wrapper,
  .desktop-only-notif {
    display: none !important;
  }

  .nav-hamburger-btn {
    display: none !important;
  }

  .login-nav-btn,
  .nav-drawer-avatar-btn {
    margin-left: auto !important;
  }
}

/* Tablet Specific (37.5625rem - 64rem / 601px - 1024px) */
@media (max-width: 64rem) and (min-width: 37.5625rem) {
  .nav-container {
    padding: 0.5rem 1.25rem;
  }

  .nav-drawer-panel {
    width: 50vw;
    min-width: 21.25rem;
    max-width: 30rem;
  }
}

/* Mobile Specific (<= 37.5rem / 600px) */
@media (max-width: 37.5rem) {
  .nav-container {
    padding: 0.45rem 0.85rem;
  }

  .brand-title {
    font-size: 0.92rem;
    max-width: 12.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Full Screen Drawer on Mobile */
  .nav-drawer-panel {
    width: 100vw;
    max-width: 100vw;
  }

  .md-dialog-container {
    padding: 1.25rem;
    border-radius: var(--md-sys-shape-corner-extra-large, 1.25rem);
  }

  .container-center .md-card {
    border-radius: var(--md-sys-shape-corner-extra-large, 1.25rem);
  }
}

/* ==========================================================================
   COMMON COMPONENT DESIGN SYSTEM (Extending Material You MD3)
   ========================================================================== */

/* 1. Page Header & Icon Badges */
.page-header-card,
.search-filter-card,
.create-header-card,
.admin-header-card {
  width: 100%;
  border-radius: var(--md-sys-shape-corner-extra-large, 1.75rem);
  background-color: var(--md-sys-color-surface, #fff);
  box-shadow: var(--md-sys-elevation-2, 0 0.1875rem 0.75rem rgba(0, 0, 0, 0.08));
  box-sizing: border-box;
  padding: 1.75rem 2rem;
}

.page-header-row,
.search-header-row,
.create-header-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.25rem;
  /* margin-bottom: 1.5rem; */
  padding-bottom: 1rem;
  /* border-bottom: 0.0625rem solid var(--md-sys-color-outline-variant, #cac4d0); */
  flex-wrap: wrap;
}

.page-header-title-group,
.search-header-title-group,
.title-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.page-header-icon-badge,
.search-header-icon-badge,
.applicant-entry-icon-badge,
.applicant-edit-icon-badge,
.application-entry-icon-badge,
.application-edit-icon-badge,
.superadmin-icon-badge,
.admin-header-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--md-sys-shape-corner-large, 1rem);
  background: linear-gradient(135deg, var(--md-sys-color-primary-container, #eaddff) 0%, #d0bcff 100%);
  color: var(--md-sys-color-on-primary-container, #21005d);
  box-shadow: 0 0.25rem 0.625rem rgba(103, 80, 164, 0.15);
  flex-shrink: 0;
}

.page-header-icon-badge .material-symbols-rounded,
.search-header-icon-badge .material-symbols-rounded,
.superadmin-icon-badge .material-symbols-rounded {
  font-size: 2rem;
}

.page-header-text h1,
.search-header-text h1,
.admin-header-title {
  margin: 0 0 0.25rem 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface, #1d1b20);
  letter-spacing: -0.012em;
}

.page-header-text p,
.search-header-text p,
.admin-header-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
}

.page-header-actions,
.search-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* 2. Form Grids & Custom Controls */
.form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-grid-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.25rem;
}

.form-grid-4col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr));
  gap: 1.25rem;
}

.form-field-group,
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field-group,
.form-grid-2col,
.form-grid-3col,
.form-grid-4col {
  padding: 0.5rem 0;
}

.form-field-label,
.filter-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--md-sys-color-on-surface, #1d1b20);
}

.form-field-label .material-symbols-rounded,
.filter-label .material-symbols-rounded {
  color: var(--md-sys-color-primary, #6750a4);
  font-size: 1.15rem;
}

.required-asterisk {
  color: var(--md-sys-color-error, #ba1a1a);
  font-weight: 700;
}

.field-hint,
.filter-hint {
  font-size: 0.75rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  margin-top: 0.25rem;
}

.form-input-text,
.form-select,
.form-textarea,
.filter-input,
.filter-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 0.0938rem solid var(--md-sys-color-outline, #79747e);
  border-radius: var(--md-sys-shape-corner-small, 0.625rem);
  font-size: 0.92rem;
  font-family: inherit;
  background-color: var(--md-sys-color-surface, #fff);
  color: var(--md-sys-color-on-surface, #1d1b20);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.form-input-text:focus,
.form-select:focus,
.form-textarea:focus,
.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--md-sys-color-primary, #6750a4);
  box-shadow: 0 0 0 0.1875rem rgba(103, 80, 164, 0.15);
}

.form-action-row,
.filter-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* 3. Enum / Choice Selector Cards */
.enum-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.125rem, 1fr));
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.enum-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 0.75rem;
  border: 0.0938rem solid var(--md-sys-color-outline-variant, #cac4d0);
  border-radius: var(--md-sys-shape-corner-medium, 0.75rem);
  background-color: var(--md-sys-color-surface-container-lowest, #ffffff);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  box-sizing: border-box;
}

.enum-card:hover {
  background-color: var(--md-sys-color-surface-container-low, #f7f2fa);
  border-color: var(--md-sys-color-primary, #6750a4);
  transform: translateY(-0.0625rem);
}

.enum-card input[type="radio"] {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  accent-color: var(--md-sys-color-primary, #6750a4);
  width: 1rem;
  height: 1rem;
}

.enum-card-has-radio:has(input[type="radio"]:checked),
.enum-card.is-selected {
  border-color: var(--md-sys-color-primary, #6750a4);
  background-color: var(--md-sys-color-primary-container, #eaddff);
  color: var(--md-sys-color-on-primary-container, #21005d);
}

.enum-card .enum-icon {
  font-size: 1.6rem;
  margin-bottom: 0.35rem;
  color: var(--md-sys-color-primary, #6750a4);
}

.enum-card input[type="radio"]:checked~.enum-icon {
  color: var(--md-sys-color-on-primary-container, #21005d);
}

.enum-label-title {
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.2;
}

.enum-label-sub {
  font-size: 0.75rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  margin-top: 0.125rem;
}

/* 4. Status Chips & Role Badges (extends .md-chip) */
.chip-status,
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--md-sys-shape-corner-full, 9999rem);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  text-transform: capitalize;
  white-space: nowrap;
}

.chip-status .material-symbols-rounded {
  font-size: 0.95rem;
}

.chip-submitted {
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  color: var(--md-sys-color-on-surface-variant, #49454f);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, #cac4d0);
}

.chip-verified {
  background-color: #dbeafe;
  color: #1e40af;
  border: 0.0625rem solid #bfdbfe;
}

.chip-approved {
  background-color: #dcfce7;
  color: #166534;
  border: 0.0625rem solid #bbf7d0;
}

.chip-rejected {
  background-color: var(--md-sys-color-error-container, #fee2e2);
  color: var(--md-sys-color-error, #ba1a1a);
  border: 0.0625rem solid #fecaca;
}

.chip-expired {
  background-color: #f3f4f6;
  color: #6b7280;
  border: 0.0625rem solid #e5e7eb;
}

.chip-license {
  background-color: var(--md-sys-color-primary-container, #eaddff);
  color: var(--md-sys-color-on-primary-container, #21005d);
  border: 0.0625rem solid rgba(103, 80, 164, 0.2);
}

.status-badge.badge-not-required,
.chip-not-required {
  color: var(--md-sys-color-primary, #6750a4) !important;
  background-color: var(--md-sys-color-primary-container, #eaddff) !important;
  border: 0.0625rem solid rgba(103, 80, 164, 0.25) !important;
}

.status-badge.resolved,
.status-badge-resolved {
  background-color: var(--pmp-success-container, #dcfce7);
  color: var(--pmp-on-success-container, #166534);
}

.status-badge.pending,
.status-badge-pending {
  background-color: var(--pmp-warning-container, #fef3c7);
  color: var(--pmp-on-warning-container, #92400e);
}

.status-badge.action-required,
.status-badge-action-required {
  background-color: var(--pmp-danger-container, #fee2e2);
  color: var(--pmp-on-danger-container, #ba1a1a);
}

.status-badge.draft,
.status-badge-draft {
  background-color: var(--pmp-surface-chip, #ece6f0);
  color: var(--pmp-text-muted, #49454f);
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--md-sys-shape-corner-full, 9999rem);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.031em;
}

.role-badge-superadmin {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: var(--md-sys-color-on-primary, #ffffff);
}

.role-badge-admin {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: var(--md-sys-color-on-primary, #ffffff);
}

.role-badge-operator {
  border: 0.0625rem solid var(--md-sys-color-outline-variant, #cac4d0);
  background: var(--md-sys-color-primary-container, #eaddff);
  color: var(--md-sys-color-on-primary-container, #21005d);
}

.badge-code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  color: var(--md-sys-color-on-surface, #1d1b20);
  padding: 0.2rem 0.5rem;
  border-radius: var(--md-sys-shape-corner-extra-small, 0.25rem);
  font-size: 0.8rem;
}

/* Applicant Entity Type Badges (Descriptive Color-Coded) */
.badge-proprietor {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 0.0625rem solid #bae6fd;
}

.badge-company {
  background-color: #f3e8ff;
  color: #7e22ce;
  border: 0.0625rem solid #e9d5ff;
}

.badge-agency {
  background-color: #ecfdf5;
  color: #047857;
  border: 0.0625rem solid #a7f3d0;
}

.badge-type-other {
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  color: var(--md-sys-color-on-surface-variant, #49454f);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, #cac4d0);
}

/* Compliance Status Badges for Applicant Analysis */
.badge-not-applied {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 0.0625rem solid #fecaca;
}

.badge-due-renew {
  background-color: #fef3c7;
  color: #b45309;
  border: 0.0625rem solid #fde68a;
}

.badge-applied-curr {
  background-color: #dcfce7;
  color: #15803d;
  border: 0.0625rem solid #bbf7d0;
}

:root[data-theme="dark"] .badge-proprietor,
:root[data-theme-resolved="dark"] .badge-proprietor,
[data-theme="dark"] .badge-proprietor {
  background-color: rgba(3, 105, 161, 0.22);
  color: #7dd3fc;
  border-color: rgba(125, 211, 252, 0.35);
}

:root[data-theme="dark"] .badge-company,
:root[data-theme-resolved="dark"] .badge-company,
[data-theme="dark"] .badge-company {
  background-color: rgba(126, 34, 206, 0.22);
  color: #d8b4fe;
  border-color: rgba(216, 180, 254, 0.35);
}

:root[data-theme="dark"] .badge-agency,
:root[data-theme-resolved="dark"] .badge-agency,
[data-theme="dark"] .badge-agency {
  background-color: rgba(4, 120, 87, 0.22);
  color: #6ee7b7;
  border-color: rgba(110, 231, 183, 0.35);
}

:root[data-theme="dark"] .badge-type-other,
:root[data-theme-resolved="dark"] .badge-type-other,
[data-theme="dark"] .badge-type-other {
  background-color: var(--md-sys-color-surface-container-high, #2b2930);
  color: var(--md-sys-color-on-surface-variant, #cac4d0);
  border-color: var(--md-sys-color-outline-variant, #49454f);
}

:root[data-theme="dark"] .badge-not-applied,
:root[data-theme-resolved="dark"] .badge-not-applied,
[data-theme="dark"] .badge-not-applied {
  background-color: rgba(185, 28, 28, 0.2);
  color: #fca5a5;
  border-color: rgba(252, 165, 165, 0.3);
}

:root[data-theme="dark"] .badge-due-renew,
:root[data-theme-resolved="dark"] .badge-due-renew,
[data-theme="dark"] .badge-due-renew {
  background-color: rgba(180, 83, 9, 0.2);
  color: #fcd34d;
  border-color: rgba(253, 224, 71, 0.3);
}

:root[data-theme="dark"] .badge-applied-curr,
:root[data-theme-resolved="dark"] .badge-applied-curr,
[data-theme="dark"] .badge-applied-curr {
  background-color: rgba(21, 128, 61, 0.2);
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.3);
}

/* Applicant Directory Search Box Toolbar */
.applicant-quick-search-form {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.applicant-search-input {
  transition: all 0.2s ease-in-out;
  background-color: var(--md-sys-color-surface, #ffffff);
  color: var(--md-sys-color-on-surface, #1d1b20);
  border: 0.0625rem solid var(--md-sys-color-outline, rgba(0, 0, 0, 0.2));
}

.applicant-search-input:focus {
  border-color: var(--md-sys-color-primary, #6750a4);
  box-shadow: 0 0 0 0.125rem rgba(103, 80, 164, 0.25);
  outline: none;
}

:root[data-theme="dark"] .applicant-search-input,
[data-theme="dark"] .applicant-search-input {
  background-color: var(--md-sys-color-surface-container, #211f26);
  color: var(--md-sys-color-on-surface, #e6e1e5);
  border-color: var(--md-sys-color-outline, rgba(255, 255, 255, 0.2));
}

@media (max-width: 48rem) {
  .applicant-quick-search-form {
    width: 100%;
  }

  .applicant-quick-search-form .search-input-wrap {
    flex: 1;
    width: 100%;
  }

  .applicant-quick-search-form .applicant-search-input {
    width: 100% !important;
  }
}

/* 5. Data Tables, Pagination & Empty States */
.data-table-container,
.table-responsive,
.table-card {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--md-sys-shape-corner-large, 1rem);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, #cac4d0);
  background-color: var(--md-sys-color-surface, #fff);
  box-shadow: var(--md-sys-elevation-1, 0 0.0625rem 0.25rem rgba(0, 0, 0, 0.06));
}

.table-responsive table {
  width: 100%;
  border-collapse: collapse;
}

.table-responsive table tr td,
.table-responsive table tr th {
  padding: 0.5rem 0.5rem;
  vertical-align: middle;
  word-break: break-word;
  overflow-x: auto;
  white-space: nowrap;
  text-align: center;
}

.table-responsive table tr th {
  padding: 1rem 0.5rem;
}

.table-responsive table tr:not(:last-child) {
  border-bottom: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.15));
}

/* Dashboard Panel Cards & Stacking Container Management (Prevents Material-You .md-card clipping dropdown menus) */
.panel-card,
.panel-card.md-card,
.guest-content-card,
.results-table-box,
.detail-card,
.role-card,
.filter-card,
.superadmin-tab-pane,
.admin-tab-pane,
.operator-tab-pane,
.tab-content-panel {
  overflow: visible !important;
}

.panel-card:has(.is-open),
.panel-card.card-dropdown-open,
.panel-card.has-dropdown-open,
.panel-toolbar:has(.is-open),
.panel-toolbar.has-dropdown-open {
  position: relative;
  z-index: 250 !important;
}

.panel-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background-color: var(--md-sys-color-surface, #ffffff);
  border-bottom: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08));
  border-radius: var(--md-sys-shape-corner-large, 1rem) var(--md-sys-shape-corner-large, 1rem) 0 0;
  overflow: visible !important;
}

.panel-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.panel-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface, #1d1b20);
}

.panel-heading .material-symbols-rounded {
  color: var(--md-sys-color-primary, #6750a4);
  font-size: 1.4rem;
}

.panel-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  line-height: 1.4;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.table-title-group,
.export-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.action-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

/* .action-btn>span.material-symbols-rounded {
  font-size: 1rem;
} */

/* ==========================================================================
   Responsive Table -> Material Cards Transformation (Mobile & Tablet <= 64rem)
   ========================================================================== */
@media (max-width: 64rem) {

  .table-actions-header,
  .panel-toolbar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.85rem !important;
  }

  .table-actions-header {
    padding: 1rem !important;
  }

  .table-title-group,
  .panel-title-group,
  .panel-toolbar> :first-child,
  .export-actions,
  .panel-actions,
  .panel-toolbar> :last-child:not(:first-child) {
    display: flex !important;
    gap: 0.75rem !important;
    padding: 0 !important;
    flex-wrap: wrap !important;
    width: 100% !important;
  }

  .panel-title-group,
  .panel-toolbar> :first-child {
    flex-direction: column !important;
  }

  .export-actions,
  .panel-actions,
  .panel-toolbar> :last-child:not(:first-child) {
    justify-content: flex-start !important;
    margin-left: 0 !important;
  }

  /* Remove table container borders/overflow scroll on mobile/tablet */
  .table-responsive {
    overflow-x: visible !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-bottom: 1.5rem !important;
  }

  .table-responsive table,
  .table-responsive .data-table,
  .table-responsive .sa-table,
  .table-responsive .custom-table {
    display: block !important;
    width: 100% !important;
    border: none !important;
    background: transparent !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
  }

  .table-responsive table thead,
  .table-responsive .data-table thead,
  .table-responsive .sa-table thead,
  .table-responsive .custom-table thead {
    display: none !important;
  }

  .table-responsive table tbody,
  .table-responsive .data-table tbody,
  .table-responsive .sa-table tbody,
  .table-responsive .custom-table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    width: 100% !important;
    border: none !important;
  }

  /* Each table row transforms into an individual Material Design card */
  .table-responsive table tr,
  .table-responsive .data-table tr,
  .table-responsive .sa-table tr,
  .table-responsive .custom-table tr {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background-color: var(--md-sys-color-surface-container-low, #f7f2fa) !important;
    border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12)) !important;
    border-radius: var(--md-sys-shape-corner-large, 1rem) !important;
    box-shadow: var(--md-sys-elevation-1, 0 0.0625rem 0.25rem rgba(0, 0, 0, 0.06)) !important;
    overflow: visible !important;
    position: relative !important;
    margin: 0 !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  }

  .table-responsive table tr:hover,
  .table-responsive .data-table tr:hover,
  .table-responsive .sa-table tr:hover,
  .table-responsive .custom-table tr:hover {
    box-shadow: var(--md-sys-elevation-2, 0 0.1875rem 0.5rem rgba(0, 0, 0, 0.12)) !important;
    transform: translateY(-0.0625rem) !important;
  }

  /* Standard cell row inside the card */
  .table-responsive table tr td,
  .table-responsive .data-table tr td,
  .table-responsive .sa-table tr td,
  .table-responsive .custom-table tr td {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    padding: 0.65rem 1.15rem !important;
    border-bottom: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.06)) !important;
    border-top: none !important;
    font-size: 0.85rem !important;
    color: var(--md-sys-color-on-surface, #1d1b20) !important;
    text-align: right !important;
    white-space: normal !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  /* Top cell in card: provide extra right padding so content never collides with 3-dot button */
  .table-responsive table tr td:first-child,
  .table-responsive .data-table tr td:first-child,
  .table-responsive .sa-table tr td:first-child,
  .table-responsive .custom-table tr td:first-child {
    padding-right: 3.5rem !important;
    border-radius: var(--md-sys-shape-corner-large, 1rem) var(--md-sys-shape-corner-large, 1rem) 0 0 !important;
  }

  /* Field label displayed on the left */
  .table-responsive table tr td[data-label]::before,
  .table-responsive .data-table tr td[data-label]::before,
  .table-responsive .sa-table tr td[data-label]::before,
  .table-responsive .custom-table tr td[data-label]::before {
    content: attr(data-label) !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.035em !important;
    color: var(--md-sys-color-on-surface-variant, #49454f) !important;
    text-align: left !important;
    margin-right: 1rem !important;
    flex-shrink: 0 !important;
  }

  /* Checkbox / Header Selection Cell in card */
  .table-responsive table tr td:has(input[type="checkbox"]),
  .table-responsive table tr td.checkbox-cell {
    background-color: var(--md-sys-color-surface-container, #f3edf7) !important;
    padding: 0.5rem 1.15rem !important;
    justify-content: flex-start !important;
    gap: 0.65rem !important;
  }

  /* Hide bottom action button cells on smaller screens using dedicated semantic classes */
  .table-responsive table tr td.td-actions,
  .table-responsive .data-table tr td.td-actions,
  .table-responsive .sa-table tr td.td-actions,
  .table-responsive .custom-table tr td.td-actions,
  .table-responsive table tr td.actions-cell,
  .table-responsive .data-table tr td.actions-cell,
  .table-responsive .sa-table tr td.actions-cell,
  .table-responsive .custom-table tr td.actions-cell,
  .table-responsive table tr td.table-actions-cell,
  .table-responsive .data-table tr td.table-actions-cell,
  .table-responsive table tr td[data-label="Actions"],
  .table-responsive .data-table tr td[data-label="Actions"],
  .table-responsive .sa-table tr td[data-label="Actions"],
  .table-responsive .custom-table tr td[data-label="Actions"],
  .table-responsive table tr td[data-label="Action"],
  .table-responsive .data-table tr td[data-label="Action"],
  .table-responsive .sa-table tr td[data-label="Action"],
  .table-responsive .custom-table tr td[data-label="Action"] {
    display: none !important;
  }

  /* Form footer inside card (e.g. challan submission) */
  .table-responsive table tr td.td-form,
  .table-responsive .data-table tr td.td-form,
  .table-responsive .sa-table tr td.td-form,
  .table-responsive .custom-table tr td.td-form,
  .table-responsive table tr td:has(form),
  .table-responsive .data-table tr td:has(form) {
    background-color: var(--md-sys-color-surface-container, #f3edf7) !important;
    border-top: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08)) !important;
    border-bottom: none !important;
    padding: 0.75rem 1.15rem !important;
    margin-top: 0.25rem !important;
    border-radius: 0 0 var(--md-sys-shape-corner-large, 1rem) var(--md-sys-shape-corner-large, 1rem) !important;
  }

  .table-responsive table tr td.td-form::before,
  .table-responsive .data-table tr td.td-form::before {
    display: none !important;
  }

  /* Action buttons layout in card footer */
  .table-responsive table tr td:last-child .row-actions,
  .table-responsive table tr td:last-child>div,
  .table-responsive .data-table tr td:last-child>div,
  .table-responsive .sa-table tr td:last-child>div,
  .table-responsive .custom-table tr td:last-child>div {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.5rem !important;
    flex-wrap: wrap !important;
    width: 100% !important;
  }

  /* Form inside card footer (e.g. challan submission) */
  .table-responsive table tr td:last-child form {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.5rem !important;
    flex-wrap: wrap !important;
    width: 100% !important;
  }



  /* Empty state cell */
  .table-responsive table tr td.empty-table-cell,
  .table-responsive table tr td[colspan] {
    display: block !important;
    text-align: center !important;
    padding: 2.5rem 1.5rem !important;
    color: var(--md-sys-color-on-surface-variant, #49454f) !important;
    border: none !important;
    background: transparent !important;
  }

  .table-responsive table tr td.empty-table-cell::before,
  .table-responsive table tr td[colspan]::before {
    display: none !important;
  }
}

.data-table,
.sa-table,
.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

/* Standardized Table Headers */
.data-table th,
.sa-table th,
.custom-table th,
.table-th,
.data-table .table-header {
  padding: var(--dt-th-padding, 0.65rem 0.75rem);
  font-size: var(--dt-th-font-size, 0.75rem);
  font-weight: var(--dt-th-font-weight, 700);
  text-align: left;
  white-space: nowrap;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background-color: var(--dt-th-bg, var(--md-sys-color-surface-container-low, #f7f2fa));
  color: var(--dt-th-color, var(--md-sys-color-on-surface-variant, #49454f));
  border-bottom: 0.0938rem solid var(--dt-th-border, var(--md-sys-color-outline-variant, #cac4d0));
}

/* Alignment and column utility classes */
.data-table th.table-th-right,
.data-table th.th-right,
.data-table th.text-right,
.data-table td.text-right,
.table-th-right,
.th-right {
  text-align: right !important;
}

.data-table th.table-th-center,
.data-table th.th-center,
.data-table th.text-center,
.data-table td.text-center,
.table-th-center,
.th-center {
  text-align: center !important;
}

.data-table th.table-th-check,
.data-table th.th-check,
.data-table td.table-td-check,
.data-table td.td-check,
.table-th-check,
.th-check,
.table-td-check,
.td-check {
  width: 2.75rem !important;
  min-width: 2.75rem !important;
  max-width: 2.75rem !important;
  text-align: center !important;
  vertical-align: middle !important;
}

.data-table td,
.sa-table td,
.custom-table td,
.data-table .table-cell {
  padding: var(--dt-td-padding, 0.75rem 0.85rem);
  border-bottom: 0.0625rem solid var(--dt-td-border, var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08)));
  color: var(--md-sys-color-on-surface, #1d1b20);
  vertical-align: middle;
}

.data-table tr:last-child td,
.sa-table tr:last-child td,
.custom-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover,
.sa-table tbody tr:hover,
.custom-table tbody tr:hover,
.data-table tr.table-row:hover {
  background-color: var(--dt-row-hover-bg, var(--md-sys-color-surface-container-lowest, #f9f6fd));
}

@media (min-width: 64.0625rem) {

  .table-responsive .data-table,
  .table-responsive .sa-table,
  .table-responsive .custom-table {
    min-width: 40rem;
  }
}

.table-filter-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

@media (max-width: 40rem) {
  .table-filter-row {
    flex-direction: column;
    align-items: stretch !important;
  }

  .table-filter-row .filter-select-wrapper {
    min-width: 100% !important;
    max-width: 100% !important;
  }
}

.table-cell-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-top: 0.0625rem solid var(--md-sys-color-outline-variant, #cac4d0);
  flex-wrap: wrap;
  gap: 1rem;
}

.pagination-info {
  font-size: 0.85rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.empty-state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.5rem;
  text-align: center;
  color: var(--md-sys-color-on-surface-variant, #49454f);
}

.empty-state-icon {
  font-size: 3.5rem;
  color: var(--md-sys-color-outline, #79747e);
  margin-bottom: 0.75rem;
  opacity: 0.7;
}

.empty-state-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.35rem 0;
  color: var(--md-sys-color-on-surface, #1d1b20);
}

.empty-state-text {
  font-size: 0.88rem;
  margin: 0;
  max-width: 22.5rem;
}

/* 6. Metric Cards Grid */
.metric-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.75rem, 1fr));
  gap: 1.25rem;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--md-sys-shape-corner-large, 1rem);
  background-color: var(--md-sys-color-surface, #fff);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, #cac4d0);
  box-shadow: var(--md-sys-elevation-1, 0 0.0625rem 0.25rem rgba(0, 0, 0, 0.05));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-0.125rem);
  box-shadow: var(--md-sys-elevation-2, 0 0.1875rem 0.5rem rgba(0, 0, 0, 0.08));
}

.metric-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--md-sys-shape-corner-medium, 0.75rem);
  background-color: var(--md-sys-color-primary-container, #eaddff);
  color: var(--md-sys-color-on-primary-container, #21005d);
  flex-shrink: 0;
}

.metric-card-icon .material-symbols-rounded {
  font-size: 1.75rem;
}

.metric-card-content {
  display: flex;
  flex-direction: column;
}

.metric-card-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface, #1d1b20);
  line-height: 1.2;
}

.metric-card-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  margin-top: 0.15rem;
}

/* 7. Alerts & Status Notice Banners */
.status-flow-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  border-radius: var(--md-sys-shape-corner-medium, 0.75rem);
  background-color: var(--md-sys-color-surface-container, #f3edf7);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  border-left: 0.25rem solid var(--md-sys-color-primary, #6750a4);
  color: var(--md-sys-color-on-surface, #1d1b20);
  font-size: 0.875rem;
  line-height: 1.5;
  box-sizing: border-box;
  transition: background-color 0.22s cubic-bezier(0.2, 0, 0, 1),
    border-color 0.22s cubic-bezier(0.2, 0, 0, 1),
    color 0.22s cubic-bezier(0.2, 0, 0, 1);
}

.status-flow-notice .notice-icon,
.status-flow-notice>.material-symbols-rounded {
  font-size: 1.4rem;
  color: var(--md-sys-color-primary, #6750a4);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.status-flow-notice strong {
  color: var(--md-sys-color-on-surface, #1d1b20);
  font-weight: 600;
}

.status-flow-notice em {
  font-style: italic;
}

/* Status Notice Semantic Modifier Variants */
.status-flow-notice.notice-primary {
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  border-color: var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  border-left-color: var(--md-sys-color-primary, #6750a4);
  color: var(--md-sys-color-on-surface, #1d1b20);
}

.status-flow-notice.notice-primary .notice-icon {
  color: var(--md-sys-color-primary, #6750a4);
}

.status-flow-notice.notice-info {
  background-color: var(--md-sys-color-surface-container-low, #f7f2fa);
  border-color: var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  border-left-color: var(--md-sys-color-secondary, #625b71);
  color: var(--md-sys-color-on-surface, #1d1b20);
}

.status-flow-notice.notice-info .notice-icon {
  color: var(--md-sys-color-secondary, #625b71);
}

.status-flow-notice.notice-warning {
  background-color: var(--md-sys-color-tertiary-container, #ffd8e4);
  border-color: var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  border-left-color: var(--md-sys-color-tertiary, #7d5260);
  color: var(--md-sys-color-on-tertiary-container, #31111d);
}

.status-flow-notice.notice-warning .notice-icon,
.status-flow-notice.notice-warning strong {
  color: var(--md-sys-color-on-tertiary-container, #31111d);
}

.status-flow-notice.notice-locked,
.status-flow-notice.notice-error {
  background-color: var(--md-sys-color-error-container, #f9dedc);
  border-color: var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  border-left-color: var(--md-sys-color-error, #b3261e);
  color: var(--md-sys-color-on-error-container, #410e0b);
}

.status-flow-notice.notice-locked .notice-icon,
.status-flow-notice.notice-error .notice-icon,
.status-flow-notice.notice-locked strong,
.status-flow-notice.notice-error strong {
  color: var(--md-sys-color-error, #b3261e);
}

.status-flow-notice.notice-success {
  background-color: var(--md-sys-color-surface-container, #f3edf7);
  border-color: var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  border-left-color: #16a34a;
  color: var(--md-sys-color-on-surface, #1d1b20);
}

.status-flow-notice.notice-success .notice-icon {
  color: #16a34a;
}

.alert {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.15rem;
  border-radius: var(--md-sys-shape-corner-medium, 0.75rem);
  font-size: 0.88rem;
  line-height: 1.4;
  box-sizing: border-box;
  margin-bottom: 1.25rem;
}

.alert-success {
  background-color: var(--md-sys-color-primary-container, #dcfce7);
  color: var(--md-sys-color-on-primary-container, #166534);
  border: 0.0625rem solid var(--md-sys-color-primary, #166534);
}

.alert-error {
  background-color: var(--md-sys-color-error-container, #fee2e2);
  color: var(--md-sys-color-on-error-container, #ba1a1a);
  border: 0.0625rem solid #fecaca;
}

.alert-warning {
  background-color: var(--md-sys-color-tertiary-container, #ffd8e4);
  color: var(--md-sys-color-on-tertiary-container, #31111d);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.1));
}

.alert-info {
  background-color: var(--md-sys-color-surface-container-high, #dbeafe);
  color: var(--md-sys-color-on-surface, #1e40af);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, #bfdbfe);
}

/* ==========================================================================
   8. Unified Dashboard Navigation Tab Bar (Superadmin, Guest, Admin, Operator)
   ========================================================================== */
.dashboard-tabs-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 1.75rem;
  border-bottom: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  box-sizing: border-box;
}

.dashboard-tab-bar,
.superadmin-tab-bar,
.guest-tab-bar,
.admin-tabs,
.operator-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  /* Fixes vertical overflow & scrollbar */
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  border-bottom: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  margin-bottom: 1.75rem;
  padding-bottom: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

.dashboard-tabs-container .dashboard-tab-bar,
.dashboard-tabs-container .superadmin-tab-bar,
.dashboard-tabs-container .guest-tab-bar,
.dashboard-tabs-container .admin-tabs,
.dashboard-tabs-container .operator-tabs {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0 !important;
  border-bottom: none !important;
}

.dashboard-tab-bar::-webkit-scrollbar,
.superadmin-tab-bar::-webkit-scrollbar,
.guest-tab-bar::-webkit-scrollbar,
.admin-tabs::-webkit-scrollbar,
.operator-tabs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* Tab Bar Overflow Scroll Controls (Left & Right Arrows) */
.tab-scroll-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  min-width: 2.125rem;
  padding: 0;
  margin: 0 0.35rem 0.15rem 0.35rem;
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  border-radius: 50%;
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  color: var(--md-sys-color-on-surface, #1d1b20);
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.18s cubic-bezier(0.2, 0, 0, 1),
    color 0.18s cubic-bezier(0.2, 0, 0, 1),
    border-color 0.18s cubic-bezier(0.2, 0, 0, 1),
    opacity 0.18s ease,
    transform 0.18s cubic-bezier(0.2, 0, 0, 1),
    box-shadow 0.18s cubic-bezier(0.2, 0, 0, 1);
  box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  align-self: center;
  user-select: none;
}

.tab-scroll-btn.is-visible {
  display: inline-flex !important;
}

.tab-scroll-btn:hover:not(:disabled) {
  background-color: var(--md-sys-color-primary, #6750a4);
  color: var(--md-sys-color-on-primary, #ffffff);
  border-color: var(--md-sys-color-primary, #6750a4);
  transform: scale(1.06);
  box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.16);
}

.tab-scroll-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  background-color: var(--md-sys-color-surface-container-low, #f7f2fa);
  border-color: var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08));
  color: var(--md-sys-color-on-surface-variant, #49454f);
}

.tab-scroll-btn .material-symbols-rounded {
  font-size: 1.35rem;
  line-height: 1;
}

/* Dark mode overrides for tab scroll buttons & container */
[data-theme="dark"] .dashboard-tabs-container {
  border-bottom-color: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.12));
}

[data-theme="dark"] .tab-scroll-btn {
  background-color: var(--md-sys-color-surface-container-high, #2b2930);
  color: var(--md-sys-color-on-surface, #e6e1e5);
  border-color: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.15));
}

[data-theme="dark"] .tab-scroll-btn:hover:not(:disabled) {
  background-color: var(--md-sys-color-primary, #d0bcff);
  color: var(--md-sys-color-on-primary, #381e72);
  border-color: var(--md-sys-color-primary, #d0bcff);
}

[data-theme="dark"] .tab-scroll-btn:disabled {
  background-color: var(--md-sys-color-surface-container-low, #1d1b20);
  border-color: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.08));
  color: var(--md-sys-color-on-surface-variant, #938f99);
}

.dashboard-tab-btn,
.tab-btn,
.guest-tab-btn,
.admin-tab-btn,
.operator-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.35rem;
  border: none;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  text-decoration: none !important;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 0.1875rem solid transparent;
  margin-bottom: 0;
  /* Zero negative margin to prevent vertical overflow */
  box-sizing: border-box;
  transition: color 0.2s cubic-bezier(0.2, 0, 0, 1),
    background-color 0.2s cubic-bezier(0.2, 0, 0, 1),
    border-color 0.2s cubic-bezier(0.2, 0, 0, 1);
  white-space: nowrap;
  flex-shrink: 0;
}

.dashboard-tab-btn:hover,
.tab-btn:hover,
.guest-tab-btn:hover,
.admin-tab-btn:hover,
.operator-tab-btn:hover {
  color: var(--md-sys-color-primary, #6750a4);
  background-color: var(--md-sys-color-surface-container-high, rgba(103, 80, 164, 0.08));
  border-radius: var(--md-sys-shape-corner-small, 0.5rem) var(--md-sys-shape-corner-small, 0.5rem) 0 0;
}

.dashboard-tab-btn.is-active,
.tab-btn.is-active,
.guest-tab-btn.is-active,
.admin-tab-btn.is-active,
.operator-tab-btn.is-active {
  color: var(--md-sys-color-primary, #6750a4);
  border-bottom-color: var(--md-sys-color-primary, #6750a4);
}

.dashboard-tab-btn .material-symbols-rounded,
.tab-btn .material-symbols-rounded,
.guest-tab-btn .material-symbols-rounded,
.admin-tab-btn .material-symbols-rounded,
.operator-tab-btn .material-symbols-rounded {
  font-size: 1.25rem;
}

.tab-pill,
.tab-counter {
  background: var(--md-sys-color-surface-container-highest, #e6e0e9);
  color: var(--md-sys-color-on-surface, #1d1b20);
  padding: 0.15rem 0.55rem;
  border-radius: var(--md-sys-shape-corner-medium, 0.75rem);
  font-size: 0.75rem;
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.dashboard-tab-btn.is-active .tab-pill,
.dashboard-tab-btn.is-active .tab-counter,
.tab-btn.is-active .tab-pill,
.tab-btn.is-active .tab-counter,
.guest-tab-btn.is-active .tab-counter,
.admin-tab-btn.is-active .tab-counter,
.operator-tab-btn.is-active .tab-counter {
  background: var(--md-sys-color-primary, #6750a4);
  color: var(--md-sys-color-on-primary, #ffffff);
}

/* ==========================================================================
   Material Design 3 Theme System (Dark, Light, and System Modes)
   ========================================================================== */

:root[data-theme-resolved="dark"],
:root[data-theme="dark"],
:root.theme-dark {
  color-scheme: dark;

  /* MD3 Dark Theme Color Palette */
  --md-sys-color-primary: #d0bcff;
  --md-sys-color-on-primary: #381e72;
  --md-sys-color-primary-container: #4f378b;
  --md-sys-color-on-primary-container: #eaddff;

  --md-sys-color-secondary: #ccc2dc;
  --md-sys-color-on-secondary: #332d41;
  --md-sys-color-secondary-container: #4a4458;
  --md-sys-color-on-secondary-container: #e8def8;

  --md-sys-color-tertiary: #efb8c8;
  --md-sys-color-on-tertiary: #492532;
  --md-sys-color-tertiary-container: #633b48;
  --md-sys-color-on-tertiary-container: #ffd8e4;

  --md-sys-color-error: #ffb4ab;
  --md-sys-color-on-error: #690005;
  --md-sys-color-error-container: #93000a;
  --md-sys-color-on-error-container: #ffdad6;

  --md-sys-color-surface: #141218;
  --md-sys-color-surface-dim: #141218;
  --md-sys-color-surface-bright: #3b383e;
  --md-sys-color-surface-container-lowest: #0f0d13;
  --md-sys-color-surface-container-low: #1d1b20;
  --md-sys-color-surface-container: #211f26;
  --md-sys-color-surface-container-high: #2b2930;
  --md-sys-color-surface-container-highest: #36343b;
  --md-sys-color-on-surface: #e6e1e5;
  --md-sys-color-on-surface-variant: #cac4d0;
  --md-sys-color-outline: #938f99;
  --md-sys-color-outline-variant: #49454f;

  --md-sys-color-background: #141218;
  --md-sys-color-on-background: #e6e1e5;

  --md-sys-color-inverse-surface: #e6e1e5;
  --md-sys-color-inverse-on-surface: #313033;
  --md-sys-color-inverse-primary: #6750a4;
  --md-sys-color-shadow: #000000;
  --md-sys-color-scrim: #000000;

  /* Standard Data-Table Design Tokens (Dark Mode) */
  --dt-th-bg: var(--md-sys-color-surface-container-low, #1d1b20);
  --dt-th-color: var(--md-sys-color-on-surface-variant, #cac4d0);
  --dt-th-border: var(--md-sys-color-outline-variant, #49454f);
  --dt-th-font-size: 0.75rem;
  --dt-th-font-weight: 700;
  --dt-th-padding: 0.65rem 0.75rem;
  --dt-td-padding: 0.75rem 0.85rem;
  --dt-td-border: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.08));
  --dt-row-hover-bg: var(--md-sys-color-surface-container-lowest, #0f0d13);
  --dt-checkbox-accent: var(--md-sys-color-primary, #d0bcff);
}

/* Forced Light Mode override (when OS prefers dark but user chose light) */
:root[data-theme-resolved="light"],
:root[data-theme="light"] {
  color-scheme: light;

  --md-sys-color-primary: #6750A4;
  --md-sys-color-on-primary: #FFFFFF;
  --md-sys-color-primary-container: #EADDFF;
  --md-sys-color-on-primary-container: #21005D;

  --md-sys-color-secondary: #625B71;
  --md-sys-color-on-secondary: #FFFFFF;
  --md-sys-color-secondary-container: #E8DEF8;
  --md-sys-color-on-secondary-container: #1D192B;

  --md-sys-color-tertiary: #7D5260;
  --md-sys-color-on-tertiary: #FFFFFF;
  --md-sys-color-tertiary-container: #FFD8E4;
  --md-sys-color-on-tertiary-container: #31111D;

  --md-sys-color-error: #B3261E;
  --md-sys-color-on-error: #FFFFFF;
  --md-sys-color-error-container: #F9DEDC;
  --md-sys-color-on-error-container: #410E0B;

  --md-sys-color-surface: #FFFBFE;
  --md-sys-color-surface-dim: #DED8E1;
  --md-sys-color-surface-bright: #FFFBFE;
  --md-sys-color-surface-container-lowest: #FFFFFF;
  --md-sys-color-surface-container-low: #F7F2FA;
  --md-sys-color-surface-container: #F3EDF7;
  --md-sys-color-surface-container-high: #ECE6F0;
  --md-sys-color-surface-container-highest: #E6E0E9;
  --md-sys-color-on-surface: #1C1B1F;
  --md-sys-color-on-surface-variant: #49454F;
  --md-sys-color-outline: #79747E;
  --md-sys-color-outline-variant: #CAC4D0;

  --md-sys-color-background: #FFFBFE;
  --md-sys-color-on-background: #1C1B1F;

  --md-sys-color-inverse-surface: #313033;
  --md-sys-color-inverse-on-surface: #F4EFF4;
  --md-sys-color-inverse-primary: #D0BCFF;

  /* Standard Data-Table Design Tokens (Light Mode) */
  --dt-th-bg: var(--md-sys-color-surface-container-low, #F7F2FA);
  --dt-th-color: var(--md-sys-color-on-surface-variant, #49454F);
  --dt-th-border: var(--md-sys-color-outline-variant, #CAC4D0);
  --dt-th-font-size: 0.75rem;
  --dt-th-font-weight: 700;
  --dt-th-padding: 0.65rem 0.75rem;
  --dt-td-padding: 0.75rem 0.85rem;
  --dt-td-border: var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08));
  --dt-row-hover-bg: var(--md-sys-color-surface-container-lowest, #F9F6FD);
  --dt-checkbox-accent: var(--md-sys-color-primary, #6750A4);
}

/* Base Body Transition for smooth theme switching */
body {
  transition: background-color 0.22s cubic-bezier(0.2, 0, 0, 1),
    color 0.22s cubic-bezier(0.2, 0, 0, 1);
}

.header-app-bar,
.nav-drawer-panel,
.md-menu,
.user-dropdown-menu,
.categorized-menu,
.md-dialog-surface,
.data-card,
.table-container {
  transition: background-color 0.22s cubic-bezier(0.2, 0, 0, 1),
    border-color 0.22s cubic-bezier(0.2, 0, 0, 1),
    color 0.22s cubic-bezier(0.2, 0, 0, 1),
    box-shadow 0.22s cubic-bezier(0.2, 0, 0, 1);
}

/* ==========================================================================
   Material Theme Cycle Button & Status Indicator
   ========================================================================== */
.theme-cycle-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: visible !important;
}

.theme-cycle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--md-sys-shape-corner-full, 9999rem);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  color: var(--md-sys-color-primary, #6750a4);
  cursor: pointer;
  position: relative;
  user-select: none;
  padding: 0;
  transition: background-color 0.2s cubic-bezier(0.2, 0, 0, 1),
    color 0.2s cubic-bezier(0.2, 0, 0, 1),
    border-color 0.2s cubic-bezier(0.2, 0, 0, 1),
    transform 0.15s cubic-bezier(0.2, 0, 0, 1),
    box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.theme-cycle-btn:hover {
  background-color: var(--md-sys-color-primary-container, #eaddff);
  color: var(--md-sys-color-on-primary-container, #21005d);
  border-color: var(--md-sys-color-outline, #79747e);
  transform: translateY(-0.0625rem);
  box-shadow: var(--md-sys-elevation-1, 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.12));
}

.theme-cycle-btn:active {
  transform: scale(0.92);
}

.theme-cycle-btn:focus-visible {
  outline: 0.125rem solid var(--md-sys-color-primary, #6750a4);
  outline-offset: 0.125rem;
}

.theme-cycle-icon {
  font-size: 1.35rem !important;
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1),
    opacity 0.2s cubic-bezier(0.2, 0, 0, 1);
}

/* Icon rotation on click animation */
.theme-cycle-btn.is-animating .theme-cycle-icon {
  transform: rotate(360deg) scale(0.7);
  opacity: 0.4;
}

/* Floating MD3 Theme Status Toast / Pill */
.theme-status-toast {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%) translateY(-0.25rem);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  background-color: var(--md-sys-color-inverse-surface, #313033);
  color: var(--md-sys-color-inverse-on-surface, #f4eff4);
  border-radius: var(--md-sys-shape-corner-full, 9999rem);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: var(--md-sys-elevation-2, 0 0.1875rem 0.375rem rgba(0, 0, 0, 0.2));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 10001;
  transition: opacity 0.2s cubic-bezier(0.2, 0, 0, 1),
    transform 0.2s cubic-bezier(0.2, 0, 0, 1),
    visibility 0.2s;
}

.theme-status-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.theme-status-toast-icon {
  font-size: 0.95rem !important;
}

/* Drawer theme switch item (Mobile) */
.drawer-theme-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  border-radius: var(--md-sys-shape-corner-medium, 0.75rem);
  background-color: var(--md-sys-color-surface-container, #f3edf7);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.1));
}

.drawer-theme-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.drawer-theme-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--md-sys-color-on-surface, #1d1b20);
}

.drawer-theme-current {
  font-size: 0.75rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
}

/* ==========================================================================
   Material 3 Universal Full-Page Loading Overlay
   (Available across all system views)
   ========================================================================== */
.md-fullpage-loader {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.28s;
}

.md-fullpage-loader.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.md-fullpage-loader-scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(0.5rem);
  -webkit-backdrop-filter: blur(0.5rem);
}

.md-fullpage-loader-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.25rem 2.75rem;
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  color: var(--md-sys-color-on-surface, #1d1b20);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(121, 116, 126, 0.25));
  border-radius: var(--md-sys-shape-corner-extra-large, 1.75rem);
  box-shadow: var(--md-sys-elevation-4, 0 0.875rem 1.75rem rgba(0, 0, 0, 0.25), 0 0.625rem 0.625rem rgba(0, 0, 0, 0.22));
  max-width: 90vw;
  width: 26rem;
  transform: scale(0.9) translateY(0.75rem);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.md-fullpage-loader.is-active .md-fullpage-loader-card {
  transform: scale(1) translateY(0);
}

.md-circular-progress {
  position: relative;
  width: 4rem;
  height: 4rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.md-spinner-svg {
  width: 100%;
  height: 100%;
  animation: md-spinner-rotate 1.6s linear infinite;
}

.md-spinner-track {
  stroke: var(--md-sys-color-surface-container-highest, rgba(103, 80, 164, 0.12));
}

.md-spinner-circle {
  stroke: var(--md-sys-color-primary, #6750a4);
  stroke-linecap: round;
  stroke-dasharray: 125;
  stroke-dashoffset: 125;
  animation: md-spinner-dash 1.4s ease-in-out infinite;
}

.md-spinner-center-icon {
  position: absolute;
  font-size: 1.5rem;
  color: var(--md-sys-color-primary, #6750a4);
  animation: spin 3s linear infinite;
}

@keyframes md-spinner-rotate {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes md-spinner-dash {
  0% {
    stroke-dashoffset: 120;
    transform: rotate(0deg);
  }

  50% {
    stroke-dashoffset: 35;
    transform: rotate(135deg);
  }

  100% {
    stroke-dashoffset: 120;
    transform: rotate(450deg);
  }
}

.spin {
  animation: spin 1s infinite linear;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.md-fullpage-loader-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface, #1d1b20);
  letter-spacing: -0.01em;
}

.md-fullpage-loader-message {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--md-sys-color-on-surface-variant, #49454f);
}

/* Dark Mode Overrides for Full-Page Loader */
@media (prefers-color-scheme: dark) {
  .md-fullpage-loader-scrim {
    background: rgba(0, 0, 0, 0.72);
  }

  .md-fullpage-loader-card {
    background-color: var(--md-sys-color-surface-container-high, #2b2930);
    color: var(--md-sys-color-on-surface, #e6e1e5);
    border-color: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.15));
    box-shadow: 0 1rem 2.25rem rgba(0, 0, 0, 0.55);
  }

  .md-fullpage-loader-title {
    color: var(--md-sys-color-on-surface, #e6e1e5);
  }

  .md-fullpage-loader-message {
    color: var(--md-sys-color-on-surface-variant, #cac4d0);
  }

  .md-spinner-circle,
  .md-spinner-center-icon {
    color: var(--md-sys-color-primary, #d0bcff);
    stroke: var(--md-sys-color-primary, #d0bcff);
  }
}

[data-theme="dark"] .md-fullpage-loader-scrim {
  background: rgba(0, 0, 0, 0.72);
}

[data-theme="dark"] .md-fullpage-loader-card {
  background-color: var(--md-sys-color-surface-container-high, #2b2930);
  color: var(--md-sys-color-on-surface, #e6e1e5);
  border-color: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.15));
  box-shadow: 0 1rem 2.25rem rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .md-fullpage-loader-title {
  color: var(--md-sys-color-on-surface, #e6e1e5);
}

[data-theme="dark"] .md-fullpage-loader-message {
  color: var(--md-sys-color-on-surface-variant, #cac4d0);
}

/* ==========================================================================
   Material Design 3 (MD3) Universal Checkbox Component
   ========================================================================== */
input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  margin: 0;
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  min-height: 1.25rem;
  border: 0.125rem solid var(--md-sys-color-outline, #79747e);
  border-radius: var(--md-sys-shape-corner-extra-small, 0.25rem);
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 0.85rem 0.85rem;
  display: inline-block;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  transition: background-color 0.18s cubic-bezier(0.2, 0, 0, 1),
    border-color 0.18s cubic-bezier(0.2, 0, 0, 1),
    box-shadow 0.18s cubic-bezier(0.2, 0, 0, 1);
  box-sizing: border-box;
  flex-shrink: 0;
}

/* Remove pseudo-elements on input as replaced elements don't reliably support them */
input[type="checkbox"]::before,
input[type="checkbox"]::after {
  content: none !important;
  display: none !important;
}

/* Checkbox Hover State */
input[type="checkbox"]:hover:not(:disabled) {
  border-color: var(--md-sys-color-on-surface, #1d1b20);
  box-shadow: 0 0 0 0.45rem rgba(103, 80, 164, 0.08);
}

/* Checkbox Focus Visible */
input[type="checkbox"]:focus-visible {
  outline: none;
  border-color: var(--md-sys-color-primary, #6750a4);
  box-shadow: 0 0 0 0.5rem rgba(103, 80, 164, 0.18);
}

/* Checked State with crisp white Checkmark SVG */
input[type="checkbox"]:checked {
  background-color: var(--md-sys-color-primary, #6750a4);
  border-color: var(--md-sys-color-primary, #6750a4);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.6' d='m4.5 10.5 4 4 7-8'/%3E%3C/svg%3E");
}

input[type="checkbox"]:checked:hover:not(:disabled) {
  background-color: var(--md-sys-color-primary, #6750a4);
  border-color: var(--md-sys-color-primary, #6750a4);
  box-shadow: 0 0 0 0.45rem rgba(103, 80, 164, 0.12);
}

/* Indeterminate State (Intermediate Horizontal Dash SVG) */
input[type="checkbox"]:indeterminate {
  background-color: var(--md-sys-color-primary, #6750a4);
  border-color: var(--md-sys-color-primary, #6750a4);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3.2' d='M4.5 10h11'/%3E%3C/svg%3E");
}

input[type="checkbox"]:indeterminate:hover:not(:disabled) {
  background-color: var(--md-sys-color-primary, #6750a4);
  border-color: var(--md-sys-color-primary, #6750a4);
  box-shadow: 0 0 0 0.45rem rgba(103, 80, 164, 0.12);
}

/* Disabled State */
input[type="checkbox"]:disabled {
  border-color: var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.2));
  background-color: var(--md-sys-color-surface-container-highest, rgba(0, 0, 0, 0.05));
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none !important;
}

input[type="checkbox"]:checked:disabled {
  background-color: var(--md-sys-color-outline, #79747e);
  border-color: var(--md-sys-color-outline, #79747e);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.6' d='m4.5 10.5 4 4 7-8'/%3E%3C/svg%3E");
}

input[type="checkbox"]:indeterminate:disabled {
  background-color: var(--md-sys-color-outline, #79747e);
  border-color: var(--md-sys-color-outline, #79747e);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3.2' d='M4.5 10h11'/%3E%3C/svg%3E");
}

/* Dark Theme Checkbox Overrides */
[data-theme="dark"] input[type="checkbox"],
[data-theme-resolved="dark"] input[type="checkbox"],
.theme-dark input[type="checkbox"] {
  border-color: var(--md-sys-color-outline, #938f99);
}

[data-theme="dark"] input[type="checkbox"]:hover:not(:disabled),
[data-theme-resolved="dark"] input[type="checkbox"]:hover:not(:disabled),
.theme-dark input[type="checkbox"]:hover:not(:disabled) {
  border-color: var(--md-sys-color-on-surface, #e6e1e5);
  box-shadow: 0 0 0 0.45rem rgba(208, 188, 255, 0.12);
}

[data-theme="dark"] input[type="checkbox"]:focus-visible,
[data-theme-resolved="dark"] input[type="checkbox"]:focus-visible,
.theme-dark input[type="checkbox"]:focus-visible {
  border-color: var(--md-sys-color-primary, #d0bcff);
  box-shadow: 0 0 0 0.5rem rgba(208, 188, 255, 0.22);
}

[data-theme="dark"] input[type="checkbox"]:checked,
[data-theme-resolved="dark"] input[type="checkbox"]:checked,
.theme-dark input[type="checkbox"]:checked {
  background-color: var(--md-sys-color-primary, #d0bcff);
  border-color: var(--md-sys-color-primary, #d0bcff);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath stroke='%23381e72' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.6' d='m4.5 10.5 4 4 7-8'/%3E%3C/svg%3E");
}

[data-theme="dark"] input[type="checkbox"]:indeterminate,
[data-theme-resolved="dark"] input[type="checkbox"]:indeterminate,
.theme-dark input[type="checkbox"]:indeterminate {
  background-color: var(--md-sys-color-primary, #d0bcff);
  border-color: var(--md-sys-color-primary, #d0bcff);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath stroke='%23381e72' stroke-linecap='round' stroke-linejoin='round' stroke-width='3.2' d='M4.5 10h11'/%3E%3C/svg%3E");
}

[data-theme="dark"] input[type="checkbox"]:checked:disabled,
[data-theme-resolved="dark"] input[type="checkbox"]:checked:disabled,
.theme-dark input[type="checkbox"]:checked:disabled {
  background-color: var(--md-sys-color-outline, #938f99);
  border-color: var(--md-sys-color-outline, #938f99);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath stroke='%23381e72' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.6' d='m4.5 10.5 4 4 7-8'/%3E%3C/svg%3E");
}

[data-theme="dark"] input[type="checkbox"]:indeterminate:disabled,
[data-theme-resolved="dark"] input[type="checkbox"]:indeterminate:disabled,
.theme-dark input[type="checkbox"]:indeterminate:disabled {
  background-color: var(--md-sys-color-outline, #938f99);
  border-color: var(--md-sys-color-outline, #938f99);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath stroke='%23381e72' stroke-linecap='round' stroke-linejoin='round' stroke-width='3.2' d='M4.5 10h11'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Card 3-Dot More Action Button & Mobile Selection Toolbar
   ========================================================================== */
.card-more-menu-wrapper {
  display: none !important;
}

.mobile-table-selection-bar {
  display: none !important;
}

@media (min-width: 64.0625rem) {

  .card-more-menu-wrapper,
  .card-more-btn {
    display: none !important;
  }
}

@media (max-width: 64rem) {

  .card-more-menu-wrapper {
    display: inline-flex !important;
    position: absolute !important;
    top: 0.35rem !important;
    right: 0.45rem !important;
    z-index: 10 !important;
  }

  /* Enlarged touch target 3-dot button: 44px display with 48px hit area */
  .card-more-btn {
    position: relative;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border-radius: var(--md-sys-shape-corner-full, 50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--md-sys-color-on-surface-variant, #49454f);
    cursor: pointer;
    transition: background-color 0.18s cubic-bezier(0.2, 0, 0, 1), color 0.18s cubic-bezier(0.2, 0, 0, 1), transform 0.12s ease;
    user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
  }

  /* Extended 48x48px hit area via pseudo element */
  .card-more-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3rem;
    height: 3rem;
    transform: translate(-50%, -50%);
    pointer-events: auto;
  }

  .card-more-btn:hover,
  .card-more-btn:focus-visible {
    background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
    color: var(--md-sys-color-primary, #6750a4);
  }

  .card-more-btn:active {
    transform: scale(0.92);
    background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
  }

  .card-more-btn .material-symbols-rounded {
    font-size: 1.45rem;
    pointer-events: none;
  }

  .mobile-table-selection-bar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.75rem 1rem !important;
    margin-bottom: 0.85rem !important;
    background-color: var(--md-sys-color-surface-container, #f3edf7) !important;
    border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12)) !important;
    border-radius: var(--md-sys-shape-corner-medium, 0.75rem) !important;
    box-sizing: border-box !important;
    gap: 0.75rem !important;
  }

  .mobile-select-all-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: var(--md-sys-color-on-surface, #1d1b20) !important;
    cursor: pointer !important;
    user-select: none !important;
  }

  .mobile-selection-status {
    font-size: 0.775rem !important;
    font-weight: 700 !important;
    padding: 0.25rem 0.65rem !important;
    border-radius: var(--md-sys-shape-corner-full, 1rem) !important;
    background-color: var(--md-sys-color-primary-container, #eaddff) !important;
    color: var(--md-sys-color-on-primary-container, #21005d) !important;
    white-space: nowrap !important;
  }
}

/* ==========================================================================
   Material Design 3 (MD3) Reusable Slide-Up Bottom Sheet Drawer
   ========================================================================== */
body.md3-bottom-sheet-open {
  overflow: hidden !important;
  touch-action: none;
}

.md3-bottom-sheet-scrim {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(0.125rem);
  -webkit-backdrop-filter: blur(0.125rem);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.2, 0, 0, 1);
}

.md3-bottom-sheet-scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Universal MD3 Action Sheet Base:
   Mobile (<= 64rem): Slide-Up Bottom Sheet
   Desktop (> 64rem): Slide-Over Full-Height Right Side Sheet
*/
.md3-bottom-sheet {
  position: fixed;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  background-color: var(--md-sys-color-surface-container-low, #f7f2fa);
  color: var(--md-sys-color-on-surface, #1d1b20);
  box-sizing: border-box;
  outline: none;
}

@media (max-width: 64rem) {
  .md3-bottom-sheet {
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    max-width: 36rem;
    margin: 0 auto;
    max-height: 85vh;
    border-radius: 1.75rem 1.75rem 0 0;
    border-top: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08));
    border-left: none;
    box-shadow: 0 -0.5rem 2rem rgba(0, 0, 0, 0.18), 0 -0.125rem 0.5rem rgba(0, 0, 0, 0.08);
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.1, 0.9, 0.2, 1);
    padding-bottom: env(safe-area-inset-bottom, 0.75rem);
  }

  .md3-bottom-sheet.is-open {
    transform: translateY(0);
  }
}

@media (min-width: 64.0625rem) {
  .md3-bottom-sheet {
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: 25.5rem;
    max-width: calc(100vw - 3rem);
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    border-radius: 1.5rem 0 0 1.5rem;
    border-left: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
    border-top: none;
    box-shadow: -0.5rem 0 2rem rgba(0, 0, 0, 0.16), -0.125rem 0 0.5rem rgba(0, 0, 0, 0.06);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
  }

  .md3-bottom-sheet.is-open {
    transform: translateX(0);
  }

  /* Drag handle bar is not used on desktop */
  .md3-bottom-sheet-handle-bar {
    display: none !important;
  }

  .md3-bottom-sheet-header {
    padding: 1.25rem 1.5rem 1rem !important;
  }

  .md3-bottom-sheet-content {
    max-height: none !important;
    flex: 1 !important;
    padding: 0.75rem 1.15rem !important;
  }

  .md3-bottom-sheet-footer {
    padding: 0.85rem 1.25rem 1.15rem !important;
  }
}

/* Drag handle bar at top of drawer */
.md3-bottom-sheet-handle-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 0 0.35rem;
  cursor: grab;
  touch-action: none;
  user-select: none;
  flex-shrink: 0;
}

.md3-bottom-sheet-drag-handle {
  width: 2.25rem;
  height: 0.25rem;
  border-radius: 0.125rem;
  background-color: var(--md-sys-color-on-surface-variant, #79747e);
  opacity: 0.38;
  transition: opacity 0.2s ease, width 0.2s ease;
}

.md3-bottom-sheet-handle-bar:hover .md3-bottom-sheet-drag-handle,
.md3-bottom-sheet-handle-bar:active .md3-bottom-sheet-drag-handle {
  opacity: 0.7;
  width: 2.75rem;
}

/* Header with record title, subtitle and close button */
.md3-bottom-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.25rem 0.75rem;
  border-bottom: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08));
  flex-shrink: 0;
}

.md3-bottom-sheet-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow: hidden;
  padding-right: 0.75rem;
}

.md3-bottom-sheet-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--md-sys-color-on-surface, #1d1b20);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.md3-bottom-sheet-subtitle {
  margin: 0;
  font-size: 0.825rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  /*   white-space: nowrap; 
  overflow: hidden;
  text-overflow: ellipsis; */
}

.md3-bottom-sheet-close-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--md-sys-shape-corner-full, 50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  cursor: pointer;
  padding: 0;
  transition: background-color 0.18s ease, color 0.18s ease;
  flex-shrink: 0;
}

.md3-bottom-sheet-close-btn:hover,
.md3-bottom-sheet-close-btn:focus-visible {
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
  color: var(--md-sys-color-on-surface, #1d1b20);
}

.md3-bottom-sheet-close-btn .material-symbols-rounded {
  font-size: 1.35rem;
}

/* Scrollable list of actions */
.md3-bottom-sheet-content {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.75rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  max-height: 55vh;
  gap: 0.25rem;
}

/* Action Sheet Groups */
.md3-sheet-group {
  margin-bottom: 0.75rem;
}

.md3-sheet-group-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem 0.35rem;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  border-bottom: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08));
  margin-bottom: 0.35rem;
}

.md3-sheet-group-icon {
  font-size: 1.15rem !important;
  color: inherit;
  opacity: 0.85;
}

.md3-sheet-group-title {
  flex: 1;
}

.md3-sheet-group.is-danger .md3-sheet-group-header {
  color: var(--md-sys-color-error, #ba1a1a);
  border-bottom-color: rgba(186, 26, 26, 0.2);
}

.md3-sheet-group.is-danger .md3-sheet-group-icon {
  color: var(--md-sys-color-error, #ba1a1a);
  opacity: 1;
}

.md3-sheet-group-items {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.md3-bottom-sheet-item {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 0.85rem 1rem;
  min-height: 3.25rem;
  border-radius: var(--md-sys-shape-corner-medium, 0.75rem);
  background: transparent;
  border: none;
  color: var(--md-sys-color-on-surface, #1d1b20);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.15s cubic-bezier(0.2, 0, 0, 1), transform 0.1s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.md3-bottom-sheet-item:hover,
.md3-bottom-sheet-item:focus-visible {
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
  color: var(--md-sys-color-primary, #6750a4);
}

.md3-bottom-sheet-item:active {
  transform: scale(0.98);
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
}

.md3-bottom-sheet-item-icon {
  font-size: 1.45rem !important;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.md3-bottom-sheet-item:hover .md3-bottom-sheet-item-icon,
.md3-bottom-sheet-item:focus-visible .md3-bottom-sheet-item-icon {
  color: inherit;
}

.md3-bottom-sheet-item-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Item semantic modifier color themes */
.md3-bottom-sheet-item.item-danger {
  color: var(--md-sys-color-error, #ba1a1a);
}

.md3-bottom-sheet-item.item-danger .md3-bottom-sheet-item-icon {
  color: var(--md-sys-color-error, #ba1a1a);
}

.md3-bottom-sheet-item.item-danger:hover,
.md3-bottom-sheet-item.item-danger:focus-visible {
  background-color: var(--md-sys-color-error-container, #ffdad6);
  color: var(--md-sys-color-on-error-container, #410002);
}

.md3-bottom-sheet-item.item-danger:hover .md3-bottom-sheet-item-icon,
.md3-bottom-sheet-item.item-danger:focus-visible .md3-bottom-sheet-item-icon {
  color: var(--md-sys-color-on-error-container, #410002);
}

.md3-bottom-sheet-item.item-warning {
  color: #b45309;
}

.md3-bottom-sheet-item.item-warning .md3-bottom-sheet-item-icon {
  color: #b45309;
}

.md3-bottom-sheet-item.item-warning:hover,
.md3-bottom-sheet-item.item-warning:focus-visible {
  background-color: #fef3c7;
  color: #92400e;
}

.md3-bottom-sheet-item.item-warning:hover .md3-bottom-sheet-item-icon,
.md3-bottom-sheet-item.item-warning:focus-visible .md3-bottom-sheet-item-icon {
  color: #92400e;
}

.md3-bottom-sheet-item.item-success {
  color: #15803d;
}

.md3-bottom-sheet-item.item-success .md3-bottom-sheet-item-icon {
  color: #15803d;
}

.md3-bottom-sheet-item.item-success:hover,
.md3-bottom-sheet-item.item-success:focus-visible {
  background-color: #dcfce7;
  color: #14532d;
}

.md3-bottom-sheet-item.item-primary {
  color: var(--md-sys-color-primary, #6750a4);
}

.md3-bottom-sheet-item.item-primary .md3-bottom-sheet-item-icon {
  color: var(--md-sys-color-primary, #6750a4);
}

.md3-bottom-sheet-item.is-selected {
  background-color: var(--md-sys-color-secondary-container, #e8def8);
  color: var(--md-sys-color-on-secondary-container, #1d192b);
  font-weight: 600;
}

.md3-bottom-sheet-item.is-selected .md3-bottom-sheet-item-icon {
  color: var(--md-sys-color-primary, #6750a4);
}

.md3-bottom-sheet-check-icon {
  font-size: 1.25rem !important;
  color: var(--md-sys-color-primary, #6750a4);
  margin-left: auto;
  flex-shrink: 0;
}

/* Footer with Cancel button */
.md3-bottom-sheet-footer {
  padding: 0.65rem 1rem 0.5rem;
  border-top: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08));
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.md3-bottom-sheet-cancel-btn {
  width: 100%;
  padding: 0.75rem 1.25rem;
  min-height: 2.85rem;
  border-radius: var(--md-sys-shape-corner-full, 9999rem);
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  color: var(--md-sys-color-on-surface, #1d1b20);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.1s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.md3-bottom-sheet-cancel-btn:hover,
.md3-bottom-sheet-cancel-btn:focus-visible {
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
  color: var(--md-sys-color-primary, #6750a4);
}

.md3-bottom-sheet-cancel-btn:active {
  transform: scale(0.98);
}

/* Dark Theme Overrides for Card More Button, Bottom Sheet & Mobile Selection Bar */
[data-theme="dark"] .card-more-btn,
[data-theme-resolved="dark"] .card-more-btn,
.theme-dark .card-more-btn {
  color: var(--md-sys-color-on-surface-variant, #cac4d0);
}

[data-theme="dark"] .card-more-btn:hover,
[data-theme="dark"] .card-more-btn:focus-visible,
[data-theme-resolved="dark"] .card-more-btn:hover,
[data-theme-resolved="dark"] .card-more-btn:focus-visible,
.theme-dark .card-more-btn:hover,
.theme-dark .card-more-btn:focus-visible {
  background-color: var(--md-sys-color-surface-container-highest, #36343b);
  color: var(--md-sys-color-primary, #d0bcff);
}

[data-theme="dark"] .card-more-btn:active,
[data-theme-resolved="dark"] .card-more-btn:active,
.theme-dark .card-more-btn:active {
  background-color: var(--md-sys-color-surface-container-highest, #36343b);
}

[data-theme="dark"] .md3-bottom-sheet,
[data-theme-resolved="dark"] .md3-bottom-sheet,
.theme-dark .md3-bottom-sheet {
  background-color: var(--md-sys-color-surface-container-low, #1d1b20);
  color: var(--md-sys-color-on-surface, #e6e1e5);
  border-top-color: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.1));
  box-shadow: 0 -0.5rem 2rem rgba(0, 0, 0, 0.5), 0 -0.125rem 0.5rem rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .md3-bottom-sheet-header,
[data-theme-resolved="dark"] .md3-bottom-sheet-header,
.theme-dark .md3-bottom-sheet-header,
[data-theme="dark"] .md3-bottom-sheet-footer,
[data-theme-resolved="dark"] .md3-bottom-sheet-footer,
.theme-dark .md3-bottom-sheet-footer {
  border-color: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.1));
}

[data-theme="dark"] .md3-bottom-sheet-title,
[data-theme-resolved="dark"] .md3-bottom-sheet-title,
.theme-dark .md3-bottom-sheet-title {
  color: var(--md-sys-color-on-surface, #e6e1e5);
}

[data-theme="dark"] .md3-bottom-sheet-subtitle,
[data-theme-resolved="dark"] .md3-bottom-sheet-subtitle,
.theme-dark .md3-bottom-sheet-subtitle {
  color: var(--md-sys-color-on-surface-variant, #cac4d0);
}

[data-theme="dark"] .md3-bottom-sheet-close-btn,
[data-theme-resolved="dark"] .md3-bottom-sheet-close-btn,
.theme-dark .md3-bottom-sheet-close-btn {
  color: var(--md-sys-color-on-surface-variant, #cac4d0);
}

[data-theme="dark"] .md3-bottom-sheet-close-btn:hover,
[data-theme="dark"] .md3-bottom-sheet-close-btn:focus-visible,
[data-theme-resolved="dark"] .md3-bottom-sheet-close-btn:hover,
[data-theme-resolved="dark"] .md3-bottom-sheet-close-btn:focus-visible,
.theme-dark .md3-bottom-sheet-close-btn:hover,
.theme-dark .md3-bottom-sheet-close-btn:focus-visible {
  background-color: var(--md-sys-color-surface-container-highest, #36343b);
  color: var(--md-sys-color-on-surface, #e6e1e5);
}

[data-theme="dark"] .md3-bottom-sheet-item,
[data-theme-resolved="dark"] .md3-bottom-sheet-item,
.theme-dark .md3-bottom-sheet-item {
  color: var(--md-sys-color-on-surface, #e6e1e5);
}

[data-theme="dark"] .md3-bottom-sheet-item:hover,
[data-theme="dark"] .md3-bottom-sheet-item:focus-visible,
[data-theme-resolved="dark"] .md3-bottom-sheet-item:hover,
[data-theme-resolved="dark"] .md3-bottom-sheet-item:focus-visible,
.theme-dark .md3-bottom-sheet-item:hover,
.theme-dark .md3-bottom-sheet-item:focus-visible {
  background-color: var(--md-sys-color-surface-container-highest, #36343b);
  color: var(--md-sys-color-primary, #d0bcff);
}

[data-theme="dark"] .md3-bottom-sheet-item-icon,
[data-theme-resolved="dark"] .md3-bottom-sheet-item-icon,
.theme-dark .md3-bottom-sheet-item-icon {
  color: var(--md-sys-color-on-surface-variant, #cac4d0);
}

[data-theme="dark"] .md3-bottom-sheet-item.item-danger,
[data-theme-resolved="dark"] .md3-bottom-sheet-item.item-danger,
.theme-dark .md3-bottom-sheet-item.item-danger {
  color: var(--md-sys-color-error, #ffb4ab);
}

[data-theme="dark"] .md3-bottom-sheet-item.item-danger .md3-bottom-sheet-item-icon,
[data-theme-resolved="dark"] .md3-bottom-sheet-item.item-danger .md3-bottom-sheet-item-icon,
.theme-dark .md3-bottom-sheet-item.item-danger .md3-bottom-sheet-item-icon {
  color: var(--md-sys-color-error, #ffb4ab);
}

[data-theme="dark"] .md3-bottom-sheet-item.item-danger:hover,
[data-theme="dark"] .md3-bottom-sheet-item.item-danger:focus-visible,
[data-theme-resolved="dark"] .md3-bottom-sheet-item.item-danger:hover,
[data-theme-resolved="dark"] .md3-bottom-sheet-item.item-danger:focus-visible,
.theme-dark .md3-bottom-sheet-item.item-danger:hover,
.theme-dark .md3-bottom-sheet-item.item-danger:focus-visible {
  background-color: var(--md-sys-color-error-container, #93000a);
  color: var(--md-sys-color-on-error-container, #ffdad6);
}

[data-theme="dark"] .md3-bottom-sheet-item.item-warning,
[data-theme-resolved="dark"] .md3-bottom-sheet-item.item-warning,
.theme-dark .md3-bottom-sheet-item.item-warning {
  color: #fbbf24;
}

[data-theme="dark"] .md3-bottom-sheet-item.item-warning .md3-bottom-sheet-item-icon,
[data-theme-resolved="dark"] .md3-bottom-sheet-item.item-warning .md3-bottom-sheet-item-icon,
.theme-dark .md3-bottom-sheet-item.item-warning .md3-bottom-sheet-item-icon {
  color: #fbbf24;
}

[data-theme="dark"] .md3-bottom-sheet-item.item-warning:hover,
[data-theme="dark"] .md3-bottom-sheet-item.item-warning:focus-visible,
[data-theme-resolved="dark"] .md3-bottom-sheet-item.item-warning:hover,
[data-theme-resolved="dark"] .md3-bottom-sheet-item.item-warning:focus-visible,
.theme-dark .md3-bottom-sheet-item.item-warning:hover,
.theme-dark .md3-bottom-sheet-item.item-warning:focus-visible {
  background-color: rgba(245, 158, 11, 0.18);
  color: #fde68a;
}

[data-theme="dark"] .md3-bottom-sheet-cancel-btn,
[data-theme-resolved="dark"] .md3-bottom-sheet-cancel-btn,
.theme-dark .md3-bottom-sheet-cancel-btn {
  background-color: var(--md-sys-color-surface-container-high, #2b2930);
  border-color: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.12));
  color: var(--md-sys-color-on-surface, #e6e1e5);
}

[data-theme="dark"] .md3-bottom-sheet-cancel-btn:hover,
[data-theme-resolved="dark"] .md3-bottom-sheet-cancel-btn:hover,
.theme-dark .md3-bottom-sheet-cancel-btn:hover {
  background-color: var(--md-sys-color-surface-container-highest, #36343b);
  color: var(--md-sys-color-primary, #d0bcff);
}

/* Dark Theme Overrides for Action Groups & Desktop Side Sheet */
[data-theme="dark"] .md3-sheet-group-header,
[data-theme-resolved="dark"] .md3-sheet-group-header,
.theme-dark .md3-sheet-group-header {
  color: var(--md-sys-color-on-surface-variant, #cac4d0);
  border-bottom-color: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.08));
}

[data-theme="dark"] .md3-sheet-group.is-danger .md3-sheet-group-header,
[data-theme-resolved="dark"] .md3-sheet-group.is-danger .md3-sheet-group-header,
.theme-dark .md3-sheet-group.is-danger .md3-sheet-group-header {
  color: var(--md-sys-color-error, #ffb4ab);
  border-bottom-color: rgba(255, 180, 171, 0.2);
}

@media (min-width: 64.0625rem) {

  [data-theme="dark"] .md3-bottom-sheet,
  [data-theme-resolved="dark"] .md3-bottom-sheet,
  .theme-dark .md3-bottom-sheet {
    border-left-color: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.12));
    border-top: none;
    box-shadow: -0.5rem 0 2rem rgba(0, 0, 0, 0.6), -0.125rem 0 0.5rem rgba(0, 0, 0, 0.35);
  }
}

[data-theme="dark"] .mobile-table-selection-bar,
[data-theme-resolved="dark"] .mobile-table-selection-bar,
.theme-dark .mobile-table-selection-bar {
  background-color: var(--md-sys-color-surface-container, #211f26) !important;
  border-color: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.12)) !important;
}

[data-theme="dark"] .mobile-select-all-label,
[data-theme-resolved="dark"] .mobile-select-all-label,
.theme-dark .mobile-select-all-label {
  color: var(--md-sys-color-on-surface, #e6e1e5) !important;
}

[data-theme="dark"] .mobile-selection-status,
[data-theme-resolved="dark"] .mobile-selection-status,
.theme-dark .mobile-selection-status {
  background-color: var(--md-sys-color-primary-container, #4f378b) !important;
  color: var(--md-sys-color-on-primary-container, #eaddff) !important;
}

/* ==========================================================================
   Common Button-With-Dropdown Component (Material You MD3)
   ========================================================================== */
.md-dropdown-wrapper,
.export-dropdown-wrapper,
.year-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.md-dropdown-btn,
.export-btn,
.export-menu-btn,
.actions-btn,
.year-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  color: var(--md-sys-color-on-surface, #1d1b20);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.15));
  border-radius: var(--md-sys-shape-corner-small, 0.5rem);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.2, 0, 0, 1);
  text-decoration: none !important;
  user-select: none;
  white-space: nowrap;
}

.md-dropdown-btn:hover,
.export-btn:hover,
.export-menu-btn:hover {
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
  color: var(--md-sys-color-primary, #6750a4);
  border-color: var(--md-sys-color-primary, #6750a4);
  box-shadow: var(--md-sys-elevation-1, 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.08));
}

.md-dropdown-btn .dropdown-caret,
.export-btn .dropdown-caret,
.export-menu-btn .dropdown-caret {
  transition: transform 0.2s ease;
  font-size: 1.15rem;
  margin-left: 0.15rem;
}

.md-dropdown-wrapper.is-open .dropdown-caret,
.export-dropdown-wrapper.is-open .dropdown-caret,
.year-dropdown-wrapper.is-open .dropdown-caret {
  transform: rotate(180deg);
}

.md-dropdown-menu,
.export-menu,
.export-dropdown-menu,
.year-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.375rem);
  min-width: 13.5rem;
  max-height: min(28rem, calc(100vh - 4rem));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  color: var(--md-sys-color-on-surface, #1d1b20);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  border-radius: var(--md-sys-shape-corner-medium, 0.75rem);
  box-shadow: var(--md-sys-elevation-3, 0 0.25rem 0.875rem rgba(0, 0, 0, 0.15));
  padding: 0.5rem 0;
  z-index: 300;
  display: none;
  animation: mdDropdownFadeIn 0.18s cubic-bezier(0.2, 0, 0, 1);
}

.md-dropdown-menu::-webkit-scrollbar,
.export-menu::-webkit-scrollbar,
.export-dropdown-menu::-webkit-scrollbar,
.year-dropdown-menu::-webkit-scrollbar {
  width: 0.35rem;
}

.md-dropdown-menu::-webkit-scrollbar-thumb,
.export-menu::-webkit-scrollbar-thumb,
.export-dropdown-menu::-webkit-scrollbar-thumb,
.year-dropdown-menu::-webkit-scrollbar-thumb {
  background-color: var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.2));
  border-radius: 0.25rem;
}

.md-dropdown-menu.is-open,
.export-menu.is-open,
.export-dropdown-menu.is-open,
.year-dropdown-menu.is-open {
  display: block !important;
}

@keyframes mdDropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-0.35rem) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Upward Opening Dropdown (Dropup) */
.md-dropdown-wrapper.opens-up .md-dropdown-menu,
.export-dropdown-wrapper.opens-up .md-dropdown-menu,
.export-dropdown-wrapper.opens-up .export-menu,
.export-dropdown-wrapper.opens-up .export-dropdown-menu,
.year-dropdown-wrapper.opens-up .year-dropdown-menu,
.md-dropdown-menu.opens-up,
.year-dropdown-menu.opens-up {
  top: auto !important;
  bottom: calc(100% + 0.375rem) !important;
  transform-origin: bottom center !important;
  animation-name: mdDropdownFadeInUp !important;
}

@keyframes mdDropdownFadeInUp {
  from {
    opacity: 0;
    transform: translateY(0.35rem) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.md-dropdown-wrapper.opens-up.is-open .dropdown-caret,
.md-dropdown-wrapper.opens-up.is-open .export-arrow,
.export-dropdown-wrapper.opens-up.is-open .dropdown-caret,
.export-dropdown-wrapper.opens-up.is-open .export-arrow {
  transform: rotate(180deg);
}

.md-dropdown-header,
.export-menu-header,
.export-section-title {
  padding: 0.4rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.md-dropdown-item,
.export-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface, #1d1b20);
  text-decoration: none !important;
  cursor: pointer;
}

button.md-dropdown-item {
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.md-dropdown-divider {
  height: 0.0625rem;
  background-color: var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  margin: 0.35rem 0;
}

[data-theme="dark"] .md-dropdown-divider {
  background-color: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.12));
}

.md-dropdown-item:hover,
.export-item:hover {
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
  color: var(--md-sys-color-primary, #6750a4);
}

.export-icon-excel {
  color: #2e7d32 !important;
  font-size: 1.2rem;
}

.export-icon-pdf {
  color: #c62828 !important;
  font-size: 1.2rem;
}

.export-icon-csv {
  color: #0277bd !important;
  font-size: 1.2rem;
}

/* Year Selector Dropdown Component */
.year-dropdown-menu {
  min-width: 9.5rem !important;
  max-height: 17.5rem;
}

.year-dropdown-btn .year-calendar-icon {
  font-size: 1.15rem;
  color: var(--md-sys-color-primary, #6750a4);
}

.year-dropdown-btn .year-label-text {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.year-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
}

.year-dropdown-item .year-check-icon {
  font-size: 1.1rem;
  width: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--md-sys-color-primary, #6750a4);
}

.year-dropdown-item.is-selected,
.year-dropdown-item.active {
  background-color: var(--md-sys-color-secondary-container, #e8def8);
  color: var(--md-sys-color-on-secondary-container, #1d192b);
  font-weight: 600;
}

[data-theme="dark"] .year-dropdown-item.is-selected,
[data-theme="dark"] .year-dropdown-item.active {
  background-color: var(--md-sys-color-secondary-container, #4a4458);
  color: var(--md-sys-color-on-secondary-container, #e8def8);
}

/* Dark theme overrides for dropdown */
[data-theme="dark"] .md-dropdown-btn,
[data-theme="dark"] .export-btn,
[data-theme="dark"] .export-menu-btn {
  background-color: var(--md-sys-color-surface-container, #211f26);
  color: var(--md-sys-color-on-surface, #e6e1e5);
  border-color: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.15));
}

[data-theme="dark"] .md-dropdown-btn:hover,
[data-theme="dark"] .export-btn:hover,
[data-theme="dark"] .export-menu-btn:hover {
  background-color: var(--md-sys-color-surface-container-high, #2b2930);
  color: var(--md-sys-color-primary, #d0bcff);
  border-color: var(--md-sys-color-primary, #d0bcff);
}

[data-theme="dark"] .md-dropdown-menu,
[data-theme="dark"] .export-menu,
[data-theme="dark"] .export-dropdown-menu {
  background-color: var(--md-sys-color-surface-container-high, #2b2930);
  border-color: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.15));
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.55);
  color: var(--md-sys-color-on-surface, #e6e1e5);
}

[data-theme="dark"] .md-dropdown-item,
[data-theme="dark"] .export-item {
  color: var(--md-sys-color-on-surface, #e6e1e5);
}

[data-theme="dark"] .md-dropdown-item:hover,
[data-theme="dark"] .export-item:hover {
  background-color: var(--md-sys-color-surface-container-highest, #36343b);
  color: var(--md-sys-color-primary, #d0bcff);
}

/* ==========================================================================
   Common Form Rich Dropdown Select Component (Material You MD3)
   ========================================================================== */
.filter-select-wrapper.md-dropdown-wrapper,
.custom-select-wrapper.md-dropdown-wrapper {
  position: relative;
  display: block;
  width: 100%;
}

.filter-select-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border: 0.0938rem solid var(--md-sys-color-outline-variant, #cac4d0);
  border-radius: var(--md-sys-shape-corner-medium, 0.625rem);
  font-size: 0.9rem;
  font-family: inherit;
  background-color: var(--md-sys-color-surface, #fff);
  color: var(--md-sys-color-on-surface, #1d1b20);
  box-sizing: border-box;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.15s ease;
  user-select: none;
  text-align: left;
  line-height: 1.4;
  min-height: 2.625rem;
}

.filter-select-btn:hover {
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
  border-color: var(--md-sys-color-primary, #6750a4);
}

.filter-select-wrapper.is-open .filter-select-btn,
.custom-select-wrapper.is-open .filter-select-btn,
.filter-select-btn:focus {
  outline: none;
  border-color: var(--md-sys-color-primary, #6750a4);
  box-shadow: 0 0 0 0.1875rem rgba(103, 80, 164, 0.15);
}

.filter-select-btn:disabled,
.custom-select-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed !important;
  pointer-events: none;
  background-color: var(--md-sys-color-surface-container-low, #f7f2fa);
  border-color: var(--md-sys-color-outline-variant, #cac4d0);
}

.filter-select-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  text-align: left;
}

.filter-select-btn .dropdown-caret {
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
  font-size: 1.25rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  margin-left: 0.35rem;
  flex-shrink: 0;
}

.filter-select-wrapper.is-open .dropdown-caret,
.custom-select-wrapper.is-open .dropdown-caret {
  transform: rotate(180deg);
  color: var(--md-sys-color-primary, #6750a4);
}

.filter-select-menu {
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  min-width: 100% !important;
  max-height: 16rem;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 0.35rem 0;
  border-radius: var(--md-sys-shape-corner-medium, 0.75rem);
  box-shadow: var(--md-sys-elevation-3, 0 0.25rem 0.875rem rgba(0, 0, 0, 0.15));
  z-index: 200;
}

.filter-select-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface, #1d1b20);
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease, color 0.15s ease;
  box-sizing: border-box;
}

.filter-select-item:hover {
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
  color: var(--md-sys-color-primary, #6750a4);
}

.filter-select-item.is-selected {
  font-weight: 700;
  color: var(--md-sys-color-primary, #6750a4);
  background-color: rgba(103, 80, 164, 0.08);
}

.filter-select-item .select-check-icon {
  font-size: 1.15rem;
  color: var(--md-sys-color-primary, #6750a4);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
}

/* Dark theme styling for Rich Selects */
[data-theme="dark"] .filter-select-btn {
  background-color: var(--md-sys-color-surface-container, #211f26);
  color: var(--md-sys-color-on-surface, #e6e1e5);
  border-color: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.15));
}

[data-theme="dark"] .filter-select-btn:hover,
[data-theme="dark"] .filter-select-wrapper.is-open .filter-select-btn,
[data-theme="dark"] .custom-select-wrapper.is-open .filter-select-btn {
  background-color: var(--md-sys-color-surface-container-high, #2b2930);
  border-color: var(--md-sys-color-primary, #d0bcff);
}

[data-theme="dark"] .filter-select-menu {
  background-color: var(--md-sys-color-surface-container-high, #2b2930);
  border-color: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.15));
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .filter-select-item {
  color: var(--md-sys-color-on-surface, #e6e1e5);
}

[data-theme="dark"] .filter-select-item:hover {
  background-color: var(--md-sys-color-surface-container-highest, #36343b);
  color: var(--md-sys-color-primary, #d0bcff);
}

[data-theme="dark"] .filter-select-item.is-selected {
  color: var(--md-sys-color-primary, #d0bcff);
  background-color: rgba(208, 188, 255, 0.12);
}

[data-theme="dark"] .filter-select-item .select-check-icon {
  color: var(--md-sys-color-primary, #d0bcff);
}

/* ==========================================================================
   Common Data-Table Pagination & Page Size Selection (Material You MD3)
   ========================================================================== */
.pagination-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  background-color: var(--md-sys-color-surface-container-low, #f7f2fa);
  border-top: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08));
  border-radius: var(--md-sys-shape-corner-large, 1rem) var(--md-sys-shape-corner-large, 1rem);
}

.pagination-toolbar .pagination-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.pagination-size-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  font-weight: 500;
}

.pagination-size-label {
  font-size: 0.85rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  font-weight: 500;
}

.pagination-size-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.pagination-size-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--md-sys-shape-corner-small, 0.5rem);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.15));
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  color: var(--md-sys-color-on-surface, #1d1b20);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.2, 0, 0, 1);
  user-select: none;
  white-space: nowrap;
}

.pagination-size-btn:hover {
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
  color: var(--md-sys-color-primary, #6750a4);
  border-color: var(--md-sys-color-primary, #6750a4);
  box-shadow: var(--md-sys-elevation-1, 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.08));
}

.pagination-size-btn .dropdown-caret {
  transition: transform 0.2s ease;
  font-size: 1.15rem;
  margin-left: 0.15rem;
}

.pagination-size-dropdown-wrapper.is-open .dropdown-caret {
  transform: rotate(180deg);
}

.pagination-size-menu {
  left: 0 !important;
  right: auto !important;
  min-width: 9.5rem;
  padding: 0.375rem 0;
}

.pagination-size-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--md-sys-color-on-surface, #1d1b20);
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.pagination-size-item:hover {
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
  color: var(--md-sys-color-primary, #6750a4);
}

.pagination-size-item.is-selected {
  font-weight: 700;
  color: var(--md-sys-color-primary, #6750a4);
  background-color: rgba(103, 80, 164, 0.08);
}

.pagination-check-icon {
  font-size: 1rem;
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--md-sys-color-primary, #6750a4);
}

.pagination-size-select {
  padding: 0.35rem 0.65rem;
  border-radius: var(--md-sys-shape-corner-small, 0.5rem);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.15));
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  color: var(--md-sys-color-on-surface, #1d1b20);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.pagination-size-select:focus {
  outline: none;
  border-color: var(--md-sys-color-primary, #6750a4);
}

.pagination-info-text {
  font-size: 0.85rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  font-weight: 500;
}

.pagination-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.5rem;
  border-radius: var(--md-sys-shape-corner-small, 0.5rem);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  color: var(--md-sys-color-on-surface, #1d1b20);
  text-decoration: none !important;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.15s ease;
  user-select: none;
}

.pagination-btn:hover:not(.disabled):not(.active) {
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
  color: var(--md-sys-color-primary, #6750a4);
  border-color: var(--md-sys-color-primary, #6750a4);
}

.pagination-btn.active {
  background-color: var(--md-sys-color-primary, #6750a4);
  color: var(--md-sys-color-on-primary, #ffffff);
  border-color: var(--md-sys-color-primary, #6750a4);
  font-weight: 700;
}

.pagination-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  border-color: var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08));
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 2.25rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  font-size: 0.9rem;
}

/* ==========================================================================
   Pagination "Jump to Page" Rich Upward Menu (MD3)
   ========================================================================== */
.pagination-page-dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.pagination-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 2.25rem;
  padding: 0 0.75rem;
  border-radius: var(--md-sys-shape-corner-small, 0.5rem);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.15));
  background-color: var(--md-sys-color-surface-container-high, #ece6f0);
  color: var(--md-sys-color-on-surface, #1d1b20);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.2, 0, 0, 1);
  user-select: none;
  white-space: nowrap;
}

.pagination-page-btn:hover {
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
  color: var(--md-sys-color-primary, #6750a4);
  border-color: var(--md-sys-color-primary, #6750a4);
  box-shadow: var(--md-sys-elevation-1, 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.08));
}

.pagination-page-btn .pagination-page-icon {
  font-size: 1.15rem;
  color: var(--md-sys-color-primary, #6750a4);
  flex-shrink: 0;
}

.pagination-page-btn .pagination-page-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.pagination-page-btn .dropdown-caret {
  transition: transform 0.2s ease;
  font-size: 1.25rem;
  margin-left: 0.1rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
}

.pagination-page-dropdown-wrapper.is-open .pagination-page-btn .dropdown-caret {
  transform: rotate(180deg);
}

/* Always Open Upwards */
.pagination-page-dropdown-wrapper .pagination-page-menu,
.pagination-page-dropdown-wrapper.dropup .md-dropdown-menu,
.pagination-page-dropdown-wrapper .md-dropdown-menu.opens-up {
  position: absolute !important;
  bottom: calc(100% + 0.45rem) !important;
  top: auto !important;
  left: 50% !important;
  transform: translateX(-50%) scale(0.96) !important;
  transform-origin: bottom center !important;
  min-width: 13.5rem;
  max-width: 17rem;
  padding: 0;
  border-radius: var(--md-sys-shape-corner-medium, 0.75rem);
  background-color: var(--md-sys-color-surface-container-low, #f7f2fa);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  box-shadow: var(--md-sys-elevation-3, 0 0.375rem 1.25rem rgba(0, 0, 0, 0.16));
  z-index: 120;
  display: none;
  flex-direction: column;
  overflow: hidden;
  transition: opacity 0.18s cubic-bezier(0.2, 0, 0, 1), transform 0.18s cubic-bezier(0.2, 0, 0, 1);
  opacity: 0;
}

.pagination-page-dropdown-wrapper.is-open .pagination-page-menu,
.pagination-page-dropdown-wrapper.is-open .md-dropdown-menu.opens-up {
  display: flex !important;
  opacity: 1 !important;
  transform: translateX(-50%) scale(1) !important;
}

/* Menu Header */
.pagination-page-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-bottom: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08));
  background-color: var(--md-sys-color-surface-container, #ece6f0);
}

.pagination-header-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--md-sys-color-on-surface-variant, #49454f);
}

.pagination-header-title .material-symbols-rounded {
  font-size: 1rem;
  color: var(--md-sys-color-primary, #6750a4);
}

.pagination-total-pages-pill {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: var(--md-sys-shape-corner-full, 1rem);
  background-color: var(--md-sys-color-primary-container, #eaddff);
  color: var(--md-sys-color-on-primary-container, #21005d);
}

/* Quick Jump Input Box */
.pagination-quick-jump {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.08));
  background-color: var(--md-sys-color-surface, #fdf8fd);
}

.pagination-quick-input {
  flex: 1;
  min-width: 0;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: var(--md-sys-shape-corner-small, 0.375rem);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.2));
  background-color: var(--md-sys-color-surface-container-lowest, #ffffff);
  color: var(--md-sys-color-on-surface, #1d1b20);
  font-family: inherit;
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.pagination-quick-input:focus {
  border-color: var(--md-sys-color-primary, #6750a4);
}

.pagination-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  height: 2rem;
  padding: 0 0.6rem;
  border-radius: var(--md-sys-shape-corner-small, 0.375rem);
  border: none;
  background-color: var(--md-sys-color-primary, #6750a4);
  color: var(--md-sys-color-on-primary, #ffffff);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.pagination-quick-btn:hover {
  background-color: var(--md-sys-color-primary-hover, #533e8b);
}

.pagination-quick-btn .material-symbols-rounded {
  font-size: 0.9rem;
}

/* Scrollable Page List */
.pagination-page-list {
  max-height: 14rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.25rem 0;
}

.pagination-page-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  color: var(--md-sys-color-on-surface, #1d1b20);
  text-decoration: none !important;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.pagination-page-item:hover {
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
  color: var(--md-sys-color-primary, #6750a4);
}

.pagination-page-item.is-selected {
  font-weight: 700;
  color: var(--md-sys-color-primary, #6750a4);
  background-color: rgba(103, 80, 164, 0.08);
}

.pagination-page-item .pagination-check-icon {
  font-size: 1rem;
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--md-sys-color-primary, #6750a4);
  flex-shrink: 0;
}

[data-theme="dark"] .pagination-toolbar {
  background-color: var(--md-sys-color-surface-container-low, #1d1b20);
  border-top-color: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.12));
}

[data-theme="dark"] .pagination-size-select,
[data-theme="dark"] .pagination-btn {
  background-color: var(--md-sys-color-surface-container, #211f26);
  color: var(--md-sys-color-on-surface, #e6e1e5);
  border-color: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.15));
}

[data-theme="dark"] .pagination-btn.active {
  background-color: var(--md-sys-color-primary, #d0bcff);
  color: var(--md-sys-color-on-primary, #381e72);
}


[data-theme="dark"] .pagination-size-btn {
  background-color: var(--md-sys-color-surface-container, #211f26);
  color: var(--md-sys-color-on-surface, #e6e1e5);
  border-color: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.15));
}

[data-theme="dark"] .pagination-size-btn:hover {
  background-color: var(--md-sys-color-surface-container-high, #2b2930);
  color: var(--md-sys-color-primary, #d0bcff);
  border-color: var(--md-sys-color-primary, #d0bcff);
}

[data-theme="dark"] .pagination-size-item {
  color: var(--md-sys-color-on-surface, #e6e1e5);
}

[data-theme="dark"] .pagination-size-item:hover {
  background-color: var(--md-sys-color-surface-container-highest, #36343b);
  color: var(--md-sys-color-primary, #d0bcff);
}

[data-theme="dark"] .pagination-size-item.is-selected {
  color: var(--md-sys-color-primary, #d0bcff);
  background-color: rgba(208, 188, 255, 0.12);
}

[data-theme="dark"] .pagination-check-icon {
  color: var(--md-sys-color-primary, #d0bcff);
}

/* Dark mode for Jump to page menu */
[data-theme="dark"] .pagination-page-btn,
[data-theme-resolved="dark"] .pagination-page-btn,
.theme-dark .pagination-page-btn {
  background-color: var(--md-sys-color-surface-container, #211f26);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--md-sys-color-on-surface, #e6e1e5);
}

[data-theme="dark"] .pagination-page-btn:hover,
[data-theme-resolved="dark"] .pagination-page-btn:hover,
.theme-dark .pagination-page-btn:hover {
  background-color: var(--md-sys-color-surface-container-high, #2b2930);
  color: var(--md-sys-color-primary, #d0bcff);
  border-color: var(--md-sys-color-primary, #d0bcff);
}

[data-theme="dark"] .pagination-page-menu,
[data-theme-resolved="dark"] .pagination-page-menu,
.theme-dark .pagination-page-menu {
  background-color: var(--md-sys-color-surface-container, #211f26);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .pagination-page-menu-header,
[data-theme-resolved="dark"] .pagination-page-menu-header,
.theme-dark .pagination-page-menu-header {
  background-color: var(--md-sys-color-surface-container-high, #2b2930);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .pagination-quick-jump,
[data-theme-resolved="dark"] .pagination-quick-jump,
.theme-dark .pagination-quick-jump {
  background-color: var(--md-sys-color-surface-container-lowest, #141218);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .pagination-quick-input,
[data-theme-resolved="dark"] .pagination-quick-input,
.theme-dark .pagination-quick-input {
  background-color: var(--md-sys-color-surface-container, #211f26);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--md-sys-color-on-surface, #e6e1e5);
}

[data-theme="dark"] .pagination-page-item,
[data-theme-resolved="dark"] .pagination-page-item,
.theme-dark .pagination-page-item {
  color: var(--md-sys-color-on-surface, #e6e1e5);
}

[data-theme="dark"] .pagination-page-item:hover,
[data-theme-resolved="dark"] .pagination-page-item:hover,
.theme-dark .pagination-page-item:hover {
  background-color: var(--md-sys-color-surface-container-highest, #36343b);
  color: var(--md-sys-color-primary, #d0bcff);
}

[data-theme="dark"] .pagination-page-item.is-selected,
[data-theme-resolved="dark"] .pagination-page-item.is-selected,
.theme-dark .pagination-page-item.is-selected {
  background-color: rgba(208, 188, 255, 0.12);
  color: #d0bcff;
}

/* Responsive adjustment for pagination toolbar on mobile/tablet */
@media (max-width: 48rem) {
  .pagination-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
  }

  .pagination-toolbar .pagination-info {
    justify-content: space-between;
    width: 100%;
  }

  .pagination-nav-group {
    justify-content: center;
    width: 100%;
  }

  .pagination-page-dropdown-wrapper {
    flex: 1;
    max-width: 16rem;
  }

  .pagination-page-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   Universal Direction-Aware & Theme-Aware Rich Tooltip Plugin
   ========================================================================== */
.rich-tooltip {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  background-color: var(--md-sys-color-inverse-surface, #313033);
  color: var(--md-sys-color-inverse-on-surface, #f4eff4);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.02em;
  padding: 0.35rem 0.65rem;
  border-radius: var(--md-sys-shape-corner-extra-small, 0.375rem);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.22), 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.15);
  max-width: 18rem;
  word-wrap: break-word;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s cubic-bezier(0.2, 0, 0, 1), transform 0.15s cubic-bezier(0.2, 0, 0, 1);
  will-change: transform, opacity;
}

.rich-tooltip--visible {
  opacity: 1 !important;
  visibility: visible !important;
}

.rich-tooltip--top {
  transform: translateY(0.25rem);
}

.rich-tooltip--top.rich-tooltip--visible {
  transform: translateY(0);
}

.rich-tooltip--bottom {
  transform: translateY(-0.25rem);
}

.rich-tooltip--bottom.rich-tooltip--visible {
  transform: translateY(0);
}

.rich-tooltip--left {
  transform: translateX(0.25rem);
}

.rich-tooltip--left.rich-tooltip--visible {
  transform: translateX(0);
}

.rich-tooltip--right {
  transform: translateX(-0.25rem);
}

.rich-tooltip--right.rich-tooltip--visible {
  transform: translateX(0);
}

.rich-tooltip-content {
  position: relative;
  z-index: 1;
}

.rich-tooltip-arrow {
  position: absolute;
  width: 0.45rem;
  height: 0.45rem;
  background-color: inherit;
  transform: rotate(45deg);
  z-index: 0;
}

.rich-tooltip--top .rich-tooltip-arrow {
  bottom: -0.225rem;
}

.rich-tooltip--bottom .rich-tooltip-arrow {
  top: -0.225rem;
}

.rich-tooltip--left .rich-tooltip-arrow {
  right: -0.225rem;
}

.rich-tooltip--right .rich-tooltip-arrow {
  left: -0.225rem;
}

/* Dark Theme Overrides for Rich Tooltips */
[data-theme="dark"] .rich-tooltip,
[data-theme-resolved="dark"] .rich-tooltip,
.theme-dark .rich-tooltip {
  background-color: var(--md-sys-color-inverse-surface, #e6e1e5);
  color: var(--md-sys-color-inverse-on-surface, #313033);
  box-shadow: 0 0.25rem 0.85rem rgba(0, 0, 0, 0.55), 0 0.0625rem 0.25rem rgba(0, 0, 0, 0.4);
}

/* Suppress older CSS-only pseudo-element tooltips to avoid duplicate popups */
.card-action-icon-btn[data-tooltip]::before,
.card-action-icon-btn[data-tooltip]::after,
[data-rich-tooltip]::before,
[data-rich-tooltip]::after {
  display: none !important;
}

/* ==========================================================================
   Navigation Breadcrumbs & Back Buttons
   ========================================================================== */
.breadcrumb-row {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--md-sys-color-primary, #6750a4);
  background: var(--md-sys-color-surface-container-high, #ece6f0);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  padding: 0.45rem 0.95rem;
  border-radius: var(--md-sys-shape-corner-full, 9999rem);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  line-height: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
  box-shadow: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.04);
}

.breadcrumb-link:hover,
.breadcrumb-link:focus {
  background: var(--md-sys-color-primary-container, #eaddff);
  color: var(--md-sys-color-on-primary-container, #21005d);
  text-decoration: none;
  transform: translateX(-0.125rem);
  box-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .breadcrumb-link,
[data-theme-resolved="dark"] .breadcrumb-link,
.theme-dark .breadcrumb-link {
  background: var(--md-sys-color-surface-container, #211f26);
  border-color: var(--md-sys-color-outline-variant, rgba(255, 255, 255, 0.12));
  color: var(--md-sys-color-primary, #d0bcff);
}

[data-theme="dark"] .breadcrumb-link:hover,
[data-theme="dark"] .breadcrumb-link:focus,
[data-theme-resolved="dark"] .breadcrumb-link:hover,
[data-theme-resolved="dark"] .breadcrumb-link:focus,
.theme-dark .breadcrumb-link:hover,
.theme-dark .breadcrumb-link:focus {
  background: var(--md-sys-color-primary-container, #4f378b);
  color: var(--md-sys-color-on-primary-container, #eaddff);
}

.badge-orphan {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background-color: #fff3e0;
  color: #b26a00;
  border: 0.0625rem solid #ffe082;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: middle;
  margin-left: 0.35rem;
}

input[type='date'] {
  width: 100%;
  min-height: 2.375rem;
  height: 2.375rem;
  padding: 0.35rem 0.75rem;
  border: 0.0625rem solid var(--pmp-border, var(--md-sys-color-outline, #79747e));
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-family: inherit;
  color-scheme: light dark;
  background-color: var(--pmp-surface-page, var(--md-sys-color-surface, #fff));
  color: var(--pmp-text-primary, var(--md-sys-color-on-surface, #1d1b20));
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

/* ==========================================================================
   Lot Management Theme Tokens & Component Styles (Dark & Light Mode Support)
   ========================================================================== */
:root {
  --lot-banner-info-bg: #f0f9ff;
  --lot-banner-info-border: #0284c7;
  --lot-banner-info-title: #0369a1;
  --lot-banner-info-text: #334155;
  --lot-banner-info-subtext: #64748b;

  --lot-banner-success-bg: #f0fdf4;
  --lot-banner-success-border: #10b981;
  --lot-banner-success-title: #166534;

  --lot-modal-bg: var(--md-sys-color-surface, #ffffff);
  --lot-modal-text: var(--md-sys-color-on-surface, #1d1b20);
  --lot-modal-subtext: var(--md-sys-color-on-surface-variant, #49454f);
  --lot-modal-border: var(--md-sys-color-outline-variant, #e2e8f0);
  --lot-modal-header-bg: var(--md-sys-color-surface-container-low, #f8fafc);
  --lot-modal-table-th-bg: var(--md-sys-color-surface-container-low, #f1f5f9);

  --lot-pill-total-bg: var(--md-sys-color-surface-container-highest, #e2e8f0);
  --lot-pill-total-text: var(--md-sys-color-on-surface, #334155);

  --lot-pill-zero-bg: #e0f2fe;
  --lot-pill-zero-text: #0369a1;

  --lot-pill-paid-bg: #dcfce7;
  --lot-pill-paid-text: #15803d;

  --lot-pill-unpaid-bg: #fee2e2;
  --lot-pill-unpaid-text: #b91c1c;

  --lot-pill-warning-bg: #fef3c7;
  --lot-pill-warning-text: #b45309;

  --lot-pill-neutral-bg: var(--md-sys-color-surface-container, #f1f5f9);
  --lot-pill-neutral-text: var(--md-sys-color-on-surface-variant, #94a3b8);
}

:root[data-theme="dark"],
:root[data-theme-resolved="dark"],
:root.theme-dark,
body[data-theme="dark"],
body.theme-dark {
  --lot-banner-info-bg: rgba(2, 132, 199, 0.15);
  --lot-banner-info-border: #38bdf8;
  --lot-banner-info-title: #7dd3fc;
  --lot-banner-info-text: #e2e8f0;
  --lot-banner-info-subtext: #94a3b8;

  --lot-banner-success-bg: rgba(16, 185, 129, 0.15);
  --lot-banner-success-border: #34d399;
  --lot-banner-success-title: #86efac;

  --lot-modal-bg: var(--md-sys-color-surface-container, #211f26);
  --lot-modal-text: var(--md-sys-color-on-surface, #e6e1e5);
  --lot-modal-subtext: var(--md-sys-color-on-surface-variant, #cac4d0);
  --lot-modal-border: var(--md-sys-color-outline-variant, #49454f);
  --lot-modal-header-bg: var(--md-sys-color-surface-container-high, #2b2930);
  --lot-modal-table-th-bg: var(--md-sys-color-surface-container-high, #2b2930);

  --lot-pill-total-bg: var(--md-sys-color-surface-container-highest, #36343b);
  --lot-pill-total-text: var(--md-sys-color-on-surface, #e6e1e5);

  --lot-pill-zero-bg: rgba(2, 132, 199, 0.25);
  --lot-pill-zero-text: #7dd3fc;

  --lot-pill-paid-bg: rgba(22, 163, 74, 0.25);
  --lot-pill-paid-text: #86efac;

  --lot-pill-unpaid-bg: rgba(220, 38, 38, 0.25);
  --lot-pill-unpaid-text: #fca5a5;

  --lot-pill-warning-bg: rgba(217, 119, 6, 0.25);
  --lot-pill-warning-text: #fcd34d;

  --lot-pill-neutral-bg: var(--md-sys-color-surface-container-high, #2b2930);
  --lot-pill-neutral-text: var(--md-sys-color-outline, #938f99);
}

/* Lot management custom classes */
.lot-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--md-sys-shape-corner-extra-small, 0.25rem);
  line-height: 1.25;
  white-space: nowrap;
  flex-wrap: wrap;
}

.lot-status-pill.pill-total {
  background: var(--lot-pill-total-bg);
  color: var(--lot-pill-total-text);
}

.lot-status-pill.pill-zero {
  background: var(--lot-pill-zero-bg);
  color: var(--lot-pill-zero-text);
}

.lot-status-pill.pill-paid {
  background: var(--lot-pill-paid-bg);
  color: var(--lot-pill-paid-text);
}

.lot-status-pill.pill-unpaid {
  background: var(--lot-pill-unpaid-bg);
  color: var(--lot-pill-unpaid-text);
}

.lot-status-pill.pill-warning {
  background: var(--lot-pill-warning-bg);
  color: var(--lot-pill-warning-text);
}

.lot-status-pill.pill-neutral {
  background: var(--lot-pill-neutral-bg);
  color: var(--lot-pill-neutral-text);
}

.lot-open-banner {
  border-left: 0.25rem solid var(--lot-banner-info-border);
  background: var(--lot-banner-info-bg);
  color: var(--lot-banner-info-text);
  border-radius: var(--md-sys-shape-corner-medium, 0.5rem);
  padding: 1rem 1.25rem;
}

.lot-open-banner .banner-title {
  color: var(--lot-banner-info-title);
  font-weight: 700;
  font-size: 1rem;
}

.lot-open-banner .banner-subtext {
  color: var(--lot-banner-info-subtext);
}

.lot-closed-banner {
  border-left: 0.25rem solid var(--lot-banner-success-border);
  background: var(--lot-banner-success-bg);
  color: var(--lot-banner-success-title);
  border-radius: var(--md-sys-shape-corner-medium, 0.5rem);
  padding: 0.85rem 1.25rem;
}

.lot-modal-card {
  background-color: var(--lot-modal-bg) !important;
  color: var(--lot-modal-text) !important;
  border: 0.0625rem solid var(--lot-modal-border) !important;
  box-shadow: var(--md-sys-elevation-3, 0 1.25rem 1.5625rem -0.3125rem rgba(0, 0, 0, 0.25)) !important;
}

.lot-modal-header {
  border-bottom: 0.0625rem solid var(--lot-modal-border) !important;
  background-color: var(--lot-modal-bg) !important;
  color: var(--lot-modal-text) !important;
}

.lot-modal-footer {
  border-top: 0.0625rem solid var(--lot-modal-border) !important;
  background-color: var(--lot-modal-bg) !important;
}

.lot-modal-filter-toolbar {
  background-color: var(--lot-modal-header-bg) !important;
  border-bottom: 0.0625rem solid var(--lot-modal-border) !important;
  color: var(--lot-modal-text) !important;
}

.lot-modal-table-wrapper {
  overflow-y: auto;
  overflow-x: auto;
  border: 0.0625rem solid var(--lot-modal-border);
  border-radius: var(--md-sys-shape-corner-medium, 0.5rem);
  -webkit-overflow-scrolling: touch;
  background: var(--lot-modal-bg);
}

.lot-modal-table-wrapper table th {
  position: sticky;
  top: 0;
  z-index: 5;
  background-color: var(--lot-modal-table-th-bg) !important;
  color: var(--lot-modal-text) !important;
  border-bottom: 0.0625rem solid var(--lot-modal-border) !important;
  box-shadow: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.08);
}

.lot-modal-table-wrapper table tr {
  border-bottom: 0.0625rem solid var(--lot-modal-border);
  color: var(--lot-modal-text);
}

.lot-modal-table-wrapper table tr:hover td {
  background-color: var(--md-sys-color-surface-container-high, #f8fafc);
}

.lot-modal-header .alert-close-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--md-sys-shape-corner-small, 0.375rem);
  color: var(--lot-modal-subtext);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lot-modal-header .alert-close-btn:hover {
  background-color: var(--md-sys-color-surface-container-highest, rgba(0, 0, 0, 0.05));
  color: var(--lot-modal-text);
}

.lot-input-text {
  width: 100%;
  /*   border: 0.0625rem solid var(--md-sys-color-outline, #cbd5e1); */
  border-radius: var(--md-sys-shape-corner-small, 0.375rem);
  padding: 0.5rem;
  font-size: 0.85rem;
  font-family: inherit;
  background-color: var(--md-sys-color-surface, #fff);
  color: var(--md-sys-color-on-surface, #1d1b20);
  box-sizing: border-box;
  color-scheme: inherit;

  /* Set your visible border using outline */
  outline: 0.0625rem solid var(--md-sys-color-outline, #cbd5e1);

  /* Use transparent borders to act as top and bottom spacing */
  border: 0.5rem solid transparent;
}

.lot-input-text:focus {
  outline: 0.125rem solid var(--md-sys-color-primary, #6750a4);
  /*   outline-offset: -0.0625rem; */
}

/* Lot Literals Drawer in Create Lot Dialog */
.lot-literals-drawer-wrapper {
  margin-bottom: 1.25rem;
  border-radius: 0.5rem;
  background: var(--md-sys-color-surface-container, #f3edf7);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, #cac4d0);
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.lot-literals-drawer-header {
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  line-height: 1.45;
}

.lot-literals-drawer-toggle-row {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 0.0625rem dashed var(--md-sys-color-outline-variant, #cac4d0);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lot-literals-drawer-toggle-btn {
  background: transparent;
  border: none;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--md-sys-color-primary, #6750a4);
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: 0.375rem;
  user-select: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lot-literals-drawer-toggle-btn:hover {
  background-color: var(--md-sys-color-surface-container-highest, rgba(103, 80, 164, 0.08));
}

.lot-literals-drawer-badge {
  font-size: 0.72rem;
  background: var(--md-sys-color-primary-container, #eaddff);
  color: var(--md-sys-color-on-primary-container, #21005d);
  padding: 0.1rem 0.45rem;
  border-radius: 9999rem;
  font-weight: 700;
}

.lot-literals-drawer-content {
  display: none;
  padding: 0.85rem 1rem 1rem 1rem;
  background: var(--lot-modal-bg, #ffffff);
  border-top: 0.0625rem solid var(--md-sys-color-outline-variant, #cac4d0);
  animation: fadeIn 0.2s ease;
}

.lot-literals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr));
  gap: 0.75rem;
}

.lot-literal-card {
  background: var(--md-sys-color-surface-container-low, #f7f2fa);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, #e7e0ec);
  border-radius: 0.5rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lot-literal-card:hover {
  border-color: var(--md-sys-color-primary, #6750a4);
  box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.04);
}

.lot-literal-chips-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.create-lot-literal-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--lot-modal-bg, #ffffff);
  border: 0.0625rem solid var(--md-sys-color-outline-variant, #cac4d0);
  border-radius: 0.375rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.76rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--md-sys-color-primary, #6750a4);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.create-lot-literal-chip:hover {
  background: var(--md-sys-color-primary-container, #eaddff);
  color: var(--md-sys-color-on-primary-container, #21005d);
  border-color: var(--md-sys-color-primary, #6750a4);
  transform: translateY(-0.0625rem);
}

.create-lot-literal-chip:active {
  transform: translateY(0);
}

.lot-literal-desc {
  font-size: 0.78rem;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  line-height: 1.4;
  margin: 0;
}

.lot-literal-desc strong {
  color: var(--md-sys-color-on-surface, #1d1b20);
}

.lot-literal-desc code {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.1rem 0.3rem;
  border-radius: 0.25rem;
  font-size: 0.74rem;
}

/* Universal Data Entry Modal */
.data-entry-modal-container {
  width: 92vw;
  max-width: 64rem;
  height: 90vh;
  max-height: 52rem;
  border-radius: var(--md-sys-shape-corner-extra-large, 1.75rem);
  background-color: var(--md-sys-color-surface, #fff);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
}

.data-entry-modal-header {
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--md-sys-color-surface-container-low, #f7f2fa);
  border-bottom: 0.0625rem solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, 0.12));
  flex-shrink: 0;
}

.data-entry-modal-header .md-dialog-close-btn,
.applicant-profile-modal-header .md-dialog-close-btn {
  position: static !important;
  top: auto !important;
  right: auto !important;
}

.data-entry-modal-header .md-dialog-icon-badge {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0;
  border-radius: 50%;
  flex-shrink: 0;
}

.data-entry-modal-header .md-dialog-icon-badge span {
  font-size: 1.35rem;
}

@media (max-width: 64rem) {
  .data-entry-modal-container {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
  }
}

body.in-modal-view .data-entry-header {
  display: none !important;
}

/* --------------------------------------------------------------------------
   System-Wide Unified Table Row Action Dropdown Component
   -------------------------------------------------------------------------- */
.table-action-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  position: relative;
}

/* ==========================================================================
   Table Action "More Actions" Trigger (Slide-Over Side Sheet on Desktop)
   ========================================================================== */

.table-action-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: var(--md-sys-shape-corner-full, 50%);
  background: transparent;
  color: var(--md-sys-color-on-surface-variant, #49454f);
  border: none;
  outline: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  user-select: none;
  padding: 0;
  box-sizing: border-box;
}

.table-action-more-btn:hover {
  background-color: var(--md-sys-color-surface-container-highest, #e6e0e9);
  color: var(--md-sys-color-primary, #6750a4);
}

.table-action-more-btn:active {
  background-color: var(--md-sys-color-secondary-container, #e8def8);
  color: var(--md-sys-color-on-secondary-container, #1d192b);
  transform: scale(0.95);
}

.table-action-more-btn:focus-visible {
  outline: 0.125rem solid var(--md-sys-color-primary, #6750a4);
  outline-offset: 0.125rem;
}

[data-theme="dark"] .table-action-more-btn,
[data-theme-resolved="dark"] .table-action-more-btn,
.theme-dark .table-action-more-btn {
  color: var(--md-sys-color-on-surface-variant, #cac4d0);
}

[data-theme="dark"] .table-action-more-btn:hover,
[data-theme-resolved="dark"] .table-action-more-btn:hover,
.theme-dark .table-action-more-btn:hover {
  background-color: var(--md-sys-color-surface-container-highest, #36343b);
  color: var(--md-sys-color-primary, #d0bcff);
}

/* =========================================================================
   Standardized MIS Split Button & Export Controls
   ========================================================================= */
.pmp-split-btn {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}

.pmp-split-btn>.btn-primary:first-child,
.pmp-split-btn>.btn-secondary:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.pmp-split-btn>.pmp-split-toggle {
  padding: 0 0.5rem;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  border-left: 0.0625rem solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: var(--pmp-brand);
  color: #ffffff;
  border-top: none;
  border-right: none;
  border-bottom: none;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.pmp-split-btn>.pmp-split-toggle:hover {
  background-color: var(--pmp-brand-hover, var(--pmp-brand));
  filter: brightness(0.92);
}

.pmp-split-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 0.375rem);
  right: 0;
  z-index: 1050;
  min-width: 13.5rem;
  background: var(--pmp-surface-card);
  border: 0.0625rem solid var(--pmp-border);
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.15);
  padding: 0.375rem 0;
}

.pmp-split-menu.show,
.pmp-split-btn.is-open .pmp-split-menu {
  display: flex;
}

.pmp-split-menu-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5625rem 1rem;
  color: var(--pmp-text-primary);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.pmp-split-menu-item:hover {
  background-color: var(--pmp-surface-hover);
  color: var(--pmp-brand);
}

.pmp-split-menu-item .material-symbols-rounded {
  font-size: 1.15rem;
}