.er-frontend {
	max-width: 900px;
	margin: 0 auto;
}

.er-login-card {
	max-width: 420px;
}

.er-login-card .er-intro {
	margin-bottom: 20px;
}

.er-login-card .login-username,
.er-login-card .login-password,
.er-login-card .login-remember,
.er-login-card .login-submit {
	margin-bottom: 14px;
}

.er-login-card label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 6px;
}

.er-login-card .login-remember label {
	display: inline;
	font-weight: 400;
	margin-bottom: 0;
}

.er-login-card input[type="text"],
.er-login-card input[type="password"] {
	width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	font-size: 14px;
}

.er-login-card input[type="submit"] {
	background: #2271b1;
	color: #fff;
	border: 0;
	border-radius: 4px;
	padding: 10px 18px;
	cursor: pointer;
	font-size: 15px;
}

.er-login-card input[type="submit"]:hover {
	background: #135e96;
}

.er-frontend h2,
.er-frontend h3 {
	margin-top: 0;
}

.er-intro {
	color: #555;
}

.er-card {
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 20px;
	margin: 20px 0;
}

.er-table {
	width: 100%;
	border-collapse: collapse;
}

.er-table th,
.er-table td {
	border-bottom: 1px solid #eee;
	padding: 10px 8px;
	text-align: left;
}

.er-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 12px;
}

.er-badge-active {
	background: #d5f5e3;
	color: #1e4620;
}

.er-badge-pending {
	background: #fff3cd;
	color: #664d03;
}

.er-badge-departed {
	background: #f8d7da;
	color: #842029;
}

.er-notice {
	padding: 12px 16px;
	border-radius: 6px;
	margin: 16px 0;
}

.er-notice-success {
	background: #d5f5e3;
	border: 1px solid #9fd4ad;
}

.er-notice-warning {
	background: #fff3cd;
	border: 1px solid #ffe08a;
}

.er-notice-error {
	background: #f8d7da;
	border: 1px solid #f1aeb5;
}

.er-notice-info {
	background: #e7f1ff;
	border: 1px solid #b6d4fe;
}

.er-agreement-text {
	max-height: 420px;
	overflow: auto;
	padding: 12px;
	background: #fafafa;
	border: 1px solid #eee;
	margin-bottom: 16px;
	font-size: 14px;
	line-height: 1.5;
	/* Keep breaks when WP editor strips <p> tags but leaves newlines. */
	white-space: pre-line;
}

.er-agreement-text p {
	margin: 0 0 12px;
}

.er-agreement-text table,
.er-agreement-text ul,
.er-agreement-text ol,
.er-agreement-text li {
	white-space: normal;
}

.er-agreement-text table {
	width: 100%;
	border-collapse: collapse;
	margin: 12px 0 16px;
	font-size: 13px;
}

.er-agreement-text th,
.er-agreement-text td {
	border: 1px solid #c3c4c7;
	padding: 8px 10px;
	text-align: left;
	vertical-align: top;
}

.er-agreement-text th {
	background: #f0f0f1;
}

.er-agreement-meta th {
	width: 35%;
	font-weight: 600;
}

.er-agreement-signatures {
	width: 100%;
	border-collapse: collapse;
	margin-top: 16px;
}

.er-agreement-signatures td {
	width: 50%;
	vertical-align: top;
	border: 1px solid #c3c4c7;
	padding: 12px;
	white-space: pre-line;
	line-height: 1.6;
}

.er-checkbox {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin-bottom: 16px;
}

.er-button {
	background: #2271b1;
	color: #fff;
	border: 0;
	border-radius: 4px;
	padding: 10px 18px;
	cursor: pointer;
	font-size: 15px;
}

.er-button:hover {
	background: #135e96;
}

.er-button-secondary {
	display: inline-block;
	background: #f6f7f7;
	color: #1d2327;
	border: 1px solid #c3c4c7;
	text-decoration: none;
	padding: 8px 14px;
	font-size: 14px;
}

.er-button-secondary:hover {
	background: #eee;
	color: #1d2327;
}

.er-agreement-hint {
	margin: 0;
	color: #555;
	font-size: 14px;
}

.er-history-actions {
	margin: 12px 0 0;
}

.er-history-list {
	margin: 0;
	padding-left: 18px;
}

.er-history-entries {
	display: grid;
	gap: 16px;
}

.er-history-entry {
	margin: 0;
}

.er-history-date {
	margin: 0 0 8px;
}

.er-history-label {
	margin: 0 0 8px;
	color: #555;
}

.er-history-items-compact {
	margin: 0;
	padding-left: 18px;
}

.er-history-items-compact li {
	margin-bottom: 6px;
}

.er-history-serial {
	color: #666;
}

.er-history-items-table {
	margin-top: 4px;
}

.er-history-empty {
	margin: 0;
	color: #666;
}

.er-self-reg-item-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.er-self-reg-item-header h3 {
	margin: 0;
	font-size: 1.05rem;
}

.er-self-reg-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px 16px;
}

.er-self-reg-grid .er-field {
	margin: 0;
}

.er-self-reg-grid .er-field-full {
	grid-column: 1 / -1;
}

.er-self-reg-grid label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-weight: 600;
	font-size: 14px;
}

.er-optional {
	font-weight: 400;
	color: #666;
	font-size: 12px;
}

.er-self-reg-grid input,
.er-self-reg-grid select,
.er-self-reg-grid textarea {
	font-weight: 400;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 8px 10px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	font-size: 14px;
}

.er-self-reg-add {
	margin: 8px 0 0;
}

.er-self-reg-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 24px 0 8px;
}

.er-self-reg-actions .er-button-secondary {
	cursor: pointer;
}

@media (max-width: 640px) {
	.er-self-reg-grid {
		grid-template-columns: 1fr;
	}

	.er-self-reg-item-header {
		align-items: flex-start;
		flex-direction: column;
	}
}
