/* Shared presentation contract. Loaded after feature styles; no financial behavior lives here. */
:root {
    --ui-text: #203b30;
    --ui-muted: #536b5f;
    --ui-line: #dce6df;
    --ui-surface: #fff;
    --ui-space: 20px;
    --ui-control: 40px;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    color: var(--ui-text);
}

.workspace {
    font-size: 14px;
    line-height: 1.6;
}

.workspace-main {
    min-width: 0;
}

.workspace .content {
    width: 100%;
    max-width: 1440px;
    margin-inline: auto;
    padding: 32px clamp(20px, 3vw, 44px) 48px;
}

.workspace .eyebrow, .login-page .eyebrow {
    display: none;
}

.workspace h1 {
    font-size: 28px;
    line-height: 1.35;
    margin: 0 0 10px;
    letter-spacing: -.035em;
}

.workspace h2 {
    font-size: 19px;
    line-height: 1.4;
}

.workspace h3 {
    font-size: 16px;
    line-height: 1.5;
}

.workspace .muted, .workspace .page-heading p {
    color: var(--ui-muted);
    font-size: 14px;
    line-height: 1.65;
}

.workspace .page-heading {
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
}

.workspace .page-heading p {
    margin: 0;
    max-width: 72ch;
}

.workspace .topbar {
    height: auto;
    min-height: 64px;
    padding: 14px 28px;
    gap: 12px;
}

.workspace .topbar > span, .workspace .account {
    font-size: 13px;
}

.workspace .account {
    flex-wrap: wrap;
    min-width: 0;
}

.workspace .account > span:first-child {
    max-width: 240px;
    overflow-wrap: anywhere;
}

.workspace .sidebar {
    padding: 24px 16px;
}

.workspace .sidebar .brand {
    margin-bottom: 24px;
}

.navigation-body {
    min-width: 0;
}

.workspace .nav-label {
    display: none;
}

.workspace .sidebar-groups {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.workspace .nav-group > summary {
    font-size: 13px;
    padding: 8px 10px;
    min-height: 40px;
}

.workspace .nav-item, .workspace .nav-children .nav-item {
    font-size: 14px;
    min-height: 40px;
    padding: 9px 12px;
    line-height: 1.5;
    justify-content: flex-start;
    text-align: left;
}

.workspace .nav-children {
    margin: 4px 0 0;
    padding: 0;
    border: 0;
}

.menu-toggle {
    display: none;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 1000;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    background: #fff;
    color: #164d38;
}

.skip-link:focus {
    width: auto;
    height: auto;
    clip-path: none;
    padding: 12px 20px;
}

.workspace :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible {
    outline: 3px solid #347b60;
    outline-offset: 3px;
}

.workspace label {
    font-size: 14px;
    line-height: 1.5;
    color: #3f594b;
}

.workspace input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]),
.workspace select, .workspace .management-section input:not([type=hidden]):not([type=checkbox]), .workspace .management-section select,
.workspace #fee-settings input:not([type=hidden]), .workspace #fee-settings select {
    width: 100%;
    min-width: 0;
    height: var(--ui-control);
    min-height: var(--ui-control);
    padding: 8px 12px;
    border: 1px solid #bfcfc4;
    border-radius: 8px;
    font-size: 14px;
    line-height: 22px;
    background-color: white;
    color: #203b30;
}

.workspace select, .workspace #fee-settings select {
    padding-right: 36px;
}

.workspace input:disabled, .workspace select:disabled {
    background: #f0f3f1;
    color: #64776c;
}

.workspace textarea {
    font-size: 14px;
    min-height: 96px;
    max-width: 100%;
    border-color: #bfcfc4;
}

.workspace label > :is(input,select,textarea) {
    margin-top: 7px;
}

.workspace .management-section label > :is(input,select,textarea), .workspace .statistics-filters label > :is(input,select) {
    margin-top: 0;
}

.workspace .button, .workspace .management-section .button, .workspace :is(.statistics-primary,.statistics-reset) {
    height: auto;
    min-height: var(--ui-control);
    padding: 8px 16px;
    font-size: 14px;
    line-height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    white-space: normal;
}

.workspace button {
    cursor: pointer;
}

.workspace button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.workspace .button.primary, .statistics-primary {
    background: #205b43;
    border-color: #205b43;
    color: #fff;
}

.workspace .button.primary:hover:not(:disabled), .statistics-primary:hover {
    background: #164631;
}

.workspace .text-button {
    min-height: 40px;
    font-size: 13px;
}

.workspace :is(.form-grid,.filters,.statistics-filters) {
    gap: 16px 20px;
}

.workspace :is(.form-grid,.filters,.statistics-filters) > * {
    min-width: 0;
}

.workspace :is(.row-actions,.record-actions,.reservation-footer,.organization-editor-actions,.dialog-actions,.registration-actions) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.workspace .row-actions, .workspace .management-section td .row-actions {
    min-width: 0;
}

.workspace .row-actions .button, .workspace .management-section td .row-actions .button {
    min-height: 36px;
    height: auto;
    padding: 6px 12px;
    font-size: 13px;
}

.workspace .summary-grid {
    display: grid;
    grid-template-columns:repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.workspace .summary-grid:has(.own-income-card) {
    grid-template-columns:repeat(3, minmax(0, 1fr));
}

.workspace .summary-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    padding: 22px;
    border-radius: 12px;
    min-width: 0;
}

.workspace .summary-card > span {
    font-size: 14px;
    color: var(--ui-muted);
    line-height: 1.5;
}

.workspace .summary-card > strong {
    font-size: 28px;
    margin: 0;
    color: #214d38;
    line-height: 1.35;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.workspace .summary-card small {
    font-size: 13px;
    white-space: nowrap;
    word-break: keep-all;
}

.workspace .summary-card > strong {
    word-break: keep-all;
    overflow-wrap: normal;
}

.workspace .summary-card > strong:has(>span) {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
}

.workspace .summary-card > strong > span {
    white-space: nowrap;
}

.workspace .summary-card > span, .workspace .summary-card > p {
    word-break: keep-all;
}

.workspace .point-summary, .workspace .point-summary:has(.own-income-card) {
    grid-template-columns:repeat(3, minmax(0, 1fr));
}

.workspace .summary-card > p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--ui-muted);
    margin: 0;
}

.workspace .summary-card.own-income-card {
    background: #eaf5ee;
    border-color: #bfd9c8;
    grid-column: 1/-1;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.workspace .own-income-card > strong {
    margin-right: auto;
}

.workspace :is(.management-panel,.record-card,.statistics-filter-card) {
    border-radius: 12px;
}

.workspace .management-panel {
    padding: 24px;
}

.workspace .record-card {
    padding: 20px;
    margin-top: 16px;
}

.workspace .record-heading {
    gap: 16px;
    align-items: flex-start;
}

.workspace .record-heading strong {
    overflow-wrap: anywhere;
}

.workspace .panel-heading {
    gap: 16px;
    flex-wrap: wrap;
}

.workspace .panel-heading h2 {
    margin: 0;
}

.workspace .data-panel .panel-heading {
    padding: 20px;
}

.workspace table {
    font-size: 14px;
}

.workspace table th {
    font-size: 13px;
    color: #4d6657;
}

.workspace table td {
    font-size: 14px;
}

.workspace .management-section :is(th,td) {
    padding: 14px 16px;
}

.workspace table .amount-cell {
    font-variant-numeric: tabular-nums;
}

.workspace :is(.table-wrap,.deposit-table-wrap,.statistics-table-scroll,.merchant-statistics-scroll) {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.workspace table.is-empty {
    min-width: 0 !important;
    width: 100%;
    table-layout: auto;
}

.workspace table.is-empty thead, .workspace table.is-empty colgroup {
    display: none;
}

.workspace table.is-empty td {
    white-space: normal;
    text-align: center;
    padding: 32px 20px;
}

.workspace .empty-state {
    padding: 32px 20px;
    color: var(--ui-muted);
    white-space: normal;
    font-size: 14px;
}

.workspace .empty-state h3 {
    font-size: 16px;
}

.workspace .empty-state p, .workspace .empty-state span {
    font-size: 14px;
    line-height: 1.6;
}

.workspace .wallet-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.workspace .wallet-tabs a {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 14px;
}

.workspace .wallet-overview {
    gap: 24px 40px;
}

.workspace .wallet-overview strong {
    font-size: 24px;
}

.workspace .wallet-settings {
    padding: 12px 16px;
    margin: 14px 0;
}

.workspace .wallet-settings summary {
    font-size: 14px;
    min-height: 24px;
}

.workspace .wallet-toolbar {
    padding-bottom: 0;
    gap: 16px;
}

.workspace .workspace-dialog, .workspace .fee-dialog {
    width: min(980px, calc(100vw - 40px));
    max-width: calc(100vw - 40px);
    max-height: calc(100dvh - 48px);
    padding: 24px;
    border: 1px solid #dce6df;
    border-radius: 16px;
    overflow: auto;
    overscroll-behavior: contain;
    box-shadow: 0 24px 80px #123c2833;
}

.workspace dialog::backdrop {
    background: #172e2380;
}

.workspace .dialog-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.workspace .dialog-heading h2 {
    margin: 0;
}

.workspace .organization-registration {
    grid-template-columns:repeat(2, minmax(0, 1fr));
    margin: 24px 0 0;
}

.workspace .registration-actions {
    grid-column: 1/-1;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--ui-line);
}

.workspace .fee-dialog {
    padding: 0;
    height: min(840px, calc(100dvh - 48px));
    overflow: hidden;
}

.workspace .fee-dialog #fee-settings {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows:auto minmax(0, 1fr) auto;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #f7faf8;
}

.workspace .fee-dialog-body {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0 24px 20px;
}

.workspace #fee-settings .record-heading {
    position: static;
    z-index: 2;
    padding: 18px 24px;
    margin: 0;
    border-bottom: 1px solid var(--ui-line);
    background: #f7faf8;
}

.workspace #fee-settings .fee-columns {
    gap: 20px;
}

.workspace #fee-settings .fee-column {
    padding: 18px;
    gap: 16px;
}

.workspace #fee-settings .fee-column h3 {
    font-size: 16px;
}

.workspace #fee-settings .fee-column p, .workspace #fee-settings .deposit-fee-section > p {
    font-size: 13px;
    color: var(--ui-muted);
    line-height: 1.6;
}

.workspace #fee-settings .fee-shared-review {
    gap: 16px;
    align-items: end;
}

.workspace #fee-settings .fee-preview {
    min-height: 150px;
    font-size: 14px;
}

.workspace #fee-settings .fee-preview p {
    font-size: 14px;
}

.workspace #fee-settings .fee-breakdown-grid {
    gap: 12px;
}

.workspace #fee-settings .fee-breakdown-grid strong {
    font-size: 22px;
}

.workspace #fee-settings .fee-modal-footer {
    position: static;
    background: #f7faf8;
    border-top: 1px solid var(--ui-line);
    padding: 16px 24px;
    margin: 0;
    display: flex;
    justify-content: flex-end;
}

.workspace #fee-settings .fee-modal-footer .button {
    width: auto;
    min-width: 160px;
}

.workspace .statistics-filters label {
    font-size: 14px;
    max-width: 240px;
}

.workspace .statistics-basis, .workspace .statistics-footnote, .workspace .statistics-overview dt, .workspace .statistics-status small {
    font-size: 13px;
    color: var(--ui-muted);
}

.workspace .statistics-overview {
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.workspace .statistics-overview article {
    padding: 22px;
}

.workspace .statistics-overview header {
    font-size: 14px;
    flex-wrap: wrap;
}

.workspace .statistics-overview strong {
    font-size: 28px;
}

.workspace .statistics-overview dd {
    font-size: 16px;
    word-break: keep-all;
    overflow-wrap: normal;
}

.workspace .statistics-distribution strong {
    font-size: 23px;
    overflow-wrap: anywhere;
}

.workspace .statistics-scope {
    font-size: 13px;
}

.workspace .merchant-statistics-heading {
    flex-wrap: wrap;
}

.workspace .merchant-name small, .workspace .merchant-policy span {
    font-size: 13px;
    color: var(--ui-muted);
}

.workspace .merchant-policy strong {
    font-size: 14px;
}

.workspace .statistics-table-card table {
    font-size: 14px;
}

.workspace .statistics-table-card thead th {
    font-size: 13px;
}

.workspace .statistics-table-card .statistics-zero {
    color: #63796a;
}

.workspace .notice, .workspace .error, .workspace [role=alert] {
    overflow-wrap: anywhere;
    line-height: 1.6;
}

@media (max-width: 1000px) {
    .workspace .statistics-filters label {
        max-width: none;
    }

    .workspace .content {
        padding: 24px;
    }

    .workspace .statistics-overview {
        gap: 16px;
    }
}

@media (max-width: 760px) {
    :root {
        --ui-control: 44px;
    }

    .workspace .content {
        padding: 24px 16px 32px;
    }

    .workspace .sidebar {
        display: flex;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        justify-content: space-between;
        position: static;
        width: 100%;
        padding: 10px 16px;
        gap: 0;
        border-bottom: 1px solid var(--ui-line);
    }

    .workspace .sidebar .brand {
        margin: 0;
        padding: 0;
        font-size: 24px;
    }

    .workspace .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 8px 14px;
        background: white;
        color: #254d39;
        border: 1px solid #c9d9ce;
        border-radius: 8px;
        font-size: 14px;
    }

    .workspace .navigation-body {
        flex-basis: 100%;
        padding-top: 16px;
    }

    .workspace .navigation-ready:not(.navigation-open) .navigation-body {
        display: none;
    }

    .workspace .sidebar-groups {
        display: flex;
        gap: 16px;
    }

    .workspace .nav-group > summary {
        min-height: 44px;
    }

    .workspace .nav-children {
        display: grid;
        grid-template-columns:repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .workspace .nav-item, .workspace .nav-children .nav-item {
        min-height: 44px;
    }

    .workspace .topbar {
        padding: 12px 16px;
        min-height: 56px;
    }

    .workspace .topbar > span {
        display: none;
    }

    .workspace .account {
        width: 100%;
        gap: 8px;
    }

    .workspace .account form {
        margin-left: auto;
    }

    .workspace .account > span:first-child {
        max-width: 55%;
    }

    .workspace h1 {
        font-size: 24px;
    }

    .workspace .page-heading {
        align-items: flex-start;
        gap: 12px;
    }

    .workspace .page-heading .button {
        width: auto;
    }

    .workspace .summary-grid, .workspace .summary-grid:has(.own-income-card) {
        grid-template-columns:repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .workspace .summary-card {
        padding: 16px;
        gap: 8px;
    }

    .workspace .summary-card > strong {
        font-size: 24px;
    }

    .workspace .summary-card.own-income-card {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .workspace .own-income-card > .button {
        align-self: flex-end;
    }

    .workspace .summary-card > p {
        font-size: 12px;
    }

    .workspace :is(.management-panel,.statistics-filter-card) {
        padding: 16px;
    }

    .workspace .management-section .organization-registration {
        grid-template-columns:1fr;
        gap: 18px;
        margin-bottom: 0;
    }

    .workspace .management-section .registration-actions {
        display: flex;
    }

    .workspace .record-card {
        padding: 16px;
    }

    .workspace .record-heading {
        flex-wrap: wrap;
    }

    .workspace .statistics-overview {
        grid-template-columns:1fr;
    }

    .workspace .statistics-filters label {
        flex-basis: calc(50% - 10px);
        max-width: none;
    }

    .workspace .statistics-tabs a {
        flex: 1;
        text-align: center;
    }

    .workspace .statistics-period {
        gap: 8px;
        flex-wrap: wrap;
    }

    .workspace .statistics-period > span:last-child {
        margin-left: 0;
    }

    .workspace .statistics-distribution {
        grid-template-columns:1fr;
        gap: 10px;
    }

    .workspace .statistics-distribution > div {
        flex-direction: row;
        justify-content: space-between;
        gap: 12px;
    }

    .workspace .merchant-statistics-scroll::before, .workspace .statistics-table-scroll::before {
        content: '좌우로 이동하여 전체 내역을 확인하세요';
        display: block;
        position: sticky;
        left: 0;
        padding: 10px 12px;
        font-size: 12px;
        color: #4d6657;
        background: #f3f7f4;
    }

    .workspace .workspace-dialog, .workspace .fee-dialog {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        max-height: calc(100dvh - 24px);
        border-radius: 12px;
        padding: 18px;
    }

    .workspace .fee-dialog {
        padding: 0;
        height: min(840px, calc(100dvh - 48px));
        overflow: hidden;
    }

    .workspace .fee-dialog #fee-settings {
        padding: 0;
    }

    .workspace .fee-dialog-body {
        padding: 0 18px 18px;
    }

    .workspace #fee-settings .record-heading {
        padding: 16px 18px;
    }

    .workspace #fee-settings .fee-columns {
        grid-template-columns:1fr;
        gap: 14px;
    }

    .workspace #fee-settings .fee-column {
        grid-template-columns:repeat(2, minmax(0, 1fr));
    }

    .workspace #fee-settings .fee-column h3, .workspace #fee-settings .fee-column p {
        grid-column: 1/-1;
    }

    .workspace #fee-settings .fee-shared-review {
        flex-direction: column;
        align-items: stretch;
    }

    .workspace #fee-settings .fee-shared-review label {
        width: 100%;
    }

    .workspace #fee-settings .fee-breakdown-grid {
        grid-template-columns:1fr;
    }

    .workspace #fee-settings .fee-breakdown-grid > div {
        display: grid;
        grid-template-columns:1fr auto;
        gap: 4px 12px;
    }

    .workspace #fee-settings .fee-breakdown-grid small {
        grid-column: 1/-1;
    }

    .workspace #fee-settings .fee-modal-footer {
        padding: 14px 18px;
    }

    .workspace #fee-settings .fee-modal-footer .button {
        width: 100%;
    }

    .workspace table.responsive-list {
        display: block;
        min-width: 0;
        width: 100%;
        table-layout: auto;
    }

    .workspace .responsive-list > thead, .workspace .responsive-list > colgroup {
        display: none;
    }

    .workspace .responsive-list > tbody {
        display: block;
        width: 100%;
    }

    .workspace .responsive-list .responsive-record {
        display: grid;
        grid-template-columns:minmax(0, 1fr);
        height: auto !important;
        padding: 16px;
        border-bottom: 1px solid var(--ui-line);
        gap: 10px;
    }

    .workspace .responsive-list .responsive-record > td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
        min-width: 0;
        width: 100%;
        height: auto !important;
        padding: 0 !important;
        border: 0;
        font-size: 14px;
        text-align: right;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .workspace .responsive-list .responsive-record > td::before {
        content: attr(data-label);
        text-align: left;
        word-break: keep-all;
        overflow-wrap: normal;
        color: var(--ui-muted);
        font-size: 13px;
        flex: 0 0 95px;
    }

    .workspace .responsive-list .responsive-record > td:first-child {
        font-weight: 700;
    }

    .workspace .responsive-list .responsive-record > td .row-actions {
        justify-content: flex-end;
    }

    .workspace .responsive-list .responsive-record > td :is(.button,.refresh-button,.retry-button) {
        min-height: 44px;
    }

    .workspace .responsive-list tr:not(.responsive-record) {
        display: block;
    }

    .workspace .responsive-list tr:not(.responsive-record) > td {
        display: block;
        width: 100%;
        padding: 16px;
        white-space: normal;
    }

    .workspace .responsive-list .organization-editor {
        padding: 0;
    }

    .workspace .management-section .organization-info-form {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .workspace .management-section .organization-info-form label {
        width: 100%;
    }

    .workspace .management-section .wallet-assignment label {
        min-width: 0;
        width: 100%;
    }

    .workspace .wallet-toolbar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .workspace .wallet-balance-action, .workspace .wallet-assignment {
        width: 100%;
    }

    .workspace .wallet-balance-action .button {
        width: 100%;
    }

    .workspace .hold-pagination {
        gap: 10px;
        flex-wrap: wrap;
    }
}

@media (max-width: 380px) {
    .workspace .summary-grid, .workspace .summary-grid:has(.own-income-card) {
        grid-template-columns:1fr;
    }

    .workspace .statistics-filters label {
        flex-basis: 100%;
    }

    .workspace #fee-settings .fee-column {
        grid-template-columns:1fr;
    }

    .workspace .statistics-overview dl {
        grid-template-columns:1fr;
    }

    .workspace .statistics-overview dl > div {
        display: flex;
        justify-content: space-between;
        gap: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}

.auth-workspace {
    display: block;
    padding: 24px 16px;
}

.auth-workspace .content {
    max-width: 540px;
    margin: 24px auto;
    padding: 28px;
}

@media (max-width: 760px) {
    .auth-workspace .content {
        padding: 20px;
    }
}

/* Three balance cards stay balanced: one column when the content area is narrow. */
@media (max-width: 1100px) {
    .workspace .point-summary, .workspace .point-summary:has(.own-income-card) {
        grid-template-columns:1fr;
    }

    .workspace .point-summary .summary-card {
        gap: 10px;
    }
}


.balance-disclosure {
    display: none;
}

.workspace .balance-mobile-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid var(--ui-line);
    background: #fff;
}

.workspace .balance-mobile-pagination button {
    min-height: 44px;
    padding: 8px 14px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #315840;
    font-size: 14px;
}

.workspace .balance-mobile-pagination button:hover:not(:disabled) {
    background: #edf5f0;
}

.workspace .balance-mobile-pagination span {
    font-size: 13px;
    color: var(--ui-muted);
    text-align: center;
}

.workspace :is(.table-wrap,.table-scroll,.deposit-table-wrap):has(table:not(.is-empty)),
.workspace :is(.statistics-table-scroll,.merchant-statistics-scroll) {
    max-height: clamp(280px, 55dvh, 560px);
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.workspace :is(.table-wrap,.table-scroll,.deposit-table-wrap) thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f3f7f4;
}

.workspace .text-action, .workspace .management-section .text-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #315840;
    font-size: 14px;
    line-height: 1.5;
}

.workspace .text-action:hover {
    background: #edf5f0;
}

.workspace .text-action[aria-expanded]::after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 4px;
}

.workspace .text-action[aria-expanded=true]::after {
    transform: rotate(225deg);
}

.workspace .dialog-heading [data-dialog-close], .workspace #fee-settings [data-fee-close] {
    border: 0;
    background: transparent;
}

@media (max-width: 760px) {
    .workspace .mobile-balance-list .responsive-record {
        padding: 0;
        gap: 0;
    }

    .workspace .mobile-balance-list .responsive-record > td:first-child {
        display: block;
        text-align: left;
        font-size: 15px;
    }

    .workspace .mobile-balance-list .responsive-record > td:first-child::before, .balance-desktop-name {
        display: none;
    }

    .workspace .balance-disclosure {
        display: block;
        width: 100%;
    }

    .workspace .balance-disclosure > summary {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 18px 16px;
        min-height: 88px;
        cursor: pointer;
        list-style: none;
        font-weight: 400;
    }

    .workspace .balance-disclosure > summary::-webkit-details-marker {
        display: none;
    }

    .workspace .balance-disclosure > summary::after {
        content: '';
        position: absolute;
        right: 20px;
        top: 23px;
        width: 7px;
        height: 7px;
        border-right: 1.5px solid #557364;
        border-bottom: 1.5px solid #557364;
        transform: rotate(45deg);
    }

    .workspace .balance-disclosure[open] > summary::after {
        transform: rotate(225deg);
    }

    .workspace .balance-disclosure > summary > strong {
        padding-right: 28px;
        font-size: 15px;
        overflow-wrap: anywhere;
    }

    .workspace .balance-disclosure-amount {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 16px;
        font-size: 13px;
        color: var(--ui-muted);
    }

    .workspace .balance-disclosure-amount strong {
        font-size: 17px;
        color: #214d38;
        font-variant-numeric: tabular-nums;
    }

    .workspace .balance-disclosure dl {
        margin: 0;
        padding: 0 16px 18px;
        font-weight: 400;
    }

    .workspace .balance-disclosure dl > div {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 20px;
        padding: 8px 0;
        border-top: 1px solid #edf1ee;
    }

    .workspace .balance-disclosure dt {
        font-size: 13px;
        color: var(--ui-muted);
        word-break: keep-all;
    }

    .workspace .balance-disclosure dd {
        margin: 0;
        text-align: right;
        font-size: 14px;
        overflow-wrap: anywhere;
    }

    .workspace .text-action {
        min-height: 44px;
    }
}

.workspace .organization-list th.action-column, .workspace .organization-list td.action-column {
    text-align: center;
    vertical-align: middle;
}

.workspace .organization-list .action-column .row-actions {
    justify-content: center;
}

.workspace .organization-list .fee-action-column > .button {
    white-space: nowrap;
}

@media (max-width: 760px) {
    .workspace .organization-list.responsive-list td.action-column {
        text-align: right;
    }

    .workspace .organization-list.responsive-list .action-column .row-actions {
        justify-content: flex-end;
    }
}

/* Keep filter labels and their action group on the same control baseline. */
.workspace .statistics-filters > label {
    margin: 0;
}

.statistics-filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    margin: 0;
}

.workspace .statistics-filter-actions :is(button,a) {
    height: var(--ui-control);
    min-height: var(--ui-control);
    padding: 0 16px;
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .statistics-filter-actions {
        flex-basis: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 480px) {
    .statistics-filter-actions :is(button,a) {
        flex: 1;
    }
}

/* Shared account controls: one identity, compact notification trigger, consistent logout action. */
.workspace .account-controls {
    display: flex;
    flex-wrap: nowrap;
    gap: 14px;
    align-items: center;
    margin-left: auto;
}

.account-identity {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    max-width: 200px;
    gap: 1px;
}

.workspace .account-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workspace .account-role {
    font-size: 11px;
    line-height: 1.4;
    color: #738278;
}

.workspace .account-controls form {
    margin: 0;
    flex: 0 0 auto;
}

.workspace .account-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    padding: 6px 9px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #65776b;
    font-size: 12px;
    white-space: nowrap;
}

.workspace .account-logout:hover {
    background: #eef4f0;
    color: #234d36;
}

@media (max-width: 1024px) {
    .workspace .account-controls {
        gap: 10px;
    }

    .account-identity {
        max-width: 160px;
    }
}

@media (max-width: 760px) {
    .workspace .account-controls {
        width: 100%;
        gap: 12px;
    }

    .account-identity {
        max-width: none;
        flex: 1;
    }

    .workspace .account-controls form {
        margin: 0;
    }

    .workspace .account-logout {
        min-height: 40px;
    }
}
