/* compact/compact-workspace.css */
/* Administrator work-area density · 2026-11-06.
   CSS presentation only. The dashboard keeps its current hero. Existing hidden,
   disabled, disclosure and permission states remain authoritative. No controls,
   warnings, money values, rider pages, tables, print or exports are hidden. */
@media screen {
  /* Both checks are intentional: loading/no-pane and the dashboard are not
     internal work pages. Older WebViews without :has keep the existing layout. */
  #admin.admin-simple-workspace:has(#dashboard-pane[hidden]):has(.admin-content > section:not(#dashboard-pane):not([hidden])) > .admin-hero {
    min-height: 0 !important;
    margin-bottom: 12px !important;
    padding: 14px 20px !important;
    gap: 12px !important;
  }
  #admin.admin-simple-workspace:has(#dashboard-pane[hidden]):has(.admin-content > section:not(#dashboard-pane):not([hidden])) > .admin-hero .admin-hero-copy > .eyebrow {
    margin-bottom: 3px !important;
    letter-spacing: .06em !important;
  }
  #admin.admin-simple-workspace:has(#dashboard-pane[hidden]):has(.admin-content > section:not(#dashboard-pane):not([hidden])) > .admin-hero h1 {
    margin-bottom: 3px !important;
    font-size: 21px !important;
    line-height: 1.35 !important;
  }
  #admin.admin-simple-workspace:has(#dashboard-pane[hidden]):has(.admin-content > section:not(#dashboard-pane):not([hidden])) > .admin-hero p {
    font-size: 13px !important;
    line-height: 1.6 !important;
  }
  #admin.admin-simple-workspace:has(#dashboard-pane[hidden]):has(.admin-content > section:not(#dashboard-pane):not([hidden])) > .admin-hero .admin-hero-actions {
    gap: 9px !important;
  }
  #admin.admin-simple-workspace:has(#dashboard-pane[hidden]):has(.admin-content > section:not(#dashboard-pane):not([hidden])) > .admin-hero .admin-hero-branch-context {
    padding-block: 8px !important;
  }

  /* One workspace surface and one title divider. Keep the title description,
     selected branch, fields, notices and all contextual controls in place. */
  #admin.admin-simple-workspace .admin-content > section.workspace-card:not(#dashboard-pane) {
    padding: 22px !important;
  }
  #admin.admin-simple-workspace .admin-content > section:not(#dashboard-pane) > .section-title:first-child {
    min-height: 0 !important;
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    gap: 12px !important;
  }
  #admin.admin-simple-workspace .admin-content > section:not(#dashboard-pane) > .section-title:first-child > div {
    gap: 10px !important;
  }
  #admin.admin-simple-workspace .admin-content > section:not(#dashboard-pane) > .section-title:first-child .section-icon {
    width: 38px !important;
    height: 38px !important;
    flex-basis: 38px !important;
  }

  /* Only redundant container spacing; no editing-row or table dimensions. */
  #admin.admin-simple-workspace .admin-content :is(#raw-settlement-automation, #settlement-fees-workspace-host) .raw-automation-panel {
    margin-block: 12px !important;
  }
  #admin.admin-simple-workspace .admin-content .raw-automation-body {
    padding-inline: 16px;
    padding-bottom: 16px;
  }
  #admin.admin-simple-workspace .admin-content .raw-automation-intro {
    margin-block: 8px;
  }
  #admin.admin-simple-workspace .admin-content :is(.manual-upload-tabs, .settlement-history-view-switch,
    .partner-mission-tabs, .referral-workspace-tabs, .branch-workspace-tabs,
    .raw-automation-tabs, .raw-automation-fee-tabs, .raw-automation-settings-tabs) {
    margin-block: 10px 14px !important;
  }
  #admin.admin-simple-workspace .admin-content .admin-workspace-target {
    margin-block: 10px 14px;
    padding-block: 10px;
    gap: 4px 14px;
  }

  /* Existing low-emphasis help, not live errors or warnings. Stronger contrast
     and a readable minimum size replace tiny, pale secondary text. */
  #admin.admin-simple-workspace .admin-content .raw-automation-panel > summary small,
  #admin.admin-simple-workspace .admin-content .raw-automation-intro > p,
  #admin.admin-simple-workspace .admin-content .admin-workspace-target-label,
  #admin.admin-simple-workspace .admin-content .admin-workspace-target-note {
    color: #50647a;
  }
  #admin.admin-simple-workspace .admin-content .raw-automation-panel > summary small,
  #admin.admin-simple-workspace .admin-content [data-raw-week-hint] {
    font-size: 13px;
    line-height: 1.65;
  }
  #admin.admin-simple-workspace .admin-content [data-raw-week-hint] {
    color: #50647a;
  }
}

@media screen and (max-width: 760px) {
  #admin.admin-simple-workspace:has(#dashboard-pane[hidden]):has(.admin-content > section:not(#dashboard-pane):not([hidden])) > .admin-hero {
    padding: 12px 14px !important;
    gap: 10px !important;
  }
  #admin.admin-simple-workspace:has(#dashboard-pane[hidden]):has(.admin-content > section:not(#dashboard-pane):not([hidden])) > .admin-hero h1 {
    font-size: 20px !important;
  }
  #admin.admin-simple-workspace .admin-content > section.workspace-card:not(#dashboard-pane) {
    padding: 18px 14px !important;
  }
  #admin.admin-simple-workspace .admin-content > section:not(#dashboard-pane) > .section-title:first-child {
    margin-bottom: 14px !important;
    padding-bottom: 10px !important;
  }
  #admin.admin-simple-workspace .admin-content .raw-automation-body {
    padding-inline: 12px;
    padding-bottom: 14px;
  }
}

/* mobile/mobile-tables.css */
/* Mobile record presentation only. Values, ordering, details, disabled/hidden
   states, desktop tables and every export remain owned by the existing UI. */
@media screen and (max-width: 600px) {
  #admin #raw-settlement-automation :is(.raw-automation-history-wrap, .raw-automation-review-wrap) {
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  #admin #raw-settlement-automation :is(.raw-automation-history-table, .raw-automation-review-table),
  #admin #raw-settlement-automation :is(.raw-automation-history-table, .raw-automation-review-table) > tbody {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  /* Keep column headers in the accessibility tree instead of display:none. */
  #admin #raw-settlement-automation :is(.raw-automation-history-table, .raw-automation-review-table) > thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  #admin #raw-settlement-automation :is(.raw-automation-history-table, .raw-automation-review-table) > tbody > tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px 14px;
    margin: 0 0 12px;
    padding: 15px;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #fff;
  }
  #admin #raw-settlement-automation :is(.raw-automation-history-table, .raw-automation-review-table) > tbody > tr:last-child {
    margin-bottom: 0;
  }
  #admin #raw-settlement-automation :is(.raw-automation-history-table, .raw-automation-review-table) > tbody > tr > td {
    display: block;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0 !important;
    border: 0 !important;
    color: #243f5b;
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    box-sizing: border-box;
  }
  /* Never reveal a server/UI-hidden count, empty view, row or record. */
  #admin #raw-settlement-automation :is(.raw-automation-history-table, .raw-automation-review-table)[hidden],
  #admin #raw-settlement-automation :is(.raw-automation-history-table, .raw-automation-review-table) [hidden] {
    display: none !important;
  }
  #admin #raw-settlement-automation :is(.raw-automation-history-table, .raw-automation-review-table) td[data-label]::before {
    display: block;
    margin-bottom: 3px;
    color: #526b84;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.5;
    content: attr(data-label);
  }
  #admin #raw-settlement-automation :is(.raw-automation-history-table, .raw-automation-review-table) td > small {
    margin-top: 4px;
    color: #526b84;
    font-size: 12px;
    line-height: 1.6;
  }

  #admin #raw-settlement-automation .raw-automation-review-table > tbody > tr > td:first-child,
  #admin #raw-settlement-automation .raw-automation-review-table > tbody > tr > td:last-child {
    grid-column: 1 / -1;
  }
  #admin #raw-settlement-automation .raw-automation-review-table > tbody > tr {
    grid-template-columns: minmax(52px, .65fr) minmax(0, 1.35fr);
  }
  #admin #raw-settlement-automation .raw-automation-review-table > tbody > tr > td:first-child {
    color: #183754;
    font-size: 16px;
    font-weight: 750;
  }
  #admin #raw-settlement-automation .raw-automation-review-table > tbody > tr > td.raw-automation-pay {
    align-self: end;
    color: #245eb5;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.5;
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  #admin #raw-settlement-automation .raw-automation-review-table td.raw-automation-pay::before {
    text-align: right;
  }
  #admin #raw-settlement-automation .raw-automation-review-table > tbody > tr > td[hidden] + td.raw-automation-pay {
    grid-column: 1 / -1;
  }
  #admin #raw-settlement-automation .raw-automation-review-table td.raw-automation-pay > small {
    color: #9a3a32;
    font-size: 12px;
    font-weight: 600;
  }
  #admin #raw-settlement-automation .raw-automation-review-table td:last-child > details > summary {
    display: list-item;
    min-height: 44px;
    padding: 10px 0;
    border-top: 1px solid #e7edf4;
    color: #355a80;
    font-size: 14px;
    line-height: 1.6;
    box-sizing: border-box;
  }
  #admin #raw-settlement-automation .raw-automation-review-table :is(.raw-automation-breakdown, .raw-automation-mission-evidence) {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  #admin #raw-settlement-automation .raw-automation-review-table .raw-automation-breakdown {
    font-size: 13px;
    line-height: 1.6;
  }
  #admin #raw-settlement-automation .raw-automation-review-table .raw-automation-breakdown > div {
    gap: 10px;
  }
  #admin #raw-settlement-automation .raw-automation-review-table .raw-automation-breakdown dt {
    min-width: 0;
  }

  #admin #raw-settlement-automation .raw-automation-history-table > tbody > tr > td:nth-child(n+3) {
    grid-column: 1 / -1;
  }
  #admin #raw-settlement-automation .raw-automation-history-table > tbody > tr > td:first-child {
    color: #183754;
    font-size: 16px;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
  }
  #admin #raw-settlement-automation .raw-automation-history-table > tbody > tr > td:nth-child(2) {
    text-align: right;
    font-weight: 700;
  }
  #admin #raw-settlement-automation .raw-automation-history-table td:nth-child(2)::before {
    text-align: right;
  }
  #admin #raw-settlement-automation .raw-automation-history-table td:nth-child(6),
  #admin #raw-settlement-automation .raw-automation-history-table td:nth-child(7) {
    font-variant-numeric: tabular-nums;
  }
}

/* actions/actions-status.css */
/* Screen-only usability polish. No values, actions, permissions or exports change. */
@media screen {
  /* Five controls need deliberate rows; flex-wrap could leave Delete alone. */
  #admin #riders-pane .rider-row > .rider-row-actions:not([hidden]) {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch !important;
    justify-content: stretch !important;
    gap: 8px !important;
    min-width: 0;
    width: 100% !important;
  }
  #admin #riders-pane .rider-row-actions > .rider-last-login {
    grid-column: 1 / -1;
  }
  #admin #riders-pane .rider-row-actions > .rider-sticker-toggle:not([hidden]) {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    width: 100%;
    margin: 0 !important;
  }
  #admin #riders-pane .rider-row-actions > .rider-action:not([hidden]) {
    min-width: 0;
    width: 100%;
    min-height: 40px;
    margin: 0 !important;
    padding: 9px 8px !important;
    text-align: center;
    white-space: normal;
    word-break: keep-all;
  }
  /* Keep the existing danger, suspend, edit and note colors authoritative. */
  #admin #riders-pane .rider-row-actions > :is(button, select):focus-visible {
    outline: 3px solid #8cafd7;
    outline-offset: 2px;
  }

  /* Only states explicitly supplied by their own UI controller are styled. */
  #admin :is(.bst-status, .income-reporting-message):not(:empty) {
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #d8e3ef;
    border-left-width: 3px;
    border-radius: 9px;
    color: #415b75;
    background: #f5f8fc;
    font-size: 14px !important;
    line-height: 1.75 !important;
    overflow-wrap: anywhere;
  }
  #admin :is(.bst-status, .income-reporting-message).is-loading:not(:empty) {
    color: #31567f;
    background: #eff5fd;
    border-color: #c9dcf2;
    border-left-color: #5e85b2;
  }
  #admin :is(.bst-status, .income-reporting-message).is-success:not(:empty) {
    color: #285f50;
    background: #f0f8f5;
    border-color: #cde4da;
    border-left-color: #548d77;
  }
  #admin :is(.bst-status, .income-reporting-message).is-warning:not(:empty) {
    color: #75551f;
    background: #fff8e9;
    border-color: #ead9ad;
    border-left-color: #b58b3c;
  }
  #admin :is(.bst-status, .income-reporting-message).is-error:not(:empty) {
    color: #974343;
    background: #fff4f4;
    border-color: #ebcaca;
    border-left-color: #b96b6b;
  }
}
@media screen and (min-width: 1280px) {
  /* The sidebar reduces actual content width; never require a fixed 440px action track. */
  #admin #riders-pane .rider-row:not([hidden]) {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) minmax(0, 1.5fr) !important;
  }
  #admin #riders-pane .rider-row > :is(.rider-identity, .rider-payout-summary, .rider-account-summary, .rider-row-actions) {
    min-width: 0 !important;
    max-width: 100%;
  }
  #admin #riders-pane .rider-row > .rider-payout-summary {
    flex-wrap: wrap;
  }
  #admin #riders-pane .rider-payout-summary select {
    min-width: 0;
    max-width: 100%;
  }
}
@media screen and (min-width: 1440px) {
  /* Preserve the existing four-column identity/payout/account/actions layout. */
  #admin #riders-pane .rider-row:not([hidden]) {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.05fr) minmax(0, 1.25fr) minmax(0, 1.3fr) !important;
  }
}
@media screen and (min-width: 761px) and (max-width: 1279px) {
  /* At these widths the account controls already span the whole rider row. */
  #admin #riders-pane .rider-row > .rider-row-actions:not([hidden]) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  #admin #riders-pane .rider-row-actions > .rider-sticker-toggle:not([hidden]) {
    grid-column: auto;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
  }
}
@media screen and (max-width: 760px) {
  #admin #riders-pane .rider-row-actions > :is(.rider-action, .rider-sticker-toggle):not([hidden]) {
    min-height: 44px;
  }
}
