.hisab-page { width: 100%; color: var(--premium-text-primary, #f8f7ff); }
.hisab-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.hisab-heading > div:first-child > span { color: #a78bfa; font-size: .66rem; font-weight: 900; letter-spacing: .14em; }
.hisab-heading h1 { margin: .1rem 0 .15rem; font-size: clamp(1.55rem, 4vw, 2.25rem); font-weight: 900; }
.hisab-heading p { margin: 0; color: var(--premium-text-secondary, #9992ad); font-size: .8rem; }
.hisab-count { min-width: 8.5rem; padding: .65rem .85rem; border: 1px solid rgba(139, 92, 246, .28); border-radius: .65rem; background: rgba(20, 17, 55, .7); text-align: right; }
.hisab-count strong, .hisab-count span { display: block; }
.hisab-count strong { color: #c4b5fd; font-size: 1.15rem; }
.hisab-count span { color: #938aa8; font-size: .66rem; }
.hisab-filters { display: grid; grid-template-columns: minmax(180px, 1.5fr) minmax(130px, 1fr) minmax(150px, 1fr) auto auto; align-items: end; gap: .65rem; margin-bottom: 1rem; padding: .85rem; border: 1px solid rgba(139, 92, 246, .24); border-radius: .75rem; background: rgba(9, 10, 36, .78); }
.hisab-filters label { display: flex; min-width: 0; flex-direction: column; gap: .3rem; color: #aaa2bd; font-size: .68rem; }
.hisab-filters input, .hisab-filters select { width: 100%; min-height: 2.4rem; padding: .5rem .65rem; border: 1px solid rgba(139, 92, 246, .34); border-radius: .45rem; color: inherit; background: #0b0d2d; font: inherit; font-size: .76rem; }
.hisab-filters button, .hisab-clear { display: inline-flex; min-height: 2.4rem; align-items: center; justify-content: center; padding: .5rem .85rem; border: 0; border-radius: .45rem; color: #fff; background: linear-gradient(105deg, #6d28d9, #8b5cf6); font-size: .73rem; font-weight: 850; text-decoration: none; }
.hisab-clear { border: 1px solid rgba(139, 92, 246, .34); color: #c4b5fd; background: transparent; }
.hisab-group-options { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin-bottom: .7rem; }
.hisab-group-options > span { margin-right: .2rem; color: #9189a6; font-size: .68rem; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.hisab-group-options a { padding: .42rem .7rem; border: 1px solid rgba(139, 92, 246, .28); border-radius: 999px; color: #b8afcc; background: rgba(9, 10, 36, .62); font-size: .7rem; font-weight: 850; text-decoration: none; }
.hisab-group-options a:hover, .hisab-group-options a.active { border-color: #8b5cf6; color: #fff; background: #6d28d9; }
.hisab-group-path { margin-bottom: 1rem; padding: .7rem .8rem; border: 1px solid rgba(139, 92, 246, .2); border-radius: .65rem; background: rgba(9, 10, 36, .58); }
.hisab-group-path strong { color: #c4b5fd; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; }
.hisab-drill-steps { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.hisab-drill-step { display: inline-flex; align-items: center; min-height: 1.75rem; padding: .28rem .55rem; border: 1px solid rgba(139, 92, 246, .25); border-radius: 999px; font-size: .66rem; font-weight: 800; }
a.hisab-drill-step { text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s ease; }
a.hisab-drill-step:hover { color: #2e1065; background: #c4b5fd; transform: translateY(-1px); }
.hisab-drill-step.pending { color: #9189a6; background: rgba(255, 255, 255, .04); }
.hisab-drill-step.complete {
    color: #2e1065;
    background: #ddd6fe;
    border-color: #a78bfa;
}
.hisab-drill-step.active { color: #fff; background: #6d28d9; border-color: #a78bfa; box-shadow: 0 0 0 2px rgba(167, 139, 250, .16); }
.hisab-drill-arrow { color: #a78bfa; font-size: .8rem; }
.hisab-drill-bet { display: flex; align-items: flex-start; gap: .55rem; margin-top: .65rem; padding-top: .6rem; border-top: 1px solid rgba(139, 92, 246, .18); }
.hisab-drill-bet span { flex: 0 0 auto; padding: .18rem .38rem; border-radius: .3rem; color: #fff; background: #6d28d9; font-size: .58rem; font-weight: 850; text-transform: uppercase; }
.hisab-drill-bet strong { color: inherit; font-size: .72rem; line-height: 1.45; letter-spacing: 0; text-transform: none; white-space: pre-wrap; word-break: break-word; }
.hisab-card { overflow: hidden; border: 1px solid rgba(139, 92, 246, .25); border-radius: .8rem; background: rgba(5, 7, 30, .82); box-shadow: 0 .8rem 2rem rgba(0, 0, 0, .14); }
.hisab-table-scroll { overflow-x: auto; }
.hisab-table { width: 100%; min-width: 1240px; border-collapse: collapse; font-size: .74rem; }
.hisab-table.agent { min-width: 2220px; }
.hisab-table.master { min-width: 2120px; }
.hisab-table.admin { min-width: 1240px; }
.hisab-table th, .hisab-table td { padding: .2rem .2rem; border-bottom: 1px solid rgba(139, 92, 246, .13); vertical-align: middle; }
.hisab-table thead th { color: #d8d3e5; background: rgba(139, 92, 246, .13); font-size: .64rem; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
.hisab-table tbody tr:hover { background: rgba(124, 58, 237, .07); }
.hisab-table .date, .hisab-table .id, .hisab-table .user-name, .hisab-table .number, .hisab-table .result { white-space: nowrap; }
.hisab-table .id { color: #a78bfa; font-weight: 800; }
.hisab-table .user-name { font-weight: 800; }
.hisab-table .number { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; font-weight: 850; }
.hisab-table .result { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .68rem; font-weight: 800; }
.hisab-table .money { text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.hisab-table .money.positive { color: #31c56c; }
.hisab-table .money.negative { color: #fb5265; }
.hisab-table .money.zero { color: #9e96b2; }
.hisab-table .money.total-sale { color: #000 !important; }
.hisab-table .money.upline-sale { color: #000 !important; }
.hisab-table .money.hissa { color: #a78bfa; }
.hisab-table .money.commission-rate { color: #a78bfa; }
.hisab-table .money.final { padding-right: 1rem; border-left: 2px solid rgba(139, 92, 246, .25); font-weight: 950; }
.hisab-session { display: inline-flex; align-items: center; justify-content: center; padding: .25rem .45rem; border-radius: 999px; font-size: .62rem; font-weight: 850; }
/*.hisab-session.open { color: #bfdbfe; background: rgba(37, 99, 235, .2); }
.hisab-session.close { color: #e9d5ff; background: rgba(147, 51, 234, .2); }
.hisab-status { display: inline-flex; align-items: center; justify-content: center; padding: .25rem .45rem; border-radius: 999px; font-size: .62rem; font-weight: 850; }
.hisab-status.pending { color: #fde68a; background: rgba(180, 83, 9, .22); }
.hisab-status.won { color: #bbf7d0; background: rgba(21, 128, 61, .22); }
.hisab-status.lost { color: #fecaca; background: rgba(185, 28, 28, .2); }
*/.hisab-table tfoot th, .hisab-table tfoot td { border-top: 2px solid rgba(139, 92, 246, .35); border-bottom: 0; background: #11132f; font-weight: 900; }
.hisab-table tfoot th { color: #c4b5fd; letter-spacing: .05em; }
.hisab-table tfoot th small { margin-left: .25rem; color: #8f87a3; font-size: .58rem; font-weight: 650; letter-spacing: 0; }
.hisab-group-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: .76rem; }
.hisab-group-table th, .hisab-group-table td { padding: .78rem .72rem; border-bottom: 1px solid rgba(139, 92, 246, .13); }
.hisab-group-table thead th { color: #d8d3e5; background: rgba(139, 92, 246, .13); font-size: .64rem; font-weight: 850; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
.hisab-group-table .money { text-align: right; font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.hisab-group-table .money.positive { color: #31c56c; }
.hisab-group-table .money.negative { color: #fb5265; }
.hisab-group-table .money.zero { color: #9e96b2; }
.hisab-group-table .money.total-sale { color: #000 !important; }
.hisab-group-table .money.final { padding-right: 1rem; border-left: 2px solid rgba(139, 92, 246, .25); font-weight: 950; }
.hisab-group-table .bet-message { min-width: 15rem; white-space: normal; word-break: break-word; }
.hisab-group-row { cursor: pointer; transition: background .15s ease; }
.hisab-group-row:hover, .hisab-group-row:focus { outline: none; background: rgba(124, 58, 237, .1); }
.hisab-group-row td:first-child a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .55rem; color: inherit; text-decoration: none; }
.hisab-group-row td:first-child small { padding: .2rem .36rem; border-radius: .3rem; color: #c4b5fd; background: rgba(124, 58, 237, .16); font-size: .57rem; font-weight: 850; text-transform: uppercase; }
.hisab-group-row td:first-child strong { font-size: .76rem; }
.hisab-group-row td:first-child span { color: #a78bfa; font-size: 1.2rem; }
.hisab-group-table tfoot th, .hisab-group-table tfoot td { border-top: 2px solid rgba(139, 92, 246, .35); border-bottom: 0; background: #11132f; font-weight: 900; }
.hisab-empty { padding: 3rem 1rem; text-align: center; }
.hisab-empty > span { display: block; margin-bottom: .55rem; font-size: 2rem; }
.hisab-empty h2 { margin: 0; font-size: 1rem; }
.hisab-empty p { margin: .3rem 0 0; color: #8f87a3; font-size: .72rem; }
.hisab-pagination { display: flex; align-items: center; justify-content: center; gap: .8rem; padding: .8rem; border-top: 1px solid rgba(139, 92, 246, .16); }
.hisab-pagination a { padding: .4rem .65rem; border: 1px solid rgba(139, 92, 246, .3); border-radius: .4rem; color: #c4b5fd; font-size: .68rem; font-weight: 800; text-decoration: none; }
.hisab-pagination a.disabled { pointer-events: none; opacity: .35; }
.hisab-pagination span { color: #928aa5; font-size: .67rem; }
.cutting-hisab { margin-top: 1.25rem; }
.cutting-hisab-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .65rem; }
.cutting-hisab-heading span { color: #a78bfa; font-size: .62rem; font-weight: 900; letter-spacing: .12em; }
.cutting-hisab-heading h2 { margin: .08rem 0 0; font-size: 1.15rem; font-weight: 900; }
.cutting-hisab-heading > strong { color: #938aa8; font-size: .68rem; }
.cutting-hisab-table { min-width: 820px; }
.cutting-hisab-table .date, .cutting-hisab-table .id { white-space: nowrap; }
.cutting-hisab-table .id { color: #a78bfa; font-weight: 850; }
.cutting-type { display: inline-flex; min-width: 2.7rem; justify-content: center; padding: .22rem .4rem; border-radius: 999px; color: #c4b5fd; background: rgba(124, 58, 237, .16); font-size: .62rem; font-weight: 900; }
body.light-theme .hisab-page, body.forest-theme .hisab-page { color: var(--premium-text, #172033); }
body.light-theme .hisab-count, body.light-theme .hisab-filters, body.light-theme .hisab-card,
body.forest-theme .hisab-count, body.forest-theme .hisab-filters, body.forest-theme .hisab-card { border-color: var(--premium-border, #dce3e8); background: var(--premium-panel, #fff); }
body.light-theme .hisab-group-options a, body.light-theme .hisab-group-path,
body.forest-theme .hisab-group-options a, body.forest-theme .hisab-group-path { border-color: var(--premium-border, #dce3e8); color: var(--premium-text, #172033); background: var(--premium-panel, #fff); }
body.light-theme .hisab-group-options a.active, body.forest-theme .hisab-group-options a.active { color: #fff; background: #6d28d9; }
body.light-theme .hisab-filters input, body.light-theme .hisab-filters select,
body.forest-theme .hisab-filters input, body.forest-theme .hisab-filters select { border-color: var(--premium-border, #dce3e8); color: inherit; background: #fff; }
body.light-theme .hisab-table thead th, body.forest-theme .hisab-table thead th { color: #3b3350; background: #f3efff; }
body.light-theme .hisab-group-table thead th, body.forest-theme .hisab-group-table thead th { color: #3b3350; background: #f3efff; }
body.light-theme .hisab-table tfoot th, body.light-theme .hisab-table tfoot td,
body.forest-theme .hisab-table tfoot th, body.forest-theme .hisab-table tfoot td { background: #f3efff; }
body.light-theme .hisab-group-table tfoot th, body.light-theme .hisab-group-table tfoot td,
body.forest-theme .hisab-group-table tfoot th, body.forest-theme .hisab-group-table tfoot td { background: #f3efff; }
@media (max-width: 800px) {
    .hisab-filters { grid-template-columns: 1fr 1fr; }
    .hisab-filters label:first-child { grid-column: 1 / -1; }
}
@media (max-width: 575.98px) {
    .hisab-heading { align-items: stretch; flex-direction: column; }
    .cutting-hisab-heading { align-items: flex-start; flex-direction: column; }
    .hisab-count { text-align: left; }
    .hisab-filters { grid-template-columns: 1fr; }
    .hisab-filters label:first-child { grid-column: auto; }
    .hisab-drill-steps { align-items: flex-start; }
}
