/* ============ 公司成功案例库 · 全局样式 ============ */
:root {
  --bg: #f4f6fa;
  --panel: #ffffff;
  --text: #16233a;
  --text-2: #46536b;
  --muted: #7b879c;
  --line: #e4e9f2;
  --line-2: #eef2f8;
  --brand: #1d4ed8;
  --brand-2: #3b82f6;
  --brand-soft: #eef4ff;
  --ok: #0f9d63;
  --warn: #d97706;
  --danger: #dc2626;
  --shadow-xs: 0 1px 2px rgba(21, 40, 80, .05);
  --shadow-sm: 0 2px 8px rgba(21, 40, 80, .06);
  --shadow-md: 0 8px 28px rgba(21, 40, 80, .10);
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --maxw: 1320px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.hide { display: none !important; }

/* ---------------- Header ---------------- */
.hd {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.hd-in { display: flex; align-items: center; gap: 20px; height: 62px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; letter-spacing: -.02em; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(135deg, #1d4ed8, #38bdf8);
  color: #fff; display: grid; place-items: center; font-size: 15px;
  box-shadow: 0 4px 12px rgba(29, 78, 216, .28);
}
.logo small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0; line-height: 1.2; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a {
  padding: 7px 13px; border-radius: 999px; color: var(--text-2); font-weight: 600; font-size: 13.5px;
  transition: .16s;
}
.nav a:hover { background: var(--line-2); color: var(--text); }
.nav a.on { background: var(--brand-soft); color: var(--brand); }
.spacer { flex: 1; }

.user-menu { position: relative; }
.user-btn {
  display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  transition: .16s;
}
.user-btn:hover { border-color: #cfd9ea; box-shadow: var(--shadow-xs); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #2563eb, #60a5fa); color: #fff; font-size: 12.5px; font-weight: 700;
}
.user-btn .nm { font-weight: 600; font-size: 13px; }
.role-tag { font-size: 11px; padding: 1px 7px; border-radius: 5px; font-weight: 700; }
.role-admin { background: #fef3c7; color: #92400e; }
.role-editor { background: #dbeafe; color: #1e40af; }
.role-viewer { background: #e5e7eb; color: #4b5563; }
.drop {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 190px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-md); padding: 6px; display: none;
}
.drop.on { display: block; }
.drop a, .drop button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none;
  border-radius: 8px; cursor: pointer; font-size: 13.5px; color: var(--text-2);
}
.drop a:hover, .drop button:hover { background: var(--line-2); color: var(--text); }
.drop .sep { height: 1px; background: var(--line); margin: 5px 4px; }

/* ---------------- Hero ---------------- */
.hero { padding: 34px 0 8px; }
.hero h1 { font-size: 28px; line-height: 1.3; }
.hero .sub { color: var(--text-2); margin-top: 8px; font-size: 14.5px; }
.stats { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 18px; min-width: 108px; box-shadow: var(--shadow-xs);
}
.stat b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--muted); }

.searchbar {
  display: flex; align-items: center; gap: 10px; margin-top: 18px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 6px 6px 6px 14px;
  box-shadow: var(--shadow-xs); max-width: 620px;
}
.searchbar input { flex: 1; border: 0; outline: 0; background: none; font-size: 14.5px; padding: 8px 0; }

/* ---------------- 通用组件 ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 8px 15px; border-radius: 9px; border: 1px solid var(--line); background: #fff;
  cursor: pointer; font-weight: 600; font-size: 13.5px; transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: #c8d3e6; background: #fafbfd; }
.btn.pri { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.pri:hover { background: #1a45c4; border-color: #1a45c4; }
.btn.danger { color: var(--danger); border-color: #f5c9c9; background: #fff5f5; }
.btn.danger:hover { background: #ffe9e9; }
.btn.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; outline: 0; transition: .15s; font-size: 13.5px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(59, 130, 246, .13);
}
.field textarea { min-height: 92px; resize: vertical; line-height: 1.65; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); }
.panel-hd { padding: 16px 20px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.panel-hd h2 { font-size: 15.5px; }
.panel-hd .desc { font-size: 12.5px; color: var(--muted); }
.panel-bd { padding: 20px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--text-2); border: 1px solid transparent;
}
.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty .ico { font-size: 34px; opacity: .5; }

/* ---------------- 地图 ---------------- */
.map-section { padding: 26px 0 10px; }
.map-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 1000px) { .map-grid { grid-template-columns: 1fr; } }

.map-card { padding: 18px 18px 8px; }
.map-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.map-head h3 { font-size: 16.5px; }
.map-head .cnt { font-size: 12.5px; color: var(--muted); }
.map-wrap { position: relative; }
.map-svg { width: 100%; height: auto; display: block; touch-action: manipulation; }

.city-path {
  fill: #e9eff8; stroke: #ffffff; stroke-width: 1.1;
  transition: fill .16s, transform .16s; cursor: pointer; vector-effect: non-scaling-stroke;
}
.city-path:hover { fill: #cadcf7; }
.city-path.has { fill: #dbe7fb; }
.city-path.has:hover { fill: #bcd5f8; }
.city-path.dim { opacity: .32; }
.city-path.active { fill: #93b8f2; }
.city-lab {
  font-size: 13px; font-weight: 600; fill: #2c3e5c; pointer-events: none;
  paint-order: stroke; stroke: rgba(255, 255, 255, .92); stroke-width: 3.2px; stroke-linejoin: round;
}
.city-dot { pointer-events: none; }
.ocean { fill: #ffffff; }

.map-tip {
  position: absolute; z-index: 20; min-width: 176px; max-width: 250px; pointer-events: none;
  background: rgba(19, 32, 54, .95); color: #fff; border-radius: 10px; padding: 10px 12px;
  box-shadow: var(--shadow-md); opacity: 0; transform: translate(-50%, -112%) scale(.96);
  transition: opacity .12s, transform .12s; font-size: 12.5px; line-height: 1.55;
}
.map-tip.on { opacity: 1; transform: translate(-50%, -118%) scale(1); }
.map-tip b { font-size: 14px; display: block; margin-bottom: 3px; }
.map-tip .kv { color: #b9c8e2; }
.map-tip .mk { color: #8fdcff; font-weight: 600; }
.map-tip::after {
  content: ''; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px;
  transform: translateX(-50%) rotate(45deg); background: rgba(19, 32, 54, .95);
}

.legend { display: flex; flex-wrap: wrap; gap: 6px 8px; padding: 6px 0 14px; }
.legend button {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 12px; font-weight: 600;
  color: var(--text-2); transition: .14s;
}
.legend button:hover { border-color: #c8d3e6; }
.legend button.on { background: var(--brand-soft); border-color: #bfd4f7; color: var(--brand); }
.legend .dot { width: 8px; height: 8px; border-radius: 50%; }

.city-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 14px; }
.city-quick a {
  padding: 4px 11px; border-radius: 8px; border: 1px solid var(--line); background: #fbfcfe;
  font-size: 12.5px; font-weight: 600; color: var(--text-2); transition: .14s;
}
.city-quick a:hover { border-color: var(--brand-2); color: var(--brand); background: var(--brand-soft); }
.city-quick a.off { opacity: .42; }

/* ---------------- 城市页 ---------------- */
.crumb { padding: 20px 0 0; font-size: 13px; color: var(--muted); }
.crumb a:hover { color: var(--brand); }
.city-head { display: flex; align-items: flex-start; gap: 16px; padding: 18px 0 6px; flex-wrap: wrap; }
.city-head h1 { font-size: 26px; }
.city-head .meta { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; padding: 6px 0 8px; }

.case-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px 14px;
  display: flex; flex-direction: column; gap: 9px; cursor: pointer; transition: .18s;
  box-shadow: var(--shadow-xs); position: relative; overflow: hidden;
}
.case-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--ind, var(--brand));
  opacity: .85;
}
.case-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #d3deee; }
.case-card h3 { font-size: 15px; line-height: 1.45; }
.case-card .client { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.case-card .sum {
  font-size: 13px; color: var(--text-2); line-height: 1.62; display: -webkit-box;
  -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.case-card .foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; font-size: 12px; color: var(--muted); }
.badge { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }

/* 行业导航条 */
.ind-nav {
  position: sticky; top: 62px; z-index: 40; margin: 8px 0 18px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px;
  display: flex; gap: 4px; overflow-x: auto; box-shadow: var(--shadow-xs);
}
.ind-nav::-webkit-scrollbar { height: 0; }
.ind-nav button {
  flex: 0 0 auto; border: 0; background: none; cursor: pointer; padding: 7px 14px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; color: var(--text-2); transition: .15s; white-space: nowrap;
}
.ind-nav button:hover { background: var(--line-2); }
.ind-nav button.on { background: var(--brand); color: #fff; }

/* ---------------- 案例详情 ---------------- */
.detail-wrap { display: grid; grid-template-columns: 1fr 296px; gap: 22px; padding: 8px 0 40px; align-items: start; }
@media (max-width: 980px) { .detail-wrap { grid-template-columns: 1fr; } }
.doc h1 { font-size: 25px; line-height: 1.4; }
.doc-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 4px; }
.doc-sec { margin-top: 26px; }
.doc-sec h2 { font-size: 15.5px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.doc-sec h2::before { content: ''; width: 3px; height: 15px; border-radius: 2px; background: var(--brand); }
.doc-sec p { margin: 0 0 10px; color: var(--text-2); line-height: 1.8; white-space: pre-wrap; }
.doc-sec ol { margin: 0; padding-left: 20px; color: var(--text-2); line-height: 1.85; }
.att li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fbfcfe; }
.side-panel { position: sticky; top: 82px; }
.kv-list { display: grid; gap: 12px; }
.kv-list .k { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.kv-list .v { font-weight: 600; font-size: 14px; }

/* ---------------- 登录 ---------------- */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(1200px 500px at 20% -10%, #e6efff 0%, transparent 60%), var(--bg); }
.login-box { width: 100%; max-width: 390px; }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow-md); }
.login-card h1 { font-size: 22px; }
.err { background: #fff1f1; border: 1px solid #f8cfcf; color: #b91c1c; padding: 9px 12px; border-radius: 9px; font-size: 13px; margin-top: 12px; }
.login-tip { margin-top: 16px; background: #fff; border: 1px dashed #d7e0ef; border-radius: var(--r); padding: 12px 14px; font-size: 12.5px; color: var(--text-2); line-height: 1.7; }
.login-tip code { background: var(--brand-soft); color: var(--brand); padding: 1px 6px; border-radius: 5px; font-weight: 700; }

/* ---------------- 后台 ---------------- */
.admin-wrap { display: grid; grid-template-columns: 210px 1fr; gap: 22px; padding: 22px 0 50px; align-items: start; }
@media (max-width: 900px) { .admin-wrap { grid-template-columns: 1fr; } }
.side-nav { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px; position: sticky; top: 78px; }
.side-nav button {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 12px; border: 0; background: none;
  border-radius: 9px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--text-2); text-align: left;
}
.side-nav button:hover { background: var(--line-2); }
.side-nav button.on { background: var(--brand-soft); color: var(--brand); }
.side-nav .grp { font-size: 11px; color: var(--muted); padding: 12px 12px 6px; font-weight: 700; letter-spacing: .04em; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; padding: 10px 14px; background: #fafbfd; color: var(--muted); font-size: 12px;
  font-weight: 700; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #fbfcfe; }
.sw { width: 38px; height: 22px; border-radius: 999px; background: #d5dce8; position: relative; cursor: pointer; border: 0; transition: .18s; flex: 0 0 auto; }
.sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .18s; box-shadow: var(--shadow-xs); }
.sw.on { background: var(--brand); }
.sw.on::after { left: 18px; }
.sw.off { background: #e6b3b3; }
.sw.off::after { left: 2px; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 25, 45, .45); backdrop-filter: blur(2px);
  display: none; place-items: center; z-index: 100; padding: 20px;
}
.modal-mask.on { display: grid; }
.modal {
  background: #fff; border-radius: var(--r-lg); width: 100%; max-width: 620px; max-height: 88vh;
  display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(15, 30, 60, .3); animation: pop .18s ease-out;
}
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.modal.wide { max-width: 780px; }
.modal-hd { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-hd h3 { font-size: 16px; }
.modal-bd { padding: 20px 22px; overflow: auto; flex: 1; }
.modal-ft { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.x-btn { border: 0; background: none; cursor: pointer; font-size: 20px; color: var(--muted); line-height: 1; padding: 4px 8px; border-radius: 8px; }
.x-btn:hover { background: var(--line-2); color: var(--text); }

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 18px); z-index: 200;
  background: #16233a; color: #fff; padding: 11px 20px; border-radius: 10px; font-size: 13.5px;
  box-shadow: var(--shadow-md); opacity: 0; transition: .2s; pointer-events: none;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.pager { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px 0 4px; }
.pager button { border: 1px solid var(--line); background: #fff; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; }
.pager button:hover { border-color: #c8d3e6; }
.pager button:disabled { opacity: .45; cursor: not-allowed; }
.pager .num { font-size: 13px; color: var(--muted); }

.notice-bar {
  background: linear-gradient(90deg, #fff8e6, #fffdf5); border: 1px solid #f5e2b8; color: #8a6212;
  border-radius: var(--r); padding: 9px 16px; font-size: 13px; margin-top: 16px; display: flex; align-items: center; gap: 8px;
}
.ft { padding: 30px 0 40px; color: var(--muted); font-size: 12.5px; text-align: center; }
.ft .ln { height: 1px; background: var(--line); margin-bottom: 18px; }

/* ---- 客户档案表（模板目录式 两栏表格） ---- */
.ptable { border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.prow { display: grid; grid-template-columns: 130px 1fr; border-top: 1px solid var(--line-2); }
.prow:first-child { border-top: none; }
.prow:nth-child(odd) { background: #fafbfc; }
.pk { padding: 10px 14px; font-size: 13px; color: var(--muted); border-right: 1px solid var(--line-2); background: #f7f8fa; }
.pv { padding: 10px 14px; font-size: 13.5px; color: var(--text-2); line-height: 1.6; word-break: break-all; }

/* ---- 可搜索行业选择器 ---- */
.combo { position: relative; }
.combo-list { display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  z-index: 120; max-height: 260px; overflow-y: auto; padding: 4px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-md); }
.combo-list.open { display: block; }
.combo-item { padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer;
  font-size: 14px; color: var(--text-2); }
.combo-item:hover, .combo-item.on { background: var(--brand-soft); color: var(--brand); }
.combo-empty { padding: 14px 10px; text-align: center; color: var(--muted); font-size: 13px; }
