:root {
  --bg: #f5f7fa;
  --bg-soft: #eef2f8;
  --card: #ffffff;
  --primary: #2b5ce5;
  --primary-d: #1f48b8;
  --primary-l: #eaf0ff;
  --accent: #14b8a6;
  --text: #1f2329;
  --muted: #8a9099;
  --border: #e6e9ef;
  --danger: #e5484d;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(20, 40, 90, 0.06);
  --shadow-h: 0 14px 40px rgba(20, 40, 90, 0.10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ===== 通用按钮 ===== */
.btn {
  display: inline-block;
  padding: 11px 26px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--primary-d); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn.ghost:hover { background: var(--primary-l); }
.btn.light { background: #fff; color: var(--primary); }
.btn.light:hover { background: #f0f4ff; }

.msg { min-height: 18px; margin: 10px 0 0; font-size: 13px; color: var(--danger); text-align: center; }
.msg.ok { color: var(--primary); }

/* ===== 表单基础 ===== */
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
input, textarea, select {
  width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; color: var(--text); background: #fff; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--primary); }
textarea { resize: vertical; font-family: inherit; }

/* ===== 导航 ===== */
.nav {
  display: flex; align-items: center; gap: 16px;
  height: 64px; padding: 0 28px;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.nav-brand { font-weight: 800; font-size: 18px; color: var(--primary); white-space: nowrap; }
.nav-links { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--text); font-size: 14px; position: relative; padding: 6px 0; }
.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--primary); font-weight: 600; }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--primary); border-radius: 2px;
}
.nav-admin {
  background: var(--primary); color: #fff !important; padding: 7px 16px;
  border-radius: 8px; font-size: 13px;
}
.nav-admin:hover { background: var(--primary-d); }
.nav-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; margin-left: auto; color: var(--text); }

/* ===== 区块容器 ===== */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-title { text-align: center; margin-bottom: 38px; }
.section-title h2 { font-size: 28px; margin: 0 0 10px; }
.section-title p { color: var(--muted); margin: 0; font-size: 15px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.section-head h2 { font-size: 24px; margin: 0; }
.section-head a.more { color: var(--primary); font-size: 14px; white-space: nowrap; }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a 0%, #2b5ce5 55%, #4f7bf0 100%);
  color: #fff; padding: 92px 24px 100px; text-align: center;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.12), transparent 40%),
              radial-gradient(circle at 80% 60%, rgba(255,255,255,.10), transparent 45%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 880px; margin: 0 auto; }
.hero h1 { font-size: 42px; line-height: 1.25; margin: 0 0 16px; font-weight: 800; }
.hero-sub { font-size: 17px; opacity: .92; margin: 0 0 32px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-cta .btn.light { background: #fff; color: var(--primary); }
.hero-cta .btn.ghost-l { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); }
.hero-cta .btn.ghost-l:hover { background: rgba(255,255,255,.12); }

/* ===== 数据条 ===== */
.statbar { background: var(--card); border-bottom: 1px solid var(--border); }
.statbar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.statbar-item { padding: 30px 24px; text-align: center; border-right: 1px solid var(--border); }
.statbar-item:last-child { border-right: none; }
.statbar-item .v { font-size: 30px; font-weight: 800; color: var(--primary); }
.statbar-item .k { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ===== 服务卡片 ===== */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.svc-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: box-shadow .15s ease, transform .15s ease;
}
.svc-card:hover { box-shadow: var(--shadow-h); transform: translateY(-3px); }
.svc-icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--primary-l);
  display: flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 14px;
}
.svc-cat { font-size: 12px; color: var(--primary); background: var(--primary-l); padding: 2px 10px; border-radius: 999px; display: inline-block; margin-bottom: 10px; }
.svc-card h3 { margin: 0 0 8px; font-size: 18px; }
.svc-card p { margin: 0 0 12px; color: #4b5563; font-size: 14px; }
.svc-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.svc-tags .tag { font-size: 12px; color: var(--muted); background: var(--bg-soft); padding: 2px 8px; border-radius: 6px; }

/* ===== 案例 / 项目卡片（复用） ===== */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow .15s ease, transform .15s ease; cursor: default;
}
.project-card:hover { box-shadow: var(--shadow-h); transform: translateY(-2px); }
.pc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pc-title { font-size: 16px; font-weight: 700; }
.pc-code { font-size: 12px; color: var(--muted); }
.pc-badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.badge-type { font-size: 12px; background: #eef1f6; color: #4b5563; padding: 2px 10px; border-radius: 999px; }
.pc-metrics { display: flex; gap: 20px; }
.pc-metrics > div { display: flex; flex-direction: column; }
.pc-metrics .m-k { font-size: 12px; color: var(--muted); }
.pc-metrics .m-v { font-size: 15px; font-weight: 600; }
.pc-dates { font-size: 12px; color: var(--muted); }
.pc-owner { font-size: 13px; color: var(--text); }
.pc-desc { font-size: 13px; color: #4b5563; line-height: 1.6; }
.pc-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.pc-tags .tag { font-size: 12px; color: var(--primary); background: #eef3ff; padding: 2px 8px; border-radius: 6px; }

/* ===== 资讯卡片 ===== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0; overflow: hidden; cursor: pointer; transition: box-shadow .15s ease, transform .15s ease;
  display: flex; flex-direction: column;
}
.news-card:hover { box-shadow: var(--shadow-h); transform: translateY(-3px); }
.news-thumb { height: 140px; background: linear-gradient(135deg, #2b5ce5, #4f7bf0); display: flex; align-items: center; justify-content: center; font-size: 40px; color: #fff; }
.news-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-meta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; }
.news-card h3 { margin: 0; font-size: 17px; line-height: 1.4; }
.news-card p { margin: 0; color: #4b5563; font-size: 14px; flex: 1; }
.news-cat { color: var(--primary); }

/* 资讯详情模态 */
.modal-mask { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-mask.open { display: flex; }
.modal { background: #fff; border-radius: var(--radius); max-width: 720px; width: 100%; max-height: 86vh; overflow: auto; padding: 30px 32px; position: relative; }
.modal .close { position: absolute; top: 16px; right: 18px; font-size: 24px; cursor: pointer; color: var(--muted); background: none; border: none; width: auto; padding: 0; }
.modal h2 { margin: 0 0 10px; font-size: 22px; }
.modal .modal-meta { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.modal .modal-content { white-space: pre-wrap; color: #344; font-size: 15px; line-height: 1.9; }

/* ===== 优势 / 特性 ===== */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 22px;
}
.feature-card .f-icon { font-size: 30px; margin-bottom: 12px; }
.feature-card h3 { margin: 0 0 8px; font-size: 17px; }
.feature-card p { margin: 0; color: #4b5563; font-size: 14px; }

/* ===== CTA 横幅 ===== */
.cta-band { background: linear-gradient(135deg, #1e3a8a, #2b5ce5); color: #fff; border-radius: 18px; padding: 44px 40px; text-align: center; }
.cta-band h2 { margin: 0 0 10px; font-size: 26px; }
.cta-band p { margin: 0 0 22px; opacity: .92; }

/* ===== 关于我们 ===== */
.page-hero { background: linear-gradient(135deg, #1e3a8a, #2b5ce5); color: #fff; padding: 60px 24px; text-align: center; }
.page-hero h1 { font-size: 32px; margin: 0 0 10px; }
.page-hero p { margin: 0; opacity: .9; }
.about-lead { font-size: 17px; color: #344; max-width: 820px; margin: 0 auto; text-align: center; }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.value-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.value-card h3 { margin: 0 0 8px; font-size: 17px; color: var(--primary); }
.value-card p { margin: 0; color: #4b5563; font-size: 14px; }
.timeline { position: relative; margin: 10px 0 0; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding: 0 0 22px 14px; }
.tl-item::before { content: ''; position: absolute; left: -23px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--primary-l); }
.tl-item .yr { font-weight: 700; color: var(--primary); }
.tl-item .tt { font-weight: 600; }
.tl-item .td { color: #4b5563; font-size: 14px; }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.team-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; text-align: center; }
.team-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--primary-l); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; margin: 0 auto 12px; }
.team-card h3 { margin: 0 0 4px; font-size: 16px; }
.team-card p { margin: 0; color: var(--muted); font-size: 13px; }

/* ===== 联系我们 ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; }
.contact-info { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.contact-info h3 { margin: 0 0 16px; }
.contact-info .ci-row { display: flex; gap: 12px; margin-bottom: 16px; font-size: 14px; }
.contact-info .ci-row .ic { font-size: 20px; }
.contact-info .ci-row .ct { color: var(--muted); }
.contact-form { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.contact-form .row2 { display: flex; gap: 16px; }
.contact-form .row2 label { flex: 1; }
.contact-form button { width: 100%; margin-top: 6px; }
.map-ph { height: 200px; border-radius: 12px; background: var(--bg-soft); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; margin-top: 16px; border: 1px dashed var(--border); }

/* ===== 页脚 ===== */
.footer { background: #0f172a; color: #cbd5e1; margin-top: 40px; }
.foot-grid { max-width: 1160px; margin: 0 auto; padding: 48px 24px 30px; display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 32px; }
.foot-logo { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.foot-col h4 { color: #fff; font-size: 14px; margin: 0 0 14px; }
.foot-col a, .foot-col p { display: block; color: #cbd5e1; font-size: 13px; margin: 0 0 10px; }
.foot-col a:hover { color: #fff; }
.foot-bottom { border-top: 1px solid #1e293b; text-align: center; padding: 16px; font-size: 12px; color: #64748b; }

/* ===== 文章/项目表单（后台） ===== */
.article-form, .project-form, .record-form { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-top: 8px; }
.row2 { display: flex; gap: 16px; }
.row2 label { flex: 1; }

.st { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; }
.st-draft { background: #fff4e5; color: #c77700; }
.st-pub { background: #e6f7ec; color: #1a9c5b; }

/* ===== 后台 ===== */
.topbar { display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 20px; background: var(--card); border-bottom: 1px solid var(--border); }
.topbar .brand { font-weight: 600; }
.topbar .user { color: var(--muted); font-size: 13px; margin-left: auto; }
.topbar #logout { width: auto; padding: 7px 16px; font-size: 13px; }

.content { max-width: 1080px; margin: 24px auto; padding: 0 20px; }
.content h2 { font-size: 18px; }
.content h3 { font-size: 15px; margin-top: 28px; }

/* 后台标签页 */
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.tabs .tab { padding: 10px 18px; cursor: pointer; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs .tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 16px 0 24px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }
.stat-k { font-size: 13px; color: var(--muted); }
.stat-v { font-size: 22px; font-weight: 700; margin: 6px 0 4px; color: var(--text); }
.stat-sub { font-size: 12px; color: var(--muted); }

.grid { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.grid th, .grid td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; text-align: left; vertical-align: top; }
.grid th { background: #fafbfc; color: var(--muted); font-weight: 600; }
.grid tr:last-child td { border-bottom: none; }
.grid button { width: auto; padding: 5px 12px; font-size: 13px; margin-right: 6px; }
.grid button.del { background: var(--danger); }
.grid button.del:hover { filter: brightness(0.92); }

.filters { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 12px; }
.filters input { flex: 1; min-width: 200px; margin-top: 0; }
.filters select { width: auto; min-width: 130px; margin-top: 0; }

/* 后台动态行编辑（关于我们等） */
.dy-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.dy-row input, .dy-row textarea { margin-top: 0; }
.dy-row .dy-t { flex: 1; min-width: 120px; }
.dy-row .dy-d { flex: 2; min-width: 180px; }
.dy-row .dy-n { flex: 1.2; min-width: 100px; }
.dy-row .dy-r { flex: 1.6; min-width: 140px; }
.dy-row .dy-y, .dy-row .dy-av { max-width: 90px; }
.dy-del { flex: 0 0 auto; width: 32px; height: 38px; padding: 0; background: var(--danger); color: #fff; font-size: 18px; line-height: 1; border-radius: 6px; }
.dy-del:hover { filter: brightness(0.92); }
.btn-mini { width: auto; padding: 7px 14px; font-size: 13px; margin: 4px 0 18px; background: var(--primary-l); color: var(--primary); border: 1px dashed var(--primary); }
.btn-mini:hover { background: var(--primary); color: #fff; }

.p-name { font-weight: 600; }
.p-code { font-size: 12px; color: var(--muted); margin-top: 2px; }
.p-dept { font-size: 12px; color: var(--muted); }
.p-cost { font-size: 12px; color: var(--muted); }
.pbar { display: inline-block; width: 70px; height: 8px; border-radius: 999px; background: #eef1f6; overflow: hidden; vertical-align: middle; }
.pbar > span { display: block; height: 100%; background: var(--primary); }
.p-pct { font-size: 12px; color: var(--muted); margin-left: 6px; }

/* 状态徽章 */
.st-plan { background: #eef1f6; color: #6b7280; }
.st-active { background: #e6f7ec; color: #1a9c5b; }
.st-done { background: #e6f0ff; color: #2b6de5; }
.st-pause { background: #fff4e5; color: #c77700; }
.st-cancel { background: #fdeaea; color: #e5484d; }

/* ===== 登录页 ===== */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { width: 360px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 32px 28px; box-shadow: var(--shadow); }
.login-card h1 { margin: 0 0 24px; font-size: 20px; text-align: center; }
.login-back { text-align: center; margin-top: 14px; font-size: 13px; }
.login-back a { color: var(--muted); }
#projectForm button, #contactForm button, #recordForm button { width: auto; padding: 9px 28px; margin-top: 4px; }

.empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* ===== 智慧后勤管理登录弹窗 ===== */
.login-modal { max-width: 400px; padding: 34px 32px 26px; }
.login-modal .close { top: 12px; right: 16px; }
.lm-head { text-align: center; margin-bottom: 22px; }
.lm-logo {
  width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 16px;
  background: linear-gradient(135deg, #1e3a8a, #2b5ce5); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.login-modal h2 { margin: 0 0 6px; font-size: 21px; color: var(--text); }
.lm-head p { margin: 0; font-size: 13px; color: var(--muted); }
.login-form label {
  display: block; font-size: 14px; color: #4b5563; margin-bottom: 14px; font-weight: 500;
}
.login-form input {
  display: block; width: 100%; margin-top: 6px; padding: 11px 13px;
  border: 1px solid var(--border); border-radius: 10px; font-size: 15px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.login-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-l); }
.login-form .msg { margin: 4px 0 12px; }
.btn.block { display: block; width: 100%; padding: 12px; font-size: 16px; letter-spacing: 2px; }
.lm-foot { text-align: center; margin: 14px 0 0; font-size: 13px; }
.lm-foot a { color: var(--primary); }

/* ===== 响应式 ===== */
@media (max-width: 980px) {
  .svc-grid, .project-grid, .news-grid, .feature-grid, .value-grid, .team-grid { grid-template-columns: repeat(2, 1fr); }
  .statbar-grid { grid-template-columns: repeat(2, 1fr); }
  .statbar-item:nth-child(2) { border-right: none; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: #fff; padding: 12px 24px; border-bottom: 1px solid var(--border); gap: 4px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 30px; }
  .svc-grid, .project-grid, .news-grid, .feature-grid, .value-grid, .team-grid, .statbar-grid, .stat-cards { grid-template-columns: 1fr; }
  .statbar-item { border-right: none; border-bottom: 1px solid var(--border); }
  .contact-form .row2 { flex-direction: column; gap: 0; }
  .foot-grid { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
}
/* ===== 登录弹窗：密码显示切换 + 账号提示（2026-10-04） ===== */
.login-form .pwd-wrap { position: relative; display: block; }
.login-form .pwd-wrap input { width: 100%; padding-right: 44px; }
.login-form .pwd-eye {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; background: transparent; cursor: pointer;
  font-size: 17px; line-height: 1; opacity: .5; border-radius: 6px; padding: 0;
}
.login-form .pwd-eye:hover { opacity: 1; }
.login-form .pwd-eye.on { opacity: 1; }
.lm-hint {
  margin: 0 0 12px; padding: 8px 10px; border-radius: 8px;
  background: var(--primary-l); color: var(--muted); font-size: 12px; line-height: 1.7;
}
.lm-hint:empty { display: none; }
.lm-hint b { color: var(--primary); }
.lm-hint[style*="display:none"], .lm-hint[data-lmhint-hide] { display: none !important; }
