/* Identidade visual do portal Escala em Dia (v77): mesma paleta, tipografia e componentes. */
:root{color-scheme:light;--ink:#142842;--muted:#506478;--blue:#174bb3;--blue-dark:#103c99;--navy:#102743;--line:#dce5ef;--paper:#fff;--bg:#f1f5fa;--soft:#f7faff;--green:#176048;--green-bg:#e1f5ec;--orange:#895113;--orange-bg:#fff7e6;--red:#9a2639;--red-bg:#fff1f3;--gold:#ffd28f;font:16px/1.5 'Segoe UI',system-ui,-apple-system,sans-serif}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink)}
a{color:var(--blue)}
[hidden]{display:none!important}
button,input,select{font:inherit;color:inherit}
button{cursor:pointer;background:#fff;border:1px solid #c8d6e7;border-radius:.65rem;padding:.55rem .95rem;font-weight:650;min-height:42px}
button:hover{background:#edf3ff;border-color:#8ca8db}
button:disabled{opacity:.55;cursor:not-allowed}
button.primary,.button.primary{background:var(--blue);color:#fff;border-color:var(--blue)}
button.primary:hover,.button.primary:hover{background:var(--blue-dark)}
button.small{min-height:34px;padding:.3rem .7rem;font-size:.9rem}
button.ghost{background:#234a77;border-color:#94b6de;color:#fff}
button.ghost:hover{background:#315f91}
button.ghost-dark{background:transparent}
button.link{border:0;background:none;padding:0;min-height:0;color:var(--blue);text-decoration:underline;font-weight:650}
:focus-visible{outline:3px solid #3375ed;outline-offset:2px}
.button{display:inline-flex;align-items:center;gap:.45rem;min-height:42px;padding:.52rem .95rem;border:1px solid #c8d6e7;border-radius:.65rem;background:#fff;color:#173970;font-weight:680;text-decoration:none}
.button:hover{background:#eaf1ff}
.wrap{width:min(1240px,calc(100% - 2.5rem));margin-inline:auto}

/* Cabeçalho */
.masthead{background:var(--navy);color:#fff}
.top{min-height:70px;display:flex;align-items:center;justify-content:space-between;gap:1rem}
.brand-logo{display:block;width:clamp(146px,26vw,190px);height:auto}
.top-right{display:flex;align-items:center;gap:.8rem;flex-wrap:wrap;justify-content:flex-end}
.user-name{font-size:.92rem;color:#e4efff}
.ia-chip{font-size:.78rem;font-weight:700;padding:.2rem .6rem;border-radius:1rem;background:#234a77;color:#cfe2ff;border:1px solid #4d74a6}
.ia-chip.off{background:#5a2a1e;color:#ffd9cc;border-color:#a3563f}

/* Faixa de abertura */
.hero{margin:1.5rem 0;display:grid;grid-template-columns:1.25fr 1fr;align-items:center;gap:2rem;background:linear-gradient(112deg,#132e54,#194782);color:#fff;border-radius:1.35rem;padding:clamp(1.3rem,3.5vw,2.6rem)}
.hero h1{font-size:clamp(2.2rem,4.8vw,3.9rem);line-height:1;letter-spacing:-.05em;margin:.3rem 0 .8rem}
.hero p{margin:0;max-width:38rem;color:#e4efff}
.eyebrow{font-size:.84rem;color:var(--gold);letter-spacing:.075em;text-transform:uppercase;font-weight:700}
.hero-steps{list-style:none;margin:0;padding:0;display:grid;gap:.6rem}
.hero-steps li{display:grid;grid-template-columns:2.4rem 1fr;grid-template-rows:auto auto;column-gap:.8rem;align-items:center;background:#ffffff14;border:1px solid #ffffff26;border-radius:.9rem;padding:.65rem .9rem}
.hero-steps strong{grid-row:span 2;display:grid;place-items:center;width:2.4rem;height:2.4rem;border-radius:.7rem;background:var(--gold);color:var(--navy);font-size:1.2rem}
.hero-steps span{font-weight:700}
.hero-steps small{color:#c9dbf5}

/* Painéis */
.panel{margin:0 0 1rem;padding:clamp(1rem,2.3vw,1.6rem);border:1px solid var(--line);border-radius:1.1rem;background:#fff;box-shadow:0 5px 16px #1c3a6010}
.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}
.section-head h2{margin:0;letter-spacing:-.03em;font-size:1.45rem}
.section-head p{margin:.2rem 0 0;color:var(--muted);max-width:52rem}
.kicker{margin:0;color:#3a5b82;font-weight:750;font-size:.74rem;letter-spacing:.09em;text-transform:uppercase}
h3{margin:1.4rem 0 .6rem;font-size:1.08rem}
.muted{color:var(--muted);font-size:.88rem}
.login{max-width:640px}

/* Formulários */
.fields{display:grid;gap:.85rem;margin-bottom:1rem}
.fields.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.fields.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.full{grid-column:1/-1}
label{display:grid;gap:.3rem;font-size:.88rem;font-weight:650}
label small{font-weight:400;color:var(--muted)}
input,select{min-width:0;width:100%;min-height:42px;border:1px solid #bdccdf;border-radius:.55rem;background:#fff;padding:.48rem .65rem;font-size:1rem}
select{appearance:none;padding-right:1.8rem;background-image:linear-gradient(45deg,transparent 50%,#4a5c72 50%),linear-gradient(135deg,#4a5c72 50%,transparent 50%);background-position:calc(100% - 14px) 54%,calc(100% - 9px) 54%;background-size:5px 5px;background-repeat:no-repeat}
.actions{display:flex;align-items:center;flex-wrap:wrap;gap:.6rem;margin-top:1rem}
.form-msg{font-size:.9rem;color:var(--red);font-weight:600}
.form-msg.ok{color:var(--green)}

/* Áreas de envio */
.drop{display:grid;justify-items:center;text-align:center;gap:.35rem;padding:1.4rem 1rem;border:2px dashed #a5b8d2;border-radius:1rem;background:var(--soft);transition:background .15s,border-color .15s}
.drop p{margin:0}
.drop small{color:var(--muted)}
.drop.over{background:#e5efff;border-color:var(--blue)}
.drop.filled{border-style:solid;border-color:#7fb79d;background:#f2fbf6}
.drop-icon{display:grid;place-items:center;width:3rem;height:3rem;border-radius:.9rem;background:#eaf2ff;color:#1c4d90}
.drop-icon svg{width:1.6rem;height:1.6rem}
.drop-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem}
.chips{list-style:none;margin:.4rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.35rem;justify-content:center}
.chips li{display:inline-flex;align-items:center;gap:.35rem;padding:.2rem .55rem;border-radius:1rem;background:#fff;border:1px solid #c6d7eb;font-size:.82rem;max-width:100%;overflow-wrap:anywhere}
.chips button{min-height:0;padding:0 .2rem;border:0;background:none;color:var(--red);font-weight:800;line-height:1}

/* Layout principal */
.layout{display:grid;grid-template-columns:300px minmax(0,1fr);gap:1rem;align-items:start}
.side{position:sticky;top:1rem;padding:1rem}
.side-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:.6rem}
.side-head h2{margin:0;font-size:1.15rem}
.req-list{list-style:none;margin:.7rem 0 0;padding:0;display:grid;gap:.4rem;max-height:70vh;overflow:auto}
.req-list button{width:100%;text-align:left;display:grid;gap:.15rem;padding:.6rem .7rem;border-radius:.7rem;border-color:var(--line);font-weight:500}
.req-list button.active{border-color:var(--blue);background:#edf5ff;box-shadow:inset 3px 0 0 var(--blue)}
.req-list strong{font-size:.92rem;overflow-wrap:anywhere}
.req-list small{color:var(--muted);font-size:.78rem}
.req-list .empty{color:var(--muted);font-size:.9rem;padding:.4rem}
.empty-state{text-align:center;padding:2.5rem 1rem}
.empty-state p{color:var(--muted)}

/* Cabeçalho da solicitação e progresso */
.req-title{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem}
.req-title h2{margin:.1rem 0;font-size:1.4rem;overflow-wrap:anywhere}
.req-title p{margin:0}
.badge{display:inline-block;white-space:nowrap;padding:.28rem .75rem;border-radius:1rem;font-size:.84rem;font-weight:750;background:#edf2f8;color:#405873}
.badge.ok{background:var(--green-bg);color:var(--green)}
.badge.warn{background:var(--orange-bg);color:var(--orange)}
.badge.err{background:var(--red-bg);color:var(--red)}
.badge.run{background:#e5efff;color:var(--blue)}
.progress{list-style:none;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:.35rem;margin:1rem 0 .4rem;padding:0;counter-reset:p}
.progress li{position:relative;padding-top:.75rem;font-size:.78rem;color:var(--muted);line-height:1.25}
.progress li::before{content:"";position:absolute;top:0;left:0;right:0;height:.35rem;border-radius:1rem;background:#e2e9f2}
.progress li.done::before{background:#5f9c83}
.progress li.now{color:var(--ink);font-weight:700}
.progress li.now::before{background:var(--blue)}
.progress li.now.run::before{background:linear-gradient(90deg,var(--blue) 0 40%,#9dbbf0 40% 60%,var(--blue) 60%);background-size:200% 100%;animation:andar 1.2s linear infinite}
.progress li.now.err::before{background:#b03449}
.progress li.now.warn::before{background:#c7852a}
@keyframes andar{to{background-position:-200% 0}}
@media (prefers-reduced-motion:reduce){.progress li.now.run::before{animation:none}}
.status-strip{margin:.8rem 0 0;padding:.7rem .85rem;border-radius:.6rem;background:#eef2f7;border-left:4px solid #718398}
.status-strip:empty{display:none}
.status-strip.err{background:var(--red-bg);border-color:#b03449;color:#772334}
.status-strip.warn{background:var(--orange-bg);border-color:#c7852a;color:#6e4917}
.status-strip.ok{background:var(--green-bg);border-color:#338365;color:#135942}

/* Downloads e listas */
.downloads{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,15rem),1fr));gap:.6rem}
.file{display:flex;align-items:center;gap:.7rem;padding:.6rem .75rem;border:1px solid #c6d7eb;border-radius:.78rem;background:#fff;color:#153963;text-decoration:none;font-weight:650;min-height:56px}
.file:hover{background:#eef5ff;border-color:#87a6d0}
.file-icon{display:grid;place-items:center;flex:0 0 2.2rem;height:2.2rem;border-radius:.56rem;background:#eaf2ff;color:#1c4d90;font-size:.68rem;font-weight:800}
.file-icon.zip{background:#fff2d5;color:#774900}
.file-icon.xlsx,.file-icon.csv{background:#e6f4ed;color:#1d6847}
.file-icon.docx{background:#ece9ff;color:#41348a}
.file span{display:grid;overflow-wrap:anywhere;font-size:.9rem}
.file small{color:var(--muted);font-weight:500;font-size:.76rem}
.notes{margin:.8rem 0 0;padding-left:1.1rem;color:var(--muted);font-size:.88rem}
.notes li{margin:.25rem 0}
.issues{list-style:none;padding:0;margin:.4rem 0 0;display:grid;gap:.45rem}
.issues li{padding:.6rem .8rem;border-left:4px solid #849fbf;background:#f3f6fb;border-radius:.55rem;overflow-wrap:anywhere}
.issues li.bloqueante{border-color:#b03449;background:var(--red-bg)}
.issues li.condicionante{border-color:#c7852a;background:var(--orange-bg)}
.issues li.ok{border-color:#338365;background:var(--green-bg)}
.issues small{display:block;color:var(--muted);margin-top:.15rem}
.issues b{font-size:.74rem;text-transform:uppercase;letter-spacing:.05em}

/* Resultado */
.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.65rem;margin-bottom:1rem}
.metric{background:#f0f5fc;padding:.8rem .95rem;border-radius:.8rem;display:grid;gap:.1rem}
.metric strong{font-size:1.35rem;line-height:1.2;letter-spacing:-.02em}
.metric span{font-size:.82rem;color:var(--muted)}
.metric.good{background:var(--green-bg)}
.metric.good strong{color:var(--green)}
.metric.bad{background:var(--red-bg)}
.metric.bad strong{color:var(--red)}
.table-scroll{overflow:auto;border:1px solid var(--line);border-radius:.7rem;margin-top:.6rem}
table{width:100%;border-collapse:collapse;text-align:left}
th,td{padding:.5rem .65rem;border-bottom:1px solid var(--line);vertical-align:top;font-size:.9rem}
thead th{background:#eaf1fa;font-size:.84rem}
tr:last-child td{border-bottom:0}
.ranking tr.rec td{background:#f0faf5}
.tag{display:inline-block;padding:.1rem .5rem;border-radius:.9rem;font-size:.76rem;font-weight:750;background:#edf2f8;color:#405873}
.tag.ok{background:var(--green-bg);color:var(--green)}
.tag.err{background:var(--red-bg);color:var(--red)}
.tag.warn{background:#fff2d5;color:#774900}
.release{border-top:1px solid var(--line);padding-top:1rem;margin-top:1.4rem}
details.settings summary{cursor:pointer;font-weight:650}
details.settings{margin-top:1rem}
.timeline{list-style:none;padding:0;margin:.8rem 0;display:grid;gap:.3rem;font-size:.86rem}
.timeline li{display:grid;grid-template-columns:9.5rem 1fr;gap:.6rem;color:var(--muted)}
.timeline li span:last-child{color:var(--ink)}
footer{color:var(--muted);padding:1rem 0 2rem;font-size:.86rem}

@media (max-width:980px){.layout{grid-template-columns:1fr}.side{position:static}.req-list{max-height:none}.hero{grid-template-columns:1fr}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:720px){.wrap{width:calc(100% - 1rem)}.fields.two,.fields.three,.drop-grid{grid-template-columns:1fr}.progress{grid-template-columns:repeat(3,minmax(0,1fr));row-gap:.7rem}.section-head{flex-direction:column}.req-title{flex-direction:column}.timeline li{grid-template-columns:1fr}}

.button.google{gap:.7rem;padding:.65rem 1.1rem;font-size:1rem;border-color:#bdccdf;color:#1f2d3d}
.button.google svg{width:1.25rem;height:1.25rem}
#login-form{margin-top:1.2rem;border-top:1px solid var(--line);padding-top:1rem}
