:root{--bg:#f4f7fb;--card:#fff;--text:#14263d;--muted:#6e7f93;--line:#e3e9f0;--primary:#1e4f84;--primary2:#17375f;--soft:#eef4fb;--ok:#14805e;--warn:#b7791f;--danger:#b53a3a;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background:var(--bg)}*{box-sizing:border-box}body{margin:0;background:var(--bg)}button,input,select,textarea{font:inherit}button{cursor:pointer}.loading,.loadingBox{padding:40px;color:var(--muted)}
.loginPage{min-height:100vh;display:grid;grid-template-columns:minmax(440px,1.02fr) minmax(420px,.98fr);background:#f7f9fc}.loginVisual{position:relative;overflow:hidden;background:linear-gradient(145deg,#102b4d 0%,#173d68 58%,#1d527f 100%);color:#fff;padding:34px 42px 40px;display:grid;grid-template-rows:auto 1fr auto;min-height:100vh}.loginVisual:before{content:"";position:absolute;width:520px;height:520px;border-radius:50%;background:rgba(255,255,255,.045);right:-220px;top:-230px}.loginVisualBrand{position:relative;z-index:1;display:flex;align-items:center;gap:12px}.loginVisualBrand span,.brand>span{width:40px;height:40px;border-radius:12px;background:#3d83c4;color:#fff;display:grid;place-items:center;font-weight:800}.loginVisualBrand strong{font-size:16px}.loginArt{position:relative;z-index:1;display:grid;place-items:center;padding:26px 0 14px}.loginArt img{display:block;width:min(690px,94%);max-height:58vh;object-fit:contain;filter:drop-shadow(0 28px 42px rgba(0,0,0,.18))}.loginVisualCopy{position:relative;z-index:1;max-width:620px}.loginVisualCopy h1{font-size:clamp(34px,4vw,56px);line-height:1.03;margin:0 0 10px;letter-spacing:-.035em}.loginVisualCopy p{font-size:17px;line-height:1.55;margin:0;color:#c7d8e9}.loginPane{display:grid;place-items:center;padding:36px}.loginCard{width:min(430px,100%);background:transparent}.mobileBrand{display:none}.brand,.sideBrand{display:flex;align-items:center;gap:12px}.brand strong,.brand small,.sideBrand strong,.sideBrand small{display:block}.brand small,.sideBrand small{color:var(--muted);margin-top:2px}.loginTitle{margin:0 0 24px}.loginTitle h1{font-size:36px;letter-spacing:-.025em;margin:0;color:#112944}.loginTitle p{margin:8px 0 0;color:var(--muted);line-height:1.55}.loginCard form{display:grid;gap:16px}label{display:grid;gap:7px;font-size:13px;font-weight:700}input,select,textarea{width:100%;border:1px solid #d8e1ec;border-radius:12px;background:#fff;color:var(--text);padding:12px 13px;outline:none}input:focus,select:focus,textarea:focus{border-color:#8eafd2;box-shadow:0 0 0 3px rgba(30,79,132,.09)}textarea{min-height:110px;resize:vertical}.passwordWrap{position:relative}.passwordWrap input{padding-right:48px}.passwordWrap button{position:absolute;right:4px;top:4px;width:40px;height:36px;border:0;background:transparent;color:#63788f;display:grid;place-items:center;border-radius:9px}.passwordWrap button:hover{background:#eef4fa;color:#173d68}.passwordWrap button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.remember{display:flex;justify-content:space-between;gap:12px;align-items:center}.remember label,.check{display:flex;align-items:center;gap:8px;font-weight:500}.remember input,.check input{width:auto}.linkBtn{border:0;background:transparent;color:var(--primary);font-weight:700;padding:0}.btn{border:0;border-radius:12px;padding:10px 14px;font-weight:750}.btn.primary{background:linear-gradient(135deg,var(--primary2),var(--primary));color:#fff}.btn.secondary{background:#fff;border:1px solid var(--line);color:var(--text)}.btn.danger{background:var(--danger);color:#fff}.btn.wide{width:100%;padding:13px}.loginDivider{display:flex;align-items:center;gap:12px;color:#9aa9ba;font-size:12px;margin:14px 0}.loginDivider:before,.loginDivider:after{content:"";height:1px;background:#e2e8f0;flex:1}.biometricBtn{width:100%;min-height:50px;border:1px solid #d8e1ec;border-radius:13px;background:#fff;color:#17375f;display:flex;align-items:center;justify-content:center;gap:10px;font-weight:750}.biometricBtn:hover{background:#f4f8fc}.biometricBtn svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.simpleLogin{grid-template-columns:1fr}.simpleLogin .loginPane{min-height:100vh}
.app{min-height:100vh;display:grid;grid-template-columns:240px 1fr}.app aside{background:#132c4b;color:#e7eff8;padding:20px 14px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.sideBrand{padding:4px 8px 18px;border-bottom:1px solid rgba(255,255,255,.09)}.sideBrand small{color:#9fb2c7}.app nav{display:grid;gap:4px;margin-top:16px;overflow:auto}.app nav button{border:0;background:transparent;color:#bcd0e4;text-align:left;padding:10px 12px;border-radius:10px}.app nav button.active,.app nav button:hover{background:rgba(255,255,255,.1);color:#fff}.sideUser{margin-top:auto;border-top:1px solid rgba(255,255,255,.09);padding:16px 8px 4px}.sideUser strong,.sideUser small{display:block}.sideUser small{color:#9fb2c7;margin-top:3px;word-break:break-all}.sideUser button{margin-top:12px;border:0;background:transparent;color:#fff;padding:0}.main{min-width:0}.main header{height:78px;background:rgba(255,255,255,.9);backdrop-filter:blur(10px);border-bottom:1px solid var(--line);padding:0 24px;display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;z-index:5}.main header small{color:var(--muted)}.main header h1{font-size:24px;margin:3px 0 0}.sessionLive{font-size:13px;color:var(--ok);font-weight:700}.content{padding:24px;max-width:1400px}.pageHead{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}.pageHead h2{margin:0 0 5px;font-size:24px}.pageHead p{margin:0;color:var(--muted)}.empty,.settingsCard,.infoBox,.hint{background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px}.empty{display:grid;gap:5px;color:var(--muted)}.empty strong{color:var(--text)}.reportGrid{display:grid;gap:12px}.reportCard,.providerCard{display:flex;gap:14px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:16px;padding:14px}.reportCard strong,.reportCard small,.providerCard strong,.providerCard small{display:block}.reportCard small,.providerCard small{color:var(--muted);margin-top:3px}.pdfIcon,.providerIcon{width:44px;height:44px;border-radius:12px;background:var(--soft);color:var(--primary);display:grid;place-items:center;font-size:12px;font-weight:800}.grow{flex:1;min-width:0}.table{background:#fff;border:1px solid var(--line);border-radius:16px;overflow:auto}.tr{display:flex;gap:12px;align-items:center;padding:13px 15px;border-bottom:1px solid var(--line);min-width:820px}.tr>span{flex:1;min-width:120px}.tr>span:last-child{flex:0 0 auto;min-width:auto}.mailTable .tr>span:first-child{flex:1.25}.mailTable .tr>span:last-child{flex:1.5}.tr:last-child{border-bottom:0}.tr.th{background:#f9fbfd;color:#6d7e92;font-size:12px;font-weight:800}.tr span strong,.tr span small{display:block}.tr span small{color:var(--muted);margin-top:3px}.mini{border:1px solid var(--line);background:#fff;border-radius:9px;padding:7px 9px;color:var(--text)}.primaryMini{color:var(--primary);background:var(--soft)}.dangerText{color:var(--danger)}.actions{display:flex;gap:6px;flex-wrap:wrap}.status.connected{color:var(--ok);font-weight:700}.status.error{color:var(--danger);font-weight:700}.status.paused,.status.pending_authorization{color:var(--warn);font-weight:700}.dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:8px}.hint,.infoBox{margin-top:14px;background:#f7fafc;color:#52657b}.providerGrid{display:grid;gap:12px}.providerMeta{display:flex;gap:14px;flex-wrap:wrap;color:var(--muted);font-size:12px;margin-top:8px}.settingsCard{max-width:720px;display:grid;gap:18px}.formGrid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.formGrid.full,.full{grid-column:1/-1}.checkGrid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.modalBg{position:fixed;inset:0;background:rgba(8,22,38,.48);display:grid;place-items:center;padding:20px;z-index:50}.modal{width:min(720px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:22px;border:1px solid var(--line);box-shadow:0 30px 80px rgba(0,0,0,.18)}.modalHead,.modalFoot{padding:18px 20px;display:flex;align-items:center;justify-content:space-between}.modalHead{border-bottom:1px solid var(--line)}.modalHead h3{margin:0}.modalBody{padding:20px}.modalFoot{border-top:1px solid var(--line);justify-content:flex-end;gap:10px}.iconBtn{width:36px;height:36px;border:0;border-radius:10px;background:#f2f5f8;font-size:22px}.modalText{color:var(--muted);line-height:1.6}.secretBox{background:#101f33;color:#fff;border-radius:13px;padding:16px;word-break:break-all}.pdfFrame{width:100%;height:70vh;border:0;border-radius:10px}.toastStack{position:fixed;right:16px;bottom:16px;display:grid;gap:9px;z-index:80;max-width:min(390px,calc(100vw - 32px))}.toast{padding:13px 15px;border-radius:13px;color:#fff;font-weight:650;box-shadow:0 14px 40px rgba(0,0,0,.16)}.toast.success{background:#147d59}.toast.warning{background:#ad6c16}.toast.info{background:#245785}
@media(max-width:980px){.app{grid-template-columns:1fr}.app aside{height:auto;position:static;padding:12px}.app nav{display:flex;overflow:auto}.app nav button{white-space:nowrap}.sideUser{display:none}.main header{position:static}.content{padding:16px}}@media(max-width:680px){.loginPage{padding:14px}.loginCard{padding:22px;border-radius:20px}.pageHead{flex-direction:column}.pageHead .btn{width:100%}.formGrid{grid-template-columns:1fr}.checkGrid{grid-template-columns:1fr}.main header{height:auto;padding:14px 16px}.headerRight{display:none}.content{padding:14px}.reportCard{align-items:flex-start;flex-wrap:wrap}.reportCard .btn{width:100%}.modalBg{padding:8px}.modal{border-radius:16px}.modalBody{padding:16px}}

@media(max-width:900px){.loginPage{grid-template-columns:1fr}.loginVisual{display:none}.loginPane{min-height:100vh;padding:24px}.mobileBrand{display:flex;margin-bottom:28px}.loginCard{width:min(440px,100%)}.loginTitle h1{font-size:32px}}
@media(max-width:520px){.loginPane{padding:22px 18px}.remember{align-items:flex-start;flex-direction:column}.loginCard{width:100%}.loginTitle h1{font-size:30px}}

@media(max-width:680px){.loginPage{padding:0}.loginCard{padding:0;border-radius:0}}
.linkAsButton{display:block;text-align:center;text-decoration:none}.initialAccess{display:grid;grid-template-columns:1fr 1fr;gap:14px}.accessField{display:grid;gap:7px}.accessField small,.mailDetail small,.mailBody>small{color:var(--muted);font-weight:700}.accessField.full{grid-column:1/-1}.secretInline{position:relative}.secretInline input{padding-right:48px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:750}.secretInline button{position:absolute;right:4px;top:4px;width:40px;height:36px;border:0;background:transparent;color:#63788f;display:grid;place-items:center;border-radius:9px}.secretInline button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.accessExpiry{grid-column:1/-1;color:var(--muted)}.statusPill{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:800;background:#eef3f8;color:#4b6077;white-space:nowrap}.status-active,.status-processed,.status-approved{background:#e8f6f0;color:#137356}.status-pending,.status-rejected{background:#fff3df;color:#9a6415}.status-revoked,.status-error{background:#fdeaea;color:#a43131}.status-duplicate{background:#eef2f7;color:#596a7e}.status-ignored{background:#f1f1f1;color:#666}.mailMonitorToolbar{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-bottom:14px}.filterPills{display:flex;gap:7px;flex-wrap:wrap}.filterPill{border:1px solid var(--line);background:#fff;border-radius:999px;padding:8px 11px;color:#53677d;font-weight:750}.filterPill.active{background:var(--primary2);border-color:var(--primary2);color:#fff}.mailSearch{max-width:360px}.incomingTable .tr{min-width:1120px}.incomingTable .tr>span:nth-child(3){flex:1.55}.incomingTable .tr>span:nth-child(4){flex:1.25}.mailDetail{display:grid;gap:18px}.detailGrid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.detailGrid>div{display:grid;gap:5px}.detailGrid .full{grid-column:1/-1}.detailGrid p{margin:7px 0 0;color:var(--muted);line-height:1.5}.mailBody{display:grid;gap:7px}.mailBody pre{margin:0;border:1px solid var(--line);border-radius:12px;background:#f8fafc;padding:14px;white-space:pre-wrap;word-break:break-word;max-height:300px;overflow:auto;font:inherit;line-height:1.5;color:#334a62}.usersTable .tr{min-width:930px}
@media(max-width:680px){.initialAccess,.detailGrid{grid-template-columns:1fr}.accessField.full,.accessExpiry,.detailGrid .full{grid-column:1}.mailMonitorToolbar{align-items:stretch;flex-direction:column}.mailSearch{max-width:none}.modalFoot{flex-wrap:wrap}.modalFoot .btn{flex:1 1 150px}}

/* V2.4 - telas operacionais sem cabeçalho duplicado */
.main{min-width:0}.content{padding:24px;max-width:1500px}.filterPill span{display:inline-grid;place-items:center;min-width:20px;height:20px;margin-left:5px;padding:0 5px;border-radius:999px;background:#eef3f8;color:#52657b;font-size:11px}.filterPill.active span{background:rgba(255,255,255,.18);color:#fff}.pager{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 4px;color:var(--muted);font-size:13px}.pager>div{display:flex;gap:7px}.decodedMailText{border:1px solid var(--line);border-radius:12px;background:#f8fafc;padding:14px;white-space:normal;word-break:break-word;max-height:320px;overflow:auto;line-height:1.55;color:#334a62}.captureBox{display:grid;gap:4px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#f8fafc}.captureBox small{color:var(--muted);font-weight:500}.previewMail{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0;border-bottom:1px solid var(--line)}.previewMail:last-child{border-bottom:0}.previewMail strong,.previewMail small{display:block}.previewMail small{margin-top:4px;color:var(--muted)}.previewMail>span{white-space:nowrap;font-size:12px;font-weight:800;border-radius:999px;padding:5px 8px}.previewMail.willCapture>span{background:#e8f6f0;color:#137356}.previewMail.willSkip>span{background:#f1f3f6;color:#68798c}.testSummary{display:grid;gap:4px;padding-bottom:12px;border-bottom:1px solid var(--line)}.testSummary small{color:var(--muted)}.empty.compact{padding:16px;margin-top:12px}.accessManage{display:grid;grid-template-columns:1fr 1fr;gap:16px}.accessManage>div{display:grid;gap:6px}.accessManage small{color:var(--muted);font-weight:700}.mailTable .tr{min-width:1180px}.mailTable .tr>span:first-child{flex:1.15}.mailTable .tr>span:nth-child(2){flex:1.35}.mailTable .tr>span:last-child{flex:2.15}.usersTable .tr>span:last-child{flex:1.5}.mini:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:680px){.accessManage{grid-template-columns:1fr}.pager{align-items:stretch;flex-direction:column}.pager>div{width:100%}.pager .mini{flex:1}}

/* TS Reports 2.5 — experiência app / acessibilidade */
html{-webkit-text-size-adjust:auto;text-size-adjust:auto;overscroll-behavior:none}
@supports (font: -apple-system-body){body{font:-apple-system-body}}
html[data-font-size="large"]{font-size:112%}
html[data-font-size="xlarge"]{font-size:126%}
html[data-font-size="max"]{font-size:142%}
body{font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",system-ui,sans-serif;min-height:100dvh;overscroll-behavior:none}
button,input,select,textarea{font-family:inherit}
.reportTypeIcon{width:48px;height:48px;flex:0 0 48px;border-radius:15px;background:var(--soft);color:var(--primary);display:grid;place-items:center}
.reportTypeIcon svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}

.viewerApp{min-height:100dvh;background:#f4f7fb;color:var(--text);overflow-x:hidden}
.viewerTop{height:76px;padding:max(12px,env(safe-area-inset-top)) 18px 10px;box-sizing:content-box;background:#132c4b;color:white;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:20;border-bottom:1px solid rgba(255,255,255,.08)}
.viewerBrand{display:flex;gap:10px;align-items:center;min-width:0}.viewerBrand>span{width:38px;height:38px;border-radius:12px;background:#2d679f;display:grid;place-items:center;font-weight:800}.viewerBrand strong,.viewerBrand small{display:block}.viewerBrand strong{font-size:1rem}.viewerBrand small{font-size:.78rem;color:#b8c9dc;margin-top:2px;text-transform:capitalize}
.viewerActions{display:flex;align-items:center;gap:7px}.appIconBtn{position:relative;width:42px;height:42px;border-radius:13px;border:1px solid rgba(255,255,255,.12);background:rgba(255,255,255,.08);color:inherit;display:grid;place-items:center;font-weight:800}.appIconBtn svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.appIconBtn:disabled{opacity:.3}.appBadge{position:absolute;right:-3px;top:-4px;min-width:18px;height:18px;border-radius:999px;background:#d34a48;color:#fff;font-size:10px;font-style:normal;display:grid;place-items:center;padding:0 4px;border:2px solid #132c4b}
.viewerContent{max-width:820px;margin:0 auto;padding:18px 16px calc(28px + env(safe-area-inset-bottom));min-height:calc(100dvh - 98px)}
.viewerHome{display:grid;gap:20px}.dayNav{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;gap:8px}.dayNav .appIconBtn{background:#fff;border:1px solid var(--line);color:var(--text);font-size:30px}.dayCurrent{border:0;background:transparent;text-align:center;color:var(--text);padding:4px}.dayCurrent strong,.dayCurrent small{display:block}.dayCurrent strong{font-size:1.05rem}.dayCurrent small{color:var(--muted);font-size:.82rem;margin-top:2px;text-transform:capitalize}
.viewerHeading{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}.viewerHeading h1{margin:0;font-size:1.75rem;letter-spacing:-.025em}.viewerHeading p{margin:4px 0 0;color:var(--muted)}.newSummary{background:#e8f4ff;color:#174f82;border-radius:999px;padding:7px 10px;font-size:.78rem;font-weight:800;white-space:nowrap}
.viewerReportList{display:grid;gap:11px}.viewerReportCard{width:100%;border:1px solid var(--line);background:#fff;border-radius:20px;padding:14px;display:flex;align-items:center;gap:13px;text-align:left;color:var(--text);box-shadow:0 1px 0 rgba(10,35,60,.02)}.viewerReportCard:active{transform:scale(.992)}.viewerReportCard.unread{border-color:#cddff1;background:#fcfeff}.viewerReportInfo{min-width:0;flex:1}.viewerReportInfo strong,.viewerReportInfo small{display:block}.viewerReportInfo strong{font-size:1.03rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.viewerReportCard:not(.unread) .viewerReportInfo strong{font-weight:600}.viewerReportCard.unread .viewerReportInfo strong{font-weight:850}.viewerReportInfo small{color:var(--muted);font-size:.82rem;margin-top:3px}.reportTopLine{display:flex;align-items:baseline;gap:10px}.reportTopLine strong{flex:1}.reportTopLine time{font-size:.78rem;color:var(--muted);white-space:nowrap}.unreadDot{width:9px;height:9px;background:#2473b8;border-radius:50%;flex:0 0 9px}.chevron{color:#9bacbf;font-size:25px;line-height:1}.viewerEmpty{padding:52px 16px;text-align:center;color:var(--muted);display:grid;place-items:center;gap:8px}.viewerEmpty svg{width:44px;height:44px;fill:none;stroke:#8ba1b9;stroke-width:1.5}.viewerEmpty strong{color:var(--text);font-size:1.05rem}

.privacyLock{min-height:100dvh;background:#132c4b;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px 22px calc(32px + env(safe-area-inset-bottom));text-align:center;gap:20px}.privacyLock h1{font-size:1.5rem;margin:0}.privacyLock .wide{max-width:360px;display:flex;justify-content:center;align-items:center;gap:10px}.privacyLock .wide svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8}.privacyLock .linkBtn{color:#d5e4f3}.privacyMark span{width:64px;height:64px;border-radius:20px;background:#2d679f;display:grid;place-items:center;font-weight:850;font-size:1.25rem}
.appPrefs{display:grid;gap:22px}.appPrefs section{display:grid;gap:10px}.fontChoices{display:flex;gap:7px;flex-wrap:wrap}.mini.activeChoice{background:var(--primary);border-color:var(--primary);color:#fff}.viewerMenuBody{display:grid;gap:10px}.viewerMenuBody small{color:var(--muted);display:block;margin-bottom:8px}

.pdfAppViewer{position:fixed;inset:0;z-index:95;background:#dbe1e8;display:grid;grid-template-rows:auto 1fr;height:100dvh;overflow:hidden}.pdfAppBar{padding:max(9px,env(safe-area-inset-top)) 10px 9px;background:#fff;border-bottom:1px solid #d7dfe8;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px}.pdfClose{width:42px;height:42px;border-radius:13px;border:0;background:#f0f4f8;color:#1868ad;font-size:29px;line-height:1}.pdfTitle{min-width:0}.pdfTitle strong,.pdfTitle small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pdfTitle strong{font-size:.95rem}.pdfTitle small{font-size:.74rem;color:var(--muted);margin-top:2px}.pdfTools{display:flex;align-items:center;gap:5px}.pdfTools button{border:1px solid var(--line);background:#fff;border-radius:9px;height:36px;padding:0 9px;color:var(--text);font-weight:700}.pdfTools span{font-size:.72rem;min-width:36px;text-align:center;color:var(--muted)}.pdfViewport{overflow:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;background:#8c949d;padding:8px;touch-action:pan-x pan-y pinch-zoom}.pdfNative{display:block;width:100%;height:100%;min-height:calc(100dvh - 74px);border:0;background:#fff;border-radius:8px}

@media(max-width:640px){
  .viewerTop{height:60px;padding-left:12px;padding-right:12px}.viewerActions{gap:5px}.appIconBtn{width:39px;height:39px;border-radius:12px}.viewerBrand>span{width:36px;height:36px}.viewerBrand small{display:none}.viewerContent{padding:14px 12px calc(24px + env(safe-area-inset-bottom))}.viewerHeading h1{font-size:1.6rem}.viewerReportCard{padding:13px 12px;border-radius:18px}.reportTypeIcon{width:46px;height:46px;flex-basis:46px}.pdfAppBar{grid-template-columns:auto minmax(0,1fr)}.pdfTools{grid-column:1/-1;justify-content:center;padding-top:2px}.pdfViewport{padding:0}.pdfNative{border-radius:0;min-height:calc(100dvh - 112px)}
}
@media(max-width:390px){.viewerActions .appIconBtn:nth-child(2){display:none}.viewerReportInfo small:last-child{font-size:.76rem}.pdfTools button{padding:0 7px}}
.categoryIconPreview{width:34px;height:34px;border-radius:10px;background:var(--soft);color:var(--primary);display:grid;place-items:center}.categoryIconPreview svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* V2.5 - refinamentos iPhone/PWA */
@supports (font: -apple-system-body){
  html[data-font-size="system"]{font:-apple-system-body}
}
html[data-font-size="large"]{font-size:112%}
html[data-font-size="xlarge"]{font-size:126%}
html[data-font-size="max"]{font-size:142%}
.viewerApp{position:fixed;inset:0;display:grid;grid-template-rows:auto minmax(0,1fr);min-height:0;height:100dvh;overflow:hidden}
.viewerTop{position:relative;top:auto;z-index:20}
.viewerContent{width:100%;box-sizing:border-box;min-height:0;height:100%;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain}
.privacyPrompt{display:grid;place-items:center;gap:14px;text-align:center;color:var(--text);padding:8px 0}.privacyPrompt svg{width:52px;height:52px;fill:none;stroke:var(--primary);stroke-width:1.55}.privacyPrompt p{margin:0;color:var(--muted);max-width:420px;line-height:1.5}
@media(max-width:640px){body:has(.viewerApp){overflow:hidden}.viewerTop{flex:0 0 auto}}

/* TS Reports 2.5.1 — relatórios agrupados por tipo e data */
.groupedReports{gap:16px}
.reportScopeTabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;position:sticky;top:0;z-index:8;background:#f4f7fb;padding:2px 0 8px}
.reportScopeTab{min-width:0;border:1px solid var(--line);background:#fff;color:var(--muted);border-radius:14px;padding:9px 7px;display:flex;align-items:center;justify-content:center;gap:6px;font-weight:750}
.reportScopeTab span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.reportScopeTab b{font-size:.68rem;min-width:20px;height:20px;border-radius:999px;background:#edf2f7;color:#66788b;display:grid;place-items:center;padding:0 5px}
.reportScopeTab.active{background:#173f69;border-color:#173f69;color:#fff}.reportScopeTab.active b{background:rgba(255,255,255,.18);color:#fff}
.reportGroups{display:grid;gap:13px}.reportGroupCard{background:#fff;border:1px solid var(--line);border-radius:21px;overflow:hidden}.reportGroupHead{display:flex;align-items:center;gap:12px;padding:14px 14px 12px}.reportGroupTitle{min-width:0;flex:1}.reportGroupTitle strong,.reportGroupTitle small{display:block}.reportGroupTitle strong{font-size:1.04rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.reportGroupTitle small{font-size:.78rem;color:var(--muted);margin-top:3px}.groupUnread{font-size:.69rem;font-weight:800;color:#174f82;background:#e8f4ff;border-radius:999px;padding:6px 8px;white-space:nowrap}
.reportGroupBody{border-top:1px solid #edf1f5}.reportDateSection+.reportDateSection{border-top:1px solid #edf1f5}.reportDateTitle{padding:9px 14px 7px;background:#f8fafc;display:flex;align-items:center;justify-content:space-between;gap:10px}.reportDateTitle strong{font-size:.78rem}.reportDateTitle small{font-size:.7rem;color:var(--muted)}
.groupReportRow{width:100%;border:0;border-top:1px solid #f0f3f6;background:#fff;color:var(--text);padding:11px 14px;display:flex;align-items:center;gap:12px;text-align:left}.reportDateTitle+.groupReportRow{border-top:0}.groupReportRow.unread{background:#fcfeff}.groupReportWhen{min-width:0;flex:1}.groupReportWhen strong,.groupReportWhen small{display:block}.groupReportWhen strong{font-size:.98rem}.groupReportRow.unread .groupReportWhen strong{font-weight:850}.groupReportWhen small{font-size:.74rem;color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.groupReportState{display:flex;align-items:center;gap:8px}.freshTag{font-size:.65rem;font-weight:850;text-transform:uppercase;letter-spacing:.03em;color:#174f82;background:#e8f4ff;padding:4px 6px;border-radius:999px}.groupHistoryBtn{width:100%;border:0;border-top:1px solid var(--line);background:#fbfcfe;color:#245785;padding:10px 14px;font-weight:750;text-align:center}
@media(max-width:430px){.reportScopeTabs{gap:5px}.reportScopeTab{padding:8px 4px;font-size:.78rem;border-radius:12px}.reportScopeTab b{min-width:18px;height:18px;font-size:.62rem}.reportGroupHead{padding:12px}.groupUnread{display:none}.groupReportRow{padding:10px 12px}}

/* TS Reports 2.5.2 — visualizador estável e bloqueio biométrico fluido */
body.pdf-open{overflow:hidden;position:fixed;inset:0;width:100%}
body.privacy-curtain::after{content:"";position:fixed;inset:0;z-index:99999;background:#071525}
.privacyStatus{margin:0 0 16px;color:#b8c9dc;text-align:center;font-size:.95rem}
.privacyLock #unlockDevice[hidden]{display:none!important}

.pdfAppViewer{position:fixed;inset:0;z-index:95;background:#8c949d;display:grid;grid-template-rows:auto minmax(0,1fr);height:100dvh;max-height:100dvh;overflow:hidden;overscroll-behavior:none}
.pdfViewport{position:relative;width:100%;height:100%;min-width:0;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;background:#8c949d;padding:8px 0 calc(12px + env(safe-area-inset-bottom));box-sizing:border-box;touch-action:pan-x pan-y;scrollbar-gutter:stable both-edges}
.pdfDocument{min-width:100%;width:100%;display:flex;flex-direction:column;align-items:center;gap:12px;padding:0 8px;box-sizing:border-box}
.pdfPageFrame{position:relative;flex:0 0 auto;max-width:none;background:#fff;box-shadow:0 1px 4px rgba(20,35,50,.22);overflow:hidden}
.pdfRenderedPage{display:block;width:100%;height:auto;max-width:none;user-select:none;-webkit-user-select:none;-webkit-user-drag:none;pointer-events:none;background:#fff}
.pdfPageNumber{position:absolute;right:8px;bottom:8px;background:rgba(15,35,55,.72);color:#fff;border-radius:999px;padding:3px 7px;font-size:11px;font-weight:700;opacity:.78}
.pdfPageNumber:empty{display:none}
.pdfLoading{margin:auto;color:#fff;font-weight:750;padding:28px 18px}
.pdfTools button{touch-action:manipulation}

@media(max-width:640px){
  .pdfViewport{padding-left:0;padding-right:0}
  .pdfDocument{padding-left:8px;padding-right:8px}
  .pdfPageFrame{box-shadow:none}
}

/* V2.6 - homologação: lojas e prévia de distribuição */
.distributionPreview{border:1px solid var(--line);border-radius:16px;padding:14px;background:var(--surface-2);display:grid;gap:8px}.distributionPreview strong{font-size:14px}.distributionPreview small{color:var(--muted);line-height:1.45}.distributionPreview .btn{justify-self:start}.formGrid label small{font-weight:400;color:var(--muted)}

/* TS Reports 2.6.1 — atualização, categorias visuais */
.appIconBtn.spinning svg{animation:tsSpin .7s linear infinite}@keyframes tsSpin{to{transform:rotate(360deg)}}
.categoryCards{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}.categoryCard{display:flex;align-items:center;gap:13px;border:1px solid var(--line);background:#fff;border-radius:18px;padding:14px}.categoryCard strong,.categoryCard small{display:block}.categoryCard small{color:var(--muted);margin-top:4px}.categoryCardIcon{width:48px;height:48px;border-radius:15px;display:grid;place-items:center;color:var(--cat-color);background:color-mix(in srgb,var(--cat-color) 11%,white)}.categoryCardIcon svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.categoryPicker{display:grid;gap:9px}.categoryIconChoices{display:grid;grid-template-columns:repeat(auto-fit,minmax(92px,1fr));gap:8px}.categoryIconChoice{border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--text);padding:10px 7px;display:grid;place-items:center;gap:5px}.categoryIconChoice svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8}.categoryIconChoice span{font-size:.75rem}.categoryIconChoice.active{border-color:var(--primary);background:var(--soft);color:var(--primary)}.categoryColorChoices{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.categoryColorChoice{width:34px;height:34px;border-radius:11px;border:3px solid #fff;background:var(--choice);box-shadow:0 0 0 1px var(--line)}.categoryColorChoice.active{box-shadow:0 0 0 3px var(--primary)}.categoryCustomColor{display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:11px;padding:5px 8px;font-size:.75rem}.categoryCustomColor input{width:30px;height:26px;border:0;padding:0;background:transparent}
@media(max-width:390px){.viewerActions .appIconBtn:nth-child(3){display:none}}


/* 2.6.2 — categorias recolhíveis do App */
.categorySections{display:grid;gap:12px;margin-top:14px}
.categorySection{border:1px solid var(--line,#dce5ef);border-radius:18px;background:#fff;overflow:hidden}
.categorySectionHead{width:100%;display:flex;align-items:center;gap:12px;border:0;background:#fff;padding:14px 16px;text-align:left;color:#132c4b}
.categorySectionIcon{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;background:color-mix(in srgb,var(--section-color) 10%,white);color:var(--section-color);flex:0 0 auto}
.categorySectionIcon svg{width:22px;height:22px}
.categorySectionText{display:grid;gap:2px;flex:1;min-width:0}.categorySectionText strong{font-size:1rem}.categorySectionText small{color:#708199}
.categoryChevron{font-size:1.35rem;color:#7a8ba1;transition:transform .18s ease}.categorySection.open .categoryChevron{transform:rotate(180deg)}
.categorySectionBody{padding:0 10px 10px;display:grid;gap:10px;border-top:3px solid color-mix(in srgb,var(--section-color) 24%,transparent)}
.categorySectionBody .reportGroupCard{margin-top:10px}
.appSyncLine{display:block;margin-top:4px;color:#7a8ba1;font-size:.78rem}
.settingHelp{color:#718096;margin-top:-4px}
@media(max-width:640px){.categorySectionHead{padding:12px}.categorySectionBody{padding:0 8px 8px}.categorySectionIcon{width:38px;height:38px;border-radius:12px}}

/* 2.6.3 — preserva a iconografia cadastrada e permite categorias opcionais */
.categorySectionIcon svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.reportGroupCard{--report-color:#245785}.reportGroupCard .reportTypeIcon{color:var(--report-color);background:color-mix(in srgb,var(--report-color) 10%,white)}
.reportGroupsFlat{display:grid;gap:12px;margin-top:14px}
/* V2.6.7 - VAPID validado e renovação automática */
.pushStateLine{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.pushAdmin{display:grid;gap:20px}.pushUserHead{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.pushUserHead>div{display:grid;gap:4px}.pushUserHead small{color:var(--muted)}.pushDeviceList,.pushHistory{display:grid;gap:8px;margin-top:10px}.pushDevice{display:flex;justify-content:space-between;gap:16px;align-items:center;border:1px solid var(--line);border-radius:13px;padding:13px;background:#f9fbfd}.pushDevice>div:first-child{display:grid;gap:4px}.pushDevice small,.pushDeviceMeta small{color:var(--muted)}.pushDeviceMeta{display:grid;gap:3px;text-align:right}.pushHistoryRow{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:9px 0;border-bottom:1px solid var(--line)}.pushHistoryRow:last-child{border-bottom:0}.pushHistoryRow span:first-child{display:grid;gap:3px}.pushHistoryRow small{color:var(--muted)}
@media(max-width:720px){.pushDevice,.pushUserHead{align-items:flex-start;flex-direction:column}.pushDeviceMeta{text-align:left}}

/* V2.6.7 - controle independente das categorias no App */
.categoryOpenControls{display:flex;justify-content:flex-end;gap:8px;margin:10px 0 -2px}
.categoryOpenControls .mini{background:#fff}
@media(max-width:640px){.categoryOpenControls{justify-content:flex-start;overflow:auto;padding-bottom:2px}}

/* V2.7.0 — sessões, pesquisas e auditoria de anexos */
.sessionList{display:grid;gap:10px}.sessionRow{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) auto;gap:14px;align-items:center;border:1px solid var(--line);border-radius:14px;padding:12px;background:#f9fbfd}.sessionRow>div{display:grid;gap:3px}.sessionRow small{color:var(--muted)}.sectionTitle{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.sectionTitle h3{margin:0}.sectionTitle small{color:var(--muted)}
.pendingSurveyCard{width:100%;border:1px solid var(--line);background:#fff;color:var(--text);border-radius:16px;padding:12px 14px;display:flex;align-items:center;gap:12px;text-align:left;margin:2px 0 10px}.pendingSurveyCard>span:nth-child(2){display:grid;gap:2px;flex:1}.pendingSurveyCard small{color:var(--muted)}.pendingSurveyIcon{width:38px;height:38px;border-radius:12px;background:var(--soft);color:var(--primary);display:grid;place-items:center}.pendingSurveyIcon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.surveyEditor{gap:14px}.surveyQuestionsHead{display:flex;justify-content:space-between;align-items:center;gap:10px}.surveyQuestionsHead>div{display:flex;gap:7px;flex-wrap:wrap}.surveyQuestionEdit{border:1px solid var(--line);border-radius:14px;padding:12px;margin-bottom:10px;background:#f9fbfd;display:grid;gap:10px}.surveyQuestionLine{display:flex;gap:10px;align-items:end}.surveyQuestionLine .grow{flex:1}.quickSurvey{display:grid;gap:16px}.surveyUserQuestion{border:0;margin:0;padding:0;display:grid;gap:8px}.surveyUserQuestion legend,.surveyUserQuestion>strong{font-weight:800;color:var(--text)}.surveyChoice{display:flex;align-items:center;gap:9px;border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:#fff}.surveyChoice input{width:20px;height:20px}.surveyResults{display:grid;gap:12px}.surveyResultRow{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center;border-bottom:1px solid var(--line);padding:10px 0}.surveyResultRow>div{display:grid;gap:2px}.surveyAnswerList{display:grid;gap:12px}.surveyAnswerList>div{display:grid;gap:4px;border-bottom:1px solid var(--line);padding-bottom:10px}.surveyAnswerList small{color:var(--muted)}
.attachmentAudit{display:grid;gap:7px;margin-top:5px}.attachmentAudit>div{display:flex;justify-content:space-between;gap:10px;align-items:center;border:1px solid var(--line);border-radius:11px;padding:9px 10px;background:#f9fbfd}.attachmentAudit strong{font-size:.9rem;min-width:0;overflow-wrap:anywhere}
@media(max-width:720px){.sessionRow,.surveyResultRow{grid-template-columns:1fr}.surveyQuestionLine{align-items:stretch;flex-direction:column}.surveyQuestionsHead{align-items:flex-start;flex-direction:column}.attachmentAudit>div{align-items:flex-start;flex-direction:column}}

/* V2.8.1 — relatórios por link / dashboard incorporado */
.ruleConditional{margin:0}.embeddedGrid{margin:0}.optional{font-weight:400;color:var(--muted)}
.dashboardAppViewer{position:fixed;inset:0;z-index:95;background:#edf1f5;display:grid;grid-template-rows:auto minmax(0,1fr);height:100dvh;max-height:100dvh;overflow:hidden;overscroll-behavior:none}
.dashboardTools{display:flex;align-items:center;gap:6px}.dashboardTools button{border:1px solid var(--line);background:#fff;border-radius:9px;height:36px;padding:0 12px;color:var(--text);font-weight:750}
.dashboardViewport{position:relative;min-width:0;min-height:0;width:100%;height:100%;overflow:hidden;background:#f4f6f8}
.dashboardFrame{position:absolute;inset:0;width:100%;height:100%;border:0;background:#fff}
.dashboardLoading{position:absolute;inset:0;z-index:2;display:grid;place-content:center;justify-items:center;gap:8px;background:#f4f7fa;color:var(--text);text-align:center;padding:24px;transition:opacity .18s ease,visibility .18s ease}.dashboardLoading.hidden{opacity:0;visibility:hidden;pointer-events:none}.dashboardLoading small{max-width:360px;color:var(--muted);line-height:1.45}.dashboardSpinner{width:34px;height:34px;border-radius:50%;border:3px solid #d5e0ea;border-top-color:var(--primary);animation:tsSpin .8s linear infinite}
.linkAudit{display:grid;gap:7px;margin-top:5px}.linkAudit>div{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:10px;row-gap:3px;align-items:center;border:1px solid var(--line);border-radius:11px;padding:9px 10px;background:#f9fbfd}.linkAudit>div strong,.linkAudit>div small{min-width:0;overflow-wrap:anywhere}.linkAudit>div small{grid-column:1;color:var(--muted)}.linkAudit>div .statusPill{grid-column:2;grid-row:1/3}
@media(max-width:640px){.dashboardAppViewer .pdfAppBar{grid-template-columns:auto minmax(0,1fr) auto}.dashboardTools{grid-column:auto;padding-top:0}.dashboardTools button{padding:0 9px}.dashboardViewport{padding-bottom:env(safe-area-inset-bottom)}.linkAudit>div{grid-template-columns:1fr}.linkAudit>div .statusPill{grid-column:1;grid-row:auto;justify-self:start}}
