:root{
  /* === DKI CORE === */
  --dki-black: #191919;
  --dki-red: #c9282d;
  --dki-white: #ffffff;
  --dki-grey: #6b7280;
  --dki-border: #e5e7eb;
  --dki-bg: #f6f7f8;

  /* === TYPOGRAPHY === */
  --dki-font-heading: "Roboto Condensed", sans-serif;
  --dki-font-body: "Roboto", sans-serif;

  /* === SHADOW === */
  --dki-shadow: 0 10px 24px rgba(0,0,0,0.08);

  /* === MAP OLD CPC → DKI === */
  --cpc-ink: var(--dki-black);
  --cpc-muted: var(--dki-grey);
  --cpc-border: var(--dki-border);
  --cpc-border-strong: #d1d5db;
  --cpc-surface: var(--dki-white);
  --cpc-surface-2: #f7f8fa;

  --cpc-navy: var(--dki-black);     /* 🔥 kills blue */
  --cpc-accent: var(--dki-red);     /* 🔥 replaces indigo */
  --cpc-green: var(--dki-red);      /* 🔥 removes green system */
  --cpc-green-bg: rgba(201,40,45,0.08);
}
.cpc-card--interactive{
  border:1px dashed var(--cpc-border-2);
}


.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.app-card.btn {
  border: none;
  background: #111827;
  color: #e5e7eb;
  padding: 1.5rem;
  border-radius: 1rem;
  flex: 1 1 260px;
  text-align: left;
  box-shadow: 0 10px 20px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: normal;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.35);
  background: #020617;
}

.app-card-icon {
  font-size: 2rem;
  margin-right: 1rem;
}

.app-card-title {
  margin: 0 0 0.25rem 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.app-card-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: #9ca3af;
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

/* =======================
   Page Shell & Panel
======================= */

/* =========================================================
   CPC-style Page Shell + Primary Panel
   (refactor of your existing block, same class names)
   ========================================================= */

/* Page background: clean neutral with gentle depth */
body {
  background: #f6f7f8;         /* slightly warmer than #f3f4f6 */
  color: #1d1f21;
}

/* Outer wrapper (kept) */
.dashboard-wrapper {
  padding: 24px;
}

/* Full-width shell, centers inner layout */
.app-shell {
  padding: 24px;
  box-sizing: border-box;

  display: flex;
  justify-content: center;
}

/* Fixed-width content area */
.app-shell-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;

  display: flex;
  flex-direction: column;
  gap: 18px;                   /* CPC-ish vertical rhythm */
}

/* Primary card panel */
.main-panel {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 48px auto;

  background: rgba(255, 255, 255, 0.98);
  border-radius: 26px;
  padding: 34px 44px 44px 44px;

  /* CPC vibe: lighter, softer shadow + subtle border */
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow:
    0 10px 30px rgba(15, 23, 42, 0.08),
    0 2px 10px rgba(15, 23, 42, 0.05);

  flex: 1 0 auto;
  box-sizing: border-box;
}

/* keep your existing selector but simplify */
.main-panel.recent-files-panel {
  width: 100%;
}

/* Top bar (buttons row) */
.top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

/* Buttons: CPC-like rounded pills */
.btn-add-new,
.btn-import {
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* “Primary” CTA feel */
.btn-add-new {
  padding-inline: 22px;
}

/* “Outline / secondary” CPC feel */
.btn-import {
  font-weight: 600;
  padding-inline: 18px;

  background: transparent;
  border: 1px solid rgba(0, 56, 73, 0.45); /* CPC navy */
  color: #003849;
}

/* hover states (subtle, CPC-ish) */
.btn-import:hover {
  border-color: rgba(0, 56, 73, 0.75);
  background: rgba(217, 246, 255, 0.45);   /* your accent token */
}

.btn-add-new:hover {
  filter: brightness(0.98);
}

/* Title block: CPC-style spacing + typography */
/* =========================================================
   CPC Title Block (works for h1 or h2)
   ========================================================= */

.title-block{
  text-align: center;
  margin: 10px 0 26px 0;
}

.title-block h1,
.title-block h2{
  margin: 0;                       /* kill default heading margins */
  padding: 0;

  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;           
  letter-spacing: 0.10em;

  color: #1d1f21;
  line-height: 1.08;
}

/* Desktop size */
.title-block h1,
.title-block h2{
  font-size: 2.05rem;
}

/* Underline */
.title-underline{
  width: 92px;
  height: 4px;
  margin: 10px auto 0 auto;
  border-radius: 999px;
  background: rgba(0, 56, 73, 0.85); /* CPC navy */
}

/* Optional subtitle under title */
.title-block .title-sub{
  margin-top: 10px;
  font-size: 0.98rem;
  font-weight: 400;
  color: rgba(29, 31, 33, 0.72);
}

/* Mobile */
@media (max-width: 768px){
  .title-block h1,
  .title-block h2{
    font-size: 1.55rem;
    letter-spacing: 0.08em;
  }
  .title-underline{
    width: 72px;
  }
}


/* Mobile tightening */
@media (max-width: 768px) {
  .dashboard-wrapper,
  .app-shell {
    padding: 14px;
  }

  .main-panel {
    padding: 22px 18px 26px 18px;
    border-radius: 20px;
    margin-bottom: 28px;
  }

  .title-block h2 {
    font-size: 1.55rem;
    letter-spacing: 0.08em;
  }

  .title-underline {
    width: 72px;
  }
}


/* =======================
   Dropzone
======================= */

.file-dropzone-wrapper {
  margin-bottom: 24px;
}

.file-dropzone {
  position: relative;
  border-radius: 18px;
  border: 2px dashed #d1d5db;
  background: #f9fafb;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.file-dropzone:hover {
  border-color: #4f46e5;
  background: #eef2ff;
}

.file-dropzone-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.file-dropzone-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.file-dropzone-subtitle {
  font-size: 0.9rem;
  color: #6b7280;
}

/* Let fileInput fill the dropzone cleanly */

.file-dropzone .shiny-input-container {
  margin-bottom: 0;
}

.file-dropzone .btn-file {
  background: transparent;
  border: none;
  color: inherit;
  width: 100%;
  text-align: center;
  padding: 0;
}

.file-dropzone .btn-file:hover,
.file-dropzone .btn-file:focus {
  background: transparent;
  box-shadow: none;
}

.file-dropzone .form-control {
  display: none; /* hide filename textbox */
}

/* =======================
   Filters row
======================= */

.filters-row {
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.filters-row span {
  margin-right: 12px;
}

.filters-row .filter-active {
  color: #16a34a;
  font-weight: 600;
}

/* =======================
   Claim / file cards
======================= */

.claims-table-header {
  display: grid;
  grid-template-columns: 220px 1fr 120px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b7280;
  padding-inline: 8px;
  margin-bottom: 6px;
}

.claim-card {
  border-radius: 18px;
  border: 1px dashed #cbd5f5;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 220px 1fr 120px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.btn-details-left {
  border-radius: 999px;
  width: 36px;
  height: 36px;
  padding: 0;
  margin-right: 10px;
}



.claim-meta {
  display: inline-flex;
  gap: 6px;
  font-size: 0.85rem;
  color: #4b5563;
}

.claim-address {
  font-size: 0.9rem;
}

.claims-footer {
  text-align: center;
  font-size: 0.85rem;
  margin-top: 12px;
  color: #6b7280;
}

/* Responsive */

@media (max-width: 768px) {
  .main-panel {
    padding: 20px;
  }
  .claims-table-header,
  .claim-card {
    grid-template-columns: 1fr;
  }
}

.summary-card-list .card.summary-card {
  width: 100%;
  max-width: 100%;
}

/* dotted-outline row container */
.summary-card{
  background: var(--cpc-surface);
  border: 1px solid var(--cpc-border-strong);
  border-radius: var(--cpc-radius);
  box-shadow: none;
  padding: 14px 16px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

/* header row layout */
.summary-card-header-row{
  display:grid;
  grid-template-columns: 56px 1fr 360px 160px;
  align-items:center;
  gap:16px;
  min-width:0;              /* critical */
}

.summary-card-col.address{
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* column roles */
.summary-card-col {
  font-size: 0.95rem;
  color: #111827;
}

.summary-card-col.details  { flex: 0 0 48px; }    /* chevron */
.summary-card-col.status   { flex: 0 0 120px; }
.summary-card-col.date     { flex: 0 0 120px; }
.summary-card-col.type     { flex: 0 0 120px; }
.summary-card-col.address  {
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.summary-card-col.actions  {
  flex: 0 0 130px;
  text-align: right;
}

/* left chevron button */
.btn-details-chevron{
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--cpc-navy);
  border: none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 6px 14px rgba(15,23,42,.12);
}

.btn-details-chevron i,
.btn-details-chevron svg{
  color:#fff;
  font-size: 18px;
}

/* right-side Details button */
.btn-cpc-details{
  background:##AFE686 !important;
  border: 1px solid #b7c4d6 !important;
  color: var(--cpc-ink) !important;
  border-radius: 12px !important;
  padding: 10px 16px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  box-shadow: none !important;
}

.btn-cpc-details:hover{
  border-color:#8ea3be !important;
  box-shadow: 0 8px 18px rgba(15,23,42,.10) !important;
}


/* status pill (Open) */
.status-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border-radius:999px;
  padding: 6px 12px;
  border:1px solid rgba(34,197,94,.25);
  background: var(--cpc-green-bg);
  color: #166534;
  font-weight:600;
  font-size: 13px;
}

.status-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  border:2px solid rgba(34,197,94,.35);
  background: var(--cpc-green);
}


/* divider above the collapsible body */
.summary-card-body-collapsible{
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--cpc-border);
}

/* ensure inner content sits nicely */
.summary-card-body-collapsible > *:first-child{ margin-top: 0; }
.summary-card-body-collapsible > *:last-child{ margin-bottom: 0; }

/* Make summary cards + file preview cards share the same width */
.summary-card,
.file-preview-card {
  width: 100%;
  max-width: 100%;
}

/* If you want to constrain the row itself (summary & recent files) */
.summary-card-list,
.recent-files-list {
  max-width: 1100px;      /* same as .main-panel */
  margin: 0 auto;
}

/* ============================
   Summary Card Theming (Blue)
   Matches dropzone palette
============================ */

/* Base card — soft translucent blue ring */
.summary-card {
  background-color: #FFFFFF;
  border-radius: 12px;

  /* Tailwind-style ring imitation */
  --ring-color: rgba(201, 40, 45, 0.25);
  box-shadow: 0 0 0 3px var(--ring-color);

  transition: 
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

/* Hover state — subtle glow, no movement */
.summary-card:hover{
  background: var(--cpc-surface) !important;
  border-color: #cfd6df;
  box-shadow: var(--cpc-shadow);
  transform: translateY(-1px);
}

.summary-card.is-open{
  border-color:#cfd6df;
  box-shadow: var(--cpc-shadow);
  transform:none;
}

.modal-dialog .dataTable,
.modal-dialog .dataTables_wrapper,
.modal-dialog table.dataTable {
    font-size: 14px !important;
}

/* Normal card styling */
.claim-card {
  border: 2px solid rgba(30, 64, 175, 0.15);  /* subtle indigo-ish border */
  transition: background-color 0.25s ease, 
              border-color 0.25s ease, 
              box-shadow 0.25s ease;
}

/* Hover state */
.claim-card:hover {
  background-color: #f4f4f5;
  border-color: rgba(30, 64, 175, 0.35); /* <-- darker border for definition */
  box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* subtle lift */
}

/* =======================
   Card system (split)
======================= */

/* Base */
.cpc-card{
  background:#fff;
  border-radius:16px;
  border:1px solid var(--cpc-border);
  box-sizing:border-box;
}

/* STATIC: KPIs / summary panels (no hover fill, no dashed) */
.cpc-card--static{
  transition:none;
}
.cpc-card--static:hover{
  background:#fff !important;
  border-color:var(--cpc-border) !important;
  transform:none !important;
}

/* INTERACTIVE: claim cards (dashed + hover affordance, but NO fill) */
.cpc-card--interactive{
  border:1px var(--cpc-border-2); /* here */
  cursor:pointer;
  transition:border-color .25s ease, box-shadow .25s ease, transform .15s ease;
}
.cpc-card--interactive:hover{
  background:transparent;                 /* 👈 no fill on hover */
  border-color:var(--cpc-accent);
  box-shadow:0 10px 24px rgba(15, 23, 42, 0.12);
  transform:translateY(-2px);
}

/* =======================
   Claim summary preview (charts)
   NO hover / NO highlight
======================= */

#claim_summary_preview_box.summary-card {
  background: #ffffff;
  border: 1px solid var(--cpc-border);
}

/* kill all hover / focus effects */
#claim_summary_preview_box.summary-card:hover,
#claim_summary_preview_box.summary-card:focus,
#claim_summary_preview_box.summary-card:focus-within {
  background: #ffffff !important;
  border-color: var(--cpc-border) !important;
  box-shadow: none !important;
  transform: none !important;
}

/* wrapper that constrains desktop width */
.app-shell-inner,
.main-panel.recent-files-panel {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;

  /* critical for shrinking children (charts, long text) */
  min-width: 0;
}

/* cards must be allowed to shrink inside bootstrap columns/flex */
.summary-card {
  width: 100%;
  min-width: 0;         /* ✅ prevents overflow / forces wrapping */
  box-sizing: border-box;
}

/* highcharter output wrappers sometimes force width */
.highchart-container,
.html-widget,
.highchart {
  width: 100% !important;
  min-width: 0 !important;
}
.workflow-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
}
/* big arrow background */
.wf-arrowbar{
  position:relative;
  padding:14px 18px;
  margin:8px 0 14px 0;

  border-radius:18px;
  background: linear-gradient(90deg, #191919, #2a2a2a);
  border-left: 4px solid #c9282d;
  box-shadow:0 14px 30px rgba(15,23,42,.10);
}

/* inner row */
.wf-arrowbar-inner{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

/* the buttons “living in” the arrow */
.wf-btn{
  background: rgba(255,255,255,.92) !important;
  border: 1px solid rgba(0,0,0,.08) !important;
  color: var(--cpc-ink,#003849) !important;

  border-radius:14px;
  padding:10px 14px;

  font-weight:600;
  font-size:12px;
  letter-spacing:.04em;

  box-shadow:0 10px 20px rgba(15,23,42,.10);
}

.wf-btn:hover{
  background:#fff !important;
}

/* wrapper */
.wf-block{ margin-top: 12px; }

/* header: title left, chevron right */
.wf-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.wf-title{
  font-weight:600;
  letter-spacing:.02em;
  color: var(--cpc-ink,#003849);
  font-size:16px;
  opacity:.9;
}

/* chevron toggle button */
.wf-toggle{
  border:1px solid var(--cpc-border,#d7dee7) !important;
  background:#fff !important;
  border-radius:12px !important;
  padding:8px 10px !important;
  box-shadow:0 8px 18px rgba(15,23,42,.08);
}

.wf-toggle{
  width:44px;
  height:44px;
  border-radius:14px;
  box-shadow:
    0 8px 18px rgba(15,23,42,.10),
    inset 0 1px 0 rgba(255,255,255,.5);
}

.wf-toggle svg{
  transition: transform .2s ease;
}

.wf-toggle span.is-open svg{
  transform: rotate(180deg);
}


/* green arrow bar (clips properly) */
.wf-arrowbar{
  position:relative;
  padding:14px 14px;
  border-radius:18px;
  background:
    linear-gradient(
      90deg,
      rgba(211,244,158,.65)) 0%,
      rgba(211,244,158,.65) 40%,
      rgba(211,244,158,.65) 100%
    );
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.45),
    0 18px 36px rgba(15,23,42,.14);

  overflow:hidden;          /* ✅ prevents spill/overflow */
}


@media (max-width: 1100px){
  .wf-arrowbar::after{ display:none; }  /* ✅ avoids weird arrowhead when wrapping */
}

/* row of buttons */
.wf-row{
  display:flex;
  flex-wrap:wrap;          /* ✅ no squish */
  gap:10px;
  align-items:center;
}

/* buttons living inside the bar */
.wf-btn{
  background: rgba(255,255,255,.92) !important;
  border: 1px solid rgba(0,0,0,.10) !important;
  color: var(--cpc-ink,#003849) !important;

  border-radius:14px !important;
  padding:10px 14px !important;

  font-weight:600;
  font-size:12px;
  letter-spacing:.04em;

  box-shadow:0 10px 20px rgba(15,23,42,.10);
}
.wf-btn:hover{ background:#fff !important; }


/* optional states */
.wf-btn.is-active{
  outline: 2px solid rgba(0,56,73,.35);
}
.wf-btn.is-done{
  background: rgba(0,56,73,.92) !important;
  color:#fff !important;
}

/* stop overlap on last */
.workflow-row .wf-cascade:last-child::after{
  right:8px;
  width:0;
  border:0;
  box-shadow:none;
  background:none;
}

.wf-text{
  letter-spacing:.035em;
  font-size:12px;
  font-weight:600;
}

.wf-arrowbar{
  position: relative;
}

.wf-arrowbar::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg,
      rgba(255,255,255,.25),
      transparent 40%,
      transparent 60%,
      rgba(0,0,0,.06)
    );
  pointer-events:none;
  border-radius:inherit;
}
/* =========================
   Workflow Button (Clean)
========================= */

.wf-cascade{
  display:inline-flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;

  min-height:42px;
  padding:8px 18px;

  border-radius:14px;
  border:1px solid rgba(0,0,0,.10);

  background:
    linear-gradient(
      180deg,
      #ffffff 0%,
      #f6f8fb 100%
    );

  color: var(--cpc-ink, #003849);

  font-weight:600;
  font-size:14px;
  letter-spacing:.04em;

  box-shadow:
    0 6px 14px rgba(15,23,42,.10),
    inset 0 1px 0 rgba(255,255,255,.7);

  transition:
    background-color .15s ease,
    box-shadow .15s ease,
    transform .15s ease,
    border-color .15s ease;
}

/* chevron icon */
.wf-cascade .wf-icon{
  opacity:.7;
}

/* hover */
.wf-cascade:hover{
  background:
    linear-gradient(
      180deg,
      #ffffff 0%,
      #eef2f7 100%
    );
  border-color: var(--cpc-border-2, #b9c6d6);
  transform: translateY(-1px);
  box-shadow:
    0 10px 22px rgba(15,23,42,.14),
    inset 0 1px 0 rgba(255,255,255,.8);
}

/* active (current step) */
.wf-cascade.is-active{
  background:
    linear-gradient(
      180deg,
      rgba(0,56,73,.10),
      rgba(0,56,73,.04)
    );
  border-color: rgba(0,56,73,.35);
}

/* completed step */
.wf-cascade.is-done{
  background:
    linear-gradient(
      180deg,
      rgba(211,244,158,.65),
      rgba(211,244,158,.35)
    );
  border-color: rgba(156,223,22,.55);
}

.wf-cascade .wf-text{
  font-size: 14px !important;
  line-height: 1.1;
}

/* --- Force cpc hover (override bootstrap) --- */
button.wf-cascade:hover,
button.wf-cascade:focus,
button.wf-cascade:active{
  background:
    linear-gradient(
      180deg,
      #ffffff 0%,
      #eef2f7 100%
    ) !important;

  color: var(--cpc-ink, #003849) !important;
  border-color: var(--cpc-border-2, #b9c6d6) !important;
}

button.wf-cascade:hover .wf-text,
button.wf-cascade:hover .wf-icon{
  color: var(--cpc-ink, #003849) !important;
}

.cpc-kv{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  background:#fff;
  border:1px solid var(--cpc-border,#d7dee7);
  border-radius:16px;
  overflow:hidden;
  box-shadow:0 8px 18px rgba(15,23,42,.06);
}

.cpc-kv th, .cpc-kv td{
  padding:10px 12px;
  font-size:12px;
  vertical-align:top;
  border-bottom:1px solid rgba(0,0,0,.06);
}

.cpc-kv tr:last-child th,
.cpc-kv tr:last-child td{
  border-bottom:0;
}

.cpc-kv th{
  width:220px;
  color:rgba(0,56,73,.75);
  font-weight:600;
  letter-spacing:.04em;
  background:var(--cpc-surface-2,#f6f8fb);
}

/* ===== Card header row (cpc rails) ===== */
.card-head{
  display:grid;
  grid-template-columns: 56px 360px 1fr 140px; /* icon | progress/meta | title | actions */
  align-items:center;
  column-gap: 16px;
  min-width: 0;
}

/* left chevron column */
.card-head .col-left{ display:flex; align-items:center; justify-content:center; }

/* progress/meta column */
.card-head .col-progress{
  min-width: 0;
  display:flex;
  align-items:center;
  gap: 12px;
}

/* title column (file name) */
.card-head .col-title{
  min-width: 0;
  display:flex;
  align-items:center;
  gap: 10px;
}

/* actions column */
.card-head .col-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
}

@media (max-width: 900px){
  .card-head{
    grid-template-columns: 56px 1fr;
    grid-template-areas:
      "left title"
      "left progress"
      "left actions";
    row-gap: 10px;
  }
  .card-head .col-left{ grid-area:left; }
  .card-head .col-title{ grid-area:title; }
  .card-head .col-progress{ grid-area:progress; }
  .card-head .col-actions{ grid-area:actions; justify-content:flex-start; }
}

.file-title{
  font-size: 16px;
  font-weight: 500;
  color: var(--cpc-ink);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* if you're showing a tiny dash/secondary text beside it */
.file-title-sub{
  color: var(--cpc-muted);
  font-weight: 500;
  white-space: nowrap;
}

.progress-cluster{
  width: 360px;           /* matches grid rail */
  min-width: 360px;
  display:grid;
  grid-template-columns: 90px 1fr auto; /* 100/100 | bar | status pill */
  align-items:center;
  column-gap: 12px;
}

.progress-count{
  font-weight: 700;
  color: var(--cpc-ink);
  text-align: right;
}

.progress-bar-wrap{
  min-width: 0;
}

/* keep your bar, just make sure it respects the rail */
.progress-bar-wrap .progress{
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
}

.card-head{
  padding-bottom: 14px;
  border-bottom: 1px solid var(--cpc-border);
  margin-bottom: 14px;
}

.card-head{
  display:grid;
  grid-template-columns: 56px 360px 1fr 150px;
  align-items:center;
  column-gap:16px;
  min-width:0;
}

.col-left{ display:flex; align-items:center; justify-content:center; }
.col-progress{ min-width:0; }
.col-title{ min-width:0; display:flex; align-items:center; }
.col-actions{ display:flex; justify-content:flex-end; align-items:center; }

.progress-cluster{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.progress-bar-wrap{ width:260px; min-width:200px; }

.file-title{
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-weight:600;
}

/* ================================
   FIX: slideToggle / collapsibles
   ================================ */

/* The body that slides MUST be a block and must not be height-clamped */
.summary-card-body-collapsible,
.wf-arrowbar,
#wf_dom_id { /* harmless if not present */
  display: block;         /* ✅ critical for jQuery slideToggle */
  height: auto;
  max-height: none;
  overflow: visible;      /* ✅ prevents "limits out" */
}

/* If any parent clamps overflow, the expanding body gets clipped */
.summary-card,
.summary-card .card,
.summary-card .card-body,
.summary-card .bslib-card {
  overflow: visible !important;
}

/* Make sure hidden state is only display:none and not forced by CSS */
.summary-card-body-collapsible[style*="display:none"]{
  height: auto !important;
  max-height: none !important;
}

/* Ensure header buttons are clickable */
.summary-card .btn,
.summary-card button,
.summary-card a{
  pointer-events: auto;
  position: relative;
  z-index: 5;
}

/* Prevent a parent overlay from stealing clicks */
.summary-card,
.summary-card *{
  pointer-events: auto;
}

/* Choose ONE header system: card-head */
.summary-card-header-row{
  display: contents;   /* neutralize old wrapper without breaking DOM */
}

/* Final authoritative header layout */
.summary-card .card-head{
  display: grid !important;
  grid-template-columns: 56px 360px 1fr 150px;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

/* Allow shrink + ellipsis */
.summary-card .col-title,
.summary-card .col-progress{
  min-width: 0;
}

.summary-card .file-title{
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* NEW NEED TO CHECK */

/* =========================================================
   Normalize bslib::card_header so upload + summary match
   ========================================================= */

/* Kill Bootstrap header chrome */
.summary-card > .card-header{
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Prevent header from shrinking or wrapping differently */
.summary-card > .card-header,
.summary-card-header-row,
.summary-card-header-row > div{
  min-width: 0;
  box-sizing: border-box;
}

/* Force identical grid behavior */
.summary-card-header-row{
  display: grid !important;
  grid-template-columns: 56px 360px 1fr 160px; /* chevron | progress | title | actions */
  align-items: center;
  gap: 16px;
}

/* Address/title must be allowed to shrink */
.summary-card-col.address{
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Status/progress rail must not stretch */
.summary-card-col.status{
  min-width: 0;
}

/* Actions never wrap */
.summary-card-col.actions{
  white-space: nowrap;
}

.cpc-kv-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.cpc-kv-row {
  display: flex;
  gap: 8px;
}
.cpc-kv-label {
  font-weight: 600;
  min-width: 80px;
  color: #5c6b73;
}
.cpc-kv-value {
  color: #1f2d3d;
}

.cpc-debug-box{
  margin-bottom:12px;
  padding:10px 12px;
  border:1px dashed rgba(0,0,0,.15);
  border-radius:10px;
  background:#fff;
}
.cpc-debug-title{
  font-weight:600;
  font-size:12px;
  opacity:.7;
  margin-bottom:6px;
}
.cpc-debug-box pre{
  max-height:160px;
  overflow:auto;
  margin:0;
  font-size:11px;
  line-height:1.25;
}

.cpc-debug-log {
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
  background: #0b1220;
  color: #e6edf3;
  padding: 10px;
  border-radius: 10px;
  font-size: 12px;
}

.cpc-tour-btn{
  position:absolute;
  top:10px;
  right:10px;
  border-radius:999px;
  padding:6px 8px;
  line-height:1;
}

/* make the rounded card the positioning context */
.cpc-card-relative{
  position: relative;
}

/* top-right help button on the card itself */
.cpc-card-help{
  position: absolute;
  top: 14px;
  left: 14px;          /* or right: 14px; if you prefer */
  z-index: 5;

  border-radius: 999px;
  padding: 6px 8px;
  line-height: 1;

  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.12);
}

/* optional: subtle hover */
.cpc-card-help:hover{
  background: #fff;
}

.btn-cpc-icon{
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 12px;
}

/* =========================================================
   ESTIMATE CARD GRID - FINAL OVERRIDE
   ========================================================= */

.summary-card-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)) !important;
  gap: 1.25rem !important;

  width: 100%;
  max-width: 100% !important;
  margin: 0 auto;
}

/* Cards can no longer force full row */
.summary-card-list .summary-card.card,
.summary-card-list .summary-card {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
}

/* Better desktop proportions */
@media (min-width: 1600px) {
  .summary-card-list {
    grid-template-columns:
      repeat(auto-fit, minmax(480px, 1fr)) !important;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .summary-card-list {
    grid-template-columns: 1fr !important;
  }
}