:root {
  color-scheme: dark;
  --bg: #14121c;
  --panel: #1c1a28;
  --panel-2: #28243a;
  --line: #48425c;
  --text: #edf1f7;
  --muted: #9ca8c4;
  --green: #0abab5;
  --accent: #0abab5;
  --red: #ff6f78;
  --amber: #ffc85c;
  --blue: #7ca8ff;
  --teal: #0abab5;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(128, 104, 170, 0.12), transparent 32%),
    radial-gradient(circle at 82% 0%, rgba(10, 186, 181, 0.045), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans TC", "PingFang TC", sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

.secure-screen-blocker {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 35%, rgba(80, 71, 101, 0.58), transparent 32%),
    rgba(20, 18, 28, 0.94);
  color: var(--text);
  text-align: center;
  backdrop-filter: blur(14px);
}

.secure-screen-blocker[hidden] {
  display: none !important;
}

.secure-screen-blocker strong {
  display: block;
  max-width: 560px;
  border: 1px solid rgba(80, 71, 101, 0.92);
  border-radius: 10px;
  padding: 24px 28px;
  background: rgba(28, 26, 40, 0.92);
  color: var(--text);
  font-size: 22px;
  font-weight: 950;
  line-height: 1.45;
  box-shadow: 0 28px 88px rgba(0, 0, 0, 0.45);
}

body.secure-privacy-mask::after {
  position: fixed;
  inset: 0;
  z-index: 998;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 34%, rgba(80, 71, 101, 0.62), transparent 30%),
    rgba(20, 18, 28, 0.96);
  color: var(--text);
  font-size: 24px;
  font-weight: 950;
  text-align: center;
  content: "TradeClaw 保護視圖";
  backdrop-filter: blur(16px);
}

body.light-theme.secure-privacy-mask::after {
  background:
    radial-gradient(circle at 50% 34%, rgba(111, 102, 137, 0.38), transparent 30%),
    rgba(244, 248, 252, 0.96);
  color: #111827;
  content: "TradeClaw 保護視圖";
}

@media print {
  body > * {
    display: none !important;
  }

  body::before {
    display: block !important;
    padding: 48px;
    color: #111827;
    font: 700 24px/1.5 system-ui, sans-serif;
    content: "TradeClaw protected content. Printing is blocked.";
  }
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
  position: relative;
  transition:
    transform 140ms ease,
    filter 140ms ease,
    border-color 140ms ease,
    background-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease,
    opacity 140ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
}

button:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: #6e687e;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  filter: brightness(1.04);
}

button:not(:disabled):active {
  transform: translateY(1px) scale(0.985);
  box-shadow: none;
  filter: brightness(0.94);
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(10, 186, 181, 0.7);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  filter: none;
  box-shadow: none;
}

[hidden] {
  display: none !important;
}

button.is-clicked:not(:disabled),
[role="button"].is-clicked,
.notification-grid label.is-clicked {
  animation: click-feedback 260ms ease;
}

button.copied {
  border-color: rgba(10, 186, 181, 0.72) !important;
  color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(10, 186, 181, 0.16);
}

@keyframes click-feedback {
  0% {
    box-shadow: 0 0 0 0 rgba(10, 186, 181, 0.36);
  }

  100% {
    box-shadow: 0 0 0 8px rgba(10, 186, 181, 0);
  }
}

.mini-toast {
  position: fixed;
  left: var(--toast-left, 50%);
  top: var(--toast-top, 50%);
  z-index: 80;
  display: grid;
  min-width: 92px;
  min-height: 34px;
  place-items: center;
  border: 1px solid rgba(10, 186, 181, 0.42);
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(20, 18, 28, 0.94);
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px) scale(0.98);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34);
}

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

.app-alert-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(8, 9, 14, 0.48);
  backdrop-filter: blur(6px);
}

.app-alert-backdrop[hidden] {
  display: none !important;
}

.app-alert-card {
  width: min(360px, 100%);
  border: 1px solid rgba(10, 186, 181, 0.28);
  border-radius: 8px;
  padding: 24px 24px 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    #1c1a28;
  color: var(--text);
  text-align: center;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.42);
}

.app-alert-card p {
  margin: 0 0 20px;
  color: var(--text);
  font-size: 17px;
  font-weight: 950;
  line-height: 1.5;
  white-space: pre-line;
}

.app-alert-card .primary-button {
  width: 100%;
  min-height: 44px;
  border-radius: 999px;
  background: #0abab5;
  color: #052f34;
  font-weight: 950;
}

.app-alert-card .ghost-button {
  width: 100%;
  min-height: 42px;
  margin-top: 10px;
}

input {
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background-color 140ms ease;
}

input:focus {
  border-color: rgba(10, 186, 181, 0.7);
  box-shadow: 0 0 0 3px rgba(10, 186, 181, 0.1);
}

.splash-screen,
.auth-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(10, 186, 181, 0.12), transparent 36%),
    linear-gradient(315deg, rgba(128, 104, 170, 0.12), transparent 40%),
    var(--bg);
  z-index: 20;
}

.splash-screen {
  align-content: center;
  gap: 14px;
  transition:
    opacity 420ms ease,
    visibility 420ms ease;
}

.splash-screen h1 {
  font-size: clamp(42px, 8vw, 86px);
}

.splash-claw {
  width: clamp(142px, 20vw, 260px);
  height: clamp(142px, 20vw, 260px);
  object-fit: contain;
  filter: drop-shadow(0 30px 60px rgba(255, 70, 38, 0.22));
  animation: splash-claw-pulse 2.6s ease-in-out infinite;
}

.splash-line {
  width: min(320px, 64vw);
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: #4b445e;
}

.splash-line::after {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  content: "";
  animation: scan-line 1100ms ease-in-out infinite;
}

@keyframes splash-claw-pulse {
  0%,
  100% {
    transform: translateY(0) scale(0.98);
    opacity: 0.88;
  }

  50% {
    transform: translateY(-10px) scale(1.03);
    opacity: 1;
  }
}

@keyframes scan-line {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(260%);
  }
}

.auth-screen {
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 460px);
  gap: clamp(24px, 7vw, 86px);
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 280ms ease,
    transform 280ms ease,
    visibility 280ms ease;
}

.auth-brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  max-width: 650px;
  text-align: left;
}

.auth-claw {
  width: clamp(132px, 17vw, 220px);
  height: clamp(132px, 17vw, 220px);
  object-fit: contain;
  filter: drop-shadow(0 24px 45px rgba(255, 70, 38, 0.2));
  animation: auth-claw-float 4.8s ease-in-out infinite;
}

.auth-brand strong,
.auth-brand span {
  display: block;
}

.auth-brand-copy {
  display: grid;
  width: max-content;
  max-width: 100%;
  gap: 8px;
}

.auth-brand strong {
  font-size: clamp(44px, 6vw, 76px);
  line-height: 0.94;
}

.auth-brand span,
.auth-copy {
  color: var(--muted);
}

.typing-line {
  --type-width: 19em;
  position: relative;
  width: 0;
  max-width: min(100%, var(--type-width));
  overflow: hidden;
  white-space: nowrap;
  color: var(--muted);
  font-size: clamp(14px, 1.15vw, 18px);
  font-weight: 800;
  animation: auth-type 5.8s steps(19, end) infinite;
}

.auth-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.auth-card-head h1 {
  margin: 0;
}

.auth-mode-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(64px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 16, 25, 0.88);
}

.auth-mode-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.auth-mode-tabs button.active {
  background: var(--accent);
  color: #061b21;
  box-shadow: 0 8px 18px rgba(10, 186, 181, 0.22);
}

@keyframes auth-claw-float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-12px) rotate(1deg);
  }
}

@keyframes auth-type {
  0%,
  12% {
    width: 0;
    opacity: 1;
  }

  58%,
  84% {
    width: var(--type-width);
    opacity: 1;
  }

  85%,
  100% {
    width: var(--type-width);
    opacity: 0;
  }
}

.auth-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: rgba(20, 23, 29, 0.94);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.auth-card h1 {
  margin-bottom: 10px;
  font-size: 34px;
}

.auth-copy {
  line-height: 1.55;
}

body.is-loading .app-shell,
body:not(.is-authenticated) .app-shell,
body.is-authenticated .auth-screen {
  display: none;
}

body.is-booted .splash-screen {
  visibility: hidden;
  opacity: 0;
}

body.is-booted:not(.is-authenticated) .auth-screen {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

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

.rail {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: #171523;
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #686179;
  border-radius: 8px;
  background: linear-gradient(135deg, #0abab5, #243f7d 60%, #3c2d69);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.muted,
.eyebrow,
.disclaimer {
  color: var(--muted);
}

.identity-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.identity-card:hover,
.identity-card:focus-visible {
  border-color: rgba(10, 186, 181, 0.54);
  background: #1d1b29;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  outline: none;
  transform: translateY(-1px);
}

.identity-card:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: none;
}

.user-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #686179;
  border-radius: 8px;
  background: linear-gradient(135deg, #0abab5, #243f7d 60%, #3c2d69);
  color: #fff;
  font-weight: 900;
}

.user-avatar.large {
  width: 72px;
  height: 72px;
  font-size: 26px;
}

.identity-main {
  display: block;
  padding-right: 50px;
  min-width: 0;
}

.identity-main > div {
  min-width: 0;
}

.identity-main strong,
.identity-main span,
.identity-stats {
  display: block;
}

.identity-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-main span,
.identity-stats {
  color: var(--muted);
  font-size: 13px;
}

.identity-stats {
  display: grid;
  grid-column: 1 / -1;
  justify-items: start;
  gap: 2px;
  line-height: 1.45;
  text-align: left;
}

.identity-stats span {
  display: block;
}

.account-expiry-line {
  margin-top: 0;
  color: var(--text);
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

.plan-tag {
  position: absolute;
  top: 14px;
  right: 12px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  max-width: 56px;
  min-height: 26px;
  border: 1px solid rgba(10, 186, 181, 0.34);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(10, 186, 181, 0.12);
  color: var(--green) !important;
  font-size: 10px !important;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease;
}

.nav-item span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
}

button.nav-item.active,
button.nav-item:not(:disabled):hover,
button.nav-item:focus-visible {
  border-color: var(--line);
  background: var(--panel);
  color: var(--text);
  outline: none;
}

button.nav-item:not(:disabled):hover,
button.nav-item:focus-visible {
  transform: translateX(2px);
  box-shadow: inset 3px 0 0 rgba(10, 186, 181, 0.42), 0 10px 22px rgba(0, 0, 0, 0.18);
}

button.nav-item:not(:disabled):active {
  transform: translateX(1px) scale(0.99);
  box-shadow: inset 3px 0 0 rgba(10, 186, 181, 0.32);
}

button.nav-item.active {
  box-shadow: inset 3px 0 0 rgba(10, 186, 181, 0.48);
}

.history-panel {
  display: grid;
  min-height: 0;
  gap: 10px;
  border-bottom: 1px solid rgba(42, 48, 58, 0.72);
  padding-bottom: 12px;
}

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.history-head button {
  display: grid;
  width: 30px;
  height: 30px;
  min-height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.history-head button:not(:disabled):hover,
.history-head button:not(:disabled):focus-visible {
  border-color: rgba(10, 186, 181, 0.44);
  background: #201d2c;
  color: var(--text);
}

.history-list {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: min(24vh, 260px);
  overflow: auto;
  padding-right: 4px;
}

.history-list button {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 68px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  align-content: center;
}

.history-list button:not(:disabled):hover,
.history-list button:not(:disabled):focus-visible {
  border-color: var(--line);
  background: var(--panel);
  color: #c9d2e5;
  outline: none;
  transform: translateX(2px);
}

.history-list button:not(:disabled):active {
  transform: translateX(1px) scale(0.99);
}

.history-list strong,
.history-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.history-list strong {
  display: block;
  max-width: 100%;
  color: inherit;
  line-height: 1.18;
  font-size: clamp(14px, 1.04vw, 16px);
  letter-spacing: 0;
  font-weight: 800;
}

.history-list small {
  display: block;
  max-width: 100%;
  color: #8390aa;
  font-size: 12px;
  line-height: 1.35;
}

.history-list button:not(:disabled):hover small,
.history-list button:not(:disabled):focus-visible small {
  color: #a8b4cc;
}

.assistant-history-button.is-active {
  border-color: rgba(10, 186, 181, 0.58);
  background: rgba(10, 186, 181, 0.14);
  color: var(--accent);
}

.assistant-history-drawer {
  position: absolute;
  top: 74px;
  right: 18px;
  z-index: 12;
  display: grid;
  width: min(360px, calc(100% - 36px));
  max-height: min(440px, calc(100% - 96px));
  gap: 10px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(24, 22, 34, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.assistant-history-drawer[hidden] {
  display: none !important;
}

.assistant-history-drawer .history-list {
  max-height: 340px;
}

.account-panel {
  margin-top: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.account-page {
  padding: 18px;
}

.account-page-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.account-page-grid[hidden] {
  display: none !important;
}

.account-page-grid article {
  min-height: 138px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #1c1a28;
}

.account-page-grid .admin-tc-card {
  grid-column: 1 / -1;
  min-height: 0;
}

.compact-head {
  margin-bottom: 12px;
}

.admin-tc-forms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-tc-form {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(78, 70, 100, 0.72);
  border-radius: 8px;
  background: rgba(16, 14, 24, 0.46);
}

.admin-tc-form input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  background: #15131f;
  color: var(--text);
}

.account-profile-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.account-page-grid span,
.account-page-grid small {
  display: block;
  color: var(--muted);
}

.account-page-grid strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 24px;
}

.account-page-grid small {
  margin-top: 8px;
  line-height: 1.5;
}

.account-page-grid button {
  margin-top: 10px;
  min-height: 38px;
}

.danger-button {
  border-color: rgba(255, 111, 120, 0.34) !important;
  color: var(--red) !important;
}

.account-drawer {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #191724;
}

.account-drawer > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.account-drawer div:not(.account-action-grid) {
  display: grid;
  gap: 2px;
}

.account-drawer strong,
.account-drawer small {
  display: block;
}

.account-drawer strong {
  color: var(--muted);
  font-size: 12px;
}

.account-drawer small {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.account-action-grid button {
  min-height: 34px;
  padding: 0 8px;
  font-size: 13px;
}

.auth-form,
.account-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.auth-form input {
  min-height: 38px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #111019;
  color: var(--text);
}

.auth-form div,
.account-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-form button,
.account-actions button {
  width: 100%;
  min-height: 36px;
  padding: 0 8px;
}

.email-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.email-code-row[hidden] {
  display: none !important;
}

#authReferralCode[hidden] {
  display: none !important;
}

.google-button {
  border-color: #686179;
  background: #15131f;
}

#authHint {
  color: var(--muted);
  line-height: 1.4;
}

.workspace {
  display: grid;
  align-content: start;
  gap: 18px;
  height: 100vh;
  overflow: auto;
  padding: 24px;
}

.topbar,
.stage-header,
.panel-head,
.section-head,
.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar.is-minimal {
  justify-content: flex-end;
}

.topbar-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-left: auto;
  max-width: 100%;
}

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

.eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 4vw, 54px);
  line-height: 1;
}

.workspace-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
}

.workspace-brand-block {
  display: flex;
  align-items: center;
}

.workspace-heading.is-brand {
  align-items: center;
  gap: clamp(10px, 1.2vw, 16px);
  min-height: clamp(48px, 4.6vw, 66px);
}

.workspace-brand-icon {
  display: none;
  width: clamp(42px, 4vw, 62px);
  height: clamp(42px, 4vw, 62px);
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
}

.workspace-heading.is-brand .workspace-brand-icon {
  display: block;
  flex: 0 0 auto;
  width: clamp(43px, 4.1vw, 59px);
  height: clamp(43px, 4.1vw, 59px);
}

.workspace-brand-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(4px, 0.42vw, 6px);
  width: max-content;
  max-width: min(54vw, 420px);
}

.workspace-title-text {
  display: block;
  color: var(--text);
  font-size: clamp(27px, 3.5vw, 49px);
  font-weight: 950;
  line-height: 0.82;
  letter-spacing: 0;
  white-space: nowrap;
}

.workspace-brand-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(4px, 0.42vw, 6px);
  width: 100%;
}

.workspace-brand-pills span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(16px, 1.25vw, 20px);
  border: 1px solid rgba(10, 186, 181, 0.44);
  border-radius: 999px;
  padding: 0 7px;
  background: rgba(10, 186, 181, 0.1);
  color: var(--muted);
  font-size: clamp(9px, 0.72vw, 11px);
  font-weight: 850;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

h2 {
  font-size: 18px;
}

.primary-button,
.ghost-button,
.icon-button,
.language-button,
.segmented button,
.link-button,
.google-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
}

.language-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 68px;
  padding: 0 12px;
  border-color: rgba(10, 186, 181, 0.42);
  background: rgba(10, 186, 181, 0.08);
  color: var(--text);
  font-weight: 800;
}

.language-button b {
  color: var(--accent);
  font-size: 13px;
}

.language-button span {
  font-size: 14px;
}

.language-button:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 26px rgba(10, 186, 181, 0.14);
}

body[data-language="en"] .language-button span {
  color: var(--accent);
}

body[data-language="en"] .language-button b {
  color: var(--text);
}

.primary-button {
  padding: 0 16px;
  border-color: #2fa9a6;
  background: #087c7a;
  font-weight: 700;
}

button.primary-button:not(:disabled):hover {
  border-color: #0abab5;
  background: #0a918d;
  box-shadow: 0 12px 28px rgba(10, 186, 181, 0.18);
}

button.primary-button:not(:disabled):active {
  background: #066866;
}

.ghost-button {
  padding: 0 12px;
}

button.ghost-button:not(:disabled):hover,
button.google-button:not(:disabled):hover,
button.link-button:not(:disabled):hover {
  background: #343044;
}

button.ghost-button:not(:disabled):active,
button.google-button:not(:disabled):active,
button.link-button:not(:disabled):active {
  background: #1e1b2a;
}

.link-button {
  background: transparent;
  color: var(--muted);
}

.icon-button {
  width: 38px;
}

.notification-entry {
  position: relative;
  display: inline-grid;
  place-items: center;
}

.notification-entry-symbol {
  color: var(--accent);
  font-size: 12px;
  line-height: 1;
}

.notification-entry-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--panel-2);
  border-radius: 999px;
  background: var(--accent);
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.notification-entry.has-unread .notification-entry-dot {
  opacity: 1;
  transform: scale(1);
}

button.icon-button:not(:disabled):hover,
button.icon-button:focus-visible {
  border-color: rgba(10, 186, 181, 0.44);
  color: var(--text);
}

button.icon-button:not(:disabled):active {
  background: #191724;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
  gap: 18px;
}

.market-stage,
.decision-panel,
.session-planner,
.signals-list,
.assistant-panel,
.backtest-panel,
.risk-panel,
.membership-panel,
.academy-panel,
.billing-panel,
.telegram-panel,
.method-panel,
.analytics-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.market-stage {
  min-height: 440px;
  padding: 18px;
  overflow: hidden;
}

.stage-header {
  margin-bottom: 12px;
}

.stage-header strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.status-live {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(10, 186, 181, 0.14);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.tradingview-chart {
  position: relative;
  display: block;
  width: 100%;
  height: min(48vw, 360px);
  min-height: 260px;
  border-radius: 8px;
  overflow: hidden;
  background: #15131f;
}

.tradingview-chart::before {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  color: var(--muted);
  font-size: 13px;
  content: attr(data-symbol);
  pointer-events: none;
}

.tradingview-chart::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  content: "正在載入行情數據...";
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(10, 186, 181, 0.08), transparent),
    #111019;
  background-size: 220% 100%;
  animation: chart-scan 1.45s ease-in-out infinite;
}

.tradingview-chart.chart-loading::after {
  display: grid;
}

.lightweight-chart-host {
  width: 100%;
  height: 100%;
}

.chart-error {
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--muted);
}

@keyframes chart-scan {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

.ticker-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.ticker {
  position: relative;
  display: block;
  min-height: 70px;
  padding: 12px 34px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1c1a28;
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease;
}

.ticker:hover,
.ticker:focus-visible,
.ticker.selected {
  border-color: #6e687e;
  background: #28243a;
  outline: none;
}

.ticker.selected {
  box-shadow: inset 0 0 0 1px rgba(10, 186, 181, 0.28);
}

.ticker:hover,
.ticker:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.ticker:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: inset 0 0 0 1px rgba(10, 186, 181, 0.2);
}

.ticker span,
.ticker small {
  display: block;
  color: var(--muted);
}

.ticker strong {
  display: block;
  margin: 4px 0;
}

.favorite-button {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 18px;
  height: 18px;
  min-height: 18px;
  place-items: center;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: transparent;
  font-size: 18px;
  line-height: 1;
  -webkit-text-stroke: 1.4px #6e687e;
  opacity: 0;
}

.ticker:hover .favorite-button,
.favorite-button.favorite,
.favorite-button:focus-visible {
  opacity: 1;
}

button.favorite-button:not(:disabled):hover,
button.favorite-button:focus-visible {
  color: transparent;
  -webkit-text-stroke: 1.4px var(--green);
  transform: scale(1.12);
  box-shadow: none;
}

.favorite-button.favorite {
  background: transparent;
  color: var(--green);
  -webkit-text-stroke: 0;
}

button.favorite-button:not(:disabled):active {
  transform: scale(0.9);
}

.favorite-display {
  min-height: 38px;
  min-width: 82px;
  border: 1px solid rgba(10, 186, 181, 0.34);
  border-radius: 8px;
  padding: 8px 12px;
  background: rgba(10, 186, 181, 0.1);
  color: var(--green);
  font-weight: 900;
  text-align: center;
}

.up {
  color: var(--green);
}

.down {
  color: var(--red);
}

.decision-panel {
  position: relative;
  display: grid;
  align-content: start;
  gap: 22px;
  padding: 18px;
}

.panel-head strong {
  color: var(--green);
}

.signal-generated {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.signal-private {
  display: grid;
  gap: 22px;
}

.signal-private[hidden],
.signal-lock[hidden] {
  display: none !important;
}

#signalCards[hidden] {
  display: none !important;
}

.signal-lock {
  display: grid;
  gap: 16px;
  min-height: 420px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(10, 186, 181, 0.08), transparent 34%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 8px, transparent 8px 16px),
    #1c1a28;
}

.strategy-board-shell {
  position: relative;
  min-height: 520px;
}

.strategy-board-shell.locked #signalCards {
  filter: blur(3px);
  opacity: 0.34;
  pointer-events: none;
  user-select: none;
}

.strategy-board-shell.locked .strategy-lock {
  position: absolute;
  inset: 0;
  z-index: 3;
  min-height: 100%;
  backdrop-filter: blur(5px);
  background:
    linear-gradient(135deg, rgba(10, 186, 181, 0.11), transparent 34%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 8px, transparent 8px 16px),
    rgba(17, 22, 28, 0.9);
}

.lock-copy span,
.lock-copy small,
.lock-metrics span {
  color: var(--muted);
}

.lock-copy strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.lock-copy p {
  margin-top: 8px;
  color: var(--green);
}

.lock-copy small {
  display: block;
  margin-top: 10px;
  line-height: 1.55;
}

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

.lock-metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(13, 17, 22, 0.74);
}

.lock-metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  color: var(--green);
}

.lock-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.signal-meter {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  align-items: center;
}

.macro-grid {
  display: grid;
  gap: 12px;
}

.macro-card {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #1c1a28;
}

.macro-ring {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #1c1a28 55%, transparent 57%),
    conic-gradient(var(--green) 0 calc(var(--value) * 1%), #504a60 0 100%);
}

.macro-ring span {
  font-size: 22px;
  font-weight: 900;
}

.macro-event-card {
  grid-template-columns: 86px minmax(0, 1fr);
}

.macro-event-badge {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 1px solid rgba(10, 186, 181, 0.42);
  border-radius: 8px;
  background: rgba(10, 186, 181, 0.12);
  color: var(--green);
  font-size: 20px;
  font-weight: 950;
}

.macro-event-badge span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.macro-card span {
  display: block;
  color: var(--muted);
}

.macro-card strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.macro-note {
  color: #c8d0dc;
  line-height: 1.55;
}

.macro-note-accent {
  color: var(--accent);
  font-weight: 950;
}

.meter-ring {
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--panel) 56%, transparent 58%),
    conic-gradient(var(--green) 0 74%, #504a60 74% 100%);
}

.meter-ring span,
.meter-ring small {
  grid-area: 1 / 1;
}

.meter-ring span {
  font-size: 31px;
  font-weight: 800;
}

.meter-ring small {
  margin-top: 52px;
  color: var(--muted);
}

.risk-chip {
  display: inline-block;
  margin-top: 14px;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(10, 186, 181, 0.14);
  color: var(--green);
  font-size: 13px;
}

.trade-levels {
  display: grid;
  gap: 10px;
  margin: 0;
}

.trade-levels div {
  display: flex;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1c1a28;
}

.signal-card.is-blurred {
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
}

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

.trade-levels dd {
  margin: 0;
  font-weight: 800;
}

.controls-strip {
  display: grid;
  grid-template-columns: auto auto minmax(240px, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-group > span,
.control-group label {
  color: var(--muted);
  white-space: nowrap;
}

.control-group.wide {
  justify-content: flex-end;
}

.control-group input {
  width: min(280px, 40vw);
  accent-color: var(--teal);
}

.segmented {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.segmented button {
  min-width: 62px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.segmented button.active {
  background: #3d374e;
  color: var(--text);
}

.segmented button:not(:disabled):hover,
.segmented button:focus-visible {
  transform: none;
  background: #302b40;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(82, 96, 113, 0.52);
  outline: none;
}

.segmented button:not(:disabled):active {
  transform: scale(0.975);
  background: #363145;
  box-shadow: inset 0 0 0 1px rgba(10, 186, 181, 0.34);
}

.segmented button.active:not(:disabled):hover,
.segmented button.active:focus-visible {
  background: #4a4358;
}

.segmented.compact button {
  min-width: 45px;
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: stretch;
}

.content-grid[data-page="signals"] {
  grid-template-columns: 1fr;
}

.analyzer-page {
  display: block;
}

.session-planner,
.signals-list,
.assistant-panel,
.backtest-panel,
.risk-panel,
.membership-panel,
.academy-panel,
.billing-panel,
.telegram-panel,
.method-panel,
.analytics-panel {
  padding: 18px;
}

.view-section[hidden] {
  display: none !important;
}

.backtest-grid,
.risk-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

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

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

.backtest-grid article,
.risk-grid article {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #1c1a28;
}

.backtest-grid .backtest-stat-card {
  display: grid;
  place-items: center;
  text-align: center;
}

.backtest-grid .backtest-stat-card strong {
  margin: 0;
  color: var(--green);
  font-size: clamp(42px, 5vw, 72px);
  line-height: 1;
}

.backtest-grid .backtest-stat-card span {
  font-size: 18px;
  font-weight: 900;
}

.backtest-grid .backtest-community-card,
.backtest-grid .backtest-period-card {
  display: grid;
  align-content: center;
  gap: 14px;
}

.backtest-grid .backtest-community-card strong {
  margin: 0;
}

.period-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.period-options button {
  min-height: 42px;
  border: 1px solid rgba(20, 191, 187, 0.45);
  border-radius: 999px;
  background: rgba(20, 191, 187, 0.08);
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.period-options button.is-active {
  background: rgba(20, 191, 187, 0.18);
  color: var(--accent);
  box-shadow: 0 0 0 1px rgba(20, 191, 187, 0.45) inset;
}

.period-options button:not(.is-active):hover,
.period-options button:focus-visible {
  color: var(--text);
  border-color: var(--accent);
}

.backtest-grid span,
.risk-grid span {
  color: var(--muted);
}

.backtest-grid strong,
.risk-grid strong {
  display: block;
  margin: 10px 0;
  line-height: 1.35;
}

.backtest-grid p,
.risk-grid p {
  color: var(--muted);
  line-height: 1.55;
}

.history-table {
  display: grid;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.history-table > div {
  display: grid;
  grid-template-columns: 1.15fr 1fr 0.65fr 0.85fr 0.7fr 0.75fr 0.9fr;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: #191724;
}

.history-table > div:first-child {
  background: #1f1d2b;
  color: var(--muted);
  font-weight: 800;
}

.history-table > div:last-child {
  border-bottom: 0;
}

.history-table .backtest-state {
  font-weight: 900;
}

.history-table .backtest-state.state-profit {
  color: var(--green);
}

.history-table .backtest-state.state-loss {
  color: var(--red);
}

.history-table .backtest-state.state-pending {
  color: var(--muted);
}

.history-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px 0 0;
}

.history-pagination[hidden] {
  display: none;
}

.history-pagination button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #211d2d;
  color: var(--text);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.history-pagination button:not(:disabled):hover,
.history-pagination button:not(:disabled):focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

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

.history-pagination span {
  min-width: 72px;
  text-align: center;
  color: var(--muted);
  font-weight: 900;
}

.executor-lock {
  margin-top: 14px;
  border: 1px solid rgba(10, 186, 181, 0.34);
  border-radius: 8px;
  padding: 16px;
  background:
    repeating-linear-gradient(135deg, rgba(10, 186, 181, 0.04) 0 8px, transparent 8px 16px),
    #1c1a28;
}

.executor-lock strong {
  display: block;
  font-size: 22px;
}

.executor-lock p {
  margin-top: 10px;
  color: #c8d0dc;
  line-height: 1.6;
}

.locked-grid {
  opacity: 0.72;
}

.executor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.executor-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 16, 27, 0.58);
}

.executor-api-card {
  position: relative;
  align-content: start;
}

.executor-api-card .executor-api-detail {
  grid-column: auto;
  margin-top: 0;
  padding: 0;
  border: 0;
  border-color: rgba(10, 186, 181, 0.38);
  background: transparent;
}

.executor-api-detail {
  grid-column: 1 / -1;
  align-content: start;
}

.executor-api-detail #executorBackButton {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
}

.executor-order-card {
  grid-column: 1 / -1;
}

.executor-risk-card {
  grid-column: 1 / -1;
}

.executor-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.risk-card-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.risk-save-button {
  min-height: 36px;
  padding: 8px 18px;
  border: 1px solid rgba(10, 186, 181, 0.52);
  border-radius: 999px;
  background: rgba(10, 186, 181, 0.16);
  color: var(--accent);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.risk-save-button:hover {
  background: rgba(10, 186, 181, 0.24);
}

.executor-card-head span,
.executor-output small,
.executor-binding-row span,
.executor-binding-row small {
  color: var(--muted);
  font-weight: 800;
}

.executor-card-head strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.executor-steps {
  display: grid;
  grid-template-columns: max-content minmax(34px, 1fr) max-content minmax(34px, 1fr) max-content;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 650;
}

.executor-steps span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.executor-steps b {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(72, 66, 94, 0.72);
  color: var(--muted);
  font-size: 15px;
}

.executor-steps i {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: rgba(84, 78, 108, 0.68);
}

.executor-steps .is-active {
  color: var(--green);
}

.executor-steps .is-active b,
.executor-steps .is-complete b {
  background: var(--green);
  color: #071516;
}

.executor-exchange-list {
  display: grid;
  gap: 16px;
}

.executor-provider-group {
  display: grid;
  gap: 10px;
}

.executor-provider-group > span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0;
}

.executor-exchange-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) max-content;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid rgba(10, 186, 181, 0.18);
  border-radius: 8px;
  background: rgba(31, 40, 62, 0.72);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.executor-exchange-card:hover,
.executor-exchange-card:focus-visible,
.executor-exchange-card.is-active {
  transform: translateY(-1px);
  border-color: rgba(10, 186, 181, 0.78);
  background: rgba(28, 49, 75, 0.9);
}

.executor-exchange-card.is-reserved {
  border-color: rgba(84, 78, 108, 0.56);
  background: rgba(28, 26, 40, 0.66);
  color: rgba(174, 184, 210, 0.58);
}

.executor-exchange-card.is-reserved .executor-exchange-icon {
  background: rgba(42, 47, 64, 0.76);
  color: rgba(174, 184, 210, 0.42);
}

.executor-exchange-card.is-reserved em {
  border-color: rgba(84, 78, 108, 0.72);
  color: rgba(174, 184, 210, 0.58);
}

.executor-exchange-card.is-reserved:hover,
.executor-exchange-card.is-reserved:focus-visible {
  transform: none;
  border-color: rgba(84, 78, 108, 0.72);
  background: rgba(28, 26, 40, 0.78);
}

.executor-exchange-card.is-disabled {
  cursor: not-allowed;
  opacity: 0.44;
  transform: none;
}

.executor-exchange-card strong {
  display: block;
  font-size: 19px;
  font-weight: 760;
}

.executor-exchange-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 650;
}

.executor-exchange-card em {
  justify-self: end;
  min-width: 76px;
  padding: 8px 12px;
  border: 1px solid rgba(10, 186, 181, 0.6);
  border-radius: 8px;
  color: var(--green);
  font-style: normal;
  font-weight: 760;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  word-break: keep-all;
  writing-mode: horizontal-tb;
}

.executor-exchange-icon,
.executor-selected-provider > span {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(10, 186, 181, 0.28), rgba(42, 54, 96, 0.82));
  color: var(--green);
  font-size: 24px;
  font-weight: 950;
}

.executor-provider-select {
  display: none;
}

.executor-selected-provider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(10, 186, 181, 0.28);
  border-radius: 8px;
  background: rgba(10, 186, 181, 0.08);
}

.executor-selected-provider strong,
.executor-help strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  font-weight: 650;
}

.executor-selected-provider small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 650;
}

.executor-help {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(11, 10, 16, 0.26);
}

.executor-help ol {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: executor-help;
}

.executor-help li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.executor-help li::before {
  counter-increment: executor-help;
  content: counter(executor-help);
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(10, 186, 181, 0.14);
  color: var(--green);
  font-size: 13px;
  font-weight: 950;
}

.executor-form,
.executor-provider-fields,
.executor-actions {
  display: grid;
  gap: 10px;
}

.executor-form.compact {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.executor-form.risk-form {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
}

.executor-form.risk-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 760;
}

.executor-form.risk-form label > span {
  font-size: 0.82rem;
}

.executor-form.risk-form .risk-toggle {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15131f;
}

.executor-form.risk-form .risk-toggle input {
  width: auto;
  min-height: auto;
  margin-right: 8px;
}

.executor-form input,
.executor-form select,
.executor-actions select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #15131f;
  color: var(--text);
  font: inherit;
  font-weight: 500;
}

.executor-form input::placeholder {
  color: rgba(174, 184, 210, 0.68);
  font-weight: 500;
}

.executor-form input:focus,
.executor-form select:focus,
.executor-actions select:focus {
  outline: 0;
  border-color: rgba(10, 186, 181, 0.58);
}

.executor-form button,
.executor-actions button {
  min-height: 44px;
}

.executor-form > button[type="submit"] {
  border-color: rgba(10, 186, 181, 0.72);
  background: var(--green);
  color: #071516;
  font-weight: 760;
}

.executor-form > button[type="submit"]:hover,
.executor-form > button[type="submit"]:focus-visible {
  border-color: rgba(10, 186, 181, 0.95);
  box-shadow: 0 12px 28px rgba(10, 186, 181, 0.18);
}

.executor-actions {
  grid-template-columns: minmax(0, 1fr) repeat(3, auto);
  align-items: center;
}

.executor-query-card {
  display: grid;
  align-content: start;
  gap: 14px;
}

.executor-portfolio {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
  gap: 16px;
  align-items: center;
  min-height: 180px;
  border: 1px solid rgba(10, 186, 181, 0.24);
  border-radius: 8px;
  padding: 16px;
  background: rgba(10, 186, 181, 0.06);
}

.executor-portfolio-copy span,
.executor-portfolio-copy small,
.executor-allocation-list span {
  display: block;
  color: var(--muted);
  font-weight: 760;
}

.executor-portfolio-copy strong {
  display: block;
  margin: 8px 0;
  color: var(--text);
  font-size: 32px;
  line-height: 1;
}

.executor-asset-metrics {
  display: grid;
  gap: 5px;
}

.executor-allocation {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.executor-pie {
  position: relative;
  display: grid;
  place-items: center;
  width: 118px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 22px;
  font-weight: 760;
  line-height: 1;
}

.executor-pie.is-empty {
  background: transparent;
}

.executor-pie::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--accent) 0 var(--pie-value, 0%), rgba(118, 111, 145, 0.5) var(--pie-value, 0%) 100%);
  -webkit-mask: radial-gradient(circle, transparent 0 48%, #000 49% 100%);
  mask: radial-gradient(circle, transparent 0 48%, #000 49% 100%);
}

.executor-pie.is-empty::before {
  background: conic-gradient(rgba(174, 184, 210, 0.18) 0% 100%);
}

.executor-pie span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transform: translateY(1px);
}

.executor-allocation-list {
  display: grid;
  gap: 8px;
}

.executor-allocation-list span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.executor-allocation-list i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.executor-bindings {
  display: grid;
  gap: 10px;
}

.executor-binding-row,
.executor-output {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(11, 10, 16, 0.3);
}

.executor-binding-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.executor-binding-row strong {
  display: block;
  font-size: 17px;
}

.executor-binding-row span,
.executor-binding-row small {
  display: block;
  margin-top: 4px;
}

.executor-binding-row .executor-binding-error {
  color: var(--danger);
  font-weight: 700;
  word-break: break-word;
}

.executor-form-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  word-break: break-word;
}

.executor-form-status.is-error {
  color: var(--danger);
}

.executor-form-status.is-success {
  color: var(--success);
}

.executor-form-status.is-loading {
  color: var(--accent);
}

.executor-output {
  min-height: 170px;
  overflow: auto;
  color: var(--muted);
}

.executor-risk-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
  max-width: 760px;
}

.executor-risk-summary div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 186, 181, 0.06);
}

.executor-risk-summary span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.executor-risk-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 1.05rem;
  color: var(--text);
}

.executor-output > strong {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 18px;
}

.executor-output-list {
  display: grid;
  gap: 8px;
}

.executor-output-list div {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.executor-output-list span,
.executor-output-list strong,
.executor-output-list small {
  overflow-wrap: anywhere;
}

.executor-empty {
  color: var(--muted);
  font-weight: 650;
}

.risk-workspace {
  display: grid;
}

.premium-pill {
  border: 1px solid rgba(10, 186, 181, 0.42);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(10, 186, 181, 0.12);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.premium-pill.small {
  padding: 5px 8px;
}

.risk-state-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  border: 1px solid rgba(10, 186, 181, 0.34);
  border-radius: 999px;
  background: rgba(10, 186, 181, 0.08);
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  cursor: default;
  user-select: none;
}

.risk-state-badge.is-stopped {
  border-color: rgba(228, 91, 120, 0.42);
  background: rgba(228, 91, 120, 0.1);
  color: #e45b78;
}

.records-head-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background-color 140ms ease,
    color 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.records-head-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 140ms ease;
}

.records-head-toggle:hover,
.records-head-toggle:focus-visible {
  border-color: rgba(10, 186, 181, 0.5);
  background: rgba(10, 186, 181, 0.12);
  color: var(--accent);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.records-head-toggle[aria-expanded="true"] {
  border-color: rgba(10, 186, 181, 0.58);
  background: rgba(10, 186, 181, 0.14);
  color: var(--accent);
}

.records-head-toggle[aria-expanded="true"]::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

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

.assistant-settings-button {
  min-height: 30px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.assistant-clear-button {
  min-height: 30px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.session-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.session-card {
  min-height: 154px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1c1a28;
}

.intel-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  min-height: 278px;
  padding: 12px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.intel-card:hover,
.intel-card:focus-visible {
  transform: translateY(-3px);
  border-color: #6e687e;
  background: #28243a;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.26);
  outline: none;
}

.intel-card:active {
  transform: translateY(-1px) scale(0.995);
}

.intel-thumb {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(72, 66, 92, 0.78);
  border-radius: 8px;
  background: #14121c;
}

.intel-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease, filter 180ms ease;
}

.intel-card:hover .intel-thumb img,
.intel-card:focus-visible .intel-thumb img {
  transform: scale(1.035);
  filter: brightness(1.08);
}

.intel-kind {
  position: absolute;
  top: 10px;
  left: 10px;
  border: 1px solid rgba(237, 241, 247, 0.18);
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(20, 18, 28, 0.72);
  color: #dce4f4 !important;
  font-size: 12px !important;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.intel-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid !important;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(237, 241, 247, 0.22);
  border-radius: 999px;
  padding-left: 3px;
  background: rgba(10, 186, 181, 0.82);
  color: #071013 !important;
  font-size: 16px !important;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
}

.intel-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.trade-data-visual {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2.15 / 1;
  height: min(30vw, 380px);
  min-height: 260px;
  max-height: 400px;
  overflow: hidden;
  border: 1px solid rgba(72, 66, 92, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(0deg, transparent 0 74px, rgba(144, 137, 166, 0.12) 75px 76px),
    repeating-linear-gradient(90deg, transparent 0 150px, rgba(144, 137, 166, 0.1) 151px 152px),
    #14121c;
}

.trade-chart-caption {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 16px;
  display: grid;
  gap: 3px;
  pointer-events: none;
}

.trade-chart-caption strong {
  color: #0abab5 !important;
  font-size: clamp(16px, 1.4vw, 22px);
  line-height: 1.05;
}

.trade-chart-caption span {
  color: #aeb8d2;
  font-size: 12px;
  font-weight: 800;
}

.trade-chart-host {
  position: absolute;
  inset: 0;
  padding-top: 30px;
}

.chart-placeholder {
  position: absolute;
  inset: 78px 7% 48px;
  display: grid;
  align-content: space-evenly;
}

.chart-placeholder span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: rgba(174, 184, 210, 0.16);
}

.chart-placeholder span:nth-child(2) {
  width: 82%;
}

.chart-placeholder span:nth-child(3) {
  width: 64%;
}

.chart-placeholder span:nth-child(4) {
  width: 76%;
}

.trade-data-visual svg,
.trade-data-visual canvas,
.trade-chart-host table {
  display: block;
  width: 100%;
  height: 100%;
}

.trade-data-visual svg > rect {
  fill: #14121c;
}

.ratio-snapshot {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 86px 7% 46px;
}

.ratio-snapshot-labels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 16px;
  color: #aeb8d2;
  font-size: clamp(17px, 1.8vw, 26px);
  font-weight: 900;
}

.ratio-snapshot-labels span:last-child {
  text-align: right;
}

.ratio-snapshot-labels strong {
  color: var(--accent);
  font-size: clamp(20px, 2.2vw, 34px);
  line-height: 1;
}

.ratio-snapshot-bar {
  display: flex;
  height: clamp(32px, 4vw, 58px);
  overflow: hidden;
  border: 1px solid rgba(10, 186, 181, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.ratio-snapshot-long {
  background: #0abab5;
}

.ratio-snapshot-short {
  background: rgba(174, 184, 210, 0.34);
}

.ratio-snapshot small {
  color: #8f98b4;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.chart-grid line {
  stroke: rgba(144, 137, 166, 0.22);
  stroke-width: 2;
}

.chart-grid text {
  fill: #7f89a6;
  font-size: 18px;
  font-weight: 800;
}

.chart-title {
  fill: #edf1f7;
  font-size: 32px;
  font-weight: 950;
}

.chart-subtitle {
  fill: #aeb8d2;
  font-size: 19px;
  font-weight: 800;
}

.chart-axis {
  fill: #8791aa;
  font-size: 18px;
  font-weight: 850;
}

.heatmap-layer {
  mix-blend-mode: screen;
}

.heatmap-cell {
  shape-rendering: crispEdges;
}

.chart-midline {
  stroke: rgba(237, 241, 247, 0.34);
  stroke-width: 3;
  stroke-dasharray: 8 9;
}

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

.chart-line.long {
  stroke: var(--accent);
}

.chart-line.short {
  stroke: #ff6b8a;
}

.chart-line.top-account {
  stroke: #0abab5;
  stroke-width: 4;
}

.chart-line.top-position {
  stroke: #7ea2ff;
  stroke-width: 4;
}

.chart-legend text {
  fill: #dce4f4;
  font-size: 20px;
  font-weight: 900;
}

.legend-long {
  fill: var(--accent);
}

.legend-short {
  fill: #ff6b8a;
}

.legend-top-account {
  fill: #0abab5;
}

.legend-top-position {
  fill: #7ea2ff;
}

.liq-bar.long {
  fill: var(--accent);
  opacity: 0.76;
}

.liq-bar.short {
  fill: #ff6b8a;
  opacity: 0.78;
}

.chart-empty text:first-child {
  fill: #edf1f7;
  font-size: 30px;
  font-weight: 950;
  text-anchor: middle;
}

.chart-empty text:last-child {
  fill: #aeb8d2;
  font-size: 22px;
  font-weight: 800;
  text-anchor: middle;
}

.trade-data-visual.official {
  place-items: center;
  text-align: center;
}

.trade-data-visual.official div {
  display: grid;
  gap: 8px;
}

.trade-data-visual.official span {
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
}

.trade-data-visual.official strong {
  color: var(--text);
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
}

.trade-data-visual.official small,
.trade-data-visual.ratio small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.trade-data-visual.ratio {
  align-content: center;
  gap: 18px;
  padding: 30px;
}

.trade-ratio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trade-ratio-head span {
  color: var(--text);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 950;
}

.trade-ratio-head strong {
  border: 1px solid rgba(10, 186, 181, 0.36);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--accent);
  font-size: 13px;
}

.trade-ratio-row {
  display: grid;
  grid-template-columns: 54px 76px 1fr;
  align-items: center;
  gap: 12px;
}

.trade-ratio-row span,
.trade-ratio-row b {
  color: var(--text);
  font-weight: 900;
}

.trade-ratio-row b {
  text-align: right;
}

.trade-ratio-row i {
  position: relative;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(93, 88, 112, 0.45);
}

.trade-ratio-row i::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--long) * 1%);
  border-radius: inherit;
  background: var(--accent);
  content: "";
}

.trade-ratio-row.short i::after {
  width: calc(var(--short) * 1%);
  background: #ff6b8a;
}

.trade-data-card {
  min-height: 292px;
}

.trade-data-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(78, 70, 100, 0.62);
}

.trade-data-meta strong {
  color: #0abab5 !important;
  font-size: 15px;
  line-height: 1.15;
}

.trade-data-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.session-card > div:not(.intel-thumb):not(.intel-copy):not(.trade-data-visual) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.session-card span {
  color: var(--muted);
  font-size: 13px;
}

.session-card strong {
  color: var(--blue);
}

.session-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.session-card h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.session-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #c8d0dc;
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.plan-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 286px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)),
    #1c1a28;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease,
    filter 180ms ease;
}

.plan-card.highlighted {
  border-color: rgba(10, 186, 181, 0.34);
  background:
    linear-gradient(180deg, rgba(10, 186, 181, 0.08), rgba(10, 186, 181, 0.01)),
    #28283a;
}

.plan-card:hover,
.plan-card:focus-within {
  border-color: rgba(10, 186, 181, 0.58);
  background: #242332;
  transform: translateY(-4px);
  filter: brightness(1.04);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(10, 186, 181, 0.12);
}

.plan-card.highlighted:hover,
.plan-card.highlighted:focus-within {
  background: #2b2d3d;
}

.plan-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.plan-card-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.plan-card-head b {
  border: 1px solid rgba(10, 186, 181, 0.26);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--accent);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.plan-card strong {
  display: block;
  color: var(--text);
  font-size: clamp(20px, 1.7vw, 26px);
  line-height: 1.18;
}

.plan-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.plan-features {
  display: grid;
  gap: 8px;
  margin: 2px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid rgba(78, 70, 100, 0.62);
  list-style: none;
}

.plan-features li {
  display: grid;
  grid-template-columns: 16px 1fr;
  align-items: start;
  gap: 8px;
  color: #d7dde9;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.45;
}

.plan-features i {
  display: block;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border: 1px solid rgba(10, 186, 181, 0.55);
  border-radius: 999px;
  background:
    radial-gradient(circle at center, var(--accent) 0 3px, transparent 3.5px),
    rgba(10, 186, 181, 0.1);
}

.plan-features li.disabled {
  color: #8f98b4;
}

.plan-features li.disabled i {
  border-color: rgba(156, 168, 196, 0.42);
  background:
    linear-gradient(45deg, transparent 43%, rgba(156, 168, 196, 0.65) 44% 56%, transparent 57%),
    rgba(156, 168, 196, 0.08);
}

.academy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.academy-card {
  display: grid;
  overflow: hidden;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1c1a28;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease;
}

.academy-card.highlighted {
  border-color: rgba(10, 186, 181, 0.34);
  background: #28283a;
}

.academy-card:hover,
.academy-card:focus-within {
  border-color: rgba(10, 186, 181, 0.44);
  background: #28243a;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.academy-card span,
.academy-card p,
.academy-card small {
  color: var(--muted);
}

.academy-thumb {
  position: relative;
  min-height: 150px;
  background:
    linear-gradient(135deg, rgba(10, 186, 181, 0.22), rgba(255, 107, 138, 0.12)),
    #14121c;
}

.academy-thumb img,
.academy-thumb video,
.academy-thumb iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 150px;
  border: 0;
  object-fit: cover;
}

.academy-thumb-fallback {
  display: grid;
  place-items: center;
  min-height: 150px;
  color: var(--accent);
  font-size: 38px;
  font-weight: 950;
}

.academy-card-body {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
}

.academy-card strong {
  display: block;
  font-size: 24px;
}

.academy-card p {
  line-height: 1.55;
}

.academy-card a {
  justify-self: start;
  min-height: 36px;
  border: 1px solid rgba(10, 186, 181, 0.38);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 900;
}

.academy-card a:hover,
.academy-card a:focus-visible {
  background: rgba(10, 186, 181, 0.12);
  outline: none;
}

.academy-open-button {
  justify-self: start;
  min-height: 36px;
  border: 1px solid rgba(10, 186, 181, 0.38);
  border-radius: 8px;
  padding: 8px 12px;
  background: transparent;
  color: var(--accent);
  font-weight: 900;
}

.academy-detail {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.academy-detail[hidden] {
  display: none;
}

.academy-detail-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #1c1a28;
}

.academy-detail-head h2 {
  margin: 2px 0 0;
  font-size: 24px;
}

.academy-content-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.academy-content-card {
  min-width: 0;
}

.academy-content-link {
  display: grid;
  overflow: hidden;
  width: 100%;
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: #1c1a28;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease;
}

.academy-content-link:hover,
.academy-content-link:focus-visible {
  border-color: rgba(10, 186, 181, 0.44);
  background: #28243a;
  transform: translateY(-2px);
  outline: none;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.academy-content-body {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
}

.academy-content-body span,
.academy-content-body p {
  color: var(--muted);
  line-height: 1.45;
}

.academy-content-body strong {
  font-size: 18px;
  line-height: 1.28;
}

.academy-empty {
  display: grid;
  min-height: 180px;
  grid-column: 1 / -1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1c1a28;
  color: var(--muted);
  font-weight: 900;
}

.academy-admin-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #191724;
}

.manual-signal-panel {
  margin-top: 16px;
  border: 1px solid rgba(10, 186, 181, 0.34);
  border-radius: 8px;
  padding: 14px;
  background: rgba(10, 186, 181, 0.06);
}

.academy-admin-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.academy-admin-form .wide,
.manual-signal-form .wide {
  grid-column: 1 / -1;
}

.manual-signal-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.academy-admin-form input,
.academy-admin-form select,
.academy-admin-form textarea,
.manual-signal-form input,
.manual-signal-form select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #15131f;
  color: var(--text);
}

.academy-file-control {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  background: #15131f;
  color: var(--text);
  cursor: pointer;
}

.academy-file-control input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.academy-file-control span {
  flex: 0 0 auto;
  border: 1px solid rgba(10, 186, 181, 0.48);
  border-radius: 7px;
  padding: 5px 12px;
  background: rgba(10, 186, 181, 0.12);
  color: var(--accent);
  font-size: 14px;
  font-weight: 950;
}

.academy-file-control b {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.academy-admin-form textarea {
  min-height: 78px;
  padding: 10px;
  resize: vertical;
}

.academy-admin-form small {
  grid-column: 1 / -1;
  color: var(--muted);
}

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

.referral-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #191724;
}

.referral-grid strong,
.referral-grid span {
  display: block;
}

.referral-grid strong {
  margin-bottom: 8px;
}

.referral-grid span {
  color: var(--muted);
  line-height: 1.5;
}

.referral-stats-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.referral-stats-line b {
  color: var(--accent);
  font-size: clamp(17px, 1.45vw, 23px);
  font-weight: 950;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}

.referral-ranking {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.referral-ranking div {
  min-height: 86px;
  border: 1px solid rgba(10, 186, 181, 0.26);
  border-radius: 8px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(10, 186, 181, 0.12), rgba(21, 19, 31, 0.88));
}

.referral-ranking div:first-child {
  border-color: rgba(10, 186, 181, 0.5);
  background: linear-gradient(180deg, rgba(10, 186, 181, 0.2), rgba(21, 19, 31, 0.9));
}

.referral-ranking div.is-empty {
  opacity: 0.62;
}

.referral-ranking span,
.referral-ranking strong,
.referral-ranking em,
.referral-ranking small {
  display: block;
}

.referral-ranking span {
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.billing-card .referral-ranking div > span:first-child {
  color: var(--green) !important;
}

.referral-ranking strong {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
}

.billing-card .referral-ranking .referral-rank-uid {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: 0;
  white-space: nowrap;
}

.referral-ranking em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.referral-ranking small {
  margin-top: 5px;
  color: var(--accent);
  font-weight: 850;
}

.referral-ranking-note {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.invite-users-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #191724;
}

.invite-users-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.invite-users-head span,
.invite-user-main span,
.invite-user-meta,
.invite-order-lines small,
.invite-empty span {
  color: var(--muted);
}

.invite-users-head span,
.invite-users-head strong {
  display: block;
}

.invite-users-head strong {
  margin-top: 4px;
  font-size: 18px;
}

.invite-users-head input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #12101a;
  color: var(--text);
  font-weight: 800;
}

.invite-users-head input:focus {
  border-color: rgba(10, 186, 181, 0.55);
  outline: none;
  box-shadow: 0 0 0 3px rgba(10, 186, 181, 0.12);
}

.invite-user-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.invite-user-list[hidden] {
  display: none;
}

.invite-user-row,
.invite-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #1f1c2b;
}

.invite-user-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.15fr) minmax(280px, 1.45fr) auto;
  gap: 12px 16px;
  align-items: center;
}

.invite-user-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.invite-user-main strong {
  display: block;
  font-size: 18px;
}

.invite-user-main span {
  display: block;
  margin-top: 4px;
}

.invite-user-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.invite-user-badges b,
.invite-user-badges em,
.invite-access-pill {
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: transparent;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.invite-user-badges b,
.invite-user-badges em.accepted,
.invite-access-pill.accepted {
  border-color: rgba(10, 186, 181, 0.5);
  background: rgba(10, 186, 181, 0.1);
  color: var(--accent);
}

.invite-user-badges em.blocked,
.invite-access-pill.blocked {
  border-color: rgba(255, 107, 138, 0.42);
  background: rgba(255, 107, 138, 0.1);
  color: #ff8fa5;
}

.invite-access-pill:not(:disabled):hover,
.invite-access-pill:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(10, 186, 181, 0.12);
}

.invite-user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13px;
  font-weight: 800;
}

.invite-order-lines {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.invite-order-lines li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.invite-order-lines span {
  overflow: hidden;
  color: var(--text);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-user-actions {
  display: flex;
  justify-content: flex-end;
}

.invite-user-actions button {
  min-height: 34px;
  border: 1px solid rgba(10, 186, 181, 0.4);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(10, 186, 181, 0.1);
  color: var(--accent);
  font-weight: 900;
}

.invite-user-actions button:hover,
.invite-user-actions button:focus-visible {
  background: rgba(10, 186, 181, 0.18);
  outline: none;
}

.invite-user-actions span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.invite-empty strong,
.invite-empty span {
  display: block;
}

.invite-empty span {
  margin-top: 6px;
}

.finance-ledger-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #191724;
}

.finance-ledger-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.finance-ledger-head.compact {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.finance-ledger-head span,
.finance-ledger-row span {
  color: var(--muted);
}

.finance-ledger-head strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 18px;
}

.admin-finance-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.admin-finance-summary article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(10, 186, 181, 0.08);
}

.admin-finance-summary span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.admin-finance-summary strong {
  display: block;
  margin-top: 6px;
  color: var(--accent);
  font-size: 18px;
}

.finance-ledger-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  margin-top: 12px;
}

.admin-finance-grid {
  align-items: start;
  margin-bottom: 12px;
}

.finance-ledger-grid h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.finance-ledger-list {
  display: grid;
  gap: 8px;
}

.admin-deposit-column {
  align-self: start;
}

.finance-column-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.finance-column-title h3 {
  margin-bottom: 0;
}

.finance-column-title span {
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
}

.admin-deposit-scroll {
  height: 232px;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1f1c2b;
  overflow-y: auto;
  overflow-x: hidden;
}

.admin-deposit-scroll .finance-ledger-row {
  border: 0;
  border-bottom: 1px solid rgba(154, 144, 188, 0.22);
  border-radius: 0;
  background: transparent;
}

.admin-deposit-scroll .finance-ledger-row:last-child {
  border-bottom: 0;
}

.admin-deposit-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1f1c2b;
  overflow: hidden;
}

.admin-deposit-details[hidden] {
  display: none !important;
}

.admin-deposit-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}

.admin-deposit-details summary::-webkit-details-marker {
  display: none;
}

.admin-deposit-details summary::after {
  content: "⌄";
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(10, 186, 181, 0.35);
  border-radius: 999px;
  color: var(--accent);
  font-weight: 900;
}

.admin-deposit-details[open] summary::after {
  content: "⌃";
}

.admin-deposit-details summary span {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.admin-deposit-details summary strong {
  margin-left: auto;
  color: var(--accent);
  font-size: 14px;
}

.admin-deposit-details .finance-ledger-list {
  max-height: 360px;
  overflow: auto;
  padding: 0 10px 10px;
}

.finance-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #1f1c2b;
}

.finance-ledger-row.admin {
  grid-template-columns: minmax(0, 1fr) auto;
}

.finance-ledger-row strong,
.finance-ledger-row span {
  display: block;
}

.finance-ledger-row span {
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-ledger-row b {
  color: var(--accent);
}

.finance-ledger-row b.negative {
  color: #ff8fa5;
}

.finance-admin-actions {
  display: flex;
  gap: 6px;
}

.finance-admin-actions button {
  min-height: 32px;
  border: 1px solid rgba(10, 186, 181, 0.4);
  border-radius: 8px;
  padding: 0 9px;
  background: rgba(10, 186, 181, 0.1);
  color: var(--accent);
  font-weight: 900;
}

.finance-admin-actions button:hover,
.finance-admin-actions button:focus-visible {
  background: rgba(10, 186, 181, 0.18);
  outline: none;
}

.finance-copy-button {
  min-height: 32px;
  border: 1px solid rgba(10, 186, 181, 0.4);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(10, 186, 181, 0.1);
  color: var(--accent);
  font-weight: 900;
}

.finance-copy-button:hover,
.finance-copy-button:focus-visible {
  background: rgba(10, 186, 181, 0.18);
  outline: none;
}

.billing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px;
  margin-top: 14px;
}

.billing-panel[data-page="invite"] .billing-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.billing-card,
.order-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1c1a28;
}

.billing-card {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  align-items: stretch;
}

.billing-card span,
.billing-card p,
.order-item span {
  color: var(--muted);
}

.billing-card strong {
  display: block;
  margin-top: 8px;
  color: var(--accent);
  font-size: 22px;
}

.billing-card p {
  margin-top: 12px;
  line-height: 1.5;
}

.billing-card p.billing-status {
  font-weight: 950;
}

.billing-card p.billing-status.is-error {
  color: #ff7b8f;
}

.billing-card p.billing-status.is-success {
  color: var(--accent);
}

.billing-balance-line {
  margin-top: 6px !important;
  font-size: 13px;
}

.billing-balance-line b {
  color: var(--accent);
  font-weight: 950;
}

.tcl-billing-card {
  border-color: rgba(10, 186, 181, 0.38);
  background: linear-gradient(135deg, rgba(10, 186, 181, 0.12), rgba(28, 26, 40, 0.96));
}

.tcl-billing-card p {
  margin-top: 8px;
  font-size: 13px;
}

.billing-actions,
.withdraw-form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.billing-card .records-head-toggle {
  align-self: flex-end;
  margin-top: auto;
}

.billing-actions button,
.withdraw-form button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #191724;
  color: var(--text);
  text-align: left;
}

.billing-actions button:disabled {
  cursor: not-allowed;
  border-color: rgba(160, 169, 195, 0.22);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.billing-actions button:not(:disabled):hover,
.billing-actions button:focus-visible,
.withdraw-form button:not(:disabled):hover,
.withdraw-form button:focus-visible {
  border-color: rgba(10, 186, 181, 0.44);
  background: #302b40;
  color: var(--text);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.billing-actions button:not(:disabled):active,
.withdraw-form button:not(:disabled):active {
  transform: translateY(1px) scale(0.99);
  background: #1a1728;
  box-shadow: none;
}

.withdraw-form {
  grid-template-columns: minmax(0, 1fr) 92px auto;
}

.finance-withdraw-form {
  margin-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.withdraw-form input {
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #15131f;
  color: var(--text);
}

.notification-grid,
.settings-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.latest-notice-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #1c1a28;
}

.latest-notice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.latest-notice-head h3 {
  margin: 2px 0 0;
  font-size: 20px;
}

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

.latest-notice-empty {
  display: grid;
  min-height: 76px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171520;
  color: var(--muted);
  font-weight: 900;
}

.latest-notice-card {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #171520;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background-color 140ms ease,
    opacity 140ms ease;
}

.latest-notice-card:hover,
.latest-notice-card:focus-visible {
  border-color: rgba(10, 186, 181, 0.44);
  background: #242032;
  transform: translateY(-1px);
}

.latest-notice-card:active {
  transform: translateY(1px);
}

.latest-notice-card.is-read {
  opacity: 0.72;
}

.latest-notice-dot {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(10, 186, 181, 0.56);
  border-radius: 999px;
  background: transparent;
}

.latest-notice-card.is-unread .latest-notice-dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(10, 186, 181, 0.1);
}

.latest-notice-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.latest-notice-main b {
  font-size: 16px;
  line-height: 1.25;
}

.latest-notice-main small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.latest-notice-meta {
  display: grid;
  gap: 5px;
  justify-items: end;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.latest-notice-meta em {
  display: inline-grid;
  min-height: 24px;
  place-items: center;
  border: 1px solid rgba(10, 186, 181, 0.34);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--accent);
  font-style: normal;
  font-weight: 900;
}

.notice-delete-button {
  min-height: 30px;
  border: 1px solid rgba(255, 107, 138, 0.5);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(255, 107, 138, 0.1);
  color: #ff8fa2;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.notice-delete-button:hover,
.notice-delete-button:focus-visible {
  border-color: rgba(255, 107, 138, 0.85);
  background: rgba(255, 107, 138, 0.18);
  color: #ffd6de;
}

.notice-admin-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  border: 1px solid rgba(10, 186, 181, 0.36);
  border-radius: 8px;
  padding: 14px;
  background: rgba(10, 186, 181, 0.08);
}

.notice-admin-panel[hidden] {
  display: none;
}

.notice-admin-form {
  display: grid;
  grid-template-columns: 150px minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.notice-admin-form select,
.notice-admin-form input,
.notice-admin-form textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #15131f;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.notice-admin-form textarea {
  grid-column: 1 / -1;
  min-height: 92px;
  padding: 12px;
  resize: vertical;
}

.notice-admin-form small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.notification-grid label,
.settings-list > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #1c1a28;
}

.notification-grid label {
  cursor: pointer;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease;
}

.notification-grid label:hover,
.notification-grid label:focus-within {
  border-color: rgba(10, 186, 181, 0.4);
  background: #28243a;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.notification-grid label:active {
  transform: translateY(1px) scale(0.995);
  box-shadow: none;
}

.notification-grid input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.notification-grid span,
.settings-list span {
  font-weight: 900;
}

.notification-grid small,
.settings-list p {
  grid-column: 2;
  color: var(--muted);
  line-height: 1.45;
}

.preference-status,
#accountSecurityStatus {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 800;
}

.settings-list > div {
  grid-template-columns: 96px minmax(0, 1fr) auto;
}

.settings-list button {
  min-height: 36px;
}

.settings-list > div {
  transition:
    border-color 140ms ease,
    background-color 140ms ease;
}

.settings-list > div:hover,
.settings-list > div:focus-within {
  border-color: rgba(82, 96, 113, 0.72);
  background: #2b2638;
}

.account-security-panel {
  display: grid;
  gap: 18px;
}

.security-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.security-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.security-summary-grid article {
  display: grid;
  gap: 8px;
  min-height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #1c1a28;
}

.security-summary-grid span {
  color: var(--muted);
  font-weight: 900;
}

.security-summary-grid strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}

.security-summary-grid small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.account-security-form {
  display: grid;
  gap: 14px;
  align-items: stretch;
}

.account-security-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}

.account-security-form input,
.security-code-row input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #15131f;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.security-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, auto);
  gap: 8px;
  align-items: center;
}

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

.account-password-panel {
  margin-top: 18px;
}

.update-admin-panel {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #191724;
}

.update-admin-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.update-admin-form input,
.update-admin-form textarea {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #15131f;
  color: var(--text);
}

.update-admin-form textarea {
  min-height: 86px;
  padding: 10px;
  resize: vertical;
}

.update-admin-form small {
  color: var(--muted);
}

.legal-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #1c1a28;
}

.legal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legal-tabs button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  background: #15131f;
  color: var(--muted);
  font-weight: 900;
}

.legal-tabs button.active,
.legal-tabs button:hover,
.legal-tabs button:focus-visible {
  border-color: rgba(10, 186, 181, 0.42);
  background: rgba(10, 186, 181, 0.12);
  color: var(--accent);
  outline: none;
}

.legal-document {
  display: grid;
  gap: 12px;
  max-width: 1080px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #15131f;
}

.legal-document h3 {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 18px;
}

.legal-document p {
  color: var(--muted);
  line-height: 1.75;
}

.legal-updated {
  color: var(--accent) !important;
  font-weight: 900;
}

.auth-legal-note {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.community-entry {
  margin-top: 12px;
}

body.light-theme {
  color-scheme: light;
  --bg: #f3f6fa;
  --panel: #ffffff;
  --panel-2: #eef3f8;
  --line: #cbd5e1;
  --text: #111827;
  --muted: #5d6a7c;
  --blue: #2467d6;
  background:
    radial-gradient(circle at 18% 8%, rgba(10, 186, 181, 0.09), transparent 30%),
    radial-gradient(circle at 82% 0%, rgba(124, 168, 255, 0.12), transparent 30%),
    var(--bg);
}

body.light-theme .rail,
body.light-theme .market-stage,
body.light-theme .decision-panel,
body.light-theme .signals-list,
body.light-theme .assistant-panel,
body.light-theme .backtest-panel,
body.light-theme .risk-panel,
body.light-theme .membership-panel,
body.light-theme .academy-panel,
body.light-theme .billing-panel,
body.light-theme .telegram-panel,
body.light-theme .account-security-page,
body.light-theme .method-panel,
body.light-theme .analytics-panel {
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
}

body.light-theme .splash-screen,
body.light-theme .auth-screen {
  background:
    linear-gradient(135deg, rgba(10, 186, 181, 0.12), transparent 36%),
    linear-gradient(315deg, rgba(124, 168, 255, 0.13), transparent 40%),
    var(--bg);
}

body.light-theme .mini-toast,
body.light-theme .auth-card,
body.light-theme .identity-card,
body.light-theme .history-panel,
body.light-theme .account-page-grid article,
body.light-theme .strategy-board-shell,
body.light-theme .signal-card,
body.light-theme .macro-card,
body.light-theme .session-card,
body.light-theme .billing-card,
body.light-theme .plan-card,
body.light-theme .academy-card,
body.light-theme .academy-content-card,
body.light-theme .invite-users-panel,
body.light-theme .invite-user-row,
body.light-theme .finance-ledger-panel,
body.light-theme .latest-notice-panel,
body.light-theme .latest-notice-card,
body.light-theme .notice-admin-panel,
body.light-theme .telegram-grid,
body.light-theme .notification-grid label,
body.light-theme .security-summary-grid article,
body.light-theme .risk-grid article,
body.light-theme .executor-lock,
body.light-theme .executor-card,
body.light-theme .executor-exchange-card,
body.light-theme .executor-selected-provider,
body.light-theme .executor-help,
body.light-theme .executor-binding-row,
body.light-theme .executor-output,
body.light-theme .backtest-stat-card,
body.light-theme .backtest-community-card,
body.light-theme .backtest-period-card,
body.light-theme .community-entry,
body.light-theme .legal-document,
body.light-theme .records-collapser,
body.light-theme .order-row,
body.light-theme .finance-ledger-list article,
body.light-theme .settings-list > div {
  border-color: var(--line);
  background: #ffffff;
  color: var(--text);
}

body.light-theme .assistant-history-drawer {
  border-color: #c7d1de;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

body.light-theme .assistant-history-button.is-active {
  border-color: rgba(10, 186, 181, 0.6);
  background: rgba(10, 186, 181, 0.12);
  color: #078783;
}

body.light-theme .admin-tc-form {
  border-color: #c7d1de;
  background: #f8fafc;
}

body.light-theme .admin-tc-form input {
  border-color: #c7d1de;
  background: #ffffff;
  color: #111827;
}

body.light-theme .executor-form input,
body.light-theme .executor-form select,
body.light-theme .executor-actions select {
  border-color: #c7d1de;
  background: #ffffff;
  color: var(--text);
}

body.light-theme .executor-output-list div {
  border-color: #dbe3ee;
}

body.light-theme .executor-portfolio {
  border-color: rgba(10, 186, 181, 0.28);
  background: rgba(10, 186, 181, 0.07);
}

body.light-theme .executor-pie {
  color: #111827;
}

body.light-theme .executor-pie::before {
  background: conic-gradient(#0abab5 0 var(--pie-value, 0%), rgba(148, 163, 184, 0.48) var(--pie-value, 0%) 100%);
}

body.light-theme .executor-pie.is-empty::before {
  background: conic-gradient(rgba(148, 163, 184, 0.26) 0% 100%);
}

body.light-theme .executor-form-status.is-loading {
  color: #078783;
}

body.light-theme .executor-exchange-card:hover,
body.light-theme .executor-exchange-card:focus-visible,
body.light-theme .executor-exchange-card.is-active {
  border-color: rgba(10, 186, 181, 0.5);
  background: #eefdfa;
}

body.light-theme .executor-exchange-card {
  border-color: #d4dde9;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

body.light-theme .executor-exchange-card strong {
  color: #172033;
}

body.light-theme .executor-exchange-card em {
  border-color: rgba(10, 186, 181, 0.34);
  background: rgba(10, 186, 181, 0.08);
  color: #078783;
}

body.light-theme .executor-exchange-icon,
body.light-theme .executor-selected-provider > span {
  background: linear-gradient(135deg, rgba(10, 186, 181, 0.2), rgba(219, 229, 241, 0.96));
  color: #0abab5;
}

body.light-theme .executor-exchange-card.is-reserved {
  border-color: #dbe3ee;
  background: #fbfdff;
  color: #94a3b8;
  box-shadow: none;
}

body.light-theme .executor-exchange-card.is-reserved .executor-exchange-icon {
  background: linear-gradient(135deg, #eef3f8, #e3eaf3);
  color: #a7b2c3;
}

body.light-theme .executor-exchange-card.is-reserved strong,
body.light-theme .executor-exchange-card.is-reserved em {
  color: #9aa6b8;
}

body.light-theme .executor-exchange-card.is-reserved em {
  border-color: #dde5ef;
  background: #f4f7fb;
}

body.light-theme .executor-exchange-card.is-reserved:hover,
body.light-theme .executor-exchange-card.is-reserved:focus-visible {
  border-color: #d2dce8;
  background: #f8fbff;
}

body.light-theme .executor-steps i {
  background: #d5deea;
}

body.light-theme .executor-steps b {
  background: #e8eef5;
}

body.light-theme .executor-steps .is-active b,
body.light-theme .executor-steps .is-complete b {
  background: var(--green);
}

body.light-theme .nav-item,
body.light-theme .history-list button,
body.light-theme .primary-button,
body.light-theme .ghost-button,
body.light-theme .icon-button,
body.light-theme .language-button,
body.light-theme .segmented button,
body.light-theme .link-button,
body.light-theme .google-button,
body.light-theme input,
body.light-theme textarea,
body.light-theme select,
body.light-theme .academy-admin-form input,
body.light-theme .academy-admin-form textarea,
body.light-theme .academy-admin-form select,
body.light-theme .manual-signal-form input,
body.light-theme .manual-signal-form select,
body.light-theme .notice-admin-form input,
body.light-theme .notice-admin-form textarea,
body.light-theme .notice-admin-form select {
  border-color: var(--line);
  background: #f8fafc;
  color: var(--text);
}

body.light-theme .account-security-form input {
  border-color: var(--line);
  background: #f8fafc;
  color: var(--text);
}

body.light-theme .security-code-row input {
  border-color: var(--line);
  background: #f8fafc;
  color: var(--text);
}

body.light-theme .primary-button {
  border-color: #089e9a;
  background: #0abab5;
  color: #052f34;
}

body.light-theme .app-alert-backdrop {
  background: rgba(15, 23, 42, 0.26);
}

body.light-theme .app-alert-card {
  border-color: rgba(10, 186, 181, 0.34);
  background: #ffffff;
  color: #111827;
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.18);
}

body.light-theme .app-alert-card p {
  color: #111827;
}

body.light-theme button.primary-button:not(:disabled):hover {
  border-color: #087c7a;
  background: #18c6c1;
}

body.light-theme .ghost-button:hover,
body.light-theme .icon-button:hover,
body.light-theme .language-button:hover,
body.light-theme .segmented button:hover {
  background: #ffffff;
}

body.light-theme .auth-mode-tabs {
  border-color: #cbd5e1;
  background: #eef4f8;
}

body.light-theme .auth-mode-tabs button {
  color: #64748b;
}

body.light-theme .auth-mode-tabs button.active {
  background: #0abab5;
  color: #062327;
  box-shadow: 0 10px 22px rgba(10, 186, 181, 0.28);
}

body.light-theme .segmented button.active,
body.light-theme .nav-item.active,
body.light-theme .plan-card.highlighted,
body.light-theme .academy-card.highlighted,
body.light-theme .notification-grid label:has(input:checked) {
  border-color: rgba(10, 186, 181, 0.55);
  background: rgba(10, 186, 181, 0.1);
}

body.light-theme .workspace-heading,
body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme strong {
  color: var(--text);
}

body.light-theme .muted,
body.light-theme .eyebrow,
body.light-theme small,
body.light-theme .legal-document p,
body.light-theme .settings-list p,
body.light-theme .notification-grid small,
body.light-theme .billing-card p,
body.light-theme .plan-card small,
body.light-theme .academy-card p {
  color: var(--muted);
}

body.light-theme .plan-card {
  border-color: #c8d3df;
  background:
    linear-gradient(180deg, #ffffff, #f9fbfd);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

body.light-theme .plan-card.highlighted {
  border-color: rgba(10, 186, 181, 0.55);
  background:
    linear-gradient(180deg, rgba(10, 186, 181, 0.11), rgba(255, 255, 255, 0.92)),
    #ffffff;
}

body.light-theme .plan-card:hover,
body.light-theme .plan-card:focus-within {
  border-color: rgba(10, 186, 181, 0.7);
  background: #ffffff;
  box-shadow:
    0 16px 34px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(10, 186, 181, 0.12);
}

body.light-theme .plan-card-head span,
body.light-theme .plan-card small {
  color: #4b5565;
}

body.light-theme .plan-features {
  border-top-color: #b8c4d3;
}

body.light-theme .plan-features li {
  color: #334155;
  opacity: 1;
}

body.light-theme .plan-features li.disabled {
  color: #5f6f82;
  opacity: 0.95;
}

body.light-theme .plan-features i {
  border-color: rgba(10, 186, 181, 0.62);
  background:
    radial-gradient(circle at center, #0abab5 0 3px, transparent 3.5px),
    rgba(10, 186, 181, 0.14);
}

body.light-theme .plan-features li.disabled i {
  border-color: #aeb9c8;
  background:
    linear-gradient(45deg, transparent 43%, #7c8a9c 44% 56%, transparent 57%),
    #eef3f8;
}

body.light-theme .tradingview-chart,
body.light-theme .trade-data-visual,
body.light-theme .white-label-chart,
body.light-theme .trade-chart-host,
body.light-theme .chart-placeholder {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 252, 0.96)),
    #ffffff;
  color: var(--text);
}

body.light-theme .trade-chart-caption {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.72));
}

body.light-theme .chart-placeholder span {
  background: rgba(92, 104, 126, 0.18);
}

body.light-theme .ratio-snapshot-bar,
body.light-theme .ratio-snapshot {
  background: #f8fafc;
}

body.light-theme .records-summary-row,
body.light-theme .invite-user-meta,
body.light-theme .finance-ledger-head,
body.light-theme .history-table > div,
body.light-theme .legal-tabs,
body.light-theme .trade-data-meta,
body.light-theme .intel-copy {
  border-color: var(--line);
}

body.light-theme .badge.long,
body.light-theme .status-pill.active,
body.light-theme .premium-pill,
body.light-theme .plan-tag,
body.light-theme .academy-open-button,
body.light-theme .session-chip.generated {
  border-color: rgba(10, 186, 181, 0.5);
  background: rgba(10, 186, 181, 0.12);
  color: #087c7a;
}

body.light-theme .status-pill.locked,
body.light-theme .session-chip.pending,
body.light-theme .session-chip.future {
  background: #eef2f6;
  color: var(--muted);
}

body.light-theme .badge.short {
  background: rgba(255, 111, 120, 0.14);
  color: #c6344b;
}

body.light-theme .user-message {
  background: #0abab5;
  color: #052f34;
}

body.light-theme .assistant-message {
  border-color: #c7d1de;
  background: #ffffff;
  color: #111827;
}

body.light-theme .analysis-turn {
  background: rgba(255, 255, 255, 0.88);
  border-color: #cbd5e1;
}

body.light-theme .assistant-message strong,
body.light-theme .assistant-message h3,
body.light-theme .assistant-message h4,
body.light-theme .report-title strong,
body.light-theme .report-section h3,
body.light-theme .report-group h4,
body.light-theme .report-strategy h4 {
  color: #111827;
}

body.light-theme .report-title {
  border-color: #c7d1de;
}

body.light-theme .report-title span,
body.light-theme .report-section p,
body.light-theme .report-strategy dd {
  color: #334155;
}

body.light-theme .report-group,
body.light-theme .report-strategy {
  border-color: #c7d1de;
  background: #f8fafc;
}

body.light-theme .report-strategy dt {
  color: #5d6a7c;
}

body.light-theme .auth-legal-note,
body.light-theme .history-head,
body.light-theme .identity-stats,
body.light-theme .account-expiry-line {
  color: var(--muted);
}

body.light-theme .records-collapser {
  background: #ffffff;
}

body.light-theme .order-item {
  border-color: #c7d1de;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
  color: #111827;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

body.light-theme .order-item strong {
  color: #111827;
}

body.light-theme .order-item span {
  color: #5d6a7c;
}

body.light-theme .order-item button {
  border-color: rgba(10, 186, 181, 0.52);
  background: rgba(10, 186, 181, 0.82);
  color: #063336;
}

body.light-theme .order-item button:not(:disabled):hover,
body.light-theme .order-item button:focus-visible {
  border-color: #087c7a;
  background: #0abab5;
  color: #052f34;
}

body.light-theme .hero-grid {
  color: var(--text);
}

body.light-theme .market-stage,
body.light-theme .decision-panel {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 253, 0.98)),
    #ffffff;
}

body.light-theme .stage-header strong,
body.light-theme #activeSymbol,
body.light-theme #signalDirection {
  color: var(--text);
}

body.light-theme .status-live {
  background: rgba(10, 186, 181, 0.12);
  color: #087c7a;
}

body.light-theme .ticker {
  border-color: #c7d1de;
  background:
    linear-gradient(180deg, #ffffff, #f7fafc);
  color: var(--text);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

body.light-theme .ticker:hover,
body.light-theme .ticker:focus-visible {
  border-color: rgba(10, 186, 181, 0.52);
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
}

body.light-theme .ticker.selected {
  border-color: #0abab5;
  background:
    linear-gradient(180deg, rgba(10, 186, 181, 0.13), rgba(255, 255, 255, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(10, 186, 181, 0.36),
    0 16px 34px rgba(10, 186, 181, 0.12);
}

body.light-theme .ticker span,
body.light-theme .ticker small {
  color: var(--muted);
}

body.light-theme .ticker strong {
  color: var(--text);
}

body.light-theme .favorite-button {
  -webkit-text-stroke-color: #98a3b3;
}

body.light-theme .favorite-button.favorite {
  color: var(--green);
}

body.light-theme .macro-card {
  border-color: #c7d1de;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

body.light-theme .macro-ring {
  background:
    radial-gradient(circle at center, #ffffff 55%, transparent 57%),
    conic-gradient(var(--green) 0 calc(var(--value) * 1%), #d8e1ec 0 100%);
  box-shadow:
    inset 0 0 0 1px rgba(15, 23, 42, 0.04),
    0 10px 24px rgba(10, 186, 181, 0.12);
}

body.light-theme .macro-ring span {
  color: #334155;
}

body.light-theme .macro-event-badge {
  border-color: rgba(10, 186, 181, 0.36);
  background: rgba(10, 186, 181, 0.09);
  color: #078783;
}

body.light-theme .macro-card span {
  color: var(--muted);
}

body.light-theme .macro-card strong {
  color: var(--text);
}

body.light-theme .macro-note {
  color: #475569;
}

body.light-theme .content-grid[data-page="signals"] .signals-list,
body.light-theme .content-grid[data-page="signals"] .assistant-panel {
  border-color: #c7d1de;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 253, 0.98)),
    #ffffff;
}

body.light-theme .strategy-board-meta {
  border-color: #c7d1de;
  background:
    linear-gradient(135deg, rgba(10, 186, 181, 0.1), transparent 34%),
    linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.light-theme .strategy-board-meta span,
body.light-theme .strategy-board-meta small {
  color: #5d6a7c;
}

body.light-theme .strategy-board-meta strong {
  color: #111827;
}

body.light-theme .session-chip {
  border-color: #c7d1de;
  background: #f8fafc;
  color: #5d6a7c;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

body.light-theme .session-chip.pending,
body.light-theme .session-chip.future {
  border-color: #c7d1de;
  background: #eef3f8;
  color: #5d6a7c;
}

body.light-theme .strategy-card,
body.light-theme .signal-card {
  border-color: #c7d1de;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

body.light-theme .signal-card span,
body.light-theme .signal-card small {
  color: #5d6a7c;
}

body.light-theme .signal-card .live-price {
  color: #087c7a;
}

body.light-theme .status-pill {
  border: 1px solid #d3dbe6;
  background: #eef3f8;
  color: #5d6a7c;
}

body.light-theme .status-pill.watch,
body.light-theme .status-pill.tp1 {
  border-color: rgba(10, 186, 181, 0.34);
  background: rgba(10, 186, 181, 0.1);
  color: #087c7a;
}

body.light-theme .status-pill.tp2 {
  border-color: rgba(10, 186, 181, 0.46);
  background: rgba(10, 186, 181, 0.14);
  color: #087c7a;
}

body.light-theme .status-pill.stopped,
body.light-theme .badge.short {
  border-color: rgba(255, 111, 120, 0.32);
  background: rgba(255, 111, 120, 0.12);
  color: #c6344b;
}

body.light-theme .badge.locked,
body.light-theme .badge.closed,
body.light-theme .status-pill.no_trade,
body.light-theme .status-pill.invalidated,
body.light-theme .status-pill.missed,
body.light-theme .status-pill.locked,
body.light-theme .status-pill.closed {
  border-color: #d3dbe6;
  background: #eef3f8;
  color: #5d6a7c;
}

body.light-theme .chat-window::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.05);
}

body.light-theme .assistant-empty-state {
  border-color: transparent;
  background: transparent;
  color: #5d6a7c;
}

body.light-theme .assistant-compose .chat-input {
  border-color: rgba(10, 186, 181, 0.46);
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

body.light-theme .assistant-prompt-tags {
  color: #526176;
}

body.light-theme .assistant-prompt-tags span {
  border-color: rgba(10, 186, 181, 0.28);
  background: rgba(10, 186, 181, 0.08);
}

body.light-theme .signal-lock,
body.light-theme .strategy-board-shell.locked .strategy-lock,
body.light-theme .executor-max-lock {
  border-color: rgba(10, 186, 181, 0.28);
  background:
    linear-gradient(135deg, rgba(10, 186, 181, 0.1), rgba(255, 255, 255, 0.98) 38%),
    repeating-linear-gradient(135deg, rgba(10, 186, 181, 0.035) 0 8px, transparent 8px 16px),
    #ffffff;
  color: var(--text);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

body.light-theme .lock-copy span,
body.light-theme .lock-copy small,
body.light-theme .lock-metrics span {
  color: #5d6a7c;
}

body.light-theme .lock-copy strong {
  color: #111827;
}

body.light-theme .lock-copy p,
body.light-theme .lock-metrics strong {
  color: var(--green);
}

body.light-theme .lock-metrics div {
  border-color: rgba(10, 186, 181, 0.28);
  background: rgba(255, 255, 255, 0.82);
}

body.light-theme .backtest-panel {
  border-color: #c7d1de;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 253, 0.98)),
    #ffffff;
}

body.light-theme .backtest-grid article {
  border-color: #c7d1de;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

body.light-theme .backtest-grid .backtest-stat-card strong {
  color: var(--green);
}

body.light-theme .backtest-grid .backtest-stat-card span,
body.light-theme .backtest-grid .backtest-community-card span,
body.light-theme .backtest-grid .backtest-period-card span {
  color: #5d6a7c;
}

body.light-theme .backtest-grid .backtest-community-card strong {
  color: #111827;
}

body.light-theme .period-options button {
  background: #ffffff;
  color: #415063;
  border-color: #9fe0de;
}

body.light-theme .period-options button.is-active {
  background: #e7f8f7;
  color: #0f8f8b;
  border-color: #14bfbb;
}

body.light-theme .history-table {
  border-color: #c7d1de;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

body.light-theme .history-table > div {
  border-bottom-color: #dbe3ee;
  background: #ffffff;
  color: #111827;
}

body.light-theme .history-table > div:nth-child(even) {
  background: #f8fafc;
}

body.light-theme .history-table > div:first-child {
  background: #eef3f8;
  color: #5d6a7c;
}

body.light-theme .history-table span {
  color: #334155;
}

body.light-theme .history-table strong {
  color: #111827;
}

body.light-theme .history-table .up {
  color: #087c7a;
}

body.light-theme .history-table .backtest-state.state-profit {
  color: #087c7a;
}

body.light-theme .history-table .down {
  color: #c6344b;
}

body.light-theme .history-table .backtest-state.state-loss {
  color: #c6344b;
}

body.light-theme .history-pagination button {
  border-color: #c7d1de;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

body.light-theme .history-pagination button:not(:disabled):hover,
body.light-theme .history-pagination button:not(:disabled):focus-visible {
  border-color: rgba(10, 186, 181, 0.55);
  background: #eefdfa;
  color: #087c7a;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

body.light-theme .history-pagination button:disabled {
  border-color: #d7dee8;
  background: #eef2f7;
  color: #94a3b8;
  box-shadow: none;
  opacity: 1;
}

body.light-theme .history-pagination span {
  color: #475569;
}

body.light-theme .executor-form.risk-form .risk-toggle {
  border-color: #c7d1de;
  background: #ffffff;
  color: #334155;
}

body.light-theme .executor-form.risk-form .risk-toggle span {
  color: #475569;
}

body.light-theme .executor-form.risk-form .risk-toggle input {
  accent-color: #0abab5;
}

body.light-theme .telegram-grid {
  border-color: #c7d1de;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

body.light-theme .telegram-grid strong {
  color: #111827;
}

body.light-theme .telegram-grid p {
  color: #5d6a7c;
}

body.light-theme .telegram-actions button {
  border-color: #c7d1de;
  background: #f8fafc;
  color: #111827;
}

body.light-theme .telegram-actions button:not(:disabled):hover,
body.light-theme .telegram-actions button:focus-visible {
  border-color: rgba(10, 186, 181, 0.5);
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

body.light-theme .billing-panel {
  border-color: #c7d1de;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 253, 0.98)),
    #ffffff;
}

body.light-theme .billing-card {
  border-color: #c7d1de;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

body.light-theme .billing-card strong {
  color: #0a9f9b;
}

body.light-theme .billing-card span,
body.light-theme .billing-card p {
  color: #5d6a7c;
}

body.light-theme .billing-card p.billing-status.is-error {
  color: #d92d4b;
}

body.light-theme .billing-card p.billing-status.is-success {
  color: #087c7a;
}

body.light-theme .billing-actions button,
body.light-theme .withdraw-form button {
  border-color: #c7d1de;
  background: #f8fafc;
  color: #111827;
  box-shadow: none;
}

body.light-theme .billing-actions button:not(:disabled):hover,
body.light-theme .billing-actions button:focus-visible,
body.light-theme .withdraw-form button:not(:disabled):hover,
body.light-theme .withdraw-form button:focus-visible {
  border-color: rgba(10, 186, 181, 0.5);
  background: #ffffff;
  color: #087c7a;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

body.light-theme .referral-grid div {
  border-color: #c7d1de;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

body.light-theme .referral-grid strong {
  color: #111827;
}

body.light-theme .referral-grid span {
  color: #5d6a7c;
}

body.light-theme .referral-stats-line b {
  color: #087c7a;
}

body.light-theme .referral-ranking div {
  border-color: rgba(10, 186, 181, 0.34);
  background:
    linear-gradient(180deg, rgba(10, 186, 181, 0.18), rgba(248, 250, 252, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

body.light-theme .referral-ranking div:first-child {
  border-color: rgba(10, 186, 181, 0.55);
  background:
    linear-gradient(180deg, rgba(10, 186, 181, 0.24), rgba(248, 250, 252, 0.98));
}

body.light-theme .referral-ranking span {
  color: var(--green);
}

body.light-theme .billing-card .referral-ranking div > span:first-child {
  color: var(--green) !important;
}

body.light-theme .referral-ranking strong {
  color: #5d6a7c;
}

body.light-theme .billing-card .referral-ranking .referral-rank-uid {
  color: #5d6a7c;
}

body.light-theme .referral-ranking em {
  color: #5d6a7c;
}

body.light-theme .referral-ranking small {
  color: #087c7a;
}

body.light-theme .referral-ranking-note {
  color: #5d6a7c;
}

body.light-theme .invite-users-panel,
body.light-theme .finance-ledger-panel {
  border-color: #c7d1de;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

body.light-theme .invite-users-head,
body.light-theme .finance-ledger-head,
body.light-theme .finance-withdraw-form,
body.light-theme .invite-order-lines {
  border-color: #dbe3ee;
}

body.light-theme .invite-users-head input,
body.light-theme .withdraw-form input {
  border-color: #c7d1de;
  background: #ffffff;
  color: #111827;
}

body.light-theme .invite-users-head input:focus,
body.light-theme .withdraw-form input:focus {
  border-color: rgba(10, 186, 181, 0.55);
  outline: none;
  box-shadow: 0 0 0 3px rgba(10, 186, 181, 0.12);
}

body.light-theme .invite-user-row,
body.light-theme .invite-empty,
body.light-theme .finance-ledger-row,
body.light-theme .admin-finance-summary article,
body.light-theme .admin-deposit-details,
body.light-theme .admin-deposit-scroll {
  border-color: #c7d1de;
  background: #ffffff;
  color: #111827;
}

body.light-theme .invite-user-row:nth-child(even),
body.light-theme .finance-ledger-row:nth-child(even) {
  background: #f8fafc;
}

body.light-theme .invite-users-head span,
body.light-theme .invite-user-main span,
body.light-theme .invite-user-meta,
body.light-theme .invite-order-lines small,
body.light-theme .invite-empty span,
body.light-theme .finance-ledger-head span,
body.light-theme .finance-ledger-row span,
body.light-theme .admin-finance-summary span {
  color: #5d6a7c;
}

body.light-theme .invite-users-head strong,
body.light-theme .invite-user-main strong,
body.light-theme .invite-empty strong,
body.light-theme .finance-ledger-head strong,
body.light-theme .finance-ledger-row strong,
body.light-theme .finance-ledger-grid h3,
body.light-theme .admin-deposit-details summary span {
  color: #111827;
}

body.light-theme .finance-column-title span {
  color: #178f8b;
}

body.light-theme .admin-deposit-scroll .finance-ledger-row {
  border-bottom-color: #dbe3ee;
}

body.light-theme .invite-order-lines span {
  color: #111827;
}

body.light-theme .invite-user-badges b,
body.light-theme .invite-user-badges em,
body.light-theme .invite-access-pill {
  border-color: #c7d1de;
  background: #f8fafc;
  color: #5d6a7c;
}

body.light-theme .invite-user-badges b,
body.light-theme .invite-user-badges em.accepted,
body.light-theme .invite-access-pill.accepted,
body.light-theme .invite-user-actions button,
body.light-theme .finance-admin-actions button,
body.light-theme .finance-copy-button {
  border-color: rgba(10, 186, 181, 0.46);
  background: rgba(10, 186, 181, 0.12);
  color: #087c7a;
}

body.light-theme .invite-user-badges em.blocked,
body.light-theme .invite-access-pill.blocked {
  border-color: rgba(255, 111, 120, 0.32);
  background: rgba(255, 111, 120, 0.12);
  color: #c6344b;
}

body.light-theme .finance-ledger-row b {
  color: #087c7a;
}

body.light-theme .finance-ledger-row b.negative {
  color: #c6344b;
}

body.light-theme .academy-panel {
  border-color: #c7d1de;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 253, 0.98)),
    #ffffff;
}

body.light-theme .academy-admin-panel {
  border-color: #c7d1de;
  background:
    linear-gradient(135deg, rgba(10, 186, 181, 0.08), transparent 34%),
    linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

body.light-theme .academy-admin-form input,
body.light-theme .academy-admin-form select,
body.light-theme .academy-admin-form textarea {
  border-color: #c7d1de;
  background: #ffffff;
  color: #111827;
}

body.light-theme .academy-admin-form input:focus,
body.light-theme .academy-admin-form select:focus,
body.light-theme .academy-admin-form textarea:focus {
  border-color: rgba(10, 186, 181, 0.55);
  outline: none;
  box-shadow: 0 0 0 3px rgba(10, 186, 181, 0.12);
}

body.light-theme .academy-admin-form input[type="file"] {
  padding: 7px 10px;
  color: #5d6a7c;
}

body.light-theme .academy-admin-form input[type="file"]::file-selector-button {
  min-height: 28px;
  margin-right: 10px;
  border: 1px solid rgba(10, 186, 181, 0.44);
  border-radius: 7px;
  padding: 0 12px;
  background: rgba(10, 186, 181, 0.12);
  color: #087c7a;
  font-weight: 900;
}

body.light-theme .academy-admin-form small {
  color: #5d6a7c;
}

body.light-theme .academy-file-control {
  border-color: #c7d1de;
  background: #ffffff;
  color: #111827;
}

body.light-theme .academy-file-control span {
  border-color: rgba(10, 186, 181, 0.44);
  background: rgba(10, 186, 181, 0.12);
  color: #087c7a;
}

body.light-theme .academy-file-control b {
  color: #5d6a7c;
}

body.light-theme .academy-card,
body.light-theme .academy-content-link,
body.light-theme .academy-detail-head,
body.light-theme .academy-empty {
  border-color: #c7d1de;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
  color: #111827;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

body.light-theme .academy-card.highlighted {
  border-color: rgba(10, 186, 181, 0.5);
  background:
    linear-gradient(180deg, rgba(10, 186, 181, 0.12), #ffffff);
}

body.light-theme .academy-card:hover,
body.light-theme .academy-card:focus-within,
body.light-theme .academy-content-link:hover,
body.light-theme .academy-content-link:focus-visible {
  border-color: rgba(10, 186, 181, 0.52);
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.11);
}

body.light-theme .academy-card strong,
body.light-theme .academy-content-body strong,
body.light-theme .academy-detail-head h2 {
  color: #111827;
}

body.light-theme .academy-card span,
body.light-theme .academy-card p,
body.light-theme .academy-card small,
body.light-theme .academy-content-body span,
body.light-theme .academy-content-body p,
body.light-theme .academy-empty {
  color: #5d6a7c;
}

body.light-theme .academy-thumb {
  background:
    linear-gradient(135deg, rgba(10, 186, 181, 0.2), rgba(124, 168, 255, 0.12)),
    #eef3f8;
}

body.light-theme .academy-thumb-fallback {
  color: #087c7a;
}

body.light-theme .update-admin-panel,
body.light-theme .notice-admin-panel {
  border-color: #c7d1de;
  background:
    linear-gradient(135deg, rgba(10, 186, 181, 0.08), transparent 34%),
    linear-gradient(180deg, #ffffff, #f8fafc);
  color: #111827;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

body.light-theme .update-admin-form input,
body.light-theme .update-admin-form textarea,
body.light-theme .notice-admin-form input,
body.light-theme .notice-admin-form textarea,
body.light-theme .notice-admin-form select {
  border-color: #c7d1de;
  background: #ffffff;
  color: #111827;
}

body.light-theme .update-admin-form input:focus,
body.light-theme .update-admin-form textarea:focus,
body.light-theme .notice-admin-form input:focus,
body.light-theme .notice-admin-form textarea:focus,
body.light-theme .notice-admin-form select:focus {
  border-color: rgba(10, 186, 181, 0.55);
  outline: none;
  box-shadow: 0 0 0 3px rgba(10, 186, 181, 0.12);
}

body.light-theme .update-admin-form small,
body.light-theme .notice-admin-form small {
  color: #5d6a7c;
}

body.light-theme .latest-notice-panel {
  border-color: #c7d1de;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
  color: #111827;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

body.light-theme .latest-notice-empty {
  border-color: #dbe3ee;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
  color: #5d6a7c;
}

body.light-theme .latest-notice-card {
  border-color: #c7d1de;
  background: #ffffff;
  color: #111827;
}

body.light-theme .latest-notice-card:hover,
body.light-theme .latest-notice-card:focus-visible {
  border-color: rgba(10, 186, 181, 0.5);
  background: #f8fafc;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

body.light-theme .latest-notice-card.is-read {
  opacity: 0.74;
  background: #f8fafc;
}

body.light-theme .latest-notice-main b {
  color: #111827;
}

body.light-theme .latest-notice-main small,
body.light-theme .latest-notice-meta {
  color: #5d6a7c;
}

body.light-theme .latest-notice-meta em {
  border-color: rgba(10, 186, 181, 0.38);
  background: rgba(10, 186, 181, 0.1);
  color: #087c7a;
}

body.light-theme .settings-list > div:hover,
body.light-theme .settings-list > div:focus-within {
  border-color: rgba(10, 186, 181, 0.46);
  background: #ffffff;
}

.order-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.records-collapser {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(34, 31, 48, 0.94), rgba(25, 23, 36, 0.98));
}

.records-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.records-summary-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.records-summary-row strong {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.records-collapser .order-list {
  max-height: min(52vh, 560px);
  overflow: auto;
  padding-right: 4px;
}

.order-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.order-item strong,
.order-item span {
  display: block;
}

.order-item button {
  min-height: 34px;
  border: 1px solid #2fa9a6;
  border-radius: 8px;
  padding: 0 10px;
  background: #087c7a;
  color: var(--text);
}

.order-item button:not(:disabled):hover,
.order-item button:focus-visible {
  border-color: #0abab5;
  background: #0a918d;
  outline: none;
  box-shadow: 0 10px 22px rgba(10, 186, 181, 0.18);
}

.order-item button:not(:disabled):active {
  background: #066866;
  box-shadow: none;
}

.telegram-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1c1a28;
}

.telegram-grid strong,
.telegram-grid p {
  display: block;
}

.telegram-grid p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

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

.telegram-actions button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #191724;
  color: var(--text);
}

.telegram-actions button:not(:disabled):hover,
.telegram-actions button:focus-visible {
  border-color: rgba(10, 186, 181, 0.44);
  background: #302b40;
  outline: none;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.telegram-actions button:not(:disabled):active {
  background: #1a1728;
  box-shadow: none;
}

#signalCards {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.strategy-board-meta {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(10, 186, 181, 0.08), transparent 38%),
    #191724;
}

.strategy-board-meta span,
.strategy-board-meta small {
  color: var(--muted);
}

.strategy-board-meta strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

.strategy-board-meta small {
  display: block;
  margin-top: 4px;
}

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

.session-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.session-chip.generated {
  border-color: rgba(10, 186, 181, 0.26);
  background: rgba(10, 186, 181, 0.1);
  color: var(--green);
}

.session-chip.pending {
  border-color: rgba(10, 186, 181, 0.34);
  background: rgba(10, 186, 181, 0.1);
  color: var(--green);
}

.signal-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(145px, 1fr) minmax(100px, 0.7fr) auto auto minmax(220px, 1.15fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1c1a28;
}

.strategy-card-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(16, 14, 24, 0.82);
  color: #cfd5e3;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.strategy-card-close:hover {
  border-color: rgba(255, 105, 120, 0.55);
  color: #ff7b88;
}

.strategy-card {
  min-height: 104px;
}

.signal-card span {
  color: var(--muted);
  font-size: 13px;
}

.signal-card strong,
.signal-card small {
  display: block;
}

.signal-card small {
  margin-top: 4px;
  color: #c8d0dc;
}

.signal-card .live-price {
  color: var(--green);
}

.badge {
  min-width: 74px;
  border-radius: 999px;
  padding: 7px 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.badge.long {
  background: rgba(10, 186, 181, 0.14);
  color: var(--green);
}

.badge.short {
  background: rgba(255, 111, 120, 0.16);
  color: var(--red);
}

.badge.locked {
  background: rgba(146, 156, 172, 0.14);
  color: var(--muted);
}

.badge.closed {
  background: rgba(146, 156, 172, 0.14);
  color: var(--muted);
}

.status-pill {
  min-width: 104px;
  border-radius: 999px;
  padding: 7px 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
}

.status-pill.active {
  background: rgba(103, 167, 255, 0.14);
  color: var(--blue);
}

.status-pill.watch {
  background: rgba(10, 186, 181, 0.14);
  color: var(--green);
}

.status-pill.no_trade {
  background: rgba(146, 156, 172, 0.14);
  color: var(--muted);
}

.status-pill.invalidated {
  background: rgba(146, 156, 172, 0.14);
  color: var(--muted);
}

.status-pill.tp1 {
  background: rgba(10, 186, 181, 0.14);
  color: var(--green);
}

.status-pill.tp2 {
  background: rgba(10, 186, 181, 0.14);
  color: var(--green);
}

.status-pill.stopped {
  background: rgba(255, 111, 120, 0.16);
  color: var(--red);
}

.status-pill.missed {
  background: rgba(146, 156, 172, 0.14);
  color: var(--muted);
}

.status-pill.locked {
  background: rgba(146, 156, 172, 0.14);
  color: var(--muted);
}

.status-pill.closed {
  background: rgba(146, 156, 172, 0.14);
  color: var(--muted);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.metric-grid div {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1c1a28;
}

.metric-grid span {
  display: block;
  color: var(--muted);
}

.metric-grid strong {
  display: block;
  margin-top: 12px;
  font-size: 26px;
}

.assistant-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  height: var(--assistant-panel-height, clamp(560px, calc(100vh - 132px), 760px));
  min-height: 0;
  overflow: hidden;
}

.analyzer-page .assistant-panel {
  min-height: clamp(560px, calc(100vh - 132px), 760px);
}

.analyzer-page .assistant-panel:has(.chat-window.is-empty) {
  grid-template-rows: auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-content: stretch;
}

.assistant-compose {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 10px;
}

.assistant-compose[hidden] {
  display: none !important;
}

.assistant-panel.has-analysis-report {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.chat-window {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  margin-top: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 8px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.chat-window::-webkit-scrollbar {
  width: 8px;
}

.chat-window::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.chat-window::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(10, 186, 181, 0.38);
}

.chat-window::-webkit-scrollbar-thumb:hover {
  background: rgba(10, 186, 181, 0.62);
}

.chat-window.is-empty {
  align-content: center;
  justify-items: center;
  overflow: hidden;
}

.analyzer-page .chat-window.is-empty {
  min-height: auto;
  margin-top: 0;
  padding-right: 0;
}

.assistant-empty-state {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--muted);
  text-align: center;
}

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

.assistant-empty-state small {
  max-width: 260px;
  line-height: 1.45;
}

.assistant-logo-bot {
  position: relative;
  display: grid;
  width: 108px;
  height: 96px;
  margin-bottom: -8px;
  place-items: center;
  animation: assistant-float 3.6s ease-in-out infinite;
}

.assistant-logo-bot::before {
  position: absolute;
  z-index: 2;
  top: 24px;
  left: 22px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent 42%, rgba(255, 247, 180, 0.92) 48% 52%, transparent 58%),
    linear-gradient(0deg, transparent 42%, rgba(255, 247, 180, 0.92) 48% 52%, transparent 58%),
    radial-gradient(circle, rgba(255, 255, 255, 1) 0 14%, rgba(255, 216, 57, 0.96) 18% 32%, transparent 66%);
  content: "";
  filter: drop-shadow(0 0 6px rgba(255, 194, 25, 0.74));
  opacity: 0.28;
  pointer-events: none;
  transform: scale(0.72) rotate(0deg);
  animation: assistant-star-twinkle 1.9s ease-in-out infinite;
}

.assistant-logo-bot::after {
  position: absolute;
  z-index: 2;
  top: 36px;
  left: 16px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.96) 0 22%, rgba(255, 205, 38, 0.92) 34%, transparent 72%);
  content: "";
  filter: drop-shadow(0 0 5px rgba(255, 194, 25, 0.66));
  opacity: 0.2;
  pointer-events: none;
  transform: scale(0.7);
  animation: assistant-star-spark 2.3s ease-in-out infinite 0.42s;
}

.assistant-bot-image {
  position: relative;
  z-index: 1;
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: none;
  transform-origin: 42% 48%;
  animation: none;
}

body.light-theme .assistant-logo-bot::before,
body.light-theme .assistant-logo-bot::after {
  display: none;
  content: none;
}

@keyframes assistant-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}

@keyframes assistant-star-twinkle {
  0%,
  100% {
    opacity: 0.22;
    transform: scale(0.62) rotate(0deg);
  }

  45% {
    opacity: 1;
    transform: scale(1.08) rotate(16deg);
  }

  70% {
    opacity: 0.5;
    transform: scale(0.86) rotate(28deg);
  }
}

@keyframes assistant-star-spark {
  0%,
  100% {
    opacity: 0.12;
    transform: scale(0.62);
  }

  48% {
    opacity: 0.88;
    transform: scale(1.2);
  }
}

.assistant-message,
.user-message {
  max-width: 92%;
  min-width: 0;
  border-radius: 8px;
  padding: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.analysis-turn {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(88, 79, 120, 0.78);
  border-radius: 14px;
  background: rgba(18, 16, 28, 0.72);
}

.analysis-turn + .analysis-turn {
  margin-top: 14px;
}

.assistant-message {
  justify-self: start;
  border: 1px solid var(--line);
  background: #1c1a28;
  color: #dbe3ee;
}

.assistant-message:has(.assistant-analysis-layout) {
  width: 100%;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

.assistant-message strong,
.assistant-message span {
  display: block;
}

.assistant-message span {
  margin-top: 8px;
}

.assistant-report {
  display: grid;
  gap: 18px;
}

.report-title {
  display: grid;
  gap: 5px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.report-title strong {
  font-size: 19px;
}

.report-title span,
.report-section p,
.report-strategy dd {
  color: #c8d0dc;
}

.report-section {
  display: grid;
  gap: 10px;
}

.report-section h3 {
  margin: 0;
  font-size: 16px;
}

.report-section p {
  margin: 0;
}

.report-group,
.report-strategy {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 15, 22, 0.42);
}

.report-group h4,
.report-strategy h4 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 15px;
}

.report-strategy dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.report-strategy dl div {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px;
}

.report-strategy dt {
  color: var(--muted);
  font-weight: 800;
}

.report-strategy dd {
  margin: 0;
}

.user-message {
  justify-self: end;
  background: #263b39;
  color: var(--text);
}

.chat-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}

.assistant-compose .chat-input {
  width: min(760px, 100%);
  margin-top: 0;
  border: 1px solid rgba(10, 186, 181, 0.36);
  border-radius: 18px;
  padding: 6px;
  background: rgba(21, 19, 31, 0.88);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.chat-input input,
.chat-input textarea {
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #15131f;
  color: var(--text);
}

.assistant-compose .chat-input textarea {
  height: 42px;
  min-height: 42px;
  max-height: 132px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 10px 16px;
  line-height: 22px;
  resize: none;
  overflow-y: hidden;
}

.assistant-compose .chat-input button {
  width: auto;
  min-width: 68px;
  height: 42px;
  min-height: 42px;
  border-radius: 12px;
  padding: 0 16px;
  flex: 0 0 auto;
}

.assistant-prompt-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.assistant-prompt-tags span {
  border: 1px solid rgba(10, 186, 181, 0.24);
  border-radius: 999px;
  padding: 5px 11px;
  background: rgba(10, 186, 181, 0.08);
}

.method-stack {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.method-stack div {
  display: grid;
  grid-template-columns: 36px minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 12px;
  align-items: center;
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #1c1a28;
}

.method-stack strong {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: #3d374e;
  color: var(--teal);
}

.method-stack span {
  font-weight: 800;
}

.method-stack small {
  color: var(--muted);
  line-height: 1.45;
}

.checklist {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  color: #d7dce5;
}

.checklist label {
  display: flex;
  gap: 9px;
  align-items: center;
}

.checklist input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

.disclaimer {
  padding: 0 2px 14px;
  font-size: 13px;
}

@media (max-width: 980px) {
  .auth-screen {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .auth-brand {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .auth-brand-copy {
    justify-items: center;
  }

  .auth-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .rail {
    position: static;
    height: auto;
    padding: 14px;
  }

  .nav-list {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }

  .workspace-heading.is-brand {
    min-height: 50px;
  }

  .workspace-heading.is-brand .workspace-brand-icon {
    width: 46px;
    height: 46px;
  }

  .workspace-title-text {
    font-size: clamp(28px, 4.8vw, 40px);
  }

  .workspace-brand-pills span {
    padding: 0 6px;
    font-size: 9px;
  }

  .hero-grid,
  .content-grid,
  .session-grid,
  .plan-grid,
  .account-page-grid,
  .strategy-board-meta,
  .referral-grid,
  .referral-ranking,
  .academy-grid,
  .academy-content-grid,
  .billing-grid,
  .admin-finance-summary,
  .telegram-grid,
  .notification-grid,
  .backtest-grid,
  .risk-grid,
  .executor-grid,
  .executor-form.compact,
  .executor-form.risk-form,
  .executor-risk-summary,
  .controls-strip {
    grid-template-columns: 1fr;
  }

  .billing-panel[data-page="invite"] .billing-grid {
    grid-template-columns: 1fr;
  }

  .executor-steps {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .executor-steps i {
    display: none;
  }

  .executor-actions {
    grid-template-columns: 1fr;
  }

  .executor-portfolio,
  .executor-allocation {
    grid-template-columns: 1fr;
  }

  .latest-notice-card {
    grid-template-columns: 12px minmax(0, 1fr);
  }

  .latest-notice-meta {
    grid-column: 2;
    justify-items: start;
  }

  .invite-users-head,
  .invite-user-row,
  .invite-user-main,
  .academy-detail-head,
  .invite-order-lines li,
  .finance-ledger-grid,
  .finance-ledger-row,
  .finance-ledger-row.admin,
  .notice-admin-form,
  .withdraw-form {
    grid-template-columns: 1fr;
  }

  .invite-user-badges,
  .invite-user-actions,
  .finance-admin-actions {
    justify-content: flex-start;
  }

  .control-group,
  .control-group.wide {
    justify-content: space-between;
  }

  .session-chip-row {
    justify-content: flex-start;
  }

  .assistant-panel {
    height: clamp(560px, calc(100vh - 112px), 760px);
  }

  .assistant-compose .chat-input {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .security-summary-grid,
  .security-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .auth-screen {
    padding: 14px;
  }

  .auth-brand strong {
    font-size: 34px;
  }

  .auth-claw {
    width: 128px;
    height: 128px;
  }

  .auth-card {
    padding: 16px;
  }

  .workspace {
    padding: 14px;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    justify-content: flex-end;
  }

  .workspace-heading.is-brand {
    gap: 8px;
  }

  .workspace-heading.is-brand .workspace-brand-icon {
    width: 42px;
    height: 42px;
  }

  .workspace-brand-copy {
    width: min(100%, calc(100vw - 86px));
  }

  .workspace-title-text {
    font-size: clamp(26px, 8vw, 34px);
  }

  .workspace-brand-pills {
    gap: 5px;
  }

  .workspace-brand-pills span {
    min-height: 17px;
    padding: 0 4px;
    font-size: clamp(8px, 1.8vw, 9px);
  }

  .topbar-actions {
    width: auto;
    margin-left: auto;
    overflow-x: auto;
  }

  .security-code-row {
    grid-template-columns: 1fr;
  }

  .primary-button {
    flex: 1;
  }

  .ticker-row,
  .metric-grid,
  .signal-card,
  .history-table > div,
  .method-stack div,
  .chat-input,
  .lock-actions,
  .lock-metrics,
  .order-item,
  .withdraw-form,
  .academy-admin-form,
  .manual-signal-form,
  .notice-admin-form,
  .settings-list > div,
  .telegram-actions,
  .executor-exchange-card,
  .email-code-row,
  .executor-exchange-card em {
    justify-self: end;
  }

  .executor-exchange-card {
    grid-template-columns: 46px minmax(0, 1fr) max-content;
  }

  .executor-exchange-icon,
  .executor-selected-provider > span {
    width: 46px;
    height: 46px;
  }

  .telegram-actions {
    display: grid;
  }

  .latest-notice-head {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-grid small,
  .settings-list p {
    grid-column: auto;
  }

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

  .signal-meter {
    grid-template-columns: 1fr;
  }

  .nav-item {
    justify-content: center;
    font-size: 0;
  }

  .nav-item span {
    font-size: 18px;
  }
}

/* Global typography pass: keep product titles strong, make operational copy lighter and consistent. */
:root {
  --font-ui:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --fw-copy: 400;
  --fw-control: 500;
  --fw-label: 650;
  --fw-title: 800;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-ui);
}

body,
p,
li,
small,
td,
textarea,
.executor-help li,
.executor-selected-provider small,
.executor-binding-row span,
.executor-binding-row small,
.executor-output,
.settings-list p,
.billing-card p,
.academy-card p,
.latest-notice-card p,
.notification-grid small,
.account-page-grid small,
.history-list time,
.signal-card p,
.macro-card span,
.trade-data-meta,
.invite-user-main span,
.finance-ledger-row span {
  font-weight: var(--fw-copy) !important;
}

button,
input,
select,
.ghost-button,
.primary-button,
.link-button,
.language-button,
.segmented button,
.executor-form input,
.executor-form select,
.executor-actions select,
.executor-form button,
.executor-actions button {
  font-weight: var(--fw-control) !important;
}

.eyebrow,
.premium-pill,
.executor-provider-group > span,
.executor-card-head span,
.section-head span,
.account-page-grid article > span,
.settings-list > div > span,
.billing-card span,
.plan-card-head span,
.academy-card span,
.history-panel h3,
.notification-grid strong,
.executor-steps,
.executor-help strong {
  font-weight: var(--fw-label) !important;
}

h1,
h2,
h3,
.billing-panel .section-head h2,
.brand strong,
.section-head h2,
.auth-card h1,
.auth-brand strong,
.identity-main strong,
.executor-card-head strong,
.executor-exchange-card strong,
.plan-card strong,
.billing-card strong,
.academy-card strong,
.macro-card strong,
.signal-card strong,
.backtest-grid strong,
.risk-grid strong,
.account-page-grid strong,
.latest-notice-head h3 {
  font-weight: var(--fw-title) !important;
}

.billing-panel .section-head h2 {
  color: var(--green);
}

/* ChatGPT-style assistant composer: keep it strictly horizontal and low. */
.analyzer-page .assistant-compose {
  width: 100%;
  align-self: center;
  justify-items: center;
  gap: 8px;
}

.analyzer-page .assistant-compose .chat-input {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: end !important;
  width: min(760px, 100%) !important;
  min-height: 58px !important;
  max-height: 148px !important;
  margin: 0 !important;
  padding: 6px !important;
  overflow: visible !important;
  border-radius: 18px !important;
}

.analyzer-page .assistant-compose .chat-input textarea {
  width: 100% !important;
  height: 44px;
  min-height: 44px !important;
  max-height: 132px !important;
  padding: 11px 16px !important;
  border: 0 !important;
  line-height: 22px !important;
  resize: none !important;
  overflow-y: hidden;
}

.analyzer-page .assistant-compose .chat-input button {
  width: auto !important;
  min-width: 66px !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0 16px !important;
  border-radius: 12px !important;
  line-height: 1 !important;
}

.analyzer-page .assistant-prompt-tags {
  min-height: 28px;
  align-items: center;
}

.analyzer-page .assistant-prompt-tags span {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 11px;
  line-height: 1;
}

.agent-watch-action {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(10, 186, 181, 0.42);
  border-radius: 16px;
  background: rgba(10, 186, 181, 0.08);
}

.assistant-analysis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 22px;
  align-items: stretch;
  height: min(690px, calc(100vh - 220px));
  min-height: 520px;
  overflow: hidden;
}

.assistant-report-column {
  min-width: 0;
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1c1a28;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.trade-brief-panel {
  position: relative;
  top: auto;
  align-self: start;
  display: grid;
  align-content: start;
  gap: 8px;
  margin-top: 18px;
  padding: 10px;
  border: 1px solid rgba(10, 186, 181, 0.34);
  border-radius: 16px;
  background: rgba(10, 186, 181, 0.06);
  min-height: 0;
  height: calc(100% - 18px);
  max-height: calc(100% - 18px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.trade-brief-panel-head,
.trade-brief-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.trade-brief-panel-head span,
.trade-brief-head span,
.trade-brief-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.trade-brief-head span {
  color: var(--accent);
  font-size: clamp(14px, 1vw, 17px);
  font-weight: 950;
}

.trade-brief-card {
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  border: 1px solid rgba(10, 186, 181, 0.28);
  border-radius: 12px;
  background: rgba(12, 18, 28, 0.5);
}

.trade-brief-card strong {
  color: var(--green);
  font-size: clamp(14px, 0.95vw, 17px);
}

.trade-brief-card dl {
  display: grid;
  gap: 4px;
  margin: 0;
}

.trade-brief-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.trade-brief-card dd {
  margin: 0;
  color: var(--text);
  font-size: clamp(14px, 0.95vw, 17px);
  font-weight: 850;
  text-align: right;
}

.trade-brief-card .primary-button {
  min-height: 40px;
  padding: 9px 14px;
}

.agent-watch-action strong,
.agent-watch-card strong,
.executor-draft-card strong {
  color: var(--green);
}

.agent-watch-plan,
.agent-watch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.agent-watch-plan span,
.agent-watch-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(10, 186, 181, 0.25);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}

.agent-watch-list {
  display: grid;
  gap: 10px;
  width: min(760px, 100%);
  margin-top: 8px;
}

.signal-agent-watch-list {
  width: 100%;
  margin-top: 16px;
}

.agent-watch-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(10, 186, 181, 0.32);
  border-radius: 14px;
  background: rgba(10, 186, 181, 0.06);
}

.agent-watch-card span,
.agent-watch-card small,
.executor-draft-card span,
.executor-draft-card small {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.executor-drafts {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.executor-draft-head,
.executor-draft-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.executor-draft-head {
  color: var(--muted);
}

.executor-draft-card {
  padding: 14px;
  border: 1px solid rgba(10, 186, 181, 0.3);
  border-radius: 14px;
  background: rgba(10, 186, 181, 0.06);
}

body.light-theme .agent-watch-action,
body.light-theme .agent-watch-card,
body.light-theme .trade-brief-panel,
body.light-theme .trade-brief-card,
body.light-theme .executor-draft-card {
  background: rgba(10, 186, 181, 0.07);
  border-color: rgba(10, 186, 181, 0.35);
}

body.light-theme .assistant-report-column {
  background: #ffffff;
  border-color: #cbd5e1;
}

.wallet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 10, 18, 0.72);
  backdrop-filter: blur(10px);
  overflow: auto;
}

.wallet-backdrop[hidden] {
  display: none;
}

.wallet-card {
  width: min(620px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid rgba(10, 186, 181, 0.38);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.wallet-head,
.wallet-actions,
.wallet-convert-panel,
.wallet-token-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.wallet-network-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wallet-network-row button {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-height: 122px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
  text-align: left;
}

.wallet-network-row button strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.2;
}

.wallet-network-row button span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.wallet-network-row button[data-wallet-chain="mova"] {
  grid-column: 1 / -1;
  min-height: 122px;
  align-content: center;
  gap: 3px;
}

.wallet-network-row button[data-wallet-chain="mova"] span {
  font-size: 13px;
  line-height: 1.18;
}

.wallet-contract-line {
  width: 100%;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.wallet-contract-line code {
  min-width: 0;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.wallet-copy-chip {
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(10, 186, 181, 0.48);
  background: rgba(10, 186, 181, 0.12);
  color: var(--status) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

.wallet-network-row button.is-active {
  border-color: rgba(10, 186, 181, 0.72);
  background: rgba(10, 186, 181, 0.13);
}

.wallet-network-row button.is-active strong {
  color: var(--text);
}

.wallet-network-row button.is-active span {
  color: var(--status);
}

.wallet-disconnect-button {
  justify-self: flex-start;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 123, 123, 0.5);
  border-radius: 999px;
  background: rgba(255, 123, 123, 0.08);
  color: #ff9a9a;
  font-weight: 900;
  cursor: pointer;
}

.wallet-disconnect-button:hover {
  border-color: rgba(255, 123, 123, 0.78);
  background: rgba(255, 123, 123, 0.14);
}

.wallet-provider {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}

.wallet-provider:hover {
  border-color: rgba(10, 186, 181, 0.58);
  background: rgba(10, 186, 181, 0.12);
}

.wallet-provider.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.wallet-provider.is-disabled:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.wallet-provider-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  overflow: hidden;
}

.wallet-provider-logo svg {
  width: 30px;
  height: 30px;
  display: block;
}

.logo-metamask {
  background: #fff7ed;
}

.logo-metamask .fox-ear-left,
.logo-metamask .fox-ear-right {
  fill: #e2761b;
}

.logo-metamask .fox-face-left,
.logo-metamask .fox-face-right {
  fill: #f6851b;
}

.logo-metamask .fox-muzzle {
  fill: #f5c06f;
}

.logo-metamask .fox-nose {
  fill: #2f1b12;
}

.logo-okx {
  background: #050505;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.logo-tokenpocket {
  background: linear-gradient(135deg, #1f7cff, #00c2ff);
}

.logo-tronlink {
  background: #eb0029;
  letter-spacing: 0;
}

.logo-mova {
  background: linear-gradient(135deg, #16a34a, #0abaaf);
}

.logo-trust {
  background: #eef6ff;
}

.logo-trust svg path:first-child {
  fill: #3375bb;
}

.logo-trust svg path:last-child {
  fill: #1c5d9f;
}

.wallet-head span,
.wallet-convert-panel span,
.wallet-status,
.wallet-convert-panel p {
  color: var(--muted);
}

.wallet-status,
.wallet-convert-panel p {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wallet-token-row {
  justify-content: flex-start;
}

.wallet-token-row span {
  color: var(--muted);
}

.wallet-token-row button {
  min-height: 38px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

.wallet-token-row button.is-active {
  border-color: rgba(10, 186, 181, 0.55);
  background: rgba(10, 186, 181, 0.16);
  color: var(--accent);
}

.wallet-convert-panel {
  align-items: flex-start;
  padding: 14px;
  border: 1px solid rgba(10, 186, 181, 0.28);
  border-radius: 14px;
  background: rgba(10, 186, 181, 0.06);
}

body.light-theme .wallet-card {
  background: #ffffff;
  border-color: rgba(10, 186, 181, 0.35);
}

body.light-theme .wallet-convert-panel {
  background: rgba(10, 186, 181, 0.07);
}

body.light-theme .wallet-provider {
  background: rgba(10, 186, 181, 0.045);
}

@media (max-width: 640px) {
  .wallet-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .assistant-analysis-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .assistant-report-column {
    overflow: visible;
  }

  .trade-brief-panel {
    position: static;
    margin-top: 0;
    height: auto;
    max-height: none;
  }
}
