/* Final UI overrides loaded after the main stylesheet. */
.dashboard-maker-tag {
  display: block;
  margin-top: 5px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.staff-modern-dashboard {
  margin-bottom: 14px;
}

.staff-modern-dashboard .dashboard-kpi-grid {
  grid-template-columns: repeat(3, minmax(170px, 1fr));
}

.staff-modern-performance-wrap {
  margin-top: 0;
}

.staff-performance-panel,
.staff-performance-section,
.staff-performance-table-wrap,
.transactions-module .expense-card,
.transactions-module .transaction-card,
.transactions-module .chart-card,
.transactions-module .cash-balance-card,
.transactions-module .transaction-register-card,
.transactions-module .search-report-card,
.transaction-workspace .expense-card,
.transaction-workspace .transaction-card,
.transaction-workspace .chart-card,
.transaction-workspace .cash-balance-card {
  border: 1px solid #d7e3f1;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 5px 15px rgba(15, 23, 42, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.staff-performance-panel:hover,
.staff-performance-section:hover,
.transactions-module .expense-card:hover,
.transactions-module .transaction-card:hover,
.transactions-module .chart-card:hover,
.transactions-module .cash-balance-card:hover,
.transactions-module .transaction-register-card:hover,
.transactions-module .search-report-card:hover,
.transaction-workspace .expense-card:hover,
.transaction-workspace .transaction-card:hover,
.transaction-workspace .chart-card:hover,
.transaction-workspace .cash-balance-card:hover {
  transform: translateY(-2px);
  border-color: #b8cce3;
  box-shadow: 0 9px 22px rgba(15, 23, 42, 0.10);
}

.team-chat-panel {
  width: clamp(360px, 22vw, 430px);
  max-width: min(430px, calc(100vw - 18px));
}

.modern-chat-body {
  grid-template-columns: minmax(0, 1fr);
  height: calc(100vh - 88px);
  min-height: 520px;
  max-height: 900px;
}

.team-chat-panel .chat-conversation-panel {
  display: none;
}

.team-chat-panel.chat-mobile-open .chat-sidebar {
  display: none;
}

.team-chat-panel.chat-mobile-open .chat-conversation-panel {
  display: grid;
}

.team-chat-panel .chat-mobile-back {
  display: grid;
}

.team-chat-panel .chat-sidebar {
  min-height: 0;
}

.team-chat-panel .chat-sidebar-top {
  position: sticky;
  top: 0;
  z-index: 2;
}

.team-chat-panel .chat-conversation-list,
.team-chat-panel .new-chat-user-list,
.team-chat-panel .chat-messages {
  scrollbar-width: thin;
}

.chat-user-name {
  color: #0b1220;
  font-size: 15px;
  font-weight: 950;
}

.chat-avatar {
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.chat-composer-line textarea {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  max-height: 148px;
  padding: 12px 14px;
  overflow-y: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-composer-line textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}

/* Sidebar branding polish */
.sidebar .brand {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  align-content: center;
  column-gap: 14px;
  min-height: 116px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar .brand-mark {
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  border-radius: 13px;
  overflow: hidden;
  align-self: center;
  justify-self: start;
}

.sidebar .ca-logo-mark img {
  width: 45px;
  height: 45px;
  object-fit: contain;
}

.sidebar .brand-text-only {
  min-width: 0;
  max-width: 100%;
}

.sidebar .brand-text-only h1 {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0;
  white-space: normal;
}

.sidebar .brand-text-only h1 span,
.sidebar .brand-text-only h1 em {
  display: inline;
  color: #ffffff;
  font-style: normal;
  font-weight: 900;
}

.sidebar .brand-text-only h1 span::after {
  content: " ";
}

.sidebar .brand-text-only .brand-byline {
  margin: 6px 0 0;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: 0;
  white-space: normal;
}

.sidebar .brand-text-only .brand-subline {
  margin: 3px 0 0;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
}

.sidebar.collapsed .brand {
  grid-template-columns: 1fr;
  min-height: 84px;
  padding: 18px 15px;
  justify-items: center;
}

.sidebar.collapsed .brand-mark {
  justify-self: center;
}

.sidebar.collapsed .brand-text-only {
  display: none;
}

.chat-composer-line {
  align-items: end;
  gap: 12px;
}

.modern-chat-body .chat-message {
  max-width: 88%;
}

.chat-conversation-item,
.new-chat-user {
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.chat-conversation-item:hover,
.new-chat-user:hover {
  transform: translateY(-1px);
}

.brand-text-only .brand-byline {
  color: #a7b8c6;
  font-size: 14px;
  font-weight: 800;
}

.brand-text-only .brand-subline {
  color: #879bad;
  font-size: 11.5px;
  font-weight: 600;
}

@media (max-width: 680px) {
  .team-chat-panel {
    width: 100vw;
    max-width: 100vw;
  }

  .modern-chat-body {
    height: calc(100vh - 70px);
    min-height: 0;
  }
}

.notification-actions {
  justify-content: flex-end;
}

.notification-panel .notification-drawer-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 16px 20px 20px;
  overflow: hidden;
}

.notification-panel .notification-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  min-height: 42px;
  padding: 4px 2px 8px;
  overflow-x: auto;
  overflow-y: visible;
  background: linear-gradient(180deg, #f8fbff 0%, rgba(248, 251, 255, 0.94) 100%);
  scrollbar-width: thin;
}

.notification-panel .notification-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 13px;
  white-space: nowrap;
}

.notification-panel .notification-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 0 12px;
}

.notification-read-button {
  min-width: 58px;
}

.notification-read-button:disabled {
  opacity: 0.55;
  cursor: default;
}

.correction-required-table .correction-reason-cell {
  min-width: 240px;
  max-width: 360px;
  white-space: normal;
  color: #7f1d1d;
  font-weight: 800;
}

.staff-report-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 900;
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.staff-report-action svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.staff-report-action:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.staff-report-clear {
  border: 1px solid #cbd5e1;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  color: #334155;
}

.staff-report-excel {
  border: 1px solid #86efac;
  background: linear-gradient(145deg, #ecfdf5 0%, #ffffff 100%);
  color: #047857;
}

.staff-report-pdf {
  border: 1px solid #fecaca;
  background: linear-gradient(145deg, #fef2f2 0%, #ffffff 100%);
  color: #b91c1c;
}

.staff-report-print {
  border: 1px solid #bfdbfe;
  background: linear-gradient(145deg, #eff6ff 0%, #ffffff 100%);
  color: #1d4ed8;
}

.staff-report-clear:hover:not(:disabled) { border-color: #94a3b8; }
.staff-report-excel:hover:not(:disabled) { border-color: #22c55e; }
.staff-report-pdf:hover:not(:disabled) { border-color: #ef4444; }
.staff-report-print:hover:not(:disabled) { border-color: #2563eb; }

@media (max-width: 980px) {
  .staff-modern-dashboard .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 680px) {
  .staff-modern-dashboard .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }

  .notification-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

/* Dashboard scroll stability: loaded last so older dashboard rules cannot override it. */
html,
body,
#app {
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  scrollbar-gutter: stable;
}

.app-shell,
.app-shell.sidebar-collapsed {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 82px minmax(0, 1fr);
}

.login-page {
  height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar {
  position: relative;
  top: auto;
  left: auto;
  width: 286px;
  min-width: 286px;
  max-width: 286px;
  height: 100dvh;
  min-height: 0;
  max-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  flex-shrink: 0;
  transform: translateZ(0);
  backface-visibility: hidden;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.app-shell.sidebar-collapsed .sidebar,
.sidebar.collapsed {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
}

.sidebar .brand,
.sidebar .current-user-card {
  flex-shrink: 0;
  min-height: 0;
}

.sidebar .nav,
.nav {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.content {
  width: 100%;
  min-width: 0;
  height: 100dvh;
  min-height: 0;
  max-height: 100dvh;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.content,
.page,
.modern-dashboard,
.dashboard-layout,
.dashboard-single,
.dashboard-topbar,
.dashboard-topbar-card,
.dashboard-kpi-grid,
.dashboard-chart-grid,
.dashboard-lower-grid,
.dashboard-data-card,
.dashboard-kpi-card,
.staff-modern-dashboard,
.staff-modern-performance-wrap,
.staff-performance-panel,
.staff-performance-section {
  min-width: 0;
  max-width: 100%;
}

.page,
.modern-dashboard,
.dashboard-layout,
.staff-modern-dashboard,
.staff-modern-performance-wrap,
.staff-performance-panel {
  overflow-x: clip;
}

.topbar,
.dashboard-topbar {
  transform: translateZ(0);
  backface-visibility: hidden;
  z-index: 20;
}

.dashboard-mode .page,
.page.active {
  width: 100%;
}

.dashboard-kpi-grid,
.dashboard-chart-grid,
.dashboard-lower-grid {
  width: 100%;
}

.dashboard-kpi-card,
.dashboard-data-card {
  height: 100%;
  overflow: hidden;
  contain: layout paint;
}

.dashboard-data-card:hover,
.dashboard-kpi-card:hover,
.dashboard-topbar-card:hover,
.staff-performance-panel:hover,
.staff-performance-section:hover {
  transform: none;
}

.dashboard-chart-grid,
.dashboard-lower-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-chart-grid .dashboard-data-card {
  min-height: 260px;
}

.dashboard-lower-grid .dashboard-data-card {
  min-height: 248px;
}

.dashboard-donut-wrap,
.status-legend,
.fee-breakdown,
.dashboard-card-head {
  min-width: 0;
}

.dashboard-donut,
.fee-gauge {
  flex-shrink: 0;
}

.dashboard-line-chart {
  display: block;
  width: 100%;
  height: 150px;
  min-height: 150px;
  max-height: 150px;
}

.recent-activity-list,
.dashboard-activity-list,
.upcoming-due-list,
.staff-celebration-grid {
  min-width: 0;
  overscroll-behavior: contain;
}

.staff-modern-dashboard .staff-dashboard-kpi-grid,
.staff-modern-dashboard .dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 100%;
}

.staff-modern-dashboard .dashboard-kpi-card {
  min-width: 0;
  min-height: 96px;
  padding: 10px 11px;
  border-radius: 12px;
}

.staff-modern-dashboard .dashboard-kpi-top {
  gap: 7px;
}

.staff-modern-dashboard .dashboard-kpi-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.staff-modern-dashboard .dashboard-kpi-icon svg {
  width: 14px;
  height: 14px;
}

.staff-modern-dashboard .dashboard-kpi-title {
  min-width: 0;
  font-size: 10.5px;
  line-height: 1.18;
  white-space: normal;
}

.staff-modern-dashboard .dashboard-kpi-card > strong {
  margin-top: 6px;
  font-size: 20px;
  line-height: 1;
}

.staff-modern-dashboard .dashboard-kpi-meta {
  margin-top: 4px;
  gap: 5px;
}

.staff-modern-dashboard .dashboard-kpi-meta small {
  font-size: 9.5px;
  line-height: 1.12;
}

.staff-modern-dashboard .dashboard-mini-trend {
  height: 13px;
  margin-top: 5px;
}

.staff-performance-section .file-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior: contain;
}

@media (max-width: 1360px) {
  .dashboard-chart-grid,
  .dashboard-lower-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staff-modern-dashboard .staff-dashboard-kpi-grid,
  .staff-modern-dashboard .dashboard-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .staff-modern-dashboard .staff-dashboard-kpi-grid,
  .staff-modern-dashboard .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .sidebar .brand,
  .sidebar.collapsed .brand,
  .app-shell.sidebar-collapsed .sidebar .brand {
    grid-template-columns: 52px minmax(0, 1fr);
    justify-items: stretch;
    min-height: 116px;
    padding: 18px 20px 16px;
  }

  .sidebar .brand-text-only,
  .sidebar.collapsed .brand-text-only,
  .app-shell.sidebar-collapsed .sidebar .brand-text-only {
    display: block;
  }

  .sidebar .brand-mark,
  .sidebar.collapsed .brand-mark,
  .app-shell.sidebar-collapsed .sidebar .brand-mark {
    justify-self: start;
  }

  .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  .sidebar,
  .sidebar.collapsed,
  .app-shell.sidebar-collapsed .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 80;
    width: min(86vw, 320px);
    min-width: 0;
    max-width: min(86vw, 320px);
    height: 100dvh;
    max-height: 100dvh;
    transform: translateX(-105%);
    transition: transform 0.24s ease;
  }

  .sidebar.open,
  .sidebar.collapsed.open,
  .app-shell.sidebar-collapsed .sidebar.open {
    transform: translateX(0);
  }

  .content {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
  }
}

@media (max-width: 680px) {
  .dashboard-chart-grid,
  .dashboard-lower-grid {
    grid-template-columns: 1fr;
  }

  .staff-modern-dashboard .staff-dashboard-kpi-grid,
  .staff-modern-dashboard .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .staff-modern-dashboard .staff-dashboard-kpi-grid,
  .staff-modern-dashboard .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* Authoritative sidebar layout: fixed sidebar + independently scrolling content. */
:root {
  --sidebar-width: 286px;
  --sidebar-collapsed-width: 82px;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden !important;
}

.app-shell,
.app-shell.sidebar-collapsed {
  display: flex !important;
  align-items: stretch;
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  overflow: hidden !important;
  background: #f8fafc;
}

.sidebar,
.sidebar.collapsed,
.app-shell.sidebar-collapsed .sidebar {
  position: relative;
  inset: auto;
  z-index: 10;
  display: flex !important;
  flex-direction: column;
  flex: 0 0 var(--sidebar-width);
  width: var(--sidebar-width) !important;
  min-width: var(--sidebar-width) !important;
  max-width: var(--sidebar-width) !important;
  height: 100dvh;
  min-height: 0;
  max-height: 100dvh;
  padding: 0;
  overflow: hidden !important;
  background: linear-gradient(180deg, #0f2347 0%, #10244d 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  transform: none;
  overscroll-behavior: contain;
}

.app-shell.sidebar-collapsed .sidebar,
.sidebar.collapsed {
  flex-basis: var(--sidebar-collapsed-width);
  width: var(--sidebar-collapsed-width) !important;
  min-width: var(--sidebar-collapsed-width) !important;
  max-width: var(--sidebar-collapsed-width) !important;
}

.sidebar .brand {
  flex: 0 0 auto;
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  min-height: 108px;
  padding: 16px 18px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar .brand-mark {
  flex: 0 0 52px;
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  justify-self: start;
}

.sidebar .brand-text-only {
  min-width: 0;
  overflow: hidden;
}

.sidebar .brand-text-only h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0;
  color: #ffffff;
}

.sidebar .brand-text-only h1 span,
.sidebar .brand-text-only h1 em {
  display: inline;
  color: #ffffff;
  font-style: normal;
  font-weight: 900;
}

.sidebar .brand-text-only h1 span::after {
  content: " ";
}

.sidebar .brand-text-only .brand-byline {
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.2;
  font-weight: 800;
  color: #cbd5e1;
}

.sidebar .brand-text-only .brand-subline {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
  color: #94a3b8;
}

.sidebar .nav {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 12px 18px;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
}

.sidebar .nav .nav-item {
  min-width: 0;
  padding-inline: 14px 12px;
}

.sidebar .nav-label {
  min-width: 0;
}

.sidebar .current-user-card {
  flex: 0 0 auto;
  margin: 0;
  border-radius: 0;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.app-shell.sidebar-collapsed .sidebar .brand,
.sidebar.collapsed .brand {
  grid-template-columns: 1fr;
  justify-items: center;
  min-height: 84px;
  padding: 16px 14px;
}

.app-shell.sidebar-collapsed .sidebar .brand-text-only,
.sidebar.collapsed .brand-text-only,
.app-shell.sidebar-collapsed .sidebar .nav-section-title span,
.sidebar.collapsed .nav-section-title span,
.app-shell.sidebar-collapsed .sidebar .nav-label,
.sidebar.collapsed .nav-label,
.app-shell.sidebar-collapsed .sidebar .nav-badge,
.sidebar.collapsed .nav-badge,
.app-shell.sidebar-collapsed .sidebar .profile-copy,
.sidebar.collapsed .profile-copy,
.app-shell.sidebar-collapsed .sidebar .sidebar-logout-button,
.sidebar.collapsed .sidebar-logout-button {
  display: none !important;
}

.content {
  flex: 1 1 auto;
  min-width: 0;
  width: auto !important;
  max-width: none;
  height: 100dvh;
  min-height: 0;
  max-height: 100dvh;
  margin: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  scrollbar-gutter: auto;
  background: #f8fafc;
}

.content > .page {
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 1025px) {
  .app-shell {
    display: block !important;
  }

  .sidebar,
  .sidebar.collapsed,
  .app-shell.sidebar-collapsed .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
  }

  .content {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: var(--sidebar-width);
  }

  .app-shell.sidebar-collapsed .content {
    left: var(--sidebar-collapsed-width);
  }
}

@media (max-width: 1024px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    display: block !important;
  }

  .sidebar,
  .sidebar.collapsed,
  .app-shell.sidebar-collapsed .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    flex-basis: auto;
    width: min(86vw, 320px) !important;
    min-width: 0 !important;
    max-width: min(86vw, 320px) !important;
    height: 100dvh;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
  }

  .sidebar.open,
  .sidebar.collapsed.open,
  .app-shell.sidebar-collapsed .sidebar.open {
    transform: translateX(0);
  }

  .sidebar .brand,
  .sidebar.collapsed .brand,
  .app-shell.sidebar-collapsed .sidebar .brand {
    grid-template-columns: 52px minmax(0, 1fr);
    justify-items: stretch;
    min-height: 108px;
    padding: 16px 18px 15px;
  }

  .sidebar .brand-text-only,
  .sidebar.collapsed .brand-text-only,
  .app-shell.sidebar-collapsed .sidebar .brand-text-only {
    display: block !important;
  }

  .content {
    position: relative;
    inset: auto;
    width: 100% !important;
    height: 100dvh;
    max-height: 100dvh;
  }
}

/* Full-width content edge correction: remove reserved gutters and centered dashboard wrappers. */
html,
body,
#app,
.app-shell,
.content {
  scrollbar-gutter: auto !important;
}

.app-shell,
.app-shell.sidebar-collapsed {
  width: 100vw !important;
  max-width: 100vw !important;
}

@media (min-width: 1025px) {
  .content {
    right: 0 !important;
    width: auto !important;
    max-width: none !important;
    padding-right: 0 !important;
  }
}

.content,
.page,
.page.active,
.dashboard-mode .page,
.modern-dashboard,
.dashboard-layout,
.dashboard-single,
.dashboard-kpi-grid,
.dashboard-chart-grid,
.dashboard-lower-grid,
.staff-modern-dashboard,
.staff-modern-performance-wrap,
.staff-performance-panel {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
}

.page,
.dashboard-mode .page {
  padding-left: 18px;
  padding-right: 18px;
}

.topbar,
.dashboard-topbar {
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
}

.sidebar .nav {
  padding-left: 10px;
  padding-right: 8px;
  scrollbar-width: thin;
}

.sidebar .nav::-webkit-scrollbar {
  width: 5px;
}

@media (min-width: 1025px) {
  .content {
    width: auto !important;
    left: var(--sidebar-width) !important;
    right: 0 !important;
  }

  .app-shell.sidebar-collapsed .content {
    left: var(--sidebar-collapsed-width) !important;
  }
}
