html {
  font-size: 14px;
}

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

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

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

:root {
  --ab-app-bg: #fff1f5;
  --ab-surface-bg: #ffffff;
  --ab-surface-alt: #fff5f8;
  --ab-border: #f2a6ba;
  --ab-border-soft: #f9d6df;
  --ab-text: #2b1220;
  --ab-text-muted: #6f3d50;
}

:root[data-theme="dark"] {
  --ab-app-bg: #0f172a;
  --ab-surface-bg: #111827;
  --ab-surface-alt: #0b1220;
  --ab-border: #243041;
  --ab-border-soft: #1b2433;
  --ab-text: #e5edf8;
  --ab-text-muted: #9fb0c8;
}

:root[data-theme="navy"] {
  --ab-app-bg: #eef4ff;
  --ab-surface-bg: #ffffff;
  --ab-surface-alt: #f5f9ff;
  --ab-border: #c8d7ee;
  --ab-border-soft: #dbe6f5;
  --ab-text: #1e2f4d;
  --ab-text-muted: #56708f;
}

:root[data-theme="light-green"] {
  --ab-app-bg: #f3fbf5;
  --ab-surface-bg: #ffffff;
  --ab-surface-alt: #f3faf4;
  --ab-border: #cfe6d5;
  --ab-border-soft: #e2f1e6;
  --ab-text: #244234;
  --ab-text-muted: #5f7d69;
}

:root[data-theme="light-purple"] {
  --ab-app-bg: #f7f4ff;
  --ab-surface-bg: #ffffff;
  --ab-surface-alt: #f7f4ff;
  --ab-border: #d9cef0;
  --ab-border-soft: #ece4f8;
  --ab-text: #34284f;
  --ab-text-muted: #6c6288;
}

:root[data-theme="light-red"] {
  --ab-app-bg: #fff5f5;
  --ab-surface-bg: #ffffff;
  --ab-surface-alt: #fff0f0;
  --ab-border: #fac5c5;
  --ab-border-soft: #fde4e4;
  --ab-text: #3d1515;
  --ab-text-muted: #8b4040;
}

:root[data-theme="light-yellow"] {
  --ab-app-bg: #fefce8;
  --ab-surface-bg: #ffffff;
  --ab-surface-alt: #fef9c3;
  --ab-border: #f5d878;
  --ab-border-soft: #fef3c7;
  --ab-text: #3b2200;
  --ab-text-muted: #78530a;
}

body {
  background: var(--ab-app-bg);
  color: var(--ab-text);
  margin-bottom: 60px;
}

.ab-page-header {
  align-items: flex-start;
  border-bottom: 1px solid var(--ab-border);
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
}

.ab-page-header > *,
.ab-command-bar > *,
.ab-panel-header > *,
.ab-workspace > *,
.ab-main-panel,
.ab-side-panel,
.ab-panel,
.ab-check > *,
.ab-detail-list > * {
  min-width: 0;
}

.ab-page-header h1 {
  font-size: 1.75rem;
  margin: 0;
  overflow-wrap: anywhere;
}

.eyebrow {
  color: var(--ab-text-muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  margin-bottom: .25rem;
  text-transform: uppercase;
}

.ab-status-stack,
.ab-command-actions,
.ab-check-counts {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.ab-convert-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.ab-command-bar {
  align-items: center;
  background: var(--ab-surface-bg);
  border: 1px solid var(--ab-border);
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: .85rem 1rem;
}

.ab-inline-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.ab-inline-status {
  align-items: baseline;
  background: var(--ab-surface-alt);
  border: 1px solid var(--ab-border-soft);
  border-radius: 999px;
  display: inline-flex;
  gap: .45rem;
  padding: .3rem .7rem;
}

.ab-inline-status small {
  color: var(--ab-text-muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ab-inline-status strong {
  font-size: .85rem;
  font-weight: 700;
}

.ab-command-groups {
  align-items: stretch;
  gap: .65rem;
}

.ab-command-group {
  background: var(--ab-surface-alt);
  border: 1px solid var(--ab-border-soft);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  min-width: 0;
  padding: .55rem .65rem;
}

.ab-command-group-title {
  color: var(--ab-text-muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.ab-command-group-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.ab-filter-panel {
  background: var(--ab-surface-bg);
  border: 1px solid var(--ab-border);
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: 1rem;
}

.ab-filter-grid {
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Grid items must opt-in to shrinking below their content minimum-size */
.ab-filter-grid > *,
.ab-summary-grid > * {
  min-width: 0;
}

.ab-audit-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.ab-filter-actions {
  align-items: center;
  border-top: 1px solid var(--ab-border-soft);
  display: flex;
  gap: .5rem;
  justify-content: flex-end;
  margin-top: 1rem;
  padding-top: 1rem;
}

.ab-summary-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.ab-metric,
.ab-panel {
  background: var(--ab-surface-bg);
  border: 1px solid var(--ab-border);
  border-radius: 8px;
}

.ab-metric {
  min-width: 0;
  padding: .85rem;
}

.ab-metric span,
.ab-detail-list dt,
.ab-muted-line {
  color: var(--ab-text-muted);
  display: block;
  font-size: .82rem;
}

.ab-metric strong {
  display: block;
  font-size: 1rem;
  margin-top: .15rem;
  overflow-wrap: anywhere;
}

.ab-workspace {
  align-items: start;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
}

.ab-main-panel,
.ab-side-panel {
  display: grid;
  gap: 1rem;
}

.ab-panel {
  padding: 1rem;
}

.ab-panel-header {
  align-items: flex-start;
  border-bottom: 1px solid var(--ab-border-soft);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
}

.ab-panel-header h2 {
  font-size: 1.15rem;
  margin: 0;
}

.ab-panel details > summary.ab-panel-header {
  cursor: pointer;
  list-style-position: inside;
}

.ab-panel details:not([open]) > summary.ab-panel-header {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.ab-check-list {
  display: grid;
  gap: .65rem;
}

.ab-check {
  align-items: center;
  border: 1px solid #d8dee8;
  border-left-width: 4px;
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: .8rem;
}

.ab-check strong,
.ab-check p {
  overflow-wrap: anywhere;
}

.ab-check p {
  color: var(--ab-text-muted);
  margin: .15rem 0 0;
}

.ab-check-pass {
  border-left-color: #198754;
}

.ab-check-warning {
  border-left-color: #ffc107;
}

.ab-check-failed {
  border-left-color: #dc3545;
}

.ab-lines-table {
  margin-bottom: 0;
}

.ab-list-table {
  margin-bottom: 0;
}

.table {
  --bs-table-color: var(--ab-text);
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--ab-border);
  --bs-table-striped-color: var(--ab-text);
  --bs-table-striped-bg: rgba(37, 99, 235, .04);
  --bs-table-hover-color: var(--ab-text);
  --bs-table-hover-bg: rgba(37, 99, 235, .07);
}

.table thead th {
  background: var(--ab-surface-alt);
  border-bottom-color: var(--ab-border);
  color: var(--ab-text);
  font-weight: 650;
}

:root[data-theme="dark"] .table thead th {
  background: #182235;
  color: #e8eef8;
}

:root[data-theme="dark"] .table.table-sm.align-middle tbody tr:nth-child(even) > * {
  background: #121c2e;
}

:root[data-theme="dark"] .table.table-sm.align-middle tbody tr:hover > * {
  background: #1a2940;
}

:root[data-theme="dark"] .ab-items-table,
:root[data-theme="dark"] .ab-items-table thead th {
  color: #d8e3f3;
}

.dropdown-menu {
  background: var(--ab-surface-bg);
  border-color: var(--ab-border);
}

.dropdown-item,
.dropdown-header,
.dropdown-menu .text-muted {
  color: var(--ab-text);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--ab-surface-alt);
  color: var(--ab-text);
}

.dropdown-divider {
  border-top-color: var(--ab-border-soft);
}

.ts-dropdown,
.ts-dropdown.form-control,
.ts-dropdown.single {
  z-index: 2000;
}

.table.table-sm.align-middle tbody tr:nth-child(even) > * {
  background: #f4f9ff;
}

.table.table-sm.align-middle tbody tr:hover > * {
  background: #e9f3ff;
}

.table.table-sm.align-middle[id$="-lines-table"] tbody tr:nth-child(even) > *,
.table.table-sm.align-middle[id$="-lines-table"] tbody tr:hover > * {
  background: inherit;
}

.ab-list-table td,
.ab-list-table th {
  min-width: 110px;
}

.ab-list-table td:first-child,
.ab-list-table th:first-child,
.ab-list-table td:nth-child(2),
.ab-list-table th:nth-child(2) {
  min-width: 190px;
}

.ab-items-table {
  color: #243041;
  font-size: .875rem;
  font-weight: 400;
}

.ab-items-table thead th {
  color: #465366;
  font-size: .76rem;
  font-weight: 650;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.ab-items-table td {
  vertical-align: middle;
}

.ab-sort-link {
  align-items: center;
  color: inherit;
  display: inline-flex;
  gap: .25rem;
  text-decoration: none;
  white-space: nowrap;
}

.ab-sort-link:hover {
  color: #1f4f82;
  text-decoration: underline;
}

.ab-sort-link.asc::after,
.ab-sort-link.desc::after {
  color: #6b7787;
  font-size: .68rem;
}

.ab-sort-link.asc::after {
  content: "▲";
}

.ab-sort-link.desc::after {
  content: "▼";
}

.ab-status-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .02em;
  line-height: 1;
  padding: .32rem .55rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.ab-status-active {
  background: #e8f6ee;
  border: 1px solid #b8e2c8;
  color: #17643a;
}

.ab-status-inactive {
  background: #f1f3f6;
  border: 1px solid #d8dee8;
  color: #5a6575;
}

.badge.text-bg-primary {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
}

.badge.text-bg-success {
  background: #dcfce7 !important;
  color: #166534 !important;
}

.badge.text-bg-warning {
  background: #fef3c7 !important;
  color: #92400e !important;
}

.badge.text-bg-danger {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}

.badge.text-bg-secondary,
.badge.text-bg-dark {
  background: #e5e7eb !important;
  color: #374151 !important;
}

.badge.text-bg-info {
  background: #dbeafe !important;
  color: #1e40af !important;
}


.ab-lines-table td,
.ab-lines-table th {
  vertical-align: middle;
}

.ab-create-lines-table td:first-child,
.ab-create-lines-table th:first-child {
  min-width: 320px;
}

.ab-lines-table td:nth-child(2) {
  min-width: 280px;
  overflow-wrap: anywhere;
}

.ab-create-lines-table td:nth-child(2),
.ab-create-lines-table th:nth-child(2),
.ab-create-lines-table td:nth-child(3),
.ab-create-lines-table th:nth-child(3) {
  min-width: 120px;
}

.ab-create-total-bar {
  background: var(--ab-surface-alt);
  border: 1px solid var(--ab-border-soft);
  border-radius: 8px;
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
  padding: .85rem;
}

.ab-create-total-bar span {
  color: var(--ab-text-muted);
  display: block;
  font-size: .82rem;
}

.ab-create-total-bar strong {
  display: block;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.ab-detail-list {
  display: grid;
  gap: .55rem 1rem;
  grid-template-columns: 120px minmax(0, 1fr);
  margin-bottom: 0;
}

.ab-detail-list dd {
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.ab-response-box {
  background: #111827;
  border-radius: 8px;
  color: #e6edf7;
  font-size: .78rem;
  max-height: 260px;
  max-width: 100%;
  overflow: auto;
  overflow-wrap: anywhere;
  padding: .85rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.ab-dry-run-panel[hidden],
.ab-xml-preview-panel[hidden],
.ab-signing-check-panel[hidden] {
  display: none;
}

.ab-dry-run-summary {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.ab-dry-run-summary div {
  background: #f6f8fb;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  padding: .75rem;
}

.ab-dry-run-summary span {
  color: #5a6575;
  display: block;
  font-size: .82rem;
}

.ab-dry-run-summary strong {
  display: block;
  overflow-wrap: anywhere;
}

.ab-xml-preview-box {
  max-height: 520px;
}

.ab-xml-preview-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .75rem;
}

@media (max-width: 992px) {
  .ab-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ab-audit-grid {
    grid-template-columns: 1fr;
  }

  .ab-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ab-create-total-bar {
    grid-template-columns: 1fr;
  }

  .ab-workspace {
    grid-template-columns: 1fr;
  }

  .ab-dry-run-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .ab-command-bar,
  .ab-page-header,
  .ab-panel-header {
    align-items: stretch;
    flex-direction: column;
  }

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

  .ab-command-group {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .ab-filter-grid {
    grid-template-columns: 1fr;
  }

  .ab-filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .ab-summary-grid {
    grid-template-columns: 1fr;
  }

  .ab-detail-list {
    grid-template-columns: 1fr;
  }
}

/* ── Dashboard ────────────────────────────────────────────────────────────── */

.ab-dash-greeting {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.ab-dash-greeting h1 {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0;
}

.ab-dash-kpi-grid {
  display: grid;
  gap: .85rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.5rem;
}

.ab-dash-kpi-grid-wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ab-kpi {
  align-items: center;
  background: var(--ab-surface-bg);
  border: 1px solid var(--ab-border);
  border-radius: 10px;
  display: flex;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
}

.ab-kpi-accent-success { box-shadow: inset 0 3px 0 #22c55e; }
.ab-kpi-accent-blue { box-shadow: inset 0 3px 0 #3b82f6; }
.ab-kpi-accent-amber { box-shadow: inset 0 3px 0 #f59e0b; }
.ab-kpi-accent-purple { box-shadow: inset 0 3px 0 #8b5cf6; }
.ab-kpi-accent-red { box-shadow: inset 0 3px 0 #ef4444; }

.ab-kpi-icon {
  align-items: center;
  border-radius: 10px;
  display: flex;
  flex-shrink: 0;
  font-size: 1.35rem;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.ab-kpi-icon-green  { background: #dcfce7; color: #15803d; }
.ab-kpi-icon-blue   { background: #dbeafe; color: #1d4ed8; }
.ab-kpi-icon-amber  { background: #fef3c7; color: #b45309; }
.ab-kpi-icon-purple { background: #ede9fe; color: #6d28d9; }
.ab-kpi-icon-red    { background: #fee2e2; color: #b91c1c; }

.ab-kpi-label {
  color: var(--ab-text-muted);
  font-size: .77rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.ab-kpi-value {
  color: var(--ab-text);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.ab-kpi-sub {
  color: var(--ab-text-muted);
  font-size: .78rem;
  margin-top: .15rem;
}

.ab-dash-body {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr minmax(0, 420px);
}

.ab-dashboard-header {
  align-items: stretch;
}

.ab-sales-trend-panel {
  margin-bottom: 1rem;
}

.ab-sales-trend-panel .ab-panel-header strong {
  color: var(--ab-text);
  font-size: 1.15rem;
}

.ab-sales-trend-chart {
  align-items: end;
  display: grid;
  gap: .7rem;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-height: 190px;
  padding: .85rem 1rem 1rem;
}

.ab-sales-trend-day {
  align-items: center;
  display: grid;
  gap: .35rem;
  grid-template-rows: auto 112px auto auto;
  min-width: 0;
}

.ab-sales-trend-value {
  color: var(--ab-text);
  font-size: .74rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-align: center;
}

.ab-sales-trend-bar-wrap {
  align-items: end;
  background: linear-gradient(180deg, rgba(148, 163, 184, .12), rgba(148, 163, 184, .04));
  border: 1px solid var(--ab-border);
  border-radius: 8px;
  display: flex;
  height: 112px;
  overflow: hidden;
  padding: 4px;
  width: 100%;
}

.ab-sales-trend-bar {
  background: linear-gradient(180deg, #14b8a6, #2563eb);
  border-radius: 6px;
  box-shadow: 0 10px 20px rgba(37, 99, 235, .2);
  min-height: 4px;
  transition: height .2s ease;
  width: 100%;
}

.ab-sales-trend-label {
  color: var(--ab-text);
  font-size: .78rem;
  font-weight: 700;
  text-align: center;
}

.ab-sales-trend-count {
  color: var(--ab-text-muted);
  font-size: .7rem;
  text-align: center;
}

.ab-dashboard-strip {
  display: grid;
  gap: .85rem;
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(220px, .8fr));
  margin-bottom: 1.15rem;
}

.ab-dashboard-strip-card {
  background: var(--ab-surface-bg);
  border: 1px solid var(--ab-border);
  border-radius: 10px;
  padding: .95rem 1rem;
}

.ab-dashboard-strip-card span {
  color: var(--ab-text-muted);
  display: block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ab-dashboard-strip-card strong {
  display: block;
  font-size: 1rem;
  margin-top: .2rem;
}

.ab-dashboard-strip-card small {
  color: var(--ab-text-muted);
  display: block;
  margin-top: .18rem;
}

.ab-dashboard-main {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, .85fr);
}

.ab-dashboard-left,
.ab-dashboard-right {
  display: grid;
  gap: 1rem;
}

.ab-dashboard-table-wrap {
  overflow-x: auto;
}

.ab-action-grid-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ab-runtime-note {
  color: var(--ab-text);
  font-size: .92rem;
}

.ab-dashboard-link-grid {
  display: grid;
  gap: .75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ab-dashboard-link-card {
  background: linear-gradient(180deg, var(--ab-surface-bg), var(--ab-surface-alt));
  border: 1px solid var(--ab-border);
  border-radius: 10px;
  color: var(--ab-text);
  display: block;
  min-height: 96px;
  padding: 1rem;
  text-decoration: none;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}

.ab-dashboard-link-card:hover {
  border-color: #7aa2d9;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
  color: var(--ab-text);
  transform: translateY(-1px);
}

.ab-dashboard-link-card strong {
  display: block;
  font-size: .95rem;
  margin-bottom: .25rem;
}

.ab-dashboard-link-card span {
  color: var(--ab-text-muted);
  display: block;
  font-size: .82rem;
}

.ab-dash-actions {
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 10px;
  padding: 1.25rem;
}

.ab-dash-actions h2 {
  color: #5a6575;
  font-size: .77rem;
  font-weight: 700;
  letter-spacing: .06em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.ab-action-grid {
  display: grid;
  gap: .6rem;
  grid-template-columns: repeat(2, 1fr);
}

.ab-action-tile {
  align-items: center;
  background: #f6f8fb;
  border: 1px solid #e8ecf2;
  border-radius: 8px;
  color: #202938;
  display: flex;
  gap: .75rem;
  padding: .75rem 1rem;
  text-decoration: none;
  transition: background .12s, border-color .12s, transform .12s;
}

.ab-action-tile:hover {
  background: #eef2f9;
  border-color: #c5cfe0;
  color: #1a2535;
  transform: translateY(-1px);
}

.ab-action-tile-icon {
  align-items: center;
  border-radius: 8px;
  display: flex;
  flex-shrink: 0;
  font-size: 1.1rem;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.ab-action-tile strong { display: block; font-size: .88rem; font-weight: 600; }
.ab-action-tile span   { color: #5a6575; display: block; font-size: .76rem; }

.ab-dash-activity {
  background: #fff;
  border: 1px solid #d8dee8;
  border-radius: 10px;
  overflow: hidden;
}

.ab-dash-activity-header {
  border-bottom: 1px solid #eef1f5;
  padding: 1rem 1.25rem .75rem;
}

.ab-dash-activity-header h2 {
  color: #5a6575;
  font-size: .77rem;
  font-weight: 700;
  letter-spacing: .06em;
  margin: 0;
  text-transform: uppercase;
}

.ab-activity-row {
  align-items: center;
  border-bottom: 1px solid #f0f3f7;
  display: flex;
  gap: .75rem;
  padding: .65rem 1.25rem;
  text-decoration: none;
}

.ab-activity-row:last-child { border-bottom: none; }
.ab-activity-row:hover { background: #f6f9fc; }

.ab-activity-dot {
  border-radius: 50%;
  flex-shrink: 0;
  height: 8px;
  width: 8px;
}

.ab-activity-meta { flex: 1; min-width: 0; }
.ab-activity-meta strong { color: #1a2535; display: block; font-size: .85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-activity-meta span   { color: #5a6575; display: block; font-size: .76rem; }
.ab-activity-amount { color: #1a2535; font-size: .85rem; font-weight: 600; white-space: nowrap; }

@media (max-width: 992px) {
  .ab-dash-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .ab-dash-body { grid-template-columns: 1fr; }
  .ab-dashboard-main { grid-template-columns: 1fr; }
  .ab-dashboard-strip { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .ab-dash-kpi-grid { grid-template-columns: 1fr 1fr; }
  .ab-action-grid   { grid-template-columns: 1fr; }
  .ab-action-grid-wide { grid-template-columns: 1fr; }
  .ab-dashboard-link-grid { grid-template-columns: 1fr; }
  .ab-kpi-value     { font-size: 1.25rem; }
}

/* Remove spinner arrows from all number inputs */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ── Report print helpers ──────────────────────────────────────────────────── */

/* Screen: hide print-only elements */
.rpt-print-only,
.rpt-print-header { display: none !important; }

/* Print media ───────────────────────────────────────────────────────────────── */
@media print {

  /* Hide all app chrome */
  .ab-topbar,
  .ab-sidebar,
  .ab-page-header,
  .ab-filter-panel,
  .ab-filter-actions,
  .ab-command-actions,
  .rpt-screen-only,
  .btn,
  nav,
  footer { display: none !important; }

  /* Full-width content area — remove sidebar padding/margin */
  .ab-main,
  .ab-app,
  body {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  /* Show print-only elements */
  .rpt-print-only,
  .rpt-print-header { display: block !important; }

  /* Force collapse sections open */
  .collapse { display: block !important; }

  /* ── Print header layout ─────────────────────────────────────────────────── */
  .rpt-print-header {
    border-bottom: 2px solid #333;
    margin-bottom: .75rem;
    padding-bottom: .5rem;
  }

  .rpt-co-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    margin-bottom: .4rem;
  }

  .rpt-co-logo {
    height: 56px;
    object-fit: contain;
    width: auto;
  }

  .rpt-co-name {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .rpt-co-ll {
    color: #555;
    font-size: .85rem;
  }

  .rpt-co-meta {
    color: #555;
    font-size: .78rem;
    margin-top: .2rem;
  }

  .rpt-co-meta span::after { content: ' \2022 '; }
  .rpt-co-meta span:last-child::after { content: ''; }

  .rpt-print-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .06em;
    margin: .35rem 0 .2rem;
    text-align: center;
    text-transform: uppercase;
  }

  .rpt-print-meta {
    color: #444;
    display: flex;
    font-size: .78rem;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: .25rem;
  }

  /* ── Tables ──────────────────────────────────────────────────────────────── */
  table { border-collapse: collapse !important; font-size: .78rem !important; width: 100% !important; }
  th, td { border: 1px solid #ccc !important; padding: 2px 5px !important; }
  thead { background: #e8e8e8 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  /* Keep section header backgrounds on print */
  .table-dark, .table-secondary, .table-light {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* ── Page setup ──────────────────────────────────────────────────────────── */
  @page {
    margin: 12mm 10mm;
    size: A4 landscape;
  }

  /* Avoid page breaks inside rows */
  tr { page-break-inside: avoid; }

  /* Section panels — keep header with first few rows */
  .ab-panel { page-break-inside: auto; margin-top: .5rem !important; }
}
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
