/* SAM Core front-end styles – matches the SAM design (navy #0F1B2D, teal #0B6E6E). */
/* SAM's colours in one place (1.100.15, the first stage towards a light / dark choice): every stylesheet uses these names, so a
   dark set can be given later in one block. Each is exactly the colour used before, so nothing looks different. */
:root {
	--sam-ink: #0F1B2D;          /* Main writing and headings. */
	--sam-ink-2: #3E4858;        /* Secondary writing, labels. */
	--sam-muted: #5A6474;        /* Notes and hints. */
	--sam-faint: #8C98AA;        /* The quietest writing. */
	--sam-page: #F5F6F8;         /* The page behind the boxes. */
	--sam-surface: #FFFFFF;      /* Boxes, cards, tables, inputs. */
	--sam-subtle: #F7F8FA;       /* Slightly shaded rows and panels. */
	--sam-subtle-2: #FAFBFC;
	--sam-fill: #EEF0F3;         /* Grey fills: hovers, bars, empty states. */
	--sam-line: #E3E6EB;         /* Lines around boxes and between rows. */
	--sam-line-soft: #EEF0F3;    /* The lightest lines. */
	--sam-line-strong: #D5DAE1;  /* Outlined buttons, stronger edges. */
	--sam-input-line: #C9CFD8;   /* The edge of boxes you type in. */
	--sam-accent: #0B6E6E;
	--sam-accent-dark: #085454;
}
.sam {
	color: var(--sam-ink);
	font-size: 15px;
	line-height: 1.5;
}
.sam a { color: var(--sam-link, var(--sam-accent)); }
.sam a:hover { color: var(--sam-link-hover, 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: var(--sam-surface, #FFFFFF); color: var(--sam-ink, #0F1B2D) !important; border: 1px solid var(--sam-line-strong, #D5DAE1); white-space: nowrap; }
.sam a.sam-clear-search:hover, .sam button.sam-btn[data-stock-countclear]:hover { background: var(--sam-page, #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-filters input[type="date"],
.sam-status-form select {
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid var(--sam-input-line, #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: var(--sam-ink-2, #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: var(--sam-fill, #EEF0F3);
	color: var(--sam-ink-2, #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: var(--sam-surface, #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; }
/* Submissions (1.95.14): a tab per form, "Info" for forms with no status, delete for System Administrators. */
.sam-badge-info { background: var(--sam-fill, #EEF0F3); color: var(--sam-ink-2, #3E4858); }
.sam .sam-sub-tabs { margin: 0 0 20px; row-gap: 4px; }
.sam .sam-sub-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; }
.sam-sub-tabn { display: inline-block; min-width: 22px; padding: 1px 8px; border-radius: 999px; background: var(--sam-fill, #EEF0F3); color: var(--sam-muted, #5A6474); font-size: 12px; font-weight: 600; text-align: center; }
.sam .sam-sub-tabs a.is-active .sam-sub-tabn { background: var(--sam-accent, #0B6E6E); color: #FFFFFF; }
.sam .sam-sub-filters { margin: 0 0 16px; }
.sam-sub-delete { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 28px 0 0; padding: 18px 0 0; border-top: 1px solid var(--sam-line, #E3E6EB); }
.sam .sam-sub-delete button.sam-sub-delbtn { background: #B91C1C; border-color: #B91C1C; }
.sam-sub-delete .sam-muted { font-size: 13px; }
.sam .sam-sub-filters input[type="date"] { min-width: 160px; box-sizing: border-box; color: var(--sam-ink, #0F1B2D); }
.sam .sam-sub-filters label { flex: 0 1 auto; }
.sam .sam-sub-filters .sam-search { flex: 1 1 160px; }
.sam .sam-sub-filters input[type="date"] { min-width: 150px; }
.sam .sam-sub-filters .sam-search input { width: 100%; box-sizing: border-box; }
@media (max-width: 600px) { .sam .sam-sub-filters > label { flex: 1 1 100%; } .sam .sam-sub-filters select, .sam .sam-sub-filters input[type="date"] { width: 100%; } }
