/* Đăng ký khám chữa bệnh tại nhà – Bệnh viện Hoàng Tuấn */
.htkn {
	--htkn-primary: #0a7c86;
	--htkn-primary-dark: #075f67;
	--htkn-primary-soft: #e6f4f5;
	--htkn-ink: #1d2b36;
	--htkn-muted: #5d6b78;
	--htkn-line: #d8e1e8;
	--htkn-bg: #ffffff;
	--htkn-field: #f7fafb;
	--htkn-danger: #c62828;
	--htkn-danger-soft: #fdecec;
	--htkn-radius: 12px;
	max-width: 820px;
	margin: 0 auto;
	color: var(--htkn-ink);
	background: var(--htkn-bg);
	border: 1px solid var(--htkn-line);
	border-radius: 18px;
	box-shadow: 0 10px 30px rgba(15, 45, 60, .07);
	overflow: hidden;
	font-size: 15px;
	line-height: 1.5;
}
.htkn *, .htkn *::before, .htkn *::after { box-sizing: border-box; }

/* Header */
.htkn-head {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 24px 28px;
	background: linear-gradient(135deg, var(--htkn-primary) 0%, var(--htkn-primary-dark) 100%);
	color: #fff;
}
.htkn-head__icon {
	flex: 0 0 52px; height: 52px;
	display: grid; place-items: center;
	border-radius: 14px;
	background: rgba(255, 255, 255, .16);
}
.htkn-head__icon svg, .htkn-success__icon svg {
	width: 28px; height: 28px; fill: none; stroke: currentColor;
	stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.htkn .htkn-head__title { margin: 0 0 2px; color: #fff; font-size: 1.35em; line-height: 1.3; font-weight: 700; }
.htkn-head__sub { margin: 0; opacity: .9; font-size: .93em; }
.htkn-hotline {
	margin-left: auto; flex: 0 0 auto;
	display: flex; flex-direction: column; align-items: flex-end;
	padding: 8px 16px; border-radius: 10px;
	background: #fff; color: var(--htkn-primary-dark) !important;
	text-decoration: none !important; line-height: 1.25;
}
.htkn-hotline span { font-size: .75em; text-transform: uppercase; letter-spacing: .06em; color: var(--htkn-muted); }
.htkn-hotline strong { font-size: 1.15em; }

/* Emergency note */
.htkn-alert {
	margin: 20px 28px 0;
	padding: 12px 16px;
	border-left: 4px solid var(--htkn-danger);
	border-radius: 8px;
	background: var(--htkn-danger-soft);
	font-size: .92em;
}
.htkn-alert strong { color: var(--htkn-danger); }
.htkn-alert a { color: var(--htkn-danger); font-weight: 700; }

/* Form */
.htkn-form { padding: 8px 28px 28px; margin: 0; }
.htkn-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.htkn-section { border: 0; margin: 0; padding: 24px 0 4px; min-width: 0; border-bottom: 1px dashed var(--htkn-line); }
.htkn-section:last-of-type { border-bottom: 0; }
.htkn-section legend + * { clear: both; }
.htkn-section legend {
	float: left; width: 100%;
	display: flex; align-items: center; gap: 10px;
	padding: 0; margin: 0 0 14px;
	font-weight: 700; font-size: 1.05em; color: var(--htkn-ink);
	text-transform: none; letter-spacing: 0;
}
.htkn-section legend span {
	width: 26px; height: 26px; border-radius: 50%;
	display: inline-grid; place-items: center;
	background: var(--htkn-primary-soft); color: var(--htkn-primary-dark);
	font-size: .85em;
}

.htkn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.htkn-col-2 { grid-column: span 2; }

.htkn-field { margin-bottom: 16px; }
.htkn-field > label, .htkn-label {
	display: block; margin-bottom: 6px;
	font-weight: 600; font-size: .93em; color: var(--htkn-ink);
}
.htkn em { color: var(--htkn-danger); font-style: normal; }

.htkn input[type="text"], .htkn input[type="tel"], .htkn input[type="number"],
.htkn input[type="date"], .htkn textarea {
	width: 100%; max-width: none; margin: 0;
	height: auto; min-height: 46px;
	padding: 11px 14px;
	font: inherit; color: var(--htkn-ink);
	background: var(--htkn-field);
	border: 1px solid var(--htkn-line);
	border-radius: var(--htkn-radius);
	box-shadow: none;
	transition: border-color .15s, box-shadow .15s, background .15s;
}
.htkn textarea { min-height: 110px; resize: vertical; }
.htkn input:focus, .htkn textarea:focus {
	outline: none; background: #fff;
	border-color: var(--htkn-primary);
	box-shadow: 0 0 0 3px rgba(10, 124, 134, .18);
}
.htkn ::placeholder { color: #9aa7b2; }

/* Pills (gender, slot) */
.htkn-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.htkn-pills label, .htkn-service { position: relative; margin: 0; cursor: pointer; font-weight: 500; }
.htkn-pills input, .htkn-service input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.htkn-pills label span {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	min-width: 92px; min-height: 46px; padding: 8px 18px;
	border: 1px solid var(--htkn-line); border-radius: var(--htkn-radius);
	background: var(--htkn-field); line-height: 1.25;
	transition: all .15s;
}
.htkn-pills small { font-size: .78em; color: var(--htkn-muted); }
.htkn-pills--slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.htkn-pills--slots label span { min-width: 0; padding: 8px 6px; }

/* Services */
.htkn-services { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.htkn-service span {
	display: flex; align-items: center; gap: 10px;
	height: 100%; padding: 12px 14px;
	border: 1px solid var(--htkn-line); border-radius: var(--htkn-radius);
	background: var(--htkn-field); line-height: 1.35;
	transition: all .15s;
}
.htkn-service span::before {
	content: ""; flex: 0 0 18px; height: 18px; border-radius: 50%;
	border: 2px solid #b6c3cd; background: #fff; transition: all .15s;
}

.htkn-pills input:checked + span, .htkn-service input:checked + span {
	border-color: var(--htkn-primary);
	background: var(--htkn-primary-soft);
	color: var(--htkn-primary-dark);
	font-weight: 600;
	box-shadow: inset 0 0 0 1px var(--htkn-primary);
}
.htkn-service input:checked + span::before { border-color: var(--htkn-primary); background: var(--htkn-primary); box-shadow: inset 0 0 0 3px #fff; }
.htkn-pills input:checked + span small { color: var(--htkn-primary-dark); }
.htkn-pills input:focus-visible + span, .htkn-service input:focus-visible + span { box-shadow: 0 0 0 3px rgba(10, 124, 134, .3); }
.htkn-pills label:hover span, .htkn-service:hover span { border-color: var(--htkn-primary); }

/* Consent */
.htkn-consent { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin: 4px 0 16px; font-weight: 400; font-size: .92em; color: var(--htkn-muted); cursor: pointer; }
.htkn-consent > span { flex: 1; }
.htkn-consent .htkn-error { flex-basis: 100%; margin: 0 0 0 28px; }
.htkn-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--htkn-primary); }

/* Captcha */
.htkn-captcha { margin: 4px 0 12px; }
.htkn-captcha .cf-turnstile { min-height: 65px; }
.htkn-field.is-invalid .cf-turnstile { outline: 1px solid var(--htkn-danger); outline-offset: 2px; border-radius: 6px; }

/* Errors */
.htkn-field.is-invalid input, .htkn-field.is-invalid textarea,
.htkn-field.is-invalid .htkn-pills span, .htkn-field.is-invalid .htkn-service span { border-color: var(--htkn-danger); }
.htkn-consent.is-invalid { color: var(--htkn-danger); }
.htkn-error { display: block; margin-top: 5px; font-size: .85em; color: var(--htkn-danger); }
.htkn-msg { margin: 8px 0 16px; padding: 12px 16px; border-radius: 10px; background: var(--htkn-danger-soft); color: var(--htkn-danger); font-size: .92em; }

/* Submit */
.htkn .htkn-submit {
	display: flex; align-items: center; justify-content: center; gap: 10px;
	width: 100%; min-height: 52px; margin: 8px 0 0; padding: 12px 24px;
	border: 0; border-radius: var(--htkn-radius);
	background: var(--htkn-primary); color: #fff;
	font: inherit; font-size: 1.05em; font-weight: 700; text-transform: none; letter-spacing: 0;
	cursor: pointer; transition: background .15s, transform .05s;
}
.htkn .htkn-submit:hover { background: var(--htkn-primary-dark); }
.htkn .htkn-submit:active { transform: translateY(1px); }
.htkn .htkn-submit[disabled] { opacity: .75; cursor: wait; }
.htkn-spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: htkn-spin .7s linear infinite; }
.htkn-submit.is-loading .htkn-spinner { display: inline-block; }
@keyframes htkn-spin { to { transform: rotate(360deg); } }

/* Medpro link */
.htkn .htkn-medpro-link {
	display: flex; align-items: center; justify-content: center; gap: 6px;
	margin-top: 12px; padding: 10px;
	border: 1px dashed var(--htkn-line); border-radius: var(--htkn-radius);
	color: var(--htkn-primary-dark); font-weight: 600; text-decoration: none;
}
.htkn .htkn-medpro-link:hover { border-color: var(--htkn-primary); background: var(--htkn-primary-soft); }

/* Success */
.htkn-success { padding: 44px 28px 40px; text-align: center; }
.htkn-success__icon {
	width: 72px; height: 72px; margin: 0 auto 16px;
	display: grid; place-items: center; border-radius: 50%;
	background: var(--htkn-primary-soft); color: var(--htkn-primary);
}
.htkn-success__icon svg { width: 38px; height: 38px; stroke-width: 2.5; }
.htkn .htkn-success h3 { margin: 0 0 10px; font-size: 1.35em; color: var(--htkn-ink); }
.htkn-success p { margin: 0 auto 8px; max-width: 480px; color: var(--htkn-muted); }
.htkn-code { display: inline-block; padding: 2px 12px; border-radius: 8px; background: var(--htkn-primary-soft); color: var(--htkn-primary-dark); font-size: 1.1em; letter-spacing: .04em; }
.htkn .htkn-again {
	margin-top: 18px; padding: 10px 22px; min-height: 0;
	border: 1px solid var(--htkn-primary); border-radius: 10px;
	background: #fff; color: var(--htkn-primary); font: inherit; font-weight: 600; text-transform: none; cursor: pointer;
}
.htkn [hidden] { display: none !important; }

/* Mobile */
@media (max-width: 640px) {
	.htkn { border-radius: 14px; font-size: 15px; }
	.htkn-head { flex-wrap: wrap; padding: 20px 16px; }
	.htkn-head__icon { flex-basis: 44px; height: 44px; }
	.htkn-head > div:nth-child(2) { flex: 1 1 calc(100% - 64px); }
	.htkn-hotline { margin: 4px 0 0; width: 100%; flex-direction: row; justify-content: space-between; align-items: center; }
	.htkn-alert { margin: 16px 16px 0; }
	.htkn-form { padding: 4px 16px 20px; }
	.htkn-grid, .htkn-services { grid-template-columns: 1fr; }
	.htkn-col-2 { grid-column: auto; }
	.htkn-pills > label { flex: 1; }
	.htkn-success { padding: 36px 16px 32px; }
}

/* Locked (đang phát triển) */
.htkn-locked { padding: 44px 28px 48px; text-align: center; }
.htkn-locked__icon {
	width: 72px; height: 72px; margin: 0 auto 16px;
	display: grid; place-items: center; border-radius: 50%;
	background: #fff4e0; color: #b26a00;
}
.htkn-locked__icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.htkn .htkn-locked h3 { margin: 0 0 10px; font-size: 1.35em; color: var(--htkn-ink); }
.htkn-locked p { margin: 0 auto; max-width: 480px; color: var(--htkn-muted); }
.htkn .htkn-locked__call {
	display: inline-block; margin-top: 20px; padding: 12px 26px;
	border-radius: var(--htkn-radius); background: var(--htkn-primary); color: #fff !important;
	font-weight: 700; text-decoration: none !important;
}
.htkn .htkn-locked__call:hover { background: var(--htkn-primary-dark); }
.htkn-admin-lock { padding: 10px 28px; background: #fff4e0; color: #7a4a00; font-size: .9em; border-bottom: 1px solid #f3d9a4; }
@media (max-width: 640px) { .htkn-locked { padding: 36px 16px 40px; } .htkn-admin-lock { padding: 10px 16px; } }
