﻿.bs-report thead th {
    font-weight: 700;
}

.bs-report .detail-row.alt td {
    background: var(--report-detail-alt);
}

/* Optional group labels */
.bs-report .group-l2 td {
    background: var(--report-group-l2);
    font-weight: 800;
}

.bs-report .group-l3 td {
    background: var(--report-group-l3);
    font-weight: 700;
}

/* Subtotals */
.bs-report .subtotal-l3 td {
    background: var(--report-subtotal-l3);
    font-weight: 700;
}

.bs-report .subtotal-l2 td {
    background: var(--report-subtotal-l2);
    font-weight: 800;
    border-top: 1px solid var(--report-border-strong);
}

/* Grand total */
.bs-report .grand-total td {
    background: #dcfce7;
    font-weight: 900;
    border-top: 2px solid #22c55e;
}

.bs-report .section-gap td {
    background: #fff;
    padding: 6px;
    border: none;
}
/* TOP horizontal scrollbar */
.bs-scroll-top {
    overflow-x: auto;
    overflow-y: hidden;
    height: 16px;
    margin-bottom: 4px;
}

    .bs-scroll-top::-webkit-scrollbar {
        height: 12px;
    }

/* Invisible content just to create scrollbar width */
.bs-scroll-inner {
    height: 1px;
}


/* Horizontal scroll wrapper */
.bs-horizontal-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
}

/* Row holding both grids */
.bs-grid-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    padding: 12px;
}

/* Each grid column */
.bs-grid-col {
    min-width: 900px; /* controls when horizontal scroll appears */
    flex: 0 0 auto;
}

/* Optional section title above each grid */
.bs-grid-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 6px;
    padding-left: 4px;
}


/* =========================================================
   THEME-AWARE BS-REPORT VARIABLES
   Makes BalanceSheet / HTML5 report tables match app light/dark theme.
   Applies to tables using .bs-report and related row classes.
   ========================================================= */

/* Base table surface + text follows Bootstrap theme vars */
.bs-report{
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  --report-border: var(--bs-border-color);
}

.bs-report table{
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
}

.bs-report th,
.bs-report td{
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}

/* LIGHT THEME palette */
html[data-bs-theme="light"] .bs-report{
  --report-detail-alt: #f8f9fa;
  --report-group-l2: #eef2f6;
  --report-group-l3: #f3f6fa;
  --report-subtotal-l3: #e7f1ff;
  --report-subtotal-l2: #d0ebff;
  --report-border-strong: rgba(0,0,0,0.25);
  --report-grand-bg: #dcfce7;
  --report-grand-border: #22c55e;
  --report-gap-bg: #ffffff;
}

/* DARK THEME palette (match Flexmonster-like greys, avoid white stripes) */
html[data-bs-theme="dark"] .bs-report{
  --report-detail-alt: rgba(255,255,255,0.04);
  --report-group-l2: rgba(255,255,255,0.06);
  --report-group-l3: rgba(255,255,255,0.03);
  --report-subtotal-l3: rgba(13,110,253,0.10);
  --report-subtotal-l2: rgba(13,110,253,0.14);
  --report-border-strong: rgba(255,255,255,0.22);
  --report-grand-bg: rgba(34,197,94,0.16);
  --report-grand-border: rgba(34,197,94,0.55);
  --report-gap-bg: transparent;
}

/* Ensure thead isn't forced to Bootstrap table-dark colors */
.bs-report thead th{
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
}
html[data-bs-theme="dark"] .bs-report thead th{
  background: #4a4a4a; /* close to Flexmonster header grey */
  color: #ffffff;
  border-color: rgba(255,255,255,0.18);
}

/* Alternate detail rows */
.bs-report .detail-row.alt td{
  background: var(--report-detail-alt);
}

/* Group rows */
.bs-report .group-l2 td{
  background: var(--report-group-l2);
}
.bs-report .group-l3 td{
  background: var(--report-group-l3);
}

/* Subtotals */
.bs-report .subtotal-l3 td{
  background: var(--report-subtotal-l3);
  border-top: 1px solid var(--report-border-strong);
}
.bs-report .subtotal-l2 td{
  background: var(--report-subtotal-l2);
  border-top: 1px solid var(--report-border-strong);
}

/* Grand total (avoid neon/ugly in dark) */
.bs-report .grand-total td{
  background: var(--report-grand-bg);
  border-top: 2px solid var(--report-grand-border);
  font-weight: 900;
}

/* Section gaps shouldn't introduce white bars in dark */
.bs-report .section-gap td{
  background: var(--report-gap-bg) !important;
  border: none !important;
}
/* =========================================================
   BALANCESHEET – FLEXMONSTER DARK GREY STYLE
   Matches pivot dark grey look
   ========================================================= */

html[data-bs-theme="dark"] .bs-report {
    background-color: #1f2327 !important; /* base dark surface */
    color: #e9ecef !important;
}

    /* Header like Flexmonster */
    html[data-bs-theme="dark"] .bs-report thead th {
        background-color: #4a4a4a !important;
        color: #ffffff !important;
        border-color: #5a5a5a !important;
    }

    /* Normal rows */
    html[data-bs-theme="dark"] .bs-report tbody tr td {
        background-color: #1f2327 !important;
        color: #e9ecef !important;
        border-color: #2e3236 !important;
    }

    /* Alternate rows (subtle lighter grey) */
    html[data-bs-theme="dark"] .bs-report tbody tr:nth-child(even) td {
        background-color: #262b30 !important;
    }

    /* Hover */
    html[data-bs-theme="dark"] .bs-report tbody tr:hover td {
        background-color: #2f353b !important;
    }

    /* Subtotals */
    html[data-bs-theme="dark"] .bs-report .subtotal-l2 td,
    html[data-bs-theme="dark"] .bs-report .subtotal-l3 td {
        background-color: #30363c !important;
        font-weight: 700;
    }

    /* Grand total */
    html[data-bs-theme="dark"] .bs-report .grand-total td {
        background-color: #3a4046 !important;
        font-weight: 900;
        border-top: 2px solid #6c757d !important;
    }