/* ClaimTrack Core 4.2.46 — no-empty-space Potensi Stop Loss grid.
 * The outer cards span the two rows occupied by UKER and Area Head cards. */

@media (min-width:981px) {
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-stop-loss-dashboard.ct-stop-loss-dashboard--one-column .ct-ref-top-grid,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-stop-loss-dashboard.ct-stop-loss-dashboard--one-column .ct-ref-kpi-grid {
    display:grid !important;
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    grid-auto-rows:auto !important;
    column-gap:14px !important;
    row-gap:14px !important;
    width:calc(100% - 32px) !important;
    margin-left:16px !important;
    margin-right:16px !important;
    align-items:stretch !important;
    box-sizing:border-box !important;
  }

  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-stop-loss-dashboard.ct-stop-loss-dashboard--one-column .ct-ref-top-grid > .ct-ref-chart-stack {
    display:contents !important;
  }

  /* POSISI fills the first column from the UKER row to the Berkas row. */
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-stop-loss-dashboard.ct-stop-loss-dashboard--one-column .ct-ref-top-grid > .ct-stop-loss-position {
    grid-column:1 / 2 !important;
    grid-row:1 / 3 !important;
    width:100% !important;
    max-width:none !important;
    min-height:0 !important;
    display:flex !important;
    flex-direction:column !important;
    align-self:stretch !important;
  }

  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-stop-loss-dashboard.ct-stop-loss-dashboard--one-column .ct-stop-loss-position > .ct-ref-position-panel,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-stop-loss-dashboard.ct-stop-loss-dashboard--one-column .ct-stop-loss-position > .ct-ref-position-panel > .ct-ref-table-wrap {
    display:flex !important;
    flex:1 1 auto !important;
    min-height:0 !important;
  }

  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-stop-loss-dashboard.ct-stop-loss-dashboard--one-column .ct-stop-loss-position .ct-ref-table--phase1-bo {
    height:100% !important;
  }

  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-stop-loss-dashboard.ct-stop-loss-dashboard--one-column .ct-ref-chart-stack > .ct-phase1-uker-donut {
    grid-column:2 !important;
    grid-row:1 !important;
  }

  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-stop-loss-dashboard.ct-stop-loss-dashboard--one-column .ct-ref-chart-stack > .ct-phase1-uker-rank {
    grid-column:3 !important;
    grid-row:1 !important;
  }

  /* Area Head summaries sit directly below their respective UKER cards. */
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-stop-loss-dashboard.ct-stop-loss-dashboard--one-column .ct-ref-chart-stack > .ct-stop-loss-area-card:nth-of-type(3) {
    grid-column:2 !important;
    grid-row:2 !important;
  }

  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-stop-loss-dashboard.ct-stop-loss-dashboard--one-column .ct-ref-chart-stack > .ct-stop-loss-area-card:nth-of-type(4) {
    grid-column:3 !important;
    grid-row:2 !important;
  }

  /* The vertical image fills the Total column across the same two rows. */
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-stop-loss-dashboard.ct-stop-loss-dashboard--one-column .ct-ref-top-grid > .ct-stop-loss-image--vertical {
    grid-column:4 !important;
    grid-row:1 / 3 !important;
    min-width:0 !important;
    min-height:0 !important;
    display:flex !important;
    align-self:stretch !important;
  }

  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-stop-loss-dashboard.ct-stop-loss-dashboard--one-column .ct-stop-loss-image--vertical .ct-stop-loss-image-card {
    position:relative !important;
    flex:1 1 auto !important;
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
    aspect-ratio:auto !important;
    overflow:hidden !important;
  }

  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-stop-loss-dashboard.ct-stop-loss-dashboard--one-column .ct-stop-loss-image--vertical .ct-stop-loss-image-card img,
  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-stop-loss-dashboard.ct-stop-loss-dashboard--one-column .ct-stop-loss-image--vertical .ct-stop-loss-image-placeholder {
    position:absolute !important;
    inset:0 !important;
    width:100% !important;
    height:100% !important;
    object-fit:cover !important;
  }
}

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

  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-stop-loss-dashboard.ct-stop-loss-dashboard--one-column .ct-ref-top-grid > .ct-stop-loss-position {
    grid-column:1 / 2 !important;
    grid-row:1 !important;
  }

  html body .ct-app.ct-view-claim-phase[data-ct-phase-code="KDP"] .ct-stop-loss-dashboard.ct-stop-loss-dashboard--one-column .ct-ref-top-grid > .ct-stop-loss-image--vertical {
    grid-column:2 !important;
    grid-row:3 !important;
  }
}
