/* 易租星 审计后台 样式（仿原后台：深色侧栏 + 浅色内容区） */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
  color: #303133;
  background: #f0f2f5;
}
.hidden { display: none !important; }
a { color: #409eff; text-decoration: none; }

/* ---------- 登录页 ---------- */
.login-wrap {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #17222e 0%, #1f2f42 55%, #24384f 100%);
}
.login-card {
  width: 400px;
  background: #0e1722;
  border-radius: 8px;
  padding: 48px 44px 36px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}
.login-title { color: #fff; font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 34px; }
.login-label { display: block; color: #35b8e0; font-size: 13px; margin: 18px 0 2px; }
.login-card input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid #3a4a5e;
  color: #e8eef4;
  font-size: 15px;
  padding: 10px 2px;
  outline: none;
}
.login-card input:focus { border-bottom-color: #35b8e0; }
.login-err { color: #f56c6c; font-size: 13px; min-height: 20px; margin-top: 14px; }
.login-btn {
  margin-top: 8px;
  background: transparent;
  border: none;
  color: #35b8e0;
  font-size: 17px;
  letter-spacing: 6px;
  padding: 8px 4px 12px;
  border-left: 2px solid #35b8e0;
  border-bottom: 1px solid #3a4a5e;
  width: 84px;
  cursor: pointer;
}
.login-btn:hover { color: #6fd2ef; }
.login-tip { margin-top: 28px; color: #5d7085; font-size: 12px; text-align: center; }

/* ---------- 布局 ---------- */
.layout { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 200px;
  flex: none;
  background: #2b3648;
  color: #bfcbd9;
  overflow-y: auto;
  padding-bottom: 30px;
}
.brand {
  height: 56px;
  line-height: 56px;
  text-align: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  background: #222c3c;
  white-space: nowrap;
  overflow: hidden;
}
.menu-group { margin-top: 4px; }
.menu-item {
  display: block;
  padding: 13px 20px;
  color: #bfcbd9;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  border-left: 3px solid transparent;
}
.menu-item:hover { background: #263445; }
.menu-item.active { color: #409eff; background: #1f2c3d; border-left-color: #409eff; }
.menu-sub { display: none; }
.menu-group.open .menu-sub { display: block; }
.menu-group > .menu-item::after {
  content: "";
  float: right;
  margin-top: 6px;
  border: 4px solid transparent;
  border-top-color: #7d8ca3;
}
.menu-group.open > .menu-item::after {
  border-top-color: transparent;
  border-bottom-color: #7d8ca3;
  margin-top: -2px;
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 56px;
  flex: none;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  z-index: 5;
}
.crumb { color: #97a8be; font-size: 13px; }
.crumb b { color: #303133; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-right select {
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 13px;
  color: #606266;
  background: #fff;
  max-width: 180px;
}
.who { color: #606266; }
.mask-toggle { color: #606266; font-size: 13px; user-select: none; cursor: pointer; }
.content { flex: 1; overflow: auto; padding: 16px; }

/* ---------- 首页报表卡片 ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1200px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card {
  background: #fff;
  border-radius: 6px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.card .num { font-size: 26px; font-weight: 700; color: #303133; word-break: break-all; }
.card .lab { margin-top: 6px; color: #909399; font-size: 13px; }
.card .err { color: #f56c6c; font-size: 12px; margin-top: 4px; }

/* ---------- 筛选区 ---------- */
.filter-bar {
  background: #fff;
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: flex-end;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.f-item { display: flex; flex-direction: column; gap: 4px; }
.f-item > label { font-size: 12px; color: #909399; }
.f-item input, .f-item select {
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
  color: #606266;
  min-width: 150px;
  background: #fff;
}
.f-item input:focus, .f-item select:focus { border-color: #409eff; }
.btn {
  border: 1px solid #dcdfe6;
  background: #fff;
  color: #606266;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
}
.btn.primary { background: #409eff; border-color: #409eff; color: #fff; }
.btn.primary:hover { background: #66b1ff; }
.btn:hover { color: #409eff; border-color: #c6e2ff; background: #ecf5ff; }

/* ---------- 表格 ---------- */
.table-card {
  background: #fff;
  border-radius: 6px;
  padding: 10px 12px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th, table.grid td {
  border-bottom: 1px solid #ebeef5;
  padding: 10px 10px;
  text-align: left;
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}
table.grid th {
  color: #909399;
  font-weight: 600;
  background: #fafafa;
  cursor: pointer;
  user-select: none;
  position: sticky;
  top: 0;
}
table.grid th:hover { color: #409eff; }
table.grid td.wrap { white-space: normal; }
table.grid tr:hover td { background: #f5f7fa; }
.empty-tip { text-align: center; color: #909399; padding: 30px 0; }

/* 状态标签 */
.tag { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 12px; line-height: 18px; }
.tag.gray { background: #f4f4f5; color: #909399; }
.tag.blue { background: #ecf5ff; color: #409eff; }
.tag.green { background: #f0f9eb; color: #67c23a; }
.tag.orange { background: #fdf6ec; color: #e6a23c; }
.tag.red { background: #fef0f0; color: #f56c6c; }

/* 分页 */
.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: #606266;
}
.pager input {
  width: 56px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  padding: 6px 8px;
  text-align: center;
}
.pager .btn { padding: 6px 12px; }
.pager .btn:disabled { color: #c0c4cc; cursor: not-allowed; background: #fff; }

.loading { text-align: center; color: #909399; padding: 40px 0; }

/* ---------- 订单卡片页 ---------- */
.status-tabs { background: #fff; border-radius: 6px; padding: 10px 14px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.stab { display: inline-block; padding: 6px 14px; margin: 3px 6px 3px 0; border: 1px solid #e4e7ed; border-radius: 4px; font-size: 13px; color: #606266; cursor: pointer; user-select: none; }
.stab:hover { color: #409eff; border-color: #c6e2ff; }
.stab.on { background: #409eff; border-color: #409eff; color: #fff; }
.ocard { background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); overflow: hidden; }
.ocard-gap { height: 14px; }
.ocard-head { display: flex; flex-wrap: wrap; gap: 6px 26px; background: #f5f7fa; padding: 10px 16px; font-size: 13px; color: #606266; border-bottom: 1px solid #ebeef5; }
.ocard-head b { color: #303133; }
.ocard-grid { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1.2fr 1.2fr 1fr 0.9fr; }
.oc-prod { display: flex; gap: 12px; padding: 14px 16px; border-right: 1px solid #ebeef5; }
.oc-prod img { width: 72px; height: 72px; object-fit: cover; border-radius: 4px; flex: none; }
.oc-title { color: #409eff; font-weight: 600; margin-bottom: 6px; }
.oc-detail { color: #909399; font-size: 12px; margin-bottom: 4px; }
.oc-cell { padding: 14px 14px; border-right: 1px solid #ebeef5; font-size: 13px; }
.oc-cell:last-child { border-right: none; }
.oc-num { font-size: 16px; font-weight: 700; color: #303133; margin-bottom: 4px; }
.oc-sub { color: #606266; font-size: 12px; margin-bottom: 4px; word-break: break-all; }
.oc-sub.dim, .dim { color: #c0c4cc; }
.oc-statusText { font-size: 15px; font-weight: 700; color: #e6a23c; margin-bottom: 6px; }
.ocard-bills { padding: 10px 16px; border-top: 1px solid #ebeef5; font-size: 13px; }
.bill-chip { display: inline-block; padding: 2px 8px; margin: 2px 6px 2px 0; border-radius: 3px; font-size: 12px; }
.bill-chip.paid { background: #f0f9eb; color: #67c23a; }
.bill-chip.unpaid { background: #fef0f0; color: #f56c6c; }
.oc-line { padding: 8px 16px; border-top: 1px solid #f2f6fc; font-size: 13px; color: #606266; }
.oc-line.red { color: #f56c6c; }
.log-box { margin-top: 4px; max-height: 120px; overflow-y: auto; }
.log-line { font-size: 12px; color: #909399; padding: 2px 0; border-bottom: 1px dashed #f0f0f0; }
.log-line b { color: #606266; }
.bad-total { background: #fff; border-radius: 6px; padding: 14px 18px; margin-bottom: 14px; font-size: 15px; color: #303133; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.bad-total b { color: #f56c6c; font-size: 20px; }
.ocard, .ocard div { text-align: left; }
.ocard-bills, .oc-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.ocard-bills b, .oc-line b { flex: none; color: #303133; }
.oc-line .log-box { display: inline; max-height: none; overflow: visible; }
.oc-line .log-line { display: inline; border: none; margin-right: 14px; }
.ocard-head, .ocard-head span { text-align: left; }
.yday-line { background: #fff; border-radius: 6px; padding: 12px 16px; margin-bottom: 14px; font-size: 14px; font-weight: 600; color: #303133; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.ocard-cols { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1.2fr 1.2fr 1fr 0.9fr; background: #f5f7fa; border-radius: 6px 6px 0 0; padding: 10px 0; font-size: 13px; color: #606266; font-weight: 600; }
.ocard-cols span { text-align: center; }
.ocard-grid { border-top: none; }
img.thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 3px; border: 1px solid #ebeef5; vertical-align: middle; }
.oc-line span { margin-right: 14px; }
.sd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 10px 0; }
.sd-row { padding: 8px 16px; border-bottom: 1px solid #f2f6fc; font-size: 13px; }
.sd-k { display: inline-block; width: 130px; color: #909399; }
.sd-v { color: #303133; }
.sd-img { margin-right: 10px; }
.sd-img span { font-size: 12px; color: #409eff; margin-left: 4px; }
/* ---------- 卡片按钮行 + 弹窗 ---------- */
.ocard-btns { padding: 10px 16px; border-top: 1px solid #f2f6fc; }
.ocard-btn { display: inline-block; background: #409eff; color: #fff; border-radius: 3px; font-size: 12px; padding: 4px 10px; margin: 2px 6px 2px 0; cursor: pointer; user-select: none; }
.ocard-btn:hover { background: #66b1ff; }
.modal-wrap { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 200; display: flex; align-items: center; justify-content: center; }
.modal { background: #fff; border-radius: 6px; width: 760px; max-width: 94vw; max-height: 84vh; display: flex; flex-direction: column; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25); }
.modal-head { padding: 12px 16px; border-bottom: 1px solid #ebeef5; display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.modal-x { cursor: pointer; font-size: 22px; color: #909399; line-height: 1; }
.modal-x:hover { color: #f56c6c; }
.modal-body { padding: 14px 16px; overflow: auto; font-size: 13px; }
.m-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.m-table th, .m-table td { border: 1px solid #ebeef5; padding: 6px 8px; text-align: left; }
.m-table th { background: #fafafa; color: #606266; }
.m-img { max-width: 100%; max-height: 320px; margin: 6px 0; border: 1px solid #ebeef5; }
.m-line { padding: 5px 0; border-bottom: 1px dashed #f0f0f0; }
/* ---------- 宽表自适应（每日应还等多列页面） ---------- */
table.grid.fit { table-layout: fixed; width: 100%; }
table.grid.fit th, table.grid.fit td {
  white-space: normal; word-break: break-all; text-align: center;
  padding: 6px 4px; font-size: 12px; max-width: none;
}
table.grid.fit th { line-height: 1.3; }
.bill-banner { background: #ecf5ff; border: 1px solid #d9ecff; border-radius: 6px; padding: 14px 18px; margin-bottom: 14px; font-size: 14px; color: #303133; }
.bill-banner b { color: #f56c6c; font-size: 18px; }
/* ---------- 财务汇总行 ---------- */
.stat-row { background: #fff; border-radius: 6px; padding: 14px 8px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.stat-table { width: 100%; table-layout: fixed; }
.stat-table td { text-align: center; padding: 8px 4px; border-right: 1px solid #f0f2f5; }
.stat-table td:last-child { border-right: none; }
.st-l { color: #606266; font-size: 13px; margin-bottom: 6px; }
.st-v { font-size: 18px; font-weight: 700; color: #303133; }
.st-v.red { color: #f56c6c; }
