body.bootstrap-ui {
  --bs-body-font-family: "Aptos", "Segoe UI", "Trebuchet MS", sans-serif;
  --bs-body-color: #22324a;
  --bs-body-bg: #f4f7fb;
  --bs-primary: var(--accent);
  --bs-primary-rgb: var(--accent-rgb);
  --bs-border-color: rgba(214, 221, 233, 0.96);
  --bs-secondary-color: #66768a;
}

body.bootstrap-ui .brand-stack {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

body.bootstrap-ui .brand-context {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

body.bootstrap-ui .brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  background: rgba(237, 243, 255, 0.98);
  color: var(--accent-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.bootstrap-ui .brand-context-copy {
  display: block;
  color: #607287;
  font-size: 0.82rem;
  line-height: 1.4;
  white-space: nowrap;
}

body.bootstrap-ui .topbar-main {
  min-height: 64px;
  padding: 0.7rem 1rem;
}

body.bootstrap-ui.app-body .topbar-main-compact {
  min-height: 56px;
  padding: 0.42rem 0.9rem;
}

body.bootstrap-ui.app-body .topbar-main-compact .brand-stack {
  gap: 0;
}

body.bootstrap-ui.app-body .topbar-actions-compact {
  gap: 0.35rem;
}

body.bootstrap-ui.app-body .topbar-main-compact .topbar-button,
body.bootstrap-ui.app-body .topbar-main-compact .topbar-user-card {
  min-height: 38px;
}

body.bootstrap-ui.app-body .topbar-main-compact .topbar-icon-button {
  width: 38px;
  min-width: 38px;
}

body.bootstrap-ui.app-body .topbar-main-compact .topbar-user-card {
  gap: 0.38rem;
  padding: 0.34rem 0.62rem;
}

body.bootstrap-ui.app-body .topbar-main-compact .topbar-user strong,
body.bootstrap-ui.app-body .topbar-main-compact .topbar-user small {
  max-width: 118px;
}

body.bootstrap-ui.app-body .topbar-main-compact .topbar-user strong {
  font-size: 0.8rem;
}

body.bootstrap-ui.app-body .topbar-main-compact .topbar-user-meta {
  gap: 0.18rem;
}

body.bootstrap-ui.app-body .topbar-main-compact .topbar-user-meta small {
  font-size: 0.71rem;
}

body.bootstrap-ui.app-body .topbar-main-compact .notification-panel,
body.bootstrap-ui.app-body .topbar-main-compact .user-menu-panel {
  top: calc(100% + 0.35rem);
}

body.bootstrap-ui.app-body .topbar-main-compact .user-menu-panel {
  min-width: 220px;
}

body.bootstrap-ui.app-body .topbar-main-compact,
body.bootstrap-ui.app-body .topbar-main-compact .topbar-actions-compact {
  overflow: visible;
}

body.bootstrap-ui.app-body .topbar-main-compact .notification-shell,
body.bootstrap-ui.app-body .topbar-main-compact .user-menu-shell {
  position: relative;
  z-index: 60;
  isolation: isolate;
}

body.bootstrap-ui .topbar-nav {
  gap: 0.45rem;
  padding: 0.55rem 1rem 0.7rem;
  border-top: 1px solid rgba(218, 225, 236, 0.92);
}

body.bootstrap-ui .topbar-nav-link {
  min-height: 46px;
  padding: 0.72rem 0.95rem;
  border-radius: 999px;
  background: rgba(247, 250, 255, 0.88);
  border: 1px solid transparent;
  transform: none;
}

body.bootstrap-ui .topbar-nav-link::after {
  display: none;
}

body.bootstrap-ui .topbar-nav-link:hover {
  border-color: rgba(var(--accent-rgb), 0.12);
  background: rgba(var(--accent-rgb), 0.06);
  transform: none;
}

body.bootstrap-ui .topbar-nav-link.is-active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--sky) 100%);
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(var(--accent-rgb), 0.18);
  color: #ffffff;
}

body.bootstrap-ui .topbar-nav-icon,
body.bootstrap-ui .menu-link-icon,
body.bootstrap-ui .notification-icon,
body.bootstrap-ui .user-menu-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.bootstrap-ui .topbar-nav-icon {
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 0.75rem;
  background: var(--accent-soft);
  color: var(--accent);
}

body.bootstrap-ui .topbar-nav-link.is-active .topbar-nav-icon {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

body.bootstrap-ui.app-body .topbar-nav {
  align-items: center;
  gap: 0.4rem;
  padding-top: 0.38rem;
  padding-bottom: 0.5rem;
}

body.bootstrap-ui.app-body .topbar-nav .sidebar-toggle,
body.bootstrap-ui.app-body .topbar-nav-link {
  align-self: center;
}

body.bootstrap-ui.app-body .sidebar-toggle-nav {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  margin-right: 0.02rem;
}

body.bootstrap-ui.app-body .topbar-nav-link {
  min-height: 42px;
  padding: 0.54rem 0.88rem;
  gap: 0.58rem;
  font-size: 0.88rem;
  line-height: 1.1;
}

body.bootstrap-ui.app-body .topbar-nav-link > span:last-child {
  display: inline-flex;
  align-items: center;
}

body.bootstrap-ui.app-body .topbar-nav-icon {
  width: 1.72rem;
  height: 1.72rem;
  border-radius: 0.68rem;
}

body.bootstrap-ui .notification-icon i,
body.bootstrap-ui .topbar-nav-icon i,
body.bootstrap-ui .user-menu-item-icon i,
body.bootstrap-ui .menu-link-icon i,
body.bootstrap-ui .sidebar-close i,
body.bootstrap-ui .settings-modal-close i,
body.bootstrap-ui .sidebar-toggle-icon,
body.bootstrap-ui .task-mini-card-icon i,
body.bootstrap-ui .task-progress-card-icon i,
body.bootstrap-ui .task-history-summary-icon i,
body.bootstrap-ui .task-scope-button i,
body.bootstrap-ui .button i,
body.bootstrap-ui .button-ghost i,
body.bootstrap-ui .table-icon-action i,
body.bootstrap-ui .text-link i {
  font-size: 1rem;
  line-height: 1;
}

body.bootstrap-ui .topbar-icon-button,
body.bootstrap-ui .topbar-user-card,
body.bootstrap-ui .sidebar-toggle {
  border-radius: 14px;
}

body.bootstrap-ui .layout {
  gap: 1rem;
}

body.bootstrap-ui .sidebar {
  padding: 0.9rem;
  border-radius: 1.2rem;
  box-shadow: 0 14px 28px rgba(64, 82, 110, 0.08);
}

body.bootstrap-ui .menu {
  gap: 0.65rem;
}

body.bootstrap-ui .menu-group {
  display: grid;
  gap: 0.38rem;
  padding: 0.62rem;
  border: 1px solid rgba(222, 228, 238, 0.92);
  border-radius: 1rem;
  background: rgba(252, 253, 255, 0.92);
}

body.bootstrap-ui .menu-group + .menu-group {
  margin-top: 0;
  padding-top: 0.62rem;
  border-top: 1px solid rgba(222, 228, 238, 0.92);
}

body.bootstrap-ui .menu-link {
  display: flex;
  align-items: center;
  gap: 0.62rem;
  min-height: 42px;
  padding: 0.62rem 0.72rem;
  border-radius: 0.95rem;
  color: #32465c;
}

body.bootstrap-ui .menu-link-secondary::before {
  display: none;
}

body.bootstrap-ui .menu-link-icon {
  width: 1.85rem;
  height: 1.85rem;
  flex: 0 0 1.85rem;
  border-radius: 0.8rem;
  background: rgba(237, 243, 255, 0.98);
  color: var(--accent);
}

body.bootstrap-ui .menu-link-label {
  min-width: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

body.bootstrap-ui .menu-link.is-active {
  box-shadow:
    inset 0 0 0 1px rgba(37, 87, 214, 0.12),
    0 10px 18px rgba(73, 102, 164, 0.07);
}

body.bootstrap-ui .menu-link.is-active .menu-link-icon {
  background: linear-gradient(135deg, var(--accent) 0%, var(--sky) 100%);
  color: #ffffff;
}

body.bootstrap-ui .sidebar-note {
  margin-top: 0.9rem;
  padding: 0.72rem 0.82rem;
  border-radius: 1rem;
  border: 1px dashed rgba(185, 199, 220, 0.96);
  background: rgba(247, 250, 255, 0.98);
  font-size: 0.8rem;
}

body.bootstrap-ui .content {
  gap: 1rem;
}

body.bootstrap-ui .page-context-bar,
body.bootstrap-ui .panel,
body.bootstrap-ui .detail-header,
body.bootstrap-ui .hero,
body.bootstrap-ui .table-wrap,
body.bootstrap-ui .settings-modal-card {
  border-radius: 1.2rem;
}

body.bootstrap-ui .panel {
  padding: 1.4rem;
}

body.bootstrap-ui .panel-header {
  margin-bottom: 1rem;
}

body.bootstrap-ui .panel-header h1,
body.bootstrap-ui .detail-header h1,
body.bootstrap-ui .hero h1 {
  font-size: clamp(1.8rem, 3vw, 2.55rem);
}

body.bootstrap-ui .panel-header h2,
body.bootstrap-ui .detail-header h2,
body.bootstrap-ui .hero h2 {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
}

body.bootstrap-ui .filters {
  gap: 0.85rem;
}

body.bootstrap-ui .input,
body.bootstrap-ui textarea,
body.bootstrap-ui select {
  min-height: 48px;
  border-radius: 0.9rem;
}

body.bootstrap-ui .button,
body.bootstrap-ui .button-ghost {
  min-height: 46px;
  padding: 0.72rem 1rem;
  border-radius: 0.85rem;
  font-size: 0.92rem;
}

body.bootstrap-ui .button {
  box-shadow: 0 10px 22px rgba(var(--accent-rgb), 0.18);
}

body.bootstrap-ui .button-row,
body.bootstrap-ui .hero-actions,
body.bootstrap-ui .table-actions {
  gap: 0.65rem;
}

body.bootstrap-ui .stat-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.9rem;
}

body.bootstrap-ui .stat-card-copy {
  display: grid;
  gap: 0.15rem;
}

body.bootstrap-ui .stat-card-icon {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: rgba(237, 243, 255, 0.98);
  color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

body.bootstrap-ui .stat-card-icon i {
  font-size: 1.2rem;
}

body.bootstrap-ui .data-table {
  font-size: 0.93rem;
}

body.bootstrap-ui .data-table th,
body.bootstrap-ui .data-table td {
  padding: 0.78rem 0.85rem;
}

body.bootstrap-ui .data-table thead th {
  background: linear-gradient(180deg, rgba(245, 248, 252, 0.99), rgba(240, 244, 249, 0.98));
  color: #5b6c80;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
}

body.bootstrap-ui .data-table tbody td {
  vertical-align: middle;
}

body.bootstrap-ui .status-badge {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-weight: 800;
}

body.bootstrap-ui .table-icon-action {
  border-radius: 0.8rem;
}

body.bootstrap-ui .table-icon-action i {
  font-size: 1.1rem;
}

body.bootstrap-ui .message {
  border-left: 4px solid rgba(37, 87, 214, 0.4);
}

body.bootstrap-ui .message.success {
  border-left-color: rgba(25, 177, 118, 0.45);
}

body.bootstrap-ui .message.error,
body.bootstrap-ui .message.danger {
  border-left-color: rgba(199, 73, 44, 0.42);
}

body.bootstrap-ui .message.warning {
  border-left-color: rgba(239, 140, 28, 0.44);
}

body.bootstrap-ui .dashboard-modules-grid {
  gap: 0.8rem;
}

body.bootstrap-ui .dashboard-module-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.8rem;
}

body.bootstrap-ui .dashboard-module-icon {
  width: 2.9rem;
  height: 2.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  background: rgba(237, 243, 255, 0.98);
  color: var(--accent);
}

body.bootstrap-ui .dashboard-module-icon i {
  font-size: 1.2rem;
}

body.bootstrap-ui .dashboard-module-copy {
  display: grid;
  gap: 0.3rem;
}

body.bootstrap-ui .dashboard-module-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
}

body.bootstrap-ui .support-cta-header {
  align-items: center;
}

body.bootstrap-ui .support-cta-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

body.bootstrap-ui .support-cta-highlight {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(247, 250, 255, 0.96);
  border: 1px solid rgba(214, 221, 233, 0.94);
  color: #40546d;
  font-size: 0.82rem;
  font-weight: 700;
}

body.bootstrap-ui .support-cta-highlight i {
  color: var(--accent);
}

body.bootstrap-ui .task-dashboard-compact-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

body.bootstrap-ui .task-mini-card {
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 0;
  gap: 0.75rem;
  padding: 0.9rem;
}

body.bootstrap-ui .task-mini-card-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.18rem;
}

body.bootstrap-ui .task-mini-card strong {
  font-size: 1.45rem;
}

body.bootstrap-ui .task-progress-card-copy {
  gap: 0.7rem;
}

body.bootstrap-ui .dashboard-filter-toolbar {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid rgba(214, 221, 233, 0.94);
  border-radius: 1rem;
  background: rgba(250, 252, 255, 0.98);
}

body.bootstrap-ui .dashboard-filter-toolbar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

body.bootstrap-ui .dashboard-filter-toolbar-copy {
  display: grid;
  gap: 0.18rem;
}

body.bootstrap-ui .dashboard-filter-toolbar-copy strong {
  color: #223248;
  font-size: 1rem;
}

body.bootstrap-ui .dashboard-filter-toolbar-copy span {
  color: #66778a;
  font-size: 0.9rem;
}

body.bootstrap-ui .dashboard-filter-toolbar .filters {
  margin-bottom: 0;
}

body.bootstrap-ui .dashboard-task-title-stack {
  display: grid;
  gap: 0.25rem;
}

body.bootstrap-ui .dashboard-task-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  align-items: center;
}

body.bootstrap-ui .dashboard-task-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.46rem;
  border-radius: 999px;
  background: rgba(237, 243, 255, 0.98);
  color: var(--accent-deep);
  font-size: 0.68rem;
  font-weight: 800;
}

body.bootstrap-ui .dashboard-task-chip-muted {
  background: rgba(247, 249, 252, 0.98);
  color: #64768a;
}

body.bootstrap-ui .dashboard-task-actions {
  display: flex;
  align-items: center;
  justify-content: center;
}

body.bootstrap-ui .project-hero-actions .button,
body.bootstrap-ui .task-detail-hero .button,
body.bootstrap-ui .user-row-actions .text-link,
body.bootstrap-ui .table-actions .text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

body.bootstrap-ui .user-row-actions,
body.bootstrap-ui .table-actions {
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  body.bootstrap-ui.app-body .topbar-main-compact {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.42rem;
    padding-bottom: 0.42rem;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .topbar-leading {
    width: auto;
    flex-wrap: nowrap;
    gap: 0.55rem;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .topbar-actions-compact {
    width: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .user-menu-shell,
  body.bootstrap-ui.app-body .topbar-main-compact .topbar-user-card {
    flex: 0 1 auto;
  }

  body.bootstrap-ui .brand-context-copy {
    display: none;
  }

  body.bootstrap-ui .topbar-main {
    padding-bottom: 0.8rem;
  }
}

@media (max-width: 760px) {
  body.bootstrap-ui .dashboard-filter-toolbar-head,
  body.bootstrap-ui .support-cta-header {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  body.bootstrap-ui.app-body .topbar-main-compact,
  body.bootstrap-ui.app-body .topbar-nav {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .topbar-leading {
    width: auto;
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .topbar-actions-compact {
    width: auto;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .notification-shell {
    align-self: auto;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .notification-trigger {
    width: 38px;
    min-width: 38px;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .topbar-user-card {
    width: auto;
    max-width: min(54vw, 196px);
    min-height: 38px;
    padding: 0.42rem 0.58rem;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .user-menu-shell {
    width: auto;
    min-width: 0;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .user-menu-panel {
    left: auto;
    right: 0;
    width: min(260px, calc(100vw - 1.5rem));
    min-width: 0;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .brand-lockup {
    width: min(100%, 132px);
  }

  body.bootstrap-ui .brand-context {
    display: none;
  }

  body.bootstrap-ui .topbar-nav-link {
    padding: 0.68rem 0.85rem;
  }

  body.bootstrap-ui .menu-group {
    padding: 0.65rem;
  }

  body.bootstrap-ui .panel {
    padding: 1.15rem;
  }

  body.bootstrap-ui .task-dashboard-compact-grid {
    grid-template-columns: 1fr;
  }

  body.bootstrap-ui .task-mini-card {
    grid-template-columns: auto 1fr;
  }

  body.bootstrap-ui.app-body .topbar-nav {
    padding-top: 0.34rem;
    padding-bottom: 0.42rem;
  }

  body.bootstrap-ui.app-body .sidebar-toggle-nav {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  body.bootstrap-ui.app-body .topbar-nav-link {
    min-height: 44px;
    padding: 0.56rem 0.82rem;
    font-size: 0.86rem;
  }

  body.bootstrap-ui.app-body .topbar-nav-icon {
    width: 1.7rem;
    height: 1.7rem;
  }
}

@media (max-width: 520px) {
  body.bootstrap-ui.app-body .topbar-main-compact .topbar-user strong {
    max-width: 88px;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .brand-lockup {
    width: min(100%, 118px);
  }
}

body.bootstrap-ui .topbar-nav-link {
  flex: 0 0 auto;
  white-space: nowrap;
}

body.bootstrap-ui .dashboard-filter-toolbar-head > *,
body.bootstrap-ui .dashboard-filter-toolbar .filters > *,
body.bootstrap-ui .task-mini-card,
body.bootstrap-ui .task-progress-card-copy > * {
  min-width: 0;
}

/* Structural surface normalization: keep content areas rectilinear and
   reserve softer rounding for interactive action buttons. */
body.bootstrap-ui {
  --surface-radius-xl: 10px;
  --surface-radius-lg: 8px;
  --surface-radius-md: 6px;
}

body.bootstrap-ui .sidebar,
body.bootstrap-ui .menu-group,
body.bootstrap-ui .sidebar-note,
body.bootstrap-ui .page-context-bar,
body.bootstrap-ui .panel,
body.bootstrap-ui .detail-header,
body.bootstrap-ui .hero,
body.bootstrap-ui .table-wrap,
body.bootstrap-ui .settings-modal-card,
body.bootstrap-ui .filters,
body.bootstrap-ui .filters-wide,
body.bootstrap-ui .form-section,
body.bootstrap-ui .form-meta,
body.bootstrap-ui .filter-layout-advanced,
body.bootstrap-ui .notification-panel,
body.bootstrap-ui .notification-popup,
body.bootstrap-ui .user-menu-panel,
body.bootstrap-ui .dashboard-modules-panel,
body.bootstrap-ui .dashboard-module-card,
body.bootstrap-ui .support-cta-panel,
body.bootstrap-ui .dashboard-filter-toolbar,
body.bootstrap-ui .task-dashboard-compact,
body.bootstrap-ui .task-mini-card,
body.bootstrap-ui .task-progress-card-compact,
body.bootstrap-ui .dashboard-reminders-panel,
body.bootstrap-ui .dashboard-reminder-note,
body.bootstrap-ui .project-card,
body.bootstrap-ui .project-detail-hero,
body.bootstrap-ui .project-hero-meta-card,
body.bootstrap-ui .project-hero-progress,
body.bootstrap-ui .project-hero-mini-metrics,
body.bootstrap-ui .project-hero-actions,
body.bootstrap-ui .project-summary-panel,
body.bootstrap-ui .project-team-panel,
body.bootstrap-ui .project-task-panel,
body.bootstrap-ui .project-updates-panel,
body.bootstrap-ui .project-summary-card,
body.bootstrap-ui .project-summary-band,
body.bootstrap-ui .project-team-member,
body.bootstrap-ui .project-directory-panel,
body.bootstrap-ui .project-directory-stat,
body.bootstrap-ui .project-metric,
body.bootstrap-ui .support-ticket-hero,
body.bootstrap-ui .support-ticket-aside,
body.bootstrap-ui .support-ticket-form-panel,
body.bootstrap-ui .support-ticket-history-panel,
body.bootstrap-ui .task-detail-hero,
body.bootstrap-ui .task-summary-panel,
body.bootstrap-ui .task-progress-panel,
body.bootstrap-ui .task-history-panel,
body.bootstrap-ui .task-status-panel,
body.bootstrap-ui .task-form-panel,
body.bootstrap-ui .task-list-page-panel,
body.bootstrap-ui .task-history-collapsible,
body.bootstrap-ui .task-form-group,
body.bootstrap-ui .task-history-panel .timeline-item,
body.bootstrap-ui .user-picker,
body.bootstrap-ui .user-option,
body.bootstrap-ui .user-list-panel,
body.bootstrap-ui .user-form-panel,
body.bootstrap-ui .user-active-panel,
body.bootstrap-ui .user-confirm-panel,
body.bootstrap-ui .project-form-panel,
body.bootstrap-ui .user-status-card,
body.bootstrap-ui .user-warning-card,
body.bootstrap-ui .permission-card,
body.bootstrap-ui .permission-option,
body.bootstrap-ui .role-list-panel,
body.bootstrap-ui .role-form-panel,
body.bootstrap-ui .role-delete-panel,
body.bootstrap-ui .audit-list-panel,
body.bootstrap-ui .audit-detail-panel,
body.bootstrap-ui .audit-filters,
body.bootstrap-ui .stat-card,
body.bootstrap-ui .stat-card-metric,
body.bootstrap-ui .audit-detail-card,
body.bootstrap-ui .audit-change-table-wrapper,
body.bootstrap-ui .audit-change-table tbody tr,
body.bootstrap-ui .json-block,
body.bootstrap-ui .workgroup-task-panel,
body.bootstrap-ui .empty-state,
body.bootstrap-ui .empty-state-inline {
  border-radius: var(--surface-radius-xl);
}

body.bootstrap-ui .topbar-nav-link,
body.bootstrap-ui .topbar-nav-icon,
body.bootstrap-ui .menu-link,
body.bootstrap-ui .menu-link-icon,
body.bootstrap-ui .page-context-link,
body.bootstrap-ui .project-symbol,
body.bootstrap-ui .project-metric-icon,
body.bootstrap-ui .project-team-avatar,
body.bootstrap-ui .dashboard-module-icon,
body.bootstrap-ui .stat-card-icon,
body.bootstrap-ui .task-history-summary-icon {
  border-radius: var(--surface-radius-lg);
}

body.bootstrap-ui .menu-group-label,
body.bootstrap-ui .page-context-section {
  border-radius: var(--surface-radius-md);
}

body.bootstrap-ui .dashboard-module-card::before,
body.bootstrap-ui .project-card::before {
  border-radius: var(--surface-radius-xl) 0 0 var(--surface-radius-xl);
}

body.bootstrap-ui .data-table thead th:first-child,
body.bootstrap-ui .audit-change-table thead th:first-child {
  border-top-left-radius: var(--surface-radius-lg);
}

body.bootstrap-ui .data-table thead th:last-child,
body.bootstrap-ui .audit-change-table thead th:last-child {
  border-top-right-radius: var(--surface-radius-lg);
}

@media (max-width: 980px) {
  body.bootstrap-ui.app-body .topbar-main-compact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .topbar-leading,
  body.bootstrap-ui.app-body .topbar-main-compact .topbar-actions-compact {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  body.bootstrap-ui .dashboard-filter-toolbar {
    padding: 0.9rem;
  }

  body.bootstrap-ui .dashboard-filter-toolbar-head .chip-row {
    width: 100%;
  }
}

@media (max-width: 640px) {
  body.bootstrap-ui.app-body .topbar-main-compact {
    gap: 0.45rem;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .topbar-actions-compact {
    justify-content: flex-end;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .topbar-user-card {
    max-width: min(50vw, 182px);
  }

  body.bootstrap-ui .topbar-nav-link {
    min-height: 48px;
  }

  body.bootstrap-ui .dashboard-filter-toolbar-copy span {
    font-size: 0.86rem;
  }
}

@media (max-width: 380px) {
  body.bootstrap-ui.app-body .topbar-main-compact {
    gap: 0.35rem;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  body.bootstrap-ui.app-body .topbar-nav {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .brand-lockup {
    width: min(100%, 104px);
  }

  body.bootstrap-ui.app-body .topbar-main-compact .notification-trigger {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .topbar-user-card {
    max-width: min(50vw, 150px);
    min-height: 36px;
    padding: 0.38rem 0.5rem;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .topbar-user strong {
    max-width: 72px;
    font-size: 0.76rem;
  }

  body.bootstrap-ui .topbar-nav-link {
    padding: 0.64rem 0.78rem;
    font-size: 0.84rem;
  }

  body.bootstrap-ui .topbar-nav-icon {
    width: 1.8rem;
    height: 1.8rem;
  }

  body.bootstrap-ui.app-body .topbar-nav {
    padding-top: 0.32rem;
    padding-bottom: 0.38rem;
  }

  body.bootstrap-ui.app-body .sidebar-toggle-nav {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
  }

  body.bootstrap-ui.app-body .topbar-nav-link {
    min-height: 42px;
    padding: 0.52rem 0.74rem;
  }

  body.bootstrap-ui.app-body .topbar-nav-icon {
    width: 1.62rem;
    height: 1.62rem;
  }
}

/* Sidebar reference alignment */
body.bootstrap-ui.app-body {
  --sidebar-width: clamp(170px, 11.4vw, 186px);
}

body.bootstrap-ui .sidebar {
  gap: 0.35rem;
  padding: 0 0 0.72rem;
  border-radius: 0.4rem;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  overflow: hidden auto;
}

body.bootstrap-ui .sidebar-head {
  margin: 0 0 0.35rem;
}

body.bootstrap-ui .sidebar-head-badge {
  min-height: 1.15rem;
  padding: 0.18rem 0.42rem;
  border-radius: 0;
  background: linear-gradient(
    180deg,
    rgba(var(--accent-rgb), 0.1) 0%,
    rgba(var(--sky-rgb), 0.16) 100%
  );
  color: var(--accent-deep);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: none;
}

body.bootstrap-ui .sidebar-mobile-header {
  margin: 0.45rem 0.5rem 0.15rem;
}

body.bootstrap-ui .menu {
  gap: 0;
  padding: 0 0.38rem;
}

body.bootstrap-ui .menu-group,
body.bootstrap-ui .menu-group + .menu-group {
  gap: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.bootstrap-ui .menu-group-label {
  display: none;
}

body.bootstrap-ui .menu-link,
body.bootstrap-ui .menu-link-secondary {
  gap: 0.5rem;
  min-height: 35px;
  padding: 0.45rem 0.42rem;
  border: 0;
  border-radius: 0.42rem;
  background: transparent;
  color: #334155;
}

body.bootstrap-ui .menu-link:hover,
body.bootstrap-ui .menu-link:focus-visible,
body.bootstrap-ui .menu-link-secondary:hover,
body.bootstrap-ui .menu-link-secondary:focus-visible {
  background: rgba(var(--accent-rgb), 0.08);
  border: 0;
  color: var(--accent-deep);
}

body.bootstrap-ui .menu-link.is-active,
body.bootstrap-ui .menu-link[aria-current="page"] {
  background: linear-gradient(
    180deg,
    rgba(var(--accent-rgb), 0.12) 0%,
    rgba(var(--sky-rgb), 0.16) 100%
  );
  color: var(--accent-deep);
  box-shadow: inset 2px 0 0 var(--accent);
}

body.bootstrap-ui .menu-link-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 0.95rem;
  border-radius: 0;
  background: transparent;
  color: var(--gray-strong);
}

body.bootstrap-ui .menu-link-icon i {
  font-size: 0.78rem;
}

body.bootstrap-ui .menu-link.is-active .menu-link-icon,
body.bootstrap-ui .menu-link[aria-current="page"] .menu-link-icon {
  background: transparent;
  color: var(--accent);
}

body.bootstrap-ui .menu-link-label {
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.15;
}

body.bootstrap-ui .menu-link-caret {
  color: rgba(100, 116, 139, 0.6);
}

body.bootstrap-ui .menu-link-caret i {
  font-size: 0.58rem;
}

body.bootstrap-ui .menu-link:hover .menu-link-caret,
body.bootstrap-ui .menu-link:focus-visible .menu-link-caret,
body.bootstrap-ui .menu-link.is-active .menu-link-caret,
body.bootstrap-ui .menu-link[aria-current="page"] .menu-link-caret {
  color: rgba(var(--accent-rgb), 0.72);
}

body.bootstrap-ui .sidebar-fab {
  position: sticky;
  bottom: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin: auto 0.38rem 0  auto;
  border-radius: 0.52rem;
  background: linear-gradient(180deg, var(--sky) 0%, var(--accent) 100%);
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(var(--accent-rgb), 0.28);
  z-index: 1;
}

body.bootstrap-ui .sidebar-fab i {
  font-size: 0.82rem;
  line-height: 1;
}

body.bootstrap-ui .sidebar-fab:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

/* Secondary nav: contiguous rectangular buttons */
body.bootstrap-ui.app-body .topbar-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  padding: 0.42rem 0.72rem 0.56rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.bootstrap-ui.app-body .topbar-nav::-webkit-scrollbar {
  display: none;
}

body.bootstrap-ui.app-body .topbar-nav > * {
  flex: 0 0 auto;
}

body.bootstrap-ui.app-body .topbar-nav > * + * {
  margin-left: -1px;
}

body.bootstrap-ui.app-body .topbar-nav {
  --topbar-secondary-bg: #f8fafc;
}

body.bootstrap-ui.app-body .topbar-nav .sidebar-toggle,
body.bootstrap-ui.app-body .topbar-nav-link {
  align-self: stretch;
  min-height: 42px;
  margin: 0;
  padding: 0.58rem 0.92rem;
  border: 1px solid var(--topbar-secondary-bg);
  border-radius: 0;
  background: var(--topbar-secondary-bg);
  color: #334155;
  box-shadow: none;
  white-space: nowrap;
  position: relative;
}

body.bootstrap-ui.app-body .sidebar-toggle-nav {
  width: 42px;
  min-width: 42px;
  padding: 0;
  justify-content: center;
  border-radius: 0;
}

body.bootstrap-ui.app-body .topbar-nav .sidebar-toggle:hover,
body.bootstrap-ui.app-body .topbar-nav .sidebar-toggle:focus-visible,
body.bootstrap-ui.app-body .topbar-nav-link:hover,
body.bootstrap-ui.app-body .topbar-nav-link:focus-visible {
  background: var(--topbar-secondary-bg);
  border-color: var(--topbar-secondary-bg);
  color: #1e3a8a;
  transform: none;
  z-index: 1;
}

body.bootstrap-ui.app-body .topbar-nav-link.is-active,
body.bootstrap-ui.app-body .topbar-nav-link[aria-current="page"] {
  background: linear-gradient(180deg, var(--sky) 0%, var(--accent) 100%);
  border-color: var(--accent);
  color: #ffffff;
  z-index: 2;
}

body.bootstrap-ui.app-body .topbar-nav-icon {
  width: 1.34rem;
  height: 1.34rem;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
}

body.bootstrap-ui.app-body .topbar-nav-link.is-active .topbar-nav-icon,
body.bootstrap-ui.app-body .topbar-nav-link[aria-current="page"] .topbar-nav-icon {
  background: transparent;
  color: #ffffff;
}

body.bootstrap-ui.app-body .topbar-nav-link > span:last-child {
  display: inline-flex;
  align-items: center;
}

@media (max-width: 860px) {
  body.bootstrap-ui.app-body .topbar-nav {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }

  body.bootstrap-ui.app-body .topbar-nav .sidebar-toggle,
  body.bootstrap-ui.app-body .topbar-nav-link {
    min-height: 40px;
    padding: 0.52rem 0.78rem;
    font-size: 0.83rem;
  }

  body.bootstrap-ui.app-body .sidebar-toggle-nav {
    width: 40px;
    min-width: 40px;
    padding: 0;
  }

  body.bootstrap-ui.app-body .topbar-nav-icon {
    width: 1.22rem;
    height: 1.22rem;
  }
}

body.bootstrap-ui.app-body .sidebar-toggle-main-mobile {
  display: none;
}

@media (max-width: 640px) {
  body.bootstrap-ui.app-body .topbar-main-compact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.65rem;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .topbar-leading {
    grid-column: auto;
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .brand-lockup {
    width: min(100%, 108px);
  }

  body.bootstrap-ui.app-body .topbar-main-compact .topbar-actions-compact {
    grid-column: auto;
    width: auto;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.32rem;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .notification-shell,
  body.bootstrap-ui.app-body .topbar-main-compact .user-menu-shell {
    flex: 0 0 auto;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .user-menu-panel {
    position: fixed;
    top: calc(var(--topbar-offset) + 0.12rem);
    right: max(0.55rem, env(safe-area-inset-right));
    left: auto;
    width: min(15.5rem, calc(100vw - 1.1rem));
    max-width: calc(100vw - 1.1rem);
    min-width: 0;
    box-sizing: border-box;
    gap: 0.28rem;
    padding: 0.45rem;
    z-index: 95;
    overflow: hidden;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .user-menu-panel[hidden] {
    display: none;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .user-menu-item {
    justify-content: flex-start;
    min-height: 42px;
    padding: 0.7rem 0.78rem;
    white-space: nowrap;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .user-menu-item span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.bootstrap-ui.app-body .sidebar-toggle-main-mobile {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .notification-trigger,
  body.bootstrap-ui.app-body .topbar-main-compact .messaging-trigger,
  body.bootstrap-ui.app-body .topbar-main-compact .topbar-user-card {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    justify-content: center;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .topbar-user,
  body.bootstrap-ui.app-body .topbar-main-compact .topbar-user-caret {
    display: none;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .topbar-user-avatar {
    width: 30px;
    height: 30px;
    margin: 0;
    font-size: 0.82rem;
  }

  body.bootstrap-ui.app-body .topbar-nav {
    display: none;
  }
}

@media (max-width: 420px) {
  body.bootstrap-ui.app-body .topbar-main-compact {
    gap: 0.35rem;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .brand-lockup {
    width: min(100%, 96px);
  }

  body.bootstrap-ui.app-body .topbar-main-compact .topbar-actions-compact {
    gap: 0.26rem;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .user-menu-panel {
    right: max(0.45rem, env(safe-area-inset-right));
    width: min(14.25rem, calc(100vw - 0.9rem));
    max-width: calc(100vw - 0.9rem);
    padding: 0.42rem;
  }

  body.bootstrap-ui.app-body .sidebar-toggle-main-mobile,
  body.bootstrap-ui.app-body .topbar-main-compact .notification-trigger,
  body.bootstrap-ui.app-body .topbar-main-compact .messaging-trigger,
  body.bootstrap-ui.app-body .topbar-main-compact .topbar-user-card {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
  }

  body.bootstrap-ui.app-body .topbar-main-compact .topbar-user-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.78rem;
  }
}

/* Unified topbar controls in light theme */
body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-main,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-main-compact,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-nav,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-surface {
  --topbar-shared-bg: #ffffff;
}

body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar {
  gap: 0;
}

body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-main,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-main-compact,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-nav,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-surface {
  border-color: var(--topbar-shared-bg);
  background: var(--topbar-shared-bg);
}

body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-main-compact {
  min-height: 52px;
  padding: 0.32rem 0.9rem 0.12rem;
}

body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-nav {
  align-items: stretch;
  padding: 0.02rem 0.72rem 0.04rem;
  border-top-color: var(--topbar-shared-bg);
}

body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-button,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .notification-trigger,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .messaging-trigger,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .sidebar-toggle,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-user-card,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-nav .sidebar-toggle,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-nav-link,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .sidebar-toggle-main-mobile {
  border-color: var(--topbar-shared-bg);
  background: var(--topbar-shared-bg);
  box-shadow: none;
}

body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-nav .sidebar-toggle,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-nav-link {
  align-self: stretch;
  min-height: 40px;
}

body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-button:hover,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-button:focus-visible,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .notification-trigger:hover,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .notification-trigger:focus-visible,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .messaging-trigger:hover,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .messaging-trigger:focus-visible,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .sidebar-toggle:hover,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .sidebar-toggle:focus-visible,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-user-card:hover,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-user-card:focus-visible,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-nav .sidebar-toggle:hover,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-nav .sidebar-toggle:focus-visible,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-nav-link:hover,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-nav-link:focus-visible,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .sidebar-toggle-main-mobile:hover,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .sidebar-toggle-main-mobile:focus-visible {
  border-color: var(--topbar-shared-bg);
  background: var(--topbar-shared-bg);
  box-shadow: none;
}

body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-divider {
  background: var(--topbar-shared-bg);
}

body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-nav-link.is-active,
body.bootstrap-ui.app-body:not([data-theme="dark"]) .topbar-nav-link[aria-current="page"] {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--sky) 0%, var(--accent) 100%);
}

body.bootstrap-ui .table-pagination {
  gap: 0.5rem 0.8rem;
  margin-top: 0.75rem;
  padding: 0.52rem 0.7rem;
  border-radius: 14px;
}

body.bootstrap-ui .table-pagination-summary {
  font-size: 0.78rem;
  line-height: 1.25;
}

body.bootstrap-ui .table-pagination-links {
  margin-left: auto;
  gap: 0.28rem;
}

body.bootstrap-ui .table-pagination-status {
  font-size: 0.74rem;
  line-height: 1;
}

body.bootstrap-ui .table-pagination-link,
body.bootstrap-ui .table-pagination-ellipsis {
  min-width: 30px;
  min-height: 30px;
  padding: 0.28rem 0.56rem;
  border-radius: 9px;
  font-size: 0.78rem;
}

body.bootstrap-ui .table-pagination-link-nav {
  padding-inline: 0.66rem;
}

@media (max-width: 640px) {
  body.bootstrap-ui .table-pagination {
    padding: 0.48rem 0.62rem;
  }

  body.bootstrap-ui .table-pagination-links {
    width: 100%;
    gap: 0.24rem;
  }

  body.bootstrap-ui .table-pagination-status {
    width: 100%;
    margin-bottom: 0.12rem;
  }

  body.bootstrap-ui .table-pagination-link,
  body.bootstrap-ui .table-pagination-ellipsis {
    min-width: 28px;
    min-height: 28px;
    padding: 0.24rem 0.5rem;
    font-size: 0.75rem;
  }
}
