/* =====================================================================
   GAINS — masters-forms.css
   Shared, global styles for all Masters forms (Group, Ledger, Login and
   their edit modals). Consolidates the duplicated "mu-" (grid/page) and
   "uf-" (modal/edit-form) rule sets that used to be repeated inside each
   component's own .razor.css scoped stylesheet.

   Loaded once, globally, from Components/App.razor — every Masters page
   still applies these classes; they no longer need to redefine them.
   ===================================================================== */

/* ── Common font for every Masters form ── */
.mu-page,
.uf-overlay,
.le-inline {
    font-family: Arial;
}

/* =====================================================================
   "mu-" system — used by MGroup, MLedger, MLogin (grid pages)
   ===================================================================== */

.mu-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Clickable grid row — shared/global so ANY page can use it just by adding
   class="mu-row-click" to a row. Gives a pointer cursor everywhere, plus a
   self-contained hover highlight for use outside a .mu-table. Inside a
   .mu-table, the table's own tr:hover rule provides the visible highlight. */
.mu-row-click {
    cursor: pointer;
    transition: background 0.12s;
}

    .mu-row-click:hover {
        background: #f3fcf9;
    }

/* ── Page header (title + info line, shared look across all Masters pages) ── */
.mu-hdr {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.mu-title {
    font-size: 22px;
    font-weight: 100;
    color: #0f9d8a;
    margin: 0;
}

.mu-sub {
    font-size: 13px;
    color: #64748b;
    margin: 4px 0 0;
}

.mu-hdr-actions {
    display: flex;
    gap: 8px;
}

/* ── Shared button sizing — every Masters action button (mu-/uf-/le-)
   uses this same size/shape; only background/border/color vary per variant. ── */
.mu-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: 6px;
    border: 1px solid #dde3ed;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: #1a2537;
    font-family: inherit;
    letter-spacing: 0.04em;
    transition: background 0.15s, box-shadow 0.15s;
    white-space: nowrap;
    user-select: none;
    flex-shrink: 0;
}

    .mu-btn:hover {
        background: #f1f5f9;
    }

    .mu-btn i {
        font-size: 14px;
    }

    .mu-btn.primary {
        background: #1a56a7;
        color: #fff;
        border-color: #1a56a7;
    }

        .mu-btn.primary:hover {
            background: #0f3d82;
        }

    .mu-btn.info {
        background: #1976d2;
        color: #fff;
        border-color: #1976d2;
    }

        .mu-btn.info:hover {
            background: #145ea8;
        }

    .mu-btn.success {
        background: #1ab394;
        color: #fff;
        border-color: #1ab394;
    }

        .mu-btn.success:hover {
            background: #159a80;
        }

/* ── Mobile: header action buttons (New / Filter) show icon only, stay right-aligned ── */
@media (max-width: 640px) {
    .mu-hdr-actions {
        margin-left: auto;
    }

        .mu-hdr-actions .mu-btn-label {
            display: none;
        }

        .mu-hdr-actions .mu-btn {
            padding: 8px 10px;
            gap: 0;
        }
}

/* ── Card ── */
.mu-card {
    position: relative;
    min-height: 260px;
    background: #fff;
    border: 1px solid #dde3ed;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden;
}

/* ── Toolbar ── */
.mu-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #eef2f7;
}

.mu-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 1 320px;
}

    .mu-search i {
        position: absolute;
        left: 11px;
        color: #94a3b8;
        font-size: 16px;
        pointer-events: none;
    }

    .mu-search input {
        width: 100%;
        padding: 8px 12px 8px 34px;
        border: 1px solid #dde3ed;
        border-radius: 8px;
        font-size: 13px;
        color: #1a2537;
        font-family: inherit;
        outline: none;
        transition: border-color 0.12s, box-shadow 0.12s;
    }

        .mu-search input:focus {
            border-color: #1a56a7;
            box-shadow: 0 0 0 3px rgba(26,86,167,0.12);
        }

.mu-count {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}

/* ── Table ── */
/* Fixed height (not max-height) so the scroll area stays the same size no
   matter how many rows a search/filter leaves. This keeps the pagination
   footer anchored in place instead of riding up when results shrink. */
.mu-table-wrap {
    height: 540px;
    overflow: auto;
}

/* Themed scrollbars (teal accent, matches the app) */
.mu-table-wrap {
    scrollbar-width: thin;
    scrollbar-color: #b6e8db transparent;
}

    .mu-table-wrap::-webkit-scrollbar {
        width: 10px;
        height: 10px;
    }

    .mu-table-wrap::-webkit-scrollbar-track {
        background: transparent;
    }

    .mu-table-wrap::-webkit-scrollbar-thumb {
        background: #b6e8db;
        border-radius: 8px;
        border: 2px solid transparent;
        background-clip: content-box;
    }

        .mu-table-wrap::-webkit-scrollbar-thumb:hover {
            background: #1ab99a;
            background-clip: content-box;
        }

    .mu-table-wrap::-webkit-scrollbar-corner {
        background: transparent;
    }

.mu-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .mu-table thead th {
        position: sticky;
        top: 0;
        z-index: 1;
        background: #4b5563;
        color: #fff;
        text-align: left;
        font-weight: 600;
        font-size: 12.5px;
        padding: 12px 14px;
        white-space: nowrap;
        border-bottom: 1px solid #3f4754;
    }
/* Transaction pages override the master header color centrally here.
   Add ".t-page" to the root wrapper div of every transaction form
   (alongside its existing page-specific class) — no CSS edits needed
   for new pages going forward.
   Also covers page-specific table classes that don't reuse .mu-table:
   .tb2-table (GAINS_TB), .db-table (Daybook). */
.t-page .mu-table thead th,
.t-page .tb2-table thead th,
.t-page .db-table th {
    background: #306B9C;
    color: #fff;
}

.mu-th-idx {
    width: 56px;
}

.mu-th-sort {
    cursor: pointer;
    user-select: none;
}

    .mu-th-sort:hover {
        background: #3f4754;
    }

    .mu-th-sort i {
        font-size: 14px;
        margin-left: 6px;
        opacity: 0.75;
        vertical-align: -2px;
    }

    .mu-th-sort span {
        vertical-align: middle;
    }

.mu-table tbody td {
    padding: 10px 14px;
    color: #1a2537;
    border-bottom: 1px solid #eef2f7;
    white-space: nowrap;
}

.mu-table tbody tr:nth-child(even) td {
    background: #f7f9fc;
}

.mu-table tbody tr:hover td {
    background: #eef4fb;
}

.mu-idx {
    color: #1a56a7;
    font-weight: 600;
}

.mu-empty {
    text-align: center;
    color: #94a3b8;
    padding: 28px 0;
    font-size: 13px;
}

/* ── Class badge (isPLBS): round letter chip ── */
.mu-plbs {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}
/* Blue: Assets (A), Income (I) */
.mu-plbs-blue {
    background: #dbeafe;
    color: #1a56a7;
}
/* Maroon: Liability (L), Expense (E) */
.mu-plbs-maroon {
    background: #f5d9dd;
    color: #8b1e3f;
}

/* ── Footer / pagination ── */
.mu-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid #eef2f7;
    background: #fbfcfe;
    flex-wrap: wrap;
}

.mu-foot-info {
    font-size: 12.5px;
    color: #64748b;
}

.mu-pager {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.mu-pagesize-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.mu-pagesize {
    appearance: none;
    -webkit-appearance: none;
    padding: 7px 30px 7px 12px;
    border: 1px solid #dde3ed;
    border-radius: 8px;
    font-size: 12.5px;
    color: #1a2537;
    font-family: inherit;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.12s, box-shadow 0.12s;
}

    .mu-pagesize:hover {
        border-color: #c3ccdb;
    }

    .mu-pagesize:focus {
        outline: none;
        border-color: #1a56a7;
        box-shadow: 0 0 0 3px rgba(26,86,167,0.12);
    }

.mu-pagesize-caret {
    position: absolute;
    right: 10px;
    width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #94a3b8;
    pointer-events: none;
}

.mu-pages {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.mu-nav, .mu-pagenum {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    border: 1px solid #dde3ed;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

    .mu-nav i {
        font-size: 14px;
    }

    .mu-nav:hover:not(:disabled), .mu-pagenum:hover {
        background: #eef4fb;
        border-color: #c3d4ec;
        color: #1a56a7;
    }

    .mu-nav:disabled {
        color: #cbd5e1;
        background: #f7f9fc;
        cursor: not-allowed;
    }

    .mu-pagenum.active {
        background: #1a56a7;
        border-color: #1a56a7;
        color: #fff;
        box-shadow: 0 1px 3px rgba(26,86,167,0.35);
    }

        .mu-pagenum.active:hover {
            background: #1a56a7;
            color: #fff;
        }

.mu-ellipsis {
    padding: 0 4px;
    color: #94a3b8;
    font-size: 13px;
    user-select: none;
}

/* ── Filter bar (inline, above the grid) — reusable on any Masters page ── */
.mu-filter {
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f7;
    background: #fbfcff;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mu-alpha {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

    .mu-alpha button {
        min-width: 25px;
        height: 25px;
        padding: 0 5px;
        border: 1px solid #dde3ed;
        background: #fff;
        border-radius: 5px;
        font-size: 11.5px;
        font-family: inherit;
        color: #334155;
        cursor: pointer;
        transition: background 0.12s, color 0.12s, border-color 0.12s;
    }

        .mu-alpha button:hover {
            background: #eef4fb;
            border-color: #c3d4ec;
            color: #1a56a7;
        }

        .mu-alpha button.active {
            background: #1a56a7;
            border-color: #1a56a7;
            color: #fff;
        }

.mu-filter-grid {
    display: grid;
    grid-template-columns: auto minmax(160px, 1fr) auto minmax(160px, 1fr);
    gap: 10px 14px;
    align-items: center;
}

    .mu-filter-grid > label {
        font-size: 12px;
        font-weight: 600;
        color: #475569;
        white-space: nowrap;
    }

    .mu-filter-grid input,
    .mu-filter-grid select {
        width: 100%;
        padding: 7px 9px;
        border: 1px solid #dde3ed;
        border-radius: 6px;
        font-size: 12.5px;
        font-family: inherit;
        color: #1a2537;
        background: #fff;
        outline: none;
        transition: border-color 0.12s, box-shadow 0.12s;
    }

        .mu-filter-grid input:focus,
        .mu-filter-grid select:focus {
            border-color: #1a56a7;
            box-shadow: 0 0 0 3px rgba(26,86,167,0.12);
        }

.mu-filter-pair {
    display: flex;
    gap: 8px;
}

    .mu-filter-pair .mu-ob-op {
        flex: 0 0 72px;
    }

.mu-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

@media (max-width: 900px) {
    .mu-filter-grid {
        grid-template-columns: auto 1fr;
    }
}

/* ── Filter drawer (right side) — reusable on any Masters page ── */
.mu-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1190;
    background: transparent;
}

.mu-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1200;
    width: 320px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    box-shadow: -8px 0 30px rgba(15, 23, 42, 0.22);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1);
}

    .mu-drawer.open {
        transform: translateX(0);
    }

.mu-drawer-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #eef2f7;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: #1a2537;
}

.mu-drawer-x {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

    .mu-drawer-x:hover {
        opacity: 0.8;
    }

.mu-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #fff;
}

.mu-fld {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .mu-fld > label {
        font-size: 12px;
        font-weight: 600;
        color: #1a2537;
    }

    .mu-fld input, .mu-fld select {
        width: 100%;
        padding: 8px 10px;
        border: 1px solid #dde3ed;
        border-radius: 6px;
        font-size: 13px;
        font-family: inherit;
        color: #1a2537;
        background: #fff;
        outline: none;
        transition: border-color 0.12s, box-shadow 0.12s;
    }

        .mu-fld input:focus, .mu-fld select:focus {
            border-color: #1a56a7;
            box-shadow: 0 0 0 3px rgba(26,86,167,0.12);
        }

.mu-drawer-foot {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 18px;
    border-top: 1px solid #eef2f7;
    background: #fff;
}

    .mu-drawer-foot .mu-btn {
        flex: 1;
        justify-content: center;
    }

/* ── Toast (save confirmation) ── */
.mu-toast {
    position: fixed;
    right: 28px;
    top: 28px;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 320px;
    max-width: 420px;
    padding: 18px 18px 18px 20px;
    border-radius: 14px;
    background: #ffffff;
    color: #0f3d36;
    border: 1px solid #cdeee4;
    border-left: 5px solid #1ab99a;
    box-shadow: 0 16px 40px rgba(15, 118, 110, 0.22);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    animation: mu-toast-in 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}

    .mu-toast i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
        color: #fff;
        background: #1ab99a;
        border-radius: 50%;
        font-size: 15px;
        box-shadow: 0 2px 6px rgba(26, 185, 154, 0.45);
    }
/* Error variant — red accent + icon */
.mu-toast-err {
    border-left-color: #e11d48;
    color: #7f1d1d;
}

    .mu-toast-err i {
        background: #e11d48;
        box-shadow: 0 2px 6px rgba(225, 29, 72, 0.45);
    }

.mu-toast span {
    flex: 1;
}

.mu-toast-x {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    margin-left: 4px;
}

    .mu-toast-x:hover {
        color: #475569;
    }

@keyframes mu-toast-in {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Delete action (also used by Ledger's .le-del) ── */
.mu-th-act {
    width: 48px;
}

.mu-act-cell {
    text-align: center;
}

.mu-del, .le-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1px solid #f3d0d6;
    background: #fff;
    color: #dc2626;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}

    .mu-del i, .le-del i {
        font-size: 14px;
    }

    .mu-del:hover, .le-del:hover {
        background: #fee2e2;
        border-color: #f1aab2;
    }

/* ── Status/flag icons: shared sizing across all Masters pages ── */
.mu-check, .mu-cross, .le-chk-ok, .le-chk-no {
    font-size: 16px;
    vertical-align: -3px;
}

.mu-check, .le-chk-ok {
    color: #16a34a;
}

/* ── Delete confirmation dialog (also used by Ledger's .le-cfm-*) ── */
.mu-confirm-overlay, .le-cfm-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.mu-confirm, .le-cfm {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 16px;
    padding: 26px 24px 20px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    text-align: center;
    animation: mu-confirm-in 0.2s ease-out;
}

.mu-confirm-icon, .le-cfm-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    color: #dc2626;
}

    .mu-confirm-icon i, .le-cfm-icon i {
        font-size: 26px;
    }

.mu-confirm-title, .le-cfm-title {
    font-size: 17px;
    font-weight: 650;
    color: #1a2537;
    margin-bottom: 6px;
}

.mu-confirm-text, .le-cfm-text {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 22px;
}

    .mu-confirm-text strong, .le-cfm-text strong {
        color: #1a2537;
    }

.mu-confirm-actions, .le-cfm-actions {
    display: flex;
    gap: 10px;
}

    .mu-confirm-actions button, .le-cfm-actions button {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        padding: 7px 13px;
        border-radius: 6px;
        font-size: 13px;
        font-weight: 700;
        font-family: inherit;
        cursor: pointer;
        letter-spacing: 0.04em;
        white-space: nowrap;
        user-select: none;
        transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
    }

        .mu-confirm-actions button i, .le-cfm-actions button i {
            font-size: 14px;
        }

.mu-confirm-cancel, .le-cfm-cancel {
    background: #fff;
    color: #334155;
    border: 1px solid #dde3ed;
}

    .mu-confirm-cancel:hover, .le-cfm-cancel:hover {
        background: #f1f5f9;
    }

.mu-confirm-del, .le-cfm-del {
    background: #dc2626;
    color: #fff;
    border: 1px solid #dc2626;
}

    .mu-confirm-del:hover, .le-cfm-del:hover {
        background: #b91c1c;
    }

    .mu-confirm-del:disabled {
        opacity: 0.65;
        cursor: default;
    }

@keyframes mu-confirm-in {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(6px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* =====================================================================
   "uf-" system — used by MGroupEdit, MLoginEdit (modal edit forms)
   ===================================================================== */

.uf-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 16px;
    overflow-y: auto;
}

.uf-modal {
    width: 100%;
    max-width: 780px;
    background: #ffffff;
    border: 1px solid #e7ebf2;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header — light green gradient (matches the section headers) */
.uf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background: linear-gradient(90deg, #f3fcf9 0%, #d6f2ea 100%);
    border-bottom: 1px solid #cdeee4;
    position: relative;
    overflow: hidden;
}

    .uf-header::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: #1ab99a;
    }

.uf-title {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    position: relative;
    z-index: 1;
}

    .uf-title > span:first-child {
        font-size: 16px;
        font-weight: 650;
        color: #0f766e;
        letter-spacing: 0.2px;
    }

.uf-title-sub {
    font-size: 11.5px;
    color: #5b8a82;
    margin-top: 3px;
}

.uf-close {
    background: rgba(15, 118, 110, 0.08);
    border: none;
    color: #0f766e;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s;
}

    .uf-close:hover {
        background: rgba(15, 118, 110, 0.16);
    }

    .uf-close i {
        font-size: 16px;
    }

/* Body */
.uf-body {
    padding: 20px 22px;
    max-height: calc(100vh - 230px);
    overflow-y: auto;
}

.uf-field {
    display: grid;
    grid-template-columns: 112px 1fr;
    align-items: start;
    gap: 10px;
}

    .uf-field > label {
        font-size: 12.5px;
        color: #475569;
        font-weight: 500;
        padding-top: 8px;
    }
/* Note: margin-bottom on .uf-field (and any :last-child reset) differs
   slightly per form, so it's set locally in each page's own stylesheet. */
.uf-req {
    color: #e11d48;
    margin-left: 2px;
}

.uf-input {
    width: 100%;
    padding: 8px 11px;
    border: 1px solid #dde3ec;
    border-radius: 8px;
    font-size: 13px;
    color: #1e293b;
    font-family: inherit;
    background: #fff;
    outline: none;
    transition: border-color 0.12s, box-shadow 0.12s;
}

    .uf-input::placeholder {
        color: #aab4c2;
    }

    .uf-input:focus {
        border-color: #1ab99a;
        box-shadow: 0 0 0 3px rgba(26, 185, 154, 0.16);
    }

.uf-invalid {
    border-color: #e11d48 !important;
    background: #fff5f6;
}

.uf-err {
    color: #e11d48;
    font-size: 11px;
    margin-top: 4px;
}

/* Section header — subtle strip */
.uf-section {
    /* margin-top differs per form — set locally in each page's stylesheet */
    padding: 9px 14px;
    background: linear-gradient(90deg, #f3fcf9 0%, #d6f2ea 100%);
    color: #0f766e;
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: 0.8px;
    border: 1px solid #cdeee4;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
}

.uf-sec-body {
    border: 1px solid #e9edf5;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 16px 14px;
    background: #fcfdfe;
}

.uf-form-error {
    margin-top: 16px;
    padding: 10px 13px;
    border-radius: 9px;
    background: #fff5f6;
    border: 1px solid #f7cdd4;
    color: #be123c;
    font-size: 12.5px;
}

/* Footer */
.uf-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 15px 22px;
    border-top: 1px solid #eef1f6;
    background: #fafbfd;
}

.uf-footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.uf-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.04em;
    white-space: nowrap;
    user-select: none;
    flex-shrink: 0;
    transition: background 0.15s, box-shadow 0.15s, border-color 0.15s, color 0.15s;
}

    .uf-btn i, .le-btn i {
        font-size: 14px;
    }

.uf-btn-save {
    background: #15803d;
    border-color: #15803d;
    color: #fff;
    box-shadow: 0 1px 3px rgba(21, 128, 61, 0.35);
}

    .uf-btn-save:hover {
        background: #116630;
    }

    .uf-btn-save:disabled {
        opacity: 0.65;
        cursor: default;
    }

/* ── Password field eye-toggle (uf- edit modals) — reusable on any Masters edit form ── */
.uf-pwd {
    position: relative;
    display: block;
}

    .uf-pwd .uf-input {
        padding-right: 38px;
    }

.uf-eye {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #6b7280;
}

    .uf-eye i {
        font-size: 16px;
    }

    .uf-eye:hover {
        color: #1ab99a;
    }

/* ── Checkbox inputs (uf- and le- forms) — shared sizing/accent so any
   future form's checkboxes look consistent without redefining this ── */
.uf-check input, .le-chk input {
    width: 15px;
    height: 15px;
    accent-color: #1ab99a;
    cursor: pointer;
}

/* ── Secondary button variants (uf- edit-modal footers) — reusable on any
   Masters edit form that needs a plain/"ghost", "new", or "delete" action
   button alongside the primary Save button ── */
.uf-btn-ghost {
    padding: 7px 15px;
    border: 1px solid #dde3ec;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: 12.5px;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}

    .uf-btn-ghost:hover {
        background: #f6f8fb;
        border-color: #c7d0dd;
    }

.uf-btn-new {
    background: #fff;
    color: #475569;
    border-color: #dde3ec;
}

    .uf-btn-new:hover {
        background: #f1f5f9;
    }

.uf-btn-del {
    background: #fff;
    color: #e11d48;
    border-color: #f3d0d6;
}

    .uf-btn-del:hover {
        background: #fff5f6;
    }











/* =====================================================================
   GAINS — common-page-chrome.css
   Shared styles for: page GAINS-toggle button, page header/title block,
   page footer, and the Filters button.

   USAGE:
   Add this file's link tag to App.razor,
   e.g. <link rel="stylesheet" href="css/common-page-chrome.css" />

   Every page (BSPL, GainsLanding, and any future migrated page) then
   just needs to reuse these exact class names in its markup — no need
   to redefine them per-page in that page's own .razor.css.

   Class names deliberately kept as "bspl-*" so existing pages (BSPL)
   need zero markup changes; new pages should simply adopt the same
   class names shown in the HTML SKELETON section at the bottom.
   ===================================================================== */


/* ══════════════════════════════════════════════════════
   PAGE GAINS-TOGGLE BUTTON
   (Green pill, hamburger + "GAINS". Hidden while the sidebar is
   expanded — the sidebar's own toggle handles that. Appears once the
   sidebar collapses, so there's still a way to reopen it from any page.)
   ══════════════════════════════════════════════════════ */
.bspl-gains-toggle,
.gl-gains-toggle {
    display: none;
    align-items: center;
    gap: 7px;
    background: #1ab99a;
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
    letter-spacing: 0.04em;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 6px rgba(26,185,154,0.3);
    flex-shrink: 0;
}

    .bspl-gains-toggle:hover,
    .gl-gains-toggle:hover {
        background: #0e9e83;
    }

    .bspl-gains-toggle i,
    .gl-gains-toggle i {
        font-size: 15px;
    }

.gains-shell.sb-collapsed .bspl-gains-toggle,
.gains-shell.sb-collapsed .gl-gains-toggle {
    display: flex;
}

/* Wrapper that sits the toggle button beside the page title */
.bspl-title-left,
.gl-site-strip-left-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
}


/* ══════════════════════════════════════════════════════
   PAGE HEADER / TITLE BLOCK
   ══════════════════════════════════════════════════════ */
.bspl-title-block {
    flex-shrink: 0;
    padding: 14px 16px 8px;
    background: #fff;
    border-bottom: 1px solid #e7eaec;
}

.bspl-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.bspl-title-block h1 {
    margin: 0 0 2px 0;
    font-size: 22px;
    font-weight: 100;
    color: #1ab394;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.bspl-title-block .bspl-subtitle {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

.bspl-title-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

@media (max-width: 767px) {
    .bspl-title-actions {
        gap: 4px;
    }
}


/* ══════════════════════════════════════════════════════
   FILTERS BUTTON
   ══════════════════════════════════════════════════════ */
.bspl-filter-toggle {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    background: #1ab99a;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
}

    .bspl-filter-toggle:hover {
        background: #1467a0;
    }

    .bspl-filter-toggle.has-filter {
        background: #d9534f;
    }


/* ══════════════════════════════════════════════════════
   PAGE FOOTER
   ══════════════════════════════════════════════════════ */
.bspl-footer,
.gl-footer {
    flex-shrink: 0;
    margin-top: auto;
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: #f5f5f5;
    border-top: 1px solid #e7eaec;
    gap: 10px;
}

.gl-footer {
    justify-content: flex-end;
    font-size: 11px;
    color: #999;
}

.bspl-footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bspl-footer-right {
    margin-left: auto;
    font-size: 11px;
    color: #999;
}

.bspl-foot-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
}

    .bspl-foot-btn.pdf {
        color: #c0392b;
    }

    .bspl-foot-btn.xls {
        color: #1e8449;
    }

    .bspl-foot-btn.doc {
        color: #2980b9;
    }

    .bspl-foot-btn.pdf2 {
        color: #c0392b;
    }


/* ══════════════════════════════════════════════════════
   MOBILE RESPONSIVE (≤ 767px)
   Applies to toggle, title, and filter button together
   ══════════════════════════════════════════════════════ */
@media (max-width: 767px) {

    .bspl-title-block h1 {
        font-size: 16px;
    }

    .bspl-subtitle {
        font-size: 11px;
    }

    .bspl-toggle-label,
    .gl-toggle-label {
        display: none;
    }

    .bspl-gains-toggle,
    .gl-gains-toggle {
        padding: 8px 10px;
    }

    .bspl-filter-label {
        display: none;
    }

    .bspl-filter-toggle {
        padding: 0;
        width: 32px;
        height: 32px;
        justify-content: center;
        gap: 0;
        border-radius: 6px;
        flex: 0 0 auto;
    }

        .bspl-filter-toggle i {
            font-size: 16px;
        }

    .bspl-footer,
    .gl-footer {
        padding: 0 10px;
    }

    .bspl-foot-btn {
        font-size: 17px;
    }
}


/* ══════════════════════════════════════════════════════
   HTML SKELETON — copy this structure into any new page,
   inside its own component markup (adjust bindings as needed)
   ══════════════════════════════════════════════════════

<div class="bspl-title-block">
    <div class="bspl-title-row">
        <div class="bspl-title-left">
            <button class="bspl-gains-toggle" onclick="gainsToggleSidebar()" aria-label="Toggle sidebar" title="Toggle menu">
                <i class="fa-solid fa-bars"></i><span class="bspl-toggle-label"> GAINS</span>
            </button>
            <div>
                <h1>@PageTitle</h1>
                <span class="bspl-subtitle">@SubtitleLabel</span>
            </div>
        </div>
        <div class="bspl-title-actions">
            <button class="bspl-filter-toggle @(SidebarOpen ? "has-filter" : "")" @onclick="ToggleSidebar">
                <i class="fa-solid fa-filter"></i><span class="bspl-filter-label"> FILTERS</span>
            </button>
        </div>
    </div>
</div>

... page content (make this flex:1; overflow-y:auto so only it scrolls) ...

<div class="bspl-footer">
    <div class="bspl-footer-left">
        <button class="bspl-foot-btn xls" title="Excel" @onclick="..."><i class="fa-solid fa-file-excel"></i></button>
        <button class="bspl-foot-btn pdf" title="PDF" @onclick="..."><i class="fa-solid fa-file-pdf"></i></button>
    </div>
    <div class="bspl-footer-right">
        <span>Last updated at ...</span>
    </div>
</div>

   NOTE: the parent page container needs:
     display: flex; flex-direction: column; height: 100%;
   so the header/footer stay pinned and only the middle content scrolls.
   ═══════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════════
   GlobalDatepicker (shared) — used via <GlobalDatepicker @bind-Value="..." />
   on QG, QLedger, and any other page needing the boxed calendar-icon +
   "d/MMM/yyyy" date field. Defined once here so every page matches;
   the component itself carries no scoped CSS.
   ═══════════════════════════════════════════════════════════════════ */
.gdp-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #dde3ed;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: #1a2537;
    user-select: none;
    box-sizing: border-box;
    transition: border-color 0.12s, box-shadow 0.12s;
}

    .gdp-wrap:hover {
        border-color: #1a56a7;
    }

.gdp-icon {
    color: #1a56a7;
    font-size: 14px;
    display: inline-flex;
}

.gdp-value {
    font-weight: 500;
}

.gdp-overlay {
    position: fixed;
    inset: 0;
    z-index: 1400;
    background: transparent;
}

.gdp-popup {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 1401;
    width: 240px;
    background: #fff;
    border: 1px solid #dde3ed;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
    padding: 10px;
    cursor: default;
}

.gdp-popup-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12.5px;
    font-weight: 700;
    color: #1a2537;
}

.gdp-nav {
    background: none;
    border: none;
    color: #64748b;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
}

    .gdp-nav:hover {
        background: #f1f5f9;
        color: #1a2537;
    }

    .gdp-nav:disabled {
        color: #d0d5dd;
        cursor: not-allowed;
        background: none;
    }

.gdp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 4px;
}

.gdp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.gdp-day {
    background: none;
    border: none;
    border-radius: 4px;
    padding: 6px 0;
    font-size: 12.5px;
    color: #1a2537;
    cursor: pointer;
    text-align: center;
}

    .gdp-day:hover {
        background: #f1f5f9;
    }

.gdp-day-muted {
    color: #cbd5e1;
}

.gdp-day-today {
    font-weight: 700;
    color: #1a56a7;
}

.gdp-day-selected,
.gdp-day-selected:hover {
    background: #1a56a7;
    color: #fff;
    font-weight: 600;
}

.gdp-day-disabled,
.gdp-day-disabled:hover {
    color: #d0d5dd;
    cursor: not-allowed;
    background: none;
}

.gdp-popup-foot {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eef2f7;
    text-align: center;
}

.gdp-today-btn {
    background: none;
    border: none;
    color: #1a56a7;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
}

    .gdp-today-btn:hover {
        text-decoration: underline;
    }

.gdp-field-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

    .gdp-field-row .gdp-field-block {
        flex: 1;
        min-width: 0;
    }

.gdp-field-block .gdp-wrap {
    width: 100%;
    box-sizing: border-box;
}

.gdp-valid-icon {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

/* GlobalDatepicker (shared) — cross-field From/To validation state. */
.gdp-field-block {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.gdp-wrap.gdp-invalid {
    border-color: #c0392b;
}

.gdp-error-msg {
    margin-top: 4px;
    font-size: 11.5px;
    line-height: 1.3;
    color: #c0392b;
}
