/* Audit refinements: preserve the existing palette and type families. */
.orders-screen .order-search:focus-within{outline:2px solid var(--green);outline-offset:2px}
.orders-screen .order-tabs button,.orders-screen .orders-bar .link{font-size:12px}
.orders-screen .order-facts span,.order-detail-modal .order-facts span{font-size:12px;line-height:1.35}
.orders-screen .order-facts b,.order-detail-modal .order-facts b{font-size:12px}
.orders-screen .order-route,.order-detail-modal .order-route{font-size:12px;line-height:1.35}
.order-detail-modal .order-actions button{font-size:12px}
.orders-screen .order-card-head,.order-detail-modal .order-card-head{position:relative}
.order-card:has(.status-menu){z-index:9}
.orders-screen .status-menu,.order-detail-modal .status-menu{top:calc(100% + 4px);min-width:160px}
.orders-screen .status-menu button,.order-detail-modal .status-menu button{font-size:14px;height:auto;min-height:36px;overflow:visible;text-align:left}
.status-menu button:focus-visible{outline:2px solid var(--green);outline-offset:-2px;background:var(--sage)}
@media(max-width:420px){
 .orders-screen .top{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
 .orders-screen .top>div{grid-column:1/-1}
 .orders-screen #add-order{justify-self:start}
 .orders-screen .order-days button{font-size:12px;line-height:1.2;white-space:normal}
}
.orders-screen .order-card,.order-detail-modal .order-card{container-type:inline-size}
@container(max-width:350px){
 .orders-screen .order-actions,.order-detail-modal .order-actions{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 .orders-screen .order-actions>button,.order-detail-modal .order-actions>button{font-size:14px;height:auto;min-height:44px;white-space:normal;overflow:visible;padding:6px}
}

/* Shipment detail actions: compact, clear document entry points. */
.shipment-documents-heading{padding:17px 18px 12px;border-bottom:1px solid var(--line)}
.shipment-documents-heading h2{margin:0;font:400 20px Georgia,serif}
.shipment-documents-heading p{margin:5px 0 0;color:var(--muted);font-size:12px}
.shipment-action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:14px 16px}
.shipment-action-card{display:flex;align-items:center;gap:12px;min-width:0;min-height:88px;padding:14px;text-align:left;border:1px solid #d9e3d9;border-radius:10px;background:#fbfcf8;color:var(--ink);transition:background-color .15s,border-color .15s}
.shipment-action-card:hover{border-color:#a9c0ab;background:#f3f7f1}
.shipment-action-card:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.shipment-action-icon{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border-radius:9px;background:var(--sage);color:var(--green)}
.shipment-action-icon svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.shipment-action-copy{display:grid;gap:5px;min-width:0}
.shipment-action-copy strong{font-size:14px;line-height:1.25}
.shipment-action-copy small{color:var(--muted);font-size:12px;line-height:1.35}
.shipment-action-arrow{display:grid;place-items:center;flex:0 0 26px;width:26px;height:26px;margin-left:auto;border-radius:50%;background:#edf2eb;color:var(--green);font-size:22px;line-height:1}
@media(max-width:700px){.shipment-action-grid{grid-template-columns:minmax(0,1fr);gap:8px;padding:12px}.shipment-action-card{min-height:76px}}

/* Shipment summary, create-trip flow, and logistics register. */
.logistics-shipment-summary{margin:18px 0 12px;padding:15px 16px;border:1px solid #dbe3d3;border-radius:13px;background:#fffdf8}
.logistics-shipment-summary-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:11px;border-bottom:1px solid #e7ebe2}
.logistics-shipment-summary-head h2{font-size:20px}
.logistics-status{padding:6px 11px;border-radius:99px;background:#e9efe4;color:#4c633e;font-size:12px;white-space:nowrap}
.logistics-status-button{border:0;cursor:pointer}
.logistics-shipment-summary-data{display:grid;grid-template-columns:1fr 1fr;margin-top:13px}
.logistics-shipment-summary-data>div{display:grid;align-content:start;gap:5px;min-width:0;padding:0 14px}
.logistics-shipment-summary-data>div:first-child{padding-left:2px;border-right:1px solid #e2e8de}
.logistics-shipment-summary-data>div:last-child{padding-right:2px}
.logistics-shipment-summary-data span{color:var(--muted);font-size:12px}
.logistics-shipment-summary-data strong{font:400 23px Georgia,serif;overflow-wrap:anywhere}
.logistics-shipment-summary-data small{margin-top:5px;color:var(--muted);font-size:12px}
.logistics-weight{font:500 29px Georgia,serif;color:#355f3d}
.logistics-create-card{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 14px;padding:15px 16px;border:1px solid #dbe3d3;border-radius:13px;background:#fffdf8}
.logistics-create-card h2{margin:0 0 5px;font-size:21px}
.logistics-create-card p{margin:0;color:var(--muted);font-size:12px;line-height:1.4}
.logistics-create-card .primary{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:46px;padding:0 19px;white-space:nowrap}
.logistics-create-card.has-logistics-trip{background:#eef5ec;border-color:#a8bfa4}
.logistics-create-card.has-logistics-trip p{line-height:1.65}
.logistics-create-card.has-logistics-trip .secondary{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.order-card.order-card-complete{border-color:#9fc5a3;background:#f0f7ee}
.order-card.order-card-complete .order-status,.order-card.order-card-complete .status-action-complete{background:#dcefdc;color:#285b35;border-color:#b8d7b9}
.order-card .order-actions .order-action-shipped{background:#e4f1e3;color:#2f653a;border-color:#b8d6b8;font-weight:650}
.order-card .order-actions .order-action-shipped:hover{background:#d7ead7}
.order-logistics-link{margin:9px 0 0;padding:7px 9px;border-radius:7px;background:#edf4e9;color:#405e38;font-size:12px}
.orders-screen .order-route,.order-detail-modal .order-route{font-weight:700}
.orders-screen .order-delivery-date,.order-detail-modal .order-delivery-date{margin-top:5px;color:#344536;font-size:14px;font-weight:700}
.order-facts>div:nth-child(2)>b{color:#344536}
.logistics-create-card svg,.logistics-header svg{width:19px;height:19px}
.logistics-page{--logistics-paper:#fffdf8;--logistics-line:#dbe3d3;max-width:980px}
.logistics-header{align-items:center;margin-bottom:17px}
.logistics-header h1{font-size:30px}
.logistics-header p:not(.eyebrow){margin:5px 0 0;color:var(--muted);font-size:14px}
.logistics-header .secondary{display:inline-flex;align-items:center;gap:8px;min-height:40px}
.logistics-panel{padding:14px}
.logistics-search{display:flex;align-items:center;gap:9px;min-height:46px;padding:0 12px;border:1px solid var(--logistics-line);border-radius:10px;background:white;color:var(--green)}
.logistics-search>svg{width:19px;height:19px;flex:0 0 auto}
.logistics-search input{width:100%;min-width:0;height:42px;border:0;outline:0;background:transparent;color:var(--ink);font-size:14px}
.logistics-search button{flex:0 0 32px;width:32px;min-height:32px;border:0;border-radius:50%;background:var(--sage);color:var(--green);font-size:22px}
.logistics-search button[hidden]{display:none}
.logistics-controls{display:flex;align-items:end;gap:9px;margin-top:11px}
.logistics-controls>label{display:grid;gap:4px;min-width:0;color:var(--muted);font-size:11px}
.logistics-controls input,.logistics-controls select{height:38px;min-width:140px;padding:0 9px;border:1px solid var(--logistics-line);border-radius:8px;background:white;color:var(--ink);font-size:13px}
.logistics-controls>label:last-of-type select{min-width:155px}
.logistics-view-toggle{display:flex;margin-left:auto;padding:3px;border:1px solid var(--logistics-line);border-radius:9px;background:#f5f7f1}
.logistics-view-toggle button{min-height:32px;padding:0 11px;border:0;border-radius:6px;background:transparent;color:var(--muted);font-size:12px}
.logistics-view-toggle button[aria-pressed="true"]{background:var(--green);color:white}
.logistics-results-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:17px 0 10px}
.logistics-results-head h2{font-size:18px}
.logistics-trip-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.logistics-trip-card{min-width:0;padding:13px;border:1px solid var(--logistics-line);border-radius:11px;background:var(--logistics-paper)}
.logistics-trip-top{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:9px;border-bottom:1px solid #e9ede5}
.logistics-trip-date,.logistics-trip-destination,.logistics-trip-facts span,.logistics-trip-facts strong,.logistics-trip-cargo b{display:inline-flex;align-items:center;gap:7px}
.logistics-trip-card svg{width:17px;height:17px;flex:0 0 auto;color:var(--green)}
.logistics-status-select{max-width:142px;min-height:30px;padding:0 8px;border:1px solid transparent;border-radius:99px;background:#edf1e8;color:#4a603d;font-size:11px}
.logistics-status-select.status-в-пути{background:#e4efff;color:#2864a9}
.logistics-status-select.status-доставлен{background:#e4f2e1;color:#3b7040}
.logistics-status-select.status-отменён{background:#ececea;color:#666}
.logistics-status-wrap{position:relative;flex:0 0 auto;min-width:0}
.logistics-status-wrap .logistics-status-select{display:flex;align-items:center;justify-content:center;gap:8px;max-width:min(190px,45vw);min-height:38px;padding:7px 12px;border:0;border-radius:999px;font:inherit;white-space:nowrap;cursor:pointer}
.logistics-status-menu{position:absolute;z-index:20;top:calc(100% + 5px);right:0;width:max-content;min-width:156px;max-width:min(220px,calc(100vw - 32px));padding:5px;border:1px solid var(--logistics-line);border-radius:11px;background:var(--logistics-paper);box-shadow:0 8px 24px #26352226}
.logistics-status-menu[hidden]{display:none}
.logistics-status-menu button{display:block;width:100%;min-height:40px;padding:8px 11px;border:0;border-radius:7px;background:transparent;color:var(--ink);text-align:left;font:inherit;cursor:pointer}
.logistics-status-menu button:hover,.logistics-status-menu button:focus-visible,.logistics-status-menu button[aria-checked="true"]{background:#edf1e8;color:#355f3d;outline:none}
.logistics-trip-destination{margin-top:10px;font-size:16px}
.logistics-trip-facts{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-top:11px;color:#414d3b;font-size:13px}
.logistics-trip-facts strong{grid-column:1/-1;color:#355f3d;font-size:19px;font-weight:600}
.logistics-trip-cargo{margin-top:11px;padding-top:10px;border-top:1px solid #e9ede5;font-size:13px}
.logistics-trip-cargo ul{margin:5px 0 0 25px;padding:0;line-height:1.5}
.logistics-trip-foot{display:flex;justify-content:space-between;gap:10px;margin-top:9px;color:var(--muted);font-size:11px}
.logistics-table-wrap{overflow:auto;border:1px solid var(--logistics-line);border-radius:9px;background:var(--logistics-paper);-webkit-overflow-scrolling:touch}
.logistics-table{width:100%;min-width:840px;border-collapse:collapse;font-size:13px}
.logistics-table th,.logistics-table td{padding:10px 9px;border-bottom:1px solid #e8ece4;text-align:left;vertical-align:top}
.logistics-table th{background:#edf1e8;color:#4d5e43;font-weight:600;white-space:nowrap}
.logistics-table tbody tr:last-child td{border-bottom:0}
.logistics-table select{min-height:34px;border:1px solid var(--logistics-line);border-radius:7px;background:white;color:var(--ink)}
.logistics-table .logistics-status-wrap{display:inline-block}
.logistics-table .logistics-status-wrap .logistics-status-select{min-height:34px;max-width:170px;padding:5px 9px;border:1px solid var(--logistics-line);border-radius:7px;background:white;color:var(--ink);font-size:12px}
.logistics-dialog{max-height:min(900px,calc(100dvh - 32px));overflow:auto}
.logistics-trip-form{padding:20px}
.logistics-trip-form .modal-title{position:sticky;top:-20px;z-index:2;margin:-20px -20px 12px;padding:16px 20px;background:var(--paper)}
.logistics-trip-form .modal-title h2{font-size:26px}
.trip-carrier-field,.trip-shipments-field{margin:0;padding:0;border:0}
.trip-carrier-field legend,.trip-shipments-field legend{display:flex;align-items:center;justify-content:space-between;width:100%;margin:3px 0 7px;color:var(--ink);font-size:13px;font-weight:600}
.trip-carrier-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.trip-carrier-options label{display:flex;align-items:center;gap:8px;min-height:44px;padding:7px 10px;border:1px solid var(--logistics-line);border-radius:8px;background:white;color:var(--ink)}
.trip-carrier-options input,.trip-shipment-option input{width:18px;height:18px;accent-color:var(--green)}
.trip-vehicle-field{margin:10px 0 2px;padding:0;border:0}
.trip-vehicle-field legend{margin:0 0 6px;color:var(--muted);font-size:12px}
.trip-vehicle-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.trip-vehicle-options label{position:relative;display:grid;place-items:center;min-height:42px;border:1px solid var(--logistics-line);border-radius:8px;background:white;color:var(--ink);cursor:pointer}
.trip-vehicle-options input{position:absolute;opacity:0;inset:0;cursor:pointer}
.trip-vehicle-options label:has(input:checked){border-color:var(--green);background:var(--green);color:white}
.trip-vehicle-options label:has(input:focus-visible){outline:2px solid var(--green);outline-offset:2px}
.trip-carrier-field .field{margin-top:10px}
.trip-shipment-options{display:grid;gap:6px;max-height:155px;overflow:auto;padding:2px}
.trip-shipment-option{display:flex;align-items:center;gap:9px;min-height:50px;padding:7px 9px;border:1px solid var(--logistics-line);border-radius:8px;background:#fff}
.trip-shipment-option span{display:grid;gap:3px;min-width:0}
.trip-shipment-option strong{font-size:13px;color:var(--ink)}
.trip-shipment-option small{overflow:hidden;color:var(--muted);font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.logistics-trip-form .field{margin:9px 0;color:var(--muted);font-size:12px}
.logistics-trip-form .field input,.logistics-trip-form .field select{min-height:42px;border:1px solid var(--logistics-line);border-radius:8px;background:white;font-size:14px}
.logistics-trip-form .field small{font-size:11px}
.trip-destination-preview{display:flex;align-items:center;gap:8px;margin:6px 0 0;color:var(--muted);font-size:12px}
.trip-destination-preview svg{width:17px;height:17px;color:var(--green)}
@media(max-width:760px){
 .logistics-shipment-summary{margin-top:12px;padding:12px}
 .logistics-shipment-summary-data>div{padding:0 9px}
 .logistics-shipment-summary-data strong{font-size:20px}
 .logistics-weight{font-size:26px}
 .logistics-create-card{align-items:flex-start;padding:12px;gap:9px}
 .logistics-create-card .primary{min-width:132px;padding:0 11px;font-size:13px}
 .logistics-header{align-items:flex-start;gap:8px}
 .logistics-header h1{font-size:27px}
 .logistics-header .secondary{min-height:38px;padding:0 10px;font-size:12px}
 .logistics-panel{padding:10px}
 .logistics-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px}
 .logistics-controls input,.logistics-controls select,.logistics-controls>label:last-of-type select{width:100%;min-width:0}
 .logistics-view-toggle{grid-column:1/-1;margin:0;justify-self:stretch}
 .logistics-view-toggle button{flex:1}
 .logistics-trip-grid{grid-template-columns:1fr}
 .logistics-dialog{width:min(560px,100%);max-width:none;height:88dvh;max-height:calc(100dvh - 16px);min-height:0;margin:0;border-radius:18px 18px 0 0;inset:auto 0 0;overflow:auto}
 .logistics-trip-form{min-height:0;padding:16px 14px 88px}
 .logistics-trip-form .modal-title{top:-16px;margin:-16px -14px 10px;padding:15px 14px 10px}
 .logistics-trip-form .modal-title h2{font-size:24px}
 .logistics-trip-form .modal-actions{position:fixed;left:12px;right:12px;bottom:10px;z-index:3;margin:0;padding:8px;background:#fffdf8ed;border:1px solid var(--logistics-line);border-radius:12px;backdrop-filter:blur(8px)}
 .logistics-trip-form .modal-actions .secondary{display:block}
 .logistics-trip-form .modal-actions .primary{flex:1}
}
@media(max-width:400px){.logistics-create-card{display:grid}.logistics-create-card .primary{width:100%}.logistics-trip-facts{grid-template-columns:1fr}.logistics-trip-facts strong{grid-column:auto}}
