/* ============================================================================
   backend-cards - the backend's grid cards (.pgc-*): Press Campaigns
   (/marketing_programs/my_programs ...) and Newsletter / Magazine / Ebook
   (/newsletter/all, /magazine/all, /ebook/all). Markup: one partial,
   application/views/enduser/inc/backend_cards.php, inside
   enduser/inc/backend_card_grid.php. Linked once by beckend_colors.php, next to
   backend-feed.css (whose .live-feed-filter-pills tabs and .live-feed-load-more
   button these pages reuse as they are).

   Same family as the Events cards (events_theme/events_cms.php): white, 20px
   corners, soft shadow, on hover a small lift and a gradient edge.
   Colours: var(--site_color_g), var(--site_font_color_g), var(--secondary-color)
   only (plus the danger pair #FDE7E5 / #A6302A). 14px is the smallest text.
   ============================================================================ */

.pgc-page {
  --pgc-ink: var(--site_font_color_g);
  --pgc-soft: color-mix(in srgb, var(--site_font_color_g) 68%, #fff);
  --pgc-tint: color-mix(in srgb, var(--site_color_g) 8%, #fff);
  --pgc-line: color-mix(in srgb, var(--site_font_color_g) 8%, transparent);
  --pgc-rest: 0 1px 2px rgba(8, 15, 84, .05), 0 12px 28px -20px rgba(8, 15, 84, .45);
  overflow-x: clip;
}

/* page head + filter tabs */
.pgc-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.pgc-h { margin: 0; font-size: 22px; font-weight: 800; color: var(--pgc-ink); }
.pgc-new { border-radius: 12px; font-size: 14px; font-weight: 800; }
.pgc-tabs { margin-bottom: 16px; }
.pgc-tabs a.pill-filter, .pgc-tabs a.pill-filter:hover, .pgc-tabs a.pill-filter:focus { text-decoration: none; }
/* two tab bars in a row (type, then status): the second sits close under the first */
.pgc-tabs + .pgc-tabs, .bf-pills + .bf-pills { margin-top: 0 !important; }
.pgc-tabs:has(+ .pgc-tabs), .bf-pills:has(+ .bf-pills) { margin-bottom: 8px !important; }

/* search (Opportunities Center) */
.pgc-search { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; max-width: 560px; margin: 16px 0 0; padding: 5px 5px 5px 14px; border-radius: 14px; background: #fff; box-shadow: var(--pgc-rest); color: var(--pgc-soft); }
.pgc-search svg { flex: 0 0 18px; }
.pgc-search input[type="search"] { flex: 1 1 160px; width: auto; min-width: 0; height: 40px; padding: 0 4px; border: 0; outline: 0; background: none; box-shadow: none; font-size: 14px; color: var(--pgc-ink); }
.pgc-search-go { flex: 0 0 auto; height: 40px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--site_color_g); color: #fff; font-size: 14px; font-weight: 800; cursor: pointer; }
.pgc-search-go:hover { background: color-mix(in srgb, var(--site_color_g) 86%, #000); }
.pgc-search:focus-within { box-shadow: var(--pgc-rest), 0 0 0 2px color-mix(in srgb, var(--site_color_g) 45%, transparent); }
body .pgc-search-clear { flex: 0 0 auto; padding: 0 8px; font-size: 14px; font-weight: 700; color: var(--site_color_g) !important; }

/* the grid: 1 column on phones, 2 from 768, 3 from 1200 */
.pgc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.pgc-tabs + .pgc-grid { margin-top: 0; }
@media (min-width: 768px) { .pgc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .pgc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* the card */
.pgc-card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  padding: 18px; border: 1.5px solid transparent; border-radius: 20px;
  background: #fff; box-shadow: var(--pgc-rest);
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s, background .3s;
}
.pgc-card:hover, .pgc-card:focus-within {
  transform: translateY(-4px); z-index: 2;
  background: linear-gradient(#fff, #fff) padding-box,
              linear-gradient(135deg, var(--site_color_g), color-mix(in srgb, var(--site_color_g) 55%, #b9a8ff) 45%, var(--secondary-color)) border-box;
  box-shadow: 0 30px 54px -26px color-mix(in srgb, var(--site_color_g) 55%, transparent), 0 10px 22px -16px rgba(8, 15, 84, .25);
}
.pgc-card:has(.dropdown-menu.show) { z-index: 5; }

/* author row + the three-dots menu (no border, no background: just the dots) */
.pgc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; }
.pgc-author { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pgc-author a { text-decoration: none !important; }
.pgc-av { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--pgc-tint); }
.pgc-who { display: flex; flex-direction: column; min-width: 0; }
body .pgc-name { overflow: hidden; font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--pgc-ink) !important; white-space: nowrap; text-overflow: ellipsis; }
body .pgc-name:hover { color: var(--site_color_g) !important; }
.pgc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; font-size: 14px; line-height: 1.35; color: var(--pgc-soft); }
.pgc-meta .post-views { gap: 4px; font-size: 14px; color: var(--pgc-soft); }
.pgc-meta .post-views::before { content: "\00B7"; margin-right: 4px; }
.pgc-meta .post-views svg { width: 15px; height: 15px; }
.pgc-menu { flex: 0 0 auto; }
.pgc-dots { display: inline-grid; place-items: center; width: 36px; height: 36px; margin: -6px -8px -6px 0; padding: 0; border: 0 !important; border-radius: 10px; background: none !important; box-shadow: none !important; color: var(--pgc-soft); cursor: pointer; }
.pgc-dots:hover, .pgc-dots[aria-expanded="true"] { color: var(--site_color_g); }
.pgc-dots:focus { outline: 0; }
.pgc-dots:focus-visible { outline: 2px solid var(--site_color_g); outline-offset: 2px; }
.pgc-menu .dropdown-menu { min-width: 210px; padding: 6px; border: 0; border-radius: 14px; box-shadow: 0 24px 48px -20px rgba(8, 15, 84, .45), 0 0 0 1px color-mix(in srgb, var(--site_font_color_g) 10%, transparent); }
/* .pgc-menu.dropdown: outranks the admin theme's ".dropdown .dropdown-menu .dropdown-item" (13px) */
.pgc-menu.dropdown .dropdown-menu .dropdown-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 10px; background: none; font-size: 14px; font-weight: 600; line-height: 1.4; white-space: normal; text-align: left; color: var(--pgc-ink) !important; cursor: pointer; }
.pgc-menu.dropdown .dropdown-menu .dropdown-item svg { flex: 0 0 16px; color: var(--pgc-soft); }
.pgc-menu.dropdown .dropdown-menu .dropdown-item:hover, .pgc-menu.dropdown .dropdown-menu .dropdown-item:focus { background: var(--pgc-tint); color: var(--site_color_g) !important; }
.pgc-menu.dropdown .dropdown-menu .dropdown-item:hover svg, .pgc-menu.dropdown .dropdown-menu .dropdown-item:focus svg { color: var(--site_color_g); }
.pgc-menu.dropdown .dropdown-menu .dropdown-item.is-danger, .pgc-menu.dropdown .dropdown-menu .dropdown-item.is-danger svg { color: #A6302A !important; }
.pgc-menu.dropdown .dropdown-menu .dropdown-item.is-danger:hover, .pgc-menu.dropdown .dropdown-menu .dropdown-item.is-danger:focus { background: #FDE7E5; }

/* media: 16:9, rounded; no picture = a soft tint with a small icon */
.pgc-media { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--pgc-tint); }
.pgc-media img { position: absolute; inset: 0; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pgc-card:hover .pgc-media img { transform: scale(1.03); }
.pgc-ph { position: absolute; inset: 0; display: grid; place-items: center; color: color-mix(in srgb, var(--site_color_g) 55%, #fff); }
.pgc-play { z-index: 2; position: absolute; left: 12px; bottom: 12px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--site_color_g); }

/* chips, title, excerpt */
.pgc-body { display: flex; flex-direction: column; min-width: 0; }
.pgc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 10px; }
.pgc-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 10px; border: 0; border-radius: 999px; background: var(--pgc-tint); color: var(--site_color_g) !important; font-size: 14px; font-weight: 700; line-height: 1.4; white-space: nowrap; text-decoration: none !important; }
.pgc-chip svg { flex: 0 0 auto; }
.pgc-chip-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
a.pgc-chip:hover { background: color-mix(in srgb, var(--site_color_g) 16%, #fff); }
.pgc-chip.is-live { background: color-mix(in srgb, var(--secondary-color) 16%, #fff); color: var(--pgc-ink) !important; }
.pgc-chip.is-live::before { content: ""; flex: 0 0 8px; height: 8px; border-radius: 50%; background: var(--secondary-color); }
.pgc-chip.is-draft { background: color-mix(in srgb, var(--site_color_g) 12%, #fff); }
.pgc-chip.is-pending { background: #fff; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--site_color_g) 35%, transparent); }
.pgc-chip.is-brand { background: color-mix(in srgb, var(--site_font_color_g) 6%, #fff); color: var(--pgc-ink) !important; }
.pgc-chips + .pgc-title { margin-top: 0; }
.pgc-title { margin: 14px 0 6px; font-size: 17px; font-weight: 800; line-height: 1.35; letter-spacing: -.005em; }
body .pgc-title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; color: var(--pgc-ink) !important; text-decoration: none; }
body .pgc-title a:hover { color: var(--site_color_g) !important; }
.pgc-excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--pgc-soft); overflow-wrap: anywhere; }

/* action row: compact icon + label, under a light divider */
.pgc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--pgc-line); }
.pgc-body + .pgc-actions { margin-top: 14px; }
.pgc-card > .pgc-body { flex: 1 1 auto; }
body .pgc-actions .pgc-act { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: none; color: var(--pgc-soft) !important; font-size: 14px; font-weight: 600; line-height: 1.3; white-space: nowrap; text-decoration: none !important; transition: background .2s, color .2s; }
body .pgc-actions .pgc-act svg { flex: 0 0 16px; }
body .pgc-actions .pgc-act:hover, body .pgc-actions .pgc-act:focus-visible { background: var(--pgc-tint); color: var(--site_color_g) !important; }
body .pgc-actions .pgc-act.is-danger:hover, body .pgc-actions .pgc-act.is-danger:focus-visible { background: #FDE7E5; color: #A6302A !important; }

/* Load more (backend-feed.css draws it), empty state */
.pgc-more[hidden] { display: none !important; }
.pgc-empty { margin-top: 16px; padding: 40px 18px; border-radius: 20px; background: #fff; text-align: center; box-shadow: var(--pgc-rest); }
.pgc-empty h3 { margin: 0 0 6px; font-size: 16px; font-weight: 800; color: var(--pgc-ink); }
.pgc-empty p { margin: 0; font-size: 14px; color: var(--pgc-soft); }

@media (max-width: 575.98px) {
  .pgc-h { font-size: 20px; }
  .pgc-actions { gap: 0; justify-content: space-between; }
  body .pgc-actions .pgc-act { gap: 5px; padding: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .pgc-card, .pgc-media img { transition: none; }
  .pgc-card:hover, .pgc-card:focus-within { transform: none; }
  .pgc-card:hover .pgc-media img { transform: none; }
}

/* ============================================================================
   Dashboard stat cards (.qdc-*) - every dashboard's cards: portal admin, staff,
   client, analytics (opp_mgmt/dashboard, /dashboard, the client hub dashboard,
   Activity Reports). Markup: enduser/dash_part/cards/cm_default.php (one
   partial), section_head.php, attention_strip.php. Charts and hover:
   themes/shared/js/dash-cards.js (one shared three.js canvas per page).
   Approved compact layout 2026-10-20 (qme-dashboard-compact). The accent is
   the portal colour var(--site_color_g); good / watch / attention stay
   semantic. 14px is the smallest text.
   ============================================================================ */
.qdc-card, .qdc-att, .qdc-sec-head, .qdc-empty-state {
  --qdc-accent: var(--site_color_g, #1a8fd6);
  --qdc-accent-soft: color-mix(in srgb, var(--qdc-accent) 12%, #fff);
  --qdc-fg: #14213a; --qdc-muted: #5b6880; --qdc-line: #e1e7f0;
  --qdc-surface: #fff; --qdc-surface-2: #eef2f8;
  --qdc-good: #1f8a5b; --qdc-good-soft: #e2f4ea;
  --qdc-warn: #b8730c; --qdc-warn-soft: #fdf0d9;
  --qdc-bad: #c23b3b;  --qdc-bad-soft: #fbe5e5;
  --qdc-shadow: 0 1px 2px rgba(20,33,58,.06), 0 10px 24px rgba(20,33,58,.09);
  --qdc-glare: rgba(255,255,255,.45);
  /* a breakdown's parts (donuts, legends): the accent, then clearly different HUES (amber,
     violet, rose, teal, slate), never shades of one; grey only for "not set" / remaining.
     dash-cards.js moves any of c2..c6 that sits too close to this portal's accent to the
     end, so the first parts always read apart. Plain values: the WebGL charts read them
     with getComputedStyle. */
  --qdc-c1: var(--site_color_g, #1a8fd6); --qdc-c2: var(--qdc-p2, #d48a14); --qdc-c3: var(--qdc-p3, #7b5bd6);
  --qdc-c4: var(--qdc-p4, #d24d7a); --qdc-c5: var(--qdc-p5, #0f9d8a); --qdc-c6: var(--qdc-p6, #5b6b82); --qdc-rest: #c3cbd8;
  /* THE HOVER READOUT: one green on every chart = "what I am pointing at" (its own token,
     not the status --qdc-good). #1f7a52 on #fff is 5.3:1, on its tint 4.65:1. */
  --qdc-readout: #1f7a52; --qdc-readout-bg: #e7f3ed;
}
/* the dashboard's dark theme (assets/dashboard/css/dark-theme.css): the cards follow it */
html.dark-theme .qdc-card, html.dark-theme .qdc-att, html.dark-theme .qdc-sec-head, html.dark-theme .qdc-empty-state {
  --qdc-fg: #e8edf5; --qdc-muted: #a7b2c5; --qdc-line: #2d3543; --qdc-surface: #1d222b; --qdc-surface-2: #2a313d;
  --qdc-accent-soft: color-mix(in srgb, var(--qdc-accent) 22%, #1d222b); --qdc-rest: #4a5466;
  --qdc-readout: #5fd39b; --qdc-readout-bg: #203b30; /* 8.6:1 on the dark card, 6.5:1 on its tint */
}

/* grid: 3 / 2 / 1 per row, 14px apart, equal heights, a short last row left-aligned */
.row:has(> .qdc-col), .row:has(> * > .qdc-col) {
  display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch;
  margin: 0 0 8px; --bs-gutter-x: 0; --bs-gutter-y: 0;
}
.row:has(> .qdc-col) > *, .row:has(> * > .qdc-col) > * { width: auto; max-width: none; flex: none; padding: 0; margin: 0 !important; }
@media (max-width: 1100px) { .row:has(> .qdc-col), .row:has(> * > .qdc-col) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 699px)  { .row:has(> .qdc-col), .row:has(> * > .qdc-col) { grid-template-columns: minmax(0, 1fr); } }
.qdc-col { height: 100%; padding: 0; }
.qme-user-container:has(.qdc-card), .dashboard-grid:has(.qdc-card) { padding-bottom: 96px; }

/* card */
.qdc-card {
  position: relative; height: 100%; min-width: 0; overflow: hidden;
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 16px 10px; border: 1px solid var(--qdc-line); border-radius: 14px;
  background: var(--qdc-surface); color: var(--qdc-fg); font-size: 14px; line-height: 1.45;
  transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s;
}
.qdc-card:hover, .qdc-card:focus-within { transform: translateY(-3px); box-shadow: var(--qdc-shadow); }
.qdc-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(320px circle at var(--gx, 50%) var(--gy, 30%), var(--qdc-glare), transparent 50%); }
.qdc-card:hover::after { opacity: 1; }
.qdc-head { display: flex; align-items: center; gap: 9px; min-width: 0; }
.qdc-ico { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--qdc-accent-soft); color: var(--qdc-accent); font-size: 15px; }
.qdc-title { flex: 1; min-width: 0; margin: 0; font-size: 15px; font-weight: 600; color: var(--qdc-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qdc-chip { flex: none; font-size: 14px; font-weight: 600; border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.qdc-chip.good { background: var(--qdc-good-soft); color: var(--qdc-good); }
.qdc-chip.warn { background: var(--qdc-warn-soft); color: var(--qdc-warn); }
.qdc-chip.bad  { background: var(--qdc-bad-soft);  color: var(--qdc-bad); }
.qdc-kpi { min-width: 0; }
.qdc-kpi strong { display: block; font-size: 30px; line-height: 1.05; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; color: var(--qdc-fg); }
.qdc-kpi strong small { margin-left: 5px; font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--qdc-muted); }
.qdc-tip { margin: 4px 0 0; min-height: 40px; color: var(--qdc-muted); font-variant-numeric: tabular-nums; }
.qdc-tip .up { color: var(--qdc-good); font-weight: 600; }
.qdc-tip .down { color: var(--qdc-bad); font-weight: 600; }
.qdc-tip .flat { color: var(--qdc-muted); font-weight: 600; }
/* hovering a chart: the readout turns into the green pill, its dot in the hovered part's own colour */
.qdc-tip.is-hover { display: inline-flex; align-items: center; gap: 7px; min-height: 0; padding: 3px 10px 3px 8px; border-radius: 8px; background: var(--qdc-readout-bg); color: var(--qdc-readout); font-weight: 600; animation: qdc-tip-in .18s ease-out; }
.qdc-tip-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--tip-dot, var(--qdc-readout)); box-shadow: 0 0 0 2px var(--qdc-surface); }
.qdc-tip.is-rest { animation: qdc-tip-rest .22s ease-out; }
@keyframes qdc-tip-in { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
@keyframes qdc-tip-rest { from { opacity: .3; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .qdc-tip.is-hover, .qdc-tip.is-rest { animation: none; } }
/* trend: number + comparison left, small chart right */
.qdc-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 48%); gap: 12px; align-items: end; }
.qdc-body-solo { grid-template-columns: minmax(0, 1fr); }
.qdc-chartcol { min-width: 0; }
.qdc-viz { height: 66px; position: relative; }
.qdc-viz.qdc-donut { height: 104px; margin: 0; } /* the hole fits "69%" over a short word */
/* A breakdown: number, line and legend on the left, the donut beside them on the right,
   both top-aligned -- no empty half under the number. */
.qdc-body:has(.qdc-donut) { grid-template-columns: minmax(0, 1fr) 112px; align-items: start; gap: 16px; }
.qdc-kpi .qdc-legend { margin-top: 10px; }
.qdc-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 14px; line-height: 1.35; }
.qdc-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 6px; color: var(--qdc-muted); }
.qdc-legend i { width: 10px; height: 10px; border-radius: 50%; }
.qdc-legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qdc-legend b { font-weight: 600; color: var(--qdc-fg); font-variant-numeric: tabular-nums; }
.qdc-viz.short { height: 40px; }
/* A wide card (payload 'wide'): the whole row, the number on the left, a chart tall enough to read each day. */
.row:has(> .qdc-col) > .qdc-col--wide { grid-column: 1 / -1; }
.qdc-col--wide .qdc-body { grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); align-items: center; gap: 24px; }
.qdc-col--wide .qdc-viz { height: 170px; }
@media (max-width: 699px) {
  .qdc-col--wide .qdc-body { grid-template-columns: minmax(0, 1fr); }
  .qdc-col--wide .qdc-viz { height: 130px; }
}
.qdc-axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 2px; font-size: 14px; color: var(--qdc-muted); white-space: nowrap; }
.qdc-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; font-size: 14px; font-weight: 700; color: var(--qdc-fg); pointer-events: none; }
.qdc-center small { font-size: 14px; font-weight: 500; color: var(--qdc-muted); }
.qdc-no-gl .qdc-viz { display: none; }
/* action: top-3 list */
.qdc-items { display: grid; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--qdc-line); }
.qdc-items li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--qdc-line); }
.qdc-who { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qdc-who b { font-weight: 600; }
.qdc-who span { color: var(--qdc-muted); }
.qdc-items time { color: var(--qdc-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.qdc-items time.late { color: var(--qdc-bad); font-weight: 600; }
.qdc-items a, .qdc-items a:visited { font-size: 14px; font-weight: 600; color: var(--qdc-accent); text-decoration: none; }
.qdc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 4px; color: var(--qdc-muted); white-space: nowrap; }
.qdc-src { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.qdc-link, .qdc-link:visited { flex: none; font-size: 14px; font-weight: 600; color: var(--qdc-accent); text-decoration: none; }
.qdc-link:hover { text-decoration: underline; color: var(--qdc-accent); }
@media (prefers-reduced-motion: reduce) {
  .qdc-card, .qdc-card::after { transition: none; }
  .qdc-card:hover, .qdc-card:focus-within { transform: none; }
}
#qdc-gl { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; display: block; }

/* section header: title (uppercase label) with its description beneath it on
   the left, Period on the right, centred against that block; one row, wraps
   only on phones */
.qdc-sec-head { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin: 20px 0 10px; }
.qdc-sec-text { display: block; flex: 1; min-width: 0; }
.qdc-sec-title { margin: 0; font-size: 20px; line-height: 1.25; font-weight: 700; color: var(--site_font_color_g, var(--qdc-fg)); }
.qdc-sec-sub { margin: 2px 0 0; font-size: 14px; color: var(--qdc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qdc-sec-actions { display: flex; flex: none; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
/* the workflow boards' Create button (opp_mgmt/dashboard, the Workflow Dashboard, their Create modal) */
.dash-wf-btn-dark { padding: 6px 18px; border: 1px solid #1e293b; border-radius: 9px; background: #1e293b; color: #fff; font-size: 16px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: .18s; }
.dash-wf-btn-dark:hover { border-color: #334155; background: #334155; color: #fff; }
/* a card's own three-dots menu (payload 'menu'): the backend card menu (.pgc-menu above), in the card's head */
.qdc-card { --pgc-ink: var(--qdc-fg); --pgc-soft: var(--qdc-muted); --pgc-tint: var(--qdc-accent-soft); }
.qdc-card .pgc-dots { width: 32px; height: 32px; margin: -6px -8px -6px 0; }
.qdc-card:has(.dropdown-menu.show) { overflow: visible; }
.qdc-col:has(.dropdown-menu.show) { position: relative; z-index: 5; }
.qdc-period { display: flex; flex: none; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--qdc-muted); }
.qdc-period select { width: auto !important; flex: none; min-height: 36px; padding: 6px 10px; border: 1px solid var(--qdc-line); border-radius: 9px; background: #fff; font-size: 14px; color: var(--qdc-fg); }
@media (max-width: 699px) { .qdc-sec-head { flex-wrap: wrap; } .qdc-sec-text { flex: 1 1 100%; } .qdc-sec-actions { justify-content: flex-start; } .qdc-sec-title { font-size: 18px; } .qdc-sec-sub { white-space: normal; } }

/* Needs attention: one panel, 2 columns, fixed height, scrolls */
.qdc-att { margin: 0 0 18px; border: 1px solid var(--qdc-line); border-radius: 14px; background: var(--qdc-surface); color: var(--qdc-fg); overflow: hidden; }
.qdc-att-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--qdc-line); }
.qdc-att-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 15px; font-weight: 700; color: var(--qdc-fg); }
.qdc-att-total { padding: 1px 9px; border-radius: 999px; background: var(--qdc-bad); color: #fff; font-size: 14px; font-weight: 700; }
.qdc-att-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; border: 1px solid var(--qdc-line); border-radius: 11px; background: var(--qdc-surface-2); }
.qdc-att-tab { min-height: 32px; padding: 4px 12px; border: 0; border-radius: 8px; background: none; color: var(--qdc-muted); font-size: 14px; font-weight: 600; cursor: pointer; }
.qdc-att-tab[aria-selected="true"] { background: #fff; color: var(--qdc-fg); box-shadow: 0 1px 2px rgba(20,33,58,.08); }
.qdc-att-scroll { max-height: 236px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--qdc-accent) 45%, #fff) transparent; }
.qdc-att-scroll::-webkit-scrollbar { width: 6px; }
.qdc-att-scroll::-webkit-scrollbar-thumb { border-radius: 6px; background: color-mix(in srgb, var(--qdc-accent) 45%, #fff); }
.qdc-att-scroll.qdc-more { -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); }
.qdc-att-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px; margin: 0; padding: 6px; list-style: none; }
.qdc-att-row[hidden] { display: none; }
.qdc-att-link, .qdc-att-link:visited { display: grid; grid-template-columns: 4px 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; color: var(--qdc-fg); text-decoration: none; }
.qdc-att-link:hover { background: var(--qdc-surface-2); color: var(--qdc-fg); }
.qdc-att-link::before { content: ""; width: 4px; height: 32px; border-radius: 4px; background: var(--qdc-warn); }
.qdc-att-row.bad .qdc-att-link::before { background: var(--qdc-bad); }
.qdc-att-ico { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--qdc-accent-soft); color: var(--qdc-accent); font-size: 15px; }
.qdc-att-text { display: grid; min-width: 0; }
.qdc-att-main { font-size: 14px; }
.qdc-att-main b { margin-right: 4px; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.qdc-att-ctx { font-size: 14px; color: var(--qdc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qdc-att-go { padding: 6px 12px; border-radius: 8px; background: var(--qdc-accent-soft); color: var(--qdc-accent); font-size: 14px; font-weight: 600; white-space: nowrap; }
@media (max-width: 899px) { .qdc-att-list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 699px) { .qdc-att-scroll { max-height: 300px; } }
/* THE empty state (dash_part/empty_state.php): one full-width block, centred, ~120px; never a grid item of its own */
.qdc-empty-state { grid-column: 1 / -1; flex: 0 0 100%; width: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; margin: 0 0 18px; padding: 16px 20px; border: 1px solid var(--qdc-line); border-radius: 14px; background: var(--qdc-surface); color: var(--qdc-fg); font-size: 14px; line-height: 1.45; text-align: center; }
.qdc-empty-state.is-compact { min-height: 112px; margin: 0; border: 0; border-radius: 0; background: transparent; }
.qdc-empty-ico { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 2px; border-radius: 50%; background: var(--qdc-accent-soft); color: var(--qdc-accent); font-size: 18px; }
.qdc-empty-state.is-compact .qdc-empty-ico { background: var(--qdc-good-soft); color: var(--qdc-good); }
.qdc-empty-title { margin: 0; font-size: 16px; font-weight: 600; color: var(--qdc-fg); }
.qdc-empty-text { margin: 0; color: var(--qdc-muted); }
.qdc-empty-btn { display: inline-flex; align-items: center; margin-top: 8px; padding: 7px 16px; border-radius: 9px; background: var(--qdc-accent); color: #fff !important; font-size: 14px; font-weight: 600; text-decoration: none !important; }
.qdc-empty-btn:hover, .qdc-empty-btn:focus-visible { background: color-mix(in srgb, var(--qdc-accent) 85%, #000); }
.qdc-bar { width: 64px; height: 8px; border-radius: 8px; background: var(--qdc-surface-2); overflow: hidden; }
.qdc-bar i { display: block; height: 100%; border-radius: 8px; background: var(--qdc-accent); }
.qdc-loading .qdc-card, .qdc-loading .qdc-att { opacity: .55; transition: opacity .2s; }
.qdc-loading body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999; background: linear-gradient(90deg, transparent, var(--site_color_g, #1a8fd6), transparent); animation: qdc-load 1s linear infinite; }
@keyframes qdc-load { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
