/* ============================================
   Soul · 美兮心灵伙伴 — 统一样式表
   配色方案：医院青
   ============================================ */

/* --- CSS 变量 --- */
:root {
  --primary: #00897b;        /* 主色：医院青/Teal */
  --primary-dark: #00695c;   /* 主色深 */
  --secondary: #0097a7;     /* 辅色：青色/Cyan */
  --bg: #e8f5f0;            /* 背景：淡青白 */
  --surface: #ffffff;        /* 表面：纯白 */
  --text: #263238;          /* 文字：深灰 */
  --text-dim: #607d8b;      /* 文字浅 */
  --text-soft: #78909c;     /* 文字柔 */
  --border: #b2dfdb;        /* 边框：浅青 */
  --border-light: #e0f2f1;  /* 边框淡 */
  --success: #43a047;
  --danger: #e53935;
  --shadow: 0 2px 12px rgba(0,137,123,.08);
  --radius: 12px;
  --transition: .3s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- 导航栏 --- */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 120px;
  padding: 12px 0;
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}
.navbar .logo small {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 400;
}


.navbar nav { display: flex; align-items: center; gap: 8px; }

.navbar nav a, .navbar nav button {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: var(--transition);
}
.navbar nav button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.navbar nav a:hover, .navbar nav button:hover,
.navbar nav a.active, .navbar nav button.active {
  background: var(--border-light);
  color: var(--primary);
}

.navbar .nav-cta {
  background: var(--primary) !important;
  color: #fff !important;
  font-weight: 600;
}
.navbar .nav-cta:hover { background: var(--primary-dark) !important; }

/* 导航栏用户登录状态 */
.navbar .nav-user {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(0,137,123,0.08);
  cursor: pointer;
  transition: var(--transition);
  font-size: 13px;
  color: var(--primary-dark);
  font-weight: 500;
}
.navbar .nav-user:hover { background: rgba(0,137,123,0.15); }
.navbar .nav-user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.navbar .nav-user-id {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}
@media (max-width: 768px) {
  .navbar .nav-user { padding: 4px 8px; font-size: 12px; }
  .navbar .nav-user-id { display: none; }
}

/* 手机端导航 */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--text); margin: 5px 0; border-radius: 2px;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .navbar nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow);
  }
  .navbar nav.open { display: flex; }
  .navbar nav a, .navbar nav button { width: 100%; text-align: center; }
}

/* --- Hero 区域 --- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  padding: 80px 0;
  text-align: center;
}

.hero h1 {
  font-size: 42px;
  font-weight: 300;
  letter-spacing: 4px;
  margin-bottom: 16px;
}

.hero p {
  font-size: 18px;
  opacity: .9;
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero .cta-btn {
  display: inline-block;
  padding: 14px 36px;
  background: #fff;
  color: var(--primary);
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

.hero .cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,.2);
}

/* --- 功能卡片 --- */
.features { padding: 80px 0; background: var(--surface); }

.features .section-title {
  text-align: center;
  font-size: 28px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 48px;
}

.features .section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--primary);
  margin: 12px auto 0;
  border-radius: 2px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.card .card-icon {
  font-size: 40px;
  margin-bottom: 16px;
  display: block;
}

.card .card-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 16px;
  display: block;
  border: 3px solid var(--primary);
}

.card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 12px;
}

.card p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.8;
}

/* --- 通用内容区域 --- */
.content-section { padding: 80px 0; }
.content-section.bg-alt { background: var(--surface); }
.content-section.bg-main { background: var(--bg); }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 28px;
  font-weight: 400;
  color: var(--text);
}

.section-header p {
  font-size: 16px;
  color: var(--text-dim);
  margin-top: 8px;
}

/* --- 关于页面 --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-grid .about-text h3 {
  font-size: 22px;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 16px;
}

.about-grid .about-text p {
  font-size: 15px;
  color: var(--text-dim);
  margin-bottom: 16px;
  line-height: 1.9;
}

.about-grid .about-visual {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius);
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  color: rgba(255,255,255,.65);
  position: relative;
  z-index: 2;
  text-shadow: none;
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* --- 服务页面 --- */
.service-block {
  display: flex;
  gap: 48px;
  margin-bottom: 64px;
  align-items: center;
}

.service-block:nth-child(even) { flex-direction: row-reverse; }

.service-block .service-icon {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  background: var(--border-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}

.service-block .service-avatar {
  flex-shrink: 0;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--primary);
}

.service-block .service-text h3 {
  font-size: 22px;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 12px;
}

.service-block .service-text p {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.9;
}

@media (max-width: 768px) {
  .service-block { flex-direction: column !important; text-align: center; }
  .service-block .service-icon { width: 120px; height: 120px; font-size: 40px; }
  .service-block .service-avatar { width: 120px; height: 120px; }
}

/* --- 聊天页面 --- */
.chat-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  background: var(--bg);
}

.chat-app {
  width: 100%;
  max-width: 520px;
  height: calc(100vh - 160px);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

@media (min-width: 521px) {
  .chat-app { height: calc(100vh - 180px); }
}

.chat-header {
  padding: 14px 20px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.chat-header .header-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(0,151,167,.3); }
  50% { box-shadow: 0 0 14px rgba(0,151,167,.5); }
}

.chat-header .header-text h2 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .5px;
}

.chat-header .header-text span {
  font-size: 11px;
  color: rgba(255,255,255,.8);
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse 2s infinite;
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-area .welcome {
  text-align: center;
  padding: 40px 20px;
  border-bottom: 1px solid var(--border-light);
}

.chat-area .welcome h1 {
  font-size: 26px;
  font-weight: 300;
  letter-spacing: 4px;
  color: var(--primary);
  margin-bottom: 4px;
}

.chat-area .welcome p { font-size: 13px; color: var(--text-dim); }

.msg {
  display: flex;
  gap: 8px;
  max-width: 90%;
  animation: msgIn .3s ease-out;
}

@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.soul { align-self: flex-start; }

.msg-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.msg.soul .msg-avatar {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
}

.msg.user .msg-avatar { background: var(--border-light); }

.msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
}

.msg.soul .msg-bubble {
  background: var(--bg);
  border-bottom-left-radius: 4px;
  color: var(--text);
}

.msg.user .msg-bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.typing-indicator {
  padding: 4px 20px;
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
}

.input-bar {
  padding: 10px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.input-bar textarea {
  flex: 1;
  border: none;
  background: var(--bg);
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text);
  resize: none;
  max-height: 100px;
  outline: none;
  font-family: inherit;
}

.input-bar textarea::placeholder { color: var(--text-soft); }

.send-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.send-btn:active { transform: scale(.9); }
.send-btn:disabled { opacity: .4; cursor: default; }

.chat-disclaimer {
  padding: 6px 16px;
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}

/* --- 条款页面 --- */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px;
  background: var(--surface);
}

.legal-content h1 {
  font-size: 28px;
  font-weight: 400;
  color: var(--primary);
  margin-bottom: 8px;
}

.legal-content .effective-date {
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 32px;
  display: block;
}

.legal-content h2 {
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  margin: 32px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.legal-content p,
.legal-content li {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.9;
  margin-bottom: 8px;
}

.legal-content ul { padding-left: 24px; }
.legal-content li { margin-bottom: 6px; }

/* --- 页脚 --- */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: auto;
}

.footer .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 32px;
}

.footer .footer-brand h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.footer .footer-brand p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.8;
}

.footer .footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.footer .footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.footer .footer-col a:hover { color: var(--primary); }

.footer .footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer .footer-bottom p {
  font-size: 13px;
  color: var(--text-soft);
}

.footer .footer-bottom .icp a {
  color: var(--text-soft);
  font-size: 13px;
}

.footer .footer-bottom .icp a:hover { color: var(--primary); }

@media (max-width: 768px) {
  .footer .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer .footer-bottom { flex-direction: column; text-align: center; }
}

/* --- 工具类 --- */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.mb-32 { margin-bottom: 32px; }

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }

/* --- 响应式微调 --- */
@media (max-width: 480px) {
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 15px; }
  .section-header h2 { font-size: 22px; }
}

/* --- "我的"侧滑面板（CA-APPS风格） --- */
.my-panel-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.my-panel-overlay.open {
  opacity: 1;
  visibility: visible;
}

.my-panel {
  position: fixed;
  top: 0; right: -380px;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: #fff;
  z-index: 9999;
  transition: right 0.35s ease;
  overflow-y: auto;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
}
.my-panel.open {
  right: 0;
}

.my-panel-header {
  background: var(--primary);
  padding: 32px 24px 24px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 16px;
}

.my-avatar {
  width: 56px; height: 56px;
  border-radius: 28px;
  background: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.my-user-info { flex: 1; }
.my-user-name { font-size: 18px; font-weight: 700; color: #fff; }
.my-user-level { font-size: 13px; color: rgba(255,255,255,0.85); margin-top: 4px; }

.my-login-btn {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 20px;
  padding: 6px 16px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.my-login-btn:hover { background: rgba(255,255,255,0.35); }

.my-close-btn {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.my-close-btn:hover { background: rgba(255,255,255,0.4); }

.my-ep-card {
  background: var(--bg);
  border-radius: 16px;
  padding: 20px;
  margin: 16px 24px;
  text-align: center;
}
.my-ep-title { font-size: 16px; font-weight: 700; color: var(--primary); }
.my-ep-value { font-size: 48px; font-weight: 900; color: var(--primary); line-height: 56px; }
.my-ep-desc { font-size: 13px; color: var(--text-dim); margin-top: 6px; }

.my-menu-list { padding: 0 24px; display: flex; flex-direction: column; gap: 8px; }

.my-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.my-menu-item:hover { border-color: var(--primary); }
.my-menu-icon { font-size: 24px; flex-shrink: 0; }
.my-menu-label { flex: 1; font-size: 15px; color: var(--text); }
.my-menu-tag {
  background: #e8f5e9;
  border-radius: 10px;
  padding: 3px 8px;
  font-size: 12px;
  color: var(--success);
  font-weight: 600;
}
.my-menu-arrow { font-size: 20px; color: var(--text-dim); }


/* 退出登录按钮 */
.my-logout-section {
  padding: 16px 20px 8px;
  border-top: 1px solid var(--border-light);
  margin-top: 8px;
}
.my-logout-btn {
  width: 100%;
  padding: 12px 0;
  background: none;
  border: 1.5px solid var(--danger);
  border-radius: 10px;
  color: var(--danger);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.5px;
}
.my-logout-btn:hover {
  background: var(--danger);
  color: #fff;
}

.my-panel-footer {
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid var(--border-light);
  margin-top: 16px;
}

/* --- 登录弹窗（CA-APPS风格） --- */
.login-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-overlay.open {
  opacity: 1;
  visibility: visible;
}

.login-modal {
  width: 420px;
  max-width: 95vw;
  max-height: 90vh;
  background: #F7F5F0;
  border-radius: 20px;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 8px 40px rgba(0,0,0,0.2);
  transform: translateY(30px);
  transition: transform 0.35s ease;
}
.login-overlay.open .login-modal {
  transform: translateY(0);
}

.login-close-btn {
  position: absolute;
  top: 12px; right: 12px;
  background: rgba(0,0,0,0.08);
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #636E72;
  transition: background 0.2s;
}
.login-close-btn:hover { background: rgba(0,0,0,0.15); }

/* Step 1: 身份选择 */
.login-step { display: none; }
.login-step.active { display: block; }

.login-logo-area {
  text-align: center;
  padding: 40px 24px 16px;
}
.login-logo-area img {
  width: 80px; height: 80px;
  border-radius: 20px;
}
.login-logo-area .login-app-name {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  margin-top: 12px;
}
.login-logo-area .login-app-desc {
  font-size: 14px;
  color: #636E72;
  margin-top: 4px;
}

.identity-select-title {
  text-align: center;
  font-size: 14px;
  color: #636E72;
  padding: 8px 24px 16px;
}

.identity-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 24px;
  padding: 20px;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  font-weight: 600;
}
.identity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.identity-card.user-card {
  background: linear-gradient(135deg, #2EC4B6, #1AA99E);
  color: #fff;
}
.identity-card.doctor-card {
  background: linear-gradient(135deg, #7B4BB5, #5E35A0);
  color: #fff;
}
.identity-card-icon { font-size: 32px; }
.identity-card-label { font-size: 18px; font-weight: 700; }
.identity-card-sub { font-size: 13px; opacity: 0.85; margin-top: 2px; }
.identity-card-arrow { font-size: 24px; opacity: 0.7; margin-left: auto; }

.login-agreement {
  text-align: center;
  font-size: 12px;
  color: #636E72;
  padding: 20px 24px 24px;
  line-height: 1.8;
}
.login-agreement a {
  color: var(--primary);
  text-decoration: none;
}
.login-agreement a:hover { text-decoration: underline; }

/* Step 2: 登录方式 */
.login-tabs {
  display: flex;
  gap: 0;
  margin: 16px 24px 0;
  background: #fff;
  border-radius: 12px;
  padding: 4px;
}
.login-tab {
  flex: 1;
  text-align: center;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #636E72;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.login-tab.active {
  background: var(--primary);
  color: #fff;
}

.login-panel { display: none; padding: 24px; }
.login-panel.active { display: block; }

/* 微信登录面板 */
.wechat-qr-area {
  text-align: center;
  padding: 20px 0;
}
.wechat-qr-placeholder {
  width: 180px; height: 180px;
  background: #fff;
  border-radius: 12px;
  border: 2px dashed #B2BEC3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: 0 auto;
  color: #636E72;
  font-size: 14px;
}
.wechat-qr-placeholder .qr-icon { font-size: 48px; margin-bottom: 8px; }
.wechat-qr-tip { font-size: 13px; color: #636E72; margin-top: 12px; }

.login-divider {
  text-align: center;
  color: #B2BEC3;
  font-size: 13px;
  margin: 20px 0;
  position: relative;
}
.login-divider::before,
.login-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: #E0E0E0;
}
.login-divider::before { left: 5%; }
.login-divider::after { right: 5%; }

.wechat-phone-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: #07C160;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.wechat-phone-btn:hover { background: #06AD56; }
.wechat-phone-btn .wechat-icon { font-size: 20px; }

/* 手机号登录面板 */
.phone-login-form { padding: 0; }

.login-input-group {
  margin-bottom: 16px;
}
.login-input-row {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #E0E0E0;
  padding: 0 16px;
  transition: border-color 0.2s;
}
.login-input-row:focus-within { border-color: var(--primary); }

.login-input-prefix {
  font-size: 15px;
  color: #2D3436;
  font-weight: 600;
  padding-right: 12px;
  border-right: 1px solid #E0E0E0;
  flex-shrink: 0;
}

.login-input-row input {
  flex: 1;
  border: none;
  background: none;
  padding: 14px 12px;
  font-size: 15px;
  color: #2D3436;
  outline: none;
}
.login-input-row input::placeholder { color: #B2BEC3; }

.code-input-row {
  display: flex;
  gap: 12px;
}
.code-input-row .login-input-row { flex: 1; }
.code-input-row .login-input-row input { padding: 14px 12px; }

.send-code-btn {
  flex-shrink: 0;
  width: 110px;
  padding: 14px 8px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.send-code-btn:hover { background: #007A6D; }
.send-code-btn.disabled {
  background: #B2BEC3;
  cursor: not-allowed;
}

.login-submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}
.login-submit-btn:hover { background: #007A6D; }
.login-submit-btn.disabled {
  background: #B2BEC3;
  cursor: not-allowed;
}

.login-tip {
  text-align: center;
  font-size: 12px;
  color: #636E72;
  margin-top: 12px;
}

/* Step 3: 注册表单 */
.reg-form {
  padding: 24px;
  background: #fff;
  border-radius: 16px;
  margin: 16px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.reg-form-title {
  font-size: 20px;
  font-weight: 700;
  color: #2D3436;
}
.reg-form-sub {
  font-size: 13px;
  color: #636E72;
  margin-top: 4px;
  margin-bottom: 20px;
}

.reg-field { margin-bottom: 16px; }
.reg-field-label {
  font-size: 14px;
  font-weight: 600;
  color: #2D3436;
  margin-bottom: 8px;
}
.reg-field-label .required { color: #FF6B6B; }

.reg-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #E0E0E0;
  border-radius: 10px;
  font-size: 15px;
  color: #2D3436;
  outline: none;
  background: #F7F5F0;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.reg-input:focus { border-color: var(--primary); }

.reg-gender-group {
  display: flex;
  gap: 12px;
}
.reg-gender-btn {
  flex: 1;
  padding: 10px;
  border: 2px solid #E0E0E0;
  border-radius: 10px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #636E72;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}
.reg-gender-btn.selected {
  border-color: var(--primary);
  background: #E0F2F1;
  color: var(--primary);
}

.reg-phone-verified {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #E0F2F1;
  border-radius: 10px;
  font-size: 15px;
  color: #2D3436;
}
.reg-phone-verified .verified-tag {
  font-size: 12px;
  padding: 3px 8px;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
}

.reg-progress {
  margin: 20px 0;
}
.reg-progress-bar {
  height: 6px;
  background: #EDEAE5;
  border-radius: 3px;
  overflow: hidden;
}
.reg-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s;
  width: 0%;
}
.reg-progress-tip {
  font-size: 12px;
  color: #636E72;
  margin-top: 6px;
  text-align: center;
}
.reg-progress-tip.complete { color: var(--primary); font-weight: 600; }

/* Step 4: 注册成功 */
.reg-success {
  padding: 32px 24px;
  text-align: center;
}
.reg-success-bg {
  background: linear-gradient(135deg, #F0FDFB, #E8F9F7);
  border-radius: 16px;
  padding: 32px 24px;
}
.reg-success-title {
  font-size: 24px;
  font-weight: 800;
  color: #2D3436;
}
.reg-success-desc {
  font-size: 14px;
  color: #636E72;
  margin-top: 4px;
}

.reg-id-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.reg-id-label { font-size: 13px; color: #636E72; }
.reg-id-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 1px;
  margin-top: 6px;
}
.reg-id-copy-btn {
  display: inline-block;
  padding: 6px 12px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  border: none;
}
.reg-id-tip {
  font-size: 12px;
  color: #636E72;
  margin-top: 16px;
}
.reg-enter-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  transition: background 0.2s;
}
.reg-enter-btn:hover { background: #007A6D; }

/* 医生端配色覆盖 */
.login-modal.doctor-mode .login-tab.active { background: #7B4BB5; }
.login-modal.doctor-mode .login-submit-btn { background: #7B4BB5; }
.login-modal.doctor-mode .login-submit-btn:hover { background: #5E35A0; }
.login-modal.doctor-mode .send-code-btn { background: #7B4BB5; }
.login-modal.doctor-mode .send-code-btn:hover { background: #5E35A0; }
.login-modal.doctor-mode .reg-gender-btn.selected { border-color: #7B4BB5; background: #F3E8FF; color: #7B4BB5; }
.login-modal.doctor-mode .reg-progress-fill { background: #7B4BB5; }
.login-modal.doctor-mode .reg-id-value { color: #7B4BB5; }
.login-modal.doctor-mode .reg-id-copy-btn { background: #7B4BB5; }
.login-modal.doctor-mode .reg-enter-btn { background: #7B4BB5; }
.login-modal.doctor-mode .reg-enter-btn:hover { background: #5E35A0; }
.login-modal.doctor-mode .login-logo-area .login-app-name { color: #7B4BB5; }
.login-modal.doctor-mode .reg-success-bg { background: linear-gradient(135deg, #FAF6FF, #F3E8FF); }

/* 登录弹窗响应式 */
@media (max-width: 480px) {
  .login-modal { max-width: 100vw; border-radius: 0; max-height: 100vh; }
  .identity-card { margin: 8px 16px; }
  .login-tabs { margin: 16px 16px 0; }
  .login-panel { padding: 16px; }
  .reg-form { margin: 16px; }
}

