:root{font-family:Inter,Arial,sans-serif;color:#122a4e;background:#f5f8fb;font-size:15px}*{box-sizing:border-box}body{margin:0}header{height:76px;background:#0c2848;color:white;display:flex;align-items:center;gap:24px;padding:10px 4%;font-weight:600}.brand{background:white;border-radius:6px;padding:5px 10px;display:flex;align-items:center}.brand img{width:92px;height:40px;object-fit:contain}header #account{margin-left:auto;display:flex;align-items:center;gap:12px}main{max-width:1540px;margin:auto;padding:38px 4% 80px}h1{font-size:32px;margin:6px 0 10px}h2{font-size:20px;margin:0}p{color:#5d6e80;line-height:1.5}.eyebrow,.label{font-size:11px;font-weight:800;letter-spacing:.1em;color:#087e8b}.card,dialog{background:white;border:1px solid #dbe5eb;border-radius:16px;box-shadow:0 10px 30px #19354c0a}.login{max-width:420px;padding:28px;margin:5vh auto}label{display:block;font-weight:700;margin:16px 0 5px}input,select,textarea{font:inherit;color:#152b45;background:#fff;border:1px solid #c9d6df;border-radius:8px;padding:11px;width:100%}textarea{min-height:92px;resize:vertical}button{font:inherit;font-weight:700;cursor:pointer;border:0;border-radius:8px;background:#087c88;color:white;padding:11px 16px}button:disabled{opacity:.55;cursor:wait}.secondary{background:#e9eff3;color:#23405d}.outline{background:#fff;color:#25516b;border:1px solid #bdd0dc}.danger{background:#fff1f0;color:#a72d26}.ok{background:#edf8f1;color:#167646}.page-heading,.sectionbar{display:flex;align-items:center;justify-content:space-between;gap:16px}.page-heading p{margin-bottom:20px}.toolbar{display:flex;gap:12px;margin:18px 0 26px}.toolbar input{max-width:480px}.toolbar select{max-width:220px}.summary{display:flex;gap:8px;flex-wrap:wrap}.pill,.badge{border-radius:100px;padding:7px 12px;background:#e9f0f4;font-size:12px;font-weight:700}.badge.approved{background:#e4f6ea;color:#167646}.badge.revision{background:#fff1e8;color:#b64a25}.badge.pending{background:#edf1f5;color:#53687e}.label{margin:22px 0 10px}.navrow{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.navrow button{background:#fff;color:#23405d;border:1px solid #ccdbe4;min-height:48px}.navrow button.active{background:#087c88;color:white;border-color:#087c88}.sectionbar{margin:25px 0 12px}.products{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.product{border:1px solid #d8e3e9;background:white;border-radius:10px;min-height:115px;padding:14px;display:flex;flex-direction:column;gap:9px}.product-name{font-size:14px;font-weight:700;color:#112b50}.product-price{font-weight:700}.product-bottom{display:flex;align-items:center;gap:6px;margin-top:auto}.product-bottom button{padding:6px 10px}.product-bottom .open{margin-left:auto;padding:6px 8px}.product.empty{visibility:hidden}.error{color:#b02d26}.notice{background:#e7f4f3;color:#075e66;padding:12px;border-radius:8px;margin:12px 0}.notice.error{background:#fff0ed;color:#a32c22}.icon{background:none;color:#435a70;font-size:26px;padding:2px 8px}dialog{border:0;width:min(860px,94vw);max-height:90vh;padding:24px;overflow:auto}dialog::backdrop{background:#0d2238aa}.dialog-head{display:flex;justify-content:space-between;align-items:start}.details-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}.details-grid label{font-size:13px}.original{background:#f2f6f8;border-radius:8px;padding:12px;color:#51677a;font-size:13px;white-space:pre-wrap}.actions{display:flex;gap:9px;justify-content:flex-end;margin-top:20px}.table-wrap{overflow-x:auto;background:white;border:1px solid #dae4ea;border-radius:10px}table{border-collapse:collapse;width:100%;font-size:13px}th,td{padding:12px;border-bottom:1px solid #e7edf1;text-align:left;vertical-align:top}th{background:#edf3f6;color:#24435e}.diff{color:#8a4b19}.filters{display:flex;gap:8px}.small{font-size:12px;color:#64788b}.nav-controls{display:flex;gap:6px}.nav-controls button{padding:6px 10px}.muted{color:#738599}@media(max-width:1000px){.products,.navrow{grid-template-columns:repeat(3,1fr)}.product.empty{display:none}}@media(max-width:620px){header{height:auto;flex-wrap:wrap}.page-heading{display:block}.products,.navrow{grid-template-columns:repeat(2,1fr)}.toolbar,.details-grid{display:block}.toolbar input,.toolbar select{max-width:none;margin-bottom:8px}.actions{flex-wrap:wrap}main{padding:24px 4%}}
[hidden]{display:none!important}
header{height:auto;display:block;padding:0;background:#0c2848}
.header-main{min-height:72px;display:flex;align-items:center;gap:20px;padding:9px 4%}
.header-tools{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:10px 4%;background:#eaf1f5;color:#122a4e}
.header-tools .toolbar{margin:0;flex:1;justify-content:flex-end}.header-tools .toolbar input{max-width:400px}.header-tools .toolbar select{max-width:200px}
main{padding-top:15px}.page-heading h1{font-size:26px;margin:3px 0}.page-heading p{margin:3px 0 8px}.navigation-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.navigation-heading .label{margin:0}.display-choice{display:flex;align-items:center;gap:8px;margin:0;font-size:12px;color:#51677a}.display-choice select{width:auto;padding:7px;font-size:12px}.label{margin:12px 0 6px}.nav-container{display:flex;align-items:stretch;gap:8px}.nav-container .navrow{flex:1;min-width:0}.nav-arrow{padding:6px 12px;font-size:23px;line-height:1}.nav-arrow:disabled{cursor:default}.sectionbar{margin:15px 0 10px}.complement-fields{display:contents}
@media(max-width:1000px){.header-tools{flex-wrap:wrap}.header-tools .toolbar{justify-content:flex-start}.navrow{grid-template-columns:repeat(5,minmax(0,1fr))}.navrow button{font-size:12px;overflow-wrap:anywhere}}
@media(max-width:620px){.header-main{flex-wrap:wrap}.header-tools .toolbar{display:flex;width:100%}.header-tools .toolbar input,.header-tools .toolbar select{margin:0;min-width:0}.header-tools .toolbar select{width:42%}.navigation-heading{align-items:flex-start;flex-direction:column}.nav-container{gap:3px}.nav-arrow{padding:4px 6px}.navrow{gap:3px;grid-template-columns:repeat(5,minmax(0,1fr))}.navrow button{padding:5px 2px;font-size:10px}.details-grid{display:block}main{padding-top:14px}}

/* Indicadores e filtros na própria faixa do cabeçalho. */
.header-main{gap:16px}.header-main>span{white-space:nowrap}.header-tools{flex:1;min-width:0;gap:16px;padding:0;background:transparent;color:#122a4e}.header-tools .summary{flex-shrink:0}.header-tools .toolbar{min-width:0}.header-main #account{margin-left:0;white-space:nowrap}@media(max-width:1500px){.header-main{flex-wrap:wrap}.header-tools{order:3;flex-basis:100%}.header-main #account{margin-left:auto}}@media(max-width:620px){.header-tools{gap:8px}.header-tools .toolbar{flex-basis:100%}}

/* Cabeçalho compacto e controlos de navegação. */
.header-tools .summary{gap:5px}.header-tools .pill,.header-tools .badge{padding:5px 9px;font-size:11px}.header-tools .toolbar{flex:0 1 auto;gap:8px}.header-tools .toolbar input{width:155px;max-width:100%;transition:width .2s ease}.header-tools .toolbar input:focus{width:300px}.state-filter-wrap{position:relative;display:inline-flex;flex:0 0 42px;width:42px;height:42px;align-items:center;justify-content:center;background:#fff;border:1px solid #c9d6df;border-radius:8px;color:#122a4e}.state-filter-wrap svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}.header-tools .toolbar .state-filter-wrap select{position:absolute;inset:0;width:100%;height:100%;padding:0;opacity:0;cursor:pointer}.state-filter-wrap:focus-within{outline:2px solid #76b7cf;outline-offset:2px}.page-heading>div:first-child{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap}.page-heading h1{font-size:22px}.page-heading p{margin:0}.navigation-heading{justify-content:flex-end}.navigation-heading .display-choice{margin:0}.navigation-heading+.label{margin-top:2px}@media(max-width:620px){.header-tools .toolbar input,.header-tools .toolbar input:focus{width:auto;flex:1}.page-heading>div:first-child{gap:2px}.page-heading p{flex-basis:100%}}
.state-filter-wrap.active{background:#d8f1f3;border-color:#087c88;color:#075f69}

/* Cabeçalho: identificação e estados em coluna, pesquisa centrada. */
.header-main{display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;column-gap:16px;align-items:center}.header-info{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:0}.header-info>span{white-space:nowrap}.header-info .summary{gap:5px}.header-info .pill,.header-info .badge{font-size:10px;padding:4px 8px;white-space:nowrap}.header-tools{justify-content:center;min-width:0}.header-tools .toolbar{justify-content:center}.header-main #account{margin:0}.heading-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px}.page-heading{align-items:center}.navigation-heading{flex-shrink:0}.page-heading h1{white-space:nowrap}.page-heading>div:first-child{gap:14px}@media(max-width:1500px){.header-main{display:grid}.header-tools{order:initial;flex-basis:auto}}@media(max-width:1000px){.header-main{grid-template-columns:auto 1fr auto}.header-tools{grid-column:1/-1;grid-row:2}.header-info .summary{flex-wrap:wrap}.page-heading{align-items:flex-start;flex-wrap:wrap}.heading-actions{margin-left:auto}}@media(max-width:620px){.header-main{gap:8px}.header-info>span{white-space:normal;font-size:12px}.header-info .pill,.header-info .badge{font-size:10px;padding:3px 6px}.header-tools .toolbar{width:100%}.page-heading>div:first-child{gap:3px}.heading-actions{width:100%;justify-content:flex-end}}

/* Legibilidade e detalhes compactos. */
.header-info .pill{color:#122a4e}.header-tools .toolbar{width:min(100%,520px);flex:1}.header-tools .toolbar input{width:100%;max-width:none;flex:1;min-width:0}.header-tools .toolbar input:focus{width:100%}.state-filter-wrap{width:36px;height:36px;flex-basis:36px}.state-filter-wrap svg{width:16px;height:16px}.dialog-head{display:grid;grid-template-columns:minmax(130px,1fr) minmax(250px,2fr) auto;align-items:start;gap:16px}.dialog-head .original{padding:8px 10px;line-height:1.25}.dialog-head .original strong{font-size:12px}#detail-content>p:first-child{margin:6px 0}#detail-approve{background:#168347;color:#fff}#detail-approve:hover{background:#116c3a}@media(max-width:620px){.dialog-head{grid-template-columns:1fr auto;gap:8px}.dialog-head .original{grid-column:1/-1;grid-row:2}.dialog-head .icon{grid-column:2;grid-row:1}}
.header-tools .toolbar{width:min(100%,460px)}.view-switch{display:flex;align-items:center;gap:4px;white-space:nowrap;font-size:12px}.view-button{display:flex;align-items:center;justify-content:center;width:34px;height:34px;padding:7px;background:transparent;color:#fff;border:1px solid #7391a7}.view-button.active{background:#fff;color:#0c2848}.view-button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7}.detail-state{margin:8px 0 0!important}.detail-state .badge{display:inline-block}.cards-view{grid-template-columns:repeat(3,minmax(0,1fr))}.missing-entry{border:1px solid #dbe5eb;border-radius:10px;margin:12px 0;padding:12px}.missing-entry .badge{margin-left:10px}.missing-entry p{margin:6px 0;font-size:13px}.heading-actions #missing-product,.heading-actions #missing-list{white-space:nowrap;font-size:12px;padding:9px 10px}@media(max-width:1000px){.cards-view{grid-template-columns:repeat(2,minmax(0,1fr))}.heading-actions{flex-wrap:wrap}}@media(max-width:620px){.cards-view{grid-template-columns:1fr}.view-switch span{display:none}}

.list-view{display:flex;flex-direction:column;gap:6px}.list-view .product{min-height:0;display:grid;grid-template-columns:minmax(160px,1fr) 110px 140px auto;align-items:center;padding:8px 12px}.list-view .product.empty{display:none}.list-view .product-bottom{margin:0}.list-view .product-bottom .open{margin-left:0}#detail-form .actions{position:sticky;bottom:-24px;background:white;padding:12px 0 18px;z-index:2;box-shadow:0 -8px 12px -14px #19354c}.details-grid label{margin-top:9px}.details-grid textarea{min-height:68px}@media(max-width:620px){.list-view .product{grid-template-columns:1fr auto}.list-view .product-bottom{grid-column:1/-1}}
#history-area,#intervention-area{margin-top:18px;border-top:1px solid #dbe5eb;padding-top:12px}#history-area h3,#intervention-area h3{font-size:15px;margin:0 0 8px}.history-list{padding-left:20px;margin:8px 0}.history-list li{margin-bottom:12px;font-size:13px;line-height:1.4}#intervention-area textarea{min-height:60px}

.changes-summary{background:#fff3df;border:1px solid #e9bd78;border-radius:8px;padding:10px 14px;margin:10px 0;color:#633c09}.changes-summary ul{margin:6px 0;padding-left:20px}.changes-summary p{margin:4px 0}.changed-field input,.changed-field select,.changed-field textarea{border:2px solid #cb7f13;background:#fff9ed}.changed-label{display:inline-block;margin-left:8px;color:#9a5a00;font-size:11px;font-weight:800}.optius-actions{display:inline-flex;align-items:center;gap:4px;margin-right:6px}.optius-actions button{padding:5px 8px}#history-area{background:#f5f8fb;padding:12px;border-radius:8px;margin:10px 0}#history-area h3{margin:0 0 8px}

/* Notificações temporárias, sem alterar o layout. */
#message.notice{position:fixed;right:24px;bottom:24px;z-index:1000;max-width:min(420px,calc(100vw - 48px));margin:0;padding:14px 18px;border:1px solid #acd8d2;border-radius:10px;box-shadow:0 8px 25px #102d4840}#message.notice.error{border-color:#e8ada3}@media(max-width:620px){#message.notice{right:12px;bottom:12px;max-width:calc(100vw - 24px)}}

/* Filtros por família e alinhamento da revisão em tabela. */
.category-label{display:flex;align-items:center;gap:10px}.category-all{background:#eaf1f5;color:#23405d;border:1px solid #bdd0dc;padding:4px 10px;font-size:11px}.category-all.active{background:#087c88;color:white;border-color:#087c88}.review-table-mode .sectionbar,.review-table-mode .products{display:none}#review-list table{min-width:1000px}#review-list td:first-child{min-width:160px}#review-list td:first-child .badge{display:inline-block;white-space:nowrap}#review-list td:last-child{min-width:240px;white-space:nowrap}#review-list td:last-child .optius-actions{vertical-align:middle}#review-list td:last-child .outline{vertical-align:middle}
