.amount {
    display: inline-flex;
    align-items: center;
    color: var(--success);
    font-size: calc(var(--admin-font-size) + 2px);
    font-weight: 760;
    line-height: 1;
    white-space: nowrap;
}

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

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

.ledgerTableShell {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
}

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

.ledgerTableShell :global(.table-frame) {
    min-height: 0;
}

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

.giftRecordIndex {
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
    font-weight: 750;
}

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

.giftRecordCover {
    display: inline-flex;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: linear-gradient(145deg, var(--bg-card-strong), var(--primary-hover));
    color: var(--primary);
}

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

.giftRecordGiftText,
.giftRecordScene {
    display: grid;
    min-width: 0;
    gap: 4px;
}

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

.giftRecordGiftId,
.giftRecordRoomId {
    overflow: hidden;
    color: var(--text-tertiary);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.giftRecordMetrics {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, auto));
    align-items: center;
    gap: var(--space-3);
}

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

.giftRecordMetric span {
    color: var(--text-tertiary);
    font-size: 11px;
    white-space: nowrap;
}

.giftRecordMetric strong {
    color: var(--text-primary);
    font-size: var(--admin-font-size);
    font-variant-numeric: tabular-nums;
    font-weight: 760;
    white-space: nowrap;
}

.giftRecordTotal {
    padding-left: var(--space-3);
    border-left: 1px solid var(--border-soft);
}

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

.giftRecordSceneBadge {
    display: inline-flex;
    width: max-content;
    min-height: 24px;
    align-items: center;
    padding: 0 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 760;
}

.giftRecordSceneRoom {
    border-color: var(--primary-border);
    background: var(--primary-hover);
    color: var(--primary);
}

.giftRecordSceneDirect {
    border-color: rgba(124, 58, 237, 0.2);
    background: rgba(124, 58, 237, 0.08);
    color: #7c3aed;
}

@media (prefers-reduced-motion: no-preference) {
    .giftRecordCover,
    .giftRecordSceneBadge {
        transition:
            border-color 160ms ease,
            box-shadow 160ms ease,
            transform 160ms ease;
    }

    .giftRecordGift:hover .giftRecordCover {
        border-color: var(--primary-border-strong);
        box-shadow: 0 8px 18px rgba(37, 99, 235, 0.1);
        transform: translateY(-1px);
    }
}

.adjustmentAmount {
    font-size: calc(var(--admin-font-size) + 4px);
}

.clickableRow:hover {
    background: var(--primary-hover);
}

.clickableRow:focus-visible {
    outline: none;
    background: var(--primary-hover);
    box-shadow: inset 0 0 0 2px var(--primary-border-strong);
}

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

.avatar,
.detailAvatar {
    display: inline-flex;
    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);
}

.avatar {
    width: 36px;
    height: 36px;
}

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

.identityText,
.detailHeroText {
    display: grid;
    min-width: 0;
    gap: var(--space-1);
}

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

.meta,
.detailMeta {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text-tertiary);
    font-size: 12px;
}

.detailHero {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border);
}

.detailAvatar {
    width: 64px;
    height: 64px;
}

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

.detailTitleRow h3 {
    min-width: 0;
    overflow: hidden;
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detailSection {
    display: grid;
    gap: var(--space-3);
    padding: var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--bg-card-strong);
}

.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));
    gap: var(--space-3);
}

.detailItem {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.detailLabel {
    color: var(--text-tertiary);
    font-size: 12px;
}

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

.detailCode {
    max-height: 180px;
    margin: 0;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.lookupRow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: var(--space-3);
}

.targetPreview {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-control);
    background: var(--bg-card-strong);
}

.ratioBody {
    padding: var(--space-5);
    background: var(--bg-card);
}

.ratioPanel {
    display: grid;
    width: min(100%, 980px);
    gap: var(--space-4);
}

.ratioHeader {
    display: flex;
    align-items: center;
    color: var(--text-primary);
}

.ratioHeader h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
}

.ratioGrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: var(--space-4);
}

.ratioTable {
    display: grid;
    grid-template-columns: minmax(160px, 0.8fr) repeat(2, minmax(180px, 1fr));
    align-items: center;
    gap: var(--space-3);
}

.ratioTableHeader {
    color: var(--text-tertiary);
    font-size: 12px;
    font-weight: 800;
}

.ratioRow {
    display: contents;
}

.ratioType {
    min-width: 0;
    color: var(--text-primary);
    font-weight: 760;
}

.wheelBody {
    display: grid;
    min-width: 0;
    gap: var(--space-5);
    padding: var(--space-5);
    background: var(--bg-card);
}

.wheelTopBar {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}

.wheelPoolTabs {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.wheelActionBar {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.wheelPoolTab {
    display: inline-grid;
    min-width: 148px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--space-3);
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--bg-card-strong);
    color: var(--text-secondary);
    cursor: pointer;
    font: inherit;
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        color 160ms ease;
}

.wheelPoolTab:hover,
.wheelPoolTabActive {
    border-color: var(--primary-border-strong);
    background: var(--primary-hover);
    color: var(--primary);
}

.wheelPoolTab span {
    min-width: 0;
    overflow: hidden;
    font-weight: 800;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wheelPoolTab strong {
    font-size: 12px;
    font-weight: 800;
}

.wheelConfigColumn {
    display: grid;
    min-width: 0;
    align-content: start;
    gap: var(--space-5);
}

.wheelPanel {
    display: grid;
    min-width: 0;
    gap: var(--space-4);
}

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

.wheelPanelHeader h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
}

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

.wheelPanelActions {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--space-3);
}

.wheelCollapseButton {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: 0 var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--bg-card-strong);
    color: var(--text-secondary);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
}

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

.wheelCollapseIcon {
    font-size: 18px;
    transition: transform 160ms ease;
}

.wheelCollapseIconOpen {
    transform: rotate(180deg);
}

.wheelConfigGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: var(--space-4);
}

.wheelPrizeScroller {
    width: 100%;
    max-width: 100%;
    max-height: min(520px, 55vh);
    min-width: 0;
    overflow: auto;
    overscroll-behavior: contain;
    padding-bottom: var(--space-2);
    scrollbar-gutter: stable both-edges;
    -webkit-overflow-scrolling: touch;
}

.wheelPrizeList {
    display: grid;
    width: 1500px;
    min-width: 1500px;
    border-top: 1px solid var(--border);
}

.wheelGroupPicker {
    max-width: 360px;
}

.wheelPrizeEmpty {
    display: flex;
    min-height: 96px;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--border);
    border-radius: var(--radius-control);
    background: var(--bg-card-strong);
    color: var(--text-tertiary);
    font-size: 13px;
    font-weight: 700;
}

.wheelPrizeRow {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    width: 1500px;
    min-width: 1500px;
    gap: var(--space-4);
    align-items: center;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border);
}

.wheelPrizeRow[draggable="true"] {
    cursor: grab;
}

.wheelPrizeIndex {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-control);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 800;
}

.wheelPrizeFields {
    display: grid;
    grid-template-columns:
        minmax(130px, 1.1fr)
        minmax(120px, 0.8fr)
        minmax(120px, 0.8fr)
        minmax(100px, 0.7fr)
        minmax(100px, 0.7fr)
        minmax(100px, 0.7fr)
        minmax(100px, 0.7fr)
        minmax(130px, 1fr);
    gap: var(--space-3);
}

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

.wheelSummaryItem {
    display: grid;
    min-width: 0;
    gap: 4px;
    padding: var(--space-3);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-control);
    background: var(--bg-card-strong);
}

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

.wheelSummaryItem strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 800;
}

.wheelStatsDialog :global(.MuiDialog-paper) {
    border-radius: var(--radius-card);
}

.wheelStatsTable {
    display: grid;
    min-width: 0;
    gap: var(--space-3);
    margin-top: var(--space-5);
}

.wheelStatsTable h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 800;
}

.wheelRewardCell {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.wheelRewardCell strong {
    color: var(--text-primary);
    font-weight: 800;
}

.wheelRewardCell span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--text-tertiary);
    font-size: 12px;
}

@media (max-width: 720px) {
    .ratioGrid,
    .ratioTable {
        grid-template-columns: minmax(0, 1fr);
    }

    .ratioTableHeader {
        display: none;
    }

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

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

.reportTargetType {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-primary);
    font-weight: 700;
    white-space: nowrap;
}

.reportReason {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-primary);
    line-height: 1.55;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

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

.reportImage,
.reportImageCount {
    display: inline-flex;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    background: var(--bg-card-strong);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

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

@media (max-width: 640px) {
    .detailGrid {
        grid-template-columns: 1fr;
    }

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