/* ===== 独立管理后台 · 浅色玻璃拟态版 ===== */
:root {
  --brand: #3b82f6;
  --brand2: #8b5cf6;
  --glass: rgba(255, 255, 255, .74);
  --glass-2: rgba(255, 255, 255, .55);
  --line: rgba(15, 23, 42, .09);
  --line-soft: rgba(15, 23, 42, .06);
  --text: #1e293b;
  --text2: #475569;
  --text3: #8592a8;
  --green: #12b76a;
  --red: #ef4444;
  --orange: #f59e0b;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 18px 40px -26px rgba(15, 23, 42, .35);
  --blur: blur(20px) saturate(150%);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
svg { flex-shrink: 0; }

body {
  margin: 0;
  font: 14px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background-color: #eef2f8;
  background-image: linear-gradient(150deg, #eaf1fb 0%, #f3f6fc 55%, #e8eefb 100%);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
/* 提亮遮罩：让壁纸变成浅色底，文字更清楚 */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(248, 251, 255, .62) 0%, rgba(240, 246, 255, .70) 100%);
  pointer-events: none;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============ 布局 ============ */
.app { display: flex; min-height: 100vh; }

/* ============ 侧栏（浅色磨砂） ============ */
.side {
  width: 236px; flex: 0 0 236px;
  background: rgba(255, 255, 255, .62);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: #475569;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 22px 20px 20px; }
.brand .dot {
  width: 38px; height: 38px; border-radius: 12px; flex: 0 0 38px;
  background: #fff url('../assets/img/logo.png') center / cover no-repeat;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .07);
  box-shadow: 0 8px 18px -10px rgba(15, 23, 42, .5);
  display: flex; align-items: center; justify-content: center;
}
.brand .dot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand .dot svg { width: 20px; height: 20px; color: #3b82f6; }
.brand strong { display: block; color: #0f172a; font-size: 14.5px; font-weight: 650; letter-spacing: .2px; }
.brand small { color: #8b9ab0; font-size: 11px; letter-spacing: .6px; }

.menu { padding: 8px 12px; flex: 1; overflow-y: auto; }
.menu::-webkit-scrollbar { width: 4px; }
.menu::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, .16); border-radius: 4px; }
.menu a {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 11px;
  color: #475569; font-size: 13.5px; margin-bottom: 3px;
  transition: background .18s, color .18s;
}
.menu a svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: .8; }
.menu a:hover { background: rgba(15, 23, 42, .05); color: #0f172a; text-decoration: none; }
.menu a.on {
  background: linear-gradient(135deg, rgba(59, 130, 246, .95), rgba(139, 92, 246, .92));
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(59, 130, 246, .85);
}
.menu a.on svg { opacity: 1; }

.side-foot {
  padding: 14px 20px 20px;
  border-top: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 9px; font-size: 12.5px;
}
.side-foot a { color: #7b8aa0; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.side-foot a svg { width: 16px; height: 16px; flex: 0 0 16px; opacity: .9; }
.side-foot a:hover { color: #2563eb; text-decoration: none; }

/* ============ 主区 ============ */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top {
  height: 64px;
  background: rgba(255, 255, 255, .55);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; position: sticky; top: 0; z-index: 10;
}
.top h1 { font-size: 17.5px; margin: 0; font-weight: 650; letter-spacing: .2px; color: #0f172a; }
.top-right { display: flex; align-items: center; gap: 14px; }
.who {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: 20px;
  background: rgba(255, 255, 255, .75);
  border: 1px solid var(--line);
  color: #475569; font-size: 12.5px;
}
.content { padding: 26px 28px 60px; max-width: 1440px; width: 100%; }

/* ============ 卡片 ============ */
.card {
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-radius: var(--radius);
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  animation: rise .3s ease both;
}
.card h2 {
  font-size: 15px; margin: 0 0 18px; font-weight: 650; color: #0f172a;
  display: flex; align-items: center; gap: 9px;
}
.card h2::before {
  content: ""; width: 3px; height: 15px; border-radius: 3px;
  background: linear-gradient(180deg, #3b82f6, #8b5cf6);
}
.card .sub { color: var(--text3); font-size: 12.5px; margin-top: -12px; margin-bottom: 16px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ============ 统计卡 ============ */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat {
  position: relative; overflow: hidden;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-radius: var(--radius);
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: var(--shadow);
  transition: transform .22s, box-shadow .22s;
}
.stat::after {
  content: ""; position: absolute; right: -26px; top: -26px;
  width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, .16), transparent 70%);
}
.stat:hover { transform: translateY(-3px); box-shadow: 0 24px 46px -26px rgba(15, 23, 42, .45); }
.stat .n {
  font-size: 28px; font-weight: 750; line-height: 1.2; letter-spacing: -.5px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat .t { color: var(--text3); font-size: 12.5px; margin-top: 3px; }
.stat.green .n { background: linear-gradient(135deg, #059669, #10b981); -webkit-background-clip: text; background-clip: text; }
.stat.orange .n { background: linear-gradient(135deg, #d97706, #f59e0b); -webkit-background-clip: text; background-clip: text; }
.stat.red .n { background: linear-gradient(135deg, #dc2626, #f87171); -webkit-background-clip: text; background-clip: text; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 17px; border: 1px solid transparent;
  border-radius: 11px; font-size: 13px; font-weight: 550; cursor: pointer;
  background: linear-gradient(135deg, #3b82f6, #7c3aed);
  color: #fff; line-height: 1.4; white-space: nowrap;
  box-shadow: 0 10px 24px -14px rgba(59, 130, 246, .9);
  transition: transform .16s, box-shadow .16s, filter .16s;
}
.btn:hover { text-decoration: none; filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.gray { background: rgba(255, 255, 255, .85); color: #475569; border-color: var(--line); box-shadow: none; }
.btn.gray:hover { background: #fff; filter: none; }
.btn.red { background: linear-gradient(135deg, #ef4444, #f87171); box-shadow: 0 10px 24px -14px rgba(239, 68, 68, .85); }
.btn.green { background: linear-gradient(135deg, #10b981, #34d399); box-shadow: 0 10px 24px -14px rgba(16, 185, 129, .85); }
.btn.orange { background: linear-gradient(135deg, #f59e0b, #fbbf24); box-shadow: 0 10px 24px -14px rgba(245, 158, 11, .85); color: #3a2600; }
.btn.purple { background: linear-gradient(135deg, #8b5cf6, #a78bfa); box-shadow: 0 10px 24px -14px rgba(139, 92, 246, .85); }
.btn.sm { padding: 5px 12px; font-size: 12px; border-radius: 9px; box-shadow: none; }
.btn.block { display: flex; width: 100%; }

/* ============ 表格 ============ */
.table-wrap {
  overflow-x: auto; border-radius: 13px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .28);
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid rgba(15, 23, 42, .05); vertical-align: middle; }
th {
  background: rgba(255, 255, 255, .66); color: #64748b;
  font-weight: 650; font-size: 12.5px; letter-spacing: .3px; white-space: nowrap;
}
tbody tr { transition: background .15s; }
tbody tr:nth-child(odd) { background: rgba(15, 23, 42, .045); }
tbody tr:nth-child(even) { background: rgba(255, 255, 255, .55); }
tbody tr:hover { background: rgba(59, 130, 246, .12); }
tbody tr:last-child td { border-bottom: none; }
td.url { max-width: 320px; word-break: break-all; color: #64748b; }
td.center, th.center { text-align: center; }
.empty { text-align: center; color: var(--text3); padding: 46px 0; font-size: 13px; }

/* 表格里的图标：强制小尺寸，防止 SVG 撑爆 */
td svg { max-width: 26px; max-height: 26px; }
.gicon {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; background: rgba(255, 255, 255, .7);
  border: 1px solid var(--line-soft);
  overflow: hidden; vertical-align: middle;
}
.gicon svg { width: 18px !important; height: 18px !important; display: block; }
.gicon img { width: 18px; height: 18px; object-fit: contain; display: block; }

/* ============ 标签 ============ */
.tag {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 550;
  border: 1px solid transparent;
}
.tag.on { background: rgba(16, 185, 129, .12); color: #047857; border-color: rgba(16, 185, 129, .25); }
.tag.off { background: rgba(239, 68, 68, .10); color: #b91c1c; border-color: rgba(239, 68, 68, .22); }
.tag.info { background: rgba(59, 130, 246, .12); color: #1d4ed8; border-color: rgba(59, 130, 246, .22); }
.tag.warn { background: rgba(245, 158, 11, .14); color: #b45309; border-color: rgba(245, 158, 11, .25); }
.tag.gray { background: rgba(15, 23, 42, .06); color: #64748b; border-color: rgba(15, 23, 42, .1); }

/* ============ 表单 ============ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
@media (max-width: 780px) { .form-grid { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field > label { display: block; font-size: 12.5px; color: #475569; margin-bottom: 7px; font-weight: 600; }
.field .hint { font-size: 12px; color: var(--text3); margin-top: 6px; line-height: 1.6; }
input[type=text], input[type=password], input[type=number], input[type=file], select, textarea {
  width: 100%; padding: 10px 13px;
  border: 1px solid rgba(15, 23, 42, .14);
  border-radius: 11px; font-size: 13.5px; font-family: inherit;
  color: #1e293b; background: rgba(255, 255, 255, .78);
  outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
input::placeholder, textarea::placeholder { color: #9aa7b8; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(59, 130, 246, .65);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .12);
}
textarea { resize: vertical; min-height: 84px; line-height: 1.6; }
input[type=file] { padding: 8px 12px; background: rgba(255, 255, 255, .55); }
.checks { display: flex; flex-wrap: wrap; gap: 18px; padding-top: 2px; }
.checks label { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #475569; }
input[type=radio], input[type=checkbox] { accent-color: #3b82f6; width: 15px; height: 15px; cursor: pointer; }

/* ============ 工具栏 ============ */
.toolbar { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }

/* ============ 提示条 ============ */
.flash {
  padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 13.5px;
  background: rgba(16, 185, 129, .10); color: #047857;
  border: 1px solid rgba(16, 185, 129, .25);
  display: flex; align-items: center; gap: 8px;
  animation: rise .25s ease both;
}
.flash::before { content: "✓"; font-weight: 700; }
.flash.err { background: rgba(239, 68, 68, .10); color: #b91c1c; border-color: rgba(239, 68, 68, .25); }
.flash.err::before { content: "!"; }

/* ============ 分页 ============ */
.pager { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.pager a {
  min-width: 33px; text-align: center;
  padding: 6px 11px; border-radius: 10px;
  background: rgba(255, 255, 255, .8); color: #475569;
  font-size: 12.5px; border: 1px solid var(--line);
  transition: all .15s;
}
.pager a:hover { background: #fff; text-decoration: none; }
.pager a.on {
  background: linear-gradient(135deg, #3b82f6, #7c3aed);
  color: #fff; border-color: transparent;
  box-shadow: 0 10px 22px -12px rgba(59, 130, 246, .9);
}
.pager .total { color: var(--text3); font-size: 12.5px; margin-left: 8px; }

/* ============ 选项卡 ============ */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tabs a {
  padding: 7px 15px; border-radius: 20px;
  background: rgba(255, 255, 255, .75); color: #475569;
  font-size: 12.5px; border: 1px solid var(--line);
  transition: all .16s;
}
.tabs a:hover { background: #fff; text-decoration: none; }
.tabs a.on {
  background: linear-gradient(135deg, #3b82f6, #7c3aed);
  color: #fff; border-color: transparent;
  box-shadow: 0 10px 22px -12px rgba(59, 130, 246, .9);
}

/* ============ 空状态 ============ */
.nothing { text-align: center; padding: 48px 0; color: var(--text3); }

/* ============ 小图 ============ */
.thumb {
  width: 28px; height: 28px; object-fit: contain; vertical-align: middle;
  border-radius: 7px; background: rgba(255, 255, 255, .7); padding: 2px;
}

/* ============ 登录页 ============ */
.login-body {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; margin: 0; padding: 20px;
  background-color: #eef2f8;
  background-image: linear-gradient(150deg, #eaf1fb 0%, #f3f6fc 55%, #e8eefb 100%);
  background-size: cover; background-position: center;
}
.login-body::before {
  content: ""; position: fixed; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(248, 251, 255, .62) 0%, rgba(240, 246, 255, .72) 100%);
  pointer-events: none;
}
.login-box {
  position: relative; z-index: 1;
  width: 100%; max-width: 380px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-radius: 20px; padding: 32px 30px 24px;
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: 0 34px 70px -30px rgba(15, 23, 42, .45);
  animation: rise .38s ease both;
}
.login-head { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.login-head .dot {
  width: 40px; height: 40px; border-radius: 13px; flex: 0 0 40px;
  background: #fff url('../assets/img/logo.png') center / cover no-repeat;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .07);
  box-shadow: 0 8px 18px -10px rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center;
}
.login-head .dot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.login-head .dot svg { width: 21px; height: 21px; color: #3b82f6; }
.login-head strong { display: block; font-size: 16px; font-weight: 650; color: #0f172a; }
.login-head small { color: #8b9ab0; font-size: 11.5px; letter-spacing: .6px; }
.login-box .flash { margin-bottom: 16px; }
.login-box .field { margin-bottom: 16px; }
.login-box .field > label { font-size: 12.5px; }
.login-box .btn.block { padding: 12px; font-size: 14px; margin-top: 6px; border-radius: 12px; }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row input { flex: 1; }
.captcha-row img {
  height: 41px; border-radius: 10px; border: 1px solid rgba(15, 23, 42, .14);
  cursor: pointer; background: #fff;
}
.login-foot { display: flex; justify-content: space-between; margin-top: 20px; font-size: 12.5px; }
.login-foot a { color: #8592a8; }
.login-foot a:hover { color: #2563eb; text-decoration: none; }

/* ============ 图表 ============ */
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .chart-grid { grid-template-columns: 1fr; } }
.chart-box { position: relative; height: 280px; min-width: 0; }

/* ============ 移动端 ============ */
.menu-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 10px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .75);
  color: #475569; font-size: 17px; cursor: pointer;
}

@media (max-width: 900px) {
  .app { display: block; }

  /* 侧栏变抽屉 */
  .side {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 250px; height: 100vh;
    transform: translateX(-102%);
    transition: transform .26s ease;
    z-index: 200;
    flex-direction: column;
    box-shadow: 0 0 60px rgba(15, 23, 42, .3);
    border-right: 1px solid var(--line);
  }
  body.nav-open .side { transform: none; }
  body.nav-open::after {
    content: ""; position: fixed; inset: 0; z-index: 150;
    background: rgba(15, 23, 42, .42);
  }
  .menu { display: block; }
  .side-foot { display: flex; }
  .menu-toggle { display: inline-flex; }

  /* 主区 */
  .main { width: 100%; }
  .top { padding: 0 14px; gap: 10px; height: 58px; }
  .top h1 { font-size: 15.5px; }
  .who { display: none; }
  .content { padding: 14px 12px 44px; }

  /* 卡片与统计 */
  .card { padding: 15px 14px; border-radius: 13px; margin-bottom: 12px; }
  .card h2 { font-size: 14px; margin-bottom: 12px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
  .stat { padding: 14px; border-radius: 13px; }
  .stat .n { font-size: 22px; }
  .stat .t { font-size: 11.5px; }

  /* 图表 */
  .chart-grid { grid-template-columns: 1fr; gap: 12px; }
  .chart-box { height: 220px; }

  /* 表单 */
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .field { margin-bottom: 14px; }
  .toolbar { gap: 6px; }
  .toolbar .btn { padding: 7px 11px; font-size: 12px; }
  .toolbar input[type=text], .toolbar input[type=date], .toolbar select { max-width: 100%; }
  .tabs a { padding: 6px 11px; font-size: 12px; }

  /* 表格横向滚动 */
  th, td { padding: 9px 8px; font-size: 12.5px; }
  table { min-width: 620px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }

  .pager { gap: 5px; }
  .pager a { padding: 5px 9px; }
}

/* 无壁纸兜底 */
body.no-wallpaper { background-image: linear-gradient(150deg, #eaf1fb 0%, #f5f8fd 55%, #e8eefb 100%); }
