/* Home (#home): tiles, the "Needs your attention" list and a status line per source. Styled like the AML page. */
/* Header as in the old Claude hub: eyebrow, greeting, date; status on the right; a 2px rule underneath. */
.home-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 10px 20px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); margin-bottom: 22px; }
.home-eyebrow { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.home-greet { font-size: 2.4rem; font-weight: 700; line-height: 1.1; text-transform: none; letter-spacing: 0; }
.home-date { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
.home-status { display: flex; align-items: center; gap: 10px; margin-left: auto; }
@media (max-width: 640px) { .home-head { align-items: flex-start; } .home-status { margin-left: 0; width: 100%; } .home-greet { font-size: 2rem; } }
.home-h { font-family: var(--display); font-size: 18px; margin: 0 0 10px; }
.home-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-kpis .kpi { text-decoration: none; }
.home-kpis .kpi b { font-size: 34px; }
.home-kpis .kpi small { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 1100px) { .home-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .home-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .home-kpis .kpi b { font-size: 28px; } }

.home-today { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: baseline; margin: 0 0 18px; padding: 12px 16px; background: var(--pma-blue-soft); border-radius: var(--radius); font-size: 14px; }
.home-today[hidden] { display: none; }
.home-today a { font-weight: 600; text-decoration: none; }
.home-today .hl { color: var(--ink-2); flex: 1 1 320px; }

.home-board { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; margin: 22px 0; align-items: start; }
@media (max-width: 900px) { .home-board { grid-template-columns: 1fr; } }
.home-main, .home-side { display: grid; gap: 20px; align-content: start; min-width: 0; }
.home-list { display: grid; gap: 10px; align-content: start; }
/* One card per source: count, top client names; opens to its per-client items. */
.home-card { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent, var(--line)); border-radius: var(--radius); box-shadow: var(--shadow); }
.home-card.red { --accent: var(--red); } .home-card.amber { --accent: var(--amber); } .home-card.blue { --accent: var(--pma-blue); } .home-card.grey { --accent: var(--st-inactive); }
.home-card-top { display: flex; align-items: center; gap: 12px; padding-right: 16px; }
.home-card-head { flex: 1; display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; text-align: left; font: inherit; color: inherit; background: none; border: 0; padding: 12px 16px; cursor: pointer; }
.home-card-head b { font-size: 14.5px; }
.home-card-head .n { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-family: var(--display); font-size: 26px; font-weight: 700; color: var(--accent, var(--ink)); }
.home-card-head .who { color: var(--muted); font-size: 13px; line-height: 1.45; }
.home-card-link { white-space: nowrap; }
.home-card-items { display: grid; gap: 2px; padding: 0 16px 12px; border-top: 1px solid var(--line-2); }
.home-item { display: grid; gap: 2px; padding: 9px 0; border-bottom: 1px solid var(--line-2); color: inherit; text-decoration: none; }
.home-item:last-of-type { border-bottom: 0; }
.home-item:hover b { color: var(--pma-blue); }
.home-item b { font-size: 13.5px; font-weight: 600; }
.home-item span { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.home-more { justify-self: start; margin-top: 6px; }
.home-due td { vertical-align: top; }
.home-x { color: var(--muted); font-weight: 600; white-space: nowrap; }
.home-task { color: inherit; text-decoration: none; display: block; }
.home-task:hover b { color: var(--pma-blue); }
.home-task small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
@media (max-width: 640px) { .home-due .hide-sm { display: none; } }

/* Clients by status: radial bars (same colours as the Clients page donut). */
.hr-body { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hr-svg { width: 190px; height: 190px; flex: none; }
.hr-track { stroke: var(--line-2); }
.hr-arc { cursor: pointer; transition: opacity .12s; }
.hr-arc:hover { opacity: .8; }
.hr-total { font-family: var(--display); font-size: 34px; font-weight: 700; fill: var(--ink); }
.hr-legend { list-style: none; margin: 0; padding: 0; flex: 1 1 170px; display: grid; gap: 2px; font-size: 13.5px; }
.hr-legend li { display: grid; grid-template-columns: 12px 1fr auto 3.2em; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 6px; }
.hr-legend li[data-hstatus] { cursor: pointer; }
.hr-legend li[data-hstatus]:hover, .hr-legend li[data-hstatus]:focus-visible { background: var(--line-2); outline: none; }
.hr-legend i { width: 11px; height: 11px; border-radius: 3px; }
.hr-legend small { color: var(--muted); text-align: right; }
.hr-legend .hr-total-row { grid-template-columns: 1fr auto; border-top: 1px solid var(--line-2); margin-top: 4px; padding-top: 8px; font-weight: 600; }

.home-sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.home-sources li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.home-sources li:last-child { border-bottom: 0; }
.home-sources .st { text-align: right; color: var(--muted); }
.home-sources .st.items { color: var(--amber); font-weight: 600; }
.home-sources .st.clear { color: var(--green); font-weight: 600; }
.home-sources .st.error { color: var(--red); }
.home-sources .st.pending { color: var(--pma-blue); }
