/* Business ERP — admin styles. Scoped to .berp-wrap so WordPress screens are untouched. */

.berp-wrap {
	--berp-ink: #14161a;
	--berp-ink-2: #3b4048;
	--berp-muted: #6b7280;
	--berp-line: #e6e3dd;
	--berp-surface: #ffffff;
	--berp-canvas: #f6f4f0;
	--berp-accent: #0e5e55;
	--berp-accent-soft: #e3f0ed;
	--berp-in: #1f7a5a;
	--berp-in-soft: #e2f3ec;
	--berp-out: #b4442f;
	--berp-out-soft: #fbe9e4;
	--berp-adjust: #9a6a12;
	--berp-adjust-soft: #fbf1dc;
	--berp-transfer: #2f5aa8;
	--berp-transfer-soft: #e6edf9;
	--berp-radius: 12px;
	--berp-shadow: 0 1px 2px rgba(20, 22, 26, .04), 0 4px 16px rgba(20, 22, 26, .04);

	color: var(--berp-ink);
	font-size: 14px;
	max-width: 1320px;
	margin: 0 20px 40px 0;
}

body.berp-screen, body.berp-screen #wpwrap { background: #f6f4f0; }

.berp-wrap * { box-sizing: border-box; }
.berp-wrap a { color: var(--berp-accent); text-decoration: none; }
.berp-wrap a:hover { text-decoration: underline; }
.berp-wrap h2 { font-size: 15px; font-weight: 600; margin: 0 0 14px; color: var(--berp-ink); }
.berp-wrap small { color: var(--berp-muted); }
.berp-wrap code { background: var(--berp-canvas); padding: 2px 6px; border-radius: 4px; }

/* Header */
.berp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 24px 0 20px; flex-wrap: wrap; }
.berp-eyebrow { margin: 0 0 4px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--berp-accent); font-weight: 600; }
.berp-title { font-size: 28px; line-height: 1.15; font-weight: 600; margin: 0; padding: 0; letter-spacing: -.01em; color: var(--berp-ink); }
.berp-sub { margin: 6px 0 0; color: var(--berp-muted); }
.berp-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.berp-section-title { font-size: 18px !important; margin: 32px 0 12px !important; }

/* Buttons */
.berp-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid transparent; line-height: 1; white-space: nowrap; text-decoration: none !important; font-family: inherit; }
.berp-btn--primary { background: var(--berp-ink); color: #fff !important; }
.berp-btn--primary:hover { background: var(--berp-accent); }
.berp-btn--ghost { background: var(--berp-surface); color: var(--berp-ink) !important; border-color: var(--berp-line); }
.berp-btn--ghost:hover { border-color: var(--berp-ink-2); }

/* Notices */
.berp-notice { padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; font-weight: 500; border: 1px solid; }
.berp-notice--success { background: var(--berp-in-soft); border-color: #bfe3d3; color: #13563f; }
.berp-notice--error { background: var(--berp-out-soft); border-color: #f1c6bb; color: #8a2f1e; }
.berp-notice--info { background: var(--berp-transfer-soft); border-color: #c8d6f1; color: #23457f; }

/* KPI cards */
.berp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.berp-kpi { background: var(--berp-surface); border: 1px solid var(--berp-line); border-radius: var(--berp-radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--berp-shadow); color: inherit; text-decoration: none !important; }
.berp-kpi__label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--berp-muted); font-weight: 600; }
.berp-kpi__value { font-size: 26px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.berp-kpi__value--sm { font-size: 18px; }
.berp-kpi__value small { font-size: 14px; font-weight: 500; }
.berp-kpi__meta { font-size: 12px; color: var(--berp-muted); }
.berp-kpi--hero { background: var(--berp-ink); color: #fff; border-color: var(--berp-ink); }
.berp-kpi--hero .berp-kpi__label, .berp-kpi--hero .berp-kpi__meta, .berp-kpi--hero small { color: rgba(255, 255, 255, .65); }
.berp-kpi--warn .berp-kpi__value { color: var(--berp-adjust); }
.berp-kpi--warn:hover { border-color: var(--berp-adjust); }
.berp-kpi--danger .berp-kpi__value { color: var(--berp-out); }

/* Layout */
.berp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.berp-span-2 { grid-column: span 2; }
.berp-span-3 { grid-column: 1 / -1; }
.berp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.berp-card { background: var(--berp-surface); border: 1px solid var(--berp-line); border-radius: var(--berp-radius); padding: 20px; box-shadow: var(--berp-shadow); margin-bottom: 16px; }
.berp-grid .berp-card { margin-bottom: 0; }
.berp-card--flush { padding: 0; overflow-x: auto; }
.berp-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.berp-card__head h2 { margin: 0; }
.berp-muted { color: var(--berp-muted); font-weight: 400; }
.berp-empty { color: var(--berp-muted); padding: 24px; margin: 0; text-align: center; }
.is-inactive { opacity: .55; }

/* Lists */
.berp-list { list-style: none; margin: 0; padding: 0; }
.berp-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--berp-line); margin: 0; }
.berp-list li:first-child { border-top: 0; padding-top: 0; }
.berp-list li > span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.berp-num { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.berp-num--warn { color: var(--berp-adjust); }

/* Tables */
.berp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.berp-table th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--berp-muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--berp-line); background: #fbfaf8; white-space: nowrap; }
.berp-card:not(.berp-card--flush) .berp-table th { background: transparent; padding-left: 0; }
.berp-table td { padding: 12px 14px; border-bottom: 1px solid var(--berp-line); vertical-align: middle; }
.berp-table td.mono, .berp-table .mono, .berp-table .nowrap { white-space: nowrap; }
.berp-card:not(.berp-card--flush) .berp-table td { padding-left: 0; }
.berp-table tbody tr:last-child td { border-bottom: 0; }
.berp-table tbody tr:hover td { background: #fcfbf9; }
.berp-table tfoot td { font-weight: 700; border-top: 2px solid var(--berp-ink); border-bottom: 0; }
.berp-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.berp-table .pos { color: var(--berp-in); font-weight: 600; }
.berp-table .neg { color: var(--berp-out); font-weight: 600; }
.berp-table .nowrap { white-space: nowrap; }
.berp-wrap .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.berp-strong { font-weight: 600; color: var(--berp-ink) !important; }
.berp-note { display: block; margin-top: 2px; font-size: 12px; }
.berp-row-actions { text-align: right; white-space: nowrap; }
.berp-row-actions a { margin-left: 10px; font-weight: 600; }

/* Stock status */
.berp-stock { display: inline-block; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.berp-stock--ok { background: var(--berp-in-soft); color: var(--berp-in); }
.berp-stock--low { background: var(--berp-adjust-soft); color: var(--berp-adjust); }
.berp-stock--out { background: var(--berp-out-soft); color: var(--berp-out); }

/* Movement type pills */
.berp-pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.berp-pill--receive { background: var(--berp-in-soft); color: var(--berp-in); }
.berp-pill--issue { background: var(--berp-out-soft); color: var(--berp-out); }
.berp-pill--adjust { background: var(--berp-adjust-soft); color: var(--berp-adjust); }
.berp-pill--transfer_in, .berp-pill--transfer_out { background: var(--berp-transfer-soft); color: var(--berp-transfer); }

/* Filters */
.berp-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 16px; }
.berp-wrap input[type=search], .berp-wrap input[type=text], .berp-wrap input[type=email], .berp-wrap input[type=number], .berp-wrap input[type=date], .berp-wrap input:not([type]), .berp-wrap select, .berp-wrap textarea {
	height: 38px; border: 1px solid var(--berp-line); border-radius: 8px; padding: 0 12px; background: #fff; font-size: 13px; color: var(--berp-ink); box-shadow: none; max-width: 100%; min-height: 38px;
}
.berp-wrap select { padding-right: 28px; }
.berp-wrap textarea { height: auto; padding: 10px 12px; }
.berp-wrap input:focus, .berp-wrap select:focus, .berp-wrap textarea:focus { border-color: var(--berp-accent); box-shadow: 0 0 0 3px var(--berp-accent-soft); outline: 0; }
.berp-wrap input:disabled { background: var(--berp-canvas); color: var(--berp-muted); }
.berp-check { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.berp-inline { display: inline-flex; align-items: center; gap: 6px; color: var(--berp-muted); }

/* Forms */
.berp-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; }
.berp-fields > label { display: block; font-weight: 600; font-size: 12px; color: var(--berp-ink-2); }
.berp-fields > label input, .berp-fields > label select, .berp-fields > label textarea { display: block; width: 100%; font-weight: 400; margin-top: 6px; }
.berp-fields small { display: block; margin-top: 6px; font-weight: 400; }
.req { color: var(--berp-out); }
.berp-form__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--berp-line); }
.berp-form__foot > span { display: flex; gap: 8px; }

/* Movement entry */
.berp-entry { padding: 0; }
.berp-entry .berp-panel { padding: 20px; }
.berp-tabs { display: flex; gap: 4px; padding: 8px 8px 0; border-bottom: 1px solid var(--berp-line); overflow-x: auto; }
.berp-tabs--links { padding: 0; margin-bottom: 16px; background: transparent; }
.berp-tab { background: none; border: 0; padding: 12px 16px; font-size: 13px; font-weight: 600; color: var(--berp-muted) !important; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none !important; white-space: nowrap; font-family: inherit; }
.berp-tab.is-active { color: var(--berp-ink) !important; border-bottom-color: var(--berp-ink); }
.berp-tab__dot { width: 8px; height: 8px; border-radius: 50%; }
.berp-tab__dot--receive { background: var(--berp-in); }
.berp-tab__dot--issue { background: var(--berp-out); }
.berp-tab__dot--transfer { background: var(--berp-transfer); }
.berp-tab__dot--adjust { background: var(--berp-adjust); }
.berp-panel { display: none; }
.berp-panel.is-active { display: block; }
.berp-panel > .berp-muted { margin: 0 0 16px; }
.berp-available { align-self: end; padding: 10px 12px; border-radius: 8px; border: 1px solid transparent; background: var(--berp-canvas); font-size: 13px; line-height: 1.5; color: var(--berp-ink-2); min-height: 38px; display: block; }
.berp-available strong { color: var(--berp-ink); font-weight: 650; }
.berp-available .berp-bad, .berp-available .berp-warn { display: inline-block; margin-top: 2px; }
.berp-available.is-empty { background: var(--berp-out-soft); color: var(--berp-out); }

/* Chart */
.berp-legend { display: flex; gap: 20px; font-size: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.berp-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.berp-dot--in, .berp-bar--in { background: var(--berp-in); }
.berp-dot--out, .berp-bar--out { background: #d98a78; }
.berp-chart { display: flex; gap: 6px; height: 180px; align-items: stretch; }
.berp-chart__col { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.berp-chart__bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 2px; border-bottom: 1px solid var(--berp-line); }
.berp-bar { width: 40%; max-width: 12px; border-radius: 3px 3px 0 0; min-height: 1px; }
.berp-chart__label { text-align: center; font-size: 11px; color: var(--berp-muted); }

/* Locations */
.berp-code { font-size: 11px; font-weight: 600; background: var(--berp-canvas); padding: 2px 6px; border-radius: 4px; margin-left: 6px; color: var(--berp-muted); }
.berp-loc__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; padding: 14px 0; border-top: 1px solid var(--berp-line); border-bottom: 1px solid var(--berp-line); }
.berp-loc__stats > div { display: flex; flex-direction: column; gap: 4px; }
.berp-loc__stats strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.berp-link { font-weight: 600; }

/* Pagination */
.berp-pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-top: 1px solid var(--berp-line); color: var(--berp-muted); }
.berp-pager .page-numbers { padding: 4px 9px; border-radius: 6px; margin-left: 2px; }
.berp-pager .page-numbers.current { background: var(--berp-ink); color: #fff; }

/* Responsive */
@media (max-width: 1100px) {
	.berp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.berp-grid { grid-template-columns: 1fr; }
	.berp-span-2 { grid-column: auto; }
}
@media (max-width: 782px) {
	.berp-wrap { margin-right: 10px; }
	.berp-fields { grid-template-columns: 1fr; }
	.berp-fields .berp-span-2, .berp-fields .berp-span-3 { grid-column: auto; }
	.berp-kpis { grid-template-columns: 1fr; }
	.berp-title { font-size: 22px; }
}

/* Print reports cleanly */
@media print {
	#adminmenumain, #wpadminbar, #wpfooter, .berp-head__actions, .berp-filters, .berp-tabs { display: none !important; }
	#wpcontent { margin: 0 !important; }
	.berp-card { box-shadow: none; border: 0; }
}

/* ===================================================================
 * Version 2: production flow components
 * ================================================================= */

.berp-wrap { --berp-prod: #6d4fb3; --berp-prod-soft: #efeaf9; }

.berp-btn--sm { height: 32px; padding: 0 12px; font-size: 12px; }
.berp-btn--danger { background: var(--berp-out); color: #fff !important; }
.berp-btn--danger:hover { background: #8a2f1e; }
.berp-btn:disabled { opacity: .6; cursor: wait; }
.berp-mt { margin-top: 20px !important; }
.berp-h3 { font-size: 14px; margin: 0 0 8px; }
.berp-warn { color: var(--berp-out); font-weight: 600; }
.berp-fields--1 { grid-template-columns: 1fr; margin-top: 16px; }
.berp-input-sm { width: 110px !important; text-align: right; }
.berp-inline-pair { display: flex; gap: 6px; margin-top: 6px; }
.berp-inline-pair input, .berp-inline-pair select { margin-top: 0 !important; }
.berp-inline-pair input { flex: 1; }
.berp-inline-pair select { width: 80px !important; }
.berp-sum { font-size: 13px; color: var(--berp-ink-2); }
.berp-tabs--wrap { flex-wrap: wrap; }
.berp-entry .berp-panel > form, .berp-entry .berp-panel > h3, .berp-entry .berp-panel > .berp-notice { margin-left: 0; }

/* Flow steps on the dashboard */
.berp-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.berp-steps a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--berp-surface); border: 1px solid var(--berp-line); border-radius: var(--berp-radius); color: var(--berp-ink) !important; text-decoration: none !important; position: relative; }
.berp-steps a:hover { border-color: var(--berp-ink); }
.berp-steps a span:last-child { display: flex; flex-direction: column; }
.berp-steps small { font-size: 11px; }
.berp-steps__n { width: 28px; height: 28px; border-radius: 50%; background: var(--berp-ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: 0 0 auto; }

/* KPI variant */
.berp-kpi--info .berp-kpi__value { color: var(--berp-transfer); }

/* Pending receipts panel */
.berp-pending { border-left: 4px solid var(--berp-transfer); }
.berp-pending .berp-list li > span:first-child small + small { color: var(--berp-ink-2); }
.berp-count { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--berp-transfer); color: #fff; font-size: 12px; margin-left: 6px; text-align: center; }

/* Line items */
.berp-lines { margin-top: 18px; border: 1px solid var(--berp-line); border-radius: 10px; background: #fcfbf9; }
.berp-lines__head, .berp-line { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 2fr) 150px 36px; gap: 10px; align-items: center; padding: 8px 12px; }
.berp-lines[data-cost="1"] .berp-lines__head, .berp-lines[data-cost="1"] .berp-line { grid-template-columns: minmax(0, 2.4fr) 150px 150px 130px 36px; }
.berp-lines__head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--berp-muted); font-weight: 600; border-bottom: 1px solid var(--berp-line); }
.berp-line + .berp-line { border-top: 1px dashed var(--berp-line); }
.berp-line select, .berp-line input { width: 100%; }
.berp-line__qty { display: flex; flex-direction: column; gap: 2px; }
.berp-line__qty small { font-size: 11px; text-align: right; }
.berp-line.is-over input[data-l-qty] { border-color: var(--berp-out); background: var(--berp-out-soft); }
.berp-line.is-over .berp-line__qty small { color: var(--berp-out); font-weight: 600; }
.berp-line__remove { width: 32px; height: 32px; border: 1px solid var(--berp-line); border-radius: 8px; background: #fff; cursor: pointer; font-size: 18px; line-height: 1; color: var(--berp-muted); }
.berp-line__remove:hover { color: var(--berp-out); border-color: var(--berp-out); }
.berp-lines__foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-top: 1px solid var(--berp-line); }
.berp-lines__total { font-weight: 600; }

/* Sorting grades */
.berp-grades { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 18px; }
.berp-grade { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--berp-line); border-radius: 10px; background: var(--berp-in-soft); font-weight: 600; }
.berp-grade input { width: 100%; }
.berp-grade small { font-weight: 400; }
.berp-grade--waste { background: var(--berp-out-soft); }
.berp-grades .berp-notice { grid-column: 1 / -1; }

/* Batch / handover flow line */
.berp-flowline { display: flex; align-items: stretch; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.berp-flowline > div { flex: 1; min-width: 160px; background: var(--berp-surface); border: 1px solid var(--berp-line); border-radius: var(--berp-radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--berp-shadow); }
.berp-flowline > div strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.berp-flowline > i { align-self: center; font-style: normal; font-size: 20px; color: var(--berp-muted); }
.berp-flowline--doc > div strong { font-size: 17px; }

.berp-signoff { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.berp-signoff > div { background: var(--berp-surface); border: 1px solid var(--berp-line); border-radius: var(--berp-radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.berp-signoff span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--berp-muted); font-weight: 600; }
.berp-signoff strong { font-size: 16px; border-bottom: 1px solid var(--berp-line); padding-bottom: 14px; }

details.berp-cancel summary { cursor: pointer; font-weight: 600; color: var(--berp-out); }
details.berp-cancel[open] summary { margin-bottom: 14px; }

/* Chips, tags, extra pills */
.berp-chip { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--berp-canvas); margin: 2px 4px 2px 0; font-size: 12px; white-space: nowrap; }
.berp-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; background: var(--berp-canvas); color: var(--berp-ink-2); white-space: nowrap; }
.berp-tag--raw { background: var(--berp-adjust-soft); color: var(--berp-adjust); }
.berp-tag--sorted { background: #f6efe3; color: #7a5a1c; }
.berp-tag--finished { background: var(--berp-in-soft); color: var(--berp-in); }
.berp-pill--dispatch, .berp-pill--receipt { background: var(--berp-transfer-soft); color: var(--berp-transfer); }
.berp-pill--sort_out, .berp-pill--sort_in, .berp-pill--production_use, .berp-pill--production_out { background: var(--berp-prod-soft); color: var(--berp-prod); }
.berp-pill--sale { background: var(--berp-in-soft); color: var(--berp-in); }
.berp-pill--sample { background: #e9f3fb; color: #22618f; }
.berp-pill--write_off { background: var(--berp-out-soft); color: var(--berp-out); }
.berp-pill--st-pending { background: var(--berp-transfer-soft); color: var(--berp-transfer); }
.berp-pill--st-received, .berp-pill--st-packed { background: var(--berp-in-soft); color: var(--berp-in); }
.berp-pill--st-cancelled { background: var(--berp-canvas); color: var(--berp-muted); }
.berp-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.berp-members label { display: flex; flex-direction: column; gap: 6px; }
.berp-members textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--berp-line); border-radius: 8px; resize: vertical; }
.berp-pill--st-rejected { background: var(--berp-out-soft); color: var(--berp-out); }
.berp-reject-note p { margin: 0 0 6px; }
.berp-reject-note p:last-child { margin-bottom: 0; }
.berp-reject > summary { color: var(--berp-out); }
.berp-correct { border-left: 4px solid var(--berp-out); }
.berp-pill--st-processed { background: var(--berp-prod-soft); color: var(--berp-prod); }
.berp-pill--label-add { background: var(--berp-in-soft); color: var(--berp-in); }
.berp-pill--label-use { background: var(--berp-transfer-soft); color: var(--berp-transfer); }
.berp-pill--label-adjust { background: var(--berp-adjust-soft); color: var(--berp-adjust); }
.berp-head__actions .berp-pill { align-self: center; padding: 6px 12px; font-size: 12px; }

.is-quarantine td, li.is-quarantine { background: #fdf6f4; }
.berp-formula { display: inline-block; background: var(--berp-ink); color: #fff; padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 13px; margin: 0 0 12px; }
.berp-howto { margin: 0 0 12px 18px; }
.berp-howto li { margin-bottom: 8px; }
.berp-pack-table { margin-top: 16px; }
.berp-pack-table td { vertical-align: middle; }
.berp-officer .berp-card__head { flex-direction: column; gap: 2px; }

@media (max-width: 1100px) {
	.berp-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 782px) {
	.berp-steps { grid-template-columns: 1fr 1fr; }
	.berp-lines__head { display: none; }
	.berp-line, .berp-lines[data-cost="1"] .berp-line { grid-template-columns: 1fr 1fr; }
	.berp-line > select[data-l-product] { grid-column: 1 / -1; }
	.berp-signoff { grid-template-columns: 1fr; }
	.berp-flowline > i { display: none; }
}
@media print {
	.berp-cancel, .berp-pending, .berp-steps { display: none !important; }
}

/* "One product per grade" option on the product form */
.berp-fields > label.berp-split { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--berp-in-soft); border-radius: 8px; font-weight: 500; color: var(--berp-ink); }
.berp-fields > label.berp-split[hidden] { display: none !important; }
.berp-fields > label.berp-split input { width: auto !important; margin: 0 !important; }

/* Labels used when labelling */
.berp-label-use { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--berp-line); border-radius: 10px; background: #fcfbf9; }
.berp-label-use[hidden] { display: none; }
.berp-label-use .berp-table td, .berp-label-use .berp-table th { padding-left: 0; }
.berp-wrap input.is-over { border-color: var(--berp-out); background: var(--berp-out-soft); }
.berp-label-products td { vertical-align: middle; }

/* End of trip */
.berp-trip { margin-top: 18px; border: 1px solid var(--berp-line); border-radius: 10px; overflow-x: auto; }
.berp-trip .berp-table td, .berp-trip .berp-table th { vertical-align: middle; }
.berp-trip__unsold { font-weight: 700; color: var(--berp-in); }
.berp-trip tr.is-over td { background: var(--berp-out-soft); }
.berp-trip tr.is-over .berp-trip__unsold { color: var(--berp-out); }
.berp-trip .berp-input-sm { width: 80px !important; }
.berp-officer__links { display: flex; gap: 16px; }

/* Stock take */
.berp-steps--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.berp-steps > span { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--berp-surface); border: 1px solid var(--berp-line); border-radius: var(--berp-radius); color: var(--berp-muted); }
.berp-steps > span span:last-child { display: flex; flex-direction: column; }
.berp-steps > span .berp-steps__n { background: var(--berp-line); color: var(--berp-ink-2); }
.berp-steps > span.is-active { border-color: var(--berp-ink); color: var(--berp-ink); }
.berp-steps > span.is-active .berp-steps__n { background: var(--berp-ink); color: #fff; }
.berp-checks { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.berp-checks .berp-check { align-items: flex-start; }
.berp-checks .berp-check input { margin-top: 2px; }
.berp-count-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--berp-line); }
.berp-count-head input[type=search] { width: 280px; }
.berp-count-table td { vertical-align: middle; }
.berp-count-table tr.is-counted td { background: #f7fbf9; }
.berp-count-input { width: 110px !important; font-weight: 600; }
.berp-count-note { width: 100%; min-width: 140px; }
.berp-print-box, .berp-print-only { display: none; }
tr.is-short td { background: #fdf6f4; }
tr.is-over-row td { background: #f3faf6; }
tr.is-uncounted td { color: var(--berp-muted); }
@media print {
	.berp-no-print, .berp-count-head, .berp-wrap details { display: none !important; }
	.berp-print-only { display: grid !important; }
	.berp-count-input { display: none !important; }
	.berp-print-box { display: inline-block; width: 90px; height: 24px; border-bottom: 1px solid #000; }
	.berp-count-note { border: 0 !important; border-bottom: 1px solid #000 !important; border-radius: 0 !important; }
	.berp-table th, .berp-table td { padding: 8px 6px; }
}
.berp-no-print td select { min-width: 280px; }
.berp-form__foot + details.berp-card { margin-top: 16px; }
.berp-inline-pair select.berp-unit-select { width: 110px !important; }
.berp-st-loc .berp-btn { margin-right: 8px; }
.berp-st-loc .berp-loc__stats small { display: block; font-size: 11px; }
.berp-st-open { margin: 0 0 12px; font-size: 13px; }
.berp-st-last { display: inline-block; margin-top: 10px; font-size: 13px; }
.berp-entry .berp-panel table input[list] { width: 100%; }

/* Department access screen (wp-admin) */
.berp-access__dept { text-align: center !important; }
.berp-access__cell { text-align: center; white-space: nowrap; }
.berp-access__default { display: inline-block; color: var(--berp-accent); background: var(--berp-accent-soft); font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.berp-access__extra { font-weight: 600; cursor: pointer; }
.berp-access td small.berp-note { max-width: 360px; }

/* Pricing */
.berp-pricing__tools { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; }
.berp-pricing__tools input[type=search] { max-width: 320px; }
.berp-pricing__group { margin-bottom: 26px; }
.berp-pricing__group .berp-h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.berp-pricing__table td small { display: block; }
.berp-pricing__input { width: 120px; text-align: right; }
.berp-pricing__table tr.is-changed td { background: color-mix(in srgb, var(--berp-accent, #2f5aa8) 8%, transparent); }
.berp-pricing__table tr.is-inactive td { opacity: .6; }
.berp-pricing__foot { border-top: 1px solid var(--berp-line, #e5e2dc); padding-top: 16px; }
.berp-pricing__note { margin: 12px 16px; }
.berp-readonly { margin: 6px 0 2px; font-weight: 600; }
.berp-date { font-weight: 600; color: var(--berp-ink, #1d1d1f); white-space: nowrap; }

/* Boxing (v2.9) */
.berp-bad { color: #b42318; font-weight: 600; }
.berp-available.is-bad { border-color: #fda29b; background: #fef3f2; }
.berp-stack { display: block; line-height: 1.3; }
.berp-stack + .berp-stack { margin-top: 6px; }
.berp-stack small { display: block; font-size: 11.5px; }

/* Utilities: current level */
.berp-util__level { margin: 4px 0 14px; }
.berp-util__level strong { display: block; font-size: 24px; line-height: 1.2; margin: 2px 0 8px; }
.berp-util__bar { height: 8px; border-radius: 999px; background: var(--berp-canvas); overflow: hidden; margin-bottom: 4px; }
.berp-util__bar span { display: block; height: 100%; background: var(--berp-in); border-radius: inherit; }
.berp-util__bar.is-low span { background: var(--berp-out); }
.berp-radio-row { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.berp-radio-row legend { width: 100%; padding: 0; margin-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--berp-ink-2); }
.berp-fields .berp-radio-row label { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; font-weight: 500; }

/* ---------- Estimated prices & traceability (3.1) ---------- */
.berp-est { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #fbf0dc; color: #8a5a0b; font-size: 11px; font-weight: 600; }
.berp-est-check { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 4px; padding: 12px 14px; border: 1px dashed #e2c48d; border-radius: 10px; background: #fffaf0; font-weight: 400; }
.berp-est-check input { margin-top: 3px; }
.berp-prices-form > summary { cursor: pointer; font-weight: 600; }
.berp-prices-form[open] > summary { margin-bottom: 12px; }
.berp-trace-search { display: flex; align-items: flex-end; gap: 12px; }
.berp-trace-search__field { flex: 1; max-width: 420px; display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.berp-trace-search__field input { font-size: 16px; padding: 10px 12px; text-transform: uppercase; }
.berp-trace { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1fr); gap: 12px; align-items: start; margin-bottom: 24px; }
.berp-trace:has(.berp-trace__col--wide) { grid-template-columns: minmax(0,1fr) auto minmax(0,2fr); }
.berp-trace__col { margin: 0; }
.berp-trace__col h3 { margin: 6px 0 12px; font-size: 16px; }
.berp-trace__col .berp-eyebrow { font-size: 10px; }
.berp-trace__arrow { align-self: center; font-style: normal; font-size: 22px; color: var(--berp-muted, #8a877f); }
.berp-trace__item { padding: 12px 0; border-top: 1px solid var(--berp-line, #ece9e2); }
.berp-trace__item:first-of-type { border-top: 0; padding-top: 0; }
.berp-trace__item > small { display: block; color: var(--berp-muted, #77736b); margin-top: 2px; }
.berp-trace__top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.berp-trace__dl { display: grid; grid-template-columns: 78px 1fr; gap: 3px 10px; margin: 8px 0 0; font-size: 13px; }
.berp-trace__dl dt { color: var(--berp-muted, #77736b); }
.berp-trace__dl dd { margin: 0; }
.berp-trace__where { margin-top: 6px; }
.berp-table--compact { margin-top: 8px; font-size: 13px; }
.berp-table--compact th, .berp-table--compact td { padding: 6px 8px; }
@media (max-width: 1100px) { .berp-trace, .berp-trace:has(.berp-trace__col--wide) { grid-template-columns: 1fr; } .berp-trace__arrow { transform: rotate(90deg); justify-self: center; } }

/* Department access: merge switches (v3.2) */
.berp-structure__row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--berp-line, #e8e6e1); cursor: pointer; }
.berp-structure__row:first-of-type { border-top: 0; }
.berp-structure__row input { margin-top: 3px; }
.berp-structure__row small { display: block; margin-top: 2px; max-width: 760px; }
.berp-pill--st-complete { background: var(--berp-canvas); color: var(--berp-muted); }
.berp-pack-left { font-variant-numeric: tabular-nums; }
.berp-inline-details { display: inline-block; position: relative; }
.berp-inline-details > summary { list-style: none; cursor: pointer; }
.berp-inline-details > summary::-webkit-details-marker { display: none; }
.berp-finish-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 280px; display: grid; gap: 8px; padding: 14px; text-align: left; white-space: normal; background: var(--berp-surface, #fff); border: 1px solid var(--berp-line); border-radius: 10px; box-shadow: 0 12px 30px rgba(20, 18, 14, .14); }
.berp-finish-form p { margin: 0; }

/* Returns (v3.3) */
.berp-table-scroll { overflow-x: auto; border: 1px solid var(--berp-line); border-radius: 10px; }
.berp-return-sort { min-width: 860px; }
.berp-return-sort th small { display: block; font-weight: 400; text-transform: none; letter-spacing: 0; }
.berp-return-sort input { width: 76px; }
.berp-return-sort tr.is-over td { background: #fdf0ee; }
.berp-more { border-top: 1px solid var(--berp-line); padding-top: 14px; }
.berp-more > summary { cursor: pointer; font-weight: 600; color: var(--berp-muted); }
.berp-purpose { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--berp-transfer-soft); color: var(--berp-transfer); }

/* v3.4 — Clients & prices */
.berp-pill--cp-pending { background: #fff4db; color: #8a5a00; }
.berp-pill--cp-approved { background: #e3f5ea; color: #17663a; }
.berp-pill--cp-rejected { background: #fde8e8; color: #9b1c1c; }
.berp-pill--cp-withdrawn, .berp-pill--cp-replaced, .berp-pill--cp-ended { background: #eef0f3; color: #4b5563; }
.berp-btn-row { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.berp-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.berp-section-head .berp-filters { margin: 0; }
.berp-table tr.is-muted td { opacity: .6; }
.berp-cp-input { display: flex; gap: 6px; align-items: center; }
.berp-cp-input select { width: auto; min-width: 110px; }
.berp-cp-input input { width: 100px; text-align: right; }
.berp-client-prices__table tr.is-over td { background: #fdecec; }
.berp-client-prices__table tbody tr:first-child td { background: #f7f8fa; }
.berp-sale-summary { margin: 14px 0; }
.berp-sale-summary tfoot th { text-align: left; }
.berp-sale-summary tfoot th.num { text-align: right; }
.berp-sale-doc__head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 16px; }
.berp-sale-doc__head h2 { margin: 4px 0; }
.berp-sale-doc tfoot td, .berp-sale-doc tfoot th { text-align: right; }
.berp-sale-doc tfoot td:first-child, .berp-sale-doc tfoot th:first-child { text-align: right; }
@media print {
	.berp-head__actions, .berp-portal__nav, .berp-portal__side, #adminmenumain, #wpadminbar { display: none !important; }
}
.berp-sale-doc tfoot td, .berp-sale-doc tfoot th { border-top: 0; border-bottom: 0; padding-top: 6px; padding-bottom: 6px; font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--berp-ink); }
.berp-sale-doc tfoot tr:first-child td, .berp-sale-doc tfoot tr:first-child th { border-top: 1px solid var(--berp-line); padding-top: 12px; }
.berp-sale-doc tfoot tr:last-child th { font-size: 16px; font-weight: 700; }
.berp-client-prices__table { min-width: 600px; }
.berp-sale-summary tfoot th { font-size: 15px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--berp-ink); }

/* Deletions (v3.5.4) */
.berp-pill--del-pending { background: #fff4db; color: #8a5a00; }
.berp-pill--del-approved { background: #fde8e8; color: #9b1c1c; }
.berp-pill--del-refused { background: #eef0f3; color: #3c4655; }
.berp-pill--del-withdrawn { background: #eef0f3; color: #6b7280; }
.berp-pill--deleted { background: #fde8e8; color: #9b1c1c; }
.berp-del-lines { margin: 4px 0 0; padding-left: 16px; font-size: 12px; color: var(--berp-muted, #5f6b7a); }
.berp-del-lines li { margin: 0; }
.berp-del-list { display: grid; gap: 12px; }
.berp-del-item { border: 1px solid var(--berp-line, #e3e6ea); border-radius: 10px; padding: 14px 16px; background: #fff; }
.berp-del-item__head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.berp-del-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 18px; margin: 10px 0; }
.berp-del-meta dt { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--berp-muted, #5f6b7a); }
.berp-del-meta dd { margin: 0; }
.berp-del-meta__wide { grid-column: 1 / -1; }
.berp-del-decide { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; justify-content: space-between; }
.berp-del-decide__note { flex: 1 1 260px; display: grid; gap: 4px; }
.berp-del-ask details { position: relative; }
.berp-del-ask summary { list-style: none; cursor: pointer; }
.berp-del-ask summary::-webkit-details-marker { display: none; }
.berp-del-form { display: grid; gap: 8px; margin-top: 8px; min-width: 240px; }
.berp-del-form label { display: grid; gap: 4px; font-size: 12px; }
.berp-row--deleted td { background: #fff7f7; }
.berp-row--deleted td strong { text-decoration: line-through; text-decoration-color: rgba(155, 28, 28, .5); }
.berp-mt-sm { margin-top: 6px; }

/* Backup & restore */
.berp-backup__now { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.berp-backup__now > div { max-width: 560px; }
.berp-backup__form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.berp-backup-table__actions { white-space: nowrap; text-align: right; }
.berp-inline-form { display: inline; margin: 0 0 0 6px; }
.berp-pill--backup-auto { background: #eef2f7; color: #3b4a5e; }
.berp-pill--backup-manual { background: #e8f3ec; color: #1f6b3a; }
.berp-pill--backup-safety { background: #fff4e0; color: #8a5a00; }
.berp-notice--warn { background: #fff7e6; border-left: 4px solid #d98e04; color: #5c3d00; padding: 10px 14px; border-radius: 6px; }
.berp-backup-restore__form { display: grid; gap: 14px; max-width: 520px; }
.berp-backup-restore__form label { display: grid; gap: 6px; font-weight: 600; }
.berp-backup-restore__form select, .berp-backup-restore__form input[name="confirm"] { max-width: 320px; }

/* CEE logo in screen headers */
.berp-eyebrow__logo { height: 22px; width: auto; vertical-align: -4px; margin-right: 8px; }

/* Plan & billing */
.cee-period { display: inline-flex; gap: 4px; padding: 4px; background: #eef0ee; border-radius: 99px; margin: 0 0 16px; }
.cee-period label { padding: 6px 16px; border-radius: 99px; cursor: pointer; font-weight: 600; }
.cee-period label:has(input:checked) { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.cee-period input { position: absolute; opacity: 0; pointer-events: none; }
.cee-plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 12px; }
.cee-plan { background: #fff; border: 1px solid #e3e5e2; border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.cee-plan.is-current { border-color: var(--berp-accent, #0e5e55); box-shadow: 0 0 0 2px color-mix(in srgb, var(--berp-accent, #0e5e55) 20%, transparent); }
.cee-plan header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cee-plan h3 { margin: 0; font-size: 17px; }
.cee-plan__tag { font-size: 11px; font-weight: 600; background: var(--berp-accent, #0e5e55); color: #fff; padding: 2px 8px; border-radius: 99px; }
.cee-plan__desc { margin: 0; color: #666; }
.cee-plan__price strong { font-size: 20px; }
.cee-plan__price em { font-style: normal; font-size: 11px; font-weight: 600; color: #1f6b3a; background: #e3f3e8; padding: 1px 6px; border-radius: 99px; }
.cee-plan__limits { margin: 0; padding-left: 18px; color: #444; }
.cee-plan__why { margin: auto 0 0; color: #8a2f1e; font-size: 12px; }
.cee-plan__buy { margin-top: auto; display: grid; gap: 4px; }
.cee-plans[data-period="month"] .cee-plan__y, .cee-plans[data-period="month"] .cee-plan__buy--year { display: none; }
.cee-plans[data-period="year"] .cee-plan__m, .cee-plans[data-period="year"] .cee-plan__buy--month { display: none; }
.cee-plan .berp-btn--block { width: 100%; justify-content: center; }

/* Team & logins */
.cee-reveal { border-color: #e2c79a; background: #fffaf0; }
.cee-reveal__list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 10px 0; }
.cee-reveal__list dt { font-weight: 600; color: var(--berp-muted); font-size: 12px; }
.cee-reveal__list dd { margin: 0; }
.cee-subform { border-top: 1px solid var(--berp-line); margin-top: 18px; padding-top: 16px; }
.berp-fields > label.cee-check { display: flex; align-items: center; gap: 8px; align-self: end; padding-bottom: 10px; font-size: 13px; font-weight: 500; }
.berp-fields > label.cee-check input { display: inline-block; width: auto; margin: 0; }
.cee-role { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.cee-role--admin { background: #4a2e1d; color: #fff; }
.cee-role--company { background: #f1e6d8; color: #5a3a22; }
.cee-role--dept { background: var(--berp-canvas); color: var(--berp-ink-2); }
.cee-roles td { vertical-align: top; }
.cee-role + .cee-role { margin-left: 4px; }
.cee-role--none { background: #fbe9e4; color: #8a2f1e; }
.berp-fields > label.cee-access { grid-column: span 2; }
.cee-depts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; padding: 10px 12px; border: 1px dashed var(--berp-line); border-radius: 8px; }
.cee-depts[hidden] { display: none; }
.berp-fields .cee-depts label.cee-dept, .cee-dept { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 13px; margin: 0; }
.berp-fields .cee-dept input { width: auto; margin: 0; display: inline-block; }
.cee-dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 12px; }
.cee-dept-card { border: 1px solid var(--berp-line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.cee-dept-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cee-dept-card__head .berp-muted { white-space: nowrap; font-size: 12px; }
.cee-dept-card__empty { margin: 0; font-size: 13px; }
.cee-dept-card__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.cee-dept-card__list li { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.cee-inline { display: inline; margin: 0; }
.cee-x { border: 0; background: none; color: var(--berp-muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; }
.cee-x:hover { color: #8a2f1e; }
.cee-dept-card__join { display: flex; gap: 6px; }
.cee-dept-card__join select { flex: 1; min-width: 0; font-size: 13px; }
.cee-dept-card__new { font-size: 13px; font-weight: 600; text-decoration: none; margin-top: auto; }
.berp-over { margin: 14px 0; display: grid; gap: 10px; } .berp-over[hidden] { display: none; }
