.order-history{margin:24px 0;padding:20px;border:1px solid #9bb6ac;border-radius:16px}.order-history-filters{display:flex;flex-wrap:wrap;gap:12px;align-items:end}.order-history-filters label{flex:1;min-width:150px}.order-history-filters input{width:100%;box-sizing:border-box}.order-history-card{padding:15px;border-bottom:1px solid #9bb6ac}.order-history-card h3{margin:0 0 6px}.order-history-card p{font-size:13px;margin:5px 0}.order-history-pager{display:flex;gap:12px;margin-top:16px}.order-history-detail{padding:20px 0;overflow:auto}.order-history-detail table{border-collapse:collapse;width:100%;font-size:13px}.order-history-detail td,.order-history-detail th{padding:10px;border-bottom:1px solid #9bb6ac;text-align:left}.visit-upload{border:1px solid #b8d0c3;border-radius:14px;padding:16px;margin:14px 0}.visit-upload label{display:block;margin:12px 0}.visit-upload input,.visit-upload textarea{max-width:100%;box-sizing:border-box}.visit-upload textarea{width:100%;min-height:90px}.visit-upload button{margin-right:8px}.visit-annotations p{white-space:pre-wrap}.order-history-card button{margin-top:8px}
.trilha-ui .history-desk{padding:0;border:0;margin:0;background:transparent}.history-desk>h2{margin-top:0}.history-periods{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.history-periods button{font-size:13px;min-height:40px;padding:8px 12px}.history-periods button[aria-pressed=true]{background:#004d43;color:#fff}.history-dirty{font-size:13px;color:#845500;background:#fff0cb;padding:10px 14px;border-radius:10px}.history-context,.history-message{font-size:13px;color:#52756b}.history-workbench{display:grid;grid-template-columns:minmax(240px,.85fr) minmax(0,1.25fr);gap:20px;align-items:start}.history-list-pane{min-width:0}.history-desk .order-history-card{border:1px solid #c8d9cd;border-radius:15px;padding:14px;background:#fffdf8;margin-bottom:10px;overflow-wrap:anywhere}.history-card-top,.history-card-bottom{display:flex;justify-content:space-between;align-items:center;gap:10px}.history-card-top{font-size:12px;margin-bottom:9px;color:#52756b}.history-desk .order-history-card h3{font-size:16px}.history-card-bottom{margin-top:10px}.history-card-bottom strong{font-size:18px}.history-desk .order-history-card button{margin:0;font-size:13px;min-height:42px}.history-status{padding:4px 9px;border-radius:20px;font-size:11px;font-weight:650;background:#e8efe4;color:#004d43}.history-status[data-status=incorreto],.history-status[data-status=cancelado]{background:#ffebe6;color:#a5361e}.history-status[data-status=pendente],.history-status[data-status=rascunho]{background:#fff0cb;color:#795000}.history-desk .order-history-card:has(button[aria-expanded=true]){border-color:#006b5b;box-shadow:inset 3px 0 #006b5b;background:#edf5ea}.history-desk .order-history-pager{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;font-size:12px}.history-desk .order-history-pager button{font-size:12px;padding:8px;min-height:42px}.history-desk .order-history-detail{min-width:0;margin:0;padding:20px;border:1px solid #c8d9cd;border-radius:18px;background:#fffdf8;overflow:visible;position:sticky;top:100px;scroll-margin-top:100px}.history-detail-brand{display:block;font-size:12px;color:#52756b;margin-top:16px}.history-desk .order-history-detail h3{font-size:19px;overflow-wrap:anywhere}.history-detail-info{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}.history-detail-info>div{background:#e8efe4;border-radius:12px;padding:12px;overflow-wrap:anywhere}.history-detail-info span{display:block;font-size:11px;color:#52756b}.history-detail-info strong{display:block;font-size:14px;margin-top:6px}.history-table-wrap{max-width:100%;overflow:auto;margin-top:20px;border-radius:10px}.history-table-wrap table{min-width:420px}.history-table-wrap caption{text-align:left;font-weight:650;padding-bottom:10px}.history-notes{white-space:pre-wrap;overflow-wrap:anywhere}.history-event{padding:12px 0 12px 14px;border-left:3px solid #c8d9cd;margin:12px 0;font-size:13px}.history-event p{margin:5px 0;overflow-wrap:anywhere}.history-desk .history-placeholder{text-align:center;padding:50px 20px;color:#52756b}.history-placeholder-icon{font-size:40px}.history-empty{text-align:center;padding:24px;border:1px dashed #9bb6ac;border-radius:16px}.history-empty h3{font-size:17px}.history-empty p{font-size:13px}.history-desk .history-back{font-size:13px}.history-desk [hidden]{display:none!important}.trilha-ui .history-periods button::before,.trilha-ui .order-history-pager button::before{content:none}
@media(max-width:900px){.history-workbench{grid-template-columns:1fr}.history-desk .order-history-detail{position:static;scroll-margin-top:20px;padding:16px}.history-desk:not(.has-selection) .order-history-detail{display:none}.history-desk.has-selection .history-list-pane,.history-desk.has-selection>.order-history-filters,.history-desk.has-selection>.history-periods,.history-desk.has-selection>.history-dirty{display:none}.history-detail-info{grid-template-columns:1fr 1fr}.history-detail-info>div:last-child{grid-column:1/-1}.history-detail-info>div:last-child strong{font-size:21px}.history-desk .order-history-filters label{flex-basis:42%;min-width:120px}.history-desk .order-history-filters label:has(input[type=search]){flex-basis:100%}}
@media(prefers-reduced-motion:no-preference){.history-desk .order-history-card{transition:background .16s,border-color .16s}.history-desk.has-selection .order-history-detail{animation:history-open .2s ease-out}@keyframes history-open{from{opacity:.5;transform:translateY(5px)}to{opacity:1;transform:none}}}

.history-desk .order-history-filters select{width:100%;min-width:0;box-sizing:border-box}.history-reset{--action-icon:url("assets/ui-close.svg");font-size:13px}.history-correction{background:#fff1e9;border:1px solid #dfb4a2;border-left:4px solid #b34822;border-radius:12px;padding:14px;margin:18px 0;color:#79351e}.history-correction h4{margin:0 0 8px;font-size:16px}.history-correction p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px}
@media(max-width:600px){.history-desk .order-history-filters>button{width:100%}}
.history-detail-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:16px 0}
.history-detail-actions :is(button,.action-link){margin:0;font-size:13px;min-height:44px}
.history-item-filters{display:flex;align-items:end;flex-wrap:wrap;gap:10px;margin-top:24px}
.history-item-filters label{flex:1;min-width:140px;font-size:13px}
.history-item-filters input{min-width:0;width:100%;font-size:14px}
.history-item-filters button{font-size:13px;min-height:44px}
.history-item-count,.history-items-empty{font-size:13px;color:#52756b;overflow-wrap:anywhere}
.history-item-value{overflow-wrap:anywhere}
@media(max-width:600px){
 .history-detail-actions :is(button,.action-link){width:100%;justify-content:center}
 .history-table-wrap{overflow:visible;border-radius:0;margin-top:12px}
 .history-table-wrap table{display:block;min-width:0;width:100%}
 .history-table-wrap caption{display:block;font-size:14px}
 .history-table-wrap thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .history-table-wrap tbody{display:grid;gap:12px}
 .history-table-wrap tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px;border:1px solid #c8d9cd;border-radius:12px;background:#f0f5ec}
 .history-table-wrap tbody td{display:block;min-width:0;border:0;padding:0;font-size:14px}
 .history-table-wrap tbody td::before{content:attr(data-label);display:block;font-size:11px;color:#52756b;margin-bottom:4px}
 .history-table-wrap tbody td:first-child{grid-column:1/-1;font-weight:600;font-size:15px}
 .history-table-wrap tbody td:first-child::before{content:none}
 .history-table-wrap tbody td:last-child{grid-column:1/-1;padding-top:10px;border-top:1px solid #c8d9cd;font-weight:600;font-size:17px}
}
