/* ===================== 开轩 ERP 全局样式 ===================== */
:root {
  --brand: #1a5fb4;
  --brand-2: #2d7ff9;
  --sidebar: #1e2a3a;
  --sidebar-hover: #27364a;
  --sidebar-active: #1a5fb4;
  --bg: #f4f6f9;
  --card: #ffffff;
  --line: #e6eaf0;
  --text: #1f2d3d;
  --muted: #7b8794;
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: "Microsoft YaHei", "微软雅黑", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; -webkit-font-smoothing: antialiased;
}
#app { height: 100%; }
a { color: var(--brand); text-decoration: none; }

/* ---------- 布局 ---------- */
.layout { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: 216px; flex: 0 0 216px; background: var(--sidebar); color: #c7d2e0;
  display: flex; flex-direction: column; transition: width .18s ease;
}
.sidebar.collapsed { width: 64px; flex-basis: 64px; }
.logo {
  height: 60px; display: flex; align-items: center; gap: 10px; padding: 0 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .06); overflow: hidden; white-space: nowrap;
}
.logo-mark {
  width: 30px; height: 30px; border-radius: 8px; flex: 0 0 30px;
  background: linear-gradient(135deg, #3b82f6, #1a5fb4);
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: 0 2px 8px rgba(45, 127, 249, .4);
}
.logo-text { font-size: 16px; font-weight: 600; color: #fff; letter-spacing: .5px; }
.logo-sub { font-size: 11px; color: #7d8ea3; }

.menu { flex: 1; overflow-y: auto; padding: 8px 0 20px; }
.menu::-webkit-scrollbar { width: 5px; }
.menu::-webkit-scrollbar-thumb { background: #3b4a5e; border-radius: 3px; }
.menu-group-title {
  font-size: 11px; color: #6b7d92; padding: 14px 20px 6px; letter-spacing: 1px; white-space: nowrap;
}
.collapsed .menu-group-title { padding: 10px 0 4px; text-align: center; font-size: 0; height: 6px; }
.menu-item {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 18px; margin: 1px 8px;
  border-radius: 7px; cursor: pointer; color: #c7d2e0; font-size: 13.5px; white-space: nowrap;
  transition: background .15s, color .15s;
}
.menu-item:hover { background: var(--sidebar-hover); color: #fff; }
.menu-item.active { background: var(--sidebar-active); color: #fff; box-shadow: 0 2px 10px rgba(26, 95, 180, .35); }
.menu-item .el-icon { font-size: 17px; flex: 0 0 18px; }
.menu-badge {
  margin-left: auto; background: #ef4444; color: #fff; border-radius: 10px;
  font-size: 11px; padding: 0 6px; height: 17px; line-height: 17px; min-width: 17px; text-align: center;
}
.collapsed .menu-item { justify-content: center; padding: 0; }
.collapsed .menu-item span { display: none; }
.collapsed .logo-text, .collapsed .logo-sub { display: none; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 56px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 16px; gap: 12px; flex: 0 0 56px; z-index: 10;
}
.collapse-btn { cursor: pointer; color: #5b6b7f; display: flex; align-items: center; font-size: 18px; }
.crumb { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.crumb .cur { color: var(--text); font-weight: 500; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.top-search { width: 220px; }
.company-tag {
  font-size: 12px; color: #4b5b6e; background: #eef4fe; border: 1px solid #dce9fd;
  padding: 3px 10px; border-radius: 20px;
}

.content { flex: 1; overflow-y: auto; padding: 16px; }
.content-inner { max-width: 1600px; margin: 0 auto; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid #eef1f5; padding: 16px 18px; margin-bottom: 14px;
}
.card.flat { padding: 0; overflow: hidden; }
.card-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.card-title { font-size: 15px; font-weight: 600; color: var(--text); }
.card-sub { font-size: 12px; color: var(--muted); }
.card-actions { margin-left: auto; display: flex; gap: 8px; }

.page-head {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px;
}
.page-title { font-size: 20px; font-weight: 600; letter-spacing: .3px; }
.page-desc { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.page-head-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 统计卡 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
@media (max-width: 1200px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat {
  background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
  border: 1px solid #eef1f5; display: flex; align-items: center; gap: 14px; position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; right: -20px; top: -20px; width: 88px; height: 88px;
  border-radius: 50%; background: rgba(45, 127, 249, .05);
}
.stat-icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; flex: 0 0 46px;
}
.stat-label { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.stat-value { font-size: 23px; font-weight: 600; letter-spacing: .3px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 3px; }
.stat-foot { font-size: 12px; color: #94a3b3; margin-top: 4px; }

/* ---------- 工具条 ---------- */
.toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}
.toolbar .spacer { flex: 1; }
.toolbar .el-input, .toolbar .el-select { width: 170px; }
.toolbar .el-date-editor { width: 240px; }

/* ---------- 表格 ---------- */
.el-table { --el-table-border-color: #eef1f5; --el-table-header-bg-color: #f8fafc; font-size: 13px; }
.el-table th.el-table__cell { background: #f8fafc !important; color: #475569; font-weight: 600; height: 40px; }
.el-table td.el-table__cell { height: 40px; }
.el-table .cell { line-height: 1.45; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.money { font-variant-numeric: tabular-nums; font-weight: 600; color: #0f172a; }
.money.neg { color: var(--danger); }
.muted { color: var(--muted); }
.mono { font-family: Consolas, "Courier New", monospace; font-size: 12.5px; }
.link-code { color: var(--brand); cursor: pointer; font-weight: 500; }
.link-code:hover { text-decoration: underline; }

.table-foot {
  display: flex; align-items: center; padding: 12px 4px 2px; gap: 10px;
}
.table-foot .sum { color: #475569; font-size: 13px; }
.table-foot .sum b { color: #0f172a; font-size: 15px; }
.table-foot .el-pagination { margin-left: auto; }

/* ---------- 状态标签 ---------- */
.tag-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }

/* ---------- 单据页 ---------- */
.doc-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid #eef1f5; }
.doc-head {
  padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; background: linear-gradient(180deg, #fbfdff, #fff);
}
.doc-head h2 { font-size: 18px; margin: 0; font-weight: 600; }
.doc-head .no { font-family: Consolas, monospace; color: var(--muted); font-size: 13px; }
.doc-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.doc-body { padding: 18px 20px 22px; }
.doc-section-title {
  font-size: 13px; font-weight: 600; color: #334155; margin: 4px 0 12px;
  padding-left: 10px; border-left: 3px solid var(--brand); line-height: 1.2;
}
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .span2 { grid-column: span 2; }
.form-grid .span4 { grid-column: span 4; }
@media (max-width: 1100px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.item-table .el-input__wrapper { padding: 0 8px; }
.item-table .el-input__inner { text-align: right; }
.item-table td { padding: 4px 0 !important; }
.item-table .el-select .el-input__inner { text-align: left; }

.total-bar {
  display: flex; align-items: center; justify-content: flex-end; gap: 28px;
  padding: 12px 16px; background: #f8fafc; border-radius: 8px; margin-top: 12px; border: 1px solid #eef1f5;
}
.total-bar .label { color: var(--muted); font-size: 12.5px; }
.total-bar .val { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.total-bar .grand .val { font-size: 21px; color: var(--brand); }

.doc-flow { display: flex; align-items: center; gap: 0; padding: 4px 0 16px; flex-wrap: wrap; }
.flow-step {
  display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #94a3b8;
}
.flow-step .dot {
  width: 22px; height: 22px; border-radius: 50%; background: #eef1f5; color: #94a3b8;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
}
.flow-step.done .dot { background: #dcfce7; color: #16a34a; }
.flow-step.cur .dot { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px rgba(45, 127, 249, .15); }
.flow-step.done, .flow-step.cur { color: #334155; }
.flow-line { width: 46px; height: 1px; background: #e2e8f0; margin: 0 8px; }

/* ---------- 登录 ---------- */
.login-page {
  height: 100vh; display: flex; background: radial-gradient(1200px 600px at 10% 10%, #1e3a5f 0%, #16202e 55%, #0f1720 100%);
  align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.login-page::before {
  content: ""; position: absolute; width: 900px; height: 900px; border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 127, 249, .22), transparent 60%); top: -350px; right: -250px;
}
.login-card {
  width: 400px; background: #fff; border-radius: 14px; padding: 34px 34px 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35); position: relative; z-index: 2;
}
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.login-title { font-size: 21px; font-weight: 600; }
.login-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 26px; }
.login-foot { text-align: center; color: #9aa7b6; font-size: 12px; margin-top: 18px; }
.login-deco { position: absolute; left: 60px; bottom: 60px; color: rgba(255, 255, 255, .35); z-index: 1; max-width: 420px; }
.login-deco h1 { font-size: 30px; margin: 0 0 10px; color: rgba(255, 255, 255, .9); letter-spacing: 2px; }
.login-deco p { margin: 0; line-height: 1.9; font-size: 13.5px; }

/* ---------- 其他 ---------- */
.empty-hint { text-align: center; color: #9aa7b6; padding: 40px 0; font-size: 13px; }
.section-gap { height: 8px; }
.chart-bars { display: flex; align-items: flex-end; gap: 14px; height: 180px; padding: 8px 4px 0; }
.chart-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-bar { width: 100%; max-width: 46px; background: linear-gradient(180deg, #5b9bf8, #1a5fb4); border-radius: 5px 5px 0 0; min-height: 3px; transition: height .4s; }
.chart-bar.purchase { background: linear-gradient(180deg, #f5b364, #e08a2e); }
.chart-label { font-size: 11.5px; color: var(--muted); }
.chart-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-left: auto; }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }

.todo-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #eef1f5; font-size: 13px; }
.todo-item:last-child { border-bottom: 0; }
.todo-item .kind { font-size: 11.5px; color: #64748b; background: #f1f5f9; padding: 2px 7px; border-radius: 4px; }
.todo-item .no { font-family: Consolas, monospace; color: var(--brand); cursor: pointer; }
.todo-item .amt { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick-item {
  border: 1px solid #eef1f5; border-radius: 8px; padding: 14px 10px; text-align: center; cursor: pointer;
  transition: all .15s; background: #fbfcfe;
}
.quick-item:hover { border-color: #bcd4f7; background: #f4f8ff; transform: translateY(-1px); }
.quick-item .el-icon { font-size: 22px; color: var(--brand); }
.quick-item div { margin-top: 6px; font-size: 12.5px; color: #475569; }

/* 打印 */
.print-sheet { background: #fff; padding: 0; }
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .page-head, .toolbar, .doc-head .actions, .no-print { display: none !important; }
  .content { overflow: visible; padding: 0; }
  .doc-wrap { box-shadow: none; border: 0; }
  .layout { display: block; height: auto; }
}
.print-page { width: 210mm; min-height: 297mm; margin: 0 auto; padding: 16mm 14mm; background: #fff; }
.print-title { text-align: center; font-size: 22px; font-weight: 700; letter-spacing: 6px; margin: 0 0 6px; }
.print-meta { text-align: center; font-size: 12px; color: #555; margin-bottom: 14px; }
.print-info { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 22px; font-size: 12.5px; margin-bottom: 10px; line-height: 1.9; }
.print-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.print-table th, .print-table td { border: 1px solid #333; padding: 5px 6px; }
.print-table th { background: #f2f2f2; font-weight: 600; }
.print-table td.n { text-align: right; font-variant-numeric: tabular-nums; }
.print-sum { font-size: 12.5px; margin-top: 8px; line-height: 2; }
.print-sign { display: flex; justify-content: space-between; margin-top: 32px; font-size: 12.5px; }
.print-sign div { width: 44%; line-height: 2.4; }

/* ---------- 多标签工作区 ---------- */
.tabbar {
  height: 40px; flex: 0 0 40px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 6px; padding: 0 8px 0 10px;
}
.tab-scroll { display: flex; align-items: flex-end; gap: 4px; overflow-x: auto; flex: 1; height: 100%; padding-top: 6px; }
.tab-scroll::-webkit-scrollbar { height: 4px; }
.tab-scroll::-webkit-scrollbar-thumb { background: #d8dee8; border-radius: 2px; }
.tab-item {
  display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 9px 0 12px;
  border-radius: 7px 7px 0 0; font-size: 12.5px; color: #5b6b7f; background: #f1f5f9;
  cursor: pointer; white-space: nowrap; border: 1px solid transparent; border-bottom: 0;
  transition: background .12s, color .12s; flex: 0 0 auto; max-width: 200px;
}
.tab-item:hover { background: #e8eef7; }
.tab-item.active { background: #fff; color: var(--brand); font-weight: 500; border-color: #e6eaf0; }
.tab-item.active::before {
  content: ""; position: absolute; /* 顶部蓝条由 box-shadow 模拟 */ 
}
.tab-title { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.tab-close { font-size: 12px; color: #94a3b8; border-radius: 3px; }
.tab-close:hover { background: #fee2e2; color: #dc2626; }
.tab-item.active .tab-close { color: #94a3b8; }
.tab-add {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  color: #94a3b8; cursor: pointer; border-radius: 6px; margin-bottom: 1px;
}
.tab-add:hover { background: #f1f5f9; color: #dc2626; }
.tab-tools { display: flex; align-items: center; padding-left: 6px; border-left: 1px solid #eef1f5; height: 22px; }
.tab-pane { min-height: calc(100vh - 56px - 40px - 32px); }

/* 明细表：产品型号输入框左对齐（数字列仍右对齐） */
.item-table .el-autocomplete .el-input__inner { text-align: left; }
.item-table .el-autocomplete .el-input__wrapper { padding: 0 8px; }

/* ---------- 统计卡片 / 账龄页 ---------- */
.page-sub{font-size:12.5px;color:var(--muted);margin-top:4px}
.stat-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:14px 0}
.stat-card{background:#fff;border:1px solid #e8edf5;border-radius:10px;padding:12px 14px}
.stat-label{font-size:12px;color:#64748b}
.stat-value{font-size:19px;font-weight:600;margin-top:6px;color:#0f172a}
.stat-sub{font-size:11px;color:#94a3b8;margin-left:6px;font-weight:400}
.stat-card.warn{border-left:3px solid #f59e0b}
.stat-card.danger{border-left:3px solid #ef4444}
.stat-card.ok{border-left:3px solid #16a34a}
.table-foot{margin-top:10px;font-size:12.5px;color:#64748b}
.danger{color:#c0392b}
.mobile-menu-btn{display:none}

/* ---------- 移动端 ---------- */
.sidebar-mask{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:900}
@media (max-width:820px){
  .layout{display:block}
  .sidebar{position:fixed;left:0;top:0;bottom:0;width:232px;flex-basis:232px;z-index:1000;
           transform:translateX(-100%);transition:transform .22s ease;box-shadow:2px 0 16px rgba(0,0,0,.12)}
  .sidebar.open{transform:none}
  .sidebar.collapsed{width:232px;flex-basis:232px}
  .main{width:100%;min-width:0}
  .collapse-btn{display:none}
  .mobile-menu-btn{display:flex;align-items:center;justify-content:center;width:36px;height:36px;
                   margin-right:6px;border-radius:8px;cursor:pointer;color:#334155;background:#f1f5f9}
  .topbar{padding:0 10px;gap:8px}
  .topbar-right{gap:8px}
  .company-tag{display:none}
  .topbar-right .muted{display:none}
  .crumb{font-size:13px}
  .content{padding:10px}
  .card{padding:12px;border-radius:10px}
  .page-head{flex-direction:column;align-items:flex-start;gap:8px}
  .page-title{font-size:17px}
  .page-head-actions{width:100%;margin-left:0}
  .form-grid{grid-template-columns:1fr;gap:0}
  .form-grid .span2,.form-grid .span4{grid-column:span 1}
  .doc-body{padding:10px}
  .doc-head{flex-direction:column;align-items:flex-start}
  .doc-head .actions{margin-left:0}
  .toolbar{flex-wrap:wrap;gap:6px}
  .toolbar .el-input,.toolbar .el-select{width:140px}
  .toolbar .el-date-editor{width:220px}
  .stat-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .stat-value{font-size:16px}
  .el-dialog{width:94%!important;margin-top:6vh!important}
  .el-message-box{width:90%!important}
  .tabbar .tab-tools{display:none}
  .tab-item{max-width:150px}
  .el-table{font-size:12px}
  .el-table .cell{padding:0 6px}
  .el-form-item{margin-bottom:12px}
  .el-form-item__label{font-size:13px}
  .sign{flex-direction:column;gap:16px}
  .doc-flow{overflow-x:auto;white-space:nowrap}
}

/* 列表状态快捷标签 */
.status-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:2px 0 10px}
.st-item{padding:4px 12px;border-radius:14px;background:#f1f5f9;color:#475569;font-size:12.5px;cursor:pointer;user-select:none}
.st-item:hover{background:#e2e8f0}
.st-item.active{background:#1a5fb4;color:#fff}

/* 响应式显隐 */
.mobile-only{display:none}
@media (max-width:820px){
  .desktop-only{display:none!important}
  .mobile-only{display:block}
  /* 表格首列吸附，横向滚动时保留上下文 */
  .el-table__body tr td:first-child{position:sticky;left:0;background:#fff;z-index:2}
  .el-table__header tr th:first-child{position:sticky;left:0;background:#f8fafc;z-index:3}
  .mobile-aging{border-bottom:1px solid #eef1f5;padding:10px 4px}
  .mobile-aging:last-child{border-bottom:0}
  .ma-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
  .ma-name{font-weight:600;font-size:13.5px;color:#0f172a}
  .ma-total{font-weight:700;color:#c0392b;white-space:nowrap}
  .ma-buckets{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px;font-size:12px;color:#475569}
  .ma-buckets .warn{color:#b45309}
  .ma-buckets .danger{color:#c0392b}
  .ma-buckets .ok{color:#16a34a}
}

/* 单据列表：手机卡片 */
.ml-item{background:#fff;border:1px solid #e8edf5;border-radius:10px;padding:11px 12px;margin-bottom:8px;cursor:pointer}
.ml-item:active{background:#f8fafc}
.ml-top{display:flex;justify-content:space-between;align-items:center;gap:8px}
.ml-no{font-size:12.5px;color:#1a5fb4}
.ml-name{margin-top:6px;font-weight:600;font-size:14px;color:#0f172a}
.ml-bot{display:flex;justify-content:space-between;align-items:center;margin-top:6px;font-size:12px}
.ml-bot .money{font-weight:700;color:#0f172a;font-size:15px}

@media (max-width:820px){
  .crumb{display:none}
  .topbar-right span{white-space:nowrap}
  .page-head .page-title{line-height:1.3}
}

/* 站内打印预览 */
.kx-print-mask{position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:3000;display:flex;align-items:center;justify-content:center}
.kx-print-wrap{width:min(980px,94vw);height:92vh;background:#f1f5f9;border-radius:12px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.kx-print-bar{display:flex;align-items:center;gap:10px;padding:10px 14px;background:#fff;border-bottom:1px solid #e6ebf2}
.kx-print-title{font-weight:600;font-size:14px;color:#0f172a}
.kx-pbtn{border:1px solid #d5dde8;background:#fff;color:#334155;border-radius:8px;padding:6px 14px;font-size:13px;cursor:pointer}
.kx-pbtn.primary{background:#1a5fb4;border-color:#1a5fb4;color:#fff}
.kx-pbtn:hover{opacity:.9}
.kx-print-body{flex:1;overflow:auto;padding:12px}
.kx-print-frame{width:100%;height:100%;border:0;background:#fff;border-radius:6px}
@media (max-width:820px){
  .kx-print-wrap{width:100vw;height:100vh;border-radius:0}
  .kx-print-body{padding:4px}
}

@media (max-width:820px){ .doc-head{display:none} }
/* 手机端单据预览 */
.doc-mobile{padding:8px}
.dm-card{background:#fff;border:1px solid #e8edf5;border-radius:10px;padding:12px;margin-bottom:8px}
.dm-title{font-weight:600;font-size:15px;color:#0f172a;margin-bottom:8px}
.dm-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px;font-size:13px}
.dm-name{flex:1;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dm-row .money{font-size:17px;font-weight:700;color:#0f172a}
.dm-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.dm-frame{width:100%;height:calc(100vh - 300px);border:0;background:#fff;border-radius:8px}

/* 手机端允许页面自然滚动 */
@media (max-width:820px){
  html,body{height:auto;overflow:auto}
  .layout{height:auto;min-height:100vh;display:block;overflow:visible}
  .main{height:auto;min-height:100vh;overflow:visible}
  .content{height:auto;overflow:visible;padding:10px}
  .tab-pane{height:auto;min-height:auto}
}
