/* /Pages/Documents/ListView.razor.rz.scp.css */
/* -- Flat/Grouped toggle -- */
.cs-docs-group-toolbar-cluster[b-82c3ysuuh2] {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.cs-docs-group-toolbar-label[b-82c3ysuuh2] {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #7a7698;
}

.cs-docs-group-toggle[b-82c3ysuuh2] {
    display: inline-flex;
    position: relative;
    align-items: stretch;
    gap: 6px;
    padding: 5px;
    border-radius: 14px;
    background: linear-gradient(180deg, #f4f3fd 0%, #ecebfb 100%);
    box-shadow: inset 0 0 0 1px rgba(92, 82, 191, 0.08);
}

.cs-docs-view-toggle[b-82c3ysuuh2] {
    min-width: 192px;
    gap: 0;
    padding: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ebe7fb 0%, #dfdbf6 100%);
    box-shadow:
        inset 0 0 0 1px rgba(92, 82, 191, 0.1),
        0 8px 18px rgba(41, 31, 108, 0.08);
}

.cs-docs-view-toggle-thumb[b-82c3ysuuh2] {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    border-radius: 999px;
    background: linear-gradient(180deg, #10093c 0%, #000731 100%);
    box-shadow:
        0 10px 18px rgba(0, 7, 49, 0.18),
        inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    transition: transform 160ms ease;
    pointer-events: none;
}

.cs-docs-view-toggle-grouped .cs-docs-view-toggle-thumb[b-82c3ysuuh2] {
    transform: translateX(100%);
}

.cs-docs-group-toggle-secondary[b-82c3ysuuh2] {
    width: fit-content;
    background: transparent;
    box-shadow: none;
    padding: 0;
    gap: 8px;
}

.cs-docs-group-toggle-btn[b-82c3ysuuh2] {
    border: 0;
    background: rgba(255, 255, 255, 0.76);
    color: #5f5c79;
    padding: 10px 14px;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    position: relative;
    z-index: 1;
    box-shadow: inset 0 0 0 1px rgba(92, 82, 191, 0.08);
    transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease, transform 120ms ease, opacity 120ms ease;
}

.cs-docs-view-toggle .cs-docs-group-toggle-btn[b-82c3ysuuh2] {
    min-width: 92px;
    padding: 11px 18px;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    text-align: center;
}

.cs-docs-group-toggle-btn:hover[b-82c3ysuuh2] {
    color: #1b1840;
    transform: translateY(-1px);
}

.cs-docs-group-toggle-btn[aria-pressed="false"][b-82c3ysuuh2] {
    opacity: 0.82;
}

.cs-docs-group-toggle-btn-active[b-82c3ysuuh2] {
    background: #000731;
    color: #fbfbff;
    box-shadow:
        0 10px 20px rgba(0, 7, 49, 0.14),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.cs-docs-group-toggle-btn[aria-pressed="true"][b-82c3ysuuh2] {
    opacity: 1;
}

.cs-docs-view-toggle .cs-docs-group-toggle-btn-active[b-82c3ysuuh2] {
    background: transparent;
    box-shadow: none;
    color: #fbfbff;
}

.cs-docs-view-toggle .cs-docs-group-toggle-btn[aria-pressed="false"][b-82c3ysuuh2] {
    color: #575370;
    opacity: 1;
}

.cs-docs-group-toggle-secondary .cs-docs-group-toggle-btn[b-82c3ysuuh2] {
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(239, 237, 251, 0.92);
    box-shadow: inset 0 0 0 1px rgba(92, 82, 191, 0.08);
}

.cs-docs-footer-btn-disabled[b-82c3ysuuh2] {
    opacity: 0.48;
    cursor: not-allowed;
    filter: grayscale(0.18);
}

.cs-docs-footer-btn-disabled:hover[b-82c3ysuuh2] {
    transform: none;
}

/* -- Grouped shell -- */
.cs-grp[b-82c3ysuuh2] {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
    background: #fff;
}

.cs-grp-overview[b-82c3ysuuh2] {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
    gap: 24px;
    padding: 20px 24px 18px;
    border-bottom: 1px solid rgba(92, 82, 191, 0.1);
    background:
        radial-gradient(circle at top right, rgba(103, 98, 244, 0.08), transparent 35%),
        linear-gradient(180deg, #fbfbff 0%, #f6f6fd 100%);
}

.cs-grp-overview-copy[b-82c3ysuuh2] {
    min-width: 0;
}

.cs-grp-overview-kicker[b-82c3ysuuh2] {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #716ca2;
}

.cs-grp-overview-title[b-82c3ysuuh2] {
    margin: 0;
    font-size: 24px;
    line-height: 1.1;
    font-weight: 700;
    color: #15113b;
}

.cs-grp-overview-text[b-82c3ysuuh2] {
    margin: 10px 0 0;
    max-width: 720px;
    font-size: 14px;
    line-height: 1.5;
    color: #5d587f;
}

.cs-grp-overview-stats[b-82c3ysuuh2] {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-self: end;
}

.cs-grp-overview-stat[b-82c3ysuuh2] {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: inset 0 0 0 1px rgba(92, 82, 191, 0.1);
}

.cs-grp-overview-stat span[b-82c3ysuuh2] {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #7a7698;
}

.cs-grp-overview-stat strong[b-82c3ysuuh2] {
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
    color: #15113b;
}

/* -- Table wrap -- */
.cs-grp-table-wrap[b-82c3ysuuh2] {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    background: #fff;
}

/* -- All table internals use ::deep to pierce Blazor CSS isolation -- */
/* -- Font sizes use same clamp() vars as flat MudTable for exact parity -- */

[b-82c3ysuuh2] .cs-grp-table { width: 100%; border-collapse: collapse; }

[b-82c3ysuuh2] .cs-grp-th {
    position: sticky; top: 0; z-index: 2;
    padding: 5px 10px;
    font-size: 11px; font-weight: 600;
    line-height: 1.3;
    color: var(--cs-color-header-text); background: var(--cs-color-header);
    border-bottom: 0;
    text-align: left; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.08em;
    font-family: var(--cs-font-family-base);
}
[b-82c3ysuuh2] .cs-grp-th-caret { width: 36px; min-width: 36px; padding: 5px 6px 5px 18px; }
[b-82c3ysuuh2] .cs-grp-th-num { text-align: right; width: 70px; }
[b-82c3ysuuh2] .cs-grp-th-num-wide { width: 110px; }

[b-82c3ysuuh2] .cs-grp-group-row { cursor: pointer; height: 28px; transition: background-color 120ms ease, transform 120ms ease; }
[b-82c3ysuuh2] .cs-grp-group-row:hover { background: rgba(103, 98, 244, 0.05); }
[b-82c3ysuuh2] .cs-grp-group-row-open { background: rgba(103, 98, 244, 0.07); box-shadow: inset 3px 0 0 var(--cs-color-header); }
[b-82c3ysuuh2] .cs-grp-group-row-open:hover { background: rgba(103, 98, 244, 0.09); }

[b-82c3ysuuh2] .cs-grp-td {
    padding: 5px;
    font-size: var(--cs-font-size-table-body); font-weight: 400;
    color: var(--cs-color-text-primary);
    border-bottom: 0.75px solid var(--cs-color-border);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px;
    font-family: var(--cs-font-family-base); line-height: 1.3;
}
[b-82c3ysuuh2] .cs-grp-td-caret { width: 36px; min-width: 36px; max-width: 36px; padding: 5px 6px 5px 10px; overflow: visible; }
[b-82c3ysuuh2] .cs-grp-td-primary { font-weight: 400; }
[b-82c3ysuuh2] .cs-grp-td-num { text-align: right; font-weight: 400; }
[b-82c3ysuuh2] .cs-grp-td-num-wide { width: 110px; }

.cs-grp-cell-stack[b-82c3ysuuh2] {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

.cs-grp-cell-stack-end[b-82c3ysuuh2] {
    align-items: flex-end;
}

.cs-grp-cell-title[b-82c3ysuuh2] {
    font-size: var(--cs-font-size-table-body);
    line-height: 1.3;
    font-weight: 400;
    color: #16113b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cs-grp-cell-meta[b-82c3ysuuh2] {
    font-size: 12px;
    line-height: 1.3;
    font-weight: 500;
    color: #706b92;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cs-grp-metric[b-82c3ysuuh2] {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.cs-grp-metric-value[b-82c3ysuuh2] {
    font-size: var(--cs-font-size-table-body);
    line-height: 1.3;
    font-weight: 400;
    color: #16113b;
}

.cs-grp-metric-label[b-82c3ysuuh2] {
    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7a7698;
}

[b-82c3ysuuh2] .cs-grp-caret {
    display: inline-block; width: 0; height: 0;
    border-left: 5px solid #77739a; border-top: 4px solid transparent; border-bottom: 4px solid transparent;
    transition: transform 120ms ease;
}
[b-82c3ysuuh2] .cs-grp-caret-open { transform: rotate(90deg); }

[b-82c3ysuuh2] .cs-grp-expand-row { background: rgba(103, 98, 244, 0.04); }
[b-82c3ysuuh2] .cs-grp-expand-td { padding: 0 0 12px 0; border-bottom: 2px solid var(--cs-color-border); box-shadow: inset 3px 0 0 var(--cs-color-header); }

[b-82c3ysuuh2] .cs-grp-sub-header { display: flex; align-items: center; gap: 10px; padding: 14px 12px 6px 56px; }
[b-82c3ysuuh2] .cs-grp-sub-header-muted { margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--cs-color-border); }
[b-82c3ysuuh2] .cs-grp-sub-label { font-size: var(--cs-font-size-table-body); font-weight: 700; color: var(--cs-color-header); text-transform: uppercase; letter-spacing: 0.04em; }
[b-82c3ysuuh2] .cs-grp-sub-label-muted { color: #8e8aad; }
[b-82c3ysuuh2] .cs-grp-sub-meta { font-size: var(--cs-font-size-table-body); color: var(--cs-color-text-primary); font-weight: 400; font-family: var(--cs-font-family-base); }

[b-82c3ysuuh2] .cs-grp-sub-table { width: calc(100% - 56px); margin-left: 56px; border-collapse: collapse; }
[b-82c3ysuuh2] .cs-grp-sub-th {
    padding: 8px 8px;
    font-size: 10px; font-weight: 700;
    color: #7a7698; background: #f7f6fd;
    text-align: left; white-space: nowrap; border-bottom: 0; text-transform: uppercase; letter-spacing: 0.08em;
    font-family: var(--cs-font-family-base); line-height: 1.3;
}
[b-82c3ysuuh2] .cs-grp-sub-row { cursor: pointer; height: 40px; transition: background-color 80ms ease; }
[b-82c3ysuuh2] .cs-grp-sub-row:hover { background: rgba(103, 98, 244, 0.06); }
[b-82c3ysuuh2] .cs-grp-sub-td {
    padding: 9px 8px;
    font-size: var(--cs-font-size-table-body); font-weight: 400;
    color: var(--cs-color-text-primary);
    border-bottom: 0.75px solid var(--cs-color-border);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px;
    font-family: var(--cs-font-family-base); line-height: 1.3;
}
[b-82c3ysuuh2] .cs-grp-sub-td-date { width: 130px; min-width: 130px; }

[b-82c3ysuuh2] .cs-grp-empty { padding: 24px 16px; color: #666381; font-size: 13px; font-weight: 600; text-align: center; }

/* -- Dark mode (toggle only - table uses CSS vars which auto-switch) -- */
:global(.cs-layout-dark) .cs-docs-group-toolbar-label[b-82c3ysuuh2],
:global(.cs-layout-dark) .cs-grp-overview-kicker[b-82c3ysuuh2],
:global(.cs-layout-dark) .cs-grp-overview-stat span[b-82c3ysuuh2],
:global(.cs-layout-dark) .cs-grp-metric-label[b-82c3ysuuh2],
:global(.cs-layout-dark) .cs-grp-th[b-82c3ysuuh2],
:global(.cs-layout-dark) .cs-grp-sub-th[b-82c3ysuuh2],
:global(.cs-layout-dark) .cs-grp-cell-meta[b-82c3ysuuh2] { color: #beb9e3; }
:global(.cs-layout-dark) .cs-docs-group-toggle[b-82c3ysuuh2] { background: rgba(115, 110, 155, 0.18); }
:global(.cs-layout-dark) .cs-docs-view-toggle[b-82c3ysuuh2] {
    background: linear-gradient(180deg, rgba(88, 83, 130, 0.4) 0%, rgba(58, 53, 92, 0.4) 100%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.06),
        0 10px 20px rgba(0, 0, 0, 0.2);
}
:global(.cs-layout-dark) .cs-docs-view-toggle-thumb[b-82c3ysuuh2] {
    background: linear-gradient(180deg, #f9f8ff 0%, #d8d5ef 100%);
    box-shadow:
        0 10px 18px rgba(0, 0, 0, 0.22),
        inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}
:global(.cs-layout-dark) .cs-docs-group-toggle-secondary[b-82c3ysuuh2] { background: transparent; }
:global(.cs-layout-dark) .cs-docs-group-toggle-btn[b-82c3ysuuh2] {
    background: rgba(255, 255, 255, 0.05);
    color: #c9c6eb;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
:global(.cs-layout-dark) .cs-docs-view-toggle .cs-docs-group-toggle-btn[b-82c3ysuuh2] {
    background: transparent;
    box-shadow: none;
}
:global(.cs-layout-dark) .cs-docs-view-toggle .cs-docs-group-toggle-btn-active[b-82c3ysuuh2] {
    color: #141133;
}
:global(.cs-layout-dark) .cs-docs-view-toggle .cs-docs-group-toggle-btn[aria-pressed="false"][b-82c3ysuuh2] {
    color: #d3d0ee;
}
:global(.cs-layout-dark) .cs-docs-group-toggle-btn:hover[b-82c3ysuuh2] { color: #ffffff; }
:global(.cs-layout-dark) .cs-docs-group-toggle-btn-active[b-82c3ysuuh2] { background: #ffffff; color: #111530; box-shadow: none; }
:global(.cs-layout-dark) .cs-docs-group-toggle-secondary .cs-docs-group-toggle-btn[b-82c3ysuuh2] {
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
:global(.cs-layout-dark) .cs-grp-overview[b-82c3ysuuh2] {
    background:
        radial-gradient(circle at top right, rgba(144, 138, 214, 0.12), transparent 35%),
        linear-gradient(180deg, rgba(28, 25, 59, 0.94) 0%, rgba(20, 18, 45, 0.94) 100%);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
:global(.cs-layout-dark) .cs-grp-overview-title[b-82c3ysuuh2],
:global(.cs-layout-dark) .cs-grp-overview-stat strong[b-82c3ysuuh2],
:global(.cs-layout-dark) .cs-grp-cell-title[b-82c3ysuuh2],
:global(.cs-layout-dark) .cs-grp-metric-value[b-82c3ysuuh2] {
    color: #f6f4ff;
}
:global(.cs-layout-dark) .cs-grp-overview-text[b-82c3ysuuh2] { color: #d0caef; }
:global(.cs-layout-dark) .cs-grp-overview-stat[b-82c3ysuuh2] {
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}
:global(.cs-layout-dark) .cs-grp[b-82c3ysuuh2],
:global(.cs-layout-dark) .cs-grp-table-wrap[b-82c3ysuuh2] { background: transparent; }
:global(.cs-layout-dark)[b-82c3ysuuh2]  .cs-grp-th { background: #cbcbff; color: #000731; border-bottom: 0; }
:global(.cs-layout-dark)[b-82c3ysuuh2]  .cs-grp-sub-th { background: rgba(255, 255, 255, 0.04); }

@media (max-width: 1200px) {
    .cs-grp-overview[b-82c3ysuuh2] {
        grid-template-columns: 1fr;
    }

    .cs-grp-overview-stats[b-82c3ysuuh2] {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .cs-docs-group-toolbar-cluster[b-82c3ysuuh2] {
        width: 100%;
    }

    .cs-docs-group-toggle[b-82c3ysuuh2] {
        width: 100%;
    }

    .cs-docs-group-toggle-btn[b-82c3ysuuh2] {
        flex: 1 1 0;
        min-width: 0;
    }

    .cs-grp-overview-stats[b-82c3ysuuh2] {
        grid-template-columns: 1fr;
    }

    .cs-grp-cell-title[b-82c3ysuuh2] {
        font-size: 14px;
    }
}
