/* tb43: approved desktop visual direction. No phone rules or workflow changes. */
@media (min-width: 901px) {
  :root { --dp-line:#dfe6ef; --dp-muted:#607187; }
  .main {padding:24px 28px 0;}
  .main h1,.jlx .jl-title,.jh-title {font-size:24px;font-weight:700;letter-spacing:-.02em;}
  .main h2 {font-size:16px;}
  .main h3 {font-size:15px;}
  .card,.db-card,.jl-card {border-color:var(--dp-line);border-radius:8px;box-shadow:none;}
  .main .btn,.topbar .btn {border-radius:6px;box-shadow:none;}
  .main .btn {font-size:13px;min-height:36px;}
  .main .btn-primary {background:var(--blue,#1e88e5);border-color:var(--blue,#1e88e5);color:#fff;}
  .main :is(input:not([type=checkbox]):not([type=radio]),select,textarea) {border-radius:6px;border-color:#d7e1ed;font-size:14px;}
  .main :is(input,select,textarea,button,a):focus-visible {outline:2px solid #147ed2;outline-offset:3px;}
  .main :is(.muted,.small,.sub) {color:var(--dp-muted);}
  .topbar {gap:14px;}
  .tb-date {font-size:12px;flex-shrink:0;max-width:150px;}
  .side-foot .side-usage,.side-foot .side-note {display:none!important;}
  /* Shared list heading, count, search and actions. Keep existing fields and order. */
  .jlx .jl-top {position:static;height:auto;padding:0 0 18px;gap:16px;background:none;backdrop-filter:none;border:0;flex-wrap:wrap;}
  .jlx .jl-search {border-radius:6px;box-shadow:none;margin-left:auto;max-width:440px;}
  .jlx .jl-count,.jlx .n {font-size:12px;font-weight:600;}
  .jlx .jl-filters {gap:10px;margin-bottom:18px;}
  .jlx .jl-fgrid .jl-f {border-radius:6px;box-shadow:none;}
  .jlx .jl-fgrid :is(label,select) {font-size:13px;}
  .jlx .jl-tbl thead th, .main table.tbl thead th {background:#f9fbfd;color:#64758a;font-size:11px;letter-spacing:.025em;font-weight:600;}
  .jlx .jl-tbl tbody td,.main table.tbl tbody td {font-size:13px;line-height:1.45;}
  .jlx .jl-tbl .c-site .st {font-size:14px;font-weight:700;}
  .jlx .jl-tbl .c-client .cl {font-weight:400;}
  .jlx .jl-tbl .c-ref .ref {font-weight:400;color:var(--dp-muted);}
  .jlx .jl-tbl .ss,.jlx .jl-tbl .w2 {color:var(--dp-muted);font-weight:400;}
  .jlx .jl-tbl :is(.jl-ref,.jl-sub,.jl-muted) {color:var(--dp-muted);font-weight:400;}
  .jlx .jl-tbl tbody tr :is(.chip,.badge),.main .jm-tag {border-radius:5px;font-weight:600;}
  /* Use one underline tab treatment for record and list tabs. */
  .main .jt-tabs,.main .jm-tabs.big {background:#fff;border:0;border-bottom:1px solid var(--dp-line);border-radius:7px 7px 0 0;padding:0 12px!important;gap:4px;box-shadow:none;}
  .main .jt-tabs .jt-tab,.main .jm-tabs.big .jm-tab {background:transparent;border:0;border-bottom:3px solid transparent;border-radius:0;box-shadow:none;color:#596a80;font-size:13px;font-weight:600;padding:13px 16px;min-height:46px;}
  .main .jt-tabs .jt-tab.on,.main .jm-tabs.big .jm-tab.on {background:transparent;color:var(--blue);border-bottom-color:var(--blue);box-shadow:none;}
  .main .jt-tabs .jt-tab:hover,.main .jm-tabs.big .jm-tab:hover {background:#f5f9fd;}
  /* Compact job record: same controls/metadata, rearranged only by desktop CSS. */
  .main .jh2:not(.pg-jh) {display:grid;grid-template-columns:minmax(220px,1fr) auto auto;align-items:center;gap:14px 16px;padding:20px 22px;}
  .jh2:not(.pg-jh) .jh-top {display:contents;}
  .jh2:not(.pg-jh) .jh-id {grid-column:1;grid-row:1;align-self:center;}
  .jh2:not(.pg-jh) .jh-acts {grid-column:3;grid-row:1;display:flex;gap:7px;width:auto;}
  .jh2:not(.pg-jh) .jh-status {grid-column:2;grid-row:1;margin:0;padding:0;border:0;min-width:0;max-width:310px;}
  .jh2:not(.pg-jh) .jh-smeta {padding:0;gap:8px;flex-wrap:wrap;}
  .jh2:not(.pg-jh) .jh-scur {gap:0;}
  .jh2:not(.pg-jh) .jh-sof {display:none;}
  .jh2:not(.pg-jh) .jh-ssub:empty {display:none;}
  .jh2:not(.pg-jh) .jh-facts {grid-column:1/-1;margin:0;padding:0;border:0;}
  .jh2:not(.pg-jh) .jh-f {padding:0;border:0;}
  .jh2:not(.pg-jh) .jh-fl {display:none;}
  .jh2:not(.pg-jh) .jh-ask {grid-column:1/-1;margin:0;}
  .jh2:not(.pg-jh) .flt-ask {border-radius:5px;}
  #jp-save3 {display:none!important;}
  .jh-ref {font-size:12px;font-weight:600;}
  .jh-act {border-radius:6px;box-shadow:none;}
  .main :is(.jp-form,#jm-new) {padding:0 22px;border-radius:0 0 8px 8px;}
  :is(.jp-form,#jm-new) .jm-fsec {padding:20px 0;gap:14px;}
  :is(.jp-form,#jm-new) .jm-fnum {width:22px;height:24px;background:none;color:#33445b;font-size:15px;border-radius:0;}
  :is(.jp-form,#jm-new) .jm-fsec > .grow {display:grid;grid-template-columns:140px minmax(0,1fr);column-gap:20px;row-gap:10px;}
  :is(.jp-form,#jm-new) .jm-fsec > .grow > * {grid-column:2;min-width:0;}
  :is(.jp-form,#jm-new) .jm-fsec > .grow > h3 {grid-column:1;grid-row:1;margin:2px 0 12px;font-size:15px;}
  :is(.jp-form,#jm-new) .jm-cs {gap:24px;}
  :is(.jp-form,#jm-new) .jm-siteinfo .xpill {background:none;border:0;box-shadow:none;padding:2px 0;border-radius:0;font-size:12px;color:var(--blue);min-height:28px;}
  :is(.jp-form,#jm-new) .jm-siteinfo .xpill>svg:first-child {display:none;}
  #jp-foot {display:none;}
  #jp-actbar {position:fixed;bottom:0;right:0;left:var(--side,240px);z-index:45;margin:0;padding:12px 28px;background:#fff;border:0;border-top:1px solid var(--dp-line);box-shadow:0 -3px 12px rgba(20,40,65,.03);min-height:64px;}
  html.side-tuck #jp-actbar {left:var(--side,72px);}
  #jp-actbar .btn {height:38px;font-size:13px;}
  .main:has(#jp-actbar) {padding-bottom:90px;}
  /* Label booking actions on laptop widths as well as wide screens. */
  .main .fb-pri {background:var(--blue);border-color:var(--blue);color:#fff;}
  .main .fb-pri span {display:inline!important;}
  .main .fb-pri {width:auto!important;min-width:64px;padding:0 10px!important;}
  /* Work-first Home: use exactly the same rendered panels and data. */
  #db-root {height:auto;min-height:0;gap:20px;padding:0;}
  #db-root .db-top {padding:0;min-height:0;margin:0;}
  #db-root .db-kpis {gap:12px;}
  #db-root .db-k {border-radius:8px;box-shadow:none;border-color:var(--dp-line);}
  #db-root .db-kh {font-size:13px;}
  #db-root .db-kv {font-weight:700;}
  #db-root .db-grid {align-content:start;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);grid-template-rows:auto auto auto;gap:20px;align-items:start;}
  #db-root .db-rc {display:contents;}
  #db-root .db-att {grid-column:1;grid-row:1/4;min-height:0;max-height:none;}
  #db-root .db-sch {grid-column:2;grid-row:1;min-height:0;max-height:none;}
  #db-root .db-map {grid-column:2;grid-row:2;height:340px;min-height:0;}
  #db-root.db-empty-day .db-map {height:270px;}
  #db-root.db-empty-day .db-grid {grid-template-rows:170px 270px minmax(160px,auto);}
  #db-root .db-wk {grid-column:2;grid-row:3;min-height:0;}
  #db-root .db-ch {padding:16px 18px;min-height:52px;gap:10px;}
  #db-root .db-ch h2 {font-size:16px;}
  #db-root .db-att .db-scroll {overflow:visible;max-height:none;flex:none;}
  #db-root .db-sch .db-scroll {overflow:visible;max-height:none;flex:none;}
  #db-root .db-empty {padding:24px 18px;min-height:0;gap:10px;}
  #db-root.db-empty-day .db-sch .db-empty {display:grid;grid-template-columns:32px minmax(0,1fr) auto;grid-template-rows:auto auto;text-align:left;column-gap:14px;row-gap:5px;height:auto;min-height:110px;justify-content:stretch;}
  #db-root.db-empty-day .db-sch .db-empty >svg {grid-column:1;grid-row:1/3;margin:0;}
  #db-root.db-empty-day .db-sch .db-empty >b {grid-column:2;grid-row:1;align-self:end;}
  #db-root.db-empty-day .db-sch .db-empty >span {grid-column:2;grid-row:2;align-self:start;}
  #db-root.db-empty-day .db-sch .db-empty >.btn {grid-column:3;grid-row:1/3;margin:0;color:#fff;}
  #db-root .db-k .db-kh {font-weight:600;white-space:normal;}
  #db-root .db-k .db-ks {font-weight:400;white-space:normal;line-height:1.5;}
  #db-root .db-k .db-kv em {font-size:12px;white-space:normal;}
  #db-root .db-k .db-bar {display:none;}
  .jh2:not(.pg-jh) .jh-pgx {flex-basis:auto;display:inline;font-weight:400;}
  .jh2:not(.pg-jh) .jh-fv {gap:8px 14px;}
  .topbar.has-gs .tb-date {display:none!important;}
  #db-root .db-card {align-self:start;}
  #db-root .db-att {align-self:start;}

  #db-root .db-a {padding:12px 18px;gap:8px;border-left-width:3px;}
  #db-root .db-at b {font-size:14px;white-space:normal;overflow:visible;text-overflow:clip;}
  #db-root .db-at>span:last-child {font-size:12px;color:var(--dp-muted);white-space:normal;overflow:visible;text-overflow:clip;line-height:1.5;}
  #db-root .db-tag {font-size:11px;font-weight:600;text-transform:none;letter-spacing:0;border-radius:4px;}
  #db-root .db-bars {height:100px;}
  #db-root .db-legend {gap:8px;padding:6px 9px;font-size:10px;flex-wrap:wrap;right:10px;bottom:10px;}
  #db-root:not(.db-empty-day) .db-sch .db-scroll {max-height:520px;overflow:auto;}
  /* Apply the same restrained controls to dispatch, without changing its layout. */
  .jm-sched :is(.btn,.jm-tab),.jm-shead :is(.btn,.jm-tab) {border-radius:6px;box-shadow:none;}
}
@media (min-width:901px) and (max-width:1250px) {
  .main {padding-left:22px;padding-right:22px;}
  .main .jh2:not(.pg-jh) {grid-template-columns:minmax(180px,1fr) auto;}
  .jh2:not(.pg-jh) .jh-acts {grid-column:2;}
  .jh2:not(.pg-jh) .jh-status {grid-row:2;grid-column:1/-1;max-width:none;}
  .jh2:not(.pg-jh) .jh-facts {grid-row:3;}
  #db-root .db-ch {flex-wrap:wrap;}
  #db-root .db-grid {gap:14px;}
}
