:root { --ink:#16231f; --muted:#68746f; --line:#dfe7e2; --soft:#f5f8f6; --green:#126b50; --green-dark:#0c523e; --mint:#daf3e5; --gold:#bd7c16; --paper:#fff; }
* { box-sizing:border-box; }
body { margin:0; background:#edf2ef; color:var(--ink); font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button,input { font:inherit; }
button { cursor:pointer; }
.auth-gate { position:fixed; z-index:20; inset:0; display:grid; place-items:center; padding:24px; background:linear-gradient(145deg,#dceae3,#f7faf8 48%,#cce5d8); }
.auth-gate.hidden { display:none; }
.auth-card { width:min(440px,100%); padding:35px; border:1px solid #dbe8e0; border-radius:20px; background:#fff; box-shadow:0 20px 70px rgb(10 45 31 / .16); text-align:center; }
.auth-card .brand-mark { margin:0 auto 18px; width:48px; height:48px; font-size:19px; }
.auth-card h1 { font-size:27px; margin:0 0 12px; }
.auth-card > p:not(.eyebrow) { color:#58675f; font-size:14px; line-height:1.55; }
.google-sign-in { display:flex; align-items:center; justify-content:center; gap:11px; width:100%; margin:24px 0 16px; border:1px solid #cddbd3; border-radius:10px; padding:12px 15px; background:#fff; color:#26372f; font-weight:750; box-shadow:0 1px 2px rgb(0 0 0 / .05); }
.google-sign-in:hover { background:#f6faf7; }
.google-sign-in:disabled { opacity:.65; cursor:wait; }
.google-sign-in span { display:grid; place-items:center; width:22px; height:22px; border-radius:50%; color:#4285f4; font-weight:900; font-size:17px; }
.auth-note { margin:0; color:#77847d !important; font-size:11px !important; }
.app-shell { min-height:100vh; display:grid; grid-template-columns:250px minmax(0,1fr); }
.sidebar { padding:22px 14px; background:#173f34; color:#e8f4ee; display:flex; flex-direction:column; gap:20px; }
.brand { display:flex; gap:10px; align-items:center; font-size:14px; line-height:1.08; padding:0 8px; }
.brand-mark,.avatar { display:grid; place-items:center; border-radius:50%; width:34px; height:34px; font-weight:800; background:#8fe1ba; color:#173f34; }
.primary { border:0; background:var(--green); color:#fff; border-radius:9px; padding:11px 14px; font-weight:700; box-shadow:0 1px 1px rgb(0 0 0 / .06); }
.primary:hover { background:var(--green-dark); }
.new-case { width:100%; background:#8fe1ba; color:#173f34; }
.nav-item { background:transparent; border:0; color:#c4d7cf; text-align:left; padding:10px 12px; border-radius:7px; width:100%; margin:2px 0; }
.nav-item.active,.nav-item:hover { color:#fff; background:rgb(255 255 255 / .12); }
.eyebrow { margin:0 0 5px; font-size:10px; letter-spacing:.09em; font-weight:800; color:var(--muted); }
.sidebar .eyebrow { color:#94b9aa; padding:0 8px; }
.recent { display:grid; align-content:start; gap:4px; }
.case-empty { margin:0; padding:6px 8px; color:#94b9aa; font-size:12px; }
.case-row { position:relative; display:flex; align-items:stretch; overflow:hidden; border-radius:8px; }
.case-item { position:relative; z-index:1; flex:1 1 auto; min-width:0; text-align:left; border:0; background:#173f34; color:#dcece5; padding:10px 12px; border-radius:8px; font-size:12px; }
.case-item span { display:block; color:#8fafa2; margin-top:4px; font-size:11px; }
.case-item:hover,.active-case { background:rgb(255 255 255 / .11); }
.case-row:has(.case-item:hover),.case-row:has(.active-case) { background:rgb(255 255 255 / .11); }
.case-row-menu { flex:0 0 28px; border:0; border-radius:8px; background:#173f34; color:#b9d3c7; font-size:18px; line-height:1; cursor:pointer; }
.case-row-menu:hover,.case-row.actions-open .case-row-menu { background:#315e50; color:#fff; }
.case-swipe-actions { display:flex; flex:0 0 0; width:0; overflow:hidden; align-items:stretch; pointer-events:none; transition:width .18s ease; }
.case-list-archive,.case-list-delete { flex:0 0 auto; border:0; color:#fff; font-size:11px; }
.case-list-archive { background:#68746f; padding:0 10px; }
.case-list-delete { width:38px; background:#b3483e; font-size:18px; }
.case-row.swipe-revealed .case-swipe-actions { flex-basis:112px; width:112px; pointer-events:auto; }
.case-row.actions-open .case-swipe-actions { flex-basis:112px; width:112px; pointer-events:auto; }
.account { margin-top:auto; border:0; background:transparent; color:#fff; display:flex; align-items:center; gap:9px; padding:10px 8px; font-size:12px; }
.account::first-letter { background:#fff; color:#173f34; }
.account span { flex:1; text-align:left; }
.workspace { min-width:0; background:var(--soft); }
.topbar { padding:25px 34px 19px; display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--line); background:#fff; }
h1,h2,h3,p { margin-top:0; }
h1 { margin-bottom:0; font-size:20px; letter-spacing:-.02em; }
h2 { margin-bottom:0; font-size:16px; letter-spacing:-.01em; }
.top-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.quiet,.icon-button { border:1px solid var(--line); background:#fff; color:#4f5d57; border-radius:7px; padding:8px 10px; font-size:12px; }
.templates-mobile { display:none; border:1px solid var(--line); background:#fff; color:var(--green); border-radius:7px; padding:8px 10px; font-size:12px; font-weight:700; }
.icon-button { font-size:17px; line-height:1; }
.badge { background:#e9efeb; border-radius:10px; padding:1px 6px; }
.case-layout { padding:25px 34px; display:grid; grid-template-columns:minmax(500px,1.55fr) minmax(310px,.8fr); gap:20px; max-width:1500px; margin:0 auto; }
.case-layout.conversation-first { grid-template-columns:minmax(0,860px); justify-content:center; }
.case-layout.conversation-first .copilot-pane { min-height:calc(100vh - 190px); }
.case-layout.conversation-first .copilot-pane { background:transparent; border:0; box-shadow:none; }
.case-layout.conversation-first .copilot-heading { display:none; }
.report-pane[hidden] { display:none; }
.report-pane,.copilot-pane { background:var(--paper); border:1px solid var(--line); border-radius:12px; min-height:680px; box-shadow:0 3px 12px rgb(18 40 30 / .03); }
.pane-heading,.copilot-heading { display:flex; justify-content:space-between; align-items:center; padding:19px 20px 15px; border-bottom:1px solid var(--line); }
.mic,.pause { border:1px solid var(--line); border-radius:7px; padding:8px 10px; background:#fff; font-size:12px; font-weight:700; color:#4c5a55; }
.mic svg { width:21px; height:21px; fill:currentColor; }
.mic.recording { background:#fff0f1; border-color:#ef9ba6; color:#9d1f31; animation:mic-pulse 1.4s ease-in-out infinite; }
.mic.transcribing { background:#eef2ff; border-color:#a6b4ef; color:#33409d; opacity:.85; cursor:wait; animation:none; }
@keyframes mic-pulse { 0%,100% { box-shadow:0 0 0 0 rgb(239 155 166 / .55); } 50% { box-shadow:0 0 0 6px rgb(239 155 166 / 0); } }
.report-editor { margin:18px 20px; min-height:330px; line-height:1.65; outline:none; font-family:Georgia, "Times New Roman", serif; font-size:15px; }
.report-editor h3 { font-family:Inter, sans-serif; font-size:12px; letter-spacing:.04em; margin-bottom:18px; }
.report-editor p { margin-bottom:13px; }
.placeholder { color:#a8b1ad; }
.template-field { display:inline-block; min-width:54px; min-height:1.1em; vertical-align:baseline; border-bottom:1px solid #8ea197; background:#f7faf8; outline:none; }
.template-field:focus { border-bottom:2px solid var(--green); background:#e9f3ed; }
.report-editor table { width:100%; border-collapse:collapse; margin:10px 0 14px; font-family:Inter,sans-serif; font-size:12px; }
.report-editor td { border:1px solid #dfe7e2; padding:7px; vertical-align:top; }
.capture-strip { padding:15px 20px; border-top:1px solid var(--line); background:#fbfdfb; display:flex; align-items:center; gap:20px; }
.capture-copy { min-width:116px; }
.capture-copy .eyebrow { font-size:9px; }
.capture-copy span { font-size:12px; color:var(--muted); }
.thumbnails { display:flex; gap:9px; align-items:center; overflow:auto; }
.thumbnail,.add-capture { position:relative; min-width:72px; width:72px; height:58px; border-radius:6px; border:1px solid #b8c6bf; background:linear-gradient(135deg,#9ba5a0,#e2e6e4 48%,#78847e); color:#fff; text-shadow:0 1px 2px #000; font-size:9px; text-align:left; padding:7px; overflow:hidden; }
.thumbnail b { position:absolute; bottom:5px; right:6px; font-size:9px; }
.remove-capture { position:absolute; top:4px; right:4px; width:19px; height:19px; padding:0; border:0; border-radius:50%; background:rgb(15 28 22 / .86); color:#fff; font-size:17px; line-height:17px; text-align:center; text-shadow:none; cursor:pointer; opacity:0; transition:opacity .16s ease, background .16s ease; }
.thumbnail:hover .remove-capture, .remove-capture:focus-visible { opacity:1; }
.remove-capture:hover { background:#a3382b; }
.image-preview-dialog { width:min(760px, calc(100vw - 32px)); padding:24px; border:1px solid var(--line); border-radius:14px; box-shadow:0 24px 70px rgb(15 35 25 / .28); }
.image-preview-dialog::backdrop { background:rgb(10 22 16 / .62); backdrop-filter:blur(3px); }
.image-preview-dialog h2 { margin:4px 34px 14px 0; font-size:20px; overflow-wrap:anywhere; }
.image-preview-dialog img { display:block; width:100%; max-height:72vh; object-fit:contain; border-radius:8px; background:#15221d; }
.image-preview-dialog .muted { margin:12px 0 0; font-size:12px; }
.add-capture { display:grid; place-items:center; background:#fff; color:var(--green); border-style:dashed; border-color:#9db8ab; font-size:22px; text-shadow:none; cursor:pointer; }
.add-capture input { display:none; }
.photo-capture { display:grid; place-items:center; min-width:72px; width:72px; height:58px; border-radius:6px; border:1px dashed #bd7c16; background:#fffaf0; color:#965d05; font-size:22px; cursor:pointer; }
.photo-capture input { display:none; }
.danger-action { color:#a3382b; }
.danger-action:hover { border-color:#e6bbb5; background:#fff6f5; }
.paste-capture { min-width:72px; width:72px; height:58px; border:1px dashed #6c9f8c; border-radius:6px; background:#f4fbf7; color:var(--green); font-size:11px; font-weight:700; line-height:1.15; }
.report-footer { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-top:1px solid var(--line); }
.report-footer p { margin:0; font-size:11px; color:var(--muted); }
.report-actions { display:flex; gap:8px; align-items:center; }
.copilot-pane { display:flex; flex-direction:column; }
.pause[aria-pressed="true"] { background:#f4eee1; color:#80580c; border-color:#ddc68c; }
.queue-note { font-size:12px; padding:14px 20px 8px; color:#53635b; }
.queue-note span { color:#e18f19; }
.queue-note button { color:var(--green); background:none; border:0; text-decoration:underline; padding:0; font-size:12px; }
.suggestion-card { margin:0 15px 14px; border:1px solid #edcf96; background:#fffaf0; border-radius:9px; padding:14px; }
.card-meta { font-size:10px; letter-spacing:.07em; font-weight:800; color:#8c5f10; display:flex; align-items:center; gap:6px; }
.priority-dot { width:7px; height:7px; border-radius:50%; background:#df8d18; }
.dismiss { margin-left:auto; background:none; border:0; color:#8c5f10; font-size:19px; line-height:1; }
.suggestion-card h3 { margin:9px 0 7px; font-size:14px; }
.suggestion-card p { color:#4d524e; font-size:12px; line-height:1.45; margin-bottom:10px; }
.source-line { border-top:1px solid #f0dfbd; padding-top:9px; color:#6e654d; font-size:11px; }
.source-button { border:0; background:none; color:var(--green); text-decoration:underline; padding:0 0 0 5px; font-size:11px; }
.conversation { padding:4px 18px 14px; overflow:auto; flex:1; display:flex; flex-direction:column; }
.conversation-empty-hint { margin:auto 0 12px; color:#718078; text-align:center; font-size:14px; line-height:1.55; }
.conversation-empty-hint .eyebrow { margin-bottom:9px; }
.conversation-empty-hint p:last-child { margin:0; }
.assistant-message,.user-message { display:flex; gap:8px; align-items:flex-start; margin:10px 0; font-size:12px; line-height:1.45; }
.assistant-message p { background:#edf7f1; padding:10px; border-radius:3px 9px 9px 9px; margin:0; }
.working-message p { color:#4c6659; font-style:italic; }
.user-message { justify-content:flex-end; }
.user-message p { background:#edf0ee; padding:9px 10px; border-radius:9px 3px 9px 9px; margin:0; max-width:86%; }
.image-message { margin-left:auto; max-width:72%; }
.chat-image-card { display:block; overflow:hidden; padding:0; border:1px solid #d5dfda; border-radius:12px 4px 12px 12px; background:#fff; color:#31433a; text-align:left; cursor:pointer; box-shadow:0 3px 11px rgb(18 40 30 / .08); }
.chat-image-card img { display:block; width:100%; max-height:260px; object-fit:cover; background:#e8eeeb; }
.chat-image-label { display:block; padding:7px 9px; font-size:11px; line-height:1.25; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-image-card > span:not(.chat-image-label) { display:block; padding:28px 16px; color:#718078; font-size:11px; }
.report-message { margin:14px 0; padding:15px; border:1px solid #cfe0d6; border-radius:12px; background:#fff; box-shadow:0 5px 18px rgb(18 40 30 / .05); }
.report-message .eyebrow { margin-bottom:5px; }
.report-message h3 { margin:0 0 12px; font-size:14px; }
.report-message-content { min-height:120px; color:#26352f; font-family:Georgia, "Times New Roman", serif; font-size:14px; line-height:1.58; outline:none; }
.report-message-content:focus { box-shadow:0 0 0 3px rgb(18 107 80 / .12); border-radius:6px; }
.report-message-content p { margin:0 0 10px; }
.report-message-content .draft-status { margin:0; color:#668075; font-family:Inter, sans-serif; font-size:13px; font-style:italic; }
.report-message-content h3 { font-family:Inter, sans-serif; font-size:11px; letter-spacing:.05em; }
.clinical-pearl { margin:12px 0 3px 31px; padding:13px 14px; border:1px solid #d7c48b; border-radius:12px; background:#fffdf5; box-shadow:0 4px 15px rgb(80 61 13 / .05); }
.clinical-pearl-meta { display:flex; align-items:center; gap:6px; color:#806312; font-size:10px; letter-spacing:.07em; font-weight:800; }
.clinical-pearl-meta > span { color:#c88a16; font-size:13px; }
.clinical-pearl .dismiss { margin-left:auto; }
.clinical-pearl h3 { margin:9px 0 6px; font-size:13px; }
.clinical-pearl p { margin:0; color:#4e5047; font-size:12px; line-height:1.48; }
.clinical-pearl-reference { margin-top:9px !important; padding-top:8px; border-top:1px solid #eee3ba; font-size:11px !important; color:#7b704d !important; }
.clinical-pearl-reference a { color:var(--green); font-weight:700; text-decoration:none; }
.clinical-pearl-reference a:hover { text-decoration:underline; }
.avatar { width:23px; height:23px; font-size:10px; flex:none; }
.chat-composer { border-top:1px solid var(--line); padding:13px; }
.chat-composer-empty { padding:16px; border:0; }
.conversation-first .chat-composer { position:sticky; bottom:0; background:linear-gradient(transparent,#edf2ef 28%); padding-top:36px; }
.conversation-tools { display:flex; flex-wrap:wrap; gap:7px; margin:0 0 10px; }
.conversation-tools[hidden] { display:none; }
.conversation-tool { display:inline-flex; align-items:center; gap:5px; border:1px solid var(--line); border-radius:9px; padding:8px 9px; background:#fff; color:#4c5a55; font-size:11px; font-weight:700; cursor:pointer; }
.conversation-tool input { display:none; }
.conversation-tool:hover { border-color:#91bca3; background:#f4faf6; }
.pending-attachments { display:flex; gap:8px; align-items:center; padding:0 4px 9px; overflow:auto; }
.pending-attachment { position:relative; width:58px; height:58px; flex:0 0 auto; overflow:hidden; border:1px solid #c7d7ce; border-radius:9px; background:#fff; }
.pending-attachment img { display:block; width:100%; height:100%; object-fit:cover; }
.pending-attachment button { position:absolute; top:3px; right:3px; width:20px; height:20px; border:0; border-radius:50%; background:rgb(20 42 33 / .78); color:#fff; font-size:15px; line-height:1; cursor:pointer; }
.chat-input-row { display:flex; align-items:center; gap:7px; padding:6px; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:0 8px 22px rgb(17 52 35 / .08); }
.chat-input-row input { min-width:0; flex:1; border:0; padding:10px 3px; font-size:13px; outline:none; }
.chat-input-row button { width:39px; height:39px; border:0; border-radius:13px; background:var(--green); color:#fff; font-size:17px; }
.chat-input-row .composer-icon { background:transparent; color:#33483d; font-size:27px; font-weight:400; }
.chat-input-row .composer-icon[aria-expanded="true"] { background:#edf7f1; color:var(--green); }
.chat-input-row .mic { display:grid; place-items:center; }
.chat-input-row .mic.recording { background:#fff1f2; color:#b72338; }
dialog { width:min(470px,calc(100% - 30px)); border:0; border-radius:12px; padding:25px; box-shadow:0 15px 60px rgb(0 0 0 / .25); color:var(--ink); }
dialog::backdrop { background:rgb(14 31 24 / .36); }
dialog h2 { margin-bottom:9px; font-size:19px; }
dialog p { font-size:13px; line-height:1.5; }
dialog a { color:var(--green); font-weight:700; }
.template-list { display:grid; gap:10px; margin-top:18px; }
.template-filters { display:grid; grid-template-columns:minmax(0,1fr) 165px; gap:8px; margin-top:16px; }
.template-filters input,.template-filters select { width:100%; border:1px solid var(--line); border-radius:7px; padding:9px; background:#fff; font:inherit; font-size:12px; }
.template-card { border:1px solid var(--line); border-radius:9px; padding:12px; display:grid; gap:9px; }
.template-card h3 { font-size:14px; margin:0; }
.template-card p { margin:0; color:var(--muted); font-size:12px; }
.template-actions { display:flex; gap:8px; }
.template-actions button { border:1px solid var(--line); border-radius:7px; background:#fff; color:var(--green); font-weight:700; padding:7px 9px; font-size:12px; }
.template-create { margin-top:4px; font-size:12px; }
.template-name-label { display:grid; gap:6px; margin:16px 0 10px; color:var(--muted); font-size:12px; font-weight:700; }
.template-name-label input,.template-name-label select,.template-name-label textarea { border:1px solid var(--line); border-radius:7px; padding:10px; color:var(--ink); font:inherit; resize:vertical; }
.template-content-editor { min-height:300px; max-height:52vh; overflow:auto; border:1px solid var(--line); border-radius:8px; padding:14px; font-family:Georgia,"Times New Roman",serif; font-size:14px; line-height:1.55; outline:none; }
.template-content-editor:focus { border-color:var(--green); box-shadow:0 0 0 3px rgb(18 107 80 / .12); }
.template-content-editor p { margin:0 0 10px; }
#saveTemplate { margin-top:14px; }
.privacy-dialog { max-width:530px; }
.privacy-dialog p { margin-bottom:12px; }
.privacy-check { display:flex; gap:9px; align-items:flex-start; margin:18px 0 14px; color:#405049; font-size:13px; line-height:1.4; }
.privacy-check input { margin-top:3px; accent-color:var(--green); }
.privacy-dialog .primary[disabled] { cursor:not-allowed; opacity:.45; }
@media (max-width:620px) { .template-filters { grid-template-columns:1fr; } }
.dialog-close { float:right; background:none; border:0; font-size:22px; }
.muted { color:var(--muted); }
.compact-window { position:fixed; z-index:4; right:22px; bottom:22px; width:300px; border:1px solid #cbd8d0; background:#fff; box-shadow:0 13px 45px rgb(7 48 33 / .23); border-radius:12px; padding:14px; }
.compact-window.hidden { display:none; }
.compact-head { display:flex; justify-content:space-between; font-size:14px; }
.compact-head button { border:0; background:none; font-size:20px; }
.compact-status { font-size:11px; color:#a06c16; margin:13px 0 6px; }
.compact-window > p:not(.compact-status) { font-size:12px; line-height:1.4; }
.compact-open { width:100%; font-size:12px; }
.new-case-mobile { display:none; }
@media (max-width:980px) { .app-shell { grid-template-columns:1fr; } .sidebar { display:none; } .case-layout { grid-template-columns:1fr; padding:16px; } .case-layout.conversation-first { grid-template-columns:1fr; min-height:calc(100vh - 105px); } .topbar { padding:18px; } .report-pane,.copilot-pane { min-height:unset; } .case-layout.conversation-first .copilot-pane,.copilot-pane { min-height:500px; } }
@media (max-width:620px) { .new-case-mobile { display:inline-flex; align-items:center; padding:8px 10px; font-size:10px; } .top-actions .quiet:not(.case-manage) { display:none; } .case-manage { padding:7px 8px; font-size:10px; } .templates-mobile { display:inline-block; } .capture-strip { align-items:flex-start; flex-direction:column; gap:8px; } .report-footer { align-items:flex-start; gap:12px; flex-direction:column; } .report-actions { width:100%; flex-wrap:wrap; } }
@media (hover:none) { .remove-capture { opacity:1; } }
