.ui-page-width-standard {
  width: min(100%, 1520px);
  margin-inline: auto;
  padding-inline: clamp(1rem, 1.2vw, 1.5rem);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.ui-page-width-wide {
  width: min(100%, 1760px);
  margin-inline: auto;
  padding-inline: clamp(1rem, 1.2vw, 1.5rem);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.ui-page-width-full {
  width: 100%;
  margin-inline: auto;
  padding-inline: clamp(0.75rem, 1vw, 1.25rem);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.ui-page-width-standard > *,
.ui-page-width-wide > *,
.ui-page-width-full > * {
  max-width: 100%;
  min-width: 0;
}

:is(.ui-page-width-standard, .ui-page-width-wide, .ui-page-width-full) > :is(.ui-page-shell, [class$="-shell"]) {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

:is(.ui-page-width-standard, .ui-page-width-wide, .ui-page-width-full) > :is(.ui-page-shell, [class$="-shell"]) *,
:is(.ui-page-width-standard, .ui-page-width-wide, .ui-page-width-full) > :is(.ui-page-shell, [class$="-shell"]) *::before,
:is(.ui-page-width-standard, .ui-page-width-wide, .ui-page-width-full) > :is(.ui-page-shell, [class$="-shell"]) *::after {
  box-sizing: border-box;
}

:is(.ui-page-width-standard, .ui-page-width-wide, .ui-page-width-full) > :is(.ui-page-shell, [class$="-shell"]) > :is(.ui-page-hero, [class$="-hero"]) {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

:is(.ui-page-width-standard, .ui-page-width-wide, .ui-page-width-full) > :is(.ui-page-shell, [class$="-shell"]) > :is(.ui-page-hero, [class$="-hero"]) > * {
  max-width: 100%;
  min-width: 0;
}

.ui-page-shell,
.ui-page-shell *,
.ui-page-shell *::before,
.ui-page-shell *::after {
  box-sizing: border-box;
}

.ui-page-shell {
  background: var(--ui-shell-bg);
  border: 1px solid var(--ui-border-soft);
  border-radius: var(--ui-radius-xl);
  padding: 1.25rem;
  box-shadow: var(--ui-shadow-md);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  overflow: visible;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.ui-page-shell > * {
  min-width: 0;
  max-width: 100%;
}

.ui-report-grid {
  display: grid;
  gap: 1rem;
}

.ui-report-card,
.report-card {
  background: var(--ui-surface-1);
  color: var(--ui-ink-strong);
  border: 1px solid var(--ui-border-soft);
  border-radius: var(--ui-radius-lg);
  padding: 1.1rem;
  box-shadow: var(--ui-shadow-md);
}

.ui-report-card h3,
.report-card h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  color: var(--ui-ink-strong);
}

.report-muted,
.ui-report-muted {
  color: var(--ui-ink-muted);
}

.ui-report-pill,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: var(--ui-radius-pill);
  padding: 0.55rem 0.9rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--ui-ink-inverse);
}

.ui-report-table-shell,
.table-shell {
  border: 1px solid var(--ui-border-soft);
  border-radius: var(--ui-radius-md);
  overflow: hidden;
}

.ui-report-table-shell .table,
.table-shell .table {
  margin-bottom: 0;
}

.ui-report-table-shell .table thead th,
.table-shell .table thead th {
  background: color-mix(in srgb, var(--ui-accent-primary) 10%, var(--ui-surface-1));
  color: var(--ui-ink-strong);
  font-weight: 700;
}

.ui-report-table-shell .table td,
.ui-report-table-shell .table th,
.table-shell .table td,
.table-shell .table th {
  border-color: var(--ui-border-soft);
  vertical-align: middle;
}

.report-metric,
.metric {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
}

.ui-page-hero {
  background: var(--ui-shell-hero-bg);
  color: var(--ui-ink-inverse);
  border-radius: var(--ui-radius-lg);
  padding: clamp(1.2rem, 1rem + 1vw, 1.7rem);
  box-shadow: var(--ui-shadow-lg);
  margin-bottom: 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  width: 100%;
}

.ui-page-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border-radius: var(--ui-radius-pill);
  font-weight: 700;
  background: color-mix(in srgb, var(--ui-shell-hero-subtle) 88%, rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--ui-ink-inverse);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ui-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.ui-doc-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.ui-doc-toolbar-main,
.ui-doc-toolbar-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.ui-doc-toolbar-main {
  justify-content: flex-start;
}

.ui-doc-toolbar-side {
  justify-content: flex-end;
  margin-left: auto;
}

.ui-doc-search {
  max-width: 340px;
  min-width: 0;
}

.ui-doc-search .input-group-text,
.ui-doc-search .form-control {
  border-radius: var(--ui-radius-pill);
  border-color: color-mix(in srgb, var(--ui-accent-primary) 18%, rgba(15, 23, 42, 0.12));
  background: color-mix(in srgb, var(--ui-surface-1) 90%, rgba(255, 255, 255, 0.55));
  box-shadow: 0 10px 24px rgba(76, 125, 232, 0.08);
}

.ui-doc-search .input-group-text {
  border-right: 0;
  padding-inline: 0.9rem 0.5rem;
}

.ui-doc-search .form-control {
  border-left: 0;
  padding-inline: 0.5rem 1rem;
}

.ui-glass-btn,
.ui-doc-toolbar .btn,
.ui-list-footer .btn,
.ui-list-footer .page-link,
.ui-list-shell .btn-group .btn,
.ui-list-shell .table .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: var(--ui-radius-pill);
  font-weight: 700;
  letter-spacing: 0;
  border-width: 1px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition:
    transform var(--ui-motion-fast),
    box-shadow var(--ui-motion-fast),
    background-color var(--ui-motion-fast),
    border-color var(--ui-motion-fast);
}

.ui-glass-btn:hover,
.ui-doc-toolbar .btn:hover,
.ui-list-footer .btn:hover,
.ui-list-footer .page-link:hover,
.ui-list-shell .btn-group .btn:hover,
.ui-list-shell .table .btn:hover,
.ui-glass-btn:focus-visible,
.ui-doc-toolbar .btn:focus-visible,
.ui-list-footer .btn:focus-visible,
.ui-list-footer .page-link:focus-visible,
.ui-list-shell .btn-group .btn:focus-visible,
.ui-list-shell .table .btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.ui-doc-toolbar .btn-primary,
.ui-glass-btn-primary {
  color: #fff;
  border-color: rgba(115, 73, 245, 0.22);
  background: linear-gradient(135deg, #7f5cff, #4ec6b6);
}

.ui-doc-toolbar .btn-outline-secondary,
.ui-doc-toolbar .btn-outline-dark,
.ui-glass-btn-secondary,
.ui-glass-btn-filter {
  color: var(--ui-ink-strong);
  border-color: color-mix(in srgb, var(--ui-accent-primary) 18%, rgba(15, 23, 42, 0.12));
  background: color-mix(in srgb, var(--ui-surface-1) 88%, rgba(255, 255, 255, 0.7));
  backdrop-filter: blur(10px);
}

.ui-doc-toolbar .btn-outline-danger,
.ui-glass-btn-danger {
  color: #a31332;
  border-color: rgba(220, 38, 38, 0.18);
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.98), rgba(255, 255, 255, 0.92));
}

.ui-doc-toolbar .btn-outline-success,
.ui-glass-btn-success {
  color: #166534;
  border-color: rgba(34, 197, 94, 0.22);
  background: linear-gradient(135deg, rgba(220, 252, 231, 0.98), rgba(255, 255, 255, 0.92));
}

.ui-doc-filter-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
}

.ui-filter-shell,
.insight-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.96));
  border-radius: var(--ui-radius-lg);
  border: 1px solid var(--ui-border-soft);
  box-shadow: var(--ui-shadow-md);
}

.ui-filter-shell {
  padding: 1rem;
  min-width: 0;
  max-width: 100%;
}

.ui-filter-shell.d-none {
  display: none !important;
}

.ui-filter-dropdown {
  min-width: 240px;
  border-radius: var(--ui-radius-lg);
  border-color: var(--ui-border-soft);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
}

.ui-filter-grid {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
}

.ui-help-card,
.alert-soft {
  background: linear-gradient(180deg, rgba(255, 248, 230, 0.94), rgba(255, 253, 246, 0.98));
  border: 1px dashed #ffd18a;
  border-radius: var(--ui-radius-md);
  padding: 0.85rem 1rem;
  color: var(--ui-ink-strong);
}

.ui-help-card strong,
.alert-soft strong {
  color: var(--ui-ink-strong);
}

.ui-summary-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  min-width: 0;
  max-width: 100%;
}

.ui-summary-card,
.kpi-card {
  min-height: 150px;
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1.1rem 1.15rem;
  text-align: center;
  border-radius: var(--ui-radius-lg);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.98));
  box-shadow: 0 14px 32px rgba(76, 125, 232, 0.10);
}

.ui-summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 6px;
  border-radius: var(--ui-radius-lg) var(--ui-radius-lg) 0 0;
  background: linear-gradient(90deg, #c66bff, #8b3dff);
}

.ui-summary-card-purple::before {
  background: linear-gradient(90deg, #c66bff, #8b3dff);
}

.ui-summary-card-blue::before {
  background: linear-gradient(90deg, #50aaff, #2b7cff);
}

.ui-summary-card-green::before {
  background: linear-gradient(90deg, #4ad295, #23a35a);
}

.ui-summary-card-amber::before {
  background: linear-gradient(90deg, #ffb45a, #ff7a1a);
}

.ui-summary-label {
  color: var(--ui-ink-muted);
  font-size: 0.92rem;
  line-height: 1.35;
  font-weight: 700;
  min-width: 0;
  max-width: 100%;
}

.ui-summary-value {
  color: var(--ui-ink-strong);
  font-size: clamp(1.8rem, 1.35rem + 0.75vw, 2.35rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.ui-summary-note {
  max-width: 24ch;
  color: var(--ui-ink-muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.ui-list-shell {
  position: relative;
  z-index: 1;
  border: 1px solid var(--ui-border-soft);
  border-radius: var(--ui-radius-md);
  overflow: visible;
  box-shadow: var(--ui-shadow-md);
  background: var(--ui-surface-1);
  min-width: 0;
  max-width: 100%;
}

.ui-list-shell.table-responsive {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.ui-list-shell.table-responsive.ui-list-shell-menu-open {
  overflow: visible;
}

.ui-list-shell .dropdown-menu {
  z-index: 2200;
}

.ui-list-shell .table {
  margin-bottom: 0;
  min-width: max-content;
}

.ui-list-shell .table thead th {
  background: color-mix(in srgb, var(--ui-accent-primary) 10%, var(--ui-surface-1));
  color: var(--ui-ink-strong);
  font-weight: 800;
  border-color: var(--ui-border-soft);
}

.ui-list-shell .table td,
.ui-list-shell .table th {
  border-color: var(--ui-border-soft);
  vertical-align: middle;
}

.ui-list-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--ui-border-soft);
  border-top: 0;
  border-radius: 0 0 var(--ui-radius-md) var(--ui-radius-md);
  background: color-mix(in srgb, var(--ui-surface-1) 90%, rgba(248, 252, 255, 0.92));
  box-shadow: var(--ui-shadow-md);
  min-width: 0;
  max-width: 100%;
}

.ui-list-footer .form-select {
  width: auto;
  border-radius: var(--ui-radius-pill);
}

.ui-list-footer .pagination {
  margin-bottom: 0;
}

.ui-list-footer .page-item.disabled .page-link {
  background: color-mix(in srgb, var(--ui-surface-1) 88%, rgba(255, 255, 255, 0.7));
}

.ui-list-footnote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
  padding: 0.95rem 1rem 0;
  color: var(--ui-ink-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.ui-list-footnote strong {
  color: var(--ui-ink-strong);
}

.ui-doc-metrics {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ui-doc-metrics .ui-summary-card {
  min-height: 0;
}

.ui-row-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.ui-row-actions .btn,
.ui-split-action .btn {
  min-height: 36px;
  padding-inline: 0.8rem;
}

.ui-row-actions .btn-icon,
.ui-split-action .btn-icon {
  min-width: 36px;
  padding-inline: 0.7rem;
}

.ui-row-actions .btn-outline-primary,
.ui-row-actions .btn-outline-secondary,
.ui-row-actions .btn-outline-success,
.ui-row-actions .btn-outline-info,
.ui-row-actions .btn-outline-warning,
.ui-row-actions .btn-outline-dark,
.ui-row-actions .btn-outline-danger,
.ui-split-action .btn-outline-primary,
.ui-split-action .btn-outline-secondary,
.ui-split-action .btn-outline-success,
.ui-split-action .btn-outline-info,
.ui-split-action .btn-outline-warning,
.ui-split-action .btn-outline-dark,
.ui-split-action .btn-outline-danger {
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--ui-surface-1) 88%, rgba(255, 255, 255, 0.8));
}

.ui-row-actions .btn-outline-primary,
.ui-split-action .btn-outline-primary {
  color: #3b4fd6;
  border-color: rgba(80, 112, 255, 0.24);
}

.ui-row-actions .btn-outline-success,
.ui-split-action .btn-outline-success {
  color: #166534;
  border-color: rgba(34, 197, 94, 0.22);
}

.ui-row-actions .btn-outline-danger,
.ui-split-action .btn-outline-danger {
  color: #a31332;
  border-color: rgba(220, 38, 38, 0.22);
}

.ui-row-actions .btn-outline-secondary,
.ui-row-actions .btn-outline-dark,
.ui-split-action .btn-outline-secondary,
.ui-split-action .btn-outline-dark {
  color: var(--ui-ink-strong);
  border-color: color-mix(in srgb, var(--ui-accent-primary) 18%, rgba(15, 23, 42, 0.12));
}

.ui-row-actions .btn-outline-info,
.ui-split-action .btn-outline-info {
  color: #0f766e;
  border-color: rgba(20, 184, 166, 0.24);
}

.ui-row-actions .btn-outline-warning,
.ui-split-action .btn-outline-warning {
  color: #9a5b0e;
  border-color: rgba(245, 158, 11, 0.24);
}

.ui-receipt-action.btn,
.ui-receipt-action.btn:hover,
.ui-receipt-action.btn:focus-visible {
  color: #fff;
  border-color: rgba(22, 101, 52, 0.18);
  background: linear-gradient(135deg, #1ea872, #15803d);
}

.ui-filter-inline-note {
  color: var(--ui-ink-muted);
  font-size: 0.9rem;
}

.ui-table-empty {
  min-height: 180px;
}

.ui-table-caption {
  color: var(--ui-ink-muted);
  font-size: 0.86rem;
}

.ui-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--ui-radius-pill);
  background: rgba(76, 125, 232, 0.08);
  color: var(--ui-ink-strong);
  border: 1px solid rgba(76, 125, 232, 0.12);
  font-size: 0.78rem;
  font-weight: 700;
}

.ui-page-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--ui-radius-pill);
  padding: 0.72rem 1rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.16);
  color: var(--ui-ink-inverse);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  transition:
    transform var(--ui-motion-fast),
    background-color var(--ui-motion-fast);
}

.ui-page-action:hover,
.ui-page-action:focus {
  background: rgba(255, 255, 255, 0.24);
  color: var(--ui-ink-inverse);
  transform: translateY(-1px);
}

.ui-page-surface {
  background: var(--ui-surface-1);
  color: var(--ui-ink-strong);
  border: 1px solid var(--ui-border-soft);
  border-radius: var(--ui-radius-md);
  box-shadow: var(--ui-shadow-md);
}

.ui-page-section-title,
.section-title {
  position: relative;
  padding-left: 15px;
  margin: 0 0 1rem;
  font-weight: 800;
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ui-ink-strong);
}

.ui-page-section-title::before,
.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 24px;
  width: 5px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--ui-accent-primary), var(--ui-accent-primary-2));
}

.ui-dashboard-grid-card,
.nav-card {
  background: var(--ui-surface-1);
  border: none;
  border-radius: 1.2rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
  transition:
    transform var(--ui-motion-base),
    box-shadow var(--ui-motion-base);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.ui-dashboard-grid-card:hover,
.nav-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.ui-dashboard-grid-card::before,
.nav-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  border-top-left-radius: 1.2rem;
  border-top-right-radius: 1.2rem;
  background: linear-gradient(90deg, #eaeef7, #f2f4fb);
  transition: height var(--ui-motion-base);
}

.ui-dashboard-grid-card:hover::before,
.nav-card:hover::before {
  height: 8px;
}

.nav-card[data-color="blue"]::before { background: linear-gradient(90deg, #4c7de8, #6b9df1); }
.nav-card[data-color="mint"]::before { background: linear-gradient(90deg, #5dd9a1, #71eab8); }
.nav-card[data-color="pink"]::before { background: linear-gradient(90deg, #ff73b8, #ff92c8); }
.nav-card[data-color="yellow"]::before { background: linear-gradient(90deg, #ffcf5c, #ffe585); }
.nav-card[data-color="purple"]::before { background: linear-gradient(90deg, #9b6ef3, #c1a4ff); }
.nav-card[data-color="orange"]::before { background: linear-gradient(90deg, #ff8a5c, #ffb28d); }
.nav-card[data-color="teal"]::before { background: linear-gradient(90deg, #2ccccc, #6de6e6); }
.nav-card[data-color="indigo"]::before { background: linear-gradient(90deg, #6688ff, #8899ff); }

.emoji-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, #e9f0ff, #f4f7ff);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
  transition: transform var(--ui-motion-base);
  font-size: 2rem;
}

.nav-card:hover .emoji-badge,
.card-clean:hover .emoji-badge {
  transform: scale(1.06) rotate(3deg);
}

.nav-card[data-color="blue"] .emoji-badge { background: linear-gradient(135deg, #e9f0ff, #f4f7ff); }
.nav-card[data-color="mint"] .emoji-badge { background: linear-gradient(135deg, #e8fbf3, #f2fff9); }
.nav-card[data-color="pink"] .emoji-badge { background: linear-gradient(135deg, #ffe9f4, #fff3f9); }
.nav-card[data-color="yellow"] .emoji-badge { background: linear-gradient(135deg, #fff6df, #fff9ea); }
.nav-card[data-color="purple"] .emoji-badge { background: linear-gradient(135deg, #efe9ff, #f7f3ff); }
.nav-card[data-color="orange"] .emoji-badge { background: linear-gradient(135deg, #fff0e8, #fff6f0); }
.nav-card[data-color="teal"] .emoji-badge { background: linear-gradient(135deg, #e8fbfb, #f1ffff); }
.nav-card[data-color="indigo"] .emoji-badge { background: linear-gradient(135deg, #e9edff, #f3f5ff); }

.emoji-badge img {
  width: 40px;
  height: 40px;
}

.card-clean {
  border: none;
  background: var(--ui-surface-1);
  border-radius: 1.2rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
  transition:
    transform var(--ui-motion-base),
    box-shadow var(--ui-motion-base);
  height: 100%;
}

.card-clean:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.kpi-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.kpi-col {
  flex: 0 0 220px;
}

.kpi-card {
  border: 1px solid var(--ui-border-soft);
  border-radius: 1rem;
  transition:
    transform var(--ui-motion-base),
    box-shadow var(--ui-motion-base);
  min-height: 172px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--ui-shadow-md);
  position: relative;
  background: var(--ui-surface-1);
  color: var(--ui-ink-strong);
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ui-shadow-lg);
}

.card-icon {
  font-size: 2.4rem;
  margin-bottom: 0.4rem;
}

.mini {
  font-size: 0.875rem;
  opacity: 0.88;
}

.badge-pill {
  border-radius: var(--ui-radius-pill);
  padding: 0.25rem 0.6rem;
  font-weight: 700;
}

.accent {
  overflow: hidden;
}

.accent::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
}

.accent-blue::before { background: linear-gradient(90deg, #50aaff, #2b7cff); }
.accent-green::before { background: linear-gradient(90deg, #4ad295, #23a35a); }
.accent-cyan::before { background: linear-gradient(90deg, #51d1ff, #17a2b8); }
.accent-gray::before { background: linear-gradient(90deg, #c7cbd3, #9aa3b2); }
.accent-purple::before { background: linear-gradient(90deg, #c66bff, #8b3dff); }
.accent-orange::before { background: linear-gradient(90deg, #ffb45a, #ff7a1a); }

.alert-soft {
  background: color-mix(in srgb, var(--ui-warning-soft) 78%, transparent);
  border: 1px dashed color-mix(in srgb, var(--ui-warning) 36%, transparent);
  border-radius: var(--ui-radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--ui-ink-strong);
}

.insight-card,
.status-wide {
  border: 1px solid var(--ui-border-soft);
  box-shadow: var(--ui-shadow-md);
  border-radius: 1rem;
  background: var(--ui-surface-1);
  color: var(--ui-ink-strong);
}

.status-wide {
  overflow: hidden;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.table-wrap > .table,
.table-wrap table {
  min-width: 100%;
}

.insight-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.insight-card .card-header {
  background: color-mix(in srgb, var(--ui-surface-2) 92%, transparent);
  border-bottom: 1px solid var(--ui-border-soft);
}

.insight-card .card-body,
.insight-card .list-group {
  flex-grow: 1;
}

.nav-card .btn-outline-primary,
.card-clean .btn-outline-primary {
  --btn-color: var(--ui-accent-primary);
  font-weight: 700;
  border-radius: var(--ui-radius-pill);
  padding: 0.5rem 1.25rem;
  transition: all var(--ui-motion-base);
  color: var(--btn-color);
  border: 2px solid var(--btn-color);
}

.nav-card .btn-outline-primary:hover,
.nav-card .btn-outline-primary:focus,
.card-clean .btn-outline-primary:hover,
.card-clean .btn-outline-primary:focus {
  background: var(--btn-color) !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.nav-card .btn,
.card-clean .btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 140px;
  text-align: center;
  white-space: nowrap;
}

.nav-card > a.stretched-link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.nav-card .btn {
  position: relative;
  z-index: 2;
}

.ui-module-hero-stats {
  display: grid;
  gap: 0.65rem;
  flex: 0 1 18rem;
  min-width: min(100%, 19rem);
  max-width: 100%;
  align-items: stretch;
  align-self: start;
}

.ui-module-hero-stat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  border-radius: var(--ui-radius-pill);
  padding: 0.72rem 1rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--ui-ink-inverse);
  width: 100%;
  max-width: 100%;
  min-height: 3.15rem;
}

.ui-module-hero-stat.is-single {
  grid-template-columns: 1fr;
  justify-items: start;
}

.ui-module-hero-stat strong {
  font-weight: 800;
}

.ui-module-hero-stat-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  line-height: 1.25;
  white-space: normal;
}

.ui-module-hero-stat-value {
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
  padding-left: 0.5rem;
}

.ui-page-hero > .d-flex.flex-wrap.justify-content-between.gap-3 > :first-child {
  flex: 1 1 34rem;
  min-width: 0;
  max-width: 100%;
}

.ui-page-hero > .d-flex.flex-wrap.justify-content-between.gap-3 {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.ui-page-hero > .d-flex.flex-wrap.justify-content-between.gap-3 > * {
  min-width: 0;
  max-width: 100%;
}

.ui-page-hero > .d-flex.flex-wrap.justify-content-between.gap-3 > .ui-module-hero-stats {
  flex: 0 1 min(100%, 22rem);
  width: min(100%, 22rem);
  margin-left: auto;
}

.ui-page-hero .d-flex.flex-wrap.gap-2.align-items-center.mb-3,
.ui-page-hero .ui-page-actions {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.ui-page-hero .ui-module-hero-stats {
  width: auto;
  max-width: 100%;
  min-width: 0;
}

.ui-page-hero h1,
.ui-page-hero p,
.ui-page-hero .ui-page-pill,
.ui-page-hero .ui-page-action,
.ui-page-hero .ui-module-hero-stat,
.ui-page-hero .ui-module-hero-stat-label,
.ui-page-hero .ui-module-hero-stat-value {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.nav-tabs.colorful-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  border-bottom: none;
}

.nav-tabs.colorful-tabs .nav-item {
  margin-bottom: 0;
}

.nav-tabs.colorful-tabs .nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.78rem 1rem 0.78rem 3rem;
  border-radius: var(--ui-radius-pill);
  border: 1px solid rgba(67, 97, 238, 0.14);
  background: rgba(67, 97, 238, 0.04);
  color: #27486f;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform var(--ui-motion-fast),
    background-color var(--ui-motion-fast),
    border-color var(--ui-motion-fast),
    box-shadow var(--ui-motion-fast);
}

.nav-tabs.colorful-tabs .nav-link:hover,
.nav-tabs.colorful-tabs .nav-link:focus {
  color: #16324b;
  background: rgba(67, 97, 238, 0.08);
  border-color: rgba(67, 97, 238, 0.2);
  transform: translateY(-1px);
}

.nav-tabs.colorful-tabs .nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, #3257d5 0%, #2188aa 50%, #2b9b7d 100%);
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(31, 82, 141, 0.22);
}

.nav-tabs.colorful-tabs .nav-link::before {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.55rem;
  height: 1.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  background: rgba(67, 97, 238, 0.1);
  color: #3257d5;
}

.nav-tabs.colorful-tabs #profile-tab::before { content: "\01F3E2"; }
.nav-tabs.colorful-tabs #methods-tab::before { content: "\01F4B3"; }
.nav-tabs.colorful-tabs #accounts-tab::before { content: "\01F3E6"; }
.nav-tabs.colorful-tabs #taxes-tab::before { content: "\01F9FE"; }
.nav-tabs.colorful-tabs #costing-tab::before { content: "\01F9EE"; }
.nav-tabs.colorful-tabs #purchasing-tab::before { content: "\01F6D2"; }
.nav-tabs.colorful-tabs #hr-tab::before { content: "\01F465"; }
.nav-tabs.colorful-tabs #calendar-tab::before { content: "\01F4C5"; }

.nav-tabs:not(.colorful-tabs) {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  border-bottom: none;
}

.nav-tabs:not(.colorful-tabs) .nav-link {
  border-radius: var(--ui-radius-pill);
  border: 1px solid rgba(67, 97, 238, 0.14);
  background: rgba(67, 97, 238, 0.04);
  color: #27486f;
  font-weight: 700;
  transition:
    transform var(--ui-motion-fast),
    background-color var(--ui-motion-fast),
    border-color var(--ui-motion-fast),
    box-shadow var(--ui-motion-fast);
}

.nav-tabs:not(.colorful-tabs) .nav-link:hover,
.nav-tabs:not(.colorful-tabs) .nav-link:focus,
.nav-tabs:not(.colorful-tabs) .nav-link.active {
  transform: translateY(-1px);
  color: var(--ui-accent-primary);
  background: rgba(67, 97, 238, 0.1);
  border-color: rgba(67, 97, 238, 0.24);
  box-shadow: var(--ui-shadow-sm);
}

.ui-tab-panel,
.tab-content {
  margin-top: 1rem;
}

.tab-content > .tab-pane {
  background: var(--ui-surface-1);
  border: 1px solid var(--ui-border-soft);
  border-radius: var(--ui-radius-md);
  box-shadow: var(--ui-shadow-md);
  padding: 1.35rem;
}

.card,
.modal-content,
.dropdown-menu {
  border-radius: var(--ui-radius-md);
  border-color: var(--ui-border-soft);
  box-shadow: var(--ui-shadow-sm);
}

.modal-content,
.dropdown-menu {
  background: var(--ui-surface-1);
  color: var(--ui-ink-strong);
}

.dropdown-menu {
  min-width: 14rem;
  padding: 0.55rem;
}

.dropdown-item {
  color: var(--ui-ink-strong);
  border-radius: calc(var(--ui-radius-sm) - 0.2rem);
  padding: 0.65rem 0.8rem;
  transition:
    background-color var(--ui-motion-fast),
    color var(--ui-motion-fast);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--ui-surface-3);
  color: var(--ui-ink-strong);
}

.dropdown-item.text-muted,
.dropdown-item .text-muted {
  color: var(--ui-ink-soft) !important;
}

.dropdown-divider {
  border-color: var(--ui-border-soft);
}

.form-control,
.form-select {
  border-radius: var(--ui-radius-sm);
  border-color: var(--ui-border-soft);
  background: var(--ui-surface-1);
  color: var(--ui-ink-strong);
}

.table {
  color: var(--ui-ink-strong);
}

.table thead th {
  background: var(--ui-surface-3);
  color: var(--ui-ink-strong);
  border-color: var(--ui-border-soft);
}

.table td,
.table th {
  border-color: var(--ui-border-soft);
}

.progress {
  border-radius: 50px;
  overflow: hidden;
  background: #e9f1ff;
  height: 22px;
}

.progress-bar {
  font-weight: 600;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, var(--ui-accent-primary), var(--ui-accent-primary-2));
  box-shadow: 0 0 10px rgba(76, 125, 232, 0.3);
}

.dashboard-shell .ui-page-hero,
.settings-shell .ui-page-hero,
.inventory-shell .ui-page-hero,
.finance-shell .ui-page-hero,
.purchasing-shell .ui-page-hero {
  position: relative;
  overflow: hidden;
}

.dashboard-shell .ui-page-hero::after,
.settings-shell .ui-page-hero::after,
.inventory-shell .ui-page-hero::after,
.finance-shell .ui-page-hero::after,
.purchasing-shell .ui-page-hero::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -60px;
  top: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 68%);
  pointer-events: none;
}

.settings-shell > h2:first-of-type {
  display: none;
}

.ui-page-surface .text-muted,
.card .text-muted {
  color: var(--ui-ink-muted) !important;
}

.list-group-item {
  background: transparent;
  border-color: var(--ui-border-soft);
  color: var(--ui-ink-strong);
}

.table-light,
.table-primary {
  --bs-table-bg: color-mix(in srgb, var(--ui-surface-2) 88%, transparent);
  --bs-table-border-color: var(--ui-border-soft);
  color: var(--ui-ink-strong);
}

html[data-bs-theme="dark"] .ui-page-shell {
  box-shadow: var(--ui-shadow-lg);
}

html[data-bs-theme="dark"] .ui-summary-card,
html[data-bs-theme="dark"] .kpi-card {
  background: linear-gradient(180deg, rgba(21, 30, 46, 0.96), rgba(12, 20, 34, 0.98));
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
}

html[data-bs-theme="dark"] .ui-summary-label,
html[data-bs-theme="dark"] .ui-summary-note,
html[data-bs-theme="dark"] .ui-filter-inline-note,
html[data-bs-theme="dark"] .ui-list-footnote,
html[data-bs-theme="dark"] .mini,
html[data-bs-theme="dark"] .text-muted {
  color: #cbd5e1 !important;
}

html[data-bs-theme="dark"] .ui-summary-value,
html[data-bs-theme="dark"] .ui-help-card strong,
html[data-bs-theme="dark"] .ui-page-section-title,
html[data-bs-theme="dark"] .section-title {
  color: #f8fbff;
}

html[data-bs-theme="dark"] .ui-filter-shell,
html[data-bs-theme="dark"] .ui-list-shell,
html[data-bs-theme="dark"] .ui-list-footer,
html[data-bs-theme="dark"] .ui-page-surface,
html[data-bs-theme="dark"] .insight-card,
html[data-bs-theme="dark"] .status-wide {
  background: linear-gradient(180deg, rgba(16, 24, 39, 0.96), rgba(10, 18, 31, 0.98));
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
}

html[data-bs-theme="dark"] .ui-help-card,
html[data-bs-theme="dark"] .alert-soft,
html[data-bs-theme="dark"] .alert-soft-info,
html[data-bs-theme="dark"] .alert-soft-warning {
  background: linear-gradient(180deg, rgba(92, 64, 15, 0.28), rgba(54, 40, 15, 0.24));
  border-color: rgba(245, 158, 11, 0.4);
  color: #f8fafc !important;
}

html[data-bs-theme="dark"] .ccn-header-card,
html[data-bs-theme="dark"] .scn-header-card,
html[data-bs-theme="dark"] .insight-card .card-header,
html[data-bs-theme="dark"] .ccn-header-card .card-header,
html[data-bs-theme="dark"] .scn-header-card .card-header {
  background: linear-gradient(180deg, rgba(18, 27, 42, 0.98), rgba(11, 19, 31, 0.98));
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.18);
}

html[data-bs-theme="dark"] .ui-page-shell .card,
html[data-bs-theme="dark"] .ui-page-shell .card-body,
html[data-bs-theme="dark"] .ui-page-shell .card-footer,
html[data-bs-theme="dark"] .ui-page-shell .card-header {
  color: #e5edf8;
}

html[data-bs-theme="dark"] .ui-doc-search .input-group-text,
html[data-bs-theme="dark"] .ui-doc-search .form-control,
html[data-bs-theme="dark"] .ui-filter-shell .form-control,
html[data-bs-theme="dark"] .ui-filter-shell .form-select,
html[data-bs-theme="dark"] .ui-list-footer .form-select,
html[data-bs-theme="dark"] .ui-page-shell .form-control,
html[data-bs-theme="dark"] .ui-page-shell .form-select,
html[data-bs-theme="dark"] .ui-page-shell textarea {
  background: rgba(15, 23, 42, 0.86);
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

html[data-bs-theme="dark"] .ui-page-shell .form-control::placeholder,
html[data-bs-theme="dark"] .ui-page-shell textarea::placeholder {
  color: #94a3b8;
}

html[data-bs-theme="dark"] .ui-doc-toolbar .btn-outline-secondary,
html[data-bs-theme="dark"] .ui-doc-toolbar .btn-outline-dark,
html[data-bs-theme="dark"] .ui-row-actions .btn-outline-secondary,
html[data-bs-theme="dark"] .ui-row-actions .btn-outline-dark,
html[data-bs-theme="dark"] .ui-split-action .btn-outline-secondary,
html[data-bs-theme="dark"] .ui-split-action .btn-outline-dark,
html[data-bs-theme="dark"] .ui-list-footer .btn-outline-secondary,
html[data-bs-theme="dark"] .ui-list-footer .page-link {
  color: #e2e8f0;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.92));
  border-color: rgba(148, 163, 184, 0.22);
}

html[data-bs-theme="dark"] .ui-row-actions .btn-outline-primary,
html[data-bs-theme="dark"] .ui-split-action .btn-outline-primary {
  color: #c9d7ff;
  border-color: rgba(96, 165, 250, 0.3);
}

html[data-bs-theme="dark"] .ui-row-actions .btn-outline-success,
html[data-bs-theme="dark"] .ui-split-action .btn-outline-success {
  color: #b8f5cf;
  border-color: rgba(74, 222, 128, 0.3);
}

html[data-bs-theme="dark"] .ui-row-actions .btn-outline-info,
html[data-bs-theme="dark"] .ui-split-action .btn-outline-info {
  color: #a5f3fc;
  border-color: rgba(34, 211, 238, 0.28);
}

html[data-bs-theme="dark"] .ui-row-actions .btn-outline-warning,
html[data-bs-theme="dark"] .ui-split-action .btn-outline-warning {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.3);
}

html[data-bs-theme="dark"] .ui-row-actions .btn-outline-danger,
html[data-bs-theme="dark"] .ui-split-action .btn-outline-danger {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.3);
}

html[data-bs-theme="dark"] .ui-list-shell .table thead th {
  background: rgba(37, 52, 77, 0.96);
  color: #f8fafc;
}

html[data-bs-theme="dark"] .ui-list-shell .table td,
html[data-bs-theme="dark"] .ui-list-shell .table th {
  color: #e2e8f0;
}

html[data-bs-theme="dark"] .ui-list-shell .table-hover tbody tr:hover {
  --bs-table-accent-bg: rgba(96, 165, 250, 0.08);
}

html[data-bs-theme="dark"] .ui-list-footnote {
  color: #cbd5e1;
}

html[data-bs-theme="dark"] .badge-soft-info {
  background: rgba(56, 189, 248, 0.16);
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.28);
}

html[data-bs-theme="dark"] .badge-soft-success {
  background: rgba(34, 197, 94, 0.16);
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.28);
}

html[data-bs-theme="dark"] .badge-soft-warning {
  background: rgba(245, 158, 11, 0.16);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.28);
}

html[data-bs-theme="dark"] .badge-soft-danger {
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.28);
}

html[data-bs-theme="dark"] .nav-card,
html[data-bs-theme="dark"] .card-clean,
html[data-bs-theme="dark"] .tab-content > .tab-pane,
html[data-bs-theme="dark"] .card,
html[data-bs-theme="dark"] .modal-content,
html[data-bs-theme="dark"] .dropdown-menu {
  background: var(--ui-surface-1);
  color: var(--ui-ink-strong);
  border-color: var(--ui-border-soft);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

html[data-bs-theme="dark"] .emoji-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--ui-border-soft);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

html[data-bs-theme="dark"] .nav-tabs.colorful-tabs .nav-link {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(170, 191, 214, 0.14);
}

html[data-bs-theme="dark"] .nav-tabs:not(.colorful-tabs) .nav-link {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(170, 191, 214, 0.14);
}

html[data-bs-theme="dark"] .nav-tabs.colorful-tabs .nav-link:hover,
html[data-bs-theme="dark"] .nav-tabs.colorful-tabs .nav-link:focus {
  color: #fff;
  background: rgba(99, 150, 255, 0.1);
  border-color: rgba(99, 150, 255, 0.16);
}

html[data-bs-theme="dark"] .nav-tabs:not(.colorful-tabs) .nav-link:hover,
html[data-bs-theme="dark"] .nav-tabs:not(.colorful-tabs) .nav-link:focus,
html[data-bs-theme="dark"] .nav-tabs:not(.colorful-tabs) .nav-link.active {
  color: #fff;
  background: rgba(99, 150, 255, 0.1);
  border-color: rgba(99, 150, 255, 0.16);
}

html[data-bs-theme="dark"] .nav-tabs.colorful-tabs .nav-link::before {
  background: rgba(99, 150, 255, 0.12);
  color: #dfeeff;
}

@media (max-width: 1200px) {
  .ui-page-width-standard,
  .ui-page-width-wide,
  .ui-page-width-full {
    padding-inline: 0;
  }

  .ui-page-shell > * {
    min-width: 0;
    max-width: 100%;
  }

  .ui-page-hero > .d-flex.flex-wrap.justify-content-between.gap-3 {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch !important;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .ui-page-hero > .d-flex.flex-wrap.justify-content-between.gap-3 > * {
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
    flex: initial !important;
  }

  .ui-page-hero > .d-flex.flex-wrap.justify-content-between.gap-3 > :first-child {
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
    flex: initial !important;
  }

  .ui-page-hero .d-flex.flex-wrap.gap-2.align-items-center.mb-3,
  .ui-page-hero .ui-page-actions,
  .ui-page-hero .ui-module-hero-stats {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .ui-page-hero .ui-page-pill,
  .ui-page-hero .ui-page-action,
  .ui-page-hero .ui-module-hero-stat {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .ui-page-hero .ui-module-hero-stat {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .ui-page-hero .ui-module-hero-stat-value {
    margin-left: 0;
    padding-left: 0;
    text-align: left;
    white-space: normal;
  }

  .ui-doc-toolbar,
  .ui-doc-toolbar-main,
  .ui-doc-toolbar-side {
    justify-content: stretch;
    align-items: stretch;
    margin-left: 0;
  }

  .ui-doc-toolbar-main > *,
  .ui-doc-toolbar-side > * {
    min-width: 0;
  }

  .ui-doc-toolbar-side {
    justify-content: flex-start;
  }

  .ui-doc-search {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 768px) {
  .ui-page-width-standard,
  .ui-page-width-wide,
  .ui-page-width-full {
    padding-inline: 0;
  }

  .ui-page-shell {
    gap: 1rem;
    padding: 0.85rem;
    border-radius: 1.15rem;
    overflow: visible;
  }

  .ui-page-hero {
    padding: 1rem;
    border-radius: 1.1rem;
  }

  .ui-page-hero > .d-flex.flex-wrap.justify-content-between.gap-3 {
    flex-direction: column;
    align-items: stretch !important;
  }

  .ui-page-hero > .d-flex.flex-wrap.justify-content-between.gap-3 > * {
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
    flex: 1 1 auto !important;
  }

  .ui-page-hero h1,
  .ui-page-hero .display-5,
  .ui-page-hero .display-6 {
    font-size: clamp(1.85rem, 1.45rem + 2.1vw, 2.35rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .ui-page-hero p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .ui-page-pill {
    width: 100%;
    justify-content: flex-start;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .ui-summary-grid,
  .ui-doc-metrics {
    grid-template-columns: 1fr;
  }

  .ui-list-footnote {
    flex-direction: column;
    align-items: flex-start;
  }

  .ui-page-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .ui-page-action {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    padding-inline: 1rem;
  }

  .ui-doc-toolbar,
  .ui-doc-toolbar-main,
  .ui-doc-toolbar-side,
  .ui-doc-filter-row {
    width: 100%;
    justify-content: stretch;
    align-items: stretch;
    margin-left: 0;
  }

  .ui-doc-toolbar-main > *,
  .ui-doc-toolbar-side > *,
  .ui-doc-filter-row > * {
    min-width: 0;
  }

  .ui-doc-toolbar .btn,
  .ui-doc-filter-row .btn,
  .ui-doc-filter-row .dropdown,
  .ui-doc-filter-row .dropdown-toggle {
    width: 100%;
  }

  .ui-doc-toolbar .btn,
  .ui-doc-filter-row .btn {
    justify-content: center;
  }

  .ui-doc-search {
    max-width: none;
    width: 100%;
  }

  .ui-filter-shell {
    padding: 0.85rem;
  }

  .ui-filter-grid {
    grid-template-columns: 1fr !important;
  }

  .ui-filter-dropdown {
    width: min(92vw, 22rem);
    max-width: calc(100vw - 2rem);
  }

  .ui-row-actions {
    justify-content: flex-start;
    width: max-content;
    max-width: 100%;
  }

  .ui-list-footer {
    flex-direction: column;
    align-items: flex-start;
    border-radius: var(--ui-radius-md);
  }

  .ui-list-footer > *,
  .ui-list-footer .pagination {
    max-width: 100%;
  }

  .ui-list-footer .pagination {
    flex-wrap: wrap;
  }

  .ui-list-shell {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
  }

  .ui-list-shell .table {
    min-width: 720px;
  }

  .ui-summary-card,
  .kpi-card {
    min-height: 8.5rem;
  }

  .ui-summary-note {
    max-width: 100%;
  }

  .emoji-badge {
    width: 70px;
    height: 70px;
  }

  .ui-module-hero-stats {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
  }

  .ui-module-hero-stat {
    grid-template-columns: 1fr;
    justify-items: start;
    width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .ui-module-hero-stat-value {
    margin-left: 0;
    padding-left: 0;
    text-align: left;
  }

  .kpi-col {
    flex: 1 1 100%;
  }

  .nav-card,
  .card-clean {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 420px) {
  .ui-page-shell {
    padding: 0.65rem;
    border-radius: 0.95rem;
  }

  .ui-page-hero {
    padding: 0.85rem;
  }

  .ui-doc-toolbar,
  .ui-doc-toolbar-main,
  .ui-doc-toolbar-side,
  .ui-doc-filter-row {
    gap: 0.55rem;
  }

  .ui-glass-btn,
  .ui-doc-toolbar .btn,
  .ui-list-footer .btn,
  .ui-list-footer .page-link,
  .ui-list-shell .btn-group .btn,
  .ui-list-shell .table .btn {
    min-height: 2.35rem;
    padding-inline: 0.7rem;
  }

  .ui-list-shell .table {
    min-width: 680px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-card,
  .card-clean,
  .emoji-badge,
  .btn,
  .progress-bar {
    transition: none !important;
  }
}
