/* ============================================================
   产业大脑平台 - 门户通用样式
   ============================================================ */
:root {
  --primary: #1a6dff;
  --primary-dark: #0f4fd6;
  --primary-light: #e8f1ff;
  --success: #22b07d;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text: #1f2d3d;
  --text-sub: #6b7a8d;
  --bg: #f4f6fa;
  --card: #ffffff;
  --border: #e6eaf2;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(31, 45, 61, 0.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { opacity: 0.85; }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(92deg, #0a2463 0%, #123d8f 45%, #1a6dff 100%);
  box-shadow: 0 3px 16px rgba(10, 36, 99, 0.28);
  border-bottom: 1px solid rgba(43, 211, 255, 0.25);
}
.topbar::before {
  content: ""; display: block; height: 2px;
  background: linear-gradient(90deg, transparent, #2bd3ff 30%, #7fd4ff 50%, #2bd3ff 70%, transparent);
}
.topbar-inner {
  max-width: 1500px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; height: 62px; gap: 10px;
  flex-wrap: nowrap; overflow: hidden;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; flex-shrink: 0; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, #2bd3ff, #1a6dff 70%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 19px; color: #fff;
  box-shadow: 0 0 14px rgba(43, 211, 255, 0.55), inset 0 0 6px rgba(255,255,255,0.25);
}
.brand .brand-text { display: flex; flex-direction: column; line-height: 1.2; flex-shrink: 0; }
.brand .name { font-size: 19px; font-weight: 800; letter-spacing: 3px; background: linear-gradient(180deg, #fff 55%, #a8d8ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; }
.brand .sub { font-size: 9px; color: rgba(255,255,255,0.55); letter-spacing: 2.5px; margin-top: 1px; white-space: nowrap; }
.nav {
  display: flex; align-items: center; gap: 3px; flex-wrap: nowrap;
  flex: 1 1 auto; min-width: 0; overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav .nav-item {
  display: flex; align-items: center; gap: 5px; flex-shrink: 0;
  color: rgba(255,255,255,0.88); padding: 8px 11px; border-radius: 9px;
  font-size: 13.5px; transition: all .18s; white-space: nowrap;
}
.nav .nav-item:hover { background: rgba(255,255,255,0.14); color: #fff; transform: translateY(-1px); }
.nav .nav-item.active {
  background: rgba(255,255,255,0.2); color: #fff; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}
.nav-ico { font-size: 15px; line-height: 1; }

/* ---------- 更多服务下拉（精美网格） ---------- */
.nav-more { position: relative; flex-shrink: 0; }
.nav-more .nav-more-btn {
  display: flex; align-items: center; gap: 5px; flex-shrink: 0;
  color: rgba(255,255,255,0.88); padding: 8px 12px; border-radius: 9px;
  font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: all .18s;
}
.nav-more:hover .nav-more-btn, .nav-more.open .nav-more-btn {
  background: rgba(255,255,255,0.2); color: #fff; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}
.more-caret { font-size: 10px; transition: transform .2s; }
.nav-more:hover .more-caret, .nav-more.open .more-caret { transform: rotate(180deg); }
.nav-more-menu {
  display: none; position: absolute; top: calc(100% + 10px); right: 0; z-index: 300;
  width: 360px; min-width: 360px; background: #fff; border-radius: 14px; padding: 10px;
  box-shadow: 0 16px 44px rgba(10, 36, 99, 0.22); border: 1px solid #e8edf7;
  flex-wrap: wrap; gap: 4px;
}
.nav-more:hover .nav-more-menu, .nav-more.open .nav-more-menu { display: flex; }
.nav-more-menu::before {
  content: ""; position: absolute; top: -6px; right: 46px; width: 12px; height: 12px;
  background: #fff; border-left: 1px solid #e8edf7; border-top: 1px solid #e8edf7;
  transform: rotate(45deg);
}
.nav-more-menu .more-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: #1f2d3d; transition: all .15s; min-width: 0;
  width: calc(50% - 2px); box-sizing: border-box;
}
.nav-more-menu .more-item:hover { background: #eef4ff; }
.nav-more-menu .more-item.active { background: #e8f1ff; }
.more-item .more-ico {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: #eef4ff; display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.more-item:hover .more-ico { background: #dcebff; }
.more-item.active .more-ico { background: #d6e8ff; }
.more-item .more-txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.more-item .more-txt b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.more-item .more-txt small { font-size: 11px; color: #9aa7b8; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 顶栏搜索 ---------- */
.top-search {
  display: flex; align-items: center; flex-shrink: 0;
  background: rgba(255,255,255,0.13); border: 1px solid rgba(255,255,255,0.22);
  border-radius: 20px; padding: 3px 4px 3px 14px; height: 34px; transition: all .2s;
}
.top-search:focus-within { background: #fff; border-color: #fff; box-shadow: 0 4px 16px rgba(10,36,99,0.25); }
.top-search input {
  width: 170px; background: none; border: none; outline: none; color: #fff; font-size: 12.5px;
}
.top-search input::placeholder { color: rgba(255,255,255,0.6); }
.top-search:focus-within input { color: #1f2d3d; }
.top-search:focus-within input::placeholder { color: #9aa7b8; }
.top-search button {
  height: 26px; padding: 0 12px; border: none; border-radius: 16px; cursor: pointer;
  background: linear-gradient(90deg, #1a6dff, #2bd3ff); color: #fff; font-size: 12px; font-weight: 600;
}
.top-search button:hover { opacity: .9; }
.topbar-right { color: rgba(255,255,255,0.85); font-size: 13px; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.topbar-right .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #2bd3ff, #1a6dff);
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  box-shadow: 0 0 8px rgba(43, 211, 255, 0.4);
}
.topbar-right .uname { white-space: nowrap; }

/* ---------- 响应式：任何宽度不换行不堆叠 ---------- */
@media (max-width: 1360px) {
  .top-search { display: none; }
}
@media (max-width: 1160px) {
  .brand .sub { display: none; }
  .nav .nav-item { padding: 8px 9px; font-size: 13px; }
  .nav-more .nav-more-btn { padding: 8px 10px; font-size: 13px; }
}
@media (max-width: 1020px) {
  .brand .brand-text { display: none; }
  .topbar-right .uname { display: none; }
  .nav .nav-item { padding: 8px 8px; }
}

/* ---------- 布局 ---------- */
.container { max-width: 1440px; margin: 0 auto; padding: 20px; }
.page-head { margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; }
.page-head h2 { font-size: 21px; font-weight: 700; }
.page-head .desc { color: var(--text-sub); font-size: 13px; margin-top: 2px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--border);
  padding: 18px; margin-bottom: 16px;
}
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card-title::before { content: ""; width: 4px; height: 16px; background: var(--primary); border-radius: 2px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- 指标卡 ---------- */
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat-card .label { color: var(--text-sub); font-size: 13px; }
.stat-card .value { font-size: 28px; font-weight: 800; margin: 6px 0 2px; color: var(--primary-dark); font-family: "DIN Alternate", "Segoe UI", sans-serif; }
.stat-card .value small { font-size: 13px; font-weight: 400; color: var(--text-sub); margin-left: 3px; }
.stat-card .trend { font-size: 12px; color: var(--success); }
.stat-card .trend.down { color: var(--danger); }
.stat-card .icon {
  float: right; width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
  background: #f8fafd; color: var(--text-sub); font-weight: 600;
  padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table td { padding: 11px 12px; border-bottom: 1px solid #f0f3f8; vertical-align: middle; }
.data-table tr:hover td { background: #f7faff; }
.data-table .num { font-family: "DIN Alternate", "Segoe UI", monospace; font-weight: 600; }

/* ---------- 徽章 ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-blue { background: var(--primary-light); color: var(--primary-dark); }
.badge-green { background: #e3f8f0; color: var(--success); }
.badge-orange { background: #fdf1e0; color: #d97706; }
.badge-red { background: #fdeaea; color: var(--danger); }
.badge-gray { background: #eef1f5; color: var(--text-sub); }
.badge-purple { background: #f0eafd; color: #7c3aed; }

/* ---------- 表单 ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.toolbar select, .toolbar input[type="text"] {
  height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; font-size: 13px; color: var(--text); outline: none; min-width: 150px;
}
.toolbar select:focus, .toolbar input[type="text"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,109,255,.12); }
.btn {
  height: 36px; padding: 0 16px; border: none; border-radius: 8px; cursor: pointer;
  font-size: 13px; font-weight: 600; transition: all .2s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }

/* ---------- 分页 ---------- */
.pagination { display: flex; gap: 6px; justify-content: flex-end; margin-top: 14px; }
.pagination button {
  min-width: 32px; height: 32px; border: 1px solid var(--border); background: #fff;
  border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text);
}
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- 首页架构区 ---------- */
.hero {
  background: linear-gradient(135deg, #0b2d6b 0%, #14479e 55%, #1a6dff 100%);
  color: #fff; border-radius: 14px; padding: 40px; margin-bottom: 20px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(43,211,255,.35), transparent 70%); border-radius: 50%;
}
.hero h1 { font-size: 28px; letter-spacing: 2px; margin-bottom: 10px; }
.hero p { color: rgba(255,255,255,.85); max-width: 760px; font-size: 14px; }
.hero .tags { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.hero .tag { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); padding: 4px 14px; border-radius: 20px; font-size: 12.5px; }

.module-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; position: relative;
}
.module-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(31,45,61,.1); }
.module-card .m-icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 12px;
}
.module-card h3 { font-size: 16px; margin-bottom: 6px; }
.module-card p { color: var(--text-sub); font-size: 12.5px; min-height: 38px; }
.module-card .m-link { margin-top: 10px; display: inline-block; font-size: 13px; font-weight: 600; }

.arch-block { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 16px; background: var(--card); }
.arch-block .arch-head { padding: 12px 18px; font-weight: 700; color: #fff; font-size: 15px; letter-spacing: 1px; }
.arch-block .arch-body { padding: 16px 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.arch-tag {
  background: #f5f8ff; border: 1px solid #d9e6ff; color: var(--primary-dark);
  padding: 6px 14px; border-radius: 8px; font-size: 13px; cursor: pointer; transition: all .2s;
}
.arch-tag:hover { background: var(--primary-light); border-color: var(--primary); }
.arch-tag.strong { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }

/* ---------- 其他 ---------- */
.empty { text-align: center; color: var(--text-sub); padding: 40px 0; font-size: 13px; }
.footer { text-align: center; color: #9aa7b8; font-size: 12px; padding: 24px 0 30px; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; }
.loading { text-align: center; color: var(--text-sub); padding: 30px 0; }
.el { max-height: 380px; }
