@font-face {
    font-family: "Manrope";
    src: url("/font/Manrope/static/Manrope-Regular.ttf") format("truetype");
    font-weight: 400;
}

@font-face {
    font-family: "Manrope";
    src: url("/font/Manrope/static/Manrope-Medium.ttf") format("truetype");
    font-weight: 500;
}

@font-face {
    font-family: "Manrope";
    src: url("/font/Manrope/static/Manrope-SemiBold.ttf") format("truetype");
    font-weight: 600;
}

@font-face {
    font-family: "Manrope";
    src: url("/font/Manrope/static/Manrope-Bold.ttf") format("truetype");
    font-weight: 700;
}

@font-face {
    font-family: "Newsreader";
    src: url("/font/Newsreader/static/Newsreader_9pt-Regular.ttf") format("truetype");
    font-weight: 400;
}

@font-face {
    font-family: "Newsreader";
    src: url("/font/Newsreader/static/Newsreader_9pt-Italic.ttf") format("truetype");
    font-weight: 400;
    font-style: italic;
}

body {
    font-family: "Manrope", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

.app {
    display: flex;
    min-height: 100vh;
    background: #f4f6f5;
    font-family: 'Manrope', -apple-system, system-ui, sans-serif;
    color: #1f2a28;
}

/* ===== sidebar ===== */
.sb-state {
    display: none;
}

.sidebar {
    width: 250px;
    flex: none;
    background: #15524a;
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 22px 16px;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width .2s ease, transform .25s ease;
}

.sb-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 4px 6px 22px;
}

.sb-logo {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: #fff;
    color: #15524a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    flex: none;
}

.sb-brand-text {
    white-space: nowrap;
}

.sb-brand-name {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.01em;
}

.sb-brand-sub {
    font-size: 11px;
    color: #9ec7bd;
    font-weight: 600;
}

.sb-section {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #6fa093;
    text-transform: uppercase;
    padding: 6px 10px 8px;
    white-space: nowrap;
}

.sb-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sb-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 9px;
    color: #a8d0c6;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
}

    .sb-link:hover {
        background: rgba(255,255,255,.08);
        color: #cfe6df;
    }

    .sb-link.active {
        color: #15524a;
        background: #ffffff;
        font-weight: 700;
    }

        .sb-link.active:hover {
            background: #ffffff;
            color: #15524a;
        }

    .sb-link svg, .sb-summary svg.ico {
        flex: none;
    }

.sb-label {
    flex: 1;
    white-space: nowrap;
}

/* submenu (Reports) */
.navgroup > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 9px;
    color: #a8d0c6;
    font-size: 13.5px;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

    .navgroup > summary:hover {
        background: rgba(255,255,255,.08);
    }

    .navgroup > summary::-webkit-details-marker {
        display: none;
    }

.navgroup[open] .chev {
    transform: rotate(180deg);
}

.chev {
    transition: transform .18s ease;
}

.sb-submenu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 3px 0 3px 16px;
    padding-left: 11px;
    border-left: 1px solid rgba(255,255,255,.14);
}

.sb-sublink {
    padding: 8px 12px;
    border-radius: 8px;
    color: #a8d0c6;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

    .sb-sublink:hover {
        background: rgba(255,255,255,.08);
        color: #cfe6df;
    }

/* sidebar footer */
.sb-foot {
    margin-top: auto;
}

.sb-minbtn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 9px;
    color: #a8d0c6;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 6px;
}

    .sb-minbtn:hover {
        background: rgba(255,255,255,.08);
    }

.mini-chev {
    transition: transform .2s ease;
    flex: none;
}

.sb-user {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px 8px 4px;
    border-top: 1px solid rgba(255,255,255,.1);
}

.sb-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2d6a60;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex: none;
}

.sb-user-text {
    min-width: 0;
    white-space: nowrap;
}

.sb-user-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sb-user-role {
    font-size: 11px;
    color: #9ec7bd;
}

/* collapsed state */
#nav-collapse:checked ~ .sidebar {
    width: 76px;
}

    #nav-collapse:checked ~ .sidebar .sb-hide {
        display: none !important;
    }

    #nav-collapse:checked ~ .sidebar .sb-nav > a,
    #nav-collapse:checked ~ .sidebar .navgroup > summary,
    #nav-collapse:checked ~ .sidebar .sb-minbtn {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }

    #nav-collapse:checked ~ .sidebar .navgroup > .sb-submenu {
        display: none !important;
    }

    #nav-collapse:checked ~ .sidebar .mini-chev {
        transform: rotate(180deg);
    }

/* mobile drawer chrome (hidden on desktop) */
.sb-backdrop {
    display: none;
}

.sb-hamburger {
    display: none;
}

/* ===== content ===== */
.content {
    flex: 1;
    min-width: 0;
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 26px 56px;
}

.page-head {
   display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 18px;
}
.page-title-container{
    flex: 1;
    min-width: 200px;
}
.header-actions
{
        display: flex;
    gap: 9px;
}
.page-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.01em;
    color: #15524a;
}

.page-sub {
    margin: 3px 0 0;
    font-size: 13px;
    color: #79827d;
}

.card-panel {
    background: #ffffff;
    border: 1px solid #e7eae8;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(31,42,40,.03);
}

.toolbar-card {
    padding: 18px;
    margin-bottom: 16px;
}

/* toolbar */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.search-wrap {
    position: relative;
    flex: 0 1 280px;
    min-width: 180px;
}

.search-ico {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.search-input {
    height: 42px;
    padding-left: 36px;
    border-radius: 9px;
    border-color: #dfe3e0;
    font-size: 14px;
}

.btn-primary-fbm {
    height: 42px;
    padding: 10px 18px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
    background: #15524a;
    border: 1px solid #15524a;
    white-space: nowrap;
}

    .btn-primary-fbm:hover {
        background: #113f39;
        color: #fff;
    }

.toolbar-select {
    height: 42px;
    width: auto;
    border-radius: 9px;
    border-color: #d8dcd8;
    font-size: 14px;
}

.sort-select {
    min-width: 170px;
}

.pagesize-select {
    min-width: 120px;
}

.btn-soft {
    height: 42px;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 600;
    color: #15524a;
    background: #eef4f2;
    border: 1px solid #d6e3df;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

    .btn-soft:hover {
        background: #e2efea;
        color: #15524a;
    }

.btn-ghost {
    height: 42px;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 600;
    color: #7a847f;
    background: #fff;
    border: 1px solid #e2e5e2;
    white-space: nowrap;
}

    .btn-ghost:hover {
        background: #f7f8f7;
        color: #5c6660;
    }

/* filters */
.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px 14px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eef0ee;
}

    .filters.is-hidden {
        display: none;
    }

.fld-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #8a938e;
    margin-bottom: 5px;
}

.date-input {
    height: 42px;
    border-radius: 9px;
    border-color: #d8dcd8;
    font-size: 14px;
}

/* select2 theming */
.select2-container {
    width: 100% !important;
}

.select2-container--bootstrap4 .select2-selection {
    border-color: #d8dcd8;
    min-height: 42px;
    border-radius: 9px;
}

.select2-container--bootstrap4.select2-container--focus .select2-selection {
    border-color: #15524a;
    box-shadow: 0 0 0 3px rgba(21,82,74,.13);
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
    background: #eef4f2;
    border: 1px solid #cfe0db;
    color: #15524a;
    border-radius: 6px;
}

.select2-results__option--highlighted[aria-selected] {
    background-color: #15524a !important;
}

/* Ensure Select2 dropdown renders above other UI and has a subtle shadow */
.select2-container--bootstrap4 .select2-dropdown {
    z-index: 3000;
    box-shadow: 0 6px 18px rgba(17,63,57,0.12);
}

/* Alignment fixes: match form controls height, vertical center text and chips */
.select2-container--bootstrap4 .select2-selection {
    display: flex;
    align-items: center;
    padding: 6px 12px;
}

.select2-container--bootstrap4 .select2-selection__rendered {
    display: inline-block;
    margin: 0;
}

.select2-container--bootstrap4 .select2-selection__arrow {
    height: auto;
    align-self: center;
}

.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice {
    display: inline-flex;
    align-items: center;
    height: 28px;
    line-height: 1;
    margin-top: 4px;
}

.form-select:focus, .form-control:focus {
    border-color: #15524a;
    box-shadow: 0 0 0 3px rgba(21,82,74,.13);
}

/* table */
.table-card {
    overflow: hidden;
}

.txn-table {
    font-size: 13.5px;
}

    .txn-table thead tr {
        background: #f7f9f8;
    }

    .txn-table th {
        padding: 13px 16px;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: #5c6660;
        white-space: nowrap;
    }

        .txn-table th.num {
            text-align: right;
        }

    .txn-table tbody tr:hover {
        background: #f3f6f5;
    }

    .txn-table td {
        padding: 12px 16px;
    }

.td-nowrap {
    white-space: nowrap;
}

.td-muted {
    color: #4a544f;
}

.td-strong {
    white-space: nowrap;
    font-weight: 600;
}

.td-type {
    font-size: 12px;
    font-weight: 600;
    color: #5c6660;
}

.num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

    .num.credit {
        font-weight: 600;
        color: #1f7a4d;
    }

    .num.debit {
        font-weight: 600;
        color: #c0392b;
    }

    .num.zero {
        font-weight: 600;
        color: #c3c8c4;
    }

    .num.balance {
        font-weight: 700;
        color: #1f2a28;
    }

.role-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 2px 7px;
    border-radius: 5px;
    margin-left: 8px;
}

    .role-badge.client {
        background: #eef4f2;
        color: #15524a;
    }

    .role-badge.employee {
        background: #eef0fb;
        color: #3b4a8a;
    }

.empty-row {
    padding: 48px 16px;
    text-align: center;
    color: #9aa39e;
    font-size: 14px;
}

/* summary stat cards */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.stat {
    background: #ffffff;
    border: 1px solid #e7eae8;
    border-radius: 14px;
    padding: 16px 18px;
}

    .stat.credit {
        border-color: #d8ebe0;
    }

    .stat.debit {
        border-color: #f0dcd6;
    }

    .stat.net {
        background: #15524a;
        border-color: #15524a;
    }

.stat-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #8a938e;
}

.stat.net .stat-label {
    color: #9ec7bd;
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
    margin-top: 4px;
    color: #1f2a28;
}

.stat.credit .stat-value {
    color: #1f7a4d;
}

.stat.debit .stat-value {
    color: #c0392b;
}

.stat.net .stat-value {
    color: #ffffff;
}

/* pagination row */
.pager-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
}

.result-info {
    font-size: 13px;
    color: #79827d;
}

.pagination {
    gap: 4px;
}

.page-link {
    color: #15524a;
    border-radius: 8px;
}

.page-item.active .page-link {
    background-color: #15524a;
    border-color: #15524a;
    color: #fff;
}

.page-link:focus {
    box-shadow: 0 0 0 .2rem rgba(21,82,74,.18);
}

.page-ellipsis .page-link {
    border: none;
    background: none;
}

/* ===== responsive ===== */
@media (max-width: 900px) {
    .sidebar,
    #nav-collapse:checked ~ .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 60;
        width: 250px;
        transform: translateX(-100%);
        box-shadow: 0 0 40px rgba(0,0,0,.28);
    }

    #nav-drawer:checked ~ .sidebar {
        transform: translateX(0);
    }

    #nav-collapse:checked ~ .sidebar .sb-hide {
        display: revert !important;
    }

    #nav-collapse:checked ~ .sidebar .navgroup > .sb-submenu {
        display: flex !important;
    }

    .sb-minbtn {
        display: none !important;
    }

    .sb-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15,30,27,.45);
        z-index: 55;
    }

    #nav-drawer:checked ~ .sb-backdrop {
        display: block;
    }

    .sb-hamburger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 14px;
        left: 14px;
        z-index: 50;
        width: 42px;
        height: 42px;
        background: #15524a;
        color: #fff;
        border-radius: 10px;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0,0,0,.18);
    }

    .content {
        padding-top: 70px;
    }
}

/*Report*/
.report-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 18px;
}

.report-title-wrap {
    flex: 1;
    min-width: 200px;
}

.report-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #15524a;
}

.report-subtitle {
    margin: 3px 0 0;
    font-size: 13px;
    color: #79827d;
}

.report-actions {
    display: flex;
    gap: 9px;
}

.report-print-btn {
    height: 40px;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 600;
    color: #15524a;
    background: #fff;
    border: 1px solid #e2e5e2;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.filter-card {
    background: #ffffff;
    border: 1px solid #e7eae8;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(31, 42, 40, .03);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}

.filter-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #8a938e;
    margin-bottom: 5px;
}

.filter-control {
    height: 42px;
    border-radius: 9px;
    border-color: #d8dcd8;
    font-size: 14px;
}

.filter-multi {
    width: 100%;
}

.filter-actions {
    display: flex;
    gap: 9px;
    align-items: flex-end;
}

.filter-btn {
    height: 42px;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
}
.filter-btn:hover
{
    color:#fff;
    background-color:#082b26;
}
.filter-apply-btn {
    flex: 1;
    color: #fff;
    background: #15524a;
    border: 1px solid #15524a;
}

.filter-reset-btn {
    color: #7a847f;
    background: #fff;
    border: 1px solid #e2e5e2;
    display: inline-flex;
    align-items: center;
}

.report-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 16px;
}

.report-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 12px;
    padding: 5px 11px;
    border-radius: 8px;
}

.report-chip-primary {
    background: #eef4f2;
    border: 1px solid #cfe0db;
    color: #15524a;
}

.report-chip-muted {
    background: #f3f5f4;
    border: 1px solid #e6e9e7;
    color: #5c6660;
}

.report-entry-count {
    font-size: 12px;
    color: #9aa39e;
    margin-left: 2px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.kpi-card {
    background: #fff;
    border: 1px solid #e7eae8;
    border-radius: 14px;
    padding: 16px 18px;
}

.kpi-card-primary {
    background: #15524a;
    border-color: #15524a;
}

.kpi-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #8a938e;
}

.kpi-card-primary .kpi-label {
    color: #9ec7bd;
}

.kpi-value {
    font-size: 21px;
    font-weight: 800;
    color: #1f2a28;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}

.kpi-card-primary .kpi-value {
    color: #fff;
}

.kpi-head-value {
    font-size: 18px;
    font-weight: 800;
    color: #1f2a28;
    margin-top: 4px;
    word-break: break-word;
}

.kpi-sub-value {
    font-size: 12px;
    font-weight: 700;
    color: #8a938e;
    font-variant-numeric: tabular-nums;
}

.kpi-empty {
    font-size: 18px;
    font-weight: 800;
    color: #c4cbc7;
    margin-top: 4px;
}

.report-section {
    background: #fff;
    border: 1px solid #e7eae8;
    border-radius: 14px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(31, 42, 40, .03);
}

.report-section-padded {
    padding: 22px 24px;
}

.section-title {
    font-size: 13px;
    font-weight: 800;
    color: #15524a;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.section-divider {
    border-bottom: 2px solid #15524a;
    margin: 8px 0 16px;
}

.head-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.head-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 5px;
}

.head-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #3a443f;
}

.head-amount {
    font-size: 13.5px;
    font-weight: 700;
    color: #1f2a28;
    font-variant-numeric: tabular-nums;
}

.head-percent {
    color: #9aa39e;
    font-weight: 600;
}

.bar-track {
    height: 9px;
    background: #eef1f0;
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 6px;
}

.empty-state {
    text-align: center;
    padding: 32px 0;
    color: #9aa39e;
    font-size: 14px;
}

.detail-card {
    overflow: hidden;
}

.detail-header {
    padding: 18px 22px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.detail-count {
    font-size: 12px;
    color: #9aa39e;
}

.table-scroll {
    overflow-x: auto;
}

.income-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

    .income-table thead tr {
        background: #f6f8f7;
        border-top: 1px solid #eef0ee;
        border-bottom: 1px solid #eef0ee;
    }

.income-th {
    text-align: left;
    padding: 11px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #8a938e;
}

.income-th-wide {
    padding-left: 22px;
    padding-right: 22px;
}

.income-th-right {
    text-align: right;
}

.sort-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.sort-link-right {
    justify-content: flex-end;
    width: 100%;
}

.sort-active {
    color: #15524a;
}

.sort-muted {
    opacity: .35;
}

.income-row {
    border-bottom: 1px solid #f0f2f0;
}

.income-td {
    padding: 13px 14px;
    font-size: 13px;
    color: #5c6660;
}

.income-td-wide {
    padding-left: 22px;
    padding-right: 22px;
}

.income-date {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.income-head {
    font-size: 13.5px;
    font-weight: 600;
    color: #1f2a28;
}

.income-amount {
    text-align: right;
    font-size: 13.5px;
    font-weight: 700;
    color: #1f2a28;
    font-variant-numeric: tabular-nums;
}

.income-ref {
    font-size: 12px;
    color: #6b7a76;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.income-sub {
    font-size: 11.5px;
    color: #8a9e99;
    margin-top: 2px;
    font-weight: 400;
}

.table-empty {
    padding: 40px 22px;
    text-align: center;
    color: #9aa39e;
    font-size: 14px;
}

.income-total-row {
    background: #15524a;
}

.income-total-label {
    padding: 14px 22px;
    font-size: 13.5px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.income-total-value {
    padding: 14px 22px;
    text-align: right;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.pl-page {
    padding: 28px 28px 48px;
    width: 100%
}

.pl-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    margin-bottom: 18px;
}

.pl-header-title {
    flex: 1;
    min-width: 200px;
}

.pl-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #15524a;
}

.pl-subtitle {
    margin: 3px 0 0;
    font-size: 13px;
    color: #79827d;
}

.pl-header-actions {
    display: flex;
    gap: 9px;
}

.pl-btn-outline {
    height: 40px;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 600;
    color: #15524a;
    background: #fff;
    border: 1px solid #e2e5e2;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}

.pl-btn-primary {
    height: 40px;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
    background: #15524a;
    border: 1px solid #15524a;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}

.pl-btn-outline:hover {
    background: #f4f6f5;
}

.pl-btn-primary:hover {
    background: #0f3d36;
    border-color: #0f3d36;
}

/* ── Filter Card ────────────────────────────────────────── */
.pl-filter-card {
    background: #fff;
    border: 1px solid #e7eae8;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(31,42,40,.03);
}

.pl-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px 14px;
    align-items: end;
}

.pl-filter-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #8a938e;
    margin-bottom: 5px;
}

.pl-filter-control {
    height: 42px !important;
    border-radius: 9px !important;
    border-color: #d8dcd8 !important;
    font-size: 14px !important;
}

.pl-filter-actions {
    display: flex;
    gap: 9px;
}

.pl-btn-apply {
    height: 42px;
    flex: 1;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 600;
    color: #fff;
    background: #15524a;
    border: 1px solid #15524a;
    white-space: nowrap;
}

    .pl-btn-apply:hover {
        background: #0f3d36;
        border-color: #0f3d36;
        color:#fff;
    }

.pl-btn-reset {
    height: 42px;
    padding: 0 16px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 600;
    color: #7a847f;
    background: #fff;
    border: 1px solid #e2e5e2;
    white-space: nowrap;
}

    .pl-btn-reset:hover {
        background: #f4f6f5;
    }

/* Select2 overrides */
.select2-container--bootstrap4 .select2-selection--multiple {
    min-height: 42px !important;
    border-radius: 9px !important;
    border-color: #d8dcd8 !important;
    display: flex;
    align-items: center;
}

    .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__rendered {
        padding: 2px 8px;
    }

/* ── Scope Strip ────────────────────────────────────────── */
.pl-scope {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 16px;
}

.pl-scope-fy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef4f2;
    border: 1px solid #cfe0db;
    color: #15524a;
    font-weight: 600;
    font-size: 12px;
    padding: 5px 11px;
    border-radius: 8px;
}

.pl-scope-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f5f4;
    border: 1px solid #e6e9e7;
    color: #5c6660;
    font-weight: 600;
    font-size: 12px;
    padding: 5px 11px;
    border-radius: 8px;
}

.pl-scope-note {
    font-size: 12px;
    color: #9aa39e;
    margin-left: 2px;
}

/* ── Summary KPI Cards ──────────────────────────────────── */
.pl-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.pl-kpi {
    background: #fff;
    border: 1px solid #e7eae8;
    border-radius: 14px;
    padding: 16px 18px;
}

.pl-kpi-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #8a938e;
}

.pl-kpi-value {
    font-size: 21px;
    font-weight: 800;
    color: #1f2a28;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}

.pl-kpi-pct {
    font-size: 12px;
    font-weight: 700;
    color: #8a938e;
}

.pl-kpi-dark {
    background: #15524a;
    border-color: #15524a;
    border-radius: 14px;
    padding: 16px 18px;
}

    .pl-kpi-dark .pl-kpi-label {
        color: #9ec7bd;
    }

    .pl-kpi-dark .pl-kpi-value {
        color: #fff;
    }

    .pl-kpi-dark .pl-kpi-pct {
        color: #9ec7bd;
    }

.pl-kpi-red {
    background: #fdf0f0;
    border-color: #f5c6c6;
    border-radius: 14px;
    padding: 16px 18px;
}

    .pl-kpi-red .pl-kpi-label {
        color: #c0392b;
    }

    .pl-kpi-red .pl-kpi-value {
        color: #c0392b;
    }

/* ── Report Card ────────────────────────────────────────── */
.pl-report-card {
    background: #fff;
    border: 1px solid #e7eae8;
    border-radius: 14px;
    padding: 22px 24px;
    box-shadow: 0 1px 2px rgba(31,42,40,.03);
}

.pl-card-title {
    font-size: 13px;
    font-weight: 800;
    color: #15524a;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 15px 10px 5px 10px;
}

.pl-card-divider {
    border-bottom: 2px solid #15524a;
    margin: 8px 0 2px;
}

/* ── Section Labels ─────────────────────────────────────── */
.pl-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #8a938e;
    margin: 18px 0 4px;
}

/* ── Line Items ─────────────────────────────────────────── */
.pl-row {
    display: flex;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px solid #f0f2f0;
}

.pl-row-group-name {
    flex: 1;
    font-size: 13px;
    font-weight: 700;
    color: #3a443f;
}

.pl-row-name {
    flex: 1;
    font-size: 13.5px;
    font-weight: 500;
    color: #4a544f;
    padding-left: 14px;
}

.pl-row-amount {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #3a443f;
    text-align: right;
    min-width: 150px;
}

.pl-row-amount-dim {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
    color: #9aa39e;
    text-align: right;
    min-width: 150px;
    font-style: italic;
    font-size: 12px;
}

/* ── Subtotals ───────────────────────────────────────────── */
.pl-subtotal {
    display: flex;
    align-items: baseline;
    padding: 12px 0;
    border-top: 1.5px solid #dfe4e2;
}

.pl-subtotal-name {
    flex: 1;
    font-size: 14px;
    font-weight: 700;
    color: #15524a;
}

.pl-subtotal-amount {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #1f2a28;
    text-align: right;
    min-width: 150px;
}

/* ── Profit/Subtotal Highlight Boxes ───────────────────── */
.pl-profit-box {
    display: flex;
    align-items: baseline;
    margin: 12px 0;
    padding: 13px 16px;
    background: #eef4f2;
    border: 1px solid #cfe0db;
    border-radius: 10px;
}

.pl-profit-box-name {
    flex: 1;
    font-size: 14px;
    font-weight: 800;
    color: #15524a;
}

.pl-profit-box-amount {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    color: #15524a;
    text-align: right;
    min-width: 150px;
}

.pl-loss-box {
    background: #fdf0f0 !important;
    border-color: #f5c6c6 !important;
}

    .pl-loss-box .pl-profit-box-name, .pl-loss-box .pl-profit-box-amount {
        color: #c0392b !important;
    }

/* ── Net Profit/Loss Box ────────────────────────────────── */
.pl-net-box {
    display: flex;
    align-items: baseline;
    margin-top: 14px;
    padding: 14px 16px;
    background: #15524a;
    border-radius: 10px;
}

.pl-net-box-name {
    flex: 1;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.pl-net-box-amount {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    color: #fff;
    text-align: right;
    min-width: 150px;
}

.pl-net-box-loss {
    background: #c0392b !important;
}

/* ── Empty State ─────────────────────────────────────────── */
.pl-empty {
    text-align: center;
    padding: 48px 24px;
    color: #9aa39e;
}

.pl-empty-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.pl-empty-text {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #5c6660;
}

.pl-empty-sub {
    font-size: 12px;
}

/* ── Print ───────────────────────────────────────────────── */
@@media print {
    .no-print {
        display: none !important;
    }

    .pl-page {
        padding: 0;
    }

    .pl-report-card {
        box-shadow: none;
    }

    .pl-summary-grid {
        break-inside: avoid;
    }
}
/*Tansaction Create page*/
.content {
    flex: 1;
    min-width: 0;
    max-width: 1080px;
    margin: 0 auto;
    padding: 28px 26px 56px;
}

.page-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: #fff;
    border: 1px solid #e2e5e2;
    color: #15524a;
    text-decoration: none;
    flex: none;
}

    .back-btn:hover {
        background: #f7f8f7;
        color: #15524a;
    }

.page-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.01em;
    color: #15524a;
}

.page-sub {
    margin: 3px 0 0;
    font-size: 13px;
    color: #79827d;
}

.ref-strip {
    background: #15524a;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.ref-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #9ec7bd;
}

.ref-value {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-top: 3px;
    font-variant-numeric: tabular-nums;
}

.ref-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    color: #9ec7bd;
    background: rgba(255,255,255,.08);
    padding: 7px 12px;
    border-radius: 8px;
}

.form-card {
    background: #ffffff;
    border: 1px solid #e7eae8;
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(31,42,40,.03);
}

.card-heading {
    font-size: 13px;
    font-weight: 800;
    color: #15524a;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef0ee;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px 18px;
}

.fld-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #8a938e;
    margin-bottom: 6px;
}

    .fld-label .req {
        color: #c0392b;
        margin-left: 2px;
    }

.fld-input {
    height: 44px;
    border-radius: 9px;
    border-color: #d8dcd8;
    font-size: 14px;
}

    .fld-input.is-invalid, select.is-invalid + .select2-container .select2-selection {
        border-color: #c0392b !important;
        box-shadow: 0 0 0 3px rgba(192,57,43,.12) !important;
    }

.fld-error {
    display: none;
    font-size: 11.5px;
    color: #c0392b;
    margin-top: 5px;
}

    .fld-error.show {
        display: block;
    }

.amount-wrap {
    position: relative;
}

.amount-prefix {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    font-size: 14px;
}

    .amount-prefix.credit {
        color: #1f7a4d;
    }

    .amount-prefix.debit {
        color: #c0392b;
    }

.amount-input {
    padding-left: 30px;
    font-variant-numeric: tabular-nums;
}

.amt-hint {
    margin: 12px 0 0;
    font-size: 12px;
    color: #9aa39e;
}

.desc-field {
    margin-bottom: 18px;
}

.desc-input {
    border-radius: 9px;
    border-color: #d8dcd8;
    font-size: 14px;
    resize: vertical;
}

.select2-container {
    width: 100% !important;
}

.select2-container--bootstrap4 .select2-selection {
    border-color: #d8dcd8;
    min-height: 44px;
    border-radius: 9px;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    line-height: 42px;
    color: #1f2a28;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
    height: 42px;
}

.select2-container--bootstrap4.select2-container--focus .select2-selection,
.select2-container--bootstrap4.select2-container--open .select2-selection {
    border-color: #15524a;
    box-shadow: 0 0 0 3px rgba(21,82,74,.13);
}

.select2-results__option--highlighted[aria-selected] {
    background-color: #15524a !important;
}

.form-control:focus, .form-select:focus {
    border-color: #15524a;
    box-shadow: 0 0 0 3px rgba(21,82,74,.13);
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    right: 6px;
}

    .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b {
        position: static;
        margin: 0;
    }

.dropzone {
    border: 1.5px dashed #cdd6d1;
    border-radius: 11px;
    background: #fafbfb;
    padding: 26px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

    .dropzone.drag {
        border-color: #15524a;
        background: #eef4f2;
    }

.dz-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #eef4f2;
    color: #15524a;
    margin-bottom: 10px;
}

.dz-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2a28;
}

.dz-browse {
    color: #15524a;
    text-decoration: underline;
}

.file-hint {
    font-size: 12px;
    color: #9aa39e;
    margin-top: 4px;
}

.file-input {
    display: none;
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 11px;
    background: #f7f9f8;
    border: 1px solid #e7eae8;
    border-radius: 9px;
    padding: 9px 12px;
}

.file-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: #eef4f2;
    color: #15524a;
    flex: none;
}

.file-meta {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 13px;
    font-weight: 600;
    color: #1f2a28;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 11.5px;
    color: #9aa39e;
}

.file-remove {
    border: none;
    background: none;
    color: #9aa39e;
    cursor: pointer;
    padding: 4px;
    line-height: 0;
    flex: none;
}

    .file-remove:hover {
        color: #c0392b;
    }

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.form-msg {
    margin-right: auto;
    font-size: 13px;
    font-weight: 600;
}

    .form-msg.ok {
        color: #1f7a4d;
    }

    .form-msg.err {
        color: #c0392b;
    }

.btn-ghost {
    height: 44px;
    padding: 0 20px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    color: #7a847f;
    background: #fff;
    border: 1px solid #e2e5e2;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

    .btn-ghost:hover {
        background: #f7f8f7;
        color: #5c6660;
    }

.btn-save {
    height: 44px;
    padding: 0 24px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: #15524a;
    border: 1px solid #15524a;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background .15s;
}

    .btn-save:hover:not(:disabled) {
        background: #113f39;
        color:#fff;
    }

    .btn-save:disabled {
        opacity: .7;
        cursor: not-allowed;
    }

.spin {
    animation: spin .7s linear infinite;
    display: inline-block;
}

@@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.existing-files-label {
    margin-bottom: 8px;
}

.new-files-section {
    margin-top: 18px;
    border-top: 1px solid #eef0ee;
    padding-top: 18px;
}


/*Transaction List*/
.td-actions {
    width: 48px;
    text-align: center;
}

.action-wrap {
    position: relative;
    display: inline-block;
}

.btn-dots {
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    color: #6b7280;
}

    .btn-dots:hover {
        background: #f3f4f6;
        color: #111;
    }

.action-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 2px);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    z-index: 200;
    min-width: 110px;
    padding: 4px 0;
}

    .action-menu.open {
        display: block;
    }

.action-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 7px 14px;
    font-size: .875rem;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    color: #374151;
    white-space: nowrap;
}

    .action-item:hover {
        background: #f9fafb;
        color: #111827;
        text-decoration: none;
    }

    .action-item.action-delete {
        color: #dc2626;
    }

        .action-item.action-delete:hover {
            background: #fef2f2;
        }

.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-box {
    background: #fff;
    border-radius: 10px;
    padding: 28px 32px;
    max-width: 380px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
}

.confirm-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #111;
}

.confirm-msg {
    font-size: .9rem;
    color: #6b7280;
    margin-bottom: 24px;
}

.confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-danger-confirm {
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 18px;
    font-size: .875rem;
    cursor: pointer;
}

    .btn-danger-confirm:hover {
        background: #b91c1c;
    }

/* ===== liability / receivable template table ===== */
.table-footer-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid #eef0ee;
}

.txn-table td.col-type,
.txn-table td.col-bank,
.txn-table td.col-group,
.txn-table td.col-head,
.txn-table td.col-employee {
    min-width: 120px;
    padding: 8px 10px;
}

.txn-table td.col-amount {
    min-width: 120px;
    padding: 8px 10px;
}

.txn-table td.col-amount input {
    text-align: right;
}

.btn-row-delete {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 14px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 5px;
    cursor: pointer;
    opacity: .7;
}

    .btn-row-delete:hover {
        background: #fef2f2;
        opacity: 1;
    }

.template-alert {
    border-radius: 9px;
    padding: 12px 16px;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.6;
}

.template-alert-success {
    background: #eef8f3;
    border: 1px solid #b7dfc8;
    color: #1f7a4d;
}

.template-alert-error {
    background: #fef2f2;
    border: 1px solid #f5c6c6;
    color: #c0392b;
}

.template-total-row {
    background: #f7f9f8;
    border-top: 2px solid #d6e3df;
}

.template-total-label {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #5c6660;
    text-align: right;
}

.template-total-value {
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 800;
    color: #15524a;
}

/* ── Bank Sheet ─────────────────────────────────────────────────────────── */
.bs-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
}

.bs-print-header {
    display: none;
}

.bs-table-card {
    padding: 0;
    overflow: hidden;
}

.bs-table-wrap {
    overflow-x: visible;
}

.bs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed;
}

.bs-table thead tr {
    background: #1a1a2e;
    color: #fff;
}

.bs-table th {
    padding: 7px 8px;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 2px solid #0d0d1e;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bs-th-seq  { width: 32px;  text-align: center; }
.bs-th-date { width: 90px; }
.bs-th-ref  { width: 76px; }
.bs-th-head { width: 14%; }
.bs-th-cat  { width: 12%; }
.bs-th-desc { width: auto; }
.bs-th-amt  { width: 130px; text-align: right; }
.bs-th-bal  { width: 108px; text-align: right; background: rgba(255,255,255,0.08); }

.bs-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.bs-table tbody tr:hover {
    background: #eef4fb;
}

.bs-table td {
    padding: 5px 8px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bs-td-seq   { text-align: center; color: #adb5bd; font-size: 11px; }
.bs-td-date  { color: #495057; }
.bs-td-ref   { font-family: monospace; font-size: 11px; color: #6c757d; }
.bs-td-head  { font-weight: 500; color: #212529; }
.bs-td-cat   { font-size: 11px; color: #6c757d; }
.bs-td-desc  { color: #6c757d; font-size: 11px; }
.bs-td-amt   { text-align: right; font-variant-numeric: tabular-nums; color: #c0392b; }
.bs-td-amt.bs-credit { color: #1a6e3c; }
.bs-td-bal   { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; background: #f0f7ff; color: #0d47a1; }
.bs-bal-neg  { color: #c0392b !important; }

.bs-row-opening td {
    background: #fffde7;
    border-top: 2px solid #f9a825;
    border-bottom: 2px solid #f9a825;
}

.bs-row-total td {
    background: #e8f4fd;
    border-top: 2px solid #1a6e3c;
    padding: 10px 12px;
}

.bs-td-empty {
    text-align: center;
    padding: 32px 12px;
    color: #adb5bd;
    font-style: italic;
}

@media (max-width: 900px) {
    .bs-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media print {
    .bs-print-header {
        display: block;
        text-align: center;
        margin-bottom: 16px;
    }
    .bs-print-title {
        font-size: 18px;
        font-weight: 700;
    }
    .bs-print-bank {
        font-size: 14px;
        font-weight: 600;
        margin-top: 4px;
    }
    .bs-print-acno,
    .bs-print-period {
        font-size: 12px;
        color: #555;
        margin-top: 2px;
    }
    .bs-table-wrap {
        overflow: visible;
    }
    .bs-table {
        font-size: 11px;
    }
    .bs-table th,
    .bs-table td {
        padding: 5px 8px;
    }
    .bs-kpi-grid {
        grid-template-columns: repeat(4, 1fr);
        break-inside: avoid;
    }
}

/*Dashboard*/

    /* ---------- content ---------- */
    .content { flex:1; min-width:0; max-width:1180px; margin:0 auto; padding:28px 26px 56px; }
    .page-head { display:flex; flex-wrap:wrap; align-items:flex-end; gap:14px; margin-bottom:18px; }
    .page-titles { flex:1; min-width:200px; }
    .page-h1 { margin:0; font-size:20px; font-weight:800; letter-spacing:-.01em; color:#15524a; }
    .page-sub { margin:3px 0 0; font-size:13px; color:#79827d; }
    .head-actions { display:flex; gap:9px; }
    .btn-ghost { height:40px; padding:0 16px; border-radius:9px; font-size:13.5px; font-weight:600; color:#15524a; background:#fff; border:1px solid #e2e5e2; display:inline-flex; align-items:center; gap:7px; cursor:pointer; }
    .btn-primary { height:40px; padding:0 16px; border-radius:9px; font-size:13.5px; font-weight:600; color:#fff; background:#15524a; border:1px solid #15524a; display:inline-flex; align-items:center; gap:7px; cursor:pointer; }

    .card { background:#fff; border:1px solid #e7eae8; border-radius:14px; box-shadow:0 1px 2px rgba(31,42,40,.03); }
    .section-title { font-size:13px; font-weight:800; color:#15524a; text-transform:uppercase; letter-spacing:.04em; }
    .section-rule { border-bottom:2px solid #15524a; margin:8px 0 2px; }

    /* filters */
    .filter-card { padding:18px; margin-bottom:16px; }
    .filter-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px 14px; align-items:end; }
    .field-label { display:block; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:#8a938e; margin-bottom:5px; }
    .input { height:42px; border-radius:9px; border-color:#d8dcd8; font-size:14px; }
    .field-actions { display:flex; gap:9px; }
    .btn-apply { height:42px; flex:1; padding:0 16px; border-radius:9px; font-size:13.5px; font-weight:600; color:#fff; background:#15524a; border:1px solid #15524a; white-space:nowrap; cursor:pointer; }
    .btn-reset { height:42px; padding:0 16px; border-radius:9px; font-size:13.5px; font-weight:600; color:#7a847f; background:#fff; border:1px solid #e2e5e2; white-space:nowrap; cursor:pointer; }

    .select2-container { width:100% !important; }
    .select2-container--bootstrap4 .select2-selection { border-color:#d8dcd8; min-height:42px; border-radius:9px; }
    .select2-container--bootstrap4 .select2-selection--multiple { min-height:42px; padding:3px 6px; display:flex; align-items:center; flex-wrap:wrap; }
    .select2-container--bootstrap4 .select2-search--inline .select2-search__field::placeholder { color:#8a938e; }
    .select2-container--bootstrap4.select2-container--focus .select2-selection { border-color:#15524a; box-shadow:0 0 0 3px rgba(21,82,74,.13); }
    .select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice { background:#eef4f2; border:1px solid #cfe0db; color:#15524a; border-radius:6px; }
    .select2-results__option--highlighted[aria-selected] { background-color:#15524a !important; }
    .form-select:focus, .form-control:focus { border-color:#15524a; box-shadow:0 0 0 3px rgba(21,82,74,.13); }

    /* scope strip */
    .scope-strip { display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px; margin-bottom:16px; }
    .chip { display:inline-flex; align-items:center; gap:6px; font-weight:600; font-size:12px; padding:5px 11px; border-radius:8px; }
    .chip-primary { background:#eef4f2; border:1px solid #cfe0db; color:#15524a; }
    .chip-muted { background:#f3f5f4; border:1px solid #e6e9e7; color:#5c6660; }
    .scope-note { font-size:12px; color:#9aa39e; margin-left:2px; }

    /* KPI */
    .kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(178px,1fr)); gap:14px; margin-bottom:16px; }
    .kpi { background:#fff; border:1px solid #e7eae8; border-radius:14px; padding:16px 18px; }
    .kpi.dark { background:#15524a; border-color:#15524a; }
    .kpi-label { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:#8a938e; }
    .kpi.dark .kpi-label { color:#9ec7bd; }
    .kpi-value { font-size:21px; font-weight:800; color:#1f2a28; margin-top:4px; font-variant-numeric:tabular-nums; }
    .kpi.dark .kpi-value { color:#fff; }
    .kpi-value.credit { color:#1f7a4d; }
    .kpi-value.debit { color:#c0392b; }
    .kpi-foot { display:flex; align-items:center; gap:6px; margin-top:7px; font-size:12px; font-weight:600; }
    .kpi-delta { display:inline-flex; align-items:center; gap:3px; font-weight:700; }
    .kpi-delta.up { color:#1f7a4d; }
    .kpi-delta.down { color:#c0392b; }
    .kpi.dark .kpi-delta.up { color:#8fe3b6; }
    .kpi-muted { color:#9aa39e; }
    .kpi.dark .kpi-muted { color:#9ec7bd; }

    /* layout split */
    .grid-2 { display:grid; grid-template-columns:1.55fr 1fr; gap:16px; margin-bottom:16px; align-items:start; }
    .pad { padding:22px 24px; }

    /* ---------- bar chart ---------- */
    .chart-head { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
    .chart-legend { display:flex; align-items:center; gap:16px; }
    .legend-item { display:flex; align-items:center; gap:7px; font-size:12px; font-weight:600; color:#5c6660; }
    .legend-dot { width:11px; height:11px; border-radius:3px; flex:none; }
    .legend-dot.income { background:#15524a; }
    .legend-dot.expense { background:#e0a23b; }
    .chart { display:flex; align-items:flex-end; gap:10px; height:230px; padding:18px 4px 0; border-bottom:1.5px solid #e7eae8; }
    .col { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; gap:8px; }
    .bars { display:flex; align-items:flex-end; justify-content:center; gap:4px; width:100%; height:100%; }
    .bar { width:42%; max-width:18px; border-radius:5px 5px 0 0; }
    .bar.income { background:#15524a; }
    .bar.expense { background:#e0a23b; }
    .bar:hover { filter:brightness(1.08); }
    .col-label { font-size:11px; font-weight:600; color:#8a938e; }
    .h-38 { height:38%; } .h-41 { height:41%; } .h-43 { height:43%; } .h-44 { height:44%; }
    .h-46 { height:46%; } .h-48 { height:48%; } .h-51 { height:51%; } .h-53 { height:53%; }
    .h-55 { height:55%; } .h-57 { height:57%; } .h-62 { height:62%; } .h-66 { height:66%; }
    .h-68 { height:68%; } .h-72 { height:72%; } .h-73 { height:73%; } .h-76 { height:76%; }
    .h-77 { height:77%; } .h-78 { height:78%; } .h-80 { height:80%; } .h-87 { height:87%; }
    .h-90 { height:90%; } .h-93 { height:93%; }

    /* cash / bank list */
    .stack { display:flex; flex-direction:column; gap:14px; margin-top:16px; }
    .bankrow { display:flex; align-items:center; gap:12px; }
    .bank-ic { width:34px; height:34px; border-radius:9px; background:#eef4f2; color:#15524a; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:12px; flex:none; }
    .bank-meta { flex:1; min-width:0; }
    .bank-name { font-size:13.5px; font-weight:700; color:#1f2a28; }
    .bank-acc { font-size:11.5px; color:#9aa39e; font-variant-numeric:tabular-nums; }
    .bank-amt { font-size:14px; font-weight:700; color:#1f2a28; font-variant-numeric:tabular-nums; }
    .bank-total { display:flex; align-items:center; justify-content:space-between; margin-top:16px; padding:13px 16px; background:#15524a; border-radius:10px; }
    .bank-total .t-l { font-size:13px; font-weight:800; color:#fff; text-transform:uppercase; letter-spacing:.03em; }
    .bank-total .t-r { font-size:15px; font-weight:800; color:#fff; font-variant-numeric:tabular-nums; }

    /* mini bar (receivable/payable) */
    .mini-rows { display:flex; flex-direction:column; gap:16px; margin-top:18px; }
    .mini-top { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:6px; }
    .mini-name { font-size:13px; font-weight:600; color:#3a443f; }
    .mini-val { font-size:13.5px; font-weight:700; color:#1f2a28; font-variant-numeric:tabular-nums; }
    .track { height:9px; background:#eef1f0; border-radius:6px; overflow:hidden; }
    .fill { height:100%; border-radius:6px; }
    .fill.green { background:#1f7a4d; }
    .fill.red { background:#c0392b; }
    .w-100 { width:100%; } .w-72 { width:72%; } .w-58 { width:58%; } .w-40 { width:40%; }

    /* forecast table */
    .table-card { overflow:hidden; }
    .table-wrap { overflow-x:auto; }
    table.fc { width:100%; border-collapse:collapse; min-width:680px; }
    table.fc thead tr { background:#f6f8f7; border-top:1px solid #eef0ee; border-bottom:1px solid #eef0ee; }
    table.fc th { padding:11px 22px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:#8a938e; text-align:right; white-space:nowrap; }
    table.fc th.l { text-align:left; }
    table.fc td { padding:14px 22px; font-size:13.5px; text-align:right; font-variant-numeric:tabular-nums; border-bottom:1px solid #f0f2f0; color:#3a443f; font-weight:600; }
    table.fc td.l { text-align:left; font-weight:700; color:#ffffff; }
    table.fc td.q { color:#15524a; }
    .pos { color:#1f7a4d; font-weight:700; }
    .neg { color:#c0392b; font-weight:700; }
    table.fc tfoot td { background:#15524a; color:#fff; font-weight:800; border:none; }
    .cur { font-size:12px; color:#9aa39e; }
    .qtag { display:inline-block; font-size:10.5px; font-weight:700; color:#15524a; background:#eef4f2; border:1px solid #cfe0db; border-radius:6px; padding:2px 7px; margin-left:8px; vertical-align:middle; }

    /* upcoming list */
    .up-list { display:flex; flex-direction:column; }
    .up-item { display:flex; align-items:center; gap:13px; padding:13px 0; border-bottom:1px solid #f0f2f0; }
    .up-item:last-child { border-bottom:none; }
    .up-dot { width:9px; height:9px; border-radius:50%; flex:none; }
    .up-dot.in { background:#1f7a4d; }
    .up-dot.out { background:#c0392b; }
    .up-meta { flex:1; min-width:0; }
    .up-name { font-size:13.5px; font-weight:700; color:#1f2a28; }
    .up-sub { font-size:11.5px; color:#9aa39e; }
    .up-amt { font-size:13.5px; font-weight:700; font-variant-numeric:tabular-nums; }
    .up-amt.in { color:#1f7a4d; }
    .up-amt.out { color:#c0392b; }

    .mb16 { margin-bottom:16px; }

    /* dashboard filter */
    .dash-filter-card { padding:18px; margin-bottom:16px; }
    .dash-filter-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px 14px; align-items:end; }
    .dash-filter-actions { display:flex; flex-direction:column; }
    .dash-quick-btns { display:flex; flex-wrap:wrap; gap:6px;     width: 700px;}
    .btn-qperiod { height:30px; padding:0 12px; border-radius:7px; font-size:12px; font-weight:700; color:#15524a; background:#eef4f2; border:1px solid #cfe0db; white-space:nowrap; cursor:pointer; }
    .btn-qperiod:hover { background:#dff0e8; }
    .btn-qperiod.active { background:#15524a; color:#fff; border-color:#15524a; }
    .btn-reset { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; }

    /* KPI rows */
    .kpi-row-label { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:#9aa39e; margin-bottom:8px; }
    .kpi-grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-bottom:16px; }
    .kpi-grid-5 { display:grid; grid-template-columns:repeat(5,1fr); gap:14px; margin-bottom:16px; }
    .kpi-loss { background:#fff3f3; border-color:#f5c6c6; }
    .kpi-loss .kpi-label { color:#c0392b; }
    .kpi-loss .kpi-value { color:#c0392b; }
    .kpi-desc { font-size:11px; color:#b0b8b3; margin-top:5px; }
    .text-credit { color:#1f7a4d; }
    .text-debit { color:#c0392b; }
    .text-danger { color:#c0392b; }

    /* pie charts */
    .pie-wrap { display:flex; align-items:center; gap:24px; margin-top:16px; flex-wrap:wrap; }
    .pie-legend { display:flex; flex-direction:column; gap:10px; flex:1; min-width:120px; }
    .pie-leg-item { display:flex; align-items:center; gap:8px; font-size:12.5px; color:#3a443f; }
    .pie-leg-item span:nth-child(2) { flex:1; }
    .pie-leg-item strong { font-variant-numeric:tabular-nums; color:#1f2a28; white-space:nowrap; }
    .pie-dot { width:11px; height:11px; border-radius:3px; flex:none; }
    .pie-net { border-top:1px solid #eef0ee; padding-top:8px; margin-top:2px; }

    /* forecast badges */
    .fc-row-current { background:#f0faf5; }
    /*.fc-tag-col { text-align:left !important; }*/
    .fc-badge { display:inline-block; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; padding:2px 7px; border-radius:5px; }
    .act-badge { background:#eef4f2; color:#15524a; }
    .cur-badge { background:#d4ede0; color:#0e4036; }
    .fct-badge { background:#f3f5f4; color:#79827d; }

    /* upcoming scrollable tables */
    .upcoming-scroll { max-height:280px; overflow-y:auto; margin-top:10px; padding-right:4px; }
    .upcoming-scroll::-webkit-scrollbar { width:4px; }
    .upcoming-scroll::-webkit-scrollbar-track { background:#f3f5f4; border-radius:4px; }
    .upcoming-scroll::-webkit-scrollbar-thumb { background:#cfd8d4; border-radius:4px; }
    .up-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 0; border-bottom:1px solid #f0f2f0; }
    .up-row:last-child { border-bottom:none; }
    .up-row-left { display:flex; align-items:center; gap:10px; flex:1; min-width:0; }
    .up-row-right { text-align:right; flex:none; }
    .up-dot-in { width:8px; height:8px; border-radius:50%; background:#1f7a4d; flex:none; }
    .up-dot-out { width:8px; height:8px; border-radius:50%; background:#c0392b; flex:none; }
    .up-row-info { min-width:0; }
    .up-row-name { font-size:13px; font-weight:700; color:#1f2a28; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .up-row-sub { font-size:11px; color:#9aa39e; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .up-row-amt { font-size:13px; font-weight:700; font-variant-numeric:tabular-nums; white-space:nowrap; }
    .up-row-amt.in { color:#1f7a4d; }
    .up-row-amt.out { color:#c0392b; }
    .up-row-paid { font-size:11px; color:#b0b8b3; font-variant-numeric:tabular-nums; white-space:nowrap; }
    .empty-hint { padding:28px 0; text-align:center; font-size:13px; color:#b0b8b3; }

    .empty-congrats { padding:28px 12px; text-align:center; }
    .empty-congrats .congrats-emoji { font-size:34px; line-height:1; display:block; margin-bottom:10px; }
    .empty-congrats .congrats-title { font-size:15px; font-weight:700; color:#2e7d69; margin-bottom:4px; }
    .empty-congrats .congrats-sub { font-size:12.5px; color:#8a938d; }

    @media (max-width:980px) {
        .grid-2 { grid-template-columns:1fr; }
        .kpi-grid-3 { grid-template-columns:1fr; }
        .kpi-grid-5 { grid-template-columns:repeat(2,1fr); }
    }

/* ===== logout button ===== */
.sb-logout-btn {
    background: none;
    border: none;
    color: #9ec7bd;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    margin-left: auto;
}
.sb-logout-btn:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
}

/* ===== login page ===== */
.login-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1f2a28;
    font-family: 'Manrope', -apple-system, system-ui, sans-serif;
}
.login-wrap {
    width: 100%;
    max-width: 420px;
    padding: 24px;
}
.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
}
.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}
.login-brand-text .sb-brand-name {
    font-size: 17px;
    font-weight: 700;
    color: #1f2a28;
}
.login-brand-text .sb-brand-sub {
    font-size: 12px;
    color: #7a9791;
}
.login-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 18px;
}
.login-field {
    margin-bottom: 18px;
}
.login-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374240;
    margin-bottom: 6px;
}
.login-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1dbd8;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #1f2a28;
    background: #f9fafa;
    outline: none;
    transition: border-color .15s;
}
.login-input:focus {
    border-color: #2d6a60;
    background: #fff;
}
.login-btn {
    width: 100%;
    padding: 11px;
    background: #2d6a60;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    margin-top: 6px;
    transition: background .15s;
}
.login-btn:hover {
    background: #255a51;
}

/*Select 2*/
.select2-container--bootstrap4 .select2-selection--multiple .select2-selection__choice__remove
{
    border:#bdc6d0;
}
