.rd-subgrid { overflow: hidden; border: 1px solid var(--line, #ded6c5); border-radius: 12px; background: #fff; }
.rd-provider-shell { display: grid; gap: 12px; }
.rd-provider-tabs { display: flex; gap: 2px; width: fit-content; max-width: 100%; overflow-x: auto; border: 1px solid var(--line, #ded6c5); border-radius: 8px; padding: 3px; background: #fff; }
.rd-provider-tabs button { min-height: 34px; border: 0; border-radius: 6px; background: transparent; padding: 6px 11px; color: var(--green, #173d2e); font: inherit; font-size: .8rem; font-weight: 750; white-space: nowrap; cursor: pointer; }
.rd-provider-tabs button[aria-selected="true"] { background: #e8f0ea; }
.rd-provider-tabs button:focus-visible { outline: 2px solid var(--gold, #c19420); outline-offset: 1px; }
.rd-provider-location { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 9px 14px; border-bottom: 1px solid var(--line, #ded6c5); background: #fff; color: var(--muted, #69716b); font-size: .78rem; }
.rd-provider-location a, .rd-m365 .rd-grid a { color: var(--green, #173d2e); font-weight: 750; }
.rd-m365-members { border-top: 12px solid #f5f2e9; }
.rd-member-grid { min-width: 620px; }
.rd-member-grid th:first-child, .rd-member-grid td:first-child { width: 42%; }
.rd-member-grid td:first-child b, .rd-member-grid td:first-child small { display: block; }
.rd-member-grid td:first-child small { margin-top: 2px; color: var(--muted, #69716b); }
.rd-command-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line, #ded6c5); background: #fbfaf5; }
.rd-command-bar h3, .rd-command-bar p { margin: 0; }
.rd-command-bar p { margin-top: 3px; color: var(--muted, #69716b); font-size: .78rem; }
.rd-command-actions, .rd-command-bar form, .rd-row-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.rd-selection-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 6px; border: 1px solid #afc6da; border-radius: 8px; background: #edf3f8; }
.rd-selection-actions > span { padding: 0 4px; color: var(--green, #173d2e); font-size: .76rem; font-weight: 750; white-space: nowrap; }
.rd-selection-actions .danger { color: #a33a2d; }
.rd-upload-target { display: flex; align-items: center; gap: 6px; color: var(--muted, #69716b); font-size: .72rem; font-weight: 750; white-space: nowrap; }
.rd-command-bar select, .rd-dialog input, .rd-dialog select { min-height: 36px; border: 1px solid var(--line, #cfc8b9); border-radius: 7px; background: #fff; padding: 4px 8px; }
.rd-grid-scroll { overflow-x: auto; }
.rd-grid { width: 100%; min-width: 720px; border-collapse: collapse; }
.rd-grid th, .rd-grid td { padding: 9px 12px; border-bottom: 1px solid var(--line, #e7e1d6); text-align: left; vertical-align: middle; }
.rd-grid th { background: #f5f2e9; color: var(--green, #173d2e); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; }
.rd-grid tbody tr:last-child td { border-bottom: 0; }
.rd-grid:has(.rd-selection) th:nth-child(2), .rd-grid:has(.rd-selection) td:nth-child(2) { width: 48%; }
.rd-grid .rd-selection { width: 42px; padding-right: 4px; text-align: center; }
.rd-selection input { width: 16px; height: 16px; margin: 0; accent-color: var(--green, #173d2e); cursor: pointer; }
.rd-selectable-row { cursor: pointer; transition: background-color .12s ease; }
.rd-selectable-row:hover td { background: #f4f8fb; }
.rd-selectable-row.rd-selected td, .rd-selectable-row[aria-selected="true"] td { background: #e5f0f8; }
.rd-selectable-row:focus-within td { box-shadow: inset 0 2px 0 #8cacc5, inset 0 -2px 0 #8cacc5; }
.rd-size, .rd-date { white-space: nowrap; }
.rd-grid button, .rd-file-command { border: 0; background: transparent; color: var(--green, #173d2e); font: inherit; font-size: .78rem; font-weight: 750; text-decoration: underline; cursor: pointer; padding: 2px; }
.rd-grid button:disabled { color: #8a8f8b; cursor: not-allowed; }
.rd-grid .rd-name { font-size: .86rem; text-align: left; }
.rd-audience { display: inline-block; margin-left: 7px; border-radius: 999px; background: #edf1ed; padding: 2px 7px; color: var(--green, #173d2e); font-size: .68rem; font-weight: 750; line-height: 1.4; vertical-align: middle; }
.rd-audience-project_investors { background: #f6efd9; }
.rd-audience-public { background: #dfeee5; }
.rd-audience-description { margin: -2px 0 4px; border-left: 3px solid #8cacc5; padding: 7px 10px; background: #f4f8fb; color: var(--muted, #69716b); font-size: .78rem; line-height: 1.45; }
.rd-internal-access { margin: 4px 0; border-top: 1px solid var(--line, #ded6c5); padding-top: 10px; }
.rd-internal-access h4, .rd-internal-access p { margin: 0 0 7px; }
.rd-internal-access p { color: var(--muted, #69716b); font-size: .75rem; }
.rd-grid .danger { color: #a33a2d; }
.rd-more-trigger { color: var(--green, #173d2e); }
.rd-row-actions[popover] { position: fixed; inset: auto; width: max-content; min-width: 160px; max-width: min(260px, calc(100vw - 16px)); margin: 0; padding: 7px; border: 1px solid var(--line, #ded6c5); border-radius: 8px; background: #fff; box-shadow: 0 12px 30px rgba(20, 44, 34, .18); }
.rd-row-actions[popover]:not(:popover-open) { display: none; }
.rd-row-actions[popover]:popover-open { display: grid; }
.rd-row-actions[popover] button, .rd-row-actions[popover] .rd-file-command { display: block; width: 100%; border: 0; background: transparent; padding: 7px 9px; color: var(--green, #173d2e); font: inherit; font-size: .78rem; font-weight: 750; text-align: left; text-decoration: none; cursor: pointer; }
.rd-row-actions[popover] button:hover, .rd-row-actions[popover] button:focus-visible, .rd-row-actions[popover] .rd-file-command:hover { background: #f5f2e9; }
.rd-row-actions[popover] .danger { color: #a33a2d; }
.rd-empty, .rd-status { padding: 13px; color: var(--muted, #69716b); }
.rd-status:empty { display: none; }
.rd-status.error { color: #a33a2d; }
.rd-dialog { width: min(520px, calc(100vw - 28px)); border: 0; border-radius: 12px; padding: 0; box-shadow: 0 22px 70px rgba(0, 0, 0, .28); }
.rd-dialog.rd-dialog-wide { width: min(1600px, calc(100vw - 48px)); max-height: calc(100dvh - 48px); overflow: auto; }
.rd-dialog::backdrop { background: rgba(12, 30, 23, .48); }
.rd-dialog > header { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--line, #ded6c5); }
.rd-dialog h3 { margin: 0; }
.rd-dialog header button { border: 0; background: transparent; font-size: 1.5rem; }
.rd-dialog [data-rd-dialog-body] { padding: 16px; }
.rd-dialog label { display: grid; gap: 5px; margin-bottom: 12px; }
.rd-version-list, .rd-access-list { display: grid; gap: 6px; }
.rd-version-list button, .rd-access-list > div { display: flex; justify-content: space-between; border: 1px solid var(--line, #ded6c5); border-radius: 8px; background: #fff; padding: 10px; }
.rd-version-list button, .rd-access-list button { cursor: pointer; }
.rd-access-list { margin-top: 14px; }
.rd-access-list button { border: 0; background: transparent; color: #a33a2d; text-decoration: underline; }
.rd-lookup { position: relative; }
.rd-lookup input[type="search"] { width: 100%; }
.rd-lookup-control { display: grid; grid-template-columns: minmax(0, 1fr) 34px 34px; align-items: stretch; }
.rd-lookup-control input[type="search"] { min-width: 0; border-radius: 7px 0 0 7px; }
.rd-lookup-control button { border: 1px solid var(--line, #cfc8b9); border-left: 0; background: #fff; color: var(--green, #173d2e); font: inherit; cursor: pointer; }
.rd-lookup-control button:last-child { border-radius: 0 7px 7px 0; }
.rd-lookup-control button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; }
.rd-lookup-menu { position: absolute; z-index: 6; top: calc(100% + 3px); right: 0; left: 0; max-height: 240px; overflow-y: auto; border: 1px solid var(--line, #ded6c5); border-radius: 8px; background: #fff; box-shadow: 0 12px 30px rgba(20, 44, 34, .18); }
.rd-lookup-menu [role="option"] { width: 100%; display: grid; grid-template-columns: 22px 1fr; gap: 1px 7px; border: 0; border-bottom: 1px solid var(--line, #eee8dd); background: #fff; padding: 9px; text-align: left; cursor: pointer; }
.rd-lookup-menu[hidden], .rd-lookup-menu [hidden] { display: none !important; }
.rd-dialog [data-rd-m365-member-form] .rd-lookup-menu { position: relative; top: auto; margin-top: 3px; max-height: min(240px, 40dvh); }
.rd-dialog [data-rd-m365-member-form] input[type="search"]::-webkit-search-cancel-button { display: none; }
.rd-lookup-menu [role="option"]:hover, .rd-lookup-menu [role="option"]:focus { background: #f5f2e9; outline: 2px solid var(--gold, #c19420); outline-offset: -2px; }
.rd-lookup-menu [role="option"] span { grid-row: 1 / 3; }
.rd-lookup-menu [role="option"] small { color: var(--muted, #69716b); }
.rd-lookup-menu p { margin: 0; padding: 12px; color: var(--muted, #69716b); }
.rd-view-tabs { display: flex; gap: 2px; border: 1px solid var(--line, #ded6c5); border-radius: 7px; padding: 2px; background: #fff; }
.rd-view-tabs button { min-height: 30px; border: 0; border-radius: 5px; background: transparent; padding: 5px 9px; color: var(--green, #173d2e); font-weight: 750; cursor: pointer; }
.rd-view-tabs button[aria-pressed="true"] { background: #e8f0ea; }
.rd-display-toggle { display: flex; gap: 2px; border: 1px solid var(--line, #ded6c5); border-radius: 7px; padding: 2px; background: #fff; }
.rd-display-toggle button { min-height: 30px; border: 0; border-radius: 5px; background: transparent; padding: 5px 9px; color: var(--green, #173d2e); font-weight: 750; cursor: pointer; }
.rd-display-toggle button[aria-pressed="true"] { background: #e8f0ea; }
.rd-folder-nav { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 14px; border-bottom: 1px solid var(--line, #ded6c5); background: #fff; }
.rd-folder-nav .rd-folder-breadcrumb { flex: 1; min-width: 0; padding: 0; border-bottom: 0; }
.rd-up-level { flex: 0 0 auto; text-decoration: none; }
.rd-folder-breadcrumb { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding: 10px 14px; border-bottom: 1px solid var(--line, #ded6c5); background: #fff; color: var(--muted, #69716b); font-size: .8rem; white-space: nowrap; }
.rd-folder-breadcrumb button { border: 0; background: transparent; padding: 0; color: var(--green, #173d2e); font: inherit; font-weight: 750; text-decoration: underline; cursor: pointer; }
.rd-folder-row .rd-name span { color: var(--gold, #c19420); text-decoration: none; }
.rd-library-filters { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(130px, 1fr)) auto; gap: 10px; align-items: end; padding: 12px 14px; border-bottom: 1px solid var(--line, #ded6c5); background: #faf8f1; }
.rd-library-filters label { display: grid; gap: 4px; min-width: 0; color: var(--muted, #69716b); font-size: .7rem; font-weight: 750; }
.rd-library-filters input[type="search"], .rd-library-filters select { width: 100%; min-width: 0; min-height: 34px; border: 1px solid var(--line, #cfc8b9); border-radius: 7px; background: #fff; padding: 5px 8px; color: inherit; font: inherit; font-size: .78rem; }
.rd-library-filters .rd-filter-scope { grid-column: 1 / -1; color: var(--muted, #69716b); font-size: .72rem; }
.rd-library-filters .rd-show-empty { display: flex; align-items: center; gap: 6px; min-height: 34px; white-space: nowrap; }
.rd-library-filters .rd-show-empty input { margin: 0; }
.rd-file-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 12px; padding: 16px; }
.rd-folder-tile, .rd-document-tile { position: relative; min-width: 0; min-height: 176px; border: 1px solid transparent; border-radius: 7px; }
.rd-folder-tile > button, .rd-tile-open { display: flex; width: 100%; flex-direction: column; align-items: center; gap: 8px; border: 0; background: transparent; padding: 14px 8px; color: var(--green, #173d2e); font: inherit; text-align: center; cursor: pointer; }
.rd-folder-tile > button:hover, .rd-folder-tile > button:focus-visible, .rd-tile-open:hover, .rd-tile-open:focus-visible { background: #edf3f8; border-radius: 7px; outline: 2px solid #afc6da; outline-offset: -2px; }
.rd-folder-icon { display: inline-block; width: 22px; height: 20px; background: url('assets/icons/file-types/folder.svg') center / contain no-repeat; }
.rd-folder-tile .rd-folder-icon { width: 76px; height: 72px; }
.rd-folder-tile strong, .rd-tile-open strong { max-width: 160px; font-size: .86rem; font-weight: 550; overflow-wrap: anywhere; }
.rd-folder-tile small { color: var(--muted, #69716b); }
.rd-file-icon { display: block; width: 64px; height: 72px; background: center / contain no-repeat; }
.rd-file-icon-pdf { background-image: url('assets/icons/file-types/pdf.svg'); }
.rd-file-icon-word { background-image: url('assets/icons/file-types/word.svg'); }
.rd-file-icon-excel { background-image: url('assets/icons/file-types/excel.svg'); }
.rd-file-icon-powerpoint { background-image: url('assets/icons/file-types/powerpoint.svg'); }
.rd-file-icon-image { background-image: url('assets/icons/file-types/image.svg'); }
.rd-file-icon-archive { background-image: url('assets/icons/file-types/archive.svg'); }
.rd-file-icon-text { background-image: url('assets/icons/file-types/text.svg'); }
.rd-file-icon-file { background-image: url('assets/icons/file-types/file.svg'); }
.rd-tile-meta { display: grid; gap: 2px; padding: 0 8px 32px; color: var(--muted, #69716b); font-size: .7rem; text-align: center; }
.rd-tile-meta span + span { display: none; }
.rd-tile-meta .rd-audience { display: inline-block; width: fit-content; margin: 3px auto 0; }
.rd-tile-actions { position: absolute; right: 10px; bottom: 10px; }
.rd-tile-actions .rd-more-trigger { border: 0; background: transparent; color: var(--green, #173d2e); font: inherit; font-size: .78rem; font-weight: 750; text-decoration: underline; cursor: pointer; }
.rd-preview-actions { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.rd-preview { display: grid; min-height: 320px; max-height: 68vh; overflow: auto; border: 1px solid var(--line, #ded6c5); border-radius: 8px; background: #f5f2e9; }
.rd-preview-frame { width: 100%; min-height: 62vh; border: 0; background: #fff; }
.rd-preview-image { display: block; max-width: 100%; max-height: 64vh; margin: auto; object-fit: contain; }
@media (max-width: 640px) {
  .rd-provider-tabs { width: 100%; }
  .rd-provider-tabs button { flex: 1; }
  .rd-library-filters { grid-template-columns: 1fr 1fr; padding: 10px; }
  .rd-library-filters .rd-filter-scope, .rd-library-filters .rd-filter-search, .rd-library-filters .rd-show-empty { grid-column: 1 / -1; }
  .rd-dialog.rd-dialog-wide { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  .rd-command-bar { align-items: flex-start; flex-direction: column; }
  .rd-command-bar form { width: 100%; }
  .rd-command-bar select { flex: 1; min-width: 0; }
  .rd-command-actions, .rd-display-toggle, .rd-view-tabs { width: 100%; }
  .rd-display-toggle button, .rd-view-tabs button { flex: 1; }
  .rd-folder-nav { align-items: flex-start; flex-direction: column; padding: 10px; }
  .rd-folder-nav .rd-folder-breadcrumb { width: 100%; }
  .rd-file-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; }
  .rd-folder-tile, .rd-document-tile { min-height: 172px; }
  .rd-folder-tile > button, .rd-tile-open { padding: 10px 6px; }
  .rd-tile-meta { padding: 0 6px 32px; }
  .rd-grid { min-width: 0; table-layout: fixed; }
  .rd-grid:has(.rd-selection) th:nth-child(3), .rd-grid:has(.rd-selection) td:nth-child(3), .rd-grid:has(.rd-selection) th:nth-child(5), .rd-grid:has(.rd-selection) td:nth-child(5) { display: none; }
  .rd-grid:has(.rd-selection) th:nth-child(2), .rd-grid:has(.rd-selection) td:nth-child(2) { width: auto; }
  .rd-grid:has(.rd-selection) th:nth-child(4), .rd-grid:has(.rd-selection) td:nth-child(4) { width: 62px; }
  .rd-grid:has(.rd-selection) th:nth-child(6), .rd-grid:has(.rd-selection) td:nth-child(6) { width: 64px; }
  .rd-grid th, .rd-grid td { padding: 9px 7px; }
  .rd-grid:has(.rd-selection) .rd-name { display: block; width: 100%; overflow-wrap: anywhere; }
  .rd-member-grid { min-width: 620px; table-layout: auto; }
  .rd-member-grid th:nth-child(2), .rd-member-grid td:nth-child(2), .rd-member-grid th:nth-child(4), .rd-member-grid td:nth-child(4) { display: table-cell; }
}
