/* Evento Referral - giao diện phía User */

.er-box {
	background: #fff;
	border: 1px solid #e3e6ea;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 20px;
}

.er-form p { margin: 0 0 14px; }
.er-form label { display: block; font-weight: 600; margin-bottom: 4px; }
.er-form input[type=text],
.er-form input[type=email],
.er-form input[type=url],
.er-form input[type=password] {
	width: 100%;
	max-width: 420px;
	padding: 9px 12px;
	border: 1px solid #ccd0d4;
	border-radius: 6px;
	box-sizing: border-box;
}
.er-req { color: #c62828; }
.er-hint { color: #646970; font-size: 13px; }

.er-btn {
	display: inline-block;
	padding: 10px 18px;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	font-size: 15px;
}
.er-btn-primary { background: #14575e; color: #fff; }
.er-btn-primary:hover { background: #0f4046; }

.er-alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; }
.er-alert-error { background: #fdecea; color: #a52620; }
.er-alert-ok { background: #e8f5e9; color: #256029; }

/* Bố cục Dashboard */
.er-dash {
	display: flex;
	gap: 24px;
	align-items: flex-start;
}
.er-nav-toggle,
.er-nav-button { display: none; }

.er-sidebar {
	flex: 0 0 220px;
	background: #14575e;
	border-radius: 8px;
	padding: 18px 0;
	color: #fff;
}
.er-sidebar-title {
	font-weight: 700;
	font-size: 16px;
	padding: 0 20px 14px;
	border-bottom: 1px solid rgba(255,255,255,.15);
	margin-bottom: 10px;
}
.er-nav-link {
	display: block;
	padding: 11px 20px;
	color: rgba(255,255,255,.85);
	text-decoration: none;
}
.er-nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.er-nav-link.is-active { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.er-nav-back { margin-top: 14px; opacity: .75; font-size: 14px; }

.er-content { flex: 1; min-width: 0; }
.er-content h2 { margin-top: 0; }

/* Thẻ số liệu */
.er-stats { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.er-stat {
	flex: 1 1 150px;
	background: #fff;
	border: 1px solid #e3e6ea;
	border-radius: 8px;
	padding: 16px 18px;
}
.er-stat-value { font-size: 22px; font-weight: 700; line-height: 1.25; }
.er-stat-label { color: #646970; font-size: 13px; margin-top: 2px; }

/* Danh sách Partner */
.er-cards { display: flex; flex-wrap: wrap; gap: 16px; }
.er-card {
	flex: 1 1 220px;
	max-width: 300px;
	background: #fff;
	border: 1px solid #e3e6ea;
	border-radius: 8px;
	padding: 18px;
	text-decoration: none;
	color: inherit;
	transition: box-shadow .15s, transform .15s;
}
.er-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); transform: translateY(-2px); }
.er-card-name { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.er-card-host { color: #646970; font-size: 13px; margin-bottom: 10px; word-break: break-all; }
.er-card-rate { font-size: 14px; }
.er-card-rate strong { color: #14575e; font-size: 17px; }

.er-back { display: inline-block; margin-bottom: 10px; text-decoration: none; }
.er-rate strong { color: #14575e; font-size: 18px; }

.er-inline-form { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.er-inline-form input[type=url] {
	flex: 1 1 300px;
	padding: 10px 12px;
	border: 1px solid #ccd0d4;
	border-radius: 6px;
}

.er-result { background: #f6f7f7; border-radius: 6px; padding: 14px; margin-top: 14px; }
.er-result-label { font-weight: 600; margin-bottom: 6px; }
.er-result-url {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid #ccd0d4;
	border-radius: 6px;
	font-family: monospace;
	font-size: 13px;
	background: #fff;
	box-sizing: border-box;
}

/* Bảng */
.er-table-wrap { overflow-x: auto; }
.er-table { width: 100%; border-collapse: collapse; background: #fff; }
.er-table th,
.er-table td { padding: 10px 12px; border-bottom: 1px solid #e3e6ea; text-align: left; vertical-align: middle; }
.er-table th { background: #f6f7f7; font-size: 13px; }
.er-table td { font-size: 14px; }
.er-link-danger { background: none; border: 0; color: #c62828; cursor: pointer; padding: 0; }

/* Mobile: ẩn sidebar, mở bằng nút menu */
@media (max-width: 782px) {
	.er-dash { display: block; position: relative; }
	.er-nav-button {
		display: inline-block;
		margin-bottom: 14px;
		padding: 9px 16px;
		background: #14575e;
		color: #fff;
		border-radius: 6px;
		cursor: pointer;
	}
	.er-sidebar { display: none; width: 100%; margin-bottom: 18px; }
	.er-nav-toggle:checked ~ .er-sidebar { display: block; }
	.er-stat { flex: 1 1 45%; }
	.er-card { max-width: none; }
}
