:root{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#172b40;background:#f4f7fb;font-size:16px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}a{color:#176ca7;text-decoration:none}a:hover{text-decoration:underline}.topbar{min-height:74px;padding:14px max(22px,calc((100vw - 1240px)/2));display:flex;justify-content:space-between;align-items:center;gap:16px;background:#fff;border-bottom:1px solid #dfebf4}.brand{display:flex;align-items:center;gap:11px;color:#173c64;text-decoration:none}.brand-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:11px;background:#113e70;color:#fff;font-weight:800;font-size:14px}.brand strong,.brand small{display:block}.brand strong{font-size:15px}.brand small{color:#7b8b9c;font-size:12px;margin-top:2px}.topbar nav{display:flex;align-items:center;gap:20px}.topbar nav a,.topbar nav button{font-size:14px;color:#49637c;font-weight:650;background:none;border:0;padding:7px 0}.topbar nav form{margin:0}.container{max-width:1240px;margin:auto;padding:40px 24px 60px}.page-intro{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:28px}.eyebrow{font-size:12px;font-weight:800;letter-spacing:.13em;color:#1474b3}.page-intro h1,.auth h1{font-size:clamp(29px,3vw,40px);letter-spacing:-.04em;margin:9px 0}.page-intro p,.card p,.auth p{color:#66798d;line-height:1.55;font-size:14px;margin:0}.two-cols,.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.card{background:#fff;border:1px solid #dce6ee;border-radius:16px;padding:24px;box-shadow:0 10px 35px rgba(22,56,90,.04)}.card h2{font-size:20px;letter-spacing:-.025em;margin:0 0 8px}.card-head{display:flex;gap:14px;margin-bottom:24px}.card-head h2{margin-bottom:5px}.step{flex:none;display:grid;place-items:center;width:39px;height:39px;border-radius:10px;background:#e7f2fa;color:#146299;font-weight:800;font-size:13px}.row,.form-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 18px;border:1px solid #135f9f;border-radius:9px;background:#135f9f;color:#fff;font-size:14px;font-weight:750;text-decoration:none}.button:hover{background:#104e85;color:#fff;text-decoration:none}.button.secondary{color:#125b95;background:#fff}.button.secondary:hover{background:#f2f8fc}.button:disabled{opacity:.5;cursor:not-allowed}.button.full{width:100%;margin-top:26px}.divider{display:flex;align-items:center;gap:12px;font-size:12px;color:#8b98a7;margin:22px 0}.divider:before,.divider:after{content:"";height:1px;background:#e1e8ef;flex:1}label{display:block;color:#314b64;font-size:13px;font-weight:700}input,select,textarea{display:block;width:100%;background:#fff;color:#1a334c;border:1px solid #cddbe7;border-radius:8px;padding:11px 12px;margin-top:7px;outline:0;font-size:15px}textarea{resize:vertical;min-height:108px;font-size:13px}input:focus,textarea:focus,select:focus{border-color:#1875b6;box-shadow:0 0 0 3px #d7ecfa}.card>label+.button{margin-top:12px}#camera-video{display:block;width:100%;max-height:330px;object-fit:cover;background:#0d1f31;border-radius:10px;margin-top:16px}#camera-video[hidden]{display:none}.progress{padding:16px;background:#f4f9fd;border:1px solid #deebf5;border-radius:10px}.progress strong{font-size:24px;color:#135e9d;margin-right:11px}.progress span{font-size:13px;color:#698099}.section-preview{min-height:22px;margin:14px 0!important;font-weight:600}.qr-list{display:flex;gap:8px;flex-wrap:wrap;min-height:36px}.qr-chip{border-radius:8px;padding:7px 9px;background:#e7f4ff;color:#135f9d;border:1px solid #cde4f5;font-size:13px;font-weight:750}.qr-chip button{border:0;background:none;color:#3978a7;font-size:18px;margin-left:6px;line-height:1}.fineprint{font-size:12px!important;margin-top:13px!important}.status:not(:empty),.alert{padding:14px 16px;border-radius:9px;background:#e8f3fc;color:#135587;margin-top:18px;font-size:14px;line-height:1.4}.status.error,.alert{background:#fff0ed;color:#a34435}.alert.success{background:#e9f6ee;color:#1a7543}.auth{max-width:460px;margin:8vh auto;padding:16px}.auth .card{padding:31px}.stack{display:grid;gap:17px;margin-top:25px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin-top:22px}.form-grid>label:first-of-type{grid-column:span 2}.form-grid button{align-self:end}.space-top{margin-top:20px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px}.badge{background:#e7f1f9;border-radius:20px;color:#216a9c;padding:7px 11px;white-space:nowrap;font-size:12px;font-weight:700}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;min-width:730px;font-size:13px}th{background:#f4f8fb;color:#637d94;font-size:12px;text-align:left}td,th{padding:12px;border-bottom:1px solid #e7edf3;vertical-align:middle}td small{color:#77899a}.mini-photo{width:42px;height:48px;border-radius:7px;object-fit:cover}.mini-photo.placeholder{display:grid;place-items:center;background:#dceafa;color:#1a6b9e;font-weight:800}.pill{border:1px solid #d2dce5;border-radius:20px;background:#f3f6f9;color:#5e6f7f;padding:7px 12px;font-size:12px;font-weight:750}.pill.on{color:#137949;background:#eaf8f0;border-color:#c7ecd8}.fiscal-list,.recent-list{margin-top:24px}.fiscal-list>div,.recent-list>div{display:flex;justify-content:space-between;gap:10px;padding:13px 0;border-top:1px solid #e6edf2;font-size:13px}.fiscal-list small,.recent-list small{display:block;margin-top:4px;color:#74879b}.recent-list>div{display:block}.screen-page{background:#07182c;color:white}.screen-page .topbar{background:#0d2643;border-color:#1b3b5d}.screen-page .topbar .brand,.screen-page .topbar nav a,.screen-page .topbar nav button{color:#e0effc}.screen-page .brand-icon{background:#226da9}.screen{max-width:1920px;margin:auto;padding:clamp(22px,3vw,55px)}.screen-heading{display:flex;justify-content:space-between;align-items:end;gap:20px;padding-bottom:28px;border-bottom:1px solid #2a4664}.screen-heading .eyebrow{color:#61bcf0}.screen-heading h1{font-size:clamp(32px,4.1vw,73px);line-height:1.05;letter-spacing:-.05em;margin:13px 0}.screen-heading p{color:#a9c6df;font-size:clamp(15px,1.3vw,23px);margin:0}.section-counter{min-width:150px;text-align:right}.section-counter strong{font-size:clamp(40px,4vw,70px);line-height:1;display:block}.section-counter span{color:#9cbad2;font-size:14px}.candidate-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,390px),1fr));gap:clamp(14px,1.8vw,28px);padding-top:28px}.candidate-card{display:grid;grid-template-columns:minmax(105px,37%) 1fr;min-height:clamp(240px,23vw,390px);border:1px solid #315579;background:#123555;border-radius:18px;overflow:hidden;box-shadow:0 20px 45px rgba(0,0,0,.16)}.candidate-photo{background:#214865;display:grid;place-items:center;color:#80add1;font-size:90px;font-weight:800;overflow:hidden}.candidate-photo img{width:100%;height:100%;object-fit:cover;object-position:center top}.candidate-info{padding:clamp(17px,2.1vw,35px);min-width:0;display:flex;flex-direction:column}.office{font-size:clamp(11px,.85vw,15px);letter-spacing:.1em;text-transform:uppercase;font-weight:800;color:#70c2ee}.candidate-info h2{font-size:clamp(23px,2.1vw,40px);line-height:1.08;letter-spacing:-.035em;margin:12px 0 7px;overflow-wrap:anywhere}.number{font-size:clamp(12px,1vw,18px);color:#bdd4e8}.score{display:flex;gap:9px;align-items:baseline;margin-top:auto;padding-top:15px}.score strong{font-size:clamp(30px,3vw,53px);letter-spacing:-.04em}.score span{font-size:clamp(12px,1vw,18px);color:#b4cede}.percent{font-size:clamp(21px,2vw,36px);font-weight:800;color:#77cffb;margin:1px 0 9px}.bar{height:8px;background:#355d78;border-radius:10px;overflow:hidden}.bar span{display:block;height:100%;background:#69c7f9;border-radius:10px;transition:width .7s}.base{color:#9cb6ca;font-size:clamp(10px,.75vw,13px);margin-top:8px}.loading{grid-column:1/-1;text-align:center;padding:10vh 20px;color:#9bbbd6;font-size:20px}.screen-footer{display:flex;align-items:center;gap:20px;justify-content:space-between;border-top:1px solid #274764;margin-top:32px;padding-top:18px;color:#9cb7ca;font-size:clamp(12px,.9vw,16px)}.ghost{background:#153d60;color:#d7ecfa;border:1px solid #315b7e;border-radius:8px;padding:9px 13px;white-space:nowrap}@media(max-width:800px){.topbar{padding:13px 16px}.topbar nav{gap:11px}.topbar nav a,.topbar nav button{font-size:12px}.brand small{display:none}.container{padding:26px 15px 45px}.two-cols,.admin-grid{grid-template-columns:1fr}.page-intro{display:block}.page-intro>.button{margin-top:16px}.card{padding:19px}.form-grid{grid-template-columns:1fr}.form-grid>label:first-of-type{grid-column:span 1}.screen{padding:20px 15px}.screen-heading{align-items:start}.section-counter{min-width:95px}.screen-footer{flex-wrap:wrap}.candidate-card{min-height:265px}}
.preview-screen{display:block;width:100%;height:min(60vw,650px);min-height:350px;border:1px solid #bed1e1;border-radius:10px;background:#07182c}

/* Telão: ocupa toda a altura da janela, mesmo sem candidatos. */
body.screen-page{min-height:100vh;min-height:100dvh}
.screen-page .screen{width:100%;min-height:100vh;min-height:100dvh;display:flex;flex-direction:column}
.screen-page .screen-heading,.screen-page .screen-footer{flex-shrink:0}
.screen-page .candidate-grid{flex:1;align-content:center}

/* Tela independente dos fiscais. */
.reader-page{background:#f4f7fb;min-height:100vh}
.reader-topbar{display:flex;align-items:center;justify-content:space-between;padding:17px max(18px,calc((100vw - 820px)/2));background:#fff;border-bottom:1px solid #dce6ee;color:#153c62}
.reader-topbar form{margin:0}.reader-topbar button{background:none;border:0;color:#49637c;padding:6px 10px}
.reader-container{max-width:820px;margin:auto;padding:26px 18px 45px}.reader-intro h1{font-size:clamp(26px,4vw,36px);margin:10px 0}.reader-intro p{color:#66798d;line-height:1.5;margin:0 0 20px}
.reader-progress{position:sticky;top:0;z-index:3;display:flex;gap:16px;align-items:center;padding:15px 20px;background:#e7f2fc;border:1px solid #bedbf0;border-radius:12px;margin-bottom:18px;box-shadow:0 5px 18px #173b6012}
.reader-progress strong{font-size:30px;color:#135f9f;white-space:nowrap}.reader-progress span{font-weight:750;font-size:14px}.reader-progress small{display:block;margin-top:4px;color:#476980;line-height:1.4}.reader-review{margin-top:18px}.reader-capture .section-head h2{margin:0}.reader-capture .section-head .button{min-height:36px;padding:7px 11px;font-size:12px}
.camera-stage{position:relative;background:#0b2136;border-radius:14px;overflow:hidden;aspect-ratio:4/3;max-height:430px;display:grid;place-items:center}
.reader-page #camera-video{width:100%;height:100%;max-height:none;object-fit:contain;margin:0;border-radius:0}.camera-placeholder{display:grid;text-align:center;gap:10px;padding:30px;color:#d7e9f7}.camera-placeholder span{font-size:13px;color:#9bb9ce}.camera-placeholder[hidden]{display:none}
.camera-guide{position:absolute;inset:12% 20% 20%;border:3px solid #8cd6ff;border-radius:14px;pointer-events:none;opacity:.65}.camera-stage:not(.active) .camera-guide{display:none}.camera-stage.captured .camera-guide{border-color:#75e1ae;opacity:1}
.camera-feedback{position:absolute;bottom:0;left:0;right:0;padding:12px 14px;background:#071827e8;color:#f2f8fd;text-align:center;font-size:14px;line-height:1.4}.camera-stage.captured .camera-feedback{background:#0d694ef0}
.reader-buttons{margin-top:16px}.reader-buttons>*{flex:1}.reader-tip{margin-top:14px!important}.manual-entry{margin-top:18px;border-top:1px solid #e1e9f1;padding-top:16px}.manual-entry summary{cursor:pointer;color:#286895;font-weight:700;font-size:14px}.manual-entry label{margin:15px 0 10px}
.scan-dialog{width:min(430px,calc(100% - 32px));border:0;border-radius:20px;padding:28px;color:#17364f;background:#fff;box-shadow:0 25px 80px #00152f55;text-align:center}.scan-dialog::backdrop{background:#071c39a8}.scan-dialog h2{margin:14px 0 10px;font-size:25px}.scan-dialog p{color:#526f85;line-height:1.55;overflow-wrap:anywhere}.dialog-mark{width:56px;height:56px;margin:auto;border-radius:50%;display:grid;place-items:center;font-size:30px;font-weight:bold;background:#e3f6ec;color:#16734b}.scan-dialog.error .dialog-mark{background:#fff0ea;color:#b54127}.scan-dialog.info .dialog-mark{background:#e5f1fc;color:#176ba5}.dialog-actions{display:flex;justify-content:center;gap:10px;margin-top:22px}.dialog-actions .button{flex:1}.dialog-actions [hidden]{display:none}
@media(max-width:500px){.reader-container{padding:20px 12px 35px}.reader-capture,.reader-review{padding:16px}.camera-stage{aspect-ratio:1/1}.camera-guide{inset:12% 12% 22%}.reader-progress{padding:12px 15px}.reader-progress strong{font-size:27px}}

.reader-page [hidden]{display:none!important}
