/* ==========================================================================
   console.css —— 商家控制台 + 登录注册（卡密小铺自有）
   与前台共用 base.css 的设计变量
   ========================================================================== */

/* ---------------------------------------------------------------- 登录注册 */

.auth-page {
  min-height: 100vh;
  background: linear-gradient(160deg, #eef4ff 0%, #f7f9fc 46%, #fff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-card {
  width: 400px;
  max-width: 100%;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(29, 33, 41, 0.09);
  padding: 34px 32px 30px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.auth-logo b { font-size: 18px; color: var(--gray-10); }
.auth-logo em { font-style: normal; font-size: 12px; color: var(--gray-5); }

.auth-sub {
  margin: 0 0 22px;
  font-size: 13px;
  color: var(--gray-6);
}

.auth-field { margin-bottom: 16px; }

.auth-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--gray-8);
}

.auth-field input {
  width: 100%;
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--gray-3);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}

.auth-field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(22, 93, 255, .1);
}

.auth-hint {
  min-height: 18px;
  margin: 4px 0 12px;
  font-size: 12.5px;
  color: var(--gray-6);
}

.auth-hint.is-error { color: #f53f3f; }

.auth-submit {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  transition: background .18s;
}

.auth-submit:hover { background: var(--brand-strong); }
.auth-submit:disabled { opacity: .6; cursor: not-allowed; }

.auth-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--gray-6);
}

.auth-foot a { color: var(--brand); }

.auth-demo {
  margin-top: 16px;
  padding: 10px 12px;
  background: var(--gray-1);
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 20px;
  color: var(--gray-6);
}

.auth-demo code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  color: var(--gray-8);
}

/* ---------------------------------------------------------------- 控制台外壳 */

.c-page { background: #f4f6fa; min-height: 100vh; }

.c-top {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  padding: 0 22px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.c-top__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--gray-10);
}

.c-top__brand svg { flex: none; }

.c-top__shop {
  font-size: 12.5px;
  color: var(--gray-6);
  background: var(--gray-1);
  border-radius: 999px;
  padding: 3px 11px;
}

.c-top__spacer { flex: 1 1 auto; }

.c-top a, .c-top button {
  font-size: 13.5px;
  color: var(--gray-8);
  background: none;
  border: 0;
  padding: 6px 10px;
  border-radius: 6px;
}

.c-top a:hover, .c-top button:hover { background: var(--gray-1); color: var(--gray-10); }

.c-body {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 20px 60px;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  align-items: start;
}

.c-nav {
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 1px 2px rgba(29, 33, 41, .03);
  position: sticky;
  top: 78px;
}

.c-nav button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  font-size: 13.5px;
  color: var(--gray-8);
  text-align: left;
  transition: background .15s, color .15s;
}

.c-nav button:hover { background: var(--gray-1); }

.c-nav button.is-on {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
}

.c-nav svg { flex: none; }

.c-main { min-width: 0; }

.c-panel { display: none; }
.c-panel.is-on { display: block; }

.c-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.c-head h2 { margin: 0; font-size: 17px; font-weight: 600; color: var(--gray-10); }
.c-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--gray-6); }

.c-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(29, 33, 41, .03);
}

.c-card + .c-card { margin-top: 14px; }

/* 统计卡 */
.c-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.c-stat {
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(29, 33, 41, .03);
}

.c-stat__k { font-size: 12.5px; color: var(--gray-6); }
.c-stat__v {
  margin-top: 6px;
  font-size: 25px;
  font-weight: 700;
  color: var(--gray-10);
  letter-spacing: -.4px;
}
.c-stat__v small { font-size: 13px; font-weight: 500; color: var(--gray-6); margin-left: 2px; }

/* 表单 */
.c-row { display: flex; gap: 14px; flex-wrap: wrap; }
.c-row > * { flex: 1 1 220px; min-width: 0; }

.c-field { margin-bottom: 14px; }
.c-field > label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--gray-8);
}
.c-field > label i { color: #f53f3f; font-style: normal; }
.c-field .tip { margin-top: 5px; font-size: 12px; color: var(--gray-5); }

.c-input, .c-textarea, .c-select {
  width: 100%;
  padding: 0 12px;
  height: 38px;
  border: 1px solid var(--gray-3);
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--gray-10);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}

.c-textarea { height: auto; min-height: 104px; padding: 10px 12px; line-height: 1.6; resize: vertical; }

.c-input:focus, .c-textarea:focus, .c-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(22, 93, 255, .1);
}

/* 按钮 */
.c-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 13.5px;
  transition: background .15s, border-color .15s, color .15s;
}

.c-btn--primary { background: var(--brand); color: #fff; }
.c-btn--primary:hover { background: var(--brand-strong); }

.c-btn--ghost { background: #fff; border-color: var(--gray-3); color: var(--gray-8); }
.c-btn--ghost:hover { border-color: var(--gray-4); background: var(--gray-1); }

.c-btn--danger { background: #fff; border-color: #ffd2d2; color: #f53f3f; }
.c-btn--danger:hover { background: #fff2f2; }

.c-btn--sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 6px; }

.c-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* 表格 */
.c-table { width: 100%; border-collapse: collapse; }
.c-table th, .c-table td {
  padding: 11px 10px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.c-table th { color: var(--gray-6); font-weight: 500; white-space: nowrap; }
.c-table tbody tr:hover { background: #fafbfd; }

.c-thumb {
  width: 44px; height: 44px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--gray-1);
  flex: none;
}

.c-goods-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.c-goods-cell b { font-weight: 500; color: var(--gray-10); display: block; }
.c-goods-cell span { font-size: 12px; color: var(--gray-5); }

.c-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
}
.c-badge--on { background: #e8ffea; color: #00a02b; }
.c-badge--off { background: var(--gray-2); color: var(--gray-6); }
.c-badge--ok { background: #e8ffea; color: #00a02b; }
.c-badge--wait { background: #fff7e8; color: #d25f00; }

.c-money { color: #f53f3f; font-weight: 600; }

.c-empty {
  padding: 56px 0;
  text-align: center;
  color: var(--gray-5);
  font-size: 13.5px;
}

.c-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.c-toolbar .c-input { width: 240px; }
.c-toolbar .c-select { width: 170px; }

.c-code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: var(--gray-8);
}

/* 弹窗 */
.c-modal-mask {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(29, 33, 41, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

.c-modal {
  width: 620px; max-width: 100%;
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(29, 33, 41, .18);
}

.c-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 0;
}
.c-modal__head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.c-modal__head button {
  border: 0; background: none; font-size: 22px; line-height: 1;
  color: var(--gray-6); padding: 0 2px;
}
.c-modal__body { padding: 16px 22px 4px; }
.c-modal__foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 22px 20px;
}

/* 图片上传 */
.c-upload {
  display: flex; align-items: center; gap: 12px;
}
.c-upload__box {
  width: 84px; height: 84px;
  border: 1px dashed var(--gray-4);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-5); font-size: 12px;
  cursor: pointer;
  overflow: hidden;
  flex: none;
  background: var(--gray-1);
}
.c-upload__box img { width: 100%; height: 100%; object-fit: cover; }
.c-upload__box:hover { border-color: var(--brand); color: var(--brand); }

/* 开店引导 */
.c-open {
  max-width: 520px;
  margin: 40px auto;
  text-align: center;
  background: #fff;
  border-radius: 14px;
  padding: 40px 32px;
  box-shadow: 0 8px 32px rgba(29, 33, 41, .07);
}
.c-open h2 { margin: 14px 0 8px; font-size: 20px; }
.c-open p { margin: 0 0 22px; font-size: 13.5px; color: var(--gray-6); line-height: 1.7; }

@media (max-width: 860px) {
  .c-body { grid-template-columns: 1fr; }
  .c-nav { position: static; display: flex; overflow-x: auto; gap: 4px; }
  .c-nav button { width: auto; white-space: nowrap; }
  .c-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   钱包登录
   ========================================================================== */

.auth-sep {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
  color: var(--gray-5);
  font-size: 12.5px;
}
.auth-sep::before,
.auth-sep::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: var(--line-soft);
}

.auth-wallets { display: flex; flex-direction: column; gap: 10px; }

.wallet-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--gray-3);
  border-radius: 8px;
  background: #fff;
  font-size: 13.5px;
  color: var(--gray-10);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.wallet-btn:hover:not(:disabled) {
  border-color: var(--brand);
  background: #f7faff;
  box-shadow: 0 2px 8px rgba(22, 93, 255, .08);
}
.wallet-btn:disabled { opacity: .55; cursor: not-allowed; }
.wallet-btn b { font-weight: 500; }
.wallet-btn span { margin-left: auto; font-size: 12px; color: var(--gray-6); }

/* 控制台里的钱包列表 */
.wallet-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.wallet-row:last-child { border-bottom: 0; }
.wallet-row__icon {
  width: 34px; height: 34px; flex: none;
  border-radius: 8px; background: var(--gray-1);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--gray-7);
}
.wallet-row__main { min-width: 0; flex: 1 1 auto; }
.wallet-row__addr {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px; color: var(--gray-10);
  word-break: break-all;
}
.wallet-row__meta { font-size: 12px; color: var(--gray-5); margin-top: 2px; }

/* 钱包环境检测提示（登录页） */
.wallet-env {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--gray-1, #f7f8fa);
  font-size: 12.5px;
}
.wallet-env__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  color: var(--gray-7, #4e5969);
}
.wallet-env__row + .wallet-env__row { border-top: 1px solid #eef0f3; }
.wallet-env__dot {
  width: 7px; height: 7px; flex: none;
  border-radius: 50%;
  background: #c9cdd4;
}
.wallet-env__row b { font-weight: 500; color: var(--gray-10, #1d2129); }
.wallet-env__state { margin-left: auto; color: var(--gray-6, #86909c); }
.wallet-env__state a { color: #165dff; text-decoration: none; }
.wallet-env__state a:hover { text-decoration: underline; }
.wallet-env__row.is-ok .wallet-env__state { color: #00a02b; }

/* 注册表单：邮箱验证码 */
.auth-req { color: #f53f3f; font-style: normal; margin-left: 2px; }
.auth-opt { color: var(--gray-6, #86909c); font-style: normal; font-weight: 400; margin-left: 4px; font-size: 12px; }

.auth-code { display: flex; gap: 8px; }
.auth-code input { flex: 1 1 auto; min-width: 0; }
.auth-code button {
  flex: none;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--brand, #165dff);
  border-radius: 8px;
  background: #fff;
  color: var(--brand, #165dff);
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, opacity .15s;
}
.auth-code button:hover:not(:disabled) { background: #f0f7ff; }
.auth-code button:disabled {
  border-color: var(--gray-3, #e5e6eb);
  color: var(--gray-6, #86909c);
  cursor: not-allowed;
  background: #fff;
}

/* 徽标补充变体（后台订单/链上标记用） */
.c-badge--info { background: #e8f3ff; color: #165dff; }
.c-badge--warn { background: #fff7e8; color: #ff7d00; }
