:root {
  --ink: #162033;
  --muted: #647084;
  --soft: #eef6f7;
  --panel: rgba(255, 255, 255, 0.62);
  --panel-strong: rgba(255, 255, 255, 0.82);
  --line: rgba(255, 255, 255, 0.64);
  --line-strong: rgba(42, 55, 82, 0.1);
  --teal: #12a594;
  --teal-dark: #08766f;
  --sky: #3b82f6;
  --rose: #e85d75;
  --amber: #f2a93b;
  --danger: #c43b4d;
  --warning: #bc7929;
  --success: #147a62;
  --shadow: 0 30px 80px rgba(54, 74, 111, 0.18);
  --shadow-card: 0 18px 42px rgba(54, 74, 111, 0.1);
  --radius-shell: 32px;
  --radius-card: 26px;
  --radius-inner: 14px;
  --radius-control: 10px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1200px 760px at 13% 5%, rgba(133, 230, 212, 0.58), transparent 58%),
    radial-gradient(980px 720px at 88% 16%, rgba(255, 201, 219, 0.55), transparent 58%),
    linear-gradient(135deg, #effbf8 0%, #edf5ff 44%, #fff4e5 100%);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.desktop-stage {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  padding: 0;
}

.app-window {
  width: 100vw;
  max-width: none;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--panel);
  backdrop-filter: blur(28px);
}

.shell {
  display: grid;
  height: 100vh;
  grid-template-columns: 96px minmax(0, 1fr);
}

.sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 20px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.28);
}

.brand,
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  justify-content: center;
  width: 100%;
  flex: 0 0 auto;
}

.brand-copy {
  display: none;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, var(--teal), var(--sky));
  box-shadow: 0 16px 32px rgba(18, 165, 148, 0.22);
  font-weight: 800;
}

.brand-title {
  font-weight: 800;
}

.brand-subtitle,
.login-brand p,
.page-head p,
.muted {
  color: var(--muted);
}

.nav {
  display: flex;
  width: 100%;
  flex: 1 1 auto;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
}

.nav-item,
.logout button {
  display: flex;
  width: 68px;
  min-width: 68px;
  height: 72px;
  min-height: 72px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 8px 6px;
  color: #435167;
  background: rgba(255, 255, 255, 0.34);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.nav-item:hover,
.nav-item.active,
.logout button:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 16px 32px rgba(54, 74, 111, 0.1);
}

.nav-item.active {
  color: var(--teal-dark);
  border-color: rgba(18, 165, 148, 0.22);
}

.nav-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, rgba(18, 165, 148, 0.92), rgba(59, 130, 246, 0.9));
}

.nav-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-text {
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.logout {
  display: flex;
  width: 100%;
  flex: 0 0 auto;
  justify-content: center;
  margin: 0;
}

.logout button {
  cursor: pointer;
}

.content {
  min-width: 0;
  overflow: auto;
  padding: 30px;
}

.content::-webkit-scrollbar,
.log-box::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.content::-webkit-scrollbar-thumb,
.log-box::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(58, 83, 112, 0.2);
  background-clip: padding-box;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.page-head h1 {
  margin: 0 0 7px;
  font-size: 30px;
  line-height: 1.1;
}

.page-head p {
  margin: 0;
}

.with-actions {
  align-items: center;
}

.hero-panel {
  min-height: 340px;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 34px;
  border-radius: 28px;
  color: #183244;
  background:
    linear-gradient(135deg, rgba(18, 165, 148, 0.22), rgba(255, 255, 255, 0.74) 45%, rgba(242, 169, 59, 0.23)),
    rgba(255, 255, 255, 0.64);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

.hero-panel h2 {
  margin: 0;
  font-size: 24px;
}

.hero-panel p {
  max-width: 580px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 20px;
}

.stat-grid {
  display: grid;
  gap: 16px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(320px, 5fr);
  gap: 20px;
  align-items: start;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(340px, 5fr);
  gap: 20px;
  align-items: start;
}

.cookie-capture-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(340px, 5fr);
  gap: 20px;
  align-items: start;
}

.cookie-capture-grid > .wide-panel {
  grid-column: 1 / -1;
}

/* ---- 绑定指南面板（左侧） ---- */
.capture-guide-panel {
  padding: 6px 0 0;
}

.capture-intro {
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted, #647084);
  padding: 0 20px 4px;
  margin: 0;
}

.capture-intro p {
  margin: 0;
}

/* 步骤列表 */
.capture-steps {
  list-style: none;
  counter-reset: step;
  margin: 16px 0;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.capture-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line, rgba(42, 55, 82, 0.08));
  border-radius: var(--radius-control, 10px);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink, #162033);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

.capture-step:hover {
  border-color: var(--teal-light, #b3e5e0);
  box-shadow: 0 4px 12px rgba(18, 165, 148, 0.08);
  transform: translateY(-1px);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488, #12a594);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

/* 书签按钮区域 */
.capture-bookmark-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  margin: 4px 20px 0;
  background: linear-gradient(135deg, rgba(18, 165, 148, 0.05), rgba(18, 165, 148, 0.1));
  border: 1px dashed var(--teal-light, #b3e5e0);
  border-radius: var(--radius-card, 26px);
}

.capture-bookmark-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: var(--radius-control, 10px);
  box-shadow: 0 4px 14px rgba(18, 165, 148, 0.25);
  cursor: grab;
  transition: transform 120ms ease, box-shadow 160ms ease;
}

.capture-bookmark-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(18, 165, 148, 0.35);
}

.capture-bookmark-btn:active {
  cursor: grabbing;
  transform: translateY(0);
}

.capture-bookmark-btn svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.capture-bookmark-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted, #647084);
}

/* 底部提示 */
.capture-fallback-hint {
  font-size: 13px;
  color: var(--muted, #647084);
  padding: 16px 20px 4px;
  margin: 0;
  line-height: 1.6;
}

/* ---- Cookie 输入面板（右侧） ---- */
.capture-input-panel {
  padding: 6px 0 0;
}

/* 状态指示条 */
.capture-status-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 20px 12px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--line, rgba(42, 55, 82, 0.08));
  border-radius: var(--radius-control, 10px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  font-size: 13px;
}

.capture-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.capture-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted, #647084);
}

.capture-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--teal-dark, #08766f);
  line-height: 1.2;
}

.capture-stat .status {
  font-size: 13px;
  font-weight: 500;
}

.capture-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--line-strong, rgba(42, 55, 82, 0.1));
  margin: 0 12px;
  flex-shrink: 0;
}

/* textarea */
.capture-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 20px 12px;
  max-width: calc(100% - 40px);
  padding: 12px 14px;
  border: 1px solid var(--line-strong, rgba(42, 55, 82, 0.1));
  border-radius: var(--radius-control, 10px);
  background: #fff;
  font-size: 13px;
  font-family: "Consolas", "Courier New", monospace;
  line-height: 1.6;
  color: var(--ink, #162033);
  resize: vertical;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.capture-textarea:focus {
  outline: none;
  border-color: var(--teal, #12a594);
  box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.12);
}

.capture-textarea::placeholder {
  color: #a0aec0;
}

/* 操作按钮行 */
.capture-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  flex-wrap: wrap;
}

.capture-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--line-strong, rgba(42, 55, 82, 0.1));
  border-radius: var(--radius-control, 10px);
  background: #fff;
  color: var(--ink, #162033);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.capture-action-btn:hover {
  background: var(--soft, #eef6f7);
  border-color: var(--teal-light, #b3e5e0);
}

.capture-action-btn svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.capture-save-form {
  margin-left: auto;
}

.capture-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
}

.capture-save-btn svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.side-stack {
  display: grid;
  gap: 20px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--panel-strong);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}

.list-panel {
  width: 100%;
}

.panel.interactive {
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.panel.interactive:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 52px rgba(54, 74, 111, 0.14);
}

.panel-body {
  padding: 14px 20px 18px;
}

.panel-body.interactive-link {
  display: block;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 14px;
  color: var(--teal-dark, #0f766e);
  text-decoration: none;
  border-top: 1px solid rgba(42, 55, 82, 0.08);
  transition: background 160ms ease, color 160ms ease;
}

.panel-body.interactive-link:hover {
  background: rgba(18, 165, 148, 0.04);
  color: var(--teal, #12a594);
}

.panel-body.interactive-link .arrow {
  margin-left: 4px;
  transition: margin-left 160ms ease;
}

.panel-body.interactive-link:hover .arrow {
  margin-left: 8px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(42, 55, 82, 0.08);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-vessel {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  color: var(--teal-dark);
  background: linear-gradient(145deg, rgba(18, 165, 148, 0.14), rgba(59, 130, 246, 0.12));
  font-weight: 800;
}

.icon-vessel svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-vessel i {
  font-size: 18px;
}

.icon-control {
  color: #2563eb;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.16), rgba(18, 165, 148, 0.12));
}

.icon-login {
  color: #0f766e;
  background: linear-gradient(145deg, rgba(20, 184, 166, 0.18), rgba(255, 255, 255, 0.64));
}

.icon-cookie {
  color: #8a5a00;
  background: linear-gradient(145deg, rgba(242, 169, 59, 0.2), rgba(255, 255, 255, 0.62));
}

.icon-capture {
  color: #2563eb;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.16), rgba(255, 255, 255, 0.64));
}

.icon-receive {
  color: #0f766e;
  background: linear-gradient(145deg, rgba(20, 184, 166, 0.18), rgba(255, 255, 255, 0.64));
}

.icon-paste {
  color: #b7791f;
  background: linear-gradient(145deg, rgba(242, 169, 59, 0.2), rgba(255, 255, 255, 0.64));
}

.icon-list {
  color: #4f46e5;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.16), rgba(255, 255, 255, 0.62));
}

.icon-create {
  color: #08766f;
  background: linear-gradient(145deg, rgba(18, 165, 148, 0.18), rgba(255, 255, 255, 0.62));
}

.icon-config {
  color: #2563eb;
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.16), rgba(255, 255, 255, 0.62));
}

.icon-doorman {
  color: #0f766e;
  background: linear-gradient(145deg, rgba(20, 184, 166, 0.18), rgba(255, 255, 255, 0.64));
}

.icon-announcement {
  color: #b7791f;
  background: linear-gradient(145deg, rgba(242, 169, 59, 0.22), rgba(255, 255, 255, 0.64));
}

.icon-song {
  color: #5b5bd6;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.18), rgba(59, 130, 246, 0.1));
}

.icon-checkin {
  color: #16835f;
  background: linear-gradient(145deg, rgba(34, 197, 94, 0.18), rgba(255, 255, 255, 0.64));
}

.icon-gift {
  color: #d53f68;
  background: linear-gradient(145deg, rgba(232, 93, 117, 0.2), rgba(255, 255, 255, 0.64));
}

.icon-status {
  color: #0f766e;
  background: linear-gradient(145deg, rgba(20, 184, 166, 0.16), rgba(255, 255, 255, 0.64));
}

.icon-log {
  color: #7c3aed;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.16), rgba(255, 255, 255, 0.64));
}

.icon-delete {
  color: #c43b4d;
  background: linear-gradient(145deg, rgba(196, 59, 77, 0.18), rgba(255, 255, 255, 0.64));
}

.panel-head h2,
.module-config h3 {
  margin: 0;
}

.panel-head h2 {
  font-size: 18px;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.form-panel {
  display: grid;
  gap: 16px;
  padding-bottom: 20px;
}

.cookie-panel {
  margin-bottom: 20px;
}

.cookie-actions,
.capture-help,
.bookmarklet-row,
.cookie-save-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
}

.capture-help {
  display: grid;
  align-items: initial;
  color: var(--muted);
  line-height: 1.7;
}

.capture-help p {
  margin: 0;
}

.default-cookie-form {
  display: grid;
  gap: 14px;
  padding-bottom: 20px;
}

label,
.field-group {
  display: grid;
  gap: 8px;
  padding: 0 20px;
}

label > span,
.field-group > span {
  color: #3c4a5e;
  font-size: 13px;
  font-weight: 800;
}

.field-hint {
  margin: -4px 20px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(42, 55, 82, 0.13);
  border-radius: var(--radius-control);
  padding: 11px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  outline: none;
  transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:focus,
textarea:focus {
  border-color: rgba(18, 165, 148, 0.58);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(18, 165, 148, 0.14);
}

textarea {
  resize: vertical;
}

.code-text,
#post-url,
#bookmarklet-code,
#copy-script,
#captured-cookie {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.module-stack {
  display: grid;
  gap: 12px;
  margin: 0 20px;
}

.module-config {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.46);
  transition: background 180ms ease, border 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.module-config:hover {
  transform: translateY(-2px);
  border-color: rgba(18, 165, 148, 0.22);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 34px rgba(54, 74, 111, 0.1);
}

.module-config summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.module-config.module-disabled {
  background: rgba(255, 255, 255, 0.34);
}

.module-config.module-disabled .module-body {
  opacity: 0.56;
}

.module-config summary::-webkit-details-marker {
  display: none;
}

.module-summary-text {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  gap: 4px;
}

.module-summary-text strong {
  font-size: 17px;
}

.module-summary-text small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.module-chevron {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-right: 2px solid rgba(67, 81, 103, 0.76);
  border-bottom: 2px solid rgba(67, 81, 103, 0.76);
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.module-config[open] .module-chevron {
  transform: rotate(-135deg);
}

.module-body {
  display: grid;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 0 0 18px;
  border: 0;
  border-top: 1px solid rgba(42, 55, 82, 0.08);
}

.module-config label {
  padding: 0 18px;
}

.module-body label:first-child {
  padding-top: 18px;
}

.nickname-collapse {
  gap: 12px;
  padding: 0 18px;
}

.nickname-collapse > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.nickname-collapse > summary::-webkit-details-marker {
  display: none;
}

.nickname-collapse > summary > span:first-child {
  color: #3c4a5e;
  font-size: 13px;
  font-weight: 800;
}

.nickname-collapse > summary > small {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.module-config[open] .nickname-collapse > summary .module-chevron,
.nickname-collapse > summary .module-chevron {
  margin-left: auto;
  transform: rotate(45deg);
}

.module-config[open] .nickname-collapse[open] > summary .module-chevron,
.nickname-collapse[open] > summary .module-chevron {
  transform: rotate(-135deg);
}

.copy-field {
  padding: 0 18px;
}

.copy-editor {
  display: grid;
  gap: 10px;
}

.copy-hidden {
  display: none;
}

.copy-list {
  display: grid;
  gap: 10px;
}

.copy-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
  transition: background 160ms ease, border 160ms ease, transform 160ms ease;
}

.copy-item:hover {
  transform: translateY(-1px);
  border-color: rgba(18, 165, 148, 0.22);
  background: rgba(255, 255, 255, 0.82);
}

.copy-item textarea {
  min-height: 46px;
  resize: vertical;
}

.copy-actions {
  display: flex;
  justify-content: flex-start;
}

/* ===== 公告编辑器（支持每条公告独立间隔） ===== */
.announcement-editor {
  display: grid;
  gap: 10px;
}

.announcement-hidden {
  display: none;
}

.announcement-list {
  display: grid;
  gap: 10px;
}

.announcement-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
  transition: background 160ms ease, border 160ms ease, transform 160ms ease;
}

.announcement-item:hover {
  transform: translateY(-1px);
  border-color: rgba(18, 165, 148, 0.22);
  background: rgba(255, 255, 255, 0.82);
}

.announcement-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.announcement-item-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text, #1e293b);
  min-width: 60px;
}

.announcement-interval-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 13px;
  color: var(--muted, #64748b);
}

.announcement-interval-label span {
  white-space: nowrap;
}

.announcement-interval-label input[type="number"] {
  width: 70px;
  padding: 4px 8px;
  font-size: 13px;
  text-align: center;
}

.announcement-item textarea {
  min-height: 46px;
  resize: vertical;
}

.announcement-actions {
  display: flex;
  justify-content: flex-start;
}

/* ===== 心愿编辑器（礼物心愿配置） ===== */
.wishlist-editor {
  display: grid;
  gap: 10px;
}

.wishlist-hidden {
  display: none;
}

.wishlist-list {
  display: grid;
  gap: 10px;
}

.wishlist-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
  transition: background 160ms ease, border 160ms ease, transform 160ms ease;
}

.wishlist-item:hover {
  transform: translateY(-1px);
  border-color: rgba(18, 165, 148, 0.22);
  background: rgba(255, 255, 255, 0.82);
}

.wishlist-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wishlist-item-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text, #1e293b);
  min-width: 60px;
}

.wishlist-item-fields {
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
}

.wishlist-item-fields label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wishlist-item-fields label span {
  font-size: 13px;
  color: var(--muted, #64748b);
}

.wishlist-item-fields input {
  padding: 6px 10px;
  font-size: 14px;
}

.wishlist-actions {
  display: flex;
  justify-content: flex-start;
}

/* ===== 可搜索礼物下拉框 ===== */
.gift-search-select {
  position: relative;
  width: 100%;
}

.gift-search-input {
  width: 100%;
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  background: #fff;
  cursor: text;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.gift-search-input:focus {
  outline: none;
  border-color: var(--accent, #12a594);
  box-shadow: 0 0 0 2px rgba(18, 165, 148, 0.15);
}

.gift-search-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-top: none;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.gift-search-dropdown.active {
  display: block;
}

.gift-search-option {
  padding: 8px 10px;
  font-size: 14px;
  cursor: pointer;
  transition: background 120ms ease;
}

.gift-search-option:hover,
.gift-search-option.highlighted {
  background: rgba(18, 165, 148, 0.08);
}

.gift-search-option.selected {
  background: rgba(18, 165, 148, 0.15);
  font-weight: 500;
}

.gift-search-no-result {
  padding: 10px;
  font-size: 13px;
  color: var(--muted, #64748b);
  text-align: center;
}

.checks {
  display: grid;
  gap: 10px;
}

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

.check-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: background 160ms ease, border 160ms ease, transform 160ms ease;
}

.check-line:hover {
  transform: translateY(-1px);
  border-color: rgba(18, 165, 148, 0.22);
  background: rgba(255, 255, 255, 0.82);
}

.check-line input[type="checkbox"] {
  appearance: none;
  width: 48px;
  height: 28px;
  flex: 0 0 48px;
  border: 1px solid rgba(67, 81, 103, 0.12);
  border-radius: 999px;
  background:
    radial-gradient(circle at 13px 50%, #fff 0 8px, transparent 8.5px),
    linear-gradient(145deg, rgba(151, 164, 183, 0.42), rgba(213, 221, 232, 0.86));
  box-shadow: inset 0 1px 3px rgba(54, 74, 111, 0.12), 0 5px 12px rgba(54, 74, 111, 0.08);
  cursor: pointer;
  outline: none;
  transition: background 180ms ease, border 180ms ease, box-shadow 180ms ease;
}

.check-line input[type="checkbox"]:checked {
  border-color: rgba(18, 165, 148, 0.4);
  background:
    radial-gradient(circle at calc(100% - 13px) 50%, #fff 0 8px, transparent 8.5px),
    linear-gradient(145deg, var(--teal), var(--sky));
  box-shadow: inset 0 1px 3px rgba(9, 92, 84, 0.16), 0 8px 18px rgba(18, 165, 148, 0.18);
}

.check-line input[type="checkbox"]:focus-visible {
  box-shadow: 0 0 0 4px rgba(18, 165, 148, 0.16);
}

.check-line span {
  order: -1;
  font-weight: 650;
  line-height: 1.35;
}

.module-toggle {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 4px 8px;
}

.module-toggle span {
  font-size: 12px;
  white-space: nowrap;
}

.module-toggle input[type="checkbox"] {
  width: 42px;
  height: 24px;
  flex-basis: 42px;
  background:
    radial-gradient(circle at 11px 50%, #fff 0 7px, transparent 7.5px),
    linear-gradient(145deg, rgba(151, 164, 183, 0.42), rgba(213, 221, 232, 0.86));
}

.module-toggle input[type="checkbox"]:checked {
  background:
    radial-gradient(circle at calc(100% - 11px) 50%, #fff 0 7px, transparent 7.5px),
    linear-gradient(145deg, var(--teal), var(--sky));
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 0 20px;
}

.page-head .action-row {
  padding: 0;
}

/* 基本设置保存按钮增强样式 */
.config-save-row {
  padding: 8px 20px 20px;
  margin-top: 4px;
}

.config-save-row .primary {
  flex: 1;
  min-height: 46px;
  padding: 12px 24px;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), #0cb89e);
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
  box-shadow: 0 6px 20px rgba(18, 165, 148, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.02em;
}

.config-save-row .primary:hover {
  background: linear-gradient(135deg, var(--teal-dark), #0e8a7a);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(18, 165, 148, 0.38);
}

.config-save-row .primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(18, 165, 148, 0.3);
}

.row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

button,
.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(42, 55, 82, 0.13);
  border-radius: 12px;
  padding: 9px 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  cursor: pointer;
  font-weight: 750;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  user-select: none;
}

.sidebar .logout button {
  display: flex;
  width: 68px;
  min-width: 68px;
  height: 72px;
  min-height: 72px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 6px;
  border-radius: 18px;
}

button:hover,
.button:hover {
  transform: scale(1.03);
  background: #fff;
  box-shadow: 0 12px 24px rgba(54, 74, 111, 0.1);
}

button:active,
.button:active {
  transform: scale(0.98);
}

.primary {
  border-color: rgba(18, 165, 148, 0.28);
  color: #fff;
  background: linear-gradient(145deg, var(--teal), var(--sky));
  box-shadow: 0 14px 30px rgba(18, 165, 148, 0.18);
}

.primary:hover {
  background: linear-gradient(145deg, #0d9889, #3277ed);
}

.danger {
  border-color: rgba(196, 59, 77, 0.28);
  color: #fff;
  background: linear-gradient(145deg, var(--danger), #de6b7b);
}

.wide {
  width: 100%;
}

.small {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 10px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(42, 55, 82, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.icon-btn:hover {
  transform: scale(1.08);
  background: #fff;
  color: var(--teal);
  box-shadow: 0 8px 20px rgba(54, 74, 111, 0.1);
}

.icon-btn:active {
  transform: scale(0.95);
}

.icon-btn.primary {
  border-color: rgba(18, 165, 148, 0.28);
  color: #fff;
  background: linear-gradient(145deg, var(--teal), var(--sky));
  box-shadow: 0 14px 30px rgba(18, 165, 148, 0.18);
}

.icon-btn.primary:hover {
  color: #fff;
  background: linear-gradient(145deg, #0d9889, #3277ed);
}

.icon-btn.danger {
  border-color: rgba(196, 59, 77, 0.28);
  color: #fff;
  background: linear-gradient(145deg, var(--danger), #de6b7b);
}

.icon-btn.danger:hover {
  color: #fff;
  background: linear-gradient(145deg, #b83244, #d65e70);
}

.icon-btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(42, 55, 82, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.icon-btn-sm:hover {
  transform: scale(1.08);
  background: #fff;
  color: var(--teal);
  box-shadow: 0 8px 20px rgba(54, 74, 111, 0.1);
}

.icon-btn-sm:active {
  transform: scale(0.95);
}

.icon-btn-sm.danger {
  border-color: rgba(196, 59, 77, 0.28);
  color: var(--danger);
}

.icon-btn-sm.danger:hover {
  color: #fff;
  background: linear-gradient(145deg, var(--danger), #de6b7b);
}

.modal {
  width: min(560px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  padding: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 25px 80px rgba(54, 74, 111, 0.18), 0 8px 32px rgba(54, 74, 111, 0.12);
  backdrop-filter: blur(28px) saturate(180%);
}

.modal::backdrop {
  background: rgba(22, 32, 51, 0.28);
  backdrop-filter: blur(8px);
}

.modal-shell {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* 创建实例弹窗：内容过多时允许滚动，确保提交按钮可见 */
#create-robot-dialog .modal-shell {
  max-height: min(700px, calc(100vh - 80px));
  overflow-y: auto;
}

/* 可用功能管理弹窗：内容过多时允许滚动 */
#allowed-features-dialog .modal-shell {
  max-height: min(600px, calc(100vh - 80px));
  overflow-y: auto;
}

/* 批量设置可用功能弹窗：内容过多时允许滚动 */
#batch-allowed-dialog .modal-shell {
  max-height: min(600px, calc(100vh - 80px));
  overflow-y: auto;
}

.modal-shell .panel-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(20px);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(42, 55, 82, 0.08);
  text-align: left;
  vertical-align: middle;
}

th {
  color: #546175;
  font-size: 13px;
  font-weight: 800;
}

tr {
  transition: background 160ms ease;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.5);
}

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

.right {
  text-align: right;
}

.empty {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.status {
  display: inline-flex;
  min-width: 78px;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: #465568;
  background: rgba(226, 232, 240, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.status.running,
.status.starting {
  color: #075342;
  background: #c9fbef;
}

.status.stopping {
  color: #744210;
  background: #fff0c6;
}

.status.error {
  color: #7f1d1d;
  background: #ffe0e5;
}

.meta {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 13px;
  margin: 0;
  padding: 20px;
}

.meta dt {
  color: var(--muted);
}

.meta dd {
  margin: 0;
  word-break: break-word;
}

.log-box {
  display: grid;
  max-height: 430px;
  overflow: auto;
  padding: 16px 20px;
  gap: 10px;
  font-size: 13px;
}

.log-line {
  display: grid;
  gap: 4px;
  border-left: 3px solid rgba(18, 165, 148, 0.35);
  padding-left: 12px;
  line-height: 1.5;
  word-break: break-word;
}

.log-line.warning {
  border-left-color: var(--warning);
}

.log-line.error {
  border-left-color: var(--danger);
}

.log-line time {
  color: var(--muted);
  font-size: 12px;
}

.log-scroll-btns {
  display: flex;
  gap: 8px;
  padding: 8px 20px;
  border-top: 1px solid var(--border);
}

.log-scroll-btns button {
  flex: 1;
  padding: 6px 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.log-scroll-btns button:hover {
  background: var(--hover);
  border-color: var(--accent);
}

.danger-zone {
  padding-bottom: 20px;
}

.login-body {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-window {
  width: min(920px, 100%);
  min-height: 560px;
  display: grid;
  grid-template-columns: 1fr 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-shell);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px);
}

.login-visual {
  display: grid;
  align-content: end;
  gap: 18px;
  padding: 42px;
  background:
    linear-gradient(145deg, rgba(18, 165, 148, 0.32), rgba(255, 255, 255, 0.62) 46%, rgba(232, 93, 117, 0.22)),
    rgba(255, 255, 255, 0.24);
}

.login-visual h1 {
  max-width: 420px;
  margin: 0;
  font-size: 34px;
  line-height: 1.15;
}

.login-visual p {
  max-width: 440px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.login-panel {
  display: grid;
  align-content: center;
  gap: 24px;
  padding: 36px;
  background: rgba(255, 255, 255, 0.56);
}

.login-brand h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.login-brand p {
  margin: 0;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  padding: 0;
}

.login-form .remember-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted, #647084);
  cursor: pointer;
  user-select: none;
}

.login-form .remember-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--teal, #12a594);
  cursor: pointer;
}

@media (max-width: 980px) {
  .desktop-stage {
    display: block;
    padding: 0;
    overflow: visible;
  }

  .app-window {
    width: 100%;
    min-height: 100vh;
    height: auto;
    border-radius: 0;
    overflow: visible;
  }

  .shell {
    min-height: 100vh;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
  }

  .brand-copy {
    display: block;
  }

  .nav {
    width: auto;
    flex: 1 1 auto;
    flex-direction: row;
    justify-content: center;
  }

  .nav-item,
  .sidebar .logout button {
    width: 58px;
    min-width: 58px;
    height: 54px;
    min-height: 54px;
  }

  .content {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
  }

  .dashboard-grid,
  .two-column,
  .detail-grid,
  .cookie-capture-grid,
  .login-window {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 240px;
  }
}

@media (max-width: 640px) {
  .content {
    padding: 18px;
  }

  .page-head,
  .with-actions,
  .cookie-actions,
  .bookmarklet-row {
    align-items: stretch;
    flex-direction: column;
  }

  .page-head h1 {
    font-size: 25px;
  }

  .checks.two {
    grid-template-columns: 1fr;
  }

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

  .login-body {
    padding: 0;
  }

  .login-window {
    min-height: 100vh;
    border-radius: 0;
  }

  .login-panel,
  .login-visual {
    padding: 24px;
  }
}

/* ========== 登录 Tabs ========== */
.login-tabs {
  display: flex;
  gap: 0;
  border: 1px solid rgba(42, 55, 82, 0.13);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
}

.login-tab {
  flex: 1;
  min-height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 750;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.login-tab.active {
  color: #fff;
  background: linear-gradient(145deg, var(--teal), var(--sky));
}

.login-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.6);
}

/* ========== 角色标识 ========== */
.role-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.role-badge.super_admin {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.14);
}

.role-badge.admin {
  color: var(--sky);
  background: rgba(59, 130, 246, 0.14);
}

.role-badge.user {
  color: var(--teal-dark);
  background: rgba(18, 165, 148, 0.14);
}

.role-badge.team_admin {
  color: #d97706;
  background: rgba(217, 119, 6, 0.14);
}

.role-badge.channel_admin {
  color: #0d9488;
  background: rgba(13, 148, 136, 0.14);
}

/* ========== 实例标签（用户列表表格） ========== */
.instances-cell {
  max-width: 200px;
}

.instance-tag {
  display: inline-block;
  padding: 2px 8px;
  margin: 1px 2px;
  border-radius: 6px;
  font-size: 12px;
  background: rgba(18, 165, 148, 0.10);
  color: var(--teal-dark);
  white-space: nowrap;
}

/* ========== 用户徽章（侧边栏） ========== */
.nav-footer {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.user-badge {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.34);
}

.user-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, var(--teal), var(--sky));
  font-weight: 800;
  font-size: 15px;
}

.user-info {
  display: none;
}

.user-name {
  font-weight: 750;
  font-size: 13px;
  line-height: 1.3;
}

.user-role {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
}

/* ========== 我的页面 ========== */

/* 数据看板面板 */
.dashboard-panel {
  grid-column: 1 / -1;
}

.dashboard-panel .panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.dashboard-status {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* 看板折叠切换按钮 */
.dashboard-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(42, 55, 82, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}
.dashboard-toggle-btn:hover {
  transform: scale(1.08);
  background: #fff;
  color: var(--teal);
  box-shadow: 0 8px 20px rgba(54, 74, 111, 0.1);
}
.dashboard-toggle-btn:active {
  transform: scale(0.95);
}
.dashboard-toggle-btn .chevron-icon {
  display: inline-block;
  transition: transform 200ms ease;
}
.dashboard-toggle-btn.collapsed .chevron-icon {
  transform: rotate(-90deg);
}

/* 看板内容容器 */
.dashboard-body {
  padding: 16px 20px 20px;
  overflow: hidden;
  transition: max-height 300ms ease, opacity 200ms ease, padding 200ms ease;
  max-height: 10000px;
  opacity: 1;
}
.dashboard-body.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  overflow: hidden;
}

/* ===== 今日概览指标卡 ===== */
.dash-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.dash-metric-card {
  background: linear-gradient(135deg, rgba(32, 194, 192, 0.06), rgba(32, 194, 192, 0.02));
  border: 1px solid rgba(32, 194, 192, 0.1);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

.dash-metric-card:hover {
  border-color: rgba(32, 194, 192, 0.3);
  transform: translateY(-1px);
}

.metric-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.2;
  margin-bottom: 4px;
}

.metric-change {
  font-size: 11px;
  font-weight: 600;
}

.metric-change.up {
  color: var(--success);
}

.metric-change.down {
  color: var(--danger);
}

.metric-sub {
  font-size: 11px;
  color: var(--muted);
}

.dash-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: -6px 0 20px;
}

.dash-detail-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.dash-detail-item span {
  color: var(--muted);
  font-size: 12px;
}

.dash-detail-item strong {
  color: var(--fg);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

/* ===== 7日趋势图 ===== */
.dash-section {
  margin-bottom: 16px;
}

.dash-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.dash-trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 0;
  min-height: 160px;
  overflow-x: auto;
}

.trend-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 52px;
  flex-shrink: 0;
}

.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 120px;
}

.trend-bar {
  width: 18px;
  border-radius: 3px 3px 0 0;
  position: relative;
  transition: height 0.3s ease;
  min-height: 2px;
}

.trend-bar.fans-bar {
  background: linear-gradient(to top, rgba(32, 194, 192, 0.5), rgba(32, 194, 192, 0.8));
}

.trend-bar.heat-bar {
  background: linear-gradient(to top, rgba(255, 165, 0, 0.4), rgba(255, 165, 0, 0.7));
}

.trend-bar-label {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: var(--muted);
  white-space: nowrap;
}

.trend-date {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
}

/* ===== 图表化数据看板 ===== */
.dash-chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.dash-chart-main {
  grid-column: 1 / -1;
}

.dash-chart-panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.54));
  padding: 12px;
}

.dash-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.dash-chart-head h3 {
  margin: 0 0 3px;
  color: var(--fg);
  font-size: 13px;
  line-height: 1.25;
}

.dash-chart-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.dash-month-picker {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.month-picker-select {
  appearance: auto;
  background: var(--surface, #f8f9fa);
  border: 1px solid var(--border, #dee2e6);
  border-radius: 4px;
  padding: 2px 4px;
  font-size: 12px;
  color: var(--fg, #212529);
  cursor: pointer;
  min-width: 60px;
}
.month-picker-select:focus {
  outline: none;
  border-color: var(--primary, #228be6);
}
.month-picker-sep {
  font-size: 12px;
  color: var(--muted, #868e96);
  margin: 0 0 0 2px;
}
#btn-month-prev,
#btn-month-next {
  min-width: 26px;
  height: 24px;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#btn-month-prev:disabled,
#btn-month-next:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.chart-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--muted, #868e96);
  font-size: 13px;
}

.dash-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}

.legend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(42, 55, 82, 0.10);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font: inherit;
  line-height: 1;
  padding: 5px 8px;
  cursor: pointer;
  transition: opacity 0.16s, border-color 0.16s, background 0.16s;
}

.legend-toggle.active {
  color: var(--fg);
  border-color: rgba(32, 194, 192, 0.24);
  background: rgba(255, 255, 255, 0.94);
}

.legend-toggle.muted {
  opacity: 0.42;
}

.legend-toggle:focus-visible {
  outline: 2px solid rgba(32, 194, 192, 0.38);
  outline-offset: 2px;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 4px;
  vertical-align: middle;
}

.legend-dot.fans {
  background: #20c2c0;
}

.legend-dot.heat {
  background: #f59f00;
}

.legend-dot.online {
  background: #4c6ef5;
}

.legend-dot.growth {
  background: #2f9e44;
}

.legend-dot.live {
  background: #7950f2;
}

.legend-dot.max-heat {
  background: #e8590c;
}

.legend-dot.gift {
  background: #d6336c;
}

.legend-dot.enter {
  background: #0c8599;
}

.legend-dot.danmu {
  background: #5c7cfa;
}

.legend-dot.hours {
  background: #868e96;
}

.dash-chart-canvas {
  position: relative;
  min-height: 170px;
  overflow: hidden;
}

.dash-chart-canvas.all-trends {
  min-height: 260px;
}

.dash-chart-canvas.compact {
  min-height: 170px;
}

.dash-chart-canvas svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 160px;
}

.dash-chart-canvas.all-trends svg {
  min-height: 250px;
}

.chart-grid-line {
  stroke: rgba(42, 55, 82, 0.08);
  stroke-width: 1;
}

.chart-zero-line {
  stroke: rgba(42, 55, 82, 0.24);
  stroke-width: 1.2;
}

.chart-line {
  fill: none;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line.fans {
  stroke: #20c2c0;
}

.chart-point.fans {
  stroke: #20c2c0;
  fill: #20c2c0;
}

.chart-line.heat {
  stroke: #f59f00;
}

.chart-point.heat {
  stroke: #f59f00;
  fill: #f59f00;
}

.chart-line.online {
  stroke: #4c6ef5;
}

.chart-point.online {
  stroke: #4c6ef5;
  fill: #4c6ef5;
}

.chart-line.growth,
.chart-point.growth {
  stroke: #2f9e44;
}

.chart-point.growth {
  fill: #2f9e44;
}

.chart-line.live,
.chart-point.live {
  stroke: #7950f2;
}

.chart-point.live {
  fill: #7950f2;
}

.chart-line.max-heat,
.chart-point.max-heat {
  stroke: #e8590c;
}

.chart-point.max-heat {
  fill: #e8590c;
}

.chart-line.gift,
.chart-point.gift {
  stroke: #d6336c;
}

.chart-point.gift {
  fill: #d6336c;
}

.chart-line.enter,
.chart-point.enter {
  stroke: #0c8599;
}

.chart-point.enter {
  fill: #0c8599;
}

.chart-line.danmu,
.chart-point.danmu {
  stroke: #5c7cfa;
}

.chart-point.danmu {
  fill: #5c7cfa;
}

/* ===== 入场/弹幕/礼物的平均和最高折线（与现有曲线样式一致） ===== */
.chart-line.enter-avg,
.chart-point.enter-avg {
  stroke: #0c8599;
}
.chart-point.enter-avg {
  fill: #0c8599;
}
.chart-line.enter-max,
.chart-point.enter-max {
  stroke: #0c8599;
}
.chart-point.enter-max {
  fill: #0c8599;
}

.chart-line.danmu-avg,
.chart-point.danmu-avg {
  stroke: #5c7cfa;
}
.chart-point.danmu-avg {
  fill: #5c7cfa;
}
.chart-line.danmu-max,
.chart-point.danmu-max {
  stroke: #5c7cfa;
}
.chart-point.danmu-max {
  fill: #5c7cfa;
}

.chart-line.gift-avg,
.chart-point.gift-avg {
  stroke: #d6336c;
}
.chart-point.gift-avg {
  fill: #d6336c;
}
.chart-line.gift-max,
.chart-point.gift-max {
  stroke: #d6336c;
}
.chart-point.gift-max {
  fill: #d6336c;
}

/* 图例圆点（与对应曲线同色） */
.legend-dot.enter-avg { background: #0c8599; }
.legend-dot.enter-max { background: #0c8599; }
.legend-dot.danmu-avg { background: #5c7cfa; }
.legend-dot.danmu-max { background: #5c7cfa; }
.legend-dot.gift-avg { background: #d6336c; }
.legend-dot.gift-max { background: #d6336c; }

.chart-point {
  stroke-width: 2;
  cursor: help;
}

.series-hidden {
  display: none;
}

.chart-bar {
  fill: rgba(32, 194, 192, 0.78);
  cursor: help;
}

.chart-bar.growth {
  fill: rgba(45, 190, 117, 0.78);
}

.chart-bar.negative {
  fill: rgba(224, 75, 93, 0.74);
}

.chart-axis-label {
  fill: var(--muted);
  font-size: 11px;
}

.dash-chart-empty {
  height: 100%;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
}

.dash-donut {
  position: relative;
  width: 104px;
  height: 104px;
  margin: 4px auto 10px;
}

.dash-donut-ring {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background:
    conic-gradient(#20c2c0 var(--live), rgba(42, 55, 82, 0.10) 0);
}

.dash-donut-ring::after {
  content: "";
  position: absolute;
  inset: 15px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.92);
}

.dash-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dash-donut-center strong {
  font-size: 21px;
  color: var(--fg);
  line-height: 1;
}

.dash-donut-center span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.dash-donut-stats {
  display: grid;
  gap: 8px;
}

.dash-donut-stats span,
.dash-hbar-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  cursor: help;
}

.dash-donut-stats span {
  grid-template-columns: minmax(0, 1fr) auto;
}

.dash-donut-stats strong,
.dash-hbar-row strong {
  color: var(--fg);
  font-size: 12px;
  text-align: right;
}

.dash-hbar-row + .dash-hbar-row {
  margin-top: 9px;
}

.dash-hbar-track {
  height: 9px;
  border-radius: 999px;
  background: rgba(42, 55, 82, 0.08);
  overflow: hidden;
}

.dash-hbar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #20c2c0, #4c6ef5);
}

/* ===== 流量趋势面积图 ===== */
.dash-chart-traffic {
  grid-column: 1 / -1;
}

.chart-area-fill {
  fill-opacity: 0.22;
}
.chart-area-fill.enter { fill: url(#grad-area-enter); }
.chart-area-fill.heat { fill: url(#grad-area-heat); }

.chart-area-line {
  fill: none;
  stroke-width: 2.5;
}
.chart-area-line.enter { stroke: #0c8599; }
.chart-area-line.heat { stroke: #f59f00; }

.chart-point-area {
  stroke-width: 2;
  cursor: help;
}
.chart-point-area.enter { fill: #0c8599; stroke: #0c8599; }
.chart-point-area.heat { fill: #f59f00; stroke: #f59f00; }

/* ===== 双轴收益图 ===== */
.chart-bar.revenue-bar {
  fill: rgba(214, 51, 108, 0.45);
  rx: 3;
}
.chart-line.revenue-line {
  fill: none;
  stroke: #d6336c;
  stroke-width: 2.5;
}
.chart-point.revenue-line {
  fill: #d6336c;
  stroke: #d6336c;
}

/* ===== 互动分组柱状图 ===== */
.chart-bar.interact-danmu {
  fill: rgba(92, 124, 250, 0.70);
}
.chart-bar.interact-enter {
  fill: rgba(12, 133, 153, 0.65);
}
.chart-group-label {
  fill: var(--muted);
  font-size: 9px;
  text-anchor: middle;
}

/* ===== 粉丝成长正负柱 ===== */
.chart-bar.fans-positive {
  fill: rgba(45, 190, 117, 0.75);
}
.chart-bar.fans-negative {
  fill: rgba(224, 75, 93, 0.70);
}

/* ===== 主播状态面板 ===== */
.dash-chart-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 10px 4px;
  align-items: center;
}
.dash-donut.compact {
  width: 80px;
  height: 80px;
  margin: 0 auto;
}
.dash-donut.compact .dash-donut-ring::after {
  inset: 12px;
}
.dash-donut.compact .dash-donut-center strong {
  font-size: 16px;
}
.dash-donut.compact .dash-donut-center span {
  font-size: 10px;
  margin-top: 3px;
}
.dash-sparkline {
  min-height: 80px;
}
.dash-sparkline svg {
  display: block;
  width: 100%;
  height: 80px;
}
.chart-sparkline-line {
  fill: none;
  stroke: #4c6ef5;
  stroke-width: 2;
}
.chart-sparkline-fill {
  fill: url(#grad-sparkline);
  fill-opacity: 0.15;
}
.chart-sparkline-point {
  fill: #4c6ef5;
  stroke: #fff;
  stroke-width: 1.5;
  cursor: help;
}

/* ===== 图例颜色（新图表） ===== */
.legend-dot.area-enter { background: #0c8599; }
.legend-dot.area-heat { background: #f59f00; }
.legend-dot.bar-danmu { background: #5c7cfa; }
.legend-dot.bar-enter { background: #0c8599; }
.legend-dot.bar-revenue-count { background: rgba(214, 51, 108, 0.7); }
.legend-dot.line-revenue { background: #d6336c; }

/* ===== 快照表格 ===== */
.dash-snapshot-table-wrap {
  overflow-x: auto;
}

.dash-snapshot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.dash-snapshot-table th {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.dash-snapshot-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-subtle, rgba(128, 128, 128, 0.1));
  color: var(--fg);
  white-space: nowrap;
}

.dash-snapshot-table tbody tr:hover {
  background: rgba(32, 194, 192, 0.03);
}

.dash-day-table th,
.dash-day-table td {
  text-align: right;
}

.dash-day-table th:first-child,
.dash-day-table td:first-child {
  text-align: left;
}

/* ===== 空状态 ===== */
.dash-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.dash-empty-icon {
  color: var(--muted);
  opacity: 0.3;
  margin-bottom: 16px;
}

.dash-empty-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 6px;
}

.dash-empty-hint {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}

.my-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.profile-panel .meta {
  grid-template-columns: 96px minmax(0, 1fr);
}

/* ========== 我的机器人卡片 ========== */
.instance-card {
  display: flex;
  gap: 20px;
  padding: 24px 20px;
  align-items: flex-start;
}

.card-icon-wrap {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(18, 165, 148, 0.10);
  color: var(--teal-dark);
}

.card-body {
  flex: 1;
  min-width: 0;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}

.card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.card-room {
  font-weight: 700;
  color: var(--ink-light);
}

.card-sep {
  color: rgba(42, 55, 82, 0.20);
  margin: 0 2px;
}

.card-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.82);
  color: #465568;
}

.state-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}

.state-running .state-dot,
.state-starting .state-dot {
  background: #0b9b6e;
}

.state-running,
.state-starting {
  color: #075342;
  background: #c9fbef;
}

.state-stopping {
  color: #744210;
  background: #fff0c6;
}

.state-stopping .state-dot {
  background: #d68a00;
}

.state-error {
  color: #7f1d1d;
  background: #ffe0e5;
}

.state-error .state-dot {
  background: #dc2626;
}

.card-features {
  color: var(--muted);
}

.card-quick-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(42, 55, 82, 0.14);
}

.card-start-btn.hidden,
.card-stop-btn.hidden {
  display: none;
}

.inline-form {
  display: inline;
  padding: 0;
  margin: 0;
}

.panel-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  padding: 20px;
  color: var(--muted);
  font-size: 14px;
}

/* ========== 个人信息 - 猫耳FM绑定行 ========== */
.binding-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.binding-meta-row + .binding-meta-row {
  margin-top: 6px;
}

.binding-inst-name {
  font-weight: 700;
  color: var(--ink);
  font-size: 13px;
}

.binding-link {
  font-size: 12px;
  color: var(--teal);
  text-decoration: none;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1.5px solid var(--teal);
  background: rgba(18, 165, 148, 0.07);
  box-shadow: 0 0 0 1px rgba(18, 165, 148, 0.12);
  transition: background 150ms, color 150ms, box-shadow 150ms;
  white-space: nowrap;
}

.binding-link:hover {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(18, 165, 148, 0.3);
}

/* ========== 分配标签 ========== */
.owner-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--teal-dark);
  background: rgba(18, 165, 148, 0.12);
}

/* ========== 下拉选择框 ========== */
select {
  font: inherit;
  border: 1px solid rgba(42, 55, 82, 0.13);
  border-radius: var(--radius-control);
  padding: 9px 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  outline: none;
  cursor: pointer;
  transition: border 160ms ease, box-shadow 160ms ease;
}

select:focus {
  border-color: rgba(18, 165, 148, 0.58);
  box-shadow: 0 0 0 4px rgba(18, 165, 148, 0.14);
}

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

.role-form {
  display: inline-flex;
  gap: 6px;
  padding: 0;
  align-items: center;
}

.form-footnote {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 0;
  padding: 0 20px;
}

.form-footnote a {
  color: var(--teal);
  font-weight: 700;
}

.form-footnote a:hover {
  text-decoration: underline;
}

/* ========== 响应式 ========== */
@media (max-width: 980px) {
  .my-grid {
    grid-template-columns: 1fr;
  }

  .dash-chart-grid {
    grid-template-columns: 1fr;
  }

  .user-badge {
    display: none !important;
  }
}

@media (max-width: 720px) {
  .dash-chart-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== 页面加载动画 ========== */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background:
    radial-gradient(1200px 760px at 13% 5%, rgba(133, 230, 212, 0.58), transparent 58%),
    radial-gradient(980px 720px at 88% 16%, rgba(255, 201, 219, 0.55), transparent 58%),
    linear-gradient(135deg, #effbf8 0%, #edf5ff 44%, #fff4e5 100%);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-spinner {
  width: 52px;
  height: 52px;
  border: 4px solid rgba(18, 165, 148, 0.15);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: loader-spin 0.8s linear infinite;
}

.loader-text {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  animation: loader-pulse 1.6s ease-in-out infinite;
}

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

@keyframes loader-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ========== Toast 通知（iOS 灵动岛风格） ========== */
.modal-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 100000;
  transform: translateX(-50%) translateY(-20px);
  display: inline-flex;
  align-items: center;
  max-width: min(480px, calc(100vw - 32px));
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 18px 42px rgba(54, 74, 111, 0.14),
    0 4px 12px rgba(54, 74, 111, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.75);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
  color: #1e2a3d;
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.32, 0.72, 0, 1), transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.modal-toast.toast-success {
  color: #075342;
  background: rgba(210, 255, 241, 0.94);
  border-color: rgba(18, 165, 148, 0.35);
  box-shadow:
    0 18px 42px rgba(18, 165, 148, 0.12),
    0 4px 12px rgba(54, 74, 111, 0.08);
}

.modal-toast.toast-error {
  color: #8b1c2b;
  background: rgba(255, 226, 232, 0.94);
  border-color: rgba(196, 59, 77, 0.35);
  box-shadow:
    0 18px 42px rgba(196, 59, 77, 0.12),
    0 4px 12px rgba(54, 74, 111, 0.08);
}

.modal-toast.toast-warning {
  color: #744210;
  background: rgba(255, 240, 198, 0.94);
  border-color: rgba(242, 169, 59, 0.35);
  box-shadow:
    0 18px 42px rgba(242, 169, 59, 0.12),
    0 4px 12px rgba(54, 74, 111, 0.08);
}

.modal-toast.toast-info {
  color: #1a4970;
  background: rgba(218, 241, 255, 0.94);
  border-color: rgba(62, 146, 204, 0.30);
  box-shadow:
    0 18px 42px rgba(62, 146, 204, 0.10),
    0 4px 12px rgba(54, 74, 111, 0.08);
}

/* ========== 模态框 body 滚动 ========== */
.modal-body {
  max-height: min(560px, calc(100vh - 200px));
  overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(58, 83, 112, 0.18);
  background-clip: padding-box;
}

/* ========== 确认对话框 Modal Confirm 按钮间距 ========== */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 20px 20px;
}

/* ========== 天数设置 分段控件 ========== */
.day-mode-fieldset {
  border: 1px solid var(--line, #e8e8e8);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0;
}

.day-mode-fieldset legend {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  padding: 0 6px;
  margin-bottom: 2px;
}

.day-mode-segments {
  display: inline-flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line, #d0d5dd);
  background: var(--shade, #f5f7fa);
}

.day-mode-segments input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.day-mode-segments label {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted, #6b7280);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  border-right: 1px solid var(--line, #d0d5dd);
  white-space: nowrap;
}

.day-mode-segments label:last-of-type {
  border-right: none;
}

.day-mode-segments input[type="radio"]:checked + label {
  background: var(--teal, #12a594);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.day-mode-segments input[type="radio"]:focus-visible + label {
  outline: 2px solid var(--teal, #12a594);
  outline-offset: -2px;
}

.day-mode-segments label:hover {
  background: var(--panel-strong, #eef1f5);
}

.day-mode-segments input[type="radio"]:checked + label:hover {
  background: var(--teal, #12a594);
}

.days-input {
  width: 80px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  padding: 8px 10px;
  border: 1px solid var(--line, #d0d5dd);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s;
}

.days-input:focus {
  border-color: var(--teal, #12a594);
  box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.12);
}

/* ========== 标签页 (Tabs) ========== */
.detail-tabs {
  width: 100%;
}

.tab-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  background: var(--panel-strong);
  border-radius: var(--radius-inner);
  border: 1px solid var(--line);
}

.tab {
  flex: 1;
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  text-align: center;
}

.tab:hover {
  color: var(--ink);
  background: rgba(18, 165, 148, 0.06);
}

.tab.active {
  color: #fff;
  background: var(--teal);
  box-shadow: 0 4px 12px rgba(18, 165, 148, 0.3);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(300px, 5fr);
  gap: 20px;
}

.control-panel {
  min-width: 0;
}

.control-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.control-actions form {
  margin: 0;
}

.control-actions .icon-btn {
  width: 48px;
  height: 48px;
  min-height: 48px;
  border-radius: 16px;
}

.control-meta {
  padding: 18px 20px 20px;
}

.control-meta a {
  color: var(--teal-dark);
  overflow-wrap: anywhere;
}

/* ---- 表格内功能图标行（实例列表） ---- */
.feature-icon-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.feature-icon-mini {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(18, 165, 148, 0.06);
  cursor: default;
  transition: background 160ms ease, transform 120ms ease;
}

.feature-icon-mini:hover {
  background: rgba(18, 165, 148, 0.14);
  transform: scale(1.15);
}

.feature-icon-mini svg {
  stroke: #0f766e;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-icon-mini[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  background: #162033;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

/* ---- 功能图标网格 ---- */
.feature-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 10px;
  padding: 16px 20px 20px;
}

.feature-icon-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px 10px;
  background: #fff;
  border: 1px solid var(--line-strong, rgba(42, 55, 82, 0.08));
  border-radius: var(--radius-control, 10px);
  cursor: default;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 120ms ease;
}

.feature-icon-item:hover {
  border-color: var(--teal-light, #b3e5e0);
  box-shadow: 0 4px 14px rgba(18, 165, 148, 0.12);
  transform: translateY(-2px);
}

.feature-icon-item svg {
  flex-shrink: 0;
  stroke: #0f766e;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 160ms ease;
}

.feature-icon-item:hover svg {
  stroke: var(--teal, #12a594);
}

.feature-icon-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted, #647084);
  text-align: center;
  line-height: 1.3;
  word-break: keep-all;
  transition: color 160ms ease;
}

.feature-icon-item:hover .feature-icon-label {
  color: var(--teal-dark, #0f766e);
}

/* 通过原生 title 属性 tooltip 增强 */
.feature-icon-item[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  background: #162033;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 运行状态双列布局 */
.tab-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.tab-status-grid .panel {
  margin: 0;
}

/* Cookie 字段控制 */
.cookie-field.hidden {
  display: none;
}

.config-save-row.hidden {
  display: none;
}

.cookie-capture {
  margin-bottom: 8px;
}

/* 危险操作面板在标签页内 */
#tab-danger .danger-zone {
  margin: 0;
}

/* 响应式: 小屏幕状态改为单列 */
@media (max-width: 700px) {
  .control-grid {
    grid-template-columns: 1fr;
  }
  .tab-status-grid {
    grid-template-columns: 1fr;
  }
  .tab {
    font-size: 13px;
    padding: 8px 12px;
  }
}

/* 实例配置表单容器 */
.instance-form-wrap {
  display: block;
}

.instance-form-wrap .tab-panel .panel {
  margin-bottom: 0;
}

/* Mobile layout fixes */
.dashboard-placeholder {
  margin-bottom: 20px;
}

.my-grid {
  margin-top: 0;
}

.profile-panel .meta {
  gap: 16px 18px;
}

.profile-panel .meta dt {
  padding-top: 2px;
}

.profile-panel .meta dd {
  line-height: 1.6;
}

@media (max-width: 980px) {
  html,
  body {
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .desktop-stage,
  .app-window {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .shell {
    /* 固定高度 100dvh，约束网格轨道，使 content 的 1fr 有界，强制内部滚动 */
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .sidebar {
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .brand {
    width: auto;
  }

  .nav {
    min-width: 0;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .nav-footer {
    width: auto;
  }

  .content {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
    min-height: 0;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  .dashboard-placeholder {
    margin-bottom: 18px;
  }

  /* 移动端：我的页面数据看板与个人信息之间间距 */
  .my-grid {
    margin-top: 0;
  }

  .dashboard-placeholder + .my-grid {
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .page-head {
    margin-bottom: 16px;
  }

  .dashboard-placeholder {
    margin-bottom: 16px;
  }

  .dashboard-placeholder .dashboard-body {
    min-height: 96px;
    padding: 16px;
    text-align: center;
  }

  .dashboard-hint {
    line-height: 1.6;
  }

  .my-grid {
    gap: 16px;
  }

  /* 确保数据看板与个人信息之间间距一致 */
  .dashboard-placeholder + .my-grid {
    margin-top: 0;
  }

  .profile-panel .meta {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px;
  }

  .profile-panel .meta dt {
    margin-top: 0;
    padding-top: 12px;
    font-size: 12px;
    font-weight: 800;
    border-top: 1px solid rgba(42, 55, 82, 0.06);
  }

  .profile-panel .meta dt:first-child {
    padding-top: 0;
    border-top: none;
  }

  .profile-panel .meta dd {
    line-height: 1.5;
    font-size: 14px;
  }

  .instance-card {
    gap: 14px;
    padding: 18px;
  }

  .card-top {
    align-items: flex-start;
  }

  /* 移动端表格优化：在小屏幕上更紧凑 */
  th,
  td {
    padding: 10px 12px;
    font-size: 13px;
  }

  .table-wrap {
    margin: 0 -4px;
  }

  /* 移动端标签页优化 */
  .tab-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    gap: 2px;
    padding: 3px;
  }

  .tab {
    white-space: nowrap;
    font-size: 13px;
    padding: 8px 12px;
  }

  /* 移动端按钮组优化 */
  .row-actions {
    gap: 4px;
  }

  /* 移动端搜索框自适应 */
  .page-head input[type="text"],
  .page-head input[type="search"] {
    width: 100% !important;
    max-width: 100%;
  }

  .page-head form[style*="display:flex"] {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .sidebar {
    align-items: flex-start;
    gap: 6px;
    padding: 8px 6px;
  }

  .brand-copy {
    display: none;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  .nav-item,
  .sidebar .logout button {
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 6px 4px;
    gap: 4px;
  }

  .nav-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
  }

  .nav-icon svg {
    width: 16px;
    height: 16px;
  }

  .nav-text {
    font-size: 10px;
  }

  .content {
    padding: 12px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .panel-head {
    padding: 14px 16px;
  }

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

  .instance-card {
    flex-direction: column;
    padding: 14px;
    gap: 10px;
  }

  .card-body {
    width: 100%;
  }

  .card-name {
    font-size: 16px;
  }

  /* 防止表格在小屏幕上内容溢出 */
  th,
  td {
    padding: 8px 10px;
    font-size: 12px;
    word-break: break-word;
  }

  .instance-tag {
    font-size: 11px;
    padding: 1px 6px;
  }

  .tab-status-grid {
    gap: 14px;
  }

  .modal {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 20px;
  }
}

/* ========== 截榜功能 ========== */
.rankdown-table th:last-child,
.rankdown-table td:last-child {
  text-align: center;
  width: 120px;
}

.rankdown-table button.small {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid rgba(42, 55, 82, 0.12);
  background: rgba(255, 255, 255, 0.66);
  cursor: pointer;
  transition: background 160ms ease, border 160ms ease;
}

.rankdown-table button.small:hover {
  background: rgba(18, 165, 148, 0.12);
  border-color: rgba(18, 165, 148, 0.32);
}

/* ========== 截榜详情弹窗 ========== */
.rankdown-detail-wrap {
  display: grid;
  gap: 12px;
}

.rankdown-summary {
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(18, 165, 148, 0.08);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
}

.rankdown-detail-table {
  width: 100%;
  border-collapse: collapse;
}

.rankdown-detail-table th,
.rankdown-detail-table td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(42, 55, 82, 0.08);
  text-align: left;
  vertical-align: middle;
}

.rankdown-detail-table th {
  color: #546175;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rankdown-detail-table .rank-cell {
  width: 64px;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
}

.rankdown-detail-table .user-cell {
  font-weight: 600;
  min-width: 80px;
}

.rankdown-detail-table .uid-cell {
  color: var(--muted);
  font-size: 12px;
  font-family: "SF Mono", "Cascadia Code", "Consolas", monospace;
}

.rankdown-detail-table .score-cell {
  text-align: right;
  font-weight: 700;
  color: var(--teal-dark);
  font-size: 15px;
  min-width: 60px;
}

.rankdown-detail-table .rank-top {
  background: linear-gradient(90deg, rgba(242, 169, 59, 0.10), transparent);
}

.rankdown-detail-table .rank-top .rank-cell {
  font-size: 18px;
}

.rankdown-detail-table tbody tr:last-child td {
  border-bottom: 0;
}

/* ========== 功能按钮面板（主控页新增） ========== */
.feature-app-panel {
  margin-top: 20px;
}

.feature-app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 14px;
  padding: 20px;
}

.feature-app-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 100px;
  padding: 16px 10px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease, border 180ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.feature-app-btn:hover {
  transform: translateY(-4px) scale(1.03);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 16px 34px rgba(54, 74, 111, 0.12);
  border-color: rgba(18, 165, 148, 0.22);
}

.feature-app-btn:active {
  transform: translateY(-1px) scale(0.97);
}

.feature-app-icon {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, rgba(18, 165, 148, 0.92), rgba(59, 130, 246, 0.9));
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.feature-app-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-app-btn:hover .feature-app-icon {
  transform: scale(1.08);
  box-shadow: 0 8px 20px rgba(18, 165, 148, 0.22);
}

.feature-app-name {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  word-break: keep-all;
}

/* 各功能图标配色 */
.icon-doorman { background: linear-gradient(145deg, #0f766e, #14b8a6); }
.icon-announcement { background: linear-gradient(145deg, #b7791f, #f2a93b); }
.icon-song { background: linear-gradient(145deg, #5b5bd6, #818cf8); }
.icon-checkin { background: linear-gradient(145deg, #16835f, #22c55e); }
.icon-gift { background: linear-gradient(145deg, #d53f68, #f472b6); }
.icon-roominfo { background: linear-gradient(145deg, #2563eb, #60a5fa); }
.icon-entertainment { background: linear-gradient(145deg, #9333ea, #a78bfa); }
.icon-games { background: linear-gradient(145deg, #ea580c, #fb923c); }
.icon-rankdown { background: linear-gradient(145deg, #0891b2, #22d3ee); }
.icon-custom_commands { background: linear-gradient(145deg, #7c3aed, #a78bfa); }

/* 功能禁用状态 */
.feature-app-btn.disabled {
  opacity: 0.45;
  filter: grayscale(0.85);
  cursor: pointer;
  pointer-events: auto;
}
.feature-app-btn.disabled:hover {
  transform: translateY(-2px) scale(1.02);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
  border-color: rgba(42, 55, 82, 0.10);
}
.feature-app-btn.disabled:active {
  transform: translateY(0) scale(0.98);
}
.feature-app-btn.disabled .feature-app-icon {
  filter: grayscale(0.6);
}
.feature-app-btn.disabled:hover .feature-app-icon {
  transform: none;
  box-shadow: none;
}

/* 弹窗内功能启用开关行 */
.feature-toggle-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 2px 20px 6px;
  gap: 8px;
}
.feature-toggle-row .check-line {
  margin: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
}
.feature-toggle-row .check-line input[type="checkbox"] {
  width: 44px;
  height: 26px;
}

/* ========== 功能弹窗（大弹窗） ========== */
.feature-modal {
  width: min(800px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 32px));
  border-radius: 20px;
}

.feature-modal .modal-shell {
  max-height: min(800px, calc(100vh - 80px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px) saturate(160%);
  border-radius: 20px;
}

/* 弹窗内子标签页 */
.feature-modal-tabs {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.feature-modal-tab-bar {
  display: flex;
  gap: 4px;
  margin: 0 20px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  border: 1px solid rgba(42, 55, 82, 0.06);
  flex-shrink: 0;
}

.feature-modal-tab {
  flex: 1;
  min-height: 40px;
  padding: 10px 20px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, box-shadow 200ms ease, transform 160ms ease;
}

.feature-modal-tab:hover {
  color: var(--ink);
  background: rgba(18, 165, 148, 0.08);
}

.feature-modal-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), #0cb89e);
  box-shadow: 0 4px 16px rgba(18, 165, 148, 0.3), inset 0 1px 0 rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

.feature-modal-body {
  display: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 0 24px;
}

.feature-modal-body.active {
  display: block;
}

.feature-modal-body::-webkit-scrollbar {
  width: 8px;
}

.feature-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.feature-modal-body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(58, 83, 112, 0.2);
  background-clip: padding-box;
}

.feature-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(58, 83, 112, 0.35);
  background-clip: padding-box;
}

/* 功能页 - 功能介绍 */
.feature-function-page {
  display: grid;
  gap: 16px;
  padding: 0 20px;
}

.feature-desc-box {
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
  line-height: 1.7;
  color: var(--muted);
  font-size: 14px;
}

.feature-desc-box p {
  margin: 0;
}

/* 功能页 - 子命令一览 */
.feature-sub-commands {
  padding: 4px 0;
}
.feature-sub-commands h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.feature-sub-commands ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.feature-sub-commands li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.48);
  transition: background 160ms ease;
}
.feature-sub-commands li:hover {
  background: rgba(255, 255, 255, 0.78);
}
.feature-sub-commands li code {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--teal-dark);
  font-size: 13px;
  white-space: nowrap;
}
.feature-sub-commands li span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.feature-commands-box h4 {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--ink);
}

.feature-commands-list {
  display: grid;
  gap: 6px;
}

.feature-cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.48);
  transition: background 160ms ease;
}

.feature-cmd-item:hover {
  background: rgba(255, 255, 255, 0.78);
}

.feature-cmd-item code {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--teal-dark);
  font-size: 13px;
}

.feature-cmd-item span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

/* 配置页内的配置表单 */
.feature-config-form {
  display: grid;
  gap: 14px;
  padding: 0;
}

.feature-config-form > label:first-child {
  padding-top: 4px;
}

.feature-config-form .field-group {
  padding: 0 20px;
}

.feature-config-form label {
  padding: 0 20px;
}

.feature-config-form .copy-field {
  padding: 0 20px;
}

.feature-config-form .copy-editor {
  margin: 0;
}

.feature-config-form .field-hint {
  margin: 4px 20px 0;
}

.feature-config-form .check-line {
  margin: 0 20px;
}

.feature-config-form .nickname-collapse {
  margin: 0 20px;
  padding: 0;
}

.feature-config-form .nickname-collapse > summary {
  margin: 0;
}

/* 配置保存按钮 */
.feature-config-save {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(42, 55, 82, 0.08);
  padding: 14px 20px 10px;
  margin: 0;
}

/* 截榜页在弹窗内 */
.rankdown-in-modal {
  padding: 0 20px;
}

/* 命令页 - 命令列表容器 */
.feature-modal-commands .feature-commands-list {
  display: grid;
  gap: 6px;
}

/* 无配置提示 */
.feature-no-config {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
}
.feature-no-config-icon {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.5;
}
.feature-no-config p {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.feature-no-config .feature-no-config-hint {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.rankdown-in-modal .table-wrap {
  margin: 0;
}

/* 响应式 */
@media (max-width: 640px) {
  .feature-app-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    padding: 14px;
  }

  .feature-app-btn {
    min-height: 82px;
    padding: 12px 8px;
    border-radius: 14px;
    gap: 8px;
  }

  .feature-app-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
    border-radius: 14px;
  }

  .feature-app-icon svg {
    width: 22px;
    height: 22px;
  }

  .feature-app-name {
    font-size: 12px;
  }

  .feature-modal {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    border-radius: 20px;
  }

  .feature-modal-tab {
    font-size: 12px;
    padding: 6px 12px;
  }
}

/* ========== 兑换码表单（我的页面） ========== */
.redeem-form {
  padding: 20px;
}

.redeem-input-wrap {
  margin-bottom: 12px;
}

.redeem-input-wrap .code-input {
  width: 100%;
  max-width: 340px;
  padding: 12px 16px;
  font-size: 15px;
  letter-spacing: 2px;
  font-family: Consolas, "Courier New", monospace;
  text-transform: uppercase;
  border: 1px solid var(--line-strong, #d0d7de);
  border-radius: var(--radius-control, 10px);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  outline: none;
  transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.redeem-input-wrap .code-input:focus {
  border-color: rgba(18, 165, 148, 0.58);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(18, 165, 148, 0.14);
}

.redeem-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.redeem-actions .primary {
  white-space: nowrap;
  min-height: 46px;
  padding: 9px 22px;
}

.redeem-history-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  min-height: 40px;
}

/* ========== 总配置页模块图标无填充背景 ========== */
.module-config .icon-vessel {
  background: none;
}

/* ========== 灯牌编辑器（总配置页） ========== */
.signboard-editor {
  margin-top: 4px;
}

.signboard-hidden {
  display: none;
}

.signboard-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,255,0.5);
  border-radius: var(--radius-inner, 14px);
  overflow: hidden;
}

.signboard-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #647084);
  background: rgba(0,0,0,0.03);
  border-bottom: 1px solid var(--line, rgba(255,255,255,0.64));
}

.signboard-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--line-strong, rgba(42,55,82,0.06));
  vertical-align: middle;
}

.signboard-table tr:last-child td {
  border-bottom: none;
}

.signboard-table input {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid var(--line-strong, #d0d7de);
  border-radius: var(--radius-control, 10px);
  background: rgba(255,255,255,0.76);
  color: var(--ink);
  outline: none;
  transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.signboard-table input:focus,
.signboard-table textarea:focus {
  border-color: rgba(18, 165, 148, 0.58);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(18, 165, 148, 0.14);
}

.signboard-table textarea {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid var(--line-strong, #d0d7de);
  border-radius: var(--radius-control, 10px);
  background: rgba(255,255,255,0.76);
  color: var(--ink);
  outline: none;
  resize: vertical;
  min-height: 60px;
  line-height: 1.5;
  transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease;
  box-sizing: border-box;
}

/* ============================================================
   命令权限管理 — 切换开关
   ============================================================ */
.command-permissions-list {
  padding: 4px 0;
}

.command-permission-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-strong, #e5e7eb);
  gap: 12px;
}

.command-permission-item:last-child {
  border-bottom: none;
}

.command-permission-info {
  flex: 1;
  min-width: 0;
}

.command-permission-hint {
  font-weight: 600;
  color: var(--primary, #6366f1);
  font-size: 13px;
}

.command-permission-feature-tag {
  display: inline-block;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(18, 165, 148, 0.1);
  color: var(--teal, #12a594);
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.6;
}

.command-permission-desc {
  color: var(--muted, #647084);
  font-size: 12px;
  margin-top: 2px;
  line-height: 1.4;
}

.room-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.room-admin-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(42, 55, 82, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.room-admin-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(145deg, rgba(18, 165, 148, 0.16), rgba(59, 130, 246, 0.16));
}

.room-admin-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.room-admin-meta strong,
.room-admin-meta code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-admin-meta strong {
  font-size: 13px;
  color: var(--ink, #162033);
}

.room-admin-meta code {
  font-size: 11px;
  color: var(--muted, #647084);
}

/* 开关切换控件 */
.perm-toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.perm-toggle-label {
  font-size: 11px;
  color: var(--muted, #647084);
  transition: color 160ms ease;
}

.perm-toggle-checkbox:checked ~ .perm-toggle-label:last-child {
  color: var(--teal-dark, #08766f);
  font-weight: 500;
}

.perm-toggle-checkbox:not(:checked) ~ .perm-toggle-label:first-child {
  color: var(--ink, #162033);
  font-weight: 500;
}

.perm-toggle-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 38px;
  height: 20px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 10px 50%, #fff 0 6px, transparent 6.5px),
    linear-gradient(145deg, rgba(151, 164, 183, 0.42), rgba(213, 221, 232, 0.86));
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease;
  flex-shrink: 0;
  position: relative;
  outline: none;
  margin: 0;
}

.perm-toggle-checkbox:checked {
  background:
    radial-gradient(circle at calc(100% - 10px) 50%, #fff 0 6px, transparent 6.5px),
    linear-gradient(145deg, var(--teal, #12a594), var(--sky, #3b82f6));
}

.perm-toggle-checkbox:focus-visible {
  box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.2);
}

.redeem-form .field-hint {
  margin: 14px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* 小屏幕：兑换码输入框占满宽度 */
@media (max-width: 640px) {
  .redeem-input-wrap .code-input {
    max-width: 100%;
  }

  .redeem-form {
    padding: 16px;
  }
}

/* ── 公告相关样式 ──────────────────────────────────────────────────── */

/* 普通用户页面 - 公告按钮 */
.btn-announcement {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--teal-light, #b3e5e0);
  border-radius: 8px;
  background: linear-gradient(135deg, #0d9488, #12a594);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 160ms ease, transform 120ms ease, box-shadow 160ms ease;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(18, 165, 148, 0.15);
}
.btn-announcement:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(18, 165, 148, 0.25);
}
.btn-announcement:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(18, 165, 148, 0.1);
}
.btn-announcement svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 新公告红点指示器 */
.btn-announcement .ann-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
  opacity: 0;
  transform: scale(0);
  transition: opacity 200ms ease, transform 200ms ease;
}
.btn-announcement.has-new .ann-badge {
  opacity: 1;
  transform: scale(1);
}

/* 页面头部 flex 布局（使公告按钮靠右） */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

/* 公告弹窗 - 用户端查看公告 */
.announcement-modal-list {
  max-height: 65vh;
  overflow-y: auto;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.announcement-modal-item {
  position: relative;
  background: var(--surface-card, #f8f9fb);
  border: 1px solid var(--border, #e6e8ed);
  border-radius: 10px;
  padding: 16px 18px;
  transition: box-shadow 160ms ease, border-color 160ms ease;
}

.announcement-modal-item:hover {
  border-color: var(--teal-light, #b3e5e0);
  box-shadow: 0 2px 8px rgba(18, 165, 148, 0.06);
}

/* 左侧青绿装饰线 */
.announcement-modal-item::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 0;
  width: 3px;
  height: calc(100% - 16px);
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, var(--teal, #12a594), #0d9488);
  opacity: 0.4;
}

.announcement-modal-item h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink, #162033);
  line-height: 1.4;
  padding-left: 4px;
}

.announcement-modal-item .ann-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted, #8a94a6);
  background: var(--bg-subtle, #f3f5f8);
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.announcement-modal-item .ann-meta::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal-light, #b3e5e0);
}

.announcement-modal-item .ann-content {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2, #3b4356);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  padding-left: 4px;
}

/* ========== 公告轮播 ========== */
.ann-carousel-body {
  max-height: none;
  overflow: visible;
  padding: 0 4px;
}

.ann-carousel-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-height: 200px;
}

.ann-nav-btn {
  flex: 0 0 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line, #e8e8e8);
  border-radius: 8px;
  background: var(--shade, #f5f7fa);
  cursor: pointer;
  color: var(--muted, #8a94a6);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  padding: 0;
}

.ann-nav-btn:hover {
  background: var(--teal, #12a594);
  color: #fff;
  border-color: var(--teal, #12a594);
}

.ann-nav-btn svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ann-carousel-content {
  flex: 1;
  min-width: 0;
  background: var(--surface-card, #f8f9fb);
  border: 1px solid var(--border, #e6e8ed);
  border-radius: 10px;
  padding: 20px 22px;
  position: relative;
}

.ann-carousel-content::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 0;
  width: 3px;
  height: calc(100% - 16px);
  border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, var(--teal, #12a594), #0d9488);
  opacity: 0.4;
}

.ann-carousel-content h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink, #162033);
  line-height: 1.4;
  padding-left: 8px;
}

.ann-carousel-content .ann-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted, #8a94a6);
  background: var(--bg-subtle, #f3f5f8);
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
  margin-left: 8px;
}

.ann-carousel-content .ann-content {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2, #3b4356);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  padding-left: 8px;
  max-height: 45vh;
  overflow-y: auto;
}

.ann-indicator {
  text-align: center;
  font-size: 12px;
  color: var(--muted, #8a94a6);
  padding: 10px 0 4px;
  user-select: none;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted, #8a94a6);
}
.empty-state p {
  margin: 0;
  font-size: 14px;
}

/* ========== 基本设置 - 输入控件 ========== */
.basic-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 0 20px;
}

.basic-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.55);
  border: 1.5px solid rgba(42, 55, 82, 0.08);
  border-radius: 14px;
  transition: border 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.basic-field:hover {
  border-color: rgba(18, 165, 148, 0.2);
  background: rgba(255, 255, 255, 0.7);
}

.basic-field:focus-within {
  border-color: rgba(18, 165, 148, 0.5);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(18, 165, 148, 0.12);
}

.basic-field > span:first-child {
  font-size: 12px;
  font-weight: 700;
  color: #3c4a5e;
  letter-spacing: 0.02em;
  text-transform: none;
}

.field-required {
  color: #e55a6b;
  margin-left: 2px;
  font-weight: 700;
}

.lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #e55a6b;
  background: rgba(229, 90, 107, 0.1);
  border: 1px solid rgba(229, 90, 107, 0.25);
  border-radius: 999px;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

.basic-field.locked {
  background: rgba(255, 246, 248, 0.75);
  border-color: rgba(229, 90, 107, 0.18);
}

.basic-field.locked:hover {
  background: rgba(255, 246, 248, 0.85);
  border-color: rgba(229, 90, 107, 0.25);
  box-shadow: none;
}

.basic-field.locked:focus-within {
  box-shadow: none;
  border-color: rgba(229, 90, 107, 0.3);
}

.basic-field.locked input[readonly] {
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  cursor: not-allowed;
  border-color: rgba(42, 55, 82, 0.08);
}

/* ========== 分享链接绑定按钮 ========== */
.link-fetch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--teal-dark, #0f766e);
  background: rgba(18, 165, 148, 0.1);
  border: 1.5px solid rgba(18, 165, 148, 0.25);
  border-radius: 10px;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  font-family: inherit;
  letter-spacing: 0.01em;
}

.link-fetch-btn svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.link-fetch-btn:hover {
  background: rgba(18, 165, 148, 0.18);
  border-color: rgba(18, 165, 148, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(18, 165, 148, 0.18);
}

.link-fetch-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ========== 分享链接绑定弹窗 ========== */
.link-fetch-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(22, 32, 51, 0.38);
  backdrop-filter: blur(8px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  animation: fadeIn 200ms ease;
}

.link-fetch-dialog {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px) saturate(180%);
  border-radius: 20px;
  padding: 0;
  width: min(480px, calc(100vw - 32px));
  box-shadow: 0 24px 80px rgba(54, 74, 111, 0.22), 0 8px 32px rgba(54, 74, 111, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.7);
  animation: slideUp 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.link-fetch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(42, 55, 82, 0.08);
}

.link-fetch-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.link-fetch-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease;
}

.link-fetch-close:hover {
  background: rgba(42, 55, 82, 0.08);
  color: var(--ink);
}

.link-fetch-close svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
}

.link-fetch-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-fetch-desc {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
}

.link-fetch-input-row {
  display: flex;
  align-items: center;
}

.link-fetch-input-row input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid rgba(42, 55, 82, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  color: var(--ink);
  font-family: inherit;
  transition: border 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.link-fetch-input-row input:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.15);
  outline: none;
}

.link-fetch-input-row input::placeholder {
  color: var(--muted);
  font-size: 13px;
}

.link-fetch-error {
  margin: 0;
  font-size: 12.5px;
  color: #e55a6b;
  font-weight: 600;
  min-height: 0;
  line-height: 1.4;
}

.link-fetch-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid rgba(42, 55, 82, 0.08);
}

.link-fetch-btn-cancel {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  border: 1.5px solid rgba(42, 55, 82, 0.12);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.link-fetch-btn-cancel:hover {
  background: #fff;
  border-color: rgba(42, 55, 82, 0.2);
  transform: translateY(-1px);
}

.link-fetch-btn-confirm {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 10px;
  border: 1.5px solid rgba(18, 165, 148, 0.3);
  background: linear-gradient(135deg, var(--teal), #0cb89e);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
  box-shadow: 0 6px 20px rgba(18, 165, 148, 0.22);
}

.link-fetch-btn-confirm svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-fetch-btn-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(18, 165, 148, 0.3);
}

.link-fetch-btn-confirm:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(18, 165, 148, 0.3);
}


.basic-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.basic-input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  color: var(--muted);
  pointer-events: none;
  transition: color 200ms ease;
  z-index: 1;
}

.basic-field:focus-within .basic-input-icon {
  color: var(--teal);
}

.basic-input-wrap input {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: 38px;
  padding-right: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid rgba(42, 55, 82, 0.1);
  border-radius: 10px;
  font-size: 14px;
  color: var(--ink);
  transition: border 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.basic-input-wrap input:focus {
  border-color: rgba(18, 165, 148, 0.5);
  background: #fff;
  box-shadow: none;
  outline: none;
}

.basic-field > small {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.4;
  font-weight: 500;
}

/* ========== 账号选择器（卡片单选） ========== */
.account-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 20px;
  margin-top: 4px;
}

.account-section-title {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.account-section-title > span:first-child {
  font-size: 12px;
  font-weight: 700;
  color: #3c4a5e;
  letter-spacing: 0.02em;
}

.account-section-title > small {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
}

.account-selector {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  align-items: stretch;
}

.account-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 2px solid rgba(42, 55, 82, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: border-color 200ms ease, background 200ms ease, box-shadow 200ms ease, transform 200ms ease;
  user-select: none;
  flex: 1 1 240px;
  min-width: 0;
  position: relative;
}

.account-option:hover {
  border-color: rgba(18, 165, 148, 0.3);
  background: rgba(18, 165, 148, 0.04);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(54, 74, 111, 0.1);
}

.account-option.selected {
  border-color: var(--teal);
  background: linear-gradient(135deg, rgba(18, 165, 148, 0.08), rgba(18, 165, 148, 0.03));
  box-shadow: 0 0 0 1px rgba(18, 165, 148, 0.2), 0 8px 24px rgba(18, 165, 148, 0.14);
}

.account-option-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  color: var(--teal-dark);
  background: linear-gradient(145deg, rgba(18, 165, 148, 0.12), rgba(59, 130, 246, 0.08));
  transition: background 200ms ease, color 200ms ease, transform 200ms ease;
}

.account-option.selected .account-option-icon {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), #0cb89e);
  box-shadow: 0 4px 12px rgba(18, 165, 148, 0.3);
  transform: scale(1.05);
}

.account-option-icon svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.account-option-check {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  border: 2px solid rgba(42, 55, 82, 0.15);
  background: #fff;
  color: transparent;
  margin-left: auto;
  transition: all 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.account-option-check svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 200ms ease, transform 200ms ease;
}

.account-option.selected .account-option-check {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  box-shadow: 0 4px 12px rgba(18, 165, 148, 0.35);
}

.account-option.selected .account-option-check svg {
  opacity: 1;
  transform: scale(1);
}

.account-option .option-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.account-option .option-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  color: var(--ink);
}

.account-option .option-desc {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
}

.account-hint-wrap {
  flex: 1 1 100%;
  width: 100%;
}

.account-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 0;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  border: 1.5px solid rgba(42, 55, 82, 0.08);
  border-radius: 12px;
}

.account-hint-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.account-hint-icon.success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.28);
}

.account-hint-icon.warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.28);
}

.account-hint-icon.error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.28);
}

.account-hint strong {
  color: var(--teal);
  font-weight: 700;
  padding: 0 4px;
  background: rgba(18, 165, 148, 0.08);
  border-radius: 4px;
}

.account-hint .bind-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 7px 14px;
  font-weight: 700;
  font-size: 12.5px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), #0cb89e);
  border-radius: 8px;
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(18, 165, 148, 0.28);
}

.account-hint .bind-link svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-hint .bind-link:hover {
  background: linear-gradient(135deg, var(--teal-dark), #0e8a7a);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(18, 165, 148, 0.35);
}

.account-hint .bind-link:active {
  transform: translateY(0);
}

/* ========== 分页器 Pager ========== */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 20px;
  border-top: 1px solid rgba(42, 55, 82, 0.06);
}

.pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(42, 55, 82, 0.04);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  user-select: none;
}

.pager-btn:hover:not(.disabled):not(.current) {
  background: rgba(18, 165, 148, 0.1);
  color: var(--teal);
}

.pager-btn.current {
  color: #fff;
  background: var(--teal);
  cursor: default;
}

.pager-btn.disabled {
  color: var(--muted);
  opacity: 0.5;
  cursor: default;
}

.pager-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 13px;
  color: var(--muted);
  user-select: none;
}

/* ========== 定时开关调度器 ========== */
.scheduler-panel {
  margin-top: 16px;
}

.scheduler-panel .panel-head {
  padding-bottom: 12px;
}

/* 滑块开关 Switch */
.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.switch-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-track {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  background: rgba(42, 55, 82, 0.15);
  border-radius: 12px;
  transition: background 0.25s ease;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s ease;
}

.switch-label input:checked + .switch-track {
  background: var(--teal);
}

.switch-label input:checked + .switch-track .switch-thumb {
  transform: translateX(20px);
}

.switch-label.small .switch-track {
  width: 36px;
  height: 20px;
  border-radius: 10px;
}

.switch-label.small .switch-thumb {
  width: 16px;
  height: 16px;
}

.switch-label.small input:checked + .switch-track .switch-thumb {
  transform: translateX(16px);
}

.switch-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.switch-label input:checked ~ .switch-text {
  color: var(--teal-dark);
}

/* 调度规则列表 */
.scheduler-rules {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 20px 4px;
}

.scheduler-rule {
  border: 1px solid rgba(42, 55, 82, 0.08);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.scheduler-rule:hover {
  box-shadow: 0 2px 12px rgba(42, 55, 82, 0.06);
}

.rule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--soft, #eef6f7);
  border-bottom: 1px solid rgba(42, 55, 82, 0.05);
}

.rule-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rule-index {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.rule-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 时间选择行 */
.rule-time-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.rule-time-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rule-time-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.time-input {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(42, 55, 82, 0.12);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.time-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.1);
}

.rule-time-arrow {
  display: flex;
  align-items: center;
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 16px;
  flex-shrink: 0;
}

/* 星期选择行 */
.rule-days-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rule-days-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.day-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.day-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 34px;
  border-radius: 8px;
  border: 1.5px solid rgba(42, 55, 82, 0.12);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.day-chip:hover {
  border-color: var(--teal-light);
  background: rgba(18, 165, 148, 0.04);
  color: var(--teal-dark);
}

.day-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.day-chip input:checked + span {
  color: #fff;
}

.day-chip:has(input:checked),
.day-chip.checked {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  box-shadow: 0 2px 8px rgba(18, 165, 148, 0.25);
}

/* 操作按钮行 */
.scheduler-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px 16px;
  gap: 12px;
}

.add-rule-btn {
  flex-shrink: 0;
}

.save-scheduler-btn {
  flex-shrink: 0;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
}

/* ---- 可用命令列表 ---- */
.cmd-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 8px 20px 20px;
}

.cmd-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cmd-group-head {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--teal, #12a594);
  padding: 0 4px;
}

.cmd-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid rgba(42, 55, 82, 0.06);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cmd-card:hover {
  border-color: var(--teal-light, #b3e5e0);
  box-shadow: 0 3px 12px rgba(18, 165, 148, 0.06);
}

.cmd-hint {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--teal-dark, #0f766e);
  background: rgba(18, 165, 148, 0.06);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  align-self: flex-start;
  letter-spacing: 0.02em;
}

.cmd-desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted, #647084);
  line-height: 1.55;
}

.cmd-aliases {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.cmd-alias-tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--soft, #eef6f7);
  color: var(--muted, #647084);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

/* ============================================================
   功能弹窗控件样式优化
   ============================================================ */

.feature-modal .modal-shell {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
}

.feature-modal-body {
  scrollbar-width: thin;
  scrollbar-color: rgba(58, 83, 112, 0.18) transparent;
}

.feature-config-form label {
  gap: 6px;
}

.feature-config-form label > span {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
  margin-bottom: 4px;
  display: block;
}

.feature-config-form input[type="number"],
.feature-config-form input[type="text"] {
  padding: 11px 14px;
  border: 1.5px solid rgba(42, 55, 82, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  color: var(--ink);
  transition: border 200ms ease, box-shadow 200ms ease, background 200ms ease, transform 160ms ease;
  width: 100%;
}

.feature-config-form input[type="number"]:focus,
.feature-config-form input[type="text"]:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.15), 0 4px 12px rgba(18, 165, 148, 0.1);
  outline: none;
}

.feature-config-form input[type="number"]:hover:not(:focus),
.feature-config-form input[type="text"]:hover:not(:focus) {
  border-color: rgba(18, 165, 148, 0.3);
}

.feature-config-form select {
  padding: 11px 38px 11px 14px;
  border: 1.5px solid rgba(42, 55, 82, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23546175' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 12px center;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  transition: border 200ms ease, box-shadow 200ms ease, background 200ms ease;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
}

.feature-config-form select:focus {
  border-color: var(--teal);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.15), 0 4px 12px rgba(18, 165, 148, 0.1);
  outline: none;
}

.feature-config-form select:hover:not(:focus) {
  border-color: rgba(18, 165, 148, 0.3);
}

.feature-config-form textarea {
  padding: 12px 14px;
  border: 1.5px solid rgba(42, 55, 82, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  transition: border 200ms ease, box-shadow 200ms ease, background 200ms ease;
  width: 100%;
  resize: vertical;
}

.feature-config-form textarea:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.15), 0 4px 12px rgba(18, 165, 148, 0.1);
  outline: none;
}

.feature-config-form textarea:hover:not(:focus) {
  border-color: rgba(18, 165, 148, 0.3);
}

.feature-config-form .template-field {
  border: 1.5px solid rgba(42, 55, 82, 0.06);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.5);
  transition: border 200ms ease, background 200ms ease;
}

.template-field {
  margin-bottom: 12px;
  border: 1px solid var(--border, #e0e3e8);
  border-radius: 8px;
  padding: 12px;
}

.template-field-hint {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
  display: block;
}

.template-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  padding: 8px;
  border: 1px solid var(--border, #d0d4dd);
  border-radius: 6px;
  resize: vertical;
}

.feature-config-form .template-field:hover {
  border-color: rgba(18, 165, 148, 0.15);
  background: rgba(255, 255, 255, 0.7);
}

.feature-config-form .template-field textarea {
  border: 1.5px solid rgba(42, 55, 82, 0.08);
  background: rgba(255, 255, 255, 0.9);
}

.feature-config-form .template-field textarea:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.12);
}

.feature-config-form .tmpl-var {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  background: rgba(18, 165, 148, 0.08);
  border: 1px solid rgba(18, 165, 148, 0.15);
  transition: background 160ms ease, border 160ms ease, transform 160ms ease;
}

.feature-config-form .tmpl-var:hover {
  background: rgba(18, 165, 148, 0.15);
  border-color: rgba(18, 165, 148, 0.3);
  transform: translateY(-1px);
}

.feature-config-form .check-line {
  padding: 12px 16px;
  border: 1.5px solid rgba(42, 55, 82, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  transition: border 200ms ease, background 200ms ease, box-shadow 200ms ease, transform 160ms ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.feature-config-form .check-line:hover {
  border-color: rgba(18, 165, 148, 0.25);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(54, 74, 111, 0.08);
  transform: translateY(-1px);
}

.feature-config-form .check-line input[type="checkbox"] {
  width: 46px;
  height: 26px;
  flex: 0 0 46px;
  border-radius: 999px;
  border: 1.5px solid rgba(67, 81, 103, 0.12);
  background:
    radial-gradient(circle at 12px 50%, #fff 0 7px, transparent 7.5px),
    linear-gradient(135deg, rgba(151, 164, 183, 0.4), rgba(213, 221, 232, 0.8));
  box-shadow: inset 0 1px 3px rgba(54, 74, 111, 0.1), 0 2px 6px rgba(54, 74, 111, 0.06);
  transition: background 220ms ease, border 220ms ease, box-shadow 220ms ease;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.feature-config-form .check-line input[type="checkbox"]:checked {
  border-color: rgba(18, 165, 148, 0.4);
  background:
    radial-gradient(circle at calc(100% - 12px) 50%, #fff 0 7px, transparent 7.5px),
    linear-gradient(135deg, var(--teal), #0cb89e);
  box-shadow: inset 0 1px 3px rgba(9, 92, 84, 0.15), 0 4px 16px rgba(18, 165, 148, 0.2);
}

.feature-config-form .check-line span {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.feature-config-form .nickname-collapse {
  margin: 0 16px;
  border: 1.5px solid rgba(42, 55, 82, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
  overflow: hidden;
  transition: border 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.feature-config-form .nickname-collapse:hover {
  border-color: rgba(18, 165, 148, 0.15);
  background: rgba(255, 255, 255, 0.65);
}

.feature-config-form .nickname-collapse[open] {
  border-color: rgba(18, 165, 148, 0.18);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 16px rgba(54, 74, 111, 0.06);
}

.feature-config-form .nickname-collapse > summary {
  padding: 12px 16px;
  border: none;
  border-radius: 0;
  background: transparent;
  min-height: 44px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  transition: background 160ms ease;
}

.feature-config-form .nickname-collapse > summary:hover {
  background: rgba(18, 165, 148, 0.04);
}

.feature-config-form .nickname-collapse > summary > span:first-child {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.feature-config-form .nickname-collapse > summary .module-chevron {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transition: transform 200ms ease;
}

.feature-config-form .nickname-collapse[open] > summary .module-chevron {
  transform: rotate(-135deg);
}

.feature-config-form .copy-item {
  padding: 12px;
  border: 1.5px solid rgba(42, 55, 82, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  transition: border 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.feature-config-form .copy-item:hover {
  border-color: rgba(18, 165, 148, 0.18);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(54, 74, 111, 0.06);
}

.feature-config-form .copy-item textarea {
  border: 1.5px solid rgba(42, 55, 82, 0.08);
  background: rgba(255, 255, 255, 0.9);
  min-height: 48px;
}

.feature-config-form .copy-item textarea:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.12);
}

.feature-config-form .copy-actions {
  padding-top: 4px;
}

.feature-config-form .announcement-item {
  padding: 14px;
  border: 1.5px solid rgba(42, 55, 82, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  transition: border 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.feature-config-form .announcement-item:hover {
  border-color: rgba(18, 165, 148, 0.18);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(54, 74, 111, 0.06);
}

.feature-config-form .announcement-item-header {
  gap: 8px;
  margin-bottom: 8px;
}

.feature-config-form .announcement-item-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.feature-config-form .announcement-interval-label {
  font-size: 12px;
  gap: 4px;
}

.feature-config-form .announcement-interval-label input[type="number"] {
  width: 64px;
  padding: 5px 8px;
  font-size: 13px;
  text-align: center;
  border-radius: 8px;
}

.feature-config-form .announcement-item textarea {
  border: 1.5px solid rgba(42, 55, 82, 0.08);
  background: rgba(255, 255, 255, 0.9);
  min-height: 48px;
}

.feature-config-form .announcement-item textarea:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.12);
}

.feature-config-form .wishlist-item {
  padding: 14px;
  border: 1.5px solid rgba(42, 55, 82, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  transition: border 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.feature-config-form .wishlist-item:hover {
  border-color: rgba(18, 165, 148, 0.18);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 8px rgba(54, 74, 111, 0.06);
}

.feature-config-form .wishlist-item-header {
  margin-bottom: 10px;
}

.feature-config-form .wishlist-item-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.feature-config-form .wishlist-item-fields label span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.feature-config-form .wishlist-item-fields input {
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 8px;
}

.feature-config-form .gift-search-input {
  padding: 8px 12px;
  font-size: 13px;
  border: 1.5px solid rgba(42, 55, 82, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  transition: border 200ms ease, box-shadow 200ms ease;
}

.feature-config-form .gift-search-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.12);
}

.feature-config-form .gift-search-dropdown {
  border: 1.5px solid rgba(42, 55, 82, 0.08);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 24px rgba(54, 74, 111, 0.1);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.feature-config-form .gift-search-option {
  padding: 9px 14px;
  font-size: 13px;
  transition: background 120ms ease;
}

.feature-config-form .gift-search-option:hover,
.feature-config-form .gift-search-option.highlighted {
  background: rgba(18, 165, 148, 0.06);
}

.feature-config-form .gift-search-option.selected {
  background: rgba(18, 165, 148, 0.1);
  font-weight: 600;
}

.feature-config-form .blindbox-item {
  display: flex;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1.5px solid rgba(42, 55, 82, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  transition: border 200ms ease, background 200ms ease;
}

.feature-config-form .blindbox-item:hover {
  border-color: rgba(18, 165, 148, 0.15);
  background: rgba(255, 255, 255, 0.85);
}

.feature-config-form .blindbox-number {
  width: 56px;
  flex: 0 0 56px;
  padding: 10px 4px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  border: 1.5px solid rgba(42, 55, 82, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--teal);
  transition: border 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.feature-config-form .blindbox-number:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.15);
  outline: none;
}

.feature-config-form .blindbox-number:hover:not(:focus) {
  border-color: rgba(18, 165, 148, 0.3);
}

.feature-config-form .blindbox-content {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  border: 1.5px solid rgba(42, 55, 82, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-family: inherit;
  resize: vertical;
  transition: border 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.feature-config-form .blindbox-content:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.15);
  outline: none;
}

.feature-config-form .blindbox-content:hover:not(:focus) {
  border-color: rgba(18, 165, 148, 0.3);
}

.feature-config-form .blindbox-add-btn,
.feature-config-form .blindbox-import-btn,
.feature-config-form .blindbox-clear-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid rgba(42, 55, 82, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  cursor: pointer;
  transition: border 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.feature-config-form .blindbox-add-btn:hover,
.feature-config-form .blindbox-import-btn:hover {
  border-color: rgba(18, 165, 148, 0.25);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(54, 74, 111, 0.06);
}

.feature-config-form .blindbox-clear-btn {
  color: var(--danger);
  border-color: rgba(196, 59, 77, 0.15);
}

.feature-config-form .blindbox-clear-btn:hover {
  border-color: rgba(196, 59, 77, 0.3);
  background: rgba(196, 59, 77, 0.06);
}

.feature-config-form .signboard-editor [data-sb-group] {
  border: 1.5px solid rgba(42, 55, 82, 0.06);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.6);
  transition: border 200ms ease, background 200ms ease;
}

.feature-config-form .signboard-editor [data-sb-group]:hover {
  border-color: rgba(18, 165, 148, 0.15);
  background: rgba(255, 255, 255, 0.8);
}

.feature-config-form .signboard-editor [data-sb-group-name] {
  flex: 1;
  max-width: 200px;
  padding: 8px 12px;
  font-size: 13px;
  border: 1.5px solid rgba(42, 55, 82, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.feature-config-form .signboard-editor [data-sb-group-name]:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.12);
}

.feature-config-form .signboard-editor [data-sb-content] {
  flex: 1;
  resize: vertical;
  padding: 8px 12px;
  font-size: 13px;
  border: 1.5px solid rgba(42, 55, 82, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  min-height: 48px;
}

.feature-config-form .signboard-editor [data-sb-content]:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.12);
}

.feature-config-form .signboard-editor [data-sb-count] {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.feature-config-form .nickname-table {
  border: 1.5px solid rgba(42, 55, 82, 0.06);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
}

.feature-config-form .nickname-table th {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(42, 55, 82, 0.03);
  padding: 10px 12px;
}

.feature-config-form .nickname-table td {
  padding: 8px 12px;
}

.feature-config-form .nickname-table input {
  padding: 8px 10px;
  font-size: 13px;
  border: 1.5px solid rgba(42, 55, 82, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.feature-config-form .nickname-table input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.12);
}

.feature-config-form .field-hint {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.feature-config-form .field-hint code {
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(18, 165, 148, 0.08);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 600;
}

.feature-config-form .icon-btn-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 13px;
}

.feature-config-form .icon-btn-sm.danger {
  border-color: rgba(196, 59, 77, 0.15);
  color: var(--danger);
}

.feature-config-form .icon-btn-sm.danger:hover {
  background: rgba(196, 59, 77, 0.08);
  color: var(--danger);
}

.feature-config-form .small {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
}

.feature-config-form .small.danger {
  border-color: rgba(196, 59, 77, 0.2);
  color: var(--danger);
  background: rgba(196, 59, 77, 0.06);
}

.feature-config-form .small.danger:hover {
  background: rgba(196, 59, 77, 0.12);
  border-color: rgba(196, 59, 77, 0.3);
}

.feature-config-form .command-permission-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(42, 55, 82, 0.05);
  transition: background 160ms ease;
}

.feature-config-form .command-permission-item:hover {
  background: rgba(255, 255, 255, 0.5);
}

.feature-config-form .command-permission-hint {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.feature-config-form .command-permission-feature-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 5px;
  background: rgba(18, 165, 148, 0.08);
  color: var(--teal);
  font-weight: 600;
}

.feature-config-form .command-permission-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.feature-config-form .room-admin-card {
  padding: 10px;
  border: 1.5px solid rgba(42, 55, 82, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.65);
  transition: border 200ms ease, background 200ms ease;
}

.feature-config-form .room-admin-card:hover {
  border-color: rgba(18, 165, 148, 0.15);
  background: rgba(255, 255, 255, 0.85);
}

#feature-config-actions {
  padding: 12px 20px;
  border-top: 1px solid rgba(42, 55, 82, 0.06);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  justify-content: center;
  display: flex;
}

#feature-config-actions .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 15px;
}

#feature-config-actions .icon-btn.primary {
  box-shadow: 0 6px 18px rgba(18, 165, 148, 0.2);
}

.feature-modal .modal-confirm-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(22, 32, 51, 0.35);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 200ms ease;
}

.feature-modal .modal-confirm-box {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px) saturate(180%);
  border-radius: 20px;
  padding: 32px 36px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 24px 80px rgba(54, 74, 111, 0.22), 0 8px 32px rgba(54, 74, 111, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.7);
  text-align: center;
  animation: slideUp 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-modal .modal-confirm-box p {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  font-weight: 500;
}

.feature-modal .modal-confirm-box .confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.feature-modal .modal-confirm-box .confirm-actions button {
  min-width: 96px;
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.feature-modal .modal-confirm-box .confirm-actions button:hover {
  transform: translateY(-2px);
}

.feature-modal .modal-confirm-box .confirm-actions button:active {
  transform: scale(0.97);
}

.feature-modal .modal-inner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(22, 32, 51, 0.4);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 200ms ease;
}

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

.feature-modal .modal-inner-dialog {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px) saturate(180%);
  border-radius: 20px;
  padding: 28px 32px;
  box-shadow: 0 24px 80px rgba(54, 74, 111, 0.22), 0 8px 32px rgba(54, 74, 111, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.7);
  animation: slideUp 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 90vw;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.feature-modal .modal-inner-dialog h3 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.feature-modal .modal-inner-dialog p {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.feature-modal .modal-inner-dialog textarea {
  width: 100%;
  resize: vertical;
  font-family: inherit;
  font-size: 13px;
  padding: 12px 14px;
  border: 1.5px solid rgba(42, 55, 82, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  transition: border 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.feature-modal .modal-inner-dialog textarea:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(18, 165, 148, 0.15), 0 4px 12px rgba(18, 165, 148, 0.1);
  outline: none;
}

.feature-modal .modal-inner-dialog textarea:hover:not(:focus) {
  border-color: rgba(18, 165, 148, 0.3);
}

.feature-modal .modal-inner-dialog .dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

.feature-modal .modal-inner-dialog .dialog-actions button {
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.feature-modal .modal-inner-dialog .dialog-actions button:hover {
  transform: translateY(-2px);
}

.feature-modal .modal-inner-dialog .dialog-actions button:active {
  transform: scale(0.97);
}

.feature-modal .modal-inner-dialog .dialog-actions .btn-secondary {
  border: 1.5px solid rgba(42, 55, 82, 0.12);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
}

.feature-modal .modal-inner-dialog .dialog-actions .btn-secondary:hover {
  background: #fff;
  border-color: rgba(42, 55, 82, 0.2);
  box-shadow: 0 4px 12px rgba(54, 74, 111, 0.1);
}

.feature-modal .modal-inner-dialog .dialog-actions .primary {
  border: 1.5px solid rgba(18, 165, 148, 0.3);
  color: #fff;
  background: linear-gradient(135deg, var(--teal), #0cb89e);
  box-shadow: 0 6px 20px rgba(18, 165, 148, 0.22);
}

.feature-modal .modal-inner-dialog .dialog-actions .primary:hover {
  box-shadow: 0 8px 28px rgba(18, 165, 148, 0.3);
}

.feature-modal .modal-inner-dialog .dialog-actions .danger-confirm {
  border: 1.5px solid rgba(196, 59, 77, 0.3);
  color: #fff;
  background: linear-gradient(135deg, var(--danger), #de6b7b);
  box-shadow: 0 6px 20px rgba(196, 59, 77, 0.22);
}

.feature-modal .modal-inner-dialog .dialog-actions .danger-confirm:hover {
  box-shadow: 0 8px 28px rgba(196, 59, 77, 0.3);
}

.feature-config-form .feature-no-config {
  padding: 56px 20px;
}

.feature-config-form .feature-no-config-icon {
  font-size: 40px;
  margin-bottom: 14px;
  opacity: 0.4;
}

.feature-config-form .feature-no-config p {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.feature-config-form .feature-no-config .feature-no-config-hint {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
}

.feature-config-form .empty {
  padding: 16px;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .feature-config-form .nickname-collapse {
    margin: 0 8px;
  }

  .feature-config-form .field-group,
  .feature-config-form label,
  .feature-config-form .copy-field,
  .feature-config-form .check-line {
    padding-left: 12px;
    padding-right: 12px;
  }

  .feature-config-form .wishlist-item-fields {
    grid-template-columns: 1fr;
  }
}
