/* Showcase Catalog — 前台管理页 /team/ (中文工具界面: 左侧菜单 + 内容卡片; 手机宽度菜单变顶部横条) */
:root {
  --scc-accent: #0e5a6e;
  --a-soft: color-mix(in srgb, var(--scc-accent) 9%, #fff);
  --ink: #14212a;
  --text: #2a3640;
  --muted: #5d6a74;
  --line: #dbe1e3;
  --bg: #f1f4f4;
  --card: #fff;
  --ok: #1f7a4d;
  --ok-soft: #e6f4ec;
  --err: #b42318;
  --err-soft: #fdecea;
  --r: 8px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.sct { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2 { color: var(--ink); margin: 0; text-wrap: balance; }
a { color: var(--scc-accent); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--scc-accent); outline-offset: 2px; }
.sct-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sct-muted { color: var(--muted); margin: 0; }
.sct-small { font-size: 13px; }
.sct-nowrap { white-space: nowrap; }
.sct-req { color: var(--err); font-weight: 600; }
.sct-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }

/* 按钮 */
.sct-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 18px;
  border: 1.5px solid var(--scc-accent); border-radius: var(--r); background: var(--scc-accent); color: #fff;
  font: 600 14.5px/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.sct-btn:hover { background: color-mix(in srgb, var(--scc-accent) 85%, #000); border-color: color-mix(in srgb, var(--scc-accent) 85%, #000); }
.sct-btn:disabled { opacity: .55; cursor: not-allowed; }
.sct-btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.sct-btn-ghost:hover { background: var(--a-soft); border-color: color-mix(in srgb, var(--scc-accent) 40%, var(--line)); color: var(--ink); }
.sct-btn-danger { background: #fff; color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, #fff); }
.sct-btn-danger:hover { background: var(--err-soft); border-color: var(--err); color: var(--err); }
.sct-btn-sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
.sct-btn-block { width: 100%; min-height: 46px; }
.sct-link { background: none; border: 0; padding: 4px 0; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; }
.sct-link:hover { color: var(--scc-accent); text-decoration: underline; text-underline-offset: 3px; }

/* 提示条 */
.sct-alert { padding: 11px 14px; border-radius: var(--r); background: var(--a-soft); color: var(--ink); margin: 0 0 18px; border: 1px solid color-mix(in srgb, var(--scc-accent) 22%, #fff); }
.sct-alert-ok { background: var(--ok-soft); border-color: #bfe3cf; color: #12512f; }
.sct-alert-err { background: var(--err-soft); border-color: #f6c9c4; color: #7a1a12; }
.sct-alert.is-hiding { opacity: 0; transition: opacity .4s ease; }

/* 标签 */
.sct-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12.5px; font-weight: 600; background: #eceff0; color: var(--muted); }
.sct-pill-ok { background: var(--ok-soft); color: var(--ok); }
.sct-pill-err { background: var(--err-soft); color: var(--err); }

/* ── 登录 ── */
.sct-auth { background: var(--bg); }
.sct-login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.sct-login-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 32px 28px 24px; box-shadow: 0 20px 40px -24px rgba(20, 33, 42, .25); }
.sct-login-brand { display: inline-block; margin-bottom: 22px; font-weight: 700; color: var(--ink); text-decoration: none; font-size: 15px; letter-spacing: .01em; }
.sct-login-brand::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--scc-accent); margin-right: 8px; vertical-align: 1px; }
.sct-login h1 { font-size: 24px; margin-bottom: 4px; }
.sct-login .sct-muted { margin-bottom: 20px; }
.sct-login .sct-small { margin: 16px 0 0; text-align: center; }

/* ── 表单 ── */
.sct-form { display: grid; gap: 16px; }
.sct-field { display: grid; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.sct-field > span:first-child, .sct-field > legend { font-weight: 600; color: var(--ink); font-size: 14px; padding: 0; }
.sct-field small { color: var(--muted); font-size: 12.5px; }
.sct-fieldset { gap: 12px; padding-top: 4px; border-top: 1px solid var(--line); }
.sct-fieldset legend { padding-top: 14px; }
.sct input[type=text], .sct input[type=email], .sct input[type=password], .sct input[type=number], .sct input[type=search], .sct select, .sct textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r);
  background: #fff; color: var(--ink); font: inherit; font-size: 15px; transition: border-color .15s ease, box-shadow .15s ease;
}
.sct textarea { resize: vertical; line-height: 1.6; }
.sct input:focus, .sct select:focus, .sct textarea:focus { outline: none; border-color: var(--scc-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--scc-accent) 18%, transparent); }
.sct-pass { display: flex; gap: 8px; }
.sct-pass input { flex: 1; min-width: 0; }
.sct-pass button { flex: none; min-width: 58px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; }
.sct-pass button:hover { color: var(--ink); border-color: var(--muted); }
.sct-check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14.5px; min-height: 32px; }
.sct-check input, .sct-radio input { width: 18px; height: 18px; accent-color: var(--scc-accent); margin: 0; flex: none; }
.sct-radio { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; margin-bottom: 8px; }
.sct-radio input { margin-top: 2px; }
.sct-radio span { display: grid; }
.sct-radio small { color: var(--muted); font-size: 12.5px; }
.sct-radio:has(input:checked) { border-color: var(--scc-accent); background: var(--a-soft); }
.sct-form-actions { display: flex; gap: 10px; padding-top: 4px; }
.sct-inline { display: flex; gap: 8px; align-items: center; }
.sct-inline input { flex: 1; min-width: 0; }
.sct-grow { flex: 1; min-width: 0; }
.sct-color { display: flex; align-items: center; gap: 10px; }
.sct-color input { width: 52px; height: 42px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; cursor: pointer; }

/* ── 布局 ── */
.sct-app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sct-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); padding: 18px 12px; }
.sct-side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; text-decoration: none; color: var(--ink); min-width: 0; }
.sct-mark { flex: none; width: 34px; height: 34px; border-radius: var(--r); background: var(--scc-accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.sct-side-name { display: grid; font-weight: 700; line-height: 1.25; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sct-side-name small { font-weight: 500; color: var(--muted); font-size: 12px; }
.sct-nav { display: grid; gap: 2px; }
.sct-nav a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border-radius: var(--r); color: var(--text); text-decoration: none; font-weight: 550; }
.sct-nav a:hover { background: var(--bg); color: var(--ink); }
.sct-nav a[aria-current] { background: var(--a-soft); color: var(--scc-accent); }
.sct-nav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sct-me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 14px 8px 0; border-top: 1px solid var(--line); }
.sct-me-name { flex: 1; min-width: 0; display: grid; font-weight: 600; font-size: 14px; line-height: 1.3; overflow: hidden; }
.sct-me-name small { font-weight: 500; color: var(--muted); font-size: 12px; }
.sct-me form { margin: 0; }
.sct-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #e3e8ea; color: var(--ink); display: grid; place-items: center; font-weight: 700; font-size: 12.5px; }

.sct-main { padding: 28px clamp(16px, 3vw, 40px) 64px; max-width: 1180px; width: 100%; }
.sct-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.sct-head h1 { font-size: 24px; line-height: 1.25; }
.sct-head .sct-muted { margin-top: 4px; font-size: 14px; }
.sct-head-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.sct-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: grid; gap: 14px; align-content: start; }
.sct-card h2 { font-size: 16px; }
.sct-card-head { display: grid; gap: 2px; }
.sct-narrow { max-width: 640px; }
.sct-empty { background: #fff; border: 1px dashed var(--line); border-radius: 12px; padding: 48px 20px; text-align: center; display: grid; justify-items: center; gap: 14px; }
.sct-empty p { margin: 0; color: var(--muted); }

@media (max-width: 860px) {
  .sct-app { grid-template-columns: 1fr; }
  .sct-side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; gap: 8px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sct-side-brand { padding: 0; }
  .sct-side-name { display: none; }
  .sct-nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
  .sct-nav::-webkit-scrollbar { display: none; }
  .sct-nav a { flex: none; min-height: 40px; padding: 0 10px; gap: 6px; font-size: 14px; }
  .sct-nav a:last-child { display: none; }
  .sct-me { margin: 0; padding: 0 0 0 6px; border: 0; gap: 4px; flex: none; border-left: 1px solid var(--line); }
  .sct-me .sct-avatar, .sct-me-name { display: none; }
  .sct-main { padding-top: 20px; }
}

/* ── 产品列表 ── */
.sct-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.sct-filters input[type=search] { flex: 1 1 220px; width: auto; }
.sct-filters select { width: auto; flex: 0 1 auto; }
.sct-plist { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sct-prow { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 16px; }
.sct-prow + .sct-prow { border-top: 1px solid var(--line); }
.sct-prow-img { width: 64px; height: 64px; border-radius: var(--r); overflow: hidden; background: var(--bg); display: block; border: 1px solid var(--line); }
.sct-prow-img img { width: 100%; height: 100%; object-fit: cover; }
.sct-noimg { display: block; width: 100%; height: 100%; background: repeating-linear-gradient(45deg, #f1f4f4 0 8px, #e7ecec 8px 16px); }
.sct-prow-title { font-weight: 600; color: var(--ink); text-decoration: none; font-size: 15.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sct-prow-title:hover { color: var(--scc-accent); }
.sct-prow-meta { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--muted); font-size: 13px; }
.sct-prow-actions { display: flex; gap: 6px; align-items: center; }
.sct-prow-actions form { margin: 0; }
@media (max-width: 720px) {
  .sct-prow { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 12px; }
  .sct-prow-img { width: 56px; height: 56px; }
  .sct-prow-actions { grid-column: 1 / -1; }
  .sct-prow-actions .sct-btn { flex: 1; }
  .sct-prow-actions form { flex: 1; display: flex; }
}
.sct-pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.sct-pager a { min-width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r); background: #fff; color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; }
.sct-pager a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ── 编辑产品 ── */
.sct-edit { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 20px; }
.sct-edit-main, .sct-edit-side { display: grid; gap: 20px; }
.sct-edit-side { position: sticky; top: 20px; }
@media (max-width: 960px) { .sct-edit { grid-template-columns: 1fr; } .sct-edit-side { position: static; } }
.sct-checks { display: grid; gap: 2px; max-height: 280px; overflow: auto; }

.sct-imgs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.sct-imgs:empty { display: none; }
.sct-img { position: relative; aspect-ratio: 1 / 1; border-radius: var(--r); overflow: hidden; background: var(--bg); border: 1px solid var(--line); cursor: grab; touch-action: none; user-select: none; }
.sct-img img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.sct-img:first-child { outline: 2px solid var(--scc-accent); outline-offset: -2px; }
.sct-img:first-child::after { content: "主图"; position: absolute; left: 6px; top: 6px; padding: 1px 7px; border-radius: 4px; background: var(--scc-accent); color: #fff; font-size: 12px; font-weight: 600; }
.sct-img.is-dragging { opacity: .4; }
.sct-img.is-over { outline: 2px dashed var(--scc-accent); outline-offset: -2px; }
.sct-img-x { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(20, 33, 42, .72); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.sct-img-x:hover { background: var(--err); }
.sct-img.is-uploading img { opacity: .45; }
.sct-img .sct-bar { position: absolute; left: 8px; right: 8px; bottom: 8px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .8); overflow: hidden; }
.sct-img .sct-bar i { display: block; height: 100%; width: 0; background: var(--scc-accent); transition: width .2s ease; }
.sct-img.is-failed { border-color: var(--err); }
.sct-img .sct-fail { position: absolute; inset: auto 6px 6px; padding: 3px 6px; border-radius: 4px; background: var(--err); color: #fff; font-size: 12px; line-height: 1.35; }

.sct-drop { position: relative; display: grid; justify-items: center; gap: 2px; padding: 26px 16px; border: 1.5px dashed color-mix(in srgb, var(--scc-accent) 35%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--scc-accent) 3%, #fff); text-align: center; cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.sct-drop:hover, .sct-drop.is-over { background: var(--a-soft); border-color: var(--scc-accent); }
.sct-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sct-drop b { color: var(--scc-accent); }
.sct-drop small { color: var(--muted); font-size: 12.5px; }

.sct-danger-zone { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.sct-danger-card { margin-top: 20px; border-color: color-mix(in srgb, var(--err) 25%, var(--line)); }

/* ── 分类 / 账号 ── */
.sct-rows { list-style: none; margin: 4px 0 0; padding: 0; }
.sct-rows li { display: flex; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.sct-rows form { margin: 0; }
.sct-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.sct-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.sct-table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: .04em; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fafbfb; }
.sct-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.sct-table tr:last-child td { border-bottom: 0; }
.sct-num { text-align: right; font-variant-numeric: tabular-nums; }
.sct-user { display: flex; align-items: center; gap: 10px; }
.sct-user > span:last-child { display: grid; line-height: 1.35; }
.sct-user small { color: var(--muted); font-size: 12.5px; }
.sct-row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.sct-row-actions form { margin: 0; }

/* ── 站点设置 ── */
.sct-settings { gap: 20px; max-width: 880px; }
.sct-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.sct-span2 { grid-column: 1 / -1; }
@media (max-width: 720px) { .sct-grid2 { grid-template-columns: 1fr; } }
.sct-logo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sct-logo-preview { min-width: 160px; height: 64px; padding: 8px 12px; border: 1px dashed var(--line); border-radius: var(--r); display: grid; place-items: center; background: #fff; }
.sct-logo-preview img { max-height: 46px; width: auto; }
.sct-sticky-save { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 35%); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
