/* ============================================================
   战国美人游戏订单反馈系统 · 后台样式
   ============================================================ */
:root {
  --brand: #8c1d28;
  --brand-2: #b3252f;
  --brand-soft: #f8ebeb;
  --gold: #c9a35b;
  --gold-soft: #f7f0e2;
  --ink: #1f2329;
  --ink-2: #4a5058;
  --muted: #8a8f98;
  --line: #e9e5df;
  --bg: #f4f1ec;
  --card: #ffffff;
  --green: #1f8a4c;
  --green-soft: #e7f5ec;
  --red-soft: #fdecec;
  --shadow-sm: 0 1px 2px rgba(31, 35, 41, .06), 0 1px 3px rgba(31, 35, 41, .05);
  --shadow-md: 0 6px 24px rgba(31, 35, 41, .08);
  --shadow-lg: 0 24px 60px rgba(31, 35, 41, .18);
  --radius: 14px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC",
          "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}
h1, h2, p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, button { font-size: 14px; }
[hidden] { display: none !important; }

/* ============================ 登录 ============================ */
.login-view {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  overflow: hidden;
  background:
    radial-gradient(1100px 620px at 8% -10%, #7c1d26 0%, transparent 60%),
    radial-gradient(900px 560px at 108% 112%, #4a1218 0%, transparent 58%),
    linear-gradient(135deg, #1c1013 0%, #33161b 48%, #1a0f12 100%);
}
.login-view::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(201, 163, 91, .045) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(-45deg, rgba(201, 163, 91, .045) 0 1px, transparent 1px 26px);
  pointer-events: none;
}
.login-deco {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}
.login-deco-1 {
  width: 460px; height: 460px;
  border: 1px solid rgba(201, 163, 91, .28);
  top: -180px; right: -120px;
  box-shadow: inset 0 0 90px rgba(201, 163, 91, .08);
}
.login-deco-2 {
  width: 320px; height: 320px;
  border: 1px solid rgba(201, 163, 91, .18);
  bottom: -140px; left: -100px;
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 40px 36px 28px;
  background: rgba(255, 255, 255, .97);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  animation: cardIn .5s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
.login-brand { text-align: center; margin-bottom: 30px; }
.brand-mark {
  width: 58px; height: 58px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 700;
  color: #f6e6c2;
  background: linear-gradient(145deg, #a82a34, #6d1620);
  border: 1px solid rgba(201, 163, 91, .85);
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(140, 29, 40, .35), inset 0 0 0 3px rgba(255, 255, 255, .06);
  letter-spacing: 0;
}
.brand-mark.small {
  width: 38px; height: 38px;
  margin: 0;
  font-size: 18px;
  border-radius: 10px;
  flex: 0 0 auto;
}
.login-brand h1 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--ink);
}
.login-brand p {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 1.6px;
  color: var(--muted);
}

.field { display: block; margin-bottom: 18px; }
.field > span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
}
.field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfaf8;
  color: var(--ink);
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.field input:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(140, 29, 40, .1);
}
.field input::placeholder { color: #b3b7bd; }
.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 62px; }
.eye {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.eye:hover { background: var(--brand-soft); color: var(--brand); }

.login-error {
  margin: -4px 0 14px;
  padding: 9px 12px;
  font-size: 13px;
  color: #b02a2a;
  background: var(--red-soft);
  border: 1px solid #f3cfcf;
  border-radius: 8px;
}
.login-foot {
  margin-top: 22px;
  text-align: center;
  font-size: 11px;
  color: #b3b7bd;
  letter-spacing: .3px;
}

/* ============================ 按钮 ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .3px;
  transition: transform .12s, box-shadow .18s, background .18s, color .18s, border-color .18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  box-shadow: 0 4px 12px rgba(140, 29, 40, .28);
}
.btn-primary:hover { box-shadow: 0 6px 18px rgba(140, 29, 40, .34); }
.btn-ghost {
  color: var(--ink-2);
  background: #fff;
  border-color: var(--line);
}
.btn-ghost:hover { border-color: #d6d0c8; background: #fbfaf8; color: var(--ink); }
.btn-danger {
  color: #fff;
  background: linear-gradient(180deg, #d3453f, #b02a24);
  box-shadow: 0 4px 12px rgba(176, 42, 36, .24);
}
.btn-danger:hover { box-shadow: 0 6px 18px rgba(176, 42, 36, .3); }
.btn-ghost-light {
  color: rgba(255, 255, 255, .86);
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .22);
  height: 34px;
  padding: 0 14px;
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.btn-block { width: 100%; height: 46px; font-size: 15px; letter-spacing: 4px; border-radius: 10px; }

/* ============================ 顶部栏 ============================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 30px;
  color: #fff;
  background:
    radial-gradient(900px 300px at 12% -40%, rgba(201, 163, 91, .22), transparent 60%),
    linear-gradient(110deg, #291216 0%, #551a22 55%, #7d212a 100%);
  box-shadow: 0 2px 14px rgba(31, 35, 41, .16);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .7;
}
.topbar-left { display: flex; align-items: center; gap: 13px; min-width: 0; }
.topbar-title h1 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-title span {
  display: inline-block;
  margin-top: 2px;
  font-size: 11.5px;
  letter-spacing: 2.4px;
  color: rgba(246, 230, 194, .72);
}
.topbar-right { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  font-size: 13px;
  color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
}
.user-chip .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #6ee7a0;
  box-shadow: 0 0 0 3px rgba(110, 231, 160, .18);
}

/* ============================ 主体 ============================ */
.main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 30px 36px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.stat-icon {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid #f0d9d9;
}
.stat-icon.icon-amount { color: #8a6a1f; background: var(--gold-soft); border-color: #efe3c6; }
.stat-icon.icon-users { color: #1f6f8a; background: #e8f3f7; border-color: #d5e8ef; }
.stat-label { font-size: 12.5px; color: var(--muted); }
.stat-value {
  margin-top: 2px;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: .3px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}
.filter-form { padding: 18px 20px; }
.filter-row {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}
.filter-row + .filter-row { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.filter-item { display: flex; flex-direction: column; gap: 6px; }
.filter-item.grow { flex: 1 1 340px; min-width: 260px; }
.filter-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .3px;
}
.input {
  height: 38px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.input:hover { border-color: #d8d2ca; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(140, 29, 40, .09); }
.select {
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8f98' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  cursor: pointer;
}
.input.small { height: 30px; padding: 0 26px 0 9px; font-size: 12.5px; }
.time-range { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.time-range .dt { width: 196px; }
.time-range .select { width: 104px; }
.range-sep { color: var(--muted); font-size: 12.5px; }
.quick-ranges { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chip {
  height: 30px;
  padding: 0 12px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: #fbfaf8;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all .15s;
}
.chip:hover { border-color: #cfc8be; color: var(--ink); }
.chip.active {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: #e8c9c9;
  font-weight: 500;
}
.filter-actions { display: flex; gap: 10px; margin-left: auto; align-items: flex-end; }
#keywordInput { min-width: 240px; }

/* ============================ 表格 ============================ */
.table-panel { overflow: hidden; }
.table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.table-head h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .3px;
}
.table-sub {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.page-size { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.table-scroll { position: relative; overflow-x: auto; min-height: 120px; }
.data-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}
.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 11px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
  background: #faf8f4;
  border-bottom: 1px solid var(--line);
}
.data-table td {
  padding: 13px 14px;
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap;
  border-bottom: 1px solid #f2efea;
  vertical-align: middle;
}
.data-table tbody tr { transition: background .14s; }
.data-table tbody tr:hover { background: #fcfaf7; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.col-no { width: 220px; }
.col-money { width: 90px; }
.col-action { width: 190px; position: sticky; right: 0; background: #faf8f4; }
.data-table td.col-action { background: #fff; }
.data-table tbody tr:hover td.col-action { background: #fcfaf7; }
.cell-order {
  font-family: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--ink);
  letter-spacing: -.1px;
}
.cell-strong { color: var(--ink); font-weight: 500; }
.cell-sub { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.cell-money { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 500; }
.cell-time { font-variant-numeric: tabular-nums; font-size: 12.5px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  font-size: 12px;
  border-radius: 999px;
  background: #f2f0ec;
  color: var(--ink-2);
}
.pill::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .75;
}
.pill-ok { color: var(--green); background: var(--green-soft); }
.pill-warn { color: #9a6b16; background: #fbf1dc; }
.pill-bad { color: #b02a2a; background: var(--red-soft); }
.row-actions { display: flex; gap: 7px; }
.btn-sm {
  height: 29px;
  padding: 0 11px;
  font-size: 12.5px;
  border-radius: 7px;
  border: 1px solid transparent;
  transition: all .15s;
  white-space: nowrap;
}
.btn-detail { color: var(--ink-2); background: #fff; border-color: var(--line); }
.btn-detail:hover { color: var(--brand); border-color: #e4c2c2; background: #fdf6f6; }
.btn-resupply { color: #8a6a1f; background: var(--gold-soft); border-color: #efe0bd; }
.btn-resupply:hover { background: #f4e8cc; }
.btn-force { color: var(--brand); background: var(--brand-soft); border-color: #f0d3d3; }
.btn-force:hover { background: #f4dede; }

.empty-state, .loading-state {
  padding: 56px 20px;
  text-align: center;
  color: var(--muted);
}
.empty-icon {
  width: 54px; height: 54px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: #c6c0b6;
  background: #faf8f4;
  border: 1px dashed #ddd6cb;
  border-radius: 50%;
}
.empty-state p { color: var(--ink-2); font-size: 14px; margin-bottom: 4px; }
.empty-state span { font-size: 12.5px; }
.loading-state { display: flex; align-items: center; justify-content: center; gap: 10px; }
.loading-state i {
  width: 18px; height: 18px;
  border: 2px solid #e8ddd8;
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.pager-info { font-size: 12.5px; color: var(--muted); }
.pager-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: all .15s;
}
.page-btn:hover:not(:disabled) { border-color: #d6cec4; background: #fbfaf8; }
.page-btn.active {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  font-weight: 600;
}
.page-btn:disabled { opacity: .45; cursor: not-allowed; }
.page-ellipsis { padding: 0 2px; color: var(--muted); font-size: 12.5px; }
.foot {
  margin-top: 10px;
  text-align: center;
  font-size: 11.5px;
  color: #b0aaa1;
  letter-spacing: .3px;
}

/* ============================ 弹窗 ============================ */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(24, 16, 18, .55);
  backdrop-filter: blur(3px);
  animation: fadeIn .18s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  position: relative;
  width: 100%;
  max-width: 760px;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn .24s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-size: 16px; font-weight: 600; }
.modal-close {
  width: 32px; height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
}
.modal-close:hover { background: #f4f1ec; color: var(--ink); }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 22px;
  border-top: 1px solid var(--line);
  background: #fcfbf9;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 22px;
}
.detail-item {
  padding: 11px 0;
  border-bottom: 1px dashed #eeeae3;
  min-width: 0;
}
.detail-item.wide { grid-column: 1 / -1; }
.detail-item .k { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.detail-item .v {
  font-size: 13.5px;
  color: var(--ink);
  word-break: break-all;
  line-height: 1.55;
}
.detail-item .v.mono { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
.detail-section-title {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  padding-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.log-list {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0 0;
}
.log-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 12.5px;
  background: #faf8f4;
  border: 1px solid #f0ebe3;
  border-radius: 9px;
}
.log-type { font-weight: 600; color: var(--brand); }
.log-time { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.log-empty { color: var(--muted); font-size: 12.5px; padding: 4px 0; }

/* ============================ Toast ============================ */
.toast-root {
  position: fixed;
  top: 78px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 180px;
  max-width: 420px;
  padding: 12px 20px;
  font-size: 13.5px;
  color: #fff;
  background: rgba(35, 38, 43, .94);
  border-radius: 11px;
  box-shadow: 0 12px 30px rgba(31, 35, 41, .24);
  animation: toastIn .24s cubic-bezier(.2, .8, .3, 1) both;
}
.toast.leaving { animation: toastOut .2s ease both; }
.toast .t-icon {
  width: 20px; height: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  font-size: 12px;
  background: rgba(255, 255, 255, .16);
}
.toast.success { background: rgba(31, 138, 76, .96); }
.toast.error { background: rgba(176, 42, 36, .96); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-8px) scale(.97); }
  to   { opacity: 1; transform: none; }
}
@keyframes toastOut {
  from { opacity: 1; }
  to   { opacity: 0; transform: translateY(-6px); }
}

/* ============================ 响应式 ============================ */
@media (max-width: 900px) {
  .main { padding: 18px 16px 28px; }
  .topbar { padding: 12px 16px; }
  .topbar-title h1 { font-size: 14.5px; }
  .stats { grid-template-columns: 1fr; gap: 10px; }
  .filter-actions { margin-left: 0; }
  .filter-item.grow { flex-basis: 100%; }
  .time-range .dt { width: 100%; flex: 1 1 150px; }
  .time-range .select { width: 100%; }
  .detail-grid { grid-template-columns: 1fr; }
  .toast-root { top: auto; bottom: 24px; }
}
@media (max-width: 560px) {
  .topbar-title span { display: none; }
  .user-chip { display: none; }
  .login-card { padding: 32px 22px 22px; }
}
