/* ═══════════════════════════════════════════════════
   CLIENTS TAB — Client Work View (Enhanced)
   ═══════════════════════════════════════════════════ */

/* ── Client Header ── */
.wk-cl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.wk-cl-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.wk-cl-header-icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  color: #7c3aed;
}
.wk-cl-header-title {
  font-size: 1.1rem; font-weight: 800;
  color: var(--wt-text, #1e293b);
  letter-spacing: -0.01em;
}
.wk-cl-header-subtitle {
  font-size: 0.76rem; font-weight: 500;
  color: var(--wt-text-muted, #64748b);
  margin-top: 2px;
}

/* ── Client KPI Row ── */
.wk-cl-kpi-row {
  display: flex; gap: 12px; margin-bottom: 20px;
}
.wk-cl-kpi {
  flex: 1; text-align: center;
  padding: 16px 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--_kpi-ac, #6366f1) 4%, #fff), #fff);
  border: 1.5px solid var(--wt-border, #e2e8f0);
  border-radius: 16px;
  position: relative; overflow: hidden;
  transition: all .35s cubic-bezier(.22,1,.36,1);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.wk-cl-kpi::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3.5px;
}
.wk-cl-kpi:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.09), 0 2px 8px rgba(0,0,0,.04);
  transform: translateY(-3px);
}
.wk-cl-kpi--total  { --_kpi-ac: #6366f1; }
.wk-cl-kpi--active { --_kpi-ac: #3b82f6; }
.wk-cl-kpi--risk   { --_kpi-ac: #ef4444; }
.wk-cl-kpi--revenue{ --_kpi-ac: #059669; }
.wk-cl-kpi--total::before { background: linear-gradient(90deg, #6366f1, #a78bfa); }
.wk-cl-kpi--active::before { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.wk-cl-kpi--risk::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.wk-cl-kpi--revenue::before { background: linear-gradient(90deg, #059669, #34d399); }
.wk-cl-kpi-val {
  font-size: 1.6rem; font-weight: 900; color: var(--wt-text, #1e293b);
  letter-spacing: -.5px;
  transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.wk-cl-kpi:hover .wk-cl-kpi-val { transform: scale(1.06); }
.wk-cl-kpi-label {
  font-size: 0.7rem; font-weight: 600;
  color: var(--wt-text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: 4px;
}

/* ── Client Card Grid ── */
.wk-cl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  padding: 0 0 16px;
}
.wk-cl-card {
  background: linear-gradient(135deg, color-mix(in srgb, var(--cl-accent, #6366f1) 3%, #fff), #fff);
  border: 1.5px solid var(--wt-border, #e2e8f0);
  border-radius: 16px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all .35s cubic-bezier(.22,1,.36,1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.wk-cl-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3.5px;
  background: linear-gradient(90deg, var(--cl-accent, #6366f1), color-mix(in srgb, var(--cl-accent, #6366f1) 60%, #fff));
  opacity: 0;
  transition: opacity .25s cubic-bezier(.22,1,.36,1);
}
.wk-cl-card:hover {
  border-color: color-mix(in srgb, var(--cl-accent, #6366f1) 20%, #e2e8f0);
  box-shadow: 0 8px 28px rgba(0,0,0,.09), 0 2px 8px rgba(0,0,0,.04);
  transform: translateY(-3px);
}
.wk-cl-card:hover::before { opacity: 1; }
.wk-cl-card:active { transform: scale(.97); transition-duration: .08s; }

.wk-cl-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.wk-cl-card-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.76rem; font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
}
.wk-cl-card-avatar.wk-cl-card-logo {
  background: #fff;
  border: 1px solid var(--border-s, #e2e8f0);
  padding: 3px;
}
.wk-cl-card-avatar.wk-cl-card-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: 50%;
}
.wk-cl-sb-logo { border-radius: 50%; overflow: hidden; }
.wk-cl-sb-logo img { width: 100%; height: 100%; object-fit: contain; }
.wk-cl-card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.wk-cl-card-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--wt-text, #1e293b);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wk-cl-tier {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
  flex-shrink: 0;
}
.wk-cl-tier--strategic { background: #ede9fe; color: #7c3aed; }
.wk-cl-tier--enterprise { background: #dbeafe; color: #2563eb; }
.wk-cl-tier--growth { background: #d1fae5; color: #059669; }
.wk-cl-tier--standard { background: #f3f4f6; color: #6b7280; }

.wk-cl-card-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.76rem;
  color: var(--wt-text-muted, #64748b);
  margin-bottom: 6px;
}
.wk-cl-stat-red {
  color: #ef4444;
  font-weight: 600;
}
.wk-cl-card-meta {
  margin-top: 8px;
  font-size: 0.68rem;
  color: var(--wt-text-muted, #94a3b8);
}
.wk-cl-card-tags {
  display: flex; gap: 4px; flex-wrap: wrap;
  margin-top: 10px;
}
.wk-cl-card-tag {
  font-size: 0.66rem; font-weight: 600;
  padding: 2px 8px; border-radius: 6px;
  background: var(--wt-bg, #f1f5f9);
  color: var(--wt-text-muted, #64748b);
}

/* ── Client Detail View ── */
.wk-cl-detail-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 0 18px;
  border-bottom: 1.5px solid var(--wt-border, #e2e8f0);
  margin-bottom: 16px;
}
.wk-cl-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--wt-text-muted, #64748b);
  background: none;
  border: 1.5px solid var(--wt-border, #e2e8f0);
  cursor: pointer;
  padding: 7px 14px;
  border-radius: 10px;
  transition: all .15s ease;
  flex-shrink: 0;
}
.wk-cl-back-btn:hover {
  background: var(--wt-bg, #f8fafc);
  border-color: rgba(99,102,241,.2);
  color: var(--wt-text, #1e293b);
}
.wk-cl-detail-info {
  flex: 1;
  min-width: 0;
}
.wk-cl-detail-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--wt-text, #1e293b);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.wk-cl-detail-meta {
  font-size: 0.76rem;
  color: var(--wt-text-muted, #64748b);
  margin-top: 3px;
}

/* ── Detail Section Groups ── */
.wk-cl-detail-section {
  margin-bottom: 18px;
}
.wk-cl-detail-section-title {
  font-size: 0.78rem; font-weight: 700;
  color: var(--wt-text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--wt-border, #f1f5f9);
}

/* ── Client Detail Items (project + task rows) ── */
.wk-cl-detail-list {
  padding: 0;
}
.wk-cl-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .12s ease, transform .1s ease;
  border: 1px solid transparent;
}
.wk-cl-detail-item:hover {
  background: var(--wt-bg, #f8fafc);
  border-color: var(--wt-border, #e2e8f0);
  transform: translateX(2px);
}
.wk-cl-detail-item-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.wk-cl-detail-item-body {
  flex: 1;
  min-width: 0;
}
.wk-cl-detail-item-title {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--wt-text, #1e293b);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wk-cl-detail-item-title.wk-cl-done {
  text-decoration: line-through;
  opacity: .5;
}
.wk-cl-detail-item-meta {
  font-size: 0.72rem;
  color: var(--wt-text-muted, #94a3b8);
  margin-top: 3px;
}
.wk-cl-detail-item-status {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 3px 10px;
  border-radius: 8px;
  flex-shrink: 0;
  margin-top: 3px;
}
.wk-cl-detail-item-status--active { background: #dbeafe; color: #2563eb; }
.wk-cl-detail-item-status--done { background: #d1fae5; color: #059669; }
.wk-cl-detail-item-status--risk { background: #fef2f2; color: #dc2626; }

/* ── Account Profile Cards ── */
.wk-tab-panel[data-wk-panel="clients"] .ph-hub {
  padding: 16px;
  border: 1px solid rgba(203, 213, 225, .72);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.88), rgba(248,250,252,.94)),
    radial-gradient(circle at 12% 10%, rgba(0,75,124,.08), transparent 32%),
    radial-gradient(circle at 88% 18%, rgba(13,148,136,.08), transparent 30%);
  box-shadow: 0 18px 55px rgba(15,23,42,.08);
}
.ph-sub[data-subpanel="home-accounts"] {
  padding: 16px;
  border: 1px solid rgba(203, 213, 225, .72);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.88), rgba(248,250,252,.94)),
    radial-gradient(circle at 8% 8%, rgba(0,75,124,.09), transparent 34%),
    radial-gradient(circle at 92% 12%, rgba(13,148,136,.08), transparent 30%),
    linear-gradient(180deg, #f8fafc, #eef3f8);
  box-shadow: 0 18px 55px rgba(15,23,42,.08);
}
.wk-tab-panel[data-wk-panel="clients"] .ph-content {
  min-height: 640px;
}
.wk-account-scorecards {
  margin: 0 0 18px;
  padding: 4px;
}
.wk-account-list-panel {
  margin: 0 0 24px;
  border: 1px solid rgba(203,213,225,.72);
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 32px rgba(15,23,42,.06);
}
.wk-cl-grid.wk-ha-grid,
#wkClAllGrid.wk-cl-grid {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  padding: 16px;
}
.wk-account-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 296px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--cl-accent, #64748b) 14%, #dbe3ee);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.92)),
    linear-gradient(135deg, color-mix(in srgb, var(--cl-accent, #64748b) 8%, #fff), #fff);
  box-shadow: 0 12px 32px rgba(15,23,42,.07), inset 0 1px 0 rgba(255,255,255,.85);
  transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s cubic-bezier(.22,1,.36,1), border-color .25s ease;
}
.wk-account-card::before {
  opacity: 1;
  height: 4px;
  background: linear-gradient(90deg, var(--cl-accent, #64748b), color-mix(in srgb, var(--cl-accent, #64748b) 35%, #fff));
  border-radius: 18px 18px 0 0;
}
.wk-account-card:hover {
  border-color: color-mix(in srgb, var(--cl-accent, #64748b) 36%, #cbd5e1);
  box-shadow: 0 22px 50px rgba(15,23,42,.13), inset 0 1px 0 rgba(255,255,255,.92);
  transform: translateY(-3px);
}
.wk-account-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.wk-account-logo,
.wk-account-detail-logo {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid color-mix(in srgb, var(--account-accent, var(--cl-accent, #64748b)) 22%, #dbe3ee);
  background: color-mix(in srgb, var(--account-accent, var(--cl-accent, #64748b)) 9%, #fff);
  color: var(--account-accent, var(--cl-accent, #64748b));
  font-size: 13px;
  font-weight: 900;
}
.wk-account-logo img,
.wk-account-detail-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
  background: #fff;
}
.wk-account-titleblock,
.wk-account-detail-titleblock {
  flex: 1;
  min-width: 0;
}
.wk-account-name,
.wk-account-detail-name {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--wt-text, #172033);
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wk-account-subline,
.wk-account-detail-meta {
  margin-top: 3px;
  font-size: 12px;
  color: var(--wt-text-muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wk-account-health {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--account-accent, #64748b) 11%, #fff);
  color: var(--account-accent, #64748b);
  font-size: 11px;
  font-weight: 800;
}
.wk-account-rank {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(203,213,225,.84);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 5px 14px rgba(15,23,42,.06);
}
.wk-account-rank--platinum { color: #64748b; background: linear-gradient(135deg, #fff, #e2e8f0); }
.wk-account-rank--gold { color: #b7791f; background: linear-gradient(135deg, #fff7d6, #facc15); border-color: #f4c430; }
.wk-account-rank--silver { color: #64748b; background: linear-gradient(135deg, #f8fafc, #cbd5e1); }
.wk-account-rank--standard { color: #64748b; background: #f8fafc; }
.wk-account-health span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.wk-account-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.wk-account-metrics div {
  min-width: 0;
  padding: 11px 8px 9px;
  border: 1px solid rgba(226,232,240,.92);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, rgba(248,250,252,.7));
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
.wk-account-metrics strong {
  display: block;
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
  color: var(--wt-text, #172033);
  letter-spacing: -.02em;
}
.wk-account-metrics span {
  display: block;
  margin-top: 5px;
  font-size: 9px;
  font-weight: 800;
  color: var(--wt-text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.wk-account-metrics .is-risk strong { color: #dc2626; }
.wk-account-programs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 24px;
}
.wk-account-chip {
  max-width: 190px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef6ff;
  color: #004b7c;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wk-account-chip--more,
.wk-account-chip--muted {
  background: #f1f5f9;
  color: #64748b;
}
/* A risk the headline label didn't get to say. The card carries ONE health
   label, but the scorecards count every risk, so "Stalled 1" used to sit above
   a card whose only label read "Schedule Risk". */
.wk-account-chip--risk {
  background: #fff4e6;
  color: #9a5700;
  box-shadow: inset 0 0 0 1px rgba(217, 119, 6, .22);
}
/* ── Our own account ────────────────────────────────────────────────────────
   VisionOne is pinned first in the grid and marked so it reads as OURS at a
   glance rather than as one more client. Same word ("Internal") the Log Time
   company dropdown already uses for the same account. */
.wk-account-internal-tag {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  box-shadow: inset 0 0 0 1px rgba(4, 120, 87, .2);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}
.wk-account-card--internal { order: -1; }
/* Ours has no CRM company row behind it, so the header title is a label, not a
   link — kill the affordance instead of offering a click that 404s. */
.wk-account-detail-link.is-static { cursor: default; }
.wk-account-detail-link.is-static:hover { background: none; }
.wk-account-detail-link.is-static .wk-account-detail-link-icon { display: none; }
/* Work that belongs to no account. Named under the grid because silently
   dropping it is what made the totals above look wrong. */
.wk-ha-unlinked-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 2px 0;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, .35);
  border-radius: 10px;
  background: rgba(248, 250, 252, .8);
  color: var(--wt-text-muted, #64748b);
  font-size: 12px;
  line-height: 1.5;
}
.wk-ha-unlinked-note svg { flex: 0 0 auto; margin-top: 2px; opacity: .7; }
.wk-ha-unlinked-note strong { color: var(--wt-text, #172033); font-weight: 800; }
.wk-account-budget-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 12px;
}
.wk-account-budget-top span {
  color: var(--wt-text-muted, #64748b);
  font-weight: 700;
}
.wk-account-budget-top strong {
  color: var(--wt-text, #172033);
  font-weight: 800;
}
.wk-account-budget-track {
  height: 7px;
  border-radius: 999px;
  background: #e8eef6;
  overflow: hidden;
}
.wk-account-budget-track span {
  display: block;
  width: var(--budget-pct, 0%);
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: var(--budget-color, #0d9488);
  transition: width .35s ease;
}
.wk-account-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(226,232,240,.86);
}
.wk-account-risk span,
.wk-account-progress span {
  display: block;
  margin-bottom: 4px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .05em;
  color: #94a3b8;
  text-transform: uppercase;
}
.wk-account-risk strong {
  display: block;
  color: #334155;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
}
.wk-account-progress {
  min-width: 64px;
  text-align: right;
}
.wk-account-progress strong {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  color: var(--cl-accent, #64748b);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.03em;
}
.wk-account-progress strong i {
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
  color: color-mix(in srgb, var(--cl-accent, #64748b) 70%, #94a3b8);
}
.wk-account-progress span {
  margin-top: 4px;
  margin-bottom: 0;
  text-align: right;
}
.wk-account-detail-page:not([hidden]),
.ph-sub[data-subpanel="cl-detail"].is-active {
  animation: wkAccountPageIn .32s cubic-bezier(.22,1,.36,1) both;
}
.wk-account-detail-page {
  min-height: 620px;
}
.wk-account-detail-hero,
.wk-cl-detail-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  padding: 4px 0 14px;
  border: 0;
  border-bottom: 1px solid rgba(203,213,225,.55);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.wk-account-detail-hero .wk-account-detail-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 17px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(15,23,42,.06);
}
/* Title block as a single clickable target → opens CRM */
.wk-account-detail-link {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
  padding: 6px 10px 6px 6px;
  margin-left: -6px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background .15s ease, transform .15s ease;
}
.wk-account-detail-link:hover {
  background: rgba(15,23,42,.04);
}
.wk-account-detail-link:hover .wk-account-detail-name { color: #004b7c; }
.wk-account-detail-link:hover .wk-account-detail-link-icon { color: #004b7c; opacity: 1; }
.wk-account-detail-link-icon {
  flex-shrink: 0;
  color: #94a3b8;
  opacity: 0;
  transition: opacity .15s ease, color .15s ease;
}
.wk-account-detail-name {
  transition: color .15s ease;
}
.wk-account-detail-hero .wk-account-detail-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.015em;
}
.wk-account-detail-hero .wk-account-detail-meta {
  font-size: 12.5px;
  color: var(--wt-text-muted, #64748b);
  margin-top: 4px;
  white-space: normal;
  line-height: 1.5;
}
.wk-account-detail-health {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--account-accent, #64748b) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--account-accent, #64748b) 30%, #e2e8f0);
  color: var(--account-accent, #64748b);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .02em;
  flex-shrink: 0;
}
.wk-account-detail-health::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--account-accent, #64748b) 18%, transparent);
}
.wk-account-detail-page .ax-cards-row,
.ph-sub[data-subpanel="cl-detail"] > .ax-cards-row {
  margin: 0 0 18px;
  padding: 4px;
}
.wk-account-detail-search {
  padding: 0 4px 14px;
}
.wk-account-detail-search .wk-focus-search-wrap {
  max-width: 440px;
  background: #fff;
  border-color: rgba(203,213,225,.84);
  box-shadow: 0 8px 20px rgba(15,23,42,.05);
}
.wk-account-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}
.wk-ha-list-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(203,213,225,.78) !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.95) !important;
  box-shadow: 0 10px 30px rgba(15,23,42,.06);
}
.wk-account-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(226,232,240,.9);
}
.wk-account-list-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--wt-text, #172033);
}
.wk-account-list-count {
  min-width: 26px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  background: #eef6ff;
  color: #004b7c;
  font-size: 11px;
  font-weight: 900;
}
.wk-account-list-scroll {
  max-height: 480px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, rgba(248,250,252,.55), rgba(248,250,252,.2));
}
.wk-account-profile-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid rgba(226,232,240,.82);
  background: #fff;
  box-shadow: 0 2px 6px rgba(15,23,42,.04);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  position: relative;
  overflow: hidden;
}
.wk-account-profile-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--row-accent, #64748b);
  opacity: .85;
}
.wk-account-profile-row:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--row-accent, #64748b) 30%, #cbd5e1);
  box-shadow: 0 8px 22px rgba(15,23,42,.09);
}
.wk-account-profile-row:last-child { border-bottom: 1px solid rgba(226,232,240,.82); }
.wk-account-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.wk-account-row-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
  background: var(--row-accent, #64748b);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--row-accent, #64748b) 12%, transparent);
}
.wk-account-row-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
  color: var(--wt-text, #172033);
}
.wk-account-row-title.is-done {
  color: #94a3b8;
  text-decoration: line-through;
}
.wk-account-row-pill,
.wk-account-row-date {
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--row-accent, #64748b) 10%, #fff);
  color: var(--row-accent, #64748b);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.wk-account-row-date {
  background: #f8fafc;
  color: #64748b;
}
.wk-account-row-owner {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}
.wk-account-row-owner .wk-member-avatar--sm {
  width: 22px; height: 22px; font-size: 9px;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 4px rgba(15,23,42,.12);
}
.wk-account-row-delete {
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s ease, background .15s ease, color .15s ease;
  margin-left: 2px;
}
.wk-account-profile-row:hover .wk-account-row-delete { opacity: 1; }
.wk-account-row-delete:hover { background: #fef2f2; color: #dc2626; }

/* ── Contacts strip ── */
.wk-account-contacts-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(203,213,225,.4);
}
.wk-account-contacts-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #94a3b8;
  flex-shrink: 0;
}
.wk-account-contacts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.wk-account-contact-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease;
  max-width: 220px;
}
.wk-account-contact-chip:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(15,23,42,.07);
}
.wk-account-contact-chip .wk-member-avatar--sm { width: 22px; height: 22px; font-size: 9px; }
.wk-account-contact-chip .wk-member-avatar--sm.wk-contact-av--photo { padding: 0; overflow: hidden; }
.wk-account-contact-chip .wk-member-avatar--sm.wk-contact-av--photo img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block;
}
.wk-account-contact-name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wk-account-contact-role {
  font-size: 10.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wk-account-contact-more {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  align-self: center;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.wk-account-contact-more:hover {
  border-color: #94a3b8;
  color: #0f172a;
  background: #fff;
}

/* ── Bottom grid: By Project + Upcoming + Recent Activity ── */
.wk-account-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 14px;
}
@media (max-width: 1200px) {
  .wk-account-bottom-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .wk-account-bottom-grid { grid-template-columns: 1fr; }
}

/* By-Project rows */
.wk-account-byproject-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(226,232,240,.5);
  cursor: pointer;
  transition: background .12s ease;
}
.wk-account-byproject-row:hover { background: #f8fafc; }
.wk-account-byproject-row:last-child { border-bottom: 0; }
.wk-account-byproject-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--proj-accent, #6366f1);
}
.wk-account-byproject-body { flex: 1; min-width: 0; }
.wk-account-byproject-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wk-account-byproject-meta {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}
.wk-account-byproject-bar {
  flex-shrink: 0;
  width: 60px;
  height: 5px;
  background: #f1f5f9;
  border-radius: 3px;
  overflow: hidden;
}
.wk-account-byproject-bar > i {
  display: block;
  height: 100%;
  background: var(--proj-accent, #6366f1);
  width: var(--proj-pct, 0%);
}

/* Sparkline inside Hours Logged scorecard */
.wk-ax-card--with-spark .ax-card-body { padding-bottom: 4px; position: relative; }
.wk-ax-spark {
  display: block;
  width: 100%;
  height: 18px;
  margin-top: 4px;
  overflow: visible;
}
.wk-ax-spark path.spark-area { fill: var(--_ac, #7c3aed); fill-opacity: 0.14; }
.wk-ax-spark path.spark-line { fill: none; stroke: var(--_ac, #7c3aed); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.wk-ax-spark circle.spark-last { fill: var(--_ac, #7c3aed); }
.wk-ha-bottom-panel {
  background: #fff;
  border: 1px solid rgba(226,232,240,.82);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(15,23,42,.04);
}
.wk-ha-bottom-panel .wk-account-list-head {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(226,232,240,.6);
  background: #fafbfc;
}
.wk-account-upcoming-row,
.wk-account-activity-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(226,232,240,.5);
  font-size: 12.5px;
  color: #1e293b;
  cursor: pointer;
  transition: background .12s ease;
}
.wk-account-upcoming-row:hover,
.wk-account-activity-row:hover { background: #f8fafc; }
.wk-account-upcoming-row:last-child,
.wk-account-activity-row:last-child { border-bottom: 0; }
.wk-account-upcoming-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(15,23,42,.04);
}
.wk-account-upcoming-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.wk-account-upcoming-date {
  font-size: 11px;
  color: #64748b;
  font-weight: 700;
  flex-shrink: 0;
}
.wk-account-row-meta,
.wk-account-row-note,
.wk-account-empty-line {
  padding-left: 18px;
  color: var(--wt-text-muted, #64748b);
  font-size: 12px;
  line-height: 1.45;
}
.wk-account-empty-line {
  padding: 28px 16px;
  text-align: center;
}
.wk-account-row-budget {
  padding-left: 18px;
}
.wk-account-row-budget div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}
.wk-account-row-budget strong { color: var(--budget-color, #0d9488); }
.wk-account-row-budget i {
  display: block;
  height: 5px;
  border-radius: 999px;
  overflow: hidden;
  background: #e8eef6;
}
.wk-account-row-budget b {
  display: block;
  width: var(--budget-pct, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--budget-color, #0d9488);
}
.wk-account-back-btn,
.wk-cl-back-btn {
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dbe3ee;
  padding: 8px 14px 8px 11px;
  color: #334155;
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(15,23,42,.05);
  transition: all .18s ease;
}
.wk-account-back-btn:hover,
.wk-cl-back-btn:hover {
  border-color: #004b7c;
  color: #004b7c;
  background: #f8fbff;
  transform: translateX(-2px);
  box-shadow: 0 4px 12px rgba(0,75,124,.12);
}
.wk-account-crm-btn,
.wk-cl-crm-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  padding: 9px 15px;
  border: 1px solid color-mix(in srgb, #004b7c 18%, #dbe3ee);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff, #f5f9fd);
  color: #004b7c;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,75,124,.08);
  transition: all .18s ease;
}
.wk-account-crm-btn:hover,
.wk-cl-crm-link:hover {
  border-color: #004b7c;
  color: #fff;
  background: linear-gradient(180deg, #015993, #004b7c);
  box-shadow: 0 6px 16px rgba(0,75,124,.22);
  transform: translateY(-1px);
}

/* Risk-drop banner on the detail page */
.wk-account-risk-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--account-accent, #64748b) 28%, #e2e8f0);
  background: linear-gradient(135deg, color-mix(in srgb, var(--account-accent, #64748b) 7%, #fff), #fff);
  box-shadow: 0 6px 16px rgba(15,23,42,.05);
}
.wk-account-risk-banner-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--account-accent, #64748b) 14%, #fff);
  color: var(--account-accent, #64748b);
}
.wk-account-risk-banner-body { flex: 1; min-width: 0; }
.wk-account-risk-banner-title {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--account-accent, #64748b);
  margin-bottom: 3px;
}
.wk-account-risk-banner-text {
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  line-height: 1.5;
}
@keyframes wkAccountPageIn {
  from { opacity: 0; transform: translateX(22px) scale(.985); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

/* ── Animation ── */
@keyframes clFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wk-cl-card { animation: clFadeIn .2s ease both; }
.wk-cl-card:nth-child(2) { animation-delay: .03s; }
.wk-cl-card:nth-child(3) { animation-delay: .06s; }
.wk-cl-card:nth-child(4) { animation-delay: .09s; }
.wk-cl-card:nth-child(5) { animation-delay: .12s; }
.wk-cl-card:nth-child(6) { animation-delay: .15s; }

/* ── Account-detail toolbar: search + filter + view switcher ── */
.wk-ha-dt-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 14px;
  flex-wrap: wrap;
}
.wk-ha-dt-toolbar .wk-focus-search-wrap {
  flex: 1 1 320px;
  max-width: 460px;
  min-width: 220px;
  background: #fff;
  border-color: rgba(203,213,225,.84);
  box-shadow: 0 8px 20px rgba(15,23,42,.05);
}
.wk-ha-dt-filter { position: relative; flex-shrink: 0; }
.wk-ha-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(203,213,225,.9);
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15,23,42,.05);
  transition: all .18s ease;
}
.wk-ha-filter-btn:hover {
  border-color: #004b7c;
  color: #004b7c;
  box-shadow: 0 4px 12px rgba(0,75,124,.12);
}
.wk-ha-filter-btn[aria-expanded="true"] {
  border-color: #004b7c;
  color: #004b7c;
  background: #f5f9fd;
}
.wk-ha-filter-pill {
  padding: 2px 9px;
  border-radius: 999px;
  background: #004b7c;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.wk-ha-filter-pop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
  min-width: 250px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(203,213,225,.86);
  background: #fff;
  box-shadow: 0 18px 44px rgba(15,23,42,.16), 0 4px 10px rgba(15,23,42,.06);
  animation: wkHaPopIn .18s cubic-bezier(.22,1,.36,1) both;
}
.wk-ha-filter-pop-head {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 8px;
}
.wk-ha-filter-pop-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.wk-ha-filter-pop-pill {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(203,213,225,.9);
  background: #fff;
  color: #475569;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
}
.wk-ha-filter-pop-pill:hover {
  border-color: #004b7c;
  color: #004b7c;
  background: #f5f9fd;
}
.wk-ha-filter-pop-pill.is-active {
  border-color: #004b7c;
  background: #004b7c;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,75,124,.18);
}

.wk-ha-dt-views {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(203,213,225,.9);
  background: #fff;
  box-shadow: 0 2px 6px rgba(15,23,42,.05);
  flex-shrink: 0;
}
.wk-ha-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 30px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all .18s ease;
}
.wk-ha-view-btn:hover {
  color: #004b7c;
  background: rgba(0,75,124,.06);
}
.wk-ha-view-btn.is-active {
  background: #004b7c;
  color: #fff;
  box-shadow: 0 3px 8px rgba(0,75,124,.22);
}

/* ── List view: compact single-line rows ── */
.wk-account-detail-grid[data-ha-view="list"] .wk-account-list-scroll {
  gap: 6px;
  padding: 8px;
}
.wk-account-detail-grid[data-ha-view="list"] .wk-account-profile-row {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 9px 12px 9px 14px;
  min-height: 0;
}
.wk-account-detail-grid[data-ha-view="list"] .wk-account-profile-row::before { width: 2px; }
.wk-account-detail-grid[data-ha-view="list"] .wk-account-row-meta,
.wk-account-detail-grid[data-ha-view="list"] .wk-account-row-budget,
.wk-account-detail-grid[data-ha-view="list"] .wk-account-row-note { display: none; }

@keyframes wkHaPopIn {
  from { opacity: 0; transform: translateY(-6px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Activity Feed calendar host */
.wk-activity-cal-host {
  margin: 0 16px 16px;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(203,213,225,.65);
  box-shadow: 0 4px 14px rgba(15,23,42,.05);
}
.wk-activity-cal-host #homeActivityCalRoot { min-height: 480px; }

/* Activity Feed: full-width body (no right sidebar) */
.wk-activity-body {
  display: block !important;
  grid-template-columns: 1fr !important;
}
.wk-activity-body > #homeActivityPanel {
  width: 100%;
  max-width: 100%;
}
/* When calendar view is active, hide the focus-head's restructured action row
   (which would otherwise show a duplicate "New Task" button + a redundant search) */
#homeActivityPanel[data-activity-view="calendar"] .wk-focus-action-row { display: none !important; }
/* Also strip the search wrap from the title row when calendar view is active */
#homeActivityPanel[data-activity-view="calendar"] .wk-focus-head .wk-focus-search-wrap { display: none !important; }

/* ── Outer Accounts grid: LIST view (tabular rows, all data visible at-a-glance) ── */
#wkHomeAcctGrid[data-ha-list-view="list"] {
  display: flex !important;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fafbfc, #fff);
  border-radius: 14px;
}
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card {
  display: grid;
  grid-template-columns: 36px minmax(180px, 2fr) auto repeat(4, minmax(58px, auto)) minmax(120px, 1.4fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 0;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(203,213,225,.6);
  background: #fff;
  transition: all .14s ease;
  cursor: pointer;
  animation: none;
}
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card:hover {
  border-color: var(--cl-accent, #004b7c);
  background: #fafbfc;
  transform: translateX(2px);
  box-shadow: 0 6px 18px rgba(15,23,42,.08);
}
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card::before { display: none; }
/* Restructure card-head children into individual columns */
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-card-head { display: contents; }
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-logo {
  width: 36px; height: 36px; font-size: 12px; box-shadow: 0 2px 6px rgba(15,23,42,.08);
}
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-titleblock { min-width: 0; }
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-name {
  font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0;
}
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-subline {
  font-size: 11px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-health {
  padding: 4px 10px; font-size: 10.5px; border-radius: 999px;
}
/* Metrics: split the 4-cell grid into 4 individual list cells */
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-metrics { display: contents; }
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-metrics > div {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4px 6px; min-width: 52px;
  background: transparent; border: 0;
}
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-metrics > div strong {
  font-size: 16px; font-weight: 800; color: #0f172a; line-height: 1;
}
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-metrics > div span {
  font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #94a3b8; margin-top: 3px;
}
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-metrics > div.is-risk strong { color: #dc2626; }
/* Budget bar */
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-budget {
  display: flex; flex-direction: column; gap: 4px; min-width: 110px;
  margin: 0; padding: 0; background: transparent; border: 0;
}
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-budget-top {
  font-size: 10px; color: #64748b;
}
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-budget-top strong {
  font-size: 11px; font-weight: 700; color: #0f172a;
}
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-budget-track {
  height: 5px; border-radius: 999px; background: rgba(203,213,225,.55); overflow: hidden;
}
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-budget-track span {
  display: block; height: 100%; width: var(--budget-pct, 0%);
  background: var(--budget-color, #0d9488); border-radius: 999px;
  transition: width .3s ease;
}
/* Hide chips/programs and the risk-text footer in list view (keep only the % progress) */
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-programs,
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-footer .wk-account-risk { display: none; }
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-footer {
  display: flex; align-items: center; justify-content: flex-end;
  margin: 0; padding: 0; background: transparent; border: 0;
}
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-progress {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 0; background: transparent;
}
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-progress strong {
  font-size: 16px; font-weight: 800; color: var(--cl-accent, #0f172a);
}
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-progress strong i {
  font-size: 10px; font-style: normal; opacity: .7;
}
#wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-progress span {
  font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #94a3b8;
}

/* Responsive: collapse list on narrow screens */
@media (max-width: 1100px) {
  #wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card {
    grid-template-columns: 36px 1fr auto auto;
  }
  #wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-metrics > div:nth-child(n+3),
  #wkHomeAcctGrid[data-ha-list-view="list"] .wk-cl-card .wk-account-budget { display: none; }
}

@media (max-width: 760px) {
  .wk-tab-panel[data-wk-panel="clients"] .ph-hub { padding: 10px; }
  .ph-sub[data-subpanel="home-accounts"] { padding: 10px; }
  .wk-cl-grid.wk-ha-grid,
  #wkClAllGrid.wk-cl-grid { grid-template-columns: 1fr; padding: 12px; }
  .wk-account-card { min-height: 0; }
  .wk-account-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wk-account-footer { grid-template-columns: 1fr auto; }
  .wk-account-open-cue { display: none; }
  .wk-account-detail-hero,
  .wk-cl-detail-head { flex-wrap: wrap; }
  .wk-account-detail-hero { align-items: flex-start; }
  .wk-account-detail-titleblock { flex: 1 1 calc(100% - 76px); }
  .wk-account-detail-name,
  .wk-account-detail-meta {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .wk-account-back-btn { order: 0; }
  .wk-account-detail-logo { order: 1; }
  .wk-account-detail-titleblock { order: 2; }
  .wk-account-crm-btn { order: 3; margin-left: 62px; }
  .wk-account-detail-grid { grid-template-columns: 1fr; }
  .wk-account-crm-btn,
  .wk-cl-crm-link { margin-left: 0; }
}
