/* RASTREANDO — Design system único */
:root{
  --ink:#111214; --ink-2:#202226; --yellow:#f5bd00; --yellow-bright:#ffc400;
  --canvas:#f1f2f3; --surface:#ffffff; --line:#e1e4e8; --line-strong:#cbd1d8;
  --muted:#687384; --text:#17202b; --soft:#f7f8fa; --button-gray:#eeeeef;
  --button-gray-hover:#e1e4e8; --radius:9px;
  --font:Arial,Helvetica,sans-serif;
  --shadow:0 4px 16px rgba(17,24,39,.07);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:var(--font);color:var(--text);background:var(--canvas)}
body{font-size:13px}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid rgba(245,189,0,.65);outline-offset:2px}
.app-shell{display:flex;min-height:100vh;width:100%;overflow:hidden}
.sidebar{position:fixed;inset:0 auto 0 0;z-index:30;display:flex;flex-direction:column;width:200px;min-width:200px;background:var(--ink);color:#e8e8e8;border-right:3px solid var(--yellow)}
.brand{height:74px;min-height:74px;display:flex;align-items:center;gap:11px;padding:0 15px;border-bottom:1px solid #303237}
.brand-mark{display:grid;place-items:center;width:38px;height:38px;background:var(--yellow);color:#111;font-size:22px;font-weight:900}
.brand-copy{display:flex;flex-direction:column;gap:4px;min-width:0}
.brand-copy strong{color:var(--yellow);font-size:15px;line-height:1;font-weight:900;letter-spacing:.35px}
.brand-copy small{color:#92959a;font-size:8px;line-height:1.2;font-weight:800;letter-spacing:.8px}
.sidebar-label{padding:22px 18px 12px;color:#a4a6aa;font-size:9px;font-weight:800;letter-spacing:1px}
.side-nav{display:flex;flex-direction:column;gap:5px}
.nav-item{position:relative;display:flex;align-items:center;gap:11px;width:100%;height:49px;padding:0 17px;border:0;border-left:3px solid transparent;background:transparent;color:#d7d8da;text-align:left;font-size:12px;font-weight:700}
.nav-item:hover{background:#1a1b1f;color:#fff}
.nav-item.is-active{border-left-color:var(--yellow);background:rgba(245,189,0,.14);color:var(--yellow)}
.nav-icon{display:grid;place-items:center;width:26px;height:26px;flex:0 0 26px;border-radius:6px;background:#292b30;color:var(--yellow);font-size:15px;font-weight:900}
.nav-item.is-active .nav-icon{background:var(--yellow);color:#111}
.sidebar-bottom{margin-top:auto;padding:17px 10px 13px;border-top:1px solid #303237}
.system-status{display:flex;align-items:center;gap:9px;height:28px;padding:0 4px;color:#aeb0b4;font-size:10px;font-weight:700}
.status-dot{width:9px;height:9px;border-radius:50%;background:var(--yellow);box-shadow:0 0 0 4px rgba(245,189,0,.12)}
.logout-button{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;height:39px;margin-top:10px;border:0;border-radius:7px;background:var(--yellow);color:#111;font-size:12px;font-weight:900}
.logout-button:hover{background:#ffd34a}
.main-area{width:calc(100% - 200px);min-height:100vh;margin-left:200px;padding:14px;background:var(--canvas)}
.page-view{display:none;width:100%;min-width:0}
.page-view.is-visible{display:block}
.page-titlebar{display:flex;align-items:center;width:100%;height:74px;min-height:74px;padding:0 22px;border-bottom:3px solid var(--yellow);border-radius:9px 9px 0 0;background:var(--ink);box-shadow:var(--shadow)}
.page-titlebar h1{margin:0;color:var(--yellow-bright);font-family:var(--font);font-size:16px;font-weight:900;line-height:1;text-transform:uppercase;letter-spacing:0}
.page-content{width:100%;min-width:0;padding:20px;background:var(--surface);border-radius:0 0 9px 9px;box-shadow:var(--shadow)}
.module-card{width:100%;min-width:0;padding:0;margin:0;background:var(--surface);border:0;border-radius:0;box-shadow:none}
.module-toolbar-top{display:flex;align-items:center;justify-content:flex-start;min-height:36px;margin:0 0 19px;padding:0}
.button{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:29px;min-height:29px;padding:0 11px;border:1px solid transparent;border-radius:6px;font-family:var(--font);font-size:11px;font-weight:700;line-height:1;white-space:nowrap;transition:background-color .12s ease,border-color .12s ease,color .12s ease}
.button-primary{height:36px;min-height:36px;padding:0 17px;border:0;background:var(--yellow);color:#111;font-size:11px;font-weight:850}
.button-primary:hover{background:#ffd34a}
.button-outline{border-color:#d8dce2;background:#fff;color:#303846}
.button-outline:hover,.button-outline[aria-expanded="true"]{border-color:var(--yellow);background:#fffaf0;color:#111}
.toolbar{position:relative;z-index:5;display:flex;align-items:center;gap:9px;width:100%;min-height:30px;margin:0 0 9px}
.toolbar-left{display:flex;align-items:center;gap:9px;flex-wrap:wrap;min-width:0}
.toolbar-select{height:29px;min-height:29px;min-width:156px;padding:0 10px;border:1px solid #d8dce2;border-radius:6px;background:#fff;color:#303846;font-size:11px;font-weight:700}
.toolbar-select:hover{border-color:var(--yellow)}
.toolbar-search{flex:1 1 260px;min-width:190px;width:100%;height:29px;padding:0 10px;border:1px solid #d8dce2;border-radius:6px;background:#fff;color:var(--text);font-size:11px}
.toolbar-search::placeholder{color:#7b8795}
.toolbar-search:focus{border-color:var(--yellow);outline:0;box-shadow:0 0 0 2px rgba(245,189,0,.13)}
.column-control{position:relative;display:inline-flex}
.column-menu{position:absolute;z-index:50;top:calc(100% + 6px);left:0;width:220px;max-height:320px;overflow:auto;padding:10px;border:1px solid var(--line);border-radius:8px;background:#fff;box-shadow:0 12px 30px rgba(17,24,39,.16)}
.column-menu[hidden]{display:none}
.column-menu strong{display:block;margin:2px 4px 8px;font-size:11px;color:#374151}
.column-menu label{display:flex;align-items:center;gap:8px;padding:7px 4px;color:#374151;font-size:11px}
.column-menu input{accent-color:var(--yellow)}
.table-viewport{width:100%;max-width:100%;overflow:auto;overscroll-behavior:contain;border:0;border-radius:0;background:#fff;scrollbar-color:#929292 #f2f2f2;scrollbar-width:auto}
.table-viewport::-webkit-scrollbar{height:12px}
.table-viewport::-webkit-scrollbar-track{background:#f1f1f1;border-radius:8px}
.table-viewport::-webkit-scrollbar-thumb{background:#929292;border:2px solid #f1f1f1;border-radius:8px}
.table-viewport::-webkit-scrollbar-thumb:hover{background:#737373}
.data-table{width:max-content;min-width:100%;border:0;border-collapse:separate;border-spacing:0;table-layout:fixed;background:#fff;font-family:var(--font);font-size:12px}
.data-table th{position:relative;height:37px;padding:0 14px;border:0;border-bottom:2px solid #dfe2e6;background:#f7f8fa;color:#687384;font-size:10px;font-weight:900;letter-spacing:.7px;line-height:1.2;text-align:left;text-transform:uppercase;white-space:nowrap;vertical-align:middle}
.data-table td{height:58px;padding:0 14px;border:0;border-bottom:1px solid #e7e9ec;background:#fff;color:#17202b;font-size:12px;font-weight:400;line-height:1.35;text-align:left;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.data-table tbody tr:hover td{background:#fbfcfd}
.data-table tbody tr:last-child td{border-bottom:1px solid #e7e9ec}
.data-table th[hidden],.data-table td[hidden]{display:none!important}
.data-table th .resize-handle{position:absolute;z-index:2;top:0;right:-4px;width:9px;height:100%;background:linear-gradient(90deg,transparent 3px,#9ca3af 3px,#9ca3af 5px,transparent 5px);cursor:col-resize;touch-action:none;user-select:none}
.data-table th .resize-handle:hover,.data-table th .resize-handle:focus{background:linear-gradient(90deg,transparent 2px,#2563eb 2px,#2563eb 6px,transparent 6px)}
.freight-table{min-width:1580px}
.user-table{min-width:1510px}
.freight-table th:nth-child(1),.freight-table td:nth-child(1){width:238px;min-width:238px}
.freight-table th:nth-child(2),.freight-table td:nth-child(2){width:200px}
.user-table th:nth-child(1),.user-table td:nth-child(1){width:238px;min-width:238px}
.user-table th:nth-child(2),.user-table td:nth-child(2){width:270px}
.user-table th:nth-child(3),.user-table td:nth-child(3){width:120px}
.user-table th:nth-child(4),.user-table td:nth-child(4){width:130px}
.user-table th:nth-child(5),.user-table td:nth-child(5){width:170px}
.user-table th:nth-child(6),.user-table td:nth-child(6){width:140px}
.user-table th:nth-child(7),.user-table td:nth-child(7){width:150px}
.user-table th:nth-child(8),.user-table td:nth-child(8){width:240px}
.user-table th:nth-child(9),.user-table td:nth-child(9){width:170px}
.row-actions{display:flex;align-items:center;justify-content:flex-start;gap:7px;width:100%;min-width:0;white-space:nowrap}
.action-button{display:inline-flex;align-items:center;justify-content:center;gap:5px;height:29px;min-height:29px;padding:0 11px;border:0;border-radius:6px;font-family:var(--font);font-size:11px;font-weight:700;line-height:1;white-space:nowrap;box-shadow:none;transition:background-color .12s ease,color .12s ease}
.action-edit{width:78px;min-width:78px;background:#eeeeef;color:#253142}
.action-edit:hover{background:#e1e4e8;color:#253142}
.action-edit .pencil{font-family:var(--font);font-size:12px;font-weight:400;color:#ff7043}
.action-delete{width:43px;min-width:43px;padding:0;border:0;background:#eceff1;color:#34495e}
.action-delete:hover{background:#e1e5e9;color:#34495e}
.action-delete svg{width:14px;height:14px;display:block;pointer-events:none}
.action-status{width:58px;min-width:58px;background:#fff1bd;color:#111}.action-status:hover{background:#ffe28a}\n.action-event{height:29px;min-width:112px;background:#f0e8ff;color:#7543c8}
.action-event:hover{background:#e7d9ff}
.code-cell{display:flex;flex-direction:column;align-items:flex-start;gap:5px;overflow:visible}
.code-value{font-size:12px;font-weight:800;color:#111827}
.copy-button{height:22px;min-height:22px;padding:0 7px;border:1px solid var(--yellow);border-radius:5px;background:#111;color:var(--yellow);font-size:10px;font-weight:800}
.copy-button:hover{background:#292929}
.status-pill{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border-radius:20px;background:#f2f4f7;color:#4b5563;font-size:10px;font-weight:700}
.status-pill::before{content:"";width:6px;height:6px;border-radius:50%;background:#9ca3af}
.status-pill[data-status="Em trânsito"]::before{background:#8b5cf6}
.status-pill[data-status="Entregue"]::before{background:#16a34a}
.status-pill[data-status="Coletada"]::before{background:#3b82f6}
.empty-row{text-align:center!important;color:#7b8491!important;height:80px!important}
.overview-intro{padding:24px 22px 22px;border:1px solid #e6e8eb;border-bottom:3px solid var(--yellow);border-radius:8px;background:var(--ink);color:#fff}
.eyebrow{color:var(--yellow);font-size:9px;font-weight:900;letter-spacing:1px}
.overview-intro h2{margin:13px 0 8px;font-size:22px;font-weight:800}
.overview-intro p{margin:0;color:#d4d6da;font-size:12px}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:18px}
.stat-card{position:relative;display:flex;flex-direction:column;gap:7px;min-height:105px;padding:17px 18px;border:1px solid #e6e8eb;border-bottom:3px solid var(--yellow);border-radius:9px;background:#fff;box-shadow:0 3px 12px rgba(17,24,39,.05)}
.stat-card strong{font-size:27px;font-weight:800;color:#111}
.stat-card small{font-size:10px;font-weight:800;letter-spacing:.7px;color:#687384}
.stat-icon{position:absolute;top:14px;right:14px;display:grid;place-items:center;width:29px;height:29px;border-radius:8px;background:#fff2c2;color:#111;font-size:16px;font-weight:900}
.overview-panels{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:18px}
.overview-panel{min-height:230px;padding:18px;border:1px solid #e6e8eb;border-radius:9px;background:#fff}
.overview-panel h3{margin:0 0 6px;font-size:12px;font-weight:900;color:#111}
.overview-panel>p{margin:0 0 18px;color:#7b8491;font-size:11px}
.status-summary{display:flex;flex-direction:column;gap:12px;padding:12px 4px}
.status-line{display:grid;grid-template-columns:125px 1fr 24px;align-items:center;gap:10px;font-size:11px}
.status-track{height:8px;border-radius:10px;background:#edf0f3;overflow:hidden}
.status-fill{height:100%;border-radius:10px;background:var(--yellow)}
.activity-list{display:flex;flex-direction:column}
.activity-item{display:flex;justify-content:space-between;gap:12px;padding:11px 0;border-bottom:1px solid #edf0f2;font-size:11px}
.activity-item:last-child{border-bottom:0}
.activity-item strong{font-weight:700}
.activity-item span{color:#7b8491;white-space:nowrap}
.security-card h2{margin:0 0 8px;font-size:16px}
.security-card>p{margin:0 0 20px;color:#6b7280;font-size:12px}
.security-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;max-width:900px}
.security-form label,.form-grid label{display:flex;flex-direction:column;gap:7px;color:#374151;font-size:11px;font-weight:800}
.security-form input,.form-grid input,.form-grid select,.form-grid textarea{width:100%;height:38px;padding:0 11px;border:1px solid #d8dce2;border-radius:6px;background:#fff;color:#17202b;font-size:12px}
.security-form .button,.security-form .form-note{grid-column:1/-1;justify-self:start}
.form-note{margin:0;color:#7b8491;font-size:11px}
.modal-backdrop{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:20px;background:rgba(13,15,18,.58)}
.modal-backdrop[hidden]{display:none}
.modal-dialog{width:min(680px,100%);max-height:min(90vh,900px);overflow:auto;border:1px solid #e4e6e9;border-radius:11px;background:#fff;box-shadow:0 24px 70px rgba(0,0,0,.28)}
.modal-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;min-height:58px;padding:0 18px;border-bottom:2px solid var(--yellow);background:var(--ink);color:var(--yellow)}
.modal-header h2{margin:0;font-size:14px;font-weight:900;text-transform:uppercase}
.icon-close{width:30px;height:30px;border:0;border-radius:6px;background:#292b30;color:#fff;font-size:22px;line-height:1}
.modal-content{padding:20px}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.form-grid label.full{grid-column:1/-1}
.form-grid textarea{height:76px;padding:10px;resize:vertical}
.form-actions{display:flex;justify-content:flex-end;gap:8px;grid-column:1/-1;margin-top:4px}
.button-secondary{height:36px;padding:0 16px;border:1px solid #d8dce2;border-radius:6px;background:#f7f8fa;color:#344054;font-size:11px;font-weight:800}
.button-danger{height:36px;padding:0 16px;border:0;border-radius:6px;background:#b42318;color:#fff;font-size:11px;font-weight:800}
.credentials-panel{padding:16px;border:1px solid #cfe7dc;border-radius:8px;background:#f0faf5}
.credentials-panel h3{margin:0 0 6px;color:#18794e;font-size:14px}
.credentials-panel p{margin:0 0 14px;color:#64748b;font-size:11px}
.credential-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:9px 0;padding:10px;border:1px solid #d9e5e0;border-radius:6px;background:#fff}
.credential-row strong{font-family:ui-monospace,monospace;font-size:14px;letter-spacing:.3px;overflow-wrap:anywhere}
.credential-row button{height:28px;padding:0 10px;border:0;border-radius:5px;background:var(--yellow);color:#111;font-size:10px;font-weight:900}
.confirm-copy{margin:0 0 18px;color:#4b5563;font-size:13px;line-height:1.5}
.toast-region{position:fixed;right:18px;bottom:18px;z-index:150;display:flex;flex-direction:column;gap:8px}
.toast{max-width:360px;padding:12px 15px;border:1px solid #d5d9df;border-left:4px solid var(--yellow);border-radius:7px;background:#fff;color:#26303c;box-shadow:0 8px 24px rgba(0,0,0,.14);font-size:12px;font-weight:700}
.toast.error{border-left-color:#b42318}
@media(max-width:1100px){.sidebar{width:184px;min-width:184px}.main-area{width:calc(100% - 184px);margin-left:184px}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.sidebar{position:relative;width:68px;min-width:68px}.brand{justify-content:center;padding:0}.brand-mark{width:38px;height:38px}.brand-copy,.sidebar-label,.nav-item>span:not(.nav-icon),.system-status span:last-child,.logout-button span:last-child{display:none}.nav-item{justify-content:center;padding:0;border-left-width:3px}.sidebar-bottom{padding:12px 7px}.logout-button{font-size:0}.logout-button span{font-size:18px}.main-area{width:calc(100% - 68px);margin-left:0;padding:9px}.page-titlebar{height:62px;min-height:62px}.page-content{padding:13px}.toolbar{align-items:stretch;flex-direction:column}.toolbar-left{width:100%}.toolbar-search{flex:1 1 auto;width:100%}.stats-grid{gap:8px}.overview-panels{grid-template-columns:1fr}.security-form{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.form-grid label.full,.form-actions{grid-column:1}.module-toolbar-top{margin-bottom:13px}}

/* Autenticação administrativa do Supabase */
[hidden]{display:none!important}
.auth-gate{position:fixed;inset:0;z-index:300;display:grid;place-items:center;padding:22px;background:#f0f1f2}
.auth-card{width:min(420px,100%);padding:28px;border:1px solid #e0e3e7;border-top:4px solid var(--yellow);border-radius:11px;background:#fff;box-shadow:0 18px 50px rgba(17,24,39,.12)}
.auth-brand{display:flex;align-items:center;gap:10px;margin-bottom:26px}
.auth-brand .brand-mark{display:grid;place-items:center;width:42px;height:42px;background:var(--yellow);color:#111;font-size:24px;font-weight:900}
.auth-brand>span:last-child{display:flex;flex-direction:column;gap:3px}
.auth-brand strong{color:#111;font-size:16px;font-weight:900;letter-spacing:.3px}
.auth-brand small{color:#7b8491;font-size:9px;font-weight:800;letter-spacing:.8px}
.auth-card h1{margin:0 0 7px;color:#111;font-size:19px;font-weight:900}
.auth-card>p{margin:0 0 20px;color:#687384;font-size:12px;line-height:1.5}
.auth-card label{display:block;margin:13px 0 6px;color:#374151;font-size:11px;font-weight:800}
.auth-card input{width:100%;height:42px;padding:0 12px;border:1px solid #d8dce2;border-radius:6px;background:#fff;color:#17202b;font:inherit;font-size:12px}
.auth-card input:focus{outline:2px solid rgba(245,189,0,.25);border-color:var(--yellow)}
.auth-submit{width:100%;height:42px;margin-top:20px}
.auth-feedback{min-height:18px;margin:12px 0 0!important;color:#b42318!important;font-size:11px!important}
.auth-feedback.success{color:#18794e!important}
.app-shell[hidden]{display:none!important}

/* VISÃO GERAL — gráfico de pizza e legenda alinhados */
.status-summary{width:100%;min-height:230px;padding:16px 4px 8px;display:flex;align-items:center}
.status-chart-layout{width:100%;min-height:210px;display:grid;grid-template-columns:minmax(180px,260px) minmax(220px,1fr);align-items:center;justify-content:start;gap:34px}
.status-pie{width:190px;height:190px;min-width:190px;min-height:190px;border-radius:50%;position:relative;border:1px solid rgba(17,24,39,.07);box-shadow:inset 0 0 0 1px rgba(255,255,255,.35);justify-self:center}
.status-pie::after{content:"";position:absolute;inset:48px;border-radius:50%;background:#fff;box-shadow:0 1px 5px rgba(16,24,40,.08)}
.status-legend{width:100%;max-width:500px;display:flex;flex-direction:column;gap:0}
.status-legend-item{width:100%;min-height:34px;display:grid;grid-template-columns:12px minmax(130px,1fr) 36px 48px;align-items:center;column-gap:10px;padding:5px 2px;border-bottom:1px solid #edf0f3;color:#17202b;font-size:12px;line-height:1.25}
.status-legend-item:last-of-type{border-bottom:0}
.status-legend-dot{width:10px;height:10px;border-radius:50%;display:block}
.status-legend-label{min-width:0;font-weight:600}
.status-legend-item strong{text-align:right;font-size:12px;font-weight:800;font-variant-numeric:tabular-nums}
.status-legend-item small{text-align:right;color:#697586;font-size:11px;font-variant-numeric:tabular-nums}
.chart-empty{margin:10px 0 0;color:#7b8491;font-size:12px}
.activity-item{min-height:35px;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:7px 0;border-bottom:1px solid #edf0f3}
.activity-item:last-child{border-bottom:0}
.activity-item strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#17202b;font-size:11px;font-weight:700}
.activity-item span{flex:0 0 auto;color:#758096;font-size:10px;font-variant-numeric:tabular-nums}
@media(max-width:1100px){.status-chart-layout{grid-template-columns:190px minmax(190px,1fr);gap:20px}.status-pie{width:160px;height:160px;min-width:160px;min-height:160px}.status-pie::after{inset:41px}}
@media(max-width:760px){.status-summary{padding:10px 0}.status-chart-layout{grid-template-columns:1fr;gap:14px}.status-pie{width:150px;height:150px;min-width:150px;min-height:150px}.status-pie::after{inset:38px}.status-legend{max-width:none}.status-legend-item{grid-template-columns:12px minmax(110px,1fr) 30px 42px}.activity-item{align-items:flex-start;flex-direction:column;gap:3px}}

/* LOGIN — cenário logístico com cartão flutuante */
.auth-gate{isolation:isolate;overflow:hidden;display:grid;place-items:center;padding:32px;background:#071426 url("assets/login-logistica.webp") center/cover no-repeat}
.auth-backdrop-shade{position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,rgba(4,13,27,.15) 0%,rgba(4,13,27,.22) 36%,rgba(4,13,27,.58) 100%),linear-gradient(0deg,rgba(2,10,22,.30),transparent 42%)}
.auth-card{position:relative;z-index:2;width:min(440px,calc(100vw - 34px));padding:30px 32px 22px;border:1px solid rgba(255,255,255,.78);border-top:4px solid var(--yellow);border-radius:17px;background:rgba(255,255,255,.94);backdrop-filter:blur(18px) saturate(135%);-webkit-backdrop-filter:blur(18px) saturate(135%);box-shadow:0 28px 90px rgba(0,0,0,.34),0 0 0 1px rgba(255,255,255,.16),0 0 36px rgba(245,189,0,.12);transform:translateX(17vw);animation:auth-card-float .7s cubic-bezier(.2,.8,.2,1) both}
@keyframes auth-card-float{from{opacity:0;transform:translate(17vw,18px) scale(.975)}to{opacity:1;transform:translate(17vw,0) scale(1)}}
.auth-brand{gap:12px;margin-bottom:22px}
.auth-brand .brand-mark{width:44px;height:44px;border-radius:2px;box-shadow:0 5px 14px rgba(245,189,0,.2)}
.auth-brand strong{font-size:17px;letter-spacing:.45px}
.auth-brand small{font-size:9px;letter-spacing:1px}
.auth-card-kicker{display:inline-flex;align-items:center;margin:0 0 9px;padding:5px 9px;border-radius:4px;background:rgba(245,189,0,.14);color:#8a6500;font-size:9px;font-weight:900;letter-spacing:1.2px}
.auth-card h1{font-size:23px;letter-spacing:-.35px;margin-bottom:8px}
.auth-card>p:not(.auth-feedback){margin-bottom:20px;font-size:12px;line-height:1.6;color:#596579}
.auth-card label{margin:13px 0 6px;font-size:11px;color:#273449}
.auth-input-wrap{position:relative;display:flex;align-items:center}
.auth-input-wrap input{height:45px;padding:0 42px;border:1px solid #d8dee8;border-radius:8px;background:rgba(255,255,255,.94);font-size:12px;transition:border-color .18s,box-shadow .18s}
.auth-input-wrap input:focus{outline:0;border-color:var(--yellow);box-shadow:0 0 0 3px rgba(245,189,0,.16)}
.auth-field-icon{position:absolute;left:14px;z-index:1;color:#7a8493;font-size:16px;line-height:1}
.auth-password-toggle{position:absolute;right:8px;width:30px;height:30px;border:0;border-radius:6px;background:transparent;color:#687384;font-size:16px;cursor:pointer}
.auth-password-toggle:hover{background:#f1f3f6;color:#111}
.auth-submit{height:46px;margin-top:20px;padding:0 17px;border-radius:8px;display:flex;align-items:center;justify-content:center;gap:12px;font-size:12px;font-weight:900;letter-spacing:.35px;box-shadow:0 7px 16px rgba(245,189,0,.23);transition:transform .18s,box-shadow .18s}
.auth-submit:hover{transform:translateY(-1px);box-shadow:0 10px 22px rgba(245,189,0,.3)}
.auth-submit span:last-child{font-size:18px;line-height:1}
.auth-feedback{margin:10px 0 0!important}
.auth-card-foot{display:flex;align-items:center;gap:7px;margin-top:12px;padding-top:12px;border-top:1px solid #e9edf2;color:#7a8493;font-size:8px;font-weight:900;letter-spacing:.8px}
.auth-secure-dot{width:7px;height:7px;border-radius:50%;background:#18a36b;box-shadow:0 0 0 3px rgba(24,163,107,.12)}
.auth-scene-label{position:absolute;top:28px;left:34px;z-index:1;display:flex;align-items:center;gap:11px;color:#fff;font-size:12px;font-weight:900;letter-spacing:1.5px;text-shadow:0 2px 12px rgba(0,0,0,.4)}
.auth-scene-label>span:last-child{display:flex;flex-direction:column;gap:4px}
.auth-scene-label strong{font-size:8px;letter-spacing:1.1px;color:rgba(255,255,255,.72)}
.auth-scene-mark{display:grid;place-items:center;width:34px;height:34px;background:var(--yellow);color:#111;font-size:20px;font-weight:1000;text-shadow:none}
.auth-scene-footer{position:absolute;left:34px;bottom:25px;z-index:1;color:rgba(255,255,255,.72);font-size:9px;font-weight:900;letter-spacing:1.5px;text-shadow:0 2px 10px rgba(0,0,0,.4)}
.auth-scene-footer span{padding:0 7px;color:var(--yellow)}
@media(max-width:1050px){.auth-card{transform:translateX(10vw)}@keyframes auth-card-float{from{opacity:0;transform:translate(10vw,18px) scale(.975)}to{opacity:1;transform:translate(10vw,0) scale(1)}}}
@media(max-width:760px){.auth-gate{padding:18px;background-position:36% center}.auth-backdrop-shade{background:rgba(3,12,25,.48)}.auth-card{transform:none;padding:25px 22px 19px;width:min(420px,100%)}@keyframes auth-card-float{from{opacity:0;transform:translateY(18px) scale(.975)}to{opacity:1;transform:translateY(0) scale(1)}}.auth-scene-label{top:15px;left:17px}.auth-scene-footer{left:17px;bottom:13px;font-size:8px}}
@media(prefers-reduced-motion:reduce){.auth-card{animation:none}}


/* Campo de rastreio com gerador manual de código */
.tracking-code-field{display:flex;align-items:stretch;gap:8px;width:100%;min-width:0}
.tracking-code-field input{flex:1 1 auto;min-width:0}
.button-code-generate{flex:0 0 auto;height:38px;min-height:38px;padding:0 14px;border:1px solid var(--yellow);border-radius:6px;background:var(--yellow);color:#111;font-size:10px;font-weight:850;letter-spacing:.25px;white-space:nowrap}
.button-code-generate:hover{background:#ffd34a}
@media(max-width:520px){.tracking-code-field{flex-wrap:wrap}.tracking-code-field input,.button-code-generate{width:100%;flex-basis:100%}}

.freight-form textarea{min-height:84px;line-height:1.45}
.freight-form .form-actions{padding-top:2px}

.tracking-code-help{display:block;margin-top:7px;color:#667085;font-size:11px;line-height:1.45;font-weight:500}
.tracking-code-help strong{color:#111;font-weight:800}

/* Campos opcionais e padronização de texto no formulário de fretes */
.field-optional{display:block;margin-top:4px;color:#7b8491;font-size:10px;font-weight:700;letter-spacing:.25px;line-height:1.25}
.freight-form input:not([type="time"]):not([type="number"]),.freight-form textarea{text-transform:uppercase}
.freight-form input::placeholder,.freight-form textarea::placeholder{text-transform:uppercase}

/* Encomendas: colunas AÇÕES e CÓDIGO permanecem fixas na rolagem horizontal */
.freight-table{min-width:2928px}
.freight-table th:nth-child(1),.freight-table td:nth-child(1){position:sticky;left:0;z-index:4;background:#fff}
.freight-table th:nth-child(1){z-index:7;background:#f5f6f8}
.freight-table th:nth-child(2),.freight-table td:nth-child(2){position:sticky;left:238px;z-index:4;background:#fff;box-shadow:3px 0 5px rgba(16,24,40,.08)}
.freight-table th:nth-child(2){z-index:7;background:#f5f6f8}
.freight-table tbody td:nth-child(1),.freight-table tbody td:nth-child(2){background:#fff}

/* Seletor discreto dos seis status no modal de movimentação */
.event-status-field{display:flex;flex-direction:column;gap:8px}
.event-status-title{font-size:11px;font-weight:800;color:#344054}







@media(max-width:560px){}

/* Histórico de movimentações: passado (preto), atual (amarelo), futuro (branco). */
.event-history-section{margin-top:4px;padding-top:12px;border-top:1px solid #e7e9ed}
.event-history-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:9px}
.event-history-heading>strong{font-size:11px;font-weight:800;color:#20242b}

.event-history-list{display:grid;gap:6px;max-height:190px;overflow:auto;padding:1px 3px 3px 1px}
.event-history-card{padding:9px 11px;border:1px solid transparent;border-radius:6px}
.event-history-card-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.event-history-card-top strong{font-size:10px;font-weight:800}
.event-history-card-top time{font-size:9px;white-space:nowrap;opacity:.82}
.event-history-card p{margin:5px 0 0;font-size:10px;line-height:1.4}
.event-history-card{background:#fff;color:#344054;border-color:#e1e5eb}
.event-history-empty{padding:12px;border:1px dashed #d8dde5;border-radius:6px;color:#667085;font-size:10px;text-align:center;background:#fafbfc}
.event-history-error{color:#b42318}
@media(max-width:560px){.event-history-card-top{align-items:flex-start;flex-direction:column;gap:3px}}

/* As cores de etapa ficam somente nos seis botões de Status da movimentação. */






/* Data e hora permanecem lado a lado no formulário de movimentação. */
.event-date-time-row{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  min-width:0;
  grid-column:1/-1;
}
.event-date-time-row label{
  display:flex;
  flex-direction:column;
  min-width:0;
}
.event-date-time-row input{
  width:100%;
  min-width:0;
}

/* Ação explícita para aplicar a alteração de etapa; cores não mudam ao clicar no status. */
.event-status-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.event-status-title-row .event-status-title{margin:0}
.event-edit-status-button{height:29px;min-height:29px;padding:0 11px;font-size:9px;letter-spacing:.25px}
.event-edit-status-button.is-applied{background:#fff4c7;border-color:#e4b400;color:#171717}
.event-status-hint{margin:7px 0 0;color:#667085;font-size:9px;line-height:1.35}

/* Os seis seletores de status usam dimensões idênticas, independentemente do texto. */



@media(max-width:420px){
  
}

/* Editor de status recolhível com ação de salvar ao lado. */
.event-status-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.event-edit-status-button,.event-save-status-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:30px;height:30px;padding:0 10px;font-size:9px;font-weight:800;white-space:nowrap}
.event-status-chevron{font-size:12px;line-height:1}


.event-save-status-button:disabled{opacity:.55;cursor:not-allowed;box-shadow:none}
.event-edit-status-button.is-applied{border-color:#e4b900;background:#fff7d6;color:#171717}
@media(max-width:520px){
  .event-status-title-row{align-items:flex-start;flex-direction:column}
  .event-status-actions{width:100%}
}

/* Estrutura do modal: status atual separado do cadastro de movimentação. */
.current-status-editor{
  border:1px solid #e1e5eb;
  border-radius:8px;
  padding:12px;
  background:#fff;
  display:flex;
  flex-direction:column;
  gap:9px;
}
.current-status-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.current-status-information{display:flex;flex-direction:column;gap:4px;min-width:130px}
.current-status-information strong{font-size:12px;font-weight:800;color:#171717}
.current-status-editor .event-status-actions{display:flex;align-items:center;gap:7px}
.current-freight-status-options{margin-top:2px}
.movement-editor-section{
  display:flex;
  flex-direction:column;
  gap:9px;
  padding:12px;
  border:1px solid #e1e5eb;
  border-radius:8px;
  background:#fff;
}
.movement-editor-heading{
  font-size:11px;
  font-weight:800;
  color:#20242b;
  letter-spacing:.35px;
}

.event-date-time-row{grid-template-columns:repeat(2,minmax(0,1fr))}
.event-date-time-row label{min-width:0}
@media(max-width:520px){
  .current-status-row{align-items:flex-start}
  .current-status-editor .event-status-actions{width:100%}
  .event-date-time-row{grid-template-columns:1fr}
}

/* Seletor nativo compacto: abrir opções não expande nem reorganiza o modal. */
.freight-status-select{
  display:block;
  width:164px;
  max-width:100%;
  height:32px;
  min-height:32px;
  box-sizing:border-box;
  padding:0 30px 0 10px;
  border:1px solid #d5dbe4;
  border-radius:6px;
  background-color:#fff;
  color:#263244;
  font:inherit;
  font-size:10px;
  font-weight:700;
  line-height:30px;
  cursor:pointer;
  appearance:auto;
}
.freight-status-select:focus{
  outline:2px solid rgba(245,189,0,.35);
  outline-offset:1px;
  border-color:#e4b400;
}
.freight-status-select-wrap{display:block;width:164px;max-width:100%;margin:0}
.event-status-actions{display:flex;align-items:center;gap:7px;flex-wrap:nowrap}
.event-save-status-button{height:32px;min-height:32px;white-space:nowrap}
.current-status-editor{overflow:visible}
@media(max-width:520px){
  .freight-status-select-wrap,.freight-status-select{width:100%}
  .current-status-editor .event-status-actions{width:100%}
}

/* A seleção do rádio não altera as cores: elas refletem exclusivamente
   o status principal salvo da encomenda (passado, atual e futuro). */





/* Linha única para o rótulo, seletor e botão de salvar do status principal. */
.current-status-editor .event-status-actions{
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:nowrap;
  gap:7px;
  width:100%;
  min-width:0;
}
.freight-status-select-wrap{
  display:flex;
  flex:1 1 auto;
  flex-direction:row;
  align-items:center;
  gap:7px;
  width:auto;
  min-width:0;
  margin:0;
  white-space:nowrap;
}
.freight-status-select-label{
  display:inline-block;
  flex:0 0 auto;
  color:#344054;
  font-size:9px;
  font-weight:700;
  line-height:1;
  white-space:nowrap;
}
.freight-status-select{
  flex:1 1 90px;
  width:auto;
  min-width:90px;
  max-width:164px;
}
.current-status-editor .event-save-status-button{
  flex:0 0 auto;
  width:auto;
  min-width:58px;
  padding:0 10px;
  white-space:nowrap;
}
@media(max-width:520px){
  .current-status-editor .event-status-actions{width:100%}
  .freight-status-select-wrap{width:auto;flex:1 1 auto}
  .freight-status-select{width:auto;min-width:78px}
}

/* Status: rótulo discreto acima; seletor pequeno e SALVAR ao lado. */
.current-status-editor .event-status-actions{
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-start;
  flex-wrap:nowrap;
  gap:8px;
  width:auto;
  min-width:0;
}
.current-status-editor .freight-status-select-wrap{
  display:flex;
  flex:0 0 auto;
  flex-direction:column;
  align-items:flex-start;
  justify-content:flex-end;
  gap:4px;
  width:164px;
  max-width:calc(100% - 70px);
  min-width:0;
  margin:0;
  white-space:normal;
}
.current-status-editor .freight-status-select-label{
  display:block;
  width:auto;
  font-size:9px;
  line-height:12px;
  white-space:nowrap;
}
.current-status-editor .freight-status-select{
  display:block;
  flex:0 0 32px;
  width:164px;
  max-width:100%;
  min-width:0;
  height:32px;
  min-height:32px;
  box-sizing:border-box;
  padding:0 9px;
  line-height:30px;
}
.current-status-editor .event-save-status-button{
  flex:0 0 auto;
  align-self:flex-end;
  height:32px;
  min-height:32px;
  min-width:58px;
  width:auto;
  padding:0 10px;
  margin:0;
  white-space:nowrap;
}
@media(max-width:520px){
  .current-status-editor .event-status-actions{width:auto}
  .current-status-editor .freight-status-select-wrap{width:164px;max-width:calc(100% - 70px);flex:0 1 164px}
  .current-status-editor .freight-status-select{width:100%;min-width:0}
}


/* Estabilidade dos seis botões de movimentação: sem pulos ao selecionar ou passar o mouse. */







/* Altura ampliada e rigorosamente estável para os seis status da movimentação. */









/* Ação de salvar diretamente no cabeçalho de Editar Movimentação. */
.movement-editor-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:30px;
}
.movement-editor-title-row .movement-editor-heading{
  margin:0;
}
.movement-save-button{
  min-height:30px;
  height:30px;
  padding:0 13px;
  font-size:10px;
  line-height:1;
  flex:0 0 auto;
}
.movement-save-button:disabled{
  opacity:.65;
  cursor:wait;
}


/* Botão SALVAR da edição de movimentação abaixo do campo Descrição. */
.movement-save-below-description{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  margin-top:-2px;
}
.movement-save-below-description .movement-save-button{
  min-height:34px;
  height:34px;
  padding:0 18px;
}


/* Dimensões exatas do print: 3 colunas iguais, 44px de altura, sem qualquer salto. */









/* SALVAR da edição de movimentação: mesma dimensão do SALVAR de Status,
   posicionado à esquerda logo abaixo da Descrição. */
.movement-save-below-description{
  display:flex!important;
  justify-content:flex-start!important;
  align-items:center!important;
  width:100%!important;
  margin-top:0!important;
}
.movement-save-below-description .movement-save-button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:58px!important;
  height:32px!important;
  min-height:32px!important;
  padding:0 10px!important;
  margin:0!important;
  font-family:var(--font)!important;
  font-size:9px!important;
  font-weight:800!important;
  line-height:30px!important;
  white-space:nowrap!important;
  box-sizing:border-box!important;
}


/* No formulário de movimentação, o histórico vem abaixo do botão SALVAR
   e ocupa a largura completa, nunca uma coluna lateral. */
#eventForm > .movement-save-below-description,
#eventForm > .event-history-section{
  grid-column:1 / -1!important;
  width:100%!important;
}
#eventForm > .movement-save-below-description{
  justify-content:flex-start!important;
}
#eventForm > .event-history-section{
  display:block!important;
  margin-top:4px!important;
}


/* CONTROLE ÚNICO DOS 6 STATUS — dimensões invariáveis.
   A seleção altera somente as cores; nunca tamanho, borda, sombra ou posição. */
#movementEventOptions.movement-event-options{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-auto-rows:44px!important;
  gap:7px!important;
  align-items:stretch!important;
  justify-items:stretch!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  box-sizing:border-box!important;
}
#movementEventOptions .event-status-option{
  display:block!important;
  position:relative!important;
  width:100%!important;
  min-width:0!important;
  height:44px!important;
  min-height:44px!important;
  max-height:44px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  box-sizing:border-box!important;
  flex:none!important;
  transform:none!important;
  animation:none!important;
  transition:none!important;
}
#movementEventOptions .event-status-option input{
  position:absolute!important;
  inset:auto!important;
  top:0!important;
  left:0!important;
  width:1px!important;
  height:1px!important;
  min-width:1px!important;
  min-height:1px!important;
  margin:0!important;
  padding:0!important;
  opacity:0!important;
  pointer-events:none!important;
}
#movementEventOptions .event-status-option span{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  height:44px!important;
  min-height:44px!important;
  max-height:44px!important;
  margin:0!important;
  padding:4px 6px!important;
  border:1px solid #dfe3e8!important;
  border-radius:6px!important;
  box-sizing:border-box!important;
  background:#fff!important;
  color:#344054!important;
  font-size:10px!important;
  font-weight:700!important;
  line-height:1.1!important;
  text-align:center!important;
  box-shadow:none!important;
  transform:none!important;
  animation:none!important;
  transition:none!important;
}
#movementEventOptions .event-status-option.is-past span{
  background:#111214!important;
  color:#fff!important;
  border-color:#111214!important;
}
#movementEventOptions .event-status-option.is-current span{
  background:#f5bd00!important;
  color:#171717!important;
  border-color:#e0ad00!important;
}
#movementEventOptions .event-status-option.is-future span{
  background:#fff!important;
  color:#344054!important;
  border-color:#dfe3e8!important;
}
#movementEventOptions .event-status-option:hover span,
#movementEventOptions .event-status-option:active span,
#movementEventOptions .event-status-option input:checked + span{
  box-shadow:none!important;
  transform:none!important;
  animation:none!important;
  transition:none!important;
  filter:none!important;
}
#movementEventOptions .event-status-option:focus-within span{
  outline:none!important;
}
#movementEventOptions .event-status-option input:focus-visible + span{
  outline:2px solid #d9a900!important;
  outline-offset:-3px!important;
}
@media(max-width:560px){
  #movementEventOptions.movement-event-options{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}


/* ESTABILIDADE DA JANELA DE EVENTO:
   o histórico reserva sempre o mesmo espaço ao trocar entre status com/sem eventos.
   Assim, a modal não muda de altura/posição e a grade dos seis status não oscila. */
.modal-dialog{
  scrollbar-gutter:stable;
}
.event-history-list{
  height:116px!important;
  min-height:116px!important;
  max-height:116px!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  align-content:start!important;
  box-sizing:border-box!important;
}
.event-history-list[aria-busy="true"]{
  overflow-y:hidden!important;
}


/* Os campos de edição só aparecem depois que o usuário clicar em um dos seis status. */
#eventForm [hidden]{
  display:none!important;
}
#movementEventOptions .event-status-option{
  cursor:pointer;
}


/* Aba Movimentação: somente os seis status e os campos Data, Horário e Descrição. */
.movement-only-form{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:14px;
}
.movement-only-form .movement-editor-section{
  margin:0;
}
.movement-only-form .event-date-time-row{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
  margin:0!important;
}
.movement-only-form>label.full{
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
}
.movement-only-form textarea{
  min-height:88px;
  resize:vertical;
}
.movement-only-form .movement-save-below-description{
  display:flex!important;
  justify-content:flex-start!important;
  margin:0!important;
}
@media(max-width:520px){
  .movement-only-form .event-date-time-row{
    grid-template-columns:1fr!important;
  }
}


/* Movimentação: seis blocos independentes, cada um com Data, Horário,
   Descrição e seu próprio botão Salvar. */
.movement-six-blocks{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:12px;
  max-height:min(72vh,760px);
  overflow-y:auto;
  padding:2px 4px 2px 2px;
}
.movement-status-block{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:9px;
  padding:13px;
  border:1px solid #dce1e8;
  border-radius:8px;
  background:#fff;
  min-width:0;
}
.movement-status-block h3{
  margin:0;
  color:#17191d;
  font-size:12px;
  line-height:1.35;
  font-weight:800;
}
.movement-status-date-time{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.movement-status-date-time label,
.movement-status-description{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
  color:#303744;
  font-size:10px;
  font-weight:700;
}
.movement-status-date-time input,
.movement-status-description textarea{
  width:100%;
  min-width:0;
  box-sizing:border-box;
}
.movement-status-description textarea{
  min-height:64px;
  resize:vertical;
}
.movement-status-save{
  justify-self:start;
  min-width:60px;
  height:32px;
  min-height:32px;
  padding:0 12px;
}
@media(max-width:520px){
  .movement-status-date-time{grid-template-columns:1fr}
  .movement-six-blocks{max-height:70vh}
}


/* Refinamento visual da janela Movimentação — preserva os seis formulários independentes. */
.modal-dialog:has(.movement-six-blocks){
  width:min(940px,calc(100vw - 36px));
  max-height:min(92vh,980px);
  overflow:auto;
  border:1px solid #d9dde4;
  border-radius:14px;
  box-shadow:0 28px 90px rgba(0,0,0,.34);
}
.modal-dialog:has(.movement-six-blocks) .modal-header{
  min-height:64px;
  padding:0 24px;
}
.modal-dialog:has(.movement-six-blocks) .modal-header h2{
  font-size:15px;
  letter-spacing:.045em;
}
.modal-dialog:has(.movement-six-blocks) .modal-content{
  padding:22px;
  background:#f6f7f9;
}
.movement-six-blocks{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:start;
  gap:16px;
  max-height:none;
  overflow:visible;
  padding:0;
}
.movement-status-block{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:13px;
  min-width:0;
  padding:17px;
  border:1px solid #e0e4ea;
  border-radius:11px;
  background:#fff;
  box-shadow:0 3px 12px rgba(16,24,40,.045);
  transition:border-color .16s ease,box-shadow .16s ease;
}
.movement-status-block::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  border-radius:11px 0 0 11px;
  background:#f5bd00;
}
.movement-status-block:focus-within{
  border-color:#efc43b;
  box-shadow:0 0 0 3px rgba(245,189,0,.12),0 5px 16px rgba(16,24,40,.06);
}
.movement-status-title{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  padding-bottom:11px;
  border-bottom:1px solid #edf0f3;
}
.movement-step-number{
  display:grid;
  place-items:center;
  flex:0 0 30px;
  width:30px;
  height:30px;
  border-radius:8px;
  background:#fff3c4;
  color:#171717;
  font-size:11px;
  font-weight:900;
  font-variant-numeric:tabular-nums;
}
.movement-status-title h3{
  flex:1;
  min-width:0;
  margin:0;
  color:#17191d;
  font-size:13px;
  line-height:1.3;
  font-weight:850;
}
.movement-step-caption{
  flex:0 0 auto;
  color:#8a929e;
  font-size:9px;
  font-weight:800;
  letter-spacing:.08em;
}
.movement-status-date-time{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:11px;
}
.movement-status-date-time label,
.movement-status-description{
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0;
  color:#46505e;
  font-size:10px;
  font-weight:800;
}
.movement-status-date-time input,
.movement-status-description textarea{
  width:100%;
  min-width:0;
  box-sizing:border-box;
  border:1px solid #d9dee6;
  border-radius:7px;
  background:#fff;
  color:#182230;
  font-family:inherit;
  font-size:12px;
  font-weight:650;
  transition:border-color .15s ease,box-shadow .15s ease;
}
.movement-status-date-time input{
  height:39px;
  padding:0 10px;
}
.movement-status-date-time input:focus,
.movement-status-description textarea:focus{
  outline:0;
  border-color:#e5b400;
  box-shadow:0 0 0 3px rgba(245,189,0,.13);
}
.movement-status-description textarea{
  min-height:78px;
  padding:10px 11px;
  line-height:1.45;
  resize:vertical;
}
.movement-status-description textarea::placeholder{
  color:#9aa2ad;
  font-weight:500;
}
.movement-status-save{
  justify-self:end;
  min-width:88px;
  height:35px;
  min-height:35px;
  padding:0 17px;
  border:0;
  border-radius:7px;
  background:#f5bd00;
  color:#111;
  font-size:10px;
  font-weight:900;
  letter-spacing:.035em;
  box-shadow:0 2px 0 rgba(143,103,0,.16);
  transition:background .15s ease,transform .15s ease,box-shadow .15s ease;
}
.movement-status-save:hover:not(:disabled){
  background:#ffd447;
  box-shadow:0 4px 10px rgba(190,145,0,.18);
  transform:translateY(-1px);
}
.movement-status-save:disabled{
  opacity:.65;
  cursor:wait;
}
@media(max-width:760px){
  .modal-dialog:has(.movement-six-blocks){
    width:min(620px,calc(100vw - 20px));
    max-height:94vh;
  }
  .modal-dialog:has(.movement-six-blocks) .modal-content{padding:14px}
  .movement-six-blocks{grid-template-columns:minmax(0,1fr);gap:12px}
}
@media(max-width:420px){
  .movement-status-block{padding:13px}
  .movement-status-date-time{grid-template-columns:minmax(0,1fr)}
}


/* Demarcação visual das seis etapas conforme o status ATUAL da encomenda. */
.movement-state-legend{
  grid-column:1/-1;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:9px 18px;
  padding:2px 1px 4px;
  color:#626c79;
  font-size:9px;
  font-weight:800;
  letter-spacing:.035em;
}
.movement-state-legend>span{
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.legend-swatch{
  display:inline-block;
  width:10px;
  height:10px;
  border:1px solid #cbd1da;
  border-radius:3px;
}
.legend-past{background:#111214;border-color:#111214}
.legend-current{background:#f5bd00;border-color:#e2ad00}
.legend-future{background:#fff;border-color:#cbd1da}

.movement-status-block.is-past{
  background:#111214;
  border-color:#111214;
  color:#fff;
  box-shadow:0 3px 12px rgba(0,0,0,.10);
}
.movement-status-block.is-past::before{background:#050505}
.movement-status-block.is-past .movement-status-title{
  border-bottom-color:#34363a;
}
.movement-status-block.is-past .movement-status-title h3{color:#fff}
.movement-status-block.is-past .movement-state-label{
  color:#d6d8dc;
  background:#292b30;
}
.movement-status-block.is-past .movement-status-date-time label,
.movement-status-block.is-past .movement-status-description{
  color:#d7dbe1;
}
.movement-status-block.is-past .movement-status-date-time input,
.movement-status-block.is-past .movement-status-description textarea{
  background:#fff;
  border-color:#cfd4dc;
  color:#17202c;
}
.movement-status-block.is-past .movement-status-save{
  background:#34373d;
  color:#fff;
  box-shadow:none;
}
.movement-status-block.is-past .movement-status-save:hover:not(:disabled){
  background:#454950;
}
.movement-status-block.is-current{
  background:#fff7d8;
  border:2px solid #e9b900;
  box-shadow:0 0 0 3px rgba(245,189,0,.13),0 4px 14px rgba(16,24,40,.06);
}
.movement-status-block.is-current::before{background:#f5bd00}
.movement-status-block.is-current .movement-status-title{
  border-bottom-color:#f0d982;
}
.movement-status-block.is-current .movement-status-title h3{color:#17191d}
.movement-status-block.is-current .movement-state-label{
  color:#17191d;
  background:#f5bd00;
}
.movement-status-block.is-future{
  background:#fff;
  border-color:#dfe4eb;
}
.movement-status-block.is-future::before{background:#e5e8ed}
.movement-status-block.is-future .movement-state-label{
  color:#727d8b;
  background:#f0f2f5;
}
.movement-state-label{
  flex:0 0 auto;
  padding:5px 7px;
  border-radius:5px;
  font-size:8px;
  line-height:1;
  font-weight:900;
  letter-spacing:.04em;
}


/* Ocorrência e Devolvida recebem demarcação vermelha própria.
   A cor de fundo continua indicando passado/presente/futuro. */
.movement-status-block.is-exception{
  border-color:#d93025;
}
.movement-status-block.is-exception::before{
  background:#d93025;
}
.movement-status-block.is-exception .movement-status-title h3{
  color:#b42318;
}
.movement-status-block.is-exception.is-past{
  border-color:#d93025;
}
.movement-status-block.is-exception.is-past::before{
  background:#ef4444;
}
.movement-status-block.is-exception.is-past .movement-status-title h3{
  color:#ffb4ad;
}
.movement-status-block.is-exception.is-current{
  border-color:#d93025;
  box-shadow:0 0 0 3px rgba(217,48,37,.12),0 4px 14px rgba(16,24,40,.06);
}
.movement-status-block.is-exception.is-current::before{
  background:#d93025;
}
.movement-status-block.is-exception.is-current .movement-status-title h3{
  color:#b42318;
}
.movement-status-block.is-exception.is-future{
  border-color:#e5a09b;
}
.movement-status-block.is-exception.is-future::before{
  background:#d93025;
}
.movement-status-block.is-exception.is-future .movement-status-title h3{
  color:#b42318;
}
