/**
 * Inspection Certificates Manager — Public CSS
 * Scoped under .icm-report, .icm-list-wrapper, .icm-verify-wrap
 */

/* =========================================================
 * BASE RESET (scoped)
 * ========================================================= */
.icm-report *,
.icm-list-wrapper *,
.icm-verify-wrap * {
	box-sizing: border-box;
}

/* =========================================================
 * REPORT WRAPPER
 * ========================================================= */
.icm-report {
	max-width: 960px;
	margin: 2rem auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	color: #1a1a2e;
	line-height: 1.6;
}

/* =========================================================
 * REPORT HEADER
 * ========================================================= */
.icm-report-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1.5rem 2rem;
	background: #dbeafe;
	color: #0f3460;
	border-radius: 10px 10px 0 0;
}

.icm-report-logo img {
	max-height: 72px;
	max-width: 200px;
	object-fit: contain;
	background: #fff;
	padding: 6px 10px;
	border-radius: 6px;
}

.icm-report-title h1 {
	margin: 0 0 4px;
	font-size: 1.5rem;
	font-weight: 700;
	color: #fff;
}

.icm-report-title .icm-report-no {
	font-size: 0.85rem;
	color: #1e3a5f;
	letter-spacing: .5px;
}

.icm-header-result {
	flex-shrink: 0;
}

/* =========================================================
 * RESULT BADGE
 * ========================================================= */
.icm-result-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 100px;
	padding: 10px 20px;
	border-radius: 6px;
	font-size: 1.1rem;
	font-weight: 800;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.icm-result-pass  { background: #27ae60; color: #fff; }
.icm-result-fail  { background: #e74c3c; color: #fff; }
.icm-result-pending { background: #f39c12; color: #fff; }

/* =========================================================
 * TYPE BADGE
 * ========================================================= */
.icm-type-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 4px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: .5px;
	text-transform: uppercase;
}
.icm-type-psi { background: #dbeafe; color: #1d4ed8; }
.icm-type-fri { background: #ede9fe; color: #6d28d9; }
.icm-type-dpi { background: #dcfce7; color: #15803d; }

/* =========================================================
 * REPORT BODY
 * ========================================================= */
.icm-report-body {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-top: none;
	border-radius: 0 0 10px 10px;
	padding: 2rem;
}

/* =========================================================
 * SECTION HEADINGS
 * ========================================================= */
.icm-section {
	margin-bottom: 2rem;
}

.icm-section-title {
	font-size: 1rem;
	font-weight: 700;
	color: #0f3460;
	text-transform: uppercase;
	letter-spacing: .8px;
	margin: 0 0 1rem;
	padding-bottom: 6px;
	border-bottom: 2px solid #e2e8f0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.icm-section-title::before {
	content: '';
	display: inline-block;
	width: 4px;
	height: 18px;
	background: #0f3460;
	border-radius: 2px;
}

/* =========================================================
 * DETAILS GRID
 * ========================================================= */
.icm-detail-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1rem;
}

.icm-detail-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.icm-detail-label {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	color: #64748b;
	letter-spacing: .5px;
}

.icm-detail-value {
	font-size: 0.95rem;
	color: #1e293b;
	font-weight: 500;
}

/* =========================================================
 * DEFECT SUMMARY BOXES
 * ========================================================= */
.icm-defect-summary {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1.5rem;
}

.icm-defect-box {
	flex: 1 1 150px;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 1.25rem 1rem;
	border-radius: 8px;
	text-align: center;
	position: relative;
	overflow: hidden;
}

.icm-defect-box::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 4px;
}

.icm-defect-critical { background: #fff5f5; border: 1px solid #fed7d7; }
.icm-defect-critical::before { background: #e53e3e; }
.icm-defect-major    { background: #fffbeb; border: 1px solid #fde68a; }
.icm-defect-major::before    { background: #d97706; }
.icm-defect-minor    { background: #f0fdf4; border: 1px solid #bbf7d0; }
.icm-defect-minor::before    { background: #16a34a; }

.icm-defect-count {
	font-size: 2.5rem;
	font-weight: 800;
	line-height: 1;
	margin-bottom: 6px;
}

.icm-defect-critical .icm-defect-count { color: #e53e3e; }
.icm-defect-major    .icm-defect-count { color: #d97706; }
.icm-defect-minor    .icm-defect-count { color: #16a34a; }

.icm-defect-label {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: #64748b;
}

/* =========================================================
 * AQL TABLE
 * ========================================================= */
.icm-aql-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.88rem;
}

.icm-aql-table th,
.icm-aql-table td {
	padding: 9px 12px;
	border: 1px solid #e2e8f0;
	text-align: left;
}

.icm-aql-table thead th {
	background: #f1f5f9;
	font-weight: 700;
	color: #475569;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: .4px;
}

.icm-aql-table tbody tr:nth-child(even) td {
	background: #f8fafc;
}

.icm-zero-tol {
	color: #e53e3e;
	font-weight: 700;
}

/* =========================================================
 * CHECKLIST / ITEMS TABLE
 * ========================================================= */
.icm-items-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.88rem;
}

.icm-items-table th,
.icm-items-table td {
	padding: 9px 12px;
	border: 1px solid #e2e8f0;
	text-align: left;
	vertical-align: middle;
}

.icm-items-table thead th {
	background: #f1f5f9;
	font-weight: 700;
	color: #475569;
	font-size: 0.78rem;
	text-transform: uppercase;
}

.icm-items-table tbody tr:nth-child(even) td {
	background: #f8fafc;
}

.icm-item-pass  { color: #16a34a; font-weight: 700; }
.icm-item-fail  { color: #e53e3e; font-weight: 700; }
.icm-item-na    { color: #94a3b8; font-style: italic; }

/* =========================================================
 * DEFECTS TABLE (public detailed view)
 * ========================================================= */
.icm-defects-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.88rem;
}

.icm-defects-table th,
.icm-defects-table td {
	padding: 9px 12px;
	border: 1px solid #e2e8f0;
	text-align: left;
	vertical-align: top;
}

.icm-defects-table thead th {
	background: #f1f5f9;
	font-weight: 700;
	color: #475569;
	font-size: 0.78rem;
	text-transform: uppercase;
}

.icm-severity-critical { color: #e53e3e; font-weight: 700; }
.icm-severity-major    { color: #d97706; font-weight: 700; }
.icm-severity-minor    { color: #16a34a; font-weight: 700; }

/* =========================================================
 * PHOTO GRID
 * ========================================================= */
.icm-photo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 12px;
}

.icm-photo-item {
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	aspect-ratio: 4/3;
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
}

.icm-photo-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .25s ease;
}

.icm-photo-item:hover img {
	transform: scale(1.04);
}

.icm-photo-caption {
	position: absolute;
	bottom: 0; left: 0; right: 0;
	background: rgba(0,0,0,.55);
	color: #fff;
	font-size: 0.75rem;
	padding: 5px 8px;
	text-align: center;
	transform: translateY(100%);
	transition: transform .2s ease;
}

.icm-photo-item:hover .icm-photo-caption {
	transform: translateY(0);
}

/* =========================================================
 * NOTES SECTION
 * ========================================================= */
.icm-notes-box {
	background: #fafafa;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	padding: 1rem 1.25rem;
	font-size: 0.9rem;
	line-height: 1.8;
	color: #374151;
}

/* =========================================================
 * REPORT FOOTER
 * ========================================================= */
.icm-report-footer {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 2rem;
	padding-top: 1.5rem;
	border-top: 2px solid #e2e8f0;
	margin-top: 2rem;
}

.icm-signature-block {
	flex: 1;
	text-align: center;
}

.icm-signature-line {
	border-top: 1px solid #334155;
	margin: 0 auto 6px;
	width: 200px;
}

.icm-signature-label {
	font-size: 0.78rem;
	color: #64748b;
}

.icm-qr-block {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}

.icm-qr-block img {
	width: 90px;
	height: 90px;
	border: 1px solid #e2e8f0;
	border-radius: 4px;
	padding: 4px;
}

.icm-qr-label {
	font-size: 0.72rem;
	color: #94a3b8;
	text-align: center;
}

/* =========================================================
 * PUBLIC LIST VIEW
 * ========================================================= */
.icm-list-wrapper {
	max-width: 960px;
	margin: 2rem auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.icm-list-wrapper table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.icm-list-wrapper th,
.icm-list-wrapper td {
	padding: 11px 14px;
	border-bottom: 1px solid #e2e8f0;
	text-align: left;
}

.icm-list-wrapper thead th {
	background: #0f3460;
	color: #fff;
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
}

.icm-list-wrapper tbody tr:last-child td {
	border-bottom: none;
}

.icm-list-wrapper tbody tr:hover td {
	background: #f8fafc;
}

.icm-list-wrapper a {
	color: #0f3460;
	font-weight: 600;
	text-decoration: none;
}

.icm-list-wrapper a:hover {
	text-decoration: underline;
}

.icm-list-empty {
	text-align: center;
	padding: 2rem;
	color: #94a3b8;
	font-style: italic;
}

/* =========================================================
 * VERIFICATION PAGE (standalone, no WP theme)
 * ========================================================= */
.icm-verify-wrap {
	min-height: 100vh;
	background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.icm-verify-card {
	background: #fff;
	border-radius: 12px;
	padding: 2.5rem 2rem;
	max-width: 480px;
	width: 100%;
	text-align: center;
	box-shadow: 0 20px 60px rgba(0,0,0,.3);
}

.icm-verify-icon {
	font-size: 3.5rem;
	line-height: 1;
	margin-bottom: 1rem;
}

.icm-verify-valid .icm-verify-icon   { color: #27ae60; }
.icm-verify-invalid .icm-verify-icon { color: #e74c3c; }

.icm-verify-title {
	font-size: 1.4rem;
	font-weight: 800;
	margin: 0 0 .5rem;
}

.icm-verify-valid .icm-verify-title   { color: #1a1a2e; }
.icm-verify-invalid .icm-verify-title { color: #e74c3c; }

.icm-verify-subtitle {
	color: #64748b;
	font-size: 0.9rem;
	margin-bottom: 1.5rem;
}

.icm-verify-details {
	text-align: left;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 1rem;
	margin-bottom: 1.5rem;
}

.icm-verify-row {
	display: flex;
	gap: .75rem;
	padding: 5px 0;
	font-size: 0.88rem;
}

.icm-verify-row strong {
	flex: 0 0 130px;
	color: #475569;
}

.icm-verify-row span {
	color: #1e293b;
	font-weight: 500;
}

.icm-verify-footer {
	font-size: 0.75rem;
	color: #94a3b8;
	margin-top: 1rem;
}

.icm-verify-footer a {
	color: #0f3460;
	text-decoration: none;
	font-weight: 600;
}

/* =========================================================
 * RESPONSIVE
 * ========================================================= */
@media (max-width: 768px) {
	.icm-report-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 1rem;
	}

	.icm-report-body {
		padding: 1.25rem;
	}

	.icm-detail-grid {
		grid-template-columns: 1fr 1fr;
	}

	.icm-defect-summary {
		flex-direction: column;
	}

	.icm-photo-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.icm-report-footer {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.icm-list-wrapper {
		overflow-x: auto;
	}

	.icm-verify-card {
		padding: 1.75rem 1.25rem;
	}
}

@media (max-width: 480px) {
	.icm-detail-grid {
		grid-template-columns: 1fr;
	}

	.icm-photo-grid {
		grid-template-columns: 1fr;
	}
}

/* =========================================================
 * DASHBOARD OUTER WRAPPER — breaks out of theme containers
 * ========================================================= */
.icm-dashboard-wrap {
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	overflow-x: auto;   /* allow horizontal scroll if viewport is very narrow */
}

/* =========================================================
 * DASHBOARD LAYOUT
 * ========================================================= */
.icm-dashboard {
	display: flex !important;
	flex-direction: row !important;
	align-items: stretch !important;
	min-height: 80vh;
	gap: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	color: #1a1a2e;
	box-sizing: border-box;
	width: 100%;
}

/* Force all child elements to respect flex context */
.icm-dashboard > * {
	flex-shrink: 0;
	box-sizing: border-box;
}

/* =========================================================
 * SIDEBAR
 * ========================================================= */
.icm-dash-sidebar {
	width: 240px !important;
	min-width: 240px !important;
	max-width: 240px !important;
	flex-shrink: 0 !important;
	background: #f1f5f9;
	border-right: 1px solid #e2e8f0;
	display: flex !important;
	flex-direction: column !important;
	border-radius: 10px 0 0 10px;
	overflow: hidden;
	float: none !important;
	position: relative !important;
}

.icm-dash-brand {
	padding: 20px 18px 16px;
	border-bottom: 1px solid #e2e8f0;
}
.icm-dash-brand img {
	max-height: 48px;
	max-width: 180px;
	object-fit: contain;
	background: rgba(255,255,255,.9);
	padding: 5px 8px;
	border-radius: 5px;
}
.icm-dash-brand-name {
	color: #1e3a5f;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: .3px;
}

.icm-dash-nav {
	flex: 1;
	padding: 12px 0;
}

.icm-nav-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 18px;
	color: rgba(255,255,255,.75);
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 500;
	transition: background .15s, color .15s;
	border-left: 3px solid transparent;
}
.icm-nav-item:hover {
	background: #e2e8f0;
	color: #fff;
	text-decoration: none;
}
.icm-nav-active {
	background: #e2e8f0;
	color: #0f3460 !important;
	border-left-color: #2563eb;
}
.icm-nav-create {
	background: #2563eb;
	color: #fff !important;
	font-weight: 700;
	margin: 0 8px 8px;
	border-radius: 6px;
	border-left: none !important;
}
.icm-nav-create:hover {
	background: #1d4ed8 !important;
}
.icm-nav-icon { font-size: 1rem; width: 20px; text-align: center; }

/* Quota widget */
.icm-dash-quota {
	padding: 14px 18px;
	border-top: 1px solid #e2e8f0;
	font-size: 0.8rem;
	color: #475569;
}
.icm-quota-title { font-weight: 700; color: #374151; margin-bottom: 8px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: .5px; }
.icm-quota-row { display: flex; justify-content: space-between; margin-bottom: 4px; }
.icm-quota-bar { background: #bfdbfe; border-radius: 4px; height: 5px; overflow: hidden; }
.icm-quota-fill { height: 100%; border-radius: 4px; background: #27ae60; transition: width .3s; }
.icm-quota-warn { background: #f39c12 !important; }
.icm-quota-full { background: #e74c3c !important; }

/* User info */
.icm-dash-user {
	padding: 14px 18px;
	border-top: 1px solid #e2e8f0;
	display: flex;
	align-items: center;
	gap: 10px;
}
.icm-avatar { border-radius: 50%; }
.icm-dash-user-info { display: flex; flex-direction: column; overflow: hidden; }
.icm-dash-user-info strong { color: #1e3a5f; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icm-dash-user-info small { color: #64748b; font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* =========================================================
 * MAIN CONTENT AREA
 * ========================================================= */
.icm-dash-main {
	flex: 1 1 0% !important;
	min-width: 0 !important;
	background: #f8fafc;
	border-radius: 0 10px 10px 0;
	border: 1px solid #e2e8f0;
	border-left: none;
	padding: 28px 32px;
	overflow-y: auto;
	float: none !important;
	width: auto !important;
}

.icm-panel-header {
	margin-bottom: 24px;
}
.icm-panel-header h2 {
	margin: 0 0 4px;
	font-size: 1.4rem;
	font-weight: 800;
	color: #0f3460;
}
.icm-panel-subtitle {
	margin: 0;
	color: #64748b;
	font-size: 0.9rem;
}

/* =========================================================
 * NOTICES
 * ========================================================= */
.icm-notice {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	border-radius: 7px;
	margin-bottom: 20px;
	font-size: 0.9rem;
	font-weight: 500;
}
.icm-notice-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.icm-notice-error   { background: #fff5f5; border: 1px solid #fed7d7; color: #c53030; }
.icm-notice-warning { background: #fffbeb; border: 1px solid #fde68a; color: #b45309; }
.icm-notice-dismiss { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: inherit; opacity: .6; padding: 0 4px; }
.icm-notice-dismiss:hover { opacity: 1; }

/* =========================================================
 * TOOLBAR (search + create button)
 * ========================================================= */
.icm-list-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}
.icm-search-form { flex: 1; }
.icm-search-wrap { display: flex; gap: 8px; align-items: center; }
.icm-search-input {
	flex: 1;
	padding: 8px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 0.88rem;
	outline: none;
	transition: border-color .15s;
}
.icm-search-input:focus { border-color: #0f3460; }

/* =========================================================
 * BUTTONS
 * ========================================================= */
.icm-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 8px 16px;
	border-radius: 6px;
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: background .15s, opacity .15s;
	line-height: 1;
	white-space: nowrap;
}
.icm-btn-primary  { background: #0f3460; color: #fff; }
.icm-btn-primary:hover { background: #16213e; color: #fff; text-decoration: none; }
.icm-btn-secondary { background: #e2e8f0; color: #334155; }
.icm-btn-secondary:hover { background: #cbd5e1; color: #1e293b; text-decoration: none; }
.icm-btn-ghost    { background: transparent; color: #64748b; border: 1px solid #d1d5db; }
.icm-btn-ghost:hover { background: #f1f5f9; color: #334155; text-decoration: none; }
.icm-btn-danger   { background: #fee2e2; color: #b91c1c; }
.icm-btn-danger:hover { background: #fecaca; text-decoration: none; }
.icm-btn-sm       { padding: 5px 10px; font-size: 0.8rem; }
.icm-btn-lg       { padding: 11px 24px; font-size: 1rem; }

/* =========================================================
 * CARD GRID (inspection list)
 * ========================================================= */
.icm-card-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax(280px, 1fr) );
	gap: 16px;
}

.icm-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow .2s, transform .2s;
}
.icm-card:hover {
	box-shadow: 0 4px 20px rgba(15,52,96,.1);
	transform: translateY(-2px);
}

.icm-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px 0;
}

.icm-card-body { padding: 12px 14px; flex: 1; }

.icm-card-title {
	margin: 0 0 8px;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.3;
}
.icm-card-title a { color: #0f3460; text-decoration: none; }
.icm-card-title a:hover { text-decoration: underline; }

.icm-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 12px;
	font-size: 0.8rem;
	color: #64748b;
}
.icm-card-meta span { display: flex; align-items: center; gap: 4px; }

.icm-card-defects {
	display: flex;
	gap: 8px;
	margin-top: 10px;
}
.icm-def-crit, .icm-def-maj, .icm-def-min {
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 0.78rem;
	font-weight: 700;
}
.icm-def-crit { background: #fee2e2; color: #b91c1c; }
.icm-def-maj  { background: #fef3c7; color: #92400e; }
.icm-def-min  { background: #d1fae5; color: #065f46; }

.icm-card-actions {
	display: flex;
	gap: 6px;
	padding: 10px 14px;
	border-top: 1px solid #f1f5f9;
	background: #fafafa;
}

/* =========================================================
 * EMPTY STATE
 * ========================================================= */
.icm-empty-state {
	text-align: center;
	padding: 60px 20px;
	color: #94a3b8;
}
.icm-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.icm-empty-state h3 { font-size: 1.1rem; color: #475569; margin: 0 0 8px; }
.icm-empty-state p  { margin: 0; font-size: 0.9rem; }

/* =========================================================
 * PAGINATION
 * ========================================================= */
.icm-pagination {
	display: flex;
	gap: 6px;
	justify-content: center;
	margin-top: 24px;
}
.icm-page-btn {
	min-width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	color: #374151;
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 500;
}
.icm-page-btn:hover { background: #f1f5f9; text-decoration: none; }
.icm-page-current { background: #0f3460; color: #fff; border-color: #0f3460; }
.icm-page-current:hover { background: #0f3460; color: #fff; }

/* =========================================================
 * PUBLIC FORM
 * ========================================================= */
.icm-pub-form { max-width: 800px; }

.icm-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}
.icm-form-full { grid-column: 1 / -1; }

.icm-form-group { display: flex; flex-direction: column; gap: 5px; }

.icm-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: #374151;
}
.icm-required { color: #e53e3e; }

.icm-input, .icm-select, .icm-textarea {
	padding: 9px 12px;
	border: 1px solid #d1d5db;
	border-radius: 7px;
	font-size: 0.9rem;
	font-family: inherit;
	color: #1e293b;
	background: #fff;
	outline: none;
	transition: border-color .15s, box-shadow .15s;
	width: 100%;
	box-sizing: border-box;
}
.icm-input:focus, .icm-select:focus, .icm-textarea:focus {
	border-color: #0f3460;
	box-shadow: 0 0 0 3px rgba(15,52,96,.1);
}
.icm-textarea { resize: vertical; min-height: 80px; }
.icm-field-hint { font-size: 0.78rem; color: #94a3b8; margin: 3px 0 0; }

.icm-form-section { margin-bottom: 28px; }
.icm-form-section-title {
	font-size: 0.9rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .6px;
	color: #0f3460;
	margin: 0 0 16px;
	padding-bottom: 8px;
	border-bottom: 2px solid #e2e8f0;
}

.icm-form-footer {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-top: 20px;
	border-top: 1px solid #e2e8f0;
	margin-top: 28px;
}

/* Logo row in profile */
.icm-logo-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.icm-logo-preview { max-height: 60px; max-width: 180px; object-fit: contain; border: 1px solid #e2e8f0; border-radius: 5px; padding: 4px; }

/* =========================================================
 * RESPONSIVE
 * ========================================================= */
@media (max-width: 768px) {
	.icm-dashboard { flex-direction: column !important; }
	.icm-dash-sidebar { width: 100% !important; min-width: 0 !important; max-width: 100% !important; border-radius: 10px 10px 0 0; }
	.icm-dash-nav { display: flex !important; flex-direction: row !important; flex-wrap: wrap; padding: 8px; }
	.icm-nav-item { border-radius: 6px; border-left: none !important; padding: 8px 12px; flex: 1 1 auto; justify-content: center; text-align: center; min-width: 100px; }
	.icm-nav-create { margin: 4px; }
	.icm-dash-main { width: 100% !important; border-radius: 0 0 10px 10px; border: 1px solid #e2e8f0; border-top: none; padding: 20px; }
	.icm-form-grid { grid-template-columns: 1fr; }
	.icm-form-full { grid-column: 1; }
}

@media (max-width: 600px) {
	.icm-card-grid { grid-template-columns: 1fr; }
	.icm-list-toolbar { flex-direction: column; align-items: stretch; }
	.icm-search-wrap { flex-wrap: wrap; }
}

/* =========================================================
 * REPORT ACTION BAR (dashboard view mode)
 * ========================================================= */
.icm-report-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 12px 16px;
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.icm-report-actions-right {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.icm-btn-finalize {
	background: #0f3460;
	color: #fff;
	border: none;
	font-weight: 700;
	letter-spacing: .3px;
}
.icm-btn-finalize:hover {
	background: #16213e;
	color: #fff;
	text-decoration: none;
	cursor: pointer;
}

.icm-finalized-badge {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 0.82rem;
	font-weight: 700;
	background: #f0fdf4;
	color: #15803d;
	border: 1px solid #bbf7d0;
}

/* =========================================================
 * TABS (form-inspection.php)
 * ========================================================= */
.icm-tabs {
	display: flex;
	gap: 4px;
	border-bottom: 2px solid #e2e8f0;
	margin: 20px 0 0;
	flex-wrap: wrap;
}

.icm-tab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 18px;
	font-size: 0.88rem;
	font-weight: 600;
	color: #64748b;
	text-decoration: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	border-radius: 6px 6px 0 0;
	transition: color .15s, background .15s;
}
.icm-tab:hover {
	color: #0f3460;
	background: #f1f5f9;
	text-decoration: none;
}
.icm-tab-active {
	color: #0f3460 !important;
	border-bottom-color: #2563eb;
	background: #fff;
}

.icm-tab-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	background: #2563eb;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	border-radius: 9px;
}

/* =========================================================
 * EDITABLE TABLES (checklist & defects)
 * ========================================================= */
.icm-section-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 16px 0 10px;
}

.icm-section-subtitle {
	font-size: 0.95rem;
	font-weight: 700;
	color: #334155;
}

.icm-table-wrap {
	overflow-x: auto;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
}

.icm-edit-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.85rem;
}
.icm-edit-table th {
	background: #f1f5f9;
	padding: 9px 10px;
	text-align: left;
	font-size: 0.78rem;
	font-weight: 700;
	color: #475569;
	text-transform: uppercase;
	letter-spacing: .4px;
	white-space: nowrap;
}
.icm-edit-table td {
	padding: 6px 8px;
	border-top: 1px solid #f1f5f9;
	vertical-align: middle;
}
.icm-edit-table tbody tr:hover td {
	background: #fafbfc;
}

.icm-input-sm {
	padding: 5px 8px !important;
	font-size: 0.85rem !important;
	box-sizing: border-box !important;
}
.icm-select-sm {
	padding: 5px 8px !important;
	font-size: 0.85rem !important;
	box-sizing: border-box !important;
}
/* Number inputs inside tables — enough room for 4 digits + spinner */
.icm-edit-table input[type="number"] {
	min-width: 70px !important;
	width: 100% !important;
	-moz-appearance: textfield;
}
.icm-edit-table input[type="number"]::-webkit-outer-spin-button,
.icm-edit-table input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
/* Result select — needs full width so Pass/Fail text is readable */
.icm-result-select {
	min-width: 110px !important;
	width: 100% !important;
}

/* Result select colouring — all use !important to beat theme overrides */
.icm-sel-na   { background: #f8fafc !important; border-color: #cbd5e1 !important; color: #475569 !important; font-weight: 600 !important; }
.icm-sel-pass { background: #f0fdf4 !important; border-color: #86efac !important; color: #15803d !important; font-weight: 700 !important; }
.icm-sel-fail { background: #fff5f5 !important; border-color: #fca5a5 !important; color: #b91c1c !important; font-weight: 700 !important; }

/* Severity select colouring */
.icm-sev-critical { background: #fff5f5 !important; border-color: #fca5a5 !important; color: #b91c1c !important; font-weight: 700 !important; }
.icm-sev-major    { background: #fffbeb !important; border-color: #fde68a !important; color: #92400e !important; font-weight: 700 !important; }
.icm-sev-minor    { background: #f0fdf4 !important; border-color: #86efac !important; color: #15803d !important; font-weight: 700 !important; }

/* Force option text to be visible in all browsers */
.icm-result-select option,
.icm-sev-select option { color: #1e293b !important; background: #fff !important; font-weight: normal !important; }

/* =========================================================
 * PHOTO UPLOAD ZONE
 * ========================================================= */
.icm-upload-zone {
	border: 2px dashed #cbd5e1;
	border-radius: 10px;
	padding: 32px 20px;
	text-align: center;
	background: #f8fafc;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.icm-upload-zone:hover,
.icm-upload-zone.icm-drag-over {
	border-color: #2563eb;
	background: #eff6ff;
}
.icm-upload-icon { font-size: 2.5rem; margin-bottom: 8px; }
.icm-upload-zone p { color: #64748b; font-size: 0.9rem; margin: 0 0 12px; }

.icm-photo-del {
	padding: 6px;
	text-align: center;
	border-top: 1px solid #f1f5f9;
}

/* =========================================================
 * REPORT WRAPPER inside dashboard
 * ========================================================= */
.icm-report-wrapper {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 24px;
}

/* PDF button on cards */
.icm-btn-pdf {
	background: #ede9fe;
	color: #6d28d9;
	border: 1px solid #ddd6fe;
}
.icm-btn-pdf:hover {
	background: #ddd6fe;
	color: #5b21b6;
	text-decoration: none;
}
