/* Partner & Loan Lead Manager: front-end. Mobile first. Scoped to .pllm-app. */
.pllm-app {
	--pllm-ink: #1a2230;
	--pllm-muted: #5c6776;
	--pllm-line: #dfe3ea;
	--pllm-surface: #ffffff;
	--pllm-tint: #f4f6f9;
	--pllm-brand: #1b4dd1;
	--pllm-brand-ink: #ffffff;
	--pllm-good: #0f6b42;
	--pllm-good-bg: #e2f4ea;
	--pllm-warn: #8a5a00;
	--pllm-warn-bg: #fdf2d8;
	--pllm-bad: #a32121;
	--pllm-bad-bg: #fbe6e6;
	--pllm-info: #1b4dd1;
	--pllm-info-bg: #e6edfc;
	box-sizing: border-box;
	color: var(--pllm-ink);
	font-size: 15px;
	line-height: 1.5;
	margin: 0 auto;
	max-width: 1180px !important;
	width: 100%;
}
.pllm-app *, .pllm-app *::before, .pllm-app *::after { box-sizing: border-box; }
.pllm-app h2, .pllm-app h3 { color: var(--pllm-ink); font-size: 1.25rem; line-height: 1.3; margin: 0 0 12px; }
.pllm-app h3 { font-size: 1.05rem; }
.pllm-app p { margin: 0 0 12px; }
.pllm-app a { color: var(--pllm-brand); }
.pllm-muted { color: var(--pllm-muted); }
.pllm-auth { max-width: 460px !important; }
.pllm-auth-wide { max-width: 720px !important; }
.pllm-card {
	background: var(--pllm-surface);
	border: 1px solid var(--pllm-line);
	border-radius: 10px;
	margin-bottom: 16px;
	padding: 16px;
}
.pllm-card-head { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin-bottom: 8px; }
.pllm-card-head h2, .pllm-card-head h3 { margin: 0; }

.pllm-topbar { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin-bottom: 12px; }
.pllm-name { display: block; font-size: 1.05rem; overflow-wrap: anywhere; }
.pllm-code { color: var(--pllm-muted); font-size: .85rem; }

.pllm-shell { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.pllm-main { min-width: 0; }
.pllm-nav ul { display: flex; gap: 6px; list-style: none; margin: 0; overflow-x: auto; padding: 0 0 6px; -webkit-overflow-scrolling: touch; }
.pllm-nav a {
	align-items: center;
	border: 1px solid var(--pllm-line);
	border-radius: 8px;
	color: var(--pllm-ink);
	display: flex;
	gap: 6px;
	min-height: 44px;
	padding: 8px 12px;
	text-decoration: none;
	white-space: nowrap;
}
.pllm-nav a:hover { background: var(--pllm-tint); }
.pllm-nav a.is-active { background: var(--pllm-brand); border-color: var(--pllm-brand); color: var(--pllm-brand-ink); }
.pllm-nav a.is-locked { color: var(--pllm-muted); }
.pllm-lock { background: var(--pllm-tint); border-radius: 4px; color: var(--pllm-muted); font-size: .7rem; padding: 1px 5px; }

.pllm-welcome { align-items: flex-start; display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin-bottom: 12px; }
.pllm-welcome h2 { margin-bottom: 2px; overflow-wrap: anywhere; }
.pllm-welcome p { margin: 0; }
.pllm-badges { display: flex; flex-wrap: wrap; gap: 6px; }

.pllm-stats { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
.pllm-stat { background: var(--pllm-surface); border: 1px solid var(--pllm-line); border-radius: 10px; padding: 12px; }
.pllm-stat-label { color: var(--pllm-muted); display: block; font-size: .8rem; }
.pllm-stat-value { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.pllm-badge { border-radius: 999px; display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 10px; white-space: nowrap; }
.pllm-badge-good { background: var(--pllm-good-bg); color: var(--pllm-good); }
.pllm-badge-warn { background: var(--pllm-warn-bg); color: var(--pllm-warn); }
.pllm-badge-bad { background: var(--pllm-bad-bg); color: var(--pllm-bad); }
.pllm-badge-info, .pllm-badge-neutral { background: var(--pllm-info-bg); color: var(--pllm-info); }

.pllm-alert { border-radius: 8px; margin: 0 0 12px; padding: 10px 12px; }
.pllm-alert p { margin: 0; }
.pllm-alert p + p { margin-top: 4px; }
.pllm-alert-success { background: var(--pllm-good-bg); color: var(--pllm-good); }
.pllm-alert-error { background: var(--pllm-bad-bg); color: var(--pllm-bad); }
.pllm-alert-warn { background: var(--pllm-warn-bg); color: var(--pllm-warn); }
.pllm-alert-info { background: var(--pllm-info-bg); color: var(--pllm-info); }
.pllm-alert-row { align-items: center; display: flex; gap: 12px; justify-content: space-between; }
.pllm-dismiss-all { margin: -6px 0 12px; text-align: right; }

.pllm-form { margin: 0; }
.pllm-inline { display: inline-block; margin: 0; }
.pllm-center { display: block; margin-top: 12px; text-align: center; }
.pllm-field { margin-bottom: 12px; min-width: 0; }
.pllm-field label { display: block; font-weight: 600; margin-bottom: 4px; }
.pllm-field input[type="text"], .pllm-field input[type="email"], .pllm-field input[type="tel"],
.pllm-field input[type="password"], .pllm-field input[type="date"], .pllm-field input[type="number"],
.pllm-field input[type="file"], .pllm-field select, .pllm-field textarea {
	background: var(--pllm-surface);
	border: 1px solid #9aa4b2;
	border-radius: 8px;
	color: var(--pllm-ink);
	font: inherit;
	font-size: 16px; /* Stops iOS zooming on focus. */
	max-width: 100%;
	min-height: 44px;
	padding: 9px 10px;
	width: 100%;
}
.pllm-field input:focus, .pllm-field select:focus, .pllm-field textarea:focus,
.pllm-btn:focus-visible, .pllm-nav a:focus-visible, .pllm-link:focus-visible {
	outline: 2px solid var(--pllm-brand);
	outline-offset: 2px;
}
.pllm-has-error input, .pllm-has-error select, .pllm-has-error textarea { border-color: var(--pllm-bad); }
.pllm-req { color: var(--pllm-bad); }
.pllm-help { color: var(--pllm-muted); font-size: .85rem; margin: 4px 0 0; }
.pllm-error { color: var(--pllm-bad); font-size: .85rem; font-weight: 600; margin: 4px 0 8px; }
.pllm-check { align-items: flex-start; display: flex; gap: 8px; margin-bottom: 12px; }
.pllm-check input { flex: none; height: 20px; margin-top: 2px; width: 20px; }
.pllm-hp { height: 1px; left: -9999px; overflow: hidden; position: absolute; width: 1px; }
.pllm-grid-2 { display: grid; gap: 0 12px; grid-template-columns: minmax(0, 1fr); }
.pllm-fieldset { border: 0; margin: 0 0 12px; min-width: 0; padding: 0; }
.pllm-fieldset legend { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; padding: 0; }
.pllm-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.pllm-btn {
	align-items: center;
	background: var(--pllm-surface);
	border: 1px solid #9aa4b2;
	border-radius: 8px;
	color: var(--pllm-ink);
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 600;
	justify-content: center;
	min-height: 44px;
	padding: 8px 16px;
	text-decoration: none;
}
.pllm-btn:hover { background: var(--pllm-tint); }
.pllm-btn[disabled] { cursor: not-allowed; opacity: .55; }
.pllm-btn-primary { background: var(--pllm-brand); border-color: var(--pllm-brand); color: var(--pllm-brand-ink); }
.pllm-btn-primary:hover { background: #163fae; }
.pllm-btn-ghost { border-color: var(--pllm-line); }
.pllm-btn-block { width: 100%; }
.pllm-link { background: none; border: 0; color: var(--pllm-brand); cursor: pointer; font: inherit; padding: 4px; text-decoration: underline; }
.pllm-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin: 12px 0 0; }

.pllm-table { border-collapse: collapse; width: 100%; }
.pllm-table th { color: var(--pllm-muted); font-size: .8rem; font-weight: 600; text-align: left; }
.pllm-table th, .pllm-table td { border-bottom: 1px solid var(--pllm-line); padding: 8px; vertical-align: top; }
.pllm-table td { overflow-wrap: anywhere; }

/* Below tablet width each row becomes a labelled card, so nothing scrolls sideways. */
@media (max-width: 719px) {
	.pllm-table thead { border: 0; clip: rect(0 0 0 0); height: 1px; overflow: hidden; position: absolute; width: 1px; }
	.pllm-table, .pllm-table tbody, .pllm-table tr, .pllm-table td { display: block; width: 100%; }
	.pllm-table tr { border-bottom: 1px solid var(--pllm-line); padding: 8px 0; }
	.pllm-table td { border: 0; display: flex; gap: 12px; justify-content: space-between; padding: 3px 0; text-align: right; }
	.pllm-table td::before { color: var(--pllm-muted); content: attr(data-label); flex: none; font-size: .85rem; max-width: 45%; text-align: left; }
	.pllm-table td:empty { display: none; }
}

.pllm-meta { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 8px 0 12px; }
.pllm-meta dt { color: var(--pllm-muted); font-size: .8rem; }
.pllm-meta dd { margin: 0; overflow-wrap: anywhere; }

.pllm-docs { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.pllm-docs .pllm-card { margin: 0; }

.pllm-timeline { border-left: 2px solid var(--pllm-line); list-style: none; margin: 8px 0 0 6px; padding: 0 0 0 16px; }
.pllm-timeline li { margin-bottom: 12px; position: relative; }
.pllm-timeline li::before { background: var(--pllm-brand); border-radius: 50%; content: ""; height: 10px; left: -22px; position: absolute; top: 6px; width: 10px; }
.pllm-timeline strong { display: block; }

.pllm-pager { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.pllm-pager a { border: 1px solid var(--pllm-line); border-radius: 6px; min-width: 36px; padding: 6px 10px; text-align: center; text-decoration: none; }
.pllm-pager a.is-active { background: var(--pllm-brand); border-color: var(--pllm-brand); color: #fff; }

@media (min-width: 720px) {
	.pllm-card { padding: 20px; }
	.pllm-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pllm-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.pllm-stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.pllm-docs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.pllm-meta-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
	.pllm-shell { gap: 20px; grid-template-columns: 220px minmax(0, 1fr); }
	.pllm-nav ul { display: block; overflow: visible; padding: 0; position: sticky; top: 16px; }
	.pllm-nav li { margin-bottom: 6px; }
	.pllm-nav a { justify-content: space-between; }
	.pllm-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
