:root{font-family:Inter,Segoe UI,Arial,sans-serif;color:#1d2939;background:#f4f6f8;font-synthesis:none}*{box-sizing:border-box}body{margin:0}header{background:#173f35;color:#fff;padding:34px max(22px,calc((100vw - 1420px)/2));display:flex;justify-content:space-between;align-items:center;gap:20px}header h1{margin:5px 0;font-size:30px}header p{margin:0;color:#d0e3dc}.eyebrow{font-size:11px;letter-spacing:1.7px;font-weight:800;color:#a8d7c2}.api-link{color:#fff;border:1px solid #8bb7a7;border-radius:8px;padding:11px 14px;text-decoration:none;white-space:nowrap}main{max-width:1420px;margin:25px auto;padding:0 22px}.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin-bottom:20px}.stats article,.panel{background:white;border:1px solid #e4e8ec;border-radius:13px;box-shadow:0 3px 12px #172b3b08}.stats article{padding:18px 20px}.stats span{display:block;color:#667085;font-size:13px}.stats strong{display:block;font-size:27px;margin-top:7px}.panel{padding:22px;margin-bottom:20px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px}.section-heading h2{margin:0;font-size:19px}.section-heading p{margin:6px 0 0;color:#667085;font-size:13px}.form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px}.form-grid label{font-size:12px;font-weight:700;color:#475467;display:flex;flex-direction:column;gap:7px}.form-grid input,.form-grid select,.search{width:100%;min-width:0;border:1px solid #d0d5dd;border-radius:7px;padding:10px 11px;background:white;font:inherit;font-size:13px;color:#101828}.wide{grid-column:1/-1}.form-grid button{border:0;border-radius:8px;background:#237b5b;color:white;font-weight:700;padding:12px 18px;cursor:pointer}.table-wrap{width:100%;overflow:auto}table{border-collapse:collapse;width:100%;font-size:12px;white-space:nowrap}th{text-align:left;color:#667085;background:#f8fafb;font-weight:700}td,th{padding:12px 10px;border-bottom:1px solid #eaecf0}td a{color:#14694e;text-decoration:none}.status{display:inline-block;border-radius:20px;background:#e0f5e8;color:#17663f;padding:4px 8px;font-size:10px;font-weight:800}.status.baixado{background:#f2f4f7;color:#667085}.actions{display:flex;gap:5px}.small{border:0;border-radius:5px;background:#176c4f;color:white;padding:6px 8px;font-size:11px;cursor:pointer}.small.secondary{background:#edf5f1;color:#205744}.small.danger{background:#fff0ee;color:#a12d24}.search{max-width:280px}.empty{text-align:center;color:#667085;padding:24px}.notice{display:none;padding:12px 15px;margin-bottom:15px;border-radius:8px;background:#e3f6ea;color:#17663f}.notice:not(:empty){display:block}.notice.bad{background:#fff0ee;color:#a12d24}footer{text-align:center;color:#667085;font-size:12px;padding:10px 20px 30px}.detail{max-width:700px;margin:40px auto}.detail h1{color:#173f35}.detail dl{display:grid;grid-template-columns:150px 1fr;gap:12px;border-top:1px solid #eaecf0;padding-top:18px}.detail dt{color:#667085}.detail dd{margin:0;font-weight:600}.detail a{color:#176c4f}@media(max-width:900px){.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}header{align-items:flex-start;flex-direction:column}.stats{grid-template-columns:1fr 1fr}}@media(max-width:560px){main{padding:0 12px}.panel{padding:14px}.form-grid,.stats{grid-template-columns:1fr}.section-heading{align-items:flex-start;flex-direction:column}.search{max-width:none;width:100%}.detail dl{grid-template-columns:110px 1fr}}
/* Diálogos de operação: formulários guiados sem navegar para outra página */
dialog.modal{width:min(760px,calc(100vw - 28px));max-width:760px;max-height:90vh;overflow:auto;border:1px solid #dce4e8;border-radius:16px;padding:24px;background:#fff;color:#1d2939;box-shadow:0 24px 80px #0b211b40}
dialog.modal::backdrop{background:rgba(12,27,24,.58);backdrop-filter:blur(2px)}
.modal-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:22px}
.modal-head h2{margin:6px 0;font-size:23px;color:#173f35}
.modal-head p{margin:0;color:#667085;font-size:13px}
.icon-close{background:#f2f4f7;color:#344054;border:0;border-radius:50%;width:34px;height:34px;font-size:24px;line-height:1;cursor:pointer;flex-shrink:0}
.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:8px;padding-top:14px;border-top:1px solid #eaecf0}
.secondary-button{background:#edf2ef!important;color:#234b3e!important}
.mode-choice{display:flex;gap:12px;flex-wrap:wrap}
.choice{display:flex!important;flex-direction:row!important;align-items:center;gap:8px!important;padding:12px 14px;border:1px solid #d0d5dd;border-radius:9px;cursor:pointer}
.choice input{width:auto!important}
.split-fields[hidden]{display:none!important}
.split-fields h3{margin:4px 0;color:#173f35}
.hint{font-size:12px;color:#667085;margin:4px 0 10px}
button{cursor:pointer}
@media(max-width:560px){dialog.modal{padding:17px}.modal-actions{flex-direction:column-reverse}.modal-actions button{width:100%}.mode-choice{flex-direction:column}}

/* Campos fixos e informações de rastreabilidade na transformação */
.form-grid input[readonly]{background:#f2f4f7;color:#475467;border-style:dashed;cursor:not-allowed;font-weight:700}
.field-help{display:block;font-size:11px;color:#667085;font-weight:400;line-height:1.4}
.read-only-product{display:flex;flex-direction:column;gap:5px;padding:12px 14px;background:#f5f8f6;border:1px solid #dce8e1;border-radius:9px}
.read-only-product span{font-size:11px;color:#667085;font-weight:700;text-transform:uppercase;letter-spacing:.5px}
.read-only-product strong{font-size:15px;color:#173f35}
.read-only-product small{font-size:11px;color:#667085}

.bulk-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px 0 18px}
.bulk-toolbar .select-all{display:flex;align-items:center;gap:8px;font-weight:600}
.bulk-toolbar input[type=checkbox],.pallet-select{width:17px;height:17px;accent-color:#247b60}
.bulk-toolbar small{color:#667085}
#palletRows td:first-child,#palletRows th:first-child{width:48px;text-align:center}
@media(max-width:700px){.bulk-toolbar{align-items:flex-start;flex-direction:column}.bulk-toolbar button{margin-top:6px}}

/* Unidade de operação e filtros de estoque */
.operating-panel{display:flex;align-items:center;justify-content:space-between;gap:24px;border-left:4px solid #237b5b}
.operating-copy h2{margin:5px 0;color:#173f35}.operating-copy p{margin:0;color:#667085;font-size:13px}
.operating-select{display:flex;flex-direction:column;gap:7px;min-width:240px;color:#475467;font-size:12px;font-weight:800}
.operating-select select,.stock-filters select{border:1px solid #cbd5d1;border-radius:8px;padding:11px 12px;background:#fff;color:#173f35;font:inherit;font-size:14px;font-weight:700}
.current-branch-note{display:flex;flex-direction:column;gap:5px;background:#f3f8f5;border:1px solid #dce8e1;border-radius:9px;padding:12px 14px;color:#205744}
.current-branch-note small{font-weight:400;color:#667085}
.stock-filters{display:flex;gap:8px;align-items:center}.stock-filters select{font-size:12px;font-weight:600;padding:10px;max-width:190px}
@media(max-width:700px){.operating-panel{align-items:stretch;flex-direction:column}.operating-select{min-width:0}.stock-filters{width:100%;flex-direction:column;align-items:stretch}.stock-filters select,.stock-filters .search{max-width:none;width:100%}}
