/* ===== 号池工作台 2.0 · 深海冰蓝玻璃设计系统 ===== */

:root {
  color-scheme: dark;
  --bg: #071120;
  --panel: rgba(15, 29, 49, 0.78);
  --panel2: rgba(12, 24, 42, 0.92);
  --panel-solid: #0d1a2e;
  --line: rgba(164, 214, 255, 0.14);
  --line-strong: rgba(164, 214, 255, 0.28);
  --txt: #eef6ff;
  --dim: #9ab2ce;
  --muted: #6e87a8;
  --acc: #a4daf8;
  --acc2: #56c2f5;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #fb7185;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei UI", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-y: auto;
  background:
    radial-gradient(ellipse 68% 48% at 86% -4%, rgba(56, 130, 206, 0.34) 0%, rgba(17, 42, 78, 0.22) 45%, transparent 74%),
    radial-gradient(ellipse 52% 44% at 10% 96%, rgba(14, 116, 144, 0.16) 0%, transparent 68%),
    var(--bg);
  background-attachment: fixed;
}

/* ---------- 顶栏 ---------- */
body .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 58px;
  flex: 0 0 58px;
  padding: 0 22px;
  background: rgba(11, 24, 43, 0.76);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(214, 238, 255, 0.14);
  -webkit-app-region: drag;
}
.topbar button,
.topbar select,
.topbar a {
  -webkit-app-region: no-drag;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 680;
  font-size: 15px;
  letter-spacing: 0.2px;
}
.brandLogo {
  filter: drop-shadow(0 4px 12px rgba(56, 189, 248, 0.28));
  flex: 0 0 auto;
}
.brandName {
  color: var(--txt);
}
.verBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  line-height: 1;
  padding: 3px 8px;
  border-radius: 999px;
  color: #bae6fd;
  background: linear-gradient(135deg, rgba(164, 218, 248, 0.22), rgba(56, 189, 248, 0.1));
  border: 1px solid rgba(164, 218, 248, 0.36);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-variant-numeric: tabular-nums;
}
.verBadge.sm {
  font-size: 10px;
  padding: 2px 6px;
  margin-left: 6px;
  vertical-align: middle;
}

.topright {
  display: flex;
  align-items: center;
  gap: 8px;
}

.userBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(164, 218, 248, 0.34);
  background: rgba(164, 218, 248, 0.13);
  color: #dcf2ff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.userBtn:hover {
  background: rgba(164, 218, 248, 0.22);
  border-color: rgba(164, 218, 248, 0.56);
  color: #ffffff;
}
.userBtn.logged {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: linear-gradient(135deg, #c7ecff 0%, #67cdf8 52%, #2563eb 100%);
  color: #051626;
  font-size: 13.5px;
  font-weight: 750;
  letter-spacing: 0;
  box-shadow:
    0 4px 14px rgba(56, 189, 248, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.userBtn.logged:hover {
  transform: translateY(-1px);
  box-shadow:
    0 6px 18px rgba(56, 189, 248, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.kpi {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(16, 34, 58, 0.72);
  font-variant-numeric: tabular-nums;
}
.kpiDot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.75);
}
.kpi span {
  font-size: 11.5px;
  color: var(--dim);
}
.kpi b {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--txt);
}

.topbar .ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(20, 40, 68, 0.65);
  border: 1px solid var(--line);
  color: #c7dcf5;
  font-size: 12px;
  font-weight: 500;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
}
.topbar .ghost:hover {
  background: rgba(164, 218, 248, 0.14);
  border-color: var(--line-strong);
  color: #ffffff;
}
.topbar .ghost svg {
  opacity: 0.85;
}

/* ---------- 主画布 ---------- */
body .poolMain {
  display: flex;
  flex-direction: column;
  flex: none;
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 20px clamp(16px, 4.5vw, 44px) 32px;
  gap: 16px;
}

.pageHead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.pageTitle {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.poolMain h1 {
  font-size: 26px;
  font-weight: 680;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff 30%, #b5dbf7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pageSub {
  font-size: 12.5px;
  color: var(--muted);
}
.poolMain h2 {
  font-size: 15.5px;
  font-weight: 650;
  color: var(--txt);
  margin-right: auto;
  letter-spacing: -0.01em;
}

.clientPicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 6px 5px 13px;
  border-radius: 999px;
  background: rgba(15, 31, 53, 0.78);
  border: 1px solid var(--line);
  color: var(--dim);
  font-size: 12px;
  box-shadow: inset 0 1px 0 rgba(210, 236, 255, 0.1);
}
.clientPicker select {
  width: auto;
  min-width: 112px;
  max-width: 210px;
  padding: 5px 28px 5px 11px;
  border-radius: 999px;
  background-color: rgba(10, 22, 39, 0.9);
  border-color: rgba(164, 214, 255, 0.18);
  font-size: 12px;
  font-weight: 500;
}

/* ---------- 通用面板 ---------- */
.poolMain .panel {
  overflow: visible;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    inset 0 1px 0 rgba(212, 237, 255, 0.14),
    0 18px 44px rgba(2, 8, 18, 0.46);
}
.composer {
  padding: 22px;
  gap: 16px;
}

.panelHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--dim);
  letter-spacing: 0.3px;
}
.subHint {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  margin-left: 6px;
}

/* ---------- 表单控件（全面消除旧版紫色） ---------- */
select,
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"] {
  background: rgba(8, 18, 34, 0.9);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--txt);
  font-family: inherit;
  transition: border-color 0.18s, background-color 0.18s, box-shadow 0.18s;
}

select {
  padding: 6px 10px;
  line-height: 1.3;
}
select:hover:not(:disabled) {
  border-color: var(--line-strong);
  background-color: rgba(12, 26, 48, 0.96);
}
select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

select:focus,
textarea:focus,
input:focus {
  border-color: rgba(164, 218, 248, 0.54);
  background-color: rgba(10, 23, 43, 0.98);
  box-shadow: 0 0 0 3px rgba(86, 194, 245, 0.13);
  outline: none;
}

/* ---------- 编辑器双栏（纯文本自动撑满） ---------- */
.editor {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}
.editor.textOnly,
.editor:has(#mediaBox[style*="none"]) {
  grid-template-columns: 1fr;
}
.editor > .field > label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--txt);
  margin-bottom: 4px;
  letter-spacing: 0.1px;
}
.countPill {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(164, 218, 248, 0.08);
  border: 1px solid rgba(164, 218, 248, 0.14);
  color: var(--dim);
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.editor textarea {
  min-height: 184px;
  padding: 14px 15px;
  border-radius: 14px;
  background: rgba(7, 16, 31, 0.92);
  font-size: 13.5px;
  line-height: 1.7;
}
.editor textarea::placeholder {
  color: #5f7899;
}
.editor #mediaBox {
  min-width: 0;
  gap: 8px;
}

/* ---------- 统一素材上传区 ---------- */
.mediaRow {
  margin-bottom: 10px;
  gap: 10px;
}
.mediaRow.emptyRow {
  display: none;
}

.drop {
  border: 1px dashed rgba(130, 184, 232, 0.34);
  border-radius: 14px;
  background: rgba(125, 178, 245, 0.055);
  color: #d9ecff;
  transition: background 0.18s, border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.drop:hover,
.drop.dragging {
  background: rgba(154, 212, 251, 0.13);
  border-color: var(--acc);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(86, 194, 245, 0.1);
}
.drop.has {
  border-style: solid;
  border-color: rgba(52, 211, 153, 0.42);
  background: rgba(16, 62, 54, 0.24);
  color: #a7f3d0;
}

#dropRef {
  flex: 0 0 100%;
  min-height: 118px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 14px 12px;
  font-size: 13.5px;
  font-weight: 600;
}
#dropRef small,
.audioDrop small,
.frameDrop small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

#dropAudio.audioDrop {
  flex: 0 0 100%;
  width: 100%;
  min-height: 54px;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
}
#dropAudio.audioDrop .dropText {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.framesRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
.frameSlot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
#dropFirst.frameDrop,
#dropLast.frameDrop {
  width: 100%;
  flex: 0 0 auto;
  min-height: 116px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 12px 10px;
  font-size: 13px;
  font-weight: 600;
}

.uploadMark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(164, 218, 248, 0.14);
  border: 1px solid rgba(164, 218, 248, 0.2);
  color: var(--acc);
  flex: 0 0 auto;
}
.uploadMark.sm {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

#rowImages #thumbList,
#rowAudios #audioList {
  flex-basis: 100%;
}

/* ---------- 缩略图卡 ---------- */
.thumbCard {
  width: 96px;
  background: rgba(11, 24, 43, 0.92);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 4px 14px rgba(2, 8, 18, 0.32);
}
.thumbCard:hover {
  border-color: rgba(164, 218, 248, 0.45);
  transform: translateY(-2px);
}
.thumbImg {
  height: 64px;
  background: #071120;
}
.thumbImg.audio {
  height: 46px;
  background: linear-gradient(135deg, rgba(24, 58, 92, 0.9), rgba(11, 25, 44, 0.95));
  color: var(--acc);
}
.thumbName {
  font-size: 10px;
  color: var(--dim);
  padding: 4px 6px;
  background: rgba(8, 18, 33, 0.94);
  border-top: 1px solid var(--line);
}
.thumbAt {
  left: 4px;
  top: 4px;
  font-size: 9.5px;
  font-weight: 600;
  color: #d8f1ff;
  background: rgba(7, 21, 40, 0.84);
  border: 1px solid rgba(164, 218, 248, 0.34);
  border-radius: 5px;
  padding: 1px 5px;
  opacity: 0.92;
  backdrop-filter: blur(6px);
}
.thumbCard:hover .thumbAt {
  opacity: 1;
  background: rgba(16, 48, 82, 0.92);
  border-color: var(--acc);
}
.thumbDel {
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  background: rgba(12, 20, 34, 0.86);
  border: 1px solid rgba(251, 113, 133, 0.45);
  color: #fda4af;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.thumbCard:hover .thumbDel {
  opacity: 1;
}
.thumbDel:hover {
  background: #e11d48;
  color: #fff;
  border-color: #fb7185;
}

/* ---------- 底部玻璃操作栏 ---------- */
.composerBar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 10px 12px 10px 14px;
  border: 1px solid rgba(176, 216, 255, 0.22);
  background: linear-gradient(150deg, rgba(35, 65, 102, 0.62), rgba(14, 29, 50, 0.82));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(216, 238, 255, 0.24);
}
.composerControls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}
.composerBar .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.composerBar .field {
  flex-direction: row;
  align-items: center;
  gap: 6px;
}
.composerBar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 12px;
  color: #b7cde6;
}
.composerBar label .hint:empty {
  display: none;
}
.composerBar select {
  width: auto;
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 9px;
  background-color: rgba(8, 20, 37, 0.78);
  border-color: rgba(164, 214, 255, 0.2);
}

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: none;
  border-radius: 999px;
  color: #051626;
  background: linear-gradient(135deg, #c7ecff 0%, #8ed8fa 52%, #47bdf5 100%);
  font-size: 13px;
  font-weight: 680;
  padding: 9px 20px;
  letter-spacing: 0.2px;
  box-shadow:
    0 6px 20px rgba(56, 189, 248, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: filter 0.18s, transform 0.18s, box-shadow 0.18s;
}
.primary:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    0 10px 26px rgba(56, 189, 248, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}
.primary:active:not(:disabled) {
  transform: translateY(0);
}
.composerBar .primary {
  margin-left: auto;
  white-space: nowrap;
  height: 36px;
  padding: 0 22px;
}

.ghost {
  background: rgba(18, 35, 60, 0.72);
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--dim);
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.ghost:hover {
  background: rgba(164, 218, 248, 0.12);
  border-color: var(--line-strong);
  color: var(--txt);
}

/* ---------- 悬浮状态 Toast ---------- */
.statusToast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  max-width: min(440px, calc(100vw - 32px));
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--txt);
  background: rgba(12, 27, 48, 0.9);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(2, 8, 18, 0.56);
  animation: toastIn 0.22s ease;
}
.statusToast.run {
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(10, 35, 56, 0.92);
}
.statusToast.done,
.statusToast.ok {
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(9, 40, 36, 0.92);
}
.statusToast.err {
  color: #fecdd3;
  border-color: rgba(251, 113, 133, 0.48);
  background: rgba(48, 16, 26, 0.92);
}
#statusPill[hidden] {
  display: none;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 任务与作品区 ---------- */
.tasksHead {
  padding: 15px 22px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 10px;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11.5px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.stats .st {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10, 22, 40, 0.65);
  border: 1px solid rgba(164, 214, 255, 0.1);
  gap: 6px;
}
.stats .st i {
  width: 6px;
  height: 6px;
}

.poolMain .taskList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 16px;
  padding: 20px 22px 24px;
  overflow: visible;
  min-height: 180px;
}

.taskList .empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 16px;
  color: var(--dim);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.6;
}
.taskList .empty small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.emptyIcon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(164, 218, 248, 0.08);
  border: 1px solid var(--line);
  color: var(--acc);
  margin-bottom: 4px;
}

/* ---------- 任务卡片 ---------- */
.card {
  background: rgba(13, 27, 48, 0.76);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 14px 16px;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 10px 28px rgba(2, 8, 18, 0.36);
}
.cardPrompt {
  font-size: 13px;
  color: #e4f0ff;
  line-height: 1.55;
}
.cardMeta {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.badge.que {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.3);
  color: #fcd34d;
}
.badge.sub {
  background: rgba(96, 165, 250, 0.14);
  border-color: rgba(96, 165, 250, 0.32);
  color: #93c5fd;
}
.badge.run {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
}
.badge.done {
  background: rgba(52, 211, 153, 0.13);
  border-color: rgba(52, 211, 153, 0.32);
  color: #6ee7b7;
}
.badge.err {
  background: rgba(251, 113, 133, 0.14);
  border-color: rgba(251, 113, 133, 0.34);
  color: #fda4af;
}

.bar {
  height: 4px;
  background: rgba(164, 214, 255, 0.1);
  border-radius: 999px;
  margin: 10px 0 6px;
}
.bar > i {
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #a4daf8, #38bdf8);
  background-size: 200% 100%;
}
.card[data-status="generating"] .bar > i {
  animation: barShimmer 1.8s linear infinite;
}
.card[data-status="done"] .bar {
  display: none;
}
@keyframes barShimmer {
  from { background-position: 200% 0; }
  to { background-position: 0% 0; }
}

.cardVideo {
  margin-top: 12px;
}
.cardVideo video {
  border-radius: 11px;
  border: 1px solid var(--line);
}
.cardActions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.cardActions a,
.cardActions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(19, 38, 66, 0.8);
  border: 1px solid var(--line);
  color: #c5daf4;
  font-size: 11.5px;
  font-weight: 500;
}
.cardActions a:hover,
.cardActions button:hover {
  background: rgba(164, 218, 248, 0.14);
  border-color: var(--line-strong);
  color: #ffffff;
}

.cardCancel button {
  border-radius: 999px;
  border-color: rgba(251, 113, 133, 0.32);
  color: #fda4af;
  padding: 4px 13px;
}
.cardCancel button:hover {
  background: rgba(251, 113, 133, 0.14);
  border-color: rgba(251, 113, 133, 0.55);
  color: #ffe4e6;
}

/* ---------- 弹窗与对话框（统一深海蓝玻璃） ---------- */
.modalMask {
  background: rgba(3, 9, 20, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modalBox {
  background: linear-gradient(180deg, #10203a, #0b172b);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 22px;
  box-shadow:
    inset 0 1px 0 rgba(212, 237, 255, 0.16),
    0 24px 60px rgba(1, 6, 16, 0.65);
}
.modalFields {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 14px;
}
.mf {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.mf label {
  font-size: 11.5px;
  color: var(--dim);
}
.mf input,
.mf select {
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(7, 16, 30, 0.92);
  color: var(--txt);
  font-size: 12.5px;
}
.mf input[type="number"] {
  font-variant-numeric: tabular-nums;
}
.mf textarea {
  width: 100%;
  min-height: 120px;
  background: rgba(7, 16, 30, 0.92);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--txt);
  font-size: 12px;
  line-height: 1.6;
  padding: 10px 12px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.checkWrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--txt);
}
.checkWrap input {
  width: 15px;
  height: 15px;
  accent-color: var(--acc2);
}

#registration,
#adminLogin {
  margin: auto;
  width: min(420px, 90vw);
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: linear-gradient(180deg, #10203a, #0b172b);
  color: var(--txt);
  box-shadow:
    inset 0 1px 0 rgba(212, 237, 255, 0.16),
    0 24px 60px rgba(1, 6, 16, 0.65);
}
#registration::backdrop,
#adminLogin::backdrop {
  background: rgba(3, 9, 20, 0.74);
  backdrop-filter: blur(8px);
}
#registrationForm,
#adminLoginForm {
  display: grid;
  gap: 13px;
}
#registrationForm h2,
#adminLoginForm h2 {
  font-size: 16px;
  font-weight: 650;
}
#registrationForm label,
#adminLoginForm label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--dim);
}
#registrationForm input,
#adminLoginForm input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(7, 16, 30, 0.92);
  color: var(--txt);
}
#registrationError,
#adminLoginError {
  color: #fda4af;
  font-size: 12px;
}
#registrationError:empty,
#adminLoginError:empty {
  display: none;
}

/* ---------- 后台管理（统一深海蓝体系 + 修复状态灯） ---------- */
.adminMask {
  position: fixed;
  inset: 0;
  background: rgba(3, 9, 20, 0.74);
  backdrop-filter: blur(8px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
}
.adminMask.hidden {
  display: none;
}
.adminBox {
  width: min(1180px, 94vw);
  height: min(780px, 90vh);
  background: linear-gradient(180deg, #0c1a30, #081222);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(1, 6, 16, 0.65);
}
.adminWindow .adminMask {
  position: static;
  flex: 1;
  align-items: stretch;
  background: none;
}
.adminWindow .adminBox {
  width: 100%;
  height: 100vh;
  border: 0;
  border-radius: 0;
}
.adminHead {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: rgba(12, 26, 48, 0.85);
  border-bottom: 1px solid var(--line);
}
.adminTitle {
  font-size: 14.5px;
  font-weight: 650;
  color: var(--txt);
}
.adminTabs {
  display: flex;
  gap: 6px;
}
.aTab {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(14, 29, 50, 0.72);
  color: var(--dim);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}
.aTab:hover {
  color: var(--txt);
  border-color: var(--line-strong);
}
.aTab.active {
  background: rgba(164, 218, 248, 0.16);
  color: #e6f5ff;
  border-color: rgba(164, 218, 248, 0.42);
}
.adminHead .ghost {
  margin-left: auto;
  border-radius: 999px;
}
.adminBody {
  flex: 1;
  overflow: auto;
  padding: 12px 20px 22px;
}
.aTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.aTable th {
  position: sticky;
  top: 0;
  background: #0c1a30;
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.aTable td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(164, 214, 255, 0.08);
  color: #d6e6f8;
  vertical-align: middle;
}
.aTable tr:hover td {
  background: rgba(164, 218, 248, 0.05);
}
.aTable .muted {
  color: var(--dim);
}
.aTable .ops {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.aTable .ops button {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: rgba(16, 33, 58, 0.78);
  color: #bcd3ee;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.aTable .ops button:hover {
  background: rgba(164, 218, 248, 0.15);
  border-color: var(--line-strong);
  color: #ffffff;
}
.aTable .ops button.danger {
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.3);
}
.aTable .ops button.danger:hover {
  background: rgba(251, 113, 133, 0.16);
  border-color: rgba(251, 113, 133, 0.55);
}

/* 修复状态灯：四种状态统一尺寸与圆角 */
.dotOk,
.dotBad,
.dotCool,
.dotOff {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 7px;
  vertical-align: middle;
}
.dotOk {
  background: var(--ok);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.65);
}
.dotBad {
  background: var(--err);
  box-shadow: 0 0 8px rgba(251, 113, 133, 0.55);
}
.dotCool {
  background: var(--warn);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}
.dotOff {
  background: #516582;
}

.adminSection {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 8px;
}
.adminSection h4 {
  margin: 0;
  font-size: 12px;
  color: var(--dim);
  font-weight: 500;
}
.adminSection .ghost.sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
}

/* 网页版：没有本地成品文件夹 */
.isWeb #btnFolder { display: none; }

/* ---------- 微雪与冰冻霜感 ---------- */
.snowCanvas {
  position: fixed;
  inset: 0;
  z-index: 15;            /* 在内容之上、顶栏(20)与弹窗之下 */
  pointer-events: none;
}
html.snow-on .poolMain .panel {
  border-color: rgba(196, 232, 255, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(235, 248, 255, 0.28),
    inset 0 0 32px rgba(176, 224, 255, 0.065),
    0 18px 44px rgba(2, 8, 18, 0.5);
}
html.snow-on .composerBar {
  border-color: rgba(206, 236, 255, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(240, 250, 255, 0.34),
    inset 0 0 22px rgba(176, 224, 255, 0.08);
}
.snowBtn {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(20, 40, 68, 0.65);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s;
}
.snowBtn:hover {
  color: #ffffff;
  border-color: var(--line-strong);
}
.snowBtn.on {
  color: #e0f4ff;
  border-color: rgba(164, 218, 248, 0.42);
  background: rgba(164, 218, 248, 0.14);
  box-shadow: 0 0 12px rgba(164, 218, 248, 0.22);
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(164, 214, 255, 0.18);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(164, 214, 255, 0.32);
}

/* ---------- 响应式 ---------- */
@media (max-width: 840px) {
  .editor {
    grid-template-columns: 1fr;
  }
  .composerBar .primary {
    width: 100%;
    margin-left: 0;
  }
}
@media (max-width: 560px) {
  .framesRow {
    grid-template-columns: 1fr;
  }
}
