html {
  font-size: 17px;
}

@media (min-width: 768px) {
  html {
    font-size: 18px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
}

.root {
  --nf-brand-size: 52px;
  --nf-mainnav-max-width: 17rem;
  --nf-mainnav-slide-width: min(17rem, 84vw);
  --nf-mainnav-push-width: min(17rem, 84vw);
  --nf-mainnav-reveal-width: min(17rem, 84vw);
}

.header__brand .brand-img {
  display: inline-flex;
  align-items: center;
}

.header__brand .brand-img img.admin-header-logo {
  display: block;
  width: auto !important;
  height: 52px !important;
  max-width: 260px;
  object-fit: contain;
}

.header__brand .brand-img img {
  width: auto !important;
  height: 52px !important;
  max-width: 260px;
  object-fit: contain;
}

.auth-login-logo {
  display: inline-block;
  width: auto;
  height: 72px;
  max-width: min(320px, 100%);
  object-fit: contain;
}

.admin-filterable-select {
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 0.85rem;
  padding: 0.9rem;
  background: var(--bs-tertiary-bg);
}

.admin-filterable-select .form-select[multiple] {
  min-height: 220px;
}

.admin-filterable-select .badge {
  font-weight: 500;
}

.content__wrap .card {
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.content__wrap .card .card-title {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.content__boxed.vendor-content-wide {
  width: 100%;
  max-width: 1680px;
}

.content__wrap .nav.nav-tabs,
.content__wrap .nav.nav-pills {
  border-bottom: 0;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.content__wrap .nav.nav-tabs .nav-link,
.content__wrap .nav.nav-pills .nav-link {
  border-radius: 999px;
  border: 1px solid rgba(13, 110, 253, 0.2);
  color: var(--bs-body-color);
  font-weight: 500;
  font-size: 0.875rem;
  background: var(--bs-body-bg);
  padding: 0.5rem 0.95rem;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.content__wrap .nav.nav-tabs .nav-link:hover:not(.active),
.content__wrap .nav.nav-pills .nav-link:hover:not(.active) {
  border-color: rgba(13, 110, 253, 0.35);
  color: var(--bs-emphasis-color);
}

.content__wrap .nav.nav-tabs .nav-link.active,
.content__wrap .nav.nav-tabs .nav-item.show .nav-link,
.content__wrap .nav.nav-pills .nav-link.active,
.content__wrap .nav.nav-pills .show > .nav-link {
  color: #fff;
  border-color: #0d6efd;
  background-color: #0d6efd;
}

.content__wrap .nav .nav-link .badge {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.content__wrap .nav .nav-link.active .badge {
  color: #0d6efd !important;
  background-color: #fff !important;
  border-color: rgba(255, 255, 255, 0.85) !important;
}

[data-bs-theme=dark] .content__wrap .card {
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.34);
}

[data-bs-theme=dark] .content__wrap .nav.nav-tabs .nav-link,
[data-bs-theme=dark] .content__wrap .nav.nav-pills .nav-link {
  background: rgba(15, 23, 42, 0.46);
  border-color: rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
}

[data-bs-theme=dark] .content__wrap .nav.nav-tabs .nav-link:hover:not(.active),
[data-bs-theme=dark] .content__wrap .nav.nav-pills .nav-link:hover:not(.active) {
  border-color: rgba(96, 165, 250, 0.5);
  color: #fff;
}

.theme-toggle-btn {
  border-color: var(--bs-border-color);
}

[data-bs-theme=dark] .theme-toggle-btn {
  border-color: rgba(148, 163, 184, 0.45);
}

.admin-header-messages .dropdown-toggle::after {
  display: none;
}

.admin-header-alerts .dropdown-toggle::after {
  display: none;
}

.header-alert-btn {
  position: relative;
}

.header-alert-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #0d6efd;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.header-message-btn {
  position: relative;
}

.header-message-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.admin-message-menu {
  width: min(420px, 94vw);
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--bs-border-color);
}

.admin-message-menu-head,
.admin-message-menu-foot {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--bs-border-color-translucent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.admin-message-menu-foot {
  border-bottom: 0;
  border-top: 1px solid var(--bs-border-color-translucent);
}

.admin-message-menu-foot a {
  font-weight: 600;
  text-decoration: none;
}

.admin-message-menu-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-message-markall-form {
  margin: 0;
}

.admin-message-menu-body {
  max-height: 380px;
  overflow-y: auto;
}

.admin-message-empty {
  padding: 1rem;
  color: var(--bs-secondary-color);
}

.admin-message-item {
  display: block;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--bs-border-color-translucent);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}

.admin-message-item:last-child {
  border-bottom: 0;
}

.admin-message-item:hover {
  background: rgba(var(--bs-primary-rgb), 0.05);
  color: inherit;
}

.admin-message-item.is-unread {
  background: rgba(var(--bs-danger-rgb), 0.05);
  border-left: 3px solid rgba(var(--bs-danger-rgb), 0.85);
}

.admin-message-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.admin-message-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.admin-message-preview {
  font-size: 0.82rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0.15rem;
}

.admin-message-participant,
.admin-message-time {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}

.admin-alert-menu {
  width: min(430px, 94vw);
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--bs-border-color);
}

.admin-alert-menu-head,
.admin-alert-menu-foot {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--bs-border-color-translucent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.admin-alert-menu-foot {
  border-bottom: 0;
  border-top: 1px solid var(--bs-border-color-translucent);
}

.admin-alert-menu-foot a {
  font-weight: 600;
  text-decoration: none;
}

.admin-alert-menu-body {
  max-height: 360px;
  overflow-y: auto;
}

.admin-alert-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--bs-border-color-translucent);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}

.admin-alert-item:last-child {
  border-bottom: 0;
}

.admin-alert-item:hover {
  background: rgba(var(--bs-primary-rgb), 0.05);
  color: inherit;
}

.admin-alert-item.has-unread {
  background: rgba(var(--bs-primary-rgb), 0.05);
}

.admin-alert-item-icon {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0d6efd;
  background: rgba(13, 110, 253, 0.12);
  flex-shrink: 0;
}

.admin-alert-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.admin-alert-item-title {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.25;
}

.admin-alert-item-text {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--bs-secondary-color);
}

.admin-alert-item .badge {
  align-self: center;
  min-width: 2rem;
}

.admin-alert-section-title {
  padding: 0.55rem 0.9rem 0.45rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--bs-secondary-color);
  border-top: 1px solid var(--bs-border-color-translucent);
  background: var(--bs-tertiary-bg);
}

.admin-alert-quote-item {
  display: block;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--bs-border-color-translucent);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}

.admin-alert-quote-item:last-child {
  border-bottom: 0;
}

.admin-alert-quote-item:hover {
  background: rgba(var(--bs-success-rgb), 0.08);
  color: inherit;
}

.admin-alert-quote-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.22rem;
}

.admin-alert-quote-title {
  min-width: 0;
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-alert-quote-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  font-size: 0.76rem;
  color: var(--bs-secondary-color);
}

.admin-alert-quote-meta span {
  display: inline-flex;
  align-items: center;
}

.menu-drag-cell {
  width: 42px;
}

.menu-drag-handle {
  cursor: grab;
  color: var(--bs-secondary-color);
}

.menu-row.menu-dragging {
  opacity: 0.5;
}

.menu-drop-placeholder td {
  padding: 0;
  border: 2px dashed rgba(13, 110, 253, 0.35);
  background-color: rgba(13, 110, 253, 0.06);
}

.menu-drop-placeholder .menu-drop-placeholder-inner {
  height: 34px;
}

.menu-drop-parent .menu-name-wrap {
  background-color: rgba(25, 135, 84, 0.08);
}

.listing-category-shell {
  max-width: 1480px;
}

.listing-category-summary-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.55rem 0.8rem;
}

.listing-category-drag-cell {
  width: 42px;
}

.listing-category-drag-handle {
  cursor: grab;
  color: var(--bs-secondary-color);
}

.listing-category-drag-handle:active {
  cursor: grabbing;
}

.listing-category-name-wrap {
  min-height: 44px;
  padding: 0.45rem 0.6rem;
  border-radius: 12px;
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.listing-category-toggle-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.listing-category-toggle {
  width: 1.65rem;
  height: 1.65rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--bs-secondary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.listing-category-toggle:hover {
  background: rgba(13, 110, 253, 0.08);
  color: #0d6efd;
}

.listing-category-toggle:focus-visible {
  outline: 2px solid rgba(13, 110, 253, 0.32);
  outline-offset: 1px;
}

.listing-category-toggle-spacer {
  width: 1.65rem;
  height: 1.65rem;
  display: inline-block;
}

.listing-category-row:hover .listing-category-name-wrap {
  background: rgba(15, 23, 42, 0.04);
}

.listing-category-row.listing-category-filter-match .listing-category-name-wrap {
  background: rgba(13, 110, 253, 0.08);
  box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.18);
}

.listing-category-count-badge {
  color: var(--bs-body-color) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(148, 163, 184, 0.35) !important;
}

.listing-category-row.listing-category-dragging {
  opacity: 0.5;
}

.listing-category-drop-placeholder td {
  padding: 0;
  border: 2px dashed rgba(13, 110, 253, 0.35);
  background-color: rgba(13, 110, 253, 0.06);
}

.listing-category-drop-placeholder-inner {
  height: 38px;
}

.listing-category-drop-parent .listing-category-name-wrap {
  background-color: rgba(13, 110, 253, 0.08);
  box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.2);
}

.listing-category-status {
  min-width: 52px;
}

[data-bs-theme=dark] .listing-category-row:hover .listing-category-name-wrap {
  background: rgba(148, 163, 184, 0.08);
}

[data-bs-theme=dark] .listing-category-toggle:hover {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

[data-bs-theme=dark] .listing-category-row.listing-category-filter-match .listing-category-name-wrap {
  background: rgba(59, 130, 246, 0.16);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.3);
}

[data-bs-theme=dark] .listing-category-count-badge {
  color: #e2e8f0 !important;
  background: rgba(15, 23, 42, 0.7) !important;
  border-color: rgba(148, 163, 184, 0.32) !important;
}

[data-bs-theme=dark] .listing-category-drop-parent .listing-category-name-wrap {
  background-color: rgba(59, 130, 246, 0.18);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.35);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.admin-profile-shell {
  max-width: 1280px;
}

.admin-profile-card,
.admin-profile-stat,
.admin-profile-identity {
  border: 1px solid var(--bs-border-color);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.admin-profile-identity {
  background: linear-gradient(145deg, rgba(13, 110, 253, 0.06), rgba(220, 38, 38, 0.06));
}

.admin-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0b2a5a;
  background: linear-gradient(145deg, #e7f0ff, #f8dede);
  border: 1px solid rgba(13, 110, 253, 0.18);
}

.admin-profile-title {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.2;
}

.admin-profile-meta-label {
  display: inline-block;
  font-size: 0.74rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bs-secondary-color);
}

.admin-profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.admin-profile-stat-value {
  margin-top: 0.5rem;
  font-size: 0.94rem;
  font-weight: 600;
  word-break: break-word;
}

.admin-profile-stat-value.is-active {
  color: #198754;
}

.admin-profile-stat-value.is-inactive {
  color: #dc3545;
}

.admin-profile-tabs .nav-link {
  border-radius: 999px;
  border: 1px solid rgba(13, 110, 253, 0.2);
  color: var(--bs-body-color);
  font-weight: 500;
  padding: 0.5rem 1rem;
}

.admin-profile-tabs .nav-link.active {
  color: #fff;
  border-color: #0d6efd;
  background-color: #0d6efd;
}

.admin-profile-tabs .nav-link .badge {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.admin-profile-tabs .nav-link.active .badge {
  color: #0d6efd !important;
  background-color: #fff !important;
  border-color: rgba(255, 255, 255, 0.85) !important;
}

.project-details-tabs .nav-item {
  margin: 0;
}

.project-details-grid .project-details-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-details-grid .project-details-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.11);
  border-color: rgba(13, 110, 253, 0.35);
}

.project-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.project-card-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  color: #0b5ed7;
  background: rgba(13, 110, 253, 0.12);
}

.project-details-card--property .project-card-icon {
  color: #0f766e;
  background: rgba(13, 148, 136, 0.14);
}

.project-details-card--private .project-card-icon {
  color: #b45309;
  background: rgba(245, 158, 11, 0.16);
}

.project-kv-list {
  margin-bottom: 0;
}

.project-kv-list dt {
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.project-kv-list dd {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--bs-body-color);
}

.project-card-richtext {
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}

.project-card-richtext p:last-child {
  margin-bottom: 0;
}

.project-empty-hint {
  padding: 0.75rem 0.9rem;
  border-radius: 0.7rem;
  background: var(--bs-tertiary-bg);
}

.project-feature-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.project-feature-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(13, 110, 253, 0.22);
  background: rgba(13, 110, 253, 0.07);
  font-size: 0.83rem;
  line-height: 1;
}

.project-feature-list i {
  color: #0b5ed7;
}

[data-bs-theme=dark] .project-details-grid .project-details-card {
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.35);
}

[data-bs-theme=dark] .project-details-grid .project-details-card:hover {
  box-shadow: 0 18px 30px rgba(2, 6, 23, 0.45);
}

[data-bs-theme=dark] .project-card-icon {
  color: #9cc0ff;
  background: rgba(59, 130, 246, 0.25);
}

[data-bs-theme=dark] .project-details-card--property .project-card-icon {
  color: #72d8cf;
  background: rgba(20, 184, 166, 0.23);
}

[data-bs-theme=dark] .project-details-card--private .project-card-icon {
  color: #fcd34d;
  background: rgba(217, 119, 6, 0.24);
}

[data-bs-theme=dark] .project-feature-list li {
  border-color: rgba(99, 179, 255, 0.35);
  background: rgba(30, 64, 175, 0.18);
}

[data-bs-theme=dark] .project-feature-list i {
  color: #bcd8ff;
}

.ops-section-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ops-section-card:hover {
  transform: translateY(-2px);
  border-color: rgba(13, 110, 253, 0.35);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.11);
}

.ops-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
}

.ops-card-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.ops-icon-primary {
  color: #0b5ed7;
  background: rgba(13, 110, 253, 0.12);
}

.ops-icon-success {
  color: #0f766e;
  background: rgba(13, 148, 136, 0.14);
}

.ops-icon-warning {
  color: #b45309;
  background: rgba(245, 158, 11, 0.16);
}

.ops-kv-list dt {
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.ops-kv-list dd {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--bs-body-color);
}

.ops-inline-note {
  padding: 0.75rem 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}

.ops-tab-shell {
  padding: 0.55rem !important;
}

[data-bs-theme=dark] .ops-section-card {
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.35);
}

[data-bs-theme=dark] .ops-section-card:hover {
  box-shadow: 0 18px 32px rgba(2, 6, 23, 0.46);
}

[data-bs-theme=dark] .ops-icon-primary {
  color: #9cc0ff;
  background: rgba(59, 130, 246, 0.25);
}

[data-bs-theme=dark] .ops-icon-success {
  color: #72d8cf;
  background: rgba(20, 184, 166, 0.23);
}

[data-bs-theme=dark] .ops-icon-warning {
  color: #fcd34d;
  background: rgba(217, 119, 6, 0.24);
}

[data-bs-theme=dark] .admin-alert-section-title {
  background: rgba(30, 41, 59, 0.62);
  color: rgba(226, 232, 240, 0.8);
}

[data-bs-theme=dark] .admin-alert-quote-item:hover {
  background: rgba(45, 212, 191, 0.15);
}

[data-bs-theme=dark] .admin-profile-card,
[data-bs-theme=dark] .admin-profile-stat,
[data-bs-theme=dark] .admin-profile-identity {
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.3);
}

[data-bs-theme=dark] .admin-profile-identity {
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.2), rgba(239, 68, 68, 0.14));
}

[data-bs-theme=dark] .admin-profile-avatar {
  color: #e5edff;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.38), rgba(190, 24, 93, 0.35));
  border-color: rgba(148, 163, 184, 0.35);
}

.pm-shell {
  max-width: 1480px;
}

.pm-kpi-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pm-kpi-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.pm-kpi-card .card-body {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.pm-kpi-icon {
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.pm-kpi-icon.icon-primary {
  color: #0b5ed7;
  background: rgba(13, 110, 253, 0.13);
}

.pm-kpi-icon.icon-success {
  color: #0f766e;
  background: rgba(13, 148, 136, 0.14);
}

.pm-kpi-icon.icon-warning {
  color: #b45309;
  background: rgba(245, 158, 11, 0.18);
}

.pm-kpi-label {
  font-size: 0.82rem;
  color: var(--bs-secondary-color);
  line-height: 1.15;
}

.pm-kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
}

.pm-kpi-value-date {
  font-size: 1.05rem;
}

.pm-board-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pm-board-card {
  border-left: 4px solid transparent;
}

.pm-priority-low {
  border-left-color: #94a3b8;
}

.pm-priority-medium {
  border-left-color: #0dcaf0;
}

.pm-priority-high {
  border-left-color: #f59e0b;
}

.pm-priority-critical {
  border-left-color: #dc3545;
}

.pm-board-card .progress-bar {
  font-weight: 600;
}

.pm-board-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.82rem;
  color: var(--bs-secondary-color);
}

.pm-board-drag-handle {
  cursor: grab;
}

.pm-board-drag-handle:active {
  cursor: grabbing;
}

.pm-board-order-hint {
  background: linear-gradient(90deg, rgba(13, 110, 253, 0.05), rgba(13, 110, 253, 0.01));
}

.pm-priority-form {
  min-width: 150px;
}

.pm-priority-select {
  min-width: 124px;
}

.pm-project-picker-list {
  max-height: 420px;
  overflow: auto;
  border-radius: 0.85rem;
}

.pm-project-picker-item {
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pm-project-picker-item:not(.active):hover {
  transform: translateY(-1px);
}

.pm-widget {
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.pm-widget-content {
  transition: opacity 0.2s ease;
}

.pm-tab-pane-enter {
  animation: pmTabPaneEnter 0.22s ease-out;
}

@keyframes pmTabPaneEnter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pm-phase-detail-collapse {
  transition: opacity 0.18s ease;
}

.pm-phase-detail-collapse.collapsing {
  opacity: 0.35;
}

.pm-phase-detail-collapse.show {
  opacity: 1;
}

.pm-phase-detail-collapse.is-transitioning > .row {
  transform: translateY(2px);
}

.pm-phase-detail-collapse.is-open > .row {
  animation: pmPhaseDetailEnter 0.2s ease-out;
}

@keyframes pmPhaseDetailEnter {
  from {
    opacity: 0.55;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pm-phase-detail-collapse-toggle .pm-collapse-chevron {
  transition: transform 0.2s ease;
}

.pm-phase-detail-collapse-toggle[aria-expanded="true"] .pm-collapse-chevron {
  transform: rotate(180deg);
}

.pm-widget-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pm-board-quick-actions .btn {
  min-width: 118px;
}

.pm-board-sticky-bar {
  position: fixed;
  left: 50%;
  bottom: 1.1rem;
  width: min(760px, calc(100vw - 2rem));
  transform: translate(-50%, 26px);
  opacity: 0;
  pointer-events: none;
  z-index: 1080;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.pm-board-sticky-bar.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

.pm-board-sticky-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border: 1px solid rgba(13, 110, 253, 0.35);
  border-radius: 0.95rem;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(6px);
}

.pm-board-sticky-text {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--bs-emphasis-color);
}

.pm-board-empty-state {
  border: 1px dashed var(--bs-border-color);
  border-radius: 0.8rem;
  padding: 0.8rem 0.9rem;
  margin-bottom: 0.7rem;
  color: var(--bs-secondary-color);
  background: var(--bs-tertiary-bg);
}

.pm-card-status-badge {
  white-space: nowrap;
}

.pm-card-moved {
  animation: pmCardMovedPulse 0.55s ease;
}

@keyframes pmCardMovedPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.34);
  }
  55% {
    box-shadow: 0 0 0 7px rgba(13, 110, 253, 0);
  }
  100% {
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
  }
}

.pm-widget-btn.is-active {
  color: #0d6efd;
  border-color: rgba(13, 110, 253, 0.45);
  background: rgba(13, 110, 253, 0.08);
}

.pm-widget.is-collapsed {
  border-color: rgba(13, 110, 253, 0.25);
}

.pm-widget.is-maximized {
  position: fixed;
  top: var(--pm-max-top, 0);
  left: var(--pm-max-left, 0);
  width: var(--pm-max-width, 100vw);
  height: var(--pm-max-height, 100vh);
  z-index: 1060;
  margin: 0 !important;
  border-radius: 0;
  border-width: 0;
  transform: none;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.16);
  overflow: hidden;
}

.pm-widget.is-maximized > .card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.pm-widget.is-maximized .pm-widget-content {
  flex: 1 1 auto;
  overflow: auto;
  min-height: 0;
}

.pm-widget.is-fullscreen {
  border-radius: 0;
  border-width: 0;
  padding: 1.2rem;
  background: var(--bs-body-bg);
}

.pm-progress {
  height: 0.8rem;
  border-radius: 999px;
}

.pm-progress .progress-bar {
  border-radius: 999px;
}

.pm-kanban-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

.pm-kanban-column {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.9rem;
  background: var(--bs-tertiary-bg);
  padding: 0.6rem;
  min-height: 220px;
  overflow: hidden;
}

.pm-kanban-column > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.pm-kanban-column > header small {
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
}

.pm-kanban-list {
  min-height: 145px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  overflow-x: hidden;
}

.pm-kanban-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  padding: 0.55rem 0.6rem;
  background: var(--bs-body-bg);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
  cursor: grab;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.pm-kanban-card:active {
  cursor: grabbing;
}

.pm-kanban-card:focus-visible {
  outline: 2px solid rgba(13, 110, 253, 0.55);
  outline-offset: 1px;
}

.pm-kanban-card.is-selected,
.pm-phase-row.is-selected {
  border-color: rgba(13, 110, 253, 0.55) !important;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}

.pm-kanban-list .sortable-chosen,
.pm-kanban-list .sortable-drag {
  width: 100% !important;
}

.pm-modal {
  z-index: 1095;
}

.pm-kanban-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}

.pm-gantt {
  display: grid;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.pm-gantt-shell {
  display: grid;
  gap: 0.4rem;
  overflow-x: auto;
}

.pm-gantt-zoom-group .pm-gantt-zoom-btn.active {
  background: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
}

.pm-gantt-shell[data-gantt-zoom="week"] .pm-gantt-scale-row,
.pm-gantt-shell[data-gantt-zoom="week"] .pm-gantt-row {
  grid-template-columns: minmax(240px, 26%) minmax(1280px, 1fr);
}

.pm-gantt-shell[data-gantt-zoom="month"] .pm-gantt-scale-row,
.pm-gantt-shell[data-gantt-zoom="month"] .pm-gantt-row {
  grid-template-columns: minmax(240px, 28%) minmax(980px, 1fr);
}

.pm-gantt-shell[data-gantt-zoom="quarter"] .pm-gantt-scale-row,
.pm-gantt-shell[data-gantt-zoom="quarter"] .pm-gantt-row {
  grid-template-columns: minmax(240px, 30%) minmax(760px, 1fr);
}

.pm-gantt-shell [data-gantt-zoom-row] {
  display: none !important;
}

.pm-gantt-shell [data-gantt-zoom-row].is-active {
  display: grid !important;
}

.pm-gantt-shell [data-gantt-zoom-row]:not(.is-active) .pm-gantt-scale-tick,
.pm-gantt-shell [data-gantt-zoom-row]:not(.is-active) .pm-gantt-today-marker,
.pm-gantt-shell [data-gantt-zoom-row]:not(.is-active) .pm-gantt-milestones {
  display: none !important;
}

.pm-gantt-scale-row {
  display: grid;
  grid-template-columns: minmax(220px, 34%) 1fr;
  gap: 0.7rem;
}

.pm-gantt-scale {
  position: relative;
  min-height: 1.9rem;
  border-bottom: 1px dashed rgba(100, 116, 139, 0.45);
}

.pm-gantt-milestones {
  position: absolute;
  left: 0;
  right: 0;
  top: 1.45rem;
  height: 0.85rem;
}

.pm-gantt-milestone {
  position: absolute;
  transform: translateX(-50%);
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(100, 116, 139, 0.35);
}

.pm-gantt-milestone-start {
  background: #20a46b;
}

.pm-gantt-milestone-end {
  background: #f59e0b;
}

.pm-gantt-scale-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--bs-secondary-color);
  white-space: nowrap;
}

.pm-gantt-scale-tick::before {
  content: "";
  position: absolute;
  top: 1.15rem;
  left: 50%;
  width: 1px;
  height: 0.3rem;
  transform: translateX(-50%);
  background: rgba(100, 116, 139, 0.45);
}

.pm-gantt-today-marker {
  position: absolute;
  top: -0.1rem;
  transform: translateX(-50%);
  color: #dc3545;
  font-size: 0.7rem;
  font-weight: 700;
  z-index: 4;
}

.pm-gantt-today-marker em {
  font-style: normal;
}

.pm-gantt-row {
  display: grid;
  grid-template-columns: minmax(220px, 34%) 1fr;
  gap: 0.7rem;
  align-items: center;
}

.pm-widget[data-widget-id="pmTimelineGanttWidget"].is-maximized .pm-widget-content,
.pm-widget[data-widget-id="pmTimelineGanttWidget"].is-fullscreen .pm-widget-content {
  overflow-y: auto;
  overflow-x: hidden;
}

.pm-widget[data-widget-id="pmTimelineGanttWidget"].is-maximized .pm-gantt,
.pm-widget[data-widget-id="pmTimelineGanttWidget"].is-maximized .pm-gantt-shell,
.pm-widget[data-widget-id="pmTimelineGanttWidget"].is-fullscreen .pm-gantt,
.pm-widget[data-widget-id="pmTimelineGanttWidget"].is-fullscreen .pm-gantt-shell {
  overflow-x: hidden;
}

.pm-widget[data-widget-id="pmTimelineGanttWidget"].is-maximized .pm-gantt-scale-row,
.pm-widget[data-widget-id="pmTimelineGanttWidget"].is-maximized .pm-gantt-row,
.pm-widget[data-widget-id="pmTimelineGanttWidget"].is-fullscreen .pm-gantt-scale-row,
.pm-widget[data-widget-id="pmTimelineGanttWidget"].is-fullscreen .pm-gantt-row {
  grid-template-columns: minmax(210px, 24%) minmax(0, 1fr);
}

.pm-widget[data-widget-id="pmTimelineGanttWidget"].is-maximized .pm-gantt-label,
.pm-widget[data-widget-id="pmTimelineGanttWidget"].is-fullscreen .pm-gantt-label,
.pm-widget[data-widget-id="pmTimelineGanttWidget"].is-maximized .pm-gantt-track,
.pm-widget[data-widget-id="pmTimelineGanttWidget"].is-fullscreen .pm-gantt-track {
  min-width: 0;
}

.pm-gantt-track {
  position: relative;
  min-height: 2.2rem;
  border-radius: 999px;
  border: 1px dashed var(--bs-border-color);
  background: var(--bs-body-bg);
  overflow: hidden;
}

.pm-gantt-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(220, 53, 69, 0.72);
  z-index: 1;
}

.pm-gantt-edge {
  position: absolute;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 2px;
  transform: translateX(-50%);
  z-index: 2;
}

.pm-gantt-edge-start {
  background: rgba(32, 164, 107, 0.75);
}

.pm-gantt-edge-end {
  background: rgba(245, 158, 11, 0.85);
}

.pm-gantt-bar {
  position: absolute;
  top: 0.3rem;
  bottom: 0.3rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0 0.55rem;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
  z-index: 2;
}

.pm-gantt-bar.text-bg-light {
  color: var(--bs-body-color);
}

.pm-gantt-label-root .fw-semibold {
  color: var(--bs-heading-color);
}

.pm-gantt-label-sub .fw-semibold {
  font-weight: 600;
}

.pm-burndown-chart {
  width: 100%;
  height: 290px;
}

.pm-tabs .nav-link i {
  margin-right: 0.25rem;
}

.pm-shell .composer-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pm-shell .composer-attachment {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 320px;
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  padding: 0.35rem 0.45rem;
  background: var(--bs-body-bg);
  color: inherit;
  text-decoration: none;
}

.pm-shell .composer-attachment img {
  width: 40px;
  height: 40px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
}

.pm-shell .composer-attachment-badge {
  width: 40px;
  height: 40px;
  border-radius: 7px;
  background: var(--bs-tertiary-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--bs-secondary-color);
  flex-shrink: 0;
}

.pm-shell .composer-attachment .text-truncate {
  max-width: 210px;
}

.pm-shell .composer-attachment button {
  border: 0;
  background: transparent;
  color: #b42318;
  font-size: 12px;
}

.pm-guideline-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.pm-guideline-list li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.9rem;
}

.pm-guideline-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #0d6efd;
}

.pm-phase-sortable {
  gap: 0.55rem;
}

.pm-phase-list-scroll {
  max-height: 560px;
  overflow: auto;
  padding-right: 0.2rem;
}

.pm-phase-toolbar .form-control,
.pm-phase-toolbar .form-select {
  min-height: calc(1.5em + 0.5rem + 2px);
}

.pm-phase-sortable .list-group-item {
  border-radius: 0.8rem;
  border: 1px solid var(--bs-border-color);
}

.pm-phase-group-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--bs-tertiary-bg);
  border-style: dashed;
  border-color: rgba(13, 110, 253, 0.24);
  font-size: 0.86rem;
}

.pm-phase-row[data-phase-depth="0"] {
  background: color-mix(in srgb, var(--bs-body-bg) 92%, #0d6efd 8%);
}

.pm-phase-sub-row {
  border-left: 3px solid rgba(13, 110, 253, 0.2) !important;
  background: color-mix(in srgb, var(--bs-body-bg) 94%, #0d6efd 6%);
}

.pm-phase-top {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.pm-phase-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.pm-phase-toggle {
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--bs-secondary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.pm-phase-toggle:hover {
  background: rgba(13, 110, 253, 0.08);
  color: #0d6efd;
}

.pm-phase-toggle:focus-visible {
  outline: 2px solid rgba(13, 110, 253, 0.45);
  outline-offset: 1px;
}

.pm-phase-toggle i {
  transition: transform 0.18s ease;
}

.pm-phase-toggle.is-collapsed i {
  transform: rotate(-90deg);
}

.pm-phase-toggle-spacer {
  width: 1.35rem;
  height: 1.35rem;
  display: inline-block;
}

.pm-phase-handle {
  color: var(--bs-secondary-color);
  cursor: grab;
}

.pm-phase-handle:active {
  cursor: grabbing;
}

.pm-phase-ghost {
  opacity: 0.35;
}

.pm-phase-drag {
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.14);
}

.pm-timeline {
  display: grid;
  gap: 0.85rem;
}

.pm-timeline-scroll {
  max-height: clamp(320px, 52vh, 620px);
  overflow-y: auto;
  padding-right: 0.2rem;
}

.pm-widget.is-maximized .pm-timeline-scroll {
  max-height: none;
}

.pm-timeline-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: flex-start;
}

.pm-timeline-pin {
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  white-space: nowrap;
}

.pm-timeline-body {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.8rem;
  padding: 0.75rem 0.8rem;
  background: var(--bs-body-bg);
}

.pm-timeline-description p:last-child {
  margin-bottom: 0;
}

.pm-animate {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.pm-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-bs-theme=dark] .pm-kpi-card,
[data-bs-theme=dark] .pm-timeline-body {
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.35);
}

[data-bs-theme=dark] .pm-kanban-column {
  background: rgba(30, 41, 59, 0.45);
  border-color: rgba(148, 163, 184, 0.28);
}

[data-bs-theme=dark] .pm-kanban-card,
[data-bs-theme=dark] .pm-gantt-track {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(148, 163, 184, 0.32);
}

[data-bs-theme=dark] .pm-gantt-zoom-group .pm-gantt-zoom-btn.active {
  background: #2563eb;
  border-color: #2563eb;
}

[data-bs-theme=dark] .pm-gantt-milestone {
  border-color: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.45);
}

[data-bs-theme=dark] .pm-phase-group-header {
  background: color-mix(in srgb, var(--bs-body-bg) 78%, #0d6efd 22%);
}

[data-bs-theme=dark] .pm-widget-btn.is-active {
  color: #9cc0ff;
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(59, 130, 246, 0.2);
}

[data-bs-theme=dark] .pm-board-empty-state {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.46);
}

[data-bs-theme=dark] .pm-phase-detail-collapse.collapsing {
  opacity: 0.28;
}

[data-bs-theme=dark] .pm-board-sticky-body {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: 0 20px 36px rgba(2, 6, 23, 0.55);
}

[data-bs-theme=dark] .pm-card-moved {
  animation-name: pmCardMovedPulseDark;
}

@keyframes pmCardMovedPulseDark {
  0% {
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.42);
  }
  55% {
    box-shadow: 0 0 0 7px rgba(96, 165, 250, 0);
  }
  100% {
    box-shadow: 0 6px 16px rgba(2, 6, 23, 0.35);
  }
}

body.pm-widget-maximized-open {
  overflow: hidden;
}

[data-bs-theme=dark] .pm-gantt-scale {
  border-bottom-color: rgba(148, 163, 184, 0.45);
}

[data-bs-theme=dark] .pm-gantt-scale-tick {
  color: rgba(226, 232, 240, 0.85);
}

[data-bs-theme=dark] .pm-gantt-scale-tick::before {
  background: rgba(148, 163, 184, 0.5);
}

[data-bs-theme=dark] .pm-project-picker-item {
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
}

[data-bs-theme=dark] .pm-kpi-icon.icon-primary {
  color: #9cc0ff;
  background: rgba(59, 130, 246, 0.25);
}

[data-bs-theme=dark] .pm-kpi-icon.icon-success {
  color: #72d8cf;
  background: rgba(20, 184, 166, 0.23);
}

[data-bs-theme=dark] .pm-kpi-icon.icon-warning {
  color: #fcd34d;
  background: rgba(217, 119, 6, 0.24);
}

@media (max-width: 1199.98px) {
  .pm-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pm-kanban-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pm-board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .pm-kanban-grid,
  .pm-kpi-grid,
  .pm-board-grid {
    grid-template-columns: 1fr;
  }

  .pm-gantt-row {
    grid-template-columns: 1fr;
  }

  .pm-gantt-scale-row {
    grid-template-columns: 1fr;
  }

  .pm-gantt-scale-row > div:first-child {
    display: none;
  }

  .pm-burndown-chart {
    height: 240px;
  }

  .pm-timeline-item {
    grid-template-columns: 1fr;
  }

  .pm-board-sticky-body {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pm-tab-pane-enter {
    animation: none !important;
  }

  .pm-card-moved,
  .pm-phase-detail-collapse.is-open > .row {
    animation: none !important;
  }

  .pm-phase-detail-collapse,
  .pm-phase-detail-collapse-toggle .pm-collapse-chevron {
    transition: none !important;
  }
}

.sysdash-shell {
  max-width: 1480px;
}

.sysdash-header.card {
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.sysdash-kpi-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.sysdash-kpi-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.sysdash-kpi-card .card-body {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.sysdash-kpi-icon {
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.sysdash-kpi-icon.icon-primary {
  color: #0b5ed7;
  background: rgba(13, 110, 253, 0.13);
}

.sysdash-kpi-icon.icon-success {
  color: #0f766e;
  background: rgba(13, 148, 136, 0.14);
}

.sysdash-kpi-icon.icon-warning {
  color: #b45309;
  background: rgba(245, 158, 11, 0.18);
}

.sysdash-kpi-icon.icon-danger {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.15);
}

.sysdash-kpi-label {
  font-size: 0.82rem;
  color: var(--bs-secondary-color);
  line-height: 1.15;
}

.sysdash-kpi-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
}

.sysdash-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.sysdash-widget {
  border: 1px solid var(--bs-border-color);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  min-height: 0;
  grid-column: span 4;
  overflow: hidden;
}

.sysdash-widget[data-widget-id="activityTrend"] {
  grid-column: span 12;
}

.sysdash-widget[data-widget-id="schemaChecklist"] {
  grid-column: span 12;
}

.sysdash-widget.is-hidden {
  display: none;
}

.sysdash-widget.is-collapsed .sysdash-widget-body {
  display: none;
}

.sysdash-widget.is-maximized {
  grid-column: span 12;
}

.sysdash-widget-ghost {
  opacity: 0.45;
}

.sysdash-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.85rem 0.95rem 0.75rem;
  border-bottom: 1px solid var(--bs-border-color-translucent);
}

.sysdash-widget-title {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 0.55rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.sysdash-widget .widget-handle {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.55rem;
  border: 1px solid var(--bs-border-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: var(--bs-secondary-color);
}

.sysdash-widget .widget-handle:active {
  cursor: grabbing;
}

.sysdash-widget-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.sysdash-widget-tools .btn {
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sysdash-widget-body {
  padding: 0.65rem 0.75rem 0.8rem;
}

.sysdash-chart {
  display: block;
  width: 100% !important;
  height: var(--sysdash-chart-height, 230px) !important;
  max-height: var(--sysdash-chart-height, 230px);
}

.sysdash-empty-state {
  padding: 2.25rem 1rem;
  text-align: center;
  border-radius: 0.85rem;
  border: 1px dashed var(--bs-border-color);
  color: var(--bs-secondary-color);
  background: var(--bs-tertiary-bg);
}

.sysdash-offcanvas {
  width: min(420px, 95vw) !important;
}

.sysdash-widget-catalog {
  display: grid;
  gap: 0.6rem;
}

.sysdash-catalog-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.8rem;
  padding: 0.65rem 0.7rem;
  background: var(--bs-body-bg);
}

.sysdash-catalog-title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.87rem;
  font-weight: 600;
}

.sysdash-catalog-meta {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}

.sysdash-checklist {
  display: grid;
  gap: 0.6rem;
}

.sysdash-check-item {
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 0.75rem;
  padding: 0.7rem 0.8rem;
  background: var(--bs-body-bg);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.sysdash-check-item.is-ok {
  border-color: rgba(25, 135, 84, 0.25);
}

.sysdash-check-item.is-missing {
  border-color: rgba(255, 193, 7, 0.4);
}

.sysdash-check-main {
  min-width: 0;
  flex: 1;
}

.sysdash-check-name {
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.sysdash-check-details {
  font-size: 0.78rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0.3rem;
}

.sysdash-check-command {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.74rem;
  padding: 0.35rem 0.45rem;
  border-radius: 0.45rem;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color-translucent);
}

@media (max-width: 1199.98px) {
  .sysdash-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sysdash-widget {
    grid-column: span 6;
  }
}

@media (max-width: 575.98px) {
  .sysdash-kpi-grid {
    grid-template-columns: 1fr;
  }

  .sysdash-chart {
    height: var(--sysdash-chart-height-mobile, 210px) !important;
    max-height: var(--sysdash-chart-height-mobile, 210px);
  }
}

[data-bs-theme=dark] .sysdash-header.card,
[data-bs-theme=dark] .sysdash-kpi-card,
[data-bs-theme=dark] .sysdash-widget {
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.34);
}

[data-bs-theme=dark] .sysdash-widget .widget-handle {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.35);
  color: #d1d5db;
}

[data-bs-theme=dark] .sysdash-check-item,
[data-bs-theme=dark] .sysdash-catalog-item {
  background: rgba(15, 23, 42, 0.45);
  border-color: rgba(148, 163, 184, 0.28);
}

[data-bs-theme=dark] .sysdash-empty-state {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.5);
}

.sysdash-hero {
  background:
    radial-gradient(circle at top left, rgba(13, 110, 253, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(13, 202, 240, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(239, 246, 255, 0.95));
}

.sysdash-hero-copy {
  max-width: 760px;
}

.sysdash-hero h1 {
  font-size: clamp(1.9rem, 2.6vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.sysdash-toolbar {
  align-items: flex-start;
}

.sysdash-save-state {
  min-width: 180px;
  padding-top: 0.55rem;
  text-align: right;
}

.sysdash-glance-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sysdash-glance-card {
  border: 1px solid rgba(13, 110, 253, 0.12);
  border-radius: 1rem;
  padding: 1rem 1.05rem;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(8px);
}

.sysdash-glance-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bs-secondary-color);
}

.sysdash-glance-value {
  margin-top: 0.35rem;
  font-size: 1.45rem;
  line-height: 1.1;
  font-weight: 700;
}

.sysdash-glance-meta {
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}

.sysdash-widget-summary {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sysdash-summary-value {
  font-size: 1.18rem;
  line-height: 1.1;
  font-weight: 700;
}

.sysdash-summary-label {
  margin-top: 0.18rem;
  font-size: 0.76rem;
  color: var(--bs-secondary-color);
}

.sysdash-stack-list {
  display: grid;
  gap: 0.7rem;
}

.sysdash-stack-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 0.85rem;
  background: var(--bs-body-bg);
}

.sysdash-quick-links {
  display: grid;
  gap: 0.55rem;
}

[data-bs-theme=dark] .sysdash-glance-card {
  background: rgba(15, 23, 42, 0.52);
  border-color: rgba(148, 163, 184, 0.2);
}

@media (max-width: 1199.98px) {
  .sysdash-glance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .sysdash-glance-grid,
  .sysdash-widget-summary {
    grid-template-columns: 1fr;
  }

  .sysdash-save-state {
    min-width: 0;
    text-align: left;
  }
}

/* Slightly reduced admin typography without touching the vendor theme. */
body {
  font-size: 0.97rem;
  line-height: 1.5;
}

.header__content .btn,
.header__content .small,
.header__content a {
  font-size: 0.94rem;
}

.mainnav__caption {
  font-size: 0.81rem;
  letter-spacing: 0.08em;
}

.mainnav__inner .mainnav__menu .nav-link {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  min-width: 0;
}

.mainnav__inner .mainnav__menu .nav-link > i,
.mainnav__inner .mainnav__menu .nav-link > .nav-icon {
  flex: 0 0 1.2rem;
  width: 1.2rem;
  margin-inline-end: 0 !important;
  margin-top: 0.14rem;
  text-align: center;
}

.mainnav__inner .mainnav__menu .nav-link .nav-label {
  flex: 1 1 auto;
  min-width: 0;
  margin-inline-start: 0 !important;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.32;
}

.mainnav__menu .has-sub > .mininav-toggle:not(.has-badge):after {
  flex: 0 0 auto;
  margin-inline-start: 0.75rem;
  margin-top: 0.38rem;
}

.mainnav__inner .mainnav__menu .nav-link,
.mainnav__menu .mininav-toggle .nav-label {
  font-size: 0.96rem;
}

@media (max-width: 991.98px) {
  .root {
    --nf-mainnav-slide-width: min(18rem, 88vw);
    --nf-mainnav-push-width: min(18rem, 88vw);
    --nf-mainnav-reveal-width: min(18rem, 88vw);
  }
}

.content__wrap .card-body,
.content__wrap .table,
.content__wrap .form-control,
.content__wrap .form-select,
.content__wrap .btn,
.content__wrap .badge {
  font-size: 0.96rem;
}

.content__wrap .form-label,
.content__wrap .form-check-label,
.content__wrap .form-text,
.content__wrap .small {
  font-size: 0.88rem;
}

.content__wrap .table thead th {
  font-size: 0.88rem;
}

.content__wrap .table tbody td,
.content__wrap .table tbody th {
  font-size: 0.95rem;
}

.content__wrap .nav.nav-tabs .nav-link,
.content__wrap .nav.nav-pills .nav-link,
.admin-profile-tabs .nav-link {
  font-size: 0.95rem;
}

.admin-message-title,
.admin-alert-item-title,
.admin-alert-quote-title {
  font-size: 0.98rem;
}

.admin-message-preview,
.admin-alert-item-text,
.admin-alert-quote-text,
.sysdash-check-details {
  font-size: 0.88rem;
}

.admin-message-participant,
.admin-message-time,
.admin-alert-section-title,
.admin-profile-meta-label,
.project-kv-list dt,
.ops-kv-list dt,
.sysdash-check-command {
  font-size: 0.82rem;
}

.admin-profile-stat-value,
.project-kv-list dd,
.ops-kv-list dd,
.project-feature-list li,
.sysdash-check-name {
  font-size: 0.98rem;
}

.admin-page-shell {
  display: grid;
  gap: 1rem;
}

.admin-page-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.35rem 1.5rem;
  border: 1px solid #dbe5f2;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 65%, #eef4ff 100%);
  box-shadow: 0 20px 44px -34px rgba(15, 41, 77, 0.42);
}

.admin-page-eyebrow {
  margin-bottom: 0.35rem;
  color: #6a7c96;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-page-title {
  margin: 0;
  color: #0f294d;
  font-size: 1.35rem;
  font-weight: 700;
}

.admin-page-description {
  margin: 0.5rem 0 0;
  max-width: 64ch;
  color: #5f7390;
}

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

.admin-kpi-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-metric-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-height: 118px;
  padding: 1rem 1.05rem;
  border: 1px solid #dbe5f2;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 16px 30px -28px rgba(15, 41, 77, 0.28);
}

.admin-metric-label {
  color: #6a7c96;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-metric-value {
  color: #0f294d;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.1;
}

.admin-metric-meta {
  color: #6a7c96;
  font-size: 0.88rem;
}

.admin-filter-card,
.admin-table-card {
  border: 1px solid #dbe5f2;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 16px 30px -28px rgba(15, 41, 77, 0.2);
}

.admin-table-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: #5f7390;
  font-size: 0.9rem;
}

.admin-table-meta strong {
  color: #0f294d;
}

.admin-data-table {
  margin-bottom: 0;
}

.admin-data-table thead th {
  white-space: nowrap;
  color: #53657e;
  font-weight: 700;
  background: #f8fafc;
  border-bottom-color: #dbe5f2;
}

.admin-data-table tbody td {
  vertical-align: middle;
}

.admin-inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.admin-entity-code {
  color: #6a7c96;
  font-size: 0.84rem;
}

.admin-table-empty,
.admin-empty-state {
  padding: 2rem 1rem !important;
  text-align: center;
  color: #6a7c96;
}

.admin-empty-state {
  border: 1px dashed #c4d4ee;
  border-radius: 1rem;
  background: #ffffff;
}

.admin-pagination-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.admin-pagination-summary {
  color: #6a7c96;
  font-size: 0.9rem;
}

.admin-card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.admin-page-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  padding: 1rem;
  border: 1px solid #dbe5f2;
  border-radius: 1.1rem;
  background: #ffffff;
  box-shadow: 0 18px 32px -30px rgba(15, 41, 77, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.admin-page-card:hover {
  transform: translateY(-2px);
  border-color: #c2d4ef;
  box-shadow: 0 22px 36px -28px rgba(15, 41, 77, 0.34);
}

.admin-page-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.admin-page-card-title {
  margin: 0;
  color: #0f294d;
  font-size: 1.08rem;
  font-weight: 700;
}

.admin-page-card-subtitle {
  color: #6a7c96;
  font-size: 0.86rem;
  word-break: break-word;
}

.admin-page-card-meta {
  display: grid;
  gap: 0.35rem;
  color: #5f7390;
  font-size: 0.86rem;
}

.admin-page-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.admin-layout-preview {
  display: grid;
  gap: 0.35rem;
  height: 58px;
  padding: 0.35rem;
  border: 1px solid #e2e9f6;
  border-radius: 0.85rem;
  background: #f8fbff;
}

.admin-layout-preview span {
  border-radius: 0.45rem;
  background: #d9e6fb;
}

.admin-layout-preview-single {
  grid-template-columns: 1fr;
}

.admin-layout-preview-equal {
  grid-template-columns: 1fr 1fr;
}

.admin-layout-preview-left-wide {
  grid-template-columns: 2fr 1fr;
}

.admin-layout-preview-right-wide {
  grid-template-columns: 1fr 2fr;
}

.admin-layout-preview-template {
  grid-template-columns: 1fr;
  grid-template-rows: repeat(3, 1fr);
}

.drag-handle {
  cursor: grab;
}

.drag-handle:active {
  cursor: grabbing;
}

@media (max-width: 767.98px) {
  .admin-page-hero {
    padding: 1.1rem 1rem;
  }

  .admin-page-title {
    font-size: 1.2rem;
  }

  .admin-pagination-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

[data-bs-theme=dark] .admin-page-hero,
[data-bs-theme=dark] .admin-metric-card,
[data-bs-theme=dark] .admin-filter-card,
[data-bs-theme=dark] .admin-table-card,
[data-bs-theme=dark] .admin-page-card,
[data-bs-theme=dark] .admin-empty-state {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.48);
  box-shadow: 0 18px 30px rgba(2, 6, 23, 0.32);
}

[data-bs-theme=dark] .admin-page-title,
[data-bs-theme=dark] .admin-metric-value,
[data-bs-theme=dark] .admin-page-card-title,
[data-bs-theme=dark] .admin-table-meta strong {
  color: #f8fafc;
}

[data-bs-theme=dark] .admin-layout-preview {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.55);
}

[data-bs-theme=dark] .admin-layout-preview span {
  background: rgba(148, 163, 184, 0.38);
}
