/* 丰华生物官网 - 共享样式表 */
:root {
  --primary: #0D8C5A;
  --primary-dark: #0A6B45;
  --primary-light: #E8F5E9;
  --accent: #4CAF50;
  --accent-light: #A7D4A7;
  --text: #1F2937;
  --text-light: #6B7280;
  --text-lighter: #9CA3AF;
  --bg: #F8FAF9;
  --white: #FFFFFF;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* 容器 */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; border-radius: 100px; font-size: 15px; font-weight: 500;
  cursor: pointer; transition: all 0.3s; border: none; letter-spacing: 0.5px;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-white { background: var(--white); color: var(--primary); }
.btn-white:hover { background: var(--primary-light); }

/* 导航 */
.header {
  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-light); transition: all 0.3s;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.header-logo { display: flex; align-items: center; gap: 12px; }
.header-logo img { height: 40px; width: auto; }
.header-logo span { font-size: 18px; font-weight: 600; color: var(--primary-dark); }

.header-nav { display: flex; gap: 32px; }
.header-nav a {
  font-size: 15px; color: var(--text); font-weight: 500; padding: 8px 0;
  position: relative; transition: color 0.3s;
}
.header-nav a:hover { color: var(--primary); }
.header-nav a.active { color: var(--primary); }
.header-nav a.active::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: var(--primary); border-radius: 3px 3px 0 0;
}

.header-actions { display: flex; gap: 16px; align-items: center; }
.header-actions .btn { padding: 8px 20px; font-size: 14px; }

.mobile-menu-btn { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.mobile-menu-btn span { display: block; width: 24px; height: 2px; background: var(--text); }

/* Hero 区域 */
.hero {
  position: relative; min-height: 560px; display: flex; align-items: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--accent) 100%);
  color: var(--white); overflow: hidden; padding-top: 72px;
}
.hero::before {
  content: ''; position: absolute; top: -100px; right: -100px; width: 500px; height: 500px;
  background: rgba(255,255,255,0.06); border-radius: 50%;
}
.hero::after {
  content: ''; position: absolute; bottom: -150px; left: -150px; width: 400px; height: 400px;
  background: rgba(255,255,255,0.04); border-radius: 50%;
}
.hero .container { position: relative; z-index: 2; }
.hero-content { max-width: 600px; }
.hero-label { display: inline-block; padding: 6px 16px; background: rgba(255,255,255,0.15); border-radius: 100px; font-size: 13px; margin-bottom: 20px; letter-spacing: 1px; }
.hero h1 { font-size: 44px; font-weight: 700; line-height: 1.2; margin-bottom: 20px; }
.hero h1 span { color: var(--accent-light); }
.hero p { font-size: 18px; opacity: 0.9; margin-bottom: 32px; line-height: 1.8; }
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.hero-stat { text-align: center; padding: 20px; background: rgba(255,255,255,0.1); border-radius: var(--radius); backdrop-filter: blur(10px); }
.hero-stat .num { font-size: 36px; font-weight: 700; margin-bottom: 4px; }
.hero-stat .label { font-size: 14px; opacity: 0.8; }

/* 页面标题 */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white); padding: 140px 0 60px; text-align: center;
}
.page-header h1 { font-size: 36px; font-weight: 700; margin-bottom: 12px; }
.page-header p { font-size: 16px; opacity: 0.85; max-width: 560px; margin: 0 auto; }
.page-breadcrumb { margin-top: 16px; font-size: 14px; opacity: 0.7; }
.page-breadcrumb a { opacity: 0.7; transition: opacity 0.3s; }
.page-breadcrumb a:hover { opacity: 1; }

/* 区块标题 */
.section { padding: 80px 0; }
.section-alt { background: var(--bg); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 32px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.section-header p { font-size: 16px; color: var(--text-light); max-width: 560px; margin: 0 auto; }
.section-label { display: inline-block; padding: 4px 14px; background: var(--primary-light); color: var(--primary); border-radius: 100px; font-size: 13px; font-weight: 500; margin-bottom: 12px; }

/* 卡片 */
.card {
  background: var(--white); border-radius: var(--radius); border: 1px solid var(--border-light);
  padding: 32px; transition: all 0.3s; height: 100%;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: var(--border); }
.card-icon { width: 56px; height: 56px; border-radius: var(--radius-sm); background: var(--primary-light); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; font-size: 24px; color: var(--primary); }
.card h3 { font-size: 20px; font-weight: 600; margin-bottom: 12px; }
.card p { font-size: 15px; color: var(--text-light); line-height: 1.7; }

.card-grid { display: grid; gap: 24px; }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }

/* 产品卡片 */
.product-card { background: var(--white); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-light); transition: all 0.3s; }
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.product-card .img-wrap { height: 200px; background: linear-gradient(135deg, var(--primary-light), var(--bg)); display: flex; align-items: center; justify-content: center; }
.product-card .img-wrap .ph { font-size: 48px; color: var(--primary); opacity: 0.5; }
.product-card .info { padding: 24px; }
.product-card .tag { display: inline-block; padding: 4px 12px; background: var(--primary-light); color: var(--primary); border-radius: 100px; font-size: 12px; font-weight: 500; margin-bottom: 12px; }
.product-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.product-card p { font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* 时间线 */
.timeline { position: relative; max-width: 800px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--border); transform: translateX(-1px); }
.timeline-item { display: flex; margin-bottom: 32px; position: relative; }
.timeline-item:nth-child(odd) { flex-direction: row-reverse; }
.timeline-item .content { width: 45%; padding: 20px; background: var(--white); border-radius: var(--radius); border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); }
.timeline-item .year { font-size: 14px; font-weight: 600; color: var(--primary); margin-bottom: 8px; }
.timeline-item .text { font-size: 14px; color: var(--text-light); line-height: 1.6; }
.timeline-item .dot { position: absolute; left: 50%; top: 24px; width: 16px; height: 16px; background: var(--primary); border-radius: 50%; border: 4px solid var(--white); transform: translateX(-50%); box-shadow: 0 0 0 2px var(--primary); }

/* 表格 */
.data-table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.data-table th { background: var(--primary-light); color: var(--primary); font-weight: 600; text-align: left; padding: 14px 16px; font-size: 14px; }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border-light); font-size: 14px; color: var(--text); }
.data-table tr:hover td { background: var(--bg); }
.data-table .status { display: inline-block; padding: 4px 10px; border-radius: 100px; font-size: 12px; font-weight: 500; }
.status-done { background: #D1FAE5; color: #065F46; }
.status-progress { background: #DBEAFE; color: #1E40AF; }
.status-plan { background: #FEF3C7; color: #92400E; }

/* 表单 */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; color: var(--text); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; font-family: inherit; transition: border-color 0.3s; background: var(--white);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light);
}
.form-group textarea { min-height: 120px; resize: vertical; }

/* 信息块 */
.info-block { display: flex; gap: 16px; margin-bottom: 20px; }
.info-block .icon { width: 48px; height: 48px; border-radius: var(--radius-sm); background: var(--primary-light); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--primary); font-size: 20px; }
.info-block .info h4 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.info-block .info p { font-size: 14px; color: var(--text-light); }

/* 标签 */
.tag { display: inline-block; padding: 4px 12px; background: var(--primary-light); color: var(--primary); border-radius: 100px; font-size: 12px; font-weight: 500; }

/* 页脚 */
.footer { background: #0F3D2E; color: rgba(255,255,255,0.7); padding: 60px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand img { height: 40px; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; line-height: 1.8; color: rgba(255,255,255,0.6); }
.footer-col h4 { font-size: 16px; font-weight: 600; color: var(--white); margin-bottom: 20px; }
.footer-col a { display: block; font-size: 14px; color: rgba(255,255,255,0.6); padding: 6px 0; transition: color 0.3s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; text-align: center; font-size: 13px; color: rgba(255,255,255,0.5); }

/* 移动端 */
@media (max-width: 1024px) {
  .card-grid-3, .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .timeline::before { left: 20px; }
  .timeline-item, .timeline-item:nth-child(odd) { flex-direction: column; padding-left: 48px; }
  .timeline-item .content { width: 100%; }
  .timeline-item .dot { left: 20px; transform: translateX(-50%); }
}

@media (max-width: 768px) {
  .header-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero h1 { font-size: 32px; }
  .hero-stats { grid-template-columns: 1fr; }
  .card-grid-2, .card-grid-3, .card-grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .page-header h1 { font-size: 28px; }
}

/* Admin 后台样式 */
.admin-body { background: var(--bg); }
.admin-sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 240px;
  background: #0F3D2E; color: var(--white); z-index: 1000; overflow-y: auto;
}
.admin-sidebar-header { padding: 20px 24px; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 12px; }
.admin-sidebar-header img { height: 32px; }
.admin-sidebar-header span { font-size: 16px; font-weight: 600; }
.admin-nav { padding: 16px 0; }
.admin-nav a {
  display: flex; align-items: center; gap: 12px; padding: 12px 24px; font-size: 14px;
  color: rgba(255,255,255,0.7); transition: all 0.3s; border-left: 3px solid transparent;
}
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,0.08); color: var(--white); border-left-color: var(--accent); }
.admin-nav a .icon { font-size: 18px; width: 24px; text-align: center; }
.admin-main { margin-left: 240px; min-height: 100vh; }
.admin-topbar { height: 64px; background: var(--white); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 32px; position: sticky; top: 0; z-index: 100; }
.admin-topbar h2 { font-size: 20px; font-weight: 600; }
.admin-topbar .user { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-light); }
.admin-content { padding: 32px; }

.admin-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border-light); padding: 24px; margin-bottom: 24px; }
.admin-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.admin-card .btn-sm { padding: 6px 16px; font-size: 13px; border-radius: var(--radius-sm); }

.admin-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 24px; }
.admin-stat { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border-light); padding: 24px; }
.admin-stat .label { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.admin-stat .value { font-size: 28px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.admin-stat .change { font-size: 13px; color: var(--primary); font-weight: 500; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; padding: 12px 16px; font-size: 13px; font-weight: 600; color: var(--text-light); border-bottom: 1px solid var(--border); background: var(--bg); }
.admin-table td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--border-light); }
.admin-table tr:hover td { background: var(--bg); }
.admin-table .actions { display: flex; gap: 8px; }
.admin-table .actions a { color: var(--primary); font-size: 13px; font-weight: 500; }
.admin-table .actions a.delete { color: #EF4444; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 12px; font-weight: 500; }
.badge-green { background: #D1FAE5; color: #065F46; }
.badge-blue { background: #DBEAFE; color: #1E40AF; }
.badge-yellow { background: #FEF3C7; color: #92400E; }
.badge-red { background: #FEE2E2; color: #991B1B; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

@media (max-width: 1024px) {
  .admin-sidebar { transform: translateX(-100%); transition: transform 0.3s; }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .admin-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
}
