.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;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--bg-card);
}

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

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

.prettyContentPanel {
    gap: 0;
}

.prettyTabsBar {
    display: flex;
    min-height: 48px;
    align-items: center;
    flex: 0 0 auto;
    padding: 0 var(--space-4);
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}

.prettyTabsBar :global(.MuiTabs-indicator) {
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: var(--primary);
}

.prettyTab.prettyTab {
    min-height: 48px;
    color: var(--text-tertiary);
    font-size: var(--admin-font-size);
    font-weight: 750;
    letter-spacing: 0;
    text-transform: none;
}

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

.prettyTab.prettyTab:global(.Mui-selected) {
    color: var(--primary);
}

.prettyWorkspace {
    display: grid;
    flex: 1;
    min-height: 0;
    grid-template-columns: minmax(380px, 0.78fr) minmax(0, 1.22fr);
}

.prettyPane {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
}

.prettyPoolPane {
    border-right: 1px solid var(--border);
}

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

.prettyPaneHeader {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex: 0 0 auto;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}

.prettyPaneTitle {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.prettyPaneTitle h2 {
    overflow: hidden;
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 750;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prettyPaneTitle span {
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 650;
}

.prettyFilters {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    flex: 0 0 auto;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border);
    background: var(--bg-subtle);
}

.compactTableFrame :global(.admin-row) {
    min-height: 48px;
}

.compactTableFrame :global(.admin-row--head),
.compactTableFrame :global(.admin-cell--head) {
    min-height: 38px;
}

.compactTableFrame :global(.admin-cell) {
    padding-right: var(--space-3);
    padding-left: var(--space-3);
}

.compactTableFrame :global(.pagination-bar) {
    min-height: 42px;
    padding: var(--space-2) var(--space-4);
    border-top: 1px solid var(--border);
}

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

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

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

.selectedMeta {
    color: var(--text-secondary);
    font-size: var(--admin-font-size);
    font-weight: 650;
}

.timeFilter {
    flex: 0 1 280px;
    min-width: 220px;
}

.selectColumn {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    padding-right: var(--space-2) !important;
    padding-left: var(--space-2) !important;
}

.selectColumn :global(.admin-cell__head-content) {
    justify-content: center;
}

.sortHeader {
    display: inline-flex;
    max-width: 100%;
    min-width: 0;
    align-items: center;
    gap: var(--space-1);
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-weight: inherit;
}

.sortHeader:hover,
.sortHeaderActive {
    color: var(--text-primary);
}

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

.sortIcon {
    flex: 0 0 auto;
    color: var(--text-tertiary);
    font-size: 18px;
}

.sortHeaderActive .sortIcon {
    color: var(--primary);
}

.genderAgeFemale,
.genderAgeMale,
.genderAgeUnknown {
    display: inline-flex;
    min-height: 20px;
    align-items: center;
    padding: 1px 6px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.genderAgeFemale {
    background: var(--gender-female);
}

.genderAgeMale {
    background: var(--primary);
}

.genderAgeUnknown {
    background: var(--text-tertiary);
}

.userLevels {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: var(--space-2);
    white-space: nowrap;
}

.userLevel {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 650;
}

.userLevel strong {
    color: var(--text-primary);
    font-size: var(--admin-font-size);
    font-weight: 750;
}

.coinButton {
    display: inline-flex;
    max-width: 100%;
    min-height: 28px;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    text-align: left;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
    white-space: nowrap;
}

.coinButton:hover,
.coinButton:focus-visible {
    color: var(--primary);
    text-decoration-color: currentColor;
}

.coinButton:focus-visible {
    border-radius: var(--radius-sm);
    outline: 2px solid var(--primary-border-strong);
    outline-offset: 2px;
}

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

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

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

.search {
    flex: 1 1 240px;
}

.compactControl {
    flex: 0 1 150px;
}

.userIDControl {
    flex: 0 1 130px;
}

.statusSelect {
    flex: 0 0 150px;
}

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

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

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

.avatar {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-card-strong);
    color: var(--text-secondary);
    font-weight: 700;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prettyIcon {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--primary-surface);
    color: var(--primary);
}

.identityText {
    min-width: 0;
}

.nameLine {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-primary);
    font-weight: 650;
}

.name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gender {
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    line-height: 1;
}

.genderMale {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.genderFemale {
    background: rgba(219, 39, 119, 0.12);
    color: #db2777;
}

.genderUnknown {
    background: var(--neutral-surface);
    color: var(--text-tertiary);
}

.meta {
    color: var(--text-tertiary);
    font-size: var(--admin-font-size);
    line-height: 1.3;
}

.levelPrimary {
    color: var(--text-primary);
    font-weight: 800;
    white-space: nowrap;
}

.rolesValue {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-primary);
    font-weight: 650;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.banCountdown {
    color: var(--danger);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.3;
}

.detailDrawerBody {
    display: block;
    padding-right: 0;
}

.detailView {
    display: flex;
    min-width: 0;
    min-height: 100%;
    flex-direction: column;
    container-type: inline-size;
}

.detailStickyHeader {
    position: sticky;
    z-index: 2;
    top: 0;
    flex: 0 0 auto;
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}

.detailHero {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding-bottom: var(--space-3);
}

.detailHeroActions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.detailMetrics {
    display: grid;
    min-width: 620px;
    grid-template-columns: repeat(7, minmax(72px, 1fr));
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}

.detailMetric {
    display: grid;
    min-width: 0;
    gap: 2px;
    padding: var(--space-2) var(--space-3);
    border-left: 1px solid var(--border-soft);
}

.detailMetric:first-child {
    border-left: 0;
}

.detailMetric span {
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: 11px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detailMetric strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: var(--admin-font-size);
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detailLoading {
    margin-top: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-sm);
    background: var(--primary-surface);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.detailTabs {
    min-height: 40px;
    margin-top: var(--space-1);
}

.detailTabs :global(.MuiTabs-indicator) {
    height: 3px;
    border-radius: var(--radius-pill) var(--radius-pill) 0 0;
    background: var(--primary);
}

.detailTab.detailTab {
    min-width: 0;
    min-height: 40px;
    padding: 0 var(--space-4);
    color: var(--text-tertiary);
    font-size: var(--admin-font-size);
    font-weight: 750;
    letter-spacing: 0;
    text-transform: none;
}

.detailTab.detailTab:hover,
.detailTab.detailTab:global(.Mui-selected) {
    color: var(--primary);
}

.detailTabPanel {
    display: grid;
    gap: 0;
    flex: 1 1 auto;
    align-content: start;
}

.detailSection {
    display: grid;
    gap: var(--space-3);
    padding: var(--space-5) 0;
    border-bottom: 1px solid var(--border-soft);
}

.detailSection:last-child {
    border-bottom: 0;
}

.detailSectionTitle {
    margin: 0;
    color: var(--text-primary);
    font-size: var(--admin-font-size);
    font-weight: 800;
}

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

.detailItem {
    display: grid;
    min-width: 0;
    min-height: 32px;
    grid-template-columns: minmax(76px, 0.48fr) minmax(0, 1fr);
    align-items: start;
    gap: var(--space-2);
    padding: 6px 0;
    border-bottom: 1px solid var(--detail-border);
}

.detailItemWide {
    grid-column: 1 / -1;
}

.detailLabel {
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 650;
    line-height: var(--admin-line-height);
}

.detailValue {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text-primary);
    font-size: var(--admin-font-size);
    font-weight: 650;
    line-height: var(--admin-line-height);
}

.copyableDetailValue {
    display: inline-flex;
    max-width: 100%;
    min-width: 0;
    align-items: center;
    gap: var(--space-1);
}

.copyableDetailValue > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.copyDetailButton {
    display: inline-flex;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: var(--radius-control);
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 14px;
}

.copyDetailButton:hover,
.copyDetailButton:focus-visible {
    background: var(--primary-surface);
    color: var(--primary);
}

.copyDetailButton:focus-visible {
    outline: 2px solid var(--primary-border);
    outline-offset: 1px;
}

.detailPageRoot {
    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;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--bg-card);
}

.detailPageToolbar {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex: 0 0 auto;
    padding: var(--space-3) var(--space-5);
    border-bottom: 1px solid var(--border);
}

.detailPageTitleGroup {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: var(--space-4);
}

.detailPageTitleGroup h1 {
    overflow: hidden;
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detailPageContent {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 0 var(--space-6) var(--space-6);
}

.detailPageContent :global(.data-state) {
    min-height: 100%;
    border: 0;
}

.detailViewPage {
    max-width: 1440px;
    min-height: 100%;
    margin: 0 auto;
}

@container (min-width: 900px) {
    .detailGrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@container (max-width: 640px) {
    .detailMetrics {
        min-width: 0;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .detailMetric:nth-child(5) {
        border-left: 0;
    }

    .detailGrid {
        grid-template-columns: minmax(0, 1fr);
    }

    .detailItemWide {
        grid-column: auto;
    }

    .detailHero {
        align-items: flex-start;
    }

    .detailHeroActions {
        align-items: flex-end;
        flex-direction: column;
    }
}

@container (max-width: 400px) {
    .detailMetrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detailMetric:nth-child(odd) {
        border-left: 0;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .copyDetailButton {
        transition:
            background-color var(--motion-fast) var(--ease-standard),
            color var(--motion-fast) var(--ease-standard),
            transform var(--motion-fast) var(--ease-standard);
    }

    .copyDetailButton:active {
        transform: scale(0.92);
    }
}

@media (max-width: 720px) {
    .detailPageToolbar,
    .detailPageTitleGroup {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .detailPageContent {
        padding-right: var(--space-4);
        padding-left: var(--space-4);
    }
}

.vipBadge,
.vipBadgeMuted {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.vipBadge {
    border: 1px solid color-mix(in srgb, #f2b84b 55%, var(--border));
    background: #fff7df;
    color: #8a5a00;
}

.vipBadgeMuted {
    border: 1px solid var(--border);
    background: var(--neutral-surface);
    color: var(--text-tertiary);
}

.emptyInline {
    display: flex;
    min-height: 40px;
    align-items: center;
    color: var(--text-tertiary);
    font-size: var(--admin-font-size);
    font-weight: 650;
}

.assetList {
    display: grid;
    gap: var(--space-2);
}

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

.assetName {
    color: var(--text-primary);
    font-size: var(--admin-font-size);
    font-weight: 800;
}

.assetMeta,
.resourceMeta {
    color: var(--text-tertiary);
    font-size: 12px;
    line-height: 1.35;
}

.assetAmount {
    color: var(--text-primary);
    font-size: var(--admin-font-size);
    font-weight: 800;
    text-align: right;
}

.resourceList {
    display: grid;
    gap: var(--space-2);
    padding: 0;
    margin: 0;
    list-style: none;
}

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

.resourceRevokeButton {
    min-width: 72px;
    white-space: nowrap;
}

.resourceThumb,
.resourceThumbFallback {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--neutral-surface);
}

.resourceThumb {
    display: block;
    object-fit: cover;
}

.resourceThumbFallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 16px;
    font-weight: 800;
}

.resourceBody {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.resourceTitle {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-primary);
    font-size: var(--admin-font-size);
    font-weight: 800;
}

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

.resourceTag {
    flex: 0 0 auto;
    padding: 2px 7px;
    border: 1px solid var(--success-border);
    border-radius: var(--radius-sm);
    background: var(--success-surface);
    color: var(--success);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}

.stack {
    display: grid;
    gap: 1px;
    min-width: 0;
}

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

.countryButton {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    border: 0;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font: inherit;
    font-weight: 650;
    padding: 0;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

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

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

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

.levelTrackForm {
    display: grid;
    gap: var(--space-2);
    padding: var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
}

@media (max-width: 760px) {
    .prettyTabsBar {
        padding: 0 var(--space-3);
    }

    .prettyWorkspace {
        grid-template-columns: 1fr;
    }

    .prettyPoolPane {
        min-height: 42dvh;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .prettyIDPane {
        min-height: 50dvh;
    }

    .prettyPaneHeader,
    .toolbar,
    .toolbarLeft,
    .toolbarActions,
    .filters,
    .prettyFilters {
        align-items: stretch;
        flex-direction: column;
    }

    .search,
    .compactControl,
    .userIDControl,
    .statusSelect,
    .timeFilter {
        flex: 1 1 auto;
        width: 100%;
    }

    .formGridTwo {
        grid-template-columns: 1fr;
    }
}
