/* Step 205 — match Write Check header/KPIs to the real Dealer Overview/Inventory/Deals shell.
   Scoped visual change; original check save, print and allocation logic unchanged. */
@media screen {
  #main-app .ld201-checks-shell .ld201-checks-page {
    padding:10px 10px 20px 18px!important;
  }
  #main-app .ld201-checks-shell .ld201-checks-header {
    display:flex!important;
    justify-content:space-between!important;
    align-items:flex-start!important;
    min-height:95px!important;
    padding:0 0 11px 8px!important;
    gap:18px!important;
  }
  #main-app .ld201-checks-shell .ld201-checks-header .ld166-heading h1 {
    font-size:33px!important;
    line-height:1.12!important;
    letter-spacing:-.7px!important;
    font-weight:850!important;
    margin:0 0 5px!important;
    padding:0!important;
    text-transform:none!important;
    color:var(--ld166-text)!important;
    background:none!important;
    -webkit-text-fill-color:var(--ld166-text)!important;
    text-shadow:none!important;
  }
  #main-app .ld201-checks-shell .ld201-checks-header .ld166-heading h1:before,
  #main-app .ld201-checks-shell .ld201-checks-header .ld166-heading h1:after { content:none!important; }
  #main-app .ld201-checks-shell .ld201-checks-header .ld166-heading>div {font-size:13px!important;color:var(--ld166-muted)!important;}
  #main-app .ld201-checks-shell .ld205-check-kpis {
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:8px!important;
    margin:0 0 13px!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
  }
  #main-app .ld201-checks-shell .ld205-check-kpis .ld166-kpi {
    display:flex!important;
    align-items:center!important;
    min-height:99px!important;
    border:1px solid var(--ld166-highlight)!important;
    border-radius:10px!important;
    background:var(--ld166-panel)!important;
    box-shadow:var(--ld166-shadow)!important;
    gap:11px!important;
    padding:14px 13px!important;
    min-width:0!important;
  }
  #main-app .ld201-checks-shell .ld205-check-kpis .ld166-kpi-ico {
    color:var(--ld166-highlight)!important;
    align-self:flex-start!important;
    margin-top:9px!important;
    flex:none;
  }
  #main-app .ld201-checks-shell .ld205-check-kpis .ld166-kpi-label {font-size:11px!important;font-weight:800!important;color:var(--ld166-text)!important;letter-spacing:.5px!important;white-space:normal!important;}
  #main-app .ld201-checks-shell .ld205-check-kpis .ld166-kpi-val {font-size:27px!important;line-height:1.2!important;color:var(--ld166-text)!important;margin:2px 0!important;font-weight:900!important;white-space:normal!important;overflow-wrap:anywhere!important;}
  #main-app .ld201-checks-shell .ld205-check-kpis .ld166-kpi-foot {font-size:11px!important;color:var(--ld166-muted)!important;line-height:1.4!important;}
  #main-app .ld201-checks-shell .ld200-notice {
    display:flex!important;align-items:center;gap:9px;
    color:var(--ld166-muted)!important;
    background:var(--ld166-panel)!important;
    border:1px solid var(--ld166-line)!important;
    border-left:3px solid var(--ld166-highlight)!important;
    border-radius:9px!important;
    padding:9px 13px!important;
    margin:0 0 13px!important;
    min-height:39px!important;
    font-size:11px!important;
    font-weight:650!important;
  }
  #main-app .ld201-checks-shell .ld200-notice svg {width:18px;height:18px;flex:none;color:var(--ld166-highlight)!important;}
}
@media screen and (max-width:1400px){
  #main-app .ld201-checks-shell .ld205-check-kpis .ld166-kpi {padding:12px 9px!important;gap:6px!important;}
  #main-app .ld201-checks-shell .ld205-check-kpis .ld166-kpi-val {font-size:23px!important;}
}
@media screen and (max-width:1050px){
  #main-app .ld201-checks-shell .ld205-check-kpis {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  #main-app .ld201-checks-shell .ld201-checks-header {flex-wrap:wrap!important;}
}
@media screen and (max-width:620px){
  #main-app .ld201-checks-shell .ld201-checks-page {padding:8px!important;}
  #main-app .ld201-checks-shell .ld201-checks-header {padding:0 0 8px!important;min-height:0!important;}
  #main-app .ld201-checks-shell .ld201-checks-header .ld166-heading h1 {font-size:23px!important;}
  #main-app .ld201-checks-shell .ld205-check-kpis .ld166-kpi-label {font-size:10px!important;}
  #main-app .ld201-checks-shell .ld205-check-kpis .ld166-kpi-val {font-size:21px!important;}
  #main-app .ld201-checks-shell .ld205-check-kpis .ld166-kpi-ico .ld166-icon{width:22px;height:22px;}
}

/* The allocation dialog is appended directly to document.body, OUTSIDE the
   shared .ld166-shell. Hence it must receive the active theme explicitly.
   This fixes Day mode persisting the older global Night tokens. */
@media screen {
 body:not(.parts-green-theme) .ld205-split-backdrop[data-ld204-theme="day"] {
   --ld202-bg:#f0f5fb;
   --ld202-panel:#ffffff;
   --ld202-panel2:#f5f9fd;
   --ld202-soft:#e8f3fc;
   --ld202-input:#f7fbff;
   --ld202-text:#102b45;
   --ld202-secondary:#496880;
   --ld202-border:#c2d6e8;
   --ld202-accent:#008ece;
   --ld202-accent2:#087bd4;
   --ld202-table:#e9f3fb;
   --ld202-focus:#097cce;
   --ld202-shadow:0 22px 65px rgba(17,46,77,.23);
   color-scheme:light;
 }
 body:not(.parts-green-theme) .ld205-split-backdrop[data-ld204-theme="night"] {
   --ld202-bg:#061b2d;
   --ld202-panel:#0b263d;
   --ld202-panel2:#10324b;
   --ld202-soft:#13364f;
   --ld202-input:#092b44;
   --ld202-text:#f0f8ff;
   --ld202-secondary:#b7d0e1;
   --ld202-border:#2b607f;
   --ld202-accent:#00c2ed;
   --ld202-accent2:#0986d5;
   --ld202-table:#0b2c45;
   --ld202-focus:#37d9f8;
   --ld202-shadow:0 25px 80px rgba(0,0,0,.52);
   color-scheme:dark;
 }
 body:not(.parts-green-theme) .ld205-split-backdrop .ld204-split-dialog {
   color:var(--ld202-text)!important;
   color-scheme:inherit!important;
   background:var(--ld202-panel)!important;
   border-color:var(--ld202-border)!important;
 }
 body:not(.parts-green-theme) .ld205-split-backdrop .ld204-header,
 body:not(.parts-green-theme) .ld205-split-backdrop .ld204-ledger {background:var(--ld202-panel)!important;}
 body:not(.parts-green-theme) .ld205-split-backdrop .ld204-side,
 body:not(.parts-green-theme) .ld205-split-backdrop .ld110-mixed-footer {background:var(--ld202-panel2)!important;}
 body:not(.parts-green-theme) .ld205-split-backdrop .ld203-check-banner,
 body:not(.parts-green-theme) .ld205-split-backdrop .ld203-total-item.ld203-remaining {background:var(--ld202-soft)!important;}
 body:not(.parts-green-theme) .ld205-split-backdrop .ld204-split-dialog :is(h2,h3,strong,b,.ld204-side-heading,.ld203-rows-head strong,.ld203-line-number) {text-shadow:none!important;}
 body:not(.parts-green-theme) .ld205-split-backdrop[data-ld204-theme="day"] .ld204-split-dialog :is(input,select,.ld203-inherited-category) {background:var(--ld202-input)!important;color:var(--ld202-text)!important;border-color:var(--ld202-border)!important;color-scheme:light!important;}
 body:not(.parts-green-theme) .ld205-split-backdrop[data-ld204-theme="day"] .ld204-split-dialog input::placeholder {color:#647c90!important;opacity:1!important;}
 body:not(.parts-green-theme) .ld205-split-backdrop .ld204-split-dialog #split-add,
 body:not(.parts-green-theme) .ld205-split-backdrop .ld204-split-dialog #split-add-shop,
 body:not(.parts-green-theme) .ld205-split-backdrop .ld204-split-dialog #split-cancel,
 body:not(.parts-green-theme) .ld205-split-backdrop .ld204-split-dialog #split-close {background:var(--ld202-soft)!important;color:var(--ld202-text)!important;border:1px solid var(--ld202-border)!important;}
 body:not(.parts-green-theme) .ld205-split-backdrop .ld204-split-dialog #split-save {background:linear-gradient(100deg,#05a4f5,#0876dc)!important;color:#fff!important;border-color:#0b9eeb!important;}
 body:not(.parts-green-theme) .ld205-split-backdrop .ld204-split-dialog .ld110-mixed-results,
 body:not(.parts-green-theme) .ld205-split-backdrop .ld204-split-dialog .ld110-mixed-results button {background:var(--ld202-panel)!important;color:var(--ld202-text)!important;border-color:var(--ld202-border)!important;}
 body:not(.parts-green-theme) .ld205-split-backdrop .ld204-split-dialog .ld110-mixed-results button:hover {background:var(--ld202-soft)!important;}
 body:not(.parts-green-theme) .ld205-split-backdrop[data-ld204-theme="day"] .ld204-split-dialog .ld203-remaining[data-state="pending"] strong {color:#a26000!important;}
 body:not(.parts-green-theme) .ld205-split-backdrop[data-ld204-theme="day"] .ld204-split-dialog .ld203-remaining[data-state="balanced"] strong {color:#09784a!important;}
 body:not(.parts-green-theme) .ld205-split-backdrop[data-ld204-theme="day"] .ld204-split-dialog .ld203-remaining[data-state="over"] strong {color:#bd3345!important;}
}
