/* ============================================================
   海洋院测绘成果管理系统 · 设计系统
   原则：专业、克制、干净、留白、秩序感
   禁止：渐变背景 / 彩色阴影 / 斑马纹 / emoji 图标 / 弹跳动效
   ============================================================ */

:root {
  /* 主色（海洋蓝） */
  --primary: #1B5E8C;
  --primary-hover: #164E75;
  --primary-soft: #E8F1F8;
  /* 辅助色（测绘青） */
  --accent: #2E8B8B;
  /* 中性色 */
  --bg: #F5F7FA;
  --card: #FFFFFF;
  --divider: #E4E7ED;
  --text: #1F2D3D;
  --text-2: #5E6D82;
  --text-3: #B0BAC5;
  --border-input: #D0D5DD;
  /* 语义色 */
  --success: #3BA776;
  --warning: #E6A23C;
  --danger: #D9534F;
  --info: #1B5E8C;
  /* 深色侧边栏 */
  --sidebar-bg: #1F2D3D;
  --sidebar-text: #E4E7ED;
  --sidebar-text-dim: rgba(228, 231, 237, .72);
  /* 圆角 */
  --r-card: 8px;
  --r-ctl: 6px;
  --r-tag: 4px;
  /* 阴影 */
  --sh-card: 0 1px 4px rgba(0, 0, 0, .06);
  --sh-modal: 0 4px 16px rgba(0, 0, 0, .12);
  --sh-menu: 0 2px 8px rgba(0, 0, 0, .08);
  /* 布局 */
  --sidebar-w: 220px;
  --topbar-h: 56px;
  --footer-h: 30px;
  /* 动效 */
  --t: .2s ease-in-out;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", "Roboto", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  padding-left: var(--sidebar-w);
  padding-bottom: var(--footer-h);
  transition: padding-left var(--t);
  -webkit-font-smoothing: antialiased;
}
body.login-page { padding-left: 0; padding-bottom: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
h1 { font-size: 24px; font-weight: 600; line-height: 1.6; margin: 0 0 16px; }
h2 { font-size: 20px; font-weight: 600; line-height: 1.6; margin: 0 0 16px; }
h3 { font-size: 16px; font-weight: 600; line-height: 1.6; margin: 0 0 16px; }
p { margin: 0 0 12px; }
b, strong { font-weight: 600; }

/* 滚动条：细、中性 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #D3D8DF; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }
::-webkit-scrollbar-track { background: transparent; }

/* 图标 */
svg.icon { display: inline-block; vertical-align: -.15em; flex: none; }
svg.icon.ok { color: var(--success); }
svg.icon.no { color: var(--text-3); }
.icon-slot { display: inline-flex; align-items: center; }

/* ============ 侧边栏 ============ */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
  background: var(--sidebar-bg); color: var(--sidebar-text);
  display: flex; flex-direction: column; z-index: 1100;
  transition: width var(--t);
}
.side-brand {
  height: var(--topbar-h); display: flex; align-items: center; gap: 9px;
  padding: 0 14px; border-bottom: 1px solid rgba(228, 231, 237, .12);
  font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--sidebar-text);
}
.side-brand img { width: 26px; height: 26px; object-fit: contain; flex: none; }
.side-nav { padding: 12px 0; flex: 1; overflow-y: auto; }
.side-item {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px;
  color: var(--sidebar-text-dim); font-size: 14px; border-left: 3px solid transparent;
  transition: background var(--t), color var(--t);
}
.side-item:hover { background: rgba(255, 255, 255, .06); color: var(--sidebar-text); text-decoration: none; }
.side-item.active {
  background: rgba(27, 94, 140, .15); border-left-color: var(--primary);
  color: var(--sidebar-text); font-weight: 600;
}
.side-foot {
  padding: 14px 16px; border-top: 1px solid rgba(228, 231, 237, .12);
  display: flex; align-items: center; gap: 10px;
}
.side-user { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.side-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: rgba(27, 94, 140, .35); color: var(--sidebar-text);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
}
.side-user b { display: block; font-size: 13px; font-weight: 600; color: var(--sidebar-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user small { display: block; font-size: 12px; color: var(--sidebar-text-dim); }
.side-logout {
  background: none; border: none; color: var(--sidebar-text-dim); cursor: pointer;
  padding: 6px; border-radius: var(--r-ctl); display: inline-flex; transition: all var(--t);
}
.side-logout:hover { background: rgba(255, 255, 255, .08); color: var(--sidebar-text); }

/* 收起态 */
body.nav-collapsed { --sidebar-w: 64px; }
body.nav-collapsed .side-label { display: none; }
body.nav-collapsed .side-brand { justify-content: center; padding: 0; }
body.nav-collapsed .side-item { justify-content: center; padding: 0; }
body.nav-collapsed .side-user { justify-content: center; }
body.nav-collapsed .side-foot { flex-direction: column; gap: 8px; padding: 12px 0; }

/* ============ 顶栏 ============ */
.topbar {
  position: fixed; top: 0; left: var(--sidebar-w); right: 0; height: var(--topbar-h);
  background: #fff; border-bottom: 1px solid var(--divider);
  display: flex; align-items: center; gap: 12px; padding: 0 24px; z-index: 1000;
  transition: left var(--t);
}
.topbar-title { font-size: 16px; font-weight: 600; color: var(--text); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar-user { font-size: 13px; color: var(--text-2); }
.icon-btn {
  background: none; border: 1px solid transparent; color: var(--text-2); cursor: pointer;
  width: 32px; height: 32px; border-radius: var(--r-ctl); display: inline-flex;
  align-items: center; justify-content: center; transition: all var(--t);
}
.icon-btn:hover { background: var(--bg); color: var(--text); }

/* ============ 主内容区 ============ */
.container { margin-top: var(--topbar-h); padding: 24px 24px calc(24px + var(--footer-h)); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 20px; }

/* ============ 底部状态栏 ============ */
.app-footer {
  position: fixed; left: var(--sidebar-w); right: 0; bottom: 0; height: var(--footer-h);
  display: flex; align-items: center; justify-content: flex-end; padding: 0 24px;
  background: #fff; border-top: 1px solid var(--divider);
  font-size: 12px; color: var(--text-2); letter-spacing: .2px;
  z-index: 960; transition: left var(--t);
}
.login-page .app-footer {
  left: 0; background: transparent; border-top: none; color: rgba(228, 231, 237, .55);
}

/* ============ 卡片 ============ */
.card {
  background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh-card);
  padding: 20px; margin-bottom: 16px;
}
.card:last-child { margin-bottom: 0; }
.card-title, .card > h2, .card > h3 { font-size: 16px; font-weight: 600; margin: 0 0 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.card-head .card-title { margin: 0; }
.card + .card { margin-top: 0; }

/* ============ 栅格 / 工具类 ============ */
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 120px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.muted { color: var(--text-2); }
.fs12 { font-size: 12px; }
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.mb0 { margin-bottom: 0; }
.hidden { display: none !important; }
.table-wrap { overflow-x: auto; }

/* ============ 表单 ============ */
label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
/* 所有文本类输入控件（含未写 type 属性的 <input>）统一尺寸 */
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=submit]):not([type=button]):not([type=color]):not([type=image]),
textarea, select {
  width: 100%; height: 40px; padding: 0 14px; border: 1px solid var(--border-input);
  border-radius: var(--r-ctl); font-size: 14px; font-family: inherit; color: var(--text);
  background: #fff; transition: border-color var(--t), box-shadow var(--t);
}
textarea { height: auto; min-height: 104px; padding: 10px 14px; resize: vertical; line-height: 1.6; }
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235E6D82' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 34px;
}
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):hover,
textarea:hover, select:hover { border-color: var(--text-3); }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):focus,
textarea:focus, select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(27, 94, 140, .12);
}
input:disabled, select:disabled, textarea:disabled { background: var(--bg); color: var(--text-3); cursor: not-allowed; }
input[type=file] { width: 100%; height: auto; padding: 6px 0; border: none; font-size: 13px; color: var(--text-2); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.form-group { margin-bottom: 20px; }
.form-group:last-child { margin-bottom: 0; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 18px; border: 1px solid var(--border-input);
  border-radius: var(--r-ctl); background: #fff; color: var(--text);
  font-size: 14px; font-family: inherit; cursor: pointer; white-space: nowrap;
  transition: all var(--t);
}
.btn:hover { background: var(--bg); border-color: var(--text-3); color: var(--text); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-danger { color: var(--danger); border-color: #E7C0BE; background: #fff; }
.btn-danger:hover { background: #FBF0EF; border-color: var(--danger); color: var(--danger); }
.btn-text { border-color: transparent; background: none; color: var(--primary); padding: 0 8px; }
.btn-text:hover { background: var(--primary-soft); border-color: transparent; }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ============ 表格 ============ */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; border-bottom: 1px solid var(--divider); padding: 0 16px; height: 48px; vertical-align: middle; }
th { background: var(--bg); color: var(--text-2); font-size: 13px; font-weight: 500; white-space: nowrap; }
td { font-size: 14px; color: var(--text); }
tbody tr { transition: background var(--t); }
tbody tr:hover { background: var(--bg); }
tr:last-child td { border-bottom: none; }

/* ============ 徽章 / 标签 ============ */
.badge {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--r-tag);
  font-size: 12px; font-weight: 500; line-height: 1.6; white-space: nowrap;
}
.badge-blue { background: var(--primary-soft); color: var(--primary); }
.badge-green { background: #EAF6F0; color: #2F8A60; }
.badge-orange { background: #FBF1E0; color: #B97A17; }
.badge-red { background: #FBECEB; color: #C24741; }
.badge-gray { background: #F0F2F5; color: var(--text-2); }
.team-badge { display: inline-block; padding: 2px 8px; border-radius: var(--r-tag); background: var(--primary-soft); color: var(--primary); font-size: 12px; }
/* 密级标签：公开绿 / 内部蓝 / 秘密橙 / 机密红 */
.sec-public { background: #EAF6F0; color: #2F8A60; }
.sec-internal { background: var(--primary-soft); color: var(--primary); }
.sec-secret { background: #FBF1E0; color: #B97A17; }
.sec-confidential { background: #FBECEB; color: #C24741; }

/* ============ 统计卡片 ============ */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat-card { background: #fff; border-radius: var(--r-card); box-shadow: var(--sh-card); padding: 20px; }
.stat-card .stat-num { font-size: 28px; font-weight: 700; line-height: 1.2; color: var(--text); }
.stat-card .stat-label { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.stat-card .stat-foot { font-size: 12px; color: var(--text-3); margin-top: 8px; }
.stat-card.stat-green .stat-num { color: var(--success); }
.stat-card.stat-teal .stat-num { color: var(--accent); }
.stat-card.stat-orange .stat-num { color: var(--warning); }
.stat-card.stat-gray .stat-num { color: var(--text-2); }
.stat-card .stat-icon { float: right; color: var(--text-3); }

/* ============ 空状态 ============ */
.empty { color: var(--text-3); text-align: center; padding: 40px 20px; font-size: 13px; }
.empty .empty-icon { display: block; margin: 0 auto 10px; color: #D3D8DF; }

/* ============ 文件列表 / 面包屑 ============ */
.file-list { border: 1px solid var(--divider); border-radius: var(--r-ctl); overflow: hidden; }
.file-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--divider); transition: background var(--t); }
.file-item:last-child { border-bottom: none; }
.file-item:hover { background: var(--bg); }
.file-icon { color: var(--text-2); display: inline-flex; flex: none; }
.breadcrumb { font-size: 13px; color: var(--text-2); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumb a { cursor: pointer; }

/* ============ 标签页 ============ */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--divider); margin-bottom: 16px; }
.tabs button {
  background: none; border: none; border-bottom: 2px solid transparent; padding: 0 18px; height: 44px;
  font-size: 14px; font-family: inherit; color: var(--text-2); cursor: pointer; transition: all var(--t);
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(31, 45, 61, .45);
  display: flex; align-items: center; justify-content: center; z-index: 2000;
}
.modal {
  background: #fff; border-radius: var(--r-card); box-shadow: var(--sh-modal);
  width: 680px; max-width: 94vw; max-height: 92vh; overflow: auto; padding: 24px;
  animation: modalIn var(--t);
}
.modal h3 { margin: 0 0 20px; font-size: 16px; font-weight: 600; }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 结构化弹窗：头部 / 主体 / 底部 */
.modal-structured { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.modal-lg { width: 780px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 24px; border-bottom: 1px solid var(--divider); flex: none;
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-head .icon-btn { margin-right: -8px; }
.modal-body { padding: 24px; overflow-y: auto; flex: 1 1 auto; }
.modal-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 14px 24px; border-top: 1px solid var(--divider); background: #fff; flex: none;
}
.modal-foot .btn { min-width: 88px; }
/* 弹窗内分节表单 */
.form-section { margin-bottom: 24px; }
.form-section:last-child { margin-bottom: 0; }
.form-section-title {
  display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  color: var(--text-2); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--divider);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.form-grid .form-group { margin-bottom: 18px; }
.form-group label em { font-style: normal; color: var(--danger); margin-left: 2px; }
.form-hint {
  display: flex; align-items: flex-start; gap: 6px; margin-top: 10px;
  font-size: 12px; color: var(--text-3); line-height: 1.6;
}
.form-hint svg.icon { margin-top: 2px; flex: none; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

/* ============ 提示 ============ */
#toast { position: fixed; top: calc(var(--topbar-h) + 16px); right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 8px; background: #fff; color: var(--text);
  border: 1px solid var(--divider); border-left: 3px solid var(--info);
  padding: 10px 16px; border-radius: var(--r-card); font-size: 14px; box-shadow: var(--sh-modal);
  opacity: 0; transform: translateX(12px); transition: all var(--t); max-width: 380px;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast.success { border-left-color: var(--success); }
.toast.success svg.icon { color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.error svg.icon { color: var(--danger); }

/* ============ 登录页（设计图铺满背景 + 自适应内容） ============ */
.login-page { background: #04121F; padding: 0; }
.login-stage {
  position: fixed; inset: 0; overflow: hidden;
  background: #04121F url('/assets/login-bg.jpg') center center / cover no-repeat;
}
/* 压暗四角与左侧，保证文字与卡片可读 */
.login-stage::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 18, 38, .74) 0%, rgba(4, 18, 38, .38) 36%, rgba(4, 18, 38, .06) 62%, rgba(4, 18, 38, .34) 100%),
    linear-gradient(180deg, rgba(4, 18, 38, .5) 0%, rgba(4, 18, 38, 0) 20%, rgba(4, 18, 38, 0) 76%, rgba(4, 18, 38, .58) 100%);
}
.login-top {
  position: absolute; top: 0; left: 0; right: 0; height: 68px; z-index: 3;
  display: flex; align-items: center; gap: 12px; padding: 0 34px;
  color: #EAF4FC; font-size: 16px; letter-spacing: .6px;
  border-bottom: 1px solid rgba(150, 200, 230, .16);
}
.login-top-logo { width: 32px; height: 32px; object-fit: contain; }
.login-body {
  position: relative; z-index: 2; height: 100%;
  display: grid; grid-template-columns: 1fr 430px; gap: 56px; align-items: center;
  max-width: 1680px; margin: 0 auto; padding: 96px 150px 84px 64px;
}
.login-left { min-width: 0; }
.login-title {
  font-size: clamp(30px, 3.3vw, 54px); font-weight: 700; line-height: 1.25;
  letter-spacing: clamp(1px, .25vw, 4px); color: #FFFFFF; margin: 0 0 18px;
  text-shadow: 0 4px 36px rgba(40, 150, 210, .55);
}
.login-sub { font-size: clamp(13px, 1vw, 17px); letter-spacing: 1px; color: rgba(215, 235, 250, .8); margin: 0; }
.login-card {
  background: linear-gradient(180deg, rgba(252, 254, 255, .97) 0%, rgba(232, 242, 252, .96) 100%);
  border-radius: 12px; padding: 42px 40px 32px;
  box-shadow: 0 24px 60px rgba(0, 10, 25, .5), inset 0 0 0 1px rgba(140, 200, 235, .28);
}
.login-card h2 { font-size: 26px; font-weight: 700; letter-spacing: 1px; color: #10314F; margin: 0 0 30px; }
.login-card .field { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.login-card .field label { width: 46px; flex: none; margin: 0; font-size: 14px; font-weight: 500; color: #10314F; }
.login-card .field input { height: 42px; background: #F4F8FD; border-color: #E2EBF5; color: #10314F; }
.login-card .field input::placeholder { color: #9DB0C4; }
.login-card .field input:focus { border-color: #2FB6D9; background: #fff; box-shadow: 0 0 0 2px rgba(47, 182, 217, .15); }
.btn-login {
  width: 100%; height: 52px; margin-top: 10px; border: none; border-radius: 999px; cursor: pointer;
  color: #fff; font-size: 18px; letter-spacing: 8px; font-family: inherit;
  background: linear-gradient(90deg, #35D3B4 0%, #35B6E8 58%, #3D9DF0 100%);
  box-shadow: 0 10px 26px rgba(56, 183, 232, .38);
  transition: filter var(--t), transform var(--t);
}
.btn-login:hover { filter: brightness(1.06); }
.btn-login:active { transform: translateY(1px); }
.btn-login:disabled { opacity: .7; cursor: not-allowed; }
.forgot { display: block; text-align: center; margin-top: 16px; font-size: 13px; color: #4A6C8C; }
.forgot:hover { color: #2FB6D9; }
.login-error { color: #D9534F; font-size: 13px; margin-top: 12px; min-height: 18px; text-align: center; }
.login-copy { position: fixed; left: 34px; bottom: 20px; z-index: 3; color: rgba(200, 225, 240, .5); font-size: 12px; line-height: 1.7; }
.login-copy .ver { color: rgba(225, 240, 250, .78); font-size: 13px; letter-spacing: 1px; }
.login-page .app-footer { left: 0; background: transparent; border-top: none; color: rgba(200, 225, 240, .42); }

@media (max-width: 1100px) {
  .login-body { grid-template-columns: 1fr; gap: 26px; padding: 92px 24px 76px; justify-items: center; align-content: center; }
  .login-left { text-align: center; }
  .login-title { font-size: 28px; letter-spacing: 1px; margin-bottom: 10px; }
  .login-sub { font-size: 13px; }
  .login-card { width: 400px; max-width: 92vw; padding: 34px 28px 26px; }
  .login-card h2 { font-size: 22px; margin-bottom: 24px; }
  .login-card .field { gap: 12px; margin-bottom: 20px; }
  .login-card .field label { width: 44px; font-size: 14px; }
  .login-card .field input { height: 42px; padding: 0 14px; font-size: 14px; }
  .btn-login { height: 50px; margin-top: 8px; font-size: 17px; letter-spacing: 6px; }
  .login-copy { left: 50%; transform: translateX(-50%); text-align: center; bottom: 12px; }
}

/* ============ 地图页 ============ */
#map { position: fixed; top: var(--topbar-h); left: var(--sidebar-w); right: 0; bottom: var(--footer-h); background: var(--bg); z-index: 1; transition: left var(--t); }
.proj-label {
  background: transparent !important; border: none !important; box-shadow: none !important;
  font-size: 12px; font-weight: 600; color: var(--primary-hover); white-space: nowrap;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 4px #fff;
}
.proj-label::before { display: none !important; }
/* Leaflet 控件：中性灰 */
.leaflet-bar { border: 1px solid var(--divider) !important; border-radius: var(--r-ctl) !important; box-shadow: var(--sh-menu) !important; overflow: hidden; }
.leaflet-bar a { color: var(--text-2) !important; background: #fff !important; border-bottom: 1px solid var(--divider) !important; }
.leaflet-bar a:hover { background: var(--bg) !important; color: var(--text) !important; }
.leaflet-control-attribution { background: rgba(255, 255, 255, .8) !important; color: var(--text-3) !important; font-size: 11px !important; }
.leaflet-control-attribution a { color: var(--text-2) !important; }
.leaflet-popup-content-wrapper { border-radius: var(--r-card) !important; box-shadow: var(--sh-modal) !important; }
.leaflet-popup-content { margin: 14px 16px; font-size: 13px; line-height: 1.7; color: var(--text); }
.leaflet-popup-content h4 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.leaflet-popup-tip { box-shadow: none !important; }
.popup-links { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--divider); display: flex; flex-direction: column; gap: 6px; }
.popup-links a { display: inline-flex; align-items: center; gap: 6px; }

/* 浮层面板（左侧：搜索/筛选/统计 320px） */
.map-tools {
  position: fixed; top: calc(var(--topbar-h) + 16px); left: calc(var(--sidebar-w) + 16px);
  width: 320px; max-height: calc(100vh - var(--topbar-h) - var(--footer-h) - 32px); overflow-y: auto;
  background: #fff; border-radius: var(--r-card); box-shadow: var(--sh-menu); font-size: 13px; z-index: 900;
  transition: left var(--t);
}
/* 浮层面板（右侧：图层 280px） */
.layer-panel {
  position: fixed; top: calc(var(--topbar-h) + 16px); right: 16px; width: 280px;
  max-height: calc(100vh - var(--topbar-h) - var(--footer-h) - 32px); overflow-y: auto;
  background: #fff; border-radius: var(--r-card); box-shadow: var(--sh-menu); font-size: 13px; z-index: 900;
}
.lp-header {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--divider);
  font-size: 14px; font-weight: 600; position: sticky; top: 0; background: #fff; z-index: 1;
}
.lp-header .lp-title { display: inline-flex; align-items: center; gap: 6px; }
.lp-header .lp-actions { display: inline-flex; align-items: center; gap: 6px; }
.layer-group { border-bottom: 1px solid var(--divider); }
.layer-group:last-child { border-bottom: none; }
.layer-group-title {
  display: flex; align-items: center; gap: 6px; padding: 9px 14px; background: var(--bg);
  color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; user-select: none;
}
.layer-group-title .group-name { flex: 1; }
.layer-group-title .chev { transition: transform var(--t); }
.layer-group-title.collapsed .chev { transform: rotate(-90deg); }
.layer-group-title input.group-check { width: 15px; height: 15px; flex: none; margin: 0; }
.layer-subtitle { padding: 6px 14px; color: var(--text-3); font-size: 12px; cursor: pointer; user-select: none; }
.layer-group-body { display: block; }
.layer-group-body.hidden { display: none; }
.chev { display: inline-flex; color: var(--text-2); transition: transform var(--t); }
.layer-item { display: flex; align-items: center; gap: 8px; padding: 7px 14px; }
.layer-item:hover { background: var(--bg); }
.layer-item label { flex: 1; margin: 0; font-size: 13px; color: var(--text); cursor: pointer; font-weight: 400; }
.layer-warn { color: var(--warning); display: inline-flex; vertical-align: -.15em; }
.layer-item input[type=checkbox] { flex: none; }
.layer-item input[type=range] { width: 60px; accent-color: var(--primary); }
.layer-opacity { display: none; align-items: center; }
.layer-item:hover .layer-opacity { display: inline-flex; }

/* 搜索/筛选面板内部 */
.tool-sec { padding: 14px; border-bottom: 1px solid var(--divider); }
.tool-sec:last-child { border-bottom: none; }
.tool-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.stat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.stat-chip { background: var(--bg); border-radius: var(--r-tag); padding: 2px 8px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.stat-chip b { color: var(--text); }
.stat-chip-main { background: var(--primary-soft); color: var(--primary); }
.stat-chip-main b { color: var(--primary); }
.result-item {
  display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: var(--r-ctl);
  cursor: pointer; font-size: 13px; color: var(--text); transition: background var(--t);
}
.result-item:hover { background: var(--primary-soft); color: var(--primary); }

/* 图层服务自检 */
.self-check-title { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--divider); font-size: 13px; font-weight: 600; color: var(--text); }
.self-check-row { display: flex; align-items: center; gap: 6px; padding: 6px 14px; font-size: 12.5px; }
.self-check-row .sc-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.self-check-row .sc-tag { font-size: 11px; color: var(--text-3); border: 1px solid var(--divider); border-radius: var(--r-tag); padding: 0 4px; }
.self-check-tip { display: flex; align-items: flex-start; gap: 6px; padding: 8px 14px; font-size: 12px; line-height: 1.6; color: var(--text-2); border-top: 1px solid var(--divider); }
.self-check-tip svg.icon { margin-top: 2px; flex: none; color: var(--warning); }
.self-check-tip.ok { color: #2F8A60; }
.self-check-tip.ok svg.icon { color: var(--success); }

/* 等宽代码提示（GeoJSON 示例等） */
.code-hint {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: 12px; line-height: 1.6; margin: 0; padding: 10px 12px;
  background: #F5F8FC; border: 1px solid var(--divider); border-radius: var(--r-ctl);
  color: #3A5A78; white-space: pre; overflow-x: auto;
}
textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace; font-size: 12.5px; line-height: 1.6; }

/* ============ 仪表盘 ============ */
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
.dash-grid .card { margin-bottom: 0; }
.mini-map { height: 300px; border-radius: var(--r-ctl); overflow: hidden; background: var(--bg); }
.mini-map-sm { height: 200px; border-radius: var(--r-ctl); overflow: hidden; background: var(--bg); }
.list-simple { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--divider); }
.list-row:last-child { border-bottom: none; }
.list-row .list-main { flex: 1; min-width: 0; }
.list-row .list-main b { display: block; font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .list-main span { font-size: 12px; color: var(--text-2); }

/* ============ 项目详情（左元数据 / 右文件与版本） ============ */
.detail-grid { display: grid; grid-template-columns: 380px 1fr; gap: 16px; align-items: start; }
.detail-grid > div > .card { margin-bottom: 16px; }
.detail-grid > div > .card:last-child { margin-bottom: 0; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.info-grid .info-cell label { font-size: 12px; color: var(--text-2); margin-bottom: 2px; }
.info-grid .info-cell div { font-size: 14px; color: var(--text); word-break: break-all; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.detail-head h2 { margin: 0 0 6px; }
.detail-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ============ 响应式 ============ */
@media (max-width: 1280px) {
  body { --sidebar-w: 64px; }
  .side-label { display: none; }
  .side-brand { justify-content: center; padding: 0; }
  .side-item { justify-content: center; padding: 0; }
  .side-user { justify-content: center; }
  .side-foot { flex-direction: column; gap: 8px; padding: 12px 0; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}
