/* 萧山律师网 - 前台样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  background: hsl(210, 20%, 98%);
  color: #2E3A45;
  font-size: 14px;
  line-height: 1.6;
}
a { color: #004080; text-decoration: none; }
a:hover { color: #CF9117; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
main.container { padding-top: 20px; padding-bottom: 40px; min-height: 60vh; }
img { max-width: 100%; }

/* 站头 */
.site-header { background: #004080; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; padding-bottom: 10px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { height: 64px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { color: #fff; font-size: 26px; font-weight: 700; letter-spacing: 2px; }
.brand-sub { color: #FFD77A; font-size: 12px; letter-spacing: 1px; }
.brand-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.brand-url { color: #FFD77A; font-size: 16px; font-weight: 700; letter-spacing: 1px; }
.brand-slogan { color: #E8F1FF; font-size: 12px; letter-spacing: 3px; }

/* 导航 */
.site-nav { background: #003366; border-top: 2px solid #CF9117; }
.nav-inner { display: flex; flex-wrap: wrap; }
.nav-inner a {
  color: #fff; padding: 11px 22px; font-size: 15px;
  border-right: 1px solid rgba(255,255,255,.12);
}
.nav-inner a:hover, .nav-inner a.active { background: #004080; color: #FFD77A; }

/* Banner 主视觉区 */
.hero-banner {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  padding: 40px 44px;
  margin-bottom: 20px;
  color: #fff;
  background: linear-gradient(135deg, hsl(210, 100%, 25%) 0%, hsl(210, 100%, 35%) 100%);
}
.hero-content { position: relative; z-index: 2; }
.hero-content h1 { font-size: 40px; font-weight: 700; letter-spacing: 2px; margin-bottom: 8px; }
.hero-content p { font-size: 17px; color: rgba(255, 255, 255, 0.8); margin-bottom: 22px; letter-spacing: 4px; }
.hero-actions { display: flex; gap: 12px; }
.hero-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border-radius: 4px; font-size: 15px; font-weight: 500;
  transition: background .15s;
}
.hero-btn-primary { background: #CF9117; color: #fff; }
.hero-btn-primary:hover { background: #B57D12; color: #fff; }
.hero-btn-ghost { background: rgba(255, 255, 255, 0.1); color: #fff; border: 1px solid rgba(255, 255, 255, 0.3); }
.hero-btn-ghost:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }
.hero-scale {
  position: absolute; right: 24px; bottom: -24px;
  width: 160px; height: 160px;
  color: rgba(255, 255, 255, 0.06);
}

/* 面板 */
.panel {
  background: #fff; border: 1px solid #E3E9F0; border-radius: 6px;
  margin-bottom: 20px; padding: 18px;
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 2px solid #004080; padding-bottom: 10px; margin-bottom: 16px;
}
.panel-head h2 { font-size: 18px; color: #004080; }
.panel-head .more { color: #CF9117; font-size: 13px; }
.home-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }

/* 律师卡片 */
.lawyer-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.lawyer-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  border: 1px solid #EDF1F6; border-radius: 6px; padding: 16px 12px;
  background: #FAFCFE; transition: box-shadow .15s;
}
.lawyer-card:hover { box-shadow: 0 3px 12px rgba(0,64,128,.15); border-color: #004080; }
.avatar {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  object-position: center 18%;
  background: #E8EEF6; margin-bottom: 8px;
}
.avatar-ph {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 34px; color: #004080; font-weight: 700;
}
.avatar-lg { width: 120px; height: 120px; object-position: center 18%; }
.lc-name { font-size: 16px; font-weight: 700; color: #1F2B37; }
.lc-stars { display: inline-block; color: #CF9117; font-size: 13px; letter-spacing: 1px; margin-top: 2px; }
.detail-stars { display: inline-block; color: #CF9117; font-size: 18px; letter-spacing: 2px; vertical-align: 3px; }
.lc-firm { font-size: 12px; color: #CF9117; margin: 2px 0 6px; }
.lc-intro { font-size: 12px; color: #6B7A8B; }
.empty { color: #98A4B3; padding: 24px 0; text-align: center; }

/* 律所卡片 */
.firm-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.firm-card {
  display: block; border: 1px solid #EDF1F6; border-radius: 6px; padding: 16px;
  background: #FAFCFE;
}
.firm-card:hover { box-shadow: 0 3px 12px rgba(0,64,128,.15); border-color: #004080; }
.fc-name { display: block; font-size: 16px; font-weight: 700; color: #004080; margin-bottom: 4px; }
.fc-meta { display: block; font-size: 12px; color: #CF9117; margin-bottom: 4px; }
.fc-intro { display: block; font-size: 12px; color: #6B7A8B; }
.fc-addr { display: block; font-size: 12px; color: #6B7A8B; }

/* 更多栏目 */
.link-list { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.link-list li a { display: block; padding: 8px 12px; background: #F4F8FD; border-radius: 4px; }
.link-list li a:hover { background: #E4EEF9; }

/* 查看全部入口 */
.all-entry { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 4px; }
.entry-card {
  display: flex; flex-direction: column; padding: 26px 22px; border-radius: 6px;
  background: linear-gradient(135deg, #004080, #0066B3); color: #fff;
  transition: transform .15s;
}
.entry-card:hover { transform: translateY(-2px); }
.entry-title { font-size: 20px; font-weight: 700; color: #fff; }
.entry-sub { color: #BFD9F2; font-size: 13px; margin-top: 4px; }

/* 搜索 */
.search-bar { display: flex; gap: 10px; margin-bottom: 18px; }
.search-bar input {
  flex: 1; padding: 10px 14px; border: 1px solid #C9D6E4; border-radius: 4px; font-size: 14px;
}
.search-bar button {
  padding: 10px 26px; background: #004080; color: #fff; border: 0; border-radius: 4px; cursor: pointer; font-size: 14px;
}
.search-bar button:hover { background: #0066B3; }
.search-bar .reset { align-self: center; color: #CF9117; font-size: 13px; }

/* 表格 */
.firm-table, .info-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.firm-table th, .firm-table td { border: 1px solid #E3E9F0; padding: 10px 14px; text-align: left; vertical-align: middle; }
.firm-table th { background: #F0F5FB; color: #004080; }
.firm-table tr:hover td { background: #F7FAFD; }
.firm-table .addr { font-size: 13px; color: #55677A; line-height: 1.5; }
/* 机构名称、负责人、电话列：单行显示，宽度随内容自适应 */
.firm-table th:nth-child(1), .firm-table td:nth-child(1),
.firm-table th:nth-child(2), .firm-table td:nth-child(2),
.firm-table th:nth-child(3), .firm-table td:nth-child(3) { white-space: nowrap; }
/* 地址列占剩余宽度，内容多时自动换行 */
.firm-table th:nth-child(4), .firm-table td:nth-child(4) { width: 55%; }

/* 详情 */
.detail-panel { background: #fff; border: 1px solid #E3E9F0; border-radius: 6px; padding: 26px; }
.detail-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.detail-head h1 { font-size: 26px; color: #004080; }
.detail-firm { color: #CF9117; font-size: 15px; }
.detail-tags { margin-top: 6px; }
.tag {
  display: inline-block; background: #F0F5FB; color: #004080;
  border: 1px solid #D5E2F0; border-radius: 3px; padding: 2px 8px; margin-right: 6px; font-size: 12px;
}
.info-table th {
  width: auto;
  text-align: right; color: #55677A; font-weight: 400;
  border-bottom: 1px dashed #E3E9F0; padding: 8px 14px 8px 0; vertical-align: top;
  white-space: nowrap;
}
.info-table td { border-bottom: 1px dashed #E3E9F0; padding: 8px 0; }
.detail-section { margin-top: 22px; }
.detail-section h3 { color: #004080; border-left: 4px solid #CF9117; padding-left: 10px; margin-bottom: 10px; }
.rich-text { color: #2E3A45; }
.source-note { color: #98A4B3; font-size: 12px; margin-top: 10px; }

/* 分页 */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 18px; }
.pagination a {
  padding: 6px 12px; border: 1px solid #C9D6E4; border-radius: 4px; background: #fff; color: #004080;
}
.pagination a.active { background: #004080; color: #fff; border-color: #004080; }
.pagination .total { align-self: center; color: #98A4B3; font-size: 13px; margin-left: 8px; }

/* 页脚 */
.site-footer { background: #003366; color: #CFE0F3; margin-top: 20px; }
.site-footer .container { padding-top: 22px; padding-bottom: 22px; }
.footer-links a { color: #CFE0F3; margin-right: 16px; }
.footer-links a:hover { color: #FFD77A; }
.footer-title { color: #8FA9C8; margin-right: 6px; }
.footer-copy { color: #8FA9C8; font-size: 12px; margin-top: 10px; }

/* 后台 */
.admin-body { background: #EEF2F7; }
.admin-nav { background: #004080; }
.admin-nav .container { display: flex; align-items: center; gap: 4px; }
.admin-nav a { color: #fff; padding: 12px 18px; display: inline-block; }
.admin-nav a:hover, .admin-nav a.active { background: #003366; color: #FFD77A; }
.admin-nav .admin-brand { font-weight: 700; margin-right: 14px; font-size: 16px; color: #FFD77A; }
.login-wrap { max-width: 380px; margin: 80px auto; background: #fff; border-radius: 8px; padding: 30px; box-shadow: 0 6px 24px rgba(0,64,128,.12); }
.login-wrap h1 { text-align: center; color: #004080; margin-bottom: 20px; font-size: 22px; }
.form-item { margin-bottom: 14px; }
.form-item label { display: block; margin-bottom: 5px; color: #55677A; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%; padding: 9px 12px; border: 1px solid #C9D6E4; border-radius: 4px; font-size: 14px; font-family: inherit;
}
.form-item textarea { min-height: 90px; }
.btn {
  display: inline-block; padding: 9px 20px; background: #004080; color: #fff; border: 0; border-radius: 4px; cursor: pointer; font-size: 14px;
}
.btn:hover { background: #0066B3; }
.btn.warn { background: #B3442C; }
.btn.warn:hover { background: #C9553C; }
.btn-plain { background: #fff; color: #004080; border: 1px solid #C9D6E4; }
.btn-plain:hover { background: #F0F5FB; }
.msg { padding: 10px 14px; border-radius: 4px; margin-bottom: 14px; }
.msg.ok { background: #EAF7EF; color: #2E7D4F; border: 1px solid #BFE3CD; }
.msg.err { background: #FDF0EE; color: #B3442C; border: 1px solid #F2C9C0; }
.admin-table { background: #fff; border: 1px solid #E3E9F0; border-radius: 6px; padding: 18px; margin-bottom: 20px; }
.admin-table table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { border: 1px solid #E3E9F0; padding: 8px 10px; text-align: left; }
.admin-table th { background: #F0F5FB; color: #004080; }
.admin-table .actions a { margin-right: 10px; }
.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.admin-toolbar h2 { color: #004080; }

/* 后台编辑表单：分组卡片 + 双列栅格 */
.form-section { background: #fff; border: 1px solid #E3E9F0; border-radius: 6px; padding: 18px 20px; margin-bottom: 16px; }
.form-section h3 { margin: 0 0 14px; font-size: 15px; color: #004080; border-left: 3px solid #004080; padding-left: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; margin: 6px 0 20px; }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .lawyer-cards, .firm-cards { grid-template-columns: repeat(2, 1fr); }
  .all-entry { grid-template-columns: 1fr; }
  .brand-logo { height: 48px; }
  .brand-name { font-size: 20px; }
}
