/* ==================== CSS Design System ==================== */
:root {
  --primary: #1a5fb4;
  --primary-light: #3584e4;
  --primary-dark: #0d3b7a;
  --primary-bg: #eff6ff;
  --bg: #f5f7fa;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
  --max-width: 1200px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ==================== Header & Navigation ==================== */
.site-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(26,95,180,0.3);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.site-logo .logo-icon { font-size: 1.5rem; }
.site-nav { display: flex; gap: 4px; align-items: center; }
.site-nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
.member-login-btn {
  background: rgba(255,255,255,0.2) !important;
  border-radius: 20px !important;
  padding: 6px 18px !important;
  margin-left: 8px;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  opacity: 1 !important;
}
.member-login-btn:hover {
  background: rgba(255,255,255,0.35) !important;
}

/* 导航栏用户区域（登录后显示） */
.nav-user-area {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}
.nav-username {
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  padding: 6px 14px !important;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
}
.nav-username:hover {
  background: rgba(255,255,255,0.3) !important;
  color: #fff !important;
}
.nav-logout-btn {
  color: rgba(255,255,255,0.7) !important;
  font-size: 0.8rem !important;
  padding: 6px 10px !important;
  text-decoration: none;
  border-radius: 6px;
  transition: all var(--transition);
  cursor: pointer;
}
.nav-logout-btn:hover {
  color: #fff !important;
  background: rgba(255,255,255,0.12) !important;
}
.nav-login-link {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85) !important;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all var(--transition);
  font-weight: 500;
}
.nav-login-link:hover {
  color: #fff !important;
  background: rgba(255,255,255,0.12) !important;
}
.nav-lawyer-link {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7) !important;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all var(--transition);
  font-weight: 500;
}
.nav-lawyer-link:hover {
  color: #fff !important;
  background: rgba(255,255,255,0.12) !important;
}
.nav-dropdown {
  position: relative;
}
.nav-dropdown > a::after { content: ' ▾'; font-size: 0.7rem; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  min-width: 180px;
  padding: 6px 0;
  z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  color: var(--text) !important;
  padding: 10px 20px;
  font-size: 0.85rem;
}
.nav-dropdown-menu a:hover { background: var(--primary-bg); color: var(--primary) !important; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ==================== Container & Layout ==================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 24px 60px;
}

/* ==================== Hero Section ==================== */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 40%, var(--primary-light) 100%);
  color: #fff;
  padding: 60px 24px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 12px; position: relative; }
.hero p { font-size: 1.1rem; opacity: 0.9; max-width: 600px; margin: 0 auto 30px; position: relative; }
.hero-stats { display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; position: relative; }
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 2rem; font-weight: 800; }
.hero-stat .lbl { font-size: 0.85rem; opacity: 0.8; margin-top: 2px; }

/* ==================== Cards ==================== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

/* Feature Cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.feature-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}
.feature-card .icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 16px;
}
.feature-card .icon.blue { background: var(--primary-bg); }
.feature-card .icon.green { background: var(--success-bg); }
.feature-card .icon.amber { background: var(--warning-bg); }
.feature-card .icon.red { background: var(--danger-bg); }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.feature-card p { font-size: 0.85rem; color: var(--text-secondary); }

/* Section title */
.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
}
.section-title a:hover { text-decoration: underline; }

/* ==================== Tables ==================== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
thead th {
  background: #f1f5f9;
  color: var(--text);
  font-weight: 700;
  padding: 12px 14px;
  text-align: center;
  white-space: nowrap;
  border-bottom: 2px solid var(--border);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}
tbody td {
  padding: 11px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
tbody tr:hover { background: #f8fafc; }
.text-right { text-align: right; font-variant-numeric: tabular-nums; font-family: "SF Mono", "Menlo", "Consolas", monospace; }

/* ==================== Buttons ==================== */
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.btn {
  height: 44px; padding: 0 28px; border: none; border-radius: var(--radius-sm);
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  letter-spacing: 0.03em; transition: all var(--transition);
  display: inline-flex; align-items: center; gap: 6px; font-family: inherit;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26,95,180,0.35); }
.btn-outline { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-bg); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; transform: translateY(-1px); }
.btn-danger { background: #fff; color: var(--danger); border: 1.5px solid var(--danger); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-export { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-export:hover { background: var(--primary-bg); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 0.85rem; }

/* ==================== Forms ==================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 0.85rem; font-weight: 600;
  color: var(--text-secondary); letter-spacing: 0.02em;
}
.form-group label .req { color: var(--danger); margin-left: 2px; }
.form-group input, .form-group select, .form-group textarea {
  padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.95rem;
  color: var(--text); background: #fafbfc;
  transition: all var(--transition); font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(53,132,228,0.12); background: #fff;
}
.form-group textarea { min-height: 100px; resize: vertical; }

/* ==================== Tags ==================== */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tag-blue { background: #dbeafe; color: #1e40af; }
.tag-green { background: #dcfce7; color: #166534; }
.tag-amber { background: #fef3c7; color: #92400e; }
.tag-red { background: #fce7f3; color: #9d174d; }
.tag-gray { background: #f1f5f9; color: #475569; }

/* ==================== Summary Stats ==================== */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.summary-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.summary-card .val { font-size: 1.8rem; font-weight: 800; color: var(--primary); line-height: 1.2; }
.summary-card .val.danger { color: var(--danger); }
.summary-card .val.success { color: var(--success); }
.summary-card .lbl { font-size: 0.8rem; color: var(--text-secondary); margin-top: 4px; font-weight: 500; }

/* ==================== Lists ==================== */
.list-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: #f8fafc; margin: 0 -16px; padding-left: 16px; padding-right: 16px; border-radius: 6px; }
.list-item .meta { font-size: 0.8rem; color: var(--text-muted); margin-top: 6px; display: flex; gap: 16px; flex-wrap: wrap; }

/* ==================== Lawyer Cards ==================== */
.lawyer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.lawyer-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.lawyer-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.lawyer-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 12px;
  color: var(--primary);
  overflow: hidden;
}
.lawyer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.lawyer-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.lawyer-card .firm { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 8px; }
.lawyer-card .fields { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }

/* ==================== Notice ==================== */
.notice {
  background: var(--warning-bg);
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.82rem;
  color: #92400e;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* ==================== Footer ==================== */
.site-footer {
  background: #1e293b;
  color: #94a3b8;
  text-align: center;
  padding: 32px 24px;
  font-size: 0.85rem;
  margin-top: 60px;
}
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }

/* ==================== Filter/Search Bar ==================== */
.filter-bar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: center;
}
.filter-bar input[type="text"] {
  flex: 1; min-width: 200px;
  padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.95rem;
  font-family: inherit; background: #fff;
}
.filter-bar input:focus { outline: none; border-color: var(--primary-light); }
.filter-bar select {
  padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.9rem;
  font-family: inherit; background: #fff;
}

/* ==================== Article Detail ==================== */
.article-detail { display: none; }
.article-detail.open { display: block; }
.article-content {
  line-height: 1.9;
  font-size: 0.95rem;
  color: var(--text);
  white-space: pre-wrap;
}

/* ==================== Breadcrumb ==================== */
.breadcrumb {
  display: flex; gap: 8px; align-items: center;
  font-size: 0.85rem; color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.5rem; }
  .hero-stats { gap: 20px; }
  .hero-stat .num { font-size: 1.5rem; }
  .container { padding: 16px 12px 40px; }
  .card { padding: 20px 16px; }
  .site-nav { display: none; }
  .site-nav.open { display: flex; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--primary-dark); padding: 12px; }
  .nav-toggle { display: block; }
  .nav-dropdown-menu { position: static; background: rgba(255,255,255,0.1); }
  .nav-dropdown-menu a { color: #fff !important; }
  .feature-grid { grid-template-columns: 1fr; }
  .lawyer-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .btn-row { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .filter-bar { flex-direction: column; }
  .filter-bar input[type="text"] { width: 100%; }
}

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

/* ==================== Utility ==================== */
.hide { display: none !important; }
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.positive { color: var(--success); font-weight: 600; }
.negative { color: var(--danger); font-weight: 600; }

@media print {
  .site-header, .btn-row, .no-print, .site-footer { display: none; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}
