/* 无忧声光 · 基础样式与设计变量 */
:root {
  --bg: #06080f;
  --bg-2: #080b13;
  --bg-3: #0b1019;
  --panel: rgba(255, 255, 255, 0.042);
  --panel-2: rgba(255, 255, 255, 0.026);
  --panel-solid: #0d131e;
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #eaf2ff;
  --text-2: #c3cfe3;
  --muted: #8a98b2;
  --dim: #5d6a82;
  --cyan: #5ee7ff;
  --cyan-deep: #22b8d6;
  --violet: #7c5cff;
  --amber: #ffb454;
  --green: #4ade80;
  --red: #f87171;
  --pink: #f472b6;
  --blue: #38bdf8;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-num: "Bahnschrift", "DIN Alternate", "SF Pro Display", "Segoe UI", var(--font);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --glow-cyan: 0 0 26px rgba(94, 231, 255, 0.28);
  --glow-violet: 0 0 26px rgba(124, 92, 255, 0.25);
  --ease: cubic-bezier(0.22, 0.8, 0.26, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: rgba(94, 231, 255, 0.28); color: #fff; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); }

/* 环境光 */
.ambient {
  position: fixed; border-radius: 50%; pointer-events: none; z-index: 0; filter: blur(10px);
}
.ambient-a {
  width: 820px; height: 820px; top: -380px; right: -240px;
  background: radial-gradient(circle, rgba(42, 168, 200, 0.18), rgba(42, 168, 200, 0) 66%);
  animation: drift 26s ease-in-out infinite alternate;
}
.ambient-b {
  width: 760px; height: 760px; bottom: -400px; left: -220px;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.16), rgba(124, 92, 255, 0) 68%);
  animation: drift 32s ease-in-out infinite alternate-reverse;
}
.ambient-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.5;
  background-image: linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 10%, #000 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 10%, #000 10%, transparent 78%);
}
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-40px, 40px, 0) scale(1.08); } }

/* 通用排版 */
.mono { font-family: var(--font-num); letter-spacing: 0.02em; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.danger-text { color: var(--red) !important; }
.ok-text { color: var(--green); }
.warn-text { color: var(--amber); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.hidden { display: none !important; }
[hidden] { display: none !important; }
.only-mobile { display: none; }
.pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green); display: inline-block;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 0.14em;
  color: var(--cyan); text-transform: uppercase;
}
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid transparent;
  font-size: 13.5px; font-weight: 500; white-space: nowrap; transition: all 0.22s var(--ease);
  background: transparent; color: var(--text);
}
.btn i { font-size: 16px; line-height: 1; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(120deg, #4bd7ef 0%, #6b8bff 52%, #8b6bff 100%);
  color: #041018; font-weight: 600;
  box-shadow: 0 10px 26px rgba(74, 190, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover { box-shadow: 0 14px 34px rgba(74, 190, 255, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.btn-glow {
  background: rgba(94, 231, 255, 0.1); border-color: rgba(94, 231, 255, 0.34); color: var(--cyan);
  box-shadow: inset 0 0 18px rgba(94, 231, 255, 0.08);
}
.btn-glow:hover { background: rgba(94, 231, 255, 0.16); }
.btn-soft { background: rgba(255, 255, 255, 0.055); border-color: var(--line); color: var(--text-2); }
.btn-soft:hover { background: rgba(255, 255, 255, 0.09); border-color: var(--line-2); color: var(--text); }
.btn-ghost { border-color: var(--line); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--line-2); color: var(--text); background: rgba(255, 255, 255, 0.04); }
.btn-danger { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.32); color: #ffb3b3; }
.btn-danger:hover { background: rgba(248, 113, 113, 0.2); }
.btn-sm { height: 33px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn-sm i { font-size: 14px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035); color: var(--muted); display: inline-flex;
  align-items: center; justify-content: center; font-size: 17px; transition: all 0.2s var(--ease);
}
.icon-btn:hover { color: var(--cyan); border-color: rgba(94, 231, 255, 0.36); background: rgba(94, 231, 255, 0.07); }
.icon-btn.has-dot { position: relative; }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px rgba(248, 113, 113, 0.8); }
.act {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid transparent; background: transparent;
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
  transition: all 0.18s var(--ease);
}
.act:hover { color: var(--cyan); background: rgba(94, 231, 255, 0.08); border-color: rgba(94, 231, 255, 0.18); }
.act.danger-text:hover { color: var(--red); background: rgba(248, 113, 113, 0.08); border-color: rgba(248, 113, 113, 0.2); }

/* 徽标 */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 9px;
  border-radius: 20px; font-size: 11.5px; font-weight: 500; letter-spacing: 0.02em;
  border: 1px solid transparent; white-space: nowrap;
}
.badge i { font-size: 12px; }
.st-ok { color: #7ff0a8; background: rgba(74, 222, 128, 0.09); border-color: rgba(74, 222, 128, 0.22); }
.st-warn { color: #ffca85; background: rgba(255, 180, 84, 0.09); border-color: rgba(255, 180, 84, 0.22); }
.st-danger { color: #ff9f9f; background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.24); }
.st-info { color: #86e9ff; background: rgba(94, 231, 255, 0.08); border-color: rgba(94, 231, 255, 0.2); }
.st-muted { color: #9aa6bb; background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); }

/* 头像 */
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: #04121a; letter-spacing: -0.04em;
  background: radial-gradient(circle at 32% 26%, #fff 0%, var(--av, #5ee7ff) 78%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.07);
}
.avatar.lg { width: 48px; height: 48px; font-size: 14px; }
.avatar.xs { width: 27px; height: 27px; font-size: 10px; }
.cell-avatar { display: inline-flex; align-items: center; gap: 9px; }

/* 表单 */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field span.span-2, .field.span-2 { grid-column: span 2; }
.field label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.field label em { color: var(--red); font-style: normal; }
.field input, .field select, .field textarea, .filter-search input, .filter-date input, .settings-form input, .settings-form select {
  height: 42px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.035);
  color: var(--text); padding: 0 13px; font-size: 13.5px; outline: none; width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field textarea { height: auto; padding: 11px 13px; resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus, .filter-search:focus-within, .filter-date:focus-within {
  border-color: rgba(94, 231, 255, 0.4); box-shadow: 0 0 0 3px rgba(94, 231, 255, 0.08); background: rgba(94, 231, 255, 0.03);
}
.field input::placeholder, .field textarea::placeholder { color: #55627a; }
.field select, .filter-select select {
  appearance: none; -webkit-appearance: none; background-image: none; cursor: pointer;
}
.field select option, .filter-select option { background: #101725; color: var(--text); }
.field-hint { font-size: 11px; color: var(--dim); margin-top: -2px; }
.field-hint:empty { display: none; }
.input-unit { position: relative; display: flex; align-items: center; }
.input-unit input { padding-right: 48px; }
.input-unit em { position: absolute; right: 13px; font-style: normal; font-size: 12px; color: var(--dim); }
.color-field { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, 0.035); }
.color-field input[type=color] { width: 26px; height: 26px; padding: 0; border: none; border-radius: 7px; background: none; }
.color-field span { font-family: var(--font-num); font-size: 12.5px; color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12.5px; color: var(--text-2); }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .cb {
  width: 16px; height: 16px; border-radius: 5px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03);
  display: inline-flex; align-items: center; justify-content: center; transition: all 0.18s; flex: none;
}
.check input:checked + .cb { background: linear-gradient(140deg, var(--cyan), var(--violet)); border-color: transparent; }
.check input:checked + .cb::after { content: ""; width: 8px; height: 4px; border-left: 1.6px solid #041018; border-bottom: 1.6px solid #041018; transform: rotate(-45deg) translate(1px, -1px); }
.check .ct { line-height: 1.5; }
.switch { position: relative; width: 42px; height: 23px; display: inline-block; flex: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 20px; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line); transition: 0.22s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 17px; height: 17px; border-radius: 50%; left: 2px; top: 2px; background: #8a98b2; transition: 0.22s var(--ease); }
.switch input:checked + span { background: linear-gradient(120deg, rgba(94, 231, 255, 0.5), rgba(124, 92, 255, 0.55)); border-color: rgba(94, 231, 255, 0.4); }
.switch input:checked + span::after { transform: translateX(19px); background: #fff; box-shadow: 0 0 10px rgba(255, 255, 255, 0.6); }
.form-alert {
  padding: 10px 13px; border-radius: 10px; font-size: 12.5px; background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.25); color: #ffb3b3; margin-bottom: 12px;
}

/* 卡片与面板 */
.panel {
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018) 58%, rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  position: relative; overflow: hidden;
}
.panel::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.panel-head h3 { font-size: 15px; font-weight: 600; letter-spacing: 0.01em; }
.panel-head p { font-size: 11.5px; color: var(--dim); margin-top: 3px; }
.panel-tag {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 7px;
  font-size: 11px; color: var(--muted); background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line); white-space: nowrap;
}
.panel-tag.ai { color: var(--cyan); border-color: rgba(94, 231, 255, 0.2); background: rgba(94, 231, 255, 0.06); }
.panel-tag.amber { color: var(--amber); border-color: rgba(255, 180, 84, 0.2); background: rgba(255, 180, 84, 0.06); }
.link-more { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; transition: color 0.2s; white-space: nowrap; }
.link-more:hover { color: var(--cyan); }
.side-panel { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; }
.sp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.sp-head h3 { font-size: 13.5px; font-weight: 600; }
.sp-head a { font-size: 11.5px; color: var(--muted); }
.sp-head a:hover { color: var(--cyan); }

/* 空状态 */
.empty-state { text-align: center; padding: 70px 20px; border: 1px dashed var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, 0.015); }
.empty-orb {
  width: 66px; height: 66px; border-radius: 22px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--cyan); background: radial-gradient(circle at 30% 25%, rgba(94, 231, 255, 0.22), rgba(94, 231, 255, 0.02));
  border: 1px solid rgba(94, 231, 255, 0.18);
}
.empty-state h3 { font-size: 16px; margin-bottom: 6px; }
.empty-state p { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.mini-empty { text-align: center; color: var(--dim); font-size: 12.5px; padding: 26px 10px; }

/* 响应式基础 */
@media (max-width: 900px) {
  .only-mobile { display: inline-flex; }
}
