/* Page-level tidy-ups for the dashboard pages (leads, approvals, research, pipeline, agents, alerts ...). */

/* Wide tables scroll inside their card, never the whole page. */
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap > table { min-width: 100%; }
.table-wrap td, .table-wrap th { overflow-wrap: anywhere; }
.table-wrap td.num, .table-wrap th.num, .table-wrap td.actions { overflow-wrap: normal; }

/* Page header: title plus one line on what the page is for. */
.page-head { margin: 0 0 1rem; }
.page-head h1 { margin: 0 0 0.25rem; }
.page-head .purpose { margin: 0; color: var(--muted); max-width: 70ch; }

/* Long URLs and file names never push the page sideways. */
.card .src, .crumbs a, dl.kv dd { overflow-wrap: anywhere; }

/* The "Details" disclosure under a whole page sits apart from the last card. */
main > details.tech, .content > details.tech { margin: 1rem 0; }

/* Playbook text wraps instead of scrolling the page. */
pre.playbook { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Accounts page: state pills, email-domain ticks, today's use. */
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-crit { background: var(--crit-bg); color: var(--crit); }
.pill-muted { background: var(--line); color: var(--muted); }
.dns-check { display: inline-block; margin-right: 0.5rem; font-weight: 600; white-space: nowrap; }
.dns-ok { color: var(--ok); }
.dns-bad { color: var(--crit); }
.accounts-table td.usage { white-space: nowrap; }
.accounts-empty ul { margin: 0.5rem 0 1rem; padding-left: 1.25rem; }
.accounts-empty li { margin: 0.25rem 0; }
.tech td.mono { font-family: var(--mono); }

/* Replies inbox (inbox.html, inbox_conversation.html). */
.inbox-table tr.needs-me td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.inbox-table td.reply-snippet { max-width: 34ch; }
.inbox-action { display: inline-block; font-size: 0.82rem; font-weight: 600; border-radius: 999px; padding: 0.05rem 0.55rem; background: #eef1f5; color: var(--ink); }
.inbox-waiting { background: var(--warn-bg); color: var(--warn); }
.inbox-opted_out { background: var(--crit-bg); color: var(--crit); }
.inbox-auto, .inbox-answered { background: var(--ok-bg); color: var(--ok); }
.inbox-unread, .inbox-none { background: var(--line); color: var(--muted); }
.inbox-task + .inbox-task { border-top: 1px solid var(--line); margin-top: 0.8rem; padding-top: 0.8rem; }
.inbox-task p { margin: 0 0 0.4rem; }
.inbox-blocked { margin: 0; padding: 0.6rem 0.8rem; border-radius: 6px; background: var(--crit-bg); color: var(--crit); }
.msg-out { background: var(--surface); }
.msg-blocked { border-color: var(--crit); }

/* Results (results.html): the Analyst's KPI cards, funnel and reviews. */
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.results-agent { border: 1px solid var(--line); border-radius: 8px; padding: 0.75rem 0.9rem; }
.results-agent h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.results-kpi + .results-kpi { border-top: 1px solid var(--line); margin-top: 0.6rem; padding-top: 0.6rem; }
.results-kpi p { margin: 0.2rem 0; }
.results-value { font-size: 1.05rem; font-weight: 600; }
.results-small { color: var(--muted); }
.results-review + .results-review { border-top: 1px solid var(--line); margin-top: 0.8rem; padding-top: 0.8rem; }
.results-pick label { margin-right: 0.4rem; font-weight: 600; }
