/* Figma workspace approval, September 2026. Print/export styles remain independent. */
@media screen {
html[data-appearance=light] { --canvas:#f0f3f1;--surface:#fff;--surface-soft:#f9fbf9;--surface-muted:#eff3ef;--ink:#25332c;--ink-soft:#5f6f65;--ink-faint:#68796e;--line:#d6dfd8;--line-strong:#b7c7ba;--teal-wash:#edf3e7;--focus:#536f40; }
.app-shell.paper-workspace.figma-workspace[data-theme=robotic] { grid-template-rows:auto auto auto minmax(480px,1fr) auto;height:auto;min-height:100dvh;overflow:visible; }
.figma-workspace { --orders-wash:#eff5ea; }
html[data-appearance=dark] .figma-workspace { --orders-wash:#293426; }
.app-shell.figma-workspace[data-theme=robotic] .instrument-masthead { min-height:68px;flex-wrap:wrap;padding:10px 20px;gap:18px; }
.app-shell.figma-workspace[data-theme=robotic] .medhx-wordmark { width:204px;height:41px; }
.figma-workspace .instrument-caption,.figma-workspace .identity-divider,.figma-workspace .instrument-preview { display:none!important; }
.figma-case-actions { display:flex;align-items:center;gap:8px;margin-left:12px; }
.figma-case-actions button { display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:8px 12px;border:1px solid #52604e;border-radius:6px;color:#f5f8f2;background:transparent;font:13px var(--ui-font); }
.figma-case-actions svg { width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6; }
.figma-case-actions #new-case-button { background:#354a2b;border-color:#a3c761; }
.app-shell.figma-workspace[data-theme=robotic] .all-pending-button { margin:0; }
.app-shell.figma-workspace[data-theme=robotic] .utility-actions { margin-left:auto; }
.app-shell.figma-workspace[data-theme=robotic] .utility-actions .settings-action { width:36px;min-width:36px;padding:9px;margin-right:0; }
.app-shell.figma-workspace[data-theme=robotic] .generation-connection-summary { margin-left:0; }
.app-shell.figma-workspace[data-theme=robotic] .workflow-toolbar { height:auto;min-height:78px;gap:16px;padding:12px 20px;flex-wrap:wrap; }
.app-shell.figma-workspace[data-theme=robotic] .case-controls { flex:1 1 520px;gap:8px; }
.app-shell.figma-workspace[data-theme=robotic] .workflow-control { display:flex;flex-direction:column;align-items:stretch;gap:5px;height:auto;flex:1; }
.app-shell.figma-workspace[data-theme=robotic] .workflow-control input,.app-shell.figma-workspace[data-theme=robotic] .workflow-control select { width:100%;min-width:0;height:34px;border:1px solid var(--line-strong);border-radius:5px;background:var(--surface);padding:6px 9px; }
.app-shell.figma-workspace[data-theme=robotic] .workflow-control>span { font-size:10px; }
.app-shell.figma-workspace[data-theme=robotic] .workflow-controls { flex:1 1 500px;gap:14px;align-items:end; }
.app-shell.figma-workspace[data-theme=robotic] .paper-template-tools { width:auto;flex:1.5;margin:0;align-items:end; }
.app-shell.figma-workspace[data-theme=robotic] .paper-template-tools select { width:100%; }
.app-shell.figma-workspace[data-theme=robotic] .paper-edit-template { height:34px;white-space:nowrap; }
.app-shell.figma-workspace[data-theme=robotic] .template-workspace { background:var(--orders-wash);padding:6px 12px 10px; }
.figma-orders-heading { display:flex;justify-content:space-between;align-items:center;padding:0 0 7px;color:var(--ink); }
.figma-orders-heading h2 { font:600 13px var(--ui-font);margin:0; }
.figma-orders-heading button,.figma-edit-template { border:0;background:transparent;color:var(--ink-soft);font:12px var(--ui-font);cursor:pointer; }
.app-shell.figma-workspace[data-theme=robotic] .clinical-sheet-band { grid-template-columns:minmax(210px,1.45fr) minmax(0,4fr);gap:10px;background:transparent;height:104px; }
.app-shell.figma-workspace[data-theme=robotic] .clinical-sheet-band .sheet-context-cell,.app-shell.figma-workspace[data-theme=robotic] .clinical-sheet-band .case-note-panel { background:var(--surface);border:1px solid var(--line-strong);border-radius:6px;height:100px;min-width:0;overflow:hidden; }
.app-shell.figma-workspace[data-theme=robotic] .clinical-sheet-band .module-rack.case-notes-rack { display:grid;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px; }
.app-shell.figma-workspace[data-theme=robotic] .clinical-sheet-band .case-note-panel { grid-column:auto!important;grid-row:auto!important; }
.app-shell.figma-workspace[data-theme=robotic] .sheet-cell-heading h3,.app-shell.figma-workspace[data-theme=robotic] .clinical-sheet-band .case-note-panel .module-heading h3 { font:600 12px var(--ui-font);text-transform:none;color:var(--ink); }
.app-shell.figma-workspace[data-theme=robotic] .workspace { margin:14px 12px 0;align-items:stretch;min-height:480px;height:calc(100dvh - 325px); }
.app-shell.figma-workspace[data-theme=robotic] .source-pane { display:flex;flex-direction:column;min-height:480px;height:100%; }
.app-shell.figma-workspace[data-theme=robotic] .pane-heading { border:0;height:auto;min-height:54px;padding:16px 18px 8px; }
.figma-patient-status { display:flex;align-items:center;gap:5px;padding:4px 7px;background:var(--teal-wash);border-radius:4px;font:10px var(--ui-font);margin-left:auto;white-space:nowrap; }
.figma-patient-status button { border:0;background:transparent;color:inherit;font:inherit;padding:2px; }
.app-shell.figma-workspace[data-theme=robotic] .microscopy-tabs { margin:0 18px;padding:4px;background:var(--surface-muted);border:0;border-radius:7px; }
.figma-workspace .microscopy-tabs button { flex:1;justify-content:center;font:12px var(--ui-font); }
.figma-workspace .microscopy-tabs [aria-selected=true] { background:var(--surface);border-color:transparent; }
.app-shell.figma-workspace[data-theme=robotic] .source-canvas { flex:1;min-height:330px;padding:14px 18px 10px;display:flex;flex-direction:column;overflow:auto; }
.app-shell.figma-workspace[data-theme=robotic] .source-text-area { flex:1;min-height:210px;border:1px solid var(--line-strong);background:var(--surface-soft);border-radius:7px;padding:16px;position:relative; }
.app-shell.figma-workspace[data-theme=robotic] .source-document { width:100%;height:100%;min-height:165px;padding:0 0 30px;resize:none; }
.app-shell.figma-workspace[data-theme=robotic] .source-document::placeholder { font:600 16px var(--ui-font);color:var(--ink); }
.app-shell.figma-workspace[data-theme=robotic] .source-empty-hint { top:44px;left:16px;right:16px;font-size:12px;pointer-events:none; }
.figma-extraction-label { position:absolute;bottom:8px;left:16px;font:10px var(--ui-font);color:var(--ink-soft);margin:0;pointer-events:none; }
.app-shell.figma-workspace[data-theme=robotic] .source-upload-button { border:0;background:#3b5232;color:#fff;border-radius:5px; }
.app-shell.figma-workspace[data-theme=robotic] .run-dock { margin-top:auto;padding:8px 18px; }
.app-shell.figma-workspace[data-theme=robotic] .result-pane { display:grid;grid-template-columns:144px minmax(0,1fr);grid-template-rows:auto auto auto minmax(300px,1fr) auto;padding:0 18px 12px;gap:0 14px;height:auto;min-height:480px; }
.app-shell.figma-workspace[data-theme=robotic] .result-heading { grid-row:1;grid-column:1/-1;padding:16px 0 12px; }
.app-shell.figma-workspace[data-theme=robotic] .review-state { background:var(--teal-wash);font:10px var(--ui-font);border:0;border-radius:4px;padding:6px 9px;color:var(--ink-soft); }
.app-shell.figma-workspace[data-theme=robotic] #failure-panel { grid-row:2;grid-column:1/-1;margin:0 0 10px;padding:8px 10px;background:#fff1eb;color:#813e2a;border:0;border-radius:5px;display:flex;flex-wrap:wrap;align-items:start;gap:10px;font:11px/1.5 var(--ui-font); }
.figma-workspace #failure-panel[hidden] { display:none!important; }
.figma-workspace #failure-panel details[open] { width:100%; }
.figma-workspace #failure-panel strong { font-weight:500; }
.app-shell.figma-workspace[data-theme=robotic] .document-toolbar { grid-row:3;grid-column:1/-1;margin:0 0 12px;padding:5px 8px;border:0;border-radius:5px;background:var(--surface-muted);min-height:38px;height:auto;flex-wrap:wrap;gap:4px; }
.app-shell.figma-workspace[data-theme=robotic] .document-toolbar button,.app-shell.figma-workspace[data-theme=robotic] .document-toolbar select { font:11px var(--ui-font);min-height:28px;border:0;background:transparent;border-radius:3px; }
.app-shell.figma-workspace[data-theme=robotic] .document-toolbar button[aria-pressed=true] { background:var(--teal-wash);color:var(--ink);outline:1px solid var(--focus); }
.app-shell.figma-workspace[data-theme=robotic] .paper-outline { grid-column:1;grid-row:4;padding:0;border:0;background:transparent; }
.figma-edit-template { margin-top:10px;text-align:left;padding:6px 0; }
.app-shell.figma-workspace[data-theme=robotic] .document-scroll { grid-column:2;grid-row:4;margin:0;padding:0;border:1px solid var(--line);border-radius:5px;background:var(--surface);min-height:300px; }
.app-shell.figma-workspace[data-theme=robotic] .document-canvas { margin:0;padding:22px;min-height:300px;border:0;box-shadow:none; }
.app-shell.figma-workspace[data-theme=robotic] .document-block-input { line-height:1.7; }
.figma-report-footer { grid-column:1/-1;grid-row:5;display:flex;justify-content:space-between;gap:10px;padding-top:12px;font:10px var(--ui-font);color:var(--ink-soft); }
.figma-workspace :focus-visible { outline:2px solid var(--focus);outline-offset:2px; }
@media(max-width:1100px) {
 .app-shell.figma-workspace[data-theme=robotic] .clinical-sheet-band { grid-template-columns:1fr; height:auto; }
 .app-shell.figma-workspace[data-theme=robotic] .clinical-sheet-band .module-rack.case-notes-rack { grid-column:auto;height:auto; }
 .app-shell.figma-workspace[data-theme=robotic] .workspace { grid-template-columns:1fr;height:auto; }
 .app-shell.figma-workspace[data-theme=robotic] .source-pane { height:560px; }
 .app-shell.figma-workspace[data-theme=robotic] .result-pane { height:650px; }
}
@media(max-width:600px) {
 .app-shell.figma-workspace[data-theme=robotic] .case-controls { flex-wrap:wrap; }
 .app-shell.figma-workspace[data-theme=robotic] .case-controls .workflow-control { flex:1 1 40%; }
 .app-shell.figma-workspace[data-theme=robotic] .workflow-controls { flex-direction:column;align-items:stretch; }
 .app-shell.figma-workspace[data-theme=robotic] .clinical-sheet-band .module-rack.case-notes-rack { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
 .app-shell.figma-workspace[data-theme=robotic] .result-pane { grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto auto minmax(300px,1fr) auto; }
 .app-shell.figma-workspace[data-theme=robotic] .paper-outline { grid-column:1;grid-row:4;display:block; }
 .app-shell.figma-workspace[data-theme=robotic] .document-scroll { grid-column:1;grid-row:5; }
 .figma-report-footer { grid-row:6; }
 .app-shell.figma-workspace[data-theme=robotic] .instrument-masthead { gap:10px; }
 .figma-case-actions { margin:0; }
 .app-shell.figma-workspace[data-theme=robotic] .generation-connection-summary { flex-basis:auto; }
}
}
