:root {
  --ink: #142033;
  --muted: #64748b;
  --line: #dce7e8;
  --surface: #ffffff;
  --canvas: #f2f8f7;
  --teal: #008f83;
  --teal-dark: #006b63;
  --blue: #2563eb;
  --red: #c73a3a;
  --amber: #b76a00;
  --green: #16825d;
  --shadow: 0 16px 45px rgba(19, 51, 59, .09);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body { margin: 0; min-height: 100vh; color: var(--ink); font: 14px/1.45 Inter, Segoe UI, system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }
.shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 28px; color: white; background: #122436; box-shadow: 0 8px 24px rgba(15, 31, 48, .14); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: white; background: linear-gradient(145deg, #12b8a7, #00776e); font-size: 18px; }
.brand-emblem { position:relative;display:block;flex:0 0 46px;width:46px;height:46px;overflow:hidden;border-radius:13px;background:#fff;box-shadow:0 5px 14px rgba(4,20,36,.18); }
.brand-emblem img { position:absolute;width:214px;max-width:none;height:auto;left:-29px;top:-31px; }
.brand-copy { display:block;line-height:1.05; }
.brand-name { display:block;color:inherit;font-size:17px;font-style:normal;font-weight:850;letter-spacing:-.035em; }
.brand-name > span { color:#35c7b7; }
.brand small { display: block; color: #a7c2cc; font-weight: 600; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav a, .nav button { border: 0; border-radius: 9px; padding: 9px 13px; color: #dbe8ed; background: transparent; text-decoration: none; }
.nav a:hover, .nav a.active, .nav button:hover { color: white; background: rgba(255,255,255,.1); }
.content { width: min(1600px, calc(100% - 40px)); margin: 26px auto 60px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 0 0 20px; }
.eyebrow { margin: 0 0 4px; color: var(--teal-dark); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.04em; }
h2 { margin-bottom: 14px; font-size: 19px; letter-spacing: -.02em; }
h3 { margin-bottom: 8px; font-size: 15px; }
.subtle { color: var(--muted); }
.file-inline-link { color: #006f67; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.file-inline-link:hover, .file-inline-link:focus { color: #004f49; text-decoration-thickness: 2px; }
.card { border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric { position: relative; display: flex; min-height: 126px; padding: 18px; overflow: hidden; flex-direction: column; align-items: flex-start; gap: 0; }
.metric::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent, var(--teal)); }
.metric-label { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.metric-value { display: block; max-width: 100%; margin-top: 12px; font-size: 30px; font-weight: 850; letter-spacing: -.04em; line-height: 1.05; overflow-wrap: anywhere; }
.metric-note { display: block; max-width: 100%; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.field { display: grid; gap: 6px; min-width: 150px; }
.field.grow { flex: 1; min-width: 240px; }
label { color: #384a5e; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
input, select, textarea { width: 100%; border: 1px solid #cbdadc; border-radius: 9px; padding: 10px 12px; color: var(--ink); background: white; outline: none; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,143,131,.11); }
.multi-select-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.multi-select { position: relative; width: 100%; min-width: 150px; }
.multi-select-trigger { display: flex; width: 100%; min-height: 42px; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #cbdadc; border-radius: 9px; padding: 10px 12px; color: var(--ink); background: white; text-align: left; font-weight: 500; }
.multi-select-trigger span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multi-select-trigger strong { color: #475569; font-size: 11px; }
.multi-select.has-selection .multi-select-trigger { border-color: #83c9c2; background: #f2fbfa; }
.multi-select.open .multi-select-trigger, .multi-select-trigger:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,143,131,.11); }
.multi-select-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 80; display: none; width: max(100%, 240px); max-height: 310px; overflow: auto; border: 1px solid #cbdadc; border-radius: 12px; padding: 6px; background: white; box-shadow: 0 18px 42px rgba(15, 39, 57, .18); }
.multi-select.open .multi-select-panel { display: grid; gap: 2px; }
.multi-select-option { display: flex; align-items: center; gap: 9px; border-radius: 9px; padding: 8px 9px; color: var(--ink); font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; cursor: pointer; }
.multi-select-option:hover { background: #eef8f7; }
.multi-select-option input { width: auto; margin: 0; accent-color: var(--teal); }
.multi-select-option.all-option { color: var(--teal-dark); font-weight: 800; border-bottom: 1px solid #edf2f3; border-radius: 9px 9px 4px 4px; margin-bottom: 3px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 39px; border: 1px solid transparent; border-radius: 9px; padding: 9px 14px; font-weight: 750; text-decoration: none; }
.button.primary { color: white; background: var(--teal); }
.button.primary:hover { background: var(--teal-dark); }
.button.secondary { border-color: #c7d7da; color: var(--ink); background: white; }
.button.danger { color: var(--red); border-color: #efcaca; background: #fff7f7; }
.button:disabled { cursor: wait; opacity: .55; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 20px 0; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 11px 14px; color: #526479; background: #f7fafb; font-size: 10px; text-align: left; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
td { padding: 13px 14px; border-top: 1px solid #e8eff0; vertical-align: top; }
tbody tr:hover { background: #fbfefe; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; color: #526477; background: #eaf0f2; font-size: 11px; font-weight: 750; white-space: nowrap; }
.badge.green, .badge.reviewed, .badge.completed, .badge.connected { color: #0c6c4b; background: #dff5ec; }
.badge.red, .badge.issue, .badge.failed, .badge.error { color: #a62727; background: #fde6e6; }
.badge.amber, .badge.pending, .badge.partial, .badge.running { color: #905600; background: #fff0d4; }
.badge.blue { color: #225bbb; background: #e4edff; }
.progress { height: 11px; border-radius: 999px; overflow: hidden; background: #e5eeef; }
.progress > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), #35c7b7); transition: width .35s ease; }
.mini-progress { height: 7px; margin-top: 6px; min-width: 110px; }
.payment-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.compact-metrics { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 16px; }
.compact-metrics .metric { min-height: 86px; padding: 16px; }
.system-health-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.system-health-metrics .metric { min-height: 112px; }
.system-health-metrics .metric-value { font-size: clamp(20px, 2vw, 30px); }
.compact-list { margin: 8px 0 0; padding-left: 18px; }
.compact-list li { margin: 7px 0; }
.narrow-page { max-width: 980px; margin: 0 auto; }
.guide-card { display: grid; gap: 14px; padding: 28px; }
.guide-card h1 { margin-bottom: 0; }
.guide-card h2 { margin-top: 10px; font-size: 18px; }
.guide-card ol { margin: 0; padding-left: 22px; color: #31495f; line-height: 1.7; }
.guide-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.whatsapp-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.whatsapp-table td { vertical-align: top; }
.whatsapp-file-link { color: var(--teal-dark); font-weight: 800; text-decoration: none; }
.whatsapp-file-link:hover { text-decoration: underline; }
.whatsapp-patient-match { display: inline-flex; margin-top: 5px; border-radius: 999px; padding: 3px 8px; color: #085f58; background: #dff5ec; font-size: 11px; font-weight: 800; }
.compact-list .subtle { display:block; margin-top:3px; }
.issue-list { margin: 12px 0 0; padding-left: 20px; color: #203548; }
.issue-list li { margin: 10px 0; line-height: 1.45; }
.scan-line { display: grid; grid-template-columns: minmax(240px, 1fr) auto; gap: 15px; align-items: center; }
.scan-stats { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 13px; color: var(--muted); }
.scan-stats strong { color: var(--ink); }
.alert { border: 1px solid #f1d0d0; border-radius: 10px; padding: 12px 14px; color: #962a2a; background: #fff7f7; }
.alert.success { border-color: #b9dfd0; color: #086354; background: #effaf6; }
.subtle-alert { color: var(--ink); background: #f8fbfb; border-color: var(--line); margin: 12px 0; }
.link-button { border: 0; background: transparent; color: var(--teal); font-weight: 800; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-button:hover { color: #006f66; }
.empty { padding: 36px; color: var(--muted); text-align: center; }
.charts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.bar-list { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 42px; gap: 8px; align-items: center; font-size: 12px; }
.bar-track { height: 8px; border-radius: 999px; overflow: hidden; background: #e7eff0; }
.bar-track span { display: block; height: 100%; background: var(--teal); border-radius: inherit; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 20px; border-top: 1px solid var(--line); background: white; }
.scan-failed-row { background: #fff9f9; }
.scan-failed-row:hover { background: #fff4f4; }
.scan-result { min-width: 250px; max-width: 420px; color: var(--muted); }
.scan-failed-row .scan-result { color: #9d2929; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; }
.icon-button { border: 1px solid #d1dfe1; border-radius: 8px; padding: 6px 9px; color: #375064; background: white; text-decoration: none; font-weight: 700; font-size: 12px; }
.document-actions-cell { width: 1%; min-width: 118px; vertical-align: top; }
.document-action-dropdown { position: relative; display: inline-block; }
.document-action-dropdown > summary { display: inline-flex; min-width: 94px; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; user-select: none; }
.document-action-dropdown > summary::-webkit-details-marker { display: none; }
.document-action-dropdown[open] > summary { color: #006f67; border-color: #87cfc7; background: #effaf8; }
.document-action-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; display: grid; min-width: 178px; gap: 4px; border: 1px solid #ccdadd; border-radius: 10px; padding: 6px; background: white; box-shadow: 0 14px 35px rgba(15,39,57,.18); }
.document-action-menu .icon-button { display: flex; width: 100%; justify-content: flex-start; border-color: transparent; padding: 8px 10px; background: transparent; cursor: pointer; }
.document-action-menu .icon-button:hover, .document-action-menu .icon-button:focus { color: #006f67; background: #edf8f6; }
.selection-cell { width: 42px; min-width: 42px; text-align: center; vertical-align: middle; }
.selection-cell input { width: 16px; height: 16px; accent-color: var(--teal); cursor: pointer; }
.document-bulk-bar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 20px 14px; border-top: 1px solid rgba(188,211,214,.45); flex-wrap: wrap; }
.document-bulk-bar.hidden { display: none; }
.document-bulk-bar .document-action-dropdown > summary { min-width: 152px; }
.document-bulk-bar .button:disabled, .document-bulk-bar button:disabled { cursor: not-allowed; opacity: .55; }
.bulk-action-dropdown .document-action-menu { right: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.tab { border: 1px solid #cbdadc; border-radius: 9px; padding: 9px 13px; color: #526477; background: white; font-weight: 750; }
.tab.active { color: white; border-color: var(--teal); background: var(--teal); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; background: #94a3b8; }
.status-dot.on { background: #16a36f; box-shadow: 0 0 0 4px rgba(22,163,111,.12); }
.bridge-status { display: flex; align-items: center; gap: 2px; margin-bottom: 14px; border: 1px solid #d6e2e4; border-radius: 9px; padding: 10px 12px; color: #526477; background: #f7fafb; font-size: 12px; }
.bridge-status.ready { border-color: #bfe5d8; color: #0c6c4b; background: #eefaf6; }
.bridge-status.ready .status-dot { background: #16a36f; }
.bridge-status.missing { border-color: #efd9ad; color: #805500; background: #fff9ec; }
.collector-flow { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-bottom: 14px; }
.collector-step { display: flex; align-items: center; gap: 9px; border: 1px solid #dbe6e8; border-radius: 9px; padding: 10px; color: #68798a; background: #fafcfc; }
.collector-step > span { display: grid; flex: 0 0 25px; height: 25px; place-items: center; border-radius: 50%; color: white; background: #a6b4bf; font-size: 11px; font-weight: 800; }
.collector-step strong, .collector-step small { display: block; }
.collector-step strong { color: #3b5266; font-size: 12px; }
.collector-step small { margin-top: 2px; font-size: 10px; }
.collector-step.done { border-color: #bfe5d8; color: #0c6c4b; background: #eefaf6; }
.collector-step.done > span { background: #16a36f; }
.collector-step.done strong { color: #0c6c4b; }
.collector-step.attention { border-color: #efd9ad; color: #805500; background: #fff9ec; }
.collector-step.attention > span { background: #d59322; }
.collector-next { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 0 0 14px; border-radius: 9px; padding: 12px 14px; color: #805500; background: #fff6e3; }
.login-page { display: grid; grid-template-columns: minmax(320px, 1.05fr) minmax(360px, .95fr); min-height: 100vh; }
.login-art { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(35px, 7vw, 90px); color: white; overflow: hidden; background: linear-gradient(145deg, #10283b 10%, #075c5c 68%, #009083); }
.login-art::before, .login-art::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; }
.login-art::before { width: 520px; height: 520px; right: -230px; top: -170px; }
.login-art::after { width: 360px; height: 360px; right: -50px; bottom: -240px; }
.login-art h1 { max-width: 650px; font-size: clamp(40px, 6vw, 76px); line-height: .98; }
.login-art p { max-width: 540px; color: #d6eeee; font-size: 17px; }
.login-pane { display: grid; place-items: center; padding: 35px; background: #f7fbfa; }
.login-box { width: min(430px, 100%); }
.login-box .brand { color: var(--ink); margin-bottom: 50px; }
.login-form { display: grid; gap: 15px; }
.login-form .button { margin-top: 8px; min-height: 46px; }
.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(8,23,35,.68); }
.modal { width: min(540px, 100%); max-height: 90vh; overflow: auto; padding: 24px; }
.document-preview-backdrop { z-index: 130; padding: 14px; }
.document-preview-modal { display: grid; grid-template-rows: auto minmax(0,1fr); width: min(1380px, 98vw); height: min(920px, 96vh); max-height: 96vh; overflow: hidden; padding: 0; }
.document-preview-head { margin: 0; padding: 18px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fff, #f8fbfb); }
.document-preview-head h2 { max-width: 620px; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-preview-toolbar { justify-content: flex-end; }
.document-preview-toolbar .button { min-height: 35px; padding: 7px 11px; }
.document-preview-body { min-height: 0; overflow: auto; background: #102033; }
.document-preview-loading, .document-preview-unsupported { display: grid; min-height: 420px; place-items: center; padding: 28px; color: #dcebf0; text-align: center; }
.document-preview-unsupported { align-content: center; gap: 12px; }
.document-preview-unsupported .subtle { color: #b8cbd2; }
.document-preview-frame { display: block; width: 100%; height: 100%; min-height: 620px; border: 0; background: #fff; }
.document-preview-image-wrap { display: grid; min-height: 100%; padding: 24px; place-items: start center; overflow: auto; }
.document-preview-image-wrap img { max-width: 100%; height: auto; transform-origin: top center; transition: transform .16s ease; box-shadow: 0 20px 55px rgba(0,0,0,.35); background: white; }
.toast { position: fixed; z-index: 120; right: 22px; bottom: 22px; max-width: 430px; border-radius: 10px; padding: 13px 16px; color: white; background: #14283c; box-shadow: 0 15px 35px rgba(0,0,0,.25); }
.toast.error { background: #a92f2f; }
.code-box { word-break: break-all; border-radius: 9px; padding: 12px; color: #dfffee; background: #122d34; font: 12px/1.5 Consolas, monospace; }
.compliance-toolbar { padding: 18px 20px; }
.compliance-note { margin: -4px 0 18px; border-left: 4px solid var(--blue); border-radius: 8px; padding: 11px 14px; color: #3f5870; background: #edf5ff; font-size: 12px; }
.compliance-metrics .metric { min-height: 118px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; }
.quick-filter { border: 1px solid transparent; border-radius: 999px; padding: 5px 10px; color: #526477; background: #eaf0f2; font-size: 11px; font-weight: 800; }
.quick-filter.completed { color: #0c6c4b; background: #dff5ec; }
.quick-filter.pending { color: #905600; background: #fff0d4; }
.quick-filter.manual { color: #225bbb; background: #e4edff; }
.quick-filter:hover, .quick-filter.active { border-color: currentColor; box-shadow: 0 0 0 2px rgba(20,32,51,.08); }
.quick-filter span { margin-left: 3px; }
.auditor-queue { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 20px 16px; border: 1px solid #dbe8e9; border-radius: 13px; padding: 14px 16px; background: linear-gradient(180deg,#fbfefe,#f5faf9); }
.auditor-queue h3 { margin-bottom: 2px; }
.auditor-queue p { margin-bottom: 0; }
.auditor-queue-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.quick-filter.issue { color: #a62727; background: #fde6e6; }
.completion-cell { display: grid; grid-template-columns: 42px minmax(90px, 150px) auto; gap: 8px; align-items: center; min-width: 220px; }
.completion-cell .progress { height: 8px; }
.missing-preview { max-width: 340px; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.compliance-modal { display: grid; grid-template-rows: auto minmax(0,1fr); width: min(1120px, 96vw); max-height: calc(100vh - 40px); overflow: hidden; }
.compliance-modal > :not(.modal-head) { min-height: 0; overflow: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 16px; }
.modal-head > div { min-width: 0; }
.modal-head .actions { justify-content: flex-end; }
.compliance-summary { display: grid; grid-template-columns: minmax(280px, 1fr) auto; gap: 20px; align-items: center; border: 1px solid var(--line); border-radius: 11px; padding: 15px; background: #f8fbfb; }
.compliance-summary .progress { margin-top: 8px; }
.requirement-list { display: grid; gap: 9px; margin-top: 16px; }
.requirement-row { display: grid; grid-template-columns: minmax(160px, 180px) minmax(0, 1fr) minmax(76px, auto); gap: 16px; align-items: start; border: 1px solid var(--line); border-left: 4px solid #c9d7da; border-radius: 10px; padding: 13px; }
.requirement-row.fulfilled { border-left-color: var(--green); background: #fbfffd; }
.requirement-row.missing { border-left-color: var(--red); background: #fffafa; }
.requirement-row.not_applicable { border-left-color: var(--blue); background: #fafcff; }
.requirement-row.not_applicable_profession, .requirement-row.profession_pending { border-left-color: var(--blue); background: #fafcff; }
.requirement-row.conditional { border-left-color: #7c3aed; background: #fcfaff; }
.requirement-row.optional { border-left-color: var(--orange); background: #fffdf7; }
.requirement-state { min-width: 0; }
.requirement-state .badge { display: flex; width: 100%; min-height: 28px; justify-content: center; padding: 6px 10px; text-align: center; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }
.requirement-row > div:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
.requirement-agreement { display: block; margin-top: 2px; font-size: 11px; }
.requirement-evidence { margin-top: 7px; color: var(--muted); font-size: 12px; }
.requirement-evidence a { color: var(--teal-dark); font-weight: 700; }
.manual-note { margin-top: 7px; border-radius: 7px; padding: 7px 9px; color: #34556f; background: #edf5ff; font-size: 12px; }
.requirement-actions { display: flex; min-width: 76px; justify-content: flex-end; flex-wrap: wrap; gap: 6px; max-width: 260px; }
.reference-box { margin-top: 15px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fbfdfd; }
.reference-box summary { cursor: pointer; color: #385064; }
.document-mini-list { display: grid; gap: 6px; margin-top: 12px; }
.document-mini-list a { border-top: 1px solid #e7eeee; padding: 8px 2px; color: #375064; text-decoration: none; font-size: 12px; }
.professional-patient-list { display: grid; gap: 12px; margin-top: 16px; }
.professional-patient-checklist { border: 1px solid var(--line); border-radius: 12px; background: white; overflow: hidden; }
.professional-patient-checklist > summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 16px; cursor: pointer; list-style-position: inside; }
.professional-patient-checklist > summary span:first-child { display: grid; gap: 3px; }
.professional-patient-checklist > summary small { color: var(--muted); font-size: 11px; }
.professional-patient-checklist.deep-linked-patient { border-color: rgba(0, 151, 136, 0.65); box-shadow: 0 0 0 3px rgba(0, 151, 136, 0.12); }
.professional-patient-checklist.focus-pulse { animation: checklistFocusPulse 1.2s ease-in-out 2; }
@keyframes checklistFocusPulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(0, 151, 136, 0.12); } 50% { box-shadow: 0 0 0 7px rgba(0, 151, 136, 0.24); } }
.checklist-summary-status { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.patient-checklist-content { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.requirement-document { display: grid; grid-template-columns: auto auto minmax(160px,1fr); align-items: center; gap: 7px; border-top: 1px solid #e7eeee; padding: 7px 0; }
.requirement-document.evolution-evidence-row { grid-template-columns: auto minmax(160px,1fr); }
.requirement-document a { border: 1px solid var(--line); border-radius: 6px; padding: 4px 7px; text-decoration: none; }
.agreement-layout { display: grid; grid-template-columns: 330px minmax(0,1fr); gap: 18px; align-items: start; }
.agreement-sidebar { padding: 16px; position: sticky; top: 92px; max-height: calc(100vh - 120px); overflow: auto; }
.agreement-list { display: grid; gap: 8px; margin-top: 12px; }
.agreement-list-item { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: left; color: var(--ink); background: white; cursor: pointer; }
.agreement-list-item:hover, .agreement-list-item.active { border-color: var(--teal); box-shadow: 0 8px 24px rgba(0,143,131,.12); }
.agreement-list-item strong, .agreement-list-item span, .agreement-list-item small { display: block; }
.agreement-list-item span, .agreement-list-item small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.agreement-detail { min-width: 0; }
.agreement-hero { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.agreement-settings { margin-bottom: 16px; }
.agreement-requirements { display: grid; gap: 12px; margin-top: 14px; }
.agreement-requirement-card { border: 1px solid var(--line); border-left: 4px solid #cbdbe0; border-radius: 12px; padding: 14px; background: #fff; }
.agreement-requirement-card.customized { border-left-color: var(--teal); background: #fbfffd; }
.agreement-requirement-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 10px; }
.agreement-requirement-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.agreement-policy-grid { margin-top: 10px; }
.agreement-policy-toggles { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 10px; }
.compact-check { margin: 0; }
.agreement-professions { margin-top: 10px; border: 1px solid #e7eeee; border-radius: 10px; padding: 10px; }
.agreement-professions summary { cursor: pointer; font-weight: 800; color: var(--ink); }
.profession-check-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-top: 10px; }
.mini-check { display: flex; align-items: center; gap: 6px; border: 1px solid #e7eeee; border-radius: 8px; padding: 7px; font-size: 12px; color: var(--ink); }
.mini-check input { width: auto; }
.document-mini-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid #e7eeee; padding: 10px 2px; font-size: 12px; }
.document-mini-row a { border: 1px solid var(--line); padding: 6px 9px; }
.provider-checklist-toolbar { margin: 14px 0; }
.profession-profile-card { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.profession-form { display: flex; align-items: end; gap: 10px; min-width: min(100%, 420px); }
.profession-form .field { flex: 1; }
.unknown-files-box { border-color: #f2b8b5; background: #fff8f7; }
.unknown-files-box > summary { color: #9f1d1d; }
.unknown-document { border-left: 4px solid #d83b3b; padding-left: 10px; }
#overrideModal { z-index: 110; }
.provider-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.provider-quick-surface { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 18px 0; }
.provider-quick { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 11px; padding: 13px 16px; color: #445b70; background: white; text-align: left; }
.provider-quick span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.provider-quick strong { color: var(--ink); font-size: 14px; }
.provider-quick:hover, .provider-quick.active { border-color: #62c8be; box-shadow: 0 0 0 3px rgba(0,143,131,.09); }
.provider-quick.active { background: #f2fffd; }
.provider-charts { margin-bottom: 18px; }
.section-title-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.provider-workspace, .provider-patients-card, .provider-documents-card { margin-bottom: 18px; }
.provider-detail-head { align-items: flex-start; }
.back-link { margin: 0 0 14px; border: 0; padding: 0; color: var(--teal-dark); background: transparent; font-weight: 800; }
.provider-patient-scroll { max-height: 480px; }
.doc-type-pill { display: inline-flex; border-radius: 7px; padding: 4px 7px; color: #075f58; background: #e4f7f4; font-size: 11px; font-weight: 800; white-space: nowrap; }
.file-size { display: block; margin-top: 7px; }
.provider-documents-card td:nth-child(4) { min-width: 260px; max-width: 430px; }
.provider-documents-card td:nth-child(7) { min-width: 155px; }
.provider-detail-shell { display:grid; gap:14px; }
.provider-identity-card { display:grid; grid-template-columns:auto auto minmax(0,1fr) auto; gap:16px; align-items:center; padding:16px 18px; }
.provider-back-link { align-self:start; margin-top:3px; }
.provider-identity-avatar { display:grid; width:58px; height:58px; place-items:center; border-radius:17px; color:white; background:linear-gradient(145deg,#0e7f79,#16b8aa); box-shadow:0 9px 22px rgba(0,143,131,.18); font-size:19px; font-weight:900; }
.provider-identity-main { min-width:0; }
.provider-identity-main .eyebrow { margin-bottom:3px; }
.provider-identity-main h1 { margin:0 0 7px; font-size:clamp(24px,3vw,34px); line-height:1.05; }
.provider-identity-main > .subtle { margin:7px 0 0; }
.provider-identity-badges { display:flex; flex-wrap:wrap; gap:7px; }
.provider-identity-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.provider-detail-metrics { grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin:0; }
.provider-detail-metrics .metric { min-height:94px; padding:13px 15px; }
.provider-detail-metrics .metric-value { margin-top:5px; font-size:28px; }
.provider-detail-metrics .metric-note { margin-top:3px; font-size:10px; }
.provider-detail-tabs { position:sticky; top:66px; z-index:14; display:flex; gap:6px; overflow-x:auto; border:1px solid var(--line); border-radius:12px; padding:7px; background:rgba(244,249,249,.96); box-shadow:0 8px 22px rgba(20,48,63,.06); backdrop-filter:blur(9px); }
.provider-detail-tabs button { flex:0 0 auto; border:0; border-radius:8px; padding:9px 14px; color:#53677a; background:transparent; font-weight:800; }
.provider-detail-tabs button:hover { color:var(--teal-dark); background:#edf8f6; }
.provider-detail-tabs button.active { color:white; background:var(--teal); box-shadow:0 5px 13px rgba(0,143,131,.18); }
.provider-detail-panel { display:none; }
.provider-detail-panel.active { display:block; }
.sticky-module-toolbar { position:sticky; top:122px; z-index:10; margin-bottom:12px; border:1px solid var(--line); background:rgba(255,255,255,.97); box-shadow:0 8px 20px rgba(21,48,63,.05); backdrop-filter:blur(8px); }
.provider-master-detail { display:grid; grid-template-columns:minmax(310px,390px) minmax(0,1fr); min-height:590px; overflow:hidden; }
.provider-patient-list-pane { border-right:1px solid var(--line); background:#f8fbfb; }
.provider-pane-head { display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line); padding:16px 17px; background:white; }
.provider-pane-head h2 { margin:2px 0 0; font-size:19px; }
.provider-patient-list { display:grid; align-content:start; max-height:660px; overflow:auto; padding:8px; }
.provider-patient-item { display:grid; gap:7px; width:100%; border:1px solid transparent; border-radius:10px; padding:12px; color:var(--ink); background:transparent; text-align:left; }
.provider-patient-item + .provider-patient-item { margin-top:3px; }
.provider-patient-item:hover { border-color:#cfe3e1; background:white; }
.provider-patient-item.active { border-color:#7ccfc7; background:white; box-shadow:0 7px 18px rgba(14,93,88,.09); }
.provider-patient-item-head { display:flex; align-items:flex-start; justify-content:space-between; gap:9px; }
.provider-patient-item-head strong { line-height:1.25; }
.provider-patient-progress { display:grid; grid-template-columns:1fr 38px; gap:8px; align-items:center; }
.provider-patient-progress .progress { height:7px; }
.provider-patient-progress > strong { color:#375064; font-size:11px; text-align:right; }
.provider-patient-preview { min-width:0; padding:22px; }
.provider-preview-empty { display:grid; min-height:420px; place-content:center; color:var(--muted); text-align:center; }
.provider-preview-empty strong { color:var(--ink); font-size:18px; }
.provider-preview-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; border-bottom:1px solid var(--line); padding-bottom:16px; }
.provider-preview-head h2 { margin:2px 0 6px; font-size:25px; }
.provider-preview-head p { margin:0; }
.provider-preview-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:16px 0; }
.provider-preview-stats > div { display:grid; gap:2px; border:1px solid #deeaeb; border-radius:10px; padding:11px 12px; background:#f8fbfb; }
.provider-preview-stats strong { font-size:21px; }
.provider-preview-stats span { color:var(--muted); font-size:10px; font-weight:750; text-transform:uppercase; }
.provider-preview-progress { display:grid; grid-template-columns:minmax(140px,1fr) auto; gap:12px; align-items:center; border-radius:10px; padding:12px 14px; background:#f0f8f7; }
.provider-preview-progress span { color:#476075; font-size:11px; }
.provider-preview-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:16px; }
.provider-preview-grid > section { min-height:185px; border:1px solid var(--line); border-radius:11px; padding:15px; }
.provider-preview-grid h3 { margin:0 0 10px; font-size:15px; }
.provider-missing-list { display:grid; gap:7px; margin:0 0 8px; padding-left:19px; color:#884d08; font-size:12px; }
.provider-recent-documents { display:grid; gap:5px; }
.provider-recent-documents > span { display:flex; justify-content:space-between; gap:12px; border-bottom:1px solid #edf2f3; padding:7px 0; }
.provider-recent-documents strong { font-size:12px; }
.provider-recent-documents small { color:var(--muted); white-space:nowrap; }
.positive-empty { border-radius:9px; padding:13px; color:#086545; background:#ecf8f3; font-size:12px; }
.compact-empty { padding:20px 8px; }
.provider-preview-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:17px; }
.provider-documents-card { overflow:visible; }
.provider-action-dropdown { position:relative; display:inline-block; margin-bottom:5px; }
.provider-action-dropdown > summary { display:inline-flex; min-width:92px; align-items:center; justify-content:space-between; gap:9px; cursor:pointer; list-style:none; }
.provider-action-dropdown > summary::-webkit-details-marker { display:none; }
.provider-action-dropdown[open] > summary { color:var(--teal-dark); border-color:#79c9c1; background:#eef9f7; }
.provider-action-menu { position:absolute; top:calc(100% + 5px); right:0; z-index:35; display:grid; min-width:155px; gap:3px; border:1px solid #d1dfe1; border-radius:9px; padding:5px; background:white; box-shadow:0 13px 30px rgba(15,39,57,.17); }
.provider-action-menu .icon-button { display:flex; width:100%; justify-content:flex-start; border-color:transparent; background:transparent; }
.provider-action-menu .icon-button:hover { color:var(--teal-dark); background:#edf8f6; }
.provider-history-list { position:relative; display:grid; gap:0; max-width:1050px; }
.provider-history-list::before { position:absolute; top:8px; bottom:8px; left:9px; width:2px; background:#d8e8e6; content:""; }
.provider-history-item { position:relative; display:grid; grid-template-columns:20px minmax(0,1fr) auto; gap:12px; align-items:start; padding:10px 0; }
.provider-history-marker { z-index:1; width:12px; height:12px; margin:5px 0 0 4px; border:3px solid white; border-radius:50%; background:var(--teal); box-shadow:0 0 0 1px #83cec7; }
.provider-history-item p { margin:3px 0; color:#52677b; font-size:12px; }
.indicator-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.indicator-toolbar > div:first-child { flex: 1; }
.indicator-toolbar h2 { margin-bottom: 3px; }
.indicator-toolbar p:last-child { margin-bottom: 0; }
.indicator-toolbar .field { min-width: 210px; }
.indicator-title { margin: 20px 0 10px; }
.indicator-title h2 { margin-bottom: 0; }
.indicator-metrics, .quality-metrics { grid-template-columns: repeat(5,minmax(0,1fr)); }
.indicator-metrics .metric, .quality-metrics .metric, .system-status-metrics .metric { min-height: 118px; }
.reliability-layout { display: grid; grid-template-columns: minmax(340px,.8fr) minmax(480px,1.2fr); gap: 16px; margin-bottom: 24px; }
.reliability-card { display: flex; flex-direction: column; justify-content: space-between; }
.reliability-score-wrap { display: flex; align-items: center; gap: 22px; margin: 12px 0 18px; }
.reliability-gauge { position: relative; display: grid; flex: 0 0 142px; height: 142px; place-content: center; border-radius: 50%; background: conic-gradient(var(--teal) calc(var(--score) * 1%), #e4edee 0); text-align: center; }
.reliability-gauge::before { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: white; }
.reliability-gauge strong, .reliability-gauge small { position: relative; z-index: 1; display: block; }
.reliability-gauge strong { font-size: 30px; letter-spacing: -.04em; }
.reliability-gauge small { color: var(--muted); font-weight: 700; }
.reliability-warning { margin: 12px 0 0; color: #8a4d00; font-size: 12px; font-weight: 700; }
.badge.reliability-high { color: #0c6c4b; background: #dff5ec; }
.badge.reliability-moderate { color: #805500; background: #fff0d4; }
.badge.reliability-low, .badge.reliability-critical { color: #a62727; background: #fde6e6; }
.quality-components { display: grid; gap: 12px; }
.quality-component { display: grid; grid-template-columns: minmax(0,1fr) minmax(160px,230px); gap: 18px; align-items: center; padding-bottom: 11px; border-bottom: 1px solid #e8eff0; }
.quality-component:last-child { padding-bottom: 0; border-bottom: 0; }
.quality-component span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.quality-component-score { display: grid; grid-template-columns: 58px 1fr; gap: 8px; align-items: center; text-align: right; }
.quality-component-score .progress { height: 8px; }
.quality-detail-grid { margin-bottom: 20px; }
.quality-stat-list { display: grid; gap: 15px; }
.quality-stat { display: grid; grid-template-columns: minmax(150px,1fr) minmax(100px,1.2fr) 105px; gap: 12px; align-items: center; }
.quality-stat > span { color: #40566a; font-size: 12px; font-weight: 700; }
.quality-stat > strong { text-align: right; }
.quality-stat small { color: var(--muted); font-weight: 600; }
.quality-stat.good .progress > span { background: var(--green); }
.quality-stat.attention .progress > span { background: #d59322; }
.quality-stat.danger .progress > span { background: var(--red); }
.quality-footnote { border-radius: 8px; padding: 10px 12px; color: #8e2929; background: #fff3f3; font-size: 12px; }
.system-status-metrics { grid-template-columns: repeat(5,minmax(0,1fr)); margin-top: 4px; }
.dashboard-content { margin-top: 22px; }
.dashboard-hero { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 22px 24px; }
.dashboard-hero h1 { margin-bottom: 2px; font-size: clamp(27px,3vw,38px); }
.dashboard-hero p:last-child { margin-bottom: 0; }
.dashboard-hero-actions { display: flex; flex-wrap: wrap; align-items: end; justify-content: flex-end; gap: 10px; }
.dashboard-hero-actions .field { min-width: 205px; }
.indicator-action { display: flex; flex-direction: column; align-items: flex-start; width: 100%; border: 1px solid var(--line); color: var(--ink); text-align: left; font: inherit; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.indicator-action:hover, .indicator-action:focus-visible { transform: translateY(-3px); border-color: #73cfc6; box-shadow: 0 19px 44px rgba(0,111,103,.15); outline: none; }
.indicator-action .metric-note { display: block; min-height: 34px; }
.dashboard-indicators {
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.dashboard-indicators .metric {
  min-height: 108px;
  padding: 14px 15px 13px;
  border-radius: 13px;
}
.dashboard-indicators .metric::before { width: 3px; }
.dashboard-indicators .metric-label {
  font-size: 10px;
  line-height: 1.25;
  letter-spacing: .075em;
}
.dashboard-indicators .metric-value {
  margin-top: 7px;
  font-size: 26px;
  line-height: 1;
}
.dashboard-indicators .metric-note {
  min-height: 27px;
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.35;
}
.dashboard-indicators #unidentifiedMetric { grid-column: span 2; }
.dashboard-indicators #classificationConflictMetric { grid-column: span 3; }
.indicator-open { display: block; margin-top: auto; padding-top: 6px; color: var(--teal-dark); font-size: 10.5px; line-height: 1.25; font-weight: 800; }
.dashboard-overview-grid { display: grid; grid-template-columns: minmax(360px,.75fr) minmax(560px,1.25fr); gap: 16px; margin-bottom: 20px; }
.dashboard-reliability details { margin-top: 14px; }
.dashboard-reliability summary, .dashboard-secondary > summary { cursor: pointer; color: #385064; font-weight: 800; }
.reliability-score-compact { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 4px; }
.reliability-score-compact strong { color: var(--teal-dark); font-size: 44px; letter-spacing: -.05em; }
.reliability-score-compact span { color: var(--muted); font-weight: 700; }
.compact-components { margin-top: 14px; }
.compact-components .quality-component { grid-template-columns: minmax(0,1fr) minmax(125px,170px); }
.scan-title { display: flex; justify-content: space-between; gap: 15px; margin: 13px 0 8px; }
.dashboard-secondary { margin-top: 6px; }
.dashboard-secondary > summary { list-style: none; border: 1px solid var(--line); border-radius: 13px; padding: 15px 18px; background: white; box-shadow: var(--shadow); }
.dashboard-secondary > summary::-webkit-details-marker { display: none; }
.dashboard-secondary > summary span { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; }
.dashboard-secondary > summary small { color: var(--muted); font-weight: 600; }
.dashboard-secondary[open] > summary { margin-bottom: 16px; }
.indicator-list-modal { display: grid; grid-template-rows: auto auto auto minmax(0,1fr) auto; width: min(1420px,97vw); max-height: calc(100vh - 40px); padding: 0; overflow: hidden; }
.indicator-list-modal .modal-head { padding: 22px 24px 0; }
.indicator-list-toolbar { padding: 0 24px 18px; }
.indicator-list-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding: 12px 24px; color: var(--muted); background: #f8fbfb; }
.indicator-list-summary strong { color: var(--ink); }
.indicator-list-table { min-height: 0; max-height: none; overflow: auto; }
.indicator-list-modal > .pagination { min-height: 66px; box-shadow: 0 -8px 18px rgba(15,39,57,.06); }
.indicator-list-table td:first-child { min-width: 230px; }
.indicator-list-table td:nth-child(3) { min-width: 170px; }
.professional-drill-link { color: var(--teal-dark); font-weight: 850; text-decoration: none; }
.professional-drill-link:hover { text-decoration: underline; }
.compact-button { min-height: 32px; padding: 6px 9px; font-size: 12px; white-space: nowrap; }
.classification-conflict-reason { display:inline-block; margin-top:6px; color:#b42318; font-weight:750; line-height:1.35; }
.analysis-pipeline-card { margin: 16px 0 20px; }
.analysis-pipeline-card details { margin-top: 14px; }
.analysis-pipeline-card summary { cursor: pointer; color: var(--teal-dark); }
.profile-chip { display: inline-flex; align-items: center; gap: 7px; padding: 0 5px; }
.profile-avatar { width: 29px; height: 29px; border-radius: 50%; object-fit: cover; display: grid; place-items: center; color: white; background: #0a766e; font-size: 10px; font-weight: 850; }
img.profile-avatar { display: block; }
.user-menu { position: relative; display: inline-flex; align-items: center; }
.user-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border: 0;
  border-radius: 11px;
  padding: 7px 10px;
  color: white;
  background: transparent;
  cursor: pointer;
}
.user-menu-trigger:hover, .user-menu-trigger.active, .user-menu.open .user-menu-trigger { background: rgba(255,255,255,.11); }
.user-menu-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 750; }
.user-menu-caret { color: rgba(255,255,255,.72); font-size: 12px; transition: transform .16s ease; }
.user-menu.open .user-menu-caret { transform: rotate(180deg); }
.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 80;
  display: none;
  min-width: 230px;
  border: 1px solid rgba(17,44,62,.12);
  border-radius: 14px;
  padding: 7px;
  background: white;
  box-shadow: 0 20px 50px rgba(17,44,62,.22);
}
.user-menu.open .user-menu-panel { display: grid; gap: 3px; }
.user-menu-panel::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 22px;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  border-left: 1px solid rgba(17,44,62,.12);
  border-top: 1px solid rgba(17,44,62,.12);
  background: white;
}
.user-menu-panel a, .user-menu-panel button {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 39px;
  border: 0;
  border-radius: 9px;
  padding: 9px 11px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 750;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.user-menu-panel a:hover, .user-menu-panel button:hover, .user-menu-panel a.active { color: var(--teal-dark); background: #eef9f7; }
.user-menu-panel button[data-logout] { color: #a32323; }
.user-menu-panel button[data-logout]:hover { color: #7f1d1d; background: #fff1f1; }
.patient-toolbar {
  display: grid;
  grid-template-columns: minmax(250px,1.3fr) minmax(190px,.85fr) minmax(170px,.75fr) minmax(190px,.8fr) auto auto;
  align-items: end;
  padding: 18px 20px;
}
.patient-toolbar .field { min-width: 0; }
.patient-toolbar .button { white-space: nowrap; }
.patient-list-summary {
  display: grid;
  grid-template-columns: 20% 28% 14% 20% 18%;
  align-items: center;
  gap: 0;
  border-top: 1px solid var(--line);
  padding: 10px 14px;
  background: #f8fbfb;
}
.patient-summary-total { display: flex; align-items: baseline; gap: 5px; }
.patient-summary-total strong { color: var(--ink); font-size: 15px; }
.patient-summary-total small { color: var(--muted); font-size: 11px; }
.patient-summary-help { grid-column: 5; text-align: right; }
.patient-modal { display: grid; grid-template-rows: auto auto auto minmax(0,1fr) auto; width: min(1500px,97vw); max-height: calc(100vh - 40px); padding: 22px 24px 0; overflow: hidden; }
.patient-summary-metrics { grid-template-columns: repeat(5,minmax(0,1fr)); margin-bottom: 14px; }
.patient-summary-metrics .metric { min-height: 82px; padding: 13px 15px; }
.patient-summary-metrics .metric-value { margin-top: 5px; font-size: 24px; }
.patient-document-toolbar { margin: 0 -24px; padding: 14px 24px; border-top: 1px solid var(--line); background: #f8fbfb; }
.patient-document-table { min-height: 0; max-height: none; margin: 0 -24px; overflow: auto; }
.patient-modal > .pagination { min-height: 66px; margin: 0 -24px; box-shadow: 0 -8px 18px rgba(15,39,57,.06); }
.patient-document-table td:nth-child(2) { min-width: 330px; max-width: 520px; }
.patient-document-table td:nth-child(4) { min-width: 230px; max-width: 390px; }
.patient-document-table .subtle { font-size: 11px; }
.configuration-tabs { position: sticky; top: 72px; z-index: 12; padding: 8px; border: 1px solid var(--line); border-radius: 13px; background: rgba(242,248,247,.96); backdrop-filter: blur(10px); }
.configuration-form-card { width: min(1120px,100%); }
.configuration-form-card hr { width: 100%; margin: 8px 0; border: 0; border-top: 1px solid var(--line); }
.form-actions { display:flex;gap:10px;align-items:center;flex-wrap:wrap; }
.api-management-card { margin-top: 16px; }
.api-management-grid { margin-top: 18px; }
.api-doc-box { display: grid; gap: 7px; border: 1px solid var(--line); border-radius: 10px; padding: 13px; margin-bottom: 14px; color: var(--muted); background: #f8fbfb; }
.api-doc-box code { color: var(--teal-dark); font-size: 14px; font-weight: 800; }
.api-doc-box a { color: var(--teal-dark); font-weight: 800; }
.permission-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 8px; }
.compact-permission-grid { grid-template-columns: 1fr; max-height: 260px; overflow: auto; }
.permission-option { display: flex; align-items: flex-start; gap: 9px; border: 1px solid var(--line); border-radius: 9px; padding: 10px; text-transform: none; letter-spacing: 0; background: white; }
.permission-option input { flex: 0 0 auto; width: auto; margin-top: 3px; }
.permission-option span, .permission-option small { display: block; }
.permission-option strong { color: var(--ink); font-size: 12px; }
.permission-option small { margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 500; }
.management-modal { width: min(680px,96vw); }
.wide-management-modal { width: min(1220px,97vw); }
.permission-matrix { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.permission-matrix fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 11px; padding: 12px; }
.permission-matrix legend { padding: 0 7px; color: var(--teal-dark); font-weight: 850; }
.permission-matrix fieldset .permission-option + .permission-option { margin-top: 7px; }
.modal-footer { position: sticky; bottom: -24px; display: flex; justify-content: flex-end; margin: 18px -24px -24px; border-top: 1px solid var(--line); padding: 14px 24px; background: white; }
.check-line { display: flex; align-items: center; align-self: end; gap: 8px; min-height: 42px; text-transform: none; font-size: 13px; }
.check-line input { width: auto; }
.user-identity { display: flex; align-items: center; gap: 9px; min-width: 210px; }
.user-identity small { color: var(--muted); }
.user-list-avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; object-fit: cover; }
.user-list-avatar.initials { display: grid; place-items: center; color: white; background: var(--teal); font-size: 10px; font-weight: 850; }

/* Layout refinado: cards executivos em duas linhas de quatro quadros, pagamento sem sobreposição e telas responsivas. */
.dashboard-indicators {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.dashboard-indicators #unidentifiedMetric,
.dashboard-indicators #classificationConflictMetric {
  grid-column: auto;
}
.dashboard-indicators .metric {
  min-height: 132px;
  padding: 18px 20px;
}
.dashboard-indicators .metric-label,
.payment-metrics .metric-label {
  min-height: 2.45em;
}
.dashboard-indicators .metric-value,
.payment-metrics .metric-value {
  margin-top: 10px;
}
.indicator-open {
  margin-top: auto;
}
.payment-metrics {
  gap: 12px;
}
.payment-metrics .metric {
  min-height: 126px;
  padding: 16px 17px;
}
.payment-metrics .metric-value {
  font-size: clamp(25px, 2.4vw, 34px);
}
.payment-metrics .metric-note {
  min-height: 2.6em;
}
.profile-layout {
  display: grid;
  grid-template-columns: minmax(280px, .75fr) minmax(360px, 1.25fr);
  gap: 16px;
  align-items: start;
}
.profile-card {
  display: flex;
  gap: 18px;
  align-items: center;
}
.profile-photo-preview {
  display: grid;
  flex: 0 0 92px;
  width: 92px;
  height: 92px;
  place-items: center;
  overflow: hidden;
  border-radius: 28px;
  color: white;
  background: linear-gradient(145deg, #0e7f79, #16b8aa);
  box-shadow: 0 14px 28px rgba(0,143,131,.18);
  font-size: 26px;
  font-weight: 900;
}
.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
img, video, iframe {
  max-width: 100%;
}
@media (max-width: 1300px) {
  .payment-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .dashboard-indicators,
  .payment-metrics,
  .profile-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .collector-flow,
  .grid-2,
  .grid-3,
  .permission-matrix,
  .api-management-grid {
    grid-template-columns: 1fr;
  }
  .section-title-line,
  .page-head,
  .dashboard-hero,
  .dashboard-hero-actions,
  .indicator-toolbar,
  .evolution-collection-head,
  .professional-patient-checklist > summary,
  .provider-preview-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 640px) {
  .content {
    width: calc(100% - 18px);
    margin-top: 14px;
  }
  .topbar {
    padding: 10px 12px;
  }
  .brand-emblem {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
  }
  .brand-emblem img {
    transform: scale(.88);
    transform-origin: left top;
  }
  .nav a,
  .nav button,
  .user-menu-trigger {
    min-height: 38px;
    padding: 8px 10px;
  }
  .user-menu-name {
    display: none;
  }
  .dashboard-indicators,
  .payment-metrics,
  .profile-layout,
  .metrics,
  .patient-summary-metrics,
  .provider-detail-metrics,
  .evolution-metrics,
  .quality-metrics,
  .indicator-metrics,
  .system-status-metrics {
    grid-template-columns: 1fr;
  }
  .toolbar,
  .actions,
  .form-actions {
    align-items: stretch;
  }
  .toolbar .field,
  .field.grow,
  .button {
    width: 100%;
  }
  .modal-backdrop {
    padding: 10px;
  }
  .modal,
  .management-modal,
  .wide-management-modal,
  .indicator-list-modal,
  .patient-modal,
  .compliance-modal {
    width: min(100%, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
  }
  .modal-head,
  .pagination {
    align-items: stretch;
    flex-direction: column;
  }
  .modal-head > .button,
  .modal-head > .icon-button,
  .pagination .actions,
  .pagination .actions .button {
    width: 100%;
  }
  .table-wrap {
    max-width: 100%;
  }
  th, td {
    padding: 10px 11px;
  }
}
@media (max-width: 1100px) { .metrics { grid-template-columns: repeat(2,1fr); } .charts, .grid-3 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }
@media (max-width: 1000px) {
  .patient-toolbar { grid-template-columns: minmax(240px,1fr) minmax(220px,1fr); }
  .patient-toolbar .button { justify-self: start; }
}
@media (max-width: 1100px) { .reliability-layout, .dashboard-overview-grid { grid-template-columns: 1fr; } .indicator-metrics, .quality-metrics, .system-status-metrics { grid-template-columns: repeat(2,1fr); } .dashboard-hero { align-items: flex-start; flex-direction: column; } .dashboard-hero-actions { width: 100%; justify-content: flex-start; } }
@media (max-width: 1280px) {
  .metrics.dashboard-indicators { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-indicators #unidentifiedMetric,
  .dashboard-indicators #classificationConflictMetric { grid-column: auto; }
}
@media (max-width: 1100px) {
  .metrics.dashboard-indicators { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 780px) { .login-page { grid-template-columns: 1fr; } .login-art { min-height: 280px; } .topbar { padding: 12px 15px; align-items: flex-start; } .nav { flex-wrap: wrap; justify-content: flex-end; } .nav .user-label, .user-menu-name { display: none; } .user-menu-panel { right: 0; } .content { width: min(100% - 20px, 1600px); margin-top: 16px; } .page-head { align-items: flex-start; flex-direction: column; } .metrics, .grid-2, .indicator-metrics, .quality-metrics, .system-status-metrics, .agreement-layout, .agreement-policy-toggles, .profession-check-grid { grid-template-columns: 1fr; } .agreement-sidebar { position: static; max-height: none; } .metric { min-height: 105px; } .compliance-summary, .requirement-row { grid-template-columns: 1fr; } .requirement-state .badge { width: auto; max-width: 100%; justify-content: flex-start; } .requirement-actions { justify-content: flex-start; max-width: none; } .completion-cell { min-width: 190px; } .provider-quick-surface { grid-template-columns: repeat(2,1fr); } .indicator-toolbar { align-items: stretch; flex-direction: column; } .indicator-toolbar .field { min-width: 0; } .reliability-score-wrap { align-items: flex-start; flex-direction: column; } .quality-component, .quality-stat { grid-template-columns: 1fr; } .quality-component-score { grid-template-columns: 60px 1fr; } .quality-stat > strong { text-align: left; } }
@media (max-width: 780px) {
  .metrics.dashboard-indicators { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .patient-summary-metrics, .permission-matrix, .permission-grid { grid-template-columns: 1fr; }
  .patient-toolbar { grid-template-columns: 1fr; }
  .patient-toolbar .button { width: 100%; }
  .patient-list-summary { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .patient-list-summary > span[aria-hidden="true"] { display: none; }
  .patient-summary-help { grid-column: 1 / -1; text-align: left; }
  .configuration-tabs { position: static; }
  .profile-chip .user-label { display: none; }
}
@media (max-width: 520px) {
  .metrics.dashboard-indicators { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .provider-identity-card { grid-template-columns:auto auto minmax(0,1fr); }
  .provider-identity-actions { grid-column:2 / -1; justify-content:flex-start; }
  .provider-detail-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .provider-master-detail { grid-template-columns:minmax(280px,340px) minmax(0,1fr); }
  .provider-preview-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .provider-preview-grid { grid-template-columns:1fr; }
}
@media (max-width: 780px) {
  .provider-identity-card { grid-template-columns:auto minmax(0,1fr); align-items:start; }
  .provider-back-link { grid-column:1 / -1; }
  .provider-identity-actions { grid-column:1 / -1; }
  .provider-detail-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .provider-detail-tabs, .sticky-module-toolbar { position:static; }
  .provider-master-detail { grid-template-columns:1fr; }
  .provider-patient-list-pane { border-right:0; border-bottom:1px solid var(--line); }
  .provider-patient-list { max-height:390px; }
  .provider-patient-preview { padding:17px; }
  .provider-preview-head { flex-direction:column; }
  .provider-preview-progress { grid-template-columns:1fr; }
}
@media (max-width: 520px) {
  .provider-detail-metrics, .provider-preview-stats { grid-template-columns:1fr; }
  .provider-identity-avatar { width:50px; height:50px; border-radius:14px; }
}

.evolution-metrics { grid-template-columns:repeat(4,minmax(0,1fr)); }
.evolution-page .page-head > #syncEvolutions { display:none; }
.evolution-collection-panel { margin-bottom:18px;padding:18px 20px; }
.evolution-collection-head { display:flex;align-items:flex-start;justify-content:space-between;gap:18px; }
.evolution-collection-head h2 { margin-bottom:4px; }
.sync-period-form { display:grid;grid-template-columns:180px 180px auto auto;align-items:end;gap:10px;margin:14px 0;padding:12px;border:1px solid var(--line);border-radius:12px;background:#f8fbfb; }
.sync-period-form .field { min-width:0; }
.collection-steps { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0; }
.collection-step { display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#f8fbfb; }
.collection-step > span { display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border-radius:50%;color:#526477;background:#e4ecee;font-size:12px;font-weight:850; }
.collection-step div { display:grid;gap:1px; }
.collection-step small { color:var(--muted); }
.collection-step.active { border-color:#84d5cd;background:#effbf8; }
.collection-step.active > span { color:white;background:var(--teal); }
.collection-step.completed > span { color:#0c6c4b;background:#dff5ec; }
.collection-step.failed { border-color:#efcaca;background:#fff7f7; }
.collection-step.failed > span { color:#a62727;background:#fde6e6; }
.collection-progress-line { display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:7px;font-size:12px; }
.collection-progress-line > div:first-child { display:flex;align-items:center;gap:9px; }
.progress-track { position:relative;height:10px;overflow:hidden;border-radius:999px;background:#e5eeef; }
.progress-track > span { display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--teal),#35c7b7);transition:width .35s ease; }
.progress-track.indeterminate > span { position:absolute;width:34%!important;animation:collection-indeterminate 1.25s ease-in-out infinite; }
@keyframes collection-indeterminate { from { left:-34%; } to { left:100%; } }
.collection-stats { display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;margin-top:13px; }
.collection-stats > div { display:grid;gap:2px;padding:9px 11px;border-radius:9px;background:#f7fafb; }
.collection-stats span { color:var(--muted);font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em; }
.collection-stats strong { font-size:16px; }
.collection-errors { margin-top:12px;border-top:1px solid var(--line);padding-top:10px; }
.collection-errors summary { cursor:pointer;color:var(--red);font-weight:800; }
.collection-error-row { display:flex;justify-content:space-between;gap:16px;padding:9px 0;border-bottom:1px solid #edf2f3;font-size:12px; }
.collection-error-row div { display:grid;gap:2px; }
.collection-error-row small,.collection-error-row time { color:var(--muted); }
.evolution-workspace { overflow:hidden; }
.evolution-toolbar { display:grid;grid-template-columns:minmax(220px,1.5fr) minmax(150px,.8fr) minmax(180px,1fr) minmax(180px,1fr) 140px 135px 135px auto auto;align-items:end;padding:18px;gap:10px;border-bottom:1px solid var(--line); }
.evolution-toolbar .field { min-width:0; }
.evolution-list-head { display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 20px;background:#f8fbfb;border-bottom:1px solid var(--line); }
.evolution-list-head > div { display:flex;align-items:center;gap:12px; }
.evolution-list { display:grid;gap:0; }
.evolution-card { padding:20px;border-bottom:1px solid var(--line);background:white; }
.evolution-card:last-child { border-bottom:0; }
.evolution-card-meta,.evolution-card-head { display:flex;align-items:center;gap:10px; }
.evolution-card-meta { margin-bottom:12px;color:var(--muted);font-size:12px; }
.evolution-card-head { justify-content:space-between;align-items:flex-start; }
.evolution-card h2 { margin:0;font-size:19px; }
.evolution-card h3 { margin:16px 0 8px;font-size:15px; }
.evolution-content { max-height:8.4em;overflow:auto;white-space:normal;line-height:1.55;color:#253b53;background:#f8fbfb;border:1px solid var(--line);border-radius:10px;padding:13px 15px; }
.evolution-evidence { margin-top:10px;color:var(--muted);font-size:12px; }
.evolution-evidence summary { cursor:pointer;color:var(--teal-dark);font-weight:800; }
.evolution-attachments-shell { margin-top:14px; }
.evolution-attachments-list { display:grid;gap:10px;margin-top:10px; }
.evolution-attachment-card { display:grid;grid-template-columns:140px minmax(0,1fr) auto;gap:14px;align-items:start;padding:12px;border:1px solid var(--line);border-radius:12px;background:#f8fbfb; }
.evolution-attachment-preview { display:grid;place-items:center;min-height:92px;overflow:hidden;border:1px solid var(--line);border-radius:10px;background:white; }
.evolution-attachment-preview img,.evolution-attachment-preview video,.evolution-attachment-preview iframe { width:100%;height:118px;object-fit:cover;border:0;background:white; }
.evolution-attachment-preview iframe { object-fit:initial; }
.attachment-file-icon { display:grid;place-items:center;width:100%;min-height:92px;padding:12px;color:var(--muted);font-size:13px;font-weight:850;text-align:center;background:linear-gradient(135deg,#f4f8f9,#e9f0f1); }
.evolution-attachment-info { display:grid;gap:5px;min-width:0; }
.evolution-attachment-info strong { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.evolution-attachment-info small { color:var(--muted);line-height:1.4; }
.evolution-attachment-actions { display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end; }
.small-empty { padding:12px!important;font-size:12px!important; }
.badge.evolution-type { color:#075985;background:#e0f2fe; }
.badge.evolution-type.assessment,.badge.evolution-type.nead,.badge.evolution-type.pps { color:#5b21b6;background:#ede9fe; }
.badge.evolution-type.report { color:#92400e;background:#fef3c7; }
.evolution-print-page { min-height:100vh;padding:30px;background:#eaf2f2; }
.evolution-print-card { width:min(900px,100%);min-height:900px;margin:0 auto;padding:42px;background:white;border:1px solid #cad9db;border-radius:14px;box-shadow:0 16px 40px rgba(15,35,52,.12);color:#10233a; }
.evolution-print-card header { display:flex;justify-content:space-between;gap:24px;padding-bottom:24px;border-bottom:3px solid var(--teal); }
.evolution-print-card h1 { margin:4px 0 0;font-size:30px; }
.evolution-print-source { text-align:right;color:var(--muted);font-size:11px;line-height:1.6; }
.evolution-print-patient,.evolution-print-details { display:grid;gap:18px;margin-top:22px;padding:18px;border:1px solid var(--line);border-radius:10px;background:#f8fbfb; }
.evolution-print-patient { grid-template-columns:1.4fr 1fr; }
.evolution-print-details { grid-template-columns:1.4fr 1fr 1fr; }
.evolution-print-patient span,.evolution-print-details span { display:block;margin-bottom:5px;color:var(--muted);font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.06em; }
.evolution-print-patient strong,.evolution-print-details strong,.evolution-print-patient small { display:block; }
.evolution-print-card article { margin-top:28px; }
.evolution-print-content { line-height:1.65;white-space:normal; }
.evolution-print-card footer { margin-top:42px;padding-top:14px;border-top:1px solid var(--line);color:var(--muted);font-size:10px; }
.evolution-print-actions { display:flex;justify-content:center;gap:10px;margin:20px auto; }
@media (max-width:1350px) { .evolution-toolbar { grid-template-columns:repeat(4,minmax(0,1fr)); }.evolution-toolbar .grow { grid-column:span 2; } }
@media (max-width:900px) { .evolution-metrics { grid-template-columns:repeat(2,1fr); }.evolution-toolbar { grid-template-columns:repeat(2,minmax(0,1fr)); }.evolution-toolbar .grow { grid-column:1 / -1; }.collection-stats { grid-template-columns:repeat(3,1fr); }.sync-period-form { grid-template-columns:repeat(2,minmax(0,1fr)); }.evolution-attachment-card { grid-template-columns:110px minmax(0,1fr); }.evolution-attachment-actions { grid-column:1 / -1;justify-content:flex-start; } }
@media (max-width:600px) { .evolution-metrics,.evolution-toolbar,.collection-steps,.collection-stats,.sync-period-form,.evolution-attachment-card { grid-template-columns:1fr; }.evolution-toolbar .grow { grid-column:auto; }.evolution-collection-head,.collection-progress-line,.evolution-card-head,.evolution-card-meta { align-items:flex-start;flex-direction:column; }.evolution-print-page { padding:0;background:white; }.evolution-print-card { min-height:0;padding:24px;border:0;border-radius:0;box-shadow:none; }.evolution-print-patient,.evolution-print-details { grid-template-columns:1fr; } }
@media print { .evolution-print-page { padding:0;background:white; }.evolution-print-card { width:100%;min-height:0;padding:12mm;border:0;border-radius:0;box-shadow:none; }.evolution-print-actions { display:none!important; } }

/* Regra final do dashboard executivo: 8 indicadores em 4 colunas x 2 linhas em telas grandes. */
@media (min-width: 1180px) {
  .metrics.dashboard-indicators {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .dashboard-indicators #unidentifiedMetric,
  .dashboard-indicators #classificationConflictMetric {
    grid-column: auto;
  }
}
@media (min-width: 641px) and (max-width: 1179px) {
  .metrics.dashboard-indicators {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .metrics.dashboard-indicators {
    grid-template-columns: 1fr;
  }
}

/* Painel de Novidades */
.novidades-list { display: grid; gap: 16px; margin-top: 18px; }
.novidade-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.novidade-section { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #f8fbfb; }
.novidade-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.novidade-section-head h3 { margin: 0; font-size: 15px; }
.novidade-items { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.novidade-items li { color: var(--ink); font-size: 13.5px; line-height: 1.45; }
@media (max-width: 860px) { .novidade-sections { grid-template-columns: 1fr; } }
.menu-new-dot { display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 999px; background: #e0553b; vertical-align: middle; }
.user-menu-trigger.has-new { position: relative; }
.user-menu-trigger.has-new::after { content: ""; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 999px; background: #e0553b; box-shadow: 0 0 0 2px #122436; }

@media (max-width: 860px) {
  .auditor-queue,
  .document-preview-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .auditor-queue-actions,
  .document-preview-toolbar {
    width: 100%;
    justify-content: flex-start;
  }
  .document-preview-modal {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  .document-preview-backdrop {
    padding: 0;
  }
  .document-preview-head h2 {
    max-width: calc(100vw - 40px);
  }
}

/* ==========================================================================
   Doc Care Enterprise UI refresh
   Camada visual não destrutiva: melhora contraste, hierarquia, cards, tabelas
   e responsividade sem alterar a lógica dos módulos.
   ========================================================================== */
:root {
  --ink: #071c33;
  --muted: #5d7087;
  --line: #d8e7e8;
  --surface: #ffffff;
  --canvas: #edf6f4;
  --surface-soft: #f6fbfa;
  --teal: #009688;
  --teal-dark: #00746c;
  --teal-strong: #00a99a;
  --navy: #10283d;
  --navy-deep: #081b2d;
  --blue: #2868e8;
  --red: #d03b3b;
  --amber: #b96f00;
  --green: #12805c;
  --shadow: 0 18px 44px rgba(12, 37, 48, .08);
  --shadow-soft: 0 10px 26px rgba(12, 37, 48, .055);
  --shadow-strong: 0 24px 70px rgba(8, 26, 42, .18);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

html {
  background:
    radial-gradient(circle at 8% 0%, rgba(0, 150, 136, .14), transparent 30%),
    radial-gradient(circle at 92% 10%, rgba(40, 104, 232, .10), transparent 28%),
    linear-gradient(180deg, #f5fbfa 0%, var(--canvas) 55%, #eaf4f2 100%);
}

body {
  color: var(--ink);
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

.shell {
  background:
    linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0) 310px),
    transparent;
}

.topbar {
  min-height: 74px;
  padding: 14px clamp(20px, 3vw, 42px);
  background:
    linear-gradient(135deg, rgba(15, 45, 67, .96), rgba(7, 27, 45, .98)),
    var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 14px 34px rgba(6, 22, 35, .22);
}

.brand {
  min-width: 210px;
}

.brand-emblem {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(0, 150, 136, .22);
}

.brand-emblem img {
  width: 242px;
  left: -34px;
  top: -36px;
}

.brand-name {
  font-size: 18px;
}

.brand small {
  margin-top: 3px;
  color: rgba(221, 240, 244, .78);
  font-size: 10.5px;
  font-weight: 800;
}

.nav {
  gap: 6px;
}

.nav a,
.nav button,
.user-menu-trigger {
  min-height: 42px;
  border-radius: 12px;
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.nav a:hover,
.nav button:hover,
.nav a.active,
.user-menu.open .user-menu-trigger,
.user-menu-trigger:hover {
  background: rgba(255,255,255,.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}

.nav a.active {
  color: #fff;
  background: rgba(255,255,255,.16);
}

.content {
  width: min(1720px, calc(100% - clamp(32px, 4vw, 72px)));
  margin-top: 32px;
}

.page-head,
.dashboard-hero {
  position: relative;
}

h1 {
  letter-spacing: -.055em;
}

h2 {
  letter-spacing: -.035em;
}

.eyebrow {
  color: var(--teal-dark);
  letter-spacing: .16em;
}

.card {
  border-color: rgba(148, 180, 184, .45);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.94)),
    var(--surface);
  box-shadow: var(--shadow);
}

.card-pad {
  padding: clamp(18px, 1.45vw, 26px);
}

.dashboard-hero {
  overflow: hidden;
  padding: clamp(22px, 2vw, 32px);
  border-radius: var(--radius-xl);
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  inset: -80px -90px auto auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,150,136,.18), transparent 68%);
  pointer-events: none;
}

.dashboard-hero h1 {
  font-size: clamp(31px, 3.4vw, 48px);
}

.dashboard-hero-actions {
  position: relative;
  z-index: 1;
}

.metrics {
  gap: 16px;
}

.metric {
  min-height: 132px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(255,255,255,.99), rgba(248,252,252,.96));
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

button.metric:hover,
.indicator-action:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent, var(--teal)) 42%, var(--line));
  box-shadow: 0 18px 42px rgba(13, 42, 56, .12);
}

.metric::before {
  width: 5px;
  background: linear-gradient(180deg, var(--accent, var(--teal)), color-mix(in srgb, var(--accent, var(--teal)) 62%, #fff));
}

.metric-label {
  color: #61738a;
  line-height: 1.2;
}

.metric-value {
  font-size: clamp(27px, 2.25vw, 38px);
}

.indicator-open,
.link-button {
  color: var(--teal-dark);
}

.dashboard-indicators {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-indicators .metric {
  min-height: 146px;
  padding: 20px 22px;
}

.dashboard-indicators .metric-note {
  min-height: 0;
}

.dashboard-overview-grid {
  grid-template-columns: minmax(360px, .85fr) minmax(520px, 1.15fr);
  gap: 18px;
}

.button {
  border-radius: 12px;
  font-weight: 850;
  letter-spacing: -.01em;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  box-shadow: 0 12px 24px rgba(0, 143, 131, .18);
}

.button.primary:hover {
  background: linear-gradient(135deg, #00a391, #006e66);
}

.button.secondary,
.icon-button {
  background: linear-gradient(180deg, #fff, #f8fbfb);
}

input,
select,
textarea {
  border-radius: 12px;
  border-color: #cddfe1;
  background: rgba(255,255,255,.96);
}

input:hover,
select:hover,
textarea:hover {
  border-color: #aac5c8;
}

label {
  color: #31465d;
  letter-spacing: .07em;
}

.toolbar,
.sync-period-form,
.patient-toolbar,
.evolution-toolbar {
  border-radius: var(--radius-md);
}

.table-wrap {
  scrollbar-color: #b6cccf #eef5f4;
}

table {
  font-size: 13.5px;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #4c6178;
  background: linear-gradient(180deg, #f8fbfc, #eef5f5);
}

td {
  border-top-color: #e5eef0;
}

tbody tr {
  transition: background .14s ease;
}

tbody tr:hover {
  background: #f4fbfa;
}

.badge {
  min-height: 24px;
  padding: 5px 10px;
  font-weight: 850;
}

.progress,
.progress-track,
.bar-track {
  background: #dfecee;
}

.progress > span,
.progress-track > span,
.bar-track span {
  background: linear-gradient(90deg, var(--teal-dark), #23c7b7);
}

.modal-backdrop {
  background:
    radial-gradient(circle at top, rgba(0,150,136,.10), transparent 38%),
    rgba(5, 18, 30, .72);
  backdrop-filter: blur(4px);
}

.modal {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-strong);
}

.modal-head {
  align-items: center;
}

.user-menu-panel {
  border-radius: 16px;
  box-shadow: 0 24px 58px rgba(7, 24, 39, .22);
}

.profile-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(145deg, #0b8f84, #15b8a9);
}

.scan-stats,
.collection-stats {
  color: #566d84;
}

.collection-stats > div,
.provider-preview-stats > div,
.api-doc-box,
.novidade-section {
  border: 1px solid rgba(188, 211, 214, .65);
  background: linear-gradient(180deg, #fbfefe, #f5faf9);
}

.section-title-line {
  gap: 16px;
}

.dashboard-secondary > summary {
  border-radius: var(--radius-lg);
}

.document-action-menu,
.provider-action-menu,
.user-menu-panel {
  border-color: rgba(181, 204, 207, .7);
}

.patient-modal,
.indicator-list-modal,
.compliance-modal,
.document-preview-modal {
  border-radius: 24px;
}

.evolution-card {
  background: linear-gradient(180deg, #fff, #fbfefe);
}

.evolution-content,
.patient-document-toolbar,
.evolution-list-head {
  background: var(--surface-soft);
}

@media (min-width: 1440px) {
  .payment-metrics,
  .patient-summary-metrics,
  .provider-detail-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) {
  .content {
    width: min(100% - 32px, 1280px);
  }
  .dashboard-indicators {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .topbar {
    position: sticky;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .brand {
    min-width: 0;
  }
  .nav {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 4px;
  }
  .nav a,
  .nav button,
  .user-menu-trigger {
    white-space: nowrap;
  }
  .dashboard-hero,
  .page-head {
    align-items: stretch;
    flex-direction: column;
  }
  .dashboard-hero-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .content {
    width: min(100% - 20px, 680px);
    margin-top: 18px;
  }
  .dashboard-indicators,
  .metrics,
  .grid-2,
  .grid-3,
  .dashboard-overview-grid,
  .payment-metrics,
  .patient-summary-metrics,
  .provider-detail-metrics {
    grid-template-columns: 1fr !important;
  }
  .metric {
    min-height: 112px;
  }
  .card-pad {
    padding: 16px;
  }
  .dashboard-hero h1 {
    font-size: 30px;
  }
  .table-wrap {
    margin-left: -10px;
    margin-right: -10px;
  }
}
