/* ============================================================
   店铺运营工作台 · 设计系统
   ============================================================ */
:root {
  --bg:        #0f1216;
  --bg-2:      #151a21;
  --panel:     #1a2029;
  --panel-2:   #212934;
  --line:      #2b3442;
  --line-soft: #232c38;

  --ink:       #e6ecf3;
  --ink-2:     #b3c0cf;
  --muted:     #788697;

  --blue:      #4a9eff;
  --blue-soft: rgba(74,158,255,.13);
  --green:     #35c48a;
  --green-soft:rgba(53,196,138,.13);
  --amber:     #f0a742;
  --amber-soft:rgba(240,167,66,.13);
  --red:       #f26a5c;
  --red-soft:  rgba(242,106,92,.13);
  --violet:    #9b7bf0;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  min-height: 100vh;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ============ 侧栏 ============ */
.side {
  width: 208px; flex: none;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 20px 12px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}

.brand {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 12px; padding: 0 6px 24px;
}
.brand-mark img { display: block; }
.brand-mark.has-img { background: none; box-shadow: none; color: transparent; overflow: visible; }
.brand-name-row { display: flex; align-items: center; gap: 10px; justify-content: center; flex-wrap: wrap; }
.brand-phone {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; flex: none;
  font-size: 10.5px; font-weight: 700; letter-spacing: .03em;
  color: #fde68a; text-decoration: none; white-space: nowrap;
  background: linear-gradient(135deg, rgba(253,230,138,.16), rgba(251,191,36,.06));
  border: 1px solid rgba(253,230,138,.38);
  box-shadow: 0 0 12px rgba(251,191,36,.14), inset 0 1px 0 rgba(255,255,255,.10);
  transition: box-shadow .2s, transform .2s;
}
.brand-phone:hover { box-shadow: 0 0 16px rgba(251,191,36,.32); transform: translateY(-1px); }
.brand-phone svg { width: 9px; height: 9px; flex: none; filter: drop-shadow(0 0 3px rgba(253,230,138,.5)); }
.brand-mark {
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  background: linear-gradient(145deg, var(--blue), var(--violet));
  display: grid; place-items: center;
  font-weight: 700; font-size: 18px; color: #fff;
}
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.brand-sub { font-size: 10.5px; color: var(--muted); margin-top: 4px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px; border-radius: var(--r-sm);
  background: none; border: none; color: var(--ink-2);
  font-size: 13.5px; text-align: left; transition: .15s;
}
.nav-item:hover { background: var(--panel); color: var(--ink); }
.nav-item.active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.ni { font-size: 14px; width: 16px; text-align: center; }

.side-foot { margin-top: auto; padding: 0 6px; }
.shop-badge {
  font-size: 11.5px; padding: 7px 10px; border-radius: var(--r-sm);
  background: var(--panel); color: var(--ink-2); margin-bottom: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hint { font-size: 10.5px; color: var(--muted); line-height: 1.5; }

/* ============ 主区 ============ */
.main { flex: 1; min-width: 0; padding: 26px 30px 60px; max-width: 1240px; }

.top { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.page-title { font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.page-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.top-actions { margin-left: auto; display: flex; gap: 8px; flex: none; }

.btn-primary, .btn-ghost {
  padding: 8px 16px; border-radius: var(--r-sm); font-size: 13px;
  border: 1px solid transparent; transition: .15s;
}
.btn-primary { background: var(--blue); color: #fff; font-weight: 600; }
.btn-primary:hover { background: #3f8ee6; }
.btn-ghost { background: var(--panel); color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--panel-2); color: var(--ink); }

/* ============ 卡片/网格 ============ */
.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px;
}
.card-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.card-head h3 { font-size: 14.5px; font-weight: 600; }
.card-head .right { margin-left: auto; font-size: 12px; color: var(--muted); }

/* KPI */
.kpi-label { font-size: 12px; color: var(--muted); }
.kpi-value { font-size: 27px; font-weight: 700; margin-top: 6px; letter-spacing: -.02em; }
.kpi-delta { font-size: 11.5px; margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.up { color: var(--green); }
.down { color: var(--red); }
.flat { color: var(--muted); }

/* 漏斗 */
.funnel { display: flex; flex-direction: column; gap: 9px; }
.funnel-row { display: flex; align-items: center; gap: 12px; }
.funnel-name { width: 64px; font-size: 12.5px; color: var(--ink-2); flex: none; }
.funnel-bar { flex: 1; height: 30px; background: var(--panel-2); border-radius: var(--r-sm); overflow: hidden; position: relative; }
.funnel-fill { height: 100%; border-radius: var(--r-sm); transition: width .4s; }
.funnel-num { position: absolute; right: 10px; top: 0; line-height: 30px; font-size: 12px; font-weight: 600; }
.funnel-rate { width: 74px; text-align: right; font-size: 12px; flex: none; font-family: var(--mono); }

/* 表格 */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; font-weight: 600; font-size: 11.5px; color: var(--muted);
  padding: 8px 10px; border-bottom: 1px solid var(--line);
  text-transform: uppercase; letter-spacing: .03em;
}
td { padding: 10px; border-bottom: 1px solid var(--line-soft); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.015); }
.num { font-family: var(--mono); font-size: 12.5px; }
.bad { color: var(--red); font-weight: 600; }
.good { color: var(--green); }

/* 空态 */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-ico { font-size: 28px; opacity: .4; margin-bottom: 10px; }
.empty p { font-size: 13px; }

/* 提示条 */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--r-md);
  font-size: 12.5px; line-height: 1.65; margin-bottom: 12px;
}
.alert.warn { background: var(--amber-soft); color: var(--amber); }
.alert.danger { background: var(--red-soft); color: var(--red); }
.alert.ok { background: var(--green-soft); color: var(--green); }
.alert.info { background: var(--blue-soft); color: var(--blue); }

/* 表单 */
.form-grid { display: grid; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 9px 11px;
  color: var(--ink); font-size: 13.5px; outline: none; transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); }
.field textarea { resize: vertical; min-height: 76px; line-height: 1.6; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 弹层 */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(8,10,13,.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal[hidden] { display: none; }
.modal-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 24px;
  width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.modal-card h2 { font-size: 17px; margin-bottom: 4px; }
.modal-card .sub { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }
.modal-card.wide { max-width: 940px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* Toast */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--ink); padding: 11px 20px; border-radius: 999px;
  font-size: 13px; z-index: 200; opacity: 0; pointer-events: none;
  transition: .25s; box-shadow: 0 8px 28px rgba(0,0,0,.4);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 标签 */
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 5px;
  font-size: 11px; font-weight: 600;
}
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.gray { background: var(--panel-2); color: var(--muted); }

/* 文案结果块 */
.result-block {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 14px; margin-bottom: 10px;
}
.result-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 9px;
}
.result-head b { font-size: 12.5px; color: var(--ink-2); }
.result-head .copy {
  margin-left: auto; font-size: 11px; padding: 3px 9px;
  border-radius: 5px; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--muted);
}
.result-head .copy:hover { color: var(--blue); border-color: var(--blue); }
.result-text { font-size: 13.5px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.result-text.mono { font-family: var(--mono); font-size: 12.5px; }

/* 时间轴 */
.timeline { display: flex; flex-direction: column; }
.tl-item {
  display: flex; gap: 14px; padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.tl-item:last-child { border-bottom: none; }
.tl-date {
  width: 76px; flex: none; font-size: 12px; font-family: var(--mono);
  color: var(--muted); padding-top: 1px;
}
.tl-body { flex: 1; min-width: 0; }
.tl-title { font-size: 13.5px; font-weight: 600; }
.tl-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.tl-days {
  flex: none; font-size: 12px; font-family: var(--mono); font-weight: 600;
}
.tl-days.urgent { color: var(--red); }
.tl-days.soon { color: var(--amber); }
.tl-days.safe { color: var(--muted); }

/* 评分星 */
.stars { color: var(--amber); letter-spacing: 1px; font-size: 12px; }
.stars .off { color: var(--line); }

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #3a4557; }

@media (max-width: 900px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: 1fr; }
  .main { padding: 20px 16px 60px; }
}

/* ============ 到期提醒条 ============ */
.expiry-bar {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 16px; border-radius: var(--r-md);
  font-size: 12.5px; line-height: 1.65; margin-bottom: 16px;
  border: 1px solid transparent;
}
.expiry-bar[hidden] { display: none; }
.expiry-bar.warn { background: var(--amber-soft); color: var(--amber); border-color: rgba(240,167,66,.28); }
.expiry-bar.danger { background: var(--red-soft); color: var(--red); border-color: rgba(242,106,92,.3); }
.expiry-bar b { font-weight: 700; }
.expiry-close {
  margin-left: auto; background: none; border: none; flex: none;
  font-size: 17px; line-height: 1; color: inherit; opacity: .6; padding: 0 2px;
}
.expiry-close:hover { opacity: 1; }

/* ============ 同步状态 ============ */
.save-state {
  font-size: 11.5px; color: var(--muted);
  padding: 4px 0; margin-right: 4px; align-self: center;
  min-width: 44px; text-align: right;
}
.save-state.ok { color: var(--green); opacity: .8; }
.save-state.err { color: var(--red); }

/* ============ 我的账号 ============ */
.acc-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 18px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  margin-bottom: 14px;
}
.acc-avatar {
  width: 48px; height: 48px; border-radius: 14px; flex: none;
  display: grid; place-items: center;
  font-size: 19px; font-weight: 700; color: #fff;
  background: linear-gradient(145deg, var(--blue), var(--violet));
}
.acc-name { font-size: 16px; font-weight: 700; }
.acc-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.acc-meta { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.acc-meta-item { text-align: right; }
.acc-meta-label { font-size: 11px; color: var(--muted); }
.acc-meta-value { font-size: 14px; font-weight: 600; margin-top: 2px; }
.acc-meta-value.warn { color: var(--amber); }
.acc-meta-value.danger { color: var(--red); }
.acc-meta-value.ok { color: var(--green); }

.acc-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============ 财务子标签 ============ */
.fin-tabs {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 18px;
}
.fin-tab {
  padding: 7px 18px; border: none; border-radius: 7px;
  background: transparent; color: var(--muted);
  font-size: 12.5px; font-weight: 500; transition: .15s;
}
.fin-tab:hover { color: var(--ink-2); }
.fin-tab.active { background: var(--panel-2); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.25); }

/* ============ 资产盘点 ============ */
.asset-toolbar {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap;
}

.asset-insight {
  padding: 7px 13px; border-radius: 8px;
  font-size: 12px; line-height: 1.6;
  background: var(--panel-2); color: var(--ink-2);
  border: 1px solid var(--line);
}
.asset-insight.green { background: var(--green-soft); color: var(--green); border-color: rgba(53,196,138,.22); }
.asset-insight.red { background: var(--red-soft); color: var(--red); border-color: rgba(242,106,92,.22); }
.asset-insight.amber { background: var(--amber-soft); color: var(--amber); border-color: rgba(240,167,66,.22); }
.asset-insight.blue { background: var(--blue-soft); color: var(--blue); border-color: rgba(74,158,255,.22); }

/* 明细表 */
.asset-table { font-size: 12.5px; min-width: 1080px; }
.asset-table th { white-space: nowrap; padding: 9px 8px; font-size: 11px; }
.asset-table td { padding: 9px 8px; white-space: nowrap; }
.asset-table .num-th { text-align: right; }
.asset-table .num-th.neg { color: var(--red); opacity: .8; }
.asset-table .num-th.total-th { color: var(--blue); }
.asset-table .num { text-align: right; }
.asset-table .neg-val { color: var(--red); opacity: .85; }
.asset-table .month-cell { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.asset-table .total-th,
.asset-table .total-cell {
  position: sticky; right: 64px;
  background: var(--panel); border-left: 1px solid var(--line);
}
.asset-table tbody tr:hover .total-cell { background: #1e2530; }
.asset-table .total-cell { font-weight: 700; }
.asset-table .sum-row td {
  border-top: 1px solid var(--line); color: var(--muted);
  font-size: 11.5px; background: var(--bg-2);
}
.asset-table .sum-row .total-cell { background: var(--bg-2); }

.mini {
  width: 24px; height: 24px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--panel-2);
  color: var(--ink-2); font-size: 12px; line-height: 1;
  display: inline-grid; place-items: center; transition: .15s;
}
.mini:hover { background: var(--line); color: var(--ink); }
.mini.danger:hover { background: var(--red-soft); color: var(--red); border-color: rgba(242,106,92,.3); }

/* 资产构成 */
.comp-list { display: flex; flex-direction: column; gap: 9px; }
.comp-row { display: flex; align-items: center; gap: 10px; }
.comp-label { width: 76px; flex: none; font-size: 12px; color: var(--ink-2); }
.comp-bar-wrap { flex: 1; height: 16px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.comp-bar { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--blue), #6b8ff5); transition: width .4s; }
.comp-bar.neg { background: linear-gradient(90deg, #d1554a, var(--red)); }
.comp-val { width: 104px; flex: none; text-align: right; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.comp-pct { width: 46px; flex: none; text-align: right; font-size: 11px; color: var(--muted); font-family: var(--mono); }
.comp-foot {
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--muted); line-height: 1.9;
}
.comp-foot b { color: var(--ink); }

/* 走势图 */
.asset-chart {
  display: flex; align-items: flex-end; gap: 6px;
  height: 200px; padding: 14px 4px 0;
}
.ac-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.ac-val { font-size: 10px; color: var(--muted); font-family: var(--mono); white-space: nowrap; }
.ac-bar-wrap { width: 100%; display: flex; align-items: flex-end; justify-content: center; flex: 1; }
.ac-bar {
  width: 68%; max-width: 44px; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, var(--blue), rgba(74,158,255,.35));
  transition: height .4s;
}
.ac-bar.neg { background: linear-gradient(180deg, var(--red), rgba(242,106,92,.35)); }
.ac-label { font-size: 10.5px; color: var(--muted); }

@media (max-width: 900px) {
  .comp-label { width: 68px; font-size: 11px; }
  .comp-val { width: 88px; font-size: 11px; }
  .comp-pct { display: none; }
  .asset-chart { height: 160px; }
  .ac-val { display: none; }
}

/* ============ 资产录入表单 ============ */
.asset-form-section {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 12px 14px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.afs-title {
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  letter-spacing: .05em;
}
.asset-form-section .field label { font-size: 11.5px; }
.asset-form-section .field input { padding: 7px 10px; font-size: 13px; }

.asset-preview {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.ap-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px; color: var(--ink-2);
}
.ap-row b { font-family: var(--mono); font-size: 13px; color: var(--ink); }
.ap-row.neg b { color: var(--red); }
.ap-row.total {
  border-top: 1px dashed var(--line); padding-top: 9px; margin-top: 1px;
  font-size: 13px; font-weight: 600; color: var(--ink);
}
.ap-row.total b { font-size: 17px; color: var(--green); }

/* ============ 供应商数据 ============ */
.sv-search {
  margin-left: auto; width: 210px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 8px 12px;
  color: var(--ink); font-size: 12.5px; outline: none;
}
.sv-search:focus { border-color: var(--blue); }

.sv-summary {
  font-size: 12px; color: var(--muted);
  margin-bottom: 12px; display: flex; gap: 8px; align-items: center;
}
.sv-summary b { color: var(--ink-2); font-weight: 600; }
.sv-summary .dot { opacity: .4; }

.sv-list { display: flex; flex-direction: column; gap: 12px; }

.sv-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
}
.sv-head {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.sv-avatar {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(145deg, #4a9eff, #9b7bf0);
}
.sv-title { flex: 1; min-width: 0; }
.sv-name { font-size: 14px; font-weight: 600; }
.sv-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.sv-head-acts { display: flex; gap: 6px; flex: none; }

.sv-items { padding: 4px 0; }
.sv-item-row {
  display: grid;
  grid-template-columns: 1fr 80px 110px 60px;
  gap: 8px; align-items: center;
  padding: 7px 16px;
  font-size: 12.5px;
}
.sv-item-row:hover { background: rgba(255,255,255,.02); }
.sv-item-head {
  font-size: 11px; color: var(--muted); font-weight: 600;
  padding-top: 8px; padding-bottom: 6px;
  letter-spacing: .03em;
}
.sv-item-head:hover { background: none; }
.sv-iname { color: var(--ink); }
.sv-item-row .num { text-align: right; color: var(--ink-2); }
.sv-item-acts { display: flex; gap: 3px; justify-content: flex-end; }

.sv-noitem {
  padding: 18px 16px; font-size: 12px; color: var(--muted);
  border-top: 1px solid var(--line-soft);
}

/* 对账表 */
.pay-table { font-size: 12.5px; }
.pay-table th { white-space: nowrap; padding: 9px 10px; font-size: 11px; }
.pay-table td { padding: 10px; white-space: nowrap; }
.pay-table .r { text-align: right; }
.pay-table .strong { font-weight: 700; }
.pay-table .sum-row td { border-top: 1px solid var(--line); background: var(--bg-2); }
.pay-table .opening-row td { background: rgba(74,158,255,.05); font-style: italic; }

.vlink { cursor: pointer; color: var(--blue); border-bottom: 1px dashed rgba(74,158,255,.35); }
.vlink:hover { color: #6fb3ff; }

.rate-bar {
  height: 6px; background: var(--panel-2); border-radius: 3px;
  overflow: hidden; width: 80px; display: inline-block; vertical-align: middle;
}
.rate-fill { height: 100%; background: linear-gradient(90deg, var(--green), #4ad6a0); border-radius: 3px; }
.rate-txt { font-size: 10.5px; color: var(--muted); margin-top: 3px; font-family: var(--mono); }

.pay-empty { text-align: center; padding: 26px 10px; }
.pay-empty-ico {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--green-soft); color: var(--green);
  display: grid; place-items: center; margin: 0 auto 10px;
  font-size: 20px; font-weight: 700;
}
.pay-empty p { font-size: 12.5px; color: var(--muted); }

.ac-bar.green { background: linear-gradient(180deg, var(--green), rgba(53,196,138,.35)); }

/* 历年累计 */
.sv-grand {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; margin-top: 14px;
}
.svg-item { background: var(--bg-2); padding: 16px 18px; }
.svg-label { font-size: 11.5px; color: var(--muted); }
.svg-value { font-size: 19px; font-weight: 700; margin-top: 5px; letter-spacing: -.01em; }

@media (max-width: 900px) {
  .sv-search { width: 100%; margin-left: 0; }
  .sv-item-row { grid-template-columns: 1fr 60px 90px 56px; font-size: 12px; }
  .sv-grand { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   供应商 · 新增表单内联品名录入
   ============================================================ */
.vi-block {
  margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line);
}
.vi-block-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.vi-block-head b { font-size: 13px; }
.vi-block-head span { font-size: 11.5px; color: var(--muted); }
.vi-rows { display: flex; flex-direction: column; gap: 7px; }
.vi-row {
  display: grid; grid-template-columns: 1fr 86px 100px 26px;
  gap: 7px; align-items: center;
}
.vi-row input {
  width: 100%; background: var(--bg); border: 1px solid var(--line);
  border-radius: 7px; padding: 7px 9px; color: var(--text);
  font-size: 12.5px; font-family: inherit;
}
.vi-row input:focus { outline: none; border-color: var(--blue); }
.vi-row input::placeholder { color: var(--muted); opacity: .7; }
.vi-row .mini { width: 24px; height: 24px; }
.vi-add {
  margin-top: 9px; padding: 5px 12px; font-size: 12px;
  border-style: dashed !important;
}

/* ============================================================
   供应商明细（一览无余）
   ============================================================ */
.vd-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-bottom: 18px;
}
.vd-kpi {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 3px;
}
.vd-kpi.warn { border-color: rgba(242,106,92,.35); }
.vd-kpi.ok { border-color: rgba(53,196,138,.3); }
.vd-k { font-size: 11.5px; color: var(--muted); }
.vd-v { font-size: 19px; font-weight: 650; letter-spacing: -.3px; }
.vd-s { font-size: 11px; color: var(--muted); opacity: .85; }

.vd-sec { margin-bottom: 20px; }
.vd-sec-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 9px;
}
.vd-sec-head b { font-size: 13px; }
.vd-sec-head > span { font-size: 11.5px; color: var(--muted); }
.vd-sec-act { margin-left: auto; padding: 5px 12px; font-size: 12px; }
.vd-years { margin-left: auto; display: flex; gap: 5px; }
.vd-ybtn { cursor: pointer; border: none; padding: 4px 11px; font-size: 11.5px; }
.vd-table { font-size: 12.5px; }
.vd-table th { font-size: 11.5px; }
.vd-table tbody tr:hover { background: rgba(255,255,255,.02); }
.vd-table tfoot td {
  border-top: 1px solid var(--line); font-weight: 600;
  padding: 9px 10px; font-size: 12px;
}
.vd-none {
  padding: 22px; text-align: center; color: var(--muted);
  font-size: 12.5px; background: var(--bg);
  border: 1px dashed var(--line); border-radius: var(--r);
}
.modal-card .sv-iname { font-weight: 500; }

@media (max-width: 900px) {
  .vd-kpis { grid-template-columns: repeat(2, 1fr); }
  .vi-row { grid-template-columns: 1fr 70px 84px 26px; }
  .modal-card.wide { max-width: 100%; }
}

/* ================= 新增模块样式 ================= */
/* --- 过期续费遮罩 --- */
.gate-mask {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(10, 14, 20, .82); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 18px;
  animation: gateIn .3s ease;
}
@keyframes gateIn { from { opacity: 0 } to { opacity: 1 } }
.gate-card {
  background: linear-gradient(160deg, #232c3a, #1a2029);
  border: 1px solid var(--line); border-radius: 22px;
  max-width: 430px; width: 100%; padding: 30px 26px;
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
  animation: gatePop .35s cubic-bezier(.2,1.4,.4,1);
  max-height: 92vh; overflow: auto;
}
@keyframes gatePop { from { transform: translateY(26px) scale(.96); opacity: 0 } to { transform: none; opacity: 1 } }
.gate-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--red-soft); color: var(--red);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 700;
}
.gate-card h2 { margin: 14px 0 6px; font-size: 22px; }
.gate-sub { color: var(--muted); font-size: 13px; line-height: 1.6; margin-bottom: 16px; }
.gate-price {
  background: var(--amber-soft); border: 1px dashed rgba(240,167,66,.45);
  border-radius: 14px; padding: 12px 16px; margin-bottom: 12px;
}
.gate-price b { color: var(--amber); font-size: 22px; }
.gate-note { color: var(--ink-2); font-size: 13px; margin-top: 4px; line-height: 1.6; }
.gate-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.gate-actions .btn { width: 100%; }

/* --- 联系方式 --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 4px; }
.contact-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; text-decoration: none;
  color: var(--ink); transition: border-color .18s, transform .18s;
}
.contact-item:hover { border-color: var(--brand); transform: translateY(-1px); }
.ci-ico {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
  background: var(--brand-soft); color: var(--brand);
}
.contact-item small { display: block; color: var(--muted); font-size: 11px; }
.contact-item b { font-size: 14px; }
.contact-item.qr { flex-direction: column; align-items: flex-start; grid-column: 1 / -1; }
.contact-item.qr img { width: 108px; height: 108px; border-radius: 10px; background: #fff; object-fit: contain; }
.contact-strip {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 16px; margin-bottom: 14px;
}
.contact-strip a { color: var(--brand); text-decoration: none; font-weight: 600; }
.contact-card { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }

/* --- 使用指南 --- */
.guide-wrap { max-width: 860px; }
.guide-title { font-size: 22px; font-weight: 800; margin-bottom: 14px; }
.guide-html {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 18px; padding: 22px 24px; line-height: 1.9;
}
.guide-html img { max-width: 100%; border-radius: 12px; margin: 8px 0; }
.guide-html video { max-width: 100%; border-radius: 12px; margin: 8px 0; }
.guide-html h1, .guide-html h2, .guide-html h3 { margin: 14px 0 8px; }
.guide-html ul, .guide-html ol { padding-left: 22px; }
.guide-empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* --- 阅读账号（只读） --- */
body.readonly .m-fab, body.readonly #quickAdd,
body.readonly .mbtn.edit, body.readonly .mini.edit,
body.readonly [data-del], body.readonly [data-edit],
body.readonly .btn-primary:not(#gateOk) { display: none !important; }
.ru-tag {
  display: inline-block; background: var(--blue-soft); color: var(--blue);
  border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700;
}

/* --- 留言类型标签 --- */
.act.m-coop { background: var(--blue-soft); color: var(--blue); }
.act.m-idea { background: var(--green-soft); color: var(--green); }
.act.m-bug  { background: var(--red-soft); color: var(--red); }

/* --- 通用小按钮 / 卡片副标题 --- */
.btn-sm { padding: 4px 12px; font-size: 12px; border-radius: 8px; }
.card-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* --- 登录页联系方式 --- */
.auth-contact {
  margin-top: 10px; text-align: center; font-size: 13px;
}
.auth-contact a { color: var(--muted); text-decoration: none; }
.auth-contact a:hover { color: var(--ink); }

/* contact-item 文本结构微调 */
.contact-item span { display: flex; flex-direction: column; min-width: 0; }
.contact-item i { font-style: normal; color: var(--muted); font-size: 12px; }
.contact-item small { margin-top: 4px; }

/* ============================================================
   视觉升级：广告位 / 大字周期 / Hero 渐变卡 / 药丸页签 / 美化
   ============================================================ */

/* --- 广告位 --- */
.banner-slot:empty { display: none; }
.banner-slot { margin-bottom: 14px; }
.site-banner {
  display: block; border-radius: 14px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  transition: transform .15s ease, box-shadow .15s ease;
  line-height: 0;
}
.site-banner:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
/* 广告图按原图比例自适应：宽度撑满，高度随比例，不裁切不变形 */
.site-banner img {
  display: block; width: 100%; height: auto; max-height: none;
  object-fit: contain;
}

/* --- 大字月份 / 年份 --- */
.big-period {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 14px; user-select: none;
}
.big-period .bp-num {
  font-size: 40px; font-weight: 800; letter-spacing: -1px; line-height: 1;
  background: linear-gradient(120deg, var(--ink), var(--blue));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  font-family: var(--mono);
}
.big-period .bp-unit { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.big-period .bp-sub { margin-left: auto; font-size: 12px; color: var(--muted); }

/* --- Hero 渐变卡（参考数据后台首屏） --- */
.hero-card {
  position: relative; overflow: hidden;
  border-radius: 18px; padding: 20px 22px; margin-bottom: 14px;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 55%, #8b5cf6 100%);
  color: #fff; box-shadow: 0 8px 24px rgba(79, 70, 229, .35);
}
.hero-card::after {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.hero-card::before {
  content: ''; position: absolute; right: 30px; bottom: -60px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.hero-label { font-size: 12.5px; opacity: .92; display: flex; align-items: center; gap: 6px; letter-spacing: .3px; }
.hero-value {
  font-size: 36px; font-weight: 800; line-height: 1.25; margin: 4px 0 14px;
  font-family: var(--mono); letter-spacing: -.5px;
  text-shadow: 0 2px 10px rgba(0,0,0,.22);
}
.hero-props { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
/* 每个指标一块半透明玻璃小卡，底色区分、不再一片白 */
.hero-prop {
  flex: 1; min-width: 120px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px; padding: 9px 14px 10px;
  backdrop-filter: blur(4px);
}
.hero-prop .hp-k { font-size: 11px; opacity: .82; letter-spacing: .3px; white-space: nowrap; }
.hero-prop .hp-v { font-size: 17px; font-weight: 800; font-family: var(--mono); margin-top: 2px; white-space: nowrap; }
/* 指标数字分色：一眼区分收入 / 成本 / 利率 / 均值 */
.hero-prop.hp-blue   .hp-v { color: #ffffff; text-shadow: 0 1px 6px rgba(0,0,0,.18); }
.hero-prop.hp-amber  .hp-v { color: #fde68a; }
.hero-prop.hp-green  .hp-v { color: #a7f3d0; }
.hero-prop.hp-cyan   .hp-v { color: #bae6fd; }

/* --- 页签药丸化 --- */
.fin-tabs {
  display: inline-flex; gap: 4px; background: var(--panel-2, rgba(255,255,255,.04));
  border: 1px solid var(--line-soft, var(--line)); border-radius: 999px;
  padding: 4px; margin-bottom: 16px;
}
.fin-tab {
  border: none; background: transparent; color: var(--muted);
  padding: 7px 18px; border-radius: 999px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s ease;
}
.fin-tab:hover { color: var(--ink); }
.fin-tab.active {
  background: linear-gradient(135deg, var(--blue), var(--violet, #6366f1));
  color: #fff; box-shadow: 0 2px 8px rgba(59,130,246,.4);
}

/* --- 卡片与导航打磨 --- */
.card { transition: box-shadow .15s ease; }
.card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.14); }
.nav-item { position: relative; overflow: hidden; }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 15%; bottom: 15%;
  width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, var(--blue), var(--violet, #6366f1));
}

/* --- 彩色图标小方块（参考图图标格） --- */
.ico-chip {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.ico-chip.blue   { background: var(--blue-soft);   color: var(--blue); }
.ico-chip.green  { background: var(--green-soft);  color: var(--green); }
.ico-chip.amber  { background: rgba(240,167,66,.15); color: var(--amber); }
.ico-chip.red    { background: var(--red-soft);    color: var(--red); }
.ico-chip.violet { background: rgba(139,92,246,.15); color: #a78bfa; }

/* --- 手机端适配 --- */
@media (max-width: 760px) {
  .big-period .bp-num { font-size: 32px; }
  .hero-card { padding: 16px 18px; border-radius: 16px; }
  .hero-value { font-size: 28px; }
  .hero-props { gap: 8px; }
  .hero-prop { min-width: calc(50% - 4px); padding: 8px 11px 9px; }
  .hero-prop .hp-v { font-size: 15px; }
  .fin-tabs { display: flex; width: 100%; }
  .fin-tab { flex: 1; padding: 8px 6px; font-size: 12.5px; }
}
