@import url('/fc-ui-density-r1.css?v=20260831r1');
:root{--bg:#f5f8f6;--surface:#fff;--text:#173b36;--muted:#667a75;--accent:#16745f;--accent2:#0f766e;--border:#dce5e1;--soft:#eef5f2;--danger:#a33d37}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px Arial,sans-serif}.fc-site-header{height:50px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:14px;padding:0 max(14px,calc((100vw - 1180px)/2));position:sticky;top:0;z-index:40}.fc-site-brand{display:flex;align-items:center;gap:9px;color:inherit;text-decoration:none;font-weight:800;position:relative;z-index:1}.fc-site-page-title{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:var(--text);font-size:14px;font-weight:800;line-height:1;white-space:nowrap;text-align:center;pointer-events:none}.fc-site-mark{width:30px;height:30px;border-radius:8px;background:var(--accent);color:#fff;display:grid;place-items:center;font-size:19px;line-height:1}.page{max-width:1320px;margin:0 auto;padding:24px 22px 48px}.top{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:18px}.top h1{margin:0;font-size:24px}.top-actions-only{justify-content:flex-end;margin-bottom:12px}.sub{margin:6px 0 0;color:var(--muted);line-height:1.45}.status{display:flex;align-items:center;gap:8px;min-height:36px;padding:8px 11px;border:1px solid var(--border);border-radius:9px;background:#fff;color:var(--muted);white-space:nowrap}.dot{width:8px;height:8px;border-radius:50%;background:#94a3b8}.status.ok .dot{background:#16a34a}.status.err .dot{background:#dc2626}.toolbar{display:grid;grid-template-columns:minmax(240px,1fr) auto auto auto;gap:10px;margin-bottom:12px}.search{width:100%;height:38px;border:1px solid #cbd5e1;border-radius:8px;padding:0 11px;font:inherit;background:#fff}.btn{height:38px;border:1px solid #9fb7b0;border-radius:8px;padding:0 13px;background:#fff;color:var(--text);font-weight:700;cursor:pointer}.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn.ghost{background:#f8fbfa}.btn:disabled{opacity:.5;cursor:not-allowed}.panel{background:#fff;border:1px solid var(--border);border-radius:12px;overflow:hidden}.summary{display:flex;gap:18px;align-items:center;min-height:42px;padding:0 12px;border-bottom:1px solid var(--border);color:var(--muted);font-size:12px;flex-wrap:wrap}.summary strong{color:var(--text)}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse;min-width:900px}.table th,.table td{padding:10px 12px;border-bottom:1px solid #edf2f0;text-align:left;vertical-align:middle}.table th{position:sticky;top:0;background:#f9fbfa;z-index:2;padding-top:9px;padding-bottom:7px}.headbtn{display:flex;align-items:center;gap:5px;border:0;background:transparent;color:var(--text);font:inherit;font-weight:800;padding:0;cursor:pointer}.sort{color:var(--muted);font-size:11px}.filters th{top:35px;padding-top:4px;padding-bottom:8px;background:#f9fbfa}.filter{width:100%;height:30px;border:1px solid #d6e0dc;border-radius:6px;padding:0 7px;background:#fff;color:var(--text);font:12px Arial,sans-serif}.table tbody tr{cursor:pointer}.table tbody tr:hover{background:#fbfdfc}.clickfilter,.patientlink{border:0;background:transparent;padding:0;color:inherit;font:inherit;text-align:left;cursor:pointer}.clickfilter:hover,.patientlink:hover{color:var(--accent);text-decoration:underline}.patientlink{font-weight:700}.secondary{display:block;color:var(--muted);font-size:11px;margin-top:2px}.media-tags{display:flex;gap:5px;flex-wrap:wrap;margin-top:5px}.tag{font-size:10px;padding:2px 5px;border:1px solid #d5e3de;border-radius:5px;background:#f7fbf9;color:#526a63}.tag.cine{border-color:#c9d7ef;background:#f5f8ff;color:#42577d}.tag.raw{border-color:#dfd4ee;background:#fbf8ff;color:#6c4c83}.empty{padding:36px 18px;text-align:center;color:var(--muted)}.pagination-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:50px;padding:8px 12px;border-top:1px solid var(--border);background:#fbfcfc;color:var(--muted);font-size:12px}.pagination-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.pagination-actions .btn{height:32px;padding:0 10px}.pagination-actions .page-size{width:72px;height:32px}.pagination-actions label{white-space:nowrap}.pagination-actions #pageLabel{min-width:92px;text-align:center;color:var(--text);font-weight:700}.chips{display:flex;gap:6px;flex-wrap:wrap}.chip{border:1px solid #bfd2cc;border-radius:999px;background:#fff;padding:4px 8px;color:#526a63;font-size:11px;cursor:pointer}.chip::after{content:' ×';color:#899b95}.drawer-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.18);z-index:50;display:none}.drawer-backdrop.open{display:block}.drawer{position:absolute;right:0;top:0;bottom:0;width:min(610px,96vw);background:#fff;border-left:1px solid var(--border);box-shadow:-12px 0 30px rgba(15,23,42,.13);padding:20px;overflow:auto}.drawer h2{margin:0;font-size:20px}.close{float:right;border:0;background:transparent;font-size:24px;line-height:1;cursor:pointer;color:var(--muted)}.meta{display:grid;grid-template-columns:130px 1fr;gap:8px 12px;margin:20px 0}.meta dt{color:var(--muted)}.meta dd{margin:0;font-weight:600;word-break:break-word}.counts{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:14px 0 20px}.count{border:1px solid var(--border);border-radius:8px;padding:9px;text-align:center}.count strong{display:block;font-size:18px}.count span{font-size:11px;color:var(--muted)}.section-title{display:flex;justify-content:space-between;align-items:center;gap:8px;font-weight:800;margin:22px 0 8px}.report-choice{display:grid;grid-template-columns:1fr auto;gap:8px}.report-choice select{height:38px;border:1px solid #cbd5e1;border-radius:8px;padding:0 9px;background:#fff}.note{font-size:11px;color:var(--muted);line-height:1.45;margin-top:8px}.errorbox{margin-bottom:12px;padding:10px 12px;border:1px solid #fecaca;background:#fff7f7;border-radius:8px;color:#7f1d1d;display:none}.errorbox.show{display:block}.media-strip{display:flex;gap:8px;overflow:auto;padding:2px 1px 8px}.media-card{position:relative;flex:0 0 128px;height:98px;border:1px solid #d7e1dd;border-radius:8px;overflow:hidden;background:#0b1211;cursor:pointer;padding:0}.media-card img{width:100%;height:100%;object-fit:cover;display:block}.media-card .badge{position:absolute;left:5px;bottom:5px;max-width:calc(100% - 10px);padding:2px 5px;border-radius:5px;background:rgba(0,0,0,.72);color:#fff;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.media-card .frames{position:absolute;right:5px;top:5px;padding:2px 5px;border-radius:5px;background:rgba(12,28,25,.82);color:#fff;font-size:10px}.media-card.preview-unavailable::before{content:'Prévia indisponível';position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:8px;text-align:center;color:#b7c6c2;font-size:10px;background:#15201e}.media-loading{padding:14px;border:1px dashed #cedbd6;border-radius:8px;color:var(--muted);text-align:center}.history-list{display:grid;gap:8px;margin-top:12px}.history-item{display:grid;grid-template-columns:95px 1fr auto;gap:10px;align-items:center;width:100%;padding:10px;border:1px solid var(--border);border-radius:8px;background:#fff;text-align:left;color:var(--text);cursor:pointer}.history-item:hover{background:#f8fbfa}.history-item small{display:block;color:var(--muted);margin-top:2px}.history-item .go{color:var(--accent);font-weight:800}.drawer-mode{font-size:11px;color:var(--muted);margin-top:3px}
@media(max-width:780px){.fc-site-header{gap:9px}.fc-site-page-title{font-size:12px}.pagination-bar{align-items:flex-start;flex-direction:column}.pagination-actions{width:100%}.pagination-actions #pageLabel{min-width:auto}.pagination-actions .btn{flex:1}.fc-site-header{padding:0 10px}.page{padding:16px 12px 36px}.top{display:block}.status{margin-top:12px;width:max-content;max-width:100%;white-space:normal}.toolbar{grid-template-columns:1fr 1fr}.toolbar .search{grid-column:1/-1}.toolbar .sync-filter{width:100%}.counts{grid-template-columns:repeat(2,1fr)}.history-item{grid-template-columns:80px 1fr}}

.cloud-sync-icon{display:inline-grid;place-items:center;width:20px;height:20px;flex:0 0 20px;border:1px solid #d5e3de;border-radius:50%;background:#f7fbf9;color:#526a63;font-size:12px;line-height:1;cursor:help}.cloud-sync-icon.synced{border-color:#b9dacd;background:#f1faf6;color:#17624f}.cloud-sync-icon.pending{border-color:#ead8a5;background:#fffaf0;color:#7a5b14}.cloud-sync-icon.syncing{border-color:#c9d7ef;background:#f5f8ff;color:#42577d}.cloud-sync-icon.error{border-color:#efc1bd;background:#fff5f4;color:#9a332c;font-weight:800}.cloud-sync-box{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 11px;border:1px solid var(--border);border-radius:8px;background:#fbfdfc}.cloud-sync-info{display:grid;gap:2px}.cloud-sync-info strong{font-size:12px}.cloud-sync-info small{color:var(--muted);line-height:1.35}.cloud-sync-box .btn{flex:0 0 auto}@media(max-width:560px){.cloud-sync-box{align-items:flex-start;flex-direction:column}.cloud-sync-box .btn{width:100%}}

.fc-remove-exam-btn{width:32px;height:32px;border:1px solid #e2b5b1;border-radius:8px;background:#fff;color:#a33d37;font-size:18px;line-height:1;cursor:pointer}.fc-remove-exam-btn:hover{background:#fff4f3;border-color:#d98882}.fc-remove-exam-btn:disabled{opacity:.45;cursor:not-allowed}

.toolbar .sync-filter{width:190px;text-align:left;font-weight:700;background:#fff}

.central-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;flex-shrink:0}.central-actions #personalizeReportBtn{white-space:nowrap}@media(max-width:780px){.central-actions{justify-content:flex-start;margin-top:12px}.central-actions .status{margin-top:0}}

/* The column geometry is independent of arriving rows and facet options. */
html{scrollbar-gutter:stable}
.table{table-layout:fixed}
.col-date{width:120px}.col-patient{width:26%}.col-exam{width:25%}.col-examiner{width:18%}.col-open{width:46px}.col-publication{width:165px}
.table .filter{min-width:0;max-width:100%}
.table .clickfilter,.table .patientlink{max-width:100%;overflow-wrap:anywhere}
.sort{display:inline-block;min-width:10px}
.direct-open-head,.direct-open-filter,.direct-open-cell{padding-left:5px!important;padding-right:5px!important;text-align:center!important}
.direct-open-btn{display:inline-grid;place-items:center;width:32px;height:32px;padding:0;border:1px solid #9fc0b6;border-radius:8px;background:#f2f8f5;color:#16745f;font:900 17px/1 Arial,sans-serif;cursor:pointer}
.direct-open-btn:hover,.direct-open-btn:focus-visible{border-color:#16745f;background:#16745f;color:#fff}.direct-open-btn:disabled{opacity:.45;cursor:wait}
.central-actions{width:320px;max-width:100%}.central-actions .status{width:100%;min-width:0;height:36px}
.status .dot{flex-shrink:0}.status span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}


/* Atualização incremental ao vivo da Central. */
.table tbody tr.live-new,.table tbody tr.live-changed{background:#f2faf7}
@media(prefers-reduced-motion:no-preference){.table tbody tr.live-new,.table tbody tr.live-changed{transition:background-color .8s ease}}

/* Status compacto: conectividade, última alteração e sessão. */
.central-actions{width:auto;max-width:none;flex-wrap:nowrap}
.central-actions .central-system-status{
  display:grid;
  gap:3px;
  width:auto;
  min-width:310px;
  max-width:min(520px,48vw);
  height:auto;
  min-height:0;
  margin:0;
  padding:8px 11px;
  border-radius:9px;
  background:#fff;
}
.system-indicators{display:flex;align-items:center;gap:15px;min-width:0}
.system-indicator{display:inline-flex;align-items:center;gap:5px;color:#596963;font-size:10.5px;font-weight:700;line-height:1.2;white-space:nowrap;cursor:help}
.system-dot{width:7px;height:7px;border-radius:50%;flex:0 0 7px;background:#c3473d;box-shadow:0 0 0 2px rgba(195,71,61,.08)}
.system-indicator.on .system-dot{background:#26a269;box-shadow:0 0 0 2px rgba(38,162,105,.09)}
.system-indicator.off .system-dot{background:#c3473d;box-shadow:0 0 0 2px rgba(195,71,61,.08)}
.live-update-detail,.session-context{
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  line-height:1.25;
  font-weight:500;
}
.live-update-detail{color:#788783;font-size:9.5px}
.session-context{color:#586863;font-size:10px}
@media(max-width:780px){
  .central-actions{width:100%;flex-wrap:wrap}
  .central-actions .central-system-status{width:100%;max-width:100%;min-width:0}
  .system-indicators{gap:12px}
}

/* Perfis de acesso: a coluna de Workspace existe somente para quem pode editar laudos. */
html[data-fc-can-open-workspace="0"] .col-open,
html[data-fc-can-open-workspace="0"] .direct-open-head,
html[data-fc-can-open-workspace="0"] .direct-open-filter,
html[data-fc-can-open-workspace="0"] .direct-open-cell{display:none}
