/* A task selector, aligned input rows, and results kept with their question. */
body.workspace-ui .checks-workspace [hidden],
body.workspace-ui #workspace-new-check[hidden] { display: none !important; }
body.workspace-ui .checks-composer { min-width: 0; }
body.internal-ui.workspace-ui .checks-composer > .card-header { padding: 0 24px; }
body.workspace-ui .checks-tool-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
body.internal-ui.workspace-ui .checks-tool-tabs .nav-link {
    display: flex; gap: 12px; align-items: center; width: 100%; min-height: 88px;
    padding: 18px 4px; border: 0; border-bottom: 3px solid transparent;
    border-radius: 0; color: #56666e; background: transparent;
    font: inherit; font-size: 15px; font-weight: 600; text-align: left; box-shadow: none;
}
body.workspace-ui .checks-tool-tabs .nav-link svg { width: 22px; height: 22px; flex: 0 0 22px; stroke-width: 1.6; }
body.workspace-ui .checks-tool-tabs .nav-link small { display: block; font-size: 12px; font-weight: 400; margin-top: 5px; color: #56666e; line-height: 1.45; }
body.internal-ui.workspace-ui .checks-tool-tabs .nav-link.active { color: #263d13; border-bottom-color: #91b846; background: transparent; }
body.workspace-ui .checks-tool-tabs .nav-link:hover { color: #20292e; }
body.workspace-ui .checks-task-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
body.workspace-ui .checks-task-heading h2 { font: 600 22px/1.3 Arial, Helvetica, sans-serif; letter-spacing: -.025em; color: #20292e; margin: 0 0 9px; }
body.workspace-ui .checks-task-heading p { color: #56666e; font-size: 14px; line-height: 1.65; max-width: 70ch; margin: 0; }
body.workspace-ui .checks-text-button { border: 0; border-radius: 4px; background: transparent; color: #365321; font: 500 13px/1.5 Arial, Helvetica, sans-serif; padding: 6px 0; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
body.workspace-ui .checks-task-heading > .checks-text-button { flex: 0 0 auto; }
body.workspace-ui .checks-query-grid { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(160px, .45fr) auto; gap: 16px; align-items: end; }
body.workspace-ui .checks-activity-grid { grid-template-columns: minmax(180px, 1fr) minmax(140px, .45fr) 125px auto; }
body.workspace-ui .checks-query-grid > div, body.workspace-ui .checks-payment-grid > div { min-width: 0; }
body.internal-ui.workspace-ui .checks-workspace .form-select { padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%2356666e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
body.internal-ui.workspace-ui .checks-workspace .btn:disabled { opacity: 1; color: #56666e; background: #e9eef0; border-color: #cbd5da; }
body.internal-ui.workspace-ui .checks-workspace :is(.form-control,.form-select):disabled { opacity: 1; color: #44535c; background-color: #f3f6f7; }
body.workspace-ui .checks-workspace label { display: block; font-size: 13px; font-weight: 600; color: #20292e; line-height: 1.5; margin-bottom: 8px; }
body.workspace-ui .checks-query-grid .form-control, body.workspace-ui .checks-query-grid .form-select,
body.workspace-ui .checks-query-grid > .btn, body.workspace-ui .checks-payment-grid .form-control,
body.workspace-ui .checks-payment-grid .form-select { height: 48px; min-height: 48px; }
body.internal-ui.workspace-ui .checks-query-grid > .btn { margin: 0; white-space: nowrap; align-self: end; }
body.workspace-ui .checks-payment-grid { display: grid; grid-template-columns: minmax(150px, .35fr) minmax(220px, 1fr); align-items: end; gap: 20px; }
body.workspace-ui .checks-options { border-top: 1px solid #dce3e5; margin: 24px 0; padding-top: 14px; color: #56666e; font-size: 13px; }
body.workspace-ui .checks-options summary { cursor: pointer; width: fit-content; padding: 5px 0; }
body.workspace-ui .checks-options[open] label { margin-top: 18px; }
body.workspace-ui .checks-options .form-control { max-width: 320px; }
body.workspace-ui .checks-custom-token { margin-top: 20px; }
body.workspace-ui .checks-form-actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
body.workspace-ui .checks-form-actions .btn { min-height: 48px; }
body.workspace-ui .checks-form-actions p { margin: 0; color: #56666e; font-size: 13px; max-width: 45ch; line-height: 1.5; }
body.workspace-ui .checks-related { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; margin: 16px 0 22px; font-size: 12px; color: #56666e; }
body.workspace-ui .checks-related > span { line-height: 1.5; max-width: 68ch; }
body.workspace-ui .checks-empty { padding: 28px 0; margin: 0; border-top: 1px solid #dce3e5; font-size: 14px; color: #56666e; }
body.workspace-ui .checks-activity-summary { margin: 26px 0 22px; border-top: 1px solid #dce3e5; padding-top: 20px; }
body.workspace-ui .checks-activity-summary > p { margin: 0 0 14px; font-size: 12px; color: #56666e; }
body.workspace-ui .checks-activity-summary dl { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; margin: 0; }
body.workspace-ui .checks-activity-summary dt { font-size: 13px; font-weight: 400; color: #56666e; margin-bottom: 6px; }
body.workspace-ui .checks-activity-summary dd { font-size: 20px; font-weight: 600; margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
body.workspace-ui #usdt-error, body.workspace-ui #usdt-loading { padding: 16px; border-left: 3px solid #80994f; background: #f5f8ef; font-size: 14px; line-height: 1.6; }
body.workspace-ui #usdt-error { border-color: #a6513e; color: #813a2a; background: #fff4ef; }
body.workspace-ui #usdt-table tbody:empty { display: none; }
body.workspace-ui #usdt-table:not(:has(tbody tr)) { display: none; }
body.workspace-ui #usdt-table a { color: #365321; text-decoration: underline; text-underline-offset: 3px; }
body.workspace-ui #usdt-table td:nth-child(3), body.workspace-ui #usdt-table td:nth-child(4),
body.workspace-ui #usdt-table td:nth-child(6) { min-width: 150px; max-width: 230px; white-space: normal; overflow-wrap: anywhere; }
body.workspace-ui #usdt-table code { color: #3d4e56; font-size: 12px; }
body.workspace-ui #usdt-table td:last-child .btn { white-space: nowrap; }
body.workspace-ui #usdt-results-note { font-size: 12px; line-height: 1.6; margin: 16px 0 0; color: #56666e; }
body.workspace-ui .checks-history-heading, body.workspace-ui .checks-history-heading > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
body.workspace-ui .checks-history-heading .card-title { margin: 0; }
body.workspace-ui #manual-checks-table .wallet-history-row { cursor: pointer; }
body.workspace-ui #manual-checks-table .wallet-history-row:hover > td { background: #f0f5e8; --bs-table-accent-bg: #f0f5e8; color: #20292e; }
body.workspace-ui #manual-checks-table .wallet-history-row.is-selected > td { background: #eaf2dd; --bs-table-accent-bg: #eaf2dd; color: #263d13; }
body.workspace-ui #manual-checks-table .wallet-history-row.is-selected > td:first-child { box-shadow: inset 3px 0 #547128; }
body.workspace-ui #manual-checks-table .wallet-history-row:focus-visible { outline: 2px solid #547128; outline-offset: -2px; }
body.workspace-ui .checks-history-heading select { width: auto; }
body.workspace-ui .checks-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
body.workspace-ui .checks-pagination > div { display: flex; gap: 8px; }
body.workspace-ui #payment-check-result { border-top: 1px solid #dce3e5; margin-top: 28px; padding-top: 24px; scroll-margin-top: 84px; }
body.workspace-ui #payment-check-result h2, body.workspace-ui #payment-check-result h3 { font: 600 21px/1.4 Arial, Helvetica, sans-serif; color: #20292e; letter-spacing: -.02em; }
body.workspace-ui #payment-check-result p { font-size: 14px; line-height: 1.65; color: #56666e; max-width: 75ch; overflow-wrap: anywhere; }
body.workspace-ui #payment-check-result dl { display: grid; grid-template-columns: minmax(90px, max-content) minmax(0, 1fr); gap: 8px 18px; font-size: 14px; margin-block: 20px; }
body.workspace-ui #payment-check-result dt { color: #56666e; font-weight: 400; }
body.workspace-ui #payment-check-result dd { overflow-wrap: anywhere; margin: 0; }
body.workspace-ui #payment-check-result details { margin-top: 20px; padding-block: 16px; border-top: 1px solid #dce3e5; font-size: 14px; }
body.workspace-ui #payment-check-result summary { cursor: pointer; font-weight: 600; margin-bottom: 12px; }
body.workspace-ui #payment-check-result pre { padding: 16px; background: #f6f8f8; color: #20292e; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; }
body.workspace-ui #payment-check-result .payment-flow-notice:not(:empty) { padding: 12px 16px; border-left: 3px solid #a5bc79; background: #f3f7eb; color: #334524; }
body.workspace-ui #payment-check-result .payment-flow[data-phase="failed"] .payment-flow-notice:not(:empty),
body.workspace-ui #payment-check-result .payment-flow[data-phase="reconciliation_required"] .payment-flow-notice:not(:empty) { color: #813a2a; border-left-color: #b26753; background: #fff4ef; }
body.workspace-ui .payment-flow-summary { margin: 24px 0 18px; padding: 22px 24px; border: 1px solid #dce3e5; border-radius: 12px; background: #f9faf8; }
body.workspace-ui #payment-check-result .payment-flow-score { font-size: clamp(20px, 2.4vw, 28px); font-weight: 600; line-height: 1.3; color: #20292e; margin-bottom: 12px; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
body.workspace-ui #payment-check-result .payment-flow-score[data-available="false"] { font-size: 18px; font-weight: 500; color: #56666e; letter-spacing: 0; }
body.workspace-ui #payment-check-result .payment-flow-decision { display: inline-block; padding: 4px 12px; margin: 0; border-radius: 5px; background: #e9eef0; color: #34474f; font-weight: 600; }
body.workspace-ui #payment-check-result .payment-flow-decision[data-decision="allow"] { background: #e4efd6; color: #355421; }
body.workspace-ui #payment-check-result .payment-flow-decision[data-decision="review"] { background: #f6ebd0; color: #77521c; }
body.workspace-ui #payment-check-result .payment-flow-decision[data-decision="reject"] { background: #f8e3dc; color: #853b2b; }
body.workspace-ui #payment-check-result .payment-flow-meta { margin-bottom: 0; padding-top: 20px; border-top: 1px solid #dce3e5; font-size: 13px; line-height: 1.65; }
body.workspace-ui .payment-flow-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
body.workspace-ui .payment-flow-actions .btn { min-height: 42px; font-size: 13px; }
body.workspace-ui .checks-workspace :focus-visible { outline: 3px solid #547128; outline-offset: 3px; }
body.workspace-ui .checks-workspace [role="tabpanel"]:focus { outline: none; }
@media (max-width: 1199px) {
    body.workspace-ui .checks-activity-grid { grid-template-columns: minmax(0,1fr) minmax(130px,.6fr) auto; }
    body.workspace-ui .checks-activity-grid .checks-address-field { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
    body.workspace-ui .checks-task-heading { display: block; }
    body.workspace-ui .checks-task-heading > button { margin-top: 12px; }
    body.workspace-ui .checks-query-grid, body.workspace-ui .checks-activity-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
    body.workspace-ui .checks-query-grid .checks-address-field { grid-column: 1 / -1; }
    body.workspace-ui .checks-activity-grid > button { grid-column: 1 / -1; }
    body.workspace-ui .checks-payment-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
    body.workspace-ui .checks-activity-summary dl { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
    body.internal-ui.workspace-ui .checks-composer > .card-header { padding: 0 12px; }
    body.workspace-ui .checks-tool-tabs { gap: 8px; }
    body.internal-ui.workspace-ui .checks-tool-tabs .nav-link { display: block; min-height: 82px; padding: 12px 2px; font-size: 13px; line-height: 1.35; text-align: center; }
    body.workspace-ui .checks-tool-tabs .nav-link svg { display: block; width: 18px; height: 18px; margin: 0 auto 7px; }
    body.workspace-ui .checks-tool-tabs .nav-link small { display: none; }
    body.workspace-ui .checks-task-heading h2 { font-size: 20px; }
    body.workspace-ui .checks-form-actions { display: grid; }
    body.workspace-ui .checks-form-actions .btn { width: 100%; }
    body.workspace-ui .checks-history-heading > div { width: 100%; }
    body.workspace-ui .checks-history-heading select { flex: 1; min-width: 0; }
    body.workspace-ui .payment-flow-summary { padding: 18px 16px; }
    body.workspace-ui #payment-check-result .payment-flow-meta { grid-template-columns: minmax(0,1fr); gap: 2px; }
    body.workspace-ui #payment-check-result .payment-flow-meta dd { margin-bottom: 10px; }
}
