/* Central de etiquetas ROTA99 + DSL — v1.1.0
   Cores dos manuais de marca: ROTA99 (azul, coral, marinho) e DSL Log (laranja, vermelho, marinho).
   Fontes locais: Poppins Bold (título e números, tipografia do manual DSL) e DM Sans (textos). */
@font-face{font-family:'Poppins';font-style:normal;font-weight:700;font-display:swap;src:url(./fonts/Poppins-Bold.ttf) format('truetype')}
@font-face{font-family:'DM Sans';font-style:normal;font-weight:400;font-display:swap;src:url(./fonts/DMSans-Regular.ttf) format('truetype')}
@font-face{font-family:'DM Sans';font-style:normal;font-weight:500;font-display:swap;src:url(./fonts/DMSans-Medium.ttf) format('truetype')}
@font-face{font-family:'DM Sans';font-style:normal;font-weight:700;font-display:swap;src:url(./fonts/DMSans-Bold.ttf) format('truetype')}

:root{
 --ink:#232A4D;--ink-2:#5B6386;--ink-3:#8A91AD;
 --bg:#F4F5FA;--surface:#fff;--line:#E3E6F0;--soft:#EEF0F8;
 --blue:#4F67C0;--coral:#FF5541;--coral-d:#E8432F;--orange:#E05D23;--navy:#283963;
 --warn-bg:#FFF5E6;--warn:#8A4B00;--err-bg:#FFEDEB;--err:#B8261A;--ok:#1C7C54;
 --r:16px;--r-s:10px;--shadow:0 1px 2px rgba(35,42,77,.05),0 8px 24px rgba(35,42,77,.06);
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:400 15px/1.5 'DM Sans',system-ui,-apple-system,'Segoe UI',Arial,sans-serif;-webkit-font-smoothing:antialiased}
body::before{content:"";display:block;height:4px;background:linear-gradient(90deg,var(--blue),var(--coral) 55%,var(--orange))}
button,input,select{font:inherit;color:inherit}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.muted{color:var(--ink-3);font-size:12.5px}

/* Topo */
.top{max-width:1180px;margin:0 auto;padding:20px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.brands{display:flex;align-items:center;gap:20px}
.brands img{display:block;height:40px;width:auto}
.brands .logo-dsl{height:46px}
.brands .sep{width:1px;height:34px;background:var(--line)}
.local{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;color:var(--ink-2);background:var(--surface);border:1px solid var(--line);padding:7px 14px;border-radius:999px}
.local svg{width:15px;height:15px;fill:none;stroke:var(--ok);stroke-width:2;stroke-linecap:round}

main{max-width:1180px;margin:0 auto;padding:0 24px 40px}
.hero{padding:18px 0 22px}
.hero h1{margin:0;font-family:Poppins,'DM Sans',sans-serif;font-size:34px;line-height:1.15;font-weight:700;letter-spacing:-.01em}
.hero p{margin:6px 0 0;color:var(--ink-2)}

.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow)}
.step{display:flex;align-items:center;gap:9px;font-size:13px;font-weight:500;color:var(--ink-2);margin-bottom:12px}
.step i{font-style:normal;font-family:Poppins,'DM Sans',sans-serif;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:var(--ink);color:#fff;font-size:12px;font-weight:700}

/* Passos 1 e 2 */
.setup{display:grid;grid-template-columns:minmax(260px,.8fr) 1.2fr;gap:28px;padding:24px}
.field{display:flex;flex-direction:column;min-width:0}
.segmented{display:grid;gap:10px;margin-bottom:12px}
.segmented label{position:relative;cursor:pointer}
.segmented input{position:absolute;opacity:0;pointer-events:none}
.segmented span{display:flex;flex-direction:column;padding:14px 16px 14px 46px;border:1.5px solid var(--line);border-radius:var(--r-s);transition:border-color .15s,background .15s}
.segmented span::before{content:"";position:absolute;left:16px;top:50%;width:18px;height:18px;margin-top:-9px;border-radius:50%;border:2px solid #C5CADB;background:#fff;transition:.15s}
.segmented b{font-weight:500}
.segmented small{color:var(--ink-3);font-size:12.5px}
.segmented label:hover span{border-color:#C9CEE0}
.segmented input:checked+span{border-color:var(--blue);background:#F4F6FD}
.segmented input:checked+span::before{border:6px solid var(--blue)}
.segmented input:focus-visible+span{outline:3px solid rgba(79,103,192,.35);outline-offset:2px}
.segmented input:disabled+span{opacity:.6;cursor:wait}

.drop{flex:1;min-height:170px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:6px;padding:24px;border:2px dashed #CBD1E3;border-radius:var(--r-s);background:#FAFBFE;cursor:pointer;transition:border-color .15s,background .15s}
.drop:hover,.drop.drag{border-color:var(--coral);background:#FFF7F6}
.drop input{position:absolute;width:1px;height:1px;opacity:0}
.drop svg{width:40px;height:40px;padding:8px;border-radius:12px;background:#FFE9E6;fill:none;stroke:var(--coral);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;margin-bottom:6px}
.drop strong{font-weight:500}
.drop u{color:var(--coral-d);text-underline-offset:3px}
.drop em{font-style:normal;font-size:12.5px;color:var(--ink-3)}
.drop:has(input:focus-visible){outline:3px solid rgba(255,85,65,.35);outline-offset:2px}
.drop:has(input:disabled){opacity:.6;cursor:wait}

/* Avisos gerais */
.notice{white-space:pre-line;margin:16px 0 0;padding:12px 16px;border-radius:var(--r-s);background:var(--warn-bg);color:var(--warn);font-size:13.5px}
.notice.error{background:var(--err-bg);color:var(--err)}
.notice[hidden]{display:none}

/* Passo 3 */
.work{margin-top:16px;overflow:hidden}
.workhead{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;padding:22px 24px 18px;flex-wrap:wrap}
.workhead .step{margin-bottom:4px}
.workhead h2{margin:0;font-size:19px;font-weight:500}
.stats{display:flex;gap:8px}
.stats div{min-width:104px;padding:9px 14px;border-radius:var(--r-s);background:var(--soft)}
.stats b{display:block;font-family:Poppins,'DM Sans',sans-serif;font-size:24px;line-height:1.2;font-weight:700}
.stats span{font-size:12px;color:var(--ink-2)}
.stats .accent{background:var(--ink)}
.stats .accent b{color:#FF8272}.stats .accent span{color:#C9CEE3}

.tablewrap{overflow-x:auto;border-top:1px solid var(--line)}
table{width:100%;border-collapse:collapse;font-size:14px}
th{position:sticky;top:0;background:#FAFBFD;text-align:left;font-size:12px;font-weight:500;color:var(--ink-3);padding:10px 14px;border-bottom:1px solid var(--line);white-space:nowrap}
td{padding:14px;border-bottom:1px solid var(--line);vertical-align:top}
tbody tr:last-child td{border-bottom:0}
tbody tr:not(.empty):hover{background:#FBFBFE}
td small{display:block;color:var(--ink-3);font-size:12px}
td strong{font-weight:500}
.checkcol,td:first-child{width:44px}
input[type=checkbox]{width:17px;height:17px;accent-color:var(--blue);cursor:pointer}
.origin{min-width:180px;max-width:280px}
.origin small{overflow-wrap:anywhere}
.empty td{padding:40px 16px;text-align:center;color:var(--ink-3)}
.brandtag{display:inline-block;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:700;letter-spacing:.01em;white-space:nowrap}
.brandtag.ROTA99{background:#EBEEFA;color:var(--blue)}
.brandtag.DSL{background:#FDEEE6;color:var(--orange)}
.brandtag.none{background:var(--err-bg);color:var(--err)}
.rowissue{margin-top:8px;padding:8px 10px;border-radius:8px;font-size:12.5px;line-height:1.45;background:var(--warn-bg);color:var(--warn)}
.rowissue.error{background:var(--err-bg);color:var(--err)}
.changed{color:var(--err)!important}
.mirrorchoice{display:flex;gap:12px;align-items:center;min-width:250px}
.mirrorchoice select{max-width:280px;padding:7px 10px;border:1px solid #CBD1E3;border-radius:8px;background:#fff}
.mirrorchoice small{margin-top:3px}
.thumb{padding:0;border:1px solid var(--line);border-radius:6px;background:#fff;flex-shrink:0;overflow:hidden;cursor:zoom-in}
.thumb img{width:44px;height:66px;object-fit:contain;display:block;background:var(--soft)}
.airport-check{display:flex;align-items:center;gap:6px;margin-top:6px;font-size:12.5px;color:var(--warn)}

.actionbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 24px;border-top:1px solid var(--line);background:#FAFBFD;flex-wrap:wrap}
.meta{display:flex;flex-direction:column;font-size:12.5px;color:var(--ink-3)}
.meta b{color:var(--ink);font-weight:500;font-size:13.5px}
.actions{display:flex;gap:10px}
button{cursor:pointer;border-radius:var(--r-s);padding:12px 20px;font-weight:500;font-size:14.5px;transition:background .15s,border-color .15s,box-shadow .15s}
.primary{background:var(--coral);color:#fff;border:0;box-shadow:0 6px 16px rgba(255,85,65,.28)}
.primary:hover:not(:disabled){background:var(--coral-d)}
.primary:disabled{background:#C9CEDF;box-shadow:none;cursor:not-allowed}
.ghost{background:#fff;border:1px solid #CBD1E3}
.ghost:hover:not(:disabled){border-color:var(--ink-3)}
button:disabled{cursor:not-allowed}
.result{padding:0 24px 18px;display:flex;justify-content:space-between;gap:16px;align-items:flex-start;font-size:13.5px}
.result:has(#status:empty):has(#openPdf[hidden]){display:none}
#status{padding-top:14px}
#status.error{color:var(--err)}
#status ul{margin:6px 0 0;padding-left:18px;max-height:220px;overflow:auto}
#status li{margin:2px 0}
.result a{margin-top:14px;color:var(--coral-d);font-weight:700;white-space:nowrap;text-decoration:none}

.files{margin-top:16px;padding:18px 24px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r)}
.files h2{margin:0 0 8px;font-size:14px;font-weight:500}
.fileitem{font-size:13px;color:var(--ink-2)}
.fileitem b{font-weight:500;color:var(--ink)}
footer{max-width:1180px;margin:0 auto;padding:8px 24px 28px;display:flex;justify-content:space-between;font-size:12px;color:var(--ink-3)}

dialog{border:0;border-radius:var(--r);padding:20px;max-width:92vw;max-height:92vh;box-shadow:0 24px 80px rgba(20,25,50,.35)}
dialog::backdrop{background:rgba(20,26,50,.6)}
.dialoghead{display:flex;align-items:center;gap:20px;justify-content:space-between;margin-bottom:14px}
.dialoghead h2{font-size:15px;font-weight:500;margin:0;max-width:320px;overflow-wrap:anywhere}
.dialoghead button{padding:8px 14px}
#previewImage{max-height:70vh;max-width:100%;width:340px;aspect-ratio:2/3;object-fit:contain;display:block;margin:auto;background:var(--soft);border-radius:6px}

:focus-visible{outline:3px solid rgba(79,103,192,.4);outline-offset:2px}

@media (max-width:860px){
 .setup{grid-template-columns:1fr;gap:22px;padding:20px}
 .hero h1{font-size:28px}
 .workhead{align-items:flex-start;padding:18px 16px}
 .stats{width:100%}.stats div{flex:1;min-width:0}
 .actionbar{padding:14px 16px}.actions{width:100%;flex-direction:column-reverse}.actions button{width:100%}
 .result{padding:0 16px 16px;flex-direction:column}
}
@media (max-width:520px){
 .top{padding:16px}.brands{gap:14px}.brands img{height:30px}.brands .logo-dsl{height:34px}.brands .sep{height:26px}
 main{padding:0 16px 32px}.hero{padding:10px 0 16px}
 .drop{min-height:140px}
 footer{padding:8px 16px 24px}
}

/* ===== Tema escolhido (v1.3.0): Versão 4 — Duas marcas lado a lado ===== */
body{background:#F5F6FA}
body::before{display:none}
.top{max-width:none;padding:0;gap:0;background:linear-gradient(90deg,#EAEEFB 0 50%,#FDEEE6 50%)}
.brands{max-width:1180px;margin:0 auto;width:100%;padding:18px 24px;display:grid;grid-template-columns:1fr auto 1fr;justify-items:center}
.brands .sep{visibility:hidden}
.brands img{height:46px}.brands .logo-dsl{height:54px}
.top{flex-direction:column}.local{margin:14px 0 -6px;align-self:center;position:relative;top:0}
.hero{padding:34px 0 22px;text-align:center}.hero h1{font-size:36px}
.hero h1{display:inline-block;background:linear-gradient(90deg,#4F67C0,#FF5541 60%,#E05D23);-webkit-background-clip:text;background-clip:text;color:transparent}
.step i{background:#4F67C0}
.setup .field:last-child .step i{background:#E05D23}
.drop{border-color:#F2C1A8;background:#FFFAF7}.drop svg{background:#FDEEE6;stroke:#E05D23}.drop u{color:#E05D23}
.stats div:nth-child(1){background:#EAEEFB}.stats div:nth-child(1) b{color:#4F67C0}
.stats div:nth-child(2){background:#FFECE9}.stats div:nth-child(2) b{color:#FF5541}
.stats .accent{background:#E05D23}.stats .accent b{color:#fff}.stats .accent span{color:#FFE3D6}
.primary{background:linear-gradient(90deg,#4F67C0,#FF5541 55%,#E05D23);box-shadow:0 8px 20px rgba(255,85,65,.25)}
@media(max-width:520px){.brands{padding:14px 12px}.brands img{height:28px}.brands .logo-dsl{height:34px}.hero h1{font-size:28px}}

/* Crédito do autor */
.credit{margin:0 auto;padding:4px 16px 34px;text-align:center;font-family:Poppins,'DM Sans',sans-serif;font-weight:700;font-size:16px;letter-spacing:.12em;text-transform:uppercase}
.credit{background:linear-gradient(90deg,#4F67C0,#FF5541 55%,#E05D23);-webkit-background-clip:text;background-clip:text;color:transparent;width:fit-content}
@media(max-width:520px){.credit{font-size:12px;letter-spacing:.1em}}
