/* ============ 大美健康 - 全局样式 ============ */
:root {
  --primary: #0d7c3e;
  --primary-light: #2ecc71;
  --primary-dark: #095c2e;
  --gold: #d4a017;
  --gold-light: #f0c94b;
  --bg: #f8faf9;
  --bg-light: #f0f7f2;
  --text: #1a2e1f;
  --text-light: #5a7262;
  --text-muted: #8fa89a;
  --white: #ffffff;
  --border: #d5e5da;
  --shadow: 0 2px 12px rgba(13,124,62,0.08);
  --shadow-lg: 0 8px 32px rgba(13,124,62,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
  --font: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
img { max-width: 100%; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============ Buttons ============ */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 24px; border: 2px solid transparent; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; cursor: pointer; transition: var(--transition); text-decoration: none; font-family: var(--font); }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); box-shadow: 0 4px 16px rgba(13,124,62,0.3); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-white { background: white; color: var(--primary); border-color: white; }
.btn-white:hover { background: var(--bg-light); box-shadow: var(--shadow); }
.btn-outline-white { background: transparent; color: white; border-color: rgba(255,255,255,0.6); }
.btn-outline-white:hover { background: rgba(255,255,255,0.15); border-color: white; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: var(--radius); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }

/* ============ Navbar ============ */
.navbar { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); transition: var(--transition); }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; height: 64px; gap: 32px; }
.nav-brand { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 700; color: var(--primary); }
.nav-brand i { font-size: 26px; }
.nav-links { display: flex; gap: 8px; flex: 1; }
.nav-links a { padding: 8px 16px; border-radius: var(--radius-sm); color: var(--text); font-weight: 500; font-size: 15px; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); background: var(--bg-light); }
.badge { background: #e74c3c; color: white; font-size: 11px; padding: 1px 6px; border-radius: 10px; margin-left: 4px; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.user-menu { display: flex; align-items: center; gap: 8px; cursor: pointer; position: relative; padding: 6px 12px; border-radius: var(--radius-sm); }
.user-menu:hover { background: var(--bg-light); }
.user-menu .dropdown { display: none; position: absolute; top: 100%; right: 0; background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 180px; overflow: hidden; margin-top: 8px; }
.user-menu:hover .dropdown { display: block; }
.dropdown a { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: var(--text); font-size: 14px; }
.dropdown a:hover { background: var(--bg-light); color: var(--primary); }
.user-avatar-sm { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.mobile-toggle { display: none; background: none; border: none; font-size: 22px; color: var(--text); cursor: pointer; }

@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .mobile-toggle { display: block; margin-left: auto; }
  .nav-container { gap: 12px; }
}

/* ============ Hero ============ */
.hero { margin-top: 64px; position: relative; overflow: hidden; }
.hero-slide { display: none; min-height: 520px; position: relative; padding: 80px 0; }
.hero-slide.active { display: flex; align-items: center; }
.hero-content { max-width: 1200px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 2; color: white; }
.hero-badge { display: inline-block; background: rgba(255,255,255,0.2); padding: 6px 18px; border-radius: 30px; font-size: 14px; margin-bottom: 20px; backdrop-filter: blur(10px); }
.hero-content h1 { font-size: 48px; font-weight: 900; margin-bottom: 16px; line-height: 1.2; }
.hero-content p { font-size: 18px; opacity: 0.9; margin-bottom: 32px; max-width: 500px; }
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 40px; }
.hero-stats .stat strong { display: block; font-size: 28px; }
.hero-stats .stat span { font-size: 13px; opacity: 0.8; }
.hero-decoration { position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; }
.float-circle { position: absolute; border-radius: 50%; background: rgba(255,255,255,0.08); }
.float-circle.c1 { width: 300px; height: 300px; right: -50px; top: -50px; animation: float 8s ease-in-out infinite; }
.float-circle.c2 { width: 200px; height: 200px; right: 100px; bottom: -30px; animation: float 6s ease-in-out infinite 2s; }
.float-circle.c3 { width: 150px; height: 150px; right: 350px; top: 50px; animation: float 10s ease-in-out infinite 1s; }
.hero-dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 10; }
.hero-dots .dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; transition: var(--transition); }
.hero-dots .dot.active { background: white; width: 32px; border-radius: 6px; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-30px); } }

@media (max-width: 768px) {
  .hero-slide { min-height: 400px; padding: 60px 0; }
  .hero-content h1 { font-size: 32px; }
  .hero-content p { font-size: 15px; }
  .hero-stats { gap: 24px; }
  .hero-stats .stat strong { font-size: 22px; }
}

/* ============ Sections ============ */
.section { padding: 80px 0; }
.section.bg-light { background: var(--bg-light); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.section-header p { color: var(--text-light); font-size: 16px; }
.section-header.light h2, .section-header.light p { color: white; }
.view-all { display: inline-block; margin-top: 8px; font-weight: 500; }

/* ============ Categories ============ */
.category-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.category-card { text-align: center; padding: 24px 12px; border-radius: var(--radius); background: white; box-shadow: var(--shadow); transition: var(--transition); cursor: pointer; }
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat-icon { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; font-size: 24px; color: white; }
.category-card h3 { font-size: 14px; font-weight: 500; }

@media (max-width: 768px) { .category-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }

/* ============ Product Cards ============ */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.product-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); cursor: pointer; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-img { height: 220px; background: linear-gradient(135deg, var(--bg-light), var(--bg)); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 48px; position: relative; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-tag { position: absolute; top: 12px; left: 12px; background: var(--primary); color: white; padding: 4px 12px; border-radius: 20px; font-size: 12px; }
.product-info { padding: 16px; }
.product-info h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-info .product-desc { font-size: 13px; color: var(--text-light); margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { display: flex; align-items: baseline; gap: 8px; }
.product-price .current { font-size: 22px; font-weight: 700; color: #e74c3c; }
.product-price .original { font-size: 14px; color: var(--text-muted); text-decoration: line-through; }
.product-price .discount { font-size: 12px; background: #fff3f3; color: #e74c3c; padding: 2px 8px; border-radius: 4px; }

/* ============ Video Cards ============ */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.video-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); cursor: pointer; }
.video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.video-cover { height: 180px; background: linear-gradient(135deg, #1a5276, #2980b9); display: flex; align-items: center; justify-content: center; position: relative; }
.video-cover img { width: 100%; height: 100%; object-fit: cover; }
.video-play-btn { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,0.9); display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--primary); position: absolute; transition: var(--transition); }
.video-card:hover .video-play-btn { background: white; transform: scale(1.1); }
.video-cover .views { position: absolute; bottom: 8px; right: 12px; color: white; font-size: 12px; background: rgba(0,0,0,0.5); padding: 2px 8px; border-radius: 4px; }
.video-info { padding: 16px; }
.video-info h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.video-info p { font-size: 13px; color: var(--text-light); }

/* ============ Trust Section ============ */
.trust-section { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: white; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.trust-card { text-align: center; padding: 32px 20px; background: rgba(255,255,255,0.1); border-radius: var(--radius); backdrop-filter: blur(10px); }
.trust-icon { font-size: 40px; margin-bottom: 16px; }
.trust-card h3 { font-size: 18px; margin-bottom: 8px; }
.trust-card p { font-size: 14px; opacity: 0.8; }

@media (max-width: 768px) { .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }

/* ============ CTA ============ */
.cta-section { background: linear-gradient(135deg, var(--gold), var(--gold-light)); color: var(--text); }
.cta-content { text-align: center; }
.cta-content h2 { font-size: 36px; font-weight: 700; margin-bottom: 12px; }
.cta-content p { font-size: 18px; margin-bottom: 28px; opacity: 0.8; }
.cta-btns { display: flex; gap: 16px; justify-content: center; }

/* ============ Footer ============ */
.footer { background: #0a2615; color: rgba(255,255,255,0.7); padding: 60px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand { font-size: 22px; font-weight: 700; color: white; margin-bottom: 12px; }
.footer-brand i { color: var(--primary-light); }
.footer-col p { font-size: 14px; margin-bottom: 4px; }
.footer-col h4 { color: white; font-size: 16px; margin-bottom: 16px; }
.footer-col a { display: block; color: rgba(255,255,255,0.7); font-size: 14px; padding: 4px 0; }
.footer-col a:hover { color: var(--primary-light); }
.social-links { display: flex; gap: 12px; margin-top: 12px; }
.social-links a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: white; font-size: 16px; }
.social-links a:hover { background: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; font-size: 13px; }

@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }

/* ============ Page Header ============ */
.page-header { padding: 100px 0 48px; color: white; text-align: center; margin-top: 64px; }
.page-header h1 { font-size: 36px; font-weight: 700; margin-bottom: 8px; }
.page-header p { font-size: 16px; opacity: 0.9; }

/* ============ Filter Bar ============ */
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-tab { padding: 8px 20px; border: 2px solid var(--border); background: white; border-radius: 30px; font-size: 14px; cursor: pointer; transition: var(--transition); font-family: var(--font); color: var(--text); }
.filter-tab:hover { border-color: var(--primary); color: var(--primary); }
.filter-tab.active { background: var(--primary); color: white; border-color: var(--primary); }
.search-box { display: flex; align-items: center; gap: 8px; background: white; border: 2px solid var(--border); border-radius: 30px; padding: 8px 20px; }
.search-box i { color: var(--text-muted); }
.search-box input { border: none; outline: none; font-size: 14px; font-family: var(--font); width: 200px; }

/* ============ Modal ============ */
.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 2000; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); }
.modal.active { display: flex; }
.modal-content { background: white; border-radius: var(--radius-lg); padding: 32px; max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; animation: fadeInUp 0.3s ease; }
.modal-lg { max-width: 900px; }
.modal-close { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--bg-light); font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: var(--border); }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ============ Product Detail ============ */
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.pd-main-img { width: 100%; border-radius: var(--radius); }
.pd-placeholder { height: 300px; background: var(--bg-light); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 64px; color: var(--text-muted); }
.pd-category { font-size: 13px; color: var(--primary); font-weight: 500; margin-bottom: 8px; }
.pd-info h2 { font-size: 24px; margin-bottom: 16px; }
.pd-price-box { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.pd-price { font-size: 32px; font-weight: 700; color: #e74c3c; }
.pd-original { font-size: 16px; color: var(--text-muted); text-decoration: line-through; }
.pd-discount { font-size: 13px; background: #fff3f3; color: #e74c3c; padding: 4px 12px; border-radius: 4px; }
.pd-desc { color: var(--text-light); font-size: 14px; line-height: 1.8; margin-bottom: 20px; }
.pd-video-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; background: #1a1a2e; color: white; border-radius: var(--radius-sm); cursor: pointer; margin-bottom: 20px; transition: var(--transition); }
.pd-video-btn:hover { background: #2d2d5e; }
.pd-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pd-qty { display: flex; align-items: center; border: 2px solid var(--border); border-radius: var(--radius-sm); }
.pd-qty button { width: 40px; height: 40px; border: none; background: var(--bg-light); font-size: 18px; cursor: pointer; }
.pd-qty input { width: 50px; text-align: center; border: none; font-size: 16px; font-family: var(--font); }

@media (max-width: 768px) { .pd-grid { grid-template-columns: 1fr; } }

/* ============ Video Player ============ */
.video-player-wrap { padding: 8px; }
.video-info-panel { padding: 20px 0; }
.video-info-panel h2 { font-size: 20px; margin-bottom: 8px; }
.video-info-panel p { color: var(--text-light); font-size: 14px; margin-bottom: 12px; }
.video-meta { display: flex; gap: 20px; font-size: 13px; color: var(--text-muted); }

/* ============ Auth Pages ============ */
.auth-body { background: var(--bg-light); min-height: 100vh; }
.auth-container { display: flex; min-height: 100vh; }
.auth-card { flex: 1; max-width: 480px; padding: 60px 40px; display: flex; flex-direction: column; justify-content: center; background: white; }
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-logo { width: 72px; height: 72px; border-radius: 20px; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-size: 32px; margin: 0 auto 20px; }
.auth-header h2 { font-size: 24px; margin-bottom: 8px; }
.auth-header p { color: var(--text-light); }
.auth-footer { text-align: center; margin-top: 24px; color: var(--text-light); font-size: 14px; }
.auth-bg { flex: 1; background: linear-gradient(135deg, #1a5276, #5dade2); display: flex; align-items: center; justify-content: center; color: white; }
.auth-bg-content { padding: 40px; max-width: 400px; }
.auth-bg-content h1 { font-size: 40px; margin-bottom: 12px; }
.auth-bg-content p { font-size: 18px; opacity: 0.9; margin-bottom: 32px; }
.auth-features div { padding: 8px 0; font-size: 15px; }
.auth-features i { margin-right: 8px; color: var(--primary-light); }

@media (max-width: 768px) {
  .auth-container { flex-direction: column; }
  .auth-bg { display: none; }
  .auth-card { max-width: 100%; padding: 40px 24px; }
}

/* ============ Forms ============ */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 16px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-family: var(--font); transition: var(--transition); background: white; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(13,124,62,0.1); }
.form-group input:disabled { background: var(--bg-light); color: var(--text-muted); }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.input-icon input { padding-left: 42px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ============ Profile ============ */
.profile-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; margin-top: 80px; }
.profile-card { background: white; border-radius: var(--radius); padding: 32px 24px; text-align: center; box-shadow: var(--shadow); }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-size: 36px; margin: 0 auto 16px; }
.profile-level { display: inline-block; padding: 4px 16px; border-radius: 20px; background: var(--gold); color: white; font-size: 13px; margin: 8px 0; }
.profile-points { color: var(--gold); font-weight: 600; margin-top: 8px; }
.profile-menu { background: white; border-radius: var(--radius); overflow: hidden; margin-top: 16px; box-shadow: var(--shadow); }
.profile-menu a { display: flex; align-items: center; gap: 10px; padding: 14px 20px; color: var(--text); font-size: 14px; border-bottom: 1px solid var(--border); }
.profile-menu a:last-child { border: none; }
.profile-menu a:hover, .profile-menu a.active { background: var(--bg-light); color: var(--primary); }
.card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--border); }
.card-header h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 24px; }

@media (max-width: 768px) { .profile-layout { grid-template-columns: 1fr; } }

/* ============ Orders ============ */
.order-card { margin-bottom: 16px; }
.order-header { display: flex; justify-content: space-between; padding: 12px 20px; background: var(--bg-light); font-size: 14px; }
.order-status { font-weight: 600; }
.order-body { display: flex; align-items: center; gap: 16px; padding: 16px 20px; }
.order-img { width: 64px; height: 64px; border-radius: var(--radius-sm); object-fit: cover; }
.order-img-placeholder { width: 64px; height: 64px; border-radius: var(--radius-sm); background: var(--bg-light); display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.order-info { flex: 1; }
.order-info h4 { font-size: 15px; margin-bottom: 4px; }
.order-info p { font-size: 13px; color: var(--text-light); }
.order-total { font-size: 20px; font-weight: 700; color: #e74c3c; }
.order-footer { padding: 8px 20px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-muted); }

/* ============ Chat ============ */
.chat-section { margin-top: 64px; height: calc(100vh - 64px); }
.chat-container { display: flex; height: 100%; }
.chat-sidebar { width: 320px; border-right: 1px solid var(--border); display: flex; flex-direction: column; background: white; }
.chat-sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.chat-sidebar-header h3 { font-size: 16px; }
.chat-search { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.chat-search .input-icon { margin: 0; }
.chat-search input { border: none; background: var(--bg-light); padding: 10px 14px 10px 38px; border-radius: 30px; width: 100%; font-size: 13px; }
.chat-search i { left: 26px; }
.contact-list { flex: 1; overflow-y: auto; }
.chat-empty { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.chat-empty i { font-size: 48px; margin-bottom: 12px; }

.contact-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; transition: var(--transition); border-bottom: 1px solid #f0f0f0; }
.contact-item:hover { background: var(--bg-light); }
.contact-item.active { background: #e8f5e9; }
.contact-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; overflow: hidden; }
.contact-avatar img { width: 100%; height: 100%; object-fit: cover; }
.contact-info { flex: 1; min-width: 0; }
.contact-name { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.contact-last { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.consultant-badge { background: var(--gold); color: white; font-size: 10px; padding: 1px 6px; border-radius: 4px; }
.contact-meta { text-align: right; flex-shrink: 0; }
.contact-time { font-size: 11px; color: var(--text-muted); display: block; }
.unread-badge { background: #e74c3c; color: white; font-size: 11px; padding: 1px 7px; border-radius: 10px; display: inline-block; margin-top: 4px; }

/* Chat main */
.chat-main { flex: 1; display: flex; flex-direction: column; background: #f5f8f6; }
.chat-welcome { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-muted); }
.welcome-icon { font-size: 64px; color: var(--primary-light); margin-bottom: 20px; }
.chat-welcome h2 { color: var(--text); font-size: 24px; margin-bottom: 8px; }
.chat-welcome p { margin-bottom: 24px; }

.chat-active { display: flex; flex-direction: column; height: 100%; }
.chat-header { display: flex; align-items: center; gap: 12px; padding: 12px 20px; background: white; border-bottom: 1px solid var(--border); }
.chat-header-info { display: flex; align-items: center; gap: 10px; }
.chat-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; }
.chat-header h4 { font-size: 15px; }
.chat-status { font-size: 12px; color: var(--primary-light); }
.chat-status.online::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--primary-light); margin-right: 4px; }
.mobile-back { display: none; background: none; border: none; font-size: 18px; cursor: pointer; margin-right: 8px; color: var(--text); }

.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.message { max-width: 70%; display: flex; flex-direction: column; }
.message-mine { align-self: flex-end; }
.message-other { align-self: flex-start; }
.message-bubble { padding: 10px 16px; border-radius: 16px; font-size: 14px; line-height: 1.6; word-break: break-word; }
.message-mine .message-bubble { background: var(--primary); color: white; border-bottom-right-radius: 4px; }
.message-other .message-bubble { background: white; border-bottom-left-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.message-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.message-mine .message-time { text-align: right; }
.chat-image { max-width: 240px; border-radius: 12px; cursor: pointer; }

.chat-input-area { padding: 12px 20px; background: white; border-top: 1px solid var(--border); }
.chat-tools { display: flex; gap: 8px; margin-bottom: 8px; }
.chat-tools button { background: none; border: none; font-size: 18px; color: var(--text-muted); cursor: pointer; padding: 4px; }
.chat-tools button:hover { color: var(--primary); }
.chat-input-wrap { display: flex; gap: 12px; align-items: flex-end; }
.chat-input-wrap textarea { flex: 1; border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 14px; font-family: var(--font); resize: none; max-height: 120px; line-height: 1.5; }
.chat-input-wrap textarea:focus { outline: none; border-color: var(--primary); }
.chat-send-btn { padding: 10px 20px; height: 44px; }

/* User list in modal */
.user-list { max-height: 400px; overflow-y: auto; }
.user-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.user-item:last-child { border: none; }

@media (max-width: 768px) {
  .chat-sidebar { width: 100%; }
  .chat-main { display: none; }
  .mobile-back { display: block; }
}

/* ============ Empty State ============ */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state i { font-size: 48px; margin-bottom: 12px; }

/* ============ Toast ============ */
.toast { position: fixed; top: 80px; right: 20px; padding: 14px 24px; border-radius: var(--radius-sm); color: white; font-size: 14px; z-index: 3000; animation: slideIn 0.3s ease; box-shadow: var(--shadow-lg); }
.toast.success { background: var(--primary); }
.toast.error { background: #e74c3c; }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
