.design-settings138 {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,165px),1fr)); align-items:end;
  gap:10px; padding-block:12px; border-block-start:1px solid var(--line);
}
.design-settings138 h3,.design-settings138 small { grid-column:1/-1; margin:0; }
.design-settings138 label { display:grid; gap:4px; min-width:0; }
.design-settings138 select { width:100%; min-height:40px; }
.design-settings138 small { color:var(--muted); }
body[data-actions138=unified] { --action-fill138:var(--green); --action-text138:#fff; --control-radius138:10px; }
body[data-actions138=unified].horizon118 #appView :is(.detail-page-head,.quote-page-head,.internal-head,.finance-head) {
  align-items:center; gap:8px 12px; border-radius:var(--control-radius138);
}
body[data-actions138=unified].horizon118 #appView :is(.detail-page-head,.quote-page-head,.internal-head,.finance-head) h2 {
  margin-block:0; line-height:1.45; text-align:start;
}
body[data-actions138=unified].horizon118 #appView :is(#newOrderBtn,[data-new-quote],[data-internal-new],[data-shortage-new],[data-rework-new]),
body[data-actions138=unified].horizon118 dialog button[data-main138] {
  background:var(--action-fill138)!important; border:1px solid var(--action-fill138)!important;
  color:var(--action-text138)!important; box-shadow:none!important; border-radius:var(--control-radius138)!important;
}
body[data-actions138=unified].horizon118 dialog button[data-secondary138],
body[data-actions138=unified].horizon118 dialog footer .small-btn:not([data-main138]):not(.danger):not(.red),
body[data-actions138=unified].horizon118 #appView :is(.detail-page-head,.quote-actions,.internal-actions) > .small-btn:not(.active):not(.danger):not(.red) {
  background:var(--card)!important; color:var(--ink)!important; border:1px solid var(--line)!important;
  box-shadow:none!important; border-radius:var(--control-radius138)!important;
}
body[data-actions138=unified] :is(button,a,select,input,textarea,summary):focus-visible {
  outline:2px solid var(--green)!important; outline-offset:2px;
}
body[data-rows138=short].horizon118 #appView #groupView #nextOrders110 :is(th,td) { padding:5px 10px!important; }
body[data-rows138=short].horizon118 #appView #nextOrders110 td :is(strong,small) {display:inline; margin:0; overflow-wrap:anywhere;}
body[data-rows138=short].horizon118 #appView #nextOrders110 td strong+small { margin-inline-start:8px; color:var(--muted); }
body[data-rows138=short].horizon118 #appView #nextOrders110 .priority-badge123 { margin:0 4px!important; }
body[data-rows138=short].horizon118 #appView #nextOrders110 .next-order-number110 { min-height:34px!important; padding:3px 7px!important; }
body[data-rows138=short].horizon118 #appView :is(#groupView,#homeView) .employee-task-card {
  display:grid!important; grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px 10px!important;padding:6px 10px!important;
}
body[data-rows138=short].horizon118 #appView .employee-task-main { min-width:0;gap:8px!important;align-items:center; }
body[data-rows138=short].horizon118 #appView .employee-task-main>div {
  display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 6px;min-width:0;
}
body[data-rows138=short].horizon118 #appView .employee-task-main :is(h3,.meta,.path-badge,.due-late) { margin:0!important;line-height:1.45; }
body[data-rows138=short].horizon118 #appView .employee-task-actions { align-items:center;gap:5px!important;padding:0!important; }
@media(max-width:600px) {
  body[data-rows138=short].horizon118 #appView :is(#groupView,#homeView) .employee-task-card {grid-template-columns:minmax(0,1fr);}
  body[data-rows138=short].horizon118 #appView .employee-task-actions { justify-content:space-between; }
  body[data-rows138=short].horizon118 #appView .employee-task-actions button { min-height:44px!important; }
}
@media(max-width:980px) {
  body[data-rows138=short].horizon118 #appView #groupView #groupOrders .order-head {
    display:grid!important; grid-template-columns:3.5rem minmax(0,1fr) 44px!important; gap:3px 6px!important; padding:5px 8px!important; align-items:center;
  }
  body[data-rows138=short].horizon118 #appView #groupView #groupOrders :is(.card-topline,.card-title-block) { display:contents!important; }
  body[data-rows138=short].horizon118 #appView #groupView #groupOrders .card-title-block > :is(.number,.card-thumb) { grid-column:1!important;grid-row:1!important; }
  body[data-rows138=short].horizon118 #appView #groupView #groupOrders .card-title-block > div {
    grid-column:2!important;grid-row:1!important;display:flex; flex-wrap:wrap; align-items:center; gap:2px 5px; min-width:0;
  }
  body[data-rows138=short].horizon118 #appView #groupView #groupOrders .card-title-main { margin:0!important;line-height:1.4!important; }
  body[data-rows138=short].horizon118 #appView #groupView #groupOrders .card-customer { margin:0!important; line-height:1.4!important; }
  body[data-rows138=short].horizon118 #appView #groupView #groupOrders .preview-small71 {
    grid-column:3!important;grid-row:1!important;min-width:44px!important;min-height:44px!important;
  }
  body[data-rows138=short].horizon118 #appView #groupView #groupOrders .card-stage-row {
    grid-column:1/-1;grid-row:2; width:100%!important;justify-self:stretch!important;box-sizing:border-box;
    display:flex!important;align-items:center;gap:6px;padding:0 4px!important;margin:0!important;
  }
  body[data-rows138=short].horizon118 #appView #groupView #groupOrders .card-stage-label { display:flex;align-items:baseline;gap:4px;flex-wrap:wrap; }
  body[data-rows138=short].horizon118 #appView #groupView #groupOrders .card-stage-row :is(.open-card,.card-next) { min-height:44px!important;min-width:44px; }
  body[data-rows138=short].horizon118 #appView #groupView #groupOrders .order-head :is(.card-facts,.badges) { grid-column:1/-1; }
  body[data-rows138=short].horizon118 #appView #groupView #groupOrders .card-facts:not(:has(> :not([hidden]))) { display:none!important; }
  .design-settings138 :is(select,button) { font-size:16px; min-height:44px; }
}
/* The More dialog groups the original, role-checked destinations. */
body #mobileSections122 {
  --section-tint:color-mix(in srgb,var(--green) 8%,var(--card));
  color:var(--ink);background:var(--card);border:1px solid var(--line);
}
body #mobileSections122[open] {display:flex;flex-direction:column}
body #mobileSections122 header {
  display:flex;align-items:center;justify-content:space-between;gap:12px;flex:none;
  padding:12px 16px;border-bottom:1px solid var(--line);
}
#mobileSections122 .sections-title142 {display:flex;align-items:center;gap:9px;min-width:0}
#mobileSections122 .sections-mark142 {
  display:grid;place-items:center;width:32px;height:32px;border-radius:9px;
  background:var(--section-tint);color:var(--ink);
}
body #mobileSections122 h2 {font-size:1.1rem;margin:0;color:var(--ink)}
#mobileSections122 [data-close122] {display:inline-flex;align-items:center;gap:5px;min-height:36px;padding:4px 9px}
#mobileSections122 [data-close122] svg {width:14px!important;height:14px!important}
body #mobileSections122 .mobile-sections-grid122 {
  display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:10px;min-height:0;
  padding:14px 16px max(14px,env(safe-area-inset-bottom,0px));overflow-y:auto;overscroll-behavior:contain;
}
#mobileSections122 .more-group139 {
  min-width:0;border:1px solid var(--line);border-radius:12px;background:var(--card);
}
#mobileSections122 .more-group139 h3 {
  display:flex;align-items:center;gap:7px;padding:8px 11px;margin:0;
  border-radius:11px 11px 0 0;border-bottom:1px solid var(--line);
  background:var(--section-tint);color:var(--ink);font-size:.96rem;font-weight:750;line-height:1.4;
}
#mobileSections122 .more-links139 {display:grid;grid-template-columns:minmax(0,1fr);padding:4px;gap:2px}
#mobileSections122 .more-links139 button {
  display:flex;align-items:center;gap:8px;text-align:start;width:100%;min-width:0;min-height:44px;
  border:1px solid transparent;border-radius:8px;background:transparent;color:var(--ink);
  padding:5px 7px;font:inherit;font-size:.86rem;font-weight:600;line-height:1.35;cursor:pointer;
}
#mobileSections122 .mobile-section-icon122 {display:grid;place-items:center;flex:0 0 24px;color:var(--ink)}
#mobileSections122 .mobile-section-icon122 svg,#mobileSections122 .sections-mark142 svg {width:19px!important;height:19px!important}
#mobileSections122 .mobile-section-label122 {flex:1;min-width:0;overflow-wrap:break-word}
#mobileSections122 .mobile-badge122 {display:inline-grid;place-items:center;flex:none;min-width:20px;border-radius:12px;padding:1px 5px;background:var(--gold);color:#263e42}
#mobileSections122 [hidden] {display:none!important}
#mobileSections122 .more-links139 button[aria-current=page] {background:var(--section-tint);border-inline-start:3px solid var(--green);font-weight:750}
#mobileSections122 .more-links139 button:focus-visible {outline:2px solid var(--green);outline-offset:-2px}
@media(hover:hover){#mobileSections122 .more-links139 button:hover {background:var(--section-tint);border-color:var(--line)}}
@media(min-width:761px) and (min-height:501px),(min-width:961px){
  body #mobileSections122 {width:min(310px,calc(100vw - 32px));max-height:82dvh;padding:0;overflow:hidden}
  body #mobileSections122:has(.more-group139:nth-child(2)) {width:min(490px,calc(100vw - 32px))}
  body #mobileSections122:has(.more-group139:nth-child(3)) {width:min(690px,calc(100vw - 32px))}
  body #mobileSections122 .mobile-sections-grid122 {grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));align-items:stretch;max-height:none}
}
@media(max-width:760px),(max-width:960px) and (max-height:500px){
  body #mobileSections122 .mobile-sections-grid122 {padding:10px;gap:8px;max-height:calc(82dvh - 60px)}
  #mobileSections122 .more-links139 {grid-template-columns:repeat(2,minmax(0,1fr))}
  #mobileSections122 .more-links139 button:last-child:nth-child(odd) {grid-column:1/-1}
  #mobileSections122 .more-links139 button {background:var(--paper);padding:5px 7px}
  #mobileSections122 [data-close122] {min-height:44px}
}
body.mobile-menu-open122 {overflow:hidden}
[data-list-action139] {display:inline-flex;margin-inline:8px;min-height:36px}
body.polish98 :is(#editOrderDialog,#manualInvoiceDialog) .modal-foot {
 padding-block-end:max(10px,env(safe-area-inset-bottom))!important;
}
body :is(#internalRequestForm,#reworkForm,#shortageForm99)>.internal-actions:has(button[type=submit]) {
 position:sticky;bottom:0;z-index:2;background:var(--card);border-top:1px solid var(--line);
 padding:8px 0 max(8px,env(safe-area-inset-bottom));display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-start;
}
body :is(#internalRequestForm,#reworkForm,#shortageForm99) {padding-block-end:0!important}
@media(max-width:760px) {body [data-list-action139],body :is(#internalRequestForm,#reworkForm,#shortageForm99)>.internal-actions button {min-height:44px}}
@media print {#mobileSections122,[data-list-action139]{display:none!important}}
/* Route columns keep the original cards, actions and per-route collapse controls. */
body.horizon118 #groupView #routeColumns140 {align-self:center;flex:none;min-height:36px}
body.horizon118 #groupView #routeColumns140[aria-pressed=true] {background:var(--green)!important;border-color:var(--green)!important;color:white!important}
body.route-columns140.horizon118 #appView #groupView #groupOrders:not(.employee-orders92),
body.route-columns140.horizon118 #appView #groupOrders .employee-columns140:not(.hidden) {
 display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr))!important;
 align-items:start;gap:10px!important;min-width:0;
}
body.route-columns140.horizon118 #appView #groupView #groupOrders .path-card-group {
 margin:0!important;min-width:0;padding:10px!important;
}
body.route-columns140.horizon118 #appView #groupView #groupOrders .compact-order-grid:not([hidden]),
body.route-columns140.horizon118 #appView #groupOrders .employee-route140 {
 display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-content:start;gap:7px!important;min-width:0;
}
body.route-columns140 #groupView #nextOrders110 {display:none!important}
body.route-columns140 #groupView #groupOrders>.empty {grid-column:1/-1}
body.route-columns140 #groupView #groupOrders .order-head {min-width:0;overflow-wrap:anywhere}
@media(min-width:981px){
 body.route-columns140[data-rows138=short] #appView #groupView #groupOrders .order-head {display:grid!important;grid-template-columns:minmax(0,1fr)!important;padding:8px!important;gap:4px!important}
 body.route-columns140[data-rows138=short] #appView #groupOrders .card-topline {display:grid!important;gap:2px!important}
 body.route-columns140[data-rows138=short] #appView #groupOrders .card-title-block {display:grid!important;grid-template-columns:auto minmax(0,1fr) 34px!important;width:100%;align-items:start;gap:6px!important}
 body.route-columns140[data-rows138=short] #appView #groupOrders .card-title-block>:is(.number,.card-thumb) {grid-row:1!important;grid-column:1!important}
 body.route-columns140[data-rows138=short] #appView #groupOrders .card-title-block>div {grid-row:1!important;grid-column:2!important;min-width:0}
 body.route-columns140[data-rows138=short] #appView #groupOrders .preview-small71 {grid-row:1!important;grid-column:3!important;min-width:32px!important}
 body.route-columns140[data-rows138=short] #appView #groupOrders .card-stage-row {width:100%!important;box-sizing:border-box;padding:5px 7px!important;margin:0!important}
}
body.route-columns140 #groupView .employee-route140 {background:var(--card);border:1px solid var(--line);padding:10px;border-radius:12px}
body.route-columns140 #groupView .employee-route140>h3 {margin:0 0 4px;font-size:.92rem}
@media(max-width:760px){body.horizon118 #groupView #routeColumns140 {min-height:44px}}
/* List headings and filters share the same compact spacing at each width. */
body.horizon118 #appView :is(#quotesView,#shortagesView99) :is(.quote-page-head,.internal-head) {display:flex!important;align-items:center!important;flex-wrap:wrap;gap:4px 10px!important;margin:0!important;padding:4px 0!important}
body.horizon118 #appView :is(#quotesView,#shortagesView99) :is(.quote-actions,.internal-actions) {display:flex!important;width:auto!important;flex:0 1 auto;gap:4px!important}
body.horizon118 #appView :is(#quotesView,#shortagesView99) h2 {display:inline-flex;align-items:center;gap:6px}
.list-count141 {font:inherit;font-size:.78em;color:var(--muted);font-variant-numeric:tabular-nums}
body.horizon118 #appView #groupView>.detail-page-head {display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:4px 8px!important;padding:4px 0!important;margin:0!important}
body.workspace124.horizon118.horizon120 #appView #groupView>.detail-page-head .detail-page-title>div {flex:1 1 8rem!important;width:auto!important;min-width:0}
body.horizon118 #appView #groupView #horizonFilters118 {padding:4px 0!important;margin:0 0 5px!important}
body.horizon118 #appView :is(.quote-toolbar,.internal-filters) {gap:6px!important;padding:4px 0!important;margin:3px 0 6px!important}
body.horizon118 #appView #shortageSearch141 {min-width:0;width:100%;max-width:34rem;font:inherit}
body[data-layout137=simple] #appView .quote-toolbar[data-filters-open137=false] #quoteFilter {display:none!important}
body[data-layout137=simple] #appView #quotesView .quote-toolbar {display:flex!important;flex-wrap:wrap;align-items:center!important}
body[data-layout137=simple] #appView #quotesView #quoteSearch {order:-1;flex:1 1 9rem!important;min-width:0}
body #appView #shortagesView99 .internal-filters {display:flex!important;flex-wrap:wrap;align-items:center}
body #appView #shortagesView99 #shortageSearch141 {order:-1;flex:1 1 11rem}
body.horizon118 #appView #quickRoute141 {display:none!important}
body.horizon118 #appView #quickRoute141 select {min-width:0;width:auto;max-width:10.5rem;color:var(--ink);font:inherit;margin:0}
body.horizon118 #appView #quickRoute141[data-employee-selection]:not([hidden]) {display:inline-flex!important;align-items:center;gap:5px}
@media(max-width:760px),(max-width:960px) and (max-height:500px){
 body.horizon118 #appView #quickRoute141:not([hidden]) {display:inline-flex!important;align-items:center;gap:5px;font-size:.82rem}
 body.horizon118 #appView #quickRoute141 select {min-height:44px;font-size:16px}
 body.horizon118 #appView #horizonFilters118>label:has([aria-label="تصفية مسار الإنتاج"]) {display:none!important}
 body.horizon118 #appView :is(#quotesView,#shortagesView99) :is(.quote-page-head,.internal-head)>div {min-width:0}
 body.horizon118 #appView #shortageSearch141 {font-size:16px}
}
body.horizon118 #appView #groupOrders .order-card-v2 .card-stage-row {display:flex!important;align-items:center!important;flex-wrap:wrap;gap:4px 6px!important}
body.horizon118 #appView #groupOrders .order-card-v2 .card-stage-label {flex:1 1 5rem;min-width:0}
body.horizon118 #appView #groupOrders .order-card-v2 .card-title-block>div {display:flex!important;align-items:baseline;flex-wrap:wrap;gap:1px 5px;min-width:0}
body.horizon118 #appView #groupOrders .order-card-v2 .card-customer {flex:1 0 100%;min-width:0;line-height:1.35!important}
body.horizon118 #appView #groupView #groupOrders :is(.due-late,.badge.blocked) {color:var(--ink)!important;background:var(--gold2)!important}
body.horizon118 #appView #groupView #groupOrders .employee-task-card .due-late {color:var(--ink)!important}
body.horizon118 #appView #detailView .role-brief141 {display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;color:var(--ink);min-width:0}
body.horizon118 #appView #detailView .role-brief141>span {width:100%;overflow-wrap:anywhere;font-size:.84rem}
body.horizon118 #appView #detailView .role-brief141>button {min-height:32px;padding:3px 7px!important}
@media(max-width:760px){
 body.horizon118 #appView #detailView #nextRoute110:has(.role-brief141) {grid-template-columns:minmax(0,1fr)!important}
 body.horizon118 #appView #detailView .role-brief141>button {min-height:44px}
}
