.m-0 {
  margin: 0 !important;
}

:root {
  --brand-primary: #144822;
  --brand-primary-dark: #0f361a;
  --brand-secondary: #78A340;
  --brand-muted: #5A7052;
  --brand-soft: #B7C994;
}

.btn-primary {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--brand-primary-dark) !important;
  border-color: var(--brand-primary-dark) !important;
}

.btn-outline-primary {
  color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: #fff !important;
}

.text-primary {
  color: var(--brand-primary) !important;
}

.bg-primary {
  background-color: var(--brand-primary) !important;
}

.border-primary {
  border-color: var(--brand-primary) !important;
}

.badge.bg-primary {
  background-color: var(--brand-primary) !important;
}

.page-link {
  color: var(--brand-primary) !important;
  border-color: var(--brand-muted) !important;
}

.page-link:hover,
.page-link:focus {
  color: #fff !important;
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}

.page-item.active .page-link {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: #fff !important;
}

.page-item.disabled .page-link {
  color: var(--brand-muted) !important;
  border-color: var(--brand-muted) !important;
}

html[data-theme="dark"] .page-link {
  background-color: #1b2129 !important;
  color: #e6e8eb !important;
  border-color: #2a313b !important;
}

html[data-theme="dark"] .page-link:hover,
html[data-theme="dark"] .page-link:focus {
  color: #0f1115 !important;
  background-color: #b6ea72 !important;
  border-color: #b6ea72 !important;
}

html[data-theme="dark"] .page-item.active .page-link {
  background-color: #9bd157 !important;
  border-color: #9bd157 !important;
  color: #0f1115 !important;
}

html[data-theme="dark"] .page-item.disabled .page-link {
  color: #7e8997 !important;
  border-color: #2a313b !important;
  background-color: #151a20 !important;
}

.btn-secondary {
  background-color: var(--brand-secondary) !important;
  border-color: var(--brand-secondary) !important;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}

.btn-outline-secondary {
  color: var(--brand-muted) !important;
  border-color: var(--brand-muted) !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background-color: var(--brand-secondary) !important;
  border-color: var(--brand-secondary) !important;
  color: #fff !important;
}

.mx-1 {
  margin-right: .25rem !important;
  margin-left: .25rem !important;
}

.mx-3 {
  margin-right: 1rem !important;
  margin-left: 1rem !important;
}

.my-0 {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.my-2 {
  margin-top: .5rem !important;
  margin-bottom: .5rem !important;
}

.my-5 {
  margin-top: 3rem !important;
  margin-bottom: 3rem !important;
}

.my-auto {
  margin-top: auto !important;
  margin-bottom: auto !important;
}

.mt-2 {
  margin-top: .5rem !important;
}

.mt-4 {
  margin-top: 1.5rem !important;
}

.me-2 {
  margin-right: .5rem !important;
}

.me-3 {
  margin-right: 1rem !important;
}

.me-auto {
  margin-right: auto !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-1 {
  margin-bottom: .25rem !important;
}

.mb-2 {
  margin-bottom: .5rem !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

.mb-5 {
  margin-bottom: 3rem !important;
}

.ms-auto {
  margin-left: auto !important;
}

@media (min-width: 576px) {
  .mb-sm-0 {
    margin-bottom: 0rem !important;
  }
}

@media (min-width: 768px) {
  .my-md-0 {
    margin-top: 0rem !important;
    margin-bottom: 0rem !important;
  }
}

@media (min-width: 768px) {
  .ms-md-3 {
    margin-left: 1rem !important;
  }
}

@media (max-width: 767.98px) {
  .topbar {
    height: auto;
  }
}

.topbar .nav-link.pz-link {
  border-radius: 999px;
  padding: .35rem .75rem;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}

.topbar .nav-link.pz-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .08);
}

.topbar .nav-link.pz-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 .2rem rgba(20, 72, 34, .25);
}

.topbar .pz-btn {
  border-radius: 999px;
  transition: transform .12s ease, box-shadow .12s ease;
}

.topbar .pz-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .08);
}

.topbar .pz-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 .2rem rgba(20, 72, 34, .25);
}

/* Navbar buttons should match the rectangular look */
.topbar .pz-btn,
.topbar .dropdown-toggle {
  border-radius: 0.375rem !important;
}

.topbar .pz-icon {
  margin-right: .4rem;
}

.topbar .nav-link.pz-link[aria-current="page"] {
  background: rgba(120, 163, 64, 0.12);
  box-shadow: inset 0 0 0 1px rgba(20, 72, 34, 0.2);
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--brand-primary) !important;
  color: #fff !important;
}

.dropdown-item:focus,
.dropdown-item:hover {
  background-color: rgba(120, 163, 64, 0.12) !important;
  color: var(--brand-primary) !important;
}

.bg-gradient-primary {
  background-color: var(--brand-primary) !important;
  background-image: linear-gradient(180deg, var(--brand-secondary) 10%, var(--brand-primary) 100%) !important;
  background-size: cover !important;
}

/* Normalize pill styles to squared corners */
.pill,
.rounded-pill {
  border-radius: 0.375rem !important;
}

@media (min-width: 992px) {
  .navbar-nav .dropdown:hover > .dropdown-menu {
    display: block;
  }

  .navbar-nav .dropdown:hover > .dropdown-toggle::after {
    transform: rotate(180deg);
  }

  .navbar-nav .dropdown-toggle::after {
    transition: transform 0.15s ease-in-out;
  }
}

/* Global dark theme (scoped) */
html[data-theme="dark"] body,
html[data-theme="dark"] .bg-light {
  background-color: #0f1115 !important;
  color: #e6e8eb;
}

html[data-theme="dark"],
html[data-theme="dark"] #page-top,
html[data-theme="dark"] .content,
html[data-theme="dark"] .content-wrapper,
html[data-theme="dark"] #content,
html[data-theme="dark"] #content-wrapper,
html[data-theme="dark"] .page-content,
html[data-theme="dark"] main {
  background-color: #0f1115 !important;
  color: #e6e8eb !important;
}

html[data-theme="dark"] .container,
html[data-theme="dark"] .container-fluid {
  background-color: transparent !important;
}

html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .card,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .dropdown-menu {
  background-color: #161a1f !important;
  color: #e6e8eb !important;
  border-color: #2a313b !important;
}

html[data-theme="dark"] .card-header,
html[data-theme="dark"] .card-footer,
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
  background-color: #1b2129 !important;
  border-color: #2a313b !important;
}

html[data-theme="dark"] .table {
  --bs-table-bg: #151a20;
  --bs-table-color: #e6e8eb;
  --bs-table-border-color: #2a313b;
  --bs-table-striped-bg: #1a2028;
  --bs-table-striped-color: #e6e8eb;
  --bs-table-hover-bg: #212837;
  --bs-table-hover-color: #e6e8eb;
  color: #e6e8eb !important;
  border-color: #2a313b !important;
}

html[data-theme="dark"] .table th,
html[data-theme="dark"] .table td {
  background-color: transparent !important;
  color: #e6e8eb !important;
  border-color: #2a313b !important;
}

html[data-theme="dark"] .table-light {
  --bs-table-bg: #1b2129;
  --bs-table-striped-bg: #171c23;
  color: #e6e8eb !important;
}

html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: #151a20 !important;
  color: #e6e8eb !important;
}

html[data-theme="dark"] .table-hover > tbody > tr:hover > * {
  background-color: #1c232d !important;
  color: #e6e8eb !important;
}

html[data-theme="dark"] .text-muted {
  color: #a8b0ba !important;
}

html[data-theme="dark"] .text-bg-light {
  background-color: #1b2129 !important;
  color: #e6e8eb !important;
}

html[data-theme="dark"] hr {
  border-color: #2a313b !important;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .form-check-input,
html[data-theme="dark"] .input-group-text {
  background-color: #12161c !important;
  color: #e6e8eb !important;
  border-color: #2a313b !important;
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
  border-color: #4b5a6b !important;
  box-shadow: 0 0 0 0.2rem rgba(120, 163, 64, 0.2) !important;
}

html[data-theme="dark"] .form-check-input:checked {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}

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

html[data-theme="dark"] .dropdown-item:focus,
html[data-theme="dark"] .dropdown-item:hover {
  background-color: #202733 !important;
  color: #e6e8eb !important;
}

html[data-theme="dark"] .list-group-item {
  background-color: #161a1f !important;
  color: #e6e8eb !important;
  border-color: #2a313b !important;
}

html[data-theme="dark"] .text-dark,
html[data-theme="dark"] .text-body,
html[data-theme="dark"] .text-black {
  color: #e6e8eb !important;
}

html[data-theme="dark"] .navbar,
html[data-theme="dark"] .navbar-light {
  background-color: #151a20 !important;
  color: #e6e8eb !important;
  border-color: #2a313b !important;
}

html[data-theme="dark"] .navbar-light .navbar-brand,
html[data-theme="dark"] .navbar-light .navbar-nav .nav-link,
html[data-theme="dark"] .navbar-light .navbar-text {
  color: #e6e8eb !important;
}

html[data-theme="dark"] .navbar-light .navbar-nav .nav-link:hover,
html[data-theme="dark"] .navbar-light .navbar-nav .nav-link:focus {
  color: #ffffff !important;
}

html[data-theme="dark"] .navbar-light .navbar-toggler {
  border-color: #2a313b !important;
}

html[data-theme="dark"] .navbar-light .navbar-toggler-icon {
  filter: invert(1) brightness(1.2);
}

html[data-theme="dark"] .alert {
  background-color: #1b2129 !important;
  color: #e6e8eb !important;
  border-color: #2a313b !important;
}

html[data-theme="dark"] .alert-success {
  background-color: #10241a !important;
  border-color: #1f3b29 !important;
  color: #d8f3e1 !important;
}

html[data-theme="dark"] .alert-danger {
  background-color: #2a1414 !important;
  border-color: #4a2020 !important;
  color: #f6d4d4 !important;
}

html[data-theme="dark"] .alert-warning {
  background-color: #2b2411 !important;
  border-color: #4a3b1a !important;
  color: #f5e7b7 !important;
}

html[data-theme="dark"] .alert-info {
  background-color: #12232b !important;
  border-color: #1f3b4a !important;
  color: #cfe8f4 !important;
}

html[data-theme="dark"] .badge.bg-light,
html[data-theme="dark"] .badge.text-bg-light {
  background-color: #1b2129 !important;
  color: #e6e8eb !important;
  border: 1px solid #2a313b !important;
}

html[data-theme="dark"] .badge.bg-warning,
html[data-theme="dark"] .badge.bg-success,
html[data-theme="dark"] .badge.bg-danger,
html[data-theme="dark"] .badge.bg-info {
  color: #101418 !important;
}

html[data-theme="dark"] .inv-edit-btn {
  color: #eaffc2 !important;
  border-color: #9bd157 !important;
  background-color: rgba(120, 163, 64, 0.12) !important;
}

html[data-theme="dark"] .inv-edit-btn:hover,
html[data-theme="dark"] .inv-edit-btn:focus {
  color: #0f1115 !important;
  background-color: #b6ea72 !important;
  border-color: #b6ea72 !important;
  box-shadow: 0 0 0 0.2rem rgba(182, 234, 114, 0.25) !important;
}

html[data-theme="dark"] .login-page {
  background-color: #0b0e12 !important;
  background-image: none !important;
}

html[data-theme="dark"] .login-card {
  background-color: #151a20 !important;
  border: 1px solid #2a313b !important;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.45) !important;
}

html[data-theme="dark"] .login-form .form-text,
html[data-theme="dark"] .login-form .text-muted {
  color: #a8b0ba !important;
}

.topbar {
  --mobile-topbar-height: 64px;
  --mobile-bottom-nav-height: 72px;
  position: sticky;
  top: 0;
  z-index: 1034;
}

.topbar .container-fluid {
  gap: .25rem;
}

.topbar .mobile-drawer-header {
  display: none;
  align-items: center;
}

.topbar .mobile-drawer-close {
  text-decoration: none;
}

.topbar .mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1034;
  height: var(--mobile-bottom-nav-height);
  padding: .45rem calc(.5rem + env(safe-area-inset-right)) .45rem calc(.5rem + env(safe-area-inset-left));
  border-top: 1px solid var(--bs-border-color);
  background-color: var(--bs-body-bg);
  box-shadow: 0 -10px 28px rgba(0, 0, 0, .12);
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .4rem;
  align-items: stretch;
}

.mobile-bottom-link {
  border: 1px solid transparent;
  border-radius: .65rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: .08rem;
  color: var(--brand-muted) !important;
  text-decoration: none;
  min-width: 0;
  min-height: 100%;
  padding: .15rem .15rem;
  background: transparent;
  border-radius: .65rem;
  font-size: .72rem;
  line-height: 1;
  transition: transform .12s ease, box-shadow .12s ease, color .12s ease, border-color .12s ease;
}

.mobile-bottom-link i {
  font-size: .98rem;
  line-height: 1;
}

.mobile-bottom-link span {
  display: block;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-bottom-link:hover,
.mobile-bottom-link:focus-visible,
.mobile-bottom-link.active {
  color: var(--brand-primary) !important;
  border-color: rgba(20, 72, 34, 0.2);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 16px rgba(20, 72, 34, .1);
}

.mobile-bottom-action {
  border: 1px solid var(--bs-border-color);
  background: transparent;
}

.mobile-bottom-action:focus-visible {
  outline: none;
  box-shadow: 0 0 0 .2rem rgba(20, 72, 34, .22);
}

@media (max-width: 767.98px) {
  .topbar {
    padding-top: .45rem;
    padding-bottom: .45rem;
  }

  .topbar .mobile-drawer-header {
    display: flex;
  }

  #content,
  #content-wrapper {
    padding-bottom: calc(var(--mobile-bottom-nav-height) + 8px);
  }

  .topbar .navbar-collapse {
    position: fixed;
    top: calc(var(--mobile-topbar-height));
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bs-body-bg);
    border-top: 1px solid var(--bs-border-color);
    margin: 0 !important;
    padding: .5rem .75rem calc(var(--mobile-bottom-nav-height) + .6rem);
    box-shadow: 0 18px 34px rgba(0, 0, 0, .2);
    overflow-y: auto;
    z-index: 1033;
  }

  .topbar .navbar-collapse:not(.show) {
    display: none !important;
  }

  .topbar .navbar-collapse .topbar-nav .nav-item {
    width: 100%;
  }

  .topbar .topbar-nav .pz-btn,
  .topbar .topbar-nav .dropdown-toggle {
    min-height: 48px;
    width: 100% !important;
    justify-content: flex-start;
    border-radius: .65rem;
  }

  .topbar .topbar-nav .dropdown-menu {
    width: 100%;
    margin-top: .35rem;
    box-shadow: none;
    border-radius: .6rem;
    padding: .45rem;
  }

  .topbar .topbar-nav .dropdown-item {
    min-height: 44px;
    border-radius: .55rem;
    display: flex;
    align-items: center;
  }

  .topbar .mobile-bottom-nav {
    display: grid;
  }

  .mobile-bottom-link {
    min-height: 100%;
  }

  .topbar .navbar-brand {
    padding-right: .25rem;
    min-width: 0;
  }

  .topbar .navbar-brand img {
    height: 30px;
    max-width: 100%;
  }

  .topbar .navbar-toggler {
    padding: .45rem .5rem;
    border-radius: .65rem;
  }

  .topbar .navbar-nav .nav-link {
    min-height: 44px;
  }

  .mobile-nav-open {
    overflow: hidden;
  }

  .btn,
  .form-control,
  .form-select,
  .form-check-input,
  .input-group-text {
    min-height: 44px;
  }

  .card,
  .card-body {
    border-radius: .7rem;
  }

  .mobile-stack-table {
    border: 0;
    --mobile-stack-label-width: 7.5rem;
    display: block;
    width: 100%;
    max-width: 100%;
  }

  .mobile-stack-table thead {
    display: none;
  }

  .mobile-stack-table tbody {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  .mobile-stack-table tfoot {
    display: none;
  }

  .mobile-stack-table tbody tr {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--bs-border-color);
    border-radius: .7rem;
    margin-bottom: .75rem;
    padding: .5rem .7rem;
    background-color: var(--bs-body-bg);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .05);
  }

  .mobile-stack-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .mobile-stack-table tbody tr td,
  .mobile-stack-table tbody tr th {
    position: relative;
    display: block;
    width: 100%;
    min-height: auto;
    border: 0;
    border-top: 1px solid var(--bs-border-color);
    padding: .45rem 0;
    margin: 0;
    text-align: left;
  }

  .mobile-stack-table tbody tr td:first-child,
  .mobile-stack-table tbody tr th:first-child {
    border-top: 0;
    padding-top: 0;
  }

  .mobile-stack-table td::before,
  .mobile-stack-table th::before {
    content: attr(data-mobile-label);
    display: block;
    width: 100%;
    max-width: var(--mobile-stack-label-width);
    margin-bottom: .2rem;
    color: var(--bs-secondary-color);
    font-size: .775rem;
    font-weight: 600;
    letter-spacing: 0;
  }

  .mobile-stack-table tbody tr.mobile-empty-row td {
    display: block;
    text-align: center;
    padding-top: .45rem;
    padding-bottom: .45rem;
  }

  .mobile-stack-table tbody tr.mobile-empty-row td::before {
    display: none;
    content: none;
  }

  .mobile-empty-state,
  .empty-state {
    border: 1px dashed var(--bs-border-color);
    border-radius: .7rem;
    padding: .8rem 1rem;
    text-align: center;
    font-size: .95rem;
    color: var(--bs-secondary-color);
    background: rgba(20, 72, 34, 0.04);
  }

  html[data-theme="dark"] .mobile-empty-state,
  html[data-theme="dark"] .empty-state {
    background: rgba(120, 163, 64, 0.08);
  }

  .mobile-sticky-action-bar {
    position: sticky;
    top: calc(var(--mobile-topbar-height, 0px) + env(safe-area-inset-top, 0px) + 0.35rem);
    z-index: 12;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.7rem;
    background: color-mix(in srgb, var(--bs-body-bg) 92%, transparent);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .mobile-sticky-action-bar .form-control,
  .mobile-sticky-action-bar .form-select,
  .mobile-sticky-action-bar .form-check-input,
  .mobile-sticky-action-bar .input-group-text {
    min-height: 44px;
  }

  .mobile-sticky-action-bar .form-control,
  .mobile-sticky-action-bar .form-select {
    width: 100%;
  }

  .mobile-sticky-action-bar .mobile-filter-toolbar .btn,
  .mobile-stack-table .mobile-action-grid .btn,
  .mobile-stack-table .mobile-row-action .btn {
    width: 100%;
  }

  .mobile-sticky-action-bar .input-group {
    flex-wrap: nowrap;
  }

  .mobile-filter-toolbar {
    row-gap: 0.6rem !important;
  }

  .mobile-action-grid {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
  }

  .mobile-action-grid .btn,
  .mobile-action-grid .btn-group,
  .mobile-action-grid form,
  .mobile-action-grid .btn-group .btn {
    min-height: 44px;
  }

  .mobile-stack-table .mobile-row-action,
  .mobile-stack-table .mobile-action-grid {
    margin-top: 0.45rem;
    width: 100%;
  }

  .mobile-stack-table .mobile-action-grid .btn,
  .mobile-stack-table .mobile-action-grid .btn-group .btn,
  .mobile-stack-table .mobile-row-action .btn,
  .mobile-stack-table .mobile-row-action form .btn {
    width: 100%;
  }

  .mobile-stack-table .mobile-action-grid form,
  .mobile-stack-table .mobile-row-action form {
    width: 100%;
    display: block;
  }
}

@media (min-width: 768px) {
  .topbar .mobile-bottom-nav {
    display: none;
  }

  .mobile-nav-open {
    overflow: auto;
  }
}

/* Inventory pages rebuild: shared mobile-safe shell + centered content */
body.inventory-page {
  --inventory-shell-max: 1240px;
  --inventory-page-padding: clamp(.85rem, 2.2vw, 1.5rem);
}

body.inventory-page .inventory-page-shell {
  width: min(100%, var(--inventory-shell-max));
  margin-inline: auto;
  padding-left: var(--inventory-page-padding) !important;
  padding-right: var(--inventory-page-padding) !important;
  padding-top: .25rem;
  padding-bottom: 2rem;
}

body.inventory-page .container-fluid.inventory-page-shell,
body.inventory-page .container.inventory-page-shell {
  --bs-gutter-x: 0;
}

body.inventory-page .center-wrap {
  width: 100% !important;
  max-width: 100% !important;
  margin-inline: auto !important;
  padding: 0 !important;
}

body.inventory-page .center-wrap > .card,
body.inventory-page .center-wrap > .card.shadow,
body.inventory-page .center-wrap > .card.shadow-sm {
  width: 100% !important;
}

body.inventory-page .container.py-4.px-3.inventory-page-shell .card {
  width: 100%;
}

body.inventory-page #content > .inventory-page-shell,
body.inventory-page > .inventory-page-shell {
  width: min(100%, var(--inventory-shell-max)) !important;
}

body.inventory-page .inventory-page-shell > .row.justify-content-center {
  margin-inline: 0;
}

body.inventory-page .inventory-page-shell > .row.justify-content-center > [class*="col-"] {
  padding-left: 0;
  padding-right: 0;
}

body.inventory-page .inventory-page-shell > .row.justify-content-center > .col-lg-8 {
  max-width: 920px;
}

body.inventory-page .inventory-workflow-wrap {
  flex: 0 1 920px !important;
  width: min(100%, 920px) !important;
  max-width: 920px !important;
}

body.inventory-page .inventory-workflow-card .card-body {
  padding: clamp(1rem, 1.7vw, 1.35rem);
}

body.inventory-page .inventory-scan-form {
  align-items: flex-end;
}

body.inventory-page .inventory-scan-form .form-text {
  min-height: 1.25rem;
}

body.inventory-page .inventory-scan-form .mobile-action-grid {
  justify-content: flex-end;
}

body.inventory-page .inventory-list-header {
  gap: .75rem;
}

body.inventory-page .inventory-page-shell > .row.justify-content-center > .col-lg-8 > .row,
body.inventory-page .inventory-page-shell > .row.justify-content-center > .col-lg-8 > .row > .col {
  margin-inline: 0;
  padding-inline: 0;
}

body.inventory-page .card {
  overflow: hidden;
}

body.inventory-page .card-header {
  gap: .75rem;
}

body.inventory-page .card-header > div:first-child {
  min-width: min(100%, 16rem);
}

body.inventory-page .card-header h5,
body.inventory-page .card-header .h5 {
  color: var(--app-heading) !important;
}

body.inventory-page .card-header .badge,
body.inventory-page .card-header .btn,
body.inventory-page .card-header .form-control,
body.inventory-page .card-header .form-select,
body.inventory-page .inventory-filter-form .btn,
body.inventory-page .mobile-filter-toolbar .btn {
  white-space: nowrap;
}

body.inventory-page .inventory-toolbar,
body.inventory-page .mobile-filter-toolbar {
  width: 100%;
}

body.inventory-page .inventory-filter-form .input-group,
body.inventory-page .mobile-filter-toolbar .input-group {
  min-width: 0;
}

body.inventory-page .table-responsive {
  border-top: 1px solid var(--app-border);
}

body.inventory-page .table-responsive[style*="max-height"] {
  border-radius: 0;
}

body.inventory-page .table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--app-surface-muted) !important;
}

body.inventory-page .table td,
body.inventory-page .table th {
  vertical-align: middle;
}

body.inventory-page .catalog-stat,
body.inventory-page .history-stat {
  border-color: var(--app-border) !important;
  border-radius: var(--app-radius) !important;
  background: var(--app-surface) !important;
  box-shadow: var(--app-shadow-sm) !important;
}

body.inventory-page .catalog-stat-value,
body.inventory-page .history-stat-value {
  font-size: 1.45rem;
}

body.inventory-page .asset-summary,
body.inventory-page .component-editor {
  border-color: var(--app-border) !important;
  border-radius: var(--app-radius) !important;
  background: var(--app-surface-muted) !important;
}

body.inventory-page .tracking-photo-thumb,
body.inventory-page .catalog-photo-thumb,
body.inventory-page .inventory-thumb-button,
body.inventory-page .tracking-gallery-thumb,
body.inventory-page .catalog-gallery-thumb,
body.inventory-page .inventory-gallery-thumb {
  border-radius: var(--app-radius-sm) !important;
  border-color: var(--app-border) !important;
}

body.inventory-page .tracking-gallery-stage,
body.inventory-page .catalog-gallery-stage,
body.inventory-page .inventory-gallery-stage {
  border-radius: var(--app-radius) !important;
  border-color: var(--app-border) !important;
  background: var(--app-surface-muted) !important;
}

body.inventory-page .photo-gallery-card .card-body {
  background: var(--app-surface-muted) !important;
}

@media (max-width: 767.98px) {
  body.inventory-page .inventory-page-shell,
  body.inventory-page .card,
  body.inventory-page .card-body,
  body.inventory-page .table-responsive {
    width: 100%;
    max-width: 100%;
  }

  body.inventory-page .inventory-page-shell {
    padding-top: 0;
    padding-bottom: calc(var(--mobile-bottom-nav-height) + 1rem);
  }

  body.inventory-page .card-header {
    align-items: stretch !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: .65rem !important;
  }

  body.inventory-page .mobile-sticky-action-bar {
    position: static;
    top: auto;
    z-index: auto;
    margin-bottom: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.inventory-page .card-header > div,
  body.inventory-page .card-header > span,
  body.inventory-page .card-header > .btn,
  body.inventory-page .card-header > .d-flex {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.inventory-page .card-header .badge {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }

  body.inventory-page .card-header .btn,
  body.inventory-page .card-header .form-control,
  body.inventory-page .card-header .form-select {
    width: 100% !important;
  }

  body.inventory-page .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.inventory-page .center-wrap > .d-flex.justify-content-between {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  body.inventory-page .center-wrap > .d-flex.justify-content-between > div,
  body.inventory-page .center-wrap > .d-flex.justify-content-between > .d-flex {
    width: 100%;
    min-width: 0;
  }

  body.inventory-page .center-wrap > .d-flex.justify-content-between > .d-flex,
  body.inventory-page .card-header > .d-flex {
    display: grid !important;
    align-items: stretch !important;
  }

  body.inventory-page .center-wrap > .d-flex.justify-content-between > .d-flex {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.inventory-page .card-header > .d-flex {
    grid-template-columns: minmax(0, 1fr);
  }

  body.inventory-page .center-wrap > .d-flex.justify-content-between > .d-flex > *,
  body.inventory-page .card-header > .d-flex > * {
    width: 100% !important;
    min-width: 0;
  }

  body.inventory-page .center-wrap > .d-flex.justify-content-between > .d-flex .btn,
  body.inventory-page .card-header > .d-flex .btn {
    justify-content: center;
    white-space: normal;
  }

  body.inventory-page .inventory-toolbar > .d-flex {
    align-items: stretch !important;
    width: 100%;
  }

  body.inventory-page .inventory-toolbar > .d-flex > * {
    width: 100%;
    min-width: 0;
  }

  body.inventory-page .inventory-filter-form .input-group {
    flex-wrap: wrap;
  }

  body.inventory-page .inventory-filter-form .input-group .btn {
    flex: 1 0 100%;
    width: 100%;
    margin-top: .45rem;
    border-radius: var(--app-radius-sm) !important;
  }

  body.inventory-page .inventory-filter-form .input-group .form-control {
    border-radius: var(--app-radius-sm) !important;
  }

  body.inventory-page .card-body > .d-flex.justify-content-between {
    align-items: stretch !important;
    flex-wrap: wrap !important;
    gap: .6rem !important;
  }

  body.inventory-page .card-body > .d-flex.justify-content-between > h6,
  body.inventory-page .card-body > .d-flex.justify-content-between > .btn,
  body.inventory-page .card-body > .d-flex.justify-content-between > button,
  body.inventory-page .card-body > .d-flex.justify-content-between > a {
    width: 100%;
  }

  body.inventory-page .inventory-workflow-wrap {
    flex-basis: 100% !important;
  }

  body.inventory-page .inventory-list-header {
    align-items: stretch !important;
    flex-wrap: wrap !important;
  }

  body.inventory-page .inventory-list-header > h6,
  body.inventory-page .inventory-list-header > .btn,
  body.inventory-page .inventory-list-header > button,
  body.inventory-page .inventory-list-header > a {
    width: 100%;
  }

  body.inventory-page .mobile-action-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
    align-items: stretch !important;
    justify-content: stretch !important;
    width: 100%;
  }

  body.inventory-page .mobile-action-grid .btn,
  body.inventory-page .mobile-action-grid a,
  body.inventory-page .mobile-action-grid button,
  body.inventory-page .mobile-action-grid form {
    width: 100% !important;
    min-width: 0;
  }

  body.inventory-page .inventory-mobile-header {
    display: block !important;
  }

  body.inventory-page .inventory-toolbar,
  body.inventory-page .inventory-filter-form,
  body.inventory-page .inventory-chip-grid,
  body.inventory-page .pagination {
    width: 100%;
    max-width: 100%;
  }

  body.inventory-page .inventory-filter-form {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch !important;
    gap: .55rem !important;
  }

  body.inventory-page .inventory-filter-form label {
    margin-bottom: 0;
  }

  body.inventory-page .inventory-filter-form .input-group,
  body.inventory-page .inventory-filter-form .form-select,
  body.inventory-page .inventory-filter-form .btn,
  body.inventory-page .mobile-filter-toolbar .input-group,
  body.inventory-page .mobile-filter-toolbar .form-control,
  body.inventory-page .mobile-filter-toolbar .form-select,
  body.inventory-page .mobile-filter-toolbar .btn {
    width: 100% !important;
  }

  body.inventory-page .inventory-chip-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem !important;
  }

  body.inventory-page .inventory-chip-grid .btn {
    width: 100%;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem !important;
    text-align: center;
    white-space: normal;
  }

  body.inventory-page #inventoryTable,
  body.inventory-page #inventoryTable tbody,
  body.inventory-page #inventoryTable tr,
  body.inventory-page #inventoryTable td {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.inventory-page #inventoryTable {
    table-layout: fixed;
  }

  body.inventory-page #inventoryTable tbody {
    display: grid;
    gap: .75rem;
  }

  body.inventory-page #inventoryTable tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 0;
    overflow: hidden;
  }

  body.inventory-page #inventoryTable tbody tr td,
  body.inventory-page #inventoryTable tbody tr th {
    display: grid;
    grid-template-columns: minmax(5.5rem, 32%) minmax(0, 1fr);
    align-items: center;
    gap: .75rem;
    text-align: left !important;
    min-width: 0;
  }

  body.inventory-page #inventoryTable td::before,
  body.inventory-page #inventoryTable th::before {
    max-width: none;
    margin-bottom: 0;
  }

  body.inventory-page #inventoryTable .mobile-action-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
    width: 100%;
  }

  body.inventory-page #inventoryTable .mobile-action-grid .btn {
    width: 100%;
  }

  body.inventory-page #inventoryTable tbody tr.mobile-empty-row td {
    display: block;
  }
}

/* Modern application refresh */
:root {
  --brand-primary: #14523a;
  --brand-primary-dark: #0d3828;
  --brand-secondary: #2f7c8c;
  --brand-muted: #60746c;
  --brand-soft: #d9eadf;
  --app-bg: #f4f7f6;
  --app-surface: #ffffff;
  --app-surface-muted: #f7faf9;
  --app-surface-strong: #eef4f1;
  --app-border: #dce5e1;
  --app-text: #26332e;
  --app-text-muted: #66756f;
  --app-heading: #14241d;
  --app-shadow: 0 10px 28px rgba(20, 38, 32, .08);
  --app-shadow-sm: 0 4px 14px rgba(20, 38, 32, .06);
  --app-focus: 0 0 0 .2rem rgba(47, 124, 140, .2);
  --app-radius: .5rem;
  --app-radius-sm: .375rem;
}

html[data-theme="dark"] {
  --brand-primary: #9bd157;
  --brand-primary-dark: #b6ea72;
  --brand-secondary: #7ec8d6;
  --brand-muted: #a8b6af;
  --brand-soft: #213626;
  --app-bg: #101418;
  --app-surface: #171d22;
  --app-surface-muted: #1d252b;
  --app-surface-strong: #243039;
  --app-border: #2c3842;
  --app-text: #e7ece9;
  --app-text-muted: #a9b5af;
  --app-heading: #f5faf7;
  --app-shadow: 0 14px 32px rgba(0, 0, 0, .34);
  --app-shadow-sm: 0 8px 20px rgba(0, 0, 0, .26);
  --app-focus: 0 0 0 .2rem rgba(126, 200, 214, .24);
}

html {
  min-height: 100%;
}

body,
body#page-top,
body.bg-light {
  min-height: 100vh;
  background: var(--app-bg) !important;
  color: var(--app-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}

#wrapper,
#content-wrapper,
#content {
  min-height: 100vh;
}

#content {
  padding-bottom: 1.5rem;
}

#content > .container,
#content > .container-fluid,
body > .container-fluid:not(.submission-shell):not(.document-shell),
body > .container {
  width: min(100%, 1320px);
  margin-inline: auto;
  padding-left: clamp(.85rem, 2.2vw, 1.5rem);
  padding-right: clamp(.85rem, 2.2vw, 1.5rem);
}

body.inventory-page .inventory-page-shell,
.forms-shell,
.form-builder-shell,
.submission-shell,
.document-shell {
  width: min(100%, var(--inventory-shell-max, 1240px));
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  color: var(--app-heading);
  letter-spacing: 0;
}

.text-muted,
.form-text,
.small.text-muted {
  color: var(--app-text-muted) !important;
}

a {
  color: var(--brand-primary);
}

a:hover,
a:focus {
  color: var(--brand-primary-dark);
}

.bg-white,
.bg-light {
  background-color: var(--app-surface) !important;
}

.bg-body,
.bg-body-tertiary,
.bg-body-secondary,
.bg-body-subtle {
  background-color: var(--app-surface-muted) !important;
}

.card,
.modal-content,
.dropdown-menu,
.list-group-item,
.forms-section,
.builder-panel,
.submission-section,
.document-panel,
.metric-card,
.form-filter-panel,
.builder-toolbar,
.submission-intro,
.selection-card,
.submission-card,
.form-switcher,
.form-actions,
.compact-field,
.form-section-card,
.submit-sticky-bar {
  background: var(--app-surface) !important;
  border: 1px solid var(--app-border) !important;
  border-radius: var(--app-radius) !important;
  color: var(--app-text);
}

.card,
.shadow,
.shadow-sm,
.login-card {
  box-shadow: var(--app-shadow-sm) !important;
}

.card:hover {
  box-shadow: var(--app-shadow) !important;
}

.card-header,
.card-footer,
.modal-header,
.modal-footer,
.forms-section-header,
.builder-panel-header,
.submission-section-header,
.submission-card .card-header {
  background: var(--app-surface-muted) !important;
  border-color: var(--app-border) !important;
}

.card-header {
  border-top-left-radius: var(--app-radius) !important;
  border-top-right-radius: var(--app-radius) !important;
}

.card-footer {
  border-bottom-left-radius: var(--app-radius) !important;
  border-bottom-right-radius: var(--app-radius) !important;
}

.btn {
  border-radius: var(--app-radius-sm) !important;
  font-weight: 650;
  letter-spacing: 0;
  box-shadow: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .25rem;
}

.btn:hover,
.btn:focus {
  box-shadow: var(--app-shadow-sm) !important;
}

.btn:focus-visible,
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.page-link:focus {
  box-shadow: var(--app-focus) !important;
}

.btn-primary {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--brand-primary-dark) !important;
  border-color: var(--brand-primary-dark) !important;
}

.btn-outline-primary {
  color: var(--brand-primary) !important;
  border-color: rgba(20, 82, 58, .38) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary.active {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: #fff !important;
}

.btn-outline-secondary,
.btn-outline-dark {
  color: var(--app-text) !important;
  border-color: var(--app-border) !important;
  background: var(--app-surface) !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-dark:hover,
.btn-outline-dark:focus {
  background: var(--app-surface-strong) !important;
  color: var(--app-heading) !important;
  border-color: var(--app-border) !important;
}

.form-control,
.form-select,
.input-group-text {
  background-color: var(--app-surface) !important;
  border-color: var(--app-border) !important;
  border-radius: var(--app-radius-sm) !important;
  color: var(--app-text) !important;
}

.input-group > .form-control:not(:first-child),
.input-group > .form-select:not(:first-child),
.input-group > .input-group-text:not(:first-child) {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.input-group > .form-control:not(:last-child),
.input-group > .form-select:not(:last-child),
.input-group > .input-group-text:not(:last-child) {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.form-label {
  color: var(--app-heading);
}

.form-check-input {
  border-color: var(--app-border) !important;
}

.form-check-input:checked {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}

.badge,
.pill,
.rounded-pill {
  border-radius: var(--app-radius-sm) !important;
  font-weight: 650;
  letter-spacing: 0;
}

.badge.bg-light,
.badge.text-bg-light,
.text-bg-light {
  background: var(--app-surface-strong) !important;
  color: var(--app-text) !important;
  border-color: var(--app-border) !important;
}

.table {
  --bs-table-bg: var(--app-surface);
  --bs-table-color: var(--app-text);
  --bs-table-border-color: var(--app-border);
  --bs-table-striped-bg: var(--app-surface-muted);
  --bs-table-striped-color: var(--app-text);
  --bs-table-hover-bg: var(--app-surface-strong);
  --bs-table-hover-color: var(--app-heading);
  color: var(--app-text);
  border-color: var(--app-border);
}

.table > :not(caption) > * > * {
  border-bottom-color: var(--app-border);
  padding-top: .8rem;
  padding-bottom: .8rem;
}

.table thead th,
.table-light th,
.table tfoot th {
  background: var(--app-surface-muted) !important;
  color: var(--app-heading) !important;
  border-color: var(--app-border) !important;
  font-size: .83rem;
  font-weight: 750;
  letter-spacing: 0;
}

.table-responsive {
  border-radius: var(--app-radius);
}

.pagination {
  gap: .2rem;
}

.page-link {
  border-radius: var(--app-radius-sm) !important;
  min-width: 2rem;
  text-align: center;
  background: var(--app-surface) !important;
  color: var(--brand-primary) !important;
  border-color: var(--app-border) !important;
}

.page-item.active .page-link {
  background: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: #fff !important;
}

.alert {
  border-radius: var(--app-radius) !important;
  border-width: 1px;
}

.topbar {
  --mobile-topbar-height: 68px;
  background: rgba(255, 255, 255, .92) !important;
  border-bottom: 1px solid var(--app-border);
  box-shadow: 0 6px 18px rgba(20, 38, 32, .06) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.topbar .container-fluid {
  width: min(100%, 1440px);
  padding: .65rem clamp(.85rem, 2vw, 1.5rem);
}

.navbar-brand {
  min-height: 42px;
}

.navbar-brand img {
  max-height: 34px;
}

.topbar .topbar-nav {
  gap: .35rem !important;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar .topbar-nav .btn {
  min-height: 38px;
  padding: .45rem .7rem;
}

.topbar-link {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--app-radius-sm);
  color: var(--app-text) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .45rem .68rem;
  text-decoration: none !important;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}

.topbar-link i {
  color: var(--brand-muted);
  font-size: .95rem;
  line-height: 1;
}

.topbar-link:hover,
.topbar-link:focus,
.topbar-link.show {
  background: var(--app-surface-strong) !important;
  border-color: var(--app-border) !important;
  color: var(--app-heading) !important;
}

.topbar-link.active {
  background: var(--brand-soft) !important;
  border-color: rgba(20, 82, 58, .18) !important;
  color: var(--brand-primary) !important;
}

.topbar-link.active i,
.topbar-link:hover i,
.topbar-link:focus i,
.topbar-link.show i {
  color: currentColor;
}

.topbar-link.dropdown-toggle::after {
  width: .42rem;
  height: .42rem;
  border: 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  margin-left: .18rem;
  margin-top: -.16rem;
  transform: rotate(45deg);
  transition: transform .12s ease;
  vertical-align: middle;
}

.topbar-link.dropdown-toggle.show::after,
.topbar .dropdown:hover > .topbar-link.dropdown-toggle::after {
  transform: rotate(225deg);
  margin-top: .16rem;
}

.topbar .topbar-nav .btn-primary,
.topbar .topbar-nav .dropdown-toggle.btn-primary {
  background: transparent !important;
  border-color: transparent !important;
  color: var(--app-text) !important;
}

.topbar .topbar-nav .btn-primary:hover,
.topbar .topbar-nav .btn-primary:focus,
.topbar .topbar-nav .dropdown-toggle.btn-primary:hover,
.topbar .topbar-nav .dropdown-toggle.btn-primary:focus {
  background: var(--app-surface-strong) !important;
  border-color: var(--app-border) !important;
  color: var(--app-heading) !important;
}

.topbar .topbar-nav .btn-primary.active,
.topbar .topbar-nav .btn-primary[aria-current="page"] {
  background: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: #fff !important;
}

.topbar-divider {
  display: block;
  width: 1px;
  min-height: 28px;
  background: var(--app-border);
}

.dropdown-menu {
  padding: .45rem;
  box-shadow: var(--app-shadow) !important;
}

.dropdown-item {
  border-radius: var(--app-radius-sm);
  border: 0;
  color: var(--app-text) !important;
  padding: .55rem .7rem;
  width: 100%;
  text-align: left;
}

.topbar .dropdown-item i {
  color: var(--brand-muted);
  flex: 0 0 1rem;
  text-align: center;
}

.topbar .dropdown-item.text-danger,
.topbar .dropdown-item.text-danger i {
  color: #dc3545 !important;
}

.dropdown-item:focus,
.dropdown-item:hover {
  background: var(--app-surface-strong) !important;
  color: var(--brand-primary) !important;
}

.mobile-bottom-link {
  border-radius: var(--app-radius) !important;
}

.mobile-bottom-link:hover,
.mobile-bottom-link:focus-visible,
.mobile-bottom-link.active {
  background: var(--brand-soft);
}

.mobile-bottom-action {
  background: var(--app-surface) !important;
}

.sticky-footer {
  border-top: 1px solid var(--app-border);
  background: var(--app-surface) !important;
  color: var(--app-text-muted);
  padding: 1rem 0;
}

.home-page #content > .container {
  width: min(100%, 1180px);
}

.home-dashboard-header {
  margin-bottom: 1rem;
  padding: 1.25rem 0 .25rem;
}

.home-eyebrow {
  color: var(--brand-secondary);
  font-size: .82rem;
  font-weight: 750;
}

.home-card {
  min-height: 132px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.home-card:hover,
.home-card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(47, 124, 140, .28) !important;
}

.home-card .card-body {
  padding: 1.1rem;
}

.home-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--app-radius);
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  background: var(--brand-soft);
}

.home-card-arrow {
  color: var(--app-text-muted);
  margin-left: auto;
  align-self: center;
}

.login-page {
  min-height: 100vh;
  background: #0f1518 !important;
  color: #e9f2ee;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow-x: hidden;
  padding: clamp(1rem, 3vw, 2rem);
}

.login-card {
  width: min(100%, 1040px);
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  background: #151d21 !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  border-radius: var(--app-radius) !important;
}

.login-visual {
  min-height: 600px;
  background-image: url('/assets/img/ems-login.png');
  background-position: center;
  background-size: cover;
}

.login-form-panel {
  min-height: 600px;
  display: flex;
  align-items: center;
}

.login-form-wrap {
  width: 100%;
  padding: clamp(1.5rem, 5vw, 3rem);
}

.login-mark {
  width: 58px;
  height: 58px;
  border-radius: var(--app-radius);
  display: grid;
  place-items: center;
  background: rgba(155, 209, 87, .14);
  border: 1px solid rgba(155, 209, 87, .26);
  margin-inline: auto;
  margin-bottom: 1rem;
}

.login-mark img {
  max-width: 42px;
  max-height: 42px;
}

.login-form .input-group-text,
.login-form .form-control {
  min-height: 46px;
}

.login-page .text-dark,
.login-page .form-label {
  color: #f5faf7 !important;
}

.login-page .text-muted,
.login-page .form-text {
  color: #a9b5af !important;
}

.login-page .input-group-text,
.login-page .form-control {
  background: #10171b !important;
  border-color: rgba(255, 255, 255, .14) !important;
  color: #f5faf7 !important;
}

.login-page .form-control::placeholder {
  color: #74827c;
}

html[data-theme="dark"] .topbar {
  background: rgba(23, 29, 34, .92) !important;
  border-color: var(--app-border) !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .28) !important;
}

html[data-theme="dark"] .login-page {
  background: #0f1518 !important;
  background-image: none !important;
}

html[data-theme="dark"] .topbar .topbar-nav .btn-primary.active,
html[data-theme="dark"] .topbar .topbar-nav .btn-primary[aria-current="page"] {
  color: #101418 !important;
}

html[data-theme="dark"] .topbar-link.active {
  color: var(--brand-primary) !important;
  border-color: rgba(155, 209, 87, .26) !important;
}

html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .page-item.active .page-link {
  color: #101418 !important;
}

html[data-theme="dark"] .btn-outline-primary {
  color: var(--brand-primary) !important;
  border-color: rgba(155, 209, 87, .45) !important;
}

html[data-theme="dark"] .btn-outline-primary:hover,
html[data-theme="dark"] .btn-outline-primary:focus,
html[data-theme="dark"] .btn-outline-primary.active {
  color: #101418 !important;
}

html[data-theme="dark"] .btn-outline-secondary,
html[data-theme="dark"] .btn-outline-dark {
  background: var(--app-surface) !important;
  color: var(--app-text) !important;
}

html[data-theme="dark"] .dropdown-item:focus,
html[data-theme="dark"] .dropdown-item:hover {
  color: var(--brand-primary) !important;
}

html[data-theme="dark"] .mobile-bottom-link:hover,
html[data-theme="dark"] .mobile-bottom-link:focus-visible,
html[data-theme="dark"] .mobile-bottom-link.active {
  color: var(--brand-primary) !important;
  background: var(--brand-soft);
}

@media (max-width: 767.98px) {
  #content > .container,
  #content > .container-fluid,
  body > .container-fluid:not(.submission-shell):not(.document-shell),
  body > .container {
    padding-left: .8rem;
    padding-right: .8rem;
  }

  .topbar .container-fluid {
    padding-top: .45rem;
    padding-bottom: .45rem;
  }

  .topbar .navbar-collapse {
    background: var(--app-surface) !important;
  }

  .topbar .topbar-nav .btn,
  .topbar .topbar-nav .dropdown-toggle {
    min-height: 46px;
  }

  .topbar .topbar-nav .topbar-link {
    min-height: 46px;
    justify-content: flex-start;
    width: 100%;
  }

  .mobile-bottom-nav {
    border-color: var(--app-border) !important;
    background: var(--app-surface) !important;
  }

  .login-shell {
    padding: 1rem;
    justify-content: flex-start;
  }

  .login-card {
    width: calc(100vw - 3rem);
    max-width: 360px;
  }

  .login-form-panel {
    min-height: auto;
  }

  .login-form-wrap {
    padding: 1.35rem 1.1rem;
    overflow: hidden;
  }

  .g-recaptcha {
    transform: scale(.94);
    transform-origin: center top;
    min-height: 74px;
  }

  .home-dashboard-header {
    padding-top: .75rem;
  }
}

@media (max-width: 991.98px) {
  .topbar .navbar-collapse {
    flex-basis: 100%;
  }

  .topbar .topbar-nav {
    justify-content: flex-start;
    width: 100%;
  }

  .topbar .topbar-nav .nav-item,
  .topbar .topbar-nav .topbar-link {
    width: 100%;
  }

  .topbar .topbar-nav .topbar-link {
    min-height: 46px;
    justify-content: flex-start;
  }

  .topbar .topbar-nav .dropdown-menu {
    width: 100% !important;
    min-width: 0;
    margin-top: .35rem;
    box-shadow: none !important;
  }
}

@media (min-width: 992px) {
  .topbar .dropdown-menu {
    min-width: 13.5rem;
  }

  .topbar-account .dropdown-menu {
    min-width: 12rem;
  }
}
