/*
 * Admin redesign (2026-11-22): Provider payables, Reports, Organizations and
 * Organizations > Settings. Tokens only. Spacing on the 4pt scale.
 * Every class here starts with "rd-po-".
 */

/* A number column: right-aligned, never wrapped. */
.rd-po-num { text-align: right; white-space: nowrap; }
td.rd-po-num { font-variant-numeric: tabular-nums; }

/* A name or a period in a table stays on one line; the table scrolls in its card. */
.rd-po-nowrap { white-space: nowrap; }

.rd-po-empty { padding: 24px; color: var(--color-text-2); text-align: center; }

/* Column heading for the action column: read by screen readers only. */
.rd-po-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* The state line of a view. A section has no padding of its own. */
.rd-po-status { margin: 0; padding: 12px 24px; }
.rd-po-status:empty { display: none; }
.rd-panel-body > .rd-po-status { padding: 12px 0 0; }

.stats-grid.rd-po-stats { margin: 0; padding: 16px 24px; }
.rd-po-stats:empty { display: none; }

/* The buttons of a row. */
.rd-po-row-actions { display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 8px; }

/* An action with the values it uses: the inputs sit beside the button. */
.rd-po-action {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin: 16px 24px;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface-1);
}

/* The Organizations list: a row opens the organization beside the list. */
.rd-po-split { padding: 16px 24px; }
.rd-po-split > .table-container { border: 1px solid var(--color-border); border-radius: 12px; }
.rd-po-rows > tr[data-organization-id] { cursor: pointer; }
.rd-po-rows > tr[aria-current="true"] > td { background: var(--color-surface-2); }
.rd-po-rows > tr[data-organization-id]:focus-visible { outline: 2px solid var(--color-action-primary); outline-offset: -2px; }
.rd-po-search { flex: 1 1 240px; min-width: 0; max-width: 360px; }

/* Settings: two cards side by side. */
.rd-po-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
    padding: 16px 24px;
}
.rd-po-cards .rd-panel-head { flex-wrap: wrap; }
.rd-po-check { display: flex; align-items: center; gap: 8px; }
.rd-po-fieldset { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.rd-po-fieldset > legend { padding: 0; margin: 0 0 4px; color: var(--color-text-2); }
.rd-po-cards .rd-kv { margin-top: 16px; }

@media (max-width: 1100px) {
    .rd-po-cards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
    .rd-po-status { padding: 12px 16px; }
    .stats-grid.rd-po-stats,
    .rd-po-split,
    .rd-po-cards { padding: 12px 16px; }
    .rd-po-action { margin: 12px 16px; padding: 12px; }
    .rd-po-action > .btn { width: 100%; }
    .rd-po-search { max-width: none; }
}
