/* ============================================================
   澄影 · 智能图片工坊  —— 2027 商用级视觉规范
   深空底 + 极光渐变 + 玻璃拟态，中文优先，留白充足
   ============================================================ */
:root {
  --bg: #06080f;
  --bg-2: #0a0e18;
  --panel: rgba(255, 255, 255, 0.042);
  --panel-2: rgba(255, 255, 255, 0.065);
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef2f8;
  --muted: #8d97ab;
  --dim: #626d80;
  --cyan: #35dfe8;
  --violet: #8a6cff;
  --gold: #f4c978;
  --pink: #ff79c6;
  --green: #4ee6a8;
  --danger: #ff6b81;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.9);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans CN", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }
button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

/* ---------------------------------------------------- 极光背景 */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 78% -10%, rgba(138, 108, 255, 0.22), transparent 62%),
    radial-gradient(900px 560px at 6% 22%, rgba(53, 223, 232, 0.14), transparent 60%),
    radial-gradient(760px 620px at 52% 108%, rgba(244, 201, 120, 0.10), transparent 64%),
    linear-gradient(180deg, #070a12 0%, #05070d 100%);
}
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: floaty 28s ease-in-out infinite;
}
.b1 { width: 460px; height: 460px; top: -140px; right: -80px; background: rgba(138, 108, 255, 0.5); }
.b2 { width: 360px; height: 360px; bottom: -120px; left: -60px; background: rgba(53, 223, 232, 0.34); animation-delay: -9s; }
.b3 { width: 300px; height: 300px; top: 44%; left: 46%; background: rgba(255, 121, 198, 0.22); animation-delay: -16s; }
@keyframes floaty {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(28px, -36px, 0) scale(1.08); }
}
.grid-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 20%, #000 12%, transparent 74%);
  -webkit-mask-image: radial-gradient(circle at 50% 20%, #000 12%, transparent 74%);
}

/* ---------------------------------------------------- 玻璃卡片 */
.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.022));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

/* ---------------------------------------------------- 登录页 */
.auth-view {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
}
.auth-card {
  width: min(430px, 100%);
  padding: 34px 30px 24px;
  border-radius: 26px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.028));
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(30px);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: rise 0.6s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.brand-lg { display: flex; gap: 14px; align-items: center; margin-bottom: 26px; }
.brand-mark {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-size: 22px; font-weight: 700; color: #05070d;
  background: linear-gradient(135deg, var(--cyan), var(--violet) 70%, var(--pink));
  box-shadow: 0 12px 30px -10px rgba(53, 223, 232, 0.65);
  letter-spacing: 0;
}
.brand-mark.sm { width: 38px; height: 38px; border-radius: 12px; font-size: 17px; }
.brand-lg h1 { font-size: 22px; letter-spacing: 0.01em; }
.brand-lg h1 span { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.brand-sub { font-size: 12.5px; color: var(--dim); margin-top: 3px; letter-spacing: 0.04em; }

.auth-tabs { display: flex; gap: 6px; padding: 5px; background: rgba(0, 0, 0, 0.35); border-radius: 14px; margin-bottom: 20px; }
.tab {
  flex: 1; padding: 9px 0; border-radius: 10px; font-size: 13.5px; color: var(--muted);
  transition: all 0.25s ease;
}
.tab.active { background: rgba(255, 255, 255, 0.1); color: #fff; box-shadow: 0 6px 18px -10px #000; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; letter-spacing: 0.03em; }
.field input {
  width: 100%; padding: 13px 15px; border-radius: 13px;
  background: rgba(3, 6, 12, 0.6);
  border: 1px solid var(--line);
  font-size: 14px; transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus {
  outline: none; border-color: rgba(53, 223, 232, 0.55);
  box-shadow: 0 0 0 3px rgba(53, 223, 232, 0.12);
}
.auth-hint { font-size: 12px; color: var(--dim); margin-top: 14px; text-align: center; }
.auth-foot { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; font-size: 11.5px; color: var(--dim); letter-spacing: 0.05em; }

/* ---------------------------------------------------- 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 20px; border-radius: 13px; font-size: 13.5px; font-weight: 500;
  transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s;
  white-space: nowrap; letter-spacing: 0.02em;
}
.btn:active { transform: scale(0.977); }
.btn-primary {
  color: #05070d; font-weight: 600;
  background: linear-gradient(135deg, var(--cyan), var(--violet) 82%);
  box-shadow: 0 14px 34px -16px rgba(53, 223, 232, 0.75);
}
.btn-primary:hover { box-shadow: 0 18px 40px -14px rgba(53, 223, 232, 0.9); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.42; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line-strong); color: var(--text);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.28); }
.btn-mini {
  padding: 7px 13px; font-size: 12px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line);
  color: var(--text);
}
.btn-mini:hover { background: rgba(53, 223, 232, 0.16); border-color: rgba(53, 223, 232, 0.4); }
.btn-block { width: 100%; margin-top: 4px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  color: var(--muted); background: rgba(255, 255, 255, 0.05); font-size: 14px;
  transition: all 0.2s;
}
.icon-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.icon-btn.sm { width: 26px; height: 26px; font-size: 12px; border-radius: 8px; }

/* ---------------------------------------------------- 主布局 */
.layout { position: relative; z-index: 2; display: flex; min-height: 100vh; }
.sidebar {
  width: 244px; flex: 0 0 244px;
  display: flex; flex-direction: column;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 14, 24, 0.88), rgba(6, 8, 15, 0.72));
  backdrop-filter: blur(20px);
  position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 0 6px 20px; }
.side-brand-text strong { display: block; font-size: 15px; letter-spacing: 0.02em; }
.side-brand-text small { font-size: 10.5px; color: var(--dim); letter-spacing: 0.16em; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px; border-radius: 12px;
  font-size: 13.5px; color: var(--muted);
  transition: all 0.2s ease; text-align: left; position: relative;
}
.nav-item i {
  font-style: normal; font-size: 14px; width: 18px; text-align: center;
  color: var(--dim); transition: color 0.2s;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.055); color: var(--text); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(100deg, rgba(53, 223, 232, 0.16), rgba(138, 108, 255, 0.13));
  border: 1px solid rgba(53, 223, 232, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}
.nav-item.active i { color: var(--cyan); }

.side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.side-meta { display: grid; gap: 7px; font-size: 11.5px; }
.side-meta > div { display: flex; justify-content: space-between; gap: 6px; }
.side-meta span { color: var(--dim); }
.side-meta b { color: var(--muted); font-weight: 500; text-align: right; }
.side-author { margin-top: 12px; font-size: 10.5px; color: var(--dim); letter-spacing: 0.05em; }

.content { flex: 1; min-width: 0; padding: 0 30px 46px; }
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 22px 0 20px; position: sticky; top: 0; z-index: 8;
  background: linear-gradient(180deg, rgba(6, 8, 15, 0.92) 40%, rgba(6, 8, 15, 0));
  backdrop-filter: blur(8px);
}
.page-title h2 { font-size: 20px; letter-spacing: 0.01em; }
.page-title p { font-size: 12.5px; color: var(--dim); margin-top: 2px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.pill {
  font-size: 11.5px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(78, 230, 168, 0.35);
  background: rgba(78, 230, 168, 0.1); color: var(--green);
  letter-spacing: 0.04em;
}
.user-chip { display: flex; align-items: center; gap: 9px; }
.avatar {
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 600; color: #05070d;
  background: linear-gradient(135deg, var(--gold), var(--cyan));
}
.user-name { font-size: 13px; color: var(--text); }
.only-mobile { display: none; }

/* ---------------------------------------------------- 页面与卡片 */
.pages { max-width: 1240px; }
.page { display: none; animation: fadeUp 0.42s cubic-bezier(0.2, 0.9, 0.3, 1); }
.page.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.hero {
  display: flex; gap: 26px; align-items: center;
  padding: 34px 36px; margin-bottom: 20px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(620px 240px at 88% 0%, rgba(138, 108, 255, 0.2), transparent 70%);
  pointer-events: none;
}
.hero-text { flex: 1; min-width: 0; position: relative; z-index: 1; }
.tagline {
  display: inline-block; font-size: 11.5px; letter-spacing: 0.14em;
  color: var(--cyan); margin-bottom: 12px;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid rgba(53, 223, 232, 0.28);
  background: rgba(53, 223, 232, 0.08);
}
.hero-text h3 { font-size: 26px; line-height: 1.35; letter-spacing: -0.02em; }
.hero-text p { font-size: 13.5px; color: var(--muted); margin-top: 12px; max-width: 620px; }
.hero-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.hero-stat { position: relative; z-index: 1; }
.stat-ring {
  width: 132px; height: 132px; border-radius: 50%;
  display: grid; place-content: center; text-align: center;
  background: conic-gradient(from 200deg, rgba(53, 223, 232, 0.9), rgba(138, 108, 255, 0.85), rgba(244, 201, 120, 0.8), rgba(53, 223, 232, 0.9));
  box-shadow: 0 0 44px -8px rgba(53, 223, 232, 0.5);
  position: relative;
}
.stat-ring::before {
  content: ""; position: absolute; inset: 3px; border-radius: 50%;
  background: #080b13;
}
.stat-ring span { position: relative; z-index: 1; }
.stat-num { display: block; font-size: 30px; font-weight: 600; letter-spacing: -0.02em; }
.stat-label { font-size: 11.5px; color: var(--dim); letter-spacing: 0.08em; }

.grid-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.card { padding: 22px 20px; transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.3s; }
.card.quick { cursor: pointer; }
.card.quick:hover {
  transform: translateY(-4px);
  border-color: rgba(53, 223, 232, 0.35);
  box-shadow: 0 30px 60px -32px rgba(53, 223, 232, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}
.card-icon {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  font-size: 17px; color: #05070d; margin-bottom: 14px;
}
.grad-cyan { background: linear-gradient(135deg, #4ff0ea, #22a6d8); }
.grad-violet { background: linear-gradient(135deg, #a68cff, #6b4dff); }
.grad-gold { background: linear-gradient(135deg, #ffd89b, #e0a75c); }
.grad-pink { background: linear-gradient(135deg, #ff9ad4, #ff5fa8); }
.card h4 { font-size: 15px; margin-bottom: 6px; }
.card p { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.card-link { display: inline-block; margin-top: 12px; font-size: 12px; color: var(--cyan); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.panel { padding: 22px 24px; margin-bottom: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h4 { font-size: 14.5px; letter-spacing: 0.01em; }
.panel-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sub-title { font-size: 12.5px; color: var(--muted); margin: 20px 0 10px; letter-spacing: 0.04em; }

.help-dot {
  width: 19px; height: 19px; border-radius: 50%;
  font-size: 11px; line-height: 1; color: var(--cyan);
  border: 1px solid rgba(53, 223, 232, 0.45);
  background: rgba(53, 223, 232, 0.1);
  display: inline-grid; place-items: center;
  transition: all 0.2s; flex: 0 0 auto;
}
.help-dot:hover { background: rgba(53, 223, 232, 0.25); transform: scale(1.12); }

.info-list { display: grid; gap: 11px; }
.info-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.info-list span { color: var(--dim); }
.info-list b { font-weight: 500; }

.model-list { display: grid; gap: 9px; }
.model-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line);
  font-size: 12.5px;
}
.model-item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.model-item .dot.off { background: var(--danger); box-shadow: none; }
.model-item .m-name { flex: 1; }
.model-item .m-size { color: var(--dim); font-size: 11.5px; }

/* ---------------------------------------------------- 记录 */
.record-list { display: grid; gap: 8px; }
.record-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 13px;
  background: rgba(255, 255, 255, 0.032);
  border: 1px solid transparent;
  transition: all 0.2s;
}
.record-item:hover { background: rgba(255, 255, 255, 0.07); border-color: var(--line); }
.rec-badge {
  font-size: 10.5px; padding: 3px 9px; border-radius: 999px;
  background: rgba(138, 108, 255, 0.16); color: #b9a7ff; letter-spacing: 0.04em;
  flex: 0 0 auto;
}
.rec-main { flex: 1; min-width: 0; }
.rec-main strong { font-size: 13px; font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-main small { font-size: 11.5px; color: var(--dim); }
.rec-time { font-size: 11.5px; color: var(--dim); flex: 0 0 auto; }
.rec-del { color: var(--dim); font-size: 13px; }
.rec-del:hover { color: var(--danger); }
.empty-tip { font-size: 12.5px; color: var(--dim); text-align: center; padding: 22px 0; }

/* ---------------------------------------------------- 指引条 */
.guide { padding: 18px 22px; margin-bottom: 14px; }
.guide-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.guide-head h4 { font-size: 13px; color: var(--cyan); letter-spacing: 0.05em; }
.guide p { font-size: 12.8px; color: var(--muted); line-height: 1.75; }

/* ---------------------------------------------------- 工作台 */
.workbench { display: grid; grid-template-columns: 380px 1fr; gap: 14px; align-items: start; }
.panel-left, .panel-right { margin-bottom: 0; }
.panel-left { position: sticky; top: 88px; }

.upload-zone, .drop-area {
  border: 1.5px dashed rgba(255, 255, 255, 0.18);
  border-radius: 16px; padding: 26px 18px; text-align: center;
  background: rgba(255, 255, 255, 0.022);
  transition: all 0.25s; cursor: pointer;
}
.upload-zone:hover, .drop-area:hover {
  border-color: rgba(53, 223, 232, 0.5);
  background: rgba(53, 223, 232, 0.05);
}
.upload-zone.dragover, .drop-area.dragover {
  border-color: var(--cyan); background: rgba(53, 223, 232, 0.1);
  box-shadow: 0 0 0 4px rgba(53, 223, 232, 0.1);
}
.uz-icon {
  width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 14px;
  display: grid; place-items: center; font-size: 20px; color: var(--cyan);
  background: rgba(53, 223, 232, 0.1); border: 1px solid rgba(53, 223, 232, 0.24);
}
.upload-zone p, .drop-area p { font-size: 13.5px; }
.upload-zone small, .drop-area small { display: block; font-size: 11.5px; color: var(--dim); margin-top: 5px; }

.opt-group { margin-top: 20px; }
.opt-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.opt-head label { font-size: 12.5px; color: var(--muted); letter-spacing: 0.03em; }
.opt-head .val { margin-left: auto; font-size: 12px; color: var(--cyan); font-weight: 500; }
.opt-head .hint { margin-left: auto; font-size: 11px; color: var(--dim); }

.spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.spec-btn {
  padding: 9px 4px; border-radius: 11px; font-size: 12px;
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line);
  color: var(--muted); transition: all 0.2s; line-height: 1.35;
}
.spec-btn:hover { border-color: rgba(255, 255, 255, 0.28); color: var(--text); }
.spec-btn.active {
  background: linear-gradient(140deg, rgba(53, 223, 232, 0.2), rgba(138, 108, 255, 0.16));
  border-color: rgba(53, 223, 232, 0.55); color: #fff;
  box-shadow: 0 8px 20px -12px rgba(53, 223, 232, 0.8);
}
.spec-btn small { display: block; font-size: 10px; color: var(--dim); }
.spec-btn.active small { color: rgba(255, 255, 255, 0.6); }

.color-row { display: flex; gap: 9px; flex-wrap: wrap; }
.color-dot {
  width: 38px; height: 38px; border-radius: 12px; position: relative;
  border: 2px solid transparent; transition: all 0.2s;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16);
}
.color-dot::after {
  content: attr(data-name); position: absolute; bottom: -17px; left: 50%;
  transform: translateX(-50%); font-size: 9.5px; color: var(--dim); white-space: nowrap;
}
.color-dot:hover { transform: translateY(-2px); }
.color-dot.active { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(53, 223, 232, 0.2); }
.color-row { padding-bottom: 16px; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 4px; outline: none;
  background: linear-gradient(90deg, rgba(53, 223, 232, 0.75), rgba(138, 108, 255, 0.55));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: #eaf7ff; border: 2px solid var(--cyan);
  box-shadow: 0 0 12px rgba(53, 223, 232, 0.7); cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; background: #eaf7ff;
  border: 2px solid var(--cyan); cursor: pointer;
}
.slider-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.slider-row > span { font-size: 12px; color: var(--muted); flex: 0 0 62px; }
.slider-row > b { font-size: 12px; color: var(--cyan); flex: 0 0 52px; text-align: right; font-weight: 500; }
.slider-row input { flex: 1; }

.select, .text-input {
  width: 100%; padding: 11px 13px; border-radius: 12px;
  background: rgba(3, 6, 12, 0.62); border: 1px solid var(--line);
  font-size: 13px; transition: border-color 0.2s;
}
.select:focus, .text-input:focus { outline: none; border-color: rgba(53, 223, 232, 0.5); }
.select.sm { width: auto; padding: 7px 11px; font-size: 12px; }
.text-input::placeholder { color: var(--dim); }

.chip-row { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 9px; }
.chip {
  font-size: 11.5px; padding: 5px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.055); border: 1px solid var(--line);
  color: var(--muted); transition: all 0.2s;
}
.chip:hover { border-color: rgba(53, 223, 232, 0.45); color: var(--cyan); }

.switch-row {
  display: flex; align-items: center; gap: 9px; margin-top: 16px;
  font-size: 12.5px; color: var(--muted); cursor: pointer;
}
.switch-row input {
  appearance: none; -webkit-appearance: none;
  width: 36px; height: 20px; border-radius: 999px; position: relative;
  background: rgba(255, 255, 255, 0.14); transition: background 0.25s; flex: 0 0 auto;
}
.switch-row input::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: transform 0.25s;
}
.switch-row input:checked { background: linear-gradient(90deg, var(--cyan), var(--violet)); }
.switch-row input:checked::after { transform: translateX(16px); }

.inline-opts {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
  margin: 18px 0 14px;
}
.inline-opts .slider-row { flex: 1; min-width: 240px; margin: 0; }
.inline-opts .switch-row { margin: 0; }

.action-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.status-text { font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------- 预览 */
.preview-stage {
  min-height: 380px; border-radius: 16px;
  display: grid; place-items: center; padding: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  overflow: hidden; position: relative;
}
.preview-stage.checker {
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.035) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.035) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-color: rgba(255, 255, 255, 0.02);
}
.preview-stage img {
  max-height: 460px; width: auto; border-radius: 8px;
  box-shadow: 0 22px 50px -26px #000;
  cursor: zoom-in;
}
.empty-state { font-size: 12.5px; color: var(--dim); text-align: center; padding: 40px 16px; line-height: 1.8; }

.compliance { margin-top: 14px; display: grid; gap: 7px; }
.comp-line {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 12.3px; color: var(--muted);
  padding: 9px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid transparent;
}
.comp-line.ok { color: #9fe7c4; background: rgba(78, 230, 168, 0.08); border-color: rgba(78, 230, 168, 0.22); }
.comp-line.warn { color: #ffd9a3; background: rgba(244, 201, 120, 0.08); border-color: rgba(244, 201, 120, 0.25); }
.comp-line .ci { flex: 0 0 auto; }
.comp-metrics { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11.5px; color: var(--dim); padding: 4px 2px; }

.sheet-img { border-radius: 10px; box-shadow: 0 18px 40px -24px #000; }
.sheet-note { font-size: 11.5px; color: var(--dim); margin-top: 8px; }
.box-hint { font-size: 11.5px; color: var(--cyan); margin-top: 10px; }

.preview-stage .box-overlay {
  position: absolute; border: 1.5px dashed var(--cyan);
  background: rgba(53, 223, 232, 0.12); border-radius: 4px; pointer-events: none;
}

.busy-mask {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px;
  font-size: 12px; color: var(--text); white-space: nowrap;
  background: rgba(8, 12, 20, 0.86); border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px); z-index: 3;
  animation: fadeIn 0.2s ease;
}

/* ---------------------------------------------------- 结果网格 */
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 16px; }
.result-card {
  border-radius: 14px; overflow: hidden;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  transition: all 0.25s;
}
.result-card:hover { border-color: rgba(53, 223, 232, 0.35); transform: translateY(-2px); }
.result-thumb { height: 132px; background: #05070d; display: grid; place-items: center; overflow: hidden; }
.result-thumb img { height: 100%; width: 100%; object-fit: contain; cursor: zoom-in; }
.result-info { padding: 10px 12px; }
.result-info strong {
  display: block; font-size: 12px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.result-meta { display: flex; gap: 8px; align-items: center; margin-top: 5px; font-size: 11px; color: var(--dim); flex-wrap: wrap; }
.badge {
  font-size: 10px; padding: 2px 7px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.badge.ok { color: #9fe7c4; border-color: rgba(78, 230, 168, 0.3); background: rgba(78, 230, 168, 0.08); }
.badge.bad { color: #ffb1b9; border-color: rgba(255, 107, 129, 0.3); background: rgba(255, 107, 129, 0.08); }
.score-bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); margin-top: 8px; overflow: hidden; }
.score-bar > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--cyan), var(--violet)); }
.result-actions { display: flex; gap: 8px; margin-top: 9px; }
.tick {
  width: 16px; height: 16px; border-radius: 5px; border: 1px solid var(--line-strong);
  display: grid; place-items: center; font-size: 10px; color: transparent; cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
}
.tick.on { background: rgba(78, 230, 168, 0.2); border-color: rgba(78, 230, 168, 0.5); color: var(--green); }

.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.summary-chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0 2px; }
.summary-chips .chip { font-size: 12px; padding: 6px 13px; }
.summary-chips .chip b { color: var(--cyan); }

/* ---------------------------------------------------- 对比 */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compare figure { margin: 0; background: rgba(0, 0, 0, 0.35); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.compare figcaption { font-size: 11.5px; color: var(--dim); padding: 8px 12px; border-bottom: 1px solid var(--line); }
.compare img { width: 100%; max-height: 380px; object-fit: contain; cursor: zoom-in; }

/* ---------------------------------------------------- 管理表格 */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.stat-card { padding: 18px 20px; }
.stat-card span { font-size: 11.5px; color: var(--dim); letter-spacing: 0.05em; }
.stat-card b { display: block; font-size: 24px; font-weight: 600; margin-top: 6px; letter-spacing: -0.02em; }

.table-wrap { overflow-x: auto; border-radius: 12px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 640px; }
.data-table th {
  text-align: left; padding: 10px 12px; font-weight: 500; color: var(--dim);
  font-size: 11.5px; letter-spacing: 0.05em; border-bottom: 1px solid var(--line);
}
.data-table td { padding: 11px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.045); }
.data-table tr:hover td { background: rgba(255, 255, 255, 0.035); }
.role-tag { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: rgba(138, 108, 255, 0.18); color: #b9a7ff; }
.role-tag.admin { background: rgba(244, 201, 120, 0.18); color: var(--gold); }
.state-tag { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; }
.state-tag.on { background: rgba(78, 230, 168, 0.15); color: var(--green); }
.state-tag.off { background: rgba(255, 107, 129, 0.15); color: #ffb1b9; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.link-btn { font-size: 11.5px; color: var(--cyan); padding: 3px 6px; border-radius: 6px; }
.link-btn:hover { background: rgba(53, 223, 232, 0.12); }
.link-btn.danger { color: #ff9aa8; }
.link-btn.danger:hover { background: rgba(255, 107, 129, 0.12); }

/* ---------------------------------------------------- 弹层 */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: 20px;
  background: rgba(3, 5, 10, 0.72); backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card { width: min(520px, 100%); padding: 22px 24px; border-radius: 18px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-head h4 { font-size: 15px; }
.modal-card p { font-size: 13px; color: var(--muted); line-height: 1.8; }

.lightbox {
  position: fixed; inset: 0; z-index: 70;
  display: grid; place-items: center; padding: 30px;
  background: rgba(2, 4, 8, 0.9); backdrop-filter: blur(4px);
}
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 30px 80px -30px #000; }
.lightbox .icon-btn { position: fixed; top: 20px; right: 20px; }

.toast-wrap {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 90; display: grid; gap: 8px; justify-items: center; pointer-events: none;
}
.toast {
  padding: 11px 20px; border-radius: 12px; font-size: 12.8px;
  background: rgba(16, 22, 34, 0.95); border: 1px solid var(--line-strong);
  box-shadow: 0 20px 44px -22px #000; animation: toastIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
  max-width: 80vw;
}
.toast.err { border-color: rgba(255, 107, 129, 0.5); color: #ffc2c9; }
.toast.ok { border-color: rgba(78, 230, 168, 0.45); color: #b7f0d6; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: #fff;
  animation: spin 0.8s linear infinite; display: inline-block; vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.tiny-note { font-size: 11.5px; color: var(--dim); margin-top: 10px; line-height: 1.7; }
.warn-text { color: #ffb020; }

/* ---------------------------------------------------- 批量流水线 */
.op-chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.op-chip {
  padding: 8px 15px; border-radius: 11px; font-size: 12.5px;
  border: 1px solid var(--line); color: var(--muted);
  background: rgba(255, 255, 255, 0.035); transition: all 0.22s;
}
.op-chip:hover { border-color: rgba(53, 223, 232, 0.42); color: var(--text); }
.op-chip.active {
  color: #06121a; font-weight: 600;
  background: linear-gradient(120deg, var(--cyan), #7fe6ff);
  border-color: transparent;
  box-shadow: 0 10px 24px -14px rgba(53, 223, 232, 0.9);
}

.batch-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 20px; margin-top: 4px; }
.org-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px 20px; margin: 4px 0 6px; }
.sub-panel { padding: 16px 18px; margin-top: 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); }

.queue-list { display: grid; gap: 10px; }
.queue-card {
  border-radius: 14px; padding: 13px 15px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.032);
  transition: border-color 0.22s, background 0.22s;
}
.queue-card:hover { border-color: rgba(53, 223, 232, 0.32); }
.queue-card.open { border-color: rgba(53, 223, 232, 0.5); background: rgba(53, 223, 232, 0.05); }
.qc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qc-title { font-size: 13px; font-weight: 500; }
.qc-sub { font-size: 11.5px; color: var(--dim); margin-left: auto; }
.qc-bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.09); margin: 10px 0 8px; overflow: hidden; }
.qc-bar > i {
  display: block; height: 100%; border-radius: 6px; width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transition: width 0.4s ease;
}
.qc-bar.is-done > i { background: linear-gradient(90deg, var(--green), #8ef0c4); }
.qc-bar.is-fail > i { background: linear-gradient(90deg, var(--danger), #ffa2b0); }
.qc-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.state-pill {
  font-size: 10.5px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.state-pill.running { color: #9fe7ff; border-color: rgba(53, 223, 232, 0.4); background: rgba(53, 223, 232, 0.1); }
.state-pill.queued { color: #ffe0a8; border-color: rgba(244, 201, 120, 0.34); background: rgba(244, 201, 120, 0.09); }
.state-pill.done { color: #9fe7c4; border-color: rgba(78, 230, 168, 0.32); background: rgba(78, 230, 168, 0.09); }
.state-pill.failed { color: #ffb1b9; border-color: rgba(255, 107, 129, 0.34); background: rgba(255, 107, 129, 0.09); }
.state-pill.canceled { color: var(--dim); }

.item-list { display: grid; gap: 7px; max-height: 460px; overflow-y: auto; padding-right: 4px; }
.item-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.026);
  font-size: 12px;
}
.item-row .it-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-row .it-err { color: #ffb1b9; font-size: 11px; }
.item-row .it-meta { color: var(--dim); font-size: 11px; white-space: nowrap; }
.item-row.done { border-color: rgba(78, 230, 168, 0.2); }
.item-row.failed { border-color: rgba(255, 107, 129, 0.34); background: rgba(255, 107, 129, 0.05); }
.item-row.skipped { opacity: 0.72; }
.item-row.running { border-color: rgba(53, 223, 232, 0.42); }

.warn-banner { padding: 16px 18px; margin-bottom: 14px; border-color: rgba(244, 201, 120, 0.35); background: rgba(244, 201, 120, 0.055); }
.warn-banner strong { font-size: 13px; color: var(--gold); display: inline-block; margin-right: 6px; }
.warn-banner ul { margin: 10px 0 0; padding-left: 18px; list-style: disc; }
.warn-banner li { font-size: 12px; color: var(--muted); line-height: 1.85; }

.steps { margin: 6px 0 0; padding-left: 20px; list-style: decimal; }
.steps li { font-size: 12.2px; color: var(--muted); line-height: 1.9; }

.queue-dock {
  position: fixed; right: 20px; bottom: 20px; z-index: 45;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 14px;
  font-size: 12px; color: var(--text);
  background: rgba(10, 15, 24, 0.92); border: 1px solid var(--line-strong);
  backdrop-filter: blur(16px); box-shadow: 0 18px 40px -22px #000;
  animation: rise 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.queue-dock .qd-title { color: var(--cyan); }
.queue-dock .qd-bar { width: 110px; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.queue-dock .qd-bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--violet)); transition: width 0.4s; }
.queue-dock .qd-num { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------- 响应式 */
@media (max-width: 1080px) {
  .grid-cards { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .workbench { grid-template-columns: 1fr; }
  .panel-left { position: static; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .layout { display: block; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 50;
    width: 250px; height: 100vh;
    transform: translateX(-102%);
    transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1);
    box-shadow: 30px 0 60px -30px #000;
  }
  .sidebar.open { transform: none; }
  .content { padding: 0 16px 40px; }
  .only-mobile { display: grid; }
  .topbar { gap: 10px; padding: 16px 0 14px; }
  .page-title h2 { font-size: 17px; }
  .page-title p { display: none; }
  .hero { flex-direction: column; align-items: flex-start; padding: 24px 22px; }
  .hero-text h3 { font-size: 21px; }
  .stat-ring { width: 104px; height: 104px; }
  .stat-num { font-size: 24px; }
  .grid-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .panel { padding: 18px 16px; }
  .spec-grid { grid-template-columns: repeat(3, 1fr); }
  .compare { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .user-name { display: none; }
  .pill { display: none; }
  .preview-stage { min-height: 280px; }
}

@media (max-width: 520px) {
  .auth-card { padding: 26px 20px; }
  .grid-cards { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .hero-text h3 { font-size: 19px; }
}
