/* hzshop 管理端 · 克制美学：纯白底 / 黑 #1A1A1A / 灰阶，无彩色无阴影无图标 */

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

html, body {
  background: #FFFFFF;
  color: #1A1A1A;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

a { color: #1A1A1A; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }

.side-nav {
  width: 180px;
  flex-shrink: 0;
  border-right: 1px solid #E5E5E5;
  padding: 32px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.side-nav .brand {
  font-size: 18px;
  font-weight: 600;
  padding: 0 24px 24px;
  border-bottom: 1px solid #E5E5E5;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}
.side-nav .nav-item {
  display: block;
  padding: 10px 24px;
  font-size: 15px;
  color: #666;
  cursor: pointer;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.side-nav .nav-item:hover { color: #1A1A1A; }
.side-nav .nav-item.active { color: #1A1A1A; font-weight: 600; }
.side-nav .nav-logout {
  margin-top: 32px;
  border-top: 1px solid #E5E5E5;
  padding-top: 16px;
}

.main-content {
  flex: 1;
  padding: 40px 48px 80px;
  max-width: 1200px;
  min-width: 0;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 32px;
  letter-spacing: 0.02em;
}

/* ---------- 认证页 ---------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-box { width: 360px; }
.auth-box h1 { font-size: 24px; font-weight: 600; margin-bottom: 8px; }
.auth-box .auth-sub { color: #666; font-size: 15px; margin-bottom: 32px; }

/* ---------- 表单 ---------- */
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-size: 14px;
  color: #666;
  margin-bottom: 6px;
}
input[type="text"], input[type="password"], input[type="date"],
input[type="number"], select {
  width: 100%;
  padding: 9px 12px;
  font-size: 15px;
  border: 1px solid #CCC;
  border-radius: 3px;
  background: #FFF;
  color: #1A1A1A;
  font-family: inherit;
}
input:focus, select:focus { outline: none; border-color: #1A1A1A; }
.form-hint { font-size: 13px; color: #999; margin-top: 4px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  background: #1A1A1A;
  color: #FFF;
  border: none;
  padding: 10px 24px;
  font-size: 15px;
  cursor: pointer;
  border-radius: 3px;
  font-family: inherit;
  line-height: 1.5;
}
.btn:hover { background: #000; }
.btn:disabled { background: #999; cursor: not-allowed; }
.btn-block { width: 100%; }

.btn-text {
  background: none;
  border: none;
  color: #1A1A1A;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  font-family: inherit;
}
.btn-text:hover { color: #000; }
.btn-text:disabled { color: #999; cursor: not-allowed; text-decoration: none; }

/* ---------- 消息 ---------- */
.msg-error { color: #C00; font-size: 14px; margin: 12px 0; }
.msg-info { color: #666; font-size: 14px; margin: 12px 0; }

/* ---------- 看板数字卡片（无彩色无阴影，细线分隔） ---------- */
.stat-section { margin-bottom: 48px; }
.stat-section h2 {
  font-size: 15px;
  font-weight: 600;
  color: #666;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}
.stat-row {
  display: flex;
  border-top: 1px solid #E5E5E5;
  border-bottom: 1px solid #E5E5E5;
}
.stat-cell {
  flex: 1;
  padding: 24px 24px 20px;
  border-left: 1px solid #E5E5E5;
}
.stat-cell:first-child { border-left: none; padding-left: 0; }
.stat-label { font-size: 14px; color: #666; margin-bottom: 8px; }
.stat-value { font-size: 30px; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; }
.stat-unit { font-size: 14px; color: #999; font-weight: 400; margin-left: 2px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; margin-bottom: 24px; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
table.data-table th {
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  color: #666;
  padding: 10px 12px;
  border-bottom: 1px solid #1A1A1A;
  white-space: nowrap;
}
table.data-table td {
  padding: 12px;
  border-bottom: 1px solid #E5E5E5;
  vertical-align: top;
}
table.data-table tr:hover td { background: #FAFAFA; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; }
.dim { color: #999; }
.low-flag { color: #C00; font-size: 13px; }

/* ---------- 筛选栏 ---------- */
.filter-bar {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.filter-bar .field { min-width: 160px; }
.filter-bar label { display: block; font-size: 13px; color: #666; margin-bottom: 4px; }

/* ---------- 子 Tab（文字下划线式） ---------- */
.sub-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid #E5E5E5;
  margin-bottom: 28px;
}
.sub-tabs .tab {
  padding: 8px 2px;
  font-size: 15px;
  color: #666;
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
}
.sub-tabs .tab.active { color: #1A1A1A; font-weight: 600; border-bottom-color: #1A1A1A; }

/* ---------- 分页 ---------- */
.pager {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  font-size: 14px;
  color: #666;
}

/* ---------- 弹层 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 48px 24px;
}
.modal-box {
  background: #FFF;
  border: 1px solid #CCC;
  border-radius: 3px;
  width: 720px;
  max-width: 100%;
  padding: 32px 36px;
}
.modal-box.modal-wide { width: 900px; }
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E5E5E5;
}
.modal-head h3 { font-size: 18px; font-weight: 600; }

.detail-section { margin-bottom: 24px; }
.detail-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}
.kv { display: flex; font-size: 15px; padding: 4px 0; }
.kv .k { width: 120px; flex-shrink: 0; color: #666; }
.kv .v { flex: 1; word-break: break-all; }

/* ---------- 图片 ---------- */
.thumb {
  max-width: 72px;
  max-height: 72px;
  border: 1px solid #E5E5E5;
  border-radius: 2px;
  cursor: pointer;
  margin: 2px 6px 2px 0;
  vertical-align: middle;
}
.img-viewer {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 32px;
}
.img-viewer img { max-width: 92vw; max-height: 82vh; border: 1px solid #CCC; }
.img-viewer .close-hint { margin-top: 16px; color: #999; font-size: 14px; }

/* ---------- JSON 展开 ---------- */
.json-pre {
  background: #F5F5F5;
  border: 1px solid #E5E5E5;
  border-radius: 3px;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 320px;
  overflow: auto;
  margin-top: 8px;
}

/* ---------- token 区域 ---------- */
.token-panel {
  border: 1px solid #1A1A1A;
  border-radius: 3px;
  padding: 28px 32px;
  margin-bottom: 40px;
}
.token-panel h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.token-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  background: #F5F5F5;
  border: 1px solid #E5E5E5;
  border-radius: 3px;
  padding: 12px 16px;
  word-break: break-all;
  margin: 12px 0;
}
.warn-text { color: #C00; font-size: 14px; margin: 8px 0; }

/* ---------- 空态 / 加载 ---------- */
.empty { color: #999; font-size: 15px; padding: 40px 0; text-align: center; }
.loading { color: #999; font-size: 15px; padding: 24px 0; }

@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .side-nav { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid #E5E5E5; }
  .main-content { padding: 24px 20px 60px; }
  .stat-row { flex-wrap: wrap; }
  .stat-cell { min-width: 45%; }
}
