* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #101010;
  --surface: #181818;
  --surface-2: #202020;
  --line: rgba(255,255,255,.08);
  --ink: #F5F5F5;
  --ink-2: #B0B0B0;
  --ink-3: #777777;
  --brand: #E8492A;
  --brand-hover: #F07A1B;
  --brand-soft: rgba(232,73,42,.16);
  --brand-glow: rgba(240,122,27,.4);
  --brand-2: #D81B1B;
  --grad-brand: linear-gradient(135deg, #F07A1B 0%, #D81B1B 100%);
  --ok: #2FBF71;
  --ok-soft: rgba(47,191,113,.14);
  --warn: #F5A623;
  --warn-soft: rgba(245,166,35,.14);
  --danger: #E5484D;
  --danger-soft: rgba(229,72,77,.16);
  --info: #3B82F6;
  --info-soft: rgba(59,130,246,.14);
  --ink-dark: #0A0A0A;
  --ink-dark-2: #151515;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 26px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,.45);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.55);
  --ease: cubic-bezier(.2,.7,.2,1);
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% -8%, rgba(240,122,27,.10) 0, transparent 40%),
    radial-gradient(circle at 88% 4%, rgba(216,27,27,.07) 0, transparent 36%),
    radial-gradient(circle at 100% 0%, rgba(255,255,255,.04) 0, transparent 34%),
    linear-gradient(180deg, #121212 0%, #0A0A0A 100%);
  color: var(--ink);
  min-height: 100vh;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }

.ico { width: 18px; height: 18px; flex: none; vertical-align: middle; }

/* ===== 登录页 ===== */
.login-view {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(900px 600px at 86% 8%, rgba(255,122,61,.30) 0, transparent 58%),
    radial-gradient(720px 520px at 8% 94%, rgba(255,61,127,.22) 0, transparent 55%),
    linear-gradient(150deg, #17121C, #0D0A14);
}
.login-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 120%, rgba(255,255,255,.06), transparent 50%);
  pointer-events: none;
}
.login-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 920px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 44px;
  align-items: center;
}
.login-brand { color: #fff; }
.login-brand .logo {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.login-brand h1 { font-size: 30px; font-weight: 800; margin-top: 18px; letter-spacing: .5px; }
.login-brand .sys { font-size: 14px; color: rgba(255,255,255,.62); margin-top: 6px; }
.login-brand .slogan { margin-top: 24px; font-size: 20px; font-weight: 700; line-height: 1.6; max-width: 340px; color: #fff; }
.login-brand .slogan em { font-style: normal; color: #FF6B9E; }
.login-brand .points { margin-top: 20px; display: flex; flex-direction: column; gap: 11px; }
.login-brand .points div { display: flex; align-items: center; gap: 10px; font-size: 14px; color: rgba(255,255,255,.78); }
.login-brand .points svg { flex: none; width: 17px; height: 17px; color: #FF7A94; }
.login-card {
  background: rgba(20,16,14,.72);
  border: 1px solid rgba(255,255,255,.5);
  border-radius: var(--r-lg);
  padding: 34px 30px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.login-card .top { margin-bottom: 22px; }
.login-card .top h2 { font-size: 22px; font-weight: 800; }
.login-card .top p { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.field { position: relative; margin-bottom: 13px; }
.field .ico {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--ink-3);
  pointer-events: none;
}
.field input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  font-size: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field input:focus {
  outline: none;
  border-color: var(--brand);
  background: #202020;
  box-shadow: 0 0 0 4px rgba(232,73,42,.12);
}
.field .eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  border-radius: 8px;
  cursor: pointer;
}
.field .eye:hover { color: var(--ink); background: rgba(22,19,15,.05); }
.row-between { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 18px; }
.remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; user-select: none; }
.remember input { width: 16px; height: 16px; accent-color: var(--brand); }
.forgot { font-size: 13px; color: var(--brand); text-decoration: none; cursor: pointer; }
.btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: var(--grad-brand);
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(255,92,122,.30);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s;
  cursor: pointer;
}
.btn-primary:hover { background: linear-gradient(135deg, #FF8A52 0%, #FF5590 100%); box-shadow: 0 10px 26px rgba(255,92,122,.42); }
.btn-primary:active { transform: scale(.98); }
.login-foot { margin-top: 20px; text-align: center; font-size: 12px; color: var(--ink-3); }
.msg { color: var(--danger); min-height: 20px; margin-top: 6px; font-size: 14px; text-align: center; }
@media (max-width: 760px) {
  .login-view { padding: 16px; align-items: flex-start; }
  .login-wrap { grid-template-columns: 1fr; gap: 18px; margin-top: 5vh; }
  .login-brand h1 { font-size: 24px; }
  .login-brand .slogan { font-size: 16px; margin-top: 14px; }
  .login-brand .points { display: none; }
  .login-card { padding: 26px 22px; }
}

/* ===== 顶部栏 ===== */
.brand-logo-sm {
  width: 26px;
  height: 26px;
  object-fit: cover;
  border-radius: 8px;
  vertical-align: middle;
  margin-right: 6px;
  border: 1px solid var(--line);
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(16,16,16,.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--ink);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar .brand { font-weight: 800; font-size: 16px; color: var(--ink); }
.userbox { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.link { background: none; border: none; color: var(--ink-2); cursor: pointer; font-size: 14px; text-decoration: underline; }
.link:hover { color: var(--brand); }

/* ===== 顶部标签栏 ===== */
.tabs {
  display: flex;
  overflow-x: auto;
  background: rgba(16,16,16,.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 49px;
  z-index: 10;
}
.tabs button {
  position: relative;
  flex: 0 0 auto;
  margin: 0 4px;
  padding: 12px 14px;
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--ink-2);
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s, transform .1s;
}
.tabs button:active { transform: scale(.96); }
.tabs button.active {
  color: var(--brand);
  font-weight: 700;
  background: transparent;
}
.tabs button.active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
}
.tabs button.admin-only { color: var(--ink-2); }

main { max-width: 960px; margin: 0 auto; padding: 16px; padding-bottom: 84px; }
.tab-page { animation: fade .24s var(--ease); }
@keyframes fade { from { opacity: .4; } to { opacity: 1; } }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.page-head .t {
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}
.page-head .t::before {
  content: '';
  width: 4px;
  height: 20px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
}
.page-head .s { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 工具栏 ===== */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.toolbar input, .toolbar select {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  background: #1A1A1A;
  min-width: 120px;
  flex: 1;
  color: var(--ink);
}
.toolbar input:focus, .toolbar select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(232,73,42,.12);
}
.hint {
  background: var(--warn-soft);
  border: 1px solid rgba(245,166,35,.28);
  color: #8A5A00;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}
h3 { font-size: 15px; color: var(--ink-2); margin: 6px 0 10px; }
button.primary {
  background: var(--grad-brand);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s;
}
button.primary:hover { background: linear-gradient(135deg, #FF8A52 0%, #FF5590 100%); box-shadow: 0 8px 20px rgba(255,92,122,.36); }
button.primary:active { transform: scale(.96); }
button.secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 15px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s;
}
button.secondary:hover { border-color: rgba(22,19,15,.15); }
button.secondary:active { transform: scale(.96); }
button.danger {
  background: var(--surface);
  color: var(--danger);
  border: 1px solid rgba(229,72,77,.28);
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
button.small { padding: 6px 10px; font-size: 13px; }

/* ===== 首页 Hero ===== */
.hero {
  background: linear-gradient(150deg, #241826, #120D16);
  border-radius: var(--r-xl);
  padding: 24px 20px;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  right: -70px;
  bottom: -80px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, var(--brand-glow), transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.24);
  box-shadow: 0 8px 22px rgba(0,0,0,.4);
  margin-bottom: 10px;
  object-fit: cover;
}
.hero-title { font-size: 24px; font-weight: 800; }
.hero-sub { margin-top: 6px; font-size: 14px; opacity: .72; }
.hero-quote {
  margin-top: 14px;
  font-size: 16px;
  font-weight: 600;
  opacity: .95;
  background: rgba(255,255,255,.1);
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 16px;
  border-radius: 16px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  line-height: 1.5;
}

/* ===== KPI 卡片 ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 18px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
  animation: fadeInUp .32s var(--ease);
}
.card .num { font-size: 34px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.card.clickable { cursor: pointer; }
.card.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card.clickable:active { transform: scale(.98); }
.card small { color: var(--ink-3); font-size: 12px; }
.card.yellow .num { color: var(--warn); }
.card.red .num { color: var(--danger); }
.card.blue .num { color: var(--info); }

/* ===== 列表与条目 ===== */
.list { display: flex; flex-direction: column; gap: 10px; }
.day-group {
  background: var(--surface);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  overflow: hidden;
}
.day-group summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface-2);
}
.day-group summary::-webkit-details-marker { display: none; }
.day-group summary::before {
  content: '›';
  font-size: 20px;
  line-height: 1;
  color: var(--brand);
  margin-right: 2px;
  transition: transform .2s;
}
.day-group[open] summary::before { transform: rotate(90deg); }
.day-items {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.item {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
  animation: fadeInUp .3s var(--ease);
}
.item:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.item.normal { border-left-color: var(--ok); }
.item.yellow { border-left-color: var(--warn); background: var(--warn-soft); }
.item.red { border-left-color: var(--danger); background: var(--danger-soft); }
.item .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.item .name { font-weight: 700; font-size: 16px; }
.item .sub { color: var(--ink-2); font-size: 13px; margin-top: 4px; }
.item .row.sub { justify-content: flex-start; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.date-chip {
  display: inline-block;
  background: var(--brand-soft);
  color: var(--brand-hover);
  font-weight: 700;
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255,92,122,.22);
}
.qty-strong {
  display: inline-block;
  color: var(--brand);
  font-weight: 800;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.item .badge {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge.normal { background: var(--ok-soft); color: #1E8A54; }
.badge.yellow { background: var(--warn-soft); color: #8A5A00; }
.badge.red { background: var(--danger-soft); color: #C42E33; }
.badge.low { background: var(--info-soft); color: #2563C0; }
.card.blue { background: var(--surface); }
.card.blue .num { color: var(--info); }
.item .actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

/* ===== 图片网格 ===== */
.img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.img-card {
  background: var(--surface);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  position: relative;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease);
}
.img-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.img-card img { width: 100%; height: 160px; object-fit: cover; display: block; cursor: zoom-in; }
.img-card .meta { padding: 8px 10px; font-size: 12px; color: var(--ink-2); }
.img-card .del {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(229,72,77,.92);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}

/* ===== 弹窗 ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(16,14,11,.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal-box {
  background: var(--surface);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  animation: modalIn .22s var(--ease);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.modal-body label { display: block; font-size: 14px; color: var(--ink-2); margin: 10px 0 4px; }
.modal-body input, .modal-body select, .modal-body textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
}
.modal-body input:focus, .modal-body select:focus, .modal-body textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(232,73,42,.12);
}
.modal-body textarea { min-height: 70px; resize: vertical; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,9,7,.94);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 10px;
  cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  background: rgba(22,19,15,.92);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 14px;
  z-index: 300;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
  animation: toastIn .25s var(--ease);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== 底部导航（手机 App 风格） ===== */
.bottom-nav { display: none; }
@media (max-width: 700px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(16,16,16,.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 20px rgba(22,19,15,.06);
    z-index: 60;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
    gap: 2px;
  }
  .bottom-nav button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    font-size: 10.5px;
    color: var(--ink-3);
    padding: 6px 2px;
    cursor: pointer;
    line-height: 1;
    border-radius: 16px;
    transition: color .2s, transform .1s;
  }
  .bottom-nav button .ico { width: 24px; height: 24px; }
  .bottom-nav button:active { transform: scale(.94); }
  .bottom-nav button.active {
    color: var(--brand);
    font-weight: 600;
    background: none;
  }
  .bottom-nav button.active .ico { transform: translateY(-1px); }

  .toolbar { gap: 6px; }
  .toolbar input, .toolbar select {
    min-width: 0;
    flex: 1 1 calc(50% - 6px);
    padding: 9px 10px;
    font-size: 14px;
  }
  .toolbar button {
    flex: 1 1 auto;
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
    min-height: 44px;
  }

  /* 移动端触控目标优化：列表操作按钮不小于 44px */
  button.small {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 14px;
  }
  .item .actions {
    gap: 8px;
  }
  .item .actions button {
    flex: 1 1 auto;
    min-width: 0;
  }

  main { padding-bottom: 96px; }
}

/* ===== 分析页条形图 ===== */
.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 13px;
}
.bar-label {
  min-width: 70px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-2);
}
.bar-track {
  flex: 1;
  height: 12px;
  background: rgba(22,19,15,.06);
  border-radius: 20px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 20px;
  min-width: 2px;
}
.bar-fill.green { background: var(--ok); }
.bar-value {
  min-width: 36px;
  text-align: right;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ===== 品牌启动画面 ===== */
.splash {
  position: fixed;
  inset: 0;
  background: linear-gradient(150deg, #17121C, #0D0A14);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: opacity .4s ease, visibility .4s ease;
}
.splash.hide { opacity: 0; visibility: hidden; }
.splash img {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 12px 34px rgba(0,0,0,.5);
  animation: splashPulse 1.2s ease infinite alternate;
}
.splash-title {
  margin-top: 16px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}
.splash-sub {
  margin-top: 8px;
  color: rgba(255,255,255,.6);
  font-size: 14px;
}
@keyframes splashPulse {
  from { transform: scale(1); }
  to { transform: scale(1.04); }
}

/* ===== 背景品牌水印 ===== */
.bg-watermark {
  position: fixed;
  right: -40px;
  bottom: -40px;
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 32px;
  opacity: .06;
  mix-blend-mode: luminosity;
  pointer-events: none;
  z-index: 0;
}

/* ===== 底部品牌栏 ===== */
.app-footer {
  text-align: center;
  color: var(--ink-3);
  font-size: 12px;
  padding: 14px 12px 70px;
}
.app-footer .brand-logo-sm { width: 18px; height: 18px; }

/* ===== 顶部「更多」下拉 ===== */
.tabs-more { position: relative; display: flex; align-items: center; }
.more-trigger { font-weight: 600; }
.more-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  min-width: 178px;
  padding: 6px;
  display: none;
  z-index: 40;
  animation: modalIn .18s var(--ease);
}
.more-menu.open { display: block; }
.more-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 11px 13px;
  border: none;
  background: none;
  font-size: 14px;
  color: var(--ink);
  border-radius: 10px;
  cursor: pointer;
}
.more-menu button .ico { color: var(--ink-3); }
.more-menu button:hover { background: var(--surface-2); color: var(--brand); }
.more-menu button:hover .ico { color: var(--brand); }
.more-menu .admin-badge { margin-left: auto; }
.admin-badge {
  font-size: 10px;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 700;
}

/* ===== 工具栏「更多」下拉 ===== */
.toolbar-more { position: relative; }
.more-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  min-width: 176px;
  padding: 6px;
  display: none;
  z-index: 40;
}
.more-panel.open { display: block; }
.more-panel button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 13px;
  border: none;
  background: none;
  font-size: 14px;
  color: var(--ink);
  border-radius: 10px;
  cursor: pointer;
}
.more-panel button:hover { background: var(--surface-2); color: var(--brand); }

/* ===== 底部「更多」弹层 ===== */
.sheet { position: fixed; inset: 0; z-index: 90; }
.sheet-mask { position: absolute; inset: 0; background: rgba(16,14,11,.45); }
.sheet-box {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 14px 10px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(16,14,11,.18);
  animation: modalIn .22s var(--ease);
}
.sheet-box button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  border: none;
  background: none;
  font-size: 15px;
  color: var(--ink);
  border-radius: 12px;
  cursor: pointer;
}
.sheet-box button .ico { color: var(--ink-3); }
.sheet-box button:hover { background: var(--surface-2); color: var(--brand); }
.sheet-box button:hover .ico { color: var(--brand); }

/* ===== 键盘焦点态 ===== */
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

@media (min-width: 700px) {
  .cards { grid-template-columns: repeat(4, 1fr); }
}

/* ===== 空状态组件 ===== */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 44px 20px;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
}
.empty-ico {
  width: 54px; height: 54px;
  padding: 14px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-3);
  margin-bottom: 14px;
}
.empty-title { font-size: 16px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.empty-sub { font-size: 13px; color: var(--ink-2); max-width: 300px; line-height: 1.6; }
.empty-action { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* ===== 首页 KPI 卡片增强 ===== */
.card { position: relative; overflow: hidden; }
.card .card-accent {
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
}
.card.yellow .card-accent { background: var(--warn); }
.card.red .card-accent { background: var(--danger); }
.card.blue .card-accent { background: var(--info); }
.card .card-top {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.card .card-ico {
  width: 34px; height: 34px; padding: 8px;
  border-radius: 10px;
  background: var(--ok-soft); color: var(--ok);
}
.card.yellow .card-ico { background: var(--warn-soft); color: var(--warn); }
.card.red .card-ico { background: var(--danger-soft); color: var(--danger); }
.card.blue .card-ico { background: var(--info-soft); color: var(--info); }
.card.yellow.alert { background: linear-gradient(180deg, rgba(245,166,35,.12), var(--surface)); box-shadow: 0 6px 20px rgba(245,166,35,.16); }
.card.red.alert { background: linear-gradient(180deg, rgba(229,72,77,.14), var(--surface)); box-shadow: 0 6px 20px rgba(229,72,77,.16); }
.card.blue.alert { background: linear-gradient(180deg, rgba(59,130,246,.12), var(--surface)); box-shadow: 0 6px 20px rgba(59,130,246,.14); }

/* ===== 确认弹窗 ===== */
#confirm .modal-box { max-width: 360px; }
#confirm .confirm-msg { color: var(--ink-2); font-size: 14px; line-height: 1.65; margin-top: 2px; word-break: break-word; }
#confirmOk.danger { background: var(--danger); box-shadow: 0 6px 16px rgba(229,72,77,.28); }
#confirmOk.danger:hover { background: #D33A3F; }

/* ===== 加载更多 ===== */
.load-more {
  width: 100%; padding: 12px; margin-top: 4px;
  border: 1px dashed var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink-2); font-size: 14px;
  cursor: pointer; transition: all .15s var(--ease);
}
.load-more:hover { color: var(--brand); border-color: var(--brand); }

/* ===== 加载骨架屏 ===== */
.skeleton {
  position: relative;
  overflow: hidden;
  background: #1A1A1A;
  border-radius: 14px;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: translateX(-100%);
  animation: skeletonShimmer 1.4s infinite;
}
@keyframes skeletonShimmer {
  100% { transform: translateX(100%); }
}
.skeleton-item { height: 68px; }
.skeleton-card { height: 96px; }
.skeleton-bar { height: 14px; border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
