/* Reports uses the Documents library shell and shared theme/button tokens. */
[data-reports-workspace]{--rw-ink:var(--ink);--rw-muted:var(--muted);--rw-line:var(--line);--rw-blue:var(--brand);--rw-shadow:0 8px 24px rgba(16,24,40,.07)}
.reports-shell{grid-template-columns:var(--bb-rail-w) minmax(0,1fr) 340px}
.reports-shell>main{padding:24px 28px;min-width:0;background:var(--surface,#fff)}
.reports-shell .library-head{gap:16px;flex-wrap:wrap}.reports-status{font-size:13px;color:var(--muted);margin:12px 0;min-height:1em}.reports-status:empty{display:none}.reports-status .bridge-notice-close{border:0;background:none;color:inherit;font:inherit;font-size:1.1em;line-height:1;margin-left:.4rem;padding:0 .35rem;min-width:28px;min-height:28px;cursor:pointer;vertical-align:middle}.reports-status .bridge-notice-close::before{content:"×"}.reports-status .bridge-notice-close:hover,.reports-status .bridge-notice-close:focus-visible{color:var(--text,#101828)}
.reports-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:20px}.reports-tile{min-width:0;overflow:hidden;background:var(--surface,#fff);border:1px solid var(--line);border-radius:12px}.reports-tile:first-child:last-child,.reports-grid[data-default]>.reports-tile:first-child{grid-column:1/-1}
.reports-tile>.reports-tile-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:12px 18px;border-top:1px solid var(--line)}.reports-tile .bc-report{padding:18px;margin:0;border:0;box-shadow:none;border-radius:0}.reports-tile .bc-report-meta,.reports-tile .bc-report-footer{display:none}.reports-tile .bc-report h2{font-size:19px}.reports-tile .bc-report-plot{min-height:190px!important;max-height:280px!important}.reports-tile .bc-report-chart-data{display:none}.reports-tile .bc-report-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.reports-tile-actions button,.reports-empty button,.reports-dashboard-heading button,.reports-dialog button,.bc-report-toolbar>button,.bc-report-table-controls input,.bc-report-pagination button{font:inherit;font-size:12px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;background:var(--surface,#fff);color:var(--ink);cursor:pointer}.reports-tile-actions button:hover,.reports-dashboard-heading button:hover,.bc-report-toolbar>button:hover{background:var(--soft,#f7f8fa)}button:disabled{opacity:.55;cursor:wait}.reports-empty{padding:32px;border:1px dashed var(--line);border-radius:12px;margin-top:20px}.reports-empty h2{font-size:18px;margin:0 0 8px}.reports-empty p{max-width:550px;color:var(--muted);font-size:14px;line-height:1.6}.reports-dashboard-heading{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:20px 0}.reports-dashboard-heading h2{margin:0;font-size:20px}.reports-dashboard-heading p{width:100%;color:var(--muted);margin:0}.reports-dashboard-heading select,.reports-dialog select{font:inherit;color:var(--ink);border:1px solid var(--line);border-radius:8px;padding:8px;background:var(--surface,#fff);max-width:100%}.reports-list{display:grid;gap:10px;margin-top:18px}.reports-list-row{display:flex;gap:12px;align-items:center;padding:16px;border:1px solid var(--line);border-radius:10px}.reports-list-row>div{flex:1;min-width:0}.reports-list-row h2{font-size:15px;margin:0 0 5px}.reports-list-row p{font-size:12px;color:var(--muted);margin:0}.reports-list-row button{font:inherit;font-size:12px;padding:7px 10px;border:1px solid var(--line);background:var(--surface,#fff);border-radius:8px;color:var(--ink);cursor:pointer}.reports-list-actions{display:flex;flex-wrap:wrap;gap:6px}
.reports-chat{display:flex;flex-direction:column;min-height:0;border-left:1px solid var(--line);background:var(--soft,#f7f8fa)}.reports-chat>header{padding:22px;border-bottom:1px solid var(--line)}.reports-chat h2{font-size:16px;margin:0 0 8px}.reports-chat header p{font-size:13px;line-height:1.5;color:var(--muted);margin:0}.reports-chat-thread{overflow:auto;flex:1;padding:18px;display:flex;flex-direction:column;gap:14px}.reports-chat-message{padding:12px 14px;border-radius:12px;font-size:13px;line-height:1.65;background:var(--surface,#fff);border:1px solid var(--line);overflow-wrap:anywhere}.reports-chat-message.user{background:var(--brand);color:#fff;border-color:var(--brand);align-self:flex-end;max-width:95%}.reports-chat-message.pending{color:var(--muted)}.reports-chat-welcome{font-size:13px;line-height:1.7;color:var(--muted)}#reports-chat-form{padding:16px;display:grid;gap:10px;border-top:1px solid var(--line)}#reports-chat-form textarea{resize:vertical;min-height:78px;max-height:220px;border:1px solid var(--line);border-radius:10px;padding:12px;font:inherit;font-size:13px;line-height:1.6;color:var(--ink);background:var(--surface,#fff);width:100%}#reports-chat-form button{justify-self:end}.reports-chat-context{margin:0;padding:6px 10px;font-size:12px;line-height:1.5;color:var(--ink);background:var(--surface,#fff);border:1px solid var(--line);border-left:3px solid var(--brand);border-radius:8px;overflow-wrap:anywhere}.reports-chat-context[hidden]{display:none}.reports-dialog{width:min(520px,calc(100vw - 32px));max-height:85vh;overflow:auto;border:1px solid var(--line);border-radius:14px;padding:24px;font:14px/1.6 Inter,'Segoe UI',system-ui,sans-serif;color:var(--ink);background:var(--surface,#fff)}.reports-dialog::backdrop{background:rgba(16,24,40,.35)}.reports-dialog header,.reports-dialog footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.reports-dialog h2{margin:0;font-size:20px}.reports-dialog h3{font-size:14px}.reports-dialog label{display:block;margin:16px 0 6px;font-size:13px}.reports-dialog input{display:block;width:100%;padding:9px;border:1px solid var(--line);border-radius:8px;font:inherit;margin:8px 0 12px}.reports-dialog button.primary,#reports-chat-form .primary{color:#fff;background:var(--brand);border-color:var(--brand)}.reports-dialog footer{justify-content:flex-end;margin-top:18px}.reports-dialog [hidden]{display:none}.reports-share-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding:10px 0;font-size:12px}
.reports-skip,.reports-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.reports-skip:focus{position:fixed;top:8px;left:10px;width:auto;height:auto;clip:auto;z-index:100;padding:10px;background:#fff;color:var(--ink)}
.bc-report-section{margin-top:22px}.bc-report-section>header>h3{font-size:16px;margin-bottom:6px}.bc-report-section>header>p{color:var(--rw-muted);font-size:13px;line-height:1.6}.bc-report-insight{border-left:3px solid var(--brand);padding:14px 16px;background:var(--soft,#f7f8fa);border-radius:0 9px 9px 0;margin:14px 0}.bc-report-insight h3{font-size:14px;margin:0 0 6px}.bc-report-insight p{font-size:13px;line-height:1.65;margin:0;white-space:pre-line}.bc-report-insight.warning{border-color:var(--warning,#b7791f)}.bc-report-insight.success{border-color:var(--success,#228657)}.bc-report-delta{font-size:12px;margin-top:8px}.bc-report-delta.favourable{color:var(--success,#228657)}.bc-report-delta.unfavourable{color:var(--danger,#b42318)}.bc-report-chart-data summary{cursor:pointer;font-size:12px;color:var(--brand);margin:12px 0}.bc-report-table-controls{display:flex;align-items:center;gap:12px;margin:12px 0;font-size:12px}.bc-report-pagination{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:12px;font-size:12px}
@media(max-width:1200px){.reports-shell{grid-template-columns:var(--bb-rail-w) minmax(0,1fr) 300px}.reports-grid{grid-template-columns:1fr}.reports-shell>main{padding:22px}}
@media(max-width:900px){.reports-shell{grid-template-columns:var(--bb-rail-w) minmax(0,1fr);overflow:auto;height:auto;min-height:100%}.reports-chat{grid-column:2;min-height:380px;border-left:0;border-top:1px solid var(--line)}.reports-chat-thread{max-height:320px}.reports-shell>main{overflow:visible}.reports-list-row{align-items:flex-start;flex-wrap:wrap}.reports-list-actions{width:100%}}
@media(max-width:600px){.reports-shell>main{padding:18px 14px}.reports-grid{gap:12px}.reports-tile .bc-report{padding:14px}.reports-shell .library-actions{width:100%}.reports-chat{min-height:340px}.reports-tile .bc-report-grid{grid-template-columns:1fr 1fr}.reports-tile .bc-report-grid:has(.bc-report-chart){grid-template-columns:1fr}.reports-chat>header{padding:18px}}

.bc-report-search{display:flex;align-items:center;gap:10px;margin:12px 0;font-size:12px;color:var(--muted)}.bc-report-search input{font:inherit;font-size:12px;padding:8px 12px;border:1px solid var(--line);border-radius:8px;color:var(--ink);background:var(--surface,#fff)}.bc-report-sort{font:inherit;background:none;border:0;color:inherit;text-align:start;padding:0;cursor:pointer}
.reports-shell .bc-report{width:100%;max-width:1800px}
.bc-widget>.bc-widget-tools .bc-widget-drag{position:absolute;top:2px;right:34px;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;color:var(--muted,#667085);font-size:15px;line-height:1;cursor:grab;user-select:none;opacity:0;transition:opacity .12s}.bc-widget:hover>.bc-widget-tools .bc-widget-drag,.bc-widget.menu-open>.bc-widget-tools .bc-widget-drag{opacity:1}.bc-widget-drag:active{cursor:grabbing}.bc-widget.movable>article>h3{padding-right:66px}.bc-widget.drop-target{outline:2px dashed var(--ink,#27272a);outline-offset:4px;border-radius:12px}@media(pointer:coarse){.bc-widget>.bc-widget-tools .bc-widget-drag{display:none}}
.bc-report-info{position:relative;display:inline-block;margin-left:6px;vertical-align:1px}.bc-report-info>button{width:18px;height:18px;padding:0;border:1px solid var(--line,#d0d5dd);border-radius:50%;background:var(--surface,#fff);color:var(--muted,#667085);font:italic 700 11px/16px Georgia,serif;cursor:help}.bc-report-info>button:focus-visible{outline:2px solid var(--ink,#27272a);outline-offset:1px}.bc-report-info-tip{position:absolute;z-index:6;top:24px;left:-8px;width:max-content;max-width:min(300px,70vw);padding:8px 10px;border-radius:8px;background:var(--ink,#27272a);color:#fff;font-size:12px;font-weight:400;line-height:1.5;box-shadow:0 4px 14px rgba(16,24,40,.18)}
.bc-report-key-finding p{margin:0;font-size:14px;line-height:1.55}.bc-report-key-finding-label{display:inline-block;margin-right:6px;font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted,#667085)}.bc-report-key-finding.success{background:#ecf8f6}.bc-report-key-finding.success .bc-report-key-finding-label{color:#00796b}.bc-report-key-finding.warning{background:#fdf3e7}.bc-report-key-finding.warning .bc-report-key-finding-label{color:#8a4b12}.bc-report-key-finding-more{margin-top:6px;font-size:13px}.bc-report-key-finding-more summary{cursor:pointer;color:var(--ink,#27272a);font-weight:600;width:max-content}.bc-report-key-finding-more h3{font-size:13px;margin:8px 0 4px}.bc-report-key-finding-more p{font-size:13px;color:var(--ink,#27272a);margin-top:6px}
.share-links-shell{grid-template-columns:var(--bb-rail-w) minmax(0,1fr)}.share-links-toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:14px 0}.share-links-toolbar[hidden]{display:none}.share-links-all{display:inline-flex;gap:8px;align-items:center;font-size:13px}.share-links-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px;background:var(--surface,#fff)}.share-links-table{width:100%;min-width:760px;border-collapse:collapse;font-size:13px}.share-links-table[hidden]{display:none}.share-links-table th,.share-links-table td{padding:10px 12px;border-bottom:1px solid var(--line);text-align:start;vertical-align:top;overflow-wrap:anywhere}.share-links-table th{font-size:12px;color:var(--muted);font-weight:600;white-space:nowrap}.share-links-table tr:last-child td{border-bottom:0}.share-links-table td:nth-child(2){font-weight:600;min-width:160px}.share-links-table td:nth-child(5),.share-links-table td:nth-child(6){white-space:nowrap}

/* Who each shared link went to, so one person's can be turned off (the customer, 2026-10-21). */
.reports-share-who{display:flex;flex-direction:column;gap:2px;min-width:0;overflow-wrap:anywhere}.reports-share-who strong{font-weight:600;color:var(--ink)}.reports-share-who small{color:var(--muted)}
.share-links-turn-off{white-space:nowrap}
/* The column labels only a screen reader hears are placed inside the table's own scroll frame, never against the page (a label in the last column widened a phone's page). */
.share-links-table-wrap{position:relative}
/* Share: Link or Email first, then who it is for (Bryan's review, 27 Oct). */
.reports-share-mode{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:14px 0 4px}.reports-share-mode>span{flex-basis:100%;font-size:13px}.reports-dialog .reports-share-mode button{flex:1 1 0;min-height:40px}.reports-dialog .reports-share-mode button[aria-pressed="true"]{color:#fff;background:var(--brand);border-color:var(--brand)}
.reports-share-help{margin:2px 0 12px;font-size:12px;color:var(--muted)}.reports-share-none{margin:6px 0;font-size:12px;color:var(--muted)}

/* Reports on a phone (approved mobile design, 2026-11-21): the tabs become wrapping pills (main was 40px too wide). */
@media (max-width: 640px) {
  #reports-tabs { display: flex; flex-wrap: wrap; gap: 8px; overflow: visible; max-width: 100%; }
  #reports-tabs > * { min-height: 36px; padding: 0 14px; border-radius: 999px; }
}

/* Share links on a phone (approved mobile design): one card per link, Copy and Revoke inline. */
@media (max-width:640px){.share-links-table-wrap{overflow:visible;border:0;background:transparent}.share-links-table{min-width:0}.share-links-table,.share-links-table tbody,.share-links-table tr,.share-links-table td{display:block;width:100%}.share-links-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}.share-links-table tr{margin:0 0 10px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface,#fff)}.share-links-table td{border:0;padding:2px 0;white-space:normal!important}.share-links-table button,#share-links-revoke,#share-links-refresh{min-height:44px;margin:6px 6px 0 0}.share-links-table input[type=checkbox]{width:24px;height:24px}.share-links-table td[data-label]::before{content:attr(data-label) ": ";color:var(--muted);font-weight:600}}
