/**
 * Insurance Quote Manager Pro - dashboard styles (Step 11).
 * Builds on iqmp-auth.css tokens. Blue/white, card-based, responsive.
 * Scoped under .iqmp-dash.
 */

.iqmp-dash {
	--iqmp-primary: #0A66C2;
	--iqmp-ink: #101828;
	--iqmp-muted: #667085;
	--iqmp-line: #e4e7ec;
	--iqmp-bg: #f7f9fc;

	max-width: 1180px;
	margin: 28px auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--iqmp-ink);
	box-sizing: border-box;
}
.iqmp-dash *, .iqmp-dash *::before, .iqmp-dash *::after { box-sizing: border-box; }

/* Header */
.iqmp-dash__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	background: #fff;
	border: 1px solid var(--iqmp-line);
	border-radius: 16px;
	padding: 22px 26px;
	margin-bottom: 20px;
	box-shadow: 0 4px 18px rgba(16, 24, 40, 0.05);
}
.iqmp-dash__title { margin: 0 0 4px; font-size: 22px; font-weight: 700; }
.iqmp-dash__welcome { margin: 0; font-size: 14px; color: var(--iqmp-muted); }
.iqmp-dash__company { color: var(--iqmp-muted); }

/* Buttons */
.iqmp-dash .iqmp-btn {
	appearance: none; border: none; cursor: pointer; font-family: inherit;
	font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: 9px;
	text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
	transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.1s ease;
}
.iqmp-dash .iqmp-btn:active { transform: translateY(1px); }
.iqmp-dash .iqmp-btn--primary { background: var(--iqmp-primary); color: #fff; }
.iqmp-dash .iqmp-btn--ghost { background: #fff; color: var(--iqmp-ink); border: 1.5px solid var(--iqmp-line); }
.iqmp-dash .iqmp-btn--sm { padding: 7px 13px; font-size: 13px; }

/* Summary cards */
.iqmp-dash__cards {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 12px;
	margin-bottom: 22px;
}
.iqmp-stat {
	background: #fff;
	border: 1px solid var(--iqmp-line);
	border-radius: 12px;
	padding: 16px;
	box-shadow: 0 2px 10px rgba(16, 24, 40, 0.04);
	border-top: 3px solid var(--iqmp-primary);
}
.iqmp-stat--total { border-top-color: var(--iqmp-primary); background: linear-gradient(180deg, color-mix(in srgb, var(--iqmp-primary) 6%, #fff), #fff); }
.iqmp-stat--status { border-top-color: var(--iqmp-badge, var(--iqmp-primary)); }
.iqmp-stat__value { display: block; font-size: 24px; font-weight: 800; line-height: 1.1; }
.iqmp-stat__label { display: block; margin-top: 6px; font-size: 12px; color: var(--iqmp-muted); font-weight: 600; }

/* Filters */
.iqmp-dash__filters {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 14px;
	align-items: end;
	background: #fff;
	border: 1px solid var(--iqmp-line);
	border-radius: 14px;
	padding: 18px 20px;
	margin-bottom: 18px;
	box-shadow: 0 2px 10px rgba(16, 24, 40, 0.04);
}
.iqmp-filter { display: flex; flex-direction: column; gap: 5px; }
.iqmp-filter label { font-size: 12px; font-weight: 600; color: var(--iqmp-muted); }
.iqmp-filter input, .iqmp-filter select {
	width: 100%; padding: 9px 11px; font-size: 13px; font-family: inherit;
	border: 1.5px solid var(--iqmp-line); border-radius: 8px; background: #fff; color: var(--iqmp-ink);
}
.iqmp-filter input:focus, .iqmp-filter select:focus { outline: none; border-color: var(--iqmp-primary); }
.iqmp-filter--search { grid-column: span 2; }
.iqmp-filter__actions { display: flex; gap: 8px; grid-column: span 2; }

/* Result bar */
.iqmp-dash__resultbar { font-size: 13px; color: var(--iqmp-muted); margin: 0 0 10px 4px; font-weight: 600; }

/* Table */
.iqmp-dash__tablewrap {
	background: #fff; border: 1px solid var(--iqmp-line); border-radius: 14px;
	overflow-x: auto; -webkit-overflow-scrolling: touch;
	box-shadow: 0 2px 12px rgba(16, 24, 40, 0.05);
	max-width: 100%;
}
.iqmp-dash__table { width: 100%; border-collapse: collapse; min-width: 980px; }
.iqmp-dash__table thead th {
	text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px;
	color: var(--iqmp-muted); padding: 14px 14px; border-bottom: 1px solid var(--iqmp-line);
	background: var(--iqmp-bg); white-space: nowrap;
}
/* Keep the Action column (last) always visible on the right while scrolling. */
.iqmp-dash__table thead th:last-child,
.iqmp-dash__table tbody td:last-child {
	position: sticky; right: 0; z-index: 2;
	background: #fff; box-shadow: -6px 0 8px -6px rgba(16,24,40,0.12);
	text-align: center; min-width: 120px;
}
.iqmp-dash__table thead th:last-child { background: var(--iqmp-bg); }
.iqmp-dash__table tbody tr:hover td:last-child { background: color-mix(in srgb, var(--iqmp-primary) 3%, #fff); }
.iqmp-dash__table thead th a { color: var(--iqmp-muted); text-decoration: none; }
.iqmp-dash__table thead th a:hover { color: var(--iqmp-primary); }
.iqmp-dash__table tbody td { padding: 13px 14px; border-bottom: 1px solid var(--iqmp-line); font-size: 13.5px; vertical-align: middle; }
.iqmp-dash__table tbody tr:last-child td { border-bottom: 0; }
.iqmp-dash__table tbody tr:hover { background: color-mix(in srgb, var(--iqmp-primary) 3%, #fff); }
.iqmp-dash__empty { text-align: center; color: var(--iqmp-muted); padding: 32px 14px; font-style: italic; }

/* Badge */
.iqmp-badge {
	display: inline-block; padding: 4px 11px; border-radius: 999px;
	font-size: 11.5px; font-weight: 700; color: #fff; white-space: nowrap; background: #6b7280;
}

/* Pagination */
.iqmp-dash__pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 22px 0 0; }
.iqmp-page {
	min-width: 38px; text-align: center; padding: 8px 12px; border-radius: 8px;
	border: 1.5px solid var(--iqmp-line); background: #fff; color: var(--iqmp-ink);
	text-decoration: none; font-size: 13px; font-weight: 600;
}
.iqmp-page:hover { border-color: var(--iqmp-primary); color: var(--iqmp-primary); }
.iqmp-page.is-current { background: var(--iqmp-primary); border-color: var(--iqmp-primary); color: #fff; }

/* ---------- Detail view ---------- */
.iqmp-detail__card {
	background: #fff; border: 1px solid var(--iqmp-line); border-radius: 14px;
	padding: 20px 22px; margin-bottom: 16px; box-shadow: 0 2px 12px rgba(16, 24, 40, 0.05);
}
.iqmp-detail__cardhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.iqmp-detail__cardtitle { margin: 0 0 14px; font-size: 15px; font-weight: 700; color: var(--iqmp-primary); }
.iqmp-detail__cardhead .iqmp-detail__cardtitle { margin: 0; }
.iqmp-detail__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 24px; }
.iqmp-detail__row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--iqmp-line); font-size: 13.5px; }
.iqmp-detail__key { color: var(--iqmp-muted); font-weight: 500; }
.iqmp-detail__val { color: var(--iqmp-ink); font-weight: 600; text-align: right; word-break: break-word; }

.iqmp-detail__people { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.iqmp-detail__person { background: var(--iqmp-bg); border: 1px solid var(--iqmp-line); border-radius: 10px; padding: 14px 16px; }
.iqmp-detail__person-head { font-size: 13px; font-weight: 700; color: var(--iqmp-primary); margin-bottom: 8px; }
.iqmp-detail__footer { margin-top: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
	.iqmp-dash__cards { grid-template-columns: repeat(4, 1fr); }
	.iqmp-dash__filters { grid-template-columns: repeat(4, 1fr); }
	.iqmp-filter--search { grid-column: span 2; }
	.iqmp-filter__actions { grid-column: span 2; }
}

@media (max-width: 720px) {
	.iqmp-dash { margin: 14px 10px; }
	.iqmp-dash__cards { grid-template-columns: repeat(2, 1fr); }
	.iqmp-dash__filters { grid-template-columns: 1fr 1fr; }
	.iqmp-filter--search, .iqmp-filter__actions { grid-column: span 2; }
	.iqmp-detail__grid { grid-template-columns: 1fr; }
	.iqmp-detail__people { grid-template-columns: 1fr; }

	/* Responsive table → stacked cards */
	.iqmp-dash__table { min-width: 0; }
	.iqmp-dash__table thead { display: none; }
	.iqmp-dash__table tbody tr {
		display: block; border: 1px solid var(--iqmp-line); border-radius: 12px;
		margin: 12px; padding: 6px 0; background: #fff;
	}
	.iqmp-dash__table tbody td {
		display: flex; justify-content: space-between; align-items: center; gap: 14px;
		padding: 9px 16px; border-bottom: 1px dashed var(--iqmp-line); text-align: right;
	}
	.iqmp-dash__table tbody tr td:last-child { border-bottom: 0; }
	.iqmp-dash__table tbody td::before {
		content: attr(data-label); font-size: 11.5px; text-transform: uppercase;
		letter-spacing: 0.3px; color: var(--iqmp-muted); font-weight: 700; text-align: left;
	}
	.iqmp-dash__tablewrap { overflow-x: visible; border: 0; box-shadow: none; background: transparent; }
}

@media (max-width: 440px) {
	.iqmp-dash__cards { grid-template-columns: 1fr; }
}

/* ---------- Quote management (Step 12) ---------- */
.iqmp-summary__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px 24px;
}
.iqmp-summary__item { display: flex; flex-direction: column; gap: 3px; }
.iqmp-summary__k { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--iqmp-muted); font-weight: 700; }
.iqmp-summary__v { font-size: 14px; font-weight: 600; color: var(--iqmp-ink); }

.iqmp-manage__feedback {
	margin-bottom: 14px; padding: 10px 14px; border-radius: 9px; font-size: 13px; font-weight: 600;
}
.iqmp-manage__feedback.is-ok { background: #ecfdf3; border: 1px solid #a6f4c5; color: #027a48; }
.iqmp-manage__feedback.is-error { background: #fef3f2; border: 1px solid #fecdca; color: #b42318; }
.iqmp-manage__feedback[hidden] { display: none; }

.iqmp-manage__grid {
	display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px;
}
.iqmp-manage__field { display: flex; flex-direction: column; gap: 6px; }
.iqmp-manage__field--full { grid-column: 1 / -1; }
.iqmp-manage__field label { font-size: 12.5px; font-weight: 600; color: var(--iqmp-muted); }
.iqmp-manage__inline { display: flex; gap: 8px; align-items: center; }
.iqmp-manage__inline select,
.iqmp-manage__inline input,
.iqmp-manage__field textarea,
.iqmp-notes__add textarea {
	padding: 9px 11px; font-size: 13.5px; font-family: inherit; border: 1.5px solid var(--iqmp-line);
	border-radius: 8px; background: #fff; color: var(--iqmp-ink); width: 100%;
}
.iqmp-manage__inline select:focus,
.iqmp-manage__inline input:focus,
.iqmp-manage__field textarea:focus,
.iqmp-notes__add textarea:focus { outline: none; border-color: var(--iqmp-primary); }
.iqmp-manage__inline .iqmp-btn { flex-shrink: 0; }
.iqmp-manage__field--full textarea { margin-bottom: 8px; }
.iqmp-manage__field--full .iqmp-btn { align-self: flex-start; }

/* Notes */
.iqmp-notes__add { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.iqmp-notes__add .iqmp-btn { align-self: flex-start; }
.iqmp-notes__list { list-style: none; margin: 0; padding: 0; }
.iqmp-notes__empty { color: var(--iqmp-muted); font-style: italic; font-size: 13.5px; }
.iqmp-note { border: 1px solid var(--iqmp-line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: var(--iqmp-bg); }
.iqmp-note__meta { font-size: 12px; color: var(--iqmp-muted); margin-bottom: 5px; }
.iqmp-note__body { font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }

/* Activity timeline */
.iqmp-activity__list { list-style: none; margin: 0; padding: 0; }
.iqmp-activity__empty { color: var(--iqmp-muted); font-style: italic; font-size: 13.5px; }
.iqmp-activity__item { position: relative; display: flex; gap: 14px; padding: 0 0 18px 0; }
.iqmp-activity__item:last-child { padding-bottom: 0; }
.iqmp-activity__dot {
	position: relative; z-index: 1; flex-shrink: 0; width: 12px; height: 12px; margin-top: 4px;
	border-radius: 50%; background: var(--iqmp-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--iqmp-primary) 16%, #fff);
}
.iqmp-activity__item::before {
	content: ""; position: absolute; left: 5px; top: 16px; bottom: -4px; width: 2px; background: var(--iqmp-line);
}
.iqmp-activity__item:last-child::before { display: none; }
.iqmp-activity__time { font-size: 12px; color: var(--iqmp-muted); margin-bottom: 2px; }
.iqmp-activity__desc { font-size: 13.5px; font-weight: 600; }

@media (max-width: 720px) {
	.iqmp-summary__grid { grid-template-columns: repeat(2, 1fr); }
	.iqmp-manage__grid { grid-template-columns: 1fr; }
	.iqmp-manage__inline { flex-wrap: wrap; }
}

/* ---------- Reports & Analytics (Step 14) ---------- */
.iqmp-dash__headeractions { display: flex; gap: 8px; flex-wrap: wrap; }
.iqmp-dash__exportlinks { margin-left: 10px; display: inline-flex; gap: 6px; }

.iqmp-reports__filter {
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: end;
	background: #fff; border: 1px solid var(--iqmp-line); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px;
	box-shadow: 0 2px 10px rgba(16,24,40,0.04);
}

.iqmp-reports__empty { color: var(--iqmp-muted); font-style: italic; font-size: 14px; }

.iqmp-reports__revenue { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.iqmp-revenue { border: 1px solid var(--iqmp-line); border-radius: 12px; padding: 16px; background: var(--iqmp-bg); }
.iqmp-revenue__cur { font-size: 14px; font-weight: 800; color: var(--iqmp-primary); margin-bottom: 12px; letter-spacing: 0.5px; }
.iqmp-revenue__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px; }
.iqmp-revenue__grid div { display: flex; flex-direction: column; gap: 2px; }
.iqmp-revenue__grid span { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--iqmp-muted); font-weight: 700; }
.iqmp-revenue__grid strong { font-size: 14px; color: var(--iqmp-ink); }

.iqmp-reports__charts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px; }
.iqmp-chartbox { margin-bottom: 0; }
.iqmp-chartbox--wide { grid-column: 1 / -1; }
/* Constrain chart height: Chart.js with maintainAspectRatio:false fills the
   parent, so the canvas needs a bounded box or it grows unbounded. */
.iqmp-chartbox__canvas { position: relative; height: 260px; width: 100%; }
.iqmp-chartbox--wide .iqmp-chartbox__canvas { height: 300px; }
.iqmp-chartbox__canvas canvas { max-width: 100%; }

.iqmp-reports__exporthint { font-size: 13px; color: var(--iqmp-muted); margin: 0 0 12px; }
.iqmp-reports__exportbtns { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }

@media (max-width: 820px) {
	.iqmp-reports__filter { grid-template-columns: 1fr 1fr; }
	.iqmp-reports__charts { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
	.iqmp-reports__filter { grid-template-columns: 1fr; }
	.iqmp-revenue__grid { grid-template-columns: 1fr 1fr; }
}

/* Agent panel table (same scroll + pinned action treatment) */
.iqmp-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.iqmp-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.iqmp-table thead th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; color: #6b7280; padding: 13px 14px; border-bottom: 1px solid #e5e7eb; background: #f7f9fc; white-space: nowrap; }
.iqmp-table tbody td { padding: 12px 14px; border-bottom: 1px solid #eef1f5; font-size: 13.5px; vertical-align: middle; white-space: nowrap; }
.iqmp-table thead th:last-child, .iqmp-table tbody td:last-child {
	position: sticky; right: 0; z-index: 2; background: #fff; text-align: center; min-width: 110px;
	box-shadow: -6px 0 8px -6px rgba(16,24,40,0.12);
}
.iqmp-table thead th:last-child { background: #f7f9fc; }

/* =====================================================================
   AGENT PANEL — professional layout matching the company dashboard
   ================================================================== */
.iqmp-agent {
	max-width: 1240px; margin: 0 auto; padding: 8px 4px 24px;
	color: var(--iqmp-ink, #101828);
	font-family: inherit;
}

/* Header */
.iqmp-agent .iqmp-dash__head {
	display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
	background: #fff; border: 1px solid var(--iqmp-line, #e5e7eb); border-radius: 16px;
	padding: 22px 26px; margin-bottom: 22px; box-shadow: 0 2px 12px rgba(16,24,40,0.05);
}
.iqmp-agent .iqmp-dash__title { margin: 0; font-size: 24px; font-weight: 800; }
.iqmp-agent .iqmp-dash__welcome { margin: 4px 0 0; color: var(--iqmp-muted, #667085); font-size: 14px; }
.iqmp-agent .iqmp-dash__headeractions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Buttons (reuse dashboard button styles) */
.iqmp-agent .iqmp-btn {
	appearance: none; border: none; cursor: pointer; font-family: inherit;
	font-size: 14px; font-weight: 600; padding: 10px 18px; border-radius: 9px;
	text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
	transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.1s ease; line-height: 1.2;
}
.iqmp-agent .iqmp-btn:active { transform: translateY(1px); }
.iqmp-agent .iqmp-btn--primary { background: var(--iqmp-primary, #0A66C2); color: #fff; }
.iqmp-agent .iqmp-btn--primary:hover { background: color-mix(in srgb, var(--iqmp-primary, #0A66C2) 88%, #000); }
.iqmp-agent .iqmp-btn--ghost { background: #fff; color: var(--iqmp-ink, #101828); border: 1.5px solid var(--iqmp-line, #e5e7eb); }
.iqmp-agent .iqmp-btn--secondary { background: #eef2f7; color: var(--iqmp-ink, #101828); }
.iqmp-agent .iqmp-btn--sm { padding: 7px 14px; font-size: 13px; }

/* Summary cards — 6-up grid like the company dashboard */
.iqmp-stats--agent {
	display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 22px;
}
.iqmp-stats--agent .iqmp-stat {
	background: #fff; border: 1px solid var(--iqmp-line, #e5e7eb); border-radius: 12px;
	padding: 16px; box-shadow: 0 2px 10px rgba(16,24,40,0.04);
	border-top: 3px solid var(--iqmp-primary, #0A66C2); min-height: 84px;
}
.iqmp-stats--agent .iqmp-stat__num { display: block; font-size: 24px; font-weight: 800; line-height: 1.1; }
.iqmp-stats--agent .iqmp-stat__label { display: block; margin-top: 6px; font-size: 12px; color: var(--iqmp-muted, #667085); font-weight: 600; }
.iqmp-stats--agent .iqmp-stat--total { background: linear-gradient(180deg, color-mix(in srgb, var(--iqmp-primary, #0A66C2) 6%, #fff), #fff); }
.iqmp-stats--agent .iqmp-stat--new { border-top-color: #0A66C2; }
.iqmp-stats--agent .iqmp-stat--review { border-top-color: #f59e0b; }
.iqmp-stats--agent .iqmp-stat--quoted { border-top-color: #14b8a6; }
.iqmp-stats--agent .iqmp-stat--approved { border-top-color: #16a34a; }
.iqmp-stats--agent .iqmp-stat--rejected { border-top-color: #dc2626; }

/* Filters row — horizontal like company dashboard */
.iqmp-agent__filters {
	display: grid; grid-template-columns: 1fr 2fr auto; gap: 16px; align-items: end;
	background: #fff; border: 1px solid var(--iqmp-line, #e5e7eb); border-radius: 14px;
	padding: 18px 20px; margin-bottom: 18px; box-shadow: 0 2px 10px rgba(16,24,40,0.04);
}
.iqmp-agent .iqmp-field { display: flex; flex-direction: column; gap: 5px; margin: 0; }
.iqmp-agent .iqmp-field__label { font-size: 12px; font-weight: 600; color: var(--iqmp-muted, #667085); }
.iqmp-agent .iqmp-field input, .iqmp-agent .iqmp-field select {
	width: 100%; padding: 10px 12px; font-size: 14px; font-family: inherit;
	border: 1.5px solid var(--iqmp-line, #e5e7eb); border-radius: 8px; background: #fff; color: var(--iqmp-ink, #101828);
}
.iqmp-agent .iqmp-field input:focus, .iqmp-agent .iqmp-field select:focus { outline: none; border-color: var(--iqmp-primary, #0A66C2); }
.iqmp-agent .iqmp-field__actions { display: flex; gap: 8px; align-items: flex-end; }

/* Card wrapper */
.iqmp-agent .iqmp-card {
	background: #fff; border: 1px solid var(--iqmp-line, #e5e7eb); border-radius: 14px;
	box-shadow: 0 2px 10px rgba(16,24,40,0.04);
}
.iqmp-agent .iqmp-tablewrap { padding: 8px 0 0; }
.iqmp-agent .iqmp-tablewrap__count { font-size: 13px; color: var(--iqmp-muted, #667085); font-weight: 600; margin: 6px 16px 10px; }
.iqmp-agent .iqmp-table__empty { text-align: center; color: var(--iqmp-muted, #667085); padding: 30px 14px; font-style: italic; }

/* Pagination */
.iqmp-agent .iqmp-pagination { display: flex; gap: 6px; flex-wrap: wrap; padding: 14px 16px; }
.iqmp-agent .iqmp-pagination__link {
	display: inline-flex; min-width: 34px; height: 34px; align-items: center; justify-content: center;
	padding: 0 10px; border: 1px solid var(--iqmp-line, #e5e7eb); border-radius: 8px;
	color: var(--iqmp-ink, #101828); text-decoration: none; font-size: 13px; font-weight: 600;
}
.iqmp-agent .iqmp-pagination__link.is-current { background: var(--iqmp-primary, #0A66C2); color: #fff; border-color: var(--iqmp-primary, #0A66C2); }

/* =====================================================================
   AGENT DETAIL — professional layout matching company detail
   ================================================================== */
.iqmp-agent-detail { max-width: 1100px; margin: 0 auto; padding: 8px 4px 24px; }
.iqmp-agent-detail .iqmp-dash__head {
	display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
	background: #fff; border: 1px solid var(--iqmp-line, #e5e7eb); border-radius: 16px;
	padding: 22px 26px; margin-bottom: 20px; box-shadow: 0 2px 12px rgba(16,24,40,0.05);
}
.iqmp-agent-detail .iqmp-dash__title { margin: 0; font-size: 22px; font-weight: 800; }
.iqmp-agent-detail .iqmp-dash__welcome { margin: 4px 0 0; color: var(--iqmp-muted, #667085); font-size: 14px; }
.iqmp-agent-detail .iqmp-btn {
	appearance: none; border: none; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600;
	padding: 10px 18px; border-radius: 9px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
.iqmp-agent-detail .iqmp-btn--primary { background: var(--iqmp-primary, #0A66C2); color: #fff; }
.iqmp-agent-detail .iqmp-btn--secondary { background: #eef2f7; color: var(--iqmp-ink, #101828); }
.iqmp-agent-detail .iqmp-btn--ghost { background: #fff; color: var(--iqmp-ink, #101828); border: 1.5px solid var(--iqmp-line, #e5e7eb); }
.iqmp-agent-detail .iqmp-btn--sm { padding: 7px 14px; font-size: 13px; }
.iqmp-agent-detail .iqmp-card {
	background: #fff; border: 1px solid var(--iqmp-line, #e5e7eb); border-radius: 14px;
	padding: 22px 24px; margin-bottom: 18px; box-shadow: 0 2px 10px rgba(16,24,40,0.04);
}
.iqmp-agent-detail h2 { font-size: 18px; font-weight: 700; margin: 0 0 16px; color: var(--iqmp-primary, #0A66C2); }
.iqmp-agent-detail h3 { font-size: 15px; font-weight: 700; margin: 0 0 12px; color: var(--iqmp-primary, #0A66C2); }

/* Summary card as a horizontal grid, not a stacked list */
.iqmp-agent-detail .iqmp-detail__summary {
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 24px;
}
.iqmp-agent-detail .iqmp-summary__item { display: flex; flex-direction: column; gap: 3px; }
.iqmp-agent-detail .iqmp-summary__k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--iqmp-muted, #667085); font-weight: 700; }
.iqmp-agent-detail .iqmp-summary__v { font-size: 15px; font-weight: 600; }

/* Management rows */
.iqmp-agent-detail .iqmp-manage__row { margin-bottom: 18px; }
.iqmp-agent-detail .iqmp-manage__row > label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.iqmp-agent-detail .iqmp-manage__sublabel { margin-top: 12px; }
.iqmp-agent-detail .iqmp-manage__inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.iqmp-agent-detail select, .iqmp-agent-detail input[type="date"], .iqmp-agent-detail textarea {
	padding: 10px 12px; font-size: 14px; font-family: inherit; border: 1.5px solid var(--iqmp-line, #e5e7eb);
	border-radius: 8px; background: #fff; color: var(--iqmp-ink, #101828); width: 100%; max-width: 520px;
}
.iqmp-agent-detail .iqmp-manage__inline select, .iqmp-agent-detail .iqmp-manage__inline input { max-width: 340px; }
.iqmp-agent-detail select:focus, .iqmp-agent-detail input:focus, .iqmp-agent-detail textarea:focus { outline: none; border-color: var(--iqmp-primary, #0A66C2); }
.iqmp-agent-detail textarea { min-height: 72px; resize: vertical; margin-bottom: 8px; }
.iqmp-agent-detail .iqmp-detail__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 24px; }
.iqmp-agent-detail .iqmp-detail__row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid #f1f3f5; }
.iqmp-agent-detail .iqmp-detail__k { color: var(--iqmp-muted, #667085); font-size: 13px; }
.iqmp-agent-detail .iqmp-detail__v { font-weight: 600; font-size: 13px; text-align: right; }
.iqmp-agent-detail .iqmp-note { padding: 10px 0; border-bottom: 1px solid #f1f3f5; }
.iqmp-agent-detail .iqmp-note__meta { font-size: 12px; color: var(--iqmp-muted, #667085); margin-bottom: 3px; }
.iqmp-agent-detail .iqmp-muted { color: var(--iqmp-muted, #667085); font-style: italic; }
.iqmp-agent-detail .iqmp-detail__feedback { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 600; }

/* Responsive */
@media (max-width: 1080px) {
	.iqmp-stats--agent { grid-template-columns: repeat(3, 1fr); }
	.iqmp-agent-detail .iqmp-detail__summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
	.iqmp-stats--agent { grid-template-columns: repeat(2, 1fr); }
	.iqmp-agent__filters { grid-template-columns: 1fr; }
	.iqmp-agent-detail .iqmp-detail__summary { grid-template-columns: 1fr; }
	.iqmp-agent-detail .iqmp-detail__grid { grid-template-columns: 1fr; }
}
