/* ClaimTrack Core 4.2.58 — exact desktop composition for Fase 1.
 * The scope below changes only KDP/Fase 1 content.  The shared application
 * shell (sidebar, topbar and footer) remains entirely under the active theme. */

html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-ref-kpi-grid{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:12px!important;
  padding:15px 18px 16px!important;
}
html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-ref-kpi{
  min-height:88px!important;
  padding:13px 15px!important;
  border-color:#26a9b4!important;
  background:linear-gradient(135deg,#20ad5a,#168e47)!important;
}
html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-ref-kpi--total{
  border-color:#5954bd!important;
  background:linear-gradient(135deg,#1b2858,#171850)!important;
}
html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-ref-kpi-inner{
  gap:9px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-ref-kpi-inner>span{
  font-size:12px!important;
}
html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-ref-kpi-metrics strong{
  font-size:22px!important;
}
html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-ref-kpi-debitur{
  font-size:10px!important;
}

@media (min-width:981px){
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-ref-top-grid{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    grid-template-rows:360px 180px!important;
    grid-auto-rows:auto!important;
    gap:14px!important;
    align-items:stretch!important;
    width:auto!important;
    margin:0 16px 14px!important;
    padding:0!important;
  }

  /* Flatten the original chart wrapper.  Its cards become the exact six
   * grid cells used by the reference: 1 large table + 2 upper cards + 4
   * supporting lower cards. */
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-ref-top-grid>.ct-ref-chart-stack,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-image-stack{
    display:contents!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase-image-heading{
    display:none!important;
  }

  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-position-full-card{
    grid-column:1 / span 2!important;
    grid-row:1!important;
    display:block!important;
    align-self:start!important;
    height:auto!important;
    min-height:0!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-position-full-card>h2{
    min-height:18px!important;
    margin:0 0 7px!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-position-full-card>.ct-ref-position-panel{
    display:block!important;
    min-height:0!important;
    height:auto!important;
    overflow:visible!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-position-full-card>.ct-ref-position-panel>.ct-ref-table-wrap{
    display:block!important;
    min-height:0!important;
    height:auto!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) table.ct-ref-table--detail{
    width:100%!important;
    min-height:0!important;
    height:auto!important;
    font-size:8.5px!important;
    line-height:1.05!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) table.ct-ref-table--detail th,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) table.ct-ref-table--detail td{
    height:17px!important;
    padding:2px 3px!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) table.ct-ref-table--detail thead th{
    height:20px!important;
  }

  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-uker-rank{
    grid-column:3!important;
    grid-row:1 / span 2!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-uker-donut{
    grid-column:4!important;
    grid-row:1 / span 2!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-area-donut--reference{
    grid-column:1!important;
    grid-row:2!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-product-donut{
    grid-column:2!important;
    grid-row:2!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-image-stack>.ct-phase1-visual-card:nth-of-type(1){
    grid-column:3!important;
    grid-row:2!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-image-stack>.ct-phase1-visual-card:nth-of-type(2){
    grid-column:4!important;
    grid-row:2!important;
  }

  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-uker-rank,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-uker-donut,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-area-donut--reference,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-product-donut{
    display:flex!important;
    min-width:0!important;
    min-height:0!important;
    flex-direction:column!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-area-donut--reference,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-product-donut{
    height:100%!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-uker-rank,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-uker-donut{
    align-self:start!important;
    height:448px!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-uker-rank>h2,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-uker-donut>h2,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-area-donut--reference>h2,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-product-donut>h2{
    flex:0 0 auto!important;
    min-height:18px!important;
    margin:0 0 7px!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-uker-rank>.ct-ref-rank-card,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-uker-donut>.ct-ref-chart-card,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-area-donut--reference>.ct-ref-chart-card,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-product-donut>.ct-ref-chart-card{
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-image-stack>.ct-phase1-visual-card{
    display:flex!important;
    width:100%!important;
    align-self:end!important;
    height:87px!important;
    min-height:0!important;
    margin:0!important;
    border:1px solid #d3dde6!important;
    border-radius:9px!important;
    box-shadow:0 4px 11px rgba(27,57,81,.08)!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-image-stack>.ct-phase1-visual-card .ct-phase1-visual-card-inner,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-image-stack>.ct-phase1-visual-card img,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-image-stack>.ct-phase1-visual-card .ct-phase1-visual-display-placeholder{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
  }

  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-uker-rank .ct-ref-rank-card{
    padding:9px 10px!important;
    overflow:hidden!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-uker-rank .ct-ref-rank-list{
    gap:5px!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-uker-rank .ct-ref-rank-row{
    grid-template-columns:21px minmax(0,1fr) auto!important;
    gap:5px!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-uker-rank .ct-ref-rank-row>span{
    width:20px!important;
    height:20px!important;
    font-size:9px!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-uker-rank .ct-ref-rank-row i b{
    background:#058fc5!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-uker-rank .ct-ref-rank-row strong,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-uker-rank .ct-ref-rank-row em{
    font-size:9px!important;
  }

  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-area-donut--reference .ct-ref-chart-card,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-product-donut .ct-ref-chart-card{
    display:grid!important;
    grid-template-columns:minmax(100px,.9fr) minmax(0,1.1fr)!important;
    align-items:center!important;
    column-gap:8px!important;
    padding:8px!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-area-donut--reference .ct-ref-donut,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-product-donut .ct-ref-donut{
    width:128px!important;
    height:128px!important;
    margin:0 auto!important;
  }
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-area-donut--reference .ct-ref-donut:after,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-phase1-product-donut .ct-ref-donut:after{
    width:74px!important;
    height:74px!important;
  }
}

/* Reference table treatment, retained in the responsive layout as well. */
html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-ref-top-grid h2,
html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-ref-nominative h2{
  color:#171717!important;
  font-size:12px!important;
  font-weight:800!important;
}
html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-ref-table thead th,
html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-ref-table thead tr:nth-child(2) th,
html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-ref-nominative-table thead th{
  background:#050505!important;
  border-color:#303030!important;
}
html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-ref-table tfoot th{
  background:#0788bd!important;
  border-color:#0788bd!important;
}
html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-ref-table tbody .ct-ref-group th{
  background:#dcefcf!important;
  border-color:#c0dcaf!important;
}

@media (max-width:980px){
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-ref-kpi-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}
@media (max-width:700px){
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-ref-phase--1:not(.ct-stop-loss-dashboard) .ct-ref-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
