/* ============================================================
   收号管理系统 · 样式
   ============================================================ */

:root {
  --bg: #f4f5f8;
  --card: #ffffff;
  --ink: #101419;
  --ink-2: #3f4652;
  --muted: #8b919e;
  --line: #e6e9ef;
  --line-soft: #f0f2f6;
  --brand: #2b50d6;
  --brand-dark: #2140b4;
  --brand-soft: #eef2ff;
  --money: #c8301f;
  --danger: #d1453b;
  --ok: #17864b;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 20, 25, .04);
  --shadow: 0 10px 30px rgba(16, 20, 25, .08);
  --shadow-lg: 0 24px 60px rgba(16, 20, 25, .16);
  --side-bg: #0e1420;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }

svg { width: 18px; height: 18px; flex: none; }

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.2px;
}

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.money { color: var(--money); font-variant-numeric: tabular-nums; }
.ta-r { text-align: right; }
.ta-c { text-align: center; }

/* ---------------------------------------------------------------- 布局 */

.shell {
  display: flex;
  min-height: 100vh;
}

.side {
  width: 236px;
  flex: none;
  background: var(--side-bg);
  color: #c9d0dc;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 22px 20px 20px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(140deg, #3a63f0, #1f37a8);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 16px rgba(43, 80, 214, .38);
}
.brand-mark svg { width: 20px; height: 20px; }

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { color: #fff; font-size: 15px; letter-spacing: .3px; }
.brand-text span { font-size: 11px; color: #6b7688; letter-spacing: .2px; }

.nav {
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 9px;
  color: #9fa9b9;
  font-size: 13.5px;
  transition: background .16s, color .16s;
  position: relative;
}
.nav-item:hover { background: rgba(255, 255, 255, .055); color: #e6ebf3; }
.nav-item.is-active { background: rgba(255, 255, 255, .09); color: #fff; }
.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: -12px; top: 50%;
  width: 3px; height: 18px;
  border-radius: 0 3px 3px 0;
  background: #4d74ff;
  transform: translateY(-50%);
}
.nav-item svg { width: 17px; height: 17px; opacity: .9; }

.nav-badge {
  margin-left: auto;
  background: #d1453b;
  color: #fff;
  font-style: normal;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  display: grid;
  place-items: center;
}

.side-foot {
  padding: 14px 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.side-user { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.avatar {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: #1c2740;
  color: #8ea4d8;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
}
.side-user-info { display: flex; flex-direction: column; line-height: 1.3; overflow: hidden; }
.side-user-info strong { color: #e8edf5; font-size: 13px; font-weight: 500; }
.side-user-info span { font-size: 11px; color: #66707f; }

.side .btn-ghost {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .1);
  color: #b9c3d2;
}
.side .btn-ghost:hover { background: rgba(255, 255, 255, .11); color: #fff; }

.main {
  flex: 1;
  min-width: 0;
  margin-left: 236px;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 62px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 26px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar h1 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  letter-spacing: .2px;
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.today-chip {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  background: #f2f4f8;
  border-radius: 20px;
  padding: 4px 12px;
}

.view { padding: 22px 26px 60px; max-width: 1560px; width: 100%; }

.only-mobile { display: none !important; }

/* ---------------------------------------------------------------- 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: #fff;
  color: var(--ink-2);
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 2px 8px rgba(43, 80, 214, .24);
}
.btn-primary:hover { background: var(--brand-dark); }

.btn-ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink-2);
}
.btn-ghost:hover { background: #f7f8fb; border-color: #d8dce5; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b93b32; }

.btn-danger-ghost { background: #fff; border-color: #f0d5d2; color: var(--danger); }
.btn-danger-ghost:hover { background: #fdf3f2; }

.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { height: 44px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }

.icon-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.icon-btn:hover { background: #f1f3f7; color: var(--ink); }

.link-btn {
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 6px;
}
.link-btn:hover { background: var(--brand-soft); }
.link-btn.danger { color: var(--danger); }
.link-btn.danger:hover { background: #fdf1f0; }
.link-btn.primary { color: var(--ok); }
.link-btn.primary:hover { background: #eefaf3; }

/* ------------------------------------------------------------ 统计卡片 */

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 18px 16px;
  box-shadow: var(--shadow-sm);
}
.stat-k { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.stat-v {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.4px;
  font-variant-numeric: tabular-nums;
}
.stat-v i { font-style: normal; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.stat-v.money { color: var(--money); }

/* ---------------------------------------------------------------- 面板 */

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.panel-head-plain { border-bottom: 0; padding-bottom: 6px; }

.panel-title { font-size: 15px; margin: 0 0 3px; font-weight: 600; }
.panel-sub { font-size: 12.5px; color: var(--muted); margin: 0; }

.panel-actions { margin-left: auto; display: flex; gap: 8px; }

.filter-grid { display: flex; flex-wrap: wrap; gap: 9px; flex: 1; min-width: 0; align-items: center; }

.search-box {
  position: relative;
  flex: 1 1 300px;
  min-width: 220px;
  max-width: 400px;
}
.search-box svg {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--muted);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 34px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fafbfc;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.search-box input:focus {
  border-color: #b9c6f2;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(43, 80, 214, .1);
}

select, .date-range input, .amount-range input, .game-add input, .fld input, .fld select, .fld textarea {
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fafbfc;
  padding: 0 11px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
select:focus, input:focus, textarea:focus {
  border-color: #b9c6f2;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(43, 80, 214, .1);
}

.date-range { display: inline-flex; align-items: center; gap: 6px; }
.date-range span, .amount-range span { color: var(--muted); font-size: 12px; }
.amount-range { display: inline-flex; align-items: center; gap: 6px; }
.amount-range input { width: 92px; }

/* ---------------------------------------------------------------- 表格 */

.table-wrap { overflow-x: auto; }

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.tbl th {
  text-align: left;
  font-weight: 500;
  font-size: 12.5px;
  color: var(--muted);
  background: #fafbfc;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.tbl td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.tbl tbody tr { cursor: pointer; transition: background .12s; }
.tbl tbody tr:hover { background: #fafbfd; }
.tbl tbody tr:last-child td { border-bottom: 0; }

.w-acc { min-width: 190px; }
.acc {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -.2px;
  word-break: break-all;
}
.note-dot {
  display: inline-block;
  margin-left: 7px;
  font-size: 10.5px;
  color: #a4823a;
  background: #fdf6e7;
  border: 1px solid #f2e4c4;
  border-radius: 4px;
  padding: 0 4px;
  vertical-align: 1px;
}

.tag {
  display: inline-block;
  background: #f1f3f8;
  color: #4a5262;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12.5px;
  white-space: nowrap;
}
.tag-muted { color: var(--muted); }

.img-count {
  display: inline-block;
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.days { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.days.warn { color: var(--danger); font-weight: 500; }

.ops { white-space: nowrap; }

.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line-soft);
  flex-wrap: wrap;
}
.foot-sum { font-size: 12.5px; color: var(--muted); }
.foot-sum b { color: var(--ink); font-weight: 600; }

.pager { display: flex; align-items: center; gap: 5px; }
.pg-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
}
.pg-btn:hover:not(:disabled) { background: #f6f7fa; }
.pg-btn:disabled { opacity: .45; cursor: not-allowed; }
.pg-num.is-cur { background: var(--brand); border-color: var(--brand); color: #fff; }
.pg-info { font-size: 12px; color: var(--muted); margin-left: 6px; }

.loading, .empty, .error-box {
  padding: 46px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.loading { display: flex; align-items: center; justify-content: center; gap: 9px; }
.spin {
  width: 15px; height: 15px;
  border: 2px solid #dfe3ea;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty svg { width: 40px; height: 40px; color: #ccd2dd; margin-bottom: 10px; }
.empty p { margin: 0 0 4px; font-size: 14px; color: var(--ink-2); }
.empty span { font-size: 12.5px; color: var(--muted); }
.error-box { color: var(--danger); }

/* -------------------------------------------------------------- 提示条 */

.notice {
  display: flex;
  gap: 11px;
  background: #fdf9ef;
  border: 1px solid #f2e6c9;
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  color: #7a5b1e;
  font-size: 13px;
}
.notice svg { width: 18px; height: 18px; margin-top: 1px; color: #b4871f; }
.notice b { display: block; font-weight: 600; margin-bottom: 2px; }
.notice span { color: #9a7c42; font-size: 12.5px; }

/* -------------------------------------------------------------- 弹窗 */

.modal-wrap {
  position: fixed;
  inset: 0;
  background: rgba(14, 20, 32, .38);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 16px;
  overflow-y: auto;
  z-index: 100;
  opacity: 0;
  transition: opacity .18s;
}
.modal-wrap.in { opacity: 1; }

.modal {
  width: 100%;
  max-width: 620px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  transform: translateY(10px) scale(.99);
  transition: transform .2s cubic-bezier(.2, .8, .3, 1);
  margin: auto 0;
}
.modal-wrap.in .modal { transform: none; }
.modal-lg { max-width: 780px; }

.modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 14px 22px;
  border-bottom: 1px solid var(--line-soft);
}
.modal-head h3 { margin: 0; font-size: 15.5px; font-weight: 600; flex: 1; }

.modal-body { padding: 18px 22px; max-height: 66vh; overflow-y: auto; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 22px;
  border-top: 1px solid var(--line-soft);
  background: #fcfcfd;
  border-radius: 0 0 16px 16px;
}

.confirm-body { padding: 4px 2px 2px; }
.confirm-title { font-size: 15px; font-weight: 600; margin: 0 0 7px; }
.confirm-text { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.7; }

/* -------------------------------------------------------------- 表单 */

.form { display: block; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 14px;
}
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld-wide { grid-column: 1 / -1; }
.fld > span {
  font-size: 12.5px;
  color: var(--ink-2);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fld .req {
  font-style: normal;
  font-size: 10.5px;
  color: var(--danger);
  background: #fdf1f0;
  border-radius: 4px;
  padding: 0 4px;
  font-weight: 500;
}
.fld input, .fld select { width: 100%; }
.fld textarea {
  width: 100%;
  height: auto;
  padding: 9px 11px;
  resize: vertical;
  line-height: 1.6;
  min-height: 76px;
}
.input-prefix { position: relative; display: flex; align-items: center; }
.input-prefix i {
  position: absolute;
  left: 11px;
  font-style: normal;
  color: var(--muted);
  font-size: 13px;
}
.input-prefix input { padding-left: 25px; }

/* 上传区 */
.upload-block { margin-top: 16px; }
.ub-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 9px;
}
.ub-head span { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.ub-head i { font-style: normal; font-size: 11.5px; color: var(--muted); }

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 10px;
}
.thumbs:empty { display: none; }

.thumb {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f6f7fa;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-x {
  position: absolute;
  top: 3px; right: 3px;
  width: 19px; height: 19px;
  border-radius: 50%;
  border: 0;
  background: rgba(16, 20, 25, .62);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.thumb-x svg { width: 10px; height: 10px; }
.thumb-x:hover { background: var(--danger); }

.dz {
  width: 100%;
  border: 1.5px dashed #d9dee8;
  background: #fafbfd;
  border-radius: 11px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12.5px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.dz svg { width: 22px; height: 22px; }
.dz:hover, .dz.drag { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.dz.hidden { display: none; }

/* 详情 */
.detail-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 16px;
}
.detail-acc {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.4px;
  word-break: break-all;
  margin-bottom: 6px;
}
.detail-meta { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.detail-meta .sep { color: #d3d8e1; }
.detail-amt {
  margin-left: auto;
  font-size: 22px;
  font-weight: 600;
  color: var(--money);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  margin-bottom: 16px;
}
.field-item { min-width: 0; }
.fi-k { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.fi-v { font-size: 13.5px; color: var(--ink); word-break: break-all; }

.remark-block, .img-block { margin-top: 14px; }
.rb-k { font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
.rb-k i { font-style: normal; color: var(--ink-2); }
.rb-v {
  background: #fafbfd;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  padding: 11px 13px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-2);
  word-break: break-word;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  margin-top: 6px;
}
.gal-item {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
  background: #f6f7fa;
  cursor: zoom-in;
  aspect-ratio: 1 / 1;
}
.gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.gal-item:hover img { transform: scale(1.06); }

.trash-hint {
  margin-top: 16px;
  background: #fdf9ef;
  border: 1px solid #f2e6c9;
  color: #8a6a24;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 12.5px;
}

/* 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 17, .9);
  display: grid;
  place-items: center;
  z-index: 200;
  opacity: 0;
  transition: opacity .2s;
  cursor: zoom-out;
}
.lightbox.in { opacity: 1; }
.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.lb-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .7);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.lb-nav:hover { background: rgba(255, 255, 255, .24); }
.lb-prev { left: 3vw; }
.lb-next { right: 3vw; }

/* 游戏管理 */
.game-add {
  display: flex;
  gap: 9px;
  padding: 4px 18px 16px;
  flex-wrap: wrap;
}
.game-add input { flex: 1 1 280px; max-width: 420px; }
.game-add .sort-input { flex: 0 0 96px; max-width: 96px; }
.game-name { font-weight: 500; }

/* 设置 */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.settings-grid .panel { padding: 20px 22px; }
.settings-grid .panel-title { margin-bottom: 3px; }
.settings-grid .panel-sub { margin-bottom: 16px; }
.settings-grid .form .fld { margin-bottom: 12px; }
.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 13px;
}
.kv:last-of-type { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 500; }
.ok-dot { color: var(--ok); }
.ok-dot::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
  margin-right: 5px;
  vertical-align: 1px;
}
hr { border: 0; border-top: 1px solid var(--line-soft); margin: 16px 0; }

/* Toast */
.toast-root {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: #10151f;
  color: #fff;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 9px;
  box-shadow: 0 10px 30px rgba(8, 12, 20, .28);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .22s, transform .22s;
  max-width: 82vw;
}
.toast.in { opacity: 1; transform: none; }
.toast-ok { background: #10743f; }
.toast-error { background: #b3382f; }

/* ------------------------------------------------------------- 登录页 */

.login-body {
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 12% -10%, #e7ecfb 0%, rgba(231, 236, 251, 0) 60%),
    radial-gradient(700px 500px at 100% 100%, #eef1f6 0%, rgba(238, 241, 246, 0) 55%),
    #f4f5f8;
  display: grid;
  place-items: center;
  padding: 30px 16px;
}

.login-wrap { width: 100%; max-width: 880px; }

.login-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(16, 20, 25, .12);
  overflow: hidden;
  min-height: 460px;
}

.login-left {
  background:
    radial-gradient(500px 300px at 80% 0%, rgba(70, 110, 240, .35), transparent 60%),
    linear-gradient(160deg, #131b2c 0%, #0d1420 100%);
  color: #fff;
  padding: 38px 36px;
  display: flex;
  flex-direction: column;
}

.login-logo {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .1);
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, .12);
}
.login-logo svg { width: 24px; height: 24px; color: #9db6ff; }

.login-left h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: .4px; font-weight: 600; }
.login-sub { color: #8b96a8; font-size: 13px; margin: 0 0 28px; }

.login-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.login-points li {
  display: flex;
  gap: 9px;
  font-size: 12.5px;
  color: #a8b2c2;
  line-height: 1.6;
}
.login-points li span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #4d74ff;
  flex: none;
  margin-top: 7px;
}
.login-foot { margin-top: auto; color: #55606f; font-size: 11.5px; letter-spacing: .4px; }

.login-right { padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.login-right h2 { font-size: 20px; margin: 0 0 5px; font-weight: 600; }
.login-hint { color: var(--muted); font-size: 12.5px; margin: 0 0 22px; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field-label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.field input {
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fafbfc;
  padding: 0 13px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.field input:focus {
  border-color: #b9c6f2;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(43, 80, 214, .1);
}

.captcha-row { display: flex; gap: 10px; }
.captcha-row input { flex: 1; }
.captcha-row img {
  width: 140px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  cursor: pointer;
  object-fit: cover;
  flex: none;
}

.alert {
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 12.5px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-error { background: #fdf2f1; border-color: #f6d9d5; color: #a8342b; }
.alert-info { background: #f1f5ff; border-color: #dde6fb; color: #2b4a9c; }

.login-tip { text-align: center; color: var(--muted); font-size: 11.5px; margin: 14px 0 0; }

/* -------------------------------------------------------------- 响应式 */

.backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 22, .45);
  z-index: 55;
}

@media (max-width: 1180px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .only-mobile { display: grid !important; }
  .side { transform: translateX(-100%); transition: transform .24s ease; }
  .main { margin-left: 0; }
  .topbar { padding: 0 14px; }
  .view { padding: 16px 14px 50px; }
  body.side-open .side { transform: none; box-shadow: var(--shadow-lg); }
  body.side-open .backdrop { display: block; }
  .settings-grid { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .login-card { grid-template-columns: 1fr; min-height: 0; }
  .login-left { display: none; }
  .login-right { padding: 34px 24px; }
}

@media (max-width: 640px) {
  .stat-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 12px 13px; }
  .stat-v { font-size: 18px; }
  .panel-head { padding: 13px 13px; }
  .filter-grid { flex-direction: column; align-items: stretch; }
  .filter-grid > * { flex: 0 0 auto; width: 100%; max-width: none; }
  .search-box { flex: 0 0 auto; max-width: none; }
  .date-range, .amount-range { width: 100%; }
  .date-range input, .amount-range input { flex: 1 1 0; width: auto; min-width: 0; }
  .panel-actions { width: 100%; }
  .panel-actions .btn { flex: 1; }
  .modal-wrap { padding: 0; align-items: flex-end; }
  .modal { border-radius: 16px 16px 0 0; max-height: 94vh; }
  .modal-body { max-height: 74vh; }
  .modal-foot { border-radius: 0; }
  .tbl th, .tbl td { padding: 10px 11px; }
  .w-acc { min-width: 150px; }

  /* 移动端：表格转为卡片 */
  .table-wrap { overflow: visible; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody { display: block; width: 100%; }
  .tbl tbody tr {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin: 10px 12px;
    padding: 11px 13px;
  }
  .tbl tbody tr:nth-child(even) { background: #fff; }
  .tbl tbody tr:hover { background: #fff; }
  .tbl td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    border: 0;
    padding: 4px 0;
    text-align: right;
    font-size: 13px;
  }
  .tbl td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    flex: none;
    text-align: left;
  }
  .tbl td.w-acc {
    display: block;
    text-align: left;
    min-width: 0;
    padding-bottom: 8px;
    margin-bottom: 5px;
    border-bottom: 1px dashed var(--line-soft);
  }
  .tbl td.w-acc::before { display: none; }
  .tbl td.w-acc .acc { font-size: 15px; font-weight: 600; }
  .tbl td.ops {
    justify-content: flex-end;
    gap: 2px;
    margin-top: 6px;
    padding-top: 9px;
    border-top: 1px dashed var(--line-soft);
  }
  .tbl td.ops::before { display: none; }
  .tbl td.ops .link-btn { font-size: 13px; }
  .table-foot { padding: 10px 14px 16px; }
  .detail-amt { font-size: 18px; }
  .login-wrap { max-width: 420px; }
  .lg-prev { left: 1vw; }
}

/* --------------------------------------------------- 权限标签（两端口共用） */

.perm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }

.perm-chip {
  font-size: 11.5px;
  color: var(--muted);
  background: #f4f6fa;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 8px;
  line-height: 1.7;
}
.perm-chip.on { color: #274bb5; background: var(--brand-soft); border-color: #dfe6fb; }

/* ------------------------------------------------- 公共内测账户提示条 */

.guest-bar-wrap { padding: 14px 26px 0; }

.guest-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fffaeb;
  border: 1px solid #f7e3b0;
  color: #8a5b06;
  font-size: 12.8px;
  line-height: 1.5;
  max-width: 1560px;
}
.guest-bar b { font-weight: 600; }
.guest-bar svg { width: 16px; height: 16px; flex: none; opacity: .85; }

@media (max-width: 960px) {
  .guest-bar-wrap { padding: 12px 14px 0; }
  .guest-bar { font-size: 12px; padding: 9px 11px; }
}

/* ----------------------------------------------- 登录页 · 公共内测账号 */

.pub-account {
  margin-top: 18px;
  border: 1px dashed #d8dEEA;
  border-radius: 11px;
  background: #fafbfd;
  padding: 11px 12px;
}

.pub-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }

.pub-tag {
  flex: none;
  font-size: 11px;
  color: #8a5b06;
  background: #fff3d6;
  border: 1px solid #f3e0b3;
  border-radius: 10px;
  padding: 1px 8px;
  line-height: 1.7;
}

.pub-desc { font-size: 11.5px; color: var(--muted); line-height: 1.5; }

.pub-creds {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  border-radius: 8px;
  padding: 6px 8px;
  margin: -4px -4px;
  transition: background .16s;
}
.pub-creds:hover { background: #f1f4fa; }
.pub-creds span { display: inline-flex; align-items: baseline; gap: 6px; }
.pub-creds i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.pub-creds b { font-size: 12.5px; color: var(--ink); letter-spacing: .2px; }
.pub-creds em {
  margin-left: auto;
  font-style: normal;
  font-size: 11.5px;
  color: var(--brand);
}
