/* =====================================================================
   管理控制台 —— 设计系统
   品牌色 #AADE00 亮黄绿 / 白底黑字扁平风 / 与 App 端同一套视觉语言
   ===================================================================== */
:root {
  --brand: #AADE00;
  --brand-deep: #8CBF00;
  --brand-dark: #6E9A00;
  --brand-ink: #3D5A00;
  --brand-soft: #F5FFDD;
  --brand-softer: #FAFFEE;

  --bg: #F4F5F7;
  --card: #FFFFFF;
  --ink: #191D23;
  --ink2: #5C6470;
  --ink3: #9AA1AB;
  --line: #E6E8EC;
  --line2: #F0F1F4;

  --red: #E5484D;   --red-bg: #FFF0F0;   --red-ink: #B42318;
  --green: #2FA84F; --green-bg: #EDF9F0; --green-ink: #1B7F3B;
  --amber: #F5A623; --amber-bg: #FFF7E6; --amber-ink: #B25E09;
  --blue: #3E7BFA;  --blue-bg: #EEF3FE;  --blue-ink: #2456B8;
  --purple:#8B5CF6; --purple-bg:#F3EFFE; --purple-ink:#6D3FD4;

  --r-lg: 14px; --r-md: 10px; --r-sm: 8px; --r-full: 999px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(16,24,40,.05);
  --shadow-lg: 0 8px 40px rgba(16,24,40,.14);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink);
  font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  background: var(--line2); border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 7px; font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
::selection { background: var(--brand); color: #fff; }

/* ============================ 登录页 ============================ */
.login-body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(170,222,0,.16), transparent 60%),
    radial-gradient(900px 420px at 90% 110%, rgba(170,222,0,.10), transparent 55%),
    var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px;
}
.login-wrap { width: 100%; max-width: 408px; }
.login-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 40px 36px 32px;
  box-shadow: var(--shadow-lg);
  animation: loginIn .5s var(--ease);
}
@keyframes loginIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.login-brand { text-align: center; margin-bottom: 26px; }
.login-logo {
  width: 68px; height: 68px; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  border-radius: 20px; display: flex; align-items: center; justify-content: center;
  font-size: 36px; box-shadow: 0 8px 22px rgba(140,191,0,.35);
}
.login-brand h1 { font-size: 23px; margin: 0 0 4px; letter-spacing: .5px; }
.login-thin { color: var(--ink3); font-weight: 500; }
.login-brand p { margin: 0; color: var(--ink2); font-size: 13px; }
.login-err {
  background: var(--red-bg); border: 1px solid #F6C9CA; color: var(--red-ink);
  border-radius: var(--r-md); padding: 10px 14px; font-size: 13px; margin-bottom: 16px;
  animation: shake .35s var(--ease);
}
@keyframes shake { 0%,100%{transform:none} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }
.login-hint { color: var(--ink3); font-size: 12px; text-align: center; margin: 18px 0 0; line-height: 1.7; }
.login-foot { text-align: center; color: var(--ink3); font-size: 12px; margin-top: 20px; }
.f-label { display: block; font-size: 13px; color: var(--ink2); margin: 14px 0 6px; font-weight: 500; }
.login-field { position: relative; display: flex; align-items: center; }
.login-field .f-ico { position: absolute; left: 13px; font-size: 15px; opacity: .75; pointer-events: none; }
.login-field input {
  width: 100%; height: 46px; padding: 0 44px 0 40px;
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  font-size: 15px; background: #FBFBFC; color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background .15s;
}
.login-field input:focus {
  outline: none; border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 4px rgba(170,222,0,.16);
}
.f-eye {
  position: absolute; right: 6px; width: 34px; height: 34px;
  border: none; background: none; cursor: pointer; font-size: 15px; border-radius: var(--r-sm);
}
.f-eye:hover { background: var(--line2); }

/* ============================ 布局骨架 ============================ */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; flex-shrink: 0; background: var(--card);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 40;
}
.side-brand {
  display: flex; align-items: center; gap: 9px;
  padding: 18px 18px 14px; border-bottom: 1px solid var(--line2);
}
.brand-ico {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.brand-name { font-weight: 700; font-size: 15.5px; letter-spacing: .3px; }
.brand-ver {
  margin-left: auto; font-size: 10.5px; color: var(--brand-dark);
  background: var(--brand-soft); border: 1px solid #E4F5B0;
  padding: 1px 7px; border-radius: var(--r-full); font-weight: 600;
}
.side-search { padding: 12px 14px 8px; }
.side-search input {
  width: 100%; height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 13px; background: #FBFBFC; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.side-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(170,222,0,.15); background:#fff; }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 16px; scrollbar-width: thin; }
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.side-foot { padding: 10px 18px; border-top: 1px solid var(--line2); color: var(--ink3); font-size: 11px; letter-spacing: .4px; }

.nav-group { margin-bottom: 2px; }
.nav-gtitle {
  width: 100%; display: flex; align-items: center; gap: 7px;
  border: none; background: none; cursor: pointer;
  padding: 9px 10px 6px; font-size: 11.5px; font-weight: 700;
  color: var(--ink3); letter-spacing: 1px; text-transform: uppercase;
  font-family: inherit;
}
.nav-gtitle .g-arrow { margin-left: auto; font-size: 10px; transition: transform .2s var(--ease); }
.nav-group.open .nav-gtitle .g-arrow { transform: rotate(180deg); }
.nav-gitems { display: none; padding-bottom: 4px; }
.nav-group.open .nav-gitems { display: block; }
.nav-item {
  display: flex !important; align-items: center; gap: 9px;
  padding: 8.5px 10px; border-radius: var(--r-sm);
  color: var(--ink2); font-size: 13.5px; text-decoration: none;
  margin-bottom: 1px; position: relative;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--line2); color: var(--ink); text-decoration: none; }
.nav-item.on {
  background: var(--brand-soft); color: var(--brand-ink); font-weight: 600;
}
.nav-item.on::before {
  content: ''; position: absolute; left: -10px; top: 7px; bottom: 7px;
  width: 3px; border-radius: 3px; background: var(--brand);
}
.nav-item .n-ico { width: 18px; text-align: center; flex-shrink: 0; }
.dot-badge {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: 10.5px; font-weight: 700; min-width: 17px; height: 17px;
  border-radius: var(--r-full); display: inline-flex; align-items: center; justify-content: center;
  padding: 0 5px; font-style: normal;
}
.nav-item.hide { display: none !important; }
.nav-empty { color: var(--ink3); font-size: 12.5px; text-align: center; padding: 22px 8px; display: none; }
.nav.searching .nav-empty { display: block; }
.nav.searching .nav-group { display: none; }
.nav.searching .nav-group.hit { display: block; }
.nav.searching .nav-group.hit .nav-gitems { display: block; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  height: 58px; padding: 0 22px;
  background: rgba(255,255,255,.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.crumb { font-size: 13px; color: var(--ink3); display: flex; align-items: center; gap: 8px; min-width: 0; }
.crumb b { color: var(--ink); font-size: 15px; font-weight: 700; }
.crumb .sep { color: var(--line); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-user {
  font-size: 12.5px; color: var(--ink2); background: var(--line2);
  padding: 4px 12px; border-radius: var(--r-full); white-space: nowrap;
}
.nav-toggle { display: none; }
.content { flex: 1; padding: 24px; max-width: 1240px; width: 100%; margin: 0 auto; outline: none; }
.content:focus { outline: none; }

/* ============================ 通用组件 ============================ */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  margin-bottom: 18px; overflow: hidden;
}
.card-hd {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px 0;
}
.card-hd h2 { font-size: 15.5px; margin: 0; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-hd .sub { font-size: 12.5px; color: var(--ink3); margin-top: 2px; }
.card-hd .hd-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-bd { padding: 16px 20px 20px; }
.card-bd.tight { padding-top: 8px; }
.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: 21px; margin: 0 0 4px; font-weight: 800; letter-spacing: .2px; }
.page-head p { margin: 0; color: var(--ink2); font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid transparent; cursor: pointer;
  font-size: 13.5px; font-weight: 500; font-family: inherit;
  transition: all .15s var(--ease); white-space: nowrap;
  text-decoration: none; user-select: none;
}
.btn:hover { text-decoration: none; }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 2px 8px rgba(140,191,0,.28); }
.btn.primary:hover { background: var(--brand-deep); box-shadow: 0 4px 14px rgba(140,191,0,.34); }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--ink2); }
.btn.ghost:hover { border-color: #D3D6DC; color: var(--ink); background: #FBFBFC; }
.btn.danger { background: #fff; border-color: #F3C1C2; color: var(--red-ink); }
.btn.danger:hover { background: var(--red-bg); }
.btn.soft { background: var(--brand-soft); color: var(--brand-ink); border-color: #E2F5B2; }
.btn.soft:hover { background: #ECFBC4; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn.lg { height: 46px; font-size: 15px; border-radius: var(--r-md); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.loading { pointer-events: none; opacity: .7; }
.btn.loading::after {
  content: ''; width: 13px; height: 13px; border: 2px solid currentColor;
  border-radius: 50%; border-top-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 表单 */
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.f-grid .span2 { grid-column: span 2; }
.f-row { margin-bottom: 14px; }
.f-row:last-child { margin-bottom: 0; }
.f-row label, .f-label { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 6px; font-weight: 500; }
.f-row label .req { color: var(--red); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: 8px 12px; font-size: 13.5px; font-family: inherit;
  background: #FBFBFC; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.textarea { min-height: 88px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 4px rgba(170,222,0,.14);
}
.input::placeholder, .textarea::placeholder { color: var(--ink3); }
.f-hint { font-size: 12px; color: var(--ink3); margin-top: 5px; line-height: 1.6; }
.f-err { font-size: 12px; color: var(--red-ink); margin-top: 5px; }

/* 开关 */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .sw {
  width: 42px; height: 24px; border-radius: var(--r-full);
  background: #D8DBE0; position: relative; transition: background .2s var(--ease); flex-shrink: 0;
}
.switch .sw::after {
  content: ''; position: absolute; top: 2.5px; left: 2.5px; width: 19px; height: 19px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.22);
  transition: transform .2s var(--ease);
}
.switch input:checked + .sw { background: var(--brand); }
.switch input:checked + .sw::after { transform: translateX(18px); }
.switch .sw-txt { font-size: 13px; color: var(--ink2); }

/* 表格 */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--line); }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
.table th {
  text-align: left; padding: 10px 14px; font-size: 12px; font-weight: 600;
  color: var(--ink2); background: #FAFAFB; border-bottom: 1px solid var(--line);
  white-space: nowrap; letter-spacing: .3px;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: #FBFCF7; }
.table .mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--ink2); }
.table .acts { white-space: nowrap; }
.table .acts .btn { margin-left: 6px; }
.table .acts .btn:first-child { margin-left: 0; }

/* 标签 / 徽章 */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; padding: 2px 9px;
  border-radius: var(--r-full); white-space: nowrap;
}
.tag.gray { background: var(--line2); color: var(--ink2); }
.tag.green { background: var(--green-bg); color: var(--green-ink); }
.tag.red { background: var(--red-bg); color: var(--red-ink); }
.tag.amber { background: var(--amber-bg); color: var(--amber-ink); }
.tag.blue { background: var(--blue-bg); color: var(--blue-ink); }
.tag.purple { background: var(--purple-bg); color: var(--purple-ink); }
.tag.brand { background: var(--brand-soft); color: var(--brand-ink); }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .18s var(--ease), box-shadow .18s;
}
.stat:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(16,24,40,.09); }
.stat .s-ico {
  position: absolute; right: 12px; top: 12px; width: 38px; height: 38px;
  border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.stat .s-num { font-size: 26px; font-weight: 800; letter-spacing: -.5px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat .s-label { font-size: 12.5px; color: var(--ink2); margin-top: 3px; }
.stat .s-foot { font-size: 11.5px; color: var(--ink3); margin-top: 6px; }
.stat.c-brand .s-ico { background: var(--brand-soft); }
.stat.c-blue .s-ico { background: var(--blue-bg); }
.stat.c-green .s-ico { background: var(--green-bg); }
.stat.c-amber .s-ico { background: var(--amber-bg); }
.stat.c-red .s-ico { background: var(--red-bg); }
.stat.c-purple .s-ico { background: var(--purple-bg); }

/* 空态 */
.empty { text-align: center; padding: 44px 20px; color: var(--ink3); }
.empty .e-ico { font-size: 40px; margin-bottom: 10px; opacity: .8; }
.empty p { margin: 0; font-size: 13px; }

/* 分页 */
.pager { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.pager .p-info { font-size: 12.5px; color: var(--ink3); margin-right: auto; }

/* 页签 */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs .t {
  padding: 9px 15px; font-size: 13.5px; color: var(--ink2); cursor: pointer;
  border: none; background: none; font-family: inherit; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 6px 6px 0 0;
  transition: color .15s, border-color .15s, background .15s;
}
.tabs .t:hover { color: var(--ink); background: var(--line2); }
.tabs .t.on { color: var(--brand-ink); border-bottom-color: var(--brand); font-weight: 600; }
.tabs .t .cnt { color: var(--ink3); font-weight: 400; font-size: 12px; margin-left: 3px; }

/* 提示条 */
.notice {
  border-radius: var(--r-md); padding: 11px 15px; font-size: 13px;
  display: flex; gap: 9px; align-items: flex-start; margin-bottom: 14px; line-height: 1.65;
}
.notice.brand { background: var(--brand-softer); border: 1px solid #E2F5B2; color: var(--brand-ink); }
.notice.amber { background: var(--amber-bg); border: 1px solid #F5DFA8; color: var(--amber-ink); }
.notice.blue { background: var(--blue-bg); border: 1px solid #C9DBFC; color: var(--blue-ink); }
.notice.red { background: var(--red-bg); border: 1px solid #F6C9CA; color: var(--red-ink); }

/* 双列布局（概览/版本发布等页） */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* 用户头像 */
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #E9F5C8, #D2E89A);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; overflow: hidden; border: 1px solid var(--line);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.user-cell .u-n { min-width: 0; }
.user-cell .u-n b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-cell .u-n span { display: block; font-size: 11.5px; color: var(--ink3); }

/* 聊天气泡（后台预览） */
.msg-list { display: flex; flex-direction: column; gap: 10px; }
.msg {
  display: flex; gap: 10px; padding: 11px 13px;
  border: 1px solid var(--line2); border-radius: var(--r-md); background: #FDFDFE;
}
.msg:hover { border-color: var(--line); }
.msg .m-body { flex: 1; min-width: 0; }
.msg .m-meta { font-size: 11.5px; color: var(--ink3); margin-bottom: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.msg .m-meta b { color: var(--ink2); font-size: 12.5px; }
.msg .m-text { font-size: 13px; word-break: break-word; white-space: pre-wrap; }
.msg .m-img { max-width: 180px; border-radius: 8px; margin-top: 6px; display: block; }

/* 轮播卡片 */
.banner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 14px; }
.banner-card { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: #fff; }
.banner-card.off { opacity: .62; }
.banner-card .b-pic {
  height: 128px; background: var(--line2) center/cover no-repeat;
  display: flex; align-items: center; justify-content: center; color: var(--ink3); font-size: 12px;
  border-bottom: 1px solid var(--line2);
}
.banner-card .b-bd { padding: 11px 13px; }
.banner-card .b-title { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.banner-card .b-sub { font-size: 12px; color: var(--ink3); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner-card .b-acts { display: flex; gap: 6px; align-items: center; }
.banner-card .b-sort { margin-left: auto; font-size: 11.5px; color: var(--ink3); }

/* 上传区 */
.upload {
  border: 2px dashed var(--line); border-radius: var(--r-md);
  padding: 26px 18px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s; color: var(--ink2);
}
.upload:hover, .upload.drag { border-color: var(--brand); background: var(--brand-softer); }
.upload .u-ico { font-size: 30px; margin-bottom: 6px; }
.upload p { margin: 0; font-size: 13px; }
.upload .u-hint { font-size: 12px; color: var(--ink3); margin-top: 4px; }
.upload progress { width: 100%; margin-top: 10px; height: 8px; accent-color: var(--brand); }

/* 健康条 */
.health-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line2); }
.health-row:last-child { border-bottom: none; }
.health-row .h-key { flex: 1; min-width: 0; font-size: 12.5px; font-family: ui-monospace, Consolas, monospace; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.h-dot.ok { background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.h-dot.down { background: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.h-dot.unknown { background: var(--ink3); box-shadow: 0 0 0 3px var(--line2); }

/* 迷你柱状图 */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding-top: 8px; }
.bars .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .bar {
  width: 100%; max-width: 34px; border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--brand), var(--brand-deep));
  min-height: 2px; transition: height .5s var(--ease); position: relative;
}
.bars .bar.blue { background: linear-gradient(180deg, #6EA1FF, #3E7BFA); }
.bars .bar-col:hover .bar { filter: brightness(1.08); }
.bars .bar-val { font-size: 10.5px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.bars .bar-day { font-size: 11px; color: var(--ink3); }
.bars-legend { display: flex; gap: 16px; font-size: 12px; color: var(--ink2); margin-top: 10px; }
.bars-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }

/* 版本分布条 */
.dist-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.dist-row .d-name { width: 74px; font-size: 12.5px; color: var(--ink2); text-align: right; flex-shrink: 0; }
.dist-row .d-bar { flex: 1; height: 14px; background: var(--line2); border-radius: 4px; overflow: hidden; }
.dist-row .d-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-deep)); border-radius: 4px; }
.dist-row .d-n { width: 44px; font-size: 12px; color: var(--ink3); font-variant-numeric: tabular-nums; }

/* ============================ 弹窗 ============================ */
.modal-wrap {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(23,26,32,.44); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 22px;
  animation: fadeIn .18s var(--ease);
}
.modal-wrap[hidden] { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 520px;
  max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: modalIn .24s var(--ease);
}
.modal.wide { max-width: 680px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-hd { display: flex; align-items: center; padding: 17px 22px 0; }
.modal-hd h3 { margin: 0; font-size: 16px; font-weight: 700; }
.modal-hd .m-x { margin-left: auto; border: none; background: none; font-size: 19px; color: var(--ink3); cursor: pointer; width: 32px; height: 32px; border-radius: var(--r-sm); }
.modal-hd .m-x:hover { background: var(--line2); color: var(--ink); }
.modal-bd { padding: 16px 22px; overflow-y: auto; }
.modal-ft { padding: 14px 22px 20px; display: flex; gap: 10px; justify-content: flex-end; }
.modal-ft .btn { min-width: 88px; }

/* ============================ Toast ============================ */
.toast-wrap {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none; width: max-content; max-width: 92vw;
}
.toast {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-full);
  box-shadow: 0 8px 30px rgba(16,24,40,.16);
  padding: 9px 18px; font-size: 13.5px; font-weight: 500;
  display: flex; align-items: center; gap: 9px;
  animation: toastIn .28s var(--ease); pointer-events: auto;
}
.toast.out { animation: toastOut .25s var(--ease) forwards; }
.toast .t-ico { font-size: 15px; }
.toast.ok { border-color: #CDEFB8; background: linear-gradient(180deg, #F7FFEE, #fff); color: var(--green-ink); }
.toast.err { border-color: #F6C9CA; background: linear-gradient(180deg, #FFF5F5, #fff); color: var(--red-ink); }
.toast.info { border-color: #C9DBFC; color: var(--blue-ink); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) scale(.97); } }

/* ============================ 响应式 ============================ */
@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-100%); transition: transform .25s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .shell.nav-open .sidebar { transform: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border: 1px solid var(--line); background: #fff;
    border-radius: var(--r-sm); cursor: pointer; font-size: 16px; color: var(--ink2);
  }
  .content { padding: 16px; }
  .f-grid { grid-template-columns: 1fr; }
  .f-grid .span2 { grid-column: span 1; }
  .top-user { display: none; }
}
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .s-num { font-size: 22px; }
  .page-head h1 { font-size: 19px; }
  .topbar { padding: 0 14px; }
}

/* 进场动画 */
.fade-in { animation: fadeUp .3s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===== 升级日志（后台管理） ===== */
.cl-empty { color: var(--muted); padding: 18px 4px; font-size: 13px; }
.cl-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 4px; border-bottom: 1px solid var(--line);
}
.cl-item:last-child { border-bottom: none; }
.cl-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cl-title { font-size: 14px; font-weight: 600; color: var(--ink); word-break: break-all; }
.cl-time { font-size: 12px; color: var(--muted); }
.cl-ops { display: flex; gap: 8px; flex-shrink: 0; }
.cl-sub { display: flex; align-items: center; gap: 8px; }
.cl-pin {
  font-size: 11px; color: var(--brand, #7ED321);
  background: rgba(126,211,33,.12); border-radius: 6px; padding: 1px 7px; font-weight: 600;
}
