/* A identidade e a tela de acesso são compartilhadas com o Site ADM. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.table-scroll { position: relative; }
.sidebar-context { margin: 34px 12px; padding-top: 27px; border-top: 1px solid #ffffff12; }
.sidebar-context .eyebrow { color: #9bb28b; font-size: .58rem; letter-spacing: .1em; }
.sidebar-context p { margin: 12px 0 18px; font-size: .87rem; line-height: 1.8; color: #d5dfd4; }
.sidebar-context small { display: block; color: #869a88; font-size: .72rem; line-height: 1.7; }
.sidebar-context-line { display: block; width: 30px; height: 3px; margin: 0 0 18px; background: var(--green); border-radius: 2px; }
.orders-heading { align-items: center; }
.orders-filter-grid { display: grid; grid-template-columns: minmax(95px,.42fr) minmax(280px,1.08fr) minmax(190px,1fr) auto; align-items: end; gap: 15px; }
.orders-filter-grid .date-range { grid-template-columns: minmax(118px,1fr) auto minmax(118px,1fr); }
.orders-filter-grid .date-range span { display: block; }
.orders-filter-grid input:disabled { color: #879080; background: #f2f4ef; cursor: default; }
.filter-hint { margin: 13px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.6; }
.filter-hint.code-active { color: var(--green-dark); }
.inline-feedback { margin: 15px 0 0; }
.orders-results-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 28px 0 16px; }
.orders-results-heading h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1rem; letter-spacing: -.025em; }
.orders-results-heading p { margin: 7px 0 0; font-size: .72rem; color: var(--muted); }
.results-toolbar { display: flex; gap: 8px; }
.orders-table { min-width: 760px; }
.orders-table td:nth-child(6), .items-table td:nth-child(6), .occurrences-table td:nth-child(6) { min-width: 0; max-width: none; font-weight: 400; }
.orders-table td:nth-child(5) { min-width: 210px; max-width: 440px; font-weight: 600; }
.orders-table td:first-child { color: var(--green-dark); font-weight: 800; }
.orders-table td { height: 61px; }
.orders-table tbody tr { cursor: pointer; }
.orders-table tr.is-selected td { background: #edf6e3; box-shadow: inset 0 1px #d3e7c0, inset 0 -1px #d3e7c0; }
.orders-table tr.is-selected td:first-child { box-shadow: inset 4px 0 #5e892e, inset 0 1px #d3e7c0, inset 0 -1px #d3e7c0; }
.orders-table tr:focus-visible { outline-offset: -3px; }
.orders-bottom-line { display: flex; justify-content: space-between; gap: 18px; margin: 14px 3px; color: var(--muted); font-size: .7rem; line-height: 1.6; }
.orders-bottom-line strong { margin-left: 8px; color: var(--ink); font-size: .83rem; }
.order-status { display: inline-flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; padding: 7px 10px; border: 1px solid #0000000f; border-radius: 7px; background: #edf1e8; color: #394c36; font-size: .69rem; font-weight: 800; line-height: 1.35; }
.order-status img { display: block; flex: 0 0 16px; width: 16px; height: 16px; object-fit: contain; }
.order-status .status-color { width: 9px; height: 9px; flex: 0 0 9px; border: 1px solid #0002; border-radius: 50%; }
.results-state { min-height: 260px; align-content: start; padding: 0 12px; }
.results-state .button { margin-top: 20px; }
.state-icon svg { width: 23px; height: 23px; }
.detail-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 27px; }
.back-button { display: inline-flex; align-items: center; gap: 8px; font-size: .79rem; }
.back-button > span { font-size: 1.2rem; }
.readonly-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .67rem; }
.readonly-label svg { width: 14px; height: 14px; }
.detail-heading { align-items: center; margin-bottom: 23px; }
.detail-heading h1 { margin-bottom: 0; }
.detail-heading .order-status { padding: 10px 13px; font-size: .76rem; }
.order-overview { display: grid; grid-template-columns: .55fr .7fr 2.2fr 1.1fr .55fr; gap: 22px; margin: 0 0 24px; padding: 22px 25px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.order-overview > div { min-width: 0; }
.order-overview dt { margin-bottom: 8px; color: var(--muted); font-size: .62rem; font-weight: 800; letter-spacing: .065em; text-transform: uppercase; }
.order-overview dd { margin: 0; font-size: .84rem; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
.order-overview > div:first-child dd { color: var(--green-dark); }
.detail-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 8px 28px #10251a06; }
.detail-tabs { display: flex; gap: 8px; padding: 0 22px; border-bottom: 1px solid var(--line); background: #fbfcf9; overflow-x: auto; }
.detail-tab { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 65px; padding: 0 16px; border: 0; border-bottom: 3px solid transparent; color: var(--muted); background: transparent; font-size: .79rem; font-weight: 750; white-space: nowrap; }
.detail-tab:hover { color: var(--green-dark); background: #f2f7ec; }
.detail-tab.is-active { color: var(--green-dark); border-bottom-color: #719944; }
.tab-count { min-width: 20px; padding: 3px 5px; border-radius: 5px; background: #e9eee3; font-size: .6rem; }
.detail-tab.is-active .tab-count { color: var(--green-dark); background: #e1efd1; }
.data-panel { padding: 28px; }
.description-section + .description-section { margin-top: 24px; }
.description-section h2 { margin: 0 0 10px; color: #50644b; font-size: .69rem; letter-spacing: .06em; font-weight: 800; text-transform: uppercase; }
.readonly-text { min-height: 108px; padding: 16px 18px; border: 1px solid #e5eadd; border-radius: 9px; color: #33453a; background: #f7f9f4; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .81rem; line-height: 1.8; }
.readonly-text.is-empty { color: #86917d; font-style: italic; }
.panel-intro { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 25px 28px 23px; }
.panel-intro h2 { margin: 0 0 7px; font-size: .92rem; letter-spacing: -.02em; }
.panel-intro p { margin: 0; color: var(--muted); font-size: .73rem; line-height: 1.6; }
.items-total { display: grid; flex: 0 0 auto; gap: 5px; text-align: right; }
.items-total span { color: var(--muted); font-size: .65rem; }
.items-total strong { color: var(--green-dark); font-size: 1.2rem; letter-spacing: -.035em; }
.items-table { min-width: 1030px; }
.items-table td:nth-child(4) { min-width: 210px; font-weight: 600; }
.panel-empty { margin: 0; padding: 42px 24px; color: var(--muted); text-align: center; font-size: .8rem; }
.occurrence-compose { margin: 0 28px 24px; padding: 19px; border: 1px solid #d8e5c9; border-radius: 10px; background: #f4f9ed; }
.compose-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.compose-heading label { font-size: .73rem; font-weight: 750; color: #3e572e; }
.compose-heading span { font-size: .65rem; color: #738369; }
.compose-row { display: flex; gap: 12px; }
.compose-row input { width: 100%; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid #d2dfc5; border-radius: 7px; color: var(--ink); background: white; font-size: .81rem; }
.compose-row .button { flex: 0 0 auto; }
.compose-row input:focus { outline: 0; border-color: #82a85e; box-shadow: 0 0 0 3px #b9f46722; }
.occurrences-table { min-width: 760px; }
.occurrences-table td { vertical-align: top; font-size: .73rem; line-height: 1.65; }
.occurrences-table td:nth-child(5) { min-width: 260px; width: 100%; overflow-wrap: anywhere; }
.occurrences-table td:nth-child(1), .occurrences-table td:nth-child(2), .occurrences-table td:nth-child(3), .occurrences-table td:nth-child(4) { white-space: nowrap; }
.occurrences-table tr.is-important td { color: #383800; background: #FFFF6F; }
.occurrences-table .is-wrong .occurrence-content { text-decoration: line-through; color: #747d72; }
.occurrence-open { min-height: 30px; padding: 4px 8px; border: 1px solid #a1b58c; border-radius: 6px; color: #33482a; background: #ffffffa6; font-size: .68rem; font-weight: 700; }
.occurrence-open:hover { background: white; border-color: #678447; }
.occurrence-flags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.occurrence-flag { font-size: .58rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.occurrence-legend { display: flex; flex-wrap: wrap; gap: 18px; padding: 18px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .66rem; }
.occurrence-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.occurrence-legend small { margin-left: auto; font-size: .66rem; }
.important-swatch { width: 11px; height: 11px; border: 1px solid #c8c852; border-radius: 3px; background: #FFFF6F; }
.occurrence-dialog { width: min(660px,calc(100% - 32px)); max-height: calc(100dvh - 48px); margin: auto; padding: 28px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: white; box-shadow: 0 26px 90px #06120b50; }
.occurrence-dialog::backdrop { background: #07160db3; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.dialog-heading h2 { margin: 10px 0 0; font-size: 1.5rem; letter-spacing: -.04em; }
.dialog-close { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: #f7f9f4; font-size: 1.3rem; }
.dialog-meta { margin: 16px 0; color: var(--muted); font-size: .73rem; line-height: 1.7; }
.dialog-text { min-height: 112px; padding: 18px; border: 1px solid var(--line); border-radius: 9px; background: #f7f9f4; font-size: .88rem; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.dialog-text.is-important { color: #383800; background: #FFFF6F; border-color: #e4e455; }
.dialog-text.is-wrong { color: var(--muted); text-decoration: line-through; }
.dialog-note { color: var(--muted); font-size: .73rem; line-height: 1.7; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 23px; }
.dialog-actions .button { font-size: .76rem; }
.button-danger { color: #963a2d; background: #fbeeea; border-color: #edd0c8; }
.button-danger:hover:not(:disabled) { background: #f7dfd8; }
@media (max-width: 1280px) {
  .orders-filter-grid { grid-template-columns: minmax(110px,.6fr) minmax(290px,1.4fr) auto; }
  .orders-filter-grid > div:nth-child(3) { grid-column: 1/3; }
  .orders-filter-grid > button { grid-column: 3; grid-row: 2; }
  .order-overview { gap: 17px; grid-template-columns: .55fr .75fr 1.7fr 1fr; }
  .order-overview > div:last-child { display: none; }
}
@media (max-width: 760px) {
  .orders-heading .date-card { display: none; }
  .orders-filter-grid { grid-template-columns: 1fr; gap: 16px; }
  .orders-filter-grid > div:nth-child(3), .orders-filter-grid > button { grid-column: auto; grid-row: auto; }
  .orders-filter-grid .date-range { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); }
  .orders-results-heading { align-items: flex-start; flex-direction: column; }
  .results-toolbar { width: 100%; }
  .results-toolbar .button { flex: 1; }
  .orders-bottom-line { flex-direction: column; gap: 7px; }
  .detail-topbar .readonly-label { display: none; }
  .detail-heading { flex-wrap: wrap; gap: 14px; }
  .order-overview { grid-template-columns: 1fr 1fr; padding: 20px; gap: 21px 16px; }
  .order-overview .overview-client { grid-column: 1/-1; }
  .order-overview > div:last-child { display: block; }
  .detail-tabs { padding: 0 6px; gap: 0; }
  .detail-tab { min-height: 58px; padding: 0 12px; font-size: .72rem; gap: 5px; }
  .data-panel { padding: 20px; }
  .readonly-text { padding: 14px; font-size: .77rem; }
  .panel-intro { padding: 21px 20px; align-items: flex-start; }
  .panel-intro p { max-width: 240px; }
  #panel-occurrences .panel-intro { flex-direction: column; gap: 13px; }
  .occurrence-compose { margin: 0 16px 20px; padding: 15px; }
  .compose-row { flex-direction: column; gap: 10px; }
  .compose-heading { flex-wrap: wrap; gap: 5px; }
  .compose-row input { font-size: 16px; }
  .occurrence-legend { padding: 17px; gap: 12px; }
  .occurrence-legend small { width: 100%; margin-left: 0; }
  .occurrence-dialog { padding: 22px; }
  .dialog-actions .button { flex-grow: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 430px) {
  .detail-tabs { gap: 0; padding-inline: 0; }
  .detail-tab { flex: 1 1 0; min-width: 0; padding-inline: 7px; gap: 4px; font-size: .67rem; line-height: 1.4; white-space: normal; }
  .detail-tab .tab-count { flex-shrink: 0; min-width: 18px; }
}
