/* 神农大药房中医门诊预约系统 - 前台样式（移动端优先，适配微信） */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', Roboto, sans-serif;
    background: #f0f4f1;
    color: #2c3e2d;
    line-height: 1.6;
    font-size: 15px;
    padding-bottom: 30px;
}

/* ===== 顶部品牌区 ===== */
.header {
    background: linear-gradient(135deg, #2d8659 0%, #1f6b42 60%, #155a36 100%);
    color: #fff;
    padding: 22px 18px 26px;
    position: relative;
    overflow: hidden;
}
.header::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 24px;
    background: #f0f4f1;
    border-radius: 24px 24px 0 0;
}
.brand { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.brand .logo {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: #fff;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,.5);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.brand-text h1 { font-size: 19px; font-weight: 700; letter-spacing: 1px; }
.brand-text .sub { font-size: 12px; opacity: .85; margin-top: 3px; font-weight: 300; }

/* ===== 今日提示 ===== */
.today-bar {
    background: #fff;
    margin: -14px 12px 0;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 4px 14px rgba(45,134,89,.08);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 2;
    font-size: 14px;
}
.today-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: #2d8659; flex-shrink: 0; }
.today-bar .weekday { font-weight: 600; color: #2d8659; }
.today-bar .count { margin-left: auto; color: #999; font-size: 13px; }
.today-bar .count b { color: #e67e22; font-size: 15px; }

/* ===== 区块标题 ===== */
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 18px 12px;
    font-size: 17px;
    font-weight: 700;
    color: #1f6b42;
}
.section-title::before {
    content: '';
    width: 4px; height: 18px;
    background: #2d8659;
    border-radius: 2px;
}
.section-title .tip { font-size: 12px; font-weight: 400; color: #999; margin-left: auto; }

/* ===== 医生列表 ===== */
.doctor-list { padding: 0 12px; display: flex; flex-direction: column; gap: 12px; }
.doctor-card {
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
    transition: transform .15s, box-shadow .15s;
    cursor: pointer;
    border: 2px solid transparent;
}
.doctor-card:active { transform: scale(.98); }
.doctor-card.selected { border-color: #2d8659; box-shadow: 0 4px 16px rgba(45,134,89,.25); }
.doctor-card.disabled { opacity: .55; cursor: not-allowed; }
.doctor-card.disabled .photo { filter: grayscale(1); }

.photo {
    width: 74px; height: 74px;
    border-radius: 12px;
    object-fit: cover;
    background: #e3ece7;
    flex-shrink: 0;
}
.doc-info { flex: 1; min-width: 0; }
.doc-name { font-size: 16px; font-weight: 600; color: #2c3e2d; display: flex; align-items: center; gap: 8px; }
.doc-name .title { font-size: 12px; color: #2d8659; background: #e7f3ec; padding: 2px 8px; border-radius: 10px; font-weight: 400; }
.doc-intro { font-size: 13px; color: #777; margin-top: 4px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.doc-schedule { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.doc-schedule .tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f0f4f1;
    color: #666;
}
.doc-schedule .tag.on { background: #e7f3ec; color: #2d8659; font-weight: 600; }
.doc-status { font-size: 12px; margin-top: 8px; display: flex; align-items: center; gap: 5px; }
.doc-status.on { color: #2d8659; }
.doc-status.off { color: #b06; }
.doc-status .badge { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.doc-status.off .badge { background: #ccc; }
.doc-check { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #d9e4dd; flex-shrink: 0; margin-top: 24px; display: flex; align-items: center; justify-content: center; color: #fff; }
.doctor-card.selected .doc-check { background: #2d8659; border-color: #2d8659; }
.doctor-card.selected .doc-check::after { content: '✓'; font-size: 14px; font-weight: 700; }

.empty {
    text-align: center;
    padding: 50px 20px;
    color: #999;
    font-size: 14px;
}
.empty .ico { font-size: 40px; margin-bottom: 10px; opacity: .5; }

/* ===== 预约表单 ===== */
.form-wrap {
    margin: 0 12px;
    background: #fff;
    border-radius: 14px;
    padding: 18px 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
    display: none;
}
.form-wrap.show { display: block; animation: slideUp .3s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.form-title { font-size: 16px; font-weight: 700; color: #1f6b42; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.form-title::before { content: ''; width: 4px; height: 16px; background: #2d8659; border-radius: 2px; }
.form-sub { font-size: 12px; color: #999; margin-bottom: 16px; padding-left: 12px; }
.form-row { margin-bottom: 14px; }
.form-row.row-2 { display: flex; gap: 12px; }
.form-row.row-2 > * { flex: 1; }
label.lbl { display: block; font-size: 13px; color: #555; margin-bottom: 6px; font-weight: 500; }
label.lbl .req { color: #e74c3c; }
input.inp, textarea.inp, select.inp {
    width: 100%;
    padding: 11px 12px;
    border: 1.5px solid #e0e8e3;
    border-radius: 9px;
    font-size: 15px;
    font-family: inherit;
    background: #fafdfb;
    color: #2c3e2d;
    transition: border-color .15s, background .15s;
}
input.inp:focus, textarea.inp:focus, select.inp:focus { outline: none; border-color: #2d8659; background: #fff; }
textarea.inp { resize: none; min-height: 80px; }
.gender-sel { display: flex; gap: 10px; }
.gender-sel label { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 11px; border: 1.5px solid #e0e8e3; border-radius: 9px; cursor: pointer; font-size: 14px; background: #fafdfb; transition: all .15s; }
.gender-sel input { display: none; }
.gender-sel input:checked + span { color: #2d8659; font-weight: 600; }
.gender-sel label:has(input:checked) { border-color: #2d8659; background: #e7f3ec; }
.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2d8659 0%, #1f6b42 100%);
    color: #fff;
    border: none;
    border-radius: 11px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    letter-spacing: 1px;
}
.btn-submit:active { transform: scale(.98); }
.btn-submit:disabled { background: #ccc; cursor: not-allowed; }
.btn-reset { width: 100%; padding: 11px; background: transparent; color: #999; border: none; font-size: 13px; margin-top: 8px; cursor: pointer; }

/* ===== 提示/Toast ===== */
.toast {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,.82);
    color: #fff;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: opacity .25s;
    pointer-events: none;
    max-width: 80%;
    text-align: center;
}
.toast.show { opacity: 1; }
.toast .ico { font-size: 30px; display: block; margin-bottom: 6px; }

/* ===== 成功页 ===== */
.success-page { text-align: center; padding: 40px 24px; }
.success-page .check {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: #e7f3ec;
    color: #2d8659;
    display: flex; align-items: center; justify-content: center;
    font-size: 38px; margin: 0 auto 16px;
    animation: pop .4s ease;
}
@keyframes pop { 0% { transform: scale(0); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.success-page h2 { color: #2d8659; margin-bottom: 8px; }
.success-page p { color: #888; font-size: 14px; margin-bottom: 20px; }
.success-detail { background: #fff; border-radius: 12px; padding: 16px; text-align: left; max-width: 360px; margin: 0 auto 20px; }
.success-detail .row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #eee; font-size: 14px; }
.success-detail .row:last-child { border: none; }
.success-detail .row .k { color: #999; }
.success-detail .row .v { color: #2c3e2d; font-weight: 500; }

/* ===== 页脚 ===== */
.footer { text-align: center; padding: 24px 18px; color: #9aa89c; font-size: 12px; line-height: 1.8; }
.footer .tel { color: #2d8659; }
