.root {
    display: flex;
    height: calc(100vh - var(--header-height) - var(--space-8) - var(--space-4));
    height: calc(100dvh - var(--header-height) - var(--space-8) - var(--space-4));
    min-height: 0;
    flex-direction: column;
}

.contentPanel {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--bg-card);
    overflow: hidden;
}

.contentPanel :global(.data-state) {
    flex: 1;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.contentPanel :global(.table-frame) {
    min-height: 0;
    border: 0;
    border-radius: 0;
}

.contentPanel :global(.table-scroll) {
    overflow: auto;
}

.contentPanel :global(.admin-row--head) {
    position: sticky;
    top: 0;
    z-index: 1;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
}

.toolbarLeft {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    gap: var(--space-3);
}

.toolbarActions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: var(--space-2);
    margin-left: auto;
}

.toolbarTextAction {
    flex: 0 0 auto;
}

.filters {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.search {
    flex: 0 1 300px;
}

.statusSelect {
    flex: 0 0 150px;
}

.filterFields {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.filterFields :global(.MuiTextField-root) {
    width: 170px;
}

.rowActions {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.permissionGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
}

.permissionSwitch {
    display: flex;
    min-width: 0;
    min-height: 40px;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 0 var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: var(--admin-font-size);
    font-weight: 650;
}

.permissionSwitch span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.permissionList {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.permissionPill {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    gap: 5px;
    padding: 0 8px;
    border: 1px solid var(--success-border);
    border-radius: var(--radius-pill);
    background: var(--success-surface);
    color: var(--success);
    font-size: 12px;
    font-weight: 720;
    line-height: 1;
    white-space: nowrap;
}

.permissionPill span {
    color: inherit;
    font-weight: 780;
}

.permissionPillOff {
    border-color: var(--border);
    background: var(--bg-input);
    color: var(--text-tertiary);
}

.rateDrawerForm {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.ledgerDrawer.ledgerDrawer {
    width: min(960px, calc(100vw - 32px));
}

.ledgerDrawerBody.ledgerDrawerBody {
    display: flex;
    overflow: hidden;
}

.rateTierHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    font-weight: 760;
    color: var(--text-primary);
}

.rateTierList {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.rateTierRow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto auto;
    gap: var(--space-3);
    align-items: center;
    padding: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
}

.rateTierSwitch {
    display: flex;
    justify-content: center;
}

.flagCell {
    font-size: var(--admin-font-size);
}

.listBlock {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    background: var(--bg-card);
}

.listBlock :global(.pagination-bar) {
    margin: var(--space-3) var(--space-5) var(--space-4);
}

.inlineValue {
    color: var(--text-primary);
    font-weight: 650;
}

.hostCountButton {
    display: inline-flex;
    min-width: 44px;
    min-height: 28px;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font: inherit;
    font-weight: 760;
    letter-spacing: 0;
}

.hostCountButton:hover,
.hostCountButton:focus-visible {
    color: var(--primary-strong);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.inlineAliasText {
    color: var(--text-secondary);
    font-weight: 650;
}

.inlineAliasButton {
    display: inline-flex;
    max-width: 100%;
    min-height: 28px;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font: inherit;
    font-weight: 650;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inlineAliasButton:hover {
    color: var(--primary);
}

.inlineAliasInput {
    width: min(180px, 100%);
    min-height: 32px;
    padding: 0 var(--space-2);
    border: 1px solid var(--primary);
    border-radius: var(--radius-control);
    outline: 0;
    background: var(--bg-card);
    color: var(--text-primary);
    font: inherit;
    font-weight: 650;
}

.sellerIdentity {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: var(--space-3);
}

.sellerAvatar {
    display: inline-flex;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-input);
    color: var(--text-secondary);
    font-weight: 700;
    object-fit: cover;
}

.sellerText {
    display: inline-flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.sellerName {
    overflow: hidden;
    color: var(--text-primary);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sellerMeta {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: var(--admin-font-size);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contactButton {
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contactButton:hover {
    color: var(--primary-strong);
    text-decoration: underline;
}

.salaryWalletButton {
    display: inline-flex;
    max-width: 100%;
    min-height: 34px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font: inherit;
    overflow: hidden;
    text-align: left;
}

.salaryWalletButton:hover .salaryWalletAmount {
    color: var(--primary-strong);
    text-decoration: underline;
}

.salaryWalletAmount {
    max-width: 100%;
    overflow: hidden;
    color: var(--primary);
    font-weight: 780;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.salaryWalletDrawer.salaryWalletDrawer {
    width: min(980px, calc(100vw - 32px));
}

.salaryWalletDrawerBody.salaryWalletDrawerBody {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    overflow: hidden;
}

.salaryWalletDrawerBody :global(.data-state) {
    flex: 1;
    min-height: 0;
}

.salaryWalletSummary {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: var(--admin-font-size);
    font-weight: 700;
}

.salaryWalletIncome {
    color: var(--success);
    font-weight: 780;
}

.salaryWalletExpense {
    color: var(--danger);
    font-weight: 780;
}

.contactPlaceholder {
    color: var(--text-tertiary);
}

.childBdList {
    display: grid;
    gap: var(--space-3);
}

.childBdItem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--bg-input);
}

.childBdStatus {
    flex: 0 0 auto;
}

.lookupPanel {
    display: grid;
    gap: var(--space-2);
    min-height: 44px;
    padding: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-size: var(--admin-font-size);
}

.positive {
    color: var(--success);
}

.negative {
    color: var(--danger);
}

@media (max-width: 760px) {
    .toolbar,
    .toolbarLeft,
    .filters,
    .filterFields {
        align-items: stretch;
        flex-direction: column;
    }

    .toolbarActions {
        align-self: flex-end;
    }

    .search {
        flex: 1 1 auto;
        width: 100%;
    }

    .statusSelect {
        flex: 1 1 auto;
        width: 100%;
    }

    .filterFields :global(.MuiTextField-root) {
        width: 100%;
    }
}
