/* Employ Resilience Client Portal — scoped to .erp-portal so it sits cleanly inside any theme */
.erp-portal {
	--erp-accent: #0f4c81;
	--erp-ink: #1b2430;
	--erp-muted: #5d6b7a;
	--erp-line: #dfe5ec;
	--erp-surface: #ffffff;
	--erp-wash: #f4f7fa;
	--erp-ok: #1f7a4d;
	--erp-ok-bg: #e5f4ec;
	--erp-warn: #8a5a00;
	--erp-warn-bg: #fdf1d8;
	--erp-bad: #b3261e;
	--erp-bad-bg: #fbe7e5;
	--erp-info: #23517e;
	--erp-info-bg: #e6eef7;
	--erp-radius: 10px;
	color: var(--erp-ink);
	font-size: 15px;
	line-height: 1.5;
	max-width: 1180px;
	margin: 0 auto;
	box-sizing: border-box;
}
.erp-portal *, .erp-portal *::before, .erp-portal *::after { box-sizing: inherit; }
.erp-portal h2, .erp-portal h3, .erp-portal h4 { color: var(--erp-ink); margin: 0 0 .6em; line-height: 1.25; }
.erp-portal h3 { font-size: 1.15rem; }
.erp-portal h4 { font-size: 1rem; margin-top: 1.4em; }
.erp-portal a { color: var(--erp-accent); }
.erp-portal code { background: var(--erp-wash); padding: 1px 6px; border-radius: 4px; font-size: .92em; }
.erp-muted { color: var(--erp-muted); }
.erp-text-bad { color: var(--erp-bad); font-weight: 600; }
.erp-eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; color: var(--erp-accent); margin: 0 0 .3em; }
.erp-nowrap { white-space: nowrap; }

/* Header + nav */
.erp-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 4px 0 14px; }
.erp-header__title { font-size: 1.6rem; margin: 0; }
.erp-header__user { font-size: .9rem; color: var(--erp-muted); }
.erp-header__user a { margin-left: 10px; }
.erp-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--erp-line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: thin; }
.erp-nav a { padding: 10px 14px; text-decoration: none; color: var(--erp-muted); font-weight: 600; font-size: .93rem; border-bottom: 3px solid transparent; white-space: nowrap; }
.erp-nav a:hover { color: var(--erp-ink); }
.erp-nav a.is-active { color: var(--erp-accent); border-bottom-color: var(--erp-accent); }

/* Cards & layout */
.erp-card { background: var(--erp-surface); border: 1px solid var(--erp-line); border-radius: var(--erp-radius); padding: 22px; margin-bottom: 20px; }
.erp-card--accent { border-top: 4px solid var(--erp-accent); }
.erp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.erp-grid-main { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.erp-view--employee .erp-grid-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.erp-grid-2 > *, .erp-grid-main > * { margin-bottom: 0; }
.erp-view > * + * { margin-top: 20px; }
.erp-view > p:first-child { margin: 0 0 12px; }

/* Stats */
.erp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.erp-stat { background: var(--erp-surface); border: 1px solid var(--erp-line); border-radius: var(--erp-radius); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.erp-stat__label { font-size: .8rem; color: var(--erp-muted); font-weight: 600; }
.erp-stat__value { font-size: 1.9rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.erp-stat__value small { font-size: .9rem; color: var(--erp-muted); font-weight: 600; margin-left: 2px; }
.erp-stat__value--sm { font-size: 1.1rem; padding: 6px 0 4px; }
.erp-stat__meta { font-size: .82rem; color: var(--erp-muted); }
.erp-meter { height: 6px; border-radius: 3px; background: var(--erp-wash); overflow: hidden; margin-top: 6px; }
.erp-meter span { display: block; height: 100%; background: var(--erp-accent); border-radius: 3px; }

/* Badges & notices */
.erp-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; line-height: 1.5; white-space: nowrap; vertical-align: middle; }
.erp-badge--ok { background: var(--erp-ok-bg); color: var(--erp-ok); }
.erp-badge--warn { background: var(--erp-warn-bg); color: var(--erp-warn); }
.erp-badge--bad { background: var(--erp-bad-bg); color: var(--erp-bad); }
.erp-badge--info { background: var(--erp-info-bg); color: var(--erp-info); }
.erp-badge--muted { background: var(--erp-wash); color: var(--erp-muted); }
.erp-badge--accent { background: var(--erp-accent); color: #fff; }
.erp-notice { padding: 12px 16px; border-radius: 8px; margin: 0 0 18px; border-left: 4px solid; font-size: .93rem; }
.erp-notice--success { background: var(--erp-ok-bg); border-color: var(--erp-ok); }
.erp-notice--error { background: var(--erp-bad-bg); border-color: var(--erp-bad); }
.erp-notice--info { background: var(--erp-info-bg); border-color: var(--erp-info); }

/* Buttons */
.erp-btn, .erp-portal button[type=submit]:not(.erp-btn--ghost):not(.erp-btn--danger), .erp-login #wp-submit {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	background: var(--erp-accent); color: #fff !important; border: 1px solid var(--erp-accent);
	padding: 9px 18px; border-radius: 8px; font-weight: 600; font-size: .93rem; line-height: 1.3;
	text-decoration: none; cursor: pointer; transition: filter .15s;
}
.erp-btn:hover, .erp-portal button[type=submit]:hover { filter: brightness(1.1); }
.erp-btn:focus-visible, .erp-portal button:focus-visible, .erp-portal a:focus-visible, .erp-portal input:focus-visible, .erp-portal select:focus-visible, .erp-portal textarea:focus-visible { outline: 3px solid color-mix(in srgb, var(--erp-accent) 45%, transparent); outline-offset: 2px; }
.erp-btn--ghost { background: transparent !important; color: var(--erp-accent) !important; border: 1px solid var(--erp-line) !important; padding: 9px 16px; border-radius: 8px; font-weight: 600; font-size: .93rem; cursor: pointer; text-decoration: none; display: inline-flex; }
.erp-btn--danger, .erp-btn.erp-btn--danger { background: transparent !important; color: var(--erp-bad) !important; border: 1px solid #efc4c0 !important; padding: 8px 14px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: .88rem; }
.erp-btn--danger:hover { background: var(--erp-bad-bg) !important; }
.erp-btn--sm { padding: 5px 10px; font-size: .82rem; }
.erp-btn--block { width: 100%; margin-top: 10px; }
.erp-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }

/* Forms */
.erp-form { display: flex; flex-direction: column; gap: 14px; }
.erp-form--grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.erp-form--grid h4 { margin: 8px 0 0; }
.erp-span-2 { grid-column: 1 / -1; }
.erp-field { display: flex; flex-direction: column; gap: 5px; margin: 0; }
.erp-field[hidden] { display: none; }
.erp-field > span { font-size: .84rem; font-weight: 600; color: var(--erp-ink); }
.erp-portal input[type=text], .erp-portal input[type=email], .erp-portal input[type=tel], .erp-portal input[type=url], .erp-portal input[type=number], .erp-portal input[type=date], .erp-portal input[type=search], .erp-portal input[type=password], .erp-portal select, .erp-portal textarea {
	width: 100%; padding: 9px 11px; border: 1px solid #c9d2dc; border-radius: 7px; background: #fff; color: var(--erp-ink); font: inherit; font-size: .95rem; min-height: 40px;
}
.erp-portal input[disabled], .erp-portal select[disabled], .erp-portal textarea[disabled] { background: var(--erp-wash); color: var(--erp-muted); }
.erp-portal input[type=file] { font-size: .9rem; max-width: 100%; }
.erp-check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.erp-check input { margin-top: 4px; }
.erp-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0; }
.erp-inline input[type=text], .erp-inline select { width: auto; flex: 1 1 220px; }
.erp-filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 16px; }
.erp-filters input[type=search] { flex: 1 1 240px; width: auto; }
.erp-filters select { width: auto; }
.erp-danger-zone { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--erp-line); }

/* Tables & lists */
.erp-table-wrap { overflow-x: auto; margin: 0 -4px; }
.erp-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.erp-table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--erp-muted); font-weight: 700; padding: 8px 10px; border-bottom: 2px solid var(--erp-line); white-space: nowrap; }
.erp-table td { padding: 11px 10px; border-bottom: 1px solid var(--erp-line); vertical-align: top; }
.erp-table tr:last-child td { border-bottom: 0; }
.erp-table tr.is-muted td { opacity: .55; }
.erp-table--compact td { padding: 8px 8px; }
.erp-list { list-style: none; margin: 0; padding: 0; }
.erp-list li { padding: 10px 0; border-bottom: 1px solid var(--erp-line); display: block; overflow: hidden; }
.erp-list li:last-child { border-bottom: 0; }
.erp-list__end { float: right; margin-left: 10px; }
.erp-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0 0 8px; font-size: .93rem; }
.erp-dl dt { color: var(--erp-muted); font-weight: 600; }
.erp-dl dd { margin: 0; }
.erp-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.erp-toolbar h3 { margin: 0; }
.erp-toolbar__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Review thread */
.erp-thread { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.erp-msg { background: var(--erp-wash); border-radius: 10px; padding: 12px 14px; border: 1px solid var(--erp-line); }
.erp-msg--staff { background: #fff; border-left: 4px solid var(--erp-accent); }
.erp-msg__meta { font-size: .85rem; margin-bottom: 4px; }
.erp-msg__body p { margin: 0 0 .5em; }
.erp-msg__file { font-size: .88rem; margin: 6px 0 0; }

/* Sales bumps */
.erp-bumps__title { margin: 6px 0 0; }
.erp-bumps { display: flex; flex-direction: column; gap: 10px; }
.erp-bump { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border: 1.5px dashed #c3ccd6; border-radius: 10px; cursor: pointer; background: #fff; transition: border-color .15s, background .15s; }
.erp-bump:hover { border-color: var(--erp-accent); }
.erp-bump.is-selected { border-style: solid; border-color: var(--erp-accent); background: color-mix(in srgb, var(--erp-accent) 6%, #fff); }
.erp-bump input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--erp-accent); }
.erp-bump__body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.erp-bump__top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.erp-bump__price { margin-left: auto; font-weight: 700; color: var(--erp-accent); font-size: .92rem; white-space: nowrap; }
.erp-bump__desc { font-size: .87rem; color: var(--erp-muted); }
.erp-bumps__total { font-size: .9rem; padding: 4px 2px 0; }
.erp-bumps__total strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.erp-bumps__total .erp-muted { display: block; font-size: .8rem; }

/* Contextual offer banner */
.erp-offer { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 18px 22px; border-radius: var(--erp-radius); background: linear-gradient(120deg, color-mix(in srgb, var(--erp-accent) 10%, #fff), #fff 70%); border: 1px solid color-mix(in srgb, var(--erp-accent) 30%, #fff); margin-bottom: 20px; }
.erp-offer__text { flex: 1 1 340px; }
.erp-offer__text h3 { margin: 0 0 4px; }
.erp-offer__text p:last-child { margin: 0; color: var(--erp-muted); font-size: .92rem; }
.erp-offer__cta form { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; margin: 0; }
.erp-offer__price { font-weight: 700; font-size: 1.05rem; }

/* Reference card */
.erp-reference { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; padding: 18px 22px; border-radius: var(--erp-radius); background: var(--erp-ink); color: #fff; margin-bottom: 20px; }
.erp-reference .erp-eyebrow { color: #9fc3e6; }
.erp-reference__no { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.35rem; font-weight: 700; letter-spacing: .04em; margin: 0; }
.erp-reference .erp-muted { color: #b9c4cf; margin: 2px 0 0; font-size: .87rem; }
.erp-reference__help { font-size: .9rem; color: #dbe3ea; }
.erp-reference__help a { color: #fff; }

/* Login & verify */
.erp-login__card, .erp-verify .erp-card { max-width: 480px; margin: 20px auto; }
.erp-verify .erp-card { max-width: 620px; }
.erp-login form p { margin: 0 0 14px; }
.erp-login form label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 5px; }
.erp-login .login-remember label { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.erp-login #wp-submit { width: 100%; }
.erp-login__links { font-size: .88rem; text-align: center; margin: 6px 0 0; }
.erp-verify__result { margin-top: 18px; padding: 16px 18px; border-radius: 10px; border: 1px solid var(--erp-line); }
.erp-verify__result.is-valid { background: var(--erp-ok-bg); border-color: #b9e0cb; }
.erp-verify__result.is-expired { background: var(--erp-warn-bg); border-color: #f0d89c; }
.erp-verify__status { font-weight: 700; font-size: 1.1rem; margin: 0 0 10px; }

@media (max-width: 860px) {
	.erp-grid-2, .erp-grid-main, .erp-view--employee .erp-grid-main { grid-template-columns: 1fr; }
	.erp-reference { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 560px) {
	.erp-form--grid { grid-template-columns: 1fr; }
	.erp-card { padding: 16px; }
	.erp-offer__cta form { align-items: stretch; }
	.erp-bump__price { margin-left: 0; width: 100%; }
}
