/* ============================================================
 * 晶大智能运维平台 v13 · 深色科技风全局样式
 * 设计语言：深蓝黑底 + 晶大绿品牌色 + 科技青蓝/紫蓝
 * 视觉：玻璃质感卡片 + 网格纹理 + 辉光 + 3D 元素
 * 摒弃 emoji 全部使用 SVG 矢量图标
 * ============================================================ */

:root {
  --bg-deep: #050d18;
  --bg-base: #0a1a2e;
  --bg-elev: #0f2238;
  --bg-card: rgba(15, 34, 56, 0.72);
  --bg-card-solid: #11233d;
  --bg-hover: rgba(95, 212, 154, 0.06);
  --primary: #2aaf5d;
  --primary-bright: #5fd49a;
  --primary-dim: #1a8a48;
  --primary-glow: rgba(95, 212, 154, 0.55);
  --accent: #3d7bff;
  --accent-cyan: #00d4ff;
  --accent-purple: #7c5cff;
  --accent-amber: #ffbe40;
  --accent-red: #ff5757;
  --text-1: #e6f0ff;
  --text-2: #9bb0d3;
  --text-3: #5a749a;
  --text-mute: #38516e;
  --border: rgba(95, 212, 154, 0.14);
  --border-bright: rgba(95, 212, 154, 0.38);
  --border-cool: rgba(61, 123, 255, 0.22);
  --grid: rgba(95, 212, 154, 0.07);
  --grid-cool: rgba(0, 212, 255, 0.06);
  --st-ok: #5fd49a;
  --st-urgent: #ffbe40;
  --st-overdue: #ff5757;
  --st-never: #9bb0d3;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
  --shadow-hover: 0 16px 40px rgba(0, 0, 0, 0.45);
  --glow-green: 0 0 24px rgba(95, 212, 154, 0.35);
  --glow-cyan: 0 0 24px rgba(0, 212, 255, 0.35);
  --glow-red: 0 0 24px rgba(255, 87, 87, 0.35);
  --nav-w: 230px;
  --topbar-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 1100px 700px at 78% -8%, rgba(95, 212, 154, 0.10), transparent 60%),
    radial-gradient(ellipse 900px 600px at 12% 110%, rgba(0, 212, 255, 0.10), transparent 60%),
    linear-gradient(180deg, #050d18 0%, #08152a 50%, #050d18 100%);
  background-attachment: fixed;
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 50%, #000 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 50%, #000 30%, transparent 90%);
}

a { color: var(--primary-bright); text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; outline: none; color: inherit; }
img { display: block; max-width: 100%; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(95, 212, 154, 0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(95, 212, 154, 0.45); }
::-webkit-scrollbar-track { background: transparent; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 18px; border-radius: 9px;
  font-size: 13.5px; font-weight: 500; letter-spacing: .3px;
  transition: all .2s ease; white-space: nowrap; position: relative; overflow: hidden;
}
.btn-primary { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dim) 100%); color: #fff; box-shadow: 0 4px 14px rgba(42, 175, 93, 0.32); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(42, 175, 93, 0.5); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-outline { border: 1px solid var(--border-bright); color: var(--text-1); background: rgba(15, 34, 56, 0.5); backdrop-filter: blur(4px); }
.btn-outline:hover { border-color: var(--primary-bright); color: var(--primary-bright); background: rgba(95, 212, 154, 0.08); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { color: var(--primary-bright); background: var(--bg-hover); }
.btn-danger { color: var(--accent-red); }
.btn-danger:hover { background: rgba(255, 87, 87, 0.1); }
.btn-cyan { background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent) 100%); color: #fff; box-shadow: 0 4px 14px rgba(0, 212, 255, 0.3); }
.btn-cyan:hover { box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5); transform: translateY(-1px); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { height: 44px; padding: 0 26px; font-size: 15px; border-radius: 11px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.ico { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.ico svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ico-lg svg { width: 1.4em; height: 1.4em; }
.ico-xl svg { width: 1.8em; height: 1.8em; }
.nav-ico { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
  width: var(--nav-w); flex-shrink: 0;
  background: linear-gradient(180deg, #050d18 0%, #0a1a2e 50%, #050d18 100%);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  z-index: 50;
}
.sidebar::-webkit-scrollbar-thumb { background: rgba(95, 212, 154, 0.15); }
.brand { display: flex; align-items: center; gap: 11px; padding: 22px 18px 20px; border-bottom: 1px solid var(--border); position: relative; }
.brand-logo { width: 36px; height: 36px; flex-shrink: 0; filter: drop-shadow(0 0 8px var(--primary-glow)); }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: .5px; color: #fff; }
.brand-sub { font-size: 10.5px; color: var(--text-3); margin-top: 2px; letter-spacing: 1px; }

.nav-section { padding: 14px 18px 6px; font-size: 10.5px; color: var(--text-mute); letter-spacing: 2px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  margin: 2px 10px; padding: 11px 14px; border-radius: 9px;
  color: var(--text-2); font-size: 13.5px; cursor: pointer;
  transition: all .2s ease; position: relative; border: 1px solid transparent;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-1); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(95, 212, 154, 0.18), rgba(95, 212, 154, 0.04));
  color: var(--primary-bright); font-weight: 600;
  border-color: rgba(95, 212, 154, 0.32);
  box-shadow: inset 3px 0 0 var(--primary-bright), 0 4px 16px rgba(95, 212, 154, 0.12);
}
.nav-item.active .nav-ico { color: var(--primary-bright); filter: drop-shadow(0 0 4px var(--primary-glow)); }
.nav-item .nav-badge { margin-left: auto; background: var(--accent-red); color: #fff; font-size: 10.5px; padding: 1px 7px; border-radius: 20px; font-weight: 600; box-shadow: 0 0 8px rgba(255, 87, 87, 0.5); }
.sidebar-foot { margin-top: auto; padding: 14px 18px; font-size: 10.5px; color: var(--text-mute); border-top: 1px solid var(--border); letter-spacing: .3px; line-height: 1.7; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h);
  background: linear-gradient(180deg, rgba(15, 34, 56, 0.85), rgba(10, 26, 46, 0.65));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; position: sticky; top: 0; z-index: 40;
}
.topbar-title { font-size: 17px; font-weight: 700; letter-spacing: 1px; color: #fff; display: flex; align-items: center; gap: 10px; }
.topbar-title .title-ico { width: 22px; height: 22px; color: var(--primary-bright); filter: drop-shadow(0 0 6px var(--primary-glow)); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-clock {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; color: var(--text-2);
  padding: 6px 12px; border-radius: 8px;
  background: rgba(15, 34, 56, 0.5); border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.topbar-clock .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary-bright); box-shadow: 0 0 6px var(--primary-glow); }
.topbar-user { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 24px; background: rgba(15, 34, 56, 0.5); border: 1px solid var(--border); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  box-shadow: 0 0 12px rgba(95, 212, 154, 0.4);
}
.user-meta { line-height: 1.3; }
.user-name { font-size: 12.5px; font-weight: 600; color: #fff; }
.user-role { font-size: 10.5px; color: var(--text-3); letter-spacing: .5px; }

.content { padding: 24px 28px 40px; max-width: 1480px; width: 100%; margin: 0 auto; flex: 1; position: relative; z-index: 1; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  position: relative; overflow: hidden;
  box-shadow: var(--shadow);
}
.card.tech::before {
  content: ''; position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-bright), transparent);
  opacity: .6;
}
.card-pad { padding: 22px; }
.card-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; color: #fff; letter-spacing: .5px; }
.card-title .ico { color: var(--primary-bright); font-size: 17px; }
.card-desc { font-size: 12px; color: var(--text-3); margin-top: 4px; letter-spacing: .3px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  padding: 18px 20px; position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  transition: all .25s ease;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-bright), transparent);
}
.stat-card:hover { border-color: var(--border-bright); box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.stat-card .stat-ico {
  width: 46px; height: 46px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  background: linear-gradient(135deg, rgba(95, 212, 154, 0.18), rgba(0, 212, 255, 0.12));
  color: var(--primary-bright);
  border: 1px solid rgba(95, 212, 154, 0.28);
  box-shadow: 0 0 12px rgba(95, 212, 154, 0.15);
}
.stat-card.sc-2 .stat-ico { background: linear-gradient(135deg, rgba(255, 190, 64, 0.18), rgba(255, 87, 87, 0.12)); color: var(--accent-amber); border-color: rgba(255, 190, 64, 0.32); box-shadow: 0 0 12px rgba(255, 190, 64, 0.15); }
.stat-card.sc-3 .stat-ico { background: linear-gradient(135deg, rgba(0, 212, 255, 0.18), rgba(61, 123, 255, 0.12)); color: var(--accent-cyan); border-color: rgba(0, 212, 255, 0.32); box-shadow: 0 0 12px rgba(0, 212, 255, 0.15); }
.stat-card.sc-4 .stat-ico { background: linear-gradient(135deg, rgba(124, 92, 255, 0.18), rgba(95, 212, 154, 0.12)); color: var(--accent-purple); border-color: rgba(124, 92, 255, 0.32); box-shadow: 0 0 12px rgba(124, 92, 255, 0.15); }
.stat-card .stat-info { flex: 1; min-width: 0; }
.stat-card .stat-label { font-size: 12px; color: var(--text-2); font-weight: 500; letter-spacing: .3px; }
.stat-card .stat-value { font-size: 26px; font-weight: 800; margin: 3px 0 1px; letter-spacing: -.3px; color: #fff; font-variant-numeric: tabular-nums; }
.stat-card .stat-value .unit { font-size: 12px; font-weight: 500; color: var(--text-3); margin-left: 3px; letter-spacing: 0; }
.stat-card .stat-trend { font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 4px; }
.stat-card .stat-trend.up { color: var(--primary-bright); }
.stat-card .stat-trend.warn { color: var(--accent-amber); }
.stat-card .stat-trend.danger { color: var(--accent-red); }

.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; font-size: 11.5px; color: var(--text-3); font-weight: 600;
  padding: 12px 16px; background: rgba(15, 34, 56, 0.6);
  border-bottom: 1px solid var(--border);
  letter-spacing: 1px; white-space: nowrap;
  text-transform: uppercase;
}
tbody td {
  padding: 13px 16px; border-bottom: 1px solid rgba(95, 212, 154, 0.08);
  font-size: 13px; vertical-align: middle; color: var(--text-1);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(95, 212, 154, 0.05); }
.cell-main { font-weight: 600; color: #fff; }
.cell-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; padding: 3px 9px; border-radius: 6px; font-weight: 500;
  white-space: nowrap; line-height: 1.5;
  background: rgba(95, 212, 154, 0.12); color: var(--primary-bright);
  border: 1px solid rgba(95, 212, 154, 0.25);
}
.tag-blue { background: rgba(0, 212, 255, 0.12); color: var(--accent-cyan); border-color: rgba(0, 212, 255, 0.28); }
.tag-green { background: rgba(95, 212, 154, 0.12); color: var(--primary-bright); border-color: rgba(95, 212, 154, 0.28); }
.tag-orange { background: rgba(255, 190, 64, 0.12); color: var(--accent-amber); border-color: rgba(255, 190, 64, 0.3); }
.tag-red { background: rgba(255, 87, 87, 0.12); color: var(--accent-red); border-color: rgba(255, 87, 87, 0.3); }
.tag-purple { background: rgba(124, 92, 255, 0.12); color: var(--accent-purple); border-color: rgba(124, 92, 255, 0.3); }
.tag-gray { background: rgba(155, 176, 211, 0.1); color: var(--text-2); border-color: rgba(155, 176, 211, 0.22); }
.tag-cyan { background: rgba(0, 212, 255, 0.12); color: var(--accent-cyan); border-color: rgba(0, 212, 255, 0.3); }
.tag-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; box-shadow: 0 0 6px currentColor; }
.tag-dot.green { background: var(--primary-bright); color: var(--primary-bright); }
.tag-dot.orange { background: var(--accent-amber); color: var(--accent-amber); }
.tag-dot.red { background: var(--accent-red); color: var(--accent-red); }
.tag-dot.gray { background: var(--text-3); color: var(--text-3); }
.tag-dot.cyan { background: var(--accent-cyan); color: var(--accent-cyan); }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: rgba(15, 34, 56, 0.6); border: 1px solid var(--border);
  border-radius: 9px; padding: 0 14px; height: 38px; width: 280px;
  transition: all .2s; backdrop-filter: blur(4px);
}
.search-box:focus-within { border-color: var(--primary-bright); box-shadow: 0 0 0 3px rgba(95, 212, 154, 0.12); }
.search-box input { border: none; flex: 1; font-size: 13.5px; background: transparent; color: #fff; }
.search-box input::placeholder { color: var(--text-3); }
.search-box .ico { color: var(--text-3); }
.select {
  height: 38px; border: 1px solid var(--border); border-radius: 9px;
  padding: 0 30px 0 12px; font-size: 13px;
  background: rgba(15, 34, 56, 0.6) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239bb0d3' stroke-width='1.8'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 10px center / 14px;
  color: #fff; min-width: 130px; cursor: pointer; backdrop-filter: blur(4px);
  -webkit-appearance: none; appearance: none;
}
.select:focus { border-color: var(--primary-bright); }
.select option { background: #0a1a2e; color: #fff; }

.modal-mask {
  position: fixed; inset: 0; background: rgba(5, 13, 24, 0.75);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.modal-mask.show { opacity: 1; pointer-events: auto; }
.modal {
  background: linear-gradient(180deg, #11233d 0%, #0a1a2e 100%);
  border: 1px solid var(--border-bright); border-radius: var(--radius-lg);
  width: 560px; max-width: calc(100vw - 40px);
  max-height: calc(100vh - 60px); display: flex; flex-direction: column;
  transform: translateY(16px) scale(.98); transition: transform .25s;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(95, 212, 154, 0.08);
  position: relative; overflow: hidden;
}
.modal::before {
  content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-bright), transparent);
}
.modal-mask.show .modal { transform: translateY(0) scale(1); }
.modal-head { padding: 20px 24px 0; display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 16px; font-weight: 700; color: #fff; letter-spacing: .5px; display: flex; align-items: center; gap: 10px; }
.modal-title .ico { color: var(--primary-bright); }
.modal-close { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text-2); font-size: 16px; border: 1px solid transparent; }
.modal-close:hover { background: rgba(255, 87, 87, 0.12); color: var(--accent-red); border-color: rgba(255, 87, 87, 0.3); }
.modal-body { padding: 18px 24px; overflow-y: auto; }
.modal-foot { padding: 14px 24px 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border); margin-top: 4px; }

.form-item { margin-bottom: 16px; }
.form-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; display: flex; align-items: center; gap: 4px; letter-spacing: .3px; }
.form-label .req { color: var(--accent-red); }
.input, .textarea, .form-select { width: 100%; border: 1px solid var(--border); border-radius: 9px; padding: 10px 14px; font-size: 13.5px; background: rgba(5, 13, 24, 0.5); color: #fff; transition: all .2s; }
.input::placeholder, .textarea::placeholder { color: var(--text-mute); }
.input:focus, .textarea:focus, .form-select:focus { border-color: var(--primary-bright); box-shadow: 0 0 0 3px rgba(95, 212, 154, 0.12); background: rgba(5, 13, 24, 0.8); }
.textarea { resize: vertical; min-height: 84px; line-height: 1.7; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-section-title { font-size: 11.5px; font-weight: 700; color: var(--primary-bright); letter-spacing: 1.5px; margin: 6px 0 14px; padding-left: 10px; border-left: 3px solid var(--primary-bright); line-height: 1.4; text-transform: uppercase; }
.form-section-title:first-child { margin-top: 0; }

.empty { text-align: center; padding: 60px 20px; color: var(--text-3); }
.empty .ico { font-size: 46px; opacity: .5; margin-bottom: 12px; color: var(--text-mute); }
.empty p { font-size: 13px; }

.toast-wrap { position: fixed; top: 76px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: linear-gradient(135deg, #11233d 0%, #0a1a2e 100%); color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 13px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); display: flex; align-items: center; gap: 10px; border: 1px solid var(--border-bright); animation: toastIn .25s ease; max-width: 360px; }
.toast .ico { font-size: 16px; }
.toast.success .ico { color: var(--primary-bright); }
.toast.error .ico { color: var(--accent-red); }
.toast.warn .ico { color: var(--accent-amber); }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
.toast.out { animation: toastOut .25s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }

.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.text-2 { color: var(--text-2); } .text-3 { color: var(--text-3); } .text-1 { color: #fff; }
.fw-600 { font-weight: 600; } .fs-12 { font-size: 12px; } .fs-13 { font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.hidden { display: none !important; }

/* ============================================================
 * 登录页（深色科技版 · LOGO 品牌色 + 3D 装饰）
 * ============================================================ */
.login-page {
  margin: 0; padding: 0; min-height: 100vh; width: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #fff;
  display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh;
  background: #050d18;
  position: relative; overflow: hidden;
}
.login-page::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 900px 600px at 80% 0%, rgba(95, 212, 154, 0.18), transparent 60%),
    radial-gradient(ellipse 800px 500px at 20% 100%, rgba(0, 212, 255, 0.18), transparent 60%);
}
.login-page::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(95, 212, 154, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 212, 154, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, #000 30%, transparent 80%);
}

.login-left {
  position: relative; padding: 56px 64px 40px; display: flex; flex-direction: column; gap: 26px;
  min-width: 0; z-index: 1;
  background: linear-gradient(135deg, rgba(5, 13, 24, 0.4) 0%, rgba(10, 26, 46, 0.6) 100%);
}
.brand-row { display: flex; align-items: center; gap: 16px; }
.brand-row .brand-logo { width: 48px; height: 48px; filter: drop-shadow(0 0 12px var(--primary-glow)); }
.brand-text .cn { font-size: 18px; font-weight: 800; letter-spacing: 1.2px; line-height: 1.3; color: #fff; }
.brand-text .en { font-size: 10.5px; color: var(--text-2); margin-top: 3px; letter-spacing: .4px; }

.hero-title { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 0; line-height: 1.25; }
.hero-title .line { font-size: 32px; font-weight: 800; letter-spacing: 2px; }
.hero-title .line:nth-child(1) {
  background: linear-gradient(90deg, #fff 0%, #5fd49a 60%, #00d4ff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-title .line:nth-child(2) { color: #fff; }
.hero-slogan {
  font-size: 15px; color: rgba(255,255,255,.85); border-left: 3px solid #5fd49a;
  padding: 4px 0 4px 14px; margin-top: 6px; letter-spacing: .4px;
}

.service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
.service-card {
  background: rgba(15, 34, 56, 0.5); border: 1px solid rgba(95, 212, 154, 0.2);
  border-radius: 14px; padding: 18px 16px; backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px); transition: all .2s;
}
.service-card:hover { background: rgba(95, 212, 154, 0.1); transform: translateY(-2px); border-color: rgba(95, 212, 154, 0.5); }
.service-card .s-ico {
  width: 38px; height: 38px; border-radius: 10px; margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(95, 212, 154, 0.4), rgba(0, 212, 255, 0.3));
  border: 1px solid rgba(95, 212, 154, 0.45);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 0 16px rgba(95, 212, 154, 0.25);
}
.service-card .s-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: #fff; }
.service-card .s-desc { font-size: 12px; color: rgba(255,255,255,.72); line-height: 1.65; }

.value-bar { margin-top: auto; display: flex; gap: 22px; flex-wrap: wrap; padding-top: 8px; position: relative; z-index: 1; }
.value-bar .v-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255,255,255,.85); }
.value-bar .v-ico {
  width: 24px; height: 24px; border-radius: 7px; display: flex; align-items: center; justify-content: center;
  background: rgba(95, 212, 154, 0.18); border: 1px solid rgba(95, 212, 154, 0.4);
  color: var(--primary-bright);
}

.login-right {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px; min-width: 0; z-index: 1;
}
.login-card {
  width: 100%; max-width: 420px;
  background: linear-gradient(180deg, rgba(17, 35, 61, 0.85) 0%, rgba(10, 26, 46, 0.7) 100%);
  border: 1px solid var(--border-bright); border-radius: 20px;
  padding: 40px 36px 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(95, 212, 154, 0.08);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  position: relative; overflow: hidden;
}
.login-card::before {
  content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-bright), transparent);
}
.lc-tag {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 20px; margin-bottom: 16px;
  background: rgba(95, 212, 154, 0.12); color: var(--primary-bright);
  border: 1px solid rgba(95, 212, 154, 0.3);
}
.lc-tag.tag-worker { background: rgba(0, 212, 255, 0.12); color: var(--accent-cyan); border-color: rgba(0, 212, 255, 0.3); }
.lc-title { font-size: 24px; font-weight: 800; letter-spacing: .5px; color: #fff; margin-bottom: 4px; }
.lc-sub { font-size: 13px; color: var(--text-2); margin-bottom: 26px; }

.lc-group { margin-bottom: 16px; }
.lc-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.lc-input {
  width: 100%; height: 44px; border: 1px solid var(--border); border-radius: 10px;
  padding: 0 14px; font-size: 14px; color: #fff;
  background: rgba(5, 13, 24, 0.5); transition: all .2s; box-sizing: border-box;
}
.lc-input::placeholder { color: var(--text-mute); }
.lc-input:focus {
  outline: none; border-color: var(--primary-bright);
  box-shadow: 0 0 0 3px rgba(95, 212, 154, 0.15);
  background: rgba(5, 13, 24, 0.8);
}
.lc-btn {
  width: 100%; height: 46px; border-radius: 11px; margin-top: 6px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dim) 100%);
  color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 4px;
  border: none; cursor: pointer; transition: all .2s;
  box-shadow: 0 8px 22px rgba(42, 175, 93, 0.35);
}
.lc-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(42, 175, 93, 0.5); }
.lc-btn:active { transform: translateY(0); }
.lc-btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }

.lc-hint {
  margin-top: 18px; padding: 12px 14px;
  background: rgba(0, 212, 255, 0.06); border-radius: 10px;
  font-size: 12px; color: var(--text-2); line-height: 1.85;
  border: 1px solid rgba(0, 212, 255, 0.18);
}
.lc-hint b { color: var(--primary-bright); }
.lc-hint code {
  background: rgba(5, 13, 24, 0.6); padding: 1px 7px; border-radius: 5px;
  font-size: 11.5px; color: var(--primary-bright);
  border: 1px solid rgba(95, 212, 154, 0.3);
  font-family: 'JetBrains Mono', 'Consolas', monospace; letter-spacing: .3px;
}
.lc-foot { text-align: center; margin-top: 16px; font-size: 12px; color: var(--text-3); }
.copy { margin-top: 20px; font-size: 12px; color: var(--text-3); }

/* 移动端紧凑品牌头（仅手机/平板显示，桌面隐藏） */
.mobile-brand { display: none; }

@media (max-width: 980px) {
  /* 手机/平板：隐藏桌面品牌区，登录框直达首屏 */
  .login-page {
    grid-template-columns: 1fr;
    overflow-y: auto;              /* 允许滚动（原 overflow:hidden 会截断登录框） */
    -webkit-overflow-scrolling: touch;
  }
  .login-left { display: none; }
  .mobile-brand {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    width: 100%; padding: 26px 20px 4px; text-align: center;
  }
  .mobile-brand .mb-name {
    font-size: 16px; font-weight: 800; letter-spacing: 1px; color: #fff;
  }
  .mobile-brand .mb-slogan {
    font-size: 12px; color: var(--primary-bright); letter-spacing: 2px;
  }
  .mobile-brand .mb-line {
    width: 56px; height: 2px; border-radius: 2px; margin-top: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-bright), transparent);
  }
  .login-right {
    padding: 16px 16px 30px; align-items: stretch;
  }
  .login-card { padding: 26px 20px 22px; }
  .lc-title { font-size: 21px; }
  .lc-input { font-size: 16px; }   /* ≥16px 防止 iOS 聚焦自动放大 */
  .copy { margin-top: 12px; text-align: center; }
}
@media (max-width: 600px) {
  .mobile-brand { padding-top: 20px; }
  .login-card { padding: 22px 16px 20px; border-radius: 16px; }
  .lc-btn { height: 48px; font-size: 16px; }   /* 触控友好 */
  .lc-input { height: 46px; }
  .lc-hint { font-size: 11.5px; padding: 10px 12px; }
}
/* 超小屏：极紧凑布局，登录框完整可见 */
@media (max-width: 380px) {
  .mobile-brand { padding: 16px 14px 2px; }
  .mobile-brand .mb-name { font-size: 14px; }
  .mobile-brand .mb-slogan { font-size: 10.5px; letter-spacing: 1.5px; }
  .login-right { padding: 10px 12px 24px; }
  .login-card { padding: 18px 14px 16px; }
  .lc-title { font-size: 19px; }
  .lc-sub { margin-bottom: 18px; }
  .lc-group { margin-bottom: 14px; }
}

/* ============================================================
 * 时间线（深色版）
 * ============================================================ */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(180deg, var(--primary-bright), rgba(95, 212, 154, 0.1));
  border-radius: 2px;
}
.tl-item { position: relative; padding-bottom: 26px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -30px; top: 4px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--bg-elev); border: 4px solid var(--primary-bright);
  box-shadow: 0 0 0 3px rgba(95, 212, 154, 0.15), 0 0 12px rgba(95, 212, 154, 0.3);
}
.tl-item.done .tl-dot { border-color: var(--primary-bright); }
.tl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tl-date { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tl-title { font-size: 14.5px; font-weight: 700; color: #fff; }

/* ============================================================
 * 图片上传块（深色版）
 * ============================================================ */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.img-item {
  position: relative; border-radius: 10px; overflow: hidden;
  aspect-ratio: 4/3; background: rgba(5, 13, 24, 0.6); border: 1px solid var(--border);
}
.img-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.img-item:hover img { transform: scale(1.04); }
.img-item .del {
  position: absolute; top: 6px; right: 6px; width: 22px; height: 22px;
  background: rgba(5, 13, 24, 0.85); color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  border: 1px solid var(--border-bright);
  opacity: 0; transition: opacity .2s;
}
.img-item:hover .del { opacity: 1; }
.upload-btn {
  aspect-ratio: 4/3; border: 1.5px dashed rgba(95, 212, 154, 0.3); border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--text-3); font-size: 12.5px; cursor: pointer; transition: all .2s;
  background: rgba(15, 34, 56, 0.4);
}
.upload-btn:hover { border-color: var(--primary-bright); color: var(--primary-bright); background: rgba(95, 212, 154, 0.08); }
.upload-btn .ico { font-size: 22px; }

/* ============================================================
 * 详情块（深色版）
 * ============================================================ */
.detail-section { margin-bottom: 22px; }
.detail-section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700; margin-bottom: 12px; color: #fff; letter-spacing: .5px;
}
.detail-section-title .badge-ico {
  width: 28px; height: 28px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center;
  background: rgba(95, 212, 154, 0.15); color: var(--primary-bright);
  border: 1px solid rgba(95, 212, 154, 0.3);
}
.detail-text {
  background: rgba(5, 13, 24, 0.5); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px 16px; font-size: 13.5px; line-height: 1.85; color: var(--text-1);
  white-space: pre-wrap;
}

/* 隐患列表（深色版） */
.fault-list { display: flex; flex-direction: column; gap: 12px; }
.fault-item {
  padding: 14px 16px; background: rgba(255, 190, 64, 0.06); border-radius: 12px;
  border: 1px solid rgba(255, 190, 64, 0.2); border-left: 3px solid var(--accent-amber);
}
.fault-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.fault-text { font-size: 13.5px; line-height: 1.7; color: var(--text-1); }
.fault-resolved { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(95, 212, 154, 0.2); }
.suggestion-block {
  margin-top: 14px; padding: 12px 16px; background: rgba(95, 212, 154, 0.08);
  border-radius: 12px; border: 1px solid rgba(95, 212, 154, 0.25); border-left: 3px solid var(--primary-bright);
}

/* ============================================================
 * 企业信息网格（深色版）
 * ============================================================ */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.info-cell {
  padding: 10px 14px; background: rgba(5, 13, 24, 0.5); border-radius: 10px;
  border: 1px solid var(--border);
}
.info-label { font-size: 11px; color: var(--text-3); margin-bottom: 4px; letter-spacing: 1px; text-transform: uppercase; }
.info-value { font-size: 13.5px; font-weight: 600; color: #fff; letter-spacing: .3px; }

/* ============================================================
 * 打印
 * ============================================================ */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .content { max-width: 100%; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
  body { background: #fff; }
}

/* ============================================================
 * 客户卡片网格（深色科技版）
 * ============================================================ */
.client-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.client-card {
  position: relative; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 14px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  overflow: hidden; cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  box-shadow: var(--shadow);
}
.client-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(95, 212, 154, 0.3);
  border-color: rgba(95, 212, 154, 0.4);
}
.client-card::before {
  content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-bright), transparent);
  opacity: 0; transition: opacity .25s;
}
.client-card:hover::before { opacity: .8; }
.client-card:active { transform: translateY(-1px); }
.cc-top { height: 4px; }
.cc-body { padding: 16px 18px 14px; }
.cc-name { font-size: 16.5px; font-weight: 800; letter-spacing: .3px; color: #fff; }
.cc-full {
  font-size: 12px; color: var(--text-3); margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.cc-ind {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 20px;
  white-space: nowrap;
}
.cc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 10px; }
.cc-rows { display: flex; flex-direction: column; gap: 7px; }
.cc-row {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 13px; color: var(--text-1); line-height: 1.5;
}
.cc-k { font-size: 11.5px; color: var(--text-3); flex-shrink: 0; width: 76px; }
.cc-v { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-1); }
.cc-tel { color: var(--primary-bright); font-weight: 600; margin-left: 6px; }
.cc-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--border);
}
.cc-count { font-size: 12px; color: var(--text-2); }
.cc-enter { font-size: 12px; color: var(--primary-bright); font-weight: 600; white-space: nowrap; }
.client-card:hover .cc-enter { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
 * 客户档案详情页（深色科技 Hero）
 * ============================================================ */
.cd-hero {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  margin-bottom: 18px; color: #fff;
  border: 1px solid var(--border-bright);
  background: linear-gradient(135deg, #0a1a2e 0%, #0f2238 100%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.cd-hero::before {
  content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-bright), transparent);
  z-index: 2;
}
.cd-hero-bg {
  position: absolute; inset: 0; z-index: 0; opacity: 0.5;
  background:
    radial-gradient(ellipse 600px 400px at 80% 30%, rgba(95, 212, 154, 0.25), transparent 60%),
    radial-gradient(ellipse 500px 300px at 20% 90%, rgba(0, 212, 255, 0.18), transparent 60%);
}
.cd-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(95, 212, 154, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 212, 154, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 50%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 50%, #000 30%, transparent 80%);
}
.cd-hero-content {
  position: relative; z-index: 1;
  display: flex; align-items: stretch; justify-content: space-between; gap: 24px;
  padding: 28px 32px;
}
.cd-hero-left { flex: 1; min-width: 0; }
.cd-hero-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cd-hero-name {
  font-size: 24px; font-weight: 800; line-height: 1.35; letter-spacing: .5px;
  color: #fff; text-wrap: balance;
  text-shadow: 0 0 24px rgba(95, 212, 154, 0.25);
}
.cd-hero-sub { font-size: 13px; color: rgba(255,255,255,.78); margin-top: 8px; letter-spacing: .3px; }
.cd-hero-person {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-top: 16px; font-size: 13.5px; color: rgba(255,255,255,.92);
}
.cd-hero-person b { font-weight: 700; letter-spacing: .5px; }
.cd-tel {
  background: rgba(95, 212, 154, 0.15); border: 1px solid rgba(95, 212, 154, 0.35);
  padding: 4px 12px; border-radius: 20px; letter-spacing: .5px;
  color: var(--primary-bright); font-weight: 600;
}
.cd-hero-right {
  flex-shrink: 0; min-width: 200px; display: flex; flex-direction: column; justify-content: center;
  background: rgba(15, 34, 56, 0.6); border: 1px solid rgba(95, 212, 154, 0.3);
  border-radius: 16px; padding: 18px 22px; backdrop-filter: blur(6px);
}
.cd-cap-label { font-size: 11.5px; color: var(--text-2); letter-spacing: 1.5px; text-transform: uppercase; }
.cd-cap-val {
  font-size: 24px; font-weight: 800; margin-top: 6px; line-height: 1.2; letter-spacing: .5px;
  background: linear-gradient(180deg, #fff 0%, #5fd49a 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.cd-cap-sub { font-size: 12px; color: rgba(255,255,255,.78); margin-top: 10px; line-height: 1.5; }
.cd-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; margin-bottom: 18px;
}

/* 台账：未录入行弱化 */
table.resp-table tr.ledger-empty td { color: var(--text-3); background: rgba(15, 34, 56, 0.3); }

/* ============================================================
 * 排期表（3D 地图 + 数据面板）
 * ============================================================ */
.schedule-layout {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  grid-template-rows: auto 1fr;
  gap: 16px;
  height: calc(100vh - var(--topbar-h) - 60px);
  min-height: 600px;
}
.sch-side-top { grid-column: 1; grid-row: 1; }
.sch-map { grid-column: 2; grid-row: 1 / 3; }
.sch-side-bot { grid-column: 1; grid-row: 2; }
.sch-right { grid-column: 3; grid-row: 1 / 3; }

.sch-map {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: radial-gradient(ellipse 800px 600px at 50% 50%, #0f2238 0%, #050d18 100%);
  border: 1px solid var(--border-bright);
  box-shadow: var(--shadow-hover), inset 0 0 80px rgba(95, 212, 154, 0.06);
}
.sch-map::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background-image:
    linear-gradient(rgba(95, 212, 154, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95, 212, 154, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
}
.sch-map-corner { position: absolute; width: 24px; height: 24px; border: 2px solid var(--primary-bright); z-index: 3; }
.sch-map-corner.tl { top: 12px; left: 12px; border-right: none; border-bottom: none; }
.sch-map-corner.tr { top: 12px; right: 12px; border-left: none; border-bottom: none; }
.sch-map-corner.bl { bottom: 12px; left: 12px; border-right: none; border-top: none; }
.sch-map-corner.br { bottom: 12px; right: 12px; border-left: none; border-top: none; }
.sch-map-svg { width: 100%; height: 100%; position: relative; z-index: 2; }
.sch-map-svg svg { width: 100%; height: 100%; }
.sch-map-title {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%); z-index: 3;
  font-size: 14px; font-weight: 700; color: #fff; letter-spacing: 4px;
  text-shadow: 0 0 20px var(--primary-glow);
  display: flex; align-items: center; gap: 10px;
}
.sch-map-title::before, .sch-map-title::after {
  content: ''; width: 30px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-bright));
}
.sch-map-title::after { background: linear-gradient(90deg, var(--primary-bright), transparent); }
.sch-map-legend {
  position: absolute; bottom: 20px; right: 20px; z-index: 3;
  background: rgba(5, 13, 24, 0.75); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; backdrop-filter: blur(8px);
  display: flex; flex-direction: column; gap: 6px;
  font-size: 11.5px; color: var(--text-2);
}
.sch-map-legend .lg-row { display: flex; align-items: center; gap: 8px; }
.sch-map-legend .lg-dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }

/* SVG 地图元素（v13.1：去除所有闪烁/扫描动画，客户点位为清晰可见的固定点） */
.sch-dot { transform-origin: center; transform-box: fill-box; }
.sch-dot:hover { transform: scale(1.45); }

/* 排期表侧边面板 */
.sch-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; backdrop-filter: blur(8px);
  display: flex; flex-direction: column; gap: 10px; overflow: hidden;
}
.sch-panel-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: #fff; letter-spacing: .5px;
  padding-bottom: 10px; border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.sch-panel-title .ico { color: var(--primary-bright); }
.sch-panel-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.sch-panel-list::-webkit-scrollbar-thumb { background: rgba(95, 212, 154, 0.2); }

.sch-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: rgba(5, 13, 24, 0.4); border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; transition: all .2s ease;
}
.sch-row:hover { background: rgba(95, 212, 154, 0.08); border-color: rgba(95, 212, 154, 0.3); }
.sch-row-status {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 8px currentColor;
}
.sch-row-info { flex: 1; min-width: 0; }
.sch-row-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sch-row-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.sch-row-due { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.sch-due-overdue { background: rgba(255, 87, 87, 0.15); color: var(--accent-red); border: 1px solid rgba(255, 87, 87, 0.3); }
.sch-due-urgent { background: rgba(255, 190, 64, 0.15); color: var(--accent-amber); border: 1px solid rgba(255, 190, 64, 0.3); }
.sch-due-never { background: rgba(155, 176, 211, 0.12); color: var(--text-2); border: 1px solid rgba(155, 176, 211, 0.25); }
.sch-due-ok { background: rgba(95, 212, 154, 0.12); color: var(--primary-bright); border: 1px solid rgba(95, 212, 154, 0.3); }

.sch-region-group { margin-bottom: 8px; }
.sch-region-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; color: var(--text-2);
  letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 8px; padding: 4px 0;
}
.sch-region-head .region-tag {
  margin-left: auto; font-size: 10.5px; padding: 1px 8px;
  background: rgba(0, 212, 255, 0.12); color: var(--accent-cyan);
  border: 1px solid rgba(0, 212, 255, 0.3); border-radius: 10px;
  font-weight: 600; letter-spacing: 0; text-transform: none;
}

/* 排期表提示卡 */
.sch-tooltip {
  position: absolute; background: rgba(5, 13, 24, 0.95); border: 1px solid var(--primary-bright);
  border-radius: 8px; padding: 10px 14px; color: #fff; font-size: 12px; z-index: 10;
  pointer-events: none; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(95, 212, 154, 0.3);
  display: none;
}
.sch-tooltip.show { display: block; }
.sch-tooltip .tt-name { font-weight: 700; color: var(--primary-bright); font-size: 13px; }
.sch-tooltip .tt-line { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--text-2); font-size: 11.5px; }
.sch-tooltip .tt-line b { color: #fff; font-weight: 600; }

/* ============================================================
 * 响应式适配 · 平板
 * ============================================================ */
@media (max-width: 1180px) {
  .schedule-layout { grid-template-columns: 240px 1fr 280px; }
  .sch-hero { padding: 20px 22px; }
  .sch-hero-name { font-size: 20px; }
}
@media (max-width: 1024px) {
  .content { padding: 22px 20px 36px; }
  .topbar { padding: 0 20px; }
  .stat-grid, .stat-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .schedule-layout { grid-template-columns: 1fr; grid-template-rows: 240px auto auto; height: auto; }
  .sch-side-top, .sch-side-bot { grid-column: 1; grid-row: auto; }
  .sch-map { grid-column: 1; grid-row: 1; min-height: 320px; }
  .sch-right { grid-column: 1; grid-row: auto; }
}
@media (max-width: 900px) {
  .sidebar { width: 64px; }
  .brand-name, .brand-sub, .nav-item span:not(.nav-ico), .nav-section, .sidebar-foot { display: none; }
  .nav-item { justify-content: center; padding: 12px; }
  .nav-item .nav-badge { position: absolute; top: 4px; right: 4px; }
}

/* ============================================================
 * 响应式适配 · 手机端
 * ============================================================ */
@media (max-width: 768px) {
  /* 布局改为上下结构 */
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: sticky; top: 0; z-index: 60;
    flex-direction: row; align-items: center;
    overflow-x: auto; overflow-y: hidden;
    padding: 0 6px; flex-shrink: 0;
    background: linear-gradient(90deg, #050d18 0%, #0a1a2e 100%);
    border-right: none; border-bottom: 1px solid var(--border);
    scrollbar-width: none;
  }
  .sidebar::-webkit-scrollbar { display: none; }
  .brand { padding: 10px 8px; flex-shrink: 0; gap: 0; border-bottom: none; }
  .brand-name { display: block; font-size: 14px; white-space: nowrap; }
  .brand-sub, .nav-section, .sidebar-foot { display: none; }
  .nav-item { margin: 3px 2px; padding: 8px 12px; white-space: nowrap; flex-shrink: 0; font-size: 13px; gap: 6px; }
  .nav-item span:not(.nav-ico) { display: inline; }
  .nav-item .nav-ico { font-size: 16px; width: 18px; height: 18px; }
  .nav-item .nav-ico svg { width: 18px; height: 18px; }
  .nav-item.active { box-shadow: inset 0 -3px 0 var(--primary-bright), 0 4px 12px rgba(95, 212, 154, 0.18); }

  .main { min-width: 0; }
  .topbar { position: static; height: 54px; padding: 0 14px; }
  .topbar-title { font-size: 15px; }
  .topbar-clock { display: none; }
  .user-meta { display: none; }
  .avatar { width: 30px; height: 30px; font-size: 12px; }
  .content { padding: 16px 14px 32px; }

  .stat-grid, .stat-grid-3 { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
  .stat-card { padding: 12px 14px; gap: 10px; }
  .stat-card .stat-ico { width: 38px; height: 38px; font-size: 16px; border-radius: 9px; }
  .stat-card .stat-value { font-size: 20px; }
  .stat-card .stat-label { font-size: 11px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 14px; }
  .info-grid { grid-template-columns: 1fr; gap: 8px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .toolbar { gap: 8px; }
  .search-box { width: 100%; }
  .select { min-width: 0; flex: 1; }

  .modal { width: 100%; max-width: calc(100vw - 16px); max-height: calc(100vh - 24px); border-radius: 14px; }
  .modal-head { padding: 14px 16px 0; }
  .modal-body { padding: 12px 16px; }
  .modal-foot { padding: 10px 16px 14px; }

  .timeline { padding-left: 26px; }
  .tl-dot { left: -26px; }
  .detail-section { padding: 14px; }
  .img-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }

  .toast-wrap { top: 64px; right: 12px; left: 12px; }
  .toast { max-width: none; }

  /* 客户档案 mobile */
  .client-grid { grid-template-columns: 1fr; gap: 12px; }
  .cd-hero-content { flex-direction: column; padding: 20px; gap: 16px; }
  .cd-hero-name { font-size: 19px; }
  .cd-hero-sub { font-size: 12px; }
  .cd-hero-person { gap: 10px; font-size: 12.5px; margin-top: 12px; }
  .cd-hero-right { min-width: 0; }
  .cd-cap-val { font-size: 21px; }
  .cd-actions { flex-direction: column; align-items: stretch; }
  .cd-actions .flex { justify-content: flex-wrap; }
  .cd-actions .btn { flex: 1; min-width: 44%; }
  .cc-k { width: 68px; }

  /* 排期表 mobile */
  .schedule-layout { grid-template-columns: 1fr; grid-template-rows: 260px auto auto; }
  .sch-map { min-height: 260px; }
  .sch-map-title { font-size: 12px; letter-spacing: 2px; }
  .sch-map-legend { font-size: 10.5px; padding: 8px 10px; }
}

/* ============================================================
 * 响应式适配 · 小屏手机
 * ============================================================ */
@media (max-width: 480px) {
  .stat-grid, .stat-grid-3 { grid-template-columns: 1fr; }
  .stat-card { padding: 12px 14px; }
  .btn { height: 36px; padding: 0 14px; font-size: 13px; }
  .cd-hero-name { font-size: 17px; }
  .cd-hero-tags { gap: 6px; }
  .cd-hero-tags .tag { font-size: 10.5px; padding: 2px 8px; }
  .cd-actions .btn { min-width: 100%; }
  .sch-map { min-height: 220px; }
  .sch-map-title { font-size: 11px; letter-spacing: 1.5px; }
  .sch-map-legend { bottom: 12px; right: 12px; }
}

/* ============================================================
 * 表格移动端卡片式（.resp-table）
 * ============================================================ */
@media (max-width: 768px) {
  .table-wrap table.resp-table { min-width: 0; }
  table.resp-table, table.resp-table tbody { display: block; width: 100%; }
  table.resp-table thead { display: none; }
  table.resp-table tbody tr {
    display: block; margin-bottom: 12px;
    border: 1px solid var(--border); border-radius: 12px;
    padding: 4px 16px; background: var(--bg-card-solid);
  }
  table.resp-table tbody tr:last-child { margin-bottom: 0; }
  table.resp-table tbody tr:hover { background: var(--bg-card-solid); }
  table.resp-table td {
    display: block; padding: 9px 0;
    border-bottom: 1px solid rgba(95, 212, 154, 0.08); text-align: left;
  }
  table.resp-table td:last-child { border-bottom: none; }
  table.resp-table td::before {
    content: attr(data-label);
    display: block; font-size: 11px; color: var(--text-3);
    font-weight: 500; margin-bottom: 3px; letter-spacing: .3px;
  }
  table.resp-table td[data-label="操作"] { padding: 10px 0 14px; border-bottom: none; }
  table.resp-table td[data-label="操作"]::before { display: none; }
  table.resp-table td[data-label="操作"] { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
}

/* ============================================================
 * 设备台账分组（5 大类）
 * ============================================================ */
.ledger-group { margin-bottom: 18px; }
.ledger-group:last-child { margin-bottom: 0; }
.ledger-group-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: #fff; letter-spacing: .5px;
  padding-bottom: 10px; margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.ledger-group-title .ico { color: var(--primary-bright); }
.ledger-group-count {
  margin-left: auto; font-size: 11px; font-weight: 600;
  padding: 2px 10px; border-radius: 10px;
  background: rgba(95, 212, 154, 0.12); color: var(--primary-bright);
  border: 1px solid rgba(95, 212, 154, 0.3);
}

/* 台账编辑弹窗分组 */
.ledger-edit-group { margin-bottom: 20px; }
.ledger-edit-group:last-child { margin-bottom: 0; }
.ledger-edit-group-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; color: var(--primary-bright);
  letter-spacing: 1px; margin-bottom: 12px; padding-left: 10px;
  border-left: 3px solid var(--primary-bright); line-height: 1.4;
  text-transform: uppercase;
}
.ledger-edit-group-title .ico { color: var(--primary-bright); }

/* ============================================================
 * 客户签字板（手机/平板触控）
 * ============================================================ */
.signature-pad-wrap {
  position: relative; width: 100%; height: 320px;
  background: rgba(5, 13, 24, 0.6);
  border: 1.5px dashed rgba(95, 212, 154, 0.3); border-radius: 12px;
  overflow: hidden;
}
.signature-pad-wrap::before {
  content: '请在此区域签字'; position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); color: var(--text-mute); font-size: 14px;
  pointer-events: none; letter-spacing: 2px;
}
#signatureCanvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  touch-action: none; cursor: crosshair;
}

/* 签字预览区（表单内） */
.signature-preview {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; background: rgba(5, 13, 24, 0.5);
  border: 1px solid var(--border); border-radius: 12px;
}
.signature-preview img {
  max-width: 200px; max-height: 80px; border-radius: 8px;
  border: 1px solid var(--border-bright);
}
.signature-preview .sig-empty {
  color: var(--text-3); font-size: 13px; font-style: italic;
}
.signature-preview .sig-meta { flex: 1; min-width: 0; }
.signature-preview .sig-label { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.signature-preview .sig-value { font-size: 13px; color: var(--text-1); font-weight: 600; }

/* ============================================================
 * 移动端系统页增强（防 iOS 聚焦缩放 + 触控友好）
 * ============================================================ */
@media (max-width: 768px) {
  /* 输入控件 ≥16px：阻止 iOS Safari 聚焦时整页自动放大 */
  .input, .textarea, .form-select, .select, .search-box input { font-size: 16px !important; }
  .input, .form-select { padding: 11px 14px; }
  /* 触控目标加大 */
  .btn { min-height: 42px; }
  .btn-sm { min-height: 38px; }
  .nav-item { min-height: 44px; }
  /* 表格横向滚动顺滑 */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  /* 弹窗内滚动顺滑 */
  .modal-body { -webkit-overflow-scrolling: touch; }
}

/* ============================================================
 * 合同管理：到期横幅 + 巡检进度条 + 暂停续费
 * ============================================================ */
.contract-banner {
  display: flex; align-items: flex-start; gap: 12px;
  border-radius: 12px; padding: 14px 18px; margin-bottom: 16px;
  font-size: 13.5px; line-height: 1.7; color: var(--text-1);
}
.contract-banner .ico { flex-shrink: 0; margin-top: 2px; }
.cb-expired {
  background: rgba(255, 87, 87, 0.1); border: 1px solid rgba(255, 87, 87, 0.35);
  border-left: 3px solid var(--accent-red);
  box-shadow: 0 0 20px rgba(255, 87, 87, 0.08);
}
.cb-expired b { color: var(--accent-red); }
.cb-expiring {
  background: rgba(255, 190, 64, 0.08); border: 1px solid rgba(255, 190, 64, 0.3);
  border-left: 3px solid var(--accent-amber);
}
.cb-expiring b { color: var(--accent-amber); }
.cb-paused {
  background: rgba(155, 176, 211, 0.08); border: 1px solid rgba(155, 176, 211, 0.25);
  border-left: 3px solid var(--text-3);
}
.cb-paused b { color: var(--text-2); }

/* 巡检进度条 */
.contract-progress { background: rgba(5, 13, 24, 0.5); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.cp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.cp-label { font-size: 13px; font-weight: 700; color: #fff; letter-spacing: .5px; }
.cp-val { font-size: 13px; color: var(--text-2); }
.cp-val b { color: var(--primary-bright); font-size: 16px; }
.cp-bar { height: 10px; border-radius: 6px; background: rgba(5, 13, 24, 0.8); border: 1px solid var(--border); overflow: hidden; }
.cp-fill {
  height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--primary), var(--primary-bright));
  box-shadow: 0 0 12px rgba(95, 212, 154, 0.4);
  transition: width .4s ease;
}
.cp-foot { font-size: 11.5px; color: var(--text-3); margin-top: 8px; }

/* 暂停续费按钮 */
.btn-danger-outline {
  background: rgba(255, 87, 87, 0.08); color: var(--accent-red);
  border: 1px solid rgba(255, 87, 87, 0.4);
}
.btn-danger-outline:hover { background: rgba(255, 87, 87, 0.16); border-color: var(--accent-red); }

/* 已暂停续费的客户卡片弱化 */
.client-card.cc-paused { opacity: .62; }
.client-card.cc-paused .cc-top { filter: grayscale(.7); }

/* ============================================================
 * 地图旗县聚合悬浮框（多客户列表）
 * ============================================================ */
.sch-tooltip {
  max-width: 340px;
  white-space: normal;           /* 覆盖旧的 nowrap，允许多行 */
  max-height: 320px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.sch-tooltip .tt-name {
  font-weight: 700; color: var(--primary-bright); font-size: 13.5px;
  padding-bottom: 6px; margin-bottom: 6px;
  border-bottom: 1px solid rgba(95, 212, 154, 0.25);
  letter-spacing: .5px;
  position: sticky; top: 0; background: rgba(5, 13, 24, 0.97); z-index: 1;
}
.sch-tooltip .tt-list { display: flex; flex-direction: column; gap: 8px; }
.sch-tooltip .tt-item {
  padding: 6px 8px; border-radius: 8px;
  background: rgba(15, 34, 56, 0.6); border: 1px solid rgba(95, 212, 154, 0.12);
}
.sch-tooltip .tt-item-head {
  display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #fff;
}
.sch-tooltip .tt-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 6px currentColor; }
.sch-tooltip .tt-status { margin-left: auto; font-size: 11px; font-weight: 600; white-space: nowrap; }
.sch-tooltip .tt-item-info { font-size: 11px; color: var(--text-2); margin-top: 3px; line-height: 1.5; }
.sch-tooltip .tt-hint {
  margin-top: 8px; padding-top: 6px; font-size: 10.5px; color: var(--text-3);
  border-top: 1px dashed rgba(95, 212, 154, 0.15); text-align: center; letter-spacing: .5px;
}
.sch-tooltip::-webkit-scrollbar { width: 4px; }
.sch-tooltip::-webkit-scrollbar-thumb { background: rgba(95, 212, 154, 0.3); border-radius: 2px; }

/* 聚合点 hover 微反馈（无闪烁动画，仅描边加亮） */
.sch-dot:hover circle { stroke-width: 3; }

/* 悬浮列表可交互：可滚动、可点击（鼠标移上去不收起） */
.sch-tooltip { pointer-events: auto; cursor: pointer; }

/* ============================================================
 * LOGO 图片（用户提供的 LOGO.png，黑底 → screen 混合去底）
 * ============================================================ */
.logo-img {
  mix-blend-mode: screen;            /* 黑底无缝融入深色背景 */
  object-fit: contain;
  border-radius: 6px;
}
/* 登录页左上角：高度略大于公司名文字块，贴近排列 */
.brand-row .logo-img { width: auto; height: 46px; flex-shrink: 0; margin-right: 8px; }
/* 系统侧边栏：44px，比原 36px 更醒目 */
.sidebar .brand .logo-img { width: 44px; height: 44px; filter: drop-shadow(0 0 8px rgba(95, 212, 154, 0.35)); }

/* 地图旗县文字标签不拦截鼠标（避免遮挡聚合点） */
#schMapSvg text { pointer-events: none; }

/* ============================================================
 * PWA 独立模式（iPhone「添加到主屏幕」后全屏打开）
 * black-translucent 状态栏下内容延伸到状态栏底部，需避让安全区
 * ============================================================ */
@media all and (display-mode: standalone) {
  .login-left { padding-top: calc(24px + env(safe-area-inset-top)); }
  .sidebar .brand { padding-top: calc(12px + env(safe-area-inset-top)); }
}

/* ============================================================
 * ICP 备案页脚（工信部要求：底部备案号 + 链接备案官网）
 * ============================================================ */
.icp-footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 5;
  text-align: center; padding: 5px 0 7px;
  background: rgba(5, 13, 24, 0.88);
  font-size: 11px; letter-spacing: .5px;
}
.icp-footer a { color: var(--text-3); text-decoration: none; transition: color .2s; }
.icp-footer a:hover { color: var(--primary-bright); }
