/* 织境 v3.14 高级视觉层：仅覆盖视觉表现，不改 DOM 与业务逻辑。 */
:root {
  --primary: #7780ff;
  --primary-hover: #9aa1ff;
  --primary-soft: rgba(119, 128, 255, .16);
  --primary-line: rgba(154, 161, 255, .42);
  --surface-1: #101218;
  --surface-2: #151821;
  --surface-3: #1b1f2a;
  --surface-4: #242938;
  --hairline: rgba(255,255,255,.075);
  --hairline-strong: rgba(255,255,255,.12);
  --shadow-pop: 0 28px 90px rgba(0,0,0,.58);
  --shadow-node: 0 20px 58px rgba(0,0,0,.42);
  --premium-gradient: linear-gradient(135deg, #8b93ff 0%, #6d76f4 48%, #5b63d8 100%);
}

body { background: #07080c; }
button, .btn { letter-spacing: .01em; }
.btn {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.025));
  border-color: rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.btn::after {
  content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,.14) 45%, transparent 70%);
  transform: translateX(-120%); transition: .45s ease;
}
.btn:hover::after { opacity: 1; transform: translateX(120%); }
.btn:hover { border-color: rgba(255,255,255,.2); box-shadow: 0 12px 30px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.08); }
.btn-primary { background: var(--premium-gradient); border-color: rgba(255,255,255,.16); box-shadow: 0 14px 34px rgba(105,114,235,.32), inset 0 1px 0 rgba(255,255,255,.22); }
.btn-primary:hover { background: linear-gradient(135deg,#9ba2ff,#7880f7); }
.btn-danger { background: linear-gradient(180deg, rgba(229,72,77,.18), rgba(229,72,77,.08)); }
.btn-icon, .btn-sm { overflow: hidden; }

.input, .textarea, .select, .composer-model-select {
  background: rgba(255,255,255,.045); border-color: rgba(255,255,255,.11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.input:focus, .textarea:focus, .select:focus, .composer-model-select:focus {
  border-color: rgba(154,161,255,.55); box-shadow: 0 0 0 4px rgba(119,128,255,.13);
}

/* 首页 */
.home-page {
  background:
    radial-gradient(920px 460px at 78% -160px, rgba(119,128,255,.26), transparent 64%),
    radial-gradient(760px 420px at 6% -100px, rgba(74,168,255,.13), transparent 62%),
    linear-gradient(180deg,#08090e,#06070a 62%,#07080c);
}
.home-nav { height: 72px; }
.page-logo {
  width: 34px; height: 40px; object-fit: contain; flex: 0 0 auto;
  background: transparent !important; border-radius: 0; box-shadow: none !important; filter: none;
}
.login-logo, .admin-logo { width: 36px; height: 42px; }
.hero h1 {
  background: linear-gradient(180deg,#fff 0%,#dfe3ff 58%,#aeb5e8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-panel, .work-card, .feature-card, .metric-card, .admin-panel, .skill-admin-card {
  background: linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.028));
  border-color: rgba(255,255,255,.1); box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.work-card:hover, .feature-card:hover { border-color: rgba(154,161,255,.42); box-shadow: var(--shadow-node); }
.mini-canvas, .work-preview { background-color: rgba(255,255,255,.025); }
.feature-icon { background: linear-gradient(135deg,rgba(139,147,255,.28),rgba(91,99,216,.16)); border: 1px solid rgba(154,161,255,.25); }
.empty-works, .empty-soft { background: rgba(255,255,255,.025); border-color: rgba(255,255,255,.14); }

/* 画布面板与悬浮控件 */
.studio-v3 .left-panel, .studio-v3 .right-panel {
  background: linear-gradient(180deg, rgba(18,20,27,.96), rgba(13,15,20,.96));
  backdrop-filter: blur(18px);
}
.studio-v3 .panel-header { background: rgba(255,255,255,.025); }
.surface-icon-btn {
  background: rgba(18,20,27,.82); border-color: rgba(255,255,255,.11);
  backdrop-filter: blur(14px); box-shadow: 0 12px 32px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.06);
}
.surface-icon-btn:hover { color: #fff; background: rgba(36,41,56,.94); border-color: rgba(154,161,255,.48); }
.canvas-shell.studio-v3 #reopen-right { top: 14px !important; right: 72px !important; z-index: 180; }

/* 节点外框保持低调，去掉刺眼的彩色光圈 */
.canvas-shell.studio-v3 .node,
.canvas-shell.studio-v3 .node.selected,
.canvas-shell.studio-v3 .node.focused,
.canvas-shell.studio-v3 .node:hover,
.canvas-shell.studio-v3 .node.selected:hover,
.canvas-shell.studio-v3 .node.quick-expanded,
.canvas-shell.studio-v3 .node.quick-expanded:focus-within {
  border-color: transparent !important;
}
.canvas-shell.studio-v3 .node,
.canvas-shell.studio-v3 .node.selected,
.canvas-shell.studio-v3 .node.focused {
  box-shadow: 0 18px 48px rgba(0,0,0,.28) !important;
}
.canvas-shell.studio-v3 .node:hover {
  box-shadow: 0 22px 56px rgba(0,0,0,.34) !important;
}
.canvas-shell.studio-v3 .node.selected,
.canvas-shell.studio-v3 .node.selected:hover {
  background: linear-gradient(180deg, rgba(38,41,51,.98), rgba(29,32,41,.98)) !important;
  box-shadow: 0 22px 60px rgba(0,0,0,.36) !important;
}
.canvas-shell.studio-v3 .node.quick-expanded,
.canvas-shell.studio-v3 .node.quick-expanded:focus-within {
  box-shadow: 0 30px 90px rgba(0,0,0,.62) !important;
}
.canvas-shell.studio-v3 .port {
  width: calc(18px / var(--canvas-scale, 1)) !important;
  height: calc(18px / var(--canvas-scale, 1)) !important;
  margin-top: calc(-9px / var(--canvas-scale, 1)) !important;
  border: 0 !important;
  background: rgba(126,134,255,.72) !important;
  box-shadow: 0 4px 10px rgba(0,0,0,.22) !important;
}
.canvas-shell.studio-v3 .port svg {
  width: calc(10px / var(--canvas-scale, 1)) !important;
  height: calc(10px / var(--canvas-scale, 1)) !important;
}
.canvas-shell.studio-v3 .port::before { display: none !important; }
.canvas-shell.studio-v3 .port-left { left: calc(-19px / var(--canvas-scale, 1)) !important; }
.canvas-shell.studio-v3 .port-right { right: calc(-19px / var(--canvas-scale, 1)) !important; }
.canvas-shell.studio-v3 .port:hover {
  background: rgba(151,158,255,.96) !important;
  box-shadow: 0 6px 14px rgba(0,0,0,.28) !important;
}
.canvas-shell.studio-v3 .port.drop-active {
  border: 0 !important;
  background: rgba(67,190,126,.92) !important;
  box-shadow: 0 6px 14px rgba(0,0,0,.24) !important;
}
.canvas-shell.studio-v3 .node.drop-target {
  border-color: transparent !important;
  box-shadow: 0 18px 48px rgba(0,0,0,.28) !important;
}
.canvas-top-dock {
  background: rgba(16,18,25,.82); border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(16px); box-shadow: 0 16px 44px rgba(0,0,0,.34);
}
.canvas-context-pill { color: #c9d0e6; }

/* 聊天与输入区 */
.chat-panel { background: linear-gradient(180deg,#12141c,#0f1118); }
.canvas-shell.studio-v3 .studio-chat-header,
.canvas-shell.studio-v3.stage-focus .studio-chat-header { padding-right: 10px !important; }
.chat-composer-card {
  background: linear-gradient(180deg,rgba(255,255,255,.075),rgba(255,255,255,.035));
  border-color: rgba(255,255,255,.12); backdrop-filter: blur(16px);
}
.chat-composer-card:focus-within { border-color: rgba(154,161,255,.58); box-shadow: 0 0 0 4px rgba(119,128,255,.12), 0 18px 48px rgba(0,0,0,.36); }
.composer-icon { background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.08); }
.composer-icon:hover { background: rgba(255,255,255,.08); border-color: rgba(154,161,255,.35); }
.is-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.chat-composer-card { position: relative; }
.composer-tool-btn {
  height: 34px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px;
  border-radius: 11px; color: #9aa5ba; border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.035); font-size: 12px; font-weight: 650;
}
.composer-tool-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.composer-tool-btn:hover, .composer-tool-btn.is-open { color: #fff; background: rgba(154,161,255,.16); border-color: rgba(154,161,255,.35); }
.composer-spacer { flex: 1 1 auto; min-width: 8px; }
.composer-popover {
  position: absolute; left: 38px; bottom: 46px; z-index: 30; width: 238px; max-height: 320px;
  overflow: auto; padding: 7px; border-radius: 14px; background: rgba(22,25,34,.96);
  border: 1px solid rgba(255,255,255,.1); box-shadow: 0 18px 48px rgba(0,0,0,.45);
  backdrop-filter: blur(18px);
}
.composer-popover-title { padding: 5px 7px 7px; color: #f0f3ff; font-size: 12.5px; font-weight: 750; }
.composer-popover-empty, .composer-popover-note { padding: 9px; color: #8f98aa; font-size: 11.5px; line-height: 1.5; }
.composer-option {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px; border: 0;
  border-radius: 10px; background: transparent; color: #dce2f0; text-align: left; cursor: pointer;
}
.composer-option:hover, .composer-option.is-active { background: rgba(255,255,255,.07); }
.composer-option > svg { width: 15px; height: 15px; color: #9aa1ff; margin-left: auto; }
.skill-option input { accent-color: #8b7cff; width: 15px; height: 15px; flex: 0 0 auto; }
.skill-option-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.skill-option-text b { font-size: 12.5px; font-weight: 700; }
.skill-option-text small { color: #8f98aa; font-size: 11px; line-height: 1.45; }
.skill-status { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.skill-status.is-on { background: #46d392; }
.skill-status.is-off { background: #6b7280; }
.composer-send { background: linear-gradient(180deg,#343a4b,#282d3b); border-color: rgba(255,255,255,.1); }
.chat-composer-card.has-text .composer-send { background: var(--premium-gradient); box-shadow: 0 14px 32px rgba(105,114,235,.34); }

.canvas-shell.studio-v3 .chat-composer-bar { gap: 6px !important; }
.canvas-shell.studio-v3 .composer-icon,
.canvas-shell.studio-v3.stage-focus .composer-icon {
  width: 28px !important; height: 28px !important; border-radius: 9px !important;
}
.canvas-shell.studio-v3 .composer-icon svg,
.canvas-shell.studio-v3.stage-focus .composer-icon svg { width: 15px !important; height: 15px !important; }
.canvas-shell.studio-v3 .composer-tool-btn,
.canvas-shell.studio-v3.stage-focus .composer-tool-btn {
  height: 28px !important; padding: 0 8px !important; gap: 5px !important;
  border-radius: 9px !important; font-size: 11.5px !important;
}
.canvas-shell.studio-v3 .composer-tool-btn svg,
.canvas-shell.studio-v3.stage-focus .composer-tool-btn svg { width: 14px !important; height: 14px !important; }
.canvas-shell.studio-v3 .composer-send,
.canvas-shell.studio-v3.stage-focus .composer-send {
  width: 34px !important; height: 34px !important;
}
.canvas-shell.studio-v3 .composer-send svg,
.canvas-shell.studio-v3.stage-focus .composer-send svg { width: 16px !important; height: 16px !important; }
.canvas-shell.studio-v3 .composer-popover { left: 30px; bottom: 38px; }
.canvas-shell.studio-v3 .chat-header-top,
.canvas-shell.studio-v3.stage-focus .chat-header-top {
  grid-template-columns: minmax(0,1fr) auto auto auto !important;
}
.chat-mode-switch {
  display: inline-flex; align-items: center; gap: 2px; padding: 2px;
  border-radius: 9px; background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
}
.chat-mode-btn {
  height: 24px; padding: 0 8px; border: 0; border-radius: 7px;
  color: #94a0b5; font-size: 11px; font-weight: 650; background: transparent;
}
.chat-mode-btn.is-active {
  color: #fff; background: linear-gradient(135deg,#7886ff,#6959e8);
  box-shadow: 0 6px 14px rgba(105,114,235,.25);
}
.chat-panel.is-normal-chat .chat-quick { display: none; }
.chat-selection-wand {
  position: fixed; z-index: 999; width: 30px; height: 30px; padding: 0;
  display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%; color: #fff; cursor: pointer;
  background: linear-gradient(135deg,#8b7cff,#6959e8);
  box-shadow: 0 10px 24px rgba(105,114,235,.38);
}
.chat-selection-wand[hidden] { display: none !important; }
.chat-selection-wand svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.chat-selection-wand:hover { transform: translateY(-1px); }
.message-billing {
  margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.08);
  color: #aeb8cc; font-size: 11px;
}
.field-row.three { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.credit-balance-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; margin-bottom: 14px; border-radius: 12px;
  background: rgba(124,132,255,.12); border: 1px solid rgba(124,132,255,.24);
}
.credit-balance-card span { color: #aeb8cc; font-size: 12px; }
.credit-balance-card strong { color: #fff; font-size: 20px; }

.account-orb {
  position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(119,128,255,.22), transparent 68%);
  filter: blur(40px); top: -120px; right: -100px; pointer-events: none;
}

/* 登录、账户与后台 */
.login-card, .account-card {
  background: linear-gradient(180deg, rgba(25,28,39,.94), rgba(13,15,22,.96));
  border-color: rgba(255,255,255,.12);
}
.admin-page { background: radial-gradient(700px 360px at 80% -100px,rgba(119,128,255,.16),transparent 62%),#090a0e; }
.admin-sidebar { background: linear-gradient(180deg,rgba(20,23,33,.96),rgba(11,12,17,.96)); }
.admin-nav { border: 1px solid transparent; }
.admin-nav:hover, .admin-nav.active { background: linear-gradient(180deg,rgba(139,147,255,.22),rgba(119,128,255,.12)); border-color: rgba(154,161,255,.22); }
.admin-badge { background: linear-gradient(180deg,rgba(139,147,255,.22),rgba(119,128,255,.1)); }
.model-admin-item { background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.09); }
.switch span { box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }

@media (max-width: 900px) {
  .home-nav, .home-container { padding-left: 16px; padding-right: 16px; }
  .studio-v3 .left-panel, .studio-v3 .right-panel { backdrop-filter: blur(20px); }
  .canvas-shell.studio-v3 #reopen-right { top: 10px !important; right: 62px !important; }
}

/* 可拖动七彩云彩 AI 入口 */
body.ai-chat-open #global-account { display: none !important; }
.studio-v3 #reopen-right { display: none !important; }
.studio-v3 .ai-cloud-fab {
  position: absolute; z-index: 118; width: 48px; height: 58px; padding: 0;
  border: 0; background: transparent; appearance: none; touch-action: none;
  opacity: 0; pointer-events: none; transform: scale(.78) translateY(8px);
  transition: opacity .22s ease, transform .22s ease;
}
.studio-v3.right-collapsed .ai-cloud-fab {
  opacity: 1; pointer-events: auto; transform: scale(1) translateY(0); cursor: grab;
}
.studio-v3.right-collapsed .ai-cloud-fab:hover { transform: scale(1.06) translateY(-2px); }
.studio-v3.right-collapsed .ai-cloud-fab.is-dragging {
  cursor: grabbing; transform: scale(1.02);
}
.ai-cloud-fab::before {
  content: none;
}
.ai-sprite-image {
  width: 100%; height: 100%; object-fit: contain; transform-origin: center;
  opacity: 1;
  filter: none;
  animation: none;
}
@keyframes aiCloudFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.025); }
}
@keyframes aiCloudGlow {
  0%, 100% { opacity: .55; transform: scale(1); }
  50% { opacity: .82; transform: scale(1.06); }
}
.mascot-eyes {
  transform-box: fill-box;
  transform-origin: center;
  animation: mascotBlink 4.6s ease-in-out infinite;
}
.mascot-highlight {
  transform-box: fill-box;
  transform-origin: center;
  animation: mascotGlint 2.8s ease-in-out infinite;
}
.mascot-shine {
  transform-box: fill-box;
  transform-origin: center;
  animation: mascotShine 3.8s ease-in-out infinite;
}
.mascot-sparkle {
  transform-box: fill-box;
  transform-origin: center;
  animation: mascotTwinkle 2.4s ease-in-out infinite;
}
.sparkle-two { animation-delay: .35s; }
.sparkle-three { animation-delay: .75s; }
.sparkle-four { animation-delay: 1.1s; }
@keyframes mascotBlink {
  0%, 91%, 100% { transform: scaleY(1); }
  94%, 96% { transform: scaleY(.08); }
}
@keyframes mascotGlint {
  0%, 100% { opacity: .85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.25); }
}
@keyframes mascotShine {
  0%, 100% { opacity: .32; transform: translateX(-2px); }
  50% { opacity: .72; transform: translateX(3px); }
}
@keyframes mascotTwinkle {
  0%, 100% { opacity: .25; transform: scale(.72) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.16) rotate(18deg); }
}
@media (prefers-reduced-motion: reduce) {
  .ai-sprite-image, .ai-cloud-fab::before, .mascot-eyes, .mascot-highlight, .mascot-shine, .mascot-sparkle { animation: none; }
}

/* 长文 TXT 卡片 */
.studio-txt-card {
  position: relative; width: 72px; min-height: 46px; padding: 6px 5px 5px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px;
  border-radius: 10px; cursor: pointer; color: #171a22;
  background: linear-gradient(180deg,rgba(42,47,64,.96),rgba(25,28,39,.96));
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 8px 18px rgba(0,0,0,.3);
  transition: transform .16s ease, box-shadow .16s ease;
}
.studio-txt-card:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(0,0,0,.36); }
.studio-txt-check {
  position: absolute; left: 4px; top: 4px; width: 12px; height: 12px;
  display: grid; place-items: center; border-radius: 50%;
  background: #18c874; color: #fff; font-size: 7px; font-weight: 800;
}
.studio-txt-mini {
  position: absolute; right: 4px; top: 4px; width: 14px; height: 14px;
  display: grid; place-items: center; border: 0; border-radius: 5px;
  background: rgba(255,255,255,.08); color: #aeb7c8;
}
.studio-txt-mini:hover { background: rgba(255,255,255,.14); color: #fff; }
.studio-txt-mini svg { width: 8px; height: 8px; }
.studio-txt-doc { width: 13px; height: 15px; margin-top: 2px; color: #dce2ee; }
.studio-txt-doc svg { width: 100%; height: 100%; }
.studio-txt-name {
  width: 100%; font-size: 8.5px; font-weight: 650; color: #e5e9f3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.studio-txt-sub { display: none; }
.message-attachments .studio-txt-card { width: 70px; min-height: 44px; }

/* 消息悬停编辑/复制 */
.message-content-wrap { position: relative; padding-bottom: 6px; }
.message-hover-actions {
  position: relative; z-index: 5;
  display: flex; gap: 6px; margin: 0 4px 2px;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}
.message.user .message-hover-actions { justify-content: flex-end; }
.message.assistant .message-hover-actions { justify-content: flex-start; }
.message-content-wrap:hover .message-hover-actions,
.message-content-wrap:focus-within .message-hover-actions {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
}
.message-hover-btn {
  position: relative; z-index: 6;
  display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 9px; border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.055); color: #cfd6e4;
}
.message-hover-btn:hover { color: #fff; background: rgba(154,161,255,.2); border-color: rgba(154,161,255,.32); }
.message-hover-btn.is-danger { color: #ff8a8d; }
.message-hover-btn.is-danger:hover { color: #fff; background: rgba(229,72,77,.24); border-color: rgba(229,72,77,.38); }
.message-hover-btn svg { width: 15px; height: 15px; }

button[data-two-step-delete].is-confirming-delete {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  width: auto; min-width: 0; padding: 0 10px;
  color: #fff !important; background: rgba(229,72,77,.92) !important;
  border-color: rgba(255,138,141,.55) !important;
  box-shadow: 0 10px 24px rgba(229,72,77,.28);
}
button[data-two-step-delete].is-confirming-delete .two-step-check { width: 14px; height: 14px; flex: 0 0 auto; }
button[data-two-step-delete].is-confirming-delete .two-step-label { font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap; }

/* 文本查看/编辑弹窗 */
.text-modal-overlay {
  position: fixed; inset: 0; z-index: 9800; display: grid; place-items: center;
  padding: 28px; background: rgba(4,5,8,.68); backdrop-filter: blur(10px);
}
.text-modal {
  width: min(860px, 100%); max-height: 86vh; display: flex; flex-direction: column;
  border-radius: 18px; overflow: hidden; border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg,#181b25,#10121a); box-shadow: var(--shadow-pop);
}
.text-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.text-modal-head b { font-size: 14px; color: #e5e9f3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-modal-close {
  width: 30px; height: 30px; border-radius: 9px; border: 0;
  background: rgba(255,255,255,.07); color: #cfd6e4; font-size: 20px; line-height: 1;
}
.text-modal-close:hover { background: rgba(255,255,255,.12); color: #fff; }
.text-modal-editor {
  flex: 1; min-height: 320px; max-height: 62vh; resize: none; padding: 18px;
  border: 0; outline: 0; color: #dce2ee; background: rgba(0,0,0,.16);
  font-size: 13.5px; line-height: 1.75; font-family: inherit;
}
.text-modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 13px 16px; border-top: 1px solid rgba(255,255,255,.08); }

/* v3.24 充值中心 */
.recharge-loading { padding: 34px; text-align: center; color: #aeb7c8; }
.recharge-overview {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px;
}
.recharge-stat {
  padding: 16px; border-radius: 16px; border: 1px solid rgba(255,255,255,.09);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
}
.recharge-stat span { display: block; color: #98a1b3; font-size: 12px; margin-bottom: 7px; }
.recharge-stat strong { font-size: 24px; color: #f4f6fb; }
.recharge-section {
  margin-bottom: 18px; padding: 18px; border-radius: 18px;
  border: 1px solid rgba(255,255,255,.085); background: rgba(255,255,255,.035);
}
.section-title-row { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.recharge-section h3 { margin: 0 0 12px; color: #f0f3fa; font-size: 16px; }
.section-title-row h3 { margin: 0; }
.section-title-row span { color: #98a1b3; font-size: 12px; }
.recharge-package-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.recharge-package-card {
  position: relative; display: flex; flex-direction: column; min-width: 0; padding: 18px;
  border-radius: 17px; border: 1px solid rgba(255,255,255,.09);
  background: linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.025));
}
.recharge-package-card:hover { border-color: rgba(154,161,255,.42); transform: translateY(-2px); transition: .2s ease; }
.package-tag {
  position: absolute; right: 12px; top: 12px; padding: 4px 8px; border-radius: 999px;
  color: #c9ceff; font-size: 11px; background: rgba(119,128,255,.18); border: 1px solid rgba(154,161,255,.25);
}
.recharge-package-card h4 { margin: 0 48px 7px 0; font-size: 17px; color: #f4f6fb; }
.recharge-package-card p { min-height: 38px; margin: 0 0 14px; color: #98a1b3; font-size: 12px; line-height: 1.6; }
.package-credits { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.package-credits strong { font-size: 22px; color: #fff; }
.package-credits span, .package-price { color: #aeb7c8; font-size: 12px; }
.package-price { margin-bottom: 14px; color: #cfd6e4; }
.package-price small { margin-right: 2px; }
.recharge-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; }
.recharge-redeem-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 14px; }
.recharge-table-wrap { overflow: auto; }
.recharge-table { width: 100%; border-collapse: collapse; min-width: 420px; }
.recharge-table th, .recharge-table td { padding: 10px 9px; border-bottom: 1px solid rgba(255,255,255,.07); text-align: left; vertical-align: top; }
.recharge-table th { color: #98a1b3; font-size: 11px; font-weight: 650; }
.recharge-table td { color: #d6dce8; font-size: 12px; }
.recharge-table .plus { color: #63d99a; font-weight: 700; }
.recharge-table .minus { color: #ff9194; font-weight: 700; }
.order-status { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 11px; }
.order-status.pending { color: #ffd37d; background: rgba(245,184,80,.14); }
.order-status.paid { color: #72e2a4; background: rgba(70,205,130,.13); }
.order-status.cancelled { color: #9aa3b5; background: rgba(255,255,255,.07); }
.payment-modal {
  position: fixed; inset: 0; z-index: 9900; display: grid; place-items: center; padding: 26px;
  background: rgba(4,5,8,.7); backdrop-filter: blur(10px);
}
.payment-modal.hidden { display: none; }
.payment-dialog {
  width: min(520px, 100%); max-height: 88vh; overflow: auto; padding: 20px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,.12); background: linear-gradient(180deg,#181c27,#10131b);
  box-shadow: var(--shadow-pop);
}
.payment-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.payment-head h3 { margin: 0; }
.icon-btn { width: 32px; height: 32px; border: 0; border-radius: 10px; background: rgba(255,255,255,.07); color: #cfd6e4; font-size: 20px; }
.payment-summary { display: grid; gap: 8px; padding: 13px; border-radius: 14px; background: rgba(255,255,255,.045); margin-bottom: 14px; }
.payment-summary div { display: flex; justify-content: space-between; gap: 12px; color: #98a1b3; font-size: 13px; }
.payment-summary b { color: #fff; }
.payment-methods { display: grid; gap: 9px; margin-bottom: 15px; }
.payment-method {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 12px;
  border-radius: 14px; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.035); cursor: pointer;
}
.payment-method.selected { border-color: rgba(154,161,255,.48); background: rgba(119,128,255,.12); }
.payment-method.disabled { opacity: .48; cursor: not-allowed; }
.payment-method span { color: #e8ecf5; font-size: 13px; font-weight: 650; }
.payment-method small { grid-column: 2; color: #98a1b3; font-size: 11px; }
.recharge-admin-layout .admin-panel.wide { grid-column: 1 / -1; }
@media (max-width: 1180px) {
  .recharge-package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recharge-columns { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .recharge-overview { grid-template-columns: 1fr; }
  .recharge-package-grid { grid-template-columns: 1fr; }
  .recharge-redeem-form { grid-template-columns: 1fr; }
}
.autonomous-plan-card {
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(139, 148, 255, .24);
  background: linear-gradient(180deg, rgba(126, 136, 255, .12), rgba(255, 255, 255, .045));
}
.autonomous-head { display: flex; align-items: center; justify-content: space-between; color: #c9ceff; font-size: 12px; }
.autonomous-head em { font-style: normal; color: #9aa3b5; }
.autonomous-plan-card h4 { margin: 8px 0 6px; color: #fff; font-size: 15px; }
.autonomous-plan-card p { margin: 4px 0; color: #c4ccda; font-size: 12px; line-height: 1.65; }
.autonomous-strategy { color: #aeb8ca !important; }
.autonomous-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 9px 0; }
.autonomous-meta span { padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.07); color: #d8deea; font-size: 11px; }
.autonomous-progress { height: 7px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.08); margin-top: 10px; }
.autonomous-progress span { display: block; height: 100%; background: var(--premium-gradient); transition: width .25s ease; }
.agent-round-progress { display: grid; gap: 4px; margin-top: 8px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.06); font-size: 11px; color: #c8d0df; }
.agent-round-progress b { color: #f0f3fb; }
.autonomous-batches { display: grid; gap: 8px; max-height: 220px; overflow: auto; margin: 10px 0; padding: 8px; list-style: none; border-radius: 12px; background: rgba(4,6,10,.18); }
.autonomous-batches li { display: grid; gap: 3px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.07); }
.autonomous-batches li:last-child { border-bottom: 0; padding-bottom: 0; }
.autonomous-batches b { color: #eef2ff; font-size: 12px; }
.autonomous-batches span, .autonomous-batches small { color: #9fa8b9; font-size: 11px; line-height: 1.5; }
.autonomous-risk { display: grid; gap: 4px; margin: 10px 0; color: #9fa8b9; font-size: 11px; }
.autonomous-risk b { color: #d8deea; }
.autonomous-actions { display: flex; gap: 8px; margin-top: 10px; }
.autonomous-status { color: #9aa3b5 !important; font-weight: 650; }
.typing-row { display: flex; align-items: center; gap: 8px; }
.chat-stop-inline {
  margin-top: 10px;
  padding: 6px 12px;
  border: 1px solid rgba(251, 113, 133, .38);
  border-radius: 999px;
  background: rgba(251, 113, 133, .14);
  color: #fecdd3;
  font-size: 12px;
  cursor: pointer;
}
.chat-stop-inline:hover:not(:disabled) { background: rgba(251, 113, 133, .24); }
.chat-stop-inline:disabled { cursor: default; opacity: .72; }

