:root {
  --bg: #080b12;
  --bg-soft: #0e1420;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-solid: #111827;
  --surface: #0e1420;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e9edf7;
  --muted: #93a0b8;
  --accent: #5b8cff;
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --violet: #a78bfa;
  --green: #34d399;
  --amber: #fbbf24;
  --danger: #f87171;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.75);
  --radius: 16px;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f2f5fb;
  --bg-soft: #ffffff;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --surface: #ffffff;
  --border: rgba(18, 30, 54, 0.1);
  --border-strong: rgba(18, 30, 54, 0.18);
  --text: #16202f;
  --muted: #5d6b81;
  --accent: #3563e9;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --violet: #7c5cf0;
  --green: #0f9d6a;
  --amber: #c2820a;
  --danger: #d64545;
  --shadow: 0 22px 50px -30px rgba(21, 38, 71, 0.4);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui,
    -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: auto;
}

.hidden {
  display: none !important;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(680px 420px at 12% -10%, rgba(91, 140, 255, 0.2), transparent 65%),
    radial-gradient(720px 460px at 92% 4%, rgba(167, 139, 250, 0.16), transparent 68%),
    radial-gradient(600px 420px at 50% 108%, rgba(52, 211, 153, 0.1), transparent 70%);
  z-index: 0;
}

[data-theme="light"] .bg-glow {
  background:
    radial-gradient(680px 420px at 12% -10%, rgba(53, 99, 233, 0.14), transparent 65%),
    radial-gradient(720px 460px at 92% 4%, rgba(124, 92, 240, 0.12), transparent 68%);
}

h1,
h2,
h3,
p {
  margin: 0;
}

svg {
  display: block;
  width: 100%;
  height: 100%;
}

.eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ---------- 登录 ---------- */

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.auth-card {
  width: min(430px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 36px 32px 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: rise 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  box-shadow: 0 8px 22px -10px rgba(91, 140, 255, 0.85);
  flex: none;
}

.brand-mark svg {
  width: 19px;
  height: 19px;
}

.brand-mark.large {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  margin-bottom: 20px;
}

.brand-mark.large svg {
  width: 26px;
  height: 26px;
}

.auth-card h1 {
  font-size: 26px;
  letter-spacing: -0.02em;
  margin: 6px 0 6px;
}

.auth-sub {
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 13px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-soft) 55%, transparent);
  margin-bottom: 18px;
}

.seg {
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
}

.seg:hover {
  color: var(--text);
}

.seg.active {
  color: var(--text);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field > span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-soft) 72%, transparent);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

/* 下拉框与其选项跟随主题，避免原生白底白字 */
select {
  color-scheme: dark;
  background: var(--bg-soft);
  color: var(--text);
}

select option,
select optgroup {
  background-color: var(--bg-soft);
  color: var(--text);
}

[data-theme="light"] select {
  color-scheme: light;
  background: var(--surface);
  color: var(--text);
}

[data-theme="light"] select option,
[data-theme="light"] select optgroup {
  background-color: var(--surface);
  color: var(--text);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field small {
  color: var(--muted);
  font-size: 11px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 11px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, filter 0.18s, background 0.18s, border-color 0.18s;
  white-space: nowrap;
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), #7a6bff);
  color: #fff;
  box-shadow: 0 12px 26px -14px rgba(91, 140, 255, 0.9);
}

.btn.primary:hover {
  filter: brightness(1.08);
}

.btn.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn.ghost:hover {
  border-color: var(--border-strong);
  background: var(--accent-soft);
}

.btn.ghost.danger:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: transparent;
}

.btn.block {
  width: 100%;
  padding: 12px;
  margin-top: 4px;
}

.btn.small {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 8px;
}

.auth-hint {
  margin-top: 20px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
  border-top: 1px dashed var(--border);
  padding-top: 16px;
}

.form-error {
  color: var(--danger);
  font-size: 12.5px;
  margin-top: -4px;
}

/* ---------- 主框架 ---------- */

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 22px 40px;
  animation: rise 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.brand-line {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
}

.brand h1 {
  font-size: 19px;
  letter-spacing: -0.015em;
}

.version {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
}

.view-badge {
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 9px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.view-badge.admin {
  color: var(--violet);
  background: color-mix(in srgb, var(--violet) 16%, transparent);
  border-color: color-mix(in srgb, var(--violet) 35%, transparent);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  background: color-mix(in srgb, var(--bg-soft) 55%, transparent);
}

.pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 3px rgba(147, 160, 184, 0.16);
}

.pill.ok {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 42%, transparent);
}

.pill.ok .dot {
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent);
  animation: pulse 2.2s ease-in-out infinite;
}

.pill.warn {
  color: var(--amber);
  border-color: color-mix(in srgb, var(--amber) 42%, transparent);
}

.pill.warn .dot {
  background: var(--amber);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 22%, transparent);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--muted);
  background: color-mix(in srgb, var(--bg-soft) 50%, transparent);
}

.user-chip strong {
  color: var(--text);
  font-weight: 600;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--accent-soft);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* ---------- 统计卡片 ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  --stat-color: var(--accent);
  position: relative;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--stat-color) 16%, var(--border));
  background:
    radial-gradient(120% 100% at 88% 10%, color-mix(in srgb, var(--stat-color) 16%, transparent) 0%, transparent 58%),
    linear-gradient(135deg, color-mix(in srgb, var(--stat-color) 8%, var(--bg-soft)) 0%, color-mix(in srgb, var(--stat-color) 2%, var(--bg-soft)) 100%);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.stat-card::after {
  content: '';
  position: absolute;
  right: -38px;
  bottom: -46px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--stat-color) 22%, transparent);
  pointer-events: none;
}

.stat-card.blue {
  --stat-color: #5b8cff;
}

.stat-card.green {
  --stat-color: #22c55e;
}

.stat-card.violet {
  --stat-color: #8b5cf6;
}

.stat-card.amber {
  --stat-color: #f59e0b;
}

.stat-card:hover {
  border-color: color-mix(in srgb, var(--stat-color) 34%, var(--border));
  transform: translateY(-1px);
}

.stat-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: color-mix(in srgb, var(--stat-color) 14%, transparent);
  color: var(--stat-color);
}

.stat-icon svg {
  width: 17px;
  height: 17px;
}

.stat-label {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.stat-value.small {
  font-size: 18px;
  padding-top: 4px;
}

.stat-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 页签与面板 ---------- */

.tabs {
  display: flex;
  gap: 5px;
  padding: 5px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--panel);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  margin-bottom: 16px;
}

.tab {
  padding: 8px 18px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
  white-space: nowrap;
}

.tab:hover {
  color: var(--text);
}

.tab.active {
  color: var(--text);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent);
}

.tab-panel {
  animation: fade 0.25s ease;
}

.panel {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(14px);
  padding: 20px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.panel-head h2 {
  font-size: 15.5px;
  letter-spacing: -0.01em;
  margin-bottom: 3px;
}

.panel-head p {
  font-size: 12px;
  color: var(--muted);
  max-width: 640px;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search {
  width: 220px;
  padding: 9px 12px;
  font-size: 13px;
}

/* ---------- 表格 ---------- */

.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  border-radius: 12px;
  border: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: thin;
}

.table-wrap::-webkit-scrollbar {
  height: 8px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--muted) 40%, transparent);
  border-radius: 4px;
}

table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--bg-soft) 45%, transparent);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.qq {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.nick {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}

.tag-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.tag.online,
.tag.active {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 42%, transparent);
  background: color-mix(in srgb, var(--green) 10%, transparent);
}

.tag.offline,
.tag.draft {
  color: var(--muted);
  background: transparent;
}

.tag.banned {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 42%, transparent);
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}

.tag.admin {
  color: var(--violet);
  border-color: color-mix(in srgb, var(--violet) 42%, transparent);
  background: color-mix(in srgb, var(--violet) 10%, transparent);
}

.tag.pinned {
  color: var(--amber);
  border-color: color-mix(in srgb, var(--amber) 42%, transparent);
  background: color-mix(in srgb, var(--amber) 10%, transparent);
}

.proto {
  display: grid;
  gap: 1px;
  line-height: 1.35;
}

.proto b {
  font-size: 12px;
  font-weight: 600;
}

.proto span {
  font-size: 10.5px;
  color: var(--muted);
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ---------- 公告列表 ---------- */

.notice-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.notice-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-soft) 42%, transparent);
  padding: 14px 16px;
}

.notice-item header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.notice-item h3 {
  font-size: 14px;
  letter-spacing: -0.005em;
}

.notice-item .notice-meta {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.notice-item p {
  font-size: 13px;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- 表单布局 ---------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.form-grid .form-actions {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  gap: 8px;
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.check-inline input {
  width: 16px;
  height: 16px;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 22px 0;
}

.sub-title {
  font-size: 13px;
  margin-bottom: 10px;
}

/* ---------- 空状态 ---------- */

.empty {
  display: grid;
  gap: 3px;
  text-align: center;
  padding: 40px 16px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
  margin-top: 12px;
}

.empty strong {
  color: var(--text);
  font-size: 13.5px;
}

.empty span {
  font-size: 12px;
}

/* ---------- 元信息 ---------- */

.meta-block {
  margin-top: 4px;
}

.meta-block h3 {
  font-size: 13px;
  margin-bottom: 10px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.meta-grid > div {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--bg-soft) 38%, transparent);
  min-width: 0;
}

.meta-grid dt {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.meta-grid dd {
  margin: 3px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  word-break: break-all;
}

.footer {
  margin-top: 22px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}

/* ---------- 弹窗 ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 7, 13, 0.62);
  backdrop-filter: blur(6px);
}

.modal-card {
  width: min(520px, 100%);
  max-height: min(86vh, 720px);
  overflow-y: auto;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--panel-solid) 94%, transparent);
  box-shadow: var(--shadow);
  padding: 22px;
  animation: rise 0.22s ease;
}

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

.modal-head h2 {
  font-size: 16px;
}

.modal-form {
  display: grid;
  gap: 14px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

/* ---------- 提示 ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  padding: 10px 18px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--panel-solid) 88%, transparent);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  z-index: 50;
  max-width: min(90vw, 460px);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.error {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
}

.toast.ok {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 45%, transparent);
}

/* ---------- 动画 ---------- */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding: 18px 14px 32px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 15px;
  }

  .tab {
    padding: 8px 13px;
  }

  .panel-head {
    flex-direction: column;
  }

  .head-actions {
    width: 100%;
  }

  .search {
    width: 100%;
  }

  .auth-card {
    padding: 28px 22px 22px;
  }

  .user-chip {
    display: none;
  }
}

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

/* ==================== 新增功能样式 ==================== */

.tag.green {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 42%, transparent);
  background: color-mix(in srgb, var(--green) 10%, transparent);
}

.tag.red {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 42%, transparent);
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}

/* 商品网格 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.product-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.product-name {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--text);
}

.product-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 12px;
  min-height: 36px;
  line-height: 1.5;
}

.product-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--green);
  margin: 0 0 4px;
}

.product-stock {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 14px;
}

/* 钱包卡片 */
.wallet-card {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--violet)));
  border-radius: 16px;
  padding: 28px;
  color: #fff;
}

.wallet-label {
  font-size: 14px;
  opacity: 0.85;
  margin: 0 0 8px;
}

.wallet-balance {
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 18px;
  letter-spacing: -0.5px;
}

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

.wallet-actions .btn {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.wallet-actions .btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.btn.link.danger {
  color: var(--danger);
}

.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}

.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}

/* ------------------------------ 外观（主题色） ------------------------------ */

.appearance {
  margin-top: 4px;
}

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

.appearance-head h3 {
  margin: 0;
  font-size: 14px;
}

.appearance-head p {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.appearance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 10px;
}

.accent-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s, color 0.18s;
}

.accent-swatch:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.accent-swatch.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
  background: var(--accent-soft);
  color: var(--text);
}

.accent-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.accent-dot svg {
  width: 14px;
  height: 14px;
}

.accent-name {
  font-weight: 600;
}

/* ------------------------------ 列表工具栏与分页 ------------------------------ */

.list-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.list-toolbar input {
  width: 280px;
  max-width: 100%;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 12px;
}

.pager .pager-info {
  margin-right: auto;
  font-size: 12px;
  color: var(--muted);
}

.pager button {
  min-width: 30px;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.pager button:hover:not(:disabled) {
  border-color: var(--border-strong);
}

.pager button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}

.pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 操作日志表格自适应宽度，避免右侧 IP 列被挤出 */
.logs-table {
  table-layout: fixed;
  min-width: 0;
}

.logs-table th:nth-child(1),
.logs-table td:nth-child(1) {
  width: 104px;
}

.logs-table th:nth-child(2),
.logs-table td:nth-child(2) {
  width: 78px;
}

.logs-table th:nth-child(3),
.logs-table td:nth-child(3) {
  width: 158px;
}

.logs-table th:nth-child(4),
.logs-table td:nth-child(4) {
  width: 96px;
}

.logs-table th:nth-child(5),
.logs-table td:nth-child(5) {
  width: auto;
}

.logs-table th:nth-child(6),
.logs-table td:nth-child(6) {
  width: 116px;
}

.logs-table th:nth-child(7),
.logs-table td:nth-child(7) {
  width: 72px;
  text-align: center;
}

.logs-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.logs-table th {
  white-space: nowrap;
}

/* 剩余时间列居中 */
.col-center,
td.col-center {
  text-align: center;
}

/* 框架连接下方的感谢语，跟随主题主色 */
.framework-credit {
  margin: 2px 0 4px;
  font-size: 12px;
  color: var(--accent);
}
