:root {
  --bg: #faf1e0;
  --ink: #201810;
  --ink2: #4f4230;
  --sub: #907f65;
  --line: #eadcc5;
  --gold: #b06a1f;
  --gold-soft: #fae6c8;
  --dark: #241a10;
  --danger: #bf4632;
  --ok: #3d7a4b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; background: var(--bg);
  color: var(--ink); -webkit-font-smoothing: antialiased; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 13px; color: var(--ink); outline: none; }
a { color: inherit; text-decoration: none; }

/* ---------------- 登录 ---------------- */
.login { position: fixed; inset: 0; z-index: 200; background:
  radial-gradient(1200px 600px at 20% 10%, #2e2718 0%, transparent 60%), #14120d;
  display: grid; place-items: center; }
.login-card { width: min(380px, 92vw); background: rgba(255,253,246,.98); border-radius: 20px; padding: 38px 34px;
  box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.login-card .lg { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(145deg,#2c2418,#4d3c22);
  color: #f2dfb9; display: grid; place-items: center; font-size: 22px; margin-bottom: 18px; }
.login-card h1 { font-size: 20px; letter-spacing: .06em; }
.login-card p { font-size: 12px; color: var(--sub); margin: 6px 0 18px; letter-spacing: .04em; }
.lg-tabs { display: flex; gap: 4px; background: #f5ebd9; border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.lg-tabs button { flex: 1; height: 32px; border-radius: 999px; font-size: 12px; color: var(--ink2); background: transparent; }
.lg-tabs button.on { background: var(--ink); color: #fff; }
.login-card input { width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px;
  font-size: 14px; background: #fbf7ee; }
.login-card input:focus { border-color: #d7c39f; box-shadow: 0 0 0 3px rgba(176,106,31,.12); }
.login-card form button { width: 100%; height: 46px; margin-top: 14px; border-radius: 10px;
  background: linear-gradient(145deg,#c07a2a,#9c5511); color: #fff; font-size: 14px; letter-spacing: .1em; }
.login-card form button:hover { filter: brightness(1.06); }
.login-tip { font-size: 11px; color: #a9a294; text-align: center; margin-top: 16px; line-height: 1.8; }

/* ---------------- 框架 ---------------- */
.shell { display: none; min-height: 100vh; grid-template-columns: 208px 1fr; }
.shell.show { display: grid; }
.side { background: var(--dark); color: #e9e2d4; padding: 22px 14px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; }
.side .brand { display: flex; align-items: center; gap: 9px; padding: 0 8px 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.side .brand div { width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.1);
  display: grid; place-items: center; color: #f2dfb9; font-size: 15px; }
.side .brand b { font-size: 14px; letter-spacing: .06em; }
.nav { margin-top: 16px; display: flex; flex-direction: column; gap: 2px; }
.nav button { text-align: left; padding: 11px 12px; border-radius: 8px; font-size: 13px; color: #b6ad9b;
  display: flex; align-items: center; gap: 9px; transition: .16s; }
.nav button:hover { background: rgba(255,255,255,.06); color: #f0e9db; }
.nav button.on { background: rgba(255,255,255,.1); color: #fff; font-weight: 500; }
.nav i { font-style: normal; width: 18px; text-align: center; opacity: .8; font-size: 13px; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: #8f8778; }
.side-foot a, .side-foot button { color: #b6ad9b; text-align: left; font-size: 12px; }
.side-foot a:hover, .side-foot button:hover { color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 62px; background: #fffdf6; border-bottom: 1px solid var(--line); display: flex; align-items: center;
  justify-content: space-between; padding: 0 26px; position: sticky; top: 0; z-index: 20; }
.topbar h2 { font-size: 16px; letter-spacing: .05em; }
.topbar .sub { font-size: 11px; color: var(--sub); margin-left: 10px; letter-spacing: .03em; }
.wrap { padding: 24px 26px 60px; }

/* ---------------- 通用 ---------------- */
.btn { height: 34px; padding: 0 14px; border-radius: 8px; font-size: 12px; letter-spacing: .03em;
  border: 1px solid var(--line); background: #fffdf6; color: var(--ink2); transition: .16s; display: inline-flex;
  align-items: center; gap: 6px; }
.btn:hover { border-color: #d6c3a5; color: var(--ink); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dark:hover { background: #000; }
.btn.gold { background: linear-gradient(145deg,#b8873e,#9a6d2c); border-color: transparent; color: #fff; }
.btn.gold:hover { filter: brightness(1.06); }
.btn.mini { height: 28px; padding: 0 9px; font-size: 11px; border-radius: 6px; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: #f0d7d5; }
.btn.danger:hover { background: #fdf3f2; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.panel { background: #fffdf6; border: 1px solid var(--line); border-radius: 14px; }
.panel-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center;
  justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-head h3 { font-size: 14px; letter-spacing: .04em; }
.panel-body { padding: 16px 18px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 11px; color: var(--sub); letter-spacing: .06em; }
.field input, .field select, .field textarea { height: 36px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 10px; background: #fffdf6; }
.field textarea { height: 78px; padding: 9px 10px; resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #d7c39f; box-shadow: 0 0 0 3px rgba(166,123,60,.08); }

/* ---------------- 概览 ---------------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: #fffdf6; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.stat .k { font-size: 11px; color: var(--sub); letter-spacing: .08em; }
.stat .v { font-size: 30px; font-weight: 600; margin-top: 8px; letter-spacing: -.02em; }
.stat .n { font-size: 11px; color: var(--sub); margin-top: 6px; }
.stat.gold { background: linear-gradient(145deg,#fff8ec,#fbeacf); border-color: #f1d5ab; }
.quick { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* ---------------- 商品表 ---------------- */
.tabs { display: flex; gap: 4px; }
.tabs button { height: 30px; padding: 0 13px; border-radius: 999px; font-size: 12px; color: var(--ink2);
  border: 1px solid transparent; }
.tabs button.on { background: var(--ink); color: #fff; }
.tabs button:hover:not(.on) { background: #f5f2ea; }

.tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tools input { height: 34px; min-width: 200px; border: 1px solid var(--line); border-radius: 8px; padding: 0 11px; }
.tools select { height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: #fffdf6; }

.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 900px; }
thead th { text-align: left; font-size: 11px; font-weight: 500; color: var(--sub); letter-spacing: .06em;
  padding: 10px 10px; border-bottom: 1px solid var(--line); background: #fbfaf6; white-space: nowrap; }
tbody td { padding: 10px; border-bottom: 1px solid #f2eee6; vertical-align: middle; }
tbody tr:hover { background: #fcfbf7; }
td .pimg { width: 46px; height: 46px; border-radius: 6px; object-fit: cover; background: #f4f1ea; }
.pname { display: flex; flex-direction: column; gap: 3px; min-width: 180px; }
.pname b { font-weight: 500; font-size: 13px; }
.pname span { font-size: 10px; color: var(--sub); }
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; }
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.on { background: #eaf5ee; color: var(--ok); }
.pill.warehouse { background: #f8f1e0; color: #9a7326; }
.pill.off { background: #f3f1ee; color: #907f65; }
.tagm { display: inline-block; font-size: 10px; padding: 1px 5px; border-radius: 4px; margin-right: 3px;
  background: var(--gold-soft); color: #95500f; }
.ops { display: flex; gap: 6px; white-space: nowrap; }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: 6px; padding: 14px 18px; }
.pager button { min-width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--line); background: #fffdf6;
  font-size: 12px; color: var(--ink2); }
.pager button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager button:disabled { opacity: .4; }
.empty { padding: 60px 20px; text-align: center; color: var(--sub); font-size: 13px; }

/* ---------------- 弹窗 ---------------- */
.mask { position: fixed; inset: 0; background: rgba(20,16,10,.42); z-index: 100; opacity: 0; visibility: hidden;
  transition: .25s; }
.mask.show { opacity: 1; visibility: visible; }
.dlg { position: fixed; z-index: 110; left: 50%; top: 50%; transform: translate(-50%,-48%) scale(.98);
  width: min(880px, 94vw); max-height: 90vh; background: #fffdf6; border-radius: 16px; opacity: 0; visibility: hidden;
  transition: .26s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.dlg.show { opacity: 1; visibility: visible; transform: translate(-50%,-50%) scale(1); }
.dlg-head { padding: 16px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center;
  justify-content: space-between; }
.dlg-head h3 { font-size: 15px; letter-spacing: .04em; }
.dlg-body { padding: 18px 22px; overflow-y: auto; }
.dlg-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end;
  gap: 10px; }
.x { width: 30px; height: 30px; border-radius: 50%; font-size: 18px; color: var(--sub); display: grid; place-items: center; }
.x:hover { background: #f5f2ea; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.form-grid .wide { grid-column: span 3; }
.form-grid .span2 { grid-column: span 2; }
.section-title { grid-column: span 3; font-size: 11px; color: var(--sub); letter-spacing: .1em;
  padding-top: 8px; border-top: 1px dashed var(--line); margin-top: 4px; }
.img-row { display: flex; gap: 10px; flex-wrap: wrap; }
.img-item { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.img-item img { width: 100%; height: 100%; object-fit: cover; }
.img-item b { position: absolute; right: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; font-size: 11px; display: grid; place-items: center; cursor: pointer; }
.img-add { width: 84px; height: 84px; border: 1px dashed #d3c3a6; border-radius: 8px; color: var(--sub);
  font-size: 11px; display: grid; place-items: center; background: #fbfaf6; cursor: pointer; }
.img-add:hover { border-color: var(--gold); color: var(--gold); }

.tagpick { display: flex; gap: 8px; flex-wrap: wrap; }
.tagpick button { height: 30px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line);
  font-size: 12px; background: #fffdf6; }
.tagpick button.on { background: var(--gold-soft); border-color: #dcc299; color: #95500f; }

/* ---------------- 字典 ---------------- */
.dict-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.dict-card { background: #fffdf6; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.dict-card h4 { font-size: 13px; margin-bottom: 12px; letter-spacing: .04em; }
.dict-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.dict-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px;
  background: #fbfaf6; border-radius: 6px; font-size: 12px; }
.dict-row button { font-size: 11px; color: var(--sub); }
.dict-row button:hover { color: var(--danger); }
.dict-add { display: flex; gap: 6px; }
.dict-add input { flex: 1; height: 32px; border: 1px solid var(--line); border-radius: 6px; padding: 0 9px; font-size: 12px; }

/* ---------------- 清单 ---------------- */
.code-input { display: flex; gap: 8px; }
.code-input input { height: 38px; width: 160px; border: 1px solid var(--line); border-radius: 8px; padding: 0 11px;
  letter-spacing: .18em; text-transform: uppercase; font-size: 14px; }
.list-detail .row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f2eee6; }
.list-detail .row img { width: 52px; height: 52px; border-radius: 6px; object-fit: cover; background: #f4f1ea; }
.list-detail .row .mid { flex: 1; }
.list-detail .row .mid b { font-size: 13px; font-weight: 500; }
.list-detail .row .mid span { display: block; font-size: 11px; color: var(--sub); margin-top: 3px; }
.list-detail .row .rt { text-align: right; font-size: 12px; }
.list-detail .sum { display: flex; justify-content: space-between; padding-top: 14px; font-size: 13px; }
.list-detail .sum b { font-size: 20px; }
.qr-box { text-align: center; padding: 10px 0 16px; }
.qr-box img { width: 110px; height: 110px; margin: 0 auto 4px; border-radius: 8px; border: 1px solid var(--line); }
.qr-box .cd { font-size: 22px; font-weight: 700; letter-spacing: .3em; }

/* ---------------- 设置 ---------------- */
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 760px; }

.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 300;
  background: rgba(23,21,15,.94); color: #fff; padding: 11px 20px; border-radius: 999px; font-size: 13px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); opacity: 0; transition: .3s; }
.toast.show { opacity: 1; bottom: 56px; }

@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .wide, .form-grid .span2, .section-title { grid-column: span 2; }
  .dict-grid { grid-template-columns: 1fr; }
  .set-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 208px; transform: translateX(-100%);
    transition: .26s; z-index: 90; }
  .side.show { transform: none; }
  .topbar { padding: 0 16px; }
  .wrap { padding: 16px 14px 50px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide, .form-grid .span2, .section-title { grid-column: span 1; }
}

/* ---------------- 安装实物 ---------------- */
.install-tools { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.install-tools input { flex: 1; min-width: 220px; height: 32px; border: 1px solid var(--line);
  border-radius: 8px; padding: 0 10px; font-size: 12px; background: #fffdf6; }
.install-tools input:focus { border-color: #d7c39f; box-shadow: 0 0 0 3px rgba(166,123,60,.08); }
.hint-line { font-size: 11px; color: var(--sub); margin-top: 6px; line-height: 1.7; }
.img-item .vt { position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(20,16,10,.48); color: #fff; font-size: 16px; pointer-events: none; }
.img-item .vlabel { position: absolute; left: 3px; bottom: 3px; font-size: 9px; color: #fff;
  background: rgba(0,0,0,.6); border-radius: 3px; padding: 0 4px; pointer-events: none; }

/* ---------------- 品牌馆管理 ---------------- */
.ba-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.ba-card { display: flex; align-items: center; gap: 12px; padding: 10px; background: #fffdf6;
  border: 1px solid var(--line); border-radius: 12px; transition: .18s; }
.ba-card:hover { border-color: #d8c9ae; box-shadow: 0 10px 24px rgba(40, 30, 12, .06); }
.ba-thumb { width: 96px; height: 64px; flex: none; border-radius: 8px; object-fit: cover; background: #f5ebd9; }
.ba-info { flex: 1; min-width: 0; }
.ba-name { font-size: 14px; font-weight: 600; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ba-slogan { font-size: 11px; color: var(--sub); margin-top: 4px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.ba-meta { font-size: 11px; color: #a09889; margin-top: 6px; display: flex; gap: 10px; align-items: center;
  white-space: nowrap; overflow: hidden; }
.ba-off { color: var(--danger); }
.ba-acts { display: flex; flex-direction: column; gap: 6px; flex: none; }
.ba-acts .btn { padding: 0 12px; height: 30px; font-size: 12px; }
.b-cover { width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #f3f0ea;
  display: grid; place-items: center; color: var(--sub); font-size: 12px; margin-bottom: 10px; border: 1px dashed var(--line); }
.b-cover img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) { .ba-grid { grid-template-columns: 1fr; } }

/* ---------------- 销售 / 客户账号 ---------------- */
.cust-cell { display: flex; align-items: center; gap: 9px; }
.u-av { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--line2);
  display: inline-grid; place-items: center; font-size: 12px; color: var(--gold-d); flex: none; }
.cust-cell b { display: block; font-size: 13px; font-weight: 600; }
.cust-cell span { display: block; font-size: 11px; color: var(--sub); margin-top: 2px; }
.s-linkbox { padding: 9px 12px; border: 1px dashed #d8bd93; border-radius: 9px; background: #fdf9f1;
  font-size: 12px; color: var(--gold-d); word-break: break-all; line-height: 1.6; }
.st-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px;
  background: #eef7ee; color: #3f7a45; }
.st-pill.off { background: #f6ecea; color: #b4544a; }
.code-pill { font-weight: 600; letter-spacing: .12em; color: var(--ink); }
.hint-line { font-size: 12px; color: var(--sub); line-height: 1.8; }
.u-acts { display: flex; gap: 6px; flex-wrap: wrap; }

.qr-modal { position: fixed; inset: 0; z-index: 120; background: rgba(20,16,10,.45); display: none;
  align-items: center; justify-content: center; padding: 20px; }
.qr-modal.show { display: flex; }
.qm-box { width: 300px; background: #fffdf6; border-radius: 16px; padding: 22px; text-align: center; position: relative;
  box-shadow: 0 24px 60px rgba(20,15,8,.3); }
.qm-box .x { position: absolute; right: 10px; top: 8px; }
.qm-box h3 { font-size: 15px; margin-bottom: 6px; }
.qm-box .cd { font-size: 22px; font-weight: 700; letter-spacing: .24em; color: var(--gold-d); margin-bottom: 8px; }
.qm-box img { width: 170px; height: 170px; border-radius: 10px; }
.qm-box p { font-size: 11px; color: var(--sub); line-height: 1.7; margin-top: 8px; }

#view-sales table, #view-users table, #view-lists table { min-width: 0; }
#view-sales th, #view-sales td, #view-users th, #view-users td, #view-lists th, #view-lists td { padding: 9px 8px; }
#view-lists td:nth-child(5) { word-break: break-all; }

#view-users td:nth-child(1) { min-width: 122px; }
#view-users td:nth-child(4) { white-space: nowrap; }
#view-sales td:last-child { white-space: nowrap; }
#view-lists td:nth-child(2) { min-width: 122px; }

#view-sales th:last-child { width: 196px; }

.qm-box .qlink { font-size: 11px; color: var(--sub); word-break: break-all; margin: 10px 0 8px; line-height: 1.5; }

/* ---------- 数据看板 ---------- */
.cards.kpi5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .cards.kpi5 { grid-template-columns: repeat(3, 1fr); } }
.chart-legend { display: flex; align-items: center; gap: 16px; font-size: 11px; color: var(--sub); margin: 4px 0 10px; }
.chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.chart-legend .lg-pv { background: var(--gold-d); }
.chart-legend .lg-u { background: #7c8b52; }
.chart-legend .lg-l { background: var(--ink); }
.chart-tip { margin-left: auto; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 172px; padding: 10px 4px 0;
  border-top: 1px dashed var(--line); overflow-x: auto; }
.bar-col { flex: 1; min-width: 20px; height: 100%; display: flex; flex-direction: column; align-items: center; }
.bar-stack { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.bar-stack i { width: 5px; min-height: 0; border-radius: 2px 2px 0 0; }
.bar-stack .b-pv { background: linear-gradient(180deg, #e09a44, #bf7326); }
.bar-stack .b-u { background: #7c8b52; }
.bar-stack .b-l { background: #3a352a; }
.bar-col span { font-size: 9px; color: var(--sub); margin-top: 5px; white-space: nowrap; }
.an-modal .qm-box { width: 400px; text-align: left; padding: 20px 22px; max-height: 86vh; overflow-y: auto; }
.an-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding-right: 22px; }
.an-head .an-av { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; background: #f1ece0;
  display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--gold-d); }
.an-head .an-av img { width: 100%; height: 100%; object-fit: cover; }
.an-head h3 { margin: 0; font-size: 16px; }
.an-head p { margin: 3px 0 0; font-size: 11px; color: var(--sub); }
.an-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: #faf7ef; border-radius: 10px; padding: 12px; text-align: center; }
.an-kpis b { display: block; font-size: 20px; }
.an-kpis span { font-size: 10px; color: var(--sub); }
.an-sub { font-size: 11px; color: var(--sub); margin: 16px 0 7px; letter-spacing: .04em; }
.an-bars { display: flex; align-items: flex-end; gap: 3px; height: 76px; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.an-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.an-bar i { width: 6px; border-radius: 2px 2px 0 0; background: #d9c19a; }
.an-bar span { font-size: 8px; color: var(--sub); margin-top: 3px; }
.an-refs div { display: flex; justify-content: space-between; font-size: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.an-refs div span { color: var(--ink2); }
.an-codes { display: flex; flex-wrap: wrap; gap: 6px; }

.cards.kpi5 { grid-template-columns: repeat(5, 1fr) !important; }
#view-analytics .stat { padding: 14px 14px; }
#view-analytics .stat .v { font-size: 26px; margin-top: 6px; }
#view-analytics .stat .n { font-size: 10px; }
#view-analytics .panel-body { padding: 16px 18px 14px; }

#view-analytics table { min-width: 0; }
#view-analytics td:nth-child(1) { min-width: 118px; }
#view-analytics .bars { height: 148px; }

.bar-col span.hide { visibility: hidden; }
@media (max-width: 1100px) { .bars { gap: 3px; } .bar-col { min-width: 16px; } }
