/* CareLink 主題共用樣式 */
html,
body {
	margin: 0;
	padding: 0;
	overflow-x: hidden;
}

body {
	font-family: "Inter", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
	color: #2A6068;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

h1,
h2,
h3,
p {
	margin: 0;
}

a {
	text-decoration: none;
	color: inherit;
}

button {
	font-family: inherit;
	cursor: pointer;
	border: 0;
	background: none;
}

input,
select,
textarea {
	font-family: inherit;
	font-size: 100%;
}

textarea {
	resize: vertical;
}

img {
	max-width: 100%;
}

/* ---------- 背景 ---------- */
.hero-bg {
	background:
		radial-gradient(1200px 600px at 88% -12%, rgba(127, 196, 204, .28), transparent 60%),
		radial-gradient(900px 520px at -8% 108%, rgba(160, 201, 152, .22), transparent 60%),
		linear-gradient(180deg, #F5FBFC 0%, #FFFFFF 55%, #F0F7F8 100%);
}

.page-bg {
	background:
		radial-gradient(820px 420px at 92% -10%, rgba(127, 196, 204, .20), transparent 60%),
		radial-gradient(700px 420px at -5% 105%, rgba(160, 201, 152, .18), transparent 60%),
		linear-gradient(180deg, #F7FCFC 0%, #FFFFFF 100%);
}

/* ---------- 元件 ---------- */
.soft-shadow {
	box-shadow: 0 4px 24px rgba(90, 170, 180, 0.07);
}

.glass {
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(255, 255, 255, 0.5);
}

.field {
	width: 100%;
	border: 1.5px solid #d8e8ea;
	background: #fff;
	border-radius: 12px;
	padding: 12px 16px;
	color: #2A6068;
	transition: border-color .2s, box-shadow .2s;
}

.field::placeholder {
	color: #a0bcc2;
}

.field:focus {
	outline: none;
	border-color: #5BACB5;
	box-shadow: 0 0 0 4px rgba(91, 172, 181, .12);
}

select.field {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 42px;
}

/* WeChat / WhatsApp 切換按鈕 */
.ct-btn {
	background: rgba(91, 172, 181, 0.1);
	color: #5BACB5;
	border: 1.5px solid transparent;
	cursor: pointer;
	transition: background .2s, color .2s;
}

.ct-btn:hover {
	background: rgba(91, 172, 181, 0.2);
}

.ct-btn.ct-active {
	background: #5BACB5;
	color: #fff;
}

.ct-btn.ct-active:hover {
	background: #4A9BA4;
}

.preview-box {
	border: 1.5px dashed #b8d4d6;
	background: #f4fafb;
	font-size: 14px;
	line-height: 2;
	color: #3a6a72;
	min-height: 132px;
	cursor: default;
}

.preview-box:focus {
	outline: none;
	border-color: #b8d4d6;
	box-shadow: none;
}

.step-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 9999px;
	background: linear-gradient(135deg, #7FC4CC, #5BACB5);
	color: #fff;
	font-size: .8rem;
	font-weight: 700;
}

.btn-submit {
	width: 100%;
	padding: 14px 20px;
	border-radius: 12px;
	color: #fff;
	font-weight: 600;
	font-size: 1.05rem;
	transition: transform .15s, box-shadow .2s, filter .2s;
}

.btn-submit:active {
	transform: translateY(1px);
}

.btn-teal {
	background: linear-gradient(135deg, #7FC4CC 0%, #5BACB5 60%, #4A9BA4 100%);
	box-shadow: 0 8px 24px -6px rgba(91, 172, 181, .4);
}

.btn-teal:hover {
	filter: brightness(1.05);
	box-shadow: 0 12px 32px -8px rgba(91, 172, 181, .55);
}

.btn-sage {
	background: linear-gradient(135deg, #A0C998 0%, #7DB074 60%, #6B9963 100%);
	box-shadow: 0 8px 24px -6px rgba(125, 176, 116, .4);
}

.btn-sage:hover {
	filter: brightness(1.05);
	box-shadow: 0 12px 32px -8px rgba(125, 176, 116, .55);
}

/* register 頁的 step badge 與 focus 改 sage */
.is-register .step-badge {
	background: linear-gradient(135deg, #A0C998, #7DB074);
}

.is-register .field:focus {
	border-color: #7DB074;
	box-shadow: 0 0 0 4px rgba(125, 176, 116, .12);
}

.pay-card {
	display: flex;
	align-items: center;
	gap: 12px;
	border: 1.5px solid #d8e8ea;
	border-radius: 12px;
	padding: 14px 16px;
	cursor: pointer;
	background: #fff;
	transition: border-color .2s, background .2s, box-shadow .2s;
}

.pay-card:hover {
	border-color: #A0C998;
}

.pay-card input {
	accent-color: #7DB074;
	width: 18px;
	height: 18px;
	cursor: pointer;
}

.pay-card:has(input:checked) {
	border-color: #7DB074;
	background: #f4faf4;
	box-shadow: 0 0 0 4px rgba(125, 176, 116, .10);
}

.upload-box {
	display: block;
	border: 2px dashed #c4d8c6;
	border-radius: 12px;
	background: #f8fbf8;
	padding: 28px 16px;
	text-align: center;
	cursor: pointer;
	transition: border-color .2s, background .2s;
}

.upload-box:hover {
	border-color: #A0C998;
	background: #f4faf4;
}

.upload-box.dragover {
	border-color: #7DB074;
	background: #eafaf1;
}

.upload-box input {
	display: none;
}

/* ---------- 首頁入口卡 ---------- */
.entry-card {
	position: relative;
	overflow: hidden;
	border-radius: 20px;
	padding: 32px 28px;
	color: #fff;
	text-align: left;
	width: 100%;
	box-shadow: 0 8px 32px rgba(90, 170, 181, 0.18);
	transition: transform .3s, box-shadow .3s;
}

.entry-card::after {
	content: "";
	position: absolute;
	width: 200px;
	height: 200px;
	border-radius: 9999px;
	right: -80px;
	top: -100px;
	background: rgba(255, 255, 255, .10);
}

.entry-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 16px 44px rgba(90, 170, 181, 0.25);
}

.entry-teal {
	background: linear-gradient(135deg, #7FC4CC 0%, #5BACB5 55%, #4A9BA4 100%);
}

.entry-sage {
	background: linear-gradient(135deg, #A0C998 0%, #7DB074 55%, #6B9963 100%);
}

.entry-arrow {
	display: inline-block;
	transition: transform .3s;
}

.entry-card:hover .entry-arrow {
	transform: translateX(5px);
}

.stat-num {
	font-size: clamp(1.6rem, 3vw, 2.4rem);
	font-weight: 800;
}

/* ---------- 彈窗 ---------- */
.modal-mask {
	position: fixed;
	inset: 0;
	z-index: 60;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(42, 96, 104, .22);
	padding: 16px;
}

.modal-mask.show {
	display: flex;
}

.modal-box {
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 12px 48px rgba(90, 170, 180, 0.15);
	width: 100%;
	max-width: 380px;
	padding: 32px 26px 24px;
	text-align: center;
	animation: cl-pop .25s ease;
}

@keyframes cl-pop {
	from {
		transform: scale(.92);
		opacity: 0;
	}

	to {
		transform: scale(1);
		opacity: 1;
	}
}

/* ---------- 日期範圍選擇（原生 JS 月曆） ---------- */
.date-trigger {
	cursor: pointer;
	padding-right: 44px;
}

.date-picker {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	z-index: 40;
	width: min(320px, 100%);
	background: #fff;
	border: 1px solid #d8e8ea;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(90, 170, 180, .18);
	padding: 14px;
	user-select: none;
	animation: cl-pop .18s ease;
}

.date-picker[hidden] {
	display: none;
}

.dp-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
}

.dp-title {
	font-size: 14px;
	font-weight: 700;
	color: #2A6068;
}

.dp-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 9px;
	color: #6B9098;
	transition: background .2s, color .2s;
}

.dp-nav:hover:not(:disabled) {
	background: #f0f7f8;
	color: #2A6068;
}

.dp-nav:disabled {
	opacity: .3;
	cursor: default;
}

.dp-week,
.dp-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
}

.dp-week span {
	text-align: center;
	font-size: 11px;
	font-weight: 600;
	color: #a0bcc2;
	padding: 6px 0;
}

.dp-day {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	margin: 1px 0;
	font-size: 13px;
	color: #2A6068;
	border-radius: 10px;
	transition: background .15s, color .15s;
}

.dp-day:hover:not(:disabled):not(.sel-start):not(.sel-end) {
	background: #eaf5f6;
}

.dp-day:disabled {
	color: #c7dde0;
	cursor: default;
}

.dp-day.in-range {
	background: rgba(91, 172, 181, .14);
	border-radius: 0;
}

.dp-day.sel-start,
.dp-day.sel-end {
	background: #5BACB5;
	color: #fff;
	font-weight: 700;
}

.dp-day.sel-start {
	border-radius: 10px 0 0 10px;
}

.dp-day.sel-end {
	border-radius: 0 10px 10px 0;
}

.dp-day.sel-start.sel-end {
	border-radius: 10px;
}