body {
  font-family: "Inter", system-ui, sans-serif;
  background: #f8fafc;
}

.login-bg {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  background: #1a0000;
}

.login-video {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #4d0000;
  z-index: 1;
  opacity: 0.8;
}

.login-bg .container {
  position: relative;
  z-index: 2;
}

.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  color: #ffffff;
}

.login-input-group {
  border-radius: 8px;
  overflow: hidden;
  --login-input-surface: rgba(255, 255, 255, 0.14);
  --login-input-border: rgba(255, 255, 255, 0.18);
  background: var(--login-input-surface);
  border: 1px solid var(--login-input-border);
}

.login-input-group:focus-within {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
}

.login-input-group:focus-within .login-input-icon {
  border-color: rgba(255, 255, 255, 0.28);
}

.login-input-icon {
  background: transparent !important;
  border: 0;
  border-right: 1px solid var(--login-input-border);
  color: rgba(255, 255, 255, 0.78);
  padding-inline: 1rem;
}

.input-modern {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff;
  caret-color: #ffffff;
}

.input-modern::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.input-modern:focus {
  background: transparent !important;
  background-color: transparent !important;
  border-color: transparent !important;
  color: #ffffff !important;
  box-shadow: none;
}

.input-modern:-webkit-autofill,
.input-modern:-webkit-autofill:hover,
.input-modern:-webkit-autofill:focus,
.input-modern:-webkit-autofill:active {
  background-color: transparent !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff;
  box-shadow: inset 0 0 0 1000px transparent !important;
  -webkit-box-shadow: inset 0 0 0 1000px transparent !important;
  border-left: 0 !important;
  transition: background-color 99999s ease-out 0s;
}

.logo-gradient {
  background: linear-gradient(135deg, #b50606 0%, #740202 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-logo {
  filter: brightness(0) invert(1);
}

.sidebar {
  width: 280px;
  height: 100vh;
  max-height: 100vh;
  min-height: 100vh;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, #b50606 0%, #740202 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1030;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 992px) {
  .sidebar {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
}

@supports (height: 100dvh) {
  .sidebar {
    height: 100dvh;
    max-height: 100dvh;
    min-height: 100dvh;
  }
}

.sidebar.collapsed {
  width: 80px;
}

.sidebar.collapsed .nav-link {
  padding: 14px 12px;
  justify-content: center;
}

.sidebar.collapsed .nav-link span,
.sidebar.collapsed .nav-link .submenu-arrow,
.sidebar.collapsed .submenu,
.sidebar.collapsed .sidebar-logo {
  display: none;
}

.sidebar.collapsed .sidebar-top {
  justify-content: center !important;
}

.sidebar-logo {
  max-width: 148px;
  display: block;
  filter: brightness(0) invert(1);
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  padding: 14px 20px;
  border-radius: 12px;
  margin-bottom: 4px;
  transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateX(4px);
}

.sidebar .submenu-toggle,
.sidebar .submenu-toggle:hover,
.sidebar .submenu-toggle:focus,
.sidebar .submenu-toggle.active,
.sidebar .submenu-toggle.open {
  color: #ffffff;
}

.nav-link i {
  width: 24px;
}

.sidebar-submenu-group .submenu {
  display: none;
  margin: 0 0 0.45rem 0.8rem;
  padding-left: 0.65rem;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.sidebar-submenu-group .submenu.submenu-open {
  display: block;
}

.submenu-link {
  padding-block: 0.8rem;
  font-size: 0.96rem;
}

.submenu-arrow {
  transition: transform 0.3s ease;
}

.submenu-toggle.open .submenu-arrow {
  transform: rotate(180deg);
}

.main-content {
  margin-left: 280px;
  min-height: 100vh;
  min-width: 0;
  transition: all 0.4s ease;
}

.main-content.expanded {
  margin-left: 80px;
}

.user-dropdown-button {
  color: #111827;
}

.user-dropdown-button:hover,
.user-dropdown-button:focus {
  color: #111827;
}

.topbar-toggle {
  display: none;
}

.user-dropdown-avatar {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(181, 6, 6, 0.08);
}

.user-dropdown-avatar img {
  display: block;
}

.btn:not(.btn-link):not(.btn-close) {
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn:not(.btn-link):not(.btn-close):hover {
  transform: translateY(-2px);
}

.btn:not(.btn-link):not(.btn-close):focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.18);
}

.btn-primary {
  background: linear-gradient(135deg, #d81919 0%, #7a0303 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(122, 3, 3, 0.22);
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary.active,
.btn-primary:focus-visible {
  box-shadow: 0 16px 30px rgba(122, 3, 3, 0.28);
  color: #ffffff;
}

.bg-primary {
  background: linear-gradient(135deg, #d81919 0%, #7a0303 100%) !important;
  color: #ffffff;
}

.btn-secondary {
  background: linear-gradient(135deg, #64748b 0%, #334155 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(51, 65, 85, 0.22);
}

.btn-secondary:hover,
.btn-secondary:active,
.btn-secondary.active,
.btn-secondary:focus-visible {
  box-shadow: 0 16px 30px rgba(51, 65, 85, 0.28);
  color: #ffffff;
}

.bg-secondary {
  background: linear-gradient(135deg, #64748b 0%, #334155 100%) !important;
  color: #ffffff;
}

.btn-success {
  background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(21, 128, 61, 0.22);
}

.btn-success:hover,
.btn-success:active,
.btn-success.active,
.btn-success:focus-visible {
  box-shadow: 0 16px 30px rgba(21, 128, 61, 0.28);
  color: #ffffff;
}

.bg-success {
  background: linear-gradient(135deg, #22c55e 0%, #15803d 100%) !important;
  color: #ffffff;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(185, 28, 28, 0.22);
}

.btn-danger:hover,
.btn-danger:active,
.btn-danger.active,
.btn-danger:focus-visible {
  box-shadow: 0 16px 30px rgba(185, 28, 28, 0.28);
  color: #ffffff;
}

.bg-danger {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important;
  color: #ffffff;
}

.btn-warning {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-color: transparent;
  color: #3b2f05;
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.22);
}

.btn-warning:hover,
.btn-warning:active,
.btn-warning.active,
.btn-warning:focus-visible {
  box-shadow: 0 16px 30px rgba(245, 158, 11, 0.28);
  color: #3b2f05;
}

.bg-warning {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
  color: #3b2f05;
}

.btn-info {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.22);
}

.btn-info:hover,
.btn-info:active,
.btn-info.active,
.btn-info:focus-visible {
  box-shadow: 0 16px 30px rgba(2, 132, 199, 0.28);
  color: #ffffff;
}

.bg-info {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%) !important;
  color: #ffffff;
}

.btn-light {
  background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%);
  border-color: transparent;
  color: #0f172a;
  box-shadow: 0 12px 24px rgba(203, 213, 225, 0.22);
}

.btn-light:hover,
.btn-light:active,
.btn-light.active,
.btn-light:focus-visible {
  box-shadow: 0 16px 30px rgba(203, 213, 225, 0.28);
  color: #0f172a;
}

.bg-light {
  background: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 100%) !important;
  color: #0f172a;
}

.btn-dark {
  background: linear-gradient(135deg, #334155 0%, #0f172a 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22);
}

.btn-dark:hover,
.btn-dark:active,
.btn-dark.active,
.btn-dark:focus-visible {
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.28);
  color: #ffffff;
}

.bg-dark {
  background: linear-gradient(135deg, #334155 0%, #0f172a 100%) !important;
  color: #ffffff;
}

.bg-gradient-dark {
  background: linear-gradient(135deg, #1e2937 0%, #b50606 100%) !important;
  color: #ffffff;
}

.btn-gradient {
  background: linear-gradient(135deg, #b50606 0%, #740202 100%);
  border: none;
  color: #ffffff;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(181, 6, 6, 0.3);
}

.btn-gradient-white {
  background: linear-gradient(90deg, #ccc 0%, #fff 100%);
  border: none;
  color: #b50606;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-gradient-white:hover {
  color: #b50606;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(181, 6, 6, 0.3);
  background: linear-gradient(90deg, #ccc 0%, #fff 100%);
}

.shadow-modern {
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  white-space: nowrap;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1025;
}

.sidebar-backdrop.is-visible {
  display: block;
}

body.sidebar-open {
  overflow: hidden;
}

@media (max-width: 991.98px) {
  :root {
    --mobile-topbar-height: 72px;
  }

  .topbar-toggle {
    display: inline-flex;
  }

  .sidebar {
    width: 280px;
    transform: translateX(-100%);
  }

  .sidebar.collapsed {
    width: 280px;
  }

  .sidebar.collapsed .nav-link {
    padding: 14px 20px;
    justify-content: flex-start;
  }

  .sidebar.collapsed .nav-link span,
  .sidebar.collapsed .nav-link .submenu-arrow {
    display: inline;
  }

  .sidebar.collapsed .sidebar-logo {
    display: block;
  }

  .sidebar.collapsed .sidebar-top {
    justify-content: space-between !important;
  }

  .sidebar.collapsed .submenu {
    display: none;
  }

  .sidebar.collapsed .submenu.submenu-open {
    display: block;
  }

  .table-responsive {
    white-space: normal;
  }

  .main-content {
    overflow-x: hidden;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .main-content,
  .main-content.expanded {
    margin-left: 0;
  }

  .main-content > .navbar.sticky-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1025;
  }

  #mainContentBody {
    padding: calc(var(--mobile-topbar-height) + 0.75rem) 0.75rem 0.75rem !important;
  }

  .navbar.px-4 {
    padding-inline: 0.75rem !important;
  }

  h5.mb-0.fw-semibold {
    font-size: 0.95rem;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.login-vh {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  z-index: 2;
}

.login-card {
  width: 100%;
  max-width: 460px;
}

.login-card-flip {
  perspective: 1600px;
  min-height: 620px;
}

.login-card-inner {
  position: relative;
  width: 100%;
  min-height: 620px;
  transform-style: preserve-3d;
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.login-card-flip.is-flipped .login-card-inner {
  transform: rotateY(180deg);
}

.login-card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 620px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
}

.login-card-front {
  z-index: 2;
}

.login-card-back {
  transform: rotateY(180deg);
}

.login-secondary-link {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

.login-secondary-link:hover,
.login-secondary-link:focus {
  color: #ffffff;
  text-decoration: underline;
}

.login-footer-spacer {
  margin-top: 3rem;
}

.login-footer {
  margin-top: auto;
  padding-top: 1.75rem;
}

@media (max-width: 575.98px) {
  .login-card-flip,
  .login-card-inner,
  .login-card-face {
    min-height: 600px;
  }
}

.table-detail-row > td {
  white-space: normal;
  background: #f8fafc;
  border-top: 0 !important;
  padding: 0.75rem 1rem !important;
}

.table-detail-row .detail-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  display: block;
  margin-bottom: 0.1rem;
}

.filter-collapse-toggle {
  display: inline-flex;
  align-items: center;
}

.filter-collapse-chevron {
  transition: transform 0.22s ease;
}

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

.hidden {
  display: none;
}

.th-sortable {
  cursor: pointer;
  transition: background-color 0.2s;
  user-select: none;
}

.th-sortable:hover {
  background-color: #495057 !important;
}

.th-sortable:hover .fa-sort {
  opacity: 0.6 !important;
}

th.sortable::after {
  content: " \25B4";
  opacity: 0.2;
}

th.asc::after {
  content: " \25BE";
  opacity: 1;
}

th.desc::after {
  content: " \25B4";
  opacity: 1;
}

.ui-autocomplete,
.ui-front {
  z-index: 99999 !important;
}

#statusAddMenu {
  inset: calc(100% + 0.25rem) 0 auto 0 !important;
  transform: none !important;
  border: 1px solid #c5c5c5 !important;
  border-radius: 4px !important;
  background: #fff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#statusAddMenu .status-add-option {
  border-radius: 3px;
}

#statusAddMenu .status-add-option:hover,
#statusAddMenu .status-add-option:focus {
  background-color: #f6f6f6;
}

.filter-panel-layout {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.filter-panel-fields {
  flex: 1 1 auto;
  min-width: 0;
}

.filter-panel-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
}

.filter-panel-actions .btn {
  justify-content: center;
}

@media (min-width: 768px) {
  .filter-panel-layout {
    flex-direction: row;
    align-items: flex-end;
  }

  .filter-panel-actions {
    justify-content: flex-end;
    align-self: flex-end;
  }
}

.icon-collapse {
  transition: transform 0.3s ease-in-out;
}

button[aria-expanded="true"] .icon-collapse {
  transform: rotate(180deg);
}

#listContainer {
  position: relative;
}

#listContainer .list-table-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.55);
  z-index: 3;
}

#listContainer.is-loading .list-table-overlay {
  display: flex;
}
