.sc-box {
	max-width: 900px;
	margin: 20px auto;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 24px 28px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.sc-login-box {
	max-width: 380px;
	text-align: left;
}
.sc-login-box h2 {
	margin-top: 0;
}
.sc-error {
	background: #fdecea;
	color: #b32d2e;
	padding: 8px 12px;
	border-radius: 4px;
	font-size: 14px;
}
.sc-hint {
	font-size: 13px;
	color: #666;
	margin-top: 16px;
}
.sc-form label {
	font-weight: 600;
	font-size: 13px;
}
.sc-form input[type="text"],
.sc-form input[type="password"],
.sc-form input[type="number"],
.sc-form input[type="date"],
.sc-form input[type="search"],
.sc-form select,
.sc-form textarea {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	margin-top: 4px;
	box-sizing: border-box;
}
.sc-btn {
	display: inline-block;
	background: #2271b1;
	color: #fff !important;
	border: none;
	padding: 9px 16px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	text-decoration: none;
	margin: 4px 6px 4px 0;
}
.sc-btn:hover {
	background: #135e96;
	color: #fff;
}
.sc-btn-secondary {
	background: #f0f0f1;
	color: #2271b1 !important;
	border: 1px solid #ccc;
}
.sc-btn-danger {
	background: #b32d2e;
}
.sc-danger {
	color: #b32d2e;
}
.sc-topbar {
	font-size: 13px;
	color: #555;
	text-align: right;
	margin-bottom: 12px;
}
.sc-header-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
}
.sc-search-form {
	margin: 14px 0;
	display: flex;
	gap: 8px;
}
.sc-search-form input[type="search"] {
	max-width: 320px;
}
.sc-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 10px;
}
.sc-table th,
.sc-table td {
	border: 1px solid #e2e2e2;
	padding: 8px 10px;
	text-align: left;
	font-size: 14px;
}
.sc-table th {
	background: #f6f7f7;
}

/* Accordion patient list */
.sc-patient-accordion {
	margin-top: 10px;
}
details.sc-patient-row {
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 4px;
	margin-bottom: 8px;
}
details.sc-patient-row > summary {
	cursor: pointer;
	padding: 14px 16px;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px;
}
details.sc-patient-row > summary::-webkit-details-marker {
	display: none;
}
details.sc-patient-row > summary::before {
	content: "▸";
	margin-right: 6px;
	color: #666;
}
details.sc-patient-row[open] > summary::before {
	content: "▾";
}
.sc-p-name {
	font-weight: 600;
	font-size: 15px;
}
.sc-p-meta {
	color: #666;
	font-size: 13px;
}
.sc-patient-panel {
	padding: 4px 18px 20px;
	border-top: 1px solid #eee;
}
.sc-patient-panel h3 {
	margin: 18px 0 8px;
}

.sc-inline-form {
	max-width: 640px;
}
.sc-patient-readonly {
	background: #f9f9f9;
	border: 1px solid #eee;
	border-radius: 4px;
	padding: 10px 16px;
	max-width: 500px;
}
.sc-patient-readonly p {
	margin: 4px 0;
	font-size: 13px;
}
.sc-edit-toggle {
	margin-top: 14px;
}
.sc-edit-toggle > summary {
	cursor: pointer;
	color: #2271b1;
	font-weight: 600;
	font-size: 13px;
	list-style: none;
}
.sc-edit-toggle > summary::-webkit-details-marker {
	display: none;
}
.sc-edit-toggle > summary::before {
	content: "▸ ";
}
.sc-edit-toggle[open] > summary::before {
	content: "▾ ";
}
.sc-edit-toggle form {
	margin-top: 12px;
	padding: 14px 16px;
	background: #f9f9f9;
	border: 1px solid #eee;
	border-radius: 4px;
}
.sc-field-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 20px;
}
.sc-field-grid p {
	margin: 8px 0;
}
.sc-inline-form label {
	display: block;
	margin-bottom: 3px;
}
/* Bigger, easier-to-tap BP / sugar fields for volunteers on phones/tablets */
.sc-bp-input {
	width: 75px !important;
	height: 48px;
	font-size: 18px !important;
	font-weight: 700;
	padding: 4px 8px !important;
}
