/* ============================================================
   巨鳄直播基地运营系统 - 样式
   福州在云端科技有限公司
   ============================================================ */
:root {
  --brand: #1B4B8A;
  --brand-2: #2E6CB8;
  --brand-soft: #E8F0FA;
  --bg: #F2F6FA;
  --card: #FFFFFF;
  --ink: #1F2D3D;
  --ink-2: #5A6B85;
  --ink-3: #94A5BC;
  --line: #E4EBF4;
  --green: #179B57;
  --green-bg: #E7F6EE;
  --red: #D43A3A;
  --red-bg: #FBECEC;
  --amber: #D97E0F;
  --amber-bg: #FBF1E0;
  --blue: #2E6CB8;
  --blue-bg: #E8F0FA;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(20, 50, 90, 0.06);
  --shadow-lg: 0 8px 28px rgba(20, 50, 90, 0.10);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--ink); }
a { color: var(--brand-2); text-decoration: none; }

/* ===== 加载层 ===== */
.loader {
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.loader-logo { font-size: 18px; font-weight: 700; color: var(--brand); letter-spacing: 1px; }
.loader-bar { width: 160px; height: 4px; background: #DCE7F4; border-radius: 99px; overflow: hidden; }
.loader-bar i { display: block; width: 40%; height: 100%; background: var(--brand-2); border-radius: 99px; animation: loadbar 1s infinite ease-in-out; }
@keyframes loadbar { 0% { transform: translateX(-100%); } 100% { transform: translateX(400%); } }

/* ===== 登录页 ===== */
.login-wrap {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 28px 20px 40px;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(46,108,184,.14), transparent 60%),
    radial-gradient(800px 400px at -10% 110%, rgba(27,75,138,.10), transparent 60%),
    var(--bg);
}
.login-brand { text-align: center; margin-bottom: 26px; }
.brand-badge {
  width: 60px; height: 60px; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(27,75,138,.30);
}
.login-brand h1 { font-size: 22px; color: var(--ink); font-weight: 700; letter-spacing: 1px; }
.login-brand p { color: var(--ink-2); font-size: 13px; margin-top: 4px; }
.login-card {
  width: 100%; max-width: 380px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px 26px;
}
.login-tab { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.login-tab button { padding: 8px 2px 12px; font-size: 15px; color: var(--ink-3); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.login-tab button.active { color: var(--brand); border-color: var(--brand); }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #FBFCFE; outline: none; transition: border .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(46,108,184,.12); background: #fff;
}
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--brand); color: #fff;
  padding: 11px 22px; border-radius: 10px;
  font-size: 15px; font-weight: 600;
  transition: background .15s, transform .1s;
}
.btn-primary:hover { background: var(--brand-2); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-block { width: 100%; }
.login-hint { text-align: center; color: var(--ink-3); font-size: 12px; margin-top: 14px; }
.login-foot { margin-top: 28px; color: var(--ink-3); font-size: 12px; }

/* ===== 顶栏 ===== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 16px; height: 56px;
}
.topbar-title { display: flex; flex-direction: column; line-height: 1.2; }
.tt-name { font-weight: 700; font-size: 16px; color: var(--ink); }
.tt-sub { font-size: 11px; color: var(--ink-3); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-chip {
  font-size: 13px; color: var(--brand);
  background: var(--brand-soft);
  padding: 4px 12px; border-radius: 99px; font-weight: 600;
}
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2); transition: background .15s;
}
.icon-btn:hover { background: var(--bg); }
.icon-btn svg { display: block; }

/* ===== 布局 ===== */
.app-body { display: flex; min-height: calc(100vh - 56px); }
.sidebar {
  width: 216px; flex-shrink: 0;
  background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 56px; height: calc(100vh - 56px);
  transition: transform .25s ease;
}
.side-nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; border-radius: 10px;
  color: var(--ink-2); font-size: 14.5px; font-weight: 500;
  transition: background .15s, color .15s;
  text-align: left;
}
.nav-item svg { flex-shrink: 0; }
.nav-item:hover { background: var(--bg); color: var(--ink); }
.nav-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.side-foot { margin-top: auto; padding: 16px; font-size: 11px; color: var(--ink-3); }

.main { flex: 1; padding: 22px 24px 60px; min-width: 0; }
.page-view { max-width: 1160px; margin: 0 auto; }

/* ===== 卡片与 KPI ===== */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}
.card-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-title h3 { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.card-title .sub { font-size: 12px; color: var(--ink-3); }

.kpi-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-bottom: 16px;
}
.kpi-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px;
  position: relative; overflow: hidden;
}
.kpi-card::after {
  content: ""; position: absolute; right: -24px; top: -24px;
  width: 90px; height: 90px; border-radius: 50%; opacity: .10;
}
.kpi-card.k-income::after { background: var(--green); }
.kpi-card.k-expense::after { background: var(--red); }
.kpi-card.k-net::after { background: var(--brand); }
.kpi-card.k-month::after { background: var(--amber); }
.kpi-label { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.kpi-label .dot { width: 7px; height: 7px; border-radius: 50%; }
.k-income .dot { background: var(--green); }
.k-expense .dot { background: var(--red); }
.k-net .dot { background: var(--brand); }
.k-month .dot { background: var(--amber); }
.kpi-value { font-size: 25px; font-weight: 800; margin-top: 8px; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.kpi-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.kpi-sub.up { color: var(--green); }
.kpi-sub.down { color: var(--red); }

/* ===== 直播项目运营 ===== */
.vo-today-card { padding: 12px 16px; }
.vo-today-card .card-title { margin-bottom: 8px; }
.vo-today-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 13px; color: var(--ink-3); }
.vo-today-strip b { color: var(--ink-1); font-variant-numeric: tabular-nums; font-weight: 600; }
.vo-today-date { display: inline-flex; align-items: center; background: rgba(27, 75, 138, .08); color: var(--brand); padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; letter-spacing: .2px; }
.vo-today-src { font-size: 11.5px; color: var(--ink-3); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vo-note-box { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.vo-note-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.vo-note-title { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.vo-note-date { font-size: 12px; color: var(--brand); background: rgba(27, 75, 138, .08); padding: 2px 9px; border-radius: 20px; font-variant-numeric: tabular-nums; }
.vo-note-text { width: 100%; min-height: 88px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #FBFCFE; font-size: 13.5px; line-height: 1.8; color: var(--ink); resize: vertical; outline: none; transition: border .15s, box-shadow .15s; }
.vo-note-text:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(46,108,184,.12); background: #fff; }
.vo-note-foot { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.vo-note-hint { font-size: 12px; color: var(--ink-3); }
.voice-kpi { grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 12px; }
.voice-kpi .kpi-card { padding: 10px 12px; }
.voice-kpi .kpi-card::after { width: 62px; height: 62px; right: -18px; top: -18px; }
.voice-kpi .kpi-label { font-size: 11.5px; gap: 5px; }
.voice-kpi .kpi-label .dot { width: 6px; height: 6px; }
.voice-kpi .kpi-value { font-size: 18px; margin-top: 5px; letter-spacing: -0.3px; }
.voice-kpi .kpi-value small { font-size: 11px; }
.voice-kpi .kpi-sub { font-size: 11px; margin-top: 2px; }
.kpi-card.k-calls::after { background: var(--brand); }
.kpi-card.k-dur::after { background: var(--blue); }
.kpi-card.k-inc::after { background: var(--green); }
.kpi-card.k-cost::after { background: var(--red); }
.kpi-card.k-profit::after { background: var(--amber); }
.kpi-card.k-roi::after { background: #6D4BC4; }
.k-calls .dot { background: var(--brand); }
.k-dur .dot { background: var(--blue); }
.k-inc .dot { background: var(--green); }
.k-cost .dot { background: var(--red); }
.k-profit .dot { background: var(--amber); }
.k-roi .dot { background: #6D4BC4; }
.vo-empty { text-align: center; padding: 30px 16px; color: var(--ink-3); }
.vo-empty .vo-empty-ico { margin-bottom: 10px; }
.vo-empty p { font-size: 13.5px; line-height: 1.9; }
.vo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 4px 0 6px; font-size: 12.5px; color: var(--ink-3); }
.vo-meta b { color: var(--ink-2); font-weight: 600; }
.vo-section { margin: 16px 0 8px; font-size: 13px; color: var(--ink-2); font-weight: 700; }
.vos-hint { font-size: 12.5px; color: var(--ink-3); margin-bottom: 14px; line-height: 1.8; }
.vos-hint b { color: var(--brand); }
.vos-file-box {
  display: block; border: 1.5px dashed #C9D6E6; border-radius: 12px;
  padding: 28px 16px; text-align: center; cursor: pointer;
  transition: all .15s; margin-bottom: 14px; background: #FBFCFE;
}
.vos-file-box:hover { border-color: var(--brand-2); background: var(--brand-soft); }
.vos-file-box input { display: none; }
.vos-file-ico { font-size: 26px; color: var(--brand-2); margin-bottom: 6px; }
.vos-file-name { font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.vos-tip { font-size: 12px; color: var(--ink-3); margin-top: 10px; text-align: center; line-height: 1.7; }
.vos-map-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; margin: 6px 0 10px; }
.vos-map-grid .field { margin-bottom: 12px; }
.vos-mode-row { display: flex; gap: 16px; align-items: center; padding: 8px 2px; }
.vos-mode-row label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.vos-mode-row input { accent-color: var(--brand-1); width: 15px; height: 15px; }
.vo-month:hover td { background: var(--brand-soft); }
.vo-month-open td { background: var(--brand-soft); }
.vos-arrow { display: inline-block; font-size: 12px; color: var(--ink-3); margin-left: 2px; }
.vo-month-open .vos-arrow { color: var(--brand-1); }
.contrib-top1 td { background: #FFF8E6; }
.contrib-top2 td { background: #F4F7FC; }
.contrib-top3 td { background: #F7FAF7; }
.contrib-zero td { color: var(--ink-3); opacity: .7; }
.contrib-badge { display: inline-block; background: var(--brand-1); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 10px; margin-left: 6px; vertical-align: 1px; }
.vos-preview th, .vos-preview td { white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }

/* ===== 图表容器 ===== */
.chart-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-bottom: 16px; }
.chart-grid.even { grid-template-columns: 1fr 1fr; }
.chart-box { height: 300px; }
.chart-box.tall { height: 340px; }

/* ===== 最近流水 ===== */
.flow-list { display: flex; flex-direction: column; }
.flow-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 4px; border-bottom: 1px solid #F0F4FA;
}
.flow-row:last-child { border-bottom: none; }
.flow-ico {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.flow-ico.income { background: var(--green-bg); color: var(--green); }
.flow-ico.expense { background: var(--red-bg); color: var(--red); }
.flow-ico.transfer { background: var(--blue-bg); color: var(--blue); }
.flow-main { flex: 1; min-width: 0; }
.flow-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-meta { font-size: 12px; color: var(--ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-amt { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14.5px; flex-shrink: 0; }
.flow-amt.income { color: var(--green); }
.flow-amt.expense { color: var(--red); }
.flow-amt.transfer { color: var(--blue); }

/* ===== 工具条 ===== */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.select, .input {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; outline: none; font-size: 14px;
}
.select:focus, .input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(46,108,184,.12); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 15px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff;
  color: var(--ink-2); font-size: 14px; font-weight: 500;
  transition: border .15s, color .15s, background .15s;
}
.btn-ghost:hover { border-color: var(--brand-2); color: var(--brand); background: var(--brand-soft); }
.btn-danger { background: var(--red); color: #fff; border: 1px solid var(--red); }
.btn-danger:hover { background: #E64545; }
.btn-danger:active { transform: scale(.98); }
.btn-danger-ghost { color: var(--red); }
.btn-danger-ghost:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data-table th {
  text-align: left; padding: 10px 12px;
  color: var(--ink-2); font-weight: 600; font-size: 12.5px;
  background: #F7FAFD; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data-table td {
  padding: 11px 12px; border-bottom: 1px solid #F0F4FA;
  vertical-align: middle; white-space: nowrap;
}
table.data-table tr:hover td { background: #FAFCFE; }
.td-type { font-size: 12px; padding: 3px 9px; border-radius: 99px; font-weight: 600; }
.td-type.income { background: var(--green-bg); color: var(--green); }
.td-type.expense { background: var(--red-bg); color: var(--red); }
.td-type.transfer { background: var(--blue-bg); color: var(--blue); }
.td-num { font-variant-numeric: tabular-nums; font-weight: 600; }
.td-num.income { color: var(--green); }
.td-num.expense { color: var(--red); }
.td-num.transfer { color: var(--blue); }
.td-remark { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 流水明细：筛选行下方月份 / 年度汇总条 */
.flow-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 26px; margin: 12px 0 14px; padding: 10px 14px; background: #F4F8FC; border: 1px solid var(--line); border-left: 3px solid var(--brand-2); border-radius: 8px; font-size: 13px; color: var(--ink-2); }
.flow-summary .sum-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.flow-summary .sum-label { font-size: 13.5px; font-weight: 700; color: var(--ink); margin-right: 6px; }
.flow-summary .sum-item b { margin-left: 3px; font-weight: 700; font-variant-numeric: tabular-nums; }
.flow-summary .sum-income { color: var(--green); }
.flow-summary .sum-expense { color: var(--red); }
.flow-summary .sum-surplus.pos { color: var(--green); }
.flow-summary .sum-surplus.neg { color: var(--red); }
.flow-summary .sum-year { padding-left: 20px; border-left: 1px solid var(--line); }
.flow-summary .sum-year .sum-label { color: var(--brand); }
.flow-summary .sum-sub { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.flow-summary .sum-roi { margin-left: 3px; font-weight: 800; font-variant-numeric: tabular-nums; }
.flow-summary .sum-roi.pos { color: var(--green); }
.flow-summary .sum-roi.neg { color: var(--red); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.pager button {
  padding: 6px 13px; border-radius: 8px; border: 1px solid var(--line); background: #fff;
  font-size: 13px; color: var(--ink-2);
}
.pager button:disabled { opacity: .4; cursor: not-allowed; }
.pager-pages { display: inline-flex; align-items: center; gap: 5px; }
.pager-pages .pager-num {
  min-width: 34px; padding: 6px 10px; text-align: center;
  border-radius: 8px; border: 1px solid var(--line); background: #fff;
  font-size: 13px; color: var(--ink-2); cursor: pointer; line-height: 1.2;
}
.pager-pages .pager-num:hover { border-color: var(--brand); color: var(--brand); }
.pager-pages .pager-num.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; cursor: default; }
.pager-pages .pager-dots { color: var(--ink-3); padding: 0 3px; }

/* ===== 录入表单 ===== */
.record-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; max-width: 1060px; }
.record-wrap { max-width: 720px; }
.record-type { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.type-btn {
  padding: 14px 10px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-weight: 600; color: var(--ink-2); transition: all .15s;
}
.type-btn small { font-weight: 400; font-size: 11px; color: var(--ink-3); }
.type-btn.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .field-wide { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 12px; margin-top: 20px; }
.amount-input { font-size: 20px !important; font-weight: 700; }

/* ===== 对账卡片 ===== */
.recon-card .card { padding: 16px; }
.recon-list { display: flex; flex-direction: column; gap: 8px; }
.recon-item {
  background: #F7FAFD; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px;
}
.recon-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.recon-acc { font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recon-date { font-size: 11.5px; color: var(--ink-3); flex-shrink: 0; }
.recon-bal { font-size: 17px; font-weight: 800; color: var(--brand); margin-top: 3px; font-variant-numeric: tabular-nums; }
.recon-remark { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

/* ===== 报表 ===== */
.report-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.report-tab {
  padding: 8px 18px; border-radius: 99px;
  border: 1px solid var(--line); background: #fff;
  font-size: 14px; color: var(--ink-2); font-weight: 500;
  transition: all .15s;
}
.report-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.summary-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px;
}
.summary-cell { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.summary-cell .s-label { font-size: 12.5px; color: var(--ink-2); }
.summary-cell .s-value { font-size: 21px; font-weight: 800; margin-top: 5px; font-variant-numeric: tabular-nums; }
.summary-cell .s-value.green { color: var(--green); }
.summary-cell .s-value.red { color: var(--red); }
.summary-cell .s-value.brand { color: var(--brand); }

/* ===== 设置页 ===== */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.settings-grid .card h3 { margin-bottom: 14px; }
.mini-form { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.mini-form .input { flex: 1; min-width: 120px; }
.mini-form .select { flex-shrink: 0; }
.role-badge { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.role-badge.admin { background: var(--amber-bg); color: var(--amber); }
.role-badge.executive { background: #EDE9FB; color: #6D4BC4; }

/* ===== 加载提示 ===== */
.loading-tip { padding: 26px 0; text-align: center; color: var(--ink-3); font-size: 14px; }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  background: rgba(31,45,61,.92); color: #fff;
  padding: 10px 20px; border-radius: 99px; font-size: 14px;
  z-index: 300; box-shadow: var(--shadow-lg);
  max-width: 86vw; text-align: center;
  animation: toastIn .2s ease;
}
.toast.error { background: rgba(212,58,58,.94); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ===== 编辑弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(18, 30, 46, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal {
  background: #fff; border-radius: 16px;
  width: 100%; max-width: 560px; max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.modal-head h3 { font-size: 16px; font-weight: 700; color: var(--ink); }
.modal-close { font-size: 26px; line-height: 1; color: var(--ink-3); padding: 0 4px; border-radius: 8px; transition: color .15s, background .15s; }
.modal-close:hover { color: var(--red); background: var(--red-bg); }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 13px 20px; border-top: 1px solid var(--line); flex-shrink: 0;
}
.modal .record-type { margin-bottom: 14px; }

/* ===== 手机底部导航 ===== */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: #fff; border-top: 1px solid var(--line);
  display: none; grid-template-columns: repeat(6, 1fr);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 6px; color: var(--ink-3); font-size: 11px;
}
.tab-item.active { color: var(--brand); }
.tab-item svg { display: block; }

/* ===== 移动端适配 ===== */
@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .voice-kpi { grid-template-columns: repeat(3, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .record-layout { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .main { padding: 14px 14px 90px; }
  .sidebar { position: fixed; left: 0; top: 56px; bottom: 0; z-index: 55; transform: translateX(-100%); width: 220px; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .tabbar { display: grid; }
  .topbar { padding: 0 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .vos-map-grid { grid-template-columns: 1fr; }
  .summary-strip { grid-template-columns: 1fr; gap: 10px; }
  .kpi-value { font-size: 22px; }
  .table-wrap { margin: 0 -14px; padding: 0 14px; }
}
@media (max-width: 480px) {
  .voice-kpi { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .kpi-grid { gap: 10px; }
  .kpi-card { padding: 13px 14px; }
  .kpi-value { font-size: 20px; }
  .record-type { gap: 8px; }
  .type-btn { padding: 11px 6px; font-size: 13px; }
  .toolbar .select, .toolbar .input { flex: 1; min-width: 90px; }
}


/* ===== 版本号 ===== */
.app-version { max-width: 1160px; margin: 26px auto 0; padding-top: 18px; border-top: 1px dashed var(--line); text-align: center; }
.ver-link { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; color: var(--ink-3); font-size: 12px; cursor: pointer; padding: 6px 10px; border-radius: 8px; }
.ver-link:hover { color: var(--brand); background: var(--bg-2); }
.ver-logs { display: flex; flex-direction: column; gap: 14px; max-height: 56vh; overflow-y: auto; }
.ver-log { border-left: 2px solid var(--brand); padding-left: 12px; }
.ver-log-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.ver-badge { font-weight: 800; color: var(--brand); font-size: 13px; background: var(--brand-bg, #EAF1FA); padding: 2px 8px; border-radius: 6px; }
.ver-date { font-size: 12px; color: var(--ink-3); }
.ver-log ul { margin: 0; padding-left: 18px; }
.ver-log li { font-size: 12.5px; color: var(--ink-2); line-height: 1.9; }


/* 对方账户搜索框（编辑弹窗） */
.party-search { width: 100%; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; margin-bottom: 6px; background: #fff; box-sizing: border-box; }
.party-search:focus { outline: none; border-color: var(--brand); }


/* 编辑弹窗：搜索框 + 添加按钮行 */
.party-add-row { display: flex; gap: 6px; margin-bottom: 6px; }
.party-add-row .party-search { margin-bottom: 0; flex: 1; }


/* 备用金自动对账 */
.reserve-recon { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 10px; }
.reserve-item { background: #F8FAFD; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.reserve-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.reserve-name { font-weight: 600; font-size: 13.5px; }
.reserve-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); line-height: 1.9; }
.reserve-row b { color: var(--ink-1); font-weight: 600; }
.reserve-diff { margin-top: 6px; font-size: 12px; padding: 4px 8px; border-radius: 6px; text-align: center; }
.reserve-diff.ok { background: #EAF7EE; color: var(--green); }
.reserve-diff.warn { background: #FFF5E6; color: #D97E0F; }

.drag-over { background: #E8F0FE !important; outline: 2px dashed var(--brand); }
.acct-name { cursor: pointer; }
.acct-name:hover { color: var(--brand); }

/* ===== 往来资金（借贷/投资） ===== */
.record-type { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.type-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.type-row-debt { grid-template-columns: repeat(6, 1fr); }
.type-row-debt .type-btn { padding: 9px 6px; border-radius: 10px; font-size: 13px; flex-direction: row; gap: 5px; }
.type-row-debt .type-btn small { font-size: 10.5px; color: var(--ink-3); font-weight: 400; }
.type-btn.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }

/* 往来类型徽章颜色 */
.td-type.lend, .td-type.borrow, .td-type.invest { background: var(--amber-bg); color: var(--amber); }
.td-type.collect, .td-type.repay { background: var(--blue-bg); color: var(--blue); }
.td-type.divest { background: var(--green-bg); color: var(--green); }
.td-num.lend, .td-num.repay, .td-num.invest { color: var(--amber); }
.td-num.collect, .td-num.borrow, .td-num.divest { color: var(--blue); }

/* 往来状态 */
.debt-status { font-size: 12px; padding: 3px 9px; border-radius: 99px; font-weight: 600; white-space: nowrap; }
.debt-status.active { background: var(--green-bg); color: var(--green); }
.debt-status.done { background: var(--blue-bg); color: var(--blue); }
.debt-status.closed { background: #EEF1F5; color: var(--ink-3); }
.debt-status.overdue { background: var(--red-bg); color: var(--red); }

/* 往来 KPI 与详情 */
.debt-kpi-card { margin-bottom: 16px; }
.debt-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.debt-kpi-cell { background: #F7FAFD; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.debt-kpi-cell .s-label { font-size: 12.5px; color: var(--ink-2); }
.debt-kpi-cell .s-value { font-size: 19px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.s-value.warn { color: var(--amber); }
.s-value.muted { color: var(--ink-3); }

.debt-detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 16px; background: #F7FAFD; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.debt-detail-grid > div { display: flex; flex-direction: column; gap: 3px; }
.debt-detail-grid span { font-size: 11.5px; color: var(--ink-3); }
.debt-detail-grid b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.debt-detail-grid b.warn { color: var(--amber); }
.debt-detail-grid b.red { color: var(--red); }
.debt-detail-grid b.brand { color: var(--brand); }
.debt-detail-grid b.muted { color: var(--ink-3); }

/* 往来筛选按钮 */
.dk-filter { padding: 5px 14px; font-size: 12.5px; }
.dk-filter.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }

@media (max-width: 860px) {
  .type-row-debt { grid-template-columns: repeat(3, 1fr); }
  .debt-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .debt-detail-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   附件（凭证图片）样式 v1.36.0
   ============================================================ */
.att-box { margin-top: 4px; }
.att-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.att-label { font-size: 12.5px; color: var(--ink-2); }
.att-list { display: flex; flex-direction: column; gap: 6px; }
.att-empty { font-size: 12px; color: var(--ink-3); padding: 6px 0; }
.att-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #FAFCFE; }
.att-item.att-pending { background: #FFFDF5; border-style: dashed; }
.att-thumb { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; background: #E8EEF5; cursor: pointer; flex: 0 0 auto; }
.att-thumb.att-pdf, .att-thumb.att-pending-thumb { display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--ink-3); font-weight: 600; }
.att-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.att-name { font-size: 12.5px; color: var(--ink-1); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.att-name:hover { color: var(--brand); }
.att-sub { font-size: 11px; color: var(--ink-3); }
.att-del { width: 24px; height: 24px; border-radius: 50%; border: none; background: transparent; color: var(--ink-3); font-size: 18px; cursor: pointer; flex: 0 0 auto; }
.att-del:hover { background: #FFECEC; color: var(--red); }
