/* SAM Core front-end styles – matches the SAM design (navy #0F1B2D, teal #0B6E6E). */
:root {
	--sam-ink: #0F1B2D;
	--sam-muted: #5A6474;
	--sam-line: var(--sam-line, #E3E6EB);
	--sam-line-soft: #EEF0F3;
	--sam-accent: #0B6E6E;
	--sam-accent-dark: #085454;
	--sam-surface: #FFFFFF;
}
.sam {
	color: var(--sam-ink);
	font-size: 15px;
	line-height: 1.5;
}
.sam a { color: var(--sam-accent); }
.sam a:hover { color: var(--sam-accent-dark); }

.sam-btn,
.sam button.sam-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 18px;
	border: 0;
	border-radius: 10px;
	background: var(--sam-accent);
	color: #FFFFFF !important;
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.sam-btn:hover { background: var(--sam-accent-dark); }
/* Clear search: next to every search box's button, outlined so it reads as second to Search/Filter. */
.sam a.sam-clear-search, .sam button.sam-btn[data-stock-countclear] { background: #FFFFFF; color: var(--sam-ink, #0F1B2D) !important; border: 1px solid #D5DAE1; white-space: nowrap; }
.sam a.sam-clear-search:hover, .sam button.sam-btn[data-stock-countclear]:hover { background: #F5F6F8; color: var(--sam-ink, #0F1B2D) !important; }

.sam-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px;
	margin: 0 0 16px;
}
.sam-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--sam-muted); }
.sam-filters select,
.sam-filters input[type="search"],
.sam-status-form select {
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid #C9CFD8;
	border-radius: 8px;
	background: var(--sam-surface);
	font: inherit;
	font-size: 15px;
	color: var(--sam-ink);
}
.sam-filters .sam-search { flex: 1 1 200px; }

.sam-count { margin: 0 0 8px; color: var(--sam-muted); font-size: 14px; }

.sam-table-wrap {
	background: var(--sam-surface);
	border: 1px solid var(--sam-line);
	border-radius: var(--sam-radius, 14px);
	overflow-x: auto;
}
.sam-table { width: 100%; min-width: 560px; border-collapse: collapse; margin: 0; }
.sam-table th {
	text-align: left;
	padding: 14px 20px;
	font-size: 13px;
	font-weight: 600;
	color: var(--sam-muted);
	border-bottom: 1px solid var(--sam-line);
	background: transparent;
}
.sam-table td { padding: 14px 20px; border-bottom: 1px solid var(--sam-line-soft); border-top: 0; color: #3E4858; }
.sam-table tr:last-child td { border-bottom: 0; }
.sam-table td:first-child a { font-weight: 600; text-decoration: none; }

.sam-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	background: #EEF0F3;
	color: #3E4858;
}
.sam-badge-new { background: #E4ECFB; color: #1D3F99; }
.sam-badge-in_progress { background: #FFF1D6; color: #7A4F00; }
.sam-badge-on_site { background: #E3F4E8; color: #0A6B32; }
.sam-badge-signed_out { background: #EEEFF1; color: #50575E; }
.sam-badge-complete { background: var(--sam-accent-soft, #DDF1EF); color: var(--sam-accent-ink, #0A5C5C); }

.sam-empty {
	padding: 24px;
	background: var(--sam-surface);
	border: 1px solid var(--sam-line);
	border-radius: var(--sam-radius, 14px);
	color: var(--sam-muted);
}
.sam-muted { color: var(--sam-muted); }
.sam-more { margin: 12px 0 0; font-weight: 600; }
.sam-notice { padding: 12px 16px; border-radius: 10px; background: var(--sam-accent-soft, #DDF1EF); color: var(--sam-accent-ink, #0A5C5C); font-weight: 600; }

.sam-pager { display: flex; align-items: center; gap: 16px; margin-top: 16px; font-size: 14px; }

/* Detail view */
.sam-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0 16px; }
.sam-detail-head h2 { margin: 0; }
.sam-meta,
.sam-answers {
	margin: 0 0 24px;
	padding: 8px 24px;
	background: var(--sam-surface);
	border: 1px solid var(--sam-line);
	border-radius: var(--sam-radius, 14px);
}
.sam-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px 24px; padding: 16px 24px; }
.sam-meta dt, .sam-answers dt { font-size: 13px; font-weight: 600; color: var(--sam-muted); margin: 0; }
.sam-meta dd, .sam-answers dd { margin: 2px 0 0; }
.sam-answers > div { padding: 14px 0; border-bottom: 1px solid var(--sam-line-soft); }
.sam-answers > div:last-child { border-bottom: 0; }

.sam-signature { max-width: 320px; height: auto; border: 1px solid var(--sam-line); border-radius: 8px; background: #FFFFFF; }

.sam-status-form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.sam-status-form label { font-weight: 600; }

/* [sam_user] */
.sam-user { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.sam-user-name { font-weight: 600; }
.sam-user-sites { color: var(--sam-muted); font-size: 14px; }

/* Text only for screen readers */
.sam .screen-reader-text, .sam-app-body .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
