.crm-repair-wrap .crm-stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 12px;
	margin: 20px 0;
}
.crm-stat-grid-4 { grid-template-columns: repeat(4, 1fr); }

.crm-stat-card {
	display: block;
	background: #fff;
	border: 1px solid #dcdcde;
	border-left: 4px solid #2271b1;
	border-radius: 4px;
	padding: 14px 16px;
	text-decoration: none;
	color: #1d2327;
}
.crm-stat-count { display: block; font-size: 24px; font-weight: 600; }
.crm-stat-label { display: block; font-size: 12px; color: #646970; text-transform: uppercase; letter-spacing: .03em; }

.crm-table th, .crm-table td { vertical-align: top; }

.crm-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	background: #f0f0f1;
	font-size: 12px;
	white-space: nowrap;
}
.crm-status-booked_in { background: #e5f1ff; }
.crm-status-diagnosed { background: #fff4e5; }
.crm-status-in_repair { background: #eaf7e5; }
.crm-status-waiting_parts { background: #fdeaea; }
.crm-status-qc_testing { background: #eee5ff; }
.crm-status-ready_collection { background: #d7f5dd; }
.crm-status-completed { background: #ddd; }
.crm-status-cancelled { background: #fbdada; }

.crm-priority-urgent { color: #b32d2e; font-weight: 700; }
.crm-priority-high { color: #b26b00; font-weight: 600; }

.crm-filters { margin: 12px 0; display: flex; gap: 8px; align-items: center; }

.crm-detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-top: 16px; }
.crm-card { background: #fff; border: 1px solid #dcdcde; border-radius: 4px; padding: 16px 20px; margin-bottom: 16px; }
.crm-card h2 { margin-top: 0; }

.crm-kv th { text-align: left; width: 160px; color: #646970; padding: 4px 8px 4px 0; }
.crm-kv td { padding: 4px 0; }

.crm-log-list { list-style: none; margin: 0; padding: 0; }
.crm-log-list li { border-bottom: 1px solid #f0f0f1; padding: 8px 0; }
.crm-log-time { font-size: 11px; color: #646970; margin-right: 8px; }

.crm-add-note, .crm-add-cost-row { margin-top: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crm-add-note textarea { flex: 1; min-width: 240px; }

.crm-totals { margin-top: 14px; width: 100%; max-width: 320px; }
.crm-totals th { text-align: left; color: #646970; font-weight: 400; padding: 3px 0; }
.crm-totals td { text-align: right; padding: 3px 0; }
.crm-total-grand th, .crm-total-grand td { font-weight: 700; border-top: 1px solid #dcdcde; padding-top: 6px; }

.crm-detail-side .crm-card select,
.crm-detail-side .crm-card textarea,
.crm-detail-side .crm-card input { width: 100%; margin-bottom: 8px; }

.crm-customer-search { position: relative; max-width: 420px; margin-bottom: 16px; }
.crm-search-results { position: absolute; z-index: 10; background: #fff; border: 1px solid #dcdcde; width: 100%; max-height: 220px; overflow-y: auto; display: none; }
.crm-search-result-item { padding: 8px 10px; cursor: pointer; }
.crm-search-result-item:hover { background: #f0f0f1; }
.crm-selected-customer { font-weight: 600; color: #2271b1; }

/* Public shortcode */
.crm-public-status-lookup { max-width: 420px; }
.crm-public-status-lookup label { display: block; font-weight: 600; margin-bottom: 4px; }
.crm-public-status-lookup input[type="text"] { width: 100%; padding: 8px; margin-bottom: 10px; }
.crm-status-error { color: #b32d2e; }
