/* ─────────────────────────────────────────────────────────
   腕表拍卖档案 — 老钱风 (Old Money Aesthetic)
   暖象牙白 · 墨绿 · 酒红 · 旧金 · 衬线 · 细金线
   ───────────────────────────────────────────────────────── */

:root {
  --bg: #f4efe6;
  --panel: #fbf8f1;
  --panel-2: #f7f2e8;
  --ink: #2b2620;
  --ink-soft: #7a6f5f;
  --ink-faint: #a89b86;
  --green: #143c33;
  --green-deep: #0d2b24;
  --wine: #5c1f2e;
  --gold: #a8863e;
  --gold-deep: #8a6d30;
  --gold-soft: rgba(168, 134, 62, 0.30);
  --gold-line: rgba(168, 134, 62, 0.28);
  --serif: Georgia, "Palatino Linotype", "Times New Roman", "Songti SC", "STSong", "SimSun", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--serif);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(168, 134, 62, 0.06), transparent 60%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.page {
  max-width: 1570px;
  margin: 0 auto;
  padding: 56px 28px 64px;
}

/* ── 双栏布局（宽屏）：左（拍卖成交）+ 右（挂牌要价）── */
.layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin-top: 30px;
}
.col {
  flex: 1;
  min-width: 0;
  position: relative;  /* 详情面板绝对定位覆盖本栏 */
}
.col-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gold-line);
}
.col-note {
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}
/* ── 顶部徽标 ── */
.masthead { text-align: center; margin-bottom: 40px; }

.crest {
  font-size: 34px;
  line-height: 1;
  color: var(--gold);
  margin-bottom: 14px;
  letter-spacing: 2px;
}

.masthead-title {
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--green);
  margin-bottom: 2px;
}

.masthead-sub {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.masthead-sub-title {
  letter-spacing: 0.2em;
}
.masthead-sub-houses {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}
.rule span {
  display: block;
  width: 64px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.rule::before, .rule::after {
  content: "";
  display: block;
  width: 120px;
  height: 1px;
  background: var(--gold-line);
}

/* ── 面板卡片 ── */
.panel {
  background: var(--panel);
  border: 1px solid var(--gold-line);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(43, 38, 32, 0.04), 0 8px 24px rgba(43, 38, 32, 0.05);
  padding: 28px 30px 30px;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gold-line);
}

.panel-title {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--green);
}

.panel-note {
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

/* ── 表单 ── */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 20px;
}
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.field { display: flex; flex-direction: column; gap: 7px; }

.field label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field input {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid var(--gold-line);
  border-radius: 4px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.field input::placeholder { color: var(--ink-faint); }
.field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.18em;
  padding: 12px 30px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s;
}

.btn-primary {
  background: var(--green);
  color: #e9dcc0;
  border-color: var(--green);
}
.btn-primary:hover { background: var(--green-deep); border-color: var(--green-deep); }
.btn-primary:disabled { opacity: 0.55; cursor: progress; }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--gold-line);
}
.btn-ghost:hover { color: var(--green); border-color: var(--gold); }

/* ── 状态栏 ── */
.status {
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: 6px;
  font-size: 14px;
  letter-spacing: 0.04em;
  border: 1px solid var(--gold-line);
  background: var(--panel);
  color: var(--ink-soft);
}
.status.busy { color: var(--wine); }
.status.error { color: var(--wine); border-color: rgba(92, 31, 46, 0.4); }
.status.done { color: var(--green); }
.status.warn { color: var(--gold-deep); border-color: var(--gold); }

/* ── 结果 ── */
#results { margin-top: 30px; }

.results-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 16px;
}

.results-count {
  font-size: 13px;
  color: var(--ink-soft);
}
.results-count strong { color: var(--gold-deep); font-weight: 500; }

.table-wrap {
  background: var(--panel);
  border: 1px solid var(--gold-line);
  border-radius: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow: 0 8px 24px rgba(43, 38, 32, 0.05);
}

.lots-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.lots-table thead th {
  background: var(--panel-2);
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  padding: 14px 14px;
  border-bottom: 1px solid var(--gold-line);
  white-space: nowrap;
}

.lots-table tbody td {
  padding: 14px;
  border-bottom: 1px solid var(--gold-line);
  vertical-align: middle;
  color: var(--ink);
}

.lots-table tbody tr { cursor: pointer; transition: background 0.15s; }
.lots-table tbody tr:hover { background: #f6efe0; }
.lots-table tbody tr:last-child td { border-bottom: none; }

.lots-table th[data-sort] { cursor: pointer; user-select: none; }
.lots-table th[data-sort]:hover { color: var(--wine); }
.lots-table th[data-sort].active { color: var(--wine); }
.sort-ind {
  display: inline-block;
  margin-left: 5px;
  font-size: 10px;
  color: var(--gold);
  line-height: 1;
}

.th-rmb, .rmb { text-align: right; }
.rmb {
  color: var(--gold-deep);
  font-weight: 500;
  white-space: nowrap;
}

.photo-cell {
  width: 66px;
}
.photo-cell .thumb {
  width: 56px;
  height: 72px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--gold-line);
  background: #efe7d6;
  display: block;
}
.photo-cell .thumb-empty {
  width: 56px;
  height: 72px;
  border-radius: 3px;
  border: 1px dashed var(--gold-line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-size: 20px;
}

.house-badge {
  display: inline-block;
  font-size: 13px;
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 300px;
  line-height: 1.5;
}
.house-badge .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  margin-right: 8px;
  vertical-align: 1px;
}

.cell-dim { color: var(--ink-soft); }
.cell-nowrap { white-space: nowrap; }
.cell-acc {
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 96px;
  max-width: 220px;
  line-height: 1.5;
}
.cell-title {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-soft);
}

/* ── 详情抽屉（从页面右侧滑出，不盖住列表）── */
.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 26, 0.4);
  backdrop-filter: blur(1px);
  z-index: 40;
}
.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: min(480px, 92vw);
  background: var(--panel);
  box-shadow: 0 0 40px rgba(20, 30, 26, 0.2);
  z-index: 50;
  overflow-y: auto;
}
.drawer-left {
  left: 0;
  border-right: 1px solid var(--gold-line);
  animation: slideInLeft 0.22s ease;
}
.drawer-right {
  right: 0;
  border-left: 1px solid var(--gold-line);
  animation: slideInRight 0.22s ease;
}
@keyframes slideInLeft { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.drawer-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 36px;
  height: 36px;
  font-size: 24px;
  line-height: 1;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--gold-line);
  border-radius: 50%;
  cursor: pointer;
}
.drawer-close:hover { color: var(--wine); border-color: var(--wine); }

.drawer-body { padding: 32px 28px 40px; }

.detail-img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #efe7d6;
  border-radius: 4px;
  border: 1px solid var(--gold-line);
  margin-bottom: 22px;
}
.detail-img-empty {
  width: 100%;
  height: 240px;
  background: #efe7d6;
  border-radius: 4px;
  border: 1px dashed var(--gold-line);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  color: var(--ink-faint);
  line-height: 1;
}

.drawer h3 {
  font-size: 20px;
  font-weight: 500;
  color: var(--green);
  margin-bottom: 4px;
  line-height: 1.4;
}
.drawer .detail-house {
  font-size: 13px;
  color: var(--gold-deep);
  letter-spacing: 0.06em;
  margin-bottom: 18px;
}

.dl { display: grid; grid-template-columns: 96px 1fr; row-gap: 9px; column-gap: 16px; font-size: 14px; border-top: 1px dashed var(--gold-line); padding-top: 16px; }
.dl dt { color: var(--ink-soft); font-size: 13px; }
.dl dd { color: var(--ink); text-align: right; overflow-wrap: anywhere; }
.dl .rmb-dd { color: var(--gold-deep); font-weight: 500; }

.drawer .link {
  display: inline-block;
  margin-top: 22px;
  font-size: 13px;
  color: var(--green);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-line);
  padding-bottom: 2px;
}
.drawer .link:hover { color: var(--wine); }

/* ── 确认框 ── */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 26, 0.45);
  backdrop-filter: blur(2px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  width: min(440px, 92vw);
  background: var(--panel);
  border: 1px solid var(--gold-line);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(20, 30, 26, 0.3);
  padding: 28px 30px 26px;
  animation: modalIn 0.18s ease;
}
@keyframes modalIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-head {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gold-line);
}
.modal-head h3 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--green);
}
.modal-text {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.8;
}
.modal-text strong { color: var(--gold-deep); font-weight: 500; }
.modal-hint { font-size: 12px; color: var(--wine); }
.modal-hint.warn { color: var(--gold-deep); font-weight: 500; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* ── 图片预览（点击放大 + 滚轮缩放 + 左键关闭）── */
.img-preview {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 26, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 70;
  cursor: zoom-out;
  overflow: hidden;
}
.img-preview img {
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
  transform-origin: center;
  transition: transform 0.08s ease;
  user-select: none;
}

/* ── 底部 ── */
.foot { text-align: center; margin-top: 56px; }
.foot p { font-size: 12px; color: var(--ink-faint); letter-spacing: 0.06em; }

/* ── 响应式 ── */
@media (max-width: 900px) {
  .layout { display: block; }
  .col { margin-bottom: 28px; }
}

@media (max-width: 760px) {
  .page { padding: 40px 16px 48px; }
  .masthead-title { font-size: 26px; }
  .grid, .grid-4 { grid-template-columns: 1fr 1fr; }
  .panel { padding: 22px 18px 24px; }
  .table-wrap { overflow-x: auto; }
}
