
/* ===== 基础重置与变量 ===== */
:root {
	--primary: #5B7B3E;
	--primary-dark: #3D5528;
	--primary-light: #8AAD5F;
	--gold: #C8A45C;
	--gold-light: #E8D5A3;
	--cream: #FDF8F0;
	--white: #FFFFFF;
	--text: #3A3226;
	--text-light: #6B6055;
	--text-muted: #8C8070;
	--border: #E5DCCF;
	--shadow-sm: 0 2px 12px rgba(60, 40, 20, 0.06);
	--shadow-md: 0 8px 32px rgba(60, 40, 20, 0.10);
	--radius-sm: 8px;
	--radius: 14px;
	--radius-lg: 20px;
	--transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	--font-heading: 'Noto Serif SC', 'STSong', 'Songti SC', 'SimSun', 'KaiTi', 'STKaiti', serif;
	--font-body: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Noto Sans SC', sans-serif;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: var(--font-body);
	color: var(--text);
	background-color: var(--cream);
	line-height: 1.6;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* ===== 顶部公告栏 ===== */
.top-bar {
	background: var(--primary-dark);
	color: var(--cream);
	text-align: center;
	padding: 8px 16px;
	font-size: 0.85rem;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
}

.top-bar .dot {
	display: inline-block;
	width: 7px;
	height: 7px;
	background: #A8D672;
	border-radius: 50%;
	animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

	0%,
	100% {
		opacity: 1;
		box-shadow: 0 0 0 0 rgba(168, 214, 114, 0.6);
	}

	50% {
		opacity: 0.5;
		box-shadow: 0 0 0 8px rgba(168, 214, 114, 0);
	}
}

.top-bar a {
	color: var(--gold-light);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ===== 导航栏 ===== */
.header {
	background: var(--white);
	position: sticky;
	top: 0;
	z-index: 1000;
	border-bottom: 1px solid var(--border);
	box-shadow: var(--shadow-sm);
}

.header-inner {
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 28px;
	height: 70px;
}

.logo-area {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: var(--text);
}

.logo-icon {
	width: 46px;
	height: 46px;
	background: var(--primary);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-family: var(--font-heading);
	font-size: 1.5rem;
	font-weight: 700;
	flex-shrink: 0;
	position: relative;
}

.logo-icon::after {
	content: '';
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 1.5px solid var(--gold);
	opacity: 0.5;
}

.logo-text h2 {
	font-family: var(--font-heading);
	font-size: 1.35rem;
	letter-spacing: 1px;
	color: var(--primary-dark);
	line-height: 1.2;
}

.logo-text span {
	font-size: 0.75rem;
	color: var(--text-muted);
	letter-spacing: 2px;
}

.nav-links {
	display: flex;
	list-style: none;
	gap: 8px;
	align-items: center;
}

.nav-links a {
	text-decoration: none;
	color: var(--text);
	padding: 10px 16px;
	border-radius: 25px;
	font-size: 0.95rem;
	font-weight: 500;
	transition: var(--transition);
	white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
	background: #F2EEE4;
	color: var(--primary-dark);
}

.nav-cta {
	background: var(--primary) !important;
	color: #fff !important;
	padding: 10px 20px !important;
	border-radius: 25px !important;
	font-weight: 600 !important;
}

.nav-cta:hover {
	background: var(--primary-dark) !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(61, 85, 40, 0.3);
}

.nav-cta.active {
	background: var(--primary-dark) !important;
	color: #fff !important;
}

.hamburger {
	display: none;
	flex-direction: column;
	gap: 5px;
	cursor: pointer;
	background: none;
	border: none;
	padding: 8px;
}

.hamburger span {
	display: block;
	width: 26px;
	height: 2.5px;
	background: var(--text);
	border-radius: 2px;
	transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
	transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
	opacity: 0;
}

.hamburger.active span:nth-child(3) {
	transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== 主内容 ===== */
.section {
	padding: 0 28px 72px;
	flex: 1;
}

.section-inner {
	max-width: 860px;
	margin: 0 auto;
}

.section-header {
	text-align: center;
	margin-bottom: 40px;
}

.section-header h1 {
	font-family: var(--font-heading);
	font-size: 2.2rem;
	letter-spacing: 1px;
	color: #2C2416;
	margin-bottom: 6px;
}

.section-header .divider {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 8px;
}

.section-header .divider .line {
	width: 40px;
	height: 1px;
	background: var(--gold);
}

.section-header .divider .diamond {
	width: 8px;
	height: 8px;
	background: var(--gold);
	transform: rotate(45deg);
}

.section-header p {
	color: var(--text-muted);
	max-width: 600px;
	margin: 10px auto 0;
	font-size: 0.95rem;
}

/* ===== 预约卡片 ===== */
.booking-card {
	background: var(--white);
	/*border-radius: var(--radius-lg);*/
	box-shadow: var(--shadow-md);
	/*border: 1px solid var(--border);*/
	padding: 40px 44px;
	margin-bottom: 28px;
}

.selector-label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--text);
	margin-bottom: 10px;
	letter-spacing: 0.5px;
}

.selector-label .required {
	color: #C0392B;
	margin-left: 2px;
}

/* ===== 就诊人 ===== */
.patient-wrapper {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-bottom: 28px;
	padding: 16px 18px;
	background: #F9F7F2;
	border-radius: var(--radius);
	border: 1px solid var(--border);
}

.patient-card-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	flex: 1;
}

.patient-card {
	padding: 6px 16px;
	border: 1.5px solid var(--border);
	border-radius: var(--radius-sm);
	background: #FCFAF6;
	cursor: pointer;
	transition: var(--transition);
	user-select: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
	font-size: 0.85rem;
}

.patient-card:hover {
	border-color: var(--primary-light);
	background: #F5F9F0;
}

.patient-card.selected {
	border-color: var(--primary);
	background: var(--primary);
	color: #fff;
	box-shadow: 0 4px 12px rgba(91, 123, 62, 0.25);
}

.patient-card .patient-name {
	font-weight: 600;
}

.btn-add-patient {
	padding: 6px 16px;
	border: 1.5px solid var(--border);
	border-radius: var(--radius-sm);
	background: #FCFAF6;
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--text);
	cursor: pointer;
	transition: var(--transition);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
	flex-shrink: 0;
}

.btn-add-patient:hover {
	border-color: var(--gold);
	background: #FFF8EF;
}

/* ===== 科目 ===== */
.subject-grid {
	display: flex;
	gap: 12px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.subject-item {
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1.5px solid var(--border);
	cursor: pointer;
	transition: var(--transition);
	padding: 10px;
	width: 60px;
	height: 60px;
	text-align: center;
	line-height: 1.2;
}

.subject-item:hover {
	border-color: var(--primary-light);
	background: #F5F9F0;
}

.subject-item.selected {
	border-color: var(--primary);
	background: var(--primary);
	color: #fff;
	box-shadow: 0 4px 12px rgba(91, 123, 62, 0.25);
}

.subject-desc {
	padding: 10px 14px;
	background: #F9F7F2;
	border-radius: var(--radius-sm);
	border-left: 3px solid var(--gold);
	font-size: 0.9rem;
	color: var(--text-light);
	min-height: 40px;
	margin-bottom: 8px;
}

/* ===== 医生 ===== */
.doctor-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 8px;
}

.doctor-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	border: none;
	background: none;
	padding: 4px;
}

.doctor-item .avatar {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: #E8E0D4;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.8rem;
	font-weight: 600;
	color: var(--primary-dark);
	border: 3px solid var(--border);
	transition: var(--transition);
	box-shadow: var(--shadow-sm);
}

.doctor-item:hover .avatar {
	border-color: var(--primary-light);
	transform: scale(1.04);
	box-shadow: var(--shadow-md);
}

.doctor-item.selected .avatar {
	border-color: var(--primary);
	box-shadow: 0 0 0 4px rgba(91, 123, 62, 0.20), var(--shadow-md);
	background: var(--primary);
	color: #fff;
}

.doctor-item .doc-name {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--text);
}

.doctor-item .doc-title {
	font-size: 0.7rem;
	color: var(--text-muted);
}

/* ===== 表单通用 ===== */
.form-group {
	margin-bottom: 24px;
}

.form-group label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--text);
	margin-bottom: 6px;
	letter-spacing: 0.5px;
}

.form-group label .required {
	color: #C0392B;
	margin-left: 2px;
}

.form-control {
	width: 100%;
	padding: 12px 16px;
	border: 1.5px solid var(--border);
	border-radius: var(--radius-sm);
	font-size: 0.95rem;
	font-family: var(--font-body);
	color: var(--text);
	background: #FCFAF6;
	transition: var(--transition);
}

.form-control:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 4px rgba(91, 123, 62, 0.12);
	background: #fff;
}

textarea.form-control {
	resize: vertical;
	min-height: 100px;
}

/* ===== 日期 + 时段（干净清晰） ===== */
.date-time-row {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: flex-start;
}

.date-col {
	flex: 1 1 0;
	min-width: 200px;
}

.time-col {
	flex: 0 0 auto;
	max-width: 200px;
}

.time-col .label {
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--text);
	margin-bottom: 6px;
	display: block;
}

/* ===== 日期网格（干净、自适应换行） ===== */
.date-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 1px;
}

.date-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 35px;
	height: 35px;
	border: 1px solid var(--border);
	/*border-radius: 4px;*/
	cursor: pointer;
	transition: var(--transition);
	background: var(--white);
	user-select: none;
	font-weight: 600;
	font-size: 1rem;
	color: var(--text);
}

.date-item .day {
	line-height: 1.2;
}

.date-item .month-label {
	font-size: 0.55rem;
	font-weight: 400;
	color: var(--text-muted);
	line-height: 1;
	margin-top: 1px;
}

.date-item:hover:not(.disabled):not(.no-doctor) {
	border-color: var(--primary-light);
	background: #F5F9F0;
	color: var(--primary-light);
}

.date-item.selected {
	background: var(--primary);
	color: #fff;
	border-color: var(--primary);
	box-shadow: 0 2px 8px rgba(91, 123, 62, 0.25);
}

.date-item.selected .month-label {
	color:var(--primary-light);
}

.date-item.disabled {
	color: #E74C3C;
	background: #FDF2F2;
	border-color: #F5C6C6;
	cursor: not-allowed;
	pointer-events: none;
}

.date-item.no-doctor {
	color: #C4B89E;
	background: #F8F6F2;
	border-color: #E8E2D8;
	cursor: not-allowed;
	pointer-events: none;
}

/* ===== 时段按钮 ===== */
.time-slots {
	display: flex;
	gap: 8px;
}

.time-slot {
	padding: 8px 16px;
	border: 1.5px solid var(--border);
	border-radius: var(--radius-sm);
	background: #FCFAF6;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--text);
	cursor: pointer;
	transition: var(--transition);
	text-align: center;
	user-select: none;
	min-width: 80px;
}

.time-slot:hover {
	border-color: var(--primary-light);
	background: #F5F9F0;
}

.time-slot.selected {
	border-color: var(--primary);
	background: var(--primary);
	color: #fff;
	box-shadow: 0 4px 12px rgba(91, 123, 62, 0.25);
}

/* ===== 按钮 ===== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 36px;
	border-radius: 30px;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 1px;
	border: none;
	transition: var(--transition);
	cursor: pointer;
	font-family: var(--font-body);
	width: 100%;
}

.btn-primary {
	background: var(--primary);
	color: #fff;
	box-shadow: 0 6px 20px rgba(91, 123, 62, 0.3);
}

.btn-primary:hover {
	background: var(--primary-dark);
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(61, 85, 40, 0.35);
}

/* ===== 须知 ===== */
.notice-box {
	background: #FFF8EF;
	border-radius: var(--radius);
	padding: 24px 28px;
	border-left: 4px solid var(--gold);
	margin-top: 8px;
}

.notice-box h4 {
	font-family: var(--font-heading);
	color: var(--primary-dark);
	font-size: 1rem;
	margin-bottom: 8px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.notice-box ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.notice-box ul li {
	padding: 4px 0 4px 28px;
	position: relative;
	font-size: 0.9rem;
	color: var(--text-light);
}

.notice-box ul li::before {
	content: '•';
	position: absolute;
	left: 6px;
	color: var(--gold);
	font-weight: 700;
	font-size: 1.2rem;
}

/* ===== Footer ===== */
.footer {
	background: #2C2416;
	color: #C4B89E;
	text-align: center;
	padding: 28px;
	font-size: 0.85rem;
	letter-spacing: 1px;
	line-height: 2;
	margin-top: auto;
}

.footer strong {
	color: #E8D5A3;
}

/* ===== 加载动画 ===== */
.date-loading {
	text-align: center;
	padding: 12px 0;
	color: var(--text-muted);
	font-size: 0.9rem;
}

.date-loading::after {
	content: '';
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid var(--border);
	border-top-color: var(--primary);
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	margin-left: 8px;
	vertical-align: middle;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
	.nav-links {
		display: none;
		flex-direction: column;
		position: absolute;
		top: 70px;
		left: 0;
		right: 0;
		background: #fff;
		border-bottom: 2px solid var(--border);
		padding: 16px 0;
		gap: 4px;
		box-shadow: var(--shadow-md);
	}

	.nav-links.show {
		display: flex;
	}

	.hamburger {
		display: flex;
	}

	.booking-card {
		padding: 28px 20px;
	}

	.date-time-row {
		/*! flex-direction: column; */
		gap: 12px;
	}

	.time-col {
		flex: 1 1 auto;
	}

	.time-slots {
		flex-direction: row;
		justify-content: center;
	}
}

@media (max-width: 500px) {
	.section {
		padding: 0 5px 72px;
	}
	.booking-card {
		padding: 20px 16px;
	}

	.section-header h1 {
		font-size: 1.5rem;
	}

	.date-item {
		width: 36px;
		height: 36px;
		font-size: 0.85rem;
	}

	.date-item .month-label {
		font-size: 0.5rem;
	}
	
}