/* Verified Prop Challenge ? MT5-only ledger */
.verified-prop-section {
  overflow: hidden;
}

.verified-prop-header {
  margin-bottom: 22px;
}

.verified-prop-launch,
.verified-prop-empty {
  max-width: 760px;
  margin: 32px auto;
  padding: 28px;
  border: 1px solid rgba(148, 163, 255, 0.14);
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 0%, rgba(124, 92, 255, 0.16), transparent 42%),
    rgba(10, 12, 20, 0.88);
}

.verified-prop-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.verified-prop-lock {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  border: 1px solid rgba(52, 211, 153, 0.32);
  color: #86efac;
  background: rgba(52, 211, 153, 0.08);
  font: 800 14px/1 ui-monospace, monospace;
}

.verified-prop-connect,
.verified-prop-account {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(244, 114, 182, 0.2);
  border-radius: 16px;
  background: rgba(244, 114, 182, 0.045);
}

.verified-prop-connect.is-connected,
.verified-prop-account.is-match {
  border-color: rgba(52, 211, 153, 0.25);
  background: rgba(52, 211, 153, 0.05);
}

.verified-prop-connect-dot,
.verified-prop-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f472b6;
  box-shadow: 0 0 12px rgba(244, 114, 182, 0.7);
}

.verified-prop-connect.is-connected .verified-prop-connect-dot,
.verified-prop-account.is-match::before,
.verified-prop-status.is-active .verified-prop-status-dot,
.verified-prop-status.is-passed .verified-prop-status-dot {
  background: #34d399;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.65);
}

.verified-prop-connect div {
  display: grid;
  gap: 4px;
}

.verified-prop-connect small,
.verified-prop-account small,
.verified-prop-proof-note {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.verified-prop-template {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.verified-prop-launch-actions,
.verified-prop-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.verified-prop-proof-note {
  margin-top: 16px;
}

.verified-prop-phase-track {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.verified-prop-phase {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border: 1px solid rgba(148, 163, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.verified-prop-phase > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  font-weight: 800;
}

.verified-prop-phase div {
  display: grid;
  gap: 2px;
}

.verified-prop-phase small {
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.verified-prop-phase.is-current {
  border-color: rgba(124, 92, 255, 0.36);
  background: rgba(124, 92, 255, 0.08);
}

.verified-prop-phase.is-current > span {
  color: #fff;
  background: #7c5cff;
}

.verified-prop-phase.is-done > span {
  color: #052e24;
  background: #34d399;
}

.verified-prop-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px 17px;
  margin-bottom: 12px;
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 18px;
  background: rgba(52, 211, 153, 0.04);
}

.verified-prop-status > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.verified-prop-status.is-breached {
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.06);
}

.verified-prop-status.is-breached .verified-prop-status-dot {
  background: #f87171;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.65);
}

.verified-prop-badge {
  padding: 6px 9px;
  border: 1px solid rgba(52, 211, 153, 0.24);
  border-radius: 9px;
  color: #86efac;
  font: 700 9px/1 ui-monospace, monospace;
  letter-spacing: 0.12em;
}

.verified-prop-account {
  grid-template-columns: auto minmax(0, 1fr) auto;
  margin-bottom: 14px;
}

.verified-prop-account > span {
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

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

.verified-prop-objectives article,
.verified-prop-kpis article {
  padding: 16px;
  border: 1px solid rgba(148, 163, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.verified-prop-objectives header,
.verified-prop-objectives footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
}

.verified-prop-objectives header span,
.verified-prop-objectives footer span {
  color: var(--text-secondary);
}

.verified-prop-meter {
  height: 7px;
  margin: 14px 0 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.verified-prop-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c5cff, #22d3ee);
}

.verified-prop-meter.is-risk i {
  background: linear-gradient(90deg, #fbbf24, #f87171);
}

.verified-prop-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 18px;
}

.verified-prop-kpis article {
  display: grid;
  gap: 7px;
}

.verified-prop-kpis span {
  color: var(--text-secondary);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.verified-prop-timeline {
  margin-top: 22px;
}

.verified-prop-timeline h3 {
  margin-bottom: 10px;
}

.verified-prop-trade {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 5px;
  border-bottom: 1px solid rgba(148, 163, 255, 0.08);
}

.verified-prop-trade div {
  display: grid;
  gap: 3px;
}

.verified-prop-trade small,
.verified-prop-trade > span:not(.verified-prop-trade-side),
.verified-prop-no-trades {
  color: var(--text-secondary);
  font-size: 11px;
}

.verified-prop-trade-side {
  padding: 6px 8px;
  border-radius: 9px;
  color: #86efac;
  background: rgba(52, 211, 153, 0.08);
  text-align: center;
  font-size: 10px;
  font-weight: 800;
}

.verified-prop-trade-side.sell {
  color: #fda4af;
  background: rgba(244, 63, 94, 0.08);
}

.verified-prop-loading,
.verified-prop-no-trades {
  padding: 28px;
  text-align: center;
}

@media (max-width: 900px) {
  .verified-prop-objectives,
  .verified-prop-kpis {
    grid-template-columns: 1fr 1fr;
  }

  .verified-prop-account {
    grid-template-columns: 1fr;
  }

  .verified-prop-trade {
    grid-template-columns: 48px minmax(0, 1fr) auto;
  }

  .verified-prop-trade > strong {
    grid-column: 2 / -1;
  }
}

@media (max-width: 560px) {
  .verified-prop-phase-track,
  .verified-prop-objectives,
  .verified-prop-kpis {
    grid-template-columns: 1fr;
  }
}

body[data-theme="white"] .ai-command-center,
body[data-theme="white"] .verified-prop-launch,
body[data-theme="white"] .verified-prop-empty {
  color: #171827;
  border-color: rgba(42, 48, 82, 0.12);
  background:
    radial-gradient(circle at 92% 0%, rgba(var(--accent-rgb), 0.08), transparent 32%),
    radial-gradient(circle at 0 100%, rgba(34, 211, 238, 0.05), transparent 36%),
    #f8f9fd;
}

body[data-theme="white"] .ai-command-kpis article,
body[data-theme="white"] .ai-command-panel,
body[data-theme="white"] .verified-prop-objectives article,
body[data-theme="white"] .verified-prop-kpis article,
body[data-theme="white"] .verified-prop-phase {
  color: #171827;
  border-color: rgba(42, 48, 82, 0.1);
  background: #fff;
}

body[data-theme="white"] .ai-command-period,
body[data-theme="white"] .ai-command-tier {
  color: color-mix(in srgb, var(--accent-primary) 70%, #1e1b2e);
  border-color: rgba(var(--accent-rgb), 0.28);
  background: rgba(var(--accent-rgb), 0.08);
}

body[data-theme="white"] .ai-command-lock {
  border-color: rgba(var(--accent-rgb), 0.18);
  background: rgba(var(--accent-rgb), 0.04);
}

body[data-theme="white"] .ai-weekly-fixes li {
  color: #303349;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", sans-serif;
  color: #f2eef8;
  background: radial-gradient(circle at top left, rgba(98, 51, 185, 0.24) 0%, rgba(5, 4, 10, 0.98) 34%, #020106 100%);
  min-height: 100vh;
  overflow-y: scroll;
}

.desktop-update-banner {
  position: fixed;
  z-index: 10000;
  top: 18px;
  left: 50%;
  width: min(620px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 13px 12px 15px;
  border: 1px solid rgba(168, 110, 255, 0.4);
  border-radius: 18px;
  color: #f8f5ff;
  background: linear-gradient(145deg, rgba(30, 20, 47, 0.98), rgba(10, 8, 18, 0.98));
  box-shadow: 0 22px 65px rgba(0, 0, 0, 0.52), inset 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -18px) scale(0.98);
  transition: opacity 220ms ease, visibility 220ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.desktop-update-banner.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) scale(1);
}

.desktop-update-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  font-size: 20px;
  background: linear-gradient(135deg, #a668ff, #6557e8, #3baee6);
  box-shadow: 0 9px 25px rgba(116, 87, 232, 0.35);
}

.desktop-update-copy {
  min-width: 0;
  flex: 1;
}

.desktop-update-copy b,
.desktop-update-copy small {
  display: block;
}

.desktop-update-copy b {
  font-size: 14px;
}

.desktop-update-copy small {
  margin-top: 3px;
  color: rgba(234, 226, 247, 0.67);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desktop-update-install,
.desktop-update-close {
  border: 0;
  color: #fff;
  cursor: pointer;
}

.desktop-update-install {
  padding: 10px 14px;
  border-radius: 11px;
  font-weight: 800;
  background: linear-gradient(105deg, #9a5cf1, #6557e8);
}

.desktop-update-close {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: rgba(245, 239, 255, 0.68);
  background: rgba(255, 255, 255, 0.06);
  font-size: 19px;
}

.desktop-update-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
}

html[data-theme="white"] .desktop-update-banner {
  color: #20182d;
  border-color: rgba(116, 87, 180, 0.22);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 240, 250, 0.98));
  box-shadow: 0 22px 60px rgba(51, 37, 75, 0.2);
}

html[data-theme="white"] .desktop-update-copy small {
  color: #746b7e;
}

html[data-theme="white"] .desktop-update-close {
  color: #6e6479;
  background: #ece7f1;
}

@media (max-width: 680px) {
  .desktop-update-banner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .desktop-update-install {
    order: 4;
    width: 100%;
  }
}

select,
option {
  color-scheme: inherit;
}

html[data-theme="white"] {
  color-scheme: light;
}

.app {
  max-width: 2800px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  position: relative;
}

.shell-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.main-content {
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 18px;
  background: rgba(5, 4, 10, 0.9);
  border: 1px solid rgba(132, 87, 255, 0.35);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.42);
}

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

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: contain;
}

.brand h2 {
  margin: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.sidebar-nav button,
.bias-button {
  width: 100%;
  text-align: left;
  background: rgba(18, 12, 32, 0.72);
  border: 1px solid rgba(132, 87, 255, 0.32);
  color: #e8dcff;
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
}

.sidebar-nav button:hover,
.bias-button:hover,
.bias-button.is-active {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.14);
}

.header {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: center;
  margin: 0 auto 32px;
  text-align: center;
  max-width: 2600px;
  width: 100%;
}

.header > div {
  width: 100%;
  text-align: center;
}

.top-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  text-align: center;
  flex-direction: column;
  width: 100%;
  max-width: 2600px;
  margin-left: auto;
  margin-right: auto;
}

.top-info .motivation-card {
  max-width: 460px;
  align-self: center;
  margin: 0 auto;
}

.weather-top {
  width: 100%;
  max-width: 900px;
  align-self: center;
  margin: 0 auto;
  text-align: left;
  background: rgba(12, 9, 20, 0.6);
  border: 1px solid rgba(72, 53, 122, 0.5);
  border-radius: 16px;
  padding: 16px;
}

.top-info .greeting,
.top-info .date-time {
  text-align: center;
}

.account-profile-switcher {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  width: 100%;
  min-width: 0;
}

.account-profile-switcher label {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: 11px;
  color: var(--text-secondary);
}

.account-profile-switcher .ghost-select {
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
}

.account-profile-switcher .ghost-button {
  padding: 9px 12px;
  border-radius: 12px;
  white-space: nowrap;
}

.account-profile-summary {
  display: grid;
  gap: 10px;
  width: 100%;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg-secondary, #12101f) 88%, #000);
  box-shadow: none;
}
.account-profile-summary > span:first-child {
  color: var(--text-primary, var(--text, #f8fafc));
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: -0.01em;
}

.account-profile-summary .link-button {
  justify-self: start;
  padding: 0;
  font-size: 12px;
}

body[data-theme="white"] .account-profile-summary {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.1);
}

.account-profile-modal-card {
  max-width: 780px;
}

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

.account-profile-form label {
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 12px;
}

.account-profile-form input,
.account-profile-form select {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-primary);
}

.account-profile-form option {
  background: #111827;
  color: #f2eef8;
}

.funded-certificate-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  background: rgba(var(--accent-rgb), 0.04);
}

.funded-certificate-section > .ghost-button {
  justify-self: start;
  border-radius: 12px;
}

.funded-certificate-panel {
  display: grid;
  gap: 10px;
}

.funded-certificate-panel.hidden {
  display: none;
}

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

.account-profile-certificate-preview {
  max-height: 220px;
  width: 100%;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  background: rgba(0, 0, 0, 0.2);
}

.top-info > div {
  width: 100%;
  text-align: center;
}

.info-bottom {
  margin-top: 24px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 12px;
  color: var(--kicker-color);
  margin: 0 0 8px;
}

h1 {
  margin: 0;
  font-size: 32px;
}

h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.subtitle {
  margin: 8px 0 0;
  color: #b9accf;
  font-size: 14px;
}

.greeting {
  margin: 12px 0 0;
  font-size: 20px;
  color: #e4dcff;
}

.date-time {
  margin: 6px 0 0;
  font-size: 14px;
  color: #b9accf;
}

.motivation-card {
  min-width: 260px;
  max-width: 320px;
  background: var(--motivation-card-bg);
  border: 1px solid var(--motivation-card-border);
  padding: 16px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.motivation-text {
  font-size: 16px;
  margin: 0;
  color: #ffffff;
}

.factor-controls {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.top-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  margin-bottom: 24px;
}

.left-stack,
.right-stack {
  display: grid;
  gap: 14px;
  align-content: start;
  align-items: start;
}

.right-stack > .card {
  width: 100%;
}

.card {
  background: rgba(6, 5, 12, 0.86);
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  border-radius: 18px;
  padding: 22px 22px 24px;
  box-shadow: 0 20px 40px rgba(4, 3, 8, 0.45);
  backdrop-filter: blur(12px);
}

.card > .subtitle:last-child,
.discipline-card > .subtitle:last-child,
.coach-card > .subtitle:last-child,
.session-heatmap-card > .subtitle:last-child {
  margin-bottom: 2px;
}

.coach-card {
  padding: 18px 20px 20px;
}

.coach-card h3 {
  margin: 6px 0 8px;
}

.journal-input-section,
.journal-table-section,
.weekly-section,
.sessions-analytics-section,
.active-trades-section {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

.journal-input-section .form-actions,
.journal-table-section .filters {
  margin-bottom: 4px;
}

.journal-table-section .trade-table-wrapper {
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.discipline-card {
  padding: 18px 18px 20px;
}

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

.profile-card {
  display: flex;
  flex-direction: column;
}

.profile-card .section-header {
  margin-bottom: 12px;
}

.profile-card .section-header h2 {
  margin: 4px 0 0;
}

.profile-card .subtitle {
  margin-top: 10px;
}

.profile-card .ghost-button {
  margin-top: 18px;
  align-self: flex-start;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(126, 93, 209, 0.2);
  border: 1px solid rgba(126, 93, 209, 0.6);
  color: #d7c7ff;
}

.pill-positive {
  background: rgba(60, 187, 126, 0.15);
  border-color: rgba(60, 187, 126, 0.6);
  color: #86f0c2;
}

.pill-negative {
  background: rgba(214, 76, 76, 0.15);
  border-color: rgba(214, 76, 76, 0.6);
  color: #ff9a9a;
}

.pill-neutral {
  background: rgba(126, 93, 209, 0.2);
  border-color: rgba(126, 93, 209, 0.6);
  color: #d7c7ff;
}

.confidence {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.confidence-bar {
  height: 10px;
  background: rgba(var(--accent-rgb), 0.12);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
}

.confidence-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--cyan));
}

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

.bias-button {
  text-align: center;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.key-metrics-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.16);
}

.key-metric-chart-card {
  position: relative;
  padding: 14px 14px 12px;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 12%, rgba(var(--accent-rgb), 0.1), transparent 34%),
    rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.key-metric-chart-card-wide {
  grid-column: 1 / -1;
}

.key-metric-chart-title {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.key-metric-chart-card canvas {
  width: 100%;
  min-height: 148px;
  display: block;
  border-radius: 12px;
}

@media (max-width: 760px) {
  .key-metrics-charts-grid {
    grid-template-columns: 1fr;
  }
}

.key-metrics-chart-wrap {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.16);
}

.key-metrics-chart-wrap canvas {
  width: 100%;
  display: block;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.key-metrics-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 12px;
}

.key-metrics-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

.key-metrics-legend-item strong {
  color: var(--text-primary);
  font-weight: 600;
}

.key-metrics-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 8px;
}

.metric-label {
  font-size: 12px;
  color: #a99bc2;
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.metric-value {
  font-size: 22px;
  margin: 0;
  color: #fef9ff;
}

.metric-value.value-positive {
  color: #7cf2ba;
}

.metric-value.value-negative {
  color: #ff7f7f;
}

.rate-value.value-positive {
  color: #7cf2ba;
}

.rate-value.value-negative {
  color: #ff7f7f;
}

.pl-scale {
  position: relative;
  height: 8px;
  margin-top: 8px;
  background: rgba(36, 24, 60, 0.8);
  border-radius: 999px;
  border: 1px solid rgba(83, 63, 135, 0.6);
  overflow: hidden;
}

.pl-scale-center {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.25);
}

.pl-scale-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
}

.today-card {
  text-align: center;
  padding: 14px 16px 16px;
}

.today-card .subtitle {
  margin: 4px 0 0;
}

.today-value {
  font-size: 32px;
  margin: 4px 0;
  line-height: 1.1;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.18);
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  color: var(--accent-primary);
  font-size: 11px;
  margin-left: 6px;
  cursor: help;
  vertical-align: middle;
}

.info-icon[data-tooltip] {
  position: relative;
}

.info-icon[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(22, 22, 24, 0.88);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.01em;
  border-radius: 12px;
  white-space: normal;
  width: max-content;
  max-width: min(280px, 72vw);
  text-align: left;
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
  transform: translateX(-50%) translateY(4px);
  z-index: 40;
}

.info-icon[data-tooltip]:hover::after,
.info-icon[data-tooltip]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.trade-form .form-row label,
.filters label {
  overflow: visible;
}

.trade-form .info-icon[data-tooltip]::after,
.filters .info-icon[data-tooltip]::after {
  z-index: 10060;
  left: auto;
  right: 0;
  top: calc(100% + 8px);
  bottom: auto;
  transform: translateY(4px);
  max-width: min(240px, calc(100vw - 24px));
}

.trade-form .info-icon[data-tooltip]:hover::after,
.trade-form .info-icon[data-tooltip]:focus-visible::after,
.filters .info-icon[data-tooltip]:hover::after,
.filters .info-icon[data-tooltip]:focus-visible::after {
  transform: translateY(0);
}

.ghost-button {
  background: rgba(18, 12, 32, 0.6);
  border: 1px solid rgba(155, 97, 242, 0.5);
  color: #d7c7ff;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 12px;
}

.ghost-button:hover {
  border-color: rgba(var(--accent-rgb), 0.55);
}

.ghost-select {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 999px;
  color: var(--text-primary);
  padding: 8px 12px;
  font-size: 12px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(var(--accent-rgb), 0.85) 50%),
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.85) 50%, transparent 50%),
    linear-gradient(to right, transparent, transparent);
  background-position: calc(100% - 14px) calc(1em + 2px), calc(100% - 9px) calc(1em + 2px), 100% 0;
  background-size: 5px 5px, 5px 5px, 2.5em 2.5em;
  background-repeat: no-repeat;
}

.market-key {
  display: flex;
  gap: 12px;
  margin: 10px 0 12px;
  flex-wrap: wrap;
}

.market-key input {
  flex: 1 1 220px;
  background: rgba(12, 8, 20, 0.8);
  border: 1px solid rgba(90, 70, 140, 0.7);
  border-radius: 12px;
  color: #f2eef8;
  padding: 10px 12px;
  font-size: 13px;
}

.market-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.market-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.settings-panel {
  display: grid;
  gap: 0;
  align-content: start;
  overflow: visible;
}

.settings-row,
.settings-layout,
.settings-theme-card,
.settings-section {
  overflow: visible;
}

.settings-native-select {
  width: min(100%, 120px);
  min-width: 88px;
  min-height: 40px;
  padding: 10px 34px 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, rgba(var(--accent-rgb), 0.85) 50%),
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.85) 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% - 2px), calc(100% - 9px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.integrations-stack {
  display: grid;
  gap: 18px;
}

.integration-block {
  padding: 22px;
}

.integration-block-head {
  margin-bottom: 16px;
}

.integration-block-head h3 {
  margin: 0 0 8px;
}

.integration-block .discipline-card {
  background: rgba(255, 255, 255, 0.025);
}

.settings-panel h3 {
  margin-bottom: 12px;
}

.settings-toggle-row,
.settings-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--settings-row-border);
  font-size: 13px;
  color: var(--text-primary);
}

.settings-toggle-row:last-child,
.settings-field-row:last-child {
  border-bottom: 0;
}

.settings-toggle-row span,
.settings-field-row > span:first-child {
  flex: 1;
  min-width: 0;
}

.settings-field-row .ghost-select {
  width: min(100%, 120px);
  min-width: 88px;
}

.settings-field-row.settings-field-row-select {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.settings-field-row.settings-field-row-select > span:first-child {
  flex: none;
}

.settings-field-row.settings-field-row-select .ghost-select,
.settings-field-row.settings-field-row-select .ui-select-wrap {
  width: 100%;
  max-width: none;
}

.settings-field-row.settings-field-row-select .ui-select-trigger {
  width: 100%;
  justify-content: space-between;
}

.settings-toggle-row input[type="checkbox"] {
  appearance: none;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: var(--toggle-track-bg);
  border: 1px solid var(--toggle-track-border);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.settings-toggle-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--toggle-thumb);
  transition: transform 0.2s ease, background 0.2s ease;
}

.settings-toggle-row input[type="checkbox"]:checked {
  background: rgba(var(--accent-rgb), 0.24);
  border-color: rgba(var(--accent-rgb), 0.45);
}

.settings-toggle-row input[type="checkbox"]:checked::after {
  transform: translateX(14px);
  background: var(--accent-primary);
}

.market-table th,
.market-table td {
  font-size: 12px;
}

.change-positive {
  color: #7cf2ba;
}

.change-negative {
  color: #ff7f7f;
}

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

.rate-row {
  display: grid;
  grid-template-columns: 1fr repeat(2, auto);
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(20, 14, 32, 0.7);
  border: 1px solid rgba(72, 53, 122, 0.4);
}

.rate-row:first-child {
  grid-template-columns: 1fr auto;
}

.rate-label {
  font-size: 13px;
  color: #d7c7ff;
}

.rate-value {
  font-size: 13px;
  color: #e4dcff;
  text-align: right;
}


.link-button {
  background: transparent;
  color: #b392ff;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
}

.delete-button {
  background: rgba(214, 76, 76, 0.15);
  border: 1px solid rgba(214, 76, 76, 0.6);
  color: #ff9a9a;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.delete-button:disabled,
.delete-button.is-disabled {
  opacity: 0.32;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid var(--inset-card-border);
  background: var(--inset-card-bg);
  color: var(--text-primary);
}

.tag-green {
  border-color: rgba(60, 187, 126, 0.6);
  color: #7cf2ba;
  background: rgba(60, 187, 126, 0.15);
}

.tag-red {
  border-color: rgba(214, 76, 76, 0.6);
  color: #ff9a9a;
  background: rgba(214, 76, 76, 0.15);
}

.tag-yellow {
  border-color: rgba(248, 182, 68, 0.6);
  color: #ffd38b;
  background: rgba(248, 182, 68, 0.15);
}

.tag-orange {
  border-color: rgba(255, 140, 50, 0.6);
  color: #ffc08b;
  background: rgba(255, 140, 50, 0.15);
}

.tag-blue {
  border-color: rgba(94, 140, 255, 0.6);
  color: #a9c4ff;
  background: rgba(94, 140, 255, 0.15);
}

.tag-purple {
  border-color: rgba(155, 97, 242, 0.6);
  color: #d1b9ff;
  background: rgba(155, 97, 242, 0.15);
}

.tag-gray {
  border-color: rgba(120, 120, 120, 0.6);
  color: #c9c9c9;
  background: rgba(120, 120, 120, 0.15);
}

.comment-cell {
  display: grid;
  gap: 6px;
}

.comment-input {
  width: 100%;
  min-width: 180px;
  background: rgba(12, 8, 20, 0.8);
  border: 1px solid rgba(90, 70, 140, 0.7);
  border-radius: 10px;
  color: #f2eef8;
  padding: 6px 10px;
  font-size: 12px;
  min-height: 54px;
  max-height: 120px;
  resize: vertical;
  overflow-y: auto;
}

.comment-input:focus {
  outline: none;
  border-color: rgba(155, 97, 242, 0.8);
  box-shadow: 0 0 0 2px rgba(155, 97, 242, 0.15);
}

.comment-column {
  min-width: 160px;
  max-width: 220px;
}

.comment-column .link-button,
.comment-column .comment-toggle {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.comment-toggle {
  margin-bottom: 6px;
}

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

.comment-actions .ghost-button {
  padding: 4px 10px;
  font-size: 11px;
}

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

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(20, 14, 32, 0.7);
  border: 1px solid rgba(72, 53, 122, 0.4);
  font-size: 13px;
}

.pl-positive {
  color: #7cf2ba;
}

.pl-negative {
  color: #ff7f7f;
}

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

.meta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--meta-pill-bg);
  border: 1px solid var(--meta-pill-border);
  color: var(--meta-pill-color);
  font-size: 12px;
}

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

.form-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.form-row label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
}

.form-row label > span:first-child {
  grid-column: 1;
  grid-row: 1;
}

.form-row label > .info-icon {
  grid-column: 2;
  grid-row: 1;
  margin-left: 0;
  justify-self: end;
}

.form-row label > .ui-select-wrap,
.form-row label > .ui-date-wrap,
.form-row label > select,
.form-row label > input {
  grid-column: 1 / -1;
  grid-row: 2;
}

.form-row label.full {
  grid-template-rows: auto auto auto auto auto;
}

.form-row label.full > .ui-factor-wrap {
  grid-row: 2;
  grid-column: 1 / -1;
}

.form-row label.full > input:not(.ui-factor-input) {
  grid-row: 2;
}

.form-row label.full > .factor-controls {
  grid-row: 3;
}

.form-row label.full > .chip-list {
  grid-row: 4;
}

.form-row label.full > .chip-presets {
  grid-row: 5;
}

.form-row input,
.form-row select,
.trade-form .ui-select-trigger {
  background: var(--inset-card-bg);
  border: 1px solid var(--inset-card-border);
  border-radius: 12px;
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 13px;
  box-shadow: none;
}

.form-row input[type="date"].is-native-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ui-date-wrap {
  position: relative;
  width: 100%;
}

.ui-date-trigger {
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: var(--inset-card-bg);
  border: 1px solid var(--inset-card-border);
  border-radius: 12px;
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 13px;
  box-shadow: none;
}

.ui-date-trigger.is-open,
.ui-date-trigger:focus-visible {
  outline: none;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.ui-date-popover {
  padding: 12px;
  border-radius: 16px;
  background: rgba(12, 10, 16, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.ui-date-popover.hidden,
.ui-date-popover[hidden] {
  display: none !important;
}

.ui-date-head {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.ui-date-title {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: capitalize;
}

.ui-date-nav,
.ui-date-clear,
.ui-date-today {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border-radius: 10px;
  cursor: pointer;
}

.ui-date-nav {
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.ui-date-weekdays,
.ui-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.ui-date-weekdays {
  margin-bottom: 6px;
}

.ui-date-weekdays span {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(var(--accent-rgb), 0.72);
}

.ui-date-day {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
}

.ui-date-day:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.ui-date-day.is-today {
  border-color: rgba(var(--accent-rgb), 0.35);
}

.ui-date-day.is-selected {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: rgba(var(--accent-rgb), 0.45);
  color: #fff;
}

.ui-date-day.is-empty {
  pointer-events: none;
}

.ui-date-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ui-date-footer-split {
  justify-content: space-between;
}

.ui-date-clear,
.ui-date-today {
  padding: 6px 12px;
  font-size: 12px;
}

.ui-date-trigger.is-placeholder {
  color: var(--text-secondary);
  opacity: 0.72;
}

.ui-date-today:hover,
.ui-date-clear:hover,
.ui-date-nav:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.ui-factor-wrap {
  position: relative;
  width: 100%;
}

.ui-factor-input {
  width: 100%;
  padding-right: 38px;
}

.ui-factor-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.ui-factor-wrap.is-open .ui-factor-toggle,
.ui-factor-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.ui-factor-menu {
  padding: 8px;
  border-radius: 16px;
  background: rgba(12, 10, 16, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  display: grid;
  gap: 4px;
}

.ui-factor-menu.hidden,
.ui-factor-menu[hidden] {
  display: none !important;
}

.ui-factor-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.ui-factor-option:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.ui-factor-dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
  padding: 0;
  border-radius: 999px;
}

.ui-factor-dot.chip {
  font-size: 0;
  line-height: 0;
}

.ui-factor-empty {
  margin: 0;
  padding: 10px 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.form-row input:focus,
.form-row select:focus,
.trade-form .ui-select-trigger:focus,
.trade-form .ui-select-trigger.is-open {
  outline: none;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.form-row .full {
  grid-column: 1 / -1;
}

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

.primary-button {
  background: linear-gradient(120deg, #7a59ff, #22d3ee);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
}

.weekly-section,
.mt5-section,
.subscriptions-section {
  margin-bottom: 24px;
}

.weekly-bars {
  display: grid;
  grid-template-columns: repeat(5, minmax(90px, 1fr));
  gap: 14px;
  min-height: 220px;
  align-items: end;
  padding-top: 20px;
}

.weekly-day {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.weekly-track {
  position: relative;
  width: 42px;
  height: 150px;
  border-radius: 999px;
  background: rgba(20, 14, 32, 0.9);
  border: 1px solid rgba(132, 87, 255, 0.34);
  overflow: hidden;
}

.weekly-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 50%;
  min-height: 4px;
  background: linear-gradient(180deg, #22d3ee, #7a59ff);
  border-radius: 999px;
}

.weekly-fill.negative {
  top: 50%;
  bottom: auto;
  background: linear-gradient(180deg, #ff4fb8, #7a59ff);
}

.weekly-value {
  font-weight: 700;
}

.mt5-grid,
.plans-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.file-drop,
.mt5-bridge-card,
.plan-card,
.backtest-panel {
  display: grid;
  gap: 10px;
  background: rgba(20, 14, 32, 0.72);
  border: 1px solid rgba(132, 87, 255, 0.34);
  border-radius: 16px;
  padding: 16px;
}

.file-drop input {
  margin-top: 8px;
}

.plan-featured {
  border-color: rgba(34, 211, 238, 0.62);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.08);
}

.plan-elite {
  border-color: rgba(255, 255, 255, 0.14);
}

.backtest-panel {
  margin-top: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.welcome-modal {
  position: fixed;
  inset: 0;
  z-index: 10080;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 1, 6, 0.82);
  backdrop-filter: blur(18px);
}

.welcome-modal.hidden {
  display: none;
}

/* Instant registration gate: hide app shell before heavy JS boots */
html.welcome-boot body > .app,
html.auth-pending body > .app,
html.welcome-boot .desktop-update-banner,
html.auth-pending .desktop-update-banner,
html.welcome-boot .web-install-prompt,
html.auth-pending .web-install-prompt,
html.welcome-boot .mobile-nav-drawer,
html.auth-pending .mobile-nav-drawer,
html.welcome-boot .mobile-tabbar,
html.auth-pending .mobile-tabbar {
  display: none !important;
  pointer-events: none !important;
}

/* Only an explicit JS decision reveals registration; auth-pending alone just hides the shell.
   Never keep the floral overlay after .hidden — otherwise the hero photo sticks on top of the app. */
html.welcome-boot #welcomeModal:not(.hidden) {
  display: block !important;
}
#welcomeModal.hidden,
.welcome-modal.hidden,
.welcome-modal.welcome-wizard-modal.hidden,
body.is-web-guest .welcome-modal.welcome-wizard-modal.hidden {
  display: none !important;
}

html.welcome-boot body,
html.auth-pending body {
  overflow: hidden;
  background: #05040a;
}

.welcome-card {
  width: min(560px, 100%);
  display: grid;
  gap: 16px;
  background: linear-gradient(145deg, rgba(10, 7, 18, 0.98), rgba(30, 16, 58, 0.96));
  border: 1px solid rgba(34, 211, 238, 0.42);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

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

.welcome-options label {
  display: flex;
  gap: 8px;
  align-items: center;
  background: rgba(6, 5, 12, 0.68);
  border: 1px solid rgba(132, 87, 255, 0.28);
  border-radius: 14px;
  padding: 10px;
  color: #e8dcff;
}

.chip-list,
.chip-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.factor-preset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.preset-remove {
  background: rgba(24, 16, 44, 0.6);
  border: 1px solid rgba(90, 70, 140, 0.7);
  color: #d7c7ff;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 11px;
  cursor: pointer;
}

.preset-remove:hover {
  border-color: rgba(155, 97, 242, 0.9);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(90, 70, 140, 0.7);
  background: rgba(24, 16, 44, 0.6);
  color: #e4dcff;
}

.chip button {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
}

.chip.green {
  border-color: rgba(60, 187, 126, 0.6);
  color: #7cf2ba;
  background: rgba(60, 187, 126, 0.15);
}

.chip.red {
  border-color: rgba(214, 76, 76, 0.6);
  color: #ff9a9a;
  background: rgba(214, 76, 76, 0.15);
}

.chip.yellow {
  border-color: rgba(248, 182, 68, 0.6);
  color: #ffd38b;
  background: rgba(248, 182, 68, 0.15);
}

.chip.blue {
  border-color: rgba(94, 140, 255, 0.6);
  color: #a9c4ff;
  background: rgba(94, 140, 255, 0.15);
}

.chip.purple {
  border-color: rgba(155, 97, 242, 0.6);
  color: #d1b9ff;
  background: rgba(155, 97, 242, 0.15);
}

.table-wrapper {
  overflow-x: auto;
  max-width: 100%;
}

.trade-table-wrapper {
  max-height: 720px;
  overflow: auto;
  max-width: 100%;
  width: 100%;
  padding-right: 4px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

tbody tr.is-editing {
  position: relative;
  z-index: 30;
}

tbody tr.is-editing td {
  overflow: visible;
  vertical-align: top;
}

tbody tr.is-editing .table-edit-select[data-native-select] {
  position: relative;
  z-index: 40;
}

tbody tr.is-editing .ui-select-wrap {
  min-width: 92px;
}

tbody tr.is-editing .ui-select-trigger {
  min-width: 0;
  padding: 8px 28px 8px 10px;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

tbody tr.is-editing .table-actions {
  position: relative;
  z-index: 60;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.journal-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.08), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
}

.journal-summary-count {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.journal-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.filter-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.28);
  color: var(--text-primary);
}

.filter-chip.is-active {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--text-primary);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.12);
}

.filter-chip[data-filter-chip="Win"].is-active {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
}

.filter-chip[data-filter-chip="Loss"].is-active {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
}

.filter-chip[data-filter-chip="open"].is-active {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
}

.filter-search-field {
  grid-column: 1 / -1;
}

.filter-search-field input[type="search"] {
  width: 100%;
}

.filters .ui-select-wrap {
  min-width: 0;
  width: 100%;
}

.filters .ui-select-trigger {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 8px 32px 8px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.filters label {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 6px;
  font-size: 11px;
  color: var(--surface-muted-text, var(--text-secondary));
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.filters label > span:first-child {
  grid-column: 1;
  grid-row: 1;
}

.filters label > .info-icon {
  grid-column: 2;
  grid-row: 1;
  margin-left: 0;
  justify-self: end;
}

.filters label > .ui-select-wrap,
.filters label > .ui-date-wrap,
.filters label > select,
.filters label > input {
  grid-column: 1 / -1;
  grid-row: 2;
}

.filters select,
.filters input,
.filters .ui-select-trigger {
  background: var(--inset-card-bg);
  border: 1px solid var(--inset-card-border);
  border-radius: 10px;
  color: var(--text-primary);
  padding: 6px 10px;
  font-size: 12px;
  box-shadow: none;
}

.filters select:focus,
.filters input:focus,
.filters .ui-select-trigger:focus,
.filters .ui-select-trigger.is-open {
  outline: none;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.filters .ghost-button {
  justify-self: start;
  padding: 6px 12px;
  font-size: 11px;
}

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

.table-actions .ghost-button,
.table-actions .delete-button {
  padding: 4px 10px;
  font-size: 11px;
}

.table-edit-input,
.table-edit-select {
  width: 100%;
  background: rgba(12, 8, 20, 0.8);
  border: 1px solid rgba(90, 70, 140, 0.7);
  border-radius: 10px;
  color: #f2eef8;
  padding: 6px 10px;
  font-size: 12px;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 28px 0 0;
  color: #9e90b8;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.app-footer .footer-telegram {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-secondary);
  text-decoration: none;
  box-shadow: none;
  transition: color 0.18s ease;
}

.app-footer .footer-telegram:hover {
  border-color: transparent;
  background: transparent;
  color: var(--text-primary);
  box-shadow: none;
  transform: none;
}

.footer-telegram-icon,
.footer-telegram-copy,
.footer-telegram-label {
  display: none;
}

.footer-telegram-handle {
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.01em;
  color: inherit;
}

.footer-telegram-arrow {
  font-size: 11px;
  line-height: 1;
  opacity: 0.45;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-footer .footer-telegram:hover .footer-telegram-arrow {
  opacity: 0.85;
  transform: translate(1px, -1px);
}

.footer-legal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.footer-legal-link {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12px;
  color: #9e90b8;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer-legal-link:hover {
  color: #d8c8f8;
}

.footer-legal-sep {
  color: rgba(158, 144, 184, 0.45);
  user-select: none;
}

.legal-doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.legal-doc-actions .ghost-button,
.legal-doc-actions .legal-support-bot-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  text-decoration: none;
}

.legal-modal {
  opacity: 0;
  transition: opacity 220ms ease;
}

.legal-modal-card {
  width: min(760px, calc(100vw - 28px));
  max-height: min(88vh, 920px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.legal-modal-title {
  margin: 0;
  padding-right: 36px;
}

.legal-modal-frame {
  width: 100%;
  min-height: min(72vh, 720px);
  border: 1px solid rgba(132, 87, 255, 0.22);
  border-radius: 14px;
  background: #0b0814;
}

.legal-modal:not(.hidden) {
  display: grid;
  place-items: center;
}

.legal-modal.is-visible {
  opacity: 1;
}

body[data-theme="white"] .footer-legal-link {
  color: #6b7280;
}

body[data-theme="white"] .footer-legal-link:hover {
  color: #4c1d95;
}

@media (max-width: 640px) {
  .app-footer {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
}

#plChart {
  width: 100%;
  background: rgba(8, 6, 15, 0.6);
  border-radius: 12px;
  border: 1px solid rgba(83, 63, 135, 0.4);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.22);
  text-align: left;
  font-size: 13px;
}

thead {
  background: rgba(var(--accent-rgb), 0.12);
}

thead th {
  color: color-mix(in srgb, var(--text-primary) 88%, var(--accent-primary));
  font-weight: 600;
}

tbody tr:hover {
  background: rgba(var(--accent-rgb), 0.08);
}

.news-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
}

.news-list.compact {
  max-height: none;
  min-height: 0;
}

.news-events {
  max-height: min(280px, 42vh);
  min-height: 0;
  overflow-y: auto;
}

.news-day {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--surface-muted-text, var(--text-secondary));
  margin-top: 10px;
}

.news-item {
  border-radius: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  padding: 12px;
  background: rgba(var(--accent-rgb), 0.06);
  display: grid;
  gap: 6px;
}

.news-item.is-active {
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.22);
}

.news-block-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(var(--accent-rgb), 0.82);
}

.news-active {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(var(--accent-rgb), 0.05);
  border: 1px solid rgba(var(--accent-rgb), 0.16);
}

.news-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.impact-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.impact-dot.high {
  background: #ff5c5c;
}

.impact-dot.medium {
  background: #ffa640;
}

.impact-dot.low {
  background: #ffd060;
}

.impact-dot.holiday {
  background: #b3b3b3;
}

.news-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: color-mix(in srgb, var(--accent-primary) 72%, #fff);
  text-decoration: none;
  box-shadow: none;
  transition: color 0.18s ease;
}

.news-link:hover {
  border-color: transparent;
  background: transparent;
  color: var(--text-primary);
  box-shadow: none;
  transform: none;
}

.news-link-icon {
  display: none;
}

.news-link-text {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.news-link-arrow {
  font-size: 11px;
  line-height: 1;
  opacity: 0.5;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.news-link:hover .news-link-arrow {
  opacity: 0.9;
  transform: translate(1px, -1px);
}

.news-item.impact-high {
  border-color: rgba(255, 92, 92, 0.55);
  background: color-mix(in srgb, rgba(var(--accent-rgb), 0.08) 55%, rgba(255, 92, 92, 0.14));
}

.news-item.impact-medium {
  border-color: rgba(255, 166, 64, 0.55);
  background: color-mix(in srgb, rgba(var(--accent-rgb), 0.08) 55%, rgba(255, 166, 64, 0.12));
}

.news-item.impact-low {
  border-color: rgba(var(--accent-rgb), 0.22);
  background: rgba(var(--accent-rgb), 0.05);
}

.news-item.impact-holiday {
  border-color: rgba(var(--accent-rgb), 0.18);
  background: rgba(var(--accent-rgb), 0.04);
}

.news-meaning {
  color: var(--text-secondary);
  font-size: 12px;
}

.news-currency {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: color-mix(in srgb, var(--accent-primary) 72%, #fff);
}

.news-currency .tag {
  margin-left: 6px;
}

a {
  color: #b392ff;
}

.sessions-card .section-header {
  align-items: center;
  margin-bottom: 4px;
}

.dashboard-side-card {
  padding: 14px 16px 16px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.1), transparent 42%),
    rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  width: 100%;
}

.dashboard-side-card .subtitle:last-child,
.dashboard-side-card .news-status:last-child {
  margin-bottom: 0;
}

.session-hint {
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.session-timeline {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.session-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 6px 8px;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease;
}

.news-card .section-header {
  align-items: center;
  margin-bottom: 8px;
}

.news-timezone-field {
  display: grid;
  gap: 6px;
  margin: 8px 0 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.news-active .news-list.compact {
  margin: 0;
}

.news-status {
  margin: 6px 0 8px;
}

.session-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 58px;
  color: var(--text-primary);
}

.session-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.28);
  box-shadow: 0 0 0 1px var(--session-dot-border);
}

.session-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--session-bar-track-bg);
  border: 1px solid var(--session-bar-track-border);
  overflow: hidden;
}

.session-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--session-bar-idle-fill);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.session-bar.is-active .session-bar-fill {
  opacity: 1;
}

.session-time {
  color: var(--surface-muted-text);
}

.session-row.is-active {
  color: var(--session-active-color);
}

.session-row.is-active .session-label {
  color: var(--session-active-color);
}

.session-row.is-active .session-time {
  color: var(--session-active-color);
}

.session-row.is-active .session-dot {
  background: var(--session-active-color);
  box-shadow: 0 0 0 4px var(--session-active-glow);
  animation: pulse-active 1.8s ease-in-out infinite;
}

.session-row.is-active .session-bar-fill {
  background: var(--session-active-fill);
}

.discipline-section {
  margin-bottom: 24px;
}

.discipline-section .section-header > div:first-child {
  flex: 1;
  text-align: center;
}

.discipline-top-grid,
.sport-top-grid {
  margin-top: 16px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.motivation-block {
  display: grid;
  gap: 8px;
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.tab-switcher {
  position: relative;
  display: inline-flex;
  gap: 6px;
  background: var(--tab-switcher-bg);
  border: 1px solid var(--tab-switcher-border);
  border-radius: 999px;
  padding: 4px;
}

.tab-switcher.mini {
  padding: 3px;
}

.tab-switcher-indicator {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent-primary), rgba(var(--accent-rgb), 0.65));
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.18);
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
  pointer-events: none;
}

.tab-switcher.tab-switcher-static .tab-switcher-indicator {
  display: none;
}

.tab-switcher .tab-button {
  position: relative;
  z-index: 1;
  background: transparent;
  border: none;
  color: var(--tab-inactive-color);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.22s ease;
}

.tab-switcher .tab-button.is-active {
  color: #fff;
}

.tab-switcher.tab-switcher-static .tab-button.is-active {
  background: linear-gradient(120deg, var(--accent-primary), rgba(var(--accent-rgb), 0.65));
}

.tab-button {
  background: transparent;
  border: none;
  color: #cfc4e5;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.tab-button.is-active {
  background: linear-gradient(120deg, var(--accent-primary), rgba(var(--accent-rgb), 0.65));
  color: #fff;
}

.tab-content {
  display: none;
  margin-top: 16px;
}

.tab-content.is-active {
  display: block;
  animation: subtab-content-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.discipline-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.discipline-card {
  background: rgba(var(--accent-rgb), 0.06);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 16px;
  padding: 16px;
}

.discipline-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

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

.routine-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: var(--text-primary);
  background: rgba(var(--accent-rgb), 0.06);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: inherit;
}

.routine-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.35);
}

.routine-dot.is-done {
  background: #7cf2ba;
}

.routine-item.is-done {
  border-color: rgba(60, 187, 126, 0.5);
}

.routine-actions {
  display: inline-flex;
  gap: 6px;
}

.routine-controls {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

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

.routine-form.hidden {
  display: none;
}

.routine-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #cfc4e5;
}

.routine-form input {
  background: rgba(12, 8, 20, 0.8);
  border: 1px solid rgba(90, 70, 140, 0.7);
  border-radius: 12px;
  color: #f2eef8;
  padding: 10px 12px;
  font-size: 13px;
}

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

.sport-section .discipline-card {
  min-height: 140px;
}

.sport-actions {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.routine-status {
  font-size: 11px;
  color: #b9accf;
}

.discipline-history {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
}

.discipline-calendar {
  border: 1px solid var(--calendar-border);
  border-radius: 16px;
  padding: 16px;
  background: var(--calendar-bg);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.calendar-title {
  margin: 0;
  font-weight: 600;
  font-size: 14px;
}

.calendar-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--calendar-controls-color);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(36px, 1fr));
  gap: 8px;
}

.calendar-cell {
  border-radius: 10px;
  border: 1px solid var(--calendar-cell-border);
  background: var(--calendar-cell-bg);
  padding: 8px;
  min-height: 60px;
  font-size: 11px;
  color: var(--surface-muted-text);
  display: grid;
  gap: 6px;
  cursor: pointer;
}

.calendar-cell.is-active {
  border-color: var(--calendar-active-border);
  box-shadow: 0 0 0 2px var(--calendar-active-glow);
}

.calendar-cell .day-number {
  font-size: 12px;
  color: #f2eef8;
}

.calendar-cell .day-pl {
  font-size: 11px;
}

.calendar-cell .day-pl.positive {
  color: #7cf2ba;
}

.calendar-cell .day-pl.negative {
  color: #ff7f7f;
}

.discipline-calendar .calendar-cell {
  min-height: 74px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}

.discipline-calendar .calendar-cell-top {
  display: flex;
  align-items: flex-start;
}

.discipline-calendar .calendar-cell-bottom {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
}

.discipline-calendar .calendar-cell .day-pl {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.discipline-calendar .calendar-cell .day-pl-r {
  display: block;
}

.discipline-calendar .calendar-cell .day-pl-money {
  display: block;
  font-size: 9px;
  font-weight: 600;
  opacity: 0.88;
  letter-spacing: 0;
}

.discipline-calendar .calendar-cell .day-discipline-mark {
  font-size: 10px;
  color: var(--text-secondary);
  line-height: 1.2;
}

.discipline-calendar .calendar-cell.is-active .day-pl.negative {
  color: #ff9a9a;
}

.support-faq-link {
  margin-top: 24px;
}

.faq-page-content {
  max-width: 860px;
}

.faq-page-content .support-faq-section-title {
  margin-top: 22px;
}

.faq-page-content .support-faq-section-title:first-of-type {
  margin-top: 0;
}

.trade-calendar {
  margin-top: 24px;
  margin-bottom: 8px;
}

.trade-calendar .calendar-grid {
  grid-template-columns: repeat(7, minmax(28px, 1fr));
  gap: 6px;
}

.trade-calendar .calendar-cell {
  min-height: 74px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
}

.trade-calendar .calendar-cell-top {
  display: flex;
  align-items: flex-start;
}

.trade-calendar .calendar-cell-bottom {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.trade-calendar .calendar-cell .day-pl {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.15;
}

.trade-calendar .calendar-cell .day-pl-r {
  font-size: 10px;
  font-weight: 600;
}

.trade-calendar .calendar-cell .day-pl-money {
  font-size: 9px;
  opacity: 0.85;
}

.trade-calendar .day-rr {
  font-size: 9px;
  color: rgba(242, 238, 248, 0.72);
  letter-spacing: 0.02em;
}

.trade-calendar .trade-dots {
  margin-top: 0;
  margin-bottom: 2px;
}

.trade-calendar .calendar-cell .day-number {
  font-size: 11px;
}

.trade-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.trade-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.trade-dot.win {
  background: #7cf2ba;
}

.trade-dot.loss {
  background: #ff7f7f;
}

.trade-dot.neutral {
  background: rgba(242, 238, 248, 0.45);
}

.sport-encourage {
  margin: 6px 0 10px;
}

.sport-detail-actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.sport-comment-label {
  font-size: 12px;
  color: #cfc4e5;
}

.calendar-cell .sport-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
}

.calendar-cell .sport-dot.workout {
  background: #7cf2ba;
}

.calendar-cell .sport-dot.rest {
  background: #5e8cff;
}

.discipline-details {
  border: 1px solid var(--calendar-border);
  border-radius: 16px;
  padding: 16px;
  background: var(--calendar-bg);
  min-height: 200px;
}

.discipline-details h4 {
  margin: 0 0 8px;
}

.discipline-charts {
  margin-top: 16px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.discipline-charts canvas {
  width: 100%;
  background: rgba(var(--accent-rgb), 0.04);
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
}

.rules-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

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

.rules-templates {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rules-templates.hidden {
  display: none;
}

.hidden {
  display: none;
}

.rule-form {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: end;
}

.rule-form.hidden {
  display: none;
}

.rule-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #cfc4e5;
}

.rule-form input,
.rule-form select {
  background: rgba(12, 8, 20, 0.8);
  border: 1px solid rgba(90, 70, 140, 0.7);
  border-radius: 12px;
  color: #f2eef8;
  padding: 10px 12px;
  font-size: 13px;
}

.rule-form .ui-select-wrap {
  width: 100%;
  min-width: 0;
}

.rule-form .ui-select-trigger {
  width: 100%;
  min-height: 42px;
  justify-content: space-between;
  text-align: left;
  background: rgba(12, 8, 20, 0.8);
  border: 1px solid rgba(90, 70, 140, 0.7);
  border-radius: 12px;
  color: #f2eef8;
  padding: 10px 12px;
  font-size: 13px;
}

.rule-form select.is-native-hidden {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

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

.rules-table {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.rules-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  background: rgba(var(--accent-rgb), 0.06);
  font-size: 13px;
}

.rules-row.rules-head {
  background: rgba(var(--accent-rgb), 0.14);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: var(--text-secondary);
}

.status-pill {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  color: var(--accent-primary);
}

.status-pill.is-inactive {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
}

.icon-button {
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.icon-button:hover {
  background: rgba(var(--accent-rgb), 0.16);
  border-color: rgba(var(--accent-rgb), 0.42);
}

@keyframes pulse-active {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 var(--session-active-glow);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0);
  }
}

@media (max-width: 900px) {
  .discipline-history {
    grid-template-columns: 1fr;
  }

  .rules-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .rules-row.rules-head {
    display: none;
  }
}

/* SENTRAGE Premium SaaS 2026 redesign */
:root {
  --bg-primary: #050816;
  --bg-secondary: #0b1120;
  --accent-primary: #8b5cf6;
  --accent-secondary: #ec4899;
  --accent-rgb: 139, 92, 246;
  --cyan: #22d3ee;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-soft: #64748b;
  --success: #10b981;
  --error: #ef4444;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(var(--accent-rgb), 0.15);
  --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.38);
  --shadow-glow: 0 0 42px rgba(var(--accent-rgb), 0.16);
  --nav-active-bg: rgba(var(--accent-rgb), 0.12);
  --nav-active-border: rgba(var(--accent-rgb), 0.12);
  --nav-active-glow: rgba(var(--accent-rgb), 0.14);
  --tab-active-bg: rgba(var(--accent-rgb), 0.18);
  --tab-active-border: rgba(var(--accent-rgb), 0.35);
  --tab-active-glow: rgba(var(--accent-rgb), 0.12);
  --hero-glow: rgba(var(--accent-rgb), 0.22);
  --body-glow-a: rgba(var(--accent-rgb), 0.16);
  --body-glow-b: rgba(34, 211, 238, 0.08);
  --sidebar-bg: linear-gradient(180deg, rgba(11, 17, 32, 0.88), rgba(5, 8, 22, 0.72));
  --sidebar-border: rgba(var(--accent-rgb), 0.18);
  --sidebar-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --scrollbar-size: 10px;
  --scrollbar-size-thin: 6px;
  --scrollbar-track: rgba(5, 8, 22, 0.78);
  --scrollbar-border: rgba(5, 8, 22, 0.78);
  --scrollbar-thumb: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
  --scrollbar-thumb-hover: linear-gradient(180deg, var(--cyan), var(--accent-primary));
  --select-menu-bg: rgba(8, 6, 18, 0.98);
  --select-menu-shadow: 0 18px 48px rgba(0, 0, 0, 0.62);
  --select-option-active-bg: rgba(var(--accent-rgb), 0.22);
  --select-option-active-color: #fff;
  --settings-row-border: rgba(255, 255, 255, 0.05);
  --section-hide-border: rgba(255, 255, 255, 0.1);
  --section-hide-color: rgba(255, 255, 255, 0.22);
  --section-hide-bg: transparent;
  --toggle-track-bg: rgba(255, 255, 255, 0.08);
  --toggle-track-border: rgba(255, 255, 255, 0.12);
  --toggle-thumb: rgba(255, 255, 255, 0.35);
  --inset-card-bg: rgba(255, 255, 255, 0.03);
  --inset-card-border: rgba(255, 255, 255, 0.06);
  --tab-switcher-bg: rgba(var(--accent-rgb), 0.08);
  --tab-switcher-border: rgba(var(--accent-rgb), 0.28);
  --tab-inactive-color: color-mix(in srgb, var(--text-secondary) 85%, var(--accent-primary));
  --kicker-color: rgba(var(--accent-rgb), 0.92);
  --surface-muted-text: color-mix(in srgb, var(--text-secondary) 82%, var(--accent-primary));
  --brand-glow: rgba(var(--accent-rgb), 0.24);
  --calendar-bg: rgba(var(--accent-rgb), 0.07);
  --calendar-border: rgba(var(--accent-rgb), 0.26);
  --calendar-cell-bg: rgba(var(--accent-rgb), 0.05);
  --calendar-cell-border: rgba(var(--accent-rgb), 0.2);
  --calendar-active-border: rgba(var(--accent-rgb), 0.72);
  --calendar-active-glow: rgba(var(--accent-rgb), 0.2);
  --calendar-controls-color: color-mix(in srgb, var(--accent-primary) 68%, #fff);
  --meta-pill-bg: rgba(var(--accent-rgb), 0.16);
  --meta-pill-border: rgba(var(--accent-rgb), 0.42);
  --meta-pill-color: color-mix(in srgb, var(--accent-primary) 72%, #fff);
  --session-bar-track-bg: rgba(var(--accent-rgb), 0.08);
  --session-bar-track-border: rgba(var(--accent-rgb), 0.26);
  --session-bar-idle-fill: linear-gradient(90deg, rgba(var(--accent-rgb), 0.12), rgba(var(--accent-rgb), 0.38));
  --session-active-color: var(--accent-primary);
  --session-active-glow: rgba(var(--accent-rgb), 0.22);
  --session-active-fill: linear-gradient(90deg, rgba(var(--accent-rgb), 0.28), rgba(var(--accent-rgb), 0.78));
  --session-dot-border: rgba(var(--accent-rgb), 0.32);
  --motivation-card-bg: linear-gradient(150deg, rgba(var(--accent-rgb), 0.52), rgba(var(--accent-rgb), 0.18));
  --motivation-card-border: rgba(var(--accent-rgb), 0.42);
  --ai-narration-bg: linear-gradient(135deg, rgba(var(--accent-rgb), 0.14), rgba(var(--accent-rgb), 0.05));
  --ai-narration-border: rgba(var(--accent-rgb), 0.22);
  --ai-insight-tile-bg: rgba(var(--accent-rgb), 0.06);
  --ai-insight-tile-border: rgba(var(--accent-rgb), 0.12);
  --ai-insight-card-bg: rgba(var(--accent-rgb), 0.06);
  --ai-insight-card-border: rgba(var(--accent-rgb), 0.14);
}

body {
  color: var(--text-primary);
  background:
    radial-gradient(circle at 72% 8%, var(--body-glow-a), transparent 28%),
    radial-gradient(circle at 20% 18%, var(--body-glow-b), transparent 26%),
    linear-gradient(180deg, var(--bg-primary), #030510 70%, #02030a);
  background-size: 120% 120%;
  animation: body-bg-shift 34s ease-in-out infinite alternate;
  letter-spacing: -0.01em;
  position: relative;
  overflow-x: hidden;
}

body:not([data-theme="lava"]):not([data-theme="rgb"]):not([data-theme="white"])::after {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 50% 45% at 15% 22%, var(--body-glow-a), transparent 72%),
    radial-gradient(ellipse 46% 42% at 85% 18%, var(--body-glow-b), transparent 70%),
    radial-gradient(ellipse 40% 36% at 52% 90%, rgba(var(--accent-rgb), 0.14), transparent 68%);
  animation: ambient-glow-drift 22s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

body[data-theme="white"] {
  animation: none;
  background-size: auto;
}

@keyframes body-bg-shift {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 100%;
  }
}

@keyframes ambient-glow-drift {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.62;
  }
  100% {
    transform: translate(2%, -1.5%) scale(1.05);
    opacity: 0.9;
  }
}

html,
body {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) var(--scrollbar-track);
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 999px;
  border: 2px solid var(--scrollbar-border);
  min-height: 40px;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
*::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}

.scrollbar-thin,
.comment-input,
.trade-table-wrapper,
.news-list,
.ui-select-menu,
.ai-assistant-messages,
.changelog-list,
.replay-trades-list {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) var(--scrollbar-track);
}

.scrollbar-thin::-webkit-scrollbar,
.comment-input::-webkit-scrollbar,
.trade-table-wrapper::-webkit-scrollbar,
.news-list::-webkit-scrollbar,
.ui-select-menu::-webkit-scrollbar,
.ai-assistant-messages::-webkit-scrollbar,
.changelog-list::-webkit-scrollbar,
.replay-trades-list::-webkit-scrollbar {
  width: var(--scrollbar-size-thin);
  height: var(--scrollbar-size-thin);
}

.shell-layout {
  position: relative;
  z-index: 1;
}

.app {
  max-width: 1920px;
  padding: 28px 28px 72px;
}

.shell-layout {
  grid-template-columns: 308px minmax(0, 1fr);
  gap: 34px;
}

.sidebar {
  top: 28px;
  gap: 24px;
  padding: 18px;
  background: var(--sidebar-bg);
  border: 1px solid var(--sidebar-border);
  border-radius: 26px;
  box-shadow: var(--sidebar-shadow);
  backdrop-filter: blur(28px) saturate(140%);
  transition:
    background 0.45s ease,
    border-color 0.45s ease,
    box-shadow 0.45s ease;
}

.sidebar-profile,
.sync-status-card,
.subscription-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.055);
}

.sidebar-profile {
  text-align: left;
  width: 100%;
  min-height: 60px;
}

.profile-orb {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.55), rgba(34, 211, 238, 0.24));
  color: var(--text-primary);
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
}

.profile-orb.has-image {
  color: transparent;
  background-color: rgba(255, 255, 255, 0.06);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.sidebar-profile-copy,
.sidebar-profile div,
.sync-status-card div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.sidebar-profile strong,
.sync-status-card strong {
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-profile span,
.sync-status-card small,
.subscription-badge small {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.2;
}

.subscription-badge {
  justify-content: space-between;
  background:
    radial-gradient(circle at 0% 0%, rgba(139, 92, 246, 0.22), transparent 45%),
    rgba(255, 255, 255, 0.035);
}

.subscription-badge span {
  color: #c4b5fd;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.5);
  box-shadow: 0 0 0 5px rgba(148, 163, 184, 0.07);
}

.live-dot.is-online {
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.12), 0 0 22px rgba(16, 185, 129, 0.26);
  animation: live-pulse 1.8s ease-in-out infinite;
}

.live-dot.is-pending {
  background: #f59e0b;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.12), 0 0 22px rgba(245, 158, 11, 0.22);
  animation: live-pulse 1.8s ease-in-out infinite;
}

.brand {
  padding: 4px 4px 0;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: contain;
  box-shadow: 0 0 28px var(--brand-glow);
}

.brand h2 {
  font-size: 16px;
  letter-spacing: -0.03em;
}

.kicker {
  color: var(--kicker-color);
  font-size: 10px;
  letter-spacing: 0.22em;
  font-weight: 700;
}

.language-control {
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 11px;
  padding: 0 4px;
}

.sidebar-nav {
  gap: 10px;
}

.sidebar-nav button {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  color: rgba(248, 250, 252, 0.78);
  background: transparent;
  border: 0;
  border-radius: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-nav button span:first-child {
  color: color-mix(in srgb, var(--text-primary) 78%, transparent);
  font-size: 15px;
}

.sidebar-nav button:hover,
.sidebar-nav button.is-active {
  color: var(--text-primary);
  background: var(--nav-active-bg);
  box-shadow: inset 0 0 0 1px var(--nav-active-border), 0 0 28px var(--nav-active-glow);
  transform: translateY(-1px);
}

.main-content {
  display: grid;
  gap: 28px;
  align-content: start;
  min-width: 0;
}

.page.card {
  padding: 32px 32px 36px;
}

.page.card > .section-header {
  margin-bottom: 22px;
}

.page.card > .section-header .kicker {
  margin-top: 4px;
  margin-bottom: 8px;
}

.page.card > .section-header h2 {
  margin: 0 0 8px;
}

.page.card > .section-header .subtitle {
  margin-bottom: 0;
}

.support-grid,
.integrations-stack,
.settings-layout {
  margin-top: 4px;
}

.mt5-requirements-body {
  white-space: pre-line;
}

.news-card {
  padding-bottom: 28px;
}

.news-card .news-link {
  margin-top: 8px;
  margin-bottom: 4px;
}

.page {
  animation: page-in 0.28s ease both;
}

.page:not(.is-active) {
  display: none !important;
}

.page.is-active.journal-hub-panel:not(.is-active-tab) {
  display: none !important;
}

.page.is-active.journal-hub-panel.is-active-tab {
  animation: journal-subtab-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes journal-subtab-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes subtab-content-in {
  from {
    opacity: 0;
    transform: translateX(10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

body.reduced-motion .page.is-active.journal-hub-panel.is-active-tab,
body.reduced-motion .tab-content.is-active {
  animation: none;
}

.journal-hub-nav {
  padding-bottom: 8px;
}

.journal-hub-header {
  align-items: flex-end;
}

.journal-hub-tabs {
  flex-shrink: 0;
}

.journal-hub-panel .section-header h2 {
  font-size: 18px;
}

.dashboard-grid .dashboard-heavy-card {
  display: none;
}

.dashboard-grid .right-stack {
  align-content: start;
}

.dashboard-grid .news-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.dashboard-grid .news-card .news-events {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}

.dashboard-analytics-card {
  margin-top: 0;
}

.dashboard-analytics-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.4fr);
  gap: 24px;
  align-items: start;
}

.score-index-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.score-index-kicker,
.instrument-donut-kicker {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

.score-index-head {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.score-index-value {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
}

.score-index-max {
  font-size: 16px;
  color: var(--text-secondary);
}

.score-index-radar {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  display: block;
}

.most-traded-card {
  min-width: 0;
}

.journal-analytics-insights {
  margin-bottom: 16px;
}

.performance-breakdown-card {
  margin-top: 0;
}

.performance-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.performance-breakdown-panel {
  min-width: 0;
}

.performance-breakdown-header {
  margin-bottom: 12px;
}

.performance-breakdown-header h2 {
  margin: 0;
  font-size: 16px;
}

.performance-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  min-height: 0;
}

.performance-highlights:empty {
  display: none;
}

.performance-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}

.performance-chip.is-best {
  color: #7cf2ba;
  background: rgba(124, 242, 186, 0.1);
  border-color: rgba(124, 242, 186, 0.25);
}

.performance-chip.is-worst {
  color: #ff9b9b;
  background: rgba(255, 123, 123, 0.1);
  border-color: rgba(255, 123, 123, 0.25);
}

.stat-row-best {
  border-color: rgba(124, 242, 186, 0.45);
  background: rgba(124, 242, 186, 0.08);
}

.stat-row-worst {
  border-color: rgba(255, 123, 123, 0.4);
  background: rgba(255, 123, 123, 0.08);
}

@media (max-width: 900px) {
  .performance-breakdown-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .dashboard-analytics-grid {
    grid-template-columns: 1fr;
  }
}

.header {
  display: none;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px) saturate(135%);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.card:hover {
  border-color: rgba(var(--accent-rgb), 0.24);
  box-shadow: var(--shadow-soft), var(--shadow-glow);
  transform: translateY(-1px);
}

.hero-card {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 40px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, var(--hero-glow), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.018));
}

.hero-card.card {
  backdrop-filter: none;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  pointer-events: none;
  background: conic-gradient(
    from 140deg,
    transparent,
    rgba(var(--accent-rgb), 0.12),
    rgba(34, 211, 238, 0.08),
    transparent 46%
  );
  animation: hero-gradient 18s linear infinite;
  opacity: 0.75;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: stretch;
}

.ai-spirit {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  height: 280px;
  opacity: 0.1;
  filter: blur(0.2px);
  pointer-events: none;
  z-index: 0;
}

.hero-live-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-live-metrics span {
  min-width: 132px;
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.055);
}

.hero-live-metrics strong {
  font-size: 20px;
}

.hero-live-metrics small {
  color: var(--text-secondary);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  text-align: left;
}

.hero-copy h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(34px, 3.8vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.065em;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.hero-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.greeting,
.date-time {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.ai-insight-card {
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: 100%;
  padding: 24px;
  border-radius: 24px;
  background: var(--ai-insight-card-bg);
  border: 1px solid var(--ai-insight-card-border);
  box-shadow: inset 0 1px 0 rgba(var(--accent-rgb), 0.08);
}

.ai-insight-card .motivation-text {
  font-size: 18px;
  line-height: 1.45;
  color: rgba(248, 250, 252, 0.9);
}

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

.offline-ai-badge,
.offline-ai-summary,
.ai-coach-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.offline-ai-badge {
  width: fit-content;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.08);
  color: rgba(248, 250, 252, 0.82);
}

.offline-ai-badge small {
  color: rgba(248, 250, 252, 0.78);
}

.offline-ai-summary {
  display: none;
}

.offline-ai-summary p {
  margin: 0;
  color: rgba(248, 250, 252, 0.82);
}

.insight-grid span {
  display: grid;
  gap: 3px;
  padding: 14px;
  border-radius: 18px;
  background: var(--ai-insight-tile-bg);
  border: 1px solid var(--ai-insight-tile-border);
}

.insight-grid strong {
  font-size: 22px;
}

.insight-grid small,
.subtitle {
  color: var(--text-secondary);
}

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

.left-stack {
  grid-column: span 8;
  gap: 24px;
}

.right-stack {
  grid-column: span 4;
  gap: 14px;
  align-content: start;
}

.metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.metrics > div,
.stat-row,
.rate-row,
.discipline-details,
.file-drop,
.mt5-bridge-card,
.plan-card,
.backtest-panel {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 18px;
  box-shadow: none;
}

.mt5-live-card {
  border-color: rgba(34, 211, 238, 0.12);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.05);
}

.mt5-sync-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--text-secondary);
  display: grid;
  gap: 8px;
}

.mt5-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.ai-insight-list,
.dna-strip {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.ai-insight-item {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.ai-insight-item span {
  width: 7px;
  height: 7px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.28);
}

.ai-insight-item p {
  margin: 0;
  color: rgba(248, 250, 252, 0.86);
}

.dna-strip {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.dna-strip span {
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.025);
}

.active-trades-section,
.ai-coach-section,
.sessions-analytics-section,
.settings-section {
  margin-bottom: 0;
}

.active-trades-grid,
.session-heatmap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.active-trades-grid.has-live-trades {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 12px;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.active-trades-grid.has-live-trades .active-trade-card {
  flex: 0 0 min(320px, 82vw);
  scroll-snap-align: start;
  min-height: 100%;
  position: relative;
  overflow: hidden;
}

.active-trades-grid.has-live-trades .active-trade-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: rgba(148, 163, 184, 0.45);
}

.active-trades-grid.has-live-trades .active-trade-card:has(.floating-pl.pl-positive)::before {
  background: rgba(34, 197, 94, 0.85);
}

.active-trades-grid.has-live-trades .active-trade-card:has(.floating-pl.pl-negative)::before {
  background: rgba(239, 68, 68, 0.85);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  align-items: start;
}

.settings-layout {
  display: grid;
  gap: 20px;
}

.settings-row {
  display: grid;
  gap: 16px;
}

.settings-row-panels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.settings-row-panels > .settings-panel {
  height: 100%;
  min-height: 0;
}

.settings-side-stack {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: stretch;
  align-self: stretch;
}

.settings-row-wide {
  grid-template-columns: 1fr;
}

.settings-theme-card {
  padding: 22px 24px 24px;
}

.settings-theme-head {
  margin-bottom: 18px;
}

.settings-theme-head h3 {
  margin: 0 0 6px;
}

.settings-row-panels .discipline-card,
.settings-theme-card {
  min-height: 0;
  overflow: visible;
}

.settings-panel--compact {
  display: grid;
  gap: 8px;
  align-content: start;
  height: 100%;
  min-height: 0;
  padding: 14px 16px;
}

.settings-panel--compact h3 {
  margin: 0;
  font-size: 13px;
}

.settings-panel--compact .subtitle {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
}

.settings-panel--compact .settings-toggle-row {
  margin-top: 0;
  padding-top: 6px;
  padding-bottom: 0;
  border-bottom: 0;
}

.settings-side-stack .settings-panel--compact.hidden {
  display: none !important;
}

.settings-workspace-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--settings-row-border, rgba(255, 255, 255, 0.05));
}

.settings-workspace-fields .settings-field-row {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  align-content: start;
}

.settings-workspace-fields .settings-field-row > span:first-child {
  font-size: 11px;
  color: var(--text-secondary);
}

.settings-workspace-fields .settings-field-hint {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-secondary);
  opacity: 0.92;
}

.settings-workspace-fields .ghost-select,
.settings-workspace-fields .ui-select-wrap,
.settings-workspace-fields .ui-select-trigger {
  width: 100%;
  min-width: 0;
}

#aiNotifySettingsPanel .settings-toggle-row.is-locked {
  opacity: 0.55;
}

#aiNotifySettingsPanel .settings-toggle-row.is-locked input[type="checkbox"] {
  cursor: not-allowed;
}

#aiNotifySettingsPanel .settings-field-hint {
  margin: 0 0 8px;
  font-size: 11px;
  line-height: 1.4;
}

#aiNotifySettingsPanel .settings-toggle-row {
  padding-top: 10px;
  padding-bottom: 10px;
}

#aiNotifySettingsPanel .settings-toggle-row small {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 900px) {
  .settings-workspace-fields {
    grid-template-columns: 1fr;
  }
}

.web-guest-id {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 11px;
  line-height: 1.35;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
  text-align: left;
}

@media (max-width: 560px) {
  .behavior-animal-bg {
    width: min(78%, 280px);
    opacity: 0.34;
  }

  .behavior-bias-stats {
    max-width: 100%;
  }
}

@media (max-width: 1100px) {
  .settings-row-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .settings-row-panels {
    grid-template-columns: 1fr;
  }

  .settings-side-stack {
    grid-template-columns: 1fr;
  }
}

/* SENTRA UX overhaul ? geometric decision mark and focused AI surfaces */
.sentra-ai-mark svg {
  display: none;
}

.sentra-ai-mark::after,
.dashboard-sentra-monogram::before,
.dashboard-sentra-brand-mark::before,
.sentra-assistant-avatar::before {
  content: "";
  display: block;
  width: 62%;
  aspect-ratio: 1;
  background: currentColor;
  clip-path: polygon(8% 8%, 92% 8%, 66% 34%, 46% 34%, 61% 50%, 46% 66%, 66% 66%, 92% 92%, 8% 92%, 48% 50%);
  filter: drop-shadow(0 0 7px rgba(var(--accent-rgb), 0.62));
}

.dashboard-sentra-monogram,
.dashboard-sentra-brand-mark,
.sentra-assistant-avatar {
  font-size: 0;
}

.dashboard-sentra-monogram {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  transform: none;
}

.dashboard-sentra-monogram::before {
  width: 30px;
}

.dashboard-sentra-monogram::after {
  content: none;
}

.dashboard-sentra-brand-mark::before {
  width: 25px;
}

.sentra-assistant-avatar::before {
  width: 16px;
}

.workspace-draft-label {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 6px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 999px;
  color: rgb(var(--accent-rgb));
  background: rgba(var(--accent-rgb), 0.07);
  font: 700 8px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

.sentra-signal-pattern {
  display: block;
  margin-top: 0;
  font-size: clamp(18px, 1.8vw, 27px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.sentra-signal-metric {
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.sentra-signal-action {
  margin: 16px 0 0;
  padding-top: 13px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.15);
  color: color-mix(in srgb, rgb(var(--accent-rgb)) 74%, var(--text-primary));
  font-size: 12px;
  font-weight: 720;
  line-height: 1.45;
}

.news-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.sentra-ai-mark--button {
  width: 21px;
  height: 21px;
  border: 0;
  border-radius: 6px;
  background: rgba(var(--accent-rgb), 0.12);
  box-shadow: none;
}

.ai-workspace-hero {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 292px);
  align-items: stretch;
  min-height: 300px;
  background:
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.13), transparent 46%),
    linear-gradient(145deg, color-mix(in srgb, var(--bg-secondary) 96%, #050816), rgba(5, 8, 22, 0.98));
}

.ai-workspace-hero::after,
.ai-workspace-orbit {
  display: none;
}

.ai-workspace-hero-copy {
  align-self: center;
}

.ai-workspace-status {
  display: grid;
  align-content: start;
  align-self: stretch;
  justify-self: stretch;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.ai-workspace-status .pill {
  justify-self: start;
}

.ai-workspace-status > p {
  margin: auto 0 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.45;
}

.ai-workspace-status .primary-button {
  width: 100%;
  min-height: 44px;
}

.dashboard-ai-drawer {
  grid-template-rows: auto auto auto minmax(280px, 1fr);
  gap: 13px;
  width: 100%;
  max-width: none;
  padding: clamp(18px, 2.4vw, 28px);
}

.dashboard-ai-drawer-intro > p {
  margin-bottom: 5px;
}

.dashboard-ai-drawer-intro h2 {
  font-size: clamp(38px, 4.4vw, 58px);
  line-height: 0.95;
  letter-spacing: -0.055em;
  text-shadow: none;
}

.dashboard-ai-drawer-intro-row {
  margin-top: 9px;
}

.dashboard-ai-drawer-prompts button {
  min-height: 42px;
}

.dashboard-ai-drawer-messages.ai-assistant-messages {
  min-height: 240px;
  padding: 16px;
}

.dashboard-ai-drawer-messages .ai-assistant-msg,
.ai-hub-chat-block .ai-assistant-msg {
  border-radius: 16px;
}

.dashboard-ai-drawer-messages .ai-assistant-msg.is-user,
.ai-hub-chat-block .ai-assistant-msg.is-user {
  margin-left: auto;
  border-color: rgba(var(--accent-rgb), 0.25);
  background: rgba(var(--accent-rgb), 0.13);
}

.dashboard-ai-drawer-messages .ai-assistant-msg.is-assistant,
.ai-hub-chat-block .ai-assistant-msg.is-assistant {
  margin-right: auto;
  background: rgba(255, 255, 255, 0.035);
}

.support-partner-card {
  align-items: center;
}

.support-partner-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: rgb(var(--accent-rgb));
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 760px) {
  .ai-workspace-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-ai-drawer {
    grid-template-rows: auto auto auto minmax(0, 1fr);
  }

  .dashboard-ai-drawer-intro h2 {
    font-size: 42px;
  }
}

.ai-coach-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.ai-coach-grid .coach-card {
  width: 100%;
}

.active-trade-card,
.coach-card,
.session-heatmap-card,
.market-control-card,
.market-chart-card,
.market-report-card,
.checkout-box,
.empty-state {
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.empty-state.wide {
  grid-column: 1 / -1;
  min-height: 160px;
  display: grid;
  align-content: center;
}

.empty-state h3,
.coach-card h3,
.session-heatmap-card h3,
.active-trade-card h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.floating-pl {
  display: block;
  margin: 18px 0;
  font-size: 34px;
  letter-spacing: -0.06em;
  animation: pnl-breathe 2.6s ease-in-out infinite;
}

.active-trade-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.active-trade-meta span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 14px;
  color: color-mix(in srgb, var(--text-primary) 68%, var(--text-secondary));
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
}

.active-trade-meta strong {
  color: var(--text-primary);
  font-size: 13px;
}

.trade-table-wrapper thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: color-mix(in srgb, var(--bg-secondary) 90%, var(--accent-primary));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--inset-card-border);
  color: color-mix(in srgb, var(--text-primary) 92%, var(--accent-primary));
  white-space: nowrap;
}

.trade-table-wrapper tbody tr {
  transition: background 0.16s ease;
}

.trade-table-wrapper tbody tr.row-win {
  background: rgba(34, 197, 94, 0.045);
}

.trade-table-wrapper tbody tr.row-loss {
  background: rgba(239, 68, 68, 0.045);
}

.trade-table-wrapper tbody tr.row-open {
  background: rgba(245, 158, 11, 0.05);
}

.trade-table-wrapper tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
}

.trade-table-wrapper tbody tr.row-win:hover {
  background: rgba(34, 197, 94, 0.08);
}

.trade-table-wrapper tbody tr.row-loss:hover {
  background: rgba(239, 68, 68, 0.08);
}

.trade-table-wrapper tbody tr.row-open:hover {
  background: rgba(245, 158, 11, 0.09);
}

.trade-table-wrapper td:nth-child(7),
.trade-table-wrapper td:nth-child(8),
.trade-table-wrapper th:nth-child(7),
.trade-table-wrapper th:nth-child(8) {
  min-width: 96px;
  white-space: nowrap;
}

.trade-table-wrapper td:nth-child(7),
.trade-table-wrapper td:nth-child(8) {
  color: var(--text-primary);
}

.trade-table-wrapper td:nth-child(8) .tag {
  display: inline-flex;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

body[data-theme="gold"] .trade-table-wrapper thead th,
body[data-theme="lava"] .trade-table-wrapper thead th,
body[data-theme="gold"] .active-trade-meta span,
body[data-theme="lava"] .active-trade-meta span {
  color: color-mix(in srgb, var(--text-primary) 78%, var(--accent-primary));
}

.session-heatmap-card {
  background:
    radial-gradient(circle at 20% 0%, rgba(139, 92, 246, var(--heat)), transparent 62%),
    rgba(255, 255, 255, 0.03);
}

.market-control-card {
  display: grid;
  gap: 14px;
  align-content: start;
}

.market-timeframe-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.market-timeframe-tabs .tab-button {
  flex: 1;
  min-width: 64px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
}

.market-timeframe-tabs .tab-button.is-active {
  color: var(--text-primary);
  border-color: var(--tab-active-border);
  background: var(--tab-active-bg);
  box-shadow: 0 0 24px var(--tab-active-glow);
}

.is-native-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ui-select-wrap {
  position: relative;
  display: grid;
  width: 100%;
}

.ui-select-trigger {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.ui-select-trigger.is-open {
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.35), 0 0 28px rgba(var(--accent-rgb), 0.12);
}

.ui-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 120;
  display: grid;
  gap: 4px;
  padding: 8px;
  border-radius: 16px;
  background-color: var(--select-menu-bg);
  background: var(--select-menu-bg);
  color: var(--text-primary);
  backdrop-filter: none;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  box-shadow: var(--select-menu-shadow);
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

body[data-theme]:not([data-theme="white"]) {
  --select-menu-bg: var(--bg-secondary, #0b1120);
  --select-menu-shadow: 0 18px 48px rgba(0, 0, 0, 0.62);
  --select-option-active-bg: rgba(var(--accent-rgb), 0.22);
  --select-option-active-color: var(--text-primary);
}

body[data-theme]:not([data-theme="white"]) .ui-select-menu {
  background-color: rgba(12, 10, 16, 0.96);
  background: rgba(12, 10, 16, 0.96);
  border-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body[data-theme]:not([data-theme="white"]) .ui-select-option {
  color: var(--text-primary);
}

.ui-select-wrap {
  position: relative;
  z-index: 1;
}

.trade-form .ui-select-wrap:focus-within,
.filters .ui-select-wrap:focus-within {
  z-index: 30;
}

.ui-select-menu.hidden,
.ui-select-menu[hidden] {
  display: none !important;
}

.ui-select-menu.ui-select-menu-floating {
  position: fixed;
  z-index: 10050;
  min-width: 148px;
}

.ui-select-option {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
}

.ui-select-option:hover,
.ui-select-option.is-selected {
  background: var(--select-option-active-bg);
  color: var(--select-option-active-color);
}

.market-chart-card {
  min-height: 380px;
}

.market-chart-card canvas {
  min-height: 360px;
}

.market-outlook-grid {
  grid-template-columns: 280px minmax(420px, 1fr) 320px;
  align-items: start;
}

.market-control-card label,
.checkout-box label,
.settings-grid label:not(.settings-toggle-row):not(.settings-field-row) {
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12px;
}

.market-chart-card canvas {
  width: 100%;
  border-radius: 18px;
  background: rgba(11, 17, 32, 0.38);
}

.tradingview-terminal {
  height: 420px;
  margin-bottom: 0;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(5, 8, 22, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.market-tv-card .tradingview-terminal {
  height: 520px;
  min-height: 520px;
}

.replay-section.card {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  isolation: isolate;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.replay-chart-host {
  width: 100%;
  max-width: 100%;
  height: 480px;
  min-height: 420px;
  border-radius: 18px;
  overflow: hidden;
  background: #050816;
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: translateZ(0);
  contain: layout;
}

.replay-chart-host .tv-lightweight-charts {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
}

.ai-hub-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
}

.ai-command-center {
  position: relative;
  display: grid;
  gap: 16px;
  margin-bottom: 4px;
  padding: clamp(16px, 2.4vw, 26px);
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 24px;
  background:
    radial-gradient(circle at 94% 0%, rgba(var(--cyan-rgb, 34, 211, 238), 0.1), transparent 28%),
    radial-gradient(circle at 4% 100%, rgba(var(--accent-rgb), 0.14), transparent 36%),
    linear-gradient(145deg, rgba(17, 18, 34, 0.92), rgba(8, 10, 19, 0.9));
}

.ai-command-head,
.ai-command-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-command-head {
  align-items: flex-start;
}

.ai-command-head h3 {
  max-width: 640px;
  margin: 6px 0 0;
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 720;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.ai-command-panel h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.ai-command-eyebrow {
  display: block;
  color: var(--kicker-color);
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ai-command-period,
.ai-command-tier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 999px;
  color: color-mix(in srgb, var(--accent-primary) 78%, #fff);
  background: rgba(var(--accent-rgb), 0.12);
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ai-command-tier {
  min-height: 24px;
  padding: 0 8px;
  font-size: 9px;
  letter-spacing: 0.12em;
  opacity: 0.92;
}

.ai-command-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ai-command-kpis article {
  position: relative;
  display: grid;
  gap: 4px;
  align-content: start;
  min-height: 0;
  padding: 13px 14px 13px 16px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 16px;
  background:
    linear-gradient(160deg, rgba(var(--accent-rgb), 0.08), transparent 55%),
    rgba(255, 255, 255, 0.025);
}

.ai-command-kpis article::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--accent-primary);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.45);
}

.ai-command-kpis article:nth-child(2)::before {
  background: var(--accent-secondary, #ec4899);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent-secondary, #ec4899) 45%, transparent);
}

.ai-command-kpis article:nth-child(3)::before {
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.4);
}

.ai-command-kpis article:nth-child(4)::before {
  background: var(--success);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.ai-command-kpis article.is-locked {
  opacity: 0.88;
}

.ai-command-kpis span,
.ai-command-kpis small {
  color: var(--text-secondary);
  font-size: 10px;
}

.ai-command-kpis span {
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.ai-command-kpis strong {
  margin-top: 2px;
  color: var(--text-primary);
  font: 750 22px/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: -0.02em;
}

.ai-command-kpis .is-high strong {
  color: #fb7185;
}

.ai-command-kpis .is-medium strong {
  color: #fbbf24;
}

.ai-command-kpis .is-low strong {
  color: #86efac;
}

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

.ai-command-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  min-width: 0;
  padding: 14px 15px 15px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.028);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.ai-command-panel > header {
  min-height: 28px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.1);
}

.ai-mistake-row,
.ai-plan-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.08);
}

.ai-mistake-row:last-child,
.ai-plan-row:last-child {
  border-bottom: 0;
}

.ai-mistake-row > span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: color-mix(in srgb, var(--accent-primary) 70%, #fff);
  background: rgba(var(--accent-rgb), 0.12);
  font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ai-mistake-row div,
.ai-plan-row div {
  display: grid;
  gap: 3px;
}

.ai-mistake-row small,
.ai-plan-row small {
  color: var(--text-secondary);
  font-size: 10px;
}

.ai-mistake-row > strong {
  color: #fb7185;
  font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ai-weekly-fixes {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}

.ai-weekly-fixes li {
  padding-left: 2px;
  color: color-mix(in srgb, var(--text-primary) 88%, var(--accent-primary));
  font-size: 12px;
  line-height: 1.45;
}

.ai-weekly-fixes li::marker {
  color: var(--accent-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 800;
}

.ai-day-replay-date {
  width: 142px;
  min-height: 32px !important;
  padding: 5px 9px;
  border-color: rgba(var(--accent-rgb), 0.28) !important;
  font-size: 11px !important;
}

.ai-day-timeline {
  display: grid;
}

.ai-day-timeline article {
  display: grid;
  grid-template-columns: 44px 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 46px;
}

.ai-day-timeline time {
  color: var(--text-secondary);
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ai-day-timeline i {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 9px rgba(var(--accent-rgb), 0.55);
}

.ai-day-timeline i::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 3px;
  width: 1px;
  height: 37px;
  background: rgba(var(--accent-rgb), 0.18);
}

.ai-day-timeline article:last-child i::after {
  display: none;
}

.ai-day-timeline div {
  display: grid;
  gap: 3px;
}

.ai-day-timeline small {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-day-timeline strong {
  font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ai-plan-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.ai-plan-row > span {
  padding: 5px 7px;
  border-radius: 7px;
  font: 750 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
}

.ai-plan-row .is-ok {
  color: #86efac;
  background: rgba(52, 211, 153, 0.09);
}

.ai-plan-row .is-bad {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.09);
}

.ai-plan-row .is-unassigned {
  color: #9ca3af;
  background: rgba(156, 163, 175, 0.08);
}

.ai-command-empty,
.ai-command-lock {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 88px;
  padding: 18px 14px;
  color: var(--text-secondary);
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
}

.ai-command-lock {
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.12), transparent 62%),
    rgba(255, 255, 255, 0.02);
}

.ai-command-lock em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 9px;
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  border-radius: 999px;
  color: color-mix(in srgb, var(--accent-primary) 80%, #fff);
  background: rgba(var(--accent-rgb), 0.14);
  font: 750 9px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-style: normal;
  letter-spacing: 0.14em;
}

.ai-command-lock span {
  max-width: 220px;
}

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

  .ai-command-head h3 {
    font-size: 22px;
  }
}

@media (max-width: 560px) {
  .ai-command-center {
    padding: 14px;
    border-radius: 20px;
  }

  .ai-command-kpis,
  .ai-command-grid {
    grid-template-columns: 1fr;
  }

  .ai-command-head {
    flex-direction: column;
    align-items: stretch;
  }

  .ai-command-period {
    align-self: flex-start;
  }
}

.ai-behavior-heatmaps {
  max-width: 100%;
  min-width: 0;
  overflow: visible;
}

.ai-section-head {
  position: relative;
  z-index: 3;
  overflow: visible;
}

.ai-section-head .help-tip-bubble {
  left: 0;
  right: auto;
  top: calc(100% + 10px);
  transform: none;
  width: min(320px, calc(100vw - 48px));
  max-width: 320px;
  z-index: 120;
}

.ai-section-head .help-tip-bubble::before {
  left: 12px;
  right: auto;
  top: -6px;
  transform: rotate(135deg);
}

.ai-section-head .help-tip:hover .help-tip-bubble,
.ai-section-head .help-tip:focus-visible .help-tip-bubble {
  transform: none;
}

.ai-narration-card {
  padding: 18px 20px;
  border-radius: 18px;
  background: var(--ai-narration-bg);
  border: 1px solid var(--ai-narration-border);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.ai-narration-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: #ece7ff;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.ai-hub-premium-block {
  display: grid;
  gap: 16px;
  max-width: 100%;
  min-width: 0;
}

.ai-hub-premium-block > .ai-narration-card {
  margin-bottom: 2px;
}

.ai-hub-premium-block > .ai-section-head {
  margin-top: 2px;
  padding-top: 4px;
}

.ai-hub-ai-note,
.heatmap-ai-note {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

.coach-detail {
  line-height: 1.6;
  white-space: pre-wrap;
}

.ai-hub-loading {
  grid-column: 1 / -1;
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 13px;
}

.ai-hub-screenshot-block {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-hub-screenshot-block h4 {
  margin: 0 0 10px;
  font-size: 14px;
}

.heatmap-empty {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

body[data-theme="lava"] .emotional-meter-head,
body[data-theme="lava"] .emotional-meter-head strong {
  color: rgba(255, 245, 238, 0.92);
}

body[data-theme="lava"] .emotional-mode-pill {
  color: rgba(255, 245, 238, 0.88);
  background: rgba(255, 94, 58, 0.12);
  border-color: rgba(255, 94, 58, 0.22);
}

body[data-theme="lava"] .ai-hub-ai-note,
body[data-theme="lava"] .heatmap-ai-note,
body[data-theme="lava"] .heatmap-empty {
  color: rgba(255, 240, 230, 0.82);
}

.ai-emotional-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.emotional-mode-pill {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d9d2ef;
}

.emotional-mode-row {
  grid-column: 1 / -1;
}

.emotional-meter {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.emotional-meter-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #b8b3c7;
}

.emotional-meter-head strong {
  color: #f5f3ff;
}

.emotional-meter-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.emotional-meter-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 0.35s ease;
}

.emotional-meter-stress .emotional-meter-fill {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.emotional-meter-impulse .emotional-meter-fill {
  background: linear-gradient(90deg, #fb7185, #f97316);
}

.emotional-meter-revenge .emotional-meter-fill {
  background: linear-gradient(90deg, #ef4444, #991b1b);
}

.emotional-meter-confidence .emotional-meter-fill {
  background: linear-gradient(90deg, #22d3ee, #10b981);
}

.emotional-meter-tilt .emotional-meter-fill {
  background: linear-gradient(90deg, #a855f7, #ef4444);
}

.ai-heartbeat-panel {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-section-head,
.ai-section-subhead {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  max-width: 100%;
  min-width: 0;
}

.ai-section-head h3,
.ai-section-subhead span {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ai-section-subhead {
  margin-top: 4px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.ai-heartbeat-section {
  margin-bottom: 18px;
}

.help-tip {
  position: relative;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  color: var(--accent-primary);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: help;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.help-tip-icon {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.help-tip-bubble {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  z-index: 40;
  width: min(300px, 72vw);
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(22, 22, 24, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.01em;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) translateX(-4px) scale(0.98);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
}

.help-tip-bubble::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  background: rgba(22, 22, 24, 0.82);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateY(-50%) rotate(45deg);
}

.help-tip:hover,
.help-tip:focus-visible {
  background: rgba(var(--accent-rgb), 0.22);
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--text-primary);
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.help-tip:hover .help-tip-bubble,
.help-tip:focus-visible .help-tip-bubble {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0) scale(1);
}

body[data-theme="white"] .help-tip-bubble {
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
}

body[data-theme="white"] .help-tip-bubble::before {
  background: rgba(255, 255, 255, 0.94);
  border-left-color: rgba(15, 23, 42, 0.1);
  border-bottom-color: rgba(15, 23, 42, 0.1);
}

.heartbeat-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 72px;
}

.heartbeat-bars span {
  flex: 1;
  min-width: 4px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.85), rgba(139, 92, 246, 0.35));
  opacity: 0.85;
}

.ai-behavior-heatmaps h3,
.ai-hub-coach-block h3,
.ai-hub-chat-block h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.behavior-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  max-width: 100%;
  min-width: 0;
}

.behavior-heatmap-card {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
}

.behavior-heatmap-table-wrap {
  overflow: hidden;
  max-width: 100%;
}

.behavior-heatmap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  table-layout: fixed;
}

.behavior-heatmap-table th:nth-child(1),
.behavior-heatmap-table td:nth-child(1) {
  width: 34%;
  min-width: 0;
  word-break: break-word;
}

.behavior-heatmap-table th:nth-child(2),
.behavior-heatmap-table td:nth-child(2),
.behavior-heatmap-table th:nth-child(3),
.behavior-heatmap-table td:nth-child(3) {
  width: 18%;
  white-space: nowrap;
}

.heatmap-status-cell {
  width: 30%;
  text-align: center;
  padding-left: 2px;
  padding-right: 2px;
}

.heatmap-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
}

.heatmap-status-hot {
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.28);
}

.heatmap-status-ok {
  background: rgba(245, 158, 11, 0.14);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.24);
}

.heatmap-status-weak {
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.heatmap-status-empty {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.behavior-heatmap-table th,
.behavior-heatmap-table td {
  padding: 6px 4px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.behavior-heatmap-table tbody tr:hover {
  background: rgba(139, 92, 246, 0.08);
}

.ai-hub-coach-block,
.ai-hub-chat-block {
  padding-top: 6px;
}

.replay-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.replay-controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.replay-controls-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #b8b3c7;
}

.replay-transport {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.replay-progress {
  flex: 1;
  min-width: 180px;
}

.replay-status {
  margin: 0;
}

.replay-trade-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.replay-trade-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.replay-pnl {
  margin-left: auto;
  font-size: 18px;
  color: #22d3ee;
}

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

.replay-stats-panel div {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.replay-stats-panel span {
  display: block;
  font-size: 11px;
  color: #9ca3af;
}

.replay-stats-panel strong {
  font-size: 18px;
}

.replay-trades-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.replay-trades-list li {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
}

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

@media (max-width: 900px) {
  .behavior-heatmap-grid {
    grid-template-columns: 1fr;
  }
}

.behavior-bias-card {
  position: relative;
  margin-top: 14px;
  padding: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.behavior-bias-kicker {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 16px 18px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(var(--accent-rgb), 0.88);
}

.behavior-bias-body {
  position: relative;
  min-height: 148px;
  padding: 6px 18px 20px;
}

.behavior-animal-bg {
  position: absolute;
  top: -22px;
  right: -10%;
  bottom: -22px;
  width: min(92%, 480px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.58;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to left,
    rgba(0, 0, 0, 0.98) 0%,
    rgba(0, 0, 0, 0.84) 38%,
    rgba(0, 0, 0, 0.42) 72%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to left,
    rgba(0, 0, 0, 0.98) 0%,
    rgba(0, 0, 0, 0.84) 38%,
    rgba(0, 0, 0, 0.42) 72%,
    transparent 100%
  );
}

.behavior-animal-art {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: 70% 42%;
  background-repeat: no-repeat;
  filter: saturate(1.08) contrast(1.08) brightness(1);
}

.behavior-animal-bg.is-bear {
  opacity: 0.78;
}

.behavior-animal-bg.is-bull {
  opacity: 0.58;
}

.behavior-animal-bg.is-bear .behavior-animal-art {
  animation: behavior-bear-eyes-live 3.4s ease-in-out infinite;
}

.behavior-animal-bg.is-bull .behavior-animal-art {
  animation: behavior-bull-live 4.2s ease-in-out infinite;
}

@keyframes behavior-bear-eyes-live {
  0%,
  100% {
    filter: saturate(1.08) contrast(1.08) brightness(1);
  }
  50% {
    filter: saturate(1.32) contrast(1.16) brightness(1.08);
  }
}

@keyframes behavior-bull-live {
  0%,
  100% {
    filter: saturate(1.02) contrast(1.06) brightness(1);
  }
  50% {
    filter: saturate(1.14) contrast(1.1) brightness(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .behavior-animal-bg.is-bear .behavior-animal-art,
  .behavior-animal-bg.is-bull .behavior-animal-art {
    animation: none;
  }
}

body.reduced-motion .behavior-animal-bg.is-bear .behavior-animal-art,
body.reduced-motion .behavior-animal-bg.is-bull .behavior-animal-art {
  animation: none;
}

.behavior-bias-stats {
  position: relative;
  z-index: 1;
  max-width: min(100%, 420px);
  padding: 12px 0 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.behavior-bias-labels strong {
  font-size: 28px;
  color: var(--text-primary);
  letter-spacing: -0.04em;
}

.behavior-bias-labels,
.behavior-bias-counts {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 13px;
}

.behavior-bias-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.25);
  overflow: hidden;
  margin: 10px 0;
}

.behavior-bias-bar-fill {
  height: 100%;
  width: 50%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #10b981);
  transition: width 0.35s ease;
}

.bias-bearish .behavior-bias-bar-fill {
  background: linear-gradient(90deg, #64748b, #ef4444);
}

.bias-bearish .behavior-bias-kicker {
  color: #fca5a5;
}

.bias-bullish .behavior-bias-kicker {
  color: #6ee7b7;
}

.instrument-donut-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.instrument-donut {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.instrument-donut-chart {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 10px;
}

.instrument-donut-chart svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 10;
}

.donut-fill {
  fill: none;
  stroke: #2563eb;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.4s ease;
}

.donut-value {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
}

.donut-pair {
  margin: 0;
  font-weight: 600;
}

.donut-meta {
  color: var(--text-secondary);
}

.instrument-donut-kicker {
  margin: 0 0 12px;
}

.settings-sections-list {
  display: grid;
  gap: 0;
  margin: 12px 0;
}

.settings-section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  font-size: 14px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--settings-row-border);
}

.settings-section-row:last-child {
  border-bottom: 0;
}

.section-hide-x {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--section-hide-border);
  border-radius: 8px;
  background: var(--section-hide-bg);
  color: var(--section-hide-color);
  font-size: 17px;
  line-height: 1;
  font-weight: 300;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.section-hide-x:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  color: rgba(var(--accent-rgb), 0.75);
}

.section-hide-x.is-active {
  border-color: rgba(var(--accent-rgb), 0.75);
  background: rgba(var(--accent-rgb), 0.28);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.2);
}

.sidebar-nav .nav-item-hidden {
  display: none;
}

@keyframes bias-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.tradingview-terminal iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.market-report-card {
  display: grid;
  gap: 14px;
  align-content: start;
}

.outlook-levels {
  display: grid;
  gap: 8px;
}

.outlook-levels span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-secondary);
}

.outlook-levels strong {
  color: var(--text-primary);
}

.market-feed {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.market-feed span {
  padding: 12px 14px;
  border-radius: 16px;
  color: var(--text-secondary);
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.09);
}

.crypto-checkout.checkout-core-mode .checkout-summary,
.crypto-checkout.checkout-core-mode .referral-panel,
.crypto-checkout.checkout-core-mode #confirmCryptoPayment,
.crypto-checkout.checkout-core-mode #paymentStatus {
  display: none;
}

.crypto-checkout.checkout-core-mode .checkout-box {
  margin-top: 0;
}

.crypto-checkout {
  display: block;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.checkout-box {
  display: grid;
  gap: 12px;
}

.checkout-amount {
  margin: 0;
  font-size: clamp(2.25rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--text-primary);
}

.wallet-copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.plan-popular-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7dd3fc;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.18);
}

.plan-save-note {
  min-height: 18px;
  margin: 0 0 8px;
  color: #34d399;
  font-size: 13px;
  opacity: 0;
}

.plan-save-note.is-visible {
  opacity: 1;
}

.text-positive {
  color: #34d399 !important;
}

.text-negative {
  color: #f87171 !important;
}

.changelog-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.changelog-page .changelog-list {
  margin-top: 8px;
}

.replay-shell {
  display: grid;
  gap: 18px;
}

.replay-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.replay-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  flex: 1;
  justify-content: flex-end;
}

.replay-toolbar-group {
  display: grid;
  gap: 6px;
}

.replay-toolbar-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.replay-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.replay-pill {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.replay-pill.is-active {
  color: var(--text-primary);
  border-color: rgba(139, 92, 246, 0.35);
  background: rgba(139, 92, 246, 0.18);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.12);
}

.replay-date-input {
  min-width: 150px;
}

.replay-chart-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: baseline;
}

.replay-progress-label,
.replay-ohlc {
  font-size: 13px;
  color: var(--text-secondary);
}

.replay-chart-shell {
  position: relative;
}

.replay-loading-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 8, 22, 0.82);
  border-radius: 18px;
  color: var(--text-primary);
  font-size: 14px;
  z-index: 2;
}

.replay-loading-overlay.hidden {
  display: none;
}

.replay-stage {
  padding: 16px;
  border-radius: 24px;
  background: rgba(5, 8, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.replay-chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.replay-clock {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.replay-floating-pnl {
  font-size: 18px;
  font-weight: 600;
}

.replay-stage canvas,
#marketOutlookChart {
  width: 100%;
  display: block;
  border-radius: 16px;
  background: rgba(5, 8, 22, 0.55);
}

.replay-stage canvas {
  min-height: 420px;
}

.replay-transport-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.replay-transport-bar .replay-slider {
  flex: 1;
  min-width: 180px;
}

.replay-bottom-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr) minmax(220px, 280px);
  gap: 16px;
  align-items: start;
}

.replay-order-panel,
.replay-trades-card,
.replay-stats-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.replay-order-panel {
  display: grid;
  gap: 10px;
  align-content: start;
}

.replay-slider {
  width: 100%;
  accent-color: #7d5cff;
}

.replay-trades-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.replay-trade-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 13px;
}

.plan-price-compare {
  display: block;
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: line-through;
  opacity: 0.72;
}

.plan-billed-note {
  display: block;
  margin-top: 4px;
  color: #34d399;
  font-size: 13px;
}

.changelog-list {
  display: grid;
  gap: 12px;
}

.changelog-item {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.changelog-meta span {
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
}

.billing-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.feature-comparison {
  margin-top: 28px;
}

.feature-comparison-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.feature-comparison-table {
  min-width: 640px;
}

.feature-comparison-head,
.feature-comparison-row {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, minmax(88px, 1fr));
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
}

.feature-comparison-head {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-top: 16px;
  padding-bottom: 12px;
  background: rgba(8, 10, 22, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.feature-comparison-head strong {
  text-align: center;
  font-weight: 600;
}

.feature-comparison-head strong:first-child {
  text-align: left;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 12px;
}

.feature-comparison-row {
  color: var(--text-soft);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
}

.feature-comparison-row:last-child {
  border-bottom: none;
}

.feature-comparison-row span {
  text-align: center;
}

.feature-comparison-row span:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--text-primary);
}

.feature-comparison .feature-col-edge {
  font-weight: 600;
  color: #c4ddff;
}

.feature-comparison-head .feature-col-edge {
  color: #a5b4fc;
}

.feature-comparison .feature-col-elite {
  font-weight: 600;
  color: #f5d98b;
}

.feature-comparison-head .feature-col-elite {
  color: #f5d061;
}

.feature-comparison-row-elite {
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.05), transparent);
}

.ai-provider-pill {
  letter-spacing: 0.02em;
}

.plan-card.is-current-plan {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 44px rgba(16, 185, 129, 0.08);
}

body.compact-mode .card {
  padding: 20px;
}

body.compact-mode .main-content {
  gap: 18px;
}

body.compact-mode .journal-summary-bar--cards {
  gap: 5px;
  margin-bottom: 8px;
}

body.compact-mode .journal-stat-card {
  padding: 6px 8px;
  border-radius: 8px;
}

body.compact-mode .journal-stat-card strong {
  font-size: 14px;
}

body.compact-mode .trade-calendar .calendar-cell {
  min-height: 56px;
  padding: 6px 5px;
}

body.reduced-motion .tab-switcher-indicator,
body.reduced-motion .page.is-active.journal-hub-panel.is-active-tab,
body.reduced-motion .tab-content.is-active,
body.reduced-motion .hero-card::before,
body.reduced-motion,
body.reduced-motion::after,
body.reduced-motion[data-theme="lava"]::before,
body.reduced-motion[data-theme="lava"]::after,
body.reduced-motion[data-theme="rgb"]::before,
body.reduced-motion[data-theme="rgb"]::after {
  animation: none !important;
}

.metrics > div {
  padding: 16px;
}

.metric-label {
  color: var(--text-secondary);
  font-size: 10px;
}

.metric-value,
.today-value {
  color: var(--text-primary);
  letter-spacing: -0.04em;
}

.metric-value.value-positive,
.pl-positive {
  color: var(--success);
}

.session-row.is-active,
.session-row.is-active .session-label,
.session-row.is-active .session-time {
  color: var(--session-active-color);
}

.metric-value.value-negative,
.pl-negative {
  color: var(--error);
}

.ghost-button,
.primary-button,
.ghost-select,
.form-row input,
.form-row select,
.filters input,
.filters select,
.table-edit-input,
.table-edit-select,
.comment-input,
.routine-form input,
.rule-form input,
.rule-form select,
.rule-form .ui-select-trigger {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-primary);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.ghost-select,
.form-row input,
.form-row select,
.filters input,
.filters select,
.table-edit-input,
.table-edit-select,
.comment-input,
.routine-form input,
.rule-form input,
.rule-form select,
.rule-form .ui-select-trigger {
  border-radius: 14px;
  padding: 12px 14px;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent-primary), rgba(var(--accent-rgb), 0.72));
  box-shadow: 0 14px 34px rgba(var(--accent-rgb), 0.24);
}

.ghost-button:hover,
.primary-button:hover,
.ghost-select:hover,
.bias-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(var(--accent-rgb), 0.16);
}

.bias-options {
  gap: 10px;
}

.bias-button {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.055);
  color: var(--text-secondary);
  border-radius: 999px;
  transition: all 0.2s ease;
}

.bias-button.is-active {
  color: var(--text-primary);
  background: rgba(var(--accent-rgb), 0.15);
  border-color: rgba(var(--accent-rgb), 0.2);
}

.tab-button.is-active {
  background: linear-gradient(120deg, var(--accent-primary), rgba(var(--accent-rgb), 0.65));
  color: #fff;
}

#plChart,
.discipline-charts canvas {
  background: rgba(11, 17, 32, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

table {
  border-spacing: 0 8px;
  border-collapse: separate;
}

thead {
  background: transparent;
  color: var(--text-secondary);
}

thead th {
  color: color-mix(in srgb, var(--text-primary) 90%, var(--accent-primary));
  font-weight: 600;
}

th,
td {
  border-bottom: 0;
  padding: 12px 14px;
}

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

tbody tr:hover {
  background: rgba(var(--accent-rgb), 0.075);
}

.tag,
.pill,
.status-pill {
  border: 0;
  background: rgba(255, 255, 255, 0.06);
}

.tag {
  color: var(--text-primary);
  background: var(--inset-card-bg);
  border: 1px solid var(--inset-card-border);
}

.pill,
.status-pill {
  color: color-mix(in srgb, var(--text-primary) 88%, transparent);
}

.tag-green,
.pill-positive {
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
}

.tag-red,
.pill-negative {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

.tag-purple,
.pill-neutral {
  color: var(--accent-primary);
  background: rgba(var(--accent-rgb), 0.12);
}

.tag-blue {
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.1);
}

.weekly-bars {
  gap: 20px;
}

.weekly-track {
  background: rgba(255, 255, 255, 0.035);
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.plans-grid {
  gap: 18px;
}

.plan-card {
  padding: 28px;
  min-height: 220px;
  display: grid;
  align-content: space-between;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.plan-card:hover {
  transform: translateY(-4px);
  border-color: rgba(125, 92, 255, 0.3);
  box-shadow: 0 24px 90px rgba(125, 92, 255, 0.14);
}

.plan-featured {
  position: relative;
  overflow: hidden;
  border-color: rgba(139, 92, 246, 0.22);
  box-shadow: 0 22px 80px rgba(139, 92, 246, 0.12);
}

.plan-featured::before {
  content: "";
  position: absolute;
  inset: -40% -30% auto;
  height: 160px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.28), transparent 62%);
}

.plan-elite {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.plan-elite::before,
.plan-elite::after {
  display: none;
}

.plan-apex-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, 0.52);
}

.plan-apex-mark svg {
  display: block;
}

.plan-apex-mark--inline {
  position: static;
  top: auto;
  right: auto;
  flex-shrink: 0;
}

.plan-apex-mark--card {
  width: 24px;
  height: 24px;
  color: var(--subs-card-muted, rgba(255, 255, 255, 0.45));
}

body[data-theme="white"] .plan-apex-mark,
body[data-theme="white"] .plan-apex-mark--card {
  color: rgba(15, 23, 42, 0.42);
}

body[data-theme="white"] .plan-badge-apex {
  color: rgba(15, 23, 42, 0.72);
}

.plan-elite-kicker,
.plan-elite .plan-elite-kicker {
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.12em;
}

.plan-elite .plan-price-stack h3 {
  color: var(--subs-card-text, #fff);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

.plan-elite:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.plan-card.plan-elite.is-selected-plan {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.plan-card.plan-elite.is-current-plan {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.welcome-modal {
  background:
    radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.22), transparent 38%),
    rgba(3, 5, 16, 0.88);
}

.welcome-card {
  width: min(860px, 100%);
  gap: 22px;
  padding: 34px;
  background: linear-gradient(145deg, rgba(11, 17, 32, 0.86), rgba(5, 8, 22, 0.76));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 34px;
  box-shadow: 0 34px 120px rgba(0, 0, 0, 0.55), 0 0 70px rgba(139, 92, 246, 0.12);
}

.welcome-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
}

.welcome-card h2 {
  max-width: 680px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.96;
  letter-spacing: -0.065em;
  margin: 0 0 12px;
}

.welcome-logo {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 44px rgba(139, 92, 246, 0.16);
}

.welcome-logo img {
  width: 50px;
  height: 50px;
}

.welcome-language {
  max-width: 260px;
  padding: 0;
}

.welcome-progress {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 8px;
}

.welcome-progress span {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.welcome-progress span:first-child {
  background: linear-gradient(90deg, var(--accent-primary), var(--cyan));
}

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

.welcome-options label {
  min-height: 92px;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.055);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.welcome-options label:hover {
  transform: translateY(-2px);
  background: rgba(var(--accent-rgb), 0.075);
  border-color: rgba(var(--accent-rgb), 0.2);
}

.welcome-options input {
  accent-color: var(--accent-primary);
  margin-top: 4px;
}

.welcome-options span {
  display: grid;
  gap: 6px;
}

.welcome-options strong {
  font-size: 15px;
}

.welcome-options small {
  color: var(--text-secondary);
  line-height: 1.35;
}

.welcome-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

@keyframes hero-gradient {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

@keyframes live-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

@keyframes spirit-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-2deg);
  }
  50% {
    transform: translate3d(8px, -10px, 0) rotate(2deg);
  }
}

@keyframes pnl-breathe {
  0%,
  100% {
    opacity: 0.88;
  }
  50% {
    opacity: 1;
  }
}

@media (max-width: 1100px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .top-grid {
    grid-template-columns: 1fr;
  }

  .market-outlook-grid {
    grid-template-columns: 1fr;
  }

  .replay-bottom-grid {
    grid-template-columns: 1fr;
  }

  .left-stack,
  .right-stack {
    grid-column: auto;
  }

  .metrics {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 900px) {
  .shell-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    top: auto;
    z-index: 15;
    display: block;
    padding: 10px;
    border-radius: 24px;
  }

  .brand,
  .sidebar-profile,
  .subscription-badge,
  .sync-status-card,
  .language-control {
    display: none;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }

  .sidebar-nav button {
    min-height: 46px;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 8px 6px;
    font-size: 10px;
  }

  .sidebar-nav button:nth-child(n + 6) {
    display: none;
  }

  .sidebar-nav button span:first-child {
    font-size: 16px;
  }

  .app {
    padding-bottom: 110px;
  }
}

@media (max-width: 720px) {
  .app {
    padding: 18px 14px 48px;
  }

  .hero-card,
  .welcome-card,
  .card {
    padding: 22px;
  }

  .welcome-top,
  .welcome-options,
  .insight-grid,
  .crypto-checkout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .shell-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .sidebar-nav {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }

  .header {
    flex-direction: column;
  }

  .top-info {
    flex-direction: column;
    align-items: stretch;
  }

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

  .weekly-bars {
    grid-template-columns: repeat(2, minmax(90px, 1fr));
  }

  .backtest-panel {
    grid-template-columns: 1fr;
  }
}

.sidebar-profile-expanded {
  gap: 12px;
}

.sidebar-profile-main {
  display: grid;
  gap: 4px;
}

.sidebar-profile-stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.sidebar-profile-stats.hidden {
  display: none;
}

.sidebar-plan-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.market-chart-host {
  width: 100%;
  min-height: 420px;
  height: 420px;
  border-radius: 18px;
  overflow: hidden;
  background: #040816;
}

.market-tv-card {
  position: relative;
}

.market-position-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  backdrop-filter: blur(10px);
}

.market-position-badge.is-long {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.market-position-badge.is-short {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.market-analysis-block {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.market-analysis-text {
  white-space: pre-line;
}

.notion-import-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.notion-import-grid .discipline-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.notion-import-grid .file-drop {
  min-width: 0;
}

.notion-import-grid .primary-button {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  justify-self: stretch;
}

.notion-format-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
}

.theme-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.theme-picker-premium {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.theme-card {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease;
}

.theme-card:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.28);
  background: rgba(var(--accent-rgb), 0.06);
}

.theme-card.is-active {
  border-color: rgba(var(--accent-rgb), 0.52);
  background: rgba(var(--accent-rgb), 0.1);
  box-shadow:
    inset 0 0 0 1px rgba(var(--accent-rgb), 0.18),
    0 12px 32px rgba(var(--accent-rgb), 0.12);
}

.theme-card-preview {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 8px 20px rgba(0, 0, 0, 0.22);
}

.theme-card-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.theme-card-copy strong {
  font-size: 14px;
  letter-spacing: -0.02em;
}

.theme-card-copy small {
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-secondary);
}

.theme-card-check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all 0.2s ease;
}

.theme-card.is-active .theme-card-check {
  color: #fff;
  border-color: rgba(var(--accent-rgb), 0.35);
  background: linear-gradient(135deg, var(--accent-primary), rgba(var(--accent-rgb), 0.72));
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.28);
}

.theme-card[data-theme="purple"] .theme-card-preview {
  background: linear-gradient(145deg, #120820 0%, #4c1d95 52%, #0ea5e9 100%);
}

.theme-card[data-theme="green"] .theme-card-preview {
  background: linear-gradient(145deg, #04140a 0%, #047857 52%, #22c55e 100%);
}

.theme-card[data-theme="cyan"] .theme-card-preview {
  background: linear-gradient(145deg, #041018 0%, #0e7490 52%, #22d3ee 100%);
}

.theme-card[data-theme="orange"] .theme-card-preview {
  background: linear-gradient(145deg, #140a04 0%, #c2410c 52%, #fb923c 100%);
}

.theme-card[data-theme="rose"] .theme-card-preview {
  background: linear-gradient(145deg, #140408 0%, #be123c 52%, #fb7185 100%);
}

.theme-card[data-theme="gold"] .theme-card-preview {
  background: linear-gradient(145deg, #141004 0%, #b45309 52%, #fbbf24 100%);
}

.theme-card[data-theme="lava"] .theme-card-preview {
  background: linear-gradient(145deg, #160810 0%, #c026d3 48%, #ff5e3a 100%);
}

.theme-card[data-theme="rgb"] .theme-card-preview {
  background: linear-gradient(145deg, #090014 0%, #7928ca 42%, #00dfd8 100%);
}

.theme-card[data-theme="summer"] .theme-card-preview {
  background: linear-gradient(145deg, #082f49 0%, #38bdf8 45%, #fb923c 100%);
}

.theme-card[data-theme="midnight"] .theme-card-preview {
  background: linear-gradient(145deg, #0a1628 0%, #1e3a5f 48%, #d4a15a 100%);
}

.theme-card[data-theme="black"] .theme-card-preview {
  background: linear-gradient(145deg, #000000 0%, #171717 52%, #525252 100%);
}

.theme-card[data-theme="white"] .theme-card-preview {
  background: linear-gradient(145deg, #ffffff 0%, #eef2ff 52%, #cbd5e1 100%);
}

@media (max-width: 1200px) {
  .theme-picker-premium {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .theme-picker-premium {
    grid-template-columns: 1fr;
  }
}

.theme-swatch {
  height: 54px;
  border-radius: 14px;
  border: 2px solid transparent;
  cursor: pointer;
}

.theme-swatch.is-active {
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.25);
}

.theme-swatch[data-theme="purple"] {
  background: linear-gradient(135deg, #120820, #4c1d95 55%, #0ea5e9);
}

.theme-swatch[data-theme="green"] {
  background: linear-gradient(135deg, #04140a, #047857 55%, #22c55e);
}

.theme-swatch[data-theme="cyan"] {
  background: linear-gradient(135deg, #041018, #0e7490 55%, #22d3ee);
}

.theme-swatch[data-theme="orange"] {
  background: linear-gradient(135deg, #140a04, #c2410c 55%, #fb923c);
}

.theme-swatch[data-theme="rose"] {
  background: linear-gradient(135deg, #140408, #be123c 55%, #fb7185);
}

.theme-swatch[data-theme="gold"] {
  background: linear-gradient(135deg, #141004, #b45309 55%, #fbbf24);
}

.theme-swatch[data-theme="lava"] {
  background: linear-gradient(135deg, #160810, #c026d3 55%, #ff5e3a);
}

.theme-swatch[data-theme="rgb"] {
  background: linear-gradient(135deg, #090014, #7928ca 55%, #00dfd8);
}

.theme-swatch[data-theme="summer"] {
  background: linear-gradient(135deg, #082f49, #38bdf8 55%, #fb923c);
}

.theme-swatch[data-theme="midnight"] {
  background: linear-gradient(135deg, #0a1628, #1e3a5f 55%, #d4a15a);
}

.theme-swatch[data-theme="black"] {
  background: linear-gradient(135deg, #000000, #171717 55%, #404040);
}

.theme-swatch[data-theme="white"] {
  background: linear-gradient(135deg, #ffffff, #e5e7eb 55%, #cbd5e1);
}

body[data-theme="green"] {
  --accent-primary: #10b981;
  --accent-secondary: #059669;
  --accent-rgb: 16, 185, 129;
  --cyan: #34d399;
  --card-border: rgba(16, 185, 129, 0.15);
  --shadow-glow: 0 0 42px rgba(16, 185, 129, 0.16);
  --body-glow-a: rgba(16, 185, 129, 0.18);
  --body-glow-b: rgba(52, 211, 153, 0.1);
  --bg-primary: #04140a;
  --bg-secondary: #071911;
  --sidebar-bg: linear-gradient(180deg, rgba(4, 20, 10, 0.94), rgba(7, 25, 17, 0.82));
  --sidebar-border: rgba(16, 185, 129, 0.22);
  --sidebar-shadow: 0 24px 70px rgba(4, 20, 10, 0.55);
  --scrollbar-track: rgba(4, 20, 10, 0.88);
  --scrollbar-border: rgba(4, 20, 10, 0.88);
}

body[data-theme="green"] {
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 34%),
    radial-gradient(circle at 85% 12%, rgba(34, 197, 94, 0.12), transparent 28%),
    linear-gradient(180deg, #04140a 0%, #071911 100%);
}

body[data-theme="cyan"] {
  --accent-primary: #06b6d4;
  --accent-secondary: #0891b2;
  --accent-rgb: 6, 182, 212;
  --cyan: #22d3ee;
  --card-border: rgba(6, 182, 212, 0.15);
  --shadow-glow: 0 0 42px rgba(6, 182, 212, 0.16);
  --body-glow-a: rgba(6, 182, 212, 0.18);
  --body-glow-b: rgba(34, 211, 238, 0.1);
  --bg-primary: #041018;
  --bg-secondary: #071822;
  --sidebar-bg: linear-gradient(180deg, rgba(4, 16, 24, 0.94), rgba(7, 24, 34, 0.82));
  --sidebar-border: rgba(6, 182, 212, 0.22);
  --sidebar-shadow: 0 24px 70px rgba(4, 16, 24, 0.55);
  --scrollbar-track: rgba(4, 16, 24, 0.88);
  --scrollbar-border: rgba(4, 16, 24, 0.88);
  background:
    radial-gradient(circle at top left, rgba(6, 182, 212, 0.18), transparent 34%),
    radial-gradient(circle at 85% 12%, rgba(34, 211, 238, 0.12), transparent 28%),
    linear-gradient(180deg, #041018 0%, #071822 100%);
}

body[data-theme="orange"] {
  --accent-primary: #f97316;
  --accent-secondary: #ea580c;
  --accent-rgb: 249, 115, 22;
  --cyan: #fdba74;
  --card-border: rgba(249, 115, 22, 0.15);
  --shadow-glow: 0 0 42px rgba(249, 115, 22, 0.16);
  --body-glow-a: rgba(249, 115, 22, 0.18);
  --body-glow-b: rgba(251, 146, 60, 0.1);
  --bg-primary: #140a04;
  --bg-secondary: #1c1008;
  --sidebar-bg: linear-gradient(180deg, rgba(20, 10, 4, 0.94), rgba(28, 16, 8, 0.82));
  --sidebar-border: rgba(249, 115, 22, 0.22);
  --sidebar-shadow: 0 24px 70px rgba(20, 10, 4, 0.55);
  --scrollbar-track: rgba(20, 10, 4, 0.88);
  --scrollbar-border: rgba(20, 10, 4, 0.88);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 34%),
    radial-gradient(circle at 85% 12%, rgba(251, 146, 60, 0.12), transparent 28%),
    linear-gradient(180deg, #140a04 0%, #1c1008 100%);
}

body[data-theme="rose"] {
  --accent-primary: #f43f5e;
  --accent-secondary: #e11d48;
  --accent-rgb: 244, 63, 94;
  --cyan: #fb7185;
  --card-border: rgba(244, 63, 94, 0.15);
  --shadow-glow: 0 0 42px rgba(244, 63, 94, 0.16);
  --body-glow-a: rgba(244, 63, 94, 0.18);
  --body-glow-b: rgba(251, 113, 133, 0.1);
  --bg-primary: #140408;
  --bg-secondary: #1c0810;
  --sidebar-bg: linear-gradient(180deg, rgba(20, 4, 8, 0.94), rgba(28, 8, 16, 0.82));
  --sidebar-border: rgba(244, 63, 94, 0.22);
  --sidebar-shadow: 0 24px 70px rgba(20, 4, 8, 0.55);
  --scrollbar-track: rgba(20, 4, 8, 0.88);
  --scrollbar-border: rgba(20, 4, 8, 0.88);
  background:
    radial-gradient(circle at top left, rgba(244, 63, 94, 0.18), transparent 34%),
    radial-gradient(circle at 85% 12%, rgba(251, 113, 133, 0.12), transparent 28%),
    linear-gradient(180deg, #140408 0%, #1c0810 100%);
}

body[data-theme="gold"] {
  --accent-primary: #f59e0b;
  --accent-secondary: #d97706;
  --accent-rgb: 245, 158, 11;
  --cyan: #fbbf24;
  --card-border: rgba(245, 158, 11, 0.15);
  --shadow-glow: 0 0 42px rgba(245, 158, 11, 0.16);
  --body-glow-a: rgba(245, 158, 11, 0.18);
  --body-glow-b: rgba(251, 191, 36, 0.1);
  --bg-primary: #141004;
  --bg-secondary: #1c1408;
  --sidebar-bg: linear-gradient(180deg, rgba(20, 16, 4, 0.94), rgba(28, 20, 8, 0.82));
  --sidebar-border: rgba(245, 158, 11, 0.22);
  --sidebar-shadow: 0 24px 70px rgba(20, 16, 4, 0.55);
  --scrollbar-track: rgba(20, 16, 4, 0.88);
  --scrollbar-border: rgba(20, 16, 4, 0.88);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 34%),
    radial-gradient(circle at 85% 12%, rgba(251, 191, 36, 0.12), transparent 28%),
    linear-gradient(180deg, #141004 0%, #1c1408 100%);
}

body[data-theme="lava"] {
  --accent-primary: #ff5e3a;
  --accent-secondary: #c026d3;
  --accent-rgb: 255, 94, 58;
  --cyan: #ffb347;
  --card-border: rgba(255, 94, 58, 0.22);
  --shadow-glow: 0 0 52px rgba(255, 94, 58, 0.32);
  --body-glow-a: rgba(255, 94, 58, 0.38);
  --body-glow-b: rgba(192, 38, 211, 0.26);
  --bg-primary: #160810;
  --bg-secondary: #220818;
  --sidebar-bg: linear-gradient(180deg, rgba(22, 8, 16, 0.95), rgba(34, 8, 24, 0.84));
  --sidebar-border: rgba(255, 94, 58, 0.24);
  --sidebar-shadow: 0 24px 70px rgba(22, 8, 16, 0.58);
  --scrollbar-track: rgba(22, 8, 16, 0.9);
  --scrollbar-border: rgba(22, 8, 16, 0.9);
  --scrollbar-thumb: linear-gradient(180deg, #ff5e3a, #c026d3 55%, #ffb347);
  --scrollbar-thumb-hover: linear-gradient(180deg, #ffb347, #ff5e3a);
  background:
    radial-gradient(circle at 18% 72%, rgba(255, 94, 58, 0.34), transparent 38%),
    radial-gradient(circle at 82% 24%, rgba(192, 38, 211, 0.28), transparent 34%),
    radial-gradient(circle at 52% 52%, rgba(255, 179, 71, 0.2), transparent 40%),
    linear-gradient(180deg, #160810 0%, #220818 100%);
}

body[data-theme="lava"]::before {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 46% 38% at 22% 68%, rgba(255, 94, 58, 0.52), transparent 68%),
    radial-gradient(ellipse 40% 34% at 78% 28%, rgba(192, 38, 211, 0.44), transparent 66%),
    radial-gradient(ellipse 34% 40% at 54% 48%, rgba(255, 179, 71, 0.32), transparent 70%);
  filter: blur(18px) saturate(145%);
  animation: lava-drift 9s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

body[data-theme="lava"]::after {
  content: "";
  position: fixed;
  inset: -14%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 40% 34% at 68% 68%, rgba(255, 94, 58, 0.46), transparent 70%),
    radial-gradient(ellipse 36% 32% at 28% 28%, rgba(192, 38, 211, 0.4), transparent 68%),
    radial-gradient(ellipse 30% 36% at 48% 58%, rgba(255, 179, 71, 0.3), transparent 72%);
  filter: blur(56px) saturate(160%);
  mix-blend-mode: screen;
  animation: lava-drift-b 12s ease-in-out infinite alternate-reverse;
  will-change: transform, opacity;
}

@keyframes lava-drift {
  0% {
    transform: scale(1) translate(-3%, 2%) rotate(0deg);
    opacity: 0.72;
  }
  50% {
    transform: scale(1.12) translate(2%, -3%) rotate(2deg);
    opacity: 1;
  }
  100% {
    transform: scale(1.18) translate(4%, -5%) rotate(-2deg);
    opacity: 0.88;
  }
}

@keyframes lava-drift-b {
  0% {
    transform: translate(3%, -2%) scale(0.96) rotate(0deg);
    opacity: 0.62;
  }
  50% {
    transform: translate(-4%, 3%) scale(1.14) rotate(-3deg);
    opacity: 0.96;
  }
  100% {
    transform: translate(-6%, 5%) scale(1.2) rotate(2deg);
    opacity: 0.78;
  }
}

body[data-theme="rgb"] {
  --accent-primary: #ff0080;
  --accent-secondary: #00dfd8;
  --accent-rgb: 255, 0, 128;
  --cyan: #00ff88;
  --card-border: rgba(255, 0, 128, 0.18);
  --shadow-glow: 0 0 42px rgba(255, 0, 128, 0.18);
  --body-glow-a: rgba(255, 0, 128, 0.16);
  --body-glow-b: rgba(0, 223, 216, 0.12);
  --bg-primary: #090014;
  --bg-secondary: #120022;
  --sidebar-bg: linear-gradient(180deg, rgba(9, 0, 20, 0.95), rgba(18, 0, 34, 0.84));
  --sidebar-border: rgba(255, 0, 128, 0.22);
  --sidebar-shadow: 0 24px 70px rgba(9, 0, 20, 0.58);
  --scrollbar-track: rgba(9, 0, 20, 0.92);
  --scrollbar-border: rgba(9, 0, 20, 0.92);
  --scrollbar-thumb: linear-gradient(180deg, #ff0080, #7928ca, #00dfd8, #00ff88);
  --scrollbar-thumb-hover: linear-gradient(180deg, #00ff88, #00dfd8, #7928ca, #ff0080);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 0, 128, 0.14), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(0, 223, 216, 0.12), transparent 26%),
    linear-gradient(180deg, #090014 0%, #120022 100%);
}

body[data-theme="rgb"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.34;
  mix-blend-mode: screen;
  background: linear-gradient(120deg, #ff0080, #7928ca, #00dfd8, #00ff88, #ff4d4d, #ff0080);
  background-size: 400% 400%;
  animation: rgb-bg-shift 14s ease infinite;
  will-change: background-position, opacity;
}

body[data-theme="rgb"]::after {
  content: "";
  position: fixed;
  inset: -6%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 0, 128, 0.16), transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(0, 223, 216, 0.14), transparent 52%);
  animation: rgb-glow-pulse 11s ease-in-out infinite alternate;
  will-change: transform, opacity;
}

@keyframes rgb-glow-pulse {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.45;
  }
  100% {
    transform: translate(-1.5%, 1%) scale(1.04);
    opacity: 0.82;
  }
}

@keyframes rgb-bg-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

body[data-theme="rgb"] *::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff0080, #7928ca, #00dfd8, #00ff88, #ff4d4d);
  background-size: 100% 300%;
  animation: rgb-scrollbar 2.8s linear infinite;
}

body[data-theme="rgb"] *::-webkit-scrollbar-thumb:hover {
  animation-duration: 1.6s;
}

@keyframes rgb-scrollbar {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 300%;
  }
}

body[data-theme="summer"] {
  --accent-primary: #38bdf8;
  --accent-secondary: #fb923c;
  --accent-rgb: 56, 189, 248;
  --cyan: #fbbf24;
  --card-border: rgba(56, 189, 248, 0.18);
  --shadow-glow: 0 0 42px rgba(56, 189, 248, 0.18);
  --body-glow-a: rgba(56, 189, 248, 0.2);
  --body-glow-b: rgba(251, 146, 60, 0.14);
  --bg-primary: #082f49;
  --bg-secondary: #0c4a6e;
  --sidebar-bg: linear-gradient(180deg, rgba(8, 47, 73, 0.94), rgba(12, 74, 110, 0.84));
  --sidebar-border: rgba(56, 189, 248, 0.24);
  --sidebar-shadow: 0 24px 70px rgba(8, 47, 73, 0.55);
  --scrollbar-track: rgba(8, 47, 73, 0.9);
  --scrollbar-border: rgba(8, 47, 73, 0.9);
  --scrollbar-thumb: linear-gradient(180deg, #38bdf8, #fbbf24 52%, #fb923c);
  --scrollbar-thumb-hover: linear-gradient(180deg, #7dd3fc, #fde047, #fdba74);
  background:
    radial-gradient(circle at 14% 18%, rgba(56, 189, 248, 0.24), transparent 32%),
    radial-gradient(circle at 86% 12%, rgba(251, 191, 36, 0.16), transparent 28%),
    radial-gradient(circle at 72% 78%, rgba(251, 146, 60, 0.14), transparent 30%),
    linear-gradient(180deg, #082f49 0%, #0c4a6e 55%, #075985 100%);
}

body[data-theme="midnight"] {
  --accent-primary: #d4a15a;
  --accent-secondary: #b8863d;
  --accent-rgb: 212, 161, 90;
  --cyan: #60a5fa;
  --card-border: rgba(212, 161, 90, 0.16);
  --shadow-glow: 0 0 42px rgba(212, 161, 90, 0.14);
  --body-glow-a: rgba(212, 161, 90, 0.12);
  --body-glow-b: rgba(96, 165, 250, 0.1);
  --bg-primary: #0a1628;
  --bg-secondary: #0f2140;
  --sidebar-bg: linear-gradient(180deg, rgba(10, 22, 40, 0.96), rgba(15, 33, 64, 0.88));
  --sidebar-border: rgba(212, 161, 90, 0.2);
  --sidebar-shadow: 0 24px 70px rgba(10, 22, 40, 0.58);
  --scrollbar-track: rgba(10, 22, 40, 0.92);
  --scrollbar-border: rgba(10, 22, 40, 0.92);
  --scrollbar-thumb: linear-gradient(180deg, #d4a15a, #b8863d);
  --scrollbar-thumb-hover: linear-gradient(180deg, #e8b86a, #d4a15a);
  background:
    radial-gradient(circle at 18% 16%, rgba(212, 161, 90, 0.1), transparent 30%),
    radial-gradient(circle at 82% 10%, rgba(96, 165, 250, 0.1), transparent 28%),
    linear-gradient(180deg, #0a1628 0%, #0f2140 100%);
}

html[data-theme="black"],
body[data-theme="black"] {
  --accent-primary: #a3a3a3;
  --accent-secondary: #737373;
  --accent-rgb: 163, 163, 163;
  --cyan: #d4d4d4;
  --text-primary: #f5f5f5;
  --text-secondary: #a3a3a3;
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.08);
  --inset-card-bg: rgba(255, 255, 255, 0.04);
  --inset-card-border: rgba(255, 255, 255, 0.12);
  --shadow-glow: 0 0 42px rgba(255, 255, 255, 0.06);
  --body-glow-a: rgba(255, 255, 255, 0.05);
  --body-glow-b: rgba(255, 255, 255, 0.03);
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --sidebar-bg: linear-gradient(180deg, rgba(10, 10, 10, 0.96), rgba(0, 0, 0, 0.88));
  --sidebar-border: rgba(255, 255, 255, 0.1);
  --sidebar-shadow: 0 24px 70px rgba(0, 0, 0, 0.62);
  --scrollbar-track: rgba(10, 10, 10, 0.92);
  --scrollbar-border: rgba(10, 10, 10, 0.92);
  --scrollbar-thumb: linear-gradient(180deg, #d4d4d4, #737373);
  --scrollbar-thumb-hover: linear-gradient(180deg, #fafafa, #a3a3a3);
}

body[data-theme="black"] {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 34%),
    linear-gradient(180deg, #000000 0%, #111111 100%);
}

body[data-theme="black"] .support-wallet-card,
body[data-theme="black"] .support-qr-card,
body[data-theme="black"] .support-faq-item {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="black"] .support-wallet-value,
body[data-theme="black"] .support-faq-item summary {
  color: var(--text-primary);
}

body[data-theme="black"] .support-faq-item p,
body[data-theme="black"] .support-copy-status {
  color: var(--text-secondary);
}

body[data-theme="black"] .ghost-button {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
}

html[data-theme="white"],
body[data-theme="white"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --accent-primary: #6366f1;
  --accent-secondary: #4338ca;
  --accent-rgb: 99, 102, 241;
  --cyan: #0ea5e9;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-soft: #475569;
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-border: rgba(15, 23, 42, 0.08);
  --sidebar-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 242, 255, 0.96));
  --sidebar-border: rgba(99, 102, 241, 0.16);
  --sidebar-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
  --scrollbar-track: rgba(226, 232, 240, 0.95);
  --scrollbar-border: rgba(226, 232, 240, 0.95);
  --scrollbar-thumb: linear-gradient(180deg, #6366f1, #818cf8);
  --scrollbar-thumb-hover: linear-gradient(180deg, #818cf8, #a5b4fc);
  --select-menu-bg: rgba(255, 255, 255, 0.98);
  --select-menu-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
  --select-option-active-bg: rgba(99, 102, 241, 0.12);
  --select-option-active-color: #0f172a;
  --settings-row-border: rgba(15, 23, 42, 0.08);
  --section-hide-border: rgba(15, 23, 42, 0.18);
  --section-hide-color: rgba(15, 23, 42, 0.5);
  --section-hide-bg: #ffffff;
  --toggle-track-bg: rgba(15, 23, 42, 0.08);
  --toggle-track-border: rgba(15, 23, 42, 0.2);
  --toggle-thumb: rgba(15, 23, 42, 0.28);
  --inset-card-bg: rgba(248, 250, 252, 0.98);
  --inset-card-border: rgba(15, 23, 42, 0.14);
  --tab-switcher-bg: rgba(241, 245, 249, 0.98);
  --tab-switcher-border: rgba(15, 23, 42, 0.12);
  --tab-inactive-color: #64748b;
  color-scheme: light;
}

body[data-theme="white"] {
  background: linear-gradient(180deg, #ffffff 0%, #eef2ff 100%);
  color: var(--text-primary);
}

body[data-theme="white"] .sidebar,
body[data-theme="white"] .card,
body[data-theme="white"] .discipline-card {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-primary);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.06);
}

body[data-theme="white"] .sidebar-nav button {
  color: var(--text-secondary);
}

body[data-theme="white"] .sidebar-nav button span:first-child,
body[data-theme="white"] .kicker,
body[data-theme="white"] .subtitle,
body[data-theme="white"] h1,
body[data-theme="white"] h2,
body[data-theme="white"] h3,
body[data-theme="white"] .top-profile-main strong,
body[data-theme="white"] .top-profile-main span,
body[data-theme="white"] .checkout-amount,
body[data-theme="white"] .sync-status-card strong,
body[data-theme="white"] .sync-status-card small {
  color: var(--text-primary);
}

body[data-theme="white"] .subtitle,
body[data-theme="white"] .sync-status-card small,
body[data-theme="white"] .top-profile-main span:not(strong) {
  color: var(--text-secondary);
}

body[data-theme="white"] .ghost-button,
body[data-theme="white"] .primary-button {
  color: var(--text-primary);
}

body[data-theme="white"] .ghost-button {
  background: rgba(248, 250, 252, 0.98);
  border-color: rgba(15, 23, 42, 0.14);
}

body[data-theme="white"] .tab-switcher {
  background: var(--tab-switcher-bg);
  border-color: var(--tab-switcher-border);
}

body[data-theme="white"] .tab-switcher .tab-button:not(.is-active) {
  color: var(--tab-inactive-color);
}

body[data-theme="white"] .tab-switcher .tab-button.is-active {
  color: #fff;
}

body[data-theme="white"] .support-wallet-card,
body[data-theme="white"] .support-qr-card,
body[data-theme="white"] .support-faq-item {
  background: var(--inset-card-bg);
  border-color: var(--inset-card-border);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

/* White theme ? readable AI, news, insights */
body[data-theme="white"] .ai-insight-card {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.06);
}

body[data-theme="white"] .ai-insight-card .motivation-text,
body[data-theme="white"] .ai-insight-item p {
  color: var(--text-primary);
}

body[data-theme="white"] .insight-grid span {
  background: rgba(var(--accent-rgb), 0.06);
  border: 1px solid rgba(var(--accent-rgb), 0.1);
}

body[data-theme="white"] .insight-grid strong {
  color: var(--text-primary);
}

body[data-theme="white"] .ai-narration-card {
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), rgba(var(--accent-rgb), 0.04));
  border-color: rgba(var(--accent-rgb), 0.16);
}

body[data-theme="white"] .ai-narration-card p {
  color: var(--text-primary);
}

body[data-theme="white"] .emotional-mode-pill {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.14);
  color: var(--text-secondary);
}

body[data-theme="white"] .emotional-meter {
  background: rgba(248, 250, 252, 0.98);
  border-color: rgba(15, 23, 42, 0.08);
}

body[data-theme="white"] .emotional-meter-head,
body[data-theme="white"] .emotional-meter-head strong {
  color: var(--text-primary);
}

body[data-theme="white"] .emotional-meter-track {
  background: rgba(15, 23, 42, 0.08);
}

body[data-theme="lava"] .behavior-heatmap-card {
  background: rgba(22, 8, 16, 0.72);
  border-color: rgba(var(--accent-rgb), 0.22);
}

body[data-theme="lava"] .behavior-heatmap-table th,
body[data-theme="lava"] .behavior-heatmap-table td {
  color: var(--text-primary);
  border-bottom-color: rgba(var(--accent-rgb), 0.12);
}

body[data-theme="lava"] .heatmap-status-hot {
  background: rgba(var(--accent-rgb), 0.22);
  color: #ffe8dc;
  border-color: rgba(var(--accent-rgb), 0.42);
}

body[data-theme="lava"] .heatmap-status-ok {
  background: rgba(255, 179, 71, 0.18);
  color: #ffe8b0;
  border-color: rgba(255, 179, 71, 0.32);
}

body[data-theme="lava"] .heatmap-status-weak {
  background: rgba(192, 38, 211, 0.16);
  color: #f3d4ff;
  border-color: rgba(192, 38, 211, 0.28);
}

body[data-theme="lava"] .help-tip-bubble {
  background: rgba(22, 8, 16, 0.92);
  border-color: rgba(var(--accent-rgb), 0.28);
  color: #ffe8dc;
}

body[data-theme="lava"] .help-tip-bubble::before {
  background: rgba(22, 8, 16, 0.92);
  border-color: rgba(var(--accent-rgb), 0.28);
}

body[data-theme="white"] .ai-heartbeat-panel,
body[data-theme="white"] .behavior-heatmap-card {
  background: rgba(248, 250, 252, 0.95);
  border-color: rgba(15, 23, 42, 0.08);
}

body[data-theme="white"] .behavior-heatmap-table th,
body[data-theme="white"] .behavior-heatmap-table td {
  color: var(--text-primary);
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

body[data-theme="white"] .ai-assistant-messages {
  background: rgba(248, 250, 252, 0.98);
  border-color: rgba(15, 23, 42, 0.1);
}

body[data-theme="white"] .ai-assistant-msg {
  color: var(--text-primary);
}

body[data-theme="white"] .ai-assistant-msg.is-assistant {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
}

body[data-theme="white"] .ai-assistant-msg.is-user {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.22);
}

body[data-theme="white"] .ai-assistant-form textarea {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.14);
  color: var(--text-primary);
}

body[data-theme="white"] .ai-assistant-form textarea::placeholder {
  color: #64748b;
  opacity: 1;
}

body[data-theme="white"] .news-item {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(15, 23, 42, 0.1);
  color: var(--text-primary);
}

body[data-theme="white"] .news-item.impact-high {
  background: rgba(254, 226, 226, 0.75);
  border-color: rgba(239, 68, 68, 0.28);
}

body[data-theme="white"] .news-item.impact-medium {
  background: rgba(255, 237, 213, 0.8);
  border-color: rgba(249, 115, 22, 0.28);
}

body[data-theme="white"] .news-item.impact-low {
  background: rgba(254, 249, 195, 0.72);
  border-color: rgba(234, 179, 8, 0.24);
}

body[data-theme="white"] .news-item.impact-holiday {
  background: rgba(241, 245, 249, 0.95);
  border-color: rgba(100, 116, 139, 0.22);
}

body[data-theme="white"] .news-day,
body[data-theme="white"] .news-meaning {
  color: var(--text-secondary);
}

body[data-theme="white"] .news-currency {
  color: var(--text-primary);
}

body[data-theme="white"] .news-active {
  background: rgba(248, 250, 252, 0.95);
  border-color: rgba(15, 23, 42, 0.08);
}

body[data-theme="white"] .news-block-label {
  color: var(--text-secondary);
}

body[data-theme="white"] a,
body[data-theme="white"] .news-link {
  color: color-mix(in srgb, var(--accent-primary) 68%, #0f172a);
}

body[data-theme="white"] .news-link {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body[data-theme="white"] .news-link:hover {
  color: #0f172a;
  border: 0;
  background: transparent;
}

body[data-theme="white"] .news-link-icon {
  display: none;
}

html[data-theme="white"] select,
html[data-theme="white"] option,
body[data-theme="white"] select,
body[data-theme="white"] option {
  color-scheme: light;
}

body[data-theme="white"] .settings-section-row,
body[data-theme="white"] .settings-section-row span,
body[data-theme="white"] .settings-toggle-row,
body[data-theme="white"] .settings-toggle-row span {
  color: var(--text-primary);
}

body[data-theme="white"] .section-hide-x.is-active {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.35);
  color: var(--accent-primary);
}

body[data-theme="white"] .ui-select-menu {
  background-color: var(--select-menu-bg);
  border-color: rgba(15, 23, 42, 0.12);
}

body[data-theme="white"] .ui-select-option {
  color: var(--text-primary);
}

body[data-theme="white"] .plan-popular-badge {
  color: #0369a1;
  background: rgba(14, 165, 233, 0.14);
  border-color: rgba(14, 165, 233, 0.28);
}

body[data-theme="white"] .link-button,
body[data-theme="white"] .tv-opinion-open {
  color: #4338ca;
}

body[data-theme="white"] .footer-telegram {
  color: #64748b;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body[data-theme="white"] .footer-telegram:hover {
  color: #0f172a;
  border: 0;
  background: transparent;
}

body[data-theme="white"] .footer-telegram-label,
body[data-theme="white"] .footer-telegram-icon {
  display: none;
}

body.theme-transition,
body.theme-transition * {
  transition:
    background 0.68s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.68s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.68s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.68s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

body.theme-transition *::-webkit-scrollbar-thumb {
  transition: background 0.45s ease, border-color 0.45s ease !important;
}

.ui-morph-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
}

.ui-morph-overlay.hidden {
  display: none !important;
}

.theme-morph-overlay {
  clip-path: circle(120% at var(--morph-x, 50%) var(--morph-y, 50%));
  opacity: 1;
  transition:
    clip-path 0.78s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.34s ease 0.44s;
}

.theme-morph-overlay.is-active {
  clip-path: circle(0% at var(--morph-x, 50%) var(--morph-y, 50%));
  opacity: 0;
}

.language-morph-overlay {
  display: grid;
  place-items: center;
  background: rgba(4, 6, 18, 0.5);
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.language-morph-overlay:not(.hidden) {
  opacity: 1;
}

.language-morph-overlay.is-active {
  opacity: 0;
  transition: opacity 0.36s ease;
}

.language-morph-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 16px 24px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.38);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.14), transparent 48%),
    rgba(var(--accent-rgb), 0.16);
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.28),
    0 0 32px rgba(var(--accent-rgb), 0.18);
  transform: scale(0.76) translateY(10px);
  opacity: 0;
  transition:
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.32s ease;
}

.language-morph-overlay:not(.hidden):not(.is-active) .language-morph-badge {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.language-morph-overlay.is-active .language-morph-badge {
  transform: scale(1.12) translateY(-8px);
  opacity: 0;
}

body.language-transition .main-content,
body.language-transition .sidebar {
  filter: blur(5px);
  opacity: 0.58;
  transform: scale(0.993);
  transition:
    filter 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

body.language-transition .main-content.language-transition-active,
body.language-transition .sidebar.language-transition-active {
  filter: blur(0);
  opacity: 1;
  transform: scale(1);
}

.theme-card.is-switching {
  animation: theme-card-switch 0.64s cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-card.is-switching .theme-card-preview {
  animation: theme-preview-pulse 0.64s cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-card.is-switching .theme-card-check {
  animation: theme-check-pop 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes theme-card-switch {
  0% { transform: scale(1); }
  35% { transform: scale(0.97); }
  100% { transform: scale(1); }
}

@keyframes theme-preview-pulse {
  0% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 20px rgba(0, 0, 0, 0.22); }
  45% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 0 28px rgba(var(--accent-rgb), 0.42); }
  100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 20px rgba(0, 0, 0, 0.22); }
}

@keyframes theme-check-pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.welcome-lang-card.is-switching {
  animation: welcome-lang-switch 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes welcome-lang-switch {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-3px) scale(1.03); }
  100% { transform: translateY(-1px) scale(1); }
}

.language-control-switching .ui-select-trigger,
.language-control-switching select {
  animation: language-control-pulse 0.56s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes language-control-pulse {
  0% { box-shadow: none; }
  45% { box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18), 0 10px 24px rgba(var(--accent-rgb), 0.12); }
  100% { box-shadow: none; }
}

body[data-theme="white"] .language-morph-overlay {
  background: rgba(248, 250, 252, 0.78);
}

@media (prefers-reduced-motion: reduce) {
  .theme-morph-overlay,
  .language-morph-overlay,
  .theme-card.is-switching,
  .welcome-lang-card.is-switching,
  .language-control-switching .ui-select-trigger,
  .language-control-switching select {
    animation: none !important;
    transition: none !important;
  }
}

/* Final modal treatment: intentionally plain, compact and product-like. */
.trade-entry-modal {
  padding: 20px;
  background: rgba(3, 5, 10, 0.76);
  backdrop-filter: blur(8px);
  transition: opacity 0.2s ease;
}

.trade-entry-modal-card {
  width: min(760px, 100%);
  max-height: min(780px, calc(100dvh - 40px));
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 20px;
  background: #101218;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.46);
  transform: translateY(10px) scale(0.99);
  transition: opacity 0.2s ease, transform 0.22s ease;
}

.trade-entry-modal-head {
  align-items: center;
  padding: 20px 22px 16px;
  border-bottom: 0;
}

.trade-entry-modal-head .kicker {
  font-size: 9px;
  letter-spacing: 0.14em;
}

.trade-entry-modal-head h2 {
  margin-top: 4px;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.trade-entry-modal-close {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 22px;
}

.trade-entry-modal-close:hover {
  transform: none;
}

.trade-wizard-progress {
  gap: 10px;
  padding: 0 22px 16px;
}

.trade-wizard-progress-step {
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.trade-wizard-progress-step::after {
  display: none;
}

.trade-wizard-progress-step span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-secondary);
  font-size: 9px;
}

.trade-wizard-progress-step strong {
  font-size: 11px;
  font-weight: 600;
}

.trade-wizard-progress-step.is-active,
.trade-wizard-progress-step.is-complete {
  border-color: transparent;
  background: rgba(var(--accent-rgb), 0.065);
}

.trade-wizard-progress-step.is-active span,
.trade-wizard-progress-step.is-complete span {
  border-color: rgba(var(--accent-rgb), 0.48);
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--text-primary);
}

body[data-theme="white"] .trade-entry-modal-card {
  border-color: rgba(15, 23, 42, 0.12);
  background: #ffffff;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.22);
}

@media (max-width: 640px) {
  .trade-entry-modal {
    padding: 0;
  }

  .trade-entry-modal-card {
    max-height: 96dvh;
    border-radius: 18px 18px 0 0;
  }

  .trade-entry-modal-head {
    padding: 16px 16px 12px;
  }

  .trade-wizard-progress {
    padding: 0 16px 12px;
  }

  .trade-wizard-progress-step {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 4px;
  }
}

/* ============================================================
   SENTRAGE Mobile UX v5 ? compact content + swipe navigation
   ============================================================ */
@media (max-width: 900px) {
  :root {
    --mobile-dock-bg: rgba(9, 8, 22, 0.58);
    --mobile-dock-stroke: rgba(167, 139, 250, 0.3);
    --mobile-card-stroke: rgba(var(--accent-rgb), 0.18);
  }

  body,
  body.platform-android,
  body.platform-ios,
  body.vertical-layout,
  body.vertical-layout-stacked {
    background:
      radial-gradient(circle at 12% -6%, rgba(var(--accent-rgb), 0.2), transparent 30%),
      radial-gradient(circle at 100% 16%, rgba(34, 211, 238, 0.07), transparent 24%),
      #080713 !important;
  }

  .app,
  body.vertical-layout .app,
  body.vertical-layout-stacked .app {
    padding: 10px 10px calc(104px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .main-content {
    gap: 10px !important;
  }

  .main-content > .page.is-active {
    animation: mobile-page-rise 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  }

  /* Compact account card: account actions remain reachable without dominating the screen. */
  .top-profile-bar,
  .top-profile-bar.card,
  body.vertical-layout .top-profile-bar,
  body.vertical-layout-stacked .top-profile-bar {
    grid-template-areas:
      "identity plan"
      "controls controls";
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 9px 10px !important;
    min-height: 0 !important;
    padding: 10px !important;
    border: 1px solid var(--mobile-card-stroke) !important;
    border-radius: 20px !important;
    background:
      radial-gradient(circle at 0 0, rgba(var(--accent-rgb), 0.13), transparent 46%),
      linear-gradient(145deg, rgba(17, 14, 34, 0.96), rgba(10, 11, 24, 0.93)) !important;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24) !important;
    backdrop-filter: blur(16px) !important;
  }

  .top-profile-identity {
    grid-area: identity;
    gap: 9px !important;
  }

  .top-profile-orb {
    width: 38px !important;
    height: 38px !important;
    border-radius: 13px !important;
    font-size: 14px !important;
  }

  .top-profile-main {
    gap: 1px !important;
  }

  .top-profile-main strong {
    font-size: 13px !important;
  }

  .top-profile-main > span {
    max-width: 210px;
    font-size: 10px !important;
  }

  .top-profile-stats {
    gap: 8px !important;
    font-size: 9px !important;
  }

  .top-profile-plan {
    grid-area: plan;
    align-self: start !important;
    padding: 0 !important;
    border: 0 !important;
  }

  .plan-badge {
    min-height: 27px;
    padding: 5px 8px !important;
    border-radius: 999px !important;
    font-size: 9px !important;
  }

  .top-profile-controls {
    grid-area: controls;
    display: grid !important;
    gap: 0 !important;
    min-width: 0;
    width: 100%;
  }

  .top-profile-controls .account-profile-switcher {
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .top-profile-controls .account-profile-switcher label {
    gap: 0;
  }

  .top-profile-controls .account-profile-switcher label > span:first-child,
  .top-profile-controls .account-profile-summary {
    display: none !important;
  }

  .top-profile-controls .account-profile-switcher .ghost-select,
  .top-profile-controls .account-profile-switcher .ui-select-trigger,
  .top-profile-controls .account-profile-switcher .ghost-button {
    min-height: 38px !important;
    border-radius: 12px !important;
  }

  .top-profile-controls .account-profile-switcher .ghost-button {
    width: auto !important;
    padding: 7px 10px !important;
    font-size: 11px !important;
  }

  /* Dashboard keeps the expressive title, but restores useful vertical rhythm. */
  .hero-card,
  .hero-card.card {
    min-height: 0 !important;
    padding: 16px 14px !important;
    border: 1px solid var(--mobile-card-stroke) !important;
    border-radius: 22px !important;
    background:
      linear-gradient(145deg, rgba(18, 14, 36, 0.96), rgba(10, 12, 26, 0.93)) !important;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.26) !important;
  }

  .hero-copy {
    gap: 9px !important;
  }

  .hero-copy > .kicker {
    font-size: 9px !important;
    letter-spacing: 0.16em !important;
  }

  .hero-copy h1 {
    display: block !important;
    max-width: 14ch;
    margin: 2px 0 0 !important;
    font-size: clamp(27px, 7.4vw, 34px) !important;
    line-height: 1.01 !important;
    letter-spacing: -0.052em !important;
    text-wrap: balance;
  }

  .hero-meta {
    min-height: 22px !important;
  }

  .hero-meta .greeting {
    font-size: 15px !important;
  }

  .hero-meta .date-time {
    display: none !important;
  }

  .hero-live-metrics {
    gap: 7px !important;
  }

  .hero-live-metrics span {
    min-height: 61px !important;
    padding: 9px 10px !important;
    border-radius: 14px !important;
  }

  .hero-live-metrics strong {
    font-size: clamp(17px, 4.7vw, 20px) !important;
  }

  .ai-insight-card {
    gap: 7px !important;
    padding: 12px !important;
    border: 1px solid rgba(var(--accent-rgb), 0.22) !important;
    border-radius: 16px !important;
    background:
      linear-gradient(135deg, rgba(var(--accent-rgb), 0.11), rgba(10, 12, 26, 0.76)) !important;
    box-shadow: none !important;
  }

  .ai-insight-card .motivation-text {
    font-size: 12px !important;
    line-height: 1.42 !important;
  }

  .insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .insight-grid span {
    min-width: 0;
    padding: 8px 9px !important;
    border-radius: 11px !important;
  }

  .dashboard-grid .left-stack > .ai-profile-card,
  .dashboard-grid .left-stack > .ai-profile-card + .card,
  .key-metrics-charts-grid {
    display: none !important;
  }

  /* AI and Journal sub-sections use the same rounded swipe affordance. */
  .ai-workspace-tabs {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(112px, max-content) !important;
    grid-template-columns: none !important;
    gap: 5px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 5px !important;
    border-radius: 18px !important;
    scroll-padding-inline: 5px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .ai-workspace-tabs::-webkit-scrollbar,
  .journal-hub-tabs::-webkit-scrollbar,
  .journal-filter-chips::-webkit-scrollbar {
    display: none;
  }

  .ai-workspace-tab {
    width: auto !important;
    min-width: 112px !important;
    min-height: 44px !important;
    padding: 0 12px !important;
    border-radius: 13px !important;
    scroll-snap-align: center;
  }

  .journal-hub-tabs {
    display: flex !important;
    width: 100% !important;
    gap: 5px !important;
    overflow-x: auto !important;
    padding: 5px !important;
    border: 1px solid rgba(var(--accent-rgb), 0.17);
    border-radius: 18px !important;
    background: rgba(9, 8, 22, 0.54);
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .journal-hub-tabs .tab-button {
    flex: 0 0 auto;
    min-width: 108px;
    min-height: 42px !important;
    border-radius: 13px !important;
    scroll-snap-align: center;
  }

  .journal-filter-chips {
    flex-wrap: nowrap !important;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .journal-filter-chips .filter-chip {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  /* Floating one-row dock. Every section is reachable with a horizontal swipe. */
  .sidebar,
  body.vertical-layout .sidebar,
  body.vertical-layout-stacked .sidebar,
  .is-capacitor-app .sidebar,
  .is-android-app .sidebar,
  .is-ios-app .sidebar {
    position: fixed !important;
    inset: auto 10px max(8px, env(safe-area-inset-bottom, 0px)) 10px !important;
    z-index: 1200 !important;
    display: block !important;
    width: auto !important;
    max-width: none !important;
    height: 74px !important;
    min-height: 74px !important;
    max-height: 74px !important;
    padding: 6px !important;
    overflow: hidden;
    border: 1px solid var(--mobile-dock-stroke) !important;
    border-radius: 24px !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.012)),
      radial-gradient(circle at 18% 0%, rgba(var(--accent-rgb), 0.16), transparent 42%),
      var(--mobile-dock-bg) !important;
    box-shadow:
      0 16px 44px rgba(0, 0, 0, 0.34),
      inset 0 1px rgba(255, 255, 255, 0.1),
      inset 0 -1px rgba(255, 255, 255, 0.025) !important;
    backdrop-filter: blur(30px) saturate(1.55) !important;
    -webkit-backdrop-filter: blur(30px) saturate(1.55) !important;
  }

  .sidebar::before,
  .sidebar::after {
    content: "";
    position: absolute;
    z-index: 3;
    top: 7px;
    bottom: 7px;
    width: 17px;
    pointer-events: none;
  }

  .sidebar::before {
    left: 5px;
    background: linear-gradient(90deg, rgba(9, 8, 22, 0.68), transparent);
  }

  .sidebar::after {
    right: 5px;
    background: linear-gradient(-90deg, rgba(9, 8, 22, 0.68), transparent);
  }

  .sidebar-nav,
  body.vertical-layout-stacked .sidebar-nav,
  .sidebar-nav.mobile-scroll-dock {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: 72px !important;
    grid-template-columns: none !important;
    align-items: stretch !important;
    gap: 4px !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 3px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-inline: contain;
    scroll-padding-inline: 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    background: transparent !important;
    border: 0 !important;
    border-radius: 18px !important;
    box-shadow: none !important;
  }

  .sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar-nav button,
  body.vertical-layout-stacked .sidebar-nav button,
  .sidebar-nav button:nth-child(n) {
    position: relative;
    display: grid !important;
    grid-template-columns: 1fr !important;
    place-items: center !important;
    align-content: center !important;
    gap: 3px !important;
    width: 72px !important;
    min-width: 72px !important;
    min-height: 60px !important;
    height: 60px !important;
    margin: 0 !important;
    padding: 5px 3px !important;
    overflow: hidden;
    border: 1px solid transparent !important;
    border-radius: 18px !important;
    color: rgba(231, 228, 247, 0.62) !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 8.5px !important;
    font-weight: 650 !important;
    line-height: 1.05 !important;
    text-align: center !important;
    white-space: normal !important;
    scroll-snap-align: center;
    transform: none !important;
    transition:
      color 0.22s ease,
      border-color 0.22s ease,
      background 0.22s ease,
      transform 0.22s ease !important;
  }

  .sidebar-nav button.nav-item-hidden {
    display: none !important;
  }

  .sidebar-nav button .mobile-nav-icon {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    color: rgba(var(--accent-rgb), 0.9);
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), color 0.22s ease;
  }

  .sidebar-nav button .mobile-nav-icon svg {
    width: 22px !important;
    height: 22px !important;
    stroke-width: 1.65 !important;
  }

  .sidebar-nav button > span:nth-child(2) {
    display: -webkit-box;
    max-width: 66px;
    overflow: hidden;
    font-size: 8.5px !important;
    line-height: 1.05 !important;
    letter-spacing: -0.01em !important;
    text-overflow: ellipsis;
    text-transform: none !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .sidebar-nav button.is-active {
    color: #fff !important;
    border-color: rgba(var(--accent-rgb), 0.32) !important;
    background:
      radial-gradient(circle at 50% 0, rgba(34, 211, 238, 0.12), transparent 55%),
      linear-gradient(145deg, rgba(var(--accent-rgb), 0.23), rgba(var(--accent-rgb), 0.08)) !important;
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.075) !important;
  }

  .sidebar-nav button.is-active .mobile-nav-icon {
    color: #b9a8ff;
    transform: translateY(-1px) scale(1.06);
    filter: drop-shadow(0 0 7px rgba(var(--accent-rgb), 0.42));
  }

  .sidebar-nav button.is-feature-locked[data-locked-plan]::after {
    position: absolute;
    top: 4px;
    right: 5px;
    margin: 0;
    padding: 2px 3px;
    border-radius: 5px;
    background: rgba(9, 8, 22, 0.86);
    font-size: 6px;
    line-height: 1;
  }

  .mobile-nav-drawer,
  .mobile-more-btn {
    display: none !important;
  }

  .web-install-prompt {
    bottom: calc(94px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body[data-theme="white"] .sidebar,
  body[data-theme="white"].vertical-layout .sidebar,
  body[data-theme="white"].vertical-layout-stacked .sidebar {
    --mobile-dock-bg: rgba(248, 250, 255, 0.7);
    --mobile-dock-stroke: rgba(15, 23, 42, 0.14);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18) !important;
  }

  body[data-theme="white"] .sidebar::before {
    background: linear-gradient(90deg, rgba(248, 250, 255, 0.74), transparent);
  }

  body[data-theme="white"] .sidebar::after {
    background: linear-gradient(-90deg, rgba(248, 250, 255, 0.74), transparent);
  }

  body[data-theme="white"] .sidebar-nav button {
    color: rgba(30, 41, 59, 0.62) !important;
  }

  body[data-theme="white"] .sidebar-nav button.is-active {
    color: #1e163d !important;
  }
}

@media (max-width: 360px) {
  .app,
  body.vertical-layout .app,
  body.vertical-layout-stacked .app {
    padding-inline: 8px !important;
  }

  .top-profile-controls .account-profile-switcher {
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    gap: 4px !important;
  }

  .top-profile-controls .account-profile-switcher .ghost-button {
    padding-inline: 7px !important;
    font-size: 10px !important;
  }

  .hero-card,
  .hero-card.card {
    padding-inline: 12px !important;
  }

  .hero-copy h1 {
    font-size: clamp(25px, 8.2vw, 30px) !important;
  }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .main-content > .page.is-active {
    animation: none !important;
  }

  .sidebar-nav {
    scroll-behavior: auto !important;
  }
}

@keyframes mobile-page-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Trade chart viewer v2 ? predictable fit, centered zoom and smooth panning. */
.trade-chart-modal {
  padding: 14px;
}

.trade-chart-modal-backdrop {
  background: rgba(3, 4, 12, 0.84);
  backdrop-filter: blur(14px);
}

.trade-chart-modal-card {
  width: min(1560px, calc(100vw - 28px));
  height: min(94dvh, 920px);
  max-height: min(94dvh, 920px);
  border-radius: 26px;
  background:
    radial-gradient(circle at 10% 0%, rgba(var(--accent-rgb), 0.11), transparent 38%),
    color-mix(in srgb, var(--bg-secondary, #0b1120) 95%, #000);
}

.trade-chart-modal-close {
  top: 16px;
  right: 16px;
  z-index: 8;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(9, 10, 23, 0.82);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.trade-chart-modal-close:hover {
  transform: scale(1.06);
  border-color: rgba(var(--accent-rgb), 0.34);
  background: rgba(var(--accent-rgb), 0.18);
}

.trade-chart-modal-body,
.trade-chart-modal-card.is-tv-opinion .trade-chart-modal-body {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 460px);
  overflow: hidden;
}

.trade-chart-preview {
  padding: 10px;
  background:
    radial-gradient(circle at 50% 42%, rgba(var(--accent-rgb), 0.055), transparent 48%),
    rgba(0, 0, 0, 0.26);
}

.trade-chart-zoom {
  gap: 9px;
}

.trade-chart-zoom-toolbar {
  min-height: 46px;
  padding: 5px 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 15px;
  background: rgba(10, 10, 24, 0.72);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(16px);
}

.trade-chart-zoom-btn {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  font-weight: 720;
}

.trade-chart-zoom-btn[data-action="out"],
.trade-chart-zoom-btn[data-action="in"] {
  width: 36px;
  padding-inline: 0;
  font-size: 18px;
}

.trade-chart-zoom-btn[data-action="reset"] {
  padding-inline: 12px;
  font-size: 11px;
}

.trade-chart-zoom-btn:disabled {
  opacity: 0.34;
  pointer-events: none;
}

.trade-chart-zoom-label {
  min-width: 48px;
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
}

.trade-chart-zoom-hint {
  overflow: hidden;
  color: var(--text-secondary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-chart-zoom-viewport {
  position: relative;
  outline: none;
  overflow: auto;
  border: 1px solid rgba(var(--accent-rgb), 0.13);
  border-radius: 18px;
  background-color: #070811;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 28px 28px;
  scrollbar-color: rgba(var(--accent-rgb), 0.42) transparent;
  scrollbar-width: thin;
}

.trade-chart-zoom-viewport:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.46);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.16);
}

.trade-chart-zoom-viewport::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.trade-chart-zoom-viewport::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.42);
  background-clip: padding-box;
}

.trade-chart-zoom-stage {
  flex: 0 0 auto;
  padding: 12px;
}

.trade-chart-zoom-viewport img {
  flex: 0 0 auto;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.38);
}

.trade-chart-details,
.trade-chart-details.is-tv-opinion {
  min-width: 0;
  padding: 22px 18px 18px;
  overflow-x: hidden;
  border-left: 1px solid rgba(var(--accent-rgb), 0.12);
  background: rgba(7, 8, 18, 0.54);
  scrollbar-width: thin;
}

.trade-chart-details h3 {
  padding-right: 42px;
  font-size: 20px;
}

.trade-chart-details-list {
  gap: 8px;
}

.trade-chart-details-list div {
  gap: 3px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.032);
}

body[data-theme="white"] .trade-chart-zoom-toolbar {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(15, 23, 42, 0.1);
}

body[data-theme="white"] .trade-chart-zoom-viewport {
  background-color: #e9edf6;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
}

body[data-theme="white"] .trade-chart-details {
  background: rgba(248, 250, 252, 0.86);
}

@media (max-width: 900px) {
  .trade-chart-modal {
    padding: 0;
  }

  .trade-chart-modal-card {
    width: 100vw;
    height: var(--app-height, 100dvh);
    max-height: var(--app-height, 100dvh);
    border: 0;
    border-radius: 0;
  }

  .trade-chart-modal-body,
  .trade-chart-modal-card.is-tv-opinion .trade-chart-modal-body {
    display: block;
    max-height: none;
    overflow-y: auto;
  }

  .trade-chart-preview {
    height: min(64dvh, 620px);
    min-height: min(64dvh, 620px);
    padding: max(8px, env(safe-area-inset-top, 0px)) 8px 8px;
  }

  .trade-chart-zoom-toolbar {
    min-height: 44px;
    gap: 5px;
    padding: 4px 5px;
    border-radius: 13px;
  }

  .trade-chart-zoom-btn {
    min-height: 36px !important;
  }

  .trade-chart-zoom-btn[data-action="reset"] {
    flex: 1;
    min-width: 0;
    padding-inline: 8px;
    font-size: 10px;
  }

  .trade-chart-zoom-label {
    min-width: 43px;
    font-size: 10px;
  }

  .trade-chart-zoom-viewport {
    min-height: 0;
    border-radius: 15px;
  }

  .trade-chart-details,
  .trade-chart-details.is-tv-opinion {
    min-height: 36dvh;
    padding: 18px 14px calc(22px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(var(--accent-rgb), 0.12);
    border-left: 0;
  }
}

/* Trading Ideas editor v2 ? structured, calm and task-focused. */
.ideas-workspace {
  grid-template-columns: minmax(230px, 260px) minmax(0, 1fr);
  align-items: start;
}

.workspace-editor-section .ideas-rail {
  position: sticky;
  top: 16px;
  max-height: calc(100dvh - 32px);
  padding: 16px;
  border-radius: 22px;
}

.ideas-list {
  max-height: calc(100dvh - 112px);
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.32) transparent;
}

.workspace-editor-section .ideas-list-item {
  position: relative;
  overflow: hidden;
  padding: 13px 14px;
  border-radius: 15px;
}

.workspace-editor-section .ideas-list-item.is-active::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, var(--accent-primary), var(--cyan));
}

.workspace-editor-section .ideas-canvas {
  min-width: 0;
  padding: clamp(18px, 2.2vw, 28px);
  border-radius: 24px;
}

.workspace-editor-section .ideas-form {
  gap: 14px;
}

.ideas-form-section {
  position: relative;
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.026), transparent 54%),
    rgba(5, 7, 15, 0.34);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.ideas-form-section::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.055);
  filter: blur(14px);
  pointer-events: none;
}

.ideas-form-section-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.1);
}

.ideas-form-section-head::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border: 2px solid rgba(var(--accent-rgb), 0.72);
  border-radius: 4px;
  background: rgba(var(--accent-rgb), 0.14);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.24);
  transform: rotate(45deg);
}

.ideas-form-section-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.ideas-form-section-head h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.ideas-form-section-head p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.4;
}

.workspace-editor-section .ideas-form .ideas-form-top,
.workspace-editor-section .ideas-form .ideas-meta-strip {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.workspace-editor-section .ideas-form .ideas-form-top {
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  align-items: end;
  gap: 14px;
}

.ideas-field {
  position: relative;
  z-index: 1;
  gap: 7px;
  min-width: 0;
}

.ideas-field > span:first-child,
.ideas-links-head > span:first-child {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.ideas-field-title input {
  min-height: 48px;
  padding-inline: 15px;
  font-size: 15px;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.ideas-form input,
.ideas-form select,
.ideas-form .ui-select-trigger {
  min-height: 42px;
  border-color: rgba(var(--accent-rgb), 0.11);
  background: rgba(255, 255, 255, 0.035);
}

.ideas-bias-strip,
.ideas-status-strip,
.ideas-outcome-strip {
  gap: 5px;
}

.ideas-bias-btn,
.ideas-status-btn,
.ideas-outcome-btn {
  min-height: 36px;
  padding: 7px 13px;
  border-radius: 11px;
  font-weight: 650;
}

.ideas-timeframe-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ideas-tf-matrix {
  flex: 0 1 auto;
  gap: 5px;
}

.ideas-tf-chip {
  min-width: 42px;
  min-height: 36px;
  padding: 6px 9px;
  border-radius: 10px;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.ideas-tf-chip:hover {
  border-color: rgba(var(--accent-rgb), 0.32);
  transform: translateY(-1px);
}

.ideas-tf-custom {
  flex: 0 1 130px;
  width: 130px;
  max-width: 130px;
  margin: 0;
}

.ideas-meta-strip {
  grid-template-columns:
    minmax(135px, 0.8fr)
    minmax(145px, 0.9fr)
    minmax(210px, 1.35fr)
    minmax(210px, 1.25fr);
  align-items: start;
  gap: 12px;
}

.ideas-notes {
  min-height: 250px;
  padding: 16px 17px;
  border-color: rgba(var(--accent-rgb), 0.12);
  border-radius: 16px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.005)),
    rgba(2, 4, 10, 0.45);
  font-size: 13px;
  line-height: 1.62;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.34) transparent;
}

.ideas-evidence-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.ideas-field-links {
  grid-column: 1 / -1;
}

.ideas-links-list {
  min-width: 0;
}

.ideas-links-empty {
  margin: 0;
  padding: 11px 12px;
  border: 1px dashed rgba(var(--accent-rgb), 0.16);
  border-radius: 12px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.015);
  font-size: 11px;
}

.ideas-link-row {
  min-width: 0;
}

.ideas-link-remove {
  width: 40px;
  min-width: 40px;
  padding-inline: 0;
  color: #fca5a5;
}

.ideas-tag-chips:empty {
  display: none;
}

.ideas-editor-hint {
  position: relative;
  margin: 0;
  padding: 12px 14px 12px 42px;
  border-radius: 15px;
}

.ideas-editor-hint::before {
  content: "i";
  position: absolute;
  top: 50%;
  left: 14px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  border-radius: 50%;
  color: var(--accent-primary);
  font: 700 10px/1 ui-monospace, monospace;
  transform: translateY(-50%);
  pointer-events: none;
}

.ideas-editor-hint.is-error {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(248, 113, 113, 0.09);
  color: #fecaca;
}

.ideas-editor-hint.is-error::before {
  content: "!";
  border-color: rgba(248, 113, 113, 0.52);
  color: #fca5a5;
}

.ideas-field.is-invalid input,
.ideas-field.is-invalid select,
.ideas-field.is-invalid .ui-select-trigger {
  border-color: rgba(248, 113, 113, 0.7) !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.11) !important;
}

.ideas-form-footer {
  position: sticky;
  z-index: 6;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  margin: 0 -4px -4px;
  padding: 10px 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.13);
  border-radius: 17px;
  background: color-mix(in srgb, var(--bg-secondary, #0b1120) 88%, transparent);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(20px) saturate(1.2);
}

.ideas-form-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.ideas-save-status {
  min-width: 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.35;
}

.ideas-save-status:not(:empty)::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
}

.ideas-save-status[data-state="dirty"] {
  color: #fbbf24;
}

.ideas-save-status[data-state="saved"] {
  color: #6ee7b7;
}

.ideas-save-status[data-state="error"] {
  color: #fca5a5;
}

.ideas-save-btn {
  min-width: 124px;
}

.ideas-delete-btn {
  color: rgba(252, 165, 165, 0.78);
}

.ideas-delete-btn:hover {
  border-color: rgba(248, 113, 113, 0.34);
  color: #fecaca;
  background: rgba(248, 113, 113, 0.08);
}

body[data-theme="white"] .ideas-form-section {
  border-color: rgba(15, 23, 42, 0.09);
  background: rgba(248, 250, 252, 0.76);
}

body[data-theme="white"] .ideas-notes,
body[data-theme="white"] .ideas-links-empty {
  background: rgba(248, 250, 252, 0.92);
}

body[data-theme="white"] .ideas-form-footer {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
}

@media (max-width: 1200px) {
  .ideas-meta-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ideas-timeframe-control {
    align-items: stretch;
    flex-direction: column;
  }

  .ideas-tf-custom {
    width: 160px;
    max-width: 160px;
  }
}

@media (max-width: 960px) {
  .ideas-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .workspace-editor-section .ideas-rail {
    position: static;
    max-height: none;
  }

  .ideas-list {
    display: flex;
    max-height: none;
    padding: 0 0 3px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
  }

  .workspace-editor-section .ideas-list-item {
    flex: 0 0 min(240px, 78vw);
    scroll-snap-align: start;
  }
}

@media (max-width: 900px) {
  .ideas-form-footer {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 640px) {
  .workspace-editor-section .ideas-canvas {
    padding: 10px;
  }

  .ideas-form-section {
    gap: 12px;
    padding: 14px;
    border-radius: 17px;
  }

  .ideas-form-section-head p {
    font-size: 10px;
  }

  .workspace-editor-section .ideas-form .ideas-form-top,
  .ideas-meta-strip,
  .ideas-evidence-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ideas-field-links {
    grid-column: auto;
  }

  .ideas-timeframe-control {
    overflow: hidden;
  }

  .ideas-tf-matrix {
    flex-wrap: nowrap;
    max-width: 100%;
    padding-bottom: 3px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .ideas-tf-matrix::-webkit-scrollbar {
    display: none;
  }

  .ideas-tf-chip {
    flex: 0 0 auto;
  }

  .ideas-tf-custom {
    width: 100%;
    max-width: none;
  }

  .ideas-form-footer {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 9px;
  }

  .ideas-form-footer-actions {
    width: 100%;
  }

  .ideas-form-footer-actions > * {
    flex: 1;
  }

  .ideas-save-status:empty {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ideas-tf-chip,
  .ideas-list-item {
    transition: none !important;
  }
}

/* Semantic workspace symbols replace decorative section numbers. */
.workspace-editor-symbol {
  position: absolute;
  z-index: 1;
  top: 24px;
  right: 30px;
  width: clamp(108px, 15vw, 190px);
  color: var(--accent-primary);
  opacity: 0.18;
  pointer-events: none;
  animation: workspace-symbol-float 7s ease-in-out infinite;
}

.workspace-editor-symbol svg,
.trade-entry-launch-icon svg {
  display: block;
  width: 100%;
  height: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workspace-editor-symbol--ideas {
  width: clamp(100px, 14vw, 175px);
}

.workspace-editor-symbol--journal,
.workspace-editor-symbol--tv,
.workspace-editor-symbol--ai {
  width: clamp(108px, 15vw, 185px);
}

.workspace-editor-symbol-solid {
  fill: currentColor;
  stroke: none;
}

.workspace-editor-hero .journal-hub-actions,
.workspace-editor-hero .tv-opinions-actions,
.workspace-editor-hero .ai-hero-actions {
  position: relative;
  z-index: 3;
  align-self: flex-end;
  justify-content: flex-end;
}

.workspace-editor-hero .tv-opinions-actions,
.workspace-editor-hero .ai-hero-actions {
  padding: 6px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 16px;
  background: rgba(5, 7, 13, 0.56);
  backdrop-filter: blur(14px);
}

.ai-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ai-hero-actions #aiHeroLimit {
  margin: 0 4px;
  color: var(--text-secondary);
  font-size: 12px;
}

.ai-hero-actions .primary-button {
  height: 38px;
  padding: 0 18px;
  font-size: 13px;
}

.trade-entry-launch-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: clamp(68px, 7vw, 92px);
  height: clamp(68px, 7vw, 92px);
  padding: 17px;
  border: 1px solid rgba(var(--accent-rgb), 0.26);
  border-radius: 24px;
  color: var(--accent-primary);
  background: rgba(var(--accent-rgb), 0.08);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
  animation: workspace-symbol-float 6s ease-in-out infinite;
}

.workspace-editor-section .workspace-empty-mark {
  position: relative;
  transform: none;
  animation: workspace-empty-mark-float 5.5s ease-in-out infinite;
}

.workspace-editor-section .workspace-empty-mark span {
  transform: none;
}

@keyframes workspace-symbol-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(0, -8px, 0) rotate(2deg); }
}

@keyframes workspace-empty-mark-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(0, -7px, 0) rotate(3deg); }
}

@media (max-width: 900px) {
  .workspace-editor-symbol {
    top: 24px;
    right: 26px;
    width: 108px;
  }

  .workspace-editor-hero--journal,
  .workspace-editor-hero--tv,
  .workspace-editor-hero--ai {
    flex-direction: column;
    align-items: stretch;
  }

  .workspace-editor-hero .journal-hub-actions,
  .workspace-editor-hero .tv-opinions-actions,
  .workspace-editor-hero .ai-hero-actions {
    width: 100%;
    align-self: stretch;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .workspace-editor-symbol {
    top: 24px;
    right: 18px;
    width: 78px;
  }

  .workspace-editor-section .workspace-editor-hero h2,
  .workspace-editor-hero--ai h2 {
    font-size: clamp(38px, 13vw, 58px) !important;
    line-height: 0.94 !important;
  }

  .workspace-editor-hero .tv-opinions-actions,
  .workspace-editor-hero .ai-hero-actions {
    align-items: stretch;
  }

  .trade-entry-launch-icon {
    width: 68px;
    height: 68px;
    padding: 14px;
  }
}

body.reduced-motion .workspace-editor-symbol,
body.reduced-motion .trade-entry-launch-icon,
body.reduced-motion .workspace-empty-mark {
  animation: none !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .workspace-editor-symbol,
  .trade-entry-launch-icon,
  .workspace-empty-mark {
    animation: none !important;
    transform: none !important;
  }
}

/* ?? Trade form: classic inline entry + restrained optional wizard ?? */
.trade-form-home {
  margin-top: 18px;
}

.trade-form-home:empty {
  display: none;
}

.trade-form-home .trade-wizard-form {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  grid-template-rows: auto;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.12);
}

.trade-form-home .trade-wizard-step,
.trade-form-home .trade-wizard-step[hidden] {
  display: block !important;
  min-height: 0;
  padding: 18px;
  overflow: visible;
  border: 1px solid rgba(var(--accent-rgb), 0.13);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.055), transparent 48%),
    rgba(255, 255, 255, 0.018);
  animation: none !important;
}

.trade-form-home .trade-wizard-step + .trade-wizard-step {
  margin-top: 0;
}

.trade-form-home .trade-wizard-step[data-trade-wizard-step="1"] {
  grid-column: 1;
}

.trade-form-home .trade-wizard-step[data-trade-wizard-step="2"] {
  grid-column: 2;
}

.trade-form-home .trade-wizard-step[data-trade-wizard-step="3"] {
  display: grid !important;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.trade-form-home .trade-wizard-step[data-trade-wizard-step="3"] > .trade-wizard-step-head {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.trade-setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.55fr);
  grid-template-areas:
    "factors chart"
    "color chart";
  gap: 12px 16px;
  align-items: start;
}

.trade-setup-grid--patterns {
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
  grid-template-areas:
    "factors factors"
    "chart color";
}

.trade-setup-factors { grid-area: factors; }
.trade-setup-chart { grid-area: chart; }
.trade-setup-color { grid-area: color; justify-self: start; max-width: 220px; }

.trade-setup-field {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.trade-setup-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 22px;
}

.trade-setup-label-row > span:first-child {
  min-width: 0;
  line-height: 1.3;
}

.trade-setup-label-row .info-icon {
  flex: 0 0 auto;
  margin: 0;
}

.trade-setup-field > input,
.trade-setup-field > .ui-factor-wrap,
.trade-setup-field > select,
.trade-setup-field > .ui-select-wrap {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
}

.trade-setup-field > input,
.trade-setup-field > select {
  background: var(--inset-card-bg);
  border: 1px solid var(--inset-card-border);
  border-radius: 12px;
  color: var(--text-primary);
  padding: 10px 12px;
  font-size: 13px;
}

.trade-setup-field .chip-list,
.trade-setup-field .chip-presets {
  margin-top: 2px;
}

@media (max-width: 760px) {
  .trade-setup-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "factors"
      "chart"
      "color";
  }

  .trade-setup-grid--patterns {
    grid-template-areas:
      "factors"
      "chart"
      "color";
  }

  .trade-setup-color {
    max-width: none;
    justify-self: stretch;
  }
}

.trade-form-home .trade-wizard-step[data-trade-wizard-step="4"],
.trade-form-home .trade-wizard-error,
.trade-form-home .trade-wizard-footer-progress,
.trade-form-home #tradeWizardBack,
.trade-form-home #tradeWizardNext,
.trade-form-home #tradeWizardSubmit {
  display: none !important;
}

.trade-form-home .trade-wizard-step-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
}

.trade-form-home .trade-wizard-step-head > span {
  display: none;
}

.trade-form-home .trade-wizard-step-head h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.trade-form-home .trade-wizard-step-head p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.45;
}

.trade-form-home .trade-wizard-step[data-trade-wizard-step="3"] > .trade-wizard-step-head {
  margin-bottom: 0;
}

.trade-form-home .trade-wizard-context-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trade-form-home .trade-wizard-context-grid > label:last-child {
  grid-column: 1 / -1;
}

.trade-form-home .trade-wizard-result-grid {
  grid-template-columns: 1fr;
}

.trade-form-home .trade-wizard-footer {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 2px 0 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.trade-form-home .trade-wizard-footer-actions {
  display: flex;
  order: 1;
}

.trade-form-home .trade-wizard-reset {
  order: 2;
}

.trade-form-home .trade-inline-submit {
  display: inline-flex;
}

.journal-input-section .trade-form-home .form-row input,
.journal-input-section .trade-form-home .form-row select,
.journal-input-section .trade-form-home .ui-select-trigger,
.journal-input-section .trade-form-home .ui-date-trigger {
  min-height: 44px;
  border: 1px solid rgba(var(--accent-rgb), 0.13);
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.journal-input-section .trade-form-home .form-row input:focus,
.journal-input-section .trade-form-home .ui-select-trigger:focus,
.journal-input-section .trade-form-home .ui-date-trigger:focus {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.09);
}

.journal-input-section .trade-form-home .chip-presets,
.journal-input-section .trade-form-home .chip-list {
  gap: 7px;
}

.journal-input-section .trade-form-home .chip {
  padding: 6px 10px;
  border-radius: 999px;
}

.journal-table-section {
  position: relative;
  padding: clamp(20px, 2.5vw, 30px);
  border-color: rgba(var(--accent-rgb), 0.16);
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--accent-rgb), 0.09), transparent 32%),
    var(--card-bg);
}

.journal-table-section > .section-header {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.11);
}

.journal-table-section > .section-header h2 {
  font-size: clamp(22px, 2.2vw, 30px);
  letter-spacing: -0.035em;
}

.journal-table-section .journal-filter-chips {
  gap: 7px;
  margin-bottom: 12px;
}

.journal-table-section .filter-chip {
  min-height: 36px;
  padding: 7px 14px;
  border-color: rgba(var(--accent-rgb), 0.13);
  background: rgba(255, 255, 255, 0.025);
}

.journal-table-section .filter-chip.is-active,
.journal-table-section .filter-chip:hover {
  border-color: rgba(var(--accent-rgb), 0.38);
  background: rgba(var(--accent-rgb), 0.12);
}

.journal-table-section .filters {
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.018);
}

.journal-table-section .filters input,
.journal-table-section .filters select,
.journal-table-section .filters .ui-select-trigger,
.journal-table-section .filters .ui-date-trigger {
  min-height: 42px;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  background: rgba(255, 255, 255, 0.032);
}

.journal-table-section .trade-table-wrapper {
  overflow: auto;
  border-radius: 18px;
  border-color: rgba(var(--accent-rgb), 0.13);
  background: rgba(0, 0, 0, 0.12);
}

.journal-table-section .trade-table-wrapper table thead {
  background: rgba(var(--accent-rgb), 0.07);
}

.journal-table-section .trade-table-wrapper table th {
  padding-block: 13px;
  color: var(--text-secondary);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (max-width: 1100px) {
  .trade-form-home .trade-wizard-form {
    grid-template-columns: 1fr;
  }

  .trade-form-home .trade-wizard-step[data-trade-wizard-step="1"],
  .trade-form-home .trade-wizard-step[data-trade-wizard-step="2"],
  .trade-form-home .trade-wizard-step[data-trade-wizard-step="3"],
  .trade-form-home .trade-wizard-footer {
    grid-column: 1;
  }

  .trade-form-home .trade-wizard-result-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .trade-form-home .trade-wizard-step,
  .trade-form-home .trade-wizard-step[hidden] {
    padding: 14px;
    border-radius: 16px;
  }

  .trade-form-home .trade-wizard-context-grid,
  .trade-form-home .trade-wizard-result-grid,
  .trade-form-home .trade-wizard-step[data-trade-wizard-step="3"] {
    grid-template-columns: 1fr;
  }

  .trade-form-home .trade-wizard-context-grid > label:last-child,
  .trade-form-home .trade-wizard-step[data-trade-wizard-step="3"] > .trade-wizard-step-head {
    grid-column: 1;
  }

  .journal-table-section .filters {
    padding: 12px;
  }
}

.trade-entry-modal .trade-inline-submit {
  display: none !important;
}

.trade-wizard-form-host {
  min-height: 0;
  display: grid;
}

.trade-entry-modal {
  padding: 20px;
  background: rgba(3, 5, 10, 0.76);
  backdrop-filter: blur(8px);
  transition: opacity 0.2s ease;
}

.trade-entry-modal-card {
  width: min(760px, 100%);
  max-height: min(780px, calc(100dvh - 40px));
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 20px;
  background: #101218;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.46);
  transform: translateY(10px) scale(0.99);
  transition: opacity 0.2s ease, transform 0.22s ease;
}

.trade-entry-modal-head {
  align-items: center;
  padding: 20px 22px 16px;
  border-bottom: 0;
}

.trade-entry-modal-head .kicker {
  font-size: 9px;
  letter-spacing: 0.14em;
}

.trade-entry-modal-head h2 {
  margin-top: 4px;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.trade-entry-modal-close {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 22px;
}

.trade-entry-modal-close:hover {
  transform: none;
}

.trade-wizard-progress {
  gap: 10px;
  padding: 0 22px 16px;
}

.trade-wizard-progress-step {
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.trade-wizard-progress-step::after {
  display: none;
}

.trade-wizard-progress-step span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-secondary);
  font-size: 9px;
}

.trade-wizard-progress-step strong {
  font-size: 11px;
  font-weight: 600;
}

.trade-wizard-progress-step.is-active,
.trade-wizard-progress-step.is-complete {
  border-color: transparent;
  background: rgba(var(--accent-rgb), 0.065);
}

.trade-wizard-progress-step.is-active span,
.trade-wizard-progress-step.is-complete span {
  border-color: rgba(var(--accent-rgb), 0.48);
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--text-primary);
}

.trade-entry-modal .trade-wizard-form {
  grid-template-rows: minmax(0, 1fr) auto auto;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.trade-entry-modal .trade-wizard-step {
  min-height: 0;
  max-height: min(470px, calc(100dvh - 270px));
  padding: 24px 22px;
}

.trade-entry-modal .trade-wizard-step-head {
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.trade-entry-modal .trade-wizard-step-head > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 11px;
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent-primary);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.04em;
}

.trade-entry-modal .trade-wizard-step-head h3 {
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.trade-entry-modal .trade-wizard-step-head p {
  margin-top: 5px;
  font-size: 12px;
}

.trade-entry-modal .trade-wizard-context-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.trade-entry-modal .trade-wizard-result-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trade-entry-modal .form-row input,
.trade-entry-modal .form-row select,
.trade-entry-modal .ui-select-trigger,
.trade-entry-modal .ui-date-trigger {
  min-height: 44px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
}

.trade-wizard-error {
  margin: 0 22px 12px;
  padding: 10px 12px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 10px;
  background: rgba(248, 113, 113, 0.08);
  color: #fecaca;
  font-size: 12px;
  line-height: 1.4;
}

.trade-entry-modal label.is-wizard-invalid {
  color: #fca5a5;
}

.trade-entry-modal .is-wizard-invalid.ui-select-trigger,
.trade-entry-modal input.is-wizard-invalid,
.trade-entry-modal select.is-wizard-invalid {
  border-color: rgba(248, 113, 113, 0.72) !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1) !important;
}

.trade-entry-modal .trade-wizard-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.trade-entry-modal .trade-wizard-summary-item {
  min-height: 76px;
  padding: 13px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.028);
  animation: none;
}

.trade-entry-modal .trade-wizard-summary-item strong {
  font-size: 14px;
}

.trade-entry-modal .trade-wizard-footer {
  grid-template-columns: 1fr auto 1fr;
  padding: 14px 22px 18px;
  background: #0d0f14;
  backdrop-filter: none;
}

.trade-entry-modal .trade-wizard-footer .primary-button,
.trade-entry-modal .trade-wizard-footer .ghost-button {
  min-height: 40px;
  padding: 8px 15px;
}

body[data-theme="white"] .trade-entry-modal-card {
  border-color: rgba(15, 23, 42, 0.12);
  background: #ffffff;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.22);
}

body[data-theme="white"] .trade-entry-modal .trade-wizard-footer {
  background: #f8fafc;
}

body[data-theme="white"] .trade-entry-modal .trade-wizard-summary-item,
body[data-theme="white"] .trade-wizard-progress-step.is-active,
body[data-theme="white"] .trade-wizard-progress-step.is-complete {
  background: rgba(var(--accent-rgb), 0.06);
}

body[data-theme="white"] .trade-wizard-error {
  color: #991b1b;
  background: #fef2f2;
}

@media (max-width: 640px) {
  .trade-form-home .trade-wizard-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .trade-form-home .trade-wizard-footer-actions,
  .trade-form-home .trade-inline-submit,
  .trade-form-home .trade-wizard-reset {
    width: 100%;
  }

  .trade-entry-modal {
    padding: 0;
  }

  .trade-entry-modal-card {
    max-height: 96dvh;
    border-radius: 18px 18px 0 0;
  }

  .trade-entry-modal-head {
    padding: 16px 16px 12px;
  }

  .trade-wizard-progress {
    padding: 0 16px 12px;
  }

  .trade-wizard-progress-step {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 4px;
  }

  .trade-entry-modal .trade-wizard-step {
    max-height: calc(96dvh - 230px);
    padding: 20px 16px;
  }

  .trade-entry-modal .trade-wizard-context-grid,
  .trade-entry-modal .trade-wizard-result-grid,
  .trade-entry-modal .trade-wizard-summary {
    grid-template-columns: 1fr;
  }

  .trade-wizard-error {
    margin-inline: 16px;
  }

  .trade-entry-modal .trade-wizard-footer {
    padding: 12px 16px max(14px, env(safe-area-inset-bottom, 0px));
  }
}

/* ?? Premium playbook and research workspaces ?? */
.workspace-editor-section.page.card {
  position: relative;
  overflow: hidden;
  padding: clamp(18px, 2.4vw, 32px);
  border-color: rgba(var(--accent-rgb), 0.18);
  background:
    radial-gradient(circle at 88% 0%, rgba(var(--accent-rgb), 0.16), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    var(--card-bg);
}

.workspace-editor-section.page.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(var(--accent-rgb), 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.1) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 42%);
}

.workspace-editor-hero {
  position: relative;
  z-index: 1;
  min-height: clamp(190px, 24vw, 300px);
  margin: 0 0 24px;
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 25%, rgba(var(--accent-rgb), 0.2), transparent 28%),
    linear-gradient(135deg, rgba(4, 6, 14, 0.88), rgba(var(--accent-rgb), 0.06));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05), 0 28px 70px rgba(0, 0, 0, 0.18);
  animation: workspace-editor-enter 0.62s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.workspace-editor-hero::after {
  content: "";
  position: absolute;
  right: clamp(-110px, -7vw, -50px);
  bottom: clamp(-120px, -8vw, -70px);
  width: clamp(260px, 36vw, 520px);
  aspect-ratio: 1;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 50%;
  box-shadow:
    0 0 0 38px rgba(var(--accent-rgb), 0.05),
    0 0 0 76px rgba(var(--accent-rgb), 0.025);
  pointer-events: none;
  animation: workspace-orbit 8s ease-in-out infinite;
}

.workspace-editor-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.workspace-editor-hero .kicker {
  margin-bottom: 13px;
  letter-spacing: 0.2em;
}

.workspace-editor-hero h2 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(42px, 7vw, 94px);
  line-height: 0.91;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

.workspace-editor-hero .subtitle {
  max-width: 680px;
  margin-top: 18px;
  font-size: clamp(14px, 1.5vw, 18px);
  line-height: 1.6;
}

.workspace-editor-index {
  position: absolute;
  z-index: 1;
  top: 22px;
  right: 30px;
  color: rgba(var(--accent-rgb), 0.26);
  font-size: clamp(70px, 12vw, 170px);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.08em;
  user-select: none;
}

.workspace-editor-hero .strategy-tabs,
.workspace-editor-hero .ideas-btn-compact {
  position: relative;
  z-index: 3;
  align-self: flex-end;
  backdrop-filter: blur(16px);
}

.workspace-editor-hero .strategy-tabs {
  padding: 5px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  background: rgba(5, 7, 13, 0.66);
}

.workspace-editor-section .strategy-layout,
.workspace-editor-section .ideas-workspace {
  position: relative;
  z-index: 1;
  gap: 22px;
}

.workspace-editor-section .strategy-list-panel,
.workspace-editor-section .strategy-editor-panel,
.workspace-editor-section .ideas-rail,
.workspace-editor-section .ideas-canvas {
  border-radius: 24px;
  border-color: rgba(var(--accent-rgb), 0.16);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.04), transparent 52%),
    rgba(5, 7, 14, 0.7);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.workspace-editor-section .strategy-list-panel,
.workspace-editor-section .ideas-rail {
  padding: 18px;
}

.workspace-editor-section .strategy-editor-panel,
.workspace-editor-section .ideas-canvas {
  min-height: 440px;
  padding: clamp(20px, 3vw, 34px);
}

.workspace-editor-section .strategy-list-head h3,
.workspace-editor-section .ideas-rail-head {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.workspace-editor-section .strategy-list-item,
.workspace-editor-section .ideas-list-item {
  padding: 14px 15px;
  border-radius: 16px;
}

.workspace-editor-section .strategy-list-item:hover,
.workspace-editor-section .ideas-list-item:hover {
  border-color: rgba(var(--accent-rgb), 0.42);
  background: rgba(var(--accent-rgb), 0.09);
  transform: translateY(-2px);
}

.workspace-editor-section .strategy-empty-state,
.workspace-editor-section .ideas-empty-state {
  min-height: 380px;
  align-content: center;
  align-items: center;
  justify-content: center;
  justify-items: center;
  gap: 14px;
  padding: 32px;
  text-align: center;
  animation: workspace-empty-enter 0.5s 0.12s ease both;
}

.workspace-editor-section .strategy-empty-state h3,
.workspace-editor-section .ideas-empty-state h3 {
  max-width: 620px;
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 54px);
  line-height: 1;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.workspace-editor-section .strategy-empty-state .subtitle,
.workspace-editor-section .ideas-empty-state .subtitle {
  max-width: 520px;
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.55;
}

.workspace-empty-mark {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin-bottom: 4px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 26px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.12), transparent 36%),
    rgba(var(--accent-rgb), 0.12);
  color: var(--accent-primary);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 22px 50px rgba(var(--accent-rgb), 0.18);
  transform: rotate(-5deg);
}

.workspace-empty-mark span {
  transform: rotate(5deg);
}

.workspace-editor-section .strategy-form,
.workspace-editor-section .ideas-form {
  animation: workspace-form-enter 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.workspace-editor-section .strategy-form-grid,
.workspace-editor-section .ideas-form-top,
.workspace-editor-section .ideas-meta-strip {
  padding: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.018);
}

.workspace-editor-section .strategy-form input,
.workspace-editor-section .strategy-form textarea,
.workspace-editor-section .ideas-form input,
.workspace-editor-section .ideas-form textarea,
.workspace-editor-section .ideas-form select {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.workspace-editor-section .strategy-form input:focus,
.workspace-editor-section .strategy-form textarea:focus,
.workspace-editor-section .ideas-form input:focus,
.workspace-editor-section .ideas-form textarea:focus,
.workspace-editor-section .ideas-form select:focus {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.52);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1);
}

/* ?? Guided premium trade entry ?? */
.journal-hub-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.trade-entry-header-btn {
  min-height: 40px;
  padding: 9px 16px;
  font-size: 12px;
  white-space: nowrap;
}

.trade-entry-open-btn.is-feature-locked,
.trade-entry-header-btn.is-feature-locked {
  filter: saturate(0.35);
  opacity: 0.72;
}

.trade-entry-launch-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(18px, 3vw, 34px);
  min-height: 180px;
  padding: clamp(22px, 3vw, 38px);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 20%, rgba(var(--accent-rgb), 0.22), transparent 30%),
    linear-gradient(125deg, rgba(var(--accent-rgb), 0.1), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06), 0 24px 60px rgba(0, 0, 0, 0.16);
}

.trade-entry-launch-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 26%, rgba(255, 255, 255, 0.055) 48%, transparent 70%);
  transform: translateX(-110%);
  animation: trade-launch-shimmer 8s ease-in-out infinite;
}

.trade-entry-launch-number {
  position: relative;
  z-index: 1;
  color: rgba(var(--accent-rgb), 0.32);
  font-size: clamp(64px, 8vw, 108px);
  font-weight: 800;
  line-height: 0.8;
  letter-spacing: -0.08em;
}

.trade-entry-launch-copy,
.trade-entry-open-btn {
  position: relative;
  z-index: 1;
}

.trade-entry-launch-copy .kicker {
  display: block;
  margin-bottom: 10px;
}

.trade-entry-launch-copy h3 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.trade-entry-launch-copy .subtitle {
  margin: 10px 0 0;
  font-size: 14px;
}

.trade-entry-open-btn {
  min-height: 50px;
  padding-inline: 22px;
  white-space: nowrap;
}

.trade-entry-modal {
  position: fixed;
  inset: 0;
  z-index: 13050;
  display: grid;
  place-items: center;
  padding: max(18px, env(safe-area-inset-top, 0px)) 18px max(18px, env(safe-area-inset-bottom, 0px));
  overflow: auto;
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.18), transparent 40%),
    rgba(1, 3, 8, 0.84);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.trade-entry-modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.trade-entry-modal-card {
  position: relative;
  width: min(1000px, 100%);
  max-height: min(920px, calc(100vh - 36px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 30px;
  background:
    radial-gradient(circle at 88% 0%, rgba(var(--accent-rgb), 0.17), transparent 30%),
    linear-gradient(145deg, rgba(17, 18, 28, 0.99), rgba(7, 9, 16, 0.99));
  box-shadow: 0 42px 120px rgba(0, 0, 0, 0.52), inset 0 1px rgba(255, 255, 255, 0.07);
  opacity: 0;
  transform: translateY(22px) scale(0.975);
  transition: opacity 0.32s ease, transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.trade-entry-modal.is-visible .trade-entry-modal-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.trade-entry-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 28px 18px;
}

.trade-entry-modal-head h2 {
  margin: 5px 0 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.trade-entry-modal-close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-primary);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.trade-entry-modal-close:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.12);
  transform: rotate(4deg);
}

.trade-wizard-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 28px 18px;
}

.trade-wizard-progress-step {
  position: relative;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-secondary);
  text-align: left;
  cursor: default;
  overflow: hidden;
}

.trade-wizard-progress-step::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: right 0.32s ease;
}

.trade-wizard-progress-step span {
  color: rgba(var(--accent-rgb), 0.62);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.trade-wizard-progress-step strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-wizard-progress-step.is-active,
.trade-wizard-progress-step.is-complete {
  border-color: rgba(var(--accent-rgb), 0.28);
  background: rgba(var(--accent-rgb), 0.09);
  color: var(--text-primary);
}

.trade-wizard-progress-step.is-active::after,
.trade-wizard-progress-step.is-complete::after {
  right: 0;
}

.trade-wizard-form {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.trade-wizard-step {
  min-height: 350px;
  overflow: auto;
  padding: clamp(22px, 3vw, 34px) 28px;
  overscroll-behavior: contain;
}

.trade-wizard-step.is-entering-forward {
  animation: trade-step-enter-forward 0.36s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.trade-wizard-step.is-entering-backward {
  animation: trade-step-enter-backward 0.36s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.trade-wizard-step-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  margin-bottom: 26px;
}

.trade-wizard-step-head > span {
  color: rgba(var(--accent-rgb), 0.48);
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 800;
  line-height: 0.84;
  letter-spacing: -0.08em;
}

.trade-wizard-step-head h3 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1;
  letter-spacing: -0.035em;
}

.trade-wizard-step-head p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.trade-wizard-context-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.trade-wizard-form .form-row input,
.trade-wizard-form .form-row select,
.trade-wizard-form .ui-select-trigger,
.trade-wizard-form .ui-date-trigger {
  min-height: 48px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.trade-wizard-form .form-row input:focus,
.trade-wizard-form .form-row select:focus,
.trade-wizard-form .ui-select-trigger:focus,
.trade-wizard-form .ui-date-trigger:focus {
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1);
}

.trade-wizard-form .factor-controls {
  margin-top: 12px;
}

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

.trade-wizard-summary-item {
  display: grid;
  gap: 7px;
  min-height: 98px;
  padding: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.08), transparent),
    rgba(255, 255, 255, 0.025);
  animation: trade-summary-enter 0.34s ease both;
}

.trade-wizard-summary-item:nth-child(2) { animation-delay: 0.04s; }
.trade-wizard-summary-item:nth-child(3) { animation-delay: 0.08s; }
.trade-wizard-summary-item:nth-child(4) { animation-delay: 0.12s; }
.trade-wizard-summary-item:nth-child(5) { animation-delay: 0.16s; }
.trade-wizard-summary-item:nth-child(6) { animation-delay: 0.2s; }

.trade-wizard-summary-item span {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.trade-wizard-summary-item strong {
  align-self: end;
  overflow-wrap: anywhere;
  font-size: 17px;
  line-height: 1.2;
}

.trade-wizard-summary-item--wide {
  grid-column: 1 / -1;
  min-height: auto;
}

.trade-wizard-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 28px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(4, 6, 12, 0.78);
  backdrop-filter: blur(18px);
}

.trade-wizard-footer-progress {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.trade-wizard-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.trade-wizard-footer .primary-button,
.trade-wizard-footer .ghost-button {
  min-height: 44px;
}

.trade-wizard-reset {
  justify-self: start;
}

@keyframes workspace-editor-enter {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes workspace-orbit {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.72; }
  50% { transform: translate3d(-10px, -8px, 0) scale(1.035); opacity: 1; }
}

@keyframes workspace-empty-enter {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes workspace-form-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes trade-launch-shimmer {
  0%, 65%, 100% { transform: translateX(-110%); }
  82% { transform: translateX(110%); }
}

@keyframes trade-step-enter-forward {
  from { opacity: 0; transform: translateX(22px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes trade-step-enter-backward {
  from { opacity: 0; transform: translateX(-22px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes trade-summary-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

body[data-theme="white"] .workspace-editor-section.page.card,
body[data-theme="white"] .workspace-editor-hero,
body[data-theme="white"] .workspace-editor-section .strategy-list-panel,
body[data-theme="white"] .workspace-editor-section .strategy-editor-panel,
body[data-theme="white"] .workspace-editor-section .ideas-rail,
body[data-theme="white"] .workspace-editor-section .ideas-canvas {
  background-color: rgba(255, 255, 255, 0.92);
}

body[data-theme="white"] .workspace-editor-hero {
  background:
    radial-gradient(circle at 78% 25%, rgba(var(--accent-rgb), 0.17), transparent 30%),
    linear-gradient(135deg, #ffffff, rgba(var(--accent-rgb), 0.055));
}

body[data-theme="white"] .workspace-editor-hero .strategy-tabs,
body[data-theme="white"] .workspace-editor-hero .tv-opinions-actions,
body[data-theme="white"] .workspace-editor-hero .ai-hero-actions {
  background: rgba(255, 255, 255, 0.76);
}

body[data-theme="white"] .trade-entry-launch-card {
  background:
    radial-gradient(circle at 86% 20%, rgba(var(--accent-rgb), 0.18), transparent 30%),
    linear-gradient(125deg, rgba(var(--accent-rgb), 0.08), #ffffff);
}

body[data-theme="white"] .trade-entry-modal {
  background: rgba(226, 232, 240, 0.84);
}

body[data-theme="white"] .trade-entry-modal-card {
  background:
    radial-gradient(circle at 88% 0%, rgba(var(--accent-rgb), 0.13), transparent 30%),
    linear-gradient(145deg, #ffffff, #f8fafc);
  box-shadow: 0 42px 120px rgba(15, 23, 42, 0.24);
}

body[data-theme="white"] .trade-wizard-progress-step,
body[data-theme="white"] .trade-wizard-summary-item,
body[data-theme="white"] .trade-wizard-form .form-row input,
body[data-theme="white"] .trade-wizard-form .form-row select,
body[data-theme="white"] .trade-wizard-form .ui-select-trigger,
body[data-theme="white"] .trade-wizard-form .ui-date-trigger {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
}

body[data-theme="white"] .trade-wizard-footer {
  background: rgba(248, 250, 252, 0.9);
  border-color: rgba(15, 23, 42, 0.1);
}

body[data-theme="white"] .trade-entry-modal-head,
body[data-theme="white"] .trade-wizard-form {
  border-color: rgba(15, 23, 42, 0.1);
}

@media (max-width: 900px) {
  .workspace-editor-hero {
    min-height: 260px;
    align-items: flex-end;
    padding-top: 78px;
  }

  .workspace-editor-hero .strategy-tabs,
  .workspace-editor-hero .ideas-btn-compact {
    position: absolute;
    top: 22px;
    left: 24px;
    align-self: auto;
  }

  .workspace-editor-index {
    top: 24px;
    right: 26px;
  }

  .trade-entry-launch-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .journal-hub-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .trade-entry-open-btn {
    grid-column: 1 / -1;
    justify-self: start;
  }

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

@media (max-width: 640px) {
  .workspace-editor-section.page.card {
    padding: 12px;
  }

  .workspace-editor-hero {
    min-height: 280px;
    margin-bottom: 14px;
    padding: 92px 20px 24px;
    border-radius: 22px;
  }

  .workspace-editor-hero h2 {
    font-size: clamp(40px, 15vw, 62px);
  }

  .workspace-editor-hero .subtitle {
    margin-top: 14px;
    font-size: 13px;
  }

  .workspace-editor-hero .strategy-tabs {
    right: 20px;
    width: auto;
    overflow-x: auto;
  }

  .workspace-editor-index {
    top: 28px;
    right: 20px;
    font-size: 72px;
  }

  .workspace-editor-section .strategy-editor-panel,
  .workspace-editor-section .ideas-canvas {
    min-height: 360px;
    padding: 16px;
    border-radius: 20px;
  }

  .workspace-editor-section .strategy-empty-state,
  .workspace-editor-section .ideas-empty-state {
    min-height: 330px;
    padding: 22px 10px;
  }

  .workspace-editor-section .strategy-empty-state h3,
  .workspace-editor-section .ideas-empty-state h3 {
    font-size: 32px;
  }

  .trade-entry-launch-card {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 22px;
  }

  .journal-hub-actions,
  .trade-entry-header-btn,
  .journal-hub-actions .journal-hub-tabs {
    width: 100%;
  }

  .journal-hub-actions .journal-hub-tabs {
    overflow-x: auto;
  }

  .trade-entry-launch-number {
    font-size: 68px;
  }

  .trade-entry-open-btn {
    grid-column: auto;
    width: 100%;
    white-space: normal;
  }

  .trade-entry-modal {
    place-items: end center;
    padding: 0;
  }

  .trade-entry-modal-card {
    max-height: 96dvh;
    border-radius: 24px 24px 0 0;
  }

  .trade-entry-modal-head {
    padding: 18px 18px 14px;
  }

  .trade-wizard-progress {
    gap: 5px;
    padding: 0 18px 14px;
  }

  .trade-wizard-progress-step {
    min-height: 40px;
    padding: 9px 6px;
    text-align: center;
  }

  .trade-wizard-progress-step strong {
    display: none;
  }

  .trade-wizard-step {
    min-height: 0;
    padding: 22px 18px;
  }

  .trade-wizard-step-head {
    gap: 12px;
    margin-bottom: 20px;
  }

  .trade-wizard-step-head > span {
    font-size: 42px;
  }

  .trade-wizard-context-grid,
  .trade-wizard-result-grid,
  .trade-wizard-summary {
    grid-template-columns: 1fr;
  }

  .trade-wizard-summary-item--wide {
    grid-column: auto;
  }

  .trade-wizard-footer {
    grid-template-columns: auto 1fr;
    padding: 12px 18px max(14px, env(safe-area-inset-bottom, 0px));
  }

  .trade-wizard-footer-progress {
    justify-self: end;
  }

  .trade-wizard-footer-actions {
    grid-column: 1 / -1;
  }

  .trade-wizard-footer-actions > * {
    flex: 1;
  }
}

body.reduced-motion .workspace-editor-hero,
body.reduced-motion .workspace-editor-hero::after,
body.reduced-motion .workspace-editor-section .strategy-empty-state,
body.reduced-motion .workspace-editor-section .ideas-empty-state,
body.reduced-motion .workspace-editor-section .strategy-form,
body.reduced-motion .workspace-editor-section .ideas-form,
body.reduced-motion .trade-entry-launch-card::after,
body.reduced-motion .trade-entry-modal,
body.reduced-motion .trade-entry-modal-card,
body.reduced-motion .trade-wizard-step,
body.reduced-motion .trade-wizard-summary-item {
  animation: none !important;
  transition: none !important;
}

body.reduced-motion .workspace-editor-section .strategy-list-item:hover,
body.reduced-motion .workspace-editor-section .ideas-list-item:hover,
body.reduced-motion .trade-entry-modal-close:hover {
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .workspace-editor-hero,
  .workspace-editor-hero::after,
  .workspace-editor-section .strategy-empty-state,
  .workspace-editor-section .ideas-empty-state,
  .workspace-editor-section .strategy-form,
  .workspace-editor-section .ideas-form,
  .trade-entry-launch-card::after,
  .trade-entry-modal,
  .trade-entry-modal-card,
  .trade-wizard-step,
  .trade-wizard-summary-item {
    animation: none !important;
    transition: none !important;
  }

  .workspace-editor-section .strategy-list-item:hover,
  .workspace-editor-section .ideas-list-item:hover,
  .trade-entry-modal-close:hover {
    transform: none !important;
  }
}

/* Decision Desk ? guided progressive reveal */
.ai-command-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 17px;
  background: rgba(0, 0, 0, 0.09);
}

.ai-command-step {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text-secondary);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 0.22s ease, border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.ai-command-step::after {
  content: "";
  position: absolute;
  inset: auto 12px 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-primary), var(--cyan));
  opacity: 0;
  transform: scaleX(0.3);
  transform-origin: left;
  transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-command-step:hover {
  color: var(--text-primary);
  background: rgba(var(--accent-rgb), 0.07);
}

.ai-command-step.is-active {
  color: var(--text-primary);
  border-color: rgba(var(--accent-rgb), 0.24);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-rgb), 0.06));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.ai-command-step.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.ai-command-step span {
  color: color-mix(in srgb, var(--accent-primary) 76%, var(--text-secondary));
  font: 750 9px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
}

.ai-command-step strong {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-command-center .ai-command-grid {
  display: block;
  min-height: 210px;
}

.ai-command-center .ai-command-panel {
  width: 100%;
  min-height: 210px;
  padding: clamp(17px, 2vw, 24px);
  border-radius: 19px;
}

.ai-command-center .ai-command-panel[hidden] {
  display: none !important;
}

.ai-command-panel.is-entering-forward.is-entering {
  animation: ai-command-enter-forward 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ai-command-panel.is-entering-backward.is-entering {
  animation: ai-command-enter-backward 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ai-command-panel.is-entering > header {
  animation: ai-command-content-enter 0.4s 0.06s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ai-command-panel.is-entering > header + div {
  animation: ai-command-content-enter 0.45s 0.14s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ai-command-stage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 2px;
}

.ai-command-stage-footer > span {
  color: color-mix(in srgb, var(--accent-primary) 72%, var(--text-secondary));
  font: 750 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
}

.ai-command-stage-actions {
  display: flex;
  gap: 8px;
}

.ai-command-stage-actions button {
  min-height: 38px;
  padding: 0 15px;
}

.ai-command-stage-actions button:disabled {
  opacity: 0.34;
  cursor: default;
  transform: none;
}

body[data-theme="white"] .ai-command-steps {
  background: rgba(248, 250, 252, 0.88);
}

body[data-theme="white"] .ai-command-step.is-active {
  background: rgba(var(--accent-rgb), 0.1);
}

@keyframes ai-command-enter-forward {
  from { opacity: 0; transform: translate3d(24px, 0, 0) scale(0.988); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes ai-command-enter-backward {
  from { opacity: 0; transform: translate3d(-24px, 0, 0) scale(0.988); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes ai-command-content-enter {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
  .ai-command-steps {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .ai-command-steps::-webkit-scrollbar {
    display: none;
  }

  .ai-command-step {
    flex: 0 0 min(190px, 62vw);
    scroll-snap-align: start;
  }

  .ai-command-center .ai-command-grid,
  .ai-command-center .ai-command-panel {
    min-height: 230px;
  }
}

@media (max-width: 560px) {
  .ai-command-stage-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .ai-command-stage-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ai-command-stage-actions button {
    width: 100%;
  }
}

body.reduced-motion .ai-command-panel.is-entering,
body.reduced-motion .ai-command-panel.is-entering > header,
body.reduced-motion .ai-command-panel.is-entering > header + div {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .ai-command-panel.is-entering,
  .ai-command-panel.is-entering > header,
  .ai-command-panel.is-entering > header + div {
    animation: none !important;
  }
}

html.theme-morph::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  background: var(--theme-from-bg);
  opacity: 1;
}

html.theme-morph.theme-morph-active::before {
  opacity: 0;
  transition: opacity 0.68s cubic-bezier(0.22, 1, 0.36, 1);
}

.active-trade-card .close-mt5-position {
  margin-top: 12px;
  width: 100%;
}

.top-profile-bar {
  display: none !important;
}

.top-profile-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.top-profile-controls {
  display: grid;
  gap: 8px;
  min-width: min(100%, 380px);
  max-width: 420px;
  align-self: center;
}

.top-profile-controls .account-profile-switcher {
  width: 100%;
}

.top-profile-controls .account-profile-summary {
  margin-top: 2px;
}

.top-profile-orb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 18px;
  background: linear-gradient(135deg, var(--accent-primary), var(--cyan));
  color: #fff;
}

.top-profile-main {
  display: grid;
  gap: 4px;
}

.top-profile-main strong {
  font-size: 16px;
}

.top-profile-stats {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--text-secondary);
}

.top-profile-stats.hidden {
  display: none;
}

.top-profile-plan {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.plan-badge-edge {
  color: #c4ddff;
}

.plan-badge-apex {
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.08em;
}

.plan-badge {
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent-primary);
}

.hidden {
  display: none !important;
}

.top-profile-bar.is-clickable {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.top-profile-bar.is-clickable:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.top-profile-orb.has-image {
  color: transparent;
  background-color: rgba(255, 255, 255, 0.08);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.profile-edit-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 24px;
}

.profile-preview-card,
.profile-edit-form {
  padding: 24px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-preview-card {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.profile-preview-orb {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-primary), var(--cyan));
}

.profile-preview-orb.has-image {
  background-color: rgba(255, 255, 255, 0.04);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.28);
}

.profile-avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 18px;
}

.profile-avatar-option {
  aspect-ratio: 1;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.profile-avatar-option:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.28);
}

.profile-avatar-option.is-active {
  border-color: rgba(var(--accent-rgb), 0.72);
  box-shadow:
    0 0 0 2px rgba(var(--accent-rgb), 0.16),
    0 14px 28px rgba(var(--accent-rgb), 0.18);
}

.profile-avatar-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.subs-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  padding: 24px;
  margin-bottom: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 0% 0%, rgba(var(--accent-rgb), 0.22), transparent 42%),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(var(--accent-rgb), 0.14);
}

.subs-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.subs-billing-switch {
  align-self: start;
}

.plan-price-stack h3 {
  margin: 0;
}

.plan-price-year,
.checkout-amount-year {
  margin: 6px 0 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
}

.checkout-savings {
  margin: 8px 0 0;
  color: #34d399;
  font-weight: 600;
}

.plan-card.is-selected-plan {
  border-color: rgba(var(--accent-rgb), 0.42);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.18), var(--shadow-glow);
}

.changelog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.changelog-date {
  color: var(--text-secondary);
  font-size: 13px;
}

.market-chart-host {
  position: relative;
}

.market-tv-frame,
.market-tv-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
}

.market-position-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.market-levels-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.market-level-chip {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.market-level-chip strong {
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: none;
}

.market-level-chip.is-entry {
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.28);
  color: #a5f3fc;
}

.market-level-chip.is-sl {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #fecaca;
}

.market-level-chip.is-tp {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: #a7f3d0;
}

.support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
}

.support-wallet-card,
.support-qr-card {
  padding: 22px;
  border-radius: 20px;
  background: var(--inset-card-bg);
  border: 1px solid var(--inset-card-border);
}

.support-wallet-value {
  margin: 10px 0 14px;
  font-size: 15px;
  font-weight: 600;
  word-break: break-all;
  color: var(--text-primary);
}

.support-qr-card {
  text-align: center;
  padding: 16px;
}

.support-qr-image {
  width: 220px;
  height: 220px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  margin-bottom: 10px;
}

.support-copy-status {
  min-height: 18px;
  margin-top: 8px;
}

.support-faq {
  margin-top: 28px;
  display: grid;
  gap: 10px;
}

.support-faq h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.support-faq-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--inset-card-bg);
  border: 1px solid var(--inset-card-border);
}

.support-faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  list-style: none;
}

.support-faq-item summary::-webkit-details-marker {
  display: none;
}

.support-faq-item p {
  margin: 10px 0 0;
  color: var(--text-secondary);
  line-height: 1.55;
}

.ai-assistant-layout {
  display: grid;
  gap: 14px;
  min-height: 520px;
}

.ai-chat-live-stats {
  margin-top: 4px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  background: rgba(var(--accent-rgb), 0.06);
}

.ai-chat-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.ai-chat-live-head h4 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.ai-chat-live-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-live-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.ai-chat-live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.ai-chat-live-stat {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-chat-live-stat span {
  font-size: 11px;
  color: var(--text-secondary);
}

.ai-chat-live-stat strong {
  font-size: 15px;
  color: var(--text-primary);
}

.ai-chat-live-insight {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.ai-chat-live-insight span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(var(--accent-rgb), 0.85);
}

.ai-chat-live-empty {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.ai-assistant-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 380px;
  max-height: 56vh;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.ai-assistant-msg {
  max-width: min(88%, 100%);
  padding: 12px 14px;
  border-radius: 16px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.ai-assistant-msg.is-user {
  align-self: flex-end;
  margin-left: auto;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.ai-assistant-msg.is-assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ai-assistant-msg.is-typing {
  opacity: 0.72;
  font-style: italic;
}

.ai-assistant-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.ai-assistant-form textarea {
  width: 100%;
  min-height: 52px;
  resize: vertical;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font: inherit;
}

.ai-assistant-status {
  min-height: 18px;
  margin: 0;
}

.sidebar-nav-support {
  margin-top: auto;
}

.market-pos-zone span {
  display: none;
}

.market-pos-profit {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.42), rgba(16, 185, 129, 0.12));
  box-shadow: inset -1px 0 0 rgba(16, 185, 129, 0.55);
}

.market-pos-loss {
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.42), rgba(239, 68, 68, 0.12));
  box-shadow: inset -1px 0 0 rgba(239, 68, 68, 0.55);
}

.market-pos-line {
  position: absolute;
  height: 0;
  border-top: 2px solid;
  z-index: 3;
  box-shadow: 0 0 8px currentColor;
}

.market-pos-line::before {
  display: none;
}

.market-pos-line.is-sl,
.market-pos-line.is-tp {
  border-top-style: dashed;
}

.market-pos-marker {
  position: absolute;
  right: 8px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  z-index: 4;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.market-pos-marker.is-entry {
  background: rgba(34, 211, 238, 0.18);
  border: 1px solid rgba(34, 211, 238, 0.45);
  color: #a5f3fc;
}

.market-pos-marker.is-sl {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fecaca;
}

.market-pos-marker.is-tp {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #a7f3d0;
}

.market-pos-line.is-entry {
  border-color: rgba(34, 211, 238, 0.96);
  color: #22d3ee;
}

.market-pos-line.is-sl {
  border-color: rgba(239, 68, 68, 0.96);
  color: #ef4444;
}

.market-pos-line.is-tp {
  border-color: rgba(16, 185, 129, 0.96);
  color: #10b981;
}

.market-pos-marker strong {
  font-size: 11px;
  color: #fff;
  letter-spacing: 0.02em;
}

.market-report-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

.market-report-decor {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(42%, 200px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.24;
  background-position: center right;
  background-size: cover;
  background-repeat: no-repeat;
  -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.9) 20%, transparent 100%);
  mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.9) 20%, transparent 100%);
}

.market-report-shell .market-report-card {
  position: relative;
  z-index: 1;
}

.trade-chart-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 10px;
}

.trade-chart-modal.hidden {
  display: none !important;
}

.trade-chart-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 18, 0.78);
  backdrop-filter: blur(8px);
}

.trade-chart-modal-card {
  position: relative;
  z-index: 1;
  width: min(1780px, calc(100vw - 16px));
  height: min(97vh, 1000px);
  max-height: min(97vh, 1000px);
  display: grid;
  grid-template-rows: 1fr;
  border-radius: 24px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  background:
    radial-gradient(circle at 12% 0%, rgba(var(--accent-rgb), 0.14), transparent 42%),
    var(--bg-secondary, #0b1120);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.trade-chart-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.trade-chart-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 460px);
  min-height: 0;
  height: 100%;
}

.trade-chart-preview {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 4px 6px 6px;
  min-height: 0;
  height: 100%;
  background: rgba(0, 0, 0, 0.22);
  border-right: 1px solid rgba(var(--accent-rgb), 0.14);
  overflow: hidden;
}

.trade-chart-zoom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  height: 100%;
}

.trade-chart-zoom-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.trade-chart-zoom-btn {
  min-width: 34px;
  padding: 6px 10px;
  font-size: 14px;
  line-height: 1;
}

.trade-chart-zoom-label {
  min-width: 52px;
  text-align: center;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.trade-chart-zoom-hint {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.72;
}

.trade-chart-zoom-viewport {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overscroll-behavior: contain;
}

.trade-chart-zoom-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 100%;
  min-height: 100%;
  line-height: 0;
  padding: 0;
  box-sizing: border-box;
}

.trade-chart-zoom-viewport.can-pan {
  cursor: grab;
  touch-action: none;
}

.trade-chart-zoom-viewport.is-dragging,
.trade-chart-zoom-viewport.is-dragging img {
  cursor: grabbing;
  user-select: none;
}

.trade-chart-zoom-viewport img {
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

.trade-chart-preview-fallback {
  display: grid;
  gap: 14px;
  justify-items: start;
  max-width: 360px;
  color: var(--text-secondary);
}

.trade-chart-details {
  padding: 22px 18px 18px;
  overflow-y: auto;
}

.trade-chart-details h3 {
  margin: 0 0 18px;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.trade-chart-details-list {
  display: grid;
  gap: 12px;
  margin: 0 0 20px;
}

.trade-chart-details-list div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.trade-chart-details-list dt {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.trade-chart-details-list dd {
  margin: 0;
  font-size: 14px;
  color: var(--text-primary);
  word-break: break-word;
}

.trade-chart-details-list dd.pl-positive {
  color: #4ade80;
}

.trade-chart-details-list dd.pl-negative {
  color: #f87171;
}

.trade-chart-details-list dd.pl-neutral {
  color: #fbbf24;
}

.trade-chart-ai-block {
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  max-height: min(58vh, 560px);
  overflow-y: auto;
}

.trade-chart-ai-block h4 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.trade-chart-ai-body {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  white-space: pre-wrap;
}

.trade-chart-ai-body.is-loading {
  color: var(--text-secondary);
  font-style: italic;
}

.trade-chart-modal-card.is-tv-opinion .trade-chart-modal-body {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 460px);
}

.trade-chart-details.is-tv-opinion {
  overflow-y: auto;
  padding: 22px 22px 20px;
}

.trade-chart-details.is-tv-opinion h3 {
  font-size: 22px;
}

.trade-chart-details.is-tv-opinion .trade-chart-details-list dd {
  font-size: 15px;
}

.tv-opinion-chart-text {
  margin: 0 0 16px;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.65;
}

.tv-opinion-levels-modal {
  margin-bottom: 14px;
}

@media (max-width: 900px) {
  .trade-chart-modal-body {
    grid-template-columns: 1fr;
    max-height: 88vh;
    overflow-y: auto;
  }

  .trade-chart-zoom-hint {
    display: none;
  }

  .trade-chart-preview {
    border-right: 0;
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.14);
    min-height: min(62vh, 560px);
    height: auto;
  }

  .trade-chart-zoom-viewport {
    min-height: min(58vh, 520px);
  }
}

.tv-config-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.tv-webhook-hint {
  margin: 14px 0 0;
  max-width: 62ch;
  line-height: 1.5;
}

.tv-config-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.tv-test-status {
  font-size: 13px;
  color: var(--text-secondary);
}

.tv-test-status:not(:empty) {
  color: rgba(var(--accent-rgb), 0.9);
}

.tv-config-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.tv-config-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.tv-config-value {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tv-pine-template {
  margin: 0 0 12px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow: auto;
}

@media (max-width: 760px) {
  .tv-config-row {
    grid-template-columns: 1fr;
  }
}

.referral-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--inset-card-bg);
  border: 1px solid var(--inset-card-border);
}

.referral-code-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.referral-input-row {
  display: grid;
  gap: 8px;
}

.support-faq-section-title {
  margin: 18px 0 4px;
  font-size: 17px;
  color: var(--text-primary);
}

.settings-field-hint {
  margin: -4px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

/* Vertical monitor ? wide portrait (sidebar stays left) */
body.vertical-layout .app {
  max-width: 100%;
  padding: 18px 18px 48px;
}

body.vertical-layout .shell-layout {
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 20px;
}

body.vertical-layout .sidebar {
  position: sticky;
  top: 12px;
}

body.vertical-layout .card {
  padding: 20px;
}

body.vertical-layout .left-stack,
body.vertical-layout .right-stack {
  grid-column: 1 / -1 !important;
}

body.vertical-layout .top-grid,
body.vertical-layout .discipline-history,
body.vertical-layout .discipline-grid,
body.vertical-layout .crypto-checkout,
body.vertical-layout .support-grid,
body.vertical-layout .behavior-heatmap-grid,
body.vertical-layout .key-metrics-charts-grid,
body.vertical-layout .plans-grid,
body.vertical-layout .market-outlook-grid,
body.vertical-layout .mt5-grid,
body.vertical-layout .notion-import-grid,
body.vertical-layout .ai-emotional-grid,
body.vertical-layout .ai-coach-grid,
body.vertical-layout .insight-grid,
body.vertical-layout .instrument-donut-grid,
body.vertical-layout .dashboard-analytics-grid,
body.vertical-layout .performance-breakdown-grid,
body.vertical-layout .active-trades-grid,
body.vertical-layout .hero-inner,
body.vertical-layout .ai-hub-chat-block,
body.vertical-layout .replay-bottom-grid {
  grid-template-columns: 1fr !important;
}

body.vertical-layout .top-profile-bar {
  grid-template-columns: minmax(0, 1fr) auto;
}

body.vertical-layout .metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.vertical-layout .settings-row-panels {
  grid-template-columns: 1fr !important;
}

body.vertical-layout .settings-side-stack {
  grid-template-columns: 1fr !important;
}

body.vertical-layout .trade-form {
  grid-template-columns: 1fr !important;
}

body.vertical-layout .trade-table-wrapper,
body.vertical-layout .behavior-heatmap-table-wrap,
body.vertical-layout .feature-comparison {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

body.vertical-layout .weekly-bars {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.vertical-layout .market-tv-card .tradingview-terminal,
body.vertical-layout .tradingview-terminal {
  height: 360px;
}

body.vertical-layout .ai-assistant-layout {
  min-height: 420px;
}

/* Vertical monitor ? narrow width only: stack sidebar on top */
body.vertical-layout-stacked .shell-layout {
  grid-template-columns: 1fr !important;
  gap: 14px;
}

body.vertical-layout-stacked .sidebar {
  position: sticky;
  top: 8px;
  z-index: 30;
  gap: 10px;
  padding: 12px;
}

body.vertical-layout-stacked .brand .kicker,
body.vertical-layout-stacked .brand h2 {
  display: none;
}

body.vertical-layout-stacked .brand img {
  width: 36px;
  height: 36px;
}

body.vertical-layout-stacked .sidebar-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

body.vertical-layout-stacked .sidebar-nav button {
  padding: 8px 4px;
  font-size: 10px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 3px;
  min-height: 52px;
}

body.vertical-layout-stacked .sidebar-nav button span:first-child {
  font-size: 14px;
}

body.vertical-layout-stacked .sidebar-nav button:nth-child(n + 6) {
  display: grid !important;
}

body.vertical-layout-stacked .top-profile-bar,
body.vertical-layout-stacked .settings-row-panels,
body.vertical-layout-stacked .settings-layout {
  grid-template-columns: 1fr !important;
}

body.vertical-layout-stacked .section-header,
body.vertical-layout-stacked .journal-hub-header {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

@media (max-width: 900px) {
  body.vertical-layout:not(.vertical-layout-stacked) .sidebar {
    position: sticky;
    left: auto;
    right: auto;
    bottom: auto;
    top: 12px;
    display: grid;
  }

  body.vertical-layout:not(.vertical-layout-stacked) .brand,
  body.vertical-layout:not(.vertical-layout-stacked) .sync-status-card,
  body.vertical-layout:not(.vertical-layout-stacked) .language-control {
    display: flex;
  }

  body.vertical-layout:not(.vertical-layout-stacked) .language-control {
    display: grid;
  }

  body.vertical-layout-stacked .sidebar {
    position: sticky;
    left: auto;
    right: auto;
    bottom: auto;
    top: 8px;
    display: grid;
  }

  body.vertical-layout-stacked .brand,
  body.vertical-layout-stacked .sync-status-card,
  body.vertical-layout-stacked .language-control {
    display: flex;
  }

  body.vertical-layout-stacked .language-control {
    display: grid;
  }

  body.vertical-layout .app,
  body.vertical-layout-stacked .app {
    padding-bottom: 40px;
  }
}

/* Journal + analytics on vertical monitor */
body.vertical-layout {
  overflow-x: hidden;
}

body.vertical-layout .main-content {
  min-width: 0;
  max-width: 100%;
}

body.vertical-layout .journal-input-section.page.card,
body.vertical-layout .journal-table-section.page.card,
body.vertical-layout .weekly-section.page.card,
body.vertical-layout .sessions-analytics-section.page.card {
  padding: 20px 14px 24px;
}

body.vertical-layout .journal-hub-header {
  flex-wrap: wrap;
  gap: 10px;
}

body.vertical-layout .journal-hub-tabs {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.vertical-layout .journal-input-section .section-header,
body.vertical-layout .journal-table-section .section-header {
  flex-direction: column;
  align-items: stretch;
}

body.vertical-layout .journal-input-section .section-meta,
body.vertical-layout .journal-table-section .section-meta {
  display: none;
}

body.vertical-layout .form-row {
  grid-template-columns: 1fr !important;
}

body.vertical-layout .filters {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.vertical-layout .filters .ghost-button {
  grid-column: 1 / -1;
  justify-self: start;
}

body.vertical-layout .chip-presets,
body.vertical-layout .chip-list {
  gap: 6px;
}

body.vertical-layout .chip {
  font-size: 11px;
  padding: 4px 8px;
}

body.vertical-layout .trade-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  margin-top: 4px;
}

body.vertical-layout .trade-table-wrapper table {
  min-width: 860px;
}

body.vertical-layout .trade-table-wrapper thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(var(--accent-rgb), 0.16);
  backdrop-filter: blur(8px);
}

body.vertical-layout .comment-column {
  min-width: 120px;
  max-width: 160px;
}

body.vertical-layout .trade-calendar .calendar-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

body.vertical-layout .weekly-bars {
  min-height: 180px;
  gap: 10px;
}

body.vertical-layout .session-heatmap {
  grid-template-columns: 1fr !important;
}

@media (max-width: 720px) {
  body.vertical-layout .filters {
    grid-template-columns: 1fr !important;
  }
}

.tv-opinions-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tv-opinions-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tv-opinions-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tv-opinions-tabs {
  flex: 1 1 auto;
  min-width: 0;
}

.tv-opinions-sort {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tv-opinion-sort.is-active {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.12);
}

.tv-opinions-feed {
  display: grid;
  gap: 14px;
}

.tv-opinion-card {
  border: 1px solid var(--card-border);
  background: var(--inset-card-bg);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tv-opinion-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.tv-opinion-avatar,
.tv-opinion-avatar-fallback {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.tv-opinion-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--accent-rgb), 0.22);
  color: var(--text-primary);
  font-weight: 700;
}

.tv-opinion-author {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tv-opinion-author strong {
  font-size: 14px;
}

.tv-opinion-author span {
  font-size: 12px;
  color: var(--text-secondary);
}

.tv-opinion-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tv-opinion-text {
  margin: 0;
  line-height: 1.55;
  white-space: normal;
  color: var(--text-primary);
  font-size: 14px;
}

.tv-opinion-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tv-opinion-level {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(var(--accent-rgb), 0.06);
  min-width: 88px;
}

.tv-opinion-level small {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.tv-opinion-level strong {
  font-size: 13px;
  color: var(--text-primary);
}

.tv-opinion-level.is-entry {
  border-color: rgba(124, 242, 186, 0.25);
}

.tv-opinion-level.is-sl {
  border-color: rgba(255, 127, 127, 0.28);
}

.tv-opinion-level.is-tp {
  border-color: rgba(255, 143, 214, 0.28);
}

.tv-opinion-snapshot {
  align-self: flex-start;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  max-width: 220px;
}

.tv-opinion-snapshot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tv-opinion-translated-note {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.tv-opinion-foot {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-top: 4px;
  border-top: 1px solid var(--card-border);
}

.tv-opinion-stat {
  font-size: 13px;
  color: var(--text-secondary);
}

@media (max-width: 720px) {
  .tv-opinion-head {
    grid-template-columns: auto 1fr;
  }

  .tv-opinion-open {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

/* Trading Strategy */
.trading-strategy-section .strategy-tabs {
  flex-shrink: 0;
}

.strategy-tab-panel {
  display: none;
  margin-top: 20px;
}

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

.strategy-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.strategy-list-panel {
  border-radius: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  background: rgba(var(--accent-rgb), 0.04);
  padding: 14px;
}

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

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

.strategy-list {
  display: grid;
  gap: 8px;
  max-height: min(62vh, 520px);
  overflow-y: auto;
}

.strategy-list-item {
  display: grid;
  gap: 4px;
  text-align: left;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.strategy-list-item:hover,
.strategy-list-item.is-active {
  border-color: rgba(var(--accent-rgb), 0.42);
  background: rgba(var(--accent-rgb), 0.1);
}

.strategy-list-item strong {
  font-size: 13px;
}

.strategy-list-item span,
.strategy-list-item small {
  font-size: 11px;
  color: var(--text-secondary);
}

.strategy-editor-panel {
  border-radius: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  background: rgba(var(--accent-rgb), 0.03);
  padding: 16px;
  min-height: 280px;
}

.strategy-form.hidden,
.strategy-form-footer.hidden,
.strategy-empty-state.hidden {
  display: none !important;
}

.strategy-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 260px;
  padding: 24px 16px;
  text-align: center;
}

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

.strategy-form-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.12);
}

.workspace-step-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}

.workspace-step-progress-step {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.workspace-step-progress-step span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  background: rgba(0, 0, 0, 0.18);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.workspace-step-progress-step strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}

.workspace-step-progress-step.is-active,
.workspace-step-progress-step.is-complete {
  border-color: rgba(var(--accent-rgb), 0.42);
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--text-primary);
}

.workspace-step-progress-step.is-active span,
.workspace-step-progress-step.is-complete span {
  border-color: rgba(var(--accent-rgb), 0.48);
  background: rgba(var(--accent-rgb), 0.16);
  color: var(--text-primary);
}

.workspace-step-panel {
  min-width: 0;
}

.workspace-step-panel[hidden] {
  display: none !important;
}

.workspace-step-panel.is-entering-forward {
  animation: trade-step-enter-forward 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.workspace-step-panel.is-entering-backward {
  animation: trade-step-enter-backward 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.workspace-step-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.workspace-step-head > span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
}

.workspace-step-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.workspace-step-head p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
}

.workspace-step-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.1);
  color: #fecaca;
  font-size: 13px;
}

.workspace-step-error[hidden] {
  display: none !important;
}

.workspace-step-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.workspace-step-footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.workspace-step-counter {
  min-width: 52px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.strategy-form .workspace-step-panel .strategy-discipline-block {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.strategy-form input.is-wizard-invalid,
.strategy-form label.is-wizard-invalid input,
.ideas-form .ideas-field.is-invalid input,
.ideas-form .ideas-field.is-invalid .ui-select-trigger,
.ideas-form .ideas-field.is-invalid select {
  border-color: rgba(239, 68, 68, 0.55) !important;
}

.ideas-form > .workspace-step-progress {
  margin-bottom: 2px;
}

.ideas-form .ideas-form-section.workspace-step-panel {
  animation: none;
}

.ideas-form .ideas-form-section.workspace-step-panel.is-entering-forward {
  animation: trade-step-enter-forward 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.ideas-form .ideas-form-section.workspace-step-panel.is-entering-backward {
  animation: trade-step-enter-backward 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@media (max-width: 900px) {
  .workspace-step-progress {
    gap: 6px;
  }

  .workspace-step-progress-step {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 8px 6px;
    text-align: center;
  }

  .workspace-step-progress-step strong {
    display: none;
  }

  .workspace-step-footer,
  .workspace-step-footer-nav {
    width: 100%;
  }

  .workspace-step-footer-nav {
    margin-left: 0;
  }

  .workspace-step-footer-nav > .primary-button,
  .workspace-step-footer-nav > .ghost-button {
    flex: 1 1 auto;
  }
}

body.reduced-motion .workspace-step-panel,
body.reduced-motion .ideas-form .ideas-form-section.workspace-step-panel {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .workspace-step-panel,
  .ideas-form .ideas-form-section.workspace-step-panel {
    animation: none !important;
  }
}

.strategy-form-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.35fr) minmax(260px, 1.8fr);
  gap: 12px;
}

.strategy-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.strategy-form input,
.strategy-form textarea {
  width: 100%;
}

.strategy-discipline-block {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.12);
}

.strategy-discipline-block h4 {
  margin: 0 0 4px;
  font-size: 14px;
}

.strategy-discipline-block .routine-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.strategy-discipline-block .routine-form label {
  min-width: 0;
}

.strategy-discipline-block .routine-form input {
  min-width: 0;
}

.strategy-discipline-block .routine-form-actions {
  flex-shrink: 0;
}

.strategy-discipline-list {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.strategy-discipline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  background: rgba(var(--accent-rgb), 0.06);
  font-size: 13px;
}

.trading-strategy-section .strategy-btn {
  border-radius: 12px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
  transform: none;
}

.trading-strategy-section .strategy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.14);
}

.trading-strategy-section .strategy-btn-compact {
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 10px;
  flex-shrink: 0;
}

.trading-strategy-section .strategy-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  color: var(--text-primary);
}

.trading-strategy-section .strategy-btn-secondary:hover {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.38);
}

.trading-strategy-section .strategy-list-head {
  flex-direction: column;
  align-items: stretch;
}

.trading-strategy-section .strategy-list-head h3 {
  width: 100%;
}

.trading-strategy-section .strategy-form input,
.trading-strategy-section .strategy-form textarea {
  border-radius: 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  background: rgba(0, 0, 0, 0.22);
  padding: 10px 12px;
  box-shadow: none;
  line-height: 1.55;
}

.trading-strategy-section .strategy-form textarea {
  min-height: 120px;
  overflow: hidden;
  resize: vertical;
  white-space: pre-wrap;
}

.trading-strategy-section .strategy-discipline-block .ghost-button {
  border-radius: 10px;
  box-shadow: none;
}

@media (min-width: 520px) {
  .trading-strategy-section .strategy-list-head {
    flex-direction: row;
    align-items: center;
  }
}

@media (max-width: 900px) {
  .account-profile-form-grid {
    grid-template-columns: 1fr;
  }

  .account-profile-switcher,
  .account-profile-summary {
    width: 100%;
    max-width: none;
  }

  .strategy-layout {
    grid-template-columns: 1fr;
  }

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

/* Security, web download banner, prop templates & breach modal */
.settings-security-panel .security-block + .security-block {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-security-panel h4 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}

.security-provider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.security-provider-row + .security-provider-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.security-provider-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.security-devices-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 12px;
}

.settings-security-panel .security-block .settings-field-hint {
  margin: 0 0 4px;
  line-height: 1.4;
}

.settings-security-panel .security-block--password {
  display: flex;
  align-items: center;
  margin-top: 16px;
}

.security-device-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.security-device-row.is-current {
  border-color: rgba(60, 187, 126, 0.35);
}

.security-device-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.82rem;
  opacity: 0.78;
}

.security-device-region {
  color: rgba(120, 190, 255, 0.95);
}

.web-download-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12000;
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(5, 4, 10, 0.72);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.web-download-banner-inner {
  pointer-events: auto;
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 16, 28, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.web-download-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.account-prop-template-field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.account-profile-summary .prop-analytics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.prop-analytics-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.55rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary, rgba(226, 232, 240, 0.72));
}

.prop-analytics-pill.is-danger {
  background: rgba(214, 76, 76, 0.12);
  border-color: rgba(226, 87, 76, 0.22);
  color: #ff9a9a;
}

.prop-analytics-pill.is-warning {
  background: rgba(255, 180, 80, 0.1);
  border-color: rgba(255, 180, 80, 0.22);
  color: #ffd099;
}

.prop-analytics-pill.is-positive {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.22);
  color: color-mix(in srgb, var(--accent-primary) 72%, #fff);
}

/* ===== Prop Challenge dashboard (FundingPips-style) ===== */
.prop-open-btn {
  position: relative;
  margin-top: 2px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.62rem 2.1rem 0.62rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--accent-primary);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: none;
  transition: filter 0.15s ease, background 0.15s ease;
}
.prop-open-btn .prop-open-btn-icon {
  display: inline-flex;
  width: 15px;
  height: 15px;
  opacity: 0.92;
  flex: 0 0 auto;
}
.prop-open-btn .prop-open-btn-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.prop-open-btn::after {
  content: "?";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-52%);
  font-size: 1.15rem;
  font-weight: 500;
  opacity: 0.7;
}
.prop-open-btn:hover {
  filter: brightness(1.06);
  box-shadow: none;
}
.prop-open-btn:active {
  transform: none;
  filter: brightness(0.98);
}

.prop-challenge-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.prop-challenge-section .pl-pos { color: #8ef0bf; }
.prop-challenge-section .pl-neg { color: #ff9a9a; }

/* Phase stepper */
.prop-phases {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 0.4rem;
}
.prop-phase-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: #f2eef8;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
  text-align: left;
}
.prop-phase-step:active { transform: scale(0.98); }
.prop-phase-num {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.prop-phase-meta { display: flex; flex-direction: column; line-height: 1.15; }
.prop-phase-label { font-size: 0.85rem; font-weight: 800; }
.prop-phase-sub { font-size: 0.68rem; opacity: 0.6; }
.prop-phase-line { flex: 0 0 14px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); }
.prop-phase-step.is-current { border-color: rgba(132, 87, 255, 0.55); background: rgba(132, 87, 255, 0.12); }
.prop-phase-step.is-current .prop-phase-num { background: linear-gradient(140deg, #8457ff, #b79bff); border-color: transparent; color: #fff; }
.prop-phase-step.is-done .prop-phase-num { background: linear-gradient(140deg, #3cbb7e, #6ff0b6); border-color: transparent; color: #05231a; }
.prop-phase-step.is-done .prop-phase-label { opacity: 0.85; }
.prop-phase-step.is-todo { opacity: 0.55; }
.prop-phase-hint { margin: 0 0 1rem; font-size: 0.72rem; opacity: 0.5; text-align: center; }

.prop-status {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 1rem;
}
.prop-status-dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06); }
.prop-status-text { flex: 1; }
.prop-status-text strong { display: block; font-size: 1.05rem; }
.prop-status-text p { margin: 0.15rem 0 0; font-size: 0.82rem; opacity: 0.7; }
.prop-status-balance { font-size: 1.35rem; font-weight: 800; letter-spacing: 0.01em; }
.prop-status.is-live .prop-status-dot { background: #3cbb7e; }
.prop-status.is-warn .prop-status-dot { background: #ffb450; }
.prop-status.is-breached .prop-status-dot { background: #e2574c; }
.prop-status.is-passed .prop-status-dot { background: #6aa2ff; }
.prop-status.is-live { border-color: rgba(60, 187, 126, 0.35); background: rgba(60, 187, 126, 0.08); }
.prop-status.is-warn { border-color: rgba(255, 180, 80, 0.35); background: rgba(255, 180, 80, 0.08); }
.prop-status.is-breached { border-color: rgba(226, 87, 76, 0.4); background: rgba(226, 87, 76, 0.1); }
.prop-status.is-passed { border-color: rgba(106, 162, 255, 0.4); background: rgba(106, 162, 255, 0.1); }

/* Section subheads */
.prop-subhead { margin: 1.3rem 0 0.7rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.55; }

/* Cards */
.prop-card {
  padding: 1.1rem 1.2rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.prop-card header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.8rem; }
.prop-card-title { font-size: 0.85rem; font-weight: 700; opacity: 0.85; }
.prop-card header b { font-size: 1.05rem; white-space: nowrap; }
.prop-card-note { margin: 0.4rem 0 0; font-size: 0.8rem; opacity: 0.65; }
.prop-target-card { background: linear-gradient(140deg, rgba(60, 187, 126, 0.08), rgba(255, 255, 255, 0.03)); }

.prop-bar { height: 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.prop-bar-fill { display: block; height: 100%; border-radius: 999px; transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.prop-bar-fill.is-target { background: linear-gradient(90deg, #3cbb7e, #6ff0b6); }
.prop-bar-fill.is-safe { background: linear-gradient(90deg, #4f9dff, #6ff0b6); }
.prop-bar-fill.is-warning { background: linear-gradient(90deg, #ffb450, #ffd099); }
.prop-bar-fill.is-danger { background: linear-gradient(90deg, #e2574c, #ff9a9a); }

.prop-card footer { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.85rem; }
.prop-mini { display: flex; flex-direction: column; gap: 0.15rem; }
.prop-mini span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.55; }
.prop-mini b { font-size: 0.92rem; white-space: nowrap; }
.prop-mini:last-child { text-align: right; }
.prop-target-pct { font-size: 1.35rem; font-weight: 800; opacity: 0.85; }

.prop-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }

.prop-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}
.prop-tile {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}
.prop-tile span { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.6; }
.prop-tile strong { display: block; margin-top: 0.4rem; font-size: 1.25rem; font-weight: 800; white-space: nowrap; }

.prop-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}
.prop-stats-grid article {
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}
.prop-stats-grid span { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.55; }
.prop-stats-grid strong { display: block; margin-top: 0.35rem; font-size: 1.1rem; font-weight: 700; }

.prop-empty { text-align: center; padding: 2.5rem 1rem; }
.prop-empty-icon { font-size: 2.5rem; margin-bottom: 0.6rem; }
.prop-empty p { max-width: 420px; margin: 0 auto 1.1rem; opacity: 0.8; }

@media (max-width: 900px) {
  .prop-tiles, .prop-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prop-two { grid-template-columns: 1fr; }
  .prop-phase-sub { display: none; }
  .prop-phase-line { flex-basis: 8px; }
}

.prop-breach-card {
  max-width: 520px;
}

.prop-breach-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.prop-breach-analytics {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0 0.25rem;
}

.prop-breach-analytics .prop-analytics-pill {
  justify-self: start;
}

body.has-web-download-banner .main-content {
  padding-bottom: 7.5rem;
}

@media (max-width: 720px) {
  .web-download-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .security-provider-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ?? Wizard steps: stacked stage for smooth transitions ?? */
.welcome-wizard-stage {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 0;
  /* Only the active step should define height ? inactive steps used to stretch the card */
  align-content: start;
}

.welcome-wizard-modal .welcome-step {
  grid-area: 1 / 1;
  width: 100%;
  min-width: 0;
  align-self: start;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(18px);
  filter: blur(0);
  transition:
    opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.32s ease,
    visibility 0s linear 0.4s;
}

/* Collapse inactive steps so step 1 isn't as tall as step 3 */
.welcome-wizard-modal .welcome-step:not(.is-active):not(.is-leaving-forward):not(.is-leaving-back):not(.is-entering-forward):not(.is-entering-back) {
  position: absolute;
  inset: 0 auto auto 0;
  height: 0;
  max-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: none;
}

.welcome-wizard-modal .welcome-step.is-active {
  position: relative;
  height: auto;
  max-height: none;
  overflow: visible;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  filter: none;
  transition-delay: 0s, 0s, 0s, 0s;
  z-index: 1;
}

.welcome-wizard-modal .welcome-step.is-leaving-forward,
.welcome-wizard-modal .welcome-step.is-leaving-back {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  opacity: 0;
  visibility: visible;
  pointer-events: none;
  filter: blur(1.5px);
  z-index: 2;
  transition-delay: 0s;
}

.welcome-wizard-modal .welcome-step.is-leaving-forward {
  transform: translateX(-28px);
}

.welcome-wizard-modal .welcome-step.is-leaving-back {
  transform: translateX(28px);
}

.welcome-wizard-modal .welcome-step.is-entering-forward {
  animation: wizardStepEnterFwd 0.44s cubic-bezier(0.22, 1, 0.36, 1);
}

.welcome-wizard-modal .welcome-step.is-entering-back {
  animation: wizardStepEnterBack 0.44s cubic-bezier(0.22, 1, 0.36, 1);
}

.account-wizard-modal .account-wizard-step:not(.is-active) {
  display: none;
}

.welcome-wizard-modal .welcome-wizard-card {
  width: min(720px, calc(100vw - 40px));
  max-height: min(92vh, 720px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 28px 14px;
  border-radius: 28px;
}

.welcome-wizard-modal.welcome-wizard-step-1 .welcome-wizard-card,
.welcome-wizard-modal.welcome-wizard-step-2 .welcome-wizard-card {
  width: min(640px, calc(100vw - 40px));
  max-height: none;
}

.welcome-wizard-brand {
  display: grid;
  justify-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.welcome-wizard-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: contain;
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.12);
}

.welcome-wizard-brand .welcome-progress {
  width: min(380px, 100%);
  grid-template-columns: repeat(2, 1fr);
}

.welcome-wizard-modal .welcome-progress span.is-active {
  background: linear-gradient(90deg, var(--accent-primary), var(--cyan));
}

.welcome-wizard-modal .welcome-progress span.is-done {
  background: rgba(60, 187, 126, 0.85);
}

.welcome-wizard-modal .welcome-step-copy {
  margin-bottom: 8px;
}

.welcome-wizard-modal .welcome-step-copy .kicker {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.1em;
  margin: 0 0 4px;
}

.welcome-wizard-modal .welcome-step-copy h2 {
  max-width: none;
  margin: 0 0 4px;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.welcome-wizard-modal .welcome-step-copy .subtitle {
  margin: 0;
  max-width: 56ch;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0;
}

.welcome-step-copy-center {
  text-align: center;
}

.welcome-step-copy-center .subtitle {
  margin-inline: auto;
}

.welcome-wizard-modal .welcome-wizard-card {
  transition: width 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes wizardStepEnterFwd {
  from { opacity: 0; transform: translateX(30px); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: none; }
}

@keyframes wizardStepEnterBack {
  from { opacity: 0; transform: translateX(-30px); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: none; }
}

.welcome-wizard-card.is-hiding {
  opacity: 0;
  transform: scale(0.98) translateY(-10px);
  pointer-events: none;
  transition:
    opacity 0.36s ease,
    transform 0.36s cubic-bezier(0.4, 0, 0.2, 1);
}

.welcome-complete-splash {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 22px;
  width: min(640px, 100%);
  min-height: 280px;
  padding: 36px 28px;
  text-align: center;
  opacity: 0;
  transform: scale(0.94) translateY(18px);
  transition:
    opacity 0.72s ease,
    transform 0.82s cubic-bezier(0.22, 1, 0.36, 1);
}

.welcome-complete-splash.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.welcome-complete-splash.is-exiting {
  opacity: 0;
  transform: scale(1.03) translateY(-12px);
  transition-duration: 0.56s;
}

.welcome-complete-splash-glow {
  position: absolute;
  inset: 10% 8%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.28), transparent 68%);
  filter: blur(18px);
  opacity: 0;
  animation: welcome-complete-glow-in 1.4s ease 0.1s forwards;
  pointer-events: none;
}

.welcome-complete-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 48px rgba(139, 92, 246, 0.24);
  opacity: 0;
  transform: scale(0.82);
  animation: welcome-complete-logo-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.08s forwards;
}

.welcome-complete-title {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 16ch;
  font-size: clamp(28px, 5.2vw, 44px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #ffffff 0%, #dbeafe 42%, #a78bfa 78%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(10px);
  animation: welcome-complete-title-in 1.05s cubic-bezier(0.22, 1, 0.36, 1) 0.22s forwards;
}

@keyframes welcome-complete-glow-in {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes welcome-complete-logo-in {
  from {
    opacity: 0;
    transform: scale(0.82) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes welcome-complete-title-in {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(10px);
    letter-spacing: 0.06em;
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
    letter-spacing: -0.04em;
  }
}

/* ??? 1 ? ????: ??? ?? ?????????? ????, ??? ? auth-?????? ?? ???? 2 */
.welcome-lang-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.welcome-lang-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

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

.welcome-lang-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  text-align: left;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.18s ease;
}

.welcome-lang-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.055);
  transform: translateY(-1px);
}

.welcome-lang-card.is-active {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.16), rgba(34, 211, 238, 0.08));
  box-shadow: 0 10px 28px rgba(var(--accent-rgb), 0.12);
}

.welcome-lang-badge {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.welcome-lang-card.is-active .welcome-lang-badge {
  background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.85), rgba(34, 211, 238, 0.55));
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.28);
}

.welcome-lang-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.welcome-lang-meta strong {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.3;
}

.welcome-lang-meta em {
  font-style: normal;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.35;
  letter-spacing: 0;
}

.welcome-lang-check {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  opacity: 0.55;
  position: relative;
  flex: none;
}

.welcome-lang-card.is-active .welcome-lang-check {
  opacity: 1;
  border-color: transparent;
  background: linear-gradient(135deg, #4ade80, #22d3ee);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.14);
}

.welcome-lang-card.is-active .welcome-lang-check::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 9px;
  border: solid #041018;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* legacy class kept for older markup / animations */
.welcome-lang-hint {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.welcome-profile-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.welcome-auth-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 2px;
}

.welcome-auth-panel .welcome-auth-divider,
.welcome-auth-panel .welcome-auth-field,
.welcome-auth-panel .welcome-auth-status {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .welcome-auth-panel {
    grid-template-columns: 1fr;
  }
}

/* ??????????? ????? ? ??????? ?? ????? */
.welcome-wizard-modal .welcome-auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 2px;
  opacity: 1;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.welcome-wizard-modal .welcome-auth-divider::before,
.welcome-wizard-modal .welcome-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.28), transparent);
}

.welcome-auth-field {
  display: grid;
  gap: 8px;
  margin: 0;
  min-width: 0;
}

.welcome-auth-field > span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  line-height: 1.3;
}

.welcome-auth-field .table-edit-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
  padding: 13px 15px;
  border-radius: 13px;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.welcome-auth-field .table-edit-input:focus {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.6);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.16);
}

.welcome-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  min-height: 50px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.welcome-auth-btn-icon {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  display: block;
}

.welcome-auth-btn-label {
  display: inline-block;
  line-height: 1.25;
  white-space: nowrap;
}

.welcome-auth-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.welcome-auth-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.995);
}

.welcome-auth-btn:disabled {
  opacity: 0.72;
  cursor: wait;
}

.welcome-auth-btn--telegram {
  color: #fff;
  background: linear-gradient(135deg, #33b7f5, #2298d4);
  border-color: rgba(42, 171, 238, 0.5);
  box-shadow: 0 12px 30px rgba(42, 171, 238, 0.28);
}

.welcome-auth-btn--telegram:hover:not(:disabled) {
  box-shadow: 0 16px 36px rgba(42, 171, 238, 0.36);
}

.welcome-auth-btn--google {
  color: var(--text-primary);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.045));
  border-color: rgba(255, 255, 255, 0.14);
}

.welcome-auth-btn--google:hover:not(:disabled) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.06));
  border-color: rgba(255, 255, 255, 0.22);
}

.welcome-auth-btn.is-connected {
  box-shadow: inset 0 0 0 2px rgba(96, 220, 140, 0.55);
}

.welcome-auth-field.is-connected .table-edit-input {
  border-color: rgba(96, 220, 140, 0.45);
}

.welcome-auth-status {
  margin: 0;
  min-height: 18px;
  font-size: 13px;
  color: #fca5a5;
}

.welcome-auth-status.is-waiting {
  color: rgba(226, 232, 240, 0.78);
}

.welcome-auth-status:empty {
  min-height: 0;
}

.welcome-profile-block {
  margin-top: 4px;
  padding-top: 20px;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.28), transparent) 1;
}

.welcome-profile-panel {
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  background: linear-gradient(140deg, rgba(var(--accent-rgb), 0.08), rgba(255, 255, 255, 0.02));
}

.welcome-profile-orb,
.profile-preview-orb {
  width: 72px;
  height: 72px;
  aspect-ratio: 1;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 28px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  flex: 0 0 72px;
}

.personal-profile-insights {
  display: grid;
  gap: 14px;
}

.personal-profile-preview-strip {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 0% 0%, rgba(var(--accent-rgb), 0.12), transparent 42%),
    rgba(255, 255, 255, 0.035);
}

.personal-profile-preview-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

/* ???????? ?????? ??????? ? ??????? ???????, ????? mobile min-height ?? button ?????? ?????????? */
.profile-avatar-upload {
  position: relative;
  box-sizing: border-box;
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  max-width: 72px;
  max-height: 72px;
  aspect-ratio: 1;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 22px;
  display: grid;
  place-items: center;
  line-height: 0;
  overflow: hidden;
  flex: 0 0 72px;
  align-self: center;
}

.profile-avatar-upload .profile-preview-orb,
.profile-avatar-upload .personal-profile-preview {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  flex: none;
  border-radius: inherit;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: filter 0.18s ease, transform 0.18s ease;
}

.profile-avatar-upload:hover .profile-preview-orb {
  filter: brightness(0.72);
  transform: translateY(-1px);
}

.profile-avatar-upload-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  padding: 6px;
  color: #fff;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.profile-avatar-upload:hover .profile-avatar-upload-hint,
.profile-avatar-upload:focus-visible .profile-avatar-upload-hint {
  opacity: 1;
}

.profile-avatar-remove {
  justify-self: start;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-secondary);
}

.profile-avatar-remove:hover {
  color: #ff6b6b;
}

.personal-profile-preview-copy strong {
  font-size: 18px;
  letter-spacing: -0.02em;
}

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

.personal-profile-insight-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 88px;
  padding: 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}

.personal-profile-insight-card span {
  display: block;
  width: 100%;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-align: center;
}

.personal-profile-insight-card strong {
  display: block;
  width: 100%;
  font-size: 22px;
  letter-spacing: -0.04em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.personal-profile-subscription {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 100% 0%, rgba(212, 175, 55, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.03);
}

.personal-profile-subscription-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.personal-profile-subscription-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.personal-profile-subscription-expiry {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text-primary);
}

.personal-profile-renew-btn {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 18px;
  text-align: center;
}

.personal-profile-linked {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.personal-profile-linked-desc {
  margin: -2px 0 4px;
}

.personal-profile-linked-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.personal-profile-linked-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.personal-profile-linked-item {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.personal-profile-linked-item strong {
  font-size: 13px;
}

.personal-profile-linked-btn {
  flex: 0 0 auto;
  min-height: 36px;
  border-radius: 999px;
}

.personal-profile-linked-settings {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  margin-top: 8px;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #2a2a34;
  color: #cfcfd6;
  background: #15151c;
  font: inherit;
  font-size: 12px;
  opacity: 1;
  cursor: pointer;
}

.personal-profile-linked-settings:hover {
  border-color: #3a3a46;
  color: #fff;
  background: #1b1b24;
}

.personal-profile-modal .personal-profile-name-field {
  display: grid;
  gap: 8px;
  margin: 4px 0 8px;
}

.personal-profile-modal .personal-profile-name-field > span {
  color: #9a9aa6;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.personal-profile-modal .personal-profile-name-field .table-edit-input,
.personal-profile-modal #personalProfileName {
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #2a2a34;
  color: #f0f0f2;
  background: #15151c;
  font-size: 15px;
  line-height: 1.3;
  box-shadow: none;
}

.personal-profile-modal .personal-profile-name-field .table-edit-input:focus,
.personal-profile-modal #personalProfileName:focus {
  border-color: #666674;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .04);
}

@media (max-width: 640px) {
  .personal-profile-insights-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.welcome-avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 10px;
  max-height: 220px;
  overflow: auto;
  padding-right: 4px;
}

.profile-avatar-option {
  border-radius: 16px;
}

.welcome-style-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.welcome-style-pill,
.welcome-style-picker button {
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  cursor: pointer;
}

.welcome-style-pill.is-active,
.welcome-style-picker button.is-active {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.14);
}

.welcome-wizard-actions,
.account-wizard-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
  padding-top: 8px;
  margin-top: auto;
}

.welcome-wizard-modal .welcome-wizard-stage {
  flex: 1 1 auto;
  overflow: auto;
}

.welcome-wizard-modal.welcome-wizard-step-1 .welcome-wizard-stage,
.welcome-wizard-modal.welcome-wizard-step-2 .welcome-wizard-stage {
  overflow: visible;
  flex: 0 1 auto;
}

.account-wizard-modal .account-wizard-card {
  width: min(640px, 100%);
  max-height: min(88vh, 780px);
  overflow: auto;
}

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

.account-type-card {
  display: grid;
  gap: 6px;
  text-align: left;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  cursor: pointer;
}

.account-type-card.is-active {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.12);
}

.account-type-card small {
  color: var(--text-secondary);
  line-height: 1.35;
}

/* ?? Feature lock modal ?? */
.feature-lock-modal {
  z-index: 10050;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.feature-lock-modal:not(.hidden) {
  display: grid;
}

.feature-lock-modal.is-visible {
  opacity: 1;
}

.feature-lock-card {
  position: relative;
  width: min(420px, 100%);
  text-align: center;
  justify-items: center;
  padding-top: 28px;
  transform: scale(0.94) translateY(16px);
  opacity: 0;
  transition:
    transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease;
}

.feature-lock-modal.is-visible .feature-lock-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

body.reduced-motion .feature-lock-modal,
body.reduced-motion .feature-lock-card {
  transition: none;
}

body.reduced-motion .feature-lock-modal {
  opacity: 1;
}

body.reduced-motion .feature-lock-modal.is-visible .feature-lock-card,
body.reduced-motion .feature-lock-card {
  transform: none;
  opacity: 1;
}

.feature-lock-card h2 {
  max-width: none;
  width: 100%;
  margin: 0 0 10px;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-align: center;
}

.feature-lock-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.feature-lock-icon {
  font-size: 28px;
  margin-bottom: 6px;
}

.feature-lock-message {
  max-width: 34ch;
  margin-inline: auto;
}

.feature-lock-plan-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.feature-lock-actions {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

/* ?? Support chat card ?? */
.support-chat-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 20px 22px;
  margin-bottom: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.support-chat-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(var(--accent-rgb), 0.12);
  font-size: 22px;
}

.support-chat-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.support-chat-copy h3 {
  margin: 0;
  font-size: 18px;
}

.support-chat-link {
  justify-self: start;
  margin-top: 2px;
  text-decoration: none;
  display: inline-flex;
}

/* ?? Checkout layout fixes ?? */
.checkout-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
}

.checkout-main {
  display: grid;
  gap: 16px;
  width: 100%;
}

.checkout-aside {
  width: 100%;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.checkout-aside .referral-panel {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.checkout-aside .referral-panel .kicker {
  margin-bottom: 10px;
}

.checkout-aside .referral-panel .subtitle {
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.78;
}

.payment-method-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.payment-segment-shell .payment-method-tabs {
  flex-wrap: nowrap;
  gap: 4px;
  margin-bottom: 0;
  width: 100%;
}

.payment-method-tabs .ghost-button.is-active {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.12);
}

.payment-segment-shell .payment-method-tabs .ghost-button.is-active {
  border: none;
  background: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.crypto-checkout.checkout-yookassa-mode .checkout-box,
.crypto-checkout.checkout-platega-mode .checkout-box {
  display: none;
}

.crypto-checkout.checkout-yookassa-mode .checkout-main,
.crypto-checkout.checkout-platega-mode .checkout-main {
  grid-column: 1 / -1;
}

.crypto-checkout.checkout-yookassa-mode .checkout-aside,
.crypto-checkout.checkout-platega-mode .checkout-aside {
  grid-column: 1 / -1;
}

.crypto-checkout .checkout-layout {
  width: 100%;
}

/* ?? Web guest layout ?? */
body.is-web-guest .sync-status-card {
  display: none;
}

body.is-web-guest .app {
  padding-bottom: 96px;
}

body.is-web-guest.has-web-download-banner .app {
  padding-bottom: 150px;
}

body.is-web-guest .welcome-modal {
  place-items: center;
  align-content: center;
  justify-items: center;
  overflow-y: auto;
  padding: 24px 16px;
}

body.is-web-guest .welcome-wizard-modal .welcome-wizard-card {
  margin: auto;
}

body.is-web-guest .feature-lock-card,
body.is-web-guest .account-wizard-modal .account-wizard-card {
  max-height: none;
}

@media (max-width: 900px) {
  body.is-web-guest .sidebar-nav button:nth-child(n + 6) {
    display: flex;
  }

  body.is-web-guest .sidebar-nav {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  body.is-web-guest .sidebar-nav button {
    min-width: 72px;
    flex: 0 0 auto;
    font-size: 10px;
  }

  .welcome-lang-grid,
  .account-type-grid {
    grid-template-columns: 1fr;
  }

  .welcome-profile-panel {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .support-chat-card {
    grid-template-columns: 1fr;
  }

  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .top-profile-bar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .top-profile-controls,
  .top-profile-plan {
    align-items: stretch;
    text-align: left;
    border-left: none;
    padding-left: 0;
    max-width: none;
  }

  .account-profile-summary {
    text-align: left;
  }
}

/* ?? Plan entitlements ?? */
.sidebar-nav [data-route].is-feature-locked {
  opacity: 0.58;
}

.sidebar-nav [data-route].is-feature-locked[data-locked-plan]::after {
  content: attr(data-locked-plan);
  margin-left: auto;
  font-size: 9px;
  letter-spacing: 0.04em;
  opacity: 0.75;
}

.journal-hub-tabs .tab-button.is-feature-locked {
  opacity: 0.58;
}

.journal-limit-badge,
.core-ai-usage-badge,
.journal-analytics-banner {
  margin-top: 8px;
}

.is-entitlement-locked {
  position: relative;
  overflow: hidden;
  border-radius: inherit;
}

.is-entitlement-locked > :not(.entitlement-section-overlay) {
  pointer-events: none;
  user-select: none;
  filter: blur(11px) saturate(1.2) brightness(1.06);
  opacity: 0.52;
  transform: none;
}

.entitlement-section-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(26px) saturate(1.45) brightness(1.08);
  -webkit-backdrop-filter: blur(26px) saturate(1.45) brightness(1.08);
}

.entitlement-section-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(var(--accent-rgb), 0.16), transparent 52%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  pointer-events: none;
}

.entitlement-section-overlay-card {
  position: relative;
  z-index: 1;
  max-width: 360px;
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  background: rgba(var(--surface-rgb, 18, 20, 28), 0.96);
  text-align: center;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.entitlement-section-overlay-card p {
  margin: 10px 0 14px;
}

.ai-hub-premium-block.is-entitlement-locked {
  min-height: 280px;
}

.ai-hub-core-coach-block {
  display: grid;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 0% 0%, rgba(var(--accent-rgb), 0.1), transparent 42%),
    rgba(255, 255, 255, 0.03);
}

.ai-hub-core-coach-block.hidden {
  display: none;
}

.ai-hub-elite-block {
  position: relative;
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 22px 24px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.025);
}

.ai-hub-elite-block.is-entitlement-locked {
  min-height: 260px;
}

.ai-hub-tier-note {
  margin-top: 4px;
  max-width: 520px;
  opacity: 0.78;
}

.ai-coach-grid-basic {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.coach-card-basic {
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.discipline-priority-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
  padding: 20px 22px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.discipline-priority-panel.hidden {
  display: none;
}

.discipline-priority-copy {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.discipline-priority-copy h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

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

.discipline-priority-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.14);
}

.discipline-priority-card strong {
  font-size: 15px;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .discipline-priority-insights {
    grid-template-columns: 1fr;
  }
}

body.reduced-motion .is-entitlement-locked > :not(.entitlement-section-overlay) {
  filter: none;
  opacity: 0.42;
  transform: none;
}

/* Tabular numbers for trading stats (TradesViz-style scanability) */
.hero-live-metrics strong,
.checkout-amount,
.stat-row span:last-child,
.trade-table td:nth-child(n+5),
.weekly-value,
.score-index-value,
.insight-grid strong {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.profile-avatar-option {
  display: block;
  aspect-ratio: 1;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.profile-avatar-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.strategy-empty-hint {
  margin-top: 6px;
  opacity: 0.82;
}

body.is-web-guest .main-content {
  padding-bottom: 24px;
}

body.is-web-guest .entitlement-section-overlay {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(28px) saturate(1.35) brightness(1.06);
  -webkit-backdrop-filter: blur(28px) saturate(1.35) brightness(1.06);
}

body.is-web-guest .top-profile-controls {
  flex-wrap: wrap;
  gap: 10px;
}

body.is-web-guest .checkout-panel {
  padding: 14px;
  max-width: none;
}

body.is-web-guest .plan-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

body.is-web-guest .feature-comparison-scroll {
  margin-inline: -4px;
}

body.is-web-guest .ai-hub-section .section-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

body.is-web-guest .ai-assistant-layout {
  min-height: 360px;
}

@media (max-width: 720px) {
  body.is-web-guest .plan-grid {
    grid-template-columns: 1fr;
  }

  .feature-comparison-table {
    min-width: 560px;
  }

  .feature-comparison-head,
  .feature-comparison-row {
    padding-inline: 14px;
    gap: 8px;
  }
}

/* ?? Security modals ?? */
.security-modal {
  opacity: 0;
  transition: opacity 220ms ease;
}

.security-modal:not(.hidden) {
  display: grid;
  place-items: center;
  align-content: center;
  justify-items: center;
}

.security-modal.is-visible {
  opacity: 1;
}

.security-modal-card {
  width: min(440px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
}

.security-field-row {
  display: grid;
  gap: 8px;
  margin: 0;
}

.security-field-row > span {
  font-size: 13px;
  color: var(--text-secondary);
}

.security-field-row .table-edit-input {
  width: 100%;
  box-sizing: border-box;
}

.security-modal-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.security-modal-actions .ghost-button,
.security-modal-actions .primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 calc(50% - 5px);
  min-width: 140px;
  max-width: 220px;
  min-height: 42px;
  text-align: center;
}

.security-modal-actions:has(.primary-button.hidden) .ghost-button {
  flex: 0 1 auto;
  width: min(100%, 240px);
}

.settings-security-panel .security-inline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 18px;
  text-align: center;
}

.settings-security-panel .security-block h4 + .security-inline-btn {
  margin-top: 2px;
}

.security-modal-divider {
  text-align: center;
  opacity: 0.55;
  font-size: 12px;
  margin: 2px 0;
}

.security-oauth-btn {
  width: 100%;
}

.security-google-fallback.hidden {
  display: none !important;
}

.security-telegram-fallback.hidden {
  display: none !important;
}

.security-modal-card .security-field-row {
  margin: 0;
}

.security-modal-card .settings-field-hint {
  margin: 0;
  min-height: 18px;
}

.security-device-current-pill {
  flex-shrink: 0;
}

.security-revoke-others {
  margin-top: 10px;
}

/* ?? Checkout panel ? Apple-style ?? */
.checkout-panel {
  margin-top: 22px;
  padding: 32px clamp(20px, 4vw, 36px);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 50% -20%, rgba(var(--accent-rgb), 0.12), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 24px 64px rgba(0, 0, 0, 0.28);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.checkout-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  padding-bottom: 0;
  border-bottom: none;
}

.checkout-kicker-label {
  margin-bottom: 6px;
  opacity: 0.72;
}

.checkout-section-title {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.payment-segment-shell {
  display: inline-flex;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.payment-method-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin: 0;
}

.payment-method-tabs .ghost-button {
  border: none;
  border-radius: 11px;
  background: transparent;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  box-shadow: none;
}

.payment-method-tabs .ghost-button:hover {
  transform: none;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.payment-method-tabs .ghost-button.is-active {
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.checkout-plan-card {
  padding: 26px 28px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  display: grid;
  gap: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.checkout-plan-hero {
  display: grid;
  gap: 10px;
}

.checkout-plan-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.checkout-plan-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.checkout-price-block {
  display: grid;
  gap: 6px;
}

.checkout-amount {
  margin: 0;
  font-size: clamp(2.25rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--text-primary);
}

.checkout-amount-year {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
}

.checkout-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkout-savings {
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.checkout-instructions,
.checkout-expiry {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  line-height: 1.55;
  font-size: 15px;
  color: var(--text-secondary);
}

.checkout-crypto-panel .checkout-crypto-kicker {
  margin-bottom: 4px;
}

.checkout-foot {
  display: grid;
  gap: 14px;
  padding-top: 2px;
}

.checkout-status-banner {
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  line-height: 1.45;
  font-size: 14px;
}

.checkout-status-banner.is-error {
  border-color: rgba(255, 96, 96, 0.35);
  background: rgba(255, 96, 96, 0.1);
  color: #ffb4b4;
}

.checkout-status-banner.is-success {
  border-color: rgba(96, 220, 140, 0.35);
  background: rgba(96, 220, 140, 0.08);
}

.checkout-status-banner.is-info {
  border-color: rgba(var(--accent-rgb), 0.28);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--text-primary);
}

.checkout-actions {
  display: grid;
  gap: 10px;
  width: 100%;
}

.checkout-pay-button {
  width: 100%;
  min-height: 58px;
  padding: 18px 24px;
  border-radius: 16px;
  border: none;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #101014;
  background: #f5f5f7;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 12px 32px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.checkout-pay-button:hover {
  transform: translateY(-1px);
  background: #ffffff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 16px 40px rgba(0, 0, 0, 0.32);
}

.checkout-pay-button:active {
  transform: scale(0.985);
}

.checkout-renew-button {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
}

.checkout-promo {
  display: grid;
  gap: 10px;
  width: 100%;
}

.checkout-promo-toggle {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: transparent;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.checkout-promo-toggle:hover,
.checkout-promo-toggle.is-open {
  color: var(--text-primary);
  border-color: rgba(var(--accent-rgb), 0.35);
  background: rgba(var(--accent-rgb), 0.06);
}

.checkout-promo-panel {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.checkout-promo-panel.hidden {
  display: none;
}

.checkout-promo-field {
  display: grid;
  gap: 8px;
}

.checkout-promo-field span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.checkout-promo-status {
  margin: 0;
  font-size: 13px;
  color: #86efac;
}

.checkout-meta {
  margin: 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 36rem;
  justify-self: center;
}

.crypto-checkout.checkout-yookassa-mode .checkout-crypto-panel,
.crypto-checkout.checkout-platega-mode .checkout-crypto-panel {
  display: none;
}

.crypto-checkout.checkout-yookassa-mode .checkout-main,
.crypto-checkout.checkout-platega-mode .checkout-main {
  gap: 18px;
}

.crypto-checkout.checkout-yookassa-mode .checkout-aside,
.crypto-checkout.checkout-platega-mode .checkout-aside {
  grid-column: auto;
}

@media (max-width: 900px) {
  .checkout-head {
    flex-direction: column;
    align-items: stretch;
  }

  .payment-segment-shell {
    width: 100%;
  }

  .payment-method-tabs {
    width: 100%;
  }

  .payment-method-tabs .ghost-button {
    flex: 1 1 0;
    text-align: center;
    padding-inline: 10px;
  }

  .checkout-panel {
    padding: 20px;
    border-radius: 22px;
  }
}

/* ?? Checkout modal overlay ?? */
.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 10055;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 32px);
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.14), transparent 42%),
    rgba(4, 6, 14, 0.78);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  opacity: 0;
  transition: opacity 340ms cubic-bezier(0.22, 1, 0.36, 1);
}

.checkout-modal.hidden {
  display: none;
}

.checkout-modal:not(.hidden) {
  display: grid;
}

.checkout-modal.is-visible {
  opacity: 1;
}

.checkout-modal-card {
  position: relative;
  width: min(440px, calc(100vw - 32px));
  max-height: min(88vh, 720px);
  overflow: auto;
  margin: 0 auto;
  border-radius: 24px;
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition:
    transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 280ms cubic-bezier(0.22, 1, 0.36, 1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

.checkout-modal-card::before {
  display: none;
}

.checkout-modal.is-visible .checkout-modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.checkout-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.checkout-modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
  transform: scale(1.04);
}

.checkout-modal .checkout-panel {
  margin-top: 0;
  max-width: none;
}

.checkout-modal .checkout-head {
  padding-right: 36px;
}

.checkout-modal .checkout-layout {
  max-width: none;
  margin: 0;
}

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

.checkout-modal-card::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

@media (prefers-reduced-motion: reduce) {
  .checkout-modal,
  .checkout-modal-card {
    transition: none;
  }

  .checkout-modal-card {
    transform: none;
    opacity: 1;
  }
}

/* ?? Trading Ideas desk ?? */
.ideas-section-header {
  align-items: flex-start;
}

.ideas-btn-compact {
  flex-shrink: 0;
}

.ideas-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
  min-height: 520px;
}

.ideas-rail {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012)),
    rgba(6, 8, 18, 0.55);
}

.ideas-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.ideas-count-badge {
  min-width: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--accent-primary);
}

.ideas-list {
  display: grid;
  gap: 8px;
  align-content: start;
  max-height: 620px;
  overflow: auto;
  padding-right: 2px;
}

.ideas-list-item {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px 13px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.ideas-list-item:hover {
  border-color: rgba(var(--accent-rgb), 0.28);
  transform: translateY(-1px);
}

.ideas-list-item.is-active {
  border-color: rgba(var(--accent-rgb), 0.42);
  background: rgba(var(--accent-rgb), 0.1);
}

.ideas-list-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ideas-list-pair.is-muted {
  opacity: 0.55;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ideas-list-title.is-draft {
  opacity: 0.82;
  font-style: italic;
}

.ideas-editor-hint {
  margin: 0 0 4px;
  padding: 12px 14px 12px 42px;
  border-radius: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.ideas-list-pair {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.ideas-list-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ideas-list-status-dot.is-planned { background: #60a5fa; }
.ideas-list-status-dot.is-active { background: #34d399; }
.ideas-list-status-dot.is-closed { background: #94a3b8; }
.ideas-list-status-dot.is-archived { background: #64748b; }

.ideas-list-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
}

.ideas-list-meta {
  font-size: 11px;
  color: var(--text-secondary);
}

.ideas-canvas {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--accent-rgb), 0.08), transparent 38%),
    rgba(255, 255, 255, 0.02);
}

.ideas-empty-state {
  display: grid;
  gap: 14px;
  justify-items: start;
  padding: 28px 8px;
}

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

.ideas-form-top {
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
  gap: 14px;
}

.ideas-field {
  display: grid;
  gap: 8px;
}

.ideas-field > span:first-child {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.ideas-bias-strip,
.ideas-status-strip,
.ideas-outcome-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ideas-bias-btn,
.ideas-status-btn,
.ideas-outcome-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.ideas-bias-btn.is-active[data-direction="Long"],
.ideas-outcome-btn.is-active[data-outcome="Worked"] {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.12);
  color: #bbf7d0;
}

.ideas-bias-btn.is-active[data-direction="Short"],
.ideas-outcome-btn.is-active[data-outcome="Failed"] {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
}

.ideas-bias-btn.is-active[data-direction="Both"],
.ideas-status-btn.is-active,
.ideas-outcome-btn.is-active[data-outcome="Unknown"],
.ideas-outcome-btn.is-active[data-outcome="Partial"] {
  border-color: rgba(var(--accent-rgb), 0.42);
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--text-primary);
}

.ideas-tf-matrix {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ideas-tf-chip {
  min-width: 42px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.ideas-tf-chip.is-active {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.16);
  color: var(--text-primary);
}

.ideas-tf-custom {
  margin-top: 4px;
  max-width: 180px;
}

.ideas-meta-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.ideas-notes {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text-primary);
  font: inherit;
  line-height: 1.55;
}

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

.ideas-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  font-size: 11px;
}

.ideas-tag-chip button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.7;
}

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

.ideas-link-add {
  padding: 6px 12px;
  font-size: 11px;
}

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

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

.ideas-form-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.session-dot-frankfurt {
  background: #fbbf24;
}

@media (max-width: 960px) {
  .ideas-workspace {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 640px) {
  .ideas-meta-strip {
    grid-template-columns: 1fr;
  }
}

/* ?? Web install prompt (PWA) ?? */
.web-install-prompt {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 13000;
  width: min(352px, calc(100vw - 28px));
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.web-install-prompt:not(.hidden) {
  pointer-events: auto;
}

.web-install-prompt.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.web-install-prompt-card {
  position: relative;
  padding: 16px 16px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: color-mix(in srgb, var(--bg-secondary, #12101f) 92%, #000);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

.web-install-prompt-card::before {
  display: none;
}

.web-install-prompt-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.45);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.web-install-prompt-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.web-install-prompt-brand {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding-right: 28px;
}

.web-install-prompt-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #0a0a0f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
  flex: 0 0 auto;
}

.web-install-prompt-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.web-install-prompt-copy h3 {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text-primary, #f8fafc);
  line-height: 1.25;
}

.web-install-prompt-copy .subtitle {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--text-secondary, rgba(226, 232, 240, 0.62));
}

.web-install-prompt-actions {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 8px;
  margin-top: 14px;
  width: 100%;
}

.web-install-prompt-action-btn {
  width: 100%;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border-radius: 10px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.web-install-prompt-action-btn--primary,
.web-install-prompt-action-btn.primary-button {
  color: #fff !important;
  background: var(--accent-primary) !important;
  box-shadow: none !important;
  border: 1px solid transparent !important;
}

.web-install-prompt-action-btn--primary:hover,
.web-install-prompt-action-btn.primary-button:hover {
  filter: brightness(1.06);
  transform: none;
  box-shadow: none !important;
}

.web-install-prompt-action-btn--ghost,
.web-install-prompt-action-btn.ghost-button {
  color: var(--text-primary, rgba(255, 255, 255, 0.9)) !important;
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: none !important;
}

.web-install-prompt-action-btn--ghost:hover,
.web-install-prompt-action-btn.ghost-button:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: #fff !important;
}

.web-install-prompt-action-btn.is-ready {
  box-shadow: none !important;
}

.web-install-prompt-install-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  opacity: 0.9;
}

.web-install-prompt-hint {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary, rgba(226, 232, 240, 0.7));
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
}

.web-install-prompt-hint.hidden {
  display: none;
}

.web-install-prompt-never {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 4px 0 2px;
  border: 0;
  background: transparent;
  color: rgba(226, 232, 240, 0.48);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
}

.web-install-prompt-never:hover {
  color: rgba(226, 232, 240, 0.82);
}

body[data-theme="white"] .web-install-prompt-card {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
}

body[data-theme="white"] .web-install-prompt-copy h3 {
  color: #0f172a;
}

body[data-theme="white"] .web-install-prompt-copy .subtitle {
  color: #64748b;
}

body[data-theme="white"] .web-install-prompt-action-btn--primary,
body[data-theme="white"] .web-install-prompt-action-btn.primary-button {
  color: #fff !important;
}

body[data-theme="white"] .web-install-prompt-action-btn--ghost,
body[data-theme="white"] .web-install-prompt-action-btn.ghost-button {
  color: #0f172a !important;
  background: transparent !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
}

body[data-theme="white"] .web-install-prompt-close {
  background: transparent;
  color: #94a3b8;
}

body[data-theme="white"] .web-install-prompt-close:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #334155;
}

body[data-theme="white"] .web-install-prompt-never {
  color: #94a3b8;
}

body[data-theme="white"] .web-install-prompt-icon {
  border-color: rgba(15, 23, 42, 0.12);
  background: #f8fafc;
}

@media (max-width: 640px) {
  .web-install-prompt {
    right: 12px;
    left: 12px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: auto;
  }

  .web-install-prompt-card {
    padding: 14px 14px 11px;
    border-radius: 14px;
  }

  .web-install-prompt-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }

  .web-install-prompt-brand {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .web-install-prompt-copy h3 {
    font-size: 14.5px;
  }

  .web-install-prompt-actions {
    grid-template-columns: 1fr 1fr;
  }
}

/* ?? Subscriptions ? pricing cards (reference layout) ?? */
.subscriptions-section.subs-pricing {
  --subs-accent: #5d5fef;
  --subs-accent-soft: rgba(93, 95, 239, 0.14);
  --subs-card-bg: #111118;
  --subs-card-border: rgba(255, 255, 255, 0.08);
  --subs-card-text: #f8fafc;
  --subs-card-muted: rgba(248, 250, 252, 0.62);
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  padding: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 32px) clamp(32px, 5vw, 56px);
}

.subs-pricing .subs-pricing-hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  margin-bottom: 18px;
}

.subs-pricing .subs-pricing-title {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(2.2rem, 4.6vw, 3.1rem);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--text-primary);
}

.subs-pricing .subs-pricing-grid {
  width: 100%;
  margin: 0 0 4px;
  order: 1;
}

.subs-pricing .subs-pricing-controls {
  display: grid;
  justify-items: center;
  width: 100%;
  order: 2;
  margin-top: 6px;
}

.subs-pricing .subs-pricing-footer {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 10px;
  width: min(560px, 100%);
  order: 3;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.subs-pricing .subs-pricing-lead {
  margin: 0;
  max-width: 52ch;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.subs-pricing .subs-pricing-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 0;
}

.subs-pricing .subs-trust-item {
  font-size: 12px;
  color: var(--text-secondary);
}

.subs-pricing .subs-trust-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.subs-pricing .subs-current-badge {
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
}

.subs-pricing .subs-billing-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.subs-pricing .subs-billing-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 0;
  height: calc(100% - 8px);
  width: 0;
  border-radius: 999px;
  background: var(--subs-accent);
  box-shadow: 0 10px 28px rgba(93, 95, 239, 0.28);
  transform: translateX(0);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), width 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.subs-pricing .billing-tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 10px 18px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.22s ease;
}

.subs-pricing .billing-tab:hover {
  color: var(--text-primary);
}

.subs-pricing .billing-tab.is-active {
  color: #fff;
  background: transparent;
  box-shadow: none;
}

.subs-pricing .subs-billing-save {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

.subs-pricing .billing-tab:not(.is-active) .subs-billing-save {
  color: var(--subs-accent);
  background: var(--subs-accent-soft);
}

.subs-pricing .subs-pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.subs-pricing .subs-pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 700px;
  padding: 44px 26px 40px;
  border-radius: 28px;
  background: var(--subs-card-bg);
  border: 1px solid var(--subs-card-border);
  box-shadow: none;
  color: var(--subs-card-text);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.subs-pricing .subs-pricing-card::before,
.subs-pricing .subs-pricing-card::after,
.subs-pricing .subs-pricing-card.plan-featured::before,
.subs-pricing .subs-pricing-card.plan-elite::before,
.subs-pricing .subs-pricing-card.plan-elite::after {
  display: none;
}

.subs-pricing .subs-pricing-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.subs-pricing .subs-pricing-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.subs-pricing .subs-pricing-name {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--subs-card-text);
}

.subs-pricing .subs-pricing-name-row .subs-pricing-name {
  margin-bottom: 0;
}

.subs-pricing .subs-pricing-popular {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.14);
}

.subs-pricing .subs-pricing-desc {
  margin: 0 0 40px;
  min-height: 64px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--subs-card-muted);
}

.subs-pricing .subs-pricing-price-wrap {
  margin-bottom: 10px;
  margin-top: 4px;
}

.subs-pricing .subs-pricing-price {
  margin: 0;
  font-size: clamp(1.75rem, 2.8vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--subs-card-text);
  transform-origin: left center;
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), filter 0.22s ease;
}

.subs-pricing .subs-pricing-billed {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--subs-card-muted);
  transition: opacity 0.2s ease, transform 0.22s ease, max-height 0.22s ease;
}

.subs-pricing .subs-pricing-save {
  min-height: 18px;
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  color: #86efac;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.subs-pricing .subs-pricing-save.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.subs-pricing .subs-pricing-price.is-price-out,
.subs-pricing .subs-pricing-billed.is-price-out,
.subs-pricing .subs-pricing-save.is-price-out {
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  filter: blur(2px);
}

.subs-pricing .subs-pricing-price.is-price-in,
.subs-pricing .subs-pricing-billed.is-price-in {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  animation: subsPriceIn 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes subsPriceIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

body.reduced-motion .subs-pricing .subs-billing-indicator,
body.reduced-motion .subs-pricing .subs-pricing-price,
body.reduced-motion .subs-pricing .subs-pricing-billed,
body.reduced-motion .subs-pricing .subs-pricing-save {
  transition: none !important;
  animation: none !important;
}

.subs-pricing .subs-pricing-btn {
  width: 100%;
  margin: 16px 0 48px;
  padding: 16px 18px;
  border: none;
  border-radius: 999px;
  background: var(--subs-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(93, 95, 239, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.subs-pricing .subs-pricing-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(93, 95, 239, 0.34);
}

.subs-pricing .subs-pricing-btn--invert {
  background: #fff;
  color: var(--subs-accent);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.subs-pricing .subs-pricing-btn--invert:hover {
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
}

.subs-pricing .subs-pricing-features {
  margin: auto 0 0;
  padding: 20px 0 0;
  list-style: none;
  display: grid;
  gap: 18px;
}

.subs-pricing .subs-pricing-features li {
  position: relative;
  padding-left: 26px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--subs-card-text);
}

.subs-pricing .subs-pricing-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2L6.4 11.1L12.5 5' stroke='%235d5fef' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 12px 12px no-repeat,
    rgba(93, 95, 239, 0.12);
}

.subs-pricing .subs-pricing-card--featured {
  background: var(--subs-accent);
  border-color: transparent;
  box-shadow: 0 24px 64px rgba(93, 95, 239, 0.34);
}

.subs-pricing .subs-pricing-card--featured:hover {
  border-color: transparent;
  box-shadow: 0 28px 72px rgba(93, 95, 239, 0.4);
}

.subs-pricing .subs-pricing-card--featured,
.subs-pricing .subs-pricing-card--featured .subs-pricing-name,
.subs-pricing .subs-pricing-card--featured .subs-pricing-desc,
.subs-pricing .subs-pricing-card--featured .subs-pricing-price,
.subs-pricing .subs-pricing-card--featured .subs-pricing-billed,
.subs-pricing .subs-pricing-card--featured .subs-pricing-features li {
  color: #fff;
}

.subs-pricing .subs-pricing-card--featured .subs-pricing-desc,
.subs-pricing .subs-pricing-card--featured .subs-pricing-billed {
  color: rgba(255, 255, 255, 0.78);
}

.subs-pricing .subs-pricing-card--featured .subs-pricing-save {
  color: #ecfccb;
}

.subs-pricing .subs-pricing-card--featured .subs-pricing-features li::before {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2L6.4 11.1L12.5 5' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 12px 12px no-repeat,
    rgba(255, 255, 255, 0.16);
}

.subs-pricing .subs-pricing-card.is-current-plan {
  box-shadow: inset 0 0 0 2px rgba(93, 95, 239, 0.45);
}

.subs-pricing .subs-pricing-card--featured.is-current-plan {
  box-shadow:
    0 24px 64px rgba(93, 95, 239, 0.34),
    inset 0 0 0 2px rgba(255, 255, 255, 0.42);
}

.subs-pricing .subs-pricing-card.is-selected-plan:not(.subs-pricing-card--featured) {
  border-color: rgba(93, 95, 239, 0.42);
  box-shadow: 0 0 0 1px rgba(93, 95, 239, 0.2);
}

body[data-theme="white"] .subscriptions-section.subs-pricing {
  --subs-card-bg: #ffffff;
  --subs-card-border: rgba(15, 23, 42, 0.1);
  --subs-card-text: #0f172a;
  --subs-card-muted: #64748b;
  background: transparent;
}

body[data-theme="white"] .subs-pricing .subs-billing-pill {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
}

body[data-theme="white"] .subs-pricing .billing-tab.is-active {
  color: #fff;
}

body[data-theme="white"] .subs-pricing .subs-pricing-card--featured,
body[data-theme="white"] .subs-pricing .subs-pricing-card--featured .subs-pricing-name,
body[data-theme="white"] .subs-pricing .subs-pricing-card--featured .subs-pricing-features li {
  color: #fff;
}

@media (max-width: 1100px) {
  .subs-pricing .subs-pricing-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  .subs-pricing .subs-pricing-card {
    min-height: 640px;
  }
}

@media (max-width: 640px) {
  .subs-pricing .subs-pricing-card {
    min-height: 0;
  }

  .subs-pricing .subs-billing-pill {
    width: 100%;
    justify-content: stretch;
    flex-wrap: wrap;
    border-radius: 18px;
  }

  .subs-pricing .billing-tab {
    flex: 1;
    justify-content: center;
    min-width: calc(50% - 4px);
  }

  .subs-pricing .billing-tab--yearly {
    flex-basis: 100%;
  }
}

/* Subscriptions page tabs */
.subs-pricing .subs-page-tabs {
  display: flex;
  justify-content: center;
  width: fit-content;
  gap: 4px;
  margin: 22px auto 0;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.subs-pricing .subs-page-tab {
  min-width: 148px;
  padding: 11px 20px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.subs-pricing .subs-page-tab:hover {
  color: var(--text-primary);
}

.subs-pricing .subs-page-tab.is-active {
  color: #fff;
  background: var(--subs-accent, #5d5fef);
  box-shadow: 0 10px 28px rgba(93, 95, 239, 0.24);
}

.subs-pricing .subs-tab-panel {
  display: none;
}

.subs-pricing .subs-tab-panel.is-active {
  display: block;
}

.subs-pricing .subs-tab-panel.is-active[data-subs-panel="plans"] {
  display: grid;
  justify-items: center;
  gap: 16px;
}

.subs-pricing .subs-tab-panel[data-subs-panel="plans"] .subs-billing-pill {
  display: flex;
  justify-content: center;
  margin: 0 auto;
}

.subs-pricing .subs-referral-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 26px;
  border-radius: 28px;
  gap: 16px;
}

.subs-pricing .subs-referral-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.subs-pricing .subs-referral-lead {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.subs-pricing .subs-referral-status {
  min-height: 18px;
  margin: 0;
  color: #6ee7b7;
}

body[data-theme="white"] .subs-pricing .subs-page-tabs {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
}

body[data-theme="white"] .subs-pricing .subs-referral-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
}

/* Checkout ? narrow, calm, minimal */
.checkout-minimal.checkout-panel,
.checkout-modal-card.checkout-minimal {
  max-width: none;
  width: 100%;
  padding: 28px 24px 22px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg-secondary, #0b1120);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.checkout-modal-card.checkout-minimal {
  width: min(420px, calc(100vw - 32px));
}

.checkout-minimal .checkout-head {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
  padding-right: 36px;
}

.checkout-minimal .checkout-kicker-label {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft, var(--text-secondary));
}

.checkout-minimal .checkout-section-title {
  margin: 0;
  font-size: clamp(22px, 4vw, 26px);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
}

.checkout-minimal .payment-segment-shell {
  width: 100%;
  padding: 3px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.checkout-minimal .payment-method-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 100%;
}

.checkout-minimal .payment-method-tabs .ghost-button {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-secondary);
  box-shadow: none;
}

.checkout-minimal .payment-method-tabs .ghost-button.is-active {
  background: rgba(var(--accent-rgb), 0.18);
  color: var(--text-primary);
  box-shadow: none;
}

.checkout-minimal .checkout-plan-card {
  padding: 18px 0 0;
  border-radius: 0;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: none;
}

.checkout-minimal .checkout-box {
  padding: 14px 0 0;
  border-radius: 0;
  background: transparent;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: none;
  display: grid;
  gap: 12px;
}

.checkout-minimal .checkout-plan-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px 16px;
  padding-top: 16px;
}

.checkout-minimal .checkout-plan-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.checkout-minimal .checkout-plan-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.checkout-minimal .checkout-amount {
  display: block;
  font-size: clamp(24px, 5vw, 28px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
  white-space: nowrap;
}

.checkout-minimal .checkout-amount-year {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.checkout-minimal .checkout-price-block {
  text-align: right;
}

.checkout-minimal .checkout-badge-row {
  display: none;
}

.checkout-minimal .checkout-savings {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: #86efac;
  background: none;
  padding: 0;
  border: none;
}

.checkout-minimal .checkout-savings.hidden,
.checkout-minimal .checkout-expiry.hidden {
  display: none;
}

.checkout-minimal .checkout-instructions,
.checkout-minimal .checkout-expiry {
  margin: 14px 0 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
  max-width: none;
  border: none;
}

.checkout-minimal .checkout-layout--solo,
.checkout-minimal .checkout-layout {
  max-width: none;
  width: 100%;
  gap: 0;
}

.checkout-minimal .checkout-foot {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.checkout-minimal .checkout-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.checkout-minimal .checkout-pay-button {
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  color: #fff;
  background: var(--accent-primary);
  box-shadow: none;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.checkout-minimal .checkout-pay-button:hover {
  transform: none;
  filter: brightness(1.08);
  background: var(--accent-primary);
  box-shadow: none;
  color: #fff;
}

.checkout-minimal .checkout-promo {
  text-align: center;
}

.checkout-minimal .checkout-promo-toggle {
  width: auto;
  min-height: 0;
  padding: 4px 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.checkout-minimal .checkout-promo-toggle:hover,
.checkout-minimal .checkout-promo-toggle.is-open {
  border: none;
  background: transparent;
  color: var(--text-primary);
}

.checkout-minimal .checkout-promo-panel {
  margin-top: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
  text-align: left;
}

.checkout-minimal .checkout-meta {
  display: none;
}

.checkout-minimal .checkout-aside .referral-panel {
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.checkout-minimal .checkout-modal-close {
  top: 16px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

body[data-theme="white"] .checkout-modal {
  background: rgba(15, 23, 42, 0.28);
}

body[data-theme="white"] .checkout-minimal.checkout-panel,
body[data-theme="white"] .checkout-modal-card.checkout-minimal {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.12);
}

body[data-theme="white"] .checkout-minimal .payment-segment-shell,
body[data-theme="white"] .checkout-minimal .checkout-promo-panel {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
}

body[data-theme="white"] .checkout-minimal .checkout-plan-card,
body[data-theme="white"] .checkout-minimal .checkout-box {
  border-top-color: rgba(15, 23, 42, 0.08);
}

body[data-theme="white"] .checkout-minimal .payment-method-tabs .ghost-button.is-active {
  background: rgba(var(--accent-rgb), 0.12);
  color: #0f172a;
}

body[data-theme="white"] .checkout-minimal .checkout-pay-button {
  color: #fff;
}

@media (max-width: 720px) {
  .checkout-minimal.checkout-panel,
  .checkout-modal-card.checkout-minimal {
    padding: 24px 18px 18px;
    width: min(100%, calc(100vw - 24px));
  }

  .checkout-minimal .checkout-head {
    padding-right: 32px;
  }

  .checkout-minimal .checkout-plan-hero {
    grid-template-columns: 1fr;
  }

  .checkout-minimal .checkout-price-block {
    text-align: left;
  }
}

/* White theme ? journal, profile, ideas, forms contrast */
body[data-theme="white"] .trade-table-wrapper thead th {
  background: rgba(241, 245, 249, 0.98);
  color: #0f172a;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}

body[data-theme="white"] .trade-table-wrapper tbody td {
  color: var(--text-primary);
}

body[data-theme="white"] .trade-table-wrapper tbody tr {
  background: rgba(255, 255, 255, 0.72);
}

body[data-theme="white"] .trade-table-wrapper tbody tr:hover {
  background: rgba(99, 102, 241, 0.06);
}

body[data-theme="white"] .tag {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.1);
}

body[data-theme="white"] .tag-green {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.24);
}

body[data-theme="white"] .tag-red {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.22);
}

body[data-theme="white"] .tag-yellow {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.24);
}

body[data-theme="white"] .tag-orange {
  color: #c2410c;
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.22);
}

body[data-theme="white"] .tag-blue {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.22);
}

body[data-theme="white"] .tag-purple {
  color: #6d28d9;
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.22);
}

body[data-theme="white"] .tag-gray {
  color: #475569;
  background: rgba(100, 116, 139, 0.1);
  border-color: rgba(100, 116, 139, 0.2);
}

body[data-theme="white"] .form-row label,
body[data-theme="white"] .filters label {
  color: #334155;
}

body[data-theme="white"] .form-row input,
body[data-theme="white"] .form-row select,
body[data-theme="white"] .trade-form .ui-select-trigger,
body[data-theme="white"] .filters input,
body[data-theme="white"] .filters select,
body[data-theme="white"] .filters .ui-select-trigger,
body[data-theme="white"] .ui-date-trigger,
body[data-theme="white"] .table-edit-input,
body[data-theme="white"] .comment-input {
  color: #0f172a;
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.14);
}

body[data-theme="white"] .form-row input::placeholder,
body[data-theme="white"] .filters input::placeholder,
body[data-theme="white"] .comment-input::placeholder {
  color: #64748b;
  opacity: 1;
}

body[data-theme="white"] .filter-chip {
  color: #475569;
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
}

body[data-theme="white"] .filter-chip.is-active,
body[data-theme="white"] .filter-chip:hover {
  color: #0f172a;
}

body[data-theme="white"] .journal-summary-bar,
body[data-theme="white"] .session-heatmap-card,
body[data-theme="white"] .coach-card,
body[data-theme="white"] .active-trade-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

body[data-theme="white"] .session-heatmap-card h3,
body[data-theme="white"] .session-heatmap-card .subtitle {
  color: var(--text-primary);
}

body[data-theme="white"] .session-heatmap-card .subtitle {
  color: var(--text-secondary);
}

body[data-theme="white"] .ideas-rail {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

body[data-theme="white"] .ideas-rail-head {
  color: #475569;
}

body[data-theme="white"] .ideas-list-item {
  background: rgba(248, 250, 252, 0.98);
  border-color: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

body[data-theme="white"] .ideas-list-item.is-active {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.22);
}

body[data-theme="white"] .ideas-list-pair,
body[data-theme="white"] .ideas-list-title,
body[data-theme="white"] .ideas-list-meta {
  color: #0f172a;
}

body[data-theme="white"] .ideas-list-pair.is-muted,
body[data-theme="white"] .ideas-list-title.is-draft {
  color: #64748b;
  opacity: 1;
}

body[data-theme="white"] .ideas-editor-hint {
  color: #334155;
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.14);
}

body[data-theme="white"] .welcome-modal {
  background: rgba(15, 23, 42, 0.28);
}

body[data-theme="white"] .welcome-card,
body[data-theme="white"] .personal-profile-modal-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
  color: #0f172a;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.14);
}

body[data-theme="white"] .welcome-card h2,
body[data-theme="white"] .personal-profile-head h2,
body[data-theme="white"] .personal-profile-head .subtitle {
  color: #0f172a;
}

body[data-theme="white"] .personal-profile-head .subtitle {
  color: #475569;
}

body[data-theme="white"] .personal-profile-preview-strip,
body[data-theme="white"] .personal-profile-insight-card,
body[data-theme="white"] .personal-profile-subscription {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.1);
}

body[data-theme="white"] .personal-profile-preview-copy strong,
body[data-theme="white"] .personal-profile-preview-copy span,
body[data-theme="white"] .personal-profile-insight-card span,
body[data-theme="white"] .personal-profile-insight-card strong,
body[data-theme="white"] .personal-profile-subscription-label,
body[data-theme="white"] .personal-profile-subscription-expiry {
  color: #0f172a;
}

body[data-theme="white"] .personal-profile-insight-card span,
body[data-theme="white"] .personal-profile-subscription-label {
  color: #475569;
}

body[data-theme="white"] .personal-profile-insight-card strong {
  font-weight: 700;
}

body[data-theme="white"] .link-button,
body[data-theme="white"] .chart-link,
body[data-theme="white"] .comment-toggle {
  color: #4338ca;
}

body[data-theme="white"] .chip,
body[data-theme="white"] .factor-chip {
  color: #334155;
  border-color: rgba(15, 23, 42, 0.12);
  background: rgba(248, 250, 252, 0.98);
}

body[data-theme="white"] .chip.green {
  color: #047857;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.22);
}

body[data-theme="white"] .chip.red {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.22);
}

body[data-theme="white"] .chip.yellow {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.22);
}

body[data-theme="white"] .chip.blue {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.22);
}

body[data-theme="white"] .chip.purple {
  color: #6d28d9;
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.22);
}

body[data-theme="white"] .ui-factor-menu,
body[data-theme="white"] .ui-date-popover {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

body[data-theme="white"] .ui-factor-option,
body[data-theme="white"] .ui-factor-empty {
  color: #0f172a;
}

body[data-theme="white"] .delete-button {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.22);
}

body[data-theme="white"] .personal-profile-name-field input {
  color: #0f172a;
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.14);
}

body[data-theme="white"] .ui-select-trigger,
body[data-theme="white"] .ui-select-option {
  color: #0f172a;
}

/* Mobile / Capacitor Android */
html.is-capacitor-app,
html.is-android-app {
  -webkit-tap-highlight-color: transparent;
}

.is-capacitor-app body,
.is-android-app body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  overscroll-behavior: none;
}

.is-capacitor-app .sidebar,
.is-android-app .sidebar {
  max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}

.is-capacitor-app .btn,
.is-capacitor-app button,
.is-android-app .btn,
.is-android-app button {
  min-height: 44px;
}

.is-capacitor-app .profile-avatar-upload,
.is-android-app .profile-avatar-upload,
.is-ios-app .profile-avatar-upload {
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px !important;
  max-width: 72px;
  max-height: 72px;
}

@media (max-width: 900px) {
  .is-capacitor-app .shell-layout,
  .is-android-app .shell-layout {
    grid-template-columns: 1fr;
  }
}


/* =========================================================
   SENTRAGE mobile production layer ? Android, iOS and web
   ========================================================= */
:root { --app-height: 100dvh; }
html, body { max-width: 100%; overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { min-height: var(--app-height, 100dvh); }
button, input, select, textarea { font: inherit; }
img, canvas, svg, video, iframe { max-width: 100%; }
.platform-android, .platform-ios, .is-capacitor-app { -webkit-tap-highlight-color: transparent; }
.platform-ios body, .platform-android body, .is-capacitor-app body {
  padding-top: env(safe-area-inset-top, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  overscroll-behavior-y: none;
}
.is-capacitor-app .web-install-prompt,
.is-android-app .web-install-prompt,
.is-ios-app .web-install-prompt { display: none !important; }

@media (max-width: 900px) {
  body, body.vertical-layout, body.vertical-layout-stacked { overflow-x: hidden; }
  .app, body.vertical-layout .app, body.vertical-layout-stacked .app {
    width: 100%; max-width: 100%; margin: 0; padding: 12px 12px calc(88px + env(safe-area-inset-bottom, 0px));
  }
  .shell-layout, body.vertical-layout .shell-layout, body.vertical-layout-stacked .shell-layout {
    display: block !important; width: 100%; min-width: 0; margin: 0;
  }
  .main-content { width: 100%; min-width: 0; }

  /* Native-style bottom navigation; all sections stay reachable by horizontal swipe. */
  .sidebar, body.vertical-layout .sidebar, body.vertical-layout-stacked .sidebar,
  .is-capacitor-app .sidebar, .is-android-app .sidebar, .is-ios-app .sidebar {
    position: fixed !important; inset: auto 0 0 0 !important; z-index: 1200;
    display: block !important; width: 100%; max-width: none; height: auto; min-height: 0;
    padding: 7px max(8px, env(safe-area-inset-right, 0px)) calc(7px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
    border: 0; border-top: 1px solid rgba(255,255,255,.1); border-radius: 18px 18px 0 0;
    background: rgba(7,8,20,.94); box-shadow: 0 -12px 34px rgba(0,0,0,.34);
    backdrop-filter: blur(24px) saturate(1.25); -webkit-backdrop-filter: blur(24px) saturate(1.25);
  }
  .sidebar > :not(.sidebar-nav), body.vertical-layout-stacked .sidebar > :not(.sidebar-nav) { display: none !important; }
  .sidebar-nav, body.vertical-layout-stacked .sidebar-nav {
    display: grid !important; grid-auto-flow: column; grid-auto-columns: minmax(64px, 1fr); grid-template-columns: none !important;
    gap: 4px; width: 100%; overflow-x: auto; overflow-y: hidden; overscroll-behavior-inline: contain;
    scrollbar-width: none; scroll-snap-type: x proximity; padding: 0 1px;
  }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .sidebar-nav button, body.vertical-layout-stacked .sidebar-nav button,
  .sidebar-nav button:nth-child(n) {
    display: grid !important; place-items: center; align-content: center; gap: 2px;
    min-width: 64px; min-height: 52px !important; padding: 5px 4px; margin: 0;
    border: 0; border-radius: 12px; background: transparent; box-shadow: none;
    font-size: 9.5px; line-height: 1.15; text-align: center; white-space: normal; scroll-snap-align: center;
  }
  .sidebar-nav button span:first-child { font-size: 19px !important; line-height: 1; }
  .sidebar-nav button.is-active { color: #fff; background: linear-gradient(145deg, rgba(var(--accent-rgb),.34), rgba(34,211,238,.1)); }

  .header { margin: 0 0 16px; gap: 10px; }
  .header h1, .section-header h2, .journal-hub-header h2 { font-size: clamp(22px, 7vw, 30px) !important; line-height: 1.08; }
  .header .subtitle, .section-header .subtitle { font-size: 13px; line-height: 1.45; }
  .top-info { gap: 10px; margin-bottom: 12px; }
  .section-header, .journal-hub-header { flex-direction: column !important; align-items: stretch !important; gap: 10px !important; }
  .card, .page.card { border-radius: 18px; padding: 14px; }
  .dashboard-grid, .key-metrics-charts-grid, .settings-layout, .settings-row-panels,
  .analytics-grid, .ai-hub-grid, .account-profile-form-grid, .strategy-layout, .strategy-form-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .filters, .form-row, .form-actions, .security-provider-row, .web-download-banner-inner {
    flex-direction: column; align-items: stretch;
  }
  .filters > *, .form-row > *, .form-actions > *, .security-provider-actions > * { width: 100%; min-width: 0; }
  input, select, textarea, .ghost-select { max-width: 100%; min-width: 0; font-size: 16px; }
  button, .btn, .primary-button, .ghost-button { min-height: 44px; touch-action: manipulation; }
  button.profile-avatar-upload {
    width: 72px;
    height: 72px;
    min-width: 72px;
    min-height: 72px !important;
    max-width: 72px;
    max-height: 72px;
    padding: 0;
  }
  .trade-table-wrapper, .table-scroll, .journal-table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }

  /* Dialogs fit notches, keyboards and compact phones. */
  .welcome-modal { padding: max(10px, env(safe-area-inset-top, 0px)) 10px max(10px, env(safe-area-inset-bottom, 0px)); align-items: center; }
  .welcome-card, .welcome-wizard-modal .welcome-wizard-card, .account-profile-modal-card,
  .account-wizard-card, .security-modal-card, .legal-modal-card {
    width: 100% !important; max-width: 560px; max-height: calc(var(--app-height, 100dvh) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 20px) !important;
    padding: 16px 14px 14px !important; border-radius: 22px; overflow: auto; overscroll-behavior: contain;
  }
  .welcome-wizard-brand { gap: 9px; }
  .welcome-wizard-logo { width: 42px; height: 42px; border-radius: 50%; object-fit: contain; }
  .welcome-wizard-modal .welcome-step-copy h2 { font-size: clamp(25px, 8vw, 32px); }
  .welcome-lang-panel { padding: 12px; border-radius: 16px; }
  .welcome-lang-grid { grid-template-columns: 1fr !important; gap: 8px; }
  .welcome-lang-card { min-height: 56px; padding: 10px 12px; }
  .welcome-lang-badge { width: 36px; height: 36px; border-radius: 11px; }
  .welcome-wizard-actions, .account-wizard-actions { position: sticky; bottom: -14px; z-index: 4; margin: 4px -14px -14px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(180deg, rgba(7,8,20,.4), rgba(7,8,20,.98) 30%); }

  /* Installation prompt remains optional and never blocks the interface. */
  .web-install-prompt { right: 12px; left: 12px; bottom: calc(78px + env(safe-area-inset-bottom, 0px)); width: auto; }
  .web-install-prompt-card { padding: 14px 14px 11px; border-radius: 14px; }
  .web-install-prompt-brand { grid-template-columns: 40px minmax(0,1fr); gap: 11px; }
  .web-install-prompt-icon { width: 40px; height: 40px; border-radius: 11px; }
  .web-install-prompt-actions { margin-top: 12px; }
}

@media (max-width: 360px) {
  .app, body.vertical-layout .app, body.vertical-layout-stacked .app { padding-inline: 8px; }
  .card, .page.card { padding: 12px; border-radius: 16px; }
  .welcome-card, .welcome-wizard-modal .welcome-wizard-card { padding-inline: 12px !important; }
  .welcome-wizard-actions { margin-inline: -12px; padding-inline: 12px; }
}

@media (min-width: 901px) {
  .web-install-prompt { max-width: 352px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}


/* Mobile navigation: four primary tabs + a clean More sheet. */
.mobile-nav-drawer { display: none; }
@media (max-width: 900px) {
  .sidebar-nav, body.vertical-layout-stacked .sidebar-nav {
    grid-auto-flow: row !important;
    grid-auto-columns: auto !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    overflow: visible !important;
  }
  .sidebar-nav button, body.vertical-layout-stacked .sidebar-nav button,
  .sidebar-nav button:nth-child(n), .mobile-more-btn {
    min-width: 0 !important; width: 100%;
  }
  .mobile-nav-drawer { position: fixed; inset: 0; z-index: 1500; display: grid; align-items: end; }
  .mobile-nav-drawer.hidden { display: none; }
  .mobile-nav-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0 !important; padding: 0; border: 0; border-radius: 0; background: rgba(0,0,0,.62); backdrop-filter: blur(4px); }
  .mobile-nav-sheet { position: relative; z-index: 1; max-height: min(72dvh, 620px); overflow: auto; padding: 8px 12px calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: 24px 24px 0 0; border-top: 1px solid rgba(255,255,255,.12); background: rgba(9,10,25,.98); box-shadow: 0 -20px 60px rgba(0,0,0,.48); }
  .mobile-nav-handle { width: 42px; height: 4px; margin: 2px auto 10px; border-radius: 99px; background: rgba(255,255,255,.2); }
  .mobile-nav-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 10px; }
  .mobile-nav-sheet-head strong { letter-spacing: .14em; color: var(--accent-primary); }
  .mobile-nav-close { width: 40px !important; min-width: 40px !important; min-height: 40px !important; padding: 0; border: 0; border-radius: 50%; font-size: 24px; background: rgba(255,255,255,.08); color: #fff; }
  .mobile-nav-more-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .mobile-nav-more-grid button { display: grid !important; grid-template-columns: 28px minmax(0,1fr); align-items: center; gap: 9px; width: 100%; min-height: 52px !important; padding: 10px 12px; border-radius: 14px; text-align: left; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.07); }
  .mobile-nav-more-grid button span:first-child { font-size: 19px; text-align: center; }
  .mobile-nav-more-grid button.is-active { background: rgba(var(--accent-rgb),.2); border-color: rgba(var(--accent-rgb),.4); }
  body.mobile-nav-open { overflow: hidden; }
}
@media (max-width: 360px) { .mobile-nav-more-grid { grid-template-columns: 1fr; } }

@media (max-width: 340px) {
  button, .ghost-button, .primary-button { max-width: 100%; }
  .account-profile-switcher { grid-template-columns: minmax(0, 1fr) !important; }
}


/* =========================================================
   SENTRAGE Mobile UI v2 ? focused native visual system
   ========================================================= */
.mobile-app-header { display: none; }
@media (max-width: 900px) {
  :root {
    --mobile-surface: rgba(15, 17, 35, .84);
    --mobile-surface-strong: rgba(18, 20, 42, .96);
    --mobile-stroke: rgba(255, 255, 255, .075);
    --mobile-muted: rgba(220, 225, 245, .58);
  }
  body, body.vertical-layout, body.vertical-layout-stacked {
    color: #f7f8ff;
    background:
      radial-gradient(circle at 8% -5%, rgba(124, 92, 255, .14), transparent 32%),
      radial-gradient(circle at 100% 18%, rgba(43, 197, 255, .07), transparent 25%),
      #080a15;
  }
  .app, body.vertical-layout .app, body.vertical-layout-stacked .app {
    padding: 8px 10px calc(82px + env(safe-area-inset-bottom, 0px));
  }
  .main-content { display: grid; gap: 10px; }

  /* Real application bar */
  .mobile-app-header {
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 80;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    min-height: 58px; margin: -8px -10px 0; padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,.055);
    background: rgba(8,10,21,.86);
    backdrop-filter: blur(22px) saturate(1.25); -webkit-backdrop-filter: blur(22px) saturate(1.25);
  }
  .mobile-app-brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
  .mobile-app-brand img { width: 36px; height: 36px; border-radius: 11px; box-shadow: 0 6px 22px rgba(98,72,220,.2); }
  .mobile-app-brand div { display: grid; gap: 0; min-width: 0; }
  .mobile-app-brand strong { font-size: 15px; line-height: 1.15; letter-spacing: .12em; }
  .mobile-app-brand span { color: var(--mobile-muted); font-size: 10px; line-height: 1.3; }
  .mobile-app-actions { display: flex; align-items: center; gap: 7px; }
  .mobile-ai-online { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px; border-radius: 999px; color: #b8f5dd; background: rgba(34,197,139,.09); border: 1px solid rgba(34,197,139,.16); font-size: 10px; font-weight: 700; }
  .mobile-ai-online i { width: 6px; height: 6px; border-radius: 50%; background: #27d79a; box-shadow: 0 0 9px #27d79a; }
  .mobile-settings-shortcut { display: grid; place-items: center; width: 36px !important; min-width: 36px !important; height: 36px; min-height: 36px !important; padding: 8px; border: 1px solid var(--mobile-stroke); border-radius: 11px; color: #d8dcef; background: rgba(255,255,255,.045); }
  .mobile-settings-shortcut svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

  /* Compact account strip instead of a giant profile card */
  .top-profile-bar, .top-profile-bar.card {
    display: grid !important; grid-template-columns: minmax(0,1fr) auto !important; gap: 10px;
    min-height: 70px; margin: 0; padding: 10px 12px !important;
    border: 1px solid var(--mobile-stroke); border-radius: 16px;
    background: linear-gradient(135deg, rgba(112,82,238,.11), rgba(33,38,73,.32));
    box-shadow: none; backdrop-filter: none;
  }
  .top-profile-bar:hover { transform: none !important; box-shadow: none !important; }
  .top-profile-identity { gap: 10px; min-width: 0; }
  .top-profile-orb { width: 40px; height: 40px; font-size: 15px; flex: 0 0 auto; box-shadow: inset 0 1px rgba(255,255,255,.18); }
  .top-profile-main { gap: 2px; min-width: 0; }
  .top-profile-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
  .top-profile-main > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mobile-muted); font-size: 11px; }
  .top-profile-stats { gap: 9px; font-size: 10px; color: rgba(220,225,245,.68); }
  .top-profile-controls { display: none !important; }
  .top-profile-plan { align-self: center; padding: 0; border: 0; }
  .plan-badge { padding: 6px 8px; border: 1px solid rgba(var(--accent-rgb),.2); border-radius: 999px; background: rgba(var(--accent-rgb),.09); font-size: 10px; letter-spacing: .08em; }

  /* Dashboard summary: information first, no oversized marketing text. */
  .hero-card, .hero-card.card {
    min-height: 0; margin: 0; padding: 14px !important; overflow: visible;
    border: 1px solid var(--mobile-stroke); border-radius: 18px;
    background: var(--mobile-surface); box-shadow: none;
  }
  .hero-card::before, .hero-card .ai-spirit { display: none; }
  .hero-inner { display: grid; grid-template-columns: 1fr; gap: 12px; max-width: none; }
  .hero-copy { display: grid; gap: 10px; }
  .hero-copy > .kicker { margin: 0; font-size: 10px; letter-spacing: .16em; color: #9b84ff; }
  .hero-copy h1 { display: none; }
  .hero-meta { gap: 6px; min-height: 24px; }
  .hero-meta .greeting { color: #f7f8ff; font-size: 17px; font-weight: 720; }
  .hero-meta .date-time { margin-left: auto; max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: var(--mobile-muted); }
  .hero-live-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .hero-live-metrics span {
    min-width: 0; min-height: 70px; padding: 10px 11px; align-content: center;
    border: 1px solid rgba(255,255,255,.06); border-radius: 14px;
    background: rgba(255,255,255,.032);
  }
  .hero-live-metrics strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; line-height: 1.1; letter-spacing: -.02em; }
  .hero-live-metrics small { margin-top: 3px; font-size: 10px; color: var(--mobile-muted); }
  .ai-insight-card {
    min-height: 0; padding: 12px; gap: 7px; border-radius: 14px;
    border: 1px solid rgba(136,104,255,.14); background: linear-gradient(135deg, rgba(118,85,245,.09), rgba(255,255,255,.018)); box-shadow: none;
  }
  .ai-insight-card .kicker { margin: 0; font-size: 9px; letter-spacing: .15em; }
  .ai-insight-card .motivation-text { margin: 0; font-size: 13px; line-height: 1.45; }
  .insight-grid { gap: 6px; }
  .insight-grid span { padding: 7px 9px; border-radius: 10px; background: rgba(255,255,255,.03); }
  .insight-grid strong { font-size: 13px; }
  .insight-grid small { font-size: 9px; color: var(--mobile-muted); }

  /* Calm card system for all following screens. */
  .card, .page.card {
    padding: 14px; border-radius: 18px; border-color: var(--mobile-stroke);
    background: var(--mobile-surface); box-shadow: none; backdrop-filter: none;
  }
  .card:hover { transform: none; border-color: var(--mobile-stroke); box-shadow: none; }
  .dashboard-grid { gap: 10px; }
  .dashboard-grid .left-stack, .dashboard-grid .right-stack { gap: 10px; }
  .section-header h2, .journal-hub-header h2 { font-size: 18px !important; letter-spacing: -.02em; }
  .section-header .subtitle, .card .subtitle { color: var(--mobile-muted); font-size: 11px; }
  .metrics { gap: 7px; }
  .metrics > div { min-height: 68px; padding: 10px; border-radius: 13px; background: rgba(255,255,255,.028); border-color: rgba(255,255,255,.055); }
  .metric-value { font-size: 21px; }
  .key-metrics-charts-grid { display: none !important; }

  /* Native bottom bar */
  .sidebar, body.vertical-layout .sidebar, body.vertical-layout-stacked .sidebar,
  .is-capacitor-app .sidebar, .is-android-app .sidebar, .is-ios-app .sidebar {
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom,0px));
    border-radius: 16px 16px 0 0; border-top-color: rgba(255,255,255,.065);
    background: rgba(9,10,22,.96); box-shadow: 0 -10px 32px rgba(0,0,0,.32);
  }
  .sidebar-nav button, body.vertical-layout-stacked .sidebar-nav button,
  .sidebar-nav button:nth-child(n), .mobile-more-btn {
    gap: 3px; min-height: 54px !important; padding: 6px 2px; border-radius: 11px;
    color: rgba(222,226,244,.55); font-size: 9px; font-weight: 600;
  }
  .sidebar-nav button.is-active { color: #fff; background: rgba(124,92,255,.13); }
  .mobile-nav-icon { display: grid; place-items: center; width: 22px; height: 22px; }
  .mobile-nav-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  [data-route="dashboard"] .mobile-nav-icon svg { fill: currentColor; stroke: none; }
  .mobile-more-btn .mobile-nav-icon svg circle { fill: currentColor; stroke: none; }

  .mobile-nav-sheet { border-top-color: var(--mobile-stroke); background: rgba(11,12,27,.985); }
  .mobile-nav-more-grid button { color: rgba(240,242,255,.82); background: rgba(255,255,255,.035); border-color: rgba(255,255,255,.06); }
  .mobile-nav-more-grid .mobile-nav-icon svg { width: 20px; height: 20px; }
}

@media (max-width: 360px) {
  .mobile-app-brand span, .mobile-ai-online { display: none; }
  .hero-meta .date-time { display: none; }
  .top-profile-stats { display: none; }
  .hero-live-metrics span { min-height: 64px; }
}

/* Platform character without splitting the design system. */
@media (max-width: 900px) {
  .platform-ios .mobile-app-header { border-bottom-color: rgba(255,255,255,.08); background: rgba(8,10,21,.78); }
  .platform-ios .card, .platform-ios .top-profile-bar { border-radius: 20px; }
  .platform-ios .sidebar { border-radius: 22px 22px 0 0; }
  .platform-android .mobile-app-header { background: rgba(8,10,21,.94); }
  .platform-android .card, .platform-android .top-profile-bar { border-radius: 16px; }
}

/* Mobile UI v2 final composition refinements */
@media (max-width: 900px) {
  .top-profile-bar, .top-profile-bar.card { min-height: 60px; padding: 8px 10px !important; }
  .top-profile-orb { width: 36px; height: 36px; font-size: 14px; }
  .top-profile-stats { font-size: 9px; }
  .hero-meta .date-time { display: none; }
  .hero-meta .greeting { font-size: 16px; }
  .hero-live-metrics span { min-height: 64px; }
  .insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .insight-grid span { min-width: 0; text-align: left; }
  .ai-insight-card .motivation-text { font-size: 12px; }
  /* Hero already contains these summaries; detailed versions stay in AI Center/analytics. */
  .dashboard-grid .left-stack > .ai-profile-card,
  .dashboard-grid .left-stack > .ai-profile-card + .card { display: none !important; }
}

@media (max-width: 900px) {
  .insight-grid span { grid-column: auto !important; }
  .mobile-no-trades .dashboard-analytics-card,
  .mobile-no-trades .performance-breakdown-card,
  .mobile-no-trades .dashboard-heavy-card { display: none !important; }
  .mobile-dashboard-empty {
    display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 10px 12px; align-items: center;
    padding: 13px; border: 1px solid rgba(120,92,255,.16); border-radius: 16px;
    background: linear-gradient(135deg, rgba(120,92,255,.09), rgba(34,211,238,.025));
  }
  .mobile-empty-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #cfc4ff; background: rgba(124,92,255,.14); font-size: 24px; }
  .mobile-dashboard-empty > div:nth-child(2) { display: grid; gap: 3px; }
  .mobile-dashboard-empty strong { font-size: 13px; }
  .mobile-dashboard-empty span { color: var(--mobile-muted); font-size: 10px; line-height: 1.4; }
  .mobile-dashboard-empty button { grid-column: 1 / -1; min-height: 40px; border: 0; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #7657e8, #5d42c6); font-size: 12px; font-weight: 700; }
}

/* ============================================================
   SENTRAGE Mobile UI v3 ? terminal character
   ============================================================ */
@media (max-width: 900px) {
  :root { --m-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
  body.platform-android, body.platform-ios { background: #07080d !important; }
  .card, .hero-card, .ai-insight-card {
    background: #0b0d14 !important;
    border: 1px solid rgba(148,163,255,.12) !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }
  .mobile-app-header { background: rgba(7,8,13,.96) !important; border-bottom: 1px solid rgba(148,163,255,.14) !important; box-shadow: none !important; }
  .mobile-app-brand strong { letter-spacing: .26em; }
  .mobile-app-brand span { font-family: var(--m-mono); font-size: 8.5px; letter-spacing: .18em; text-transform: uppercase; }
  .mobile-ai-online { font-family: var(--m-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #a3e635 !important; background: rgba(163,230,53,.07) !important; border: 1px solid rgba(163,230,53,.3) !important; border-radius: 8px !important; }
  .mobile-ai-online i { background: #a3e635 !important; box-shadow: 0 0 8px rgba(163,230,53,.9); }
  .mobile-settings-shortcut { border-radius: 10px !important; border: 1px solid rgba(148,163,255,.18) !important; background: transparent !important; box-shadow: none !important; }
  .kicker { font-family: var(--m-mono) !important; font-size: 9px !important; letter-spacing: .3em !important; color: #8b93b8 !important; }
  .kicker::before { content: "? "; color: #7c5cff; }
  .hero-live-metrics span, .insight-grid span { position: relative; background: #0e1119 !important; border: 1px solid rgba(148,163,255,.1) !important; border-radius: 12px !important; box-shadow: none !important; overflow: hidden; }
  .hero-live-metrics span::before, .insight-grid span::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: #7c5cff; }
  .hero-live-metrics span:nth-child(1)::before { background: #a3e635; }
  .hero-live-metrics span:nth-child(2)::before { background: #22d3ee; }
  .hero-live-metrics span:nth-child(3)::before { background: #fbbf24; }
  .hero-live-metrics span:nth-child(4)::before { background: #a78bfa; }
  .insight-grid span:nth-child(1)::before { background: #f472b6; }
  .insight-grid span:nth-child(2)::before { background: #38bdf8; }
  .hero-live-metrics strong, .insight-grid strong, .metric-value { font-family: var(--m-mono) !important; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
  .hero-live-metrics small, .insight-grid small { font-family: var(--m-mono); font-size: 8.5px !important; text-transform: uppercase; letter-spacing: .16em; color: #7d84a6 !important; }
  .ai-insight-card { border-left: 2px solid #7c5cff !important; }
  .top-profile-bar, .top-profile-bar.card { background: linear-gradient(90deg, #0d101a, #0b0d14) !important; }
  .top-profile-orb { border-radius: 12px !important; }
  .top-profile-stats { font-family: var(--m-mono); letter-spacing: .04em; }
  .sidebar-nav { background: rgba(7,8,13,.97) !important; border-top: 1px solid rgba(148,163,255,.16) !important; box-shadow: none !important; backdrop-filter: blur(14px); }
  .sidebar-nav button[data-route], .mobile-more-btn { position: relative; }
  .sidebar-nav button[data-route] span:nth-child(2), .mobile-more-btn span:nth-child(2) { font-family: var(--m-mono); font-size: 8.5px !important; letter-spacing: .06em; text-transform: uppercase; }
  .sidebar-nav button[data-route].is-active::after { content: ""; position: absolute; top: 0; left: 24%; right: 24%; height: 2px; border-radius: 0 0 2px 2px; background: linear-gradient(90deg, #7c5cff, #22d3ee); }
  .mobile-nav-sheet { background: #0b0d14 !important; border: 1px solid rgba(148,163,255,.16) !important; box-shadow: none !important; }
  .mobile-nav-more-grid button { background: #0e1119 !important; border: 1px solid rgba(148,163,255,.12) !important; border-radius: 12px !important; box-shadow: none !important; }
  .mobile-dashboard-empty { border: 1px dashed rgba(148,163,255,.3) !important; background: #0b0d14 !important; border-radius: 14px !important; }
  .mobile-dashboard-empty button { border-radius: 10px !important; background: #7c5cff !important; box-shadow: none !important; font-family: var(--m-mono); letter-spacing: .1em; text-transform: uppercase; font-size: 11px !important; }
  .mobile-empty-icon { border-radius: 10px !important; border: 1px solid rgba(124,92,255,.35); background: transparent !important; }
}

@media (max-width: 900px) {
  .hero-card[data-page="dashboard"]:not(.is-active) + .mobile-dashboard-empty { display: none !important; }
}

/* ===== SENTRAGE Mobile UI v4: pro nav icons + MT5 live positions ===== */
@media (max-width: 900px) {
  .mobile-nav-icon svg,
  .mobile-nav-more-grid .mobile-nav-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .mobile-nav-more-grid .mobile-nav-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.6;
  }

  .active-trades-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .active-trade-card {
    background: #0b0d14;
    border: 1px solid rgba(148, 163, 255, 0.14);
    border-radius: 14px;
    padding: 16px;
    box-shadow: none;
  }
  .active-trade-card .floating-pl {
    display: block;
    margin: 10px 0 12px;
    font-family: var(--m-mono, ui-monospace, monospace);
    font-size: 26px;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
  }
  .active-trade-card .active-trade-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 12.5px;
  }
  .active-trade-card .active-trade-meta strong {
    font-family: var(--m-mono, ui-monospace, monospace);
    font-variant-numeric: tabular-nums;
  }
  .active-trade-card .close-mt5-position {
    display: none;
  }
}

/* ===== News APEX AI bias ===== */
.news-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}
.news-ai-btn {
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid rgba(var(--accent-rgb, 124, 92, 255), 0.45);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.95), rgba(88, 56, 200, 0.9));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 22px rgba(124, 92, 255, 0.28);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.news-ai-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(124, 92, 255, 0.36);
  filter: brightness(1.05);
}
.news-ai-btn.is-locked {
  opacity: 0.72;
  filter: saturate(0.85);
}
.news-ai-btn.is-busy {
  opacity: 0.85;
  pointer-events: none;
}
.news-ai-status { margin: 4px 0 10px; min-height: 1.2em; }
.news-ai-pulse {
  display: grid; gap: 10px; margin: 0 0 14px; padding: 12px 14px;
  border-radius: 18px; border: 1px solid rgba(139, 92, 246, .28);
  background: linear-gradient(145deg, rgba(88, 58, 190, .16), rgba(12, 14, 28, .55));
}
.news-ai-pulse.hidden { display: none; }
.news-ai-pulse-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.news-ai-pulse-head strong { font-size: 13px; letter-spacing: .04em; }
.news-ai-apex-pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: .12em;
  color: #efe7ff; background: rgba(139, 92, 246, .22); border: 1px solid rgba(196, 168, 255, .35);
}
.news-ai-pulse-summary { margin: 0; font-size: 12px; line-height: 1.4; }
.news-ai-pulse-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.news-ai-pulse-card {
  display: grid; gap: 2px; text-align: left; padding: 10px 11px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08); background: rgba(8, 10, 22, .55); color: inherit; cursor: default;
}
.news-ai-pulse-card strong { font-size: 13px; letter-spacing: .04em; }
.news-ai-pulse-card span { font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.news-ai-pulse-card small { color: rgba(220, 225, 245, .62); font-size: 10px; line-height: 1.35; }
.news-ai-bias {
  display: inline-flex; align-items: center; margin-left: auto; padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: .08em; border: 1px solid transparent; flex: 0 0 auto;
}
.news-ai-bias--long { color: #b8f7d4; background: rgba(34, 197, 139, .14); border-color: rgba(34, 197, 139, .35); }
.news-ai-bias--short { color: #ffc9c9; background: rgba(239, 68, 68, .14); border-color: rgba(239, 68, 68, .35); }
.news-ai-bias--wait { color: #ffe8a8; background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .32); }
.news-ai-pulse-card.news-ai-bias--long { box-shadow: inset 3px 0 0 #22c55e; }
.news-ai-pulse-card.news-ai-bias--short { box-shadow: inset 3px 0 0 #ef4444; }
.news-ai-pulse-card.news-ai-bias--wait { box-shadow: inset 3px 0 0 #f59e0b; }
.news-ai-note { display: block; margin-top: 4px; color: rgba(210, 200, 255, .78); font-size: 11px; line-height: 1.35; }
.news-row { flex-wrap: wrap; gap: 6px 8px; }

/* ===== Dedicated Forex Factory newsroom ===== */
.forex-news-page {
  display: grid;
  gap: 20px;
}

.forex-news-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: clamp(24px, 4vw, 58px);
  min-height: clamp(220px, 24vw, 300px);
  margin: 0;
  padding: clamp(28px, 4vw, 52px);
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), .2);
  border-radius: 28px;
  background:
    radial-gradient(circle at 78% 36%, rgba(var(--accent-rgb), .25), transparent 30%),
    linear-gradient(135deg, rgba(4, 6, 14, .94), rgba(var(--accent-rgb), .08));
  box-shadow: inset 0 1px rgba(255, 255, 255, .05), 0 28px 70px rgba(0, 0, 0, .18);
}

.forex-news-hero > .workspace-editor-copy {
  flex: 1 1 auto;
  max-width: min(72%, 780px);
  min-width: 0;
}

.forex-news-hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(42px, 6.5vw, 82px);
  line-height: .91;
  letter-spacing: -.065em;
  text-wrap: balance;
}

.forex-news-hero .subtitle {
  max-width: 680px;
  margin: 18px 0 0;
  font-size: clamp(14px, 1.5vw, 18px);
  line-height: 1.6;
}

.workspace-editor-symbol--news {
  top: clamp(24px, 4vw, 52px);
  right: clamp(44px, 8vw, 128px);
  width: clamp(120px, 15vw, 190px);
  opacity: .16;
}

.forex-news-hero-actions {
  position: absolute;
  z-index: 3;
  right: clamp(24px, 4vw, 52px);
  bottom: clamp(24px, 4vw, 52px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.forex-news-hero-actions .news-link {
  margin: 0;
}

.forex-news-hero-actions .ghost-button,
.forex-news-hero-actions .news-link {
  min-height: 38px;
  border-radius: 999px;
  backdrop-filter: blur(16px);
}

.forex-news-nav-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
}

.forex-news-nav-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.forex-news-float {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex: 0 0 112px;
  width: 112px;
  height: 112px;
  animation: forexNewsFloat 4.8s ease-in-out infinite;
}

.forex-news-float-glow {
  position: absolute;
  inset: 19px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), .5);
  filter: blur(24px);
  opacity: .6;
  animation: forexNewsGlow 3s ease-in-out infinite;
}

.forex-news-float-core {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(208, 192, 255, .42);
  border-radius: 25px;
  color: #f4efff;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, .28), transparent 28%),
    linear-gradient(145deg, rgba(130, 87, 245, .98), rgba(61, 37, 143, .96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .24),
    inset 0 -14px 30px rgba(21, 14, 65, .3),
    0 18px 38px rgba(77, 47, 184, .42);
  transform: rotate(-6deg);
}

.forex-news-float-core::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 20px;
  pointer-events: none;
}

.forex-news-float-core svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 9px rgba(17, 9, 61, .34));
}

.forex-news-float-core circle {
  fill: #ffcb62;
  stroke: none;
}

.forex-news-float-bars {
  stroke: #78e2ff;
  stroke-width: 2.8;
}

.forex-news-orbit {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(194, 174, 255, .25);
  border-radius: 50%;
}

.forex-news-orbit i {
  position: absolute;
  top: 50%;
  left: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffbd59;
  box-shadow: 0 0 14px rgba(255, 189, 89, .9);
  transform: translateY(-50%);
}

.forex-news-orbit--outer {
  inset: 3px;
  animation: forexNewsOrbit 9s linear infinite;
}

.forex-news-orbit--inner {
  inset: 12px;
  border-style: dashed;
  animation: forexNewsOrbit 6.5s linear infinite reverse;
}

.forex-news-orbit--inner i {
  right: -3px;
  left: auto;
  width: 6px;
  height: 6px;
  background: #65d8ff;
  box-shadow: 0 0 13px rgba(101, 216, 255, .9);
}

.forex-news-float-live {
  position: absolute;
  z-index: 3;
  right: 1px;
  bottom: 7px;
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 12, 35, .88);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .3);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .14em;
}

@keyframes forexNewsFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-9px) rotate(1deg); }
}

@keyframes forexNewsOrbit {
  to { transform: rotate(360deg); }
}

@keyframes forexNewsGlow {
  0%, 100% { opacity: .42; transform: scale(.9); }
  50% { opacity: .72; transform: scale(1.12); }
}

.forex-news-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .72fr);
  gap: 20px;
  align-items: start;
}

.forex-news-calendar,
.forex-news-analysis {
  min-width: 0;
  padding: 24px;
}

.forex-news-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.forex-news-toolbar .news-timezone-field {
  min-width: min(100%, 260px);
}

.news-impact-filters {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.news-impact-filters button {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(var(--accent-rgb), .2);
  border-radius: 999px;
  color: var(--text-secondary);
  background: rgba(var(--accent-rgb), .055);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease;
}

.news-impact-filters button:hover,
.news-impact-filters button.is-active {
  border-color: rgba(var(--accent-rgb), .58);
  color: var(--text-primary);
  background: rgba(var(--accent-rgb), .18);
  transform: translateY(-1px);
}

.forex-news-snapshot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.forex-news-snapshot .news-active {
  min-width: 0;
  margin: 0;
}

.forex-news-snapshot .news-list {
  max-height: 190px;
  overflow-y: auto;
}

.forex-news-snapshot #todayNewsList.news-list {
  max-height: min(360px, 52vh);
  min-height: 280px;
}

.forex-news-calendar-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 2px 10px;
  border-top: 1px solid rgba(var(--accent-rgb), .16);
}

.forex-news-calendar-head h2,
.forex-news-calendar-head .kicker,
.forex-news-calendar-head .news-status {
  margin: 0;
}

.forex-news-calendar-head h2 {
  margin-top: 4px;
}

.forex-news-events {
  max-height: none;
  overflow: visible;
  margin-top: 4px;
}

.forex-news-events .news-item[role="option"] {
  position: relative;
  cursor: pointer;
  outline: none;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.forex-news-events .news-item[role="option"]:hover,
.forex-news-events .news-item[role="option"]:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), .52);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}

.forex-news-events .news-item.is-selected {
  border-color: rgba(var(--accent-rgb), .82);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), .18), rgba(var(--accent-rgb), .07));
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .14), 0 16px 34px rgba(0, 0, 0, .24);
}

.forex-news-analysis {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--accent-rgb), .18), transparent 34%),
    rgba(255, 255, 255, .028);
}

.forex-news-analysis-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.forex-news-analysis-head h2 {
  margin: 5px 0 0;
  font-size: clamp(19px, 2vw, 25px);
}

.forex-news-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  margin: 0;
  padding: 24px;
  border: 1px dashed rgba(var(--accent-rgb), .28);
  border-radius: 18px;
  text-align: center;
}

.forex-news-selected {
  display: grid;
  gap: 16px;
}

.forex-news-selected.hidden,
.forex-news-ai-result.hidden,
.forex-news-empty.hidden {
  display: none;
}

.forex-news-selected-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.forex-news-impact {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid rgba(var(--accent-rgb), .24);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.forex-news-impact[data-impact="high"] { color: #ffc5c5; border-color: rgba(255, 92, 92, .42); background: rgba(255, 92, 92, .12); }
.forex-news-impact[data-impact="medium"] { color: #ffd6a6; border-color: rgba(255, 166, 64, .42); background: rgba(255, 166, 64, .11); }
.forex-news-impact[data-impact="low"] { color: #ffe8a6; border-color: rgba(255, 208, 96, .32); background: rgba(255, 208, 96, .08); }
.forex-news-impact[data-impact="holiday"] { color: #d4d4d8; border-color: rgba(179, 179, 179, .3); background: rgba(179, 179, 179, .08); }

.forex-news-selected h3 {
  margin: 0;
  font-size: clamp(21px, 2.4vw, 29px);
  line-height: 1.12;
  letter-spacing: -.025em;
}

.forex-news-selected > .subtitle {
  margin: 0;
  line-height: 1.55;
}

.forex-news-selected-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.forex-news-selected-stats div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(var(--accent-rgb), .14);
  border-radius: 13px;
  background: rgba(var(--accent-rgb), .045);
}

.forex-news-selected-stats dt {
  margin-bottom: 5px;
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.forex-news-selected-stats dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 700;
}

.forex-news-analysis .news-ai-btn {
  width: 100%;
  min-height: 44px;
  justify-content: center;
}

.forex-news-analysis .news-ai-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.forex-news-ai-result {
  display: grid;
  gap: 10px;
  padding: 15px;
  border: 1px solid rgba(var(--accent-rgb), .3);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(var(--accent-rgb), .15), rgba(8, 10, 22, .36));
}

.forex-news-ai-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.forex-news-ai-result-head .news-ai-bias {
  margin-left: 0;
}

.forex-news-ai-result p,
.forex-news-ai-result small {
  margin: 0;
  line-height: 1.5;
}

.forex-news-ai-result small {
  color: var(--text-secondary);
}

.forex-news-ai-why {
  margin-top: 8px;
  color: #d7dce8;
  font-size: 14px;
  line-height: 1.55;
}

.forex-news-snapshot-hint {
  margin: 8px 0 14px;
  font-size: 12px;
}

.news-list.compact .news-item--selectable {
  cursor: pointer;
  outline: none;
}

.news-list.compact .news-item--selectable:hover,
.news-list.compact .news-item--selectable:focus-visible {
  border-color: rgba(var(--accent-rgb), .52);
}

.news-list.compact .news-item--selectable.is-selected {
  border-color: rgba(var(--accent-rgb), .82);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), .18), rgba(var(--accent-rgb), .07));
}

@media (max-width: 1050px) {
  .forex-news-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .forex-news-analysis {
    position: static;
  }
}

@media (max-width: 700px) {
  .forex-news-hero,
  .forex-news-toolbar,
  .forex-news-calendar-head {
    align-items: stretch;
    flex-direction: column;
  }
  .forex-news-hero-actions,
  .news-impact-filters {
    justify-content: flex-start;
  }
  .forex-news-hero {
    min-height: 330px;
    padding: 92px 20px 24px;
    border-radius: 22px;
  }
  .forex-news-hero > .workspace-editor-copy {
    max-width: 100%;
  }
  .forex-news-hero h1 {
    font-size: clamp(40px, 13vw, 58px);
  }
  .forex-news-hero .subtitle {
    margin-top: 14px;
    font-size: 13px;
  }
  .workspace-editor-symbol--news {
    top: 18px;
    right: 18px;
    width: 82px;
  }
  .forex-news-hero-actions {
    position: static;
    margin-top: 20px;
  }
  .forex-news-float {
    align-self: center;
    flex-basis: 96px;
    width: 96px;
    height: 96px;
  }
  .forex-news-float-core {
    width: 64px;
    height: 64px;
    border-radius: 21px;
  }
  .forex-news-float-core svg {
    width: 42px;
    height: 42px;
  }
  .forex-news-snapshot,
  .forex-news-selected-stats {
    grid-template-columns: minmax(0, 1fr);
  }
  .forex-news-calendar,
  .forex-news-analysis {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .forex-news-float,
  .forex-news-float-glow,
  .forex-news-orbit {
    animation: none;
  }
}

/* ============================================================
   Mobile Desktop Parity ? phone/tablet should feel like PC UI
   ============================================================ */
@media (max-width: 900px) {
  .mobile-app-header,
  .mobile-dashboard-empty { display: none !important; }

  body, body.platform-android, body.platform-ios,
  body.vertical-layout, body.vertical-layout-stacked {
    background:
      radial-gradient(circle at 12% -8%, rgba(124, 92, 255, .22), transparent 34%),
      radial-gradient(circle at 90% 12%, rgba(34, 211, 238, .1), transparent 28%),
      #07060f !important;
  }

  .app, body.vertical-layout .app, body.vertical-layout-stacked .app {
    padding: 12px 12px calc(88px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .card, .page.card, .hero-card, .hero-card.card, .ai-insight-card, .top-profile-bar, .top-profile-bar.card {
    background: linear-gradient(145deg, rgba(18, 14, 36, .92), rgba(10, 12, 26, .88)) !important;
    border: 1px solid rgba(139, 92, 246, .22) !important;
    border-radius: 22px !important;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .35) !important;
    backdrop-filter: blur(14px) !important;
  }

  .hero-copy h1 { display: block !important; font-size: clamp(28px, 8vw, 42px) !important; line-height: 1.05 !important; }
  .hero-meta .greeting { font-size: 18px !important; }
  .hero-meta .date-time { display: inline !important; max-width: none !important; }
  .top-profile-controls { display: flex !important; flex-wrap: wrap; gap: 8px; }
  .key-metrics-charts-grid { display: grid !important; }
  .dashboard-grid .left-stack > .ai-profile-card,
  .dashboard-grid .left-stack > .ai-profile-card + .card { display: grid !important; }
  .mobile-no-trades .dashboard-analytics-card,
  .mobile-no-trades .performance-breakdown-card,
  .mobile-no-trades .dashboard-heavy-card { display: grid !important; }

  .kicker::before { content: none !important; }
  .kicker { font-family: inherit !important; letter-spacing: .14em !important; color: #a78bfa !important; }

  .hero-live-metrics strong, .insight-grid strong, .metric-value,
  .hero-live-metrics small, .insight-grid small,
  .sidebar-nav button[data-route] span:nth-child(2),
  .mobile-more-btn span:nth-child(2) {
    font-family: inherit !important;
    text-transform: none !important;
  }
  .hero-live-metrics span::before, .insight-grid span::before { display: none !important; }
  .sidebar-nav button[data-route].is-active::after { display: none !important; }

  .sidebar, body.vertical-layout .sidebar, body.vertical-layout-stacked .sidebar,
  .is-capacitor-app .sidebar, .is-android-app .sidebar, .is-ios-app .sidebar {
    background: rgba(10, 8, 22, .94) !important;
    border-top: 1px solid rgba(139, 92, 246, .28) !important;
    box-shadow: 0 -16px 40px rgba(0,0,0,.4) !important;
    backdrop-filter: blur(18px) saturate(1.2);
  }
  .sidebar-nav button, .mobile-more-btn {
    color: rgba(235, 230, 255, .72) !important;
    font-size: 10px !important;
  }
  .sidebar-nav button.is-active, .mobile-more-btn[aria-expanded="true"] {
    color: #fff !important;
    background: linear-gradient(145deg, rgba(124, 92, 255, .28), rgba(56, 40, 120, .35)) !important;
    border: 1px solid rgba(167, 139, 250, .35);
  }

  .news-ai-pulse-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Prop Trading ? matches main Sentrage OS theme (minimal)
   ============================================================ */
.prop-page.is-active { display: block; }
.prop-page {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}
.prop-shell,
.prop-modal-backdrop {
  --prop-accent: var(--accent-primary);
  --prop-accent-rgb: var(--accent-rgb);
  --prop-text: var(--text-primary);
  --prop-muted: var(--text-secondary);
  --prop-line: rgba(var(--accent-rgb), 0.2);
  --prop-fill: rgba(var(--accent-rgb), 0.1);
  --prop-fill-strong: rgba(var(--accent-rgb), 0.22);
  --prop-surface:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.12), rgba(255, 255, 255, 0.02)),
    var(--card-bg, rgba(11, 17, 32, 0.88));
  --prop-on-accent: #fff;
  --prop-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
  --prop-glow: rgba(var(--accent-rgb), 0.28);
  color: var(--prop-text);
}
.prop-shell {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  min-height: 0;
}
body[data-theme="white"] .prop-shell,
body[data-theme="white"] .prop-modal-backdrop {
  --prop-line: rgba(15, 23, 42, 0.1);
  --prop-fill: rgba(var(--accent-rgb), 0.08);
  --prop-fill-strong: rgba(var(--accent-rgb), 0.16);
  --prop-surface:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.08), rgba(255, 255, 255, 0.96)),
    var(--card-bg, #fff);
  --prop-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
  --prop-glow: rgba(var(--accent-rgb), 0.2);
}
body[data-theme="white"] .prop-goal.is-ok strong {
  color: #166534;
}
.prop-disclaimer { display: none; }
.prop-shell .workspace-editor-hero--prop {
  align-items: flex-end;
}
.prop-shell .workspace-editor-hero--prop .prop-subnav {
  margin: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: min(100%, 560px);
}
.prop-subnav [data-prop-nav="prop-accounts"][hidden] {
  display: none !important;
}
.prop-subnav.tab-switcher .tab-button {
  min-height: 0;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: var(--tab-inactive-color, var(--prop-muted));
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}
.prop-subnav.tab-switcher .tab-button.is-active {
  color: #fff;
  background: linear-gradient(120deg, var(--accent-primary), rgba(var(--accent-rgb), 0.65));
  border-color: transparent;
}
.prop-view {
  display: grid;
  gap: 22px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.prop-ico {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.prop-cockpit {
  display: grid;
  gap: 22px;
  min-width: 0;
}
.prop-cockpit-head h2 {
  background: linear-gradient(180deg, #fff, color-mix(in srgb, rgb(var(--accent-rgb)) 42%, #fff));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.prop-cockpit-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.prop-outline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}
.prop-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--prop-line);
  background: color-mix(in srgb, var(--card-bg, rgba(11, 17, 32, 0.7)) 80%, transparent);
  color: var(--prop-text);
  font-weight: 650;
  cursor: pointer;
  pointer-events: auto;
}
.prop-outline .prop-ico,
.prop-outline span {
  pointer-events: none;
}
.prop-outline:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: var(--prop-fill);
}
.prop-outline.is-copied {
  border-color: rgba(52, 211, 153, 0.55);
  color: #bbf7d0;
}
.prop-status-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  min-height: 44px;
}
.prop-status-equity {
  color: #fff;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.prop-mt-card {
  padding: 20px 22px 18px;
  border-radius: 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.08), transparent 42%),
    var(--prop-surface);
  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), 0.1),
    0 0 28px rgba(var(--accent-rgb), 0.16),
    var(--prop-shadow);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.prop-mt-card.is-flash {
  border-color: rgba(var(--accent-rgb), 0.7);
  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), 0.28),
    0 0 36px rgba(var(--accent-rgb), 0.32);
}
.prop-mt-card h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 20px;
  letter-spacing: -0.03em;
}
.prop-mt-card p {
  margin: 4px 0;
  color: rgba(248, 250, 252, 0.86);
  font-size: 14px;
}
.prop-mt-card p strong {
  color: #fff;
  font-weight: 700;
}
.prop-mt-card .prop-muted {
  margin-top: 10px;
  font-size: 12px;
}
.prop-toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 120;
  transform: translateX(-50%) translateY(8px);
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  background: rgba(16, 12, 10, 0.94);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.prop-toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.prop-stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.prop-stat {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 16px 16px 14px;
  border-radius: 18px;
  border: 1px solid var(--prop-line);
  background:
    radial-gradient(circle at 12% 0%, rgba(var(--accent-rgb), 0.18), transparent 46%),
    var(--prop-surface);
  box-shadow: var(--prop-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.prop-stat:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28), 0 0 24px rgba(var(--accent-rgb), 0.16);
}
.prop-stat-top {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--prop-muted);
  font-size: 12px;
}
.prop-stat strong {
  font-size: 22px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.prop-stat.is-pos strong,
.prop-cockpit .is-pos { color: #86efac; }
.prop-stat.is-neg strong,
.prop-cockpit .is-neg { color: #fca5a5; }
.prop-obj-stack {
  display: grid;
  gap: 14px;
}
.prop-obj-stack > h3 {
  margin: 4px 0 2px;
  font-size: 20px;
  letter-spacing: -0.03em;
}
.prop-obj-column {
  display: grid;
  gap: 16px;
}
.prop-obj {
  display: grid;
  gap: 12px;
  padding: 18px 20px 16px;
  border-radius: 20px;
  border: 1px solid var(--prop-line);
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.08), transparent 38%),
    var(--prop-surface);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}
.prop-obj.is-idle {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), var(--prop-shadow);
}
.prop-obj-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.22);
  color: #1a1208;
  font-size: 17px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: -0.04em;
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.22);
}
.prop-obj-num--1 { background: #d9773a; color: #1a1208; }
.prop-obj-num--2,
.prop-obj-num--3 { background: #2dd4bf; color: #042f2e; box-shadow: 0 0 16px rgba(45, 212, 191, 0.28); }
.prop-obj-num--4 { background: #d6b48a; color: #2a1d10; }
.prop-obj.is-done .prop-obj-num {
  background: #34d399;
  color: #052e16;
}
.prop-obj-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.prop-obj-head h4 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 15px;
}
.prop-obj-head p {
  margin: 6px 0 0;
  color: var(--prop-muted);
  font-size: 13px;
}
.prop-obj-right {
  display: grid;
  justify-items: end;
  gap: 6px;
  color: var(--prop-muted);
  font-size: 12px;
  text-align: right;
}
.prop-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.22);
  color: var(--prop-text);
  font-size: 11px;
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.22);
}
.prop-reset em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}
.prop-obj-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px 16px;
  margin: 0;
}
.prop-obj-meta div { display: grid; gap: 2px; }
.prop-obj-meta dt { color: var(--prop-muted); font-size: 11px; }
.prop-obj-meta dd { margin: 0; font-size: 13px; font-weight: 650; }
.prop-obj-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.prop-obj-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgb(var(--accent-rgb)), color-mix(in srgb, rgb(var(--accent-rgb)) 55%, #fff));
}
.prop-obj.is-done .prop-obj-track i { background: #34d399; }
.prop-gauge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.prop-gauge-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--prop-line);
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.16), transparent 48%),
    var(--prop-surface);
}
.prop-gauge-card.is-empty .prop-gauge small {
  max-width: 18ch;
  color: color-mix(in srgb, var(--prop-text) 78%, transparent);
}
.prop-gauge-card h4 { margin: 0; font-size: 15px; }
.prop-gauge {
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 2px;
  min-height: 132px;
  padding: 18px 12px 8px;
  border-radius: 20px 20px 12px 12px;
  background:
    radial-gradient(120px 70px at 50% 100%, rgba(var(--accent-rgb), 0.18), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent);
  border-bottom: 3px solid rgba(var(--accent-rgb), 0.45);
  box-shadow: inset 0 -8px 0 rgba(var(--accent-rgb), calc(var(--p) / 140));
}
.prop-gauge span { color: var(--prop-muted); font-size: 11px; }
.prop-gauge strong { font-size: 26px; letter-spacing: -0.04em; }
.prop-gauge-card.is-empty .prop-gauge { align-content: center; }
.prop-gauge-foot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--prop-line);
  color: var(--prop-muted);
  font-size: 11px;
}
.prop-gauge-foot b { display: block; color: var(--prop-text); font-size: 13px; }
.prop-history {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--prop-line);
  background: var(--prop-surface);
}
.prop-tabs {
  display: flex;
  gap: 6px;
}
.prop-tabs button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--prop-muted);
  font-weight: 650;
  transition: background 0.22s ease, color 0.22s ease;
}
.prop-tabs button.is-active {
  background: rgba(var(--accent-rgb), 0.18);
  color: var(--prop-text);
}
.prop-table--history { font-variant-numeric: tabular-nums; }
.prop-share-cell { color: var(--prop-muted); width: 28px; }
@media (max-width: 980px) {
  .prop-stat-row,
  .prop-gauge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .prop-stat-row,
  .prop-gauge-grid { grid-template-columns: minmax(0, 1fr); }
  .prop-obj-head { flex-direction: column; }
  .prop-obj-right { justify-items: start; text-align: left; }
}
.prop-hero { margin-bottom: 0; }
.prop-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--prop-accent);
}
.prop-hero h2 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.prop-sub,
.prop-muted { color: var(--prop-muted); font-size: 13px; line-height: 1.45; }
.prop-size-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.prop-size-btn,
.prop-ghost,
.prop-primary,
.prop-btn,
.prop-danger {
  min-height: 44px;
  border-radius: 16px;
  padding: 0 16px;
  border: 1px solid var(--prop-line);
  cursor: pointer;
  font-weight: 650;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, filter 0.16s ease;
}
.prop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.prop-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}
.prop-btn:active:not(:disabled) {
  transform: translateY(0);
}
.prop-size-btn {
  background: var(--prop-fill);
  color: var(--prop-text);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.prop-size-btn.is-active {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: var(--prop-fill-strong);
  color: var(--prop-text);
}
.prop-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary, var(--accent-primary)));
  color: var(--prop-on-accent);
  border: 0;
  box-shadow: 0 10px 28px var(--prop-glow);
}
.prop-primary:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow: 0 14px 34px rgba(var(--accent-rgb), 0.38);
}
.prop-ghost {
  background: var(--prop-fill);
  color: var(--prop-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.08);
}
.prop-ghost:hover:not(:disabled) {
  border-color: rgba(var(--accent-rgb), 0.4);
  background: var(--prop-fill-strong);
}
.prop-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.35);
  color: #ffc9c9;
}
.prop-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.18);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.18);
}
.prop-btn--sm {
  min-height: 36px;
  font-size: 12px;
  border-radius: 14px;
}
.prop-btn--spaced {
  margin-left: 4px;
}
.prop-plan-grid,
.prop-account-grid,
.prop-cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.prop-plan-card,
.prop-account-card,
.prop-cert-card,
.prop-panel {
  background: var(--prop-surface);
  border: 1px solid var(--prop-line);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: var(--prop-shadow);
  min-width: 0;
  max-width: 100%;
}
.prop-account-card {
  cursor: pointer;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}
.prop-account-card.is-active {
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.22), 0 0 28px rgba(var(--accent-rgb), 0.18);
  transform: translateY(-2px);
}
.prop-plan-card {
  display: grid;
  gap: 10px;
  align-content: start;
}
.prop-plan-card.is-active {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.18), var(--prop-shadow);
}
.prop-plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.prop-plan-top strong { font-size: 15px; }
.prop-plan-price {
  font-size: 26px;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--prop-text);
}
.prop-plan-meta {
  margin: 0;
  padding-left: 16px;
  color: var(--prop-muted);
  font-size: 12px;
  line-height: 1.45;
}
.prop-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.06em;
  border: 1px solid var(--prop-line);
  text-transform: uppercase;
}
.prop-pill--active {
  color: #bbf7d0;
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.14);
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.28);
  animation: prop-pulse 2.4s ease-in-out infinite;
}
@keyframes prop-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(52, 211, 153, 0.18); }
  50% { box-shadow: 0 0 22px rgba(52, 211, 153, 0.42); }
}
.prop-rules-stage,
.prop-cert-stage,
.prop-alive-empty {
  display: grid;
  gap: 16px;
}
.prop-rules-stage .prop-plan-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 700px) {
  .prop-rules-stage .prop-plan-grid { grid-template-columns: minmax(0, 1fr); }
}
.prop-alive-empty {
  justify-items: center;
  text-align: center;
  min-height: 280px;
  align-content: center;
  padding: 36px 20px;
  border-radius: 24px;
  border: 1px solid var(--prop-line);
  background:
    radial-gradient(circle at 50% 20%, rgba(var(--accent-rgb), 0.22), transparent 42%),
    var(--prop-surface);
}
.prop-alive-orb {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff, rgb(var(--accent-rgb)) 42%, transparent 70%);
  box-shadow: 0 0 40px rgba(var(--accent-rgb), 0.45);
  animation: prop-orb 2.8s ease-in-out infinite;
}
@keyframes prop-orb {
  0%, 100% { transform: scale(0.96); opacity: 0.82; }
  50% { transform: scale(1.06); opacity: 1; }
}
.prop-alive-empty strong { font-size: 22px; letter-spacing: -0.03em; }
.prop-alive-empty p { margin: 0; color: var(--prop-muted); max-width: 36ch; }
.prop-pill--passed,
.prop-pill--funded {
  color: var(--prop-accent);
  border-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.12);
}
.prop-pill--breached,
.prop-pill--deactivated {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.28);
  background: rgba(127, 29, 29, 0.38);
  box-shadow: none;
}
.prop-pill--expired {
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(120, 80, 16, 0.32);
  box-shadow: none;
}
.prop-accounts-desk { display: grid; gap: 18px; }
.prop-ledger {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.prop-ledger-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: 14px;
  padding: 16px 16px 16px 20px;
  border-radius: 20px;
  border: 1px solid var(--prop-line);
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.05), transparent 46%),
    var(--prop-surface);
  box-shadow: var(--prop-shadow);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.prop-ledger-card::before {
  content: "SNT";
  position: absolute;
  right: 10px;
  bottom: 2px;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.08em;
  opacity: 0.045;
  pointer-events: none;
}
.prop-ledger-card:hover,
.prop-ledger-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  outline: none;
}
.prop-ledger-rail {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: rgb(var(--accent-rgb));
}
.prop-ledger-card.is-active .prop-ledger-rail,
.prop-ledger-card.is-passed .prop-ledger-rail,
.prop-ledger-card.is-funded .prop-ledger-rail {
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.55);
}
.prop-ledger-card.is-deactivated .prop-ledger-rail {
  background: #f87171;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.45);
}
.prop-ledger-card.is-expired .prop-ledger-rail {
  background: #fbbf24;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}
.prop-ledger-card.is-dead {
  opacity: 0.74;
  filter: saturate(0.62);
}
.prop-ledger-card.is-dead::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -18deg,
    transparent,
    transparent 11px,
    rgba(248, 113, 113, 0.045) 11px,
    rgba(248, 113, 113, 0.045) 12px
  );
  pointer-events: none;
}
.prop-ledger-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.prop-ledger-top > div { flex: 1; min-width: 0; }
.prop-ledger-mark {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(var(--accent-rgb), 0.16);
  color: rgb(var(--accent-rgb));
  font-size: 13px;
  font-weight: 800;
}
.prop-ledger-card.is-deactivated .prop-ledger-mark {
  background: rgba(248, 113, 113, 0.14);
  color: #fca5a5;
}
.prop-ledger-top code {
  display: block;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--prop-text);
}
.prop-ledger-top p {
  margin: 4px 0 0;
  color: var(--prop-muted);
  font-size: 12px;
}
.prop-ledger-track {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.prop-ledger-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgb(var(--accent-rgb)), #86efac);
}
.prop-ledger-card.is-deactivated .prop-ledger-track i {
  background: #f87171;
}
.prop-ledger-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin: 0;
}
.prop-ledger-metrics dt {
  margin: 0 0 3px;
  color: var(--prop-muted);
  font-size: 11px;
  letter-spacing: 0.02em;
}
.prop-ledger-metrics dd {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.prop-ledger-metrics .is-pos { color: #86efac; }
.prop-ledger-metrics .is-neg { color: #fca5a5; }
.prop-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}
.prop-checkout-grid { display: grid; gap: 12px; max-width: 520px; }
.prop-checkout-grid label,
.prop-panel label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--prop-muted);
}
.prop-checkout-grid select,
.prop-checkout-grid input,
.prop-panel select,
.prop-promo-row input {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid var(--prop-line);
  background: rgba(8, 10, 22, 0.72);
  color: var(--prop-text);
  padding: 0 12px;
}
.prop-promo-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.prop-checkout-total {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 16px;
  background: var(--prop-fill);
  border: 1px solid var(--prop-line);
}
.prop-checkout-total strong { font-size: 26px; color: var(--prop-text); }
.prop-account-top,
.prop-account-mid,
.prop-inline,
.prop-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.prop-actions {
  margin: 0;
  padding: 0;
}
.prop-actions--toolbar {
  margin-bottom: 16px;
}
.prop-actions .prop-btn {
  min-width: 160px;
}
.prop-account-mid { margin: 12px 0; }
.prop-ring {
  --p: 0;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: conic-gradient(var(--prop-accent) calc(var(--p) * 1%), rgba(var(--accent-rgb), 0.12) 0);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.prop-ring span {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-secondary, #12101f);
  color: var(--prop-text);
  font-size: 12px;
  font-weight: 700;
}
.prop-dd { display: grid; gap: 4px; margin-top: 8px; }
.prop-dd-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--prop-muted); }
.prop-dd-track { height: 7px; border-radius: 999px; background: rgba(var(--accent-rgb), 0.12); overflow: hidden; }
.prop-dd-fill { display: block; height: 100%; border-radius: inherit; }
.prop-dd-fill--ok { background: #22c55e; }
.prop-dd-fill--warn { background: var(--prop-accent); }
.prop-dd-fill--danger { background: #ef4444; }
.prop-breach {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.32);
  color: #ffc9c9;
}
.prop-dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 0;
  align-items: start;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.prop-objectives { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.prop-objectives .is-ok { color: #86efac; }
.prop-objectives .is-bad { color: #fca5a5; }
.prop-goals-panel h3,
.prop-panel h3 {
  margin: 0 0 14px;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.prop-goals {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.prop-goal {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 64px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--prop-line);
  background: rgba(255, 255, 255, 0.025);
}
.prop-goal-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: var(--prop-text);
  background: var(--prop-fill);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.prop-goal div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.prop-goal strong {
  font-size: 14px;
  font-weight: 720;
  letter-spacing: -0.01em;
  text-transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.prop-goal small {
  color: var(--prop-muted);
  font-size: 12px;
}
.prop-goal.is-ok {
  border-color: rgba(34, 197, 139, 0.28);
  background: rgba(34, 197, 139, 0.07);
}
.prop-goal.is-ok .prop-goal-num {
  color: #052e16;
  background: #86efac;
}
.prop-goal.is-ok strong { color: #bbf7d0; }
.prop-goal.is-bad {
  border-color: rgba(var(--accent-rgb), 0.22);
}
.prop-actions-panel .prop-actions {
  width: 100%;
}
.prop-table-wrap { overflow: auto; border-radius: 14px; }
.prop-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.prop-table th,
.prop-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--prop-line);
  text-align: left;
}
.prop-empty,
.prop-skeleton {
  padding: 36px 16px;
  text-align: center;
  color: var(--prop-muted);
  border: 1px solid var(--prop-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}
.prop-cert-badge {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  color: var(--prop-accent);
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.06em;
  background: rgba(var(--accent-rgb), 0.12);
}
@media (max-width: 900px) {
  .prop-subnav button { flex: 1 1 calc(50% - 8px); border-radius: 14px; }
  .prop-account-card { cursor: pointer; }
  .prop-dash-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .prop-goals-panel {
    min-width: 0;
  }
  .prop-goal {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    min-height: 56px;
    padding: 10px 12px;
  }
  .prop-goal-num {
    width: 36px;
    height: 36px;
    font-size: 18px;
    border-radius: 12px;
  }
  .prop-actions .prop-btn {
    min-width: 0;
    width: 100%;
  }
}
@media (min-width: 901px) and (max-width: 1199px) {
  .prop-dash-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .prop-goals-panel {
    grid-column: 1 / -1;
  }
}
@media (min-width: 1200px) {
  .prop-dash-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Prop Trading ? landing + wizard modal */
.prop-landing {
  position: relative;
  overflow: hidden;
  min-height: min(62vh, 560px);
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 10px;
  padding: 48px 20px;
  border-radius: 28px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.24), transparent 46%),
    var(--prop-surface);
  color: var(--prop-text);
  transition: opacity 0.35s ease, transform 0.35s ease, filter 0.35s ease;
}
.prop-landing-orb {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.3), transparent 68%);
  filter: blur(8px);
  animation: propOrbFloat 6s ease-in-out infinite;
  pointer-events: none;
}
.prop-landing-title {
  position: relative;
  margin: 0;
  max-width: 14ch;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 750;
  color: var(--prop-text);
}
.prop-landing-ready {
  position: relative;
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  color: var(--prop-accent);
  font-weight: 650;
  letter-spacing: -0.02em;
}
.prop-ready-glow {
  display: inline-block;
  animation: propReadyPulse 2.4s ease-in-out infinite;
  text-shadow: 0 0 24px var(--prop-glow);
}
.prop-landing .prop-sub {
  position: relative;
  max-width: 42ch;
  margin: 4px 0 10px;
}
.prop-cta-wrap {
  position: relative;
  display: grid;
  place-items: center;
  margin-top: 8px;
  width: min(280px, 100%);
}
.prop-cta-ring {
  position: absolute;
  inset: -10px;
  border-radius: 999px;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  animation: propCtaRing 2.2s ease-out infinite;
  pointer-events: none;
}
.prop-cta-ring--delay {
  animation-delay: 0.7s;
  border-color: rgba(var(--accent-rgb), 0.28);
}
.prop-landing-cta {
  position: relative;
  z-index: 1;
  min-width: 200px;
  min-height: 52px;
  padding: 0 30px;
  border-radius: 999px;
  font-size: 15px;
}
.prop-landing.is-launching {
  opacity: 0.35;
  transform: scale(0.985);
  filter: blur(1px);
}
.prop-landing-cta.is-launching {
  transform: scale(1.08);
  box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0.18), 0 18px 48px var(--prop-glow);
}
@keyframes propOrbFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.7; }
  50% { transform: translateY(-12px) scale(1.06); opacity: 1; }
}
@keyframes propReadyPulse {
  0%, 100% { transform: scale(1); opacity: 0.88; }
  50% { transform: scale(1.04); opacity: 1; }
}
@keyframes propCtaRing {
  0% { transform: scale(0.92); opacity: 0.7; }
  70% { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(1.18); opacity: 0; }
}
.prop-accounts-stage {
  display: grid;
  gap: 14px;
}
.prop-accounts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.prop-accounts-head h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}
.prop-picker {
  position: relative;
}
.prop-picker-current {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 16px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--prop-line);
  background:
    radial-gradient(circle at 8% 0%, rgba(var(--accent-rgb), 0.16), transparent 42%),
    var(--prop-surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.prop-picker-current {
  min-height: 78px;
  padding-right: 18px;
}
.prop-picker-current > .prop-ico {
  width: 18px;
  height: 18px;
  color: var(--prop-muted);
  transition: transform 0.22s ease;
}
.prop-picker.is-open .prop-picker-current {
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.16), 0 16px 36px rgba(0, 0, 0, 0.22);
}
.prop-picker.is-open .prop-picker-current > .prop-ico {
  transform: rotate(180deg);
}
.prop-picker-body,
.prop-picker-option {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.prop-picker-current .prop-picker-body {
  width: 100%;
}
.prop-picker-id {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}
.prop-picker-id code {
  color: #fff;
  font-size: 13px;
  letter-spacing: -0.01em;
}
.prop-picker-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.prop-picker-copy strong {
  font-size: 14px;
  letter-spacing: -0.02em;
}
.prop-picker-copy small {
  color: var(--prop-muted);
  font-size: 12px;
}
.prop-picker-eq {
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.prop-picker-menu {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  background: rgba(10, 8, 14, 0.94);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
}
.prop-picker-menu[hidden] { display: none; }
.prop-picker.is-open .prop-picker-menu {
  animation: propPickerIn 0.22s ease;
}
.prop-picker-option {
  width: 100%;
  min-height: 68px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.prop-picker-option:hover,
.prop-picker-option.is-active {
  border-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.12);
}
@keyframes propPickerIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.prop-breach-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(248, 113, 113, 0.22);
  background:
    linear-gradient(135deg, rgba(90, 20, 28, 0.42), rgba(16, 10, 12, 0.2)),
    var(--prop-surface);
}
.prop-breach-banner.is-expired {
  border-color: rgba(251, 191, 36, 0.28);
  background:
    linear-gradient(135deg, rgba(90, 62, 16, 0.38), rgba(16, 12, 8, 0.2)),
    var(--prop-surface);
}
.prop-breach-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
  flex: 0 0 auto;
}
.prop-breach-banner.is-expired .prop-breach-mark {
  background: rgba(251, 191, 36, 0.14);
  color: #fde68a;
}
.prop-breach-banner strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.prop-breach-banner p {
  margin: 4px 0 0;
  color: rgba(254, 202, 202, 0.78);
  font-size: 13px;
  line-height: 1.45;
}
.prop-breach-banner.is-expired p {
  color: rgba(253, 230, 138, 0.78);
}
@media (max-width: 760px) {
  .prop-picker-body,
  .prop-picker-option {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
  .prop-picker-eq { font-size: 12px; }
}
.prop-cockpit-stage {
  display: grid;
  gap: 22px;
  min-width: 0;
}
.prop-cockpit-stage.is-leave-left {
  animation: propAccountLeaveLeft 0.3s ease forwards;
}
.prop-cockpit-stage.is-leave-right {
  animation: propAccountLeaveRight 0.3s ease forwards;
}
.prop-cockpit-stage.is-enter-next {
  animation: propAccountEnterNext 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.prop-cockpit-stage.is-enter-prev {
  animation: propAccountEnterPrev 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes propAccountLeaveLeft {
  to { opacity: 0; transform: translateX(-32px); }
}
@keyframes propAccountLeaveRight {
  to { opacity: 0; transform: translateX(32px); }
}
@keyframes propAccountEnterNext {
  from { opacity: 0; transform: translateX(36px); }
  to { opacity: 1; transform: none; }
}
@keyframes propAccountEnterPrev {
  from { opacity: 0; transform: translateX(-36px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .prop-cockpit-stage,
  .prop-account-card,
  .prop-ledger-card { animation: none !important; transition: none !important; }
}
.prop-account-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 16px;
}
.prop-account-switch label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--prop-muted);
  flex: 1 1 220px;
}
.prop-account-switch select {
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid var(--prop-line);
  background: rgba(8, 10, 22, 0.72);
  color: var(--prop-text);
  padding: 0 12px;
}
.prop-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 14000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(var(--accent-rgb), 0.12);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.28s ease;
}
#propWizardRoot {
  position: static;
}
body.prop-wizard-open {
  overflow: hidden;
}
body:not([data-theme="white"]) .prop-modal-backdrop {
  background: rgba(4, 3, 12, 0.72);
}
body[data-theme="white"] .prop-modal-backdrop {
  background: rgba(15, 23, 42, 0.35);
}
.prop-modal-backdrop.is-visible { opacity: 1; }
.prop-modal-backdrop.is-leaving { opacity: 0; }
.prop-modal {
  position: relative;
  width: min(720px, 100%);
  max-height: min(88vh, 860px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 28px 24px 22px;
  border-radius: 28px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  background:
    radial-gradient(circle at 10% 0%, rgba(var(--accent-rgb), 0.22), transparent 40%),
    var(--prop-surface);
  color: var(--prop-text);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  transform: translateY(18px) scale(0.96);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}
body[data-theme="white"] .prop-modal {
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.16);
  background:
    radial-gradient(circle at 10% 0%, rgba(var(--accent-rgb), 0.14), transparent 40%),
    #fff;
}
.prop-modal.is-visible {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.prop-modal.is-from-cta.is-entering {
  transform: translateY(40px) scale(0.9);
}
.prop-modal.is-from-cta.is-visible {
  transform: translateY(0) scale(1);
}
.prop-modal-backdrop.is-leaving .prop-modal {
  transform: translateY(12px) scale(0.97);
  opacity: 0;
}
.prop-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--prop-line);
  background: var(--prop-fill);
  color: var(--prop-text);
  cursor: pointer;
  line-height: 0;
}
.prop-modal-close svg {
  width: 14px;
  height: 14px;
  display: block;
  flex: none;
}
.prop-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}
.prop-modal--confirm {
  width: min(420px, 100%);
  max-height: none;
  padding: 28px 24px 22px;
  text-align: left;
}
.prop-confirm-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 0 14px;
  border-radius: 14px;
  background: rgba(248, 113, 113, 0.14);
  color: #fecaca;
}
.prop-modal--confirm h3 {
  margin: 6px 0 8px;
  font-size: 24px;
  letter-spacing: -0.04em;
}
.prop-confirm-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.prop-confirm-actions .prop-btn {
  min-width: 120px;
}
.prop-wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 18px;
}
.prop-wizard-step {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--prop-line);
  color: var(--prop-muted);
  font-size: 11px;
  font-weight: 650;
}
.prop-wizard-step.is-active {
  color: var(--prop-on-accent);
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.35);
}
.prop-wizard-step.is-done {
  color: var(--prop-accent);
  border-color: rgba(var(--accent-rgb), 0.28);
}
.prop-wizard-body h3 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.prop-wizard-field {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  font-size: 12px;
  color: var(--prop-muted);
}
.prop-wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
}
.prop-wizard-actions .prop-primary,
.prop-wizard-actions .prop-ghost {
  min-width: 120px;
}
.prop-plan-grid--wizard {
  margin-top: 12px;
}
.prop-plan-card--pick {
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.prop-platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.prop-platform-card {
  display: grid;
  gap: 6px;
  padding: 20px 16px;
  border-radius: 20px;
  border: 1px solid var(--prop-line);
  background: var(--prop-fill);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.prop-platform-card strong { font-size: 16px; }
.prop-platform-card span { font-size: 12px; color: var(--prop-muted); }
.prop-platform-card.is-active {
  border-color: rgba(var(--accent-rgb), 0.5);
  background: var(--prop-fill-strong);
}
.prop-wizard-note {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.4;
}
@media (max-width: 640px) {
  .prop-platform-grid { grid-template-columns: 1fr; }
  .prop-landing-title { max-width: 16ch; }
}

/* Signal Genesis registration ? card near center-left; headline ON flowers right */
.welcome-modal.welcome-wizard-modal.hidden,
body.is-web-guest .welcome-modal.welcome-wizard-modal.hidden {
  display: none !important;
}

.welcome-modal.welcome-wizard-modal,
body.is-web-guest .welcome-modal.welcome-wizard-modal {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  justify-items: stretch;
  align-content: stretch;
  place-items: unset;
  gap: 0;
  padding: 0;
  overflow: hidden;
  background-color: #04030a;
  background-image:
    linear-gradient(105deg, rgba(4, 3, 10, 0.97) 0%, rgba(4, 3, 10, 0.9) 36%, rgba(4, 3, 10, 0.4) 58%, rgba(4, 3, 10, 0.5) 100%),
    url("assets/welcome-hero.jpg");
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  backdrop-filter: none;
}

.welcome-modal.welcome-wizard-modal .welcome-wizard-card,
.welcome-modal.welcome-wizard-modal.welcome-wizard-step-1 .welcome-wizard-card,
.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-wizard-card,
body.is-web-guest .welcome-modal.welcome-wizard-modal .welcome-wizard-card,
body.is-web-guest .welcome-wizard-modal .welcome-wizard-card {
  position: relative;
  top: auto;
  left: auto;
  z-index: 2;
  order: 1;
  align-self: center;
  justify-self: center;
  margin: 0 0 0 clamp(24px, 4vw, 64px) !important;
  transform: none;
  box-sizing: border-box;
  width: min(620px, calc(100% - 40px));
  max-width: 100%;
  min-width: 0;
  max-height: min(94vh, 900px);
  overflow-x: hidden;
  overflow-y: auto;
  gap: 22px;
  padding: 40px 38px 34px;
  border-radius: 24px;
  border: 1px solid #272733;
  background: rgba(11, 11, 16, .96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .52);
  backdrop-filter: blur(18px);
}

.welcome-modal.welcome-wizard-modal .welcome-wizard-card::before {
  content: none;
}

.welcome-modal.welcome-wizard-modal .welcome-wizard-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.welcome-wizard-brand-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.welcome-modal.welcome-wizard-modal .welcome-wizard-logo {
  width: 30px;
  height: 30px;
  box-shadow: none;
}

.welcome-wizard-wordmark {
  color: #f3f3f5;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.welcome-lang-menu {
  position: relative;
  flex: 0 0 auto;
}

.welcome-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #2a2a34;
  border-radius: 999px;
  color: #cfcfd6;
  background: #15151c;
  cursor: pointer;
}

.welcome-lang-toggle:hover {
  color: #fff;
  border-color: #3a3a46;
}

.welcome-lang-toggle em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}

.welcome-lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5;
  display: grid;
  min-width: 156px;
  padding: 6px;
  border: 1px solid #2a2a34;
  border-radius: 14px;
  background: #121218;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

.welcome-lang-dropdown.hidden { display: none; }

.welcome-lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  color: #d6d6de;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
}

.welcome-lang-option span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: #aaaab4;
  background: #22222c;
  font-size: 10px;
  font-weight: 800;
}

.welcome-lang-option:hover,
.welcome-lang-option.is-active {
  color: #fff;
  background: #1d1d27;
}

.welcome-lang-option.is-active span {
  color: #fff;
  background: #34343f;
}

.welcome-auth-code-field.hidden { display: none; }

.welcome-modal.welcome-wizard-modal .welcome-step-copy {
  margin-bottom: 12px;
}

.welcome-modal.welcome-wizard-modal .welcome-step-copy .kicker {
  display: none;
}

.welcome-modal.welcome-wizard-modal .welcome-step-copy h2 {
  margin-bottom: 8px;
  font-size: 34px;
  font-weight: 680;
  letter-spacing: -.035em;
}

.welcome-modal.welcome-wizard-modal .welcome-step-copy .subtitle {
  color: #9999a5;
  font-size: 13px;
}


.welcome-modal.welcome-wizard-modal .welcome-auth-panel {
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.welcome-modal.welcome-wizard-modal .welcome-auth-btn {
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 11px;
  border-color: #2b2b35;
  color: #ededf0;
  background: #17171e;
  box-shadow: none;
  font-size: 12px;
}

.welcome-modal.welcome-wizard-modal .welcome-auth-btn-label {
  white-space: normal;
  line-height: 1.2;
  text-align: left;
}

.welcome-modal.welcome-wizard-modal .welcome-auth-btn:hover:not(:disabled) {
  transform: none;
  border-color: #3b3b48;
  background: #1d1d25;
  box-shadow: none;
}

.welcome-modal.welcome-wizard-modal .welcome-auth-btn--telegram .welcome-auth-btn-icon {
  color: #2aabee;
}

.welcome-modal.welcome-wizard-modal .welcome-auth-divider {
  margin: 7px 0 4px;
  color: #666671;
  font-size: 10px;
}

.welcome-modal.welcome-wizard-modal .welcome-auth-divider::before,
.welcome-modal.welcome-wizard-modal .welcome-auth-divider::after {
  background: #282831;
}

.welcome-modal.welcome-wizard-modal .welcome-auth-field {
  gap: 6px;
}

.welcome-modal.welcome-wizard-modal .welcome-auth-field > span {
  color: #898994;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.welcome-modal.welcome-wizard-modal .welcome-auth-field .table-edit-input {
  min-height: 46px;
  border: 1px solid #272731;
  border-radius: 11px;
  color: #f0f0f2;
  background: #15151c;
  box-shadow: none;
}

.welcome-modal.welcome-wizard-modal .welcome-auth-field .table-edit-input:focus {
  border-color: #666674;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .04);
}

.welcome-modal.welcome-wizard-modal .welcome-password-toggle {
  color: #898994;
  background: #22222b;
}

.welcome-modal.welcome-wizard-modal .welcome-auth-mode-toggle {
  margin-top: 4px;
  color: #b5b5bd;
}

.welcome-modal.welcome-wizard-modal .welcome-wizard-actions {
  flex-wrap: nowrap;
  padding-top: 2px;
}

.welcome-modal.welcome-wizard-modal #welcomeNext {
  flex: 1 1 auto;
  min-height: 48px;
  border: 0;
  border-radius: 11px;
  color: #101014;
  background: #f1f1f3;
  box-shadow: none;
}

.welcome-modal.welcome-wizard-modal #welcomeNext:hover {
  color: #101014;
  background: #fff;
  box-shadow: none;
  transform: none;
}

.welcome-modal.welcome-wizard-modal #welcomeBack {
  min-height: 48px;
  border-radius: 11px;
}

.welcome-modal.welcome-wizard-modal .welcome-complete-splash {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  justify-items: center;
  align-content: center;
  width: auto;
  min-height: 0;
  max-width: none;
  padding: 32px 24px;
  background: rgba(2, 1, 6, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.welcome-modal.welcome-wizard-modal .welcome-complete-splash.hidden {
  display: none;
}

.welcome-modal.welcome-wizard-modal.welcome-complete-active .welcome-signal-scene,
.welcome-modal.welcome-wizard-modal.welcome-complete-active .welcome-wizard-card,
.welcome-modal.welcome-wizard-modal.welcome-complete-active .welcome-product-story,
.welcome-modal.welcome-wizard-modal.welcome-complete-active .welcome-scroll-cue,
.welcome-modal.welcome-wizard-modal.welcome-complete-active .welcome-hero-stage {
  visibility: hidden;
  pointer-events: none;
}

.welcome-modal.welcome-wizard-modal .welcome-complete-title {
  max-width: 18ch;
  font-size: clamp(32px, 5vw, 52px);
  color: #f5f5f7;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  filter: none;
}

/* Step 2: centered card, quieter modules */
.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2,
body.is-web-guest .welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 {
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  justify-items: center;
  background-image:
    linear-gradient(180deg, rgba(4, 3, 10, 0.88) 0%, rgba(4, 3, 10, 0.94) 100%),
    url("assets/welcome-hero.jpg");
  background-position: center right;
}

.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-signal-scene {
  display: none;
}

.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-wizard-card,
.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2.welcome-wizard-step-2 .welcome-wizard-card,
body.is-web-guest .welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-wizard-card {
  justify-self: center;
  margin: 0 !important;
  width: min(720px, calc(100vw - 40px));
  max-height: min(90vh, 820px);
  padding: 28px 28px 22px;
}

.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-style-block {
  margin-bottom: 4px;
  padding-bottom: 16px;
  border-bottom: 1px solid #26262f;
}

.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-style-label {
  margin: 0 0 10px;
  color: #9a9aa6;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-style-pill,
.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-style-picker button {
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid #2a2a34;
  background: #121218;
  color: #cfcfd6;
}

.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-style-pill.is-active,
.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-style-picker button.is-active {
  border-color: #7a7a88;
  background: #23232c;
  color: #fff;
}

.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-module-grid,
.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-options {
  gap: 10px;
  margin-top: 18px;
  padding-top: 2px;
}

.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-options label,
.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-module-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-height: 0;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid #2c2c36;
  background: #121218;
  transform: none;
  cursor: pointer;
}

.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-options label:hover,
.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-module-card:hover {
  transform: none;
  border-color: #3d3d4a;
  background: #17171f;
}

.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-options input[type="checkbox"],
.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-module-card input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  border: 1.5px solid #5a5a68;
  border-radius: 50%;
  background: transparent;
  accent-color: transparent;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-options input[type="checkbox"]:checked,
.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-module-card input[type="checkbox"]:checked {
  border-color: #d8d8e0;
  background:
    radial-gradient(circle at center, #f2f2f5 0 35%, transparent 36%),
    #2a2a34;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
}

.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-options label:has(input:checked),
.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-module-card:has(input:checked) {
  border-color: #3f3f4c;
  background: #18181f;
}

.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-options strong,
.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-module-card strong {
  font-size: 13px;
  color: #f0f0f3;
}

.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-options small,
.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-module-card small {
  font-size: 11px;
  line-height: 1.35;
  color: #8b8b96;
}

.personal-profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.personal-profile-actions #personalProfileSave {
  flex: 1 1 auto;
}

.personal-profile-logout {
  flex: 0 0 auto;
  min-height: 44px;
  border: 1px solid #3a2a2a;
  color: #f0b4b4;
  background: #1a1214;
}

.personal-profile-logout:hover {
  border-color: #5a3434;
  color: #ffd0d0;
  background: #241618;
}

/* Headline in the right column, over the flowers */
.welcome-signal-scene {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  order: 2;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  height: 100%;
  padding: 0 clamp(28px, 4vw, 72px);
  pointer-events: none;
}

.welcome-signal-copy { max-width: min(700px, 100%); }
.welcome-signal-copy p { margin: 0 0 18px; color: #a394ff; font-size: 13px; letter-spacing: .2em; font-weight: 700; }
.welcome-signal-copy h1 {
  margin: 0;
  max-width: 11ch;
  color: #f7f5ff;
  font-size: clamp(58px, 6.6vw, 108px);
  line-height: .93;
  letter-spacing: -.055em;
  text-shadow: 0 18px 60px rgba(0, 0, 0, .65);
}
.welcome-signal-copy > span { display: block; max-width: 34ch; margin-top: 22px; color: rgba(226, 224, 242, .82); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; }

@media (min-width: 1440px) {
  .welcome-modal.welcome-wizard-modal .welcome-wizard-card,
  .welcome-modal.welcome-wizard-modal.welcome-wizard-step-1 .welcome-wizard-card,
  .welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-wizard-card,
  body.is-web-guest .welcome-modal.welcome-wizard-modal .welcome-wizard-card {
    width: min(640px, calc(100% - 48px));
  }
  .welcome-signal-copy h1 {
    font-size: clamp(72px, 6.2vw, 118px);
  }
}

.welcome-signal-metrics {
  display: none;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.welcome-signal-metric {
  display: grid;
  gap: 3px;
  min-width: 108px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 8, 18, 0.55);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
}
.welcome-signal-metric span { font-size: 9px; letter-spacing: .16em; color: rgba(221, 218, 240, .55); }
.welcome-signal-metric strong { font-size: 17px; color: #f5f2ff; }

.welcome-password-wrap { position: relative; display: block; }
.welcome-password-wrap .table-edit-input { padding-right: 52px; }
.welcome-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  display: inline-grid;
  place-items: center;
  transform: translateY(-50%);
  width: 36px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}
.welcome-password-toggle svg,
.welcome-password-icon {
  width: 18px;
  height: 18px;
  display: none;
  pointer-events: none;
}
.welcome-password-toggle .welcome-password-icon--show { display: block; }
.welcome-password-toggle.is-visible .welcome-password-icon--show { display: none; }
.welcome-password-toggle.is-visible .welcome-password-icon--hide { display: block; }
.welcome-auth-mode-toggle {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 0;
  border: 0;
  color: #a99cff;
  background: none;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.welcome-auth-panel.is-login #welcomeAuthPasswordConfirmField,
.welcome-auth-panel.is-login #welcomeAuthCodeField { display: none; }

@media (max-width: 1180px) {
  .welcome-modal.welcome-wizard-modal,
  body.is-web-guest .welcome-modal.welcome-wizard-modal {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .welcome-signal-copy h1 { font-size: clamp(36px, 4.2vw, 56px); }
  .welcome-signal-copy > span { display: none; }
}

@media (max-width: 860px) {
  .welcome-modal.welcome-wizard-modal,
  body.is-web-guest .welcome-modal.welcome-wizard-modal {
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
    overflow: auto;
    background-position: center top;
    background-image:
      linear-gradient(180deg, rgba(4, 3, 10, 0.62) 0%, rgba(4, 3, 10, 0.9) 42%, rgba(4, 3, 10, 0.97) 100%),
      url("assets/welcome-hero.jpg");
  }
  .welcome-signal-scene { display: none; }
  .welcome-modal.welcome-wizard-modal .welcome-wizard-card,
  .welcome-modal.welcome-wizard-modal.welcome-wizard-step-1 .welcome-wizard-card,
  .welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-wizard-card,
  body.is-web-guest .welcome-modal.welcome-wizard-modal .welcome-wizard-card,
  body.is-web-guest .welcome-wizard-modal .welcome-wizard-card {
    justify-self: center;
    margin: 0 auto !important;
    width: min(500px, 100%);
    max-height: none;
  }
}


body[data-theme="white"] .welcome-modal.welcome-wizard-modal {
  background-color: #eef0f8;
  background-image:
    linear-gradient(100deg, rgba(238, 240, 248, 0.97) 0%, rgba(238, 240, 248, 0.88) 32%, rgba(238, 240, 248, 0.45) 58%, rgba(238, 240, 248, 0.7) 100%),
    url("assets/welcome-hero.jpg");
}
body[data-theme="white"] .welcome-signal-copy h1 { color: #101426; text-shadow: none; }
body[data-theme="white"] .welcome-signal-copy > span { color: rgba(15, 23, 42, .62); }
body[data-theme="white"] .welcome-signal-metric { background: rgba(255, 255, 255, .9); border-color: rgba(15, 23, 42, .08); }
body[data-theme="white"] .welcome-signal-metric strong { color: #101426; }
body[data-theme="white"] .welcome-signal-metric span { color: rgba(15, 23, 42, .5); }
body[data-theme="white"] .welcome-modal.welcome-wizard-modal .welcome-wizard-card,
body[data-theme="white"] .welcome-modal.welcome-wizard-modal.welcome-wizard-step-1 .welcome-wizard-card,
body[data-theme="white"] .welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-wizard-card {
  border-color: rgba(15, 23, 42, .1);
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .14);
}

/* Welcome product story */
.welcome-modal.welcome-wizard-modal,
body.is-web-guest .welcome-modal.welcome-wizard-modal {
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-behavior: smooth;
  background: #05050a;
  scrollbar-color: rgba(163, 148, 255, .55) rgba(255, 255, 255, .04);
}

.welcome-modal.welcome-wizard-modal::-webkit-scrollbar { width: 8px; }
.welcome-modal.welcome-wizard-modal::-webkit-scrollbar-track { background: rgba(255, 255, 255, .03); }
.welcome-modal.welcome-wizard-modal::-webkit-scrollbar-thumb {
  border: 2px solid #07070c;
  border-radius: 999px;
  background: rgba(163, 148, 255, .5);
}

.welcome-hero-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background-color: #04030a;
  background-image:
    linear-gradient(105deg, rgba(4, 3, 10, .97) 0%, rgba(4, 3, 10, .9) 36%, rgba(4, 3, 10, .4) 58%, rgba(4, 3, 10, .5) 100%),
    url("assets/welcome-hero.jpg");
  background-position: center right;
  background-size: cover;
  background-repeat: no-repeat;
}

.welcome-scroll-cue {
  position: absolute;
  z-index: 4;
  bottom: 22px;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: rgba(237, 234, 255, .56);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  transform: translateX(-50%);
  pointer-events: none;
}

.welcome-scroll-cue i {
  position: relative;
  display: block;
  width: 1px;
  height: 34px;
  overflow: hidden;
  background: rgba(255, 255, 255, .14);
}

.welcome-scroll-cue i::after {
  content: "";
  position: absolute;
  inset: -100% 0 auto;
  height: 100%;
  background: #b4a8ff;
  animation: welcomeScrollCue 2.2s ease-in-out infinite;
}

@keyframes welcomeScrollCue {
  0% { transform: translateY(0); }
  65%, 100% { transform: translateY(200%); }
}

.welcome-lang-current-flag {
  display: inline-grid;
  place-items: center;
  width: 19px;
  font-size: 15px;
  line-height: 1;
}

.welcome-lang-dropdown { min-width: 212px; }

.welcome-lang-option .welcome-lang-flag {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 8px;
  color: inherit;
  background: rgba(255, 255, 255, .04);
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
}

.welcome-lang-option .welcome-lang-name {
  display: block;
  width: auto;
  height: auto;
  flex: 1 1 auto;
  border-radius: 0;
  color: inherit;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
}

.welcome-lang-option em {
  color: #71717e;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .08em;
}

.welcome-lang-option.is-active .welcome-lang-flag {
  color: inherit;
  background: rgba(255, 255, 255, .08);
}

.welcome-lang-option.is-active .welcome-lang-name { background: transparent; }
.welcome-lang-option.is-active em { color: #c5bdff; }

.welcome-product-story {
  position: relative;
  z-index: 1;
  overflow: hidden;
  color: #f5f4fa;
  background:
    radial-gradient(circle at 13% 17%, rgba(104, 77, 220, .13), transparent 26%),
    radial-gradient(circle at 88% 51%, rgba(28, 169, 183, .08), transparent 22%),
    #05050a;
}

.welcome-product-story::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .18;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
}

.welcome-story-section,
.welcome-story-footer {
  position: relative;
  width: min(1520px, calc(100% - clamp(40px, 8vw, 144px)));
  margin: 0 auto;
}

.welcome-story-section { padding: clamp(110px, 15vw, 220px) 0; }

.welcome-story-eyebrow {
  margin: 0 0 24px;
  color: #a99cff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.welcome-story-intro {
  display: grid;
  align-content: center;
  min-height: 100vh;
  min-height: 100svh;
}

.welcome-story-display {
  position: relative;
  z-index: 1;
  max-width: 12ch;
  margin: 0;
  font-size: clamp(58px, 9.2vw, 156px);
  font-weight: 680;
  line-height: .88;
  letter-spacing: -.065em;
}

.welcome-story-intro-copy {
  display: grid;
  grid-template-columns: minmax(160px, .6fr) minmax(280px, 1fr);
  gap: clamp(24px, 7vw, 110px);
  align-items: start;
  max-width: 880px;
  margin: clamp(60px, 9vw, 130px) 0 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.welcome-story-intro-copy h3 {
  margin: 0;
  font-size: clamp(18px, 2vw, 28px);
  letter-spacing: -.03em;
}

.welcome-story-intro-copy p,
.welcome-story-feature p,
.welcome-story-flow-copy,
.welcome-story-faq-item p {
  color: rgba(224, 221, 238, .67);
  line-height: 1.7;
}

.welcome-story-intro-copy p { margin: 0; font-size: clamp(16px, 1.35vw, 20px); }

.welcome-story-orbit {
  position: absolute;
  top: 12%;
  right: -5%;
  width: min(44vw, 700px);
  aspect-ratio: 1;
  border: 1px solid rgba(169, 156, 255, .15);
  border-radius: 50%;
  animation: welcomeOrbitTurn 30s linear infinite;
}

.welcome-story-orbit::before,
.welcome-story-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(169, 156, 255, .1);
  border-radius: 50%;
}

.welcome-story-orbit::before { inset: 15%; transform: rotate(63deg) scaleX(.38); }
.welcome-story-orbit::after { inset: 31%; box-shadow: 0 0 80px rgba(119, 91, 255, .16); }
.welcome-story-orbit i {
  position: absolute;
  top: 50%;
  left: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #a99cff;
  box-shadow: 0 0 24px #8d7cff;
}
.welcome-story-orbit i:nth-child(2) { top: 13%; left: 75%; width: 6px; height: 6px; }
.welcome-story-orbit i:nth-child(3) { top: 83%; left: 69%; width: 4px; height: 4px; }

@keyframes welcomeOrbitTurn { to { transform: rotate(360deg); } }

.welcome-story-heading {
  display: grid;
  grid-template-columns: minmax(180px, .6fr) minmax(300px, 1.4fr);
  gap: clamp(28px, 8vw, 140px);
  align-items: end;
  margin-bottom: clamp(56px, 9vw, 120px);
}

.welcome-story-heading .welcome-story-eyebrow { margin: 0; }

.welcome-story-heading h2,
.welcome-story-finale h2 {
  margin: 0;
  font-size: clamp(48px, 7vw, 116px);
  line-height: .92;
  letter-spacing: -.06em;
}

.welcome-story-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, .14);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.welcome-story-feature {
  position: relative;
  min-height: 440px;
  padding: 34px clamp(24px, 3vw, 50px) 42px;
  border-right: 1px solid rgba(255, 255, 255, .14);
  transition: background .35s ease;
}

.welcome-story-feature:last-child { border-right: 0; }
.welcome-story-feature:hover { background: rgba(255, 255, 255, .025); }

.welcome-story-feature-index {
  color: rgba(226, 222, 243, .36);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
}

.welcome-story-feature-icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: 70px 0 38px;
  border: 1px solid rgba(169, 156, 255, .25);
  border-radius: 50%;
  color: #b4a8ff;
  background: radial-gradient(circle, rgba(127, 99, 255, .16), transparent 66%);
  font-size: 29px;
}

.welcome-story-feature-icon--sentra {
  box-shadow: 0 0 44px rgba(119, 91, 255, .16);
  animation: welcomeSentraPulse 3s ease-in-out infinite;
}

@keyframes welcomeSentraPulse {
  50% { transform: scale(1.07); box-shadow: 0 0 60px rgba(119, 91, 255, .28); }
}

.welcome-story-feature h3 {
  max-width: 13ch;
  margin: 0 0 18px;
  font-size: clamp(24px, 2.2vw, 36px);
  line-height: 1.02;
  letter-spacing: -.04em;
}

.welcome-story-feature p { max-width: 38ch; margin: 0; font-size: 14px; }

.welcome-story-flow { text-align: center; }
.welcome-story-flow .welcome-story-eyebrow { text-align: center; }

.welcome-story-flow-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2.6vw, 46px);
  margin: clamp(56px, 8vw, 100px) calc(50% - 50vw);
  font-size: clamp(34px, 6vw, 104px);
  font-weight: 680;
  line-height: .95;
  letter-spacing: -.055em;
  white-space: nowrap;
}

.welcome-story-flow-line i {
  color: rgba(169, 156, 255, .35);
  font-size: .5em;
  font-style: normal;
  font-weight: 300;
}

.welcome-story-flow-copy {
  max-width: 620px;
  margin: 0 auto;
  font-size: clamp(16px, 1.4vw, 20px);
}

.welcome-story-faq-list {
  max-width: 1040px;
  margin-left: auto;
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.welcome-story-faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.welcome-story-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 4px;
  cursor: pointer;
  list-style: none;
  font-size: clamp(20px, 2.3vw, 34px);
  font-weight: 620;
  letter-spacing: -.035em;
}

.welcome-story-faq-item summary::-webkit-details-marker { display: none; }

.welcome-story-faq-item summary i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  color: #b4a8ff;
  font-style: normal;
  font-weight: 300;
  transition: transform .25s ease, background .25s ease;
}

.welcome-story-faq-item[open] summary i {
  background: rgba(169, 156, 255, .1);
  transform: rotate(45deg);
}

.welcome-story-faq-item p {
  max-width: 760px;
  margin: -8px 0 30px;
  padding-right: 48px;
  font-size: clamp(14px, 1.25vw, 18px);
}

.welcome-story-finale {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 50px;
  min-height: 78vh;
}

.welcome-story-finale h2 { max-width: 9ch; }

.welcome-story-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  min-width: min(340px, 100%);
  min-height: 76px;
  padding: 0 18px 0 28px;
  border: 1px solid rgba(169, 156, 255, .3);
  border-radius: 999px;
  color: #f5f3ff;
  background: rgba(137, 112, 255, .12);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.welcome-story-cta i {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #111016;
  background: #eeeafd;
  font-size: 18px;
  font-style: normal;
}

.welcome-story-cta:hover {
  border-color: rgba(187, 174, 255, .65);
  background: rgba(137, 112, 255, .2);
  transform: translateY(-3px);
}

.welcome-story-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0 42px;
  border-top: 1px solid rgba(255, 255, 255, .11);
  color: rgba(224, 221, 238, .38);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.welcome-reveal {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(54px);
  transition:
    opacity .9s cubic-bezier(.2, .7, .2, 1),
    filter .9s cubic-bezier(.2, .7, .2, 1),
    transform .9s cubic-bezier(.2, .7, .2, 1);
}

.welcome-reveal.is-visible {
  opacity: 1;
  filter: none;
  transform: translateY(0);
}

.welcome-story-feature:nth-child(2) { transition-delay: .12s; }
.welcome-story-feature:nth-child(3) { transition-delay: .24s; }

.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2,
body.is-web-guest .welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 {
  overflow: hidden;
  background-color: #04030a;
  background-image:
    linear-gradient(180deg, rgba(4, 3, 10, .88) 0%, rgba(4, 3, 10, .94) 100%),
    url("assets/welcome-hero.jpg");
  background-position: center right;
  background-size: cover;
  background-repeat: no-repeat;
}

.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100svh;
  background: transparent;
}

.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-product-story,
.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-scroll-cue {
  display: none;
}

@media (max-width: 1180px) {
  .welcome-hero-stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .welcome-story-feature { min-height: 410px; }
  .welcome-story-flow-line { white-space: normal; flex-wrap: wrap; }
}

@media (max-width: 860px) {
  .welcome-modal.welcome-wizard-modal,
  body.is-web-guest .welcome-modal.welcome-wizard-modal {
    display: block;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .welcome-modal.welcome-wizard-modal .welcome-auth-field .table-edit-input {
    font-size: 16px;
  }

  .welcome-modal.welcome-wizard-modal.is-auth-focused,
  body.is-web-guest .welcome-modal.welcome-wizard-modal.is-auth-focused {
    overflow: hidden !important;
    scroll-behavior: auto;
  }

  .welcome-modal.welcome-wizard-modal.is-auth-focused .welcome-hero-stage,
  body.is-web-guest .welcome-modal.welcome-wizard-modal.is-auth-focused .welcome-hero-stage {
    min-height: 0;
    height: var(--app-height, 100dvh);
    max-height: var(--app-height, 100dvh);
    align-items: start;
    place-items: start center;
    overflow: hidden;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: 8px;
  }

  .welcome-modal.welcome-wizard-modal.is-auth-focused .welcome-wizard-card,
  .welcome-modal.welcome-wizard-modal.is-auth-focused.welcome-wizard-step-1 .welcome-wizard-card,
  .welcome-modal.welcome-wizard-modal.is-auth-focused.welcome-wizard-step-2 .welcome-wizard-card,
  body.is-web-guest .welcome-modal.welcome-wizard-modal.is-auth-focused .welcome-wizard-card {
    align-self: start !important;
    margin-top: 0 !important;
    max-height: calc(var(--app-height, 100dvh) - env(safe-area-inset-top, 0px) - 16px) !important;
    overflow-y: auto;
  }

  .welcome-modal.welcome-wizard-modal.is-auth-focused .welcome-product-story,
  .welcome-modal.welcome-wizard-modal.is-auth-focused .welcome-scroll-cue {
    display: none !important;
  }

  .welcome-hero-stage {
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    min-height: 100svh;
    padding: max(14px, env(safe-area-inset-top)) 14px max(28px, env(safe-area-inset-bottom));
    background-image:
      linear-gradient(180deg, rgba(4, 3, 10, .62) 0%, rgba(4, 3, 10, .9) 42%, rgba(4, 3, 10, .97) 100%),
      url("assets/welcome-hero.jpg");
    background-position: center top;
  }

  .welcome-scroll-cue { display: none; }
  .welcome-story-section,
  .welcome-story-footer { width: min(100% - 36px, 680px); }
  .welcome-story-section { padding: 92px 0; }
  .welcome-story-display { font-size: clamp(50px, 15vw, 88px); }
  .welcome-story-orbit { top: 8%; right: -32%; width: 86vw; }
  .welcome-story-intro-copy,
  .welcome-story-heading { grid-template-columns: 1fr; }
  .welcome-story-intro-copy { margin-top: 66px; }
  .welcome-story-feature-grid { grid-template-columns: 1fr; }
  .welcome-story-feature {
    min-height: 0;
    padding: 30px 4px 56px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
  }
  .welcome-story-feature:last-child { border-bottom: 0; }
  .welcome-story-feature-icon { margin: 45px 0 28px; }
  .welcome-story-flow-line { margin-inline: 0; font-size: clamp(34px, 10vw, 60px); }
  .welcome-story-finale { align-items: start; flex-direction: column; justify-content: center; }
  .welcome-story-footer { flex-direction: column; }
}

@media (max-width: 520px) {
  .welcome-story-section,
  .welcome-story-footer { width: calc(100% - 28px); }
  .welcome-story-display { font-size: clamp(46px, 14vw, 70px); }
  .welcome-story-heading h2,
  .welcome-story-finale h2 { font-size: clamp(44px, 13vw, 68px); }
  .welcome-story-intro-copy { grid-template-columns: 1fr; }
  .welcome-story-flow-line { align-items: flex-start; flex-direction: column; }
  .welcome-story-flow-line i { transform: rotate(90deg); }
  .welcome-story-faq-item summary { padding: 24px 2px; }
  .welcome-story-faq-item p { padding-right: 8px; }
  .welcome-story-cta { min-width: 100%; }
}

body.reduced-motion .welcome-reveal,
body.reduced-motion .welcome-story-orbit,
body.reduced-motion .welcome-story-feature-icon--sentra,
body.reduced-motion .welcome-scroll-cue i::after {
  animation: none !important;
  transition: none !important;
}

body.reduced-motion .welcome-reveal {
  opacity: 1;
  filter: none;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .welcome-reveal {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
  }
  .welcome-story-orbit,
  .welcome-story-feature-icon--sentra,
  .welcome-scroll-cue i::after { animation: none; }
}

/* Market Intelligence */
.ai-intelligence-tabs {
  display: inline-flex;
  gap: 5px;
  margin: 0 0 16px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
}
.ai-intelligence-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  border: 0;
  border-radius: 11px;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
}
.ai-intelligence-tab em { color: #a99cff; font-size: 9px; font-style: normal; letter-spacing: .1em; }
.ai-intelligence-tab.is-active { color: var(--text-primary); background: rgba(var(--accent-rgb), .15); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .2); }

.ai-market-intelligence {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid rgba(var(--accent-rgb), .2);
  border-radius: 26px;
  background:
    radial-gradient(circle at 92% 4%, rgba(57, 190, 214, .13), transparent 28%),
    radial-gradient(circle at 5% 100%, rgba(var(--accent-rgb), .13), transparent 34%),
    linear-gradient(145deg, rgba(17, 18, 34, .92), rgba(8, 10, 19, .9));
}
.ai-market-hero { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.ai-market-hero h3 { max-width: 640px; margin: 7px 0 8px; font-size: clamp(24px, 3vw, 38px); line-height: 1.05; letter-spacing: -.035em; }
.ai-market-hero p { max-width: 670px; margin: 0; color: var(--text-secondary); }
.ai-market-live { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--text-secondary); font-size: 11px; }
.ai-market-live span { width: 8px; height: 8px; border-radius: 50%; background: #707287; box-shadow: 0 0 0 5px rgba(112,114,135,.1); }
.ai-market-live.is-live span { background: #52d59a; box-shadow: 0 0 0 5px rgba(82,213,154,.1), 0 0 18px rgba(82,213,154,.35); }
.ai-market-controls { display: grid; grid-template-columns: minmax(220px, 360px) auto; gap: 12px; align-items: end; margin-top: 25px; }
.ai-market-controls label { display: grid; gap: 7px; color: var(--text-secondary); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.ai-market-controls .ghost-select, .ai-market-analyze { min-height: 48px; }
.ai-market-analyze { padding-inline: 22px; }
.ai-market-loading { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding: 18px; border-radius: 16px; background: rgba(255,255,255,.035); }
.ai-market-loading span { width: 20px; height: 20px; border: 2px solid rgba(var(--accent-rgb), .2); border-top-color: rgb(var(--accent-rgb)); border-radius: 50%; animation: marketSpin .8s linear infinite; }
.ai-market-loading p { margin: 0; color: var(--text-secondary); }
.ai-market-result { display: grid; gap: 14px; margin-top: 22px; }
.ai-market-summary-card, .ai-market-scenario, .ai-market-levels, .ai-market-catalysts {
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px;
  background: rgba(255,255,255,.028);
}
.ai-market-summary-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 18px; }
.ai-market-bias { min-width: 86px; padding: 12px; border-radius: 14px; text-align: center; font-size: 15px; font-weight: 800; letter-spacing: .08em; }
.ai-market-bias.is-long { color: #72e4b5; background: rgba(59, 196, 143, .12); }
.ai-market-bias.is-short { color: #ff8ba6; background: rgba(230, 74, 113, .12); }
.ai-market-bias.is-wait { color: #d5c8ff; background: rgba(var(--accent-rgb), .12); }
.ai-market-summary-card h4, .ai-market-scenario h4, .ai-market-levels h4, .ai-market-catalysts h4 { margin: 0; }
.ai-market-summary-card p { margin: 5px 0 0; color: var(--text-secondary); line-height: 1.5; }
.ai-market-confidence { text-align: right; }
.ai-market-confidence strong { display: block; font-size: 24px; }
.ai-market-confidence span { color: var(--text-secondary); font-size: 10px; text-transform: uppercase; }
.ai-market-scenarios { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ai-market-scenario { padding: 18px; }
.ai-market-scenario header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.ai-market-scenario header span { font-size: 10px; letter-spacing: .1em; }
.ai-market-scenario dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; }
.ai-market-scenario dt { color: var(--text-secondary); font-size: 11px; }
.ai-market-scenario dd { margin: 0; text-align: right; font-size: 12px; font-weight: 700; }
.ai-market-scenario p { margin: 13px 0 0; color: var(--text-secondary); font-size: 12px; line-height: 1.55; }
.ai-market-detail-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 14px; }
.ai-market-levels, .ai-market-catalysts { padding: 18px; }
.ai-market-level-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; color: var(--text-secondary); font-size: 12px; }
.ai-market-catalyst { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.06); }
.ai-market-catalyst time { color: #a99cff; font-size: 10px; }
.ai-market-catalyst p { margin: 3px 0 0; color: var(--text-secondary); font-size: 11px; }
.ai-market-disclaimer { margin: 14px 0 0; color: var(--text-secondary); font-size: 10px; }
@keyframes marketSpin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  .ai-intelligence-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .ai-intelligence-tab { justify-content: center; padding-inline: 9px; font-size: 11px; }
  .ai-market-hero { display: grid; }
  .ai-market-controls, .ai-market-scenarios, .ai-market-detail-grid { grid-template-columns: 1fr; }
  .ai-market-summary-card { grid-template-columns: 1fr; }
  .ai-market-confidence { text-align: left; }
}

/* AI Center 2026 ? presentation workspace */
.ai-hub-section.page.card {
  --ai-workspace-surface: color-mix(in srgb, var(--bg-secondary) 76%, transparent);
  --ai-workspace-panel: color-mix(in srgb, var(--card-bg) 82%, rgba(var(--accent-rgb), 0.05));
  gap: 0;
  padding: clamp(14px, 2.2vw, 28px);
  overflow: hidden;
  border-color: rgba(var(--accent-rgb), 0.2);
  background:
    radial-gradient(circle at 92% 4%, rgba(var(--accent-rgb), 0.11), transparent 28%),
    radial-gradient(circle at 4% 48%, rgba(34, 211, 238, 0.045), transparent 31%),
    var(--card-bg);
}

.ai-hub-section.page.card:hover {
  transform: none;
}

.ai-workspace-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  min-height: clamp(270px, 31vw, 390px);
  padding: clamp(28px, 5vw, 64px);
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 30px;
  background:
    linear-gradient(118deg, rgba(var(--accent-rgb), 0.18), transparent 48%),
    radial-gradient(circle at 78% 28%, rgba(34, 211, 238, 0.12), transparent 27%),
    linear-gradient(145deg, color-mix(in srgb, var(--bg-secondary) 94%, #050816), rgba(5, 8, 22, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.ai-workspace-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(var(--accent-rgb), 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.08) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(90deg, #000, transparent 78%);
}

.ai-workspace-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -9%;
  top: -38%;
  width: clamp(300px, 46vw, 680px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  box-shadow:
    0 0 0 54px rgba(var(--accent-rgb), 0.025),
    0 0 0 108px rgba(var(--accent-rgb), 0.018),
    inset 0 0 90px rgba(var(--accent-rgb), 0.08);
  animation: ai-orbit-breathe 7s ease-in-out infinite;
}

.ai-workspace-orbit {
  position: absolute;
  z-index: -1;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.75);
}

.ai-workspace-orbit--one {
  right: 14%;
  top: 24%;
  animation: ai-orbit-float 5.5s ease-in-out infinite;
}

.ai-workspace-orbit--two {
  right: 29%;
  top: 58%;
  width: 6px;
  height: 6px;
  background: var(--cyan);
  animation: ai-orbit-float 6.5s 0.9s ease-in-out infinite reverse;
}

.ai-workspace-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 980px;
}

.ai-workspace-kicker {
  margin: 0 0 18px;
  color: color-mix(in srgb, var(--accent-primary) 78%, #fff);
  font: 750 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.24em;
}

.ai-workspace-hero h2 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(38px, 5.3vw, 76px);
  font-weight: 760;
  line-height: 0.96;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

.ai-workspace-lead {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--text-secondary);
  font-size: clamp(14px, 1.4vw, 18px);
  line-height: 1.6;
}

.ai-workspace-status {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 8px;
  align-self: start;
  justify-self: end;
}

.ai-workspace-tabs {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 26px;
  padding: 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 20px;
  background: color-mix(in srgb, var(--bg-secondary) 88%, transparent);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(22px) saturate(145%);
}

.ai-workspace-tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  min-height: 52px;
  padding: 0 16px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--text-secondary);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 680;
  text-align: center;
  cursor: pointer;
  transition: color 0.22s ease, border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.ai-workspace-tab::after {
  content: "";
  position: absolute;
  inset: auto 16px 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-primary), var(--cyan));
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.ai-workspace-tab:hover {
  color: var(--text-primary);
  background: rgba(var(--accent-rgb), 0.07);
}

.ai-workspace-tab.is-active {
  color: var(--text-primary);
  border-color: rgba(var(--accent-rgb), 0.22);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-rgb), 0.07));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.055), 0 10px 28px rgba(var(--accent-rgb), 0.08);
}

.ai-workspace-tab.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.ai-workspace-tab-index {
  color: color-mix(in srgb, var(--accent-primary) 74%, var(--text-secondary));
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
}

.ai-workspace-tab em {
  margin-left: auto;
  color: color-mix(in srgb, var(--accent-primary) 76%, #fff);
  font: 750 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-style: normal;
  letter-spacing: 0.1em;
}

.ai-workspace-panel {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.ai-workspace-panel.is-entering {
  animation: ai-panel-enter 0.46s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ai-view-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 28px;
  align-items: end;
  padding: clamp(8px, 1.3vw, 18px) 4px 2px;
}

.ai-view-head h3 {
  max-width: 780px;
  margin: 8px 0 0;
  font-size: clamp(29px, 3.8vw, 54px);
  font-weight: 740;
  line-height: 1.02;
  letter-spacing: -0.052em;
  text-wrap: balance;
}

.ai-view-head > p {
  max-width: 520px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
}

.ai-command-center,
.ai-market-intelligence {
  margin: 0;
  border-color: rgba(var(--accent-rgb), 0.18);
  background:
    radial-gradient(circle at 96% 0%, rgba(34, 211, 238, 0.08), transparent 29%),
    radial-gradient(circle at 0 100%, rgba(var(--accent-rgb), 0.12), transparent 36%),
    var(--ai-workspace-surface);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.ai-command-kpis article,
.ai-command-panel,
.ai-market-summary-card,
.ai-market-scenario,
.ai-market-levels,
.ai-market-catalysts {
  border-color: rgba(var(--accent-rgb), 0.14);
  background: var(--ai-workspace-panel);
}

.ai-command-panel {
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.ai-command-panel:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.27);
  background: color-mix(in srgb, var(--ai-workspace-panel) 86%, rgba(var(--accent-rgb), 0.1));
}

.ai-decision-view-head {
  min-height: clamp(220px, 30vw, 390px);
  align-content: end;
  padding: clamp(28px, 5vw, 68px);
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.17);
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 12%, rgba(var(--accent-rgb), 0.18), transparent 31%),
    linear-gradient(140deg, rgba(var(--accent-rgb), 0.075), rgba(255, 255, 255, 0.018));
}

.ai-decision-view-head h3 {
  max-width: 920px;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.93;
  letter-spacing: -0.065em;
}

.ai-decision-panel-host {
  display: grid;
  min-width: 0;
}

.ai-command-center--scroll {
  gap: 24px;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ai-command-center--scroll .ai-command-head {
  min-height: clamp(180px, 24vw, 300px);
  align-items: flex-end;
  padding: clamp(26px, 4vw, 52px);
  border: 1px solid rgba(var(--accent-rgb), 0.17);
  border-radius: 26px;
  background:
    radial-gradient(circle at 92% 0%, rgba(34, 211, 238, 0.09), transparent 32%),
    var(--ai-workspace-surface);
}

.ai-command-center--scroll .ai-command-head h3 {
  max-width: 850px;
  margin: 9px 0 0;
  font-size: clamp(38px, 5.8vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.ai-command-center--scroll .ai-command-kpis {
  gap: 12px;
}

.ai-command-center--scroll .ai-command-kpis article {
  min-height: 132px;
  padding: 20px;
  border-radius: 20px;
}

.ai-command-center--scroll .ai-command-steps,
.ai-command-center--scroll .ai-command-stage-footer {
  display: none !important;
}

.ai-command-center--scroll .ai-command-grid {
  display: grid;
  gap: clamp(24px, 5vw, 56px);
  min-height: 0;
  overflow: visible;
}

.ai-command-center--scroll .ai-command-panel,
.ai-command-center--scroll .ai-command-panel[hidden] {
  position: relative;
  display: grid !important;
  align-content: center;
  width: 100%;
  min-height: clamp(430px, 68vh, 720px);
  padding: clamp(28px, 5vw, 68px);
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--accent-rgb), 0.13), transparent 33%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 52%),
    var(--ai-workspace-panel);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.12);
  scroll-margin-top: 24px;
}

.ai-command-center--scroll .ai-command-panel:nth-child(even) {
  background:
    radial-gradient(circle at 0 100%, rgba(34, 211, 238, 0.1), transparent 35%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 52%),
    var(--ai-workspace-panel);
}

.ai-command-center--scroll .ai-command-panel > header {
  align-items: flex-end;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.ai-command-center--scroll .ai-command-panel > header h3 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(34px, 5.2vw, 68px);
  line-height: 0.96;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.ai-command-center--scroll .ai-command-panel.ai-scroll-reveal {
  opacity: 0;
  transform: translateY(44px) scale(0.985);
  transition:
    opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.82s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.22s ease,
    background 0.22s ease;
}

.ai-command-center--scroll .ai-command-panel.ai-scroll-reveal.is-scroll-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ai-command-center--scroll .ai-command-panel:hover {
  transform: none;
}

.ai-hub-core-coach-block,
.ai-overview-coach,
.ai-analytics-primary,
.ai-hub-elite-block,
.ai-market-access-block {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 24px;
  background:
    radial-gradient(circle at 0 0, rgba(var(--accent-rgb), 0.09), transparent 38%),
    var(--ai-workspace-surface);
}

.ai-hub-core-coach-block,
.ai-overview-coach,
.ai-analytics-primary,
.ai-hub-elite-block {
  margin: 0;
  padding: clamp(18px, 2.4vw, 28px);
}

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

.ai-overview-coach .ai-narration-card {
  padding: clamp(20px, 2.8vw, 34px);
  border-color: rgba(var(--accent-rgb), 0.2);
  background:
    linear-gradient(125deg, rgba(var(--accent-rgb), 0.14), transparent 62%),
    rgba(255, 255, 255, 0.025);
}

.ai-overview-coach .ai-narration-card p {
  color: var(--text-primary);
  font-size: clamp(16px, 1.7vw, 21px);
  line-height: 1.58;
}

.ai-section-head h3,
.ai-hub-coach-block h3,
.ai-behavior-heatmaps h3 {
  margin: 7px 0 0;
  font-size: clamp(22px, 2.3vw, 32px);
  letter-spacing: -0.035em;
}

.ai-hub-coach-block > .ai-section-head {
  margin-bottom: 14px;
}

.ai-hub-coach-block .coach-card,
.ai-hub-core-coach-block .coach-card {
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.ai-hub-coach-block .coach-card:hover,
.ai-hub-core-coach-block .coach-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.25);
}

.ai-hub-chat-block {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.65fr);
  gap: 0;
  min-height: 680px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 26px;
  background: var(--ai-workspace-surface);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.ai-chat-context {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  padding: clamp(22px, 3vw, 36px);
  border-right: 1px solid rgba(var(--accent-rgb), 0.14);
  background:
    radial-gradient(circle at 0 0, rgba(var(--accent-rgb), 0.17), transparent 44%),
    rgba(var(--accent-rgb), 0.035);
}

.ai-chat-context h3 {
  margin: 10px 0 8px;
  font-size: clamp(24px, 2.5vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.ai-chat-context .subtitle {
  margin: 0;
  line-height: 1.55;
}

.ai-chat-prompts {
  display: grid;
  gap: 8px;
}

.ai-chat-prompts > span {
  margin-bottom: 3px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ai-chat-prompts button {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 13px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.028);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.ai-chat-prompts button:hover {
  transform: translateX(3px);
  border-color: rgba(var(--accent-rgb), 0.34);
  background: rgba(var(--accent-rgb), 0.1);
}

.ai-chat-context .ai-chat-live-stats {
  margin-top: auto;
  padding: 14px;
  border-color: rgba(var(--accent-rgb), 0.14);
  background: rgba(0, 0, 0, 0.08);
}

.ai-chat-context .ai-chat-live-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ai-chat-context .ai-chat-live-stat {
  min-width: 0;
  padding: 9px;
}

.ai-chat-context .ai-chat-live-stat strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
}

.ai-assistant-layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 680px;
  padding: clamp(18px, 2.5vw, 30px);
}

.ai-chat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 28px;
}

.ai-chat-toolbar .ai-assistant-status {
  position: relative;
  padding-left: 16px;
}

.ai-chat-toolbar .ai-assistant-status:empty {
  display: none;
}

.ai-chat-toolbar .ai-assistant-status::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.ai-chat-toolbar .ai-assistant-status.is-online::before {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1), 0 0 14px rgba(16, 185, 129, 0.35);
  animation: ai-live-pulse 2.2s ease-in-out infinite;
}

.ai-chat-toolbar .ai-assistant-status.is-offline::before {
  background: var(--error);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1), 0 0 12px rgba(239, 68, 68, 0.24);
}

.ai-chat-usage-slot {
  min-width: 0;
  text-align: right;
}

.ai-chat-usage-slot .core-ai-usage-badge {
  margin: 0;
  font-size: 11px;
}

.ai-assistant-messages {
  min-height: 500px;
  max-height: 64vh;
  padding: clamp(16px, 2.2vw, 24px);
  border-color: rgba(var(--accent-rgb), 0.14);
  border-radius: 20px;
  background:
    linear-gradient(150deg, rgba(var(--accent-rgb), 0.045), transparent 44%),
    rgba(0, 0, 0, 0.1);
}

.ai-assistant-msg {
  max-width: min(78%, 720px);
  padding: 13px 16px;
  border-radius: 17px;
  font-size: 13px;
  animation: ai-message-enter 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ai-assistant-msg.is-user {
  border-color: rgba(var(--accent-rgb), 0.35);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.24), rgba(var(--accent-rgb), 0.12));
  border-bottom-right-radius: 5px;
}

.ai-assistant-msg.is-assistant {
  border-color: rgba(var(--accent-rgb), 0.12);
  background: color-mix(in srgb, var(--card-bg) 80%, rgba(255, 255, 255, 0.035));
  border-bottom-left-radius: 5px;
}

.ai-assistant-form {
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-assistant-form:focus-within {
  border-color: rgba(var(--accent-rgb), 0.44);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.08);
}

.ai-assistant-form textarea {
  min-height: 54px;
  max-height: 180px;
  padding: 11px 12px;
  resize: none;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.ai-assistant-form textarea:focus {
  outline: none;
}

.ai-assistant-form .primary-button {
  min-height: 48px;
  padding-inline: 20px;
  border-radius: 13px;
}

.ai-assistant-form:has(.ai-chat-attach-row) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.ai-hub-section .ai-assistant-form textarea {
  min-height: 44px;
  padding: 11px 8px;
}

.ai-hub-section .ai-assistant-form .primary-button {
  min-height: 44px;
  align-self: center;
}

.ai-chat-attach-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.ai-chat-attach-btn {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  line-height: 0;
}

.ai-chat-attach-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ai-chat-attachment {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(var(--accent-rgb), 0.16);
}

.ai-chat-attachment.hidden {
  display: none;
}

.ai-chat-attachment-preview {
  width: 56px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.ai-chat-attachment-remove {
  margin-left: auto;
  min-width: 28px;
  min-height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.ai-assistant-form.is-dragover {
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12);
}

.ai-analytics-primary {
  display: grid;
  gap: 18px;
}

.ai-emotional-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.emotional-mode-row {
  display: flex;
  align-items: center;
  min-height: 46px;
}

.emotional-meter,
.ai-heartbeat-panel,
.behavior-heatmap-card,
.ai-hub-screenshot-block {
  border-color: rgba(var(--accent-rgb), 0.13);
  background: var(--ai-workspace-panel);
}

.emotional-meter {
  min-width: 0;
  padding: 15px;
}

.emotional-meter-fill,
.heartbeat-bars span {
  animation: ai-meter-reveal 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: left center;
}

.ai-heartbeat-panel {
  padding: 20px;
}

.ai-hub-elite-block {
  margin-top: 0;
}

.behavior-heatmap-grid {
  gap: 14px;
}

.behavior-heatmap-card {
  padding: 18px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.behavior-heatmap-card:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb), 0.27);
}

.behavior-heatmap-table tbody tr:hover {
  background: rgba(var(--accent-rgb), 0.08);
}

.ai-market-access-block {
  min-height: 420px;
  border: 0;
  background: transparent;
}

.ai-market-intelligence {
  margin-bottom: 0;
  padding: clamp(22px, 3.5vw, 40px);
  border-radius: 26px;
}

.ai-market-hero h3 {
  color: var(--text-primary);
  font-size: clamp(30px, 4vw, 54px);
}

.ai-market-loading {
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  background: var(--ai-workspace-panel);
}

.ai-market-catalyst time {
  color: color-mix(in srgb, var(--accent-primary) 76%, var(--text-primary));
}

.ai-market-bias.is-wait {
  color: color-mix(in srgb, var(--accent-primary) 68%, var(--text-primary));
}

body[data-theme="white"] .ai-hub-section.page.card {
  --ai-workspace-surface: rgba(248, 250, 252, 0.9);
  --ai-workspace-panel: rgba(255, 255, 255, 0.92);
  background:
    radial-gradient(circle at 92% 4%, rgba(var(--accent-rgb), 0.08), transparent 28%),
    #f8fafc;
}

body[data-theme="white"] .ai-workspace-hero {
  background:
    linear-gradient(118deg, rgba(var(--accent-rgb), 0.1), transparent 52%),
    radial-gradient(circle at 78% 28%, rgba(34, 211, 238, 0.09), transparent 27%),
    #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.07);
}

body[data-theme="white"] .ai-workspace-tabs,
body[data-theme="white"] .ai-hub-chat-block,
body[data-theme="white"] .ai-hub-core-coach-block,
body[data-theme="white"] .ai-overview-coach,
body[data-theme="white"] .ai-analytics-primary,
body[data-theme="white"] .ai-hub-elite-block {
  background: rgba(255, 255, 255, 0.91);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.055);
}

body[data-theme="white"] .ai-chat-context {
  background:
    radial-gradient(circle at 0 0, rgba(var(--accent-rgb), 0.1), transparent 44%),
    rgba(var(--accent-rgb), 0.025);
}

body[data-theme="white"] .ai-chat-context .ai-chat-live-stats,
body[data-theme="white"] .ai-assistant-messages {
  background: rgba(248, 250, 252, 0.94);
}

body[data-theme="white"] .ai-chat-prompts button,
body[data-theme="white"] .ai-assistant-form {
  color: var(--text-primary);
  background: #fff;
}

body[data-theme="white"] .ai-assistant-msg.is-user {
  background: rgba(var(--accent-rgb), 0.12);
}

body[data-theme="white"] .ai-assistant-msg.is-assistant {
  background: #fff;
}

@keyframes ai-panel-enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes ai-orbit-breathe {
  0%, 100% { opacity: 0.64; transform: scale(0.98) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.025) rotate(5deg); }
}

@keyframes ai-orbit-float {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.65; }
  50% { transform: translate3d(12px, -14px, 0); opacity: 1; }
}

@keyframes ai-live-pulse {
  0%, 100% { opacity: 0.7; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes ai-message-enter {
  from { opacity: 0; transform: translateY(7px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ai-meter-reveal {
  from { opacity: 0.45; transform: scaleX(0.25); }
  to { opacity: 1; transform: scaleX(1); }
}

@media (max-width: 1100px) {
  .ai-workspace-hero {
    min-height: 310px;
  }

  .ai-hub-chat-block {
    grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.35fr);
  }

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

  .ai-overview-coach .ai-coach-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .ai-workspace-hero {
    grid-template-columns: 1fr;
    align-items: end;
    min-height: 330px;
  }

  .ai-workspace-status {
    position: absolute;
    top: 22px;
    right: 22px;
  }

  .ai-workspace-hero-copy {
    padding-top: 52px;
  }

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

  .ai-view-head {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ai-hub-chat-block {
    grid-template-columns: 1fr;
  }

  .ai-chat-context {
    border-right: 0;
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.14);
  }

  .ai-chat-context .ai-chat-live-stats {
    margin-top: 0;
  }

  .ai-assistant-layout {
    min-height: 620px;
  }

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

@media (max-width: 560px) {
  .ai-hub-section.page.card {
    padding: 10px;
  }

  .ai-workspace-hero {
    min-height: 360px;
    padding: 24px 18px;
    border-radius: 22px;
  }

  .ai-workspace-hero h2 {
    font-size: clamp(36px, 12vw, 52px);
  }

  .ai-workspace-lead {
    font-size: 13px;
  }

  .ai-workspace-status {
    top: 16px;
    right: 16px;
  }

  .ai-workspace-status .pill {
    font-size: 9px;
  }

  .ai-workspace-tabs {
    gap: 5px;
    margin: 10px 0 20px;
    padding: 5px;
    border-radius: 16px;
  }

  .ai-workspace-tab {
    min-height: 46px;
    padding: 0 10px;
    border-radius: 11px;
    font-size: 11px;
  }

  .ai-workspace-tab-index,
  .ai-workspace-tab em {
    display: none;
  }

  .ai-view-head h3 {
    font-size: 32px;
  }

  .ai-command-center,
  .ai-hub-core-coach-block,
  .ai-overview-coach,
  .ai-analytics-primary,
  .ai-hub-elite-block,
  .ai-market-intelligence {
    border-radius: 19px;
  }

  .ai-chat-context,
  .ai-assistant-layout {
    padding: 16px;
  }

  .ai-assistant-layout {
    min-height: 560px;
  }

  .ai-assistant-messages {
    min-height: 390px;
    max-height: 58vh;
    padding: 12px;
  }

  .ai-assistant-msg {
    max-width: 92%;
    padding: 11px 12px;
  }

  .ai-chat-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .ai-chat-usage-slot {
    text-align: left;
  }

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

  .ai-assistant-form .primary-button {
    width: 100%;
  }

  .ai-emotional-grid {
    grid-template-columns: 1fr;
  }
}

body.reduced-motion .ai-workspace-hero::after,
body.reduced-motion .ai-workspace-orbit,
body.reduced-motion .ai-workspace-panel,
body.reduced-motion .ai-chat-toolbar .ai-assistant-status::before,
body.reduced-motion .ai-assistant-msg,
body.reduced-motion .emotional-meter-fill,
body.reduced-motion .heartbeat-bars span,
body.reduced-motion .ai-market-loading span {
  animation: none !important;
  transition: none !important;
}

body.reduced-motion .ai-command-panel:hover,
body.reduced-motion .ai-hub-coach-block .coach-card:hover,
body.reduced-motion .ai-hub-core-coach-block .coach-card:hover,
body.reduced-motion .behavior-heatmap-card:hover,
body.reduced-motion .ai-chat-prompts button:hover {
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .ai-workspace-hero::after,
  .ai-workspace-orbit,
  .ai-workspace-panel,
  .ai-chat-toolbar .ai-assistant-status::before,
  .ai-assistant-msg,
  .emotional-meter-fill,
  .heartbeat-bars span,
  .ai-market-loading span {
    animation: none !important;
    transition: none !important;
  }

  .ai-command-panel:hover,
  .ai-hub-coach-block .coach-card:hover,
  .ai-hub-core-coach-block .coach-card:hover,
  .behavior-heatmap-card:hover,
  .ai-chat-prompts button:hover {
    transform: none !important;
  }
}

/* Final modal treatment: intentionally plain, compact and product-like. */
.trade-entry-modal {
  padding: 20px;
  background: rgba(3, 5, 10, 0.76);
  backdrop-filter: blur(8px);
  transition: opacity 0.2s ease;
}

.trade-entry-modal-card {
  width: min(760px, 100%);
  max-height: min(780px, calc(100dvh - 40px));
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 20px;
  background: #101218;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.46);
  transform: translateY(10px) scale(0.99);
  transition: opacity 0.2s ease, transform 0.22s ease;
}

.trade-entry-modal-head {
  align-items: center;
  padding: 20px 22px 16px;
  border-bottom: 0;
}

.trade-entry-modal-head .kicker {
  font-size: 9px;
  letter-spacing: 0.14em;
}

.trade-entry-modal-head h2 {
  margin-top: 4px;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.trade-entry-modal-close {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 22px;
}

.trade-entry-modal-close:hover {
  transform: none;
}

.trade-wizard-progress {
  gap: 10px;
  padding: 0 22px 16px;
}

.trade-wizard-progress-step {
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.trade-wizard-progress-step::after {
  display: none;
}

.trade-wizard-progress-step span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-secondary);
  font-size: 9px;
}

.trade-wizard-progress-step strong {
  font-size: 11px;
  font-weight: 600;
}

.trade-wizard-progress-step.is-active,
.trade-wizard-progress-step.is-complete {
  border-color: transparent;
  background: rgba(var(--accent-rgb), 0.065);
}

.trade-wizard-progress-step.is-active span,
.trade-wizard-progress-step.is-complete span {
  border-color: rgba(var(--accent-rgb), 0.48);
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--text-primary);
}

body[data-theme="white"] .trade-entry-modal-card {
  border-color: rgba(15, 23, 42, 0.12);
  background: #ffffff;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.22);
}

@media (max-width: 640px) {
  .trade-entry-modal {
    padding: 0;
  }

  .trade-entry-modal-card {
    max-height: 96dvh;
    border-radius: 18px 18px 0 0;
  }

  .trade-entry-modal-head {
    padding: 16px 16px 12px;
  }

  .trade-wizard-progress {
    padding: 0 16px 12px;
  }

  .trade-wizard-progress-step {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 4px;
  }
}

/* Personal profile lives in its own modal ? hide the top strip everywhere. */
#topProfileBar,
.top-profile-bar,
.top-profile-bar.card,
body.vertical-layout .top-profile-bar,
body.vertical-layout-stacked .top-profile-bar {
  display: none !important;
}

/* Strategy & Ideas ? large conversational creation flow */
.workspace-conversation-wizard {
  --wizard-panel-bg: rgba(7, 8, 15, 0.82);
  --wizard-line: rgba(var(--accent-rgb), 0.16);
  display: grid;
  gap: 0;
  min-height: 610px;
}

.workspace-conversation-wizard .workspace-step-progress {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0 0 18px;
  padding: 0 10px;
}

.workspace-conversation-wizard .workspace-step-progress::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 17px;
  left: calc(12.5% + 10px);
  right: calc(12.5% + 10px);
  height: 1px;
  background: rgba(255, 255, 255, 0.09);
}

.workspace-conversation-wizard .workspace-step-progress-step {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.34);
  text-align: center;
  cursor: default;
  opacity: 0.58;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.workspace-conversation-wizard .workspace-step-progress-step span {
  position: relative;
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: #101119;
  color: inherit;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  box-shadow: 0 0 0 7px #0b0c12;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.workspace-conversation-wizard .workspace-step-progress-step strong {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.workspace-conversation-wizard .workspace-step-progress-step.is-active,
.workspace-conversation-wizard .workspace-step-progress-step.is-complete {
  border: 0;
  background: transparent;
  color: var(--text-primary);
  opacity: 1;
}

.workspace-conversation-wizard .workspace-step-progress-step.is-complete {
  cursor: pointer;
}

.workspace-conversation-wizard .workspace-step-progress-step.is-active span,
.workspace-conversation-wizard .workspace-step-progress-step.is-complete span {
  border-color: rgba(var(--accent-rgb), 0.65);
  background: rgb(var(--accent-rgb));
  color: #0a0a0d;
  box-shadow: 0 0 0 7px #0b0c12, 0 0 30px rgba(var(--accent-rgb), 0.25);
}

.workspace-conversation-wizard .workspace-step-progress-step.is-active span {
  transform: scale(1.08);
}

.workspace-conversation-wizard .workspace-step-panel,
.workspace-conversation-wizard .ideas-form-section.workspace-step-panel {
  position: relative;
  isolation: isolate;
  display: grid;
  align-content: center;
  gap: clamp(20px, 3vw, 32px);
  min-height: 510px;
  padding: clamp(38px, 6vw, 76px) clamp(24px, 7vw, 90px);
  overflow: hidden;
  border: 1px solid var(--wizard-line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 92% 4%, rgba(var(--accent-rgb), 0.13), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 52%),
    var(--wizard-panel-bg);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.045), 0 26px 70px rgba(0, 0, 0, 0.18);
}

.workspace-conversation-wizard .workspace-step-panel[hidden] {
  display: none !important;
}

.workspace-conversation-wizard .workspace-step-panel::after,
.workspace-conversation-wizard .ideas-form-section.workspace-step-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -190px;
  right: -130px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 50%;
  background: transparent;
  box-shadow:
    0 0 0 45px rgba(var(--accent-rgb), 0.025),
    0 0 0 90px rgba(var(--accent-rgb), 0.012);
  filter: none;
  pointer-events: none;
}

.workspace-conversation-wizard .workspace-step-head,
.workspace-conversation-wizard .ideas-form-section-head.workspace-step-head {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: clamp(94px, 13vw, 168px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 4vw, 46px);
  margin: 0;
  padding: 0;
  border: 0;
}

.workspace-conversation-wizard .ideas-form-section-head.workspace-step-head::before {
  display: none;
}

.workspace-conversation-wizard .workspace-step-head > .workspace-step-number {
  display: block;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(var(--accent-rgb), 0.64);
  font-size: clamp(82px, 12vw, 150px);
  font-weight: 800;
  line-height: 0.74;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 46px rgba(var(--accent-rgb), 0.13);
}

.workspace-conversation-wizard .workspace-step-head h3,
.workspace-conversation-wizard .ideas-form-section-head h3 {
  max-width: 790px;
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 720;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.workspace-conversation-wizard .workspace-step-head p,
.workspace-conversation-wizard .ideas-form-section-head p {
  max-width: 660px;
  margin: 15px 0 0;
  color: var(--text-secondary);
  font-size: clamp(14px, 1.5vw, 18px);
  line-height: 1.55;
}

.workspace-conversation-wizard .strategy-form-grid,
.workspace-conversation-wizard .ideas-form-top,
.workspace-conversation-wizard .ideas-meta-strip,
.workspace-conversation-wizard .ideas-evidence-grid,
.workspace-conversation-wizard .strategy-discipline-block,
.workspace-conversation-wizard > .ideas-field,
.workspace-conversation-wizard .workspace-step-panel > label {
  position: relative;
  z-index: 2;
}

.workspace-conversation-wizard [data-strategy-wizard-step="1"] .strategy-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workspace-conversation-wizard [data-strategy-wizard-step="1"] .strategy-form-grid > label:first-child {
  grid-column: 1 / -1;
}

.workspace-conversation-wizard label,
.workspace-conversation-wizard .ideas-field {
  gap: 10px;
}

.workspace-conversation-wizard label > span:first-child,
.workspace-conversation-wizard .ideas-field > span:first-child {
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.trading-strategy-section .workspace-conversation-wizard input,
.trading-strategy-section .workspace-conversation-wizard textarea,
.ideas-section .workspace-conversation-wizard input,
.ideas-section .workspace-conversation-wizard textarea,
.ideas-section .workspace-conversation-wizard select,
.ideas-section .workspace-conversation-wizard .ui-select-trigger,
.ideas-section .workspace-conversation-wizard .ui-date-trigger {
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text-primary);
  font-size: 15px;
  box-shadow: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.trading-strategy-section .workspace-conversation-wizard input:focus,
.trading-strategy-section .workspace-conversation-wizard textarea:focus,
.ideas-section .workspace-conversation-wizard input:focus,
.ideas-section .workspace-conversation-wizard textarea:focus,
.ideas-section .workspace-conversation-wizard select:focus,
.ideas-section .workspace-conversation-wizard .ui-select-trigger:focus,
.ideas-section .workspace-conversation-wizard .ui-date-trigger:focus {
  border-color: rgba(var(--accent-rgb), 0.58);
  background: rgba(var(--accent-rgb), 0.045);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.08);
  outline: none;
}

.workspace-conversation-wizard #strategyName,
.workspace-conversation-wizard #ideasTitleInput {
  min-height: 64px;
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: -0.02em;
}

.trading-strategy-section .workspace-conversation-wizard textarea,
.ideas-section .workspace-conversation-wizard textarea {
  min-height: 190px;
  line-height: 1.65;
}

.workspace-conversation-wizard .ideas-meta-strip {
  padding: 0;
  border: 0;
  background: transparent;
}

.workspace-conversation-wizard .ideas-bias-btn,
.workspace-conversation-wizard .ideas-status-btn,
.workspace-conversation-wizard .ideas-outcome-btn,
.workspace-conversation-wizard .ideas-tf-chip {
  min-height: 40px;
  padding: 9px 15px;
}

.workspace-conversation-wizard + .workspace-step-footer,
.workspace-conversation-wizard .workspace-step-footer {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(8, 9, 15, 0.72);
  backdrop-filter: blur(18px);
}

.workspace-conversation-wizard + .workspace-step-footer .workspace-step-footer-nav,
.workspace-conversation-wizard .workspace-step-footer-nav {
  gap: 10px;
}

.workspace-conversation-wizard + .workspace-step-footer .workspace-step-counter,
.workspace-conversation-wizard .workspace-step-counter {
  min-width: 72px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.workspace-conversation-wizard + .workspace-step-footer .primary-button,
.workspace-conversation-wizard .workspace-step-footer .primary-button,
.workspace-conversation-wizard + .workspace-step-footer .ghost-button:not(.strategy-btn-secondary),
.workspace-conversation-wizard .workspace-step-footer .ghost-button:not(.ideas-delete-btn) {
  min-width: 132px;
  min-height: 46px;
  border-radius: 13px;
}

.workspace-conversation-wizard + .workspace-step-footer .strategy-btn-secondary,
.workspace-conversation-wizard .workspace-step-footer .ideas-delete-btn {
  margin-right: auto;
  opacity: 0.62;
}

.workspace-conversation-wizard .workspace-step-error {
  position: relative;
  z-index: 3;
  margin: 12px 0 0;
}

.workspace-conversation-wizard .workspace-step-panel.is-entering-forward,
.workspace-conversation-wizard .ideas-form-section.workspace-step-panel.is-entering-forward {
  animation: workspace-conversation-enter-forward 0.66s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.workspace-conversation-wizard .workspace-step-panel.is-entering-backward,
.workspace-conversation-wizard .ideas-form-section.workspace-step-panel.is-entering-backward {
  animation: workspace-conversation-enter-backward 0.62s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.workspace-conversation-wizard .workspace-step-panel.is-entering-forward .workspace-step-head,
.workspace-conversation-wizard .workspace-step-panel.is-entering-backward .workspace-step-head {
  animation: workspace-conversation-question 0.58s 0.08s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.workspace-conversation-wizard .workspace-step-panel.is-entering-forward > :not(.workspace-step-head),
.workspace-conversation-wizard .workspace-step-panel.is-entering-backward > :not(.workspace-step-head) {
  animation: workspace-conversation-fields 0.5s 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes workspace-conversation-enter-forward {
  from { opacity: 0; transform: translateX(44px) scale(0.985); filter: blur(8px); }
  to { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}

@keyframes workspace-conversation-enter-backward {
  from { opacity: 0; transform: translateX(-34px) scale(0.99); filter: blur(7px); }
  to { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}

@keyframes workspace-conversation-question {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes workspace-conversation-fields {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

body[data-theme="white"] .workspace-conversation-wizard {
  --wizard-panel-bg: rgba(255, 255, 255, 0.94);
  --wizard-line: rgba(15, 23, 42, 0.11);
}

body[data-theme="white"] .workspace-conversation-wizard .workspace-step-progress::before {
  background: rgba(15, 23, 42, 0.12);
}

body[data-theme="white"] .workspace-conversation-wizard .workspace-step-progress-step {
  color: rgba(15, 23, 42, 0.38);
}

body[data-theme="white"] .workspace-conversation-wizard .workspace-step-progress-step span {
  border-color: rgba(15, 23, 42, 0.14);
  background: #fff;
  box-shadow: 0 0 0 7px #f8fafc;
}

body[data-theme="white"] .workspace-conversation-wizard .workspace-step-progress-step.is-active,
body[data-theme="white"] .workspace-conversation-wizard .workspace-step-progress-step.is-complete {
  color: #0f172a;
}

body[data-theme="white"] .workspace-conversation-wizard .workspace-step-progress-step.is-active span,
body[data-theme="white"] .workspace-conversation-wizard .workspace-step-progress-step.is-complete span {
  box-shadow: 0 0 0 7px #f8fafc, 0 0 26px rgba(var(--accent-rgb), 0.18);
}

body[data-theme="white"] .workspace-conversation-wizard label > span:first-child,
body[data-theme="white"] .workspace-conversation-wizard .ideas-field > span:first-child {
  color: rgba(15, 23, 42, 0.52);
}

body[data-theme="white"] .workspace-conversation-wizard + .workspace-step-footer,
body[data-theme="white"] .workspace-conversation-wizard .workspace-step-footer {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(248, 250, 252, 0.86);
}

@media (max-width: 900px) {
  .workspace-conversation-wizard {
    min-height: 0;
  }

  .workspace-conversation-wizard .workspace-step-panel,
  .workspace-conversation-wizard .ideas-form-section.workspace-step-panel {
    min-height: 480px;
    padding: 38px 26px;
    border-radius: 24px;
  }

  .workspace-conversation-wizard .workspace-step-head,
  .workspace-conversation-wizard .ideas-form-section-head.workspace-step-head {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 20px;
  }

  .workspace-conversation-wizard .workspace-step-head > .workspace-step-number {
    font-size: 70px;
  }

  .workspace-conversation-wizard .workspace-step-progress-step strong {
    display: block;
    font-size: 8px;
  }
}

@media (max-width: 640px) {
  .workspace-conversation-wizard .workspace-step-progress {
    margin-bottom: 12px;
    padding: 0;
  }

  .workspace-conversation-wizard .workspace-step-progress::before {
    left: 12.5%;
    right: 12.5%;
  }

  .workspace-conversation-wizard .workspace-step-progress-step {
    padding: 0 2px;
  }

  .workspace-conversation-wizard .workspace-step-progress-step strong {
    display: none;
  }

  .workspace-conversation-wizard .workspace-step-panel,
  .workspace-conversation-wizard .ideas-form-section.workspace-step-panel {
    min-height: 470px;
    padding: 30px 20px;
    border-radius: 22px;
  }

  .workspace-conversation-wizard .workspace-step-head,
  .workspace-conversation-wizard .ideas-form-section-head.workspace-step-head {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .workspace-conversation-wizard .workspace-step-head > .workspace-step-number {
    font-size: 62px;
  }

  .workspace-conversation-wizard .workspace-step-head h3,
  .workspace-conversation-wizard .ideas-form-section-head h3 {
    font-size: clamp(32px, 10vw, 44px);
  }

  .workspace-conversation-wizard [data-strategy-wizard-step="1"] .strategy-form-grid,
  .workspace-conversation-wizard .ideas-meta-strip,
  .workspace-conversation-wizard .ideas-evidence-grid {
    grid-template-columns: 1fr;
  }

  .workspace-conversation-wizard + .workspace-step-footer,
  .workspace-conversation-wizard .workspace-step-footer {
    padding: 12px;
  }

  .workspace-conversation-wizard + .workspace-step-footer .workspace-step-counter,
  .workspace-conversation-wizard .workspace-step-counter {
    width: 100%;
    text-align: center;
  }
}

body.reduced-motion .workspace-conversation-wizard .workspace-step-panel,
body.reduced-motion .workspace-conversation-wizard .workspace-step-panel * {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .workspace-conversation-wizard .workspace-step-panel,
  .workspace-conversation-wizard .workspace-step-panel * {
    animation: none !important;
  }
}

.risk-guardian-card {
  position: relative;
  overflow: hidden;
}

.risk-guardian-card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -80px;
  top: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.2), transparent 70%);
  pointer-events: none;
}

.risk-guardian-head,
.risk-guardian-card > * {
  position: relative;
  z-index: 1;
}

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

.risk-guardian-metric {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.risk-guardian-metric span,
.risk-guardian-metric strong {
  display: block;
}

.risk-guardian-metric span {
  color: var(--text-secondary);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.risk-guardian-metric strong {
  margin-top: 4px;
  font-size: 16px;
}

.risk-guardian-reasons {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.risk-guardian-reasons li {
  padding: 9px 11px;
  border-radius: 12px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid rgba(var(--accent-rgb), 0.72);
  font-size: 12px;
}

.risk-guardian-card.is-warning .risk-guardian-reasons li {
  border-left-color: #f59e0b;
}

.risk-guardian-card.is-locked .risk-guardian-reasons li {
  border-left-color: #ef4444;
}

.risk-guardian-settings {
  margin-top: 14px;
}

.risk-guardian-settings summary {
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
}

.risk-guardian-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.risk-guardian-settings-grid label,
.replay-order-panel label,
.replay-speed-field {
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 12px;
}

.risk-guardian-settings-grid input,
.replay-order-panel input,
.replay-order-panel textarea {
  width: 100%;
}

.replay-section {
  padding: clamp(18px, 2.7vw, 34px);
}

.replay-topbar h1 {
  margin: 4px 0 8px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.055em;
}

.replay-exam-toggle {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  cursor: pointer;
}

.replay-exam-toggle input {
  accent-color: #7d5cff;
}

.replay-exam-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(91, 62, 190, 0.18), rgba(34, 211, 238, 0.06));
}

.replay-exam-banner div {
  display: grid;
  gap: 3px;
}

.replay-exam-banner span {
  color: var(--text-secondary);
  font-size: 12px;
}

.replay-exam-banner > span {
  color: #c4b5fd;
  font-size: 18px;
  font-weight: 700;
}

.replay-chart-head > div:last-child {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.replay-chart-meta strong {
  font-size: 16px;
}

.replay-order-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.replay-long-btn {
  background: linear-gradient(135deg, #059669, #10b981);
}

.replay-short-btn {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.replay-stats-card .replay-stats-panel {
  grid-template-columns: 1fr;
  margin-top: 12px;
}

.replay-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.replay-stat-row strong {
  font-size: 16px;
}

.replay-trade-item.is-positive {
  border-color: rgba(16, 185, 129, 0.22);
}

.replay-trade-item.is-negative {
  border-color: rgba(239, 68, 68, 0.22);
}

.replay-trade-item-head,
.replay-trade-item-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.replay-trade-item-meta {
  margin-top: 5px;
  font-size: 11px;
}

.replay-exam-result {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.09);
}

.weekly-report-actions,
.mentor-report-modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.mentor-report-modal-card {
  width: min(1040px, calc(100vw - 32px));
  max-height: min(900px, calc(100vh - 34px));
  overflow: auto;
}

.mentor-report-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding-right: 30px;
}

.mentor-report-preview {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.mentor-report-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.mentor-report-summary-card,
.mentor-report-block {
  padding: 16px;
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
}

.mentor-report-summary-card span,
.mentor-report-summary-card strong {
  display: block;
}

.mentor-report-summary-card span {
  color: var(--text-secondary);
  font-size: 11px;
}

.mentor-report-summary-card strong {
  margin-top: 6px;
  font-size: 22px;
}

.mentor-report-block h3 {
  margin: 0 0 10px;
}

.mentor-report-block ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
}

.mentor-report-status {
  min-height: 18px;
  margin-top: 10px;
}

@media (max-width: 1100px) {
  .replay-bottom-grid {
    grid-template-columns: minmax(230px, 0.8fr) minmax(0, 1.2fr);
  }

  .replay-stats-card {
    grid-column: 1 / -1;
  }

  .replay-stats-card .replay-stats-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .replay-toolbar {
    justify-content: stretch;
  }

  .replay-toolbar > * {
    flex: 1 1 140px;
  }

  .replay-bottom-grid {
    grid-template-columns: 1fr;
  }

  .replay-stats-card {
    grid-column: auto;
  }

  .replay-stats-card .replay-stats-panel,
  .mentor-report-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .replay-chart-head,
  .mentor-report-modal-head {
    flex-direction: column;
  }

  .replay-stage canvas {
    min-height: 340px;
  }
}

/* Market Replay terminal */
.replay-workspace.page {
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: clamp(18px, 2.5vw, 34px);
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 30px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--card-bg) 93%, transparent), color-mix(in srgb, var(--bg-primary) 97%, transparent)),
    var(--bg-primary);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 28px 90px rgba(0, 0, 0, 0.18);
}

.replay-workspace::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(rgba(var(--accent-rgb), 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000, transparent 64%);
}

.replay-ambient {
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
  opacity: 0.12;
}

.replay-ambient-one {
  top: -230px;
  right: -80px;
  background: var(--accent-primary);
}

.replay-ambient-two {
  top: 38%;
  left: -280px;
  background: var(--cyan, #22d3ee);
}

.replay-workspace .replay-shell {
  position: relative;
  gap: 22px;
}

.replay-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 470px);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  min-height: 270px;
}

.replay-hero-copy {
  min-width: 0;
}

.replay-eyebrow-row,
.replay-live-mark,
.replay-feature-strip,
.replay-feature-strip > span {
  display: flex;
  align-items: center;
}

.replay-eyebrow-row {
  flex-wrap: wrap;
  gap: 10px;
}

.replay-live-mark {
  gap: 8px;
  color: color-mix(in srgb, var(--accent-primary) 72%, var(--text-primary));
  font: 750 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.replay-live-mark i,
.replay-setup-status i,
.replay-market-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.1), 0 0 14px rgba(52, 211, 153, 0.55);
}

.replay-lab-badge {
  padding: 6px 9px;
  border: 1px solid rgba(var(--accent-rgb), 0.26);
  border-radius: 999px;
  color: var(--text-secondary);
  background: rgba(var(--accent-rgb), 0.08);
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.13em;
}

.replay-hero h1 {
  max-width: 780px;
  margin: 18px 0 12px;
  font-size: clamp(3rem, 6.5vw, 6.4rem);
  font-weight: 720;
  line-height: 0.88;
  letter-spacing: -0.075em;
  color: var(--text-primary);
}

.replay-hero-copy > .subtitle {
  max-width: 650px;
  margin: 0;
  color: color-mix(in srgb, var(--text-secondary) 88%, var(--text-primary));
  font-size: clamp(14px, 1.5vw, 18px);
  line-height: 1.55;
}

.replay-feature-strip {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.replay-feature-strip > span {
  gap: 8px;
  min-height: 34px;
  padding: 0 11px 0 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.13);
  border-radius: 10px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.025);
}

.replay-feature-strip i {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  color: color-mix(in srgb, var(--accent-primary) 72%, var(--text-primary));
  background: rgba(var(--accent-rgb), 0.12);
  font: 700 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-feature-strip b {
  font-size: 11px;
  font-weight: 600;
}

.replay-setup-card {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(var(--accent-rgb), 0.12), transparent 40%),
    color-mix(in srgb, var(--card-bg) 90%, transparent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 22px 50px rgba(0, 0, 0, 0.16);
}

.replay-setup-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--accent-primary), transparent);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.5);
}

.replay-setup-head,
.replay-ticket-head,
.replay-card-head,
.replay-terminal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.replay-panel-index {
  display: block;
  margin-bottom: 6px;
  color: color-mix(in srgb, var(--accent-primary) 68%, var(--text-secondary));
  font: 750 9px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.16em;
}

.replay-setup-head h2,
.replay-ticket-head h3,
.replay-card-head h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 16px;
  letter-spacing: -0.025em;
}

.replay-setup-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 27px;
  padding: 0 9px;
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 999px;
  color: #6ee7b7;
  background: rgba(52, 211, 153, 0.07);
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: nowrap;
}

.replay-setup-status[data-state="loading"] {
  color: color-mix(in srgb, var(--accent-primary) 70%, var(--text-primary));
  border-color: rgba(var(--accent-rgb), 0.2);
  background: rgba(var(--accent-rgb), 0.08);
}

.replay-setup-status[data-state="loading"] i {
  background: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1), 0 0 14px rgba(var(--accent-rgb), 0.5);
  animation: replay-status-pulse 1.2s ease-in-out infinite;
}

.replay-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.12);
}

.replay-mode-switch button {
  min-height: 34px;
  padding: 0 11px;
  border: 0;
  border-radius: 9px;
  color: var(--text-secondary);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  transition: 0.2s ease;
}

.replay-mode-switch button.is-active {
  color: var(--text-primary);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.26), rgba(var(--accent-rgb), 0.1));
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.28), 0 8px 18px rgba(var(--accent-rgb), 0.1);
}

.replay-setup-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.7fr 1.15fr;
  gap: 9px;
}

.replay-workspace .replay-toolbar-group {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(var(--accent-rgb), 0.11);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
  transition: 0.2s ease;
}

.replay-workspace .replay-toolbar-group:focus-within {
  border-color: rgba(var(--accent-rgb), 0.38);
  background: rgba(var(--accent-rgb), 0.06);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.07);
}

.replay-workspace .replay-toolbar-label {
  font: 700 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
}

.replay-workspace .replay-toolbar-group select,
.replay-workspace .replay-date-input {
  width: 100%;
  min-width: 0;
  min-height: 28px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  color: var(--text-primary);
  background: transparent;
  box-shadow: none;
  font-size: 12px;
}

.replay-setup-card.is-exam-mode .replay-setup-grid > :first-child,
.replay-setup-card.is-exam-mode .replay-date-group {
  opacity: 0.36;
  pointer-events: none;
  filter: saturate(0);
}

.replay-load-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 45px;
  padding: 0 16px;
  border-radius: 13px;
}

.replay-load-button > span:last-child {
  font-size: 18px;
  transition: transform 0.2s ease;
}

.replay-load-button:hover > span:last-child {
  transform: translateX(3px);
}

.replay-workspace .replay-exam-banner {
  position: relative;
  padding: 14px 18px;
  overflow: hidden;
  border-color: rgba(var(--accent-rgb), 0.28);
  background:
    linear-gradient(110deg, rgba(var(--accent-rgb), 0.17), rgba(var(--accent-rgb), 0.04)),
    color-mix(in srgb, var(--card-bg) 90%, transparent);
}

.replay-workspace .replay-exam-banner strong {
  display: block;
  color: var(--text-primary);
}

.replay-workspace .replay-exam-banner > span {
  font: 750 26px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-terminal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 330px);
  gap: 14px;
  align-items: start;
}

.replay-workspace .replay-stage,
.replay-workspace .replay-order-panel,
.replay-workspace .replay-stats-card,
.replay-workspace .replay-trades-card,
.replay-workspace .replay-history-card {
  border: 1px solid rgba(var(--accent-rgb), 0.13);
  background: color-mix(in srgb, var(--card-bg) 88%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.replay-workspace .replay-stage {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
}

.replay-terminal-head {
  align-items: center;
  min-height: 68px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.1);
}

.replay-workspace .replay-chart-meta {
  gap: 10px;
  align-items: center;
}

.replay-session-identity {
  display: grid;
  gap: 0;
}

.replay-session-identity .replay-panel-index {
  margin-bottom: 4px;
}

.replay-session-identity strong {
  color: var(--text-primary);
  font: 750 14px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-source-badge,
.replay-progress-label {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.13);
  border-radius: 8px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.025);
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-source-badge[data-source="yahoo"],
.replay-source-badge[data-source="binance"],
.replay-source-badge[data-source="twelve-data"],
.replay-source-badge[data-source="market"] {
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.18);
  background: rgba(52, 211, 153, 0.06);
}

.replay-source-badge[data-source="mt5"] {
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.22);
  background: rgba(56, 189, 248, 0.08);
}

.replay-source-badge[data-source="practice"],
.replay-source-badge[data-source="synthetic"],
.replay-source-badge[data-source="fallback"] {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.08);
}

.replay-source-badge[data-source="pending"],
.replay-source-badge[data-source="unknown"] {
  color: var(--text-secondary);
}

.replay-terminal-kpis {
  display: flex;
  align-items: center;
  gap: 10px;
}

.replay-terminal-kpis > span {
  display: grid;
  min-width: 86px;
  gap: 4px;
  text-align: right;
}

.replay-terminal-kpis small {
  color: var(--text-secondary);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.replay-terminal-kpis b {
  color: var(--text-primary);
  font: 750 14px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-market-line {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.08);
  background: rgba(255, 255, 255, 0.012);
}

.replay-workspace .replay-ohlc {
  color: var(--text-secondary);
  font: 650 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}

.replay-market-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 9px;
  white-space: nowrap;
}

.replay-market-state i {
  width: 5px;
  height: 5px;
}

.replay-workspace .replay-chart-shell {
  min-height: 520px;
  overflow: hidden;
  background: #070914;
}

.replay-workspace .replay-stage canvas {
  min-height: 520px;
  border-radius: 0;
  background: transparent;
  cursor: crosshair;
}

.replay-chart-empty,
.replay-workspace .replay-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  padding: 24px;
  color: var(--text-primary);
  text-align: center;
  background:
    radial-gradient(circle at 50% 46%, rgba(var(--accent-rgb), 0.12), transparent 34%),
    color-mix(in srgb, var(--bg-primary) 94%, transparent);
  border-radius: 0;
  backdrop-filter: blur(8px);
}

.replay-chart-empty.hidden,
.replay-workspace .replay-loading-overlay.hidden {
  display: none;
}

.replay-chart-empty strong,
.replay-workspace .replay-loading-overlay strong {
  font-size: 14px;
}

.replay-chart-empty small,
.replay-workspace .replay-loading-overlay small {
  max-width: 320px;
  color: var(--text-secondary);
  font-size: 11px;
}

.replay-empty-orbit {
  position: relative;
  width: 52px;
  height: 52px;
  margin-bottom: 4px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 50%;
  box-shadow: inset 0 0 24px rgba(var(--accent-rgb), 0.08), 0 0 30px rgba(var(--accent-rgb), 0.08);
}

.replay-empty-orbit::before,
.replay-empty-orbit::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 50%;
}

.replay-empty-orbit::after {
  inset: 20px;
  border: 0;
  background: var(--accent-primary);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.65);
}

.replay-empty-orbit i {
  position: absolute;
  top: 5px;
  left: 23px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan, #22d3ee);
  box-shadow: 0 0 9px currentColor;
  transform-origin: 3px 21px;
  animation: replay-orbit 2.8s linear infinite;
}

.replay-loader {
  width: 38px;
  height: 38px;
  margin-bottom: 5px;
  border: 2px solid rgba(var(--accent-rgb), 0.13);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: replay-spin 0.85s linear infinite;
}

.replay-workspace .replay-transport-bar {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto auto;
  min-height: 68px;
  margin: 0;
  padding: 11px 14px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.1);
  background: rgba(255, 255, 255, 0.015);
}

.replay-transport-main {
  display: flex;
  gap: 6px;
  align-items: center;
}

.replay-icon-button {
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.13);
  border-radius: 10px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.025);
  font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  cursor: pointer;
  transition: 0.18s ease;
}

.replay-icon-button:hover:not(:disabled) {
  color: var(--text-primary);
  border-color: rgba(var(--accent-rgb), 0.34);
  background: rgba(var(--accent-rgb), 0.09);
}

.replay-play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 92px;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 10px;
}

.replay-play-button.is-playing {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent-primary) 72%, #0f172a), var(--accent-primary));
}

.replay-workspace .replay-slider {
  --replay-progress: 0%;
  height: 4px;
  border-radius: 999px;
  outline: none;
  appearance: none;
  background: linear-gradient(to right, var(--accent-primary) var(--replay-progress), rgba(var(--accent-rgb), 0.12) var(--replay-progress));
  cursor: pointer;
}

.replay-workspace .replay-slider::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid color-mix(in srgb, var(--accent-primary) 70%, #fff);
  border-radius: 50%;
  appearance: none;
  background: var(--bg-primary);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1), 0 0 12px rgba(var(--accent-rgb), 0.35);
}

.replay-workspace .replay-speed-field {
  display: flex;
  align-items: center;
  gap: 7px;
}

.replay-workspace .replay-speed-field span {
  font-size: 9px;
}

.replay-workspace .replay-speed-field .ui-select-wrap,
.replay-workspace .replay-speed-field select {
  width: 72px;
}

.replay-finish-button {
  min-height: 36px;
  padding-inline: 12px;
  border-radius: 10px;
  font-size: 10px;
}

.replay-shortcuts {
  min-height: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 6px 14px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.08);
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.06);
  font-size: 9px;
}

.replay-shortcuts > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.replay-shortcuts kbd {
  min-width: 21px;
  padding: 3px 5px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 5px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
  font: 700 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-align: center;
}

.replay-workspace .replay-order-panel {
  position: sticky;
  top: 12px;
  gap: 13px;
  padding: 16px;
  border-radius: 22px;
}

.replay-position-state {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 999px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.025);
  font: 750 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
}

.replay-position-state[data-side="long"] {
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.2);
  background: rgba(52, 211, 153, 0.07);
}

.replay-position-state[data-side="short"] {
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.2);
  background: rgba(244, 63, 94, 0.07);
}

.replay-ticket-price {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.08), transparent),
    rgba(255, 255, 255, 0.018);
}

.replay-ticket-price > span {
  color: var(--text-secondary);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.replay-ticket-price strong {
  color: var(--text-primary);
  font: 750 28px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: -0.05em;
}

.replay-ticket-price small {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replay-workspace .replay-order-panel label {
  font-size: 10px;
}

.replay-workspace .replay-order-panel input,
.replay-workspace .replay-order-panel textarea {
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.13);
  border-radius: 11px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.025);
}

.replay-workspace .replay-order-panel input:focus,
.replay-workspace .replay-order-panel textarea:focus {
  border-color: rgba(var(--accent-rgb), 0.42);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.07);
}

.replay-input-shell {
  position: relative;
}

.replay-input-shell b {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 11px;
  color: var(--text-secondary);
  font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  transform: translateY(-50%);
}

.replay-input-shell input {
  padding-left: 25px !important;
}

.replay-ticket-levels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.replay-level-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.replay-level-presets button {
  min-height: 29px;
  padding: 0 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: 8px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  font: 700 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  cursor: pointer;
}

.replay-level-presets button:hover {
  color: var(--text-primary);
  border-color: rgba(var(--accent-rgb), 0.32);
  background: rgba(var(--accent-rgb), 0.08);
}

.replay-risk-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.1);
  border-radius: 10px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.018);
  font-size: 9px;
}

.replay-risk-preview strong {
  color: var(--text-primary);
  font: 750 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-risk-preview[data-tone="positive"] strong {
  color: #6ee7b7;
}

.replay-risk-preview[data-tone="negative"] strong {
  color: #fda4af;
}

.replay-workspace .replay-order-actions {
  gap: 7px;
}

.replay-workspace .replay-order-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border-radius: 11px;
  box-shadow: none;
}

.replay-workspace .replay-long-btn {
  border: 1px solid rgba(52, 211, 153, 0.24);
  background: linear-gradient(135deg, #047857, #10b981);
}

.replay-workspace .replay-short-btn {
  border: 1px solid rgba(251, 113, 133, 0.24);
  background: linear-gradient(135deg, #be123c, #f43f5e);
}

.replay-close-button {
  width: 100%;
  min-height: 36px;
  border-radius: 10px;
}

.replay-order-status {
  min-height: 17px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.45;
}

.replay-order-status:empty {
  display: none;
}

.replay-order-status[data-tone="positive"] {
  color: #6ee7b7;
}

.replay-order-status[data-tone="negative"] {
  color: #fda4af;
}

.replay-review-grid {
  display: grid;
  grid-template-columns: minmax(230px, 0.85fr) minmax(280px, 1.15fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.replay-workspace .replay-stats-card,
.replay-workspace .replay-trades-card,
.replay-workspace .replay-history-card {
  min-width: 0;
  padding: 16px;
  border-radius: 20px;
}

.replay-card-head {
  align-items: center;
  min-height: 38px;
  margin-bottom: 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.09);
}

.replay-count-badge {
  display: grid;
  place-items: center;
  min-width: 27px;
  height: 27px;
  padding: 0 7px;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 8px;
  color: var(--text-primary);
  background: rgba(var(--accent-rgb), 0.07);
  font: 750 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-workspace .replay-stats-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 0;
}

.replay-workspace .replay-stat-row {
  display: grid;
  gap: 6px;
  min-height: 63px;
  padding: 10px;
  border: 1px solid rgba(var(--accent-rgb), 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.replay-workspace .replay-stat-row:first-child {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.08), rgba(255, 255, 255, 0.018));
}

.replay-workspace .replay-stat-row span {
  color: var(--text-secondary);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.replay-workspace .replay-stat-row strong {
  color: var(--text-primary);
  font: 750 17px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-workspace .replay-trades-list,
.replay-history-list {
  display: grid;
  gap: 7px;
  max-height: 250px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), 0.25) transparent;
}

.replay-workspace .replay-trade-item,
.replay-history-item {
  padding: 10px 11px;
  border: 1px solid rgba(var(--accent-rgb), 0.09);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
}

.replay-workspace .replay-trade-item {
  color: var(--text-secondary);
  font-size: 10px;
}

.replay-workspace .replay-trade-item-head strong {
  color: var(--text-primary);
  font: 700 10px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-history-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
}

.replay-history-symbol {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 9px;
  color: color-mix(in srgb, var(--accent-primary) 70%, var(--text-primary));
  background: rgba(var(--accent-rgb), 0.09);
  font: 750 7px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-history-item div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.replay-history-item strong {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replay-history-item small {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replay-history-item > b {
  font: 750 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-history-empty {
  min-height: 116px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-align: center;
}

.replay-history-empty > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 50%;
  color: var(--accent-primary);
  background: rgba(var(--accent-rgb), 0.06);
}

.replay-history-empty p {
  max-width: 210px;
  margin: 0;
  font-size: 10px;
  line-height: 1.5;
}

.replay-workspace .replay-exam-result {
  border-color: rgba(var(--accent-rgb), 0.2);
  background: rgba(var(--accent-rgb), 0.07);
  color: var(--text-primary);
}

body[data-theme="white"] .replay-workspace.page {
  border-color: rgba(var(--accent-rgb), 0.14);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(245, 247, 252, 0.96));
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.09);
}

body[data-theme="white"] .replay-workspace .replay-stage,
body[data-theme="white"] .replay-workspace .replay-order-panel,
body[data-theme="white"] .replay-workspace .replay-stats-card,
body[data-theme="white"] .replay-workspace .replay-trades-card,
body[data-theme="white"] .replay-workspace .replay-history-card,
body[data-theme="white"] .replay-setup-card {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 #fff, 0 18px 42px rgba(15, 23, 42, 0.05);
}

body[data-theme="white"] .replay-mode-switch {
  background: rgba(15, 23, 42, 0.035);
}

body[data-theme="white"] .replay-workspace .replay-toolbar-group,
body[data-theme="white"] .replay-ticket-price,
body[data-theme="white"] .replay-workspace .replay-stat-row,
body[data-theme="white"] .replay-workspace .replay-trade-item,
body[data-theme="white"] .replay-history-item {
  background: rgba(15, 23, 42, 0.018);
}

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

@keyframes replay-orbit {
  to { transform: rotate(360deg); }
}

@keyframes replay-status-pulse {
  50% { opacity: 0.42; transform: scale(0.82); }
}

@media (max-width: 1260px) {
  .replay-hero {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 410px);
  }

  .replay-terminal-grid {
    grid-template-columns: minmax(0, 1fr) 290px;
  }

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

  .replay-history-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .replay-hero,
  .replay-terminal-grid {
    grid-template-columns: 1fr;
  }

  .replay-hero {
    min-height: 0;
  }

  .replay-workspace .replay-order-panel {
    position: static;
  }

  .replay-workspace .replay-transport-bar {
    grid-template-columns: auto minmax(120px, 1fr) auto;
  }

  .replay-finish-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .replay-workspace.page {
    padding: 13px;
    border-radius: 22px;
  }

  .replay-hero h1 {
    margin-top: 14px;
    font-size: clamp(3rem, 16vw, 4.5rem);
  }

  .replay-feature-strip {
    display: grid;
    grid-template-columns: 1fr;
  }

  .replay-setup-grid,
  .replay-review-grid {
    grid-template-columns: 1fr;
  }

  .replay-history-card {
    grid-column: auto;
  }

  .replay-terminal-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .replay-terminal-kpis {
    width: 100%;
    justify-content: space-between;
  }

  .replay-terminal-kpis > span {
    text-align: left;
  }

  .replay-market-line {
    align-items: flex-start;
    flex-direction: column;
    padding-block: 8px;
  }

  .replay-workspace .replay-chart-shell,
  .replay-workspace .replay-stage canvas {
    min-height: 390px;
  }

  .replay-workspace .replay-transport-bar {
    grid-template-columns: 1fr;
  }

  .replay-transport-main {
    justify-content: center;
  }

  .replay-workspace .replay-speed-field {
    justify-content: space-between;
  }

  .replay-finish-button {
    grid-column: auto;
  }

  .replay-shortcuts {
    display: none;
  }

  .replay-ticket-levels {
    grid-template-columns: 1fr;
  }
}

body.reduced-motion .replay-empty-orbit i,
body.reduced-motion .replay-loader,
body.reduced-motion .replay-setup-status[data-state="loading"] i {
  animation: none !important;
}

/* Replay Pro Terminal ? compact TradingView-style workspace */
.replay-workspace.page {
  --replay-bg: #0b0d12;
  --replay-panel: #0f1219;
  --replay-panel-raised: #141821;
  --replay-hover: #1a1f2b;
  --replay-border: #242936;
  --replay-border-soft: #1b202b;
  --replay-text: #dce2ee;
  --replay-muted: #7f899d;
  --replay-blue: #5d8cff;
  --replay-green: #16c784;
  --replay-red: #ef5b74;
  padding: 0 !important;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.replay-workspace::before,
.replay-workspace > .replay-ambient {
  display: none;
}

.replay-workspace .replay-shell {
  position: relative;
  display: grid;
  grid-template:
    "topbar topbar" 48px
    "tools terminal" minmax(0, 1fr)
    "docktabs docktabs" 38px
    "dock dock" 156px
    / 46px minmax(0, 1fr);
  gap: 0;
  width: 100%;
  min-width: 0;
  height: calc(100dvh - 96px);
  min-height: 700px;
  overflow: hidden;
  border: 1px solid var(--replay-border);
  border-radius: 14px;
  color: var(--replay-text);
  background: var(--replay-bg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.replay-workspace .replay-shell:fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  border: 0;
  border-radius: 0;
}

.replay-tv-topbar {
  grid-area: topbar;
  z-index: 35;
  display: flex;
  align-items: center;
  min-width: 0;
  height: 48px;
  padding: 0 8px 0 0;
  border-bottom: 1px solid var(--replay-border);
  background: color-mix(in srgb, var(--replay-panel) 97%, transparent);
}

.replay-tv-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 0 13px;
  border: 0;
  border-right: 1px solid var(--replay-border);
  color: var(--replay-text);
  background: transparent;
  font: 760 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.replay-tv-brand-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(145deg, var(--replay-blue), color-mix(in srgb, var(--accent-primary) 72%, #7047eb));
  box-shadow: 0 5px 14px rgba(93, 140, 255, 0.22);
  font-size: 12px;
}

.replay-tv-topbar button,
.replay-drawing-toolbar button,
.replay-dock-tabs button,
.replay-floating-menu button {
  font-family: inherit;
}

.replay-symbol-button {
  display: flex;
  align-items: baseline;
  gap: 7px;
  height: 34px;
  min-width: 118px;
  margin: 0 6px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  color: var(--replay-text);
  background: transparent;
  cursor: pointer;
}

.replay-symbol-button:hover,
.replay-top-tool:hover,
.replay-top-timeframes button:hover,
.replay-drawing-toolbar button:hover {
  background: var(--replay-hover);
}

.replay-symbol-button > span {
  font-size: 12px;
  font-weight: 760;
}

.replay-symbol-button small,
.replay-symbol-button b {
  color: var(--replay-muted);
  font-size: 10px;
  font-weight: 650;
}

.replay-symbol-button b {
  margin-left: auto;
}

.replay-top-timeframes {
  display: flex;
  align-items: center;
  gap: 2px;
}

.replay-top-timeframes button,
.replay-top-tool,
.replay-top-mode {
  height: 32px;
  border: 0;
  border-radius: 7px;
  color: var(--replay-muted);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.replay-top-timeframes button {
  min-width: 34px;
  padding: 0 8px;
}

.replay-top-timeframes button.is-active {
  color: #fff;
  background: rgba(93, 140, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(93, 140, 255, 0.34);
}

.replay-top-separator {
  width: 1px;
  height: 24px;
  margin: 0 5px;
  background: var(--replay-border);
}

.replay-top-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  white-space: nowrap;
}

.replay-top-tool svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.replay-top-tool-icon {
  width: 32px;
  padding: 0;
}

.replay-top-spacer {
  flex: 1 1 auto;
  min-width: 10px;
}

.replay-account-strip {
  display: flex;
  align-items: center;
  height: 32px;
  margin-right: 8px;
  overflow: hidden;
  border: 1px solid var(--replay-border-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
}

.replay-account-strip > span {
  display: grid;
  gap: 2px;
  min-width: 82px;
  padding: 0 10px;
  border-right: 1px solid var(--replay-border-soft);
}

.replay-account-strip > span:last-child {
  border-right: 0;
}

.replay-account-strip small {
  color: var(--replay-muted);
  font: 600 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
}

.replay-account-strip b {
  color: var(--replay-text);
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-top-mode {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--replay-border);
}

.replay-top-mode i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--replay-green);
  box-shadow: 0 0 8px rgba(22, 199, 132, 0.5);
}

.replay-top-mode.is-exam i {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.replay-order-toggle {
  display: none;
}

.replay-floating-menu {
  position: absolute;
  top: 43px;
  left: 292px;
  z-index: 75;
  width: 276px;
  padding: 7px;
  border: 1px solid var(--replay-border);
  border-radius: 10px;
  color: var(--replay-text);
  background: #151923;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.52);
}

.replay-floating-menu header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 0 7px 6px;
  border-bottom: 1px solid var(--replay-border-soft);
}

.replay-floating-menu header strong {
  font-size: 12px;
}

.replay-floating-menu header button {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 6px;
  color: var(--replay-muted);
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

.replay-floating-menu > button:not([data-replay-menu-close]) {
  display: grid;
  grid-template-columns: 36px 1fr 8px;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 50px;
  margin-top: 4px;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  color: var(--replay-text);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.replay-floating-menu > button:hover {
  background: var(--replay-hover);
}

.replay-floating-menu > button > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 28px;
  border-radius: 6px;
  color: #91adff;
  background: rgba(93, 140, 255, 0.12);
  font: 750 9px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-floating-menu > button > div {
  display: grid;
  gap: 3px;
}

.replay-floating-menu > button strong {
  font-size: 11px;
}

.replay-floating-menu > button small {
  color: var(--replay-muted);
  font-size: 9px;
}

.replay-floating-menu > button > i {
  width: 7px;
  height: 7px;
  border: 1px solid #4b5365;
  border-radius: 50%;
}

.replay-floating-menu > button.is-active > i {
  border-color: var(--replay-blue);
  background: var(--replay-blue);
  box-shadow: 0 0 0 3px rgba(93, 140, 255, 0.14);
}

.replay-settings-menu {
  left: 415px;
  width: 220px;
}

.replay-settings-menu > label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 8px;
  color: var(--replay-text);
  font-size: 11px;
}

.replay-settings-menu input {
  accent-color: var(--replay-blue);
}

.replay-drawing-toolbar {
  grid-area: tools;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  padding: 6px 0;
  overflow: auto;
  border-right: 1px solid var(--replay-border);
  background: var(--replay-panel);
  scrollbar-width: none;
}

.replay-drawing-toolbar::-webkit-scrollbar {
  display: none;
}

.replay-drawing-toolbar button {
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: #8a94a8;
  background: transparent;
  cursor: pointer;
}

.replay-drawing-toolbar button.is-active {
  color: #fff;
  background: rgba(93, 140, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(93, 140, 255, 0.38);
}

.replay-drawing-toolbar svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.replay-drawing-toolbar [data-replay-tool="cursor"] svg {
  fill: currentColor;
  stroke-width: 1;
}

.replay-drawing-toolbar button b {
  font-size: 10px;
}

.replay-drawing-toolbar .replay-tool-long {
  color: var(--replay-green);
}

.replay-drawing-toolbar .replay-tool-short {
  color: var(--replay-red);
}

.replay-drawing-toolbar > span:not(.replay-tool-spacer) {
  flex: 0 0 1px;
  width: 24px;
  margin: 5px 0;
  background: var(--replay-border);
}

.replay-tool-spacer {
  flex: 1 1 auto;
  min-height: 8px;
}

.replay-workspace .replay-hero {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  grid-template-columns: 1fr;
  place-items: center;
  min-height: 0;
  padding: 24px;
  background: rgba(3, 5, 9, 0.72);
  backdrop-filter: blur(10px);
}

.replay-workspace .replay-hero.is-open {
  display: grid;
  animation: replay-modal-in 0.18s ease-out both;
}

.replay-workspace .replay-hero-copy {
  display: none;
}

.replay-workspace .replay-setup-card {
  width: min(480px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 20px;
  overflow: auto;
  border: 1px solid #303747;
  border-radius: 14px;
  background: #151923;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.replay-setup-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

#replaySessionClose {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--replay-border);
  border-radius: 7px;
  color: var(--replay-muted);
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

.replay-workspace .replay-mode-switch,
.replay-workspace .replay-toolbar-group,
.replay-workspace .replay-toolbar-group .ghost-select,
.replay-workspace .replay-date-input {
  border-color: #2b3140;
  background: #0f1219;
}

.replay-exam-banner {
  position: absolute;
  top: 57px;
  left: 50%;
  z-index: 60;
  width: min(460px, calc(100% - 80px));
  transform: translateX(-50%);
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(25, 20, 10, 0.94);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.34);
}

.replay-terminal-grid {
  grid-area: terminal;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 0;
  align-items: stretch;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.replay-workspace .replay-terminal {
  display: grid;
  grid-template-rows: 40px 26px minmax(0, 1fr) 52px 24px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #0b0e14;
  box-shadow: none;
}

.replay-workspace .replay-terminal-head {
  align-items: center;
  height: 40px;
  padding: 0 12px;
  border-bottom: 1px solid var(--replay-border-soft);
}

.replay-workspace .replay-chart-meta,
.replay-workspace .replay-session-identity {
  align-items: center;
}

.replay-workspace .replay-session-identity {
  flex-direction: row;
  gap: 6px;
}

.replay-workspace .replay-session-identity .replay-panel-index {
  display: none;
}

.replay-workspace .replay-session-identity strong {
  font: 720 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-workspace .replay-source-badge,
.replay-workspace .replay-progress-label {
  min-height: 20px;
  padding: 0 7px;
  border-color: var(--replay-border);
  border-radius: 5px;
  color: var(--replay-muted);
  background: transparent;
  font-size: 8px;
}

.replay-workspace .replay-terminal-kpis {
  gap: 16px;
}

.replay-workspace .replay-terminal-kpis > span {
  gap: 2px;
}

.replay-workspace .replay-terminal-kpis small {
  color: var(--replay-muted);
  font-size: 7px;
}

.replay-workspace .replay-terminal-kpis b {
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-workspace .replay-market-line {
  min-height: 26px;
  padding: 0 12px;
  border-bottom: 1px solid var(--replay-border-soft);
  color: var(--replay-muted);
  background: #0d1016;
  font: 600 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-workspace .replay-market-state {
  font-size: 8px;
}

.replay-workspace .replay-market-state i {
  width: 5px;
  height: 5px;
}

.replay-workspace .replay-chart-shell {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #0b0e14;
}

.replay-tv-chart,
.replay-drawing-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.replay-tv-chart {
  z-index: 1;
}

.replay-drawing-layer {
  z-index: 5;
  pointer-events: none;
  touch-action: none;
}

.replay-drawing-layer.is-drawing {
  pointer-events: auto;
  cursor: crosshair;
}

.replay-drawing-layer.is-eraser {
  cursor: not-allowed;
}

.replay-workspace .replay-chart-shell > #replayChart {
  display: none;
}

.replay-workspace .replay-chart-shell.is-fallback > #replayChart {
  display: block;
}

.replay-workspace .replay-chart-shell.is-fallback > .replay-tv-chart,
.replay-workspace .replay-chart-shell.is-fallback > .replay-drawing-layer {
  display: none;
}

.replay-chart-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  gap: 7px;
  transform: translate(-50%, -50%);
  color: rgba(134, 146, 167, 0.11);
  text-align: center;
  pointer-events: none;
  user-select: none;
}

.replay-chart-watermark strong {
  font-size: clamp(28px, 4.2vw, 58px);
  font-weight: 820;
  line-height: 0.9;
  letter-spacing: 0.08em;
}

.replay-chart-watermark span {
  font: 650 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.14em;
}

.replay-workspace .replay-chart-empty,
.replay-workspace .replay-loading-overlay {
  z-index: 12;
  border-radius: 0;
  background: rgba(11, 14, 20, 0.92);
}

.replay-workspace .replay-transport-bar {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 7px 10px;
  border-top: 1px solid var(--replay-border);
  border-radius: 0;
  background: var(--replay-panel);
}

.replay-workspace .replay-transport-main {
  gap: 4px;
}

.replay-workspace .replay-icon-button {
  min-width: 30px;
  height: 30px;
  border-color: transparent;
  border-radius: 6px;
  color: var(--replay-muted);
  background: transparent;
}

.replay-workspace .replay-icon-button:hover {
  color: var(--replay-text);
  background: var(--replay-hover);
}

.replay-workspace .replay-play-button {
  min-width: 82px;
  height: 32px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: var(--replay-blue);
  box-shadow: 0 6px 16px rgba(93, 140, 255, 0.22);
  font-size: 10px;
}

.replay-workspace .replay-slider {
  height: 3px;
  accent-color: var(--replay-blue);
  background: linear-gradient(to right, var(--replay-blue) 0 var(--replay-progress, 0%), #2a303d var(--replay-progress, 0%) 100%);
}

.replay-workspace .replay-speed-field {
  min-height: 30px;
  padding: 0 5px 0 8px;
  border-color: var(--replay-border);
  border-radius: 6px;
  background: transparent;
}

.replay-workspace .replay-speed-field > span {
  display: none;
}

.replay-workspace .replay-speed-field .ghost-select {
  min-width: 48px;
  padding: 0 4px;
  color: var(--replay-text);
  background: #151923;
  font-size: 10px;
}

.replay-workspace .replay-finish-button {
  min-height: 30px;
  padding: 0 9px;
  border-color: var(--replay-border);
  border-radius: 6px;
  color: var(--replay-muted);
  background: transparent;
  font-size: 9px;
}

.replay-workspace .replay-shortcuts {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 24px;
  padding: 0 12px;
  overflow: hidden;
  border-top: 1px solid var(--replay-border-soft);
  color: #596477;
  background: #0d1016;
  white-space: nowrap;
}

.replay-workspace .replay-shortcuts > span {
  font-size: 8px;
}

.replay-workspace .replay-shortcuts kbd {
  min-width: 15px;
  min-height: 15px;
  padding: 0 4px;
  border-color: #303746;
  border-radius: 4px;
  color: #8994a8;
  background: #171b24;
  font-size: 7px;
}

.replay-workspace .replay-order-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  height: 100%;
  padding: 13px;
  overflow: auto;
  border: 0;
  border-left: 1px solid var(--replay-border);
  border-radius: 0;
  color: var(--replay-text);
  background: var(--replay-panel);
  box-shadow: none;
  scrollbar-width: thin;
  scrollbar-color: #303746 transparent;
}

.replay-workspace .replay-ticket-head {
  align-items: center;
}

.replay-workspace .replay-ticket-head .replay-panel-index {
  display: none;
}

.replay-workspace .replay-ticket-head h3 {
  color: var(--replay-text);
  font-size: 12px;
}

.replay-workspace .replay-position-state {
  min-height: 21px;
  padding: 0 7px;
  border-color: var(--replay-border);
  border-radius: 5px;
  color: var(--replay-muted);
  background: transparent;
  font-size: 8px;
}

.replay-workspace .replay-ticket-price {
  gap: 3px;
  padding: 10px;
  border-color: var(--replay-border-soft);
  border-radius: 8px;
  background: #11151d;
}

.replay-workspace .replay-ticket-price span,
.replay-workspace .replay-ticket > label > span,
.replay-workspace .replay-ticket-levels label > span {
  color: var(--replay-muted);
  font-size: 8px;
  font-weight: 650;
}

.replay-workspace .replay-ticket-price strong {
  color: var(--replay-text);
  font: 760 21px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-workspace .replay-ticket-price small {
  color: var(--replay-muted);
  font-size: 8px;
}

.replay-workspace .replay-input-shell,
.replay-workspace .replay-ticket-levels input,
.replay-workspace .replay-ticket textarea {
  min-height: 34px;
  border-color: var(--replay-border);
  border-radius: 7px;
  color: var(--replay-text);
  background: #0c0f15;
}

.replay-workspace .replay-input-shell input {
  color: var(--replay-text);
}

.replay-workspace .replay-ticket textarea {
  min-height: 56px;
  padding: 9px;
  resize: vertical;
}

.replay-workspace .replay-ticket-levels {
  gap: 6px;
}

.replay-workspace .replay-level-presets {
  gap: 6px;
}

.replay-workspace .replay-level-presets button {
  min-height: 28px;
  border-color: var(--replay-border);
  border-radius: 6px;
  color: var(--replay-muted);
  background: transparent;
  font-size: 8px;
}

.replay-workspace .replay-risk-preview {
  min-height: 30px;
  padding: 0 9px;
  border-color: var(--replay-border-soft);
  border-radius: 7px;
  background: #11151d;
  font-size: 9px;
}

.replay-workspace .replay-order-actions {
  gap: 6px;
  margin-top: auto;
}

.replay-workspace .replay-order-actions .primary-button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  box-shadow: none;
  font-size: 10px;
}

.replay-workspace .replay-long-btn {
  background: var(--replay-green);
}

.replay-workspace .replay-short-btn {
  background: var(--replay-red);
}

.replay-workspace .replay-close-button {
  min-height: 30px;
  border-color: var(--replay-border);
  border-radius: 7px;
  color: var(--replay-muted);
  background: transparent;
  font-size: 9px;
}

.replay-dock-tabs {
  grid-area: docktabs;
  z-index: 24;
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--replay-border);
  border-bottom: 1px solid var(--replay-border);
  background: var(--replay-panel);
}

.replay-dock-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  padding: 0 15px;
  border: 0;
  border-right: 1px solid var(--replay-border-soft);
  color: var(--replay-muted);
  background: transparent;
  font-size: 9px;
  font-weight: 650;
  cursor: pointer;
}

.replay-dock-tabs button:hover {
  color: var(--replay-text);
  background: var(--replay-hover);
}

.replay-dock-tabs button.is-active {
  position: relative;
  color: var(--replay-text);
  background: #121620;
}

.replay-dock-tabs button.is-active::before {
  content: "";
  position: absolute;
  inset: -1px 10px auto;
  height: 2px;
  background: var(--replay-blue);
}

.replay-dock-tabs b {
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 5px;
  color: #aeb8ca;
  background: #242b38;
  font-size: 8px;
}

.replay-dock-tabs .replay-dock-toggle {
  min-width: 38px;
  margin-left: auto;
  padding: 0;
  justify-content: center;
  border-left: 1px solid var(--replay-border-soft);
  border-right: 0;
  font-size: 15px;
}

.replay-workspace .replay-review-grid {
  grid-area: dock;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #0d1016;
}

.replay-workspace .replay-review-grid > section {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 12px 14px;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.replay-workspace .replay-review-grid > section.is-active {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
}

.replay-workspace .replay-card-head {
  align-items: center;
}

.replay-workspace .replay-card-head .replay-panel-index {
  display: none;
}

.replay-workspace .replay-card-head h3 {
  color: var(--replay-text);
  font-size: 11px;
}

.replay-workspace .replay-trades-list,
.replay-workspace .replay-history-list {
  min-height: 0;
  overflow: auto;
}

.replay-workspace .replay-trade-item,
.replay-workspace .replay-history-item,
.replay-workspace .replay-stat-row {
  border-color: var(--replay-border-soft);
  border-radius: 6px;
  color: var(--replay-text);
  background: #11151d;
}

.replay-workspace .replay-stats-panel {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.replay-workspace .replay-count-badge {
  min-height: 20px;
  border-color: var(--replay-border);
  border-radius: 5px;
  color: var(--replay-muted);
  background: transparent;
}

.replay-shell.is-dock-collapsed {
  grid-template-rows: 48px minmax(0, 1fr) 38px 0;
}

.replay-shell.is-dock-collapsed .replay-dock-toggle {
  transform: rotate(180deg);
}

.replay-shell.is-order-collapsed .replay-terminal-grid {
  grid-template-columns: minmax(0, 1fr) 0;
}

.replay-shell.is-order-collapsed .replay-order-panel {
  display: none;
}

body[data-theme="white"] .replay-workspace.page {
  --replay-bg: #f5f7fb;
  --replay-panel: #ffffff;
  --replay-panel-raised: #ffffff;
  --replay-hover: #eef2f8;
  --replay-border: #dce2eb;
  --replay-border-soft: #e8ecf2;
  --replay-text: #182033;
  --replay-muted: #6c778c;
}

body[data-theme="white"] .replay-workspace .replay-terminal,
body[data-theme="white"] .replay-workspace .replay-chart-shell,
body[data-theme="white"] .replay-workspace .replay-review-grid {
  background: #f8faff;
}

body[data-theme="white"] .replay-workspace .replay-market-line,
body[data-theme="white"] .replay-workspace .replay-shortcuts {
  background: #f4f6fa;
}

body[data-theme="white"] .replay-floating-menu,
body[data-theme="white"] .replay-workspace .replay-setup-card {
  color: var(--replay-text);
  background: #fff;
}

body[data-theme="white"] .replay-workspace .replay-ticket-price,
body[data-theme="white"] .replay-workspace .replay-risk-preview,
body[data-theme="white"] .replay-workspace .replay-stat-row,
body[data-theme="white"] .replay-workspace .replay-trade-item,
body[data-theme="white"] .replay-workspace .replay-history-item,
body[data-theme="white"] .replay-workspace .replay-input-shell,
body[data-theme="white"] .replay-workspace .replay-ticket-levels input,
body[data-theme="white"] .replay-workspace .replay-ticket textarea {
  color: var(--replay-text);
  background: #f7f9fc;
}

body[data-theme="white"] .replay-workspace .replay-chart-empty,
body[data-theme="white"] .replay-workspace .replay-loading-overlay {
  background: rgba(248, 250, 255, 0.94);
}

@keyframes replay-modal-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 1180px) {
  .replay-account-strip > span {
    min-width: 70px;
    padding-inline: 7px;
  }

  .replay-terminal-grid {
    grid-template-columns: minmax(0, 1fr) 270px;
  }
}

@media (max-width: 980px) {
  .replay-workspace .replay-shell {
    grid-template:
      "topbar topbar" 48px
      "tools terminal" minmax(0, 1fr)
      "docktabs docktabs" 38px
      "dock dock" 146px
      / 46px minmax(0, 1fr);
  }

  .replay-tv-brand strong,
  .replay-account-strip,
  .replay-top-tool > span {
    display: none;
  }

  .replay-tv-brand {
    padding-inline: 9px;
  }

  .replay-terminal-grid {
    display: block;
    position: relative;
  }

  .replay-workspace .replay-terminal {
    height: 100%;
  }

  .replay-workspace .replay-order-panel {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: 50;
    display: none;
    width: min(310px, calc(100% - 22px));
    border-left: 1px solid var(--replay-border);
    box-shadow: -18px 0 50px rgba(0, 0, 0, 0.34);
  }

  .replay-workspace .replay-order-panel.is-mobile-open {
    display: flex;
  }

  .replay-order-toggle {
    display: inline-flex;
  }
}

@media (max-width: 680px) {
  .replay-workspace.page {
    margin: -4px;
  }

  .replay-workspace .replay-shell {
    grid-template:
      "topbar" 46px
      "terminal" minmax(0, 1fr)
      "tools" 42px
      "docktabs" 38px
      "dock" 132px
      / minmax(0, 1fr);
    height: calc(100dvh - 138px);
    min-height: 610px;
    border-radius: 10px;
  }

  .replay-tv-topbar {
    height: 46px;
    padding-right: 4px;
  }

  .replay-top-separator,
  #replayChartSettingsBtn,
  .replay-top-mode {
    display: none;
  }

  .replay-tv-brand {
    padding-inline: 6px;
  }

  .replay-symbol-button {
    min-width: 105px;
    margin-left: 4px;
  }

  .replay-top-timeframes button {
    min-width: 30px;
    padding-inline: 5px;
  }

  .replay-drawing-toolbar {
    flex-direction: row;
    padding: 4px 6px;
    overflow-x: auto;
    overflow-y: hidden;
    border-top: 1px solid var(--replay-border);
    border-right: 0;
  }

  .replay-drawing-toolbar button {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
  }

  .replay-drawing-toolbar > span:not(.replay-tool-spacer),
  .replay-tool-spacer,
  #replayDrawingUndo,
  #replayDrawingClear {
    display: none;
  }

  .replay-workspace .replay-terminal {
    grid-template-rows: 36px 24px minmax(0, 1fr) 50px;
  }

  .replay-workspace .replay-terminal-head {
    height: 36px;
    padding-inline: 8px;
  }

  .replay-workspace .replay-terminal-kpis > span:first-child,
  .replay-workspace .replay-source-badge,
  .replay-workspace .replay-market-state,
  .replay-workspace .replay-shortcuts {
    display: none;
  }

  .replay-workspace .replay-market-line {
    min-height: 24px;
    padding-inline: 8px;
  }

  .replay-workspace .replay-transport-bar {
    grid-template-columns: auto minmax(70px, 1fr) auto;
    gap: 5px;
    min-height: 50px;
    padding: 6px;
  }

  .replay-workspace .replay-transport-main {
    gap: 2px;
  }

  .replay-workspace #replayResetBtn,
  .replay-workspace #replayStepBackBtn,
  .replay-workspace .replay-finish-button {
    display: none;
  }

  .replay-workspace .replay-play-button {
    min-width: 66px;
  }

  .replay-dock-tabs button {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
    padding: 0 8px;
  }

  .replay-dock-tabs button span {
    max-width: 84px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .replay-dock-tabs .replay-dock-toggle {
    flex: 0 0 36px;
  }

  .replay-workspace .replay-review-grid > section {
    padding: 9px;
  }

  .replay-workspace .replay-stats-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .replay-floating-menu {
    top: 43px;
    left: 8px;
    width: min(276px, calc(100% - 16px));
  }

  .replay-settings-menu {
    left: 8px;
  }
}

.replay-entry-splash {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  color: #f4f6ff;
  background:
    radial-gradient(circle at 50% 48%, rgba(var(--accent-rgb), .2), transparent 31%),
    linear-gradient(145deg, #05070c, #090b12 54%, #05070c);
  pointer-events: none;
  transition: opacity .18s ease, visibility 0s linear .18s;
}

.replay-entry-splash::before {
  content: "";
  position: absolute;
  inset: -40%;
  opacity: .32;
  background: conic-gradient(from 90deg, transparent, rgba(var(--accent-rgb), .13), transparent 24%);
  animation: replay-entry-orbit 6s linear infinite;
}

.replay-entry-splash::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .18;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, #000, transparent 72%);
}

.replay-entry-splash > * {
  position: relative;
  z-index: 1;
}

.replay-entry-splash > span {
  color: rgb(var(--accent-rgb));
  font: 750 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .38em;
  transform: translateY(20px);
}

.replay-entry-splash > strong {
  font-size: clamp(76px, 17vw, 280px);
  font-weight: 760;
  line-height: .78;
  letter-spacing: -.075em;
  text-shadow: 0 20px 90px rgba(0, 0, 0, .55), 0 0 70px rgba(var(--accent-rgb), .13);
  transform: scale(.9);
}

.replay-entry-splash > i {
  display: block;
  width: min(360px, 42vw);
  height: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, .11);
}

.replay-entry-splash > i::after {
  content: "";
  display: block;
  width: 45%;
  height: 100%;
  background: rgb(var(--accent-rgb));
  box-shadow: 0 0 18px rgba(var(--accent-rgb), .75);
  transform: translateX(-110%);
}

.replay-entry-splash.is-visible {
  visibility: visible;
  opacity: 1;
  transition: opacity .22s ease, visibility 0s;
}

.replay-entry-splash.is-visible > span {
  animation: replay-entry-copy .65s cubic-bezier(.2, .8, .2, 1) forwards;
}

.replay-entry-splash.is-visible > strong {
  animation: replay-entry-title .8s cubic-bezier(.16, 1, .3, 1) forwards;
}

.replay-entry-splash.is-visible > i::after {
  animation: replay-entry-line 1.15s cubic-bezier(.2, .8, .2, 1) forwards;
}

.replay-entry-splash.is-leaving {
  opacity: 0;
  filter: blur(9px);
  transform: scale(1.035);
  transition: opacity .58s ease, filter .58s ease, transform .58s ease;
}

@keyframes replay-entry-copy {
  to { transform: translateY(0); }
}

@keyframes replay-entry-title {
  from { opacity: 0; transform: scale(.9); filter: blur(14px); }
  to { opacity: 1; transform: scale(1); filter: none; }
}

@keyframes replay-entry-line {
  to { transform: translateX(225%); }
}

@keyframes replay-entry-orbit {
  to { transform: rotate(360deg); }
}

body.replay-focus-mode {
  overflow: hidden;
}

body.replay-focus-mode .app {
  width: 100%;
  max-width: none;
  padding: 6px !important;
}

body.replay-focus-mode .shell-layout {
  display: block !important;
}

body.replay-focus-mode .sidebar,
body.replay-focus-mode .top-profile-bar,
body.replay-focus-mode .web-download-banner,
body.replay-focus-mode #webInstallPrompt {
  display: none !important;
}

body.replay-focus-mode .main-content {
  display: block !important;
  width: 100%;
  max-width: none;
}

body.replay-focus-mode .replay-workspace.page {
  width: 100%;
  margin: 0 !important;
}

body.replay-focus-mode .replay-workspace .replay-shell {
  height: calc(100dvh - 12px) !important;
  min-height: 0 !important;
  border-radius: 10px;
}

body.reduced-motion .replay-entry-splash::before,
body.reduced-motion .replay-entry-splash.is-visible > span,
body.reduced-motion .replay-entry-splash.is-visible > strong,
body.reduced-motion .replay-entry-splash.is-visible > i::after {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .replay-entry-splash::before,
  .replay-entry-splash.is-visible > span,
  .replay-entry-splash.is-visible > strong,
  .replay-entry-splash.is-visible > i::after {
    animation: none;
  }
}

/* Coach casting ? cinematic entry before briefing */
.replay-casting {
  position: fixed;
  inset: 0;
  z-index: 1360;
  display: grid;
  place-items: end center;
  padding: 18px;
  pointer-events: auto;
}

.replay-casting.hidden {
  display: none;
}

.replay-casting-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(var(--accent-rgb), 0.18), transparent 42%),
    linear-gradient(180deg, rgba(4, 7, 12, 0.42), rgba(4, 7, 12, 0.88));
  backdrop-filter: blur(10px);
}

.replay-casting-sheet {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(92dvh, 860px);
  overflow: auto;
  padding: 28px 28px 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px 28px 18px 18px;
  background:
    linear-gradient(165deg, rgba(18, 24, 36, 0.96), rgba(8, 10, 16, 0.98)),
    rgba(8, 10, 16, 0.96);
  box-shadow: 0 -24px 80px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(var(--accent-rgb), 0.08);
  animation: replay-casting-rise 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes replay-casting-rise {
  from { opacity: 0; transform: translateY(28px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.replay-casting-head {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.replay-casting-kicker {
  color: rgb(var(--accent-rgb));
  font: 750 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.replay-casting-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.replay-casting-head p {
  margin: 0;
  max-width: 52ch;
  color: var(--text-secondary);
}

.replay-casting-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.replay-casting-card {
  position: relative;
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 168px;
  padding: 16px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  color: inherit;
  text-align: left;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.035), transparent 55%),
    rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.replay-casting-card:hover,
.replay-casting-card:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.45);
  outline: none;
  transform: translateY(-2px);
}

.replay-casting-card.is-active {
  border-color: rgba(var(--accent-rgb), 0.7);
  background:
    linear-gradient(160deg, rgba(var(--accent-rgb), 0.16), transparent 58%),
    rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.18);
}

.replay-casting-index {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-casting-card.is-active .replay-casting-index {
  color: #041018;
  background: rgb(var(--accent-rgb));
  border-color: transparent;
}

.replay-casting-role {
  color: var(--text-secondary);
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.replay-casting-card strong {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.replay-casting-card small {
  color: var(--text-secondary);
  line-height: 1.4;
}

.replay-casting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.replay-casting-hint {
  margin: 14px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.replay-practice-confirm {
  position: fixed;
  inset: 0;
  z-index: 1370;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 7, 12, 0.72);
  backdrop-filter: blur(8px);
}

.replay-practice-confirm.hidden {
  display: none;
}

.replay-practice-confirm-card {
  width: min(440px, 100%);
  display: grid;
  gap: 10px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(18, 24, 36, 0.98), rgba(8, 10, 16, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.replay-practice-confirm-card h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.replay-practice-confirm-card p {
  margin: 0;
  color: var(--text-secondary);
}

.replay-practice-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

.replay-briefing-coach,
.replay-briefing-source {
  display: grid;
  gap: 4px;
  margin: 14px 0 4px;
}

.replay-briefing-coach {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.replay-briefing-coach small,
.replay-briefing-source small {
  color: var(--text-secondary);
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.replay-briefing-coach strong {
  font-size: 16px;
}

.replay-briefing-change-coach,
#replayBriefingChangeCoach {
  justify-self: end;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  cursor: pointer;
}

.replay-briefing-source #replayBriefingSourceBadge {
  width: fit-content;
}

.replay-review-coach {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.replay-review-coach.is-emphasized {
  border-color: rgba(var(--accent-rgb), 0.45);
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.14), transparent 60%),
    rgba(255, 255, 255, 0.03);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.12);
}

.replay-review-coach small {
  color: var(--text-secondary);
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.replay-review-coach p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

#replayReviewAskCoach {
  width: fit-content;
  margin-top: 4px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  color: #041018;
  background: rgb(var(--accent-rgb));
  font-weight: 700;
  cursor: pointer;
}

body.reduced-motion .replay-casting-sheet,
body.reduced-motion .replay-casting-card {
  animation: none !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .replay-casting-sheet,
  .replay-casting-card {
    animation: none;
    transition: none;
  }
}

@media (max-width: 900px) {
  .replay-casting {
    place-items: end stretch;
    padding: 0;
  }

  .replay-casting-sheet {
    width: 100%;
    max-height: 88dvh;
    border-radius: 22px 22px 0 0;
    padding: 20px 16px 18px;
  }

  .replay-casting-grid {
    grid-template-columns: 1fr;
  }

  .replay-casting-card {
    min-height: 0;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "role role"
      "name name"
      "desc desc";
    gap: 4px 10px;
  }

  .replay-casting-role { grid-area: role; }
  .replay-casting-card strong { grid-area: name; }
  .replay-casting-card small { grid-area: desc; }

  .replay-casting-actions {
    position: sticky;
    bottom: 0;
    padding-top: 10px;
    background: linear-gradient(180deg, transparent, rgba(8, 10, 16, 0.96) 28%);
  }

  .replay-briefing-coach {
    grid-template-columns: 1fr;
  }

  #replayBriefingChangeCoach {
    justify-self: start;
  }
}

/* SENTRA ? contextual Replay analyst */
.replay-ai-fab {
  position: absolute;
  right: 18px;
  bottom: 210px;
  z-index: 82;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 56px;
  height: 56px;
  padding: 3px;
  overflow: hidden;
  border: 1px solid rgba(119, 145, 255, 0.44);
  border-radius: 19px;
  color: #fff;
  background: rgba(5, 8, 15, 0.92);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(72, 106, 255, 0.12);
  cursor: pointer;
  isolation: isolate;
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1), transform 0.22s ease, opacity 0.2s ease;
}

.replay-ai-fab:hover,
.replay-ai-fab:focus-visible {
  width: 158px;
  transform: translateY(-2px);
}

.replay-ai-fab-glow {
  position: absolute;
  z-index: -1;
  right: -13px;
  bottom: -16px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  opacity: 0.82;
  background: conic-gradient(from 180deg, #2868ff, #8b5cf6, #0bd3b1, #2868ff);
  filter: blur(19px);
  animation: replay-ai-glow 4.5s linear infinite;
}

.replay-ai-fab-mark {
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(12, 16, 27, 0.98), rgba(3, 5, 10, 0.98));
}

.replay-ai-fab-mark svg,
.replay-ai-logo svg,
.replay-ai-welcome-orb svg {
  width: 27px;
  height: 27px;
  fill: #78a1ff;
  filter: drop-shadow(0 0 9px rgba(80, 130, 255, 0.65));
}

.replay-ai-fab-label {
  display: grid;
  gap: 2px;
  width: 0;
  overflow: hidden;
  opacity: 0;
  text-align: left;
  white-space: nowrap;
  transition: width 0.25s ease, opacity 0.2s ease;
}

.replay-ai-fab:hover .replay-ai-fab-label,
.replay-ai-fab:focus-visible .replay-ai-fab-label {
  width: 88px;
  opacity: 1;
}

.replay-ai-fab-label b {
  font-size: 10px;
  letter-spacing: 0.13em;
}

.replay-ai-fab-label small {
  color: #8f9ab0;
  font-size: 8px;
}

.replay-ai-backdrop {
  position: absolute;
  inset: 48px 0 0;
  z-index: 84;
  visibility: hidden;
  opacity: 0;
  background: rgba(2, 4, 8, 0.28);
  backdrop-filter: blur(1.5px);
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.replay-ai-panel {
  position: absolute;
  top: 48px;
  right: 0;
  bottom: 0;
  z-index: 86;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto auto;
  width: min(410px, calc(100% - 44px));
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid rgba(122, 145, 202, 0.2);
  color: #e8edf8;
  background:
    radial-gradient(circle at 100% 0%, rgba(33, 196, 169, 0.14), transparent 36%),
    radial-gradient(circle at 30% 100%, rgba(36, 100, 255, 0.2), transparent 44%),
    linear-gradient(160deg, rgba(8, 13, 20, 0.985), rgba(3, 7, 15, 0.99));
  box-shadow: -25px 0 70px rgba(0, 0, 0, 0.48);
  transform: translateX(104%);
  visibility: hidden;
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.36s ease;
}

.replay-shell.is-ai-open .replay-ai-panel {
  visibility: visible;
  transform: translateX(0);
}

.replay-shell.is-ai-open .replay-ai-backdrop {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.replay-shell.is-ai-open .replay-ai-fab {
  opacity: 0;
  transform: translateX(20px);
  pointer-events: none;
}

.replay-ai-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.22;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(112, 141, 204, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112, 141, 204, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, #000, transparent 66%);
}

.replay-ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(126, 148, 196, 0.13);
  background: rgba(7, 11, 18, 0.6);
}

.replay-ai-identity {
  display: flex;
  align-items: center;
  gap: 11px;
}

.replay-ai-logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(104, 139, 255, 0.28);
  border-radius: 11px;
  background: rgba(10, 15, 26, 0.85);
  box-shadow: 0 0 24px rgba(57, 105, 255, 0.16);
}

.replay-ai-logo svg {
  width: 21px;
  height: 21px;
}

.replay-ai-identity > div {
  display: grid;
  gap: 4px;
}

.replay-ai-identity strong {
  font: 780 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.14em;
}

.replay-ai-identity div > span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7f8ba2;
  font-size: 9px;
}

.replay-ai-identity div > span i,
.replay-ai-context > i,
.replay-ai-footer > span i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #19c894;
  box-shadow: 0 0 8px rgba(25, 200, 148, 0.6);
}

#replayAiClose {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #8b96aa;
  background: transparent;
  font-size: 21px;
  cursor: pointer;
}

#replayAiClose:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.replay-ai-context {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 9px;
  align-items: center;
  margin: 12px 14px 0;
  padding: 9px 10px;
  border: 1px solid rgba(101, 128, 189, 0.16);
  border-radius: 10px;
  background: rgba(15, 21, 33, 0.62);
}

.replay-ai-context-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  color: #78a1ff;
  background: rgba(72, 113, 255, 0.12);
  font-size: 13px;
}

.replay-ai-context > div {
  display: grid;
  gap: 2px;
}

.replay-ai-context small {
  color: #738097;
  font-size: 8px;
}

.replay-ai-context strong {
  font: 700 9px/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-ai-context > i {
  width: 5px;
  height: 5px;
}

.replay-ai-messages {
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-height: 0;
  padding: 16px 14px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(104, 128, 178, 0.28) transparent;
}

.replay-ai-welcome {
  display: grid;
  place-items: center;
  align-content: center;
  flex: 1 1 auto;
  min-height: 290px;
  padding: 24px 14px;
  text-align: center;
}

.replay-ai-welcome-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 20px;
  border: 1px solid rgba(113, 144, 255, 0.36);
  border-radius: 21px;
  background: linear-gradient(145deg, rgba(16, 23, 39, 0.96), rgba(3, 6, 12, 0.96));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.38), 0 0 34px rgba(48, 103, 255, 0.16);
}

.replay-ai-welcome-orb::before {
  content: "";
  position: absolute;
  inset: -14px;
  z-index: -1;
  border-radius: 28px;
  opacity: 0.55;
  background: conic-gradient(from 40deg, rgba(39, 108, 255, 0.6), rgba(13, 211, 177, 0.34), rgba(139, 92, 246, 0.5), rgba(39, 108, 255, 0.6));
  filter: blur(18px);
}

.replay-ai-kicker {
  margin-bottom: 9px;
  color: #6f91ef;
  font: 750 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.18em;
}

.replay-ai-welcome h3 {
  margin: 0 0 9px;
  color: #f4f7fd;
  font-size: 24px;
  letter-spacing: -0.045em;
}

.replay-ai-welcome p {
  max-width: 320px;
  margin: 0;
  color: #8590a5;
  font-size: 11px;
  line-height: 1.55;
}

.replay-ai-message {
  display: grid;
  gap: 5px;
  max-width: 91%;
}

.replay-ai-message.is-user {
  align-self: flex-end;
}

.replay-ai-message.is-assistant {
  align-self: flex-start;
}

.replay-ai-message > span {
  color: #6e7b92;
  font: 700 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.1em;
}

.replay-ai-message.is-user > span {
  text-align: right;
}

.replay-ai-message p {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(111, 137, 194, 0.15);
  border-radius: 5px 13px 13px 13px;
  color: #cbd4e5;
  background: rgba(18, 25, 38, 0.78);
  font-size: 11px;
  line-height: 1.58;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.replay-ai-message.is-user p {
  border-color: rgba(79, 121, 255, 0.26);
  border-radius: 13px 5px 13px 13px;
  color: #eef3ff;
  background: linear-gradient(145deg, rgba(49, 91, 220, 0.42), rgba(45, 65, 132, 0.38));
}

.replay-ai-message.is-error p {
  border-color: rgba(239, 91, 116, 0.24);
  color: #ffb7c3;
  background: rgba(89, 24, 39, 0.28);
}

.replay-ai-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(111, 137, 194, 0.15);
  border-radius: 5px 13px 13px 13px;
  background: rgba(18, 25, 38, 0.78);
}

.replay-ai-typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #779bff;
  animation: replay-ai-typing 1s ease-in-out infinite;
}

.replay-ai-typing i:nth-child(2) {
  animation-delay: 0.15s;
}

.replay-ai-typing i:nth-child(3) {
  animation-delay: 0.3s;
}

.replay-ai-suggestions {
  display: flex;
  gap: 6px;
  padding: 0 14px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.replay-ai-suggestions::-webkit-scrollbar {
  display: none;
}

.replay-ai-suggestions button {
  flex: 0 0 auto;
  min-height: 29px;
  padding: 0 10px;
  border: 1px solid rgba(104, 132, 195, 0.2);
  border-radius: 8px;
  color: #98a7c1;
  background: rgba(13, 19, 30, 0.74);
  font-size: 8px;
  font-weight: 650;
  cursor: pointer;
}

.replay-ai-suggestions button:hover {
  color: #dce6ff;
  border-color: rgba(94, 137, 255, 0.42);
  background: rgba(55, 86, 170, 0.16);
}

.replay-ai-composer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 8px;
  align-items: end;
  margin: 0 14px 10px;
  padding: 8px 8px 8px 11px;
  border: 1px solid rgba(78, 126, 255, 0.52);
  border-radius: 13px;
  background: rgba(5, 9, 16, 0.84);
  box-shadow: 0 0 0 1px rgba(54, 96, 217, 0.08), 0 12px 32px rgba(0, 0, 0, 0.25);
}

.replay-ai-composer:focus-within {
  border-color: rgba(97, 147, 255, 0.88);
  box-shadow: 0 0 0 3px rgba(57, 103, 234, 0.12), 0 12px 32px rgba(0, 0, 0, 0.25);
}

.replay-ai-composer textarea {
  width: 100%;
  max-height: 116px;
  min-height: 36px;
  padding: 9px 0 4px;
  resize: none;
  border: 0;
  outline: 0;
  color: #e5ebf7;
  background: transparent;
  font: 11px/1.45 inherit;
}

.replay-ai-composer textarea::placeholder {
  color: #59667d;
}

.replay-ai-composer button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, #4f7dff, #6e5ef2);
  box-shadow: 0 8px 20px rgba(57, 97, 229, 0.28);
  cursor: pointer;
}

.replay-ai-composer button:disabled {
  opacity: 0.42;
  cursor: wait;
}

.replay-ai-composer svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.replay-ai-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 0 14px;
  border-top: 1px solid rgba(126, 148, 196, 0.1);
  color: #66738a;
}

.replay-ai-footer > span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 8px;
}

.replay-ai-footer > span i {
  width: 5px;
  height: 5px;
}

.replay-ai-footer small {
  font-size: 7px;
}

@keyframes replay-ai-glow {
  to { transform: rotate(360deg); }
}

@keyframes replay-ai-typing {
  0%, 70%, 100% { opacity: 0.28; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-3px); }
}

@media (max-width: 680px) {
  .replay-ai-fab {
    right: 11px;
    bottom: 182px;
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  .replay-ai-fab:hover,
  .replay-ai-fab:focus-visible {
    width: 50px;
  }

  .replay-ai-fab-mark {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .replay-ai-fab-label {
    display: none;
  }

  .replay-ai-panel {
    top: 46px;
    width: 100%;
    border-left: 0;
  }

  .replay-ai-backdrop {
    inset-block-start: 46px;
  }

  .replay-ai-context {
    margin-top: 9px;
  }

  .replay-ai-welcome {
    min-height: 220px;
  }
}

body.reduced-motion .replay-ai-fab-glow,
body.reduced-motion .replay-ai-typing i {
  animation: none !important;
}

/* SENTRA identity ? one neural mark across every AI surface */
.sentra-ai-mark {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 11px;
  color: var(--accent-primary);
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.13), transparent 34%),
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-rgb), 0.045));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 22px rgba(var(--accent-rgb), 0.16);
  isolation: isolate;
}

.sentra-ai-mark::before {
  content: "";
  position: absolute;
  inset: 17%;
  z-index: -1;
  border-radius: 50%;
  background: rgb(var(--accent-rgb));
  filter: blur(11px);
  opacity: 0.34;
  animation: sentra-mark-breathe 3.2s ease-in-out infinite;
}

.sentra-ai-mark svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
  filter: drop-shadow(0 0 7px rgba(var(--accent-rgb), 0.7));
}

.sentra-ai-mark--nav {
  width: 22px !important;
  height: 22px;
  border: 0;
  border-radius: 7px;
  background: rgba(var(--accent-rgb), 0.1);
  box-shadow: none;
}

.sentra-ai-mark--nav svg {
  width: 16px;
  height: 16px;
}

.sentra-ai-mark--hero {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.sentra-ai-mark--hero svg {
  width: 27px;
  height: 27px;
}

.sentra-ai-brand-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.sentra-ai-brand-line--compact {
  gap: 9px;
  margin-bottom: 10px;
}

.sentra-ai-brand-line .ai-workspace-kicker,
.sentra-ai-brand-line .ai-command-eyebrow {
  margin: 0;
}

.sentra-ai-mark--message {
  width: 25px;
  height: 25px;
  margin-top: -3px;
  border-radius: 9px;
}

.sentra-ai-mark--message svg {
  width: 16px;
  height: 16px;
}

.sentra-assistant-avatar {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  margin-top: -3px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 8px;
  color: rgb(var(--accent-rgb));
  background: rgba(var(--accent-rgb), 0.08);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.sentra-ai-provider-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 32px;
  min-height: 32px;
  padding: 4px !important;
}
.sentra-ai-provider-pill > span:not(.sentra-ai-mark) {
  display: none;
}

.sentra-ai-mark--status {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 7px;
  background: rgba(var(--accent-rgb), 0.12);
  box-shadow: none;
}

.sentra-ai-mark--status svg {
  width: 15px;
  height: 15px;
}

.sentra-ai-mark--context {
  width: 25px;
  height: 25px;
  border-radius: 8px;
}

.sentra-ai-mark--context svg {
  width: 16px;
  height: 16px;
}

.ai-spirit {
  display: grid;
  place-items: center;
  color: var(--accent-primary);
}

.ai-spirit svg {
  width: 210px;
  height: 210px;
  fill: currentColor;
  filter: drop-shadow(0 0 34px rgba(var(--accent-rgb), 0.5));
  animation: sentra-spirit-float 7s ease-in-out infinite;
}

.ai-spirit.ai-spirit-bullish {
  color: #42d69a;
}

.ai-spirit.ai-spirit-bearish {
  color: #f26b86;
}

.ai-insight-item {
  grid-template-columns: 24px minmax(0, 1fr);
}

.ai-insight-item .sentra-ai-mark--insight {
  width: 24px;
  height: 24px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.09);
  box-shadow: none;
}

.ai-insight-item .sentra-ai-mark--insight svg {
  width: 15px;
  height: 15px;
}

.ai-assistant-msg.is-assistant {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.ai-assistant-msg-photo {
  display: block;
  max-width: min(280px, 72vw);
  max-height: 180px;
  margin: 0 0 8px;
  border-radius: 14px;
  object-fit: cover;
}

#dashboardAiDrawer .is-user .ai-assistant-msg-photo {
  margin-left: auto;
}

#dashboardAiDrawer .dashboard-ai-drawer-form .ai-chat-attachment {
  margin: 0 4px 8px;
}

.ai-assistant-msg-text {
  min-width: 0;
  white-space: pre-wrap;
}

@keyframes sentra-mark-breathe {
  0%, 100% { opacity: 0.2; transform: scale(0.82); }
  50% { opacity: 0.58; transform: scale(1.2); }
}

@keyframes sentra-spirit-float {
  0%, 100% { transform: translateY(5px) scale(0.96); opacity: 0.64; }
  50% { transform: translateY(-7px) scale(1.04); opacity: 1; }
}

/* Replay Studio ? theme-native TradingView workspace */
.replay-workspace.page {
  --replay-bg: #07090e;
  --replay-chart-bg: #080a10;
  --replay-panel: color-mix(in srgb, #0c1018 94%, var(--accent-primary));
  --replay-panel-raised: color-mix(in srgb, #111620 91%, var(--accent-primary));
  --replay-hover: rgba(var(--accent-rgb), 0.1);
  --replay-border: rgba(var(--accent-rgb), 0.18);
  --replay-border-soft: rgba(151, 163, 187, 0.1);
  --replay-text: #edf0f7;
  --replay-muted: #8b95aa;
  --replay-blue: var(--accent-primary);
}

.replay-workspace .replay-shell {
  grid-template:
    "topbar topbar" 58px
    "tools terminal" minmax(0, 1fr)
    "docktabs docktabs" 44px
    "dock dock" 184px
    / 52px minmax(0, 1fr);
  min-height: 720px;
  border-color: var(--replay-border);
  border-radius: 16px;
  background:
    radial-gradient(circle at 72% -18%, rgba(var(--accent-rgb), 0.09), transparent 34%),
    var(--replay-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 28px 90px rgba(0, 0, 0, 0.42);
}

.replay-tv-topbar {
  height: 58px;
  padding-right: 11px;
  border-color: var(--replay-border);
  background:
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.075), transparent 25%),
    color-mix(in srgb, var(--replay-panel) 96%, transparent);
  backdrop-filter: blur(18px);
}

.replay-tv-brand {
  gap: 10px;
  padding-inline: 15px;
  border-color: var(--replay-border);
  font-size: 11px;
}

.replay-tv-brand-mark {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--replay-blue) 82%, #fff), var(--replay-blue));
  box-shadow: 0 0 25px rgba(var(--accent-rgb), 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.replay-symbol-button {
  height: 40px;
  min-width: 132px;
  margin-inline: 8px;
  padding-inline: 11px;
  border: 1px solid transparent;
  border-radius: 10px;
}

.replay-symbol-button:hover {
  border-color: rgba(var(--accent-rgb), 0.18);
}

.replay-symbol-button > span {
  font-size: 13px;
}

.replay-symbol-button small,
.replay-symbol-button b {
  font-size: 11px;
}

.replay-top-timeframes {
  gap: 3px;
}

.replay-top-timeframes button,
.replay-top-tool,
.replay-top-mode {
  height: 38px;
  border-radius: 10px;
  font-size: 11px;
}

.replay-top-timeframes button {
  min-width: 38px;
}

.replay-top-timeframes button.is-active {
  color: color-mix(in srgb, var(--replay-blue) 34%, #fff);
  background: rgba(var(--accent-rgb), 0.15);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.31), 0 0 18px rgba(var(--accent-rgb), 0.08);
}

.replay-top-tool {
  padding-inline: 12px;
}

.replay-top-tool svg {
  width: 17px;
  height: 17px;
}

.replay-top-tool-icon {
  width: 38px;
}

.replay-tour-button {
  color: color-mix(in srgb, var(--replay-blue) 56%, var(--replay-text));
}

.replay-tour-button:hover {
  color: var(--replay-text);
}

.replay-account-strip {
  height: 38px;
  border-color: var(--replay-border-soft);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.022);
}

.replay-account-strip > span {
  min-width: 92px;
  padding-inline: 11px;
}

.replay-account-strip small {
  font-size: 8px;
}

.replay-account-strip b {
  font-size: 11px;
}

.replay-top-mode {
  border-color: var(--replay-border);
}

.replay-floating-menu {
  top: 54px;
  border-color: rgba(var(--accent-rgb), 0.23);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0, rgba(var(--accent-rgb), 0.11), transparent 38%),
    var(--replay-panel-raised);
  box-shadow: 0 24px 74px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.replay-floating-menu > button > span {
  color: color-mix(in srgb, var(--replay-blue) 56%, #fff);
  background: rgba(var(--accent-rgb), 0.12);
}

.replay-floating-menu > button.is-active > i {
  border-color: var(--replay-blue);
  background: var(--replay-blue);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.14), 0 0 12px rgba(var(--accent-rgb), 0.4);
}

.replay-drawing-toolbar {
  padding-block: 9px;
  border-color: var(--replay-border);
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.045), transparent 30%),
    var(--replay-panel);
}

.replay-drawing-toolbar button {
  flex-basis: 38px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: #919bb0;
}

.replay-drawing-toolbar button.is-active {
  color: color-mix(in srgb, var(--replay-blue) 42%, #fff);
  background: rgba(var(--accent-rgb), 0.16);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.34), 0 0 18px rgba(var(--accent-rgb), 0.08);
}

.replay-drawing-toolbar svg {
  width: 19px;
  height: 19px;
}

.replay-terminal-grid {
  grid-template-columns: minmax(0, 1fr) 330px;
}

.replay-workspace .replay-terminal {
  grid-template-rows: 48px 31px minmax(0, 1fr) 62px 28px;
  background: var(--replay-chart-bg);
}

.replay-workspace .replay-terminal-head {
  height: 48px;
  padding-inline: 15px;
  border-color: var(--replay-border-soft);
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.045), transparent 34%);
}

.replay-workspace .replay-session-identity {
  gap: 8px;
}

.replay-workspace .replay-session-identity strong {
  font-size: 12px;
}

.replay-workspace .replay-source-badge,
.replay-workspace .replay-progress-label {
  min-height: 23px;
  padding-inline: 8px;
  border-color: var(--replay-border);
  border-radius: 7px;
  font-size: 8px;
}

.replay-workspace .replay-terminal-kpis {
  gap: 22px;
}

.replay-workspace .replay-terminal-kpis small {
  font-size: 8px;
}

.replay-workspace .replay-terminal-kpis b {
  font-size: 10px;
}

.replay-workspace .replay-market-line {
  min-height: 31px;
  padding-inline: 15px;
  border-color: var(--replay-border-soft);
  color: var(--replay-muted);
  background: color-mix(in srgb, var(--replay-chart-bg) 95%, var(--accent-primary));
  font-size: 9px;
}

.replay-workspace .replay-market-state {
  font-size: 9px;
}

.replay-workspace .replay-chart-shell {
  background:
    radial-gradient(circle at 50% 42%, rgba(var(--accent-rgb), 0.018), transparent 38%),
    var(--replay-chart-bg);
}

.replay-chart-watermark {
  gap: 5px;
  color: rgba(145, 157, 181, 0.065);
}

.replay-chart-watermark strong {
  font-size: clamp(25px, 3vw, 46px);
  font-weight: 780;
  letter-spacing: 0.12em;
}

.replay-chart-watermark span {
  font-size: 9px;
}

.replay-tv-attribution {
  position: absolute;
  bottom: 9px;
  left: 11px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid rgba(153, 166, 191, 0.09);
  border-radius: 7px;
  color: rgba(153, 166, 191, 0.5);
  background: color-mix(in srgb, var(--replay-chart-bg) 82%, transparent);
  font-size: 8px;
  pointer-events: none;
}

.replay-tv-attribution svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.replay-workspace .replay-transport-bar {
  grid-template-columns: auto minmax(150px, 1fr) auto auto;
  gap: 14px;
  min-height: 62px;
  padding: 9px 13px;
  border-color: var(--replay-border);
  background:
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.045), transparent 32%),
    var(--replay-panel);
}

.replay-workspace .replay-icon-button {
  min-width: 34px;
  height: 34px;
  border-radius: 9px;
}

.replay-workspace .replay-play-button {
  min-width: 94px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--replay-blue) 72%, #9b8cff), var(--replay-blue));
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.25);
  font-size: 11px;
}

.replay-workspace .replay-slider {
  height: 4px;
  background: linear-gradient(to right, var(--replay-blue) 0 var(--replay-progress, 0%), rgba(135, 146, 169, 0.22) var(--replay-progress, 0%) 100%);
}

.replay-workspace .replay-speed-field {
  min-height: 36px;
  padding-inline: 9px 6px;
  border-color: var(--replay-border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.018);
}

.replay-workspace .replay-speed-field .ghost-select {
  background: var(--replay-panel-raised);
  font-size: 11px;
}

.replay-workspace .replay-finish-button {
  min-height: 36px;
  padding-inline: 12px;
  border-color: var(--replay-border);
  border-radius: 9px;
  font-size: 10px;
}

.replay-workspace .replay-shortcuts {
  min-height: 28px;
  padding-inline: 15px;
  border-color: var(--replay-border-soft);
  background: var(--replay-chart-bg);
}

.replay-workspace .replay-shortcuts > span {
  font-size: 8px;
}

.replay-workspace .replay-order-panel {
  gap: 12px;
  padding: 17px;
  border-color: var(--replay-border);
  background:
    radial-gradient(circle at 100% 0, rgba(var(--accent-rgb), 0.08), transparent 31%),
    var(--replay-panel);
}

.replay-workspace .replay-ticket-head h3 {
  font-size: 14px;
}

.replay-workspace .replay-position-state {
  min-height: 25px;
  padding-inline: 9px;
  border-radius: 7px;
  font-size: 8px;
}

.replay-workspace .replay-ticket-price {
  gap: 5px;
  padding: 14px;
  border-color: var(--replay-border);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), transparent 72%),
    rgba(255, 255, 255, 0.025);
}

.replay-workspace .replay-ticket-price span,
.replay-workspace .replay-ticket > label > span,
.replay-workspace .replay-ticket-levels label > span {
  font-size: 9px;
}

.replay-workspace .replay-ticket-price strong {
  font-size: 27px;
}

.replay-workspace .replay-ticket-price small {
  font-size: 9px;
}

.replay-workspace .replay-input-shell,
.replay-workspace .replay-ticket-levels input {
  min-height: 40px;
  border-color: var(--replay-border);
  border-radius: 10px;
  background: rgba(2, 5, 10, 0.34);
}

.replay-workspace .replay-ticket textarea {
  min-height: 68px;
  border-color: var(--replay-border);
  border-radius: 10px;
  background: rgba(2, 5, 10, 0.34);
}

.replay-workspace .replay-level-presets button {
  min-height: 32px;
  border-color: var(--replay-border);
  border-radius: 8px;
  font-size: 9px;
}

.replay-workspace .replay-risk-preview {
  min-height: 36px;
  border-color: var(--replay-border);
  border-radius: 9px;
  background: rgba(var(--accent-rgb), 0.045);
  font-size: 10px;
}

.replay-workspace .replay-order-actions {
  margin-top: 4px;
}

.replay-workspace .replay-order-actions .primary-button {
  min-height: 44px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 760;
}

.replay-workspace .replay-long-btn {
  background: linear-gradient(135deg, #087a58, var(--replay-green));
  box-shadow: 0 8px 20px rgba(22, 199, 132, 0.14);
}

.replay-workspace .replay-short-btn {
  background: linear-gradient(135deg, #b82f51, var(--replay-red));
  box-shadow: 0 8px 20px rgba(239, 91, 116, 0.14);
}

.replay-workspace .replay-close-button {
  min-height: 35px;
  border-color: var(--replay-border);
  border-radius: 9px;
  font-size: 10px;
}

.replay-dock-tabs {
  border-color: var(--replay-border);
  background: var(--replay-panel);
}

.replay-dock-tabs button {
  min-width: 138px;
  padding-inline: 17px;
  border-color: var(--replay-border-soft);
  font-size: 10px;
}

.replay-dock-tabs button.is-active {
  background: rgba(var(--accent-rgb), 0.055);
}

.replay-dock-tabs button.is-active::before {
  background: var(--replay-blue);
  box-shadow: 0 0 13px rgba(var(--accent-rgb), 0.5);
}

.replay-workspace .replay-review-grid {
  background: var(--replay-chart-bg);
}

.replay-shell.is-dock-collapsed {
  grid-template-rows: 58px minmax(0, 1fr) 44px 0;
}

.replay-shell.is-dock-collapsed .replay-ai-fab {
  bottom: 152px;
}

.replay-workspace .replay-hero {
  background:
    radial-gradient(circle at 74% 20%, rgba(var(--accent-rgb), 0.2), transparent 33%),
    rgba(3, 5, 10, 0.76);
  backdrop-filter: blur(18px) saturate(1.15);
}

.replay-workspace .replay-setup-card {
  width: min(540px, calc(100vw - 32px));
  padding: 27px;
  border-color: rgba(var(--accent-rgb), 0.3);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0, rgba(var(--accent-rgb), 0.13), transparent 36%),
    color-mix(in srgb, var(--replay-panel-raised) 96%, transparent);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.67), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

/* Larger, theme-aware SENTRA analyst */
.replay-ai-fab {
  right: 350px;
  bottom: 336px;
  width: 64px;
  height: 64px;
  padding: 4px;
  border-color: rgba(var(--accent-rgb), 0.52);
  border-radius: 21px;
  background: color-mix(in srgb, var(--replay-bg) 90%, transparent);
  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.56),
    0 0 0 1px rgba(var(--accent-rgb), 0.14),
    0 0 29px rgba(var(--accent-rgb), 0.16);
}

.replay-ai-fab:hover,
.replay-ai-fab:focus-visible {
  width: 176px;
}

.replay-ai-fab-glow {
  right: -9px;
  bottom: -12px;
  width: 82px;
  height: 82px;
  background: conic-gradient(from 180deg, var(--replay-blue), #8b5cf6, #19d3b0, var(--replay-blue));
  filter: blur(18px);
}

.replay-ai-fab-mark {
  flex-basis: 54px;
  width: 54px;
  height: 54px;
  border-radius: 17px;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.13), transparent 30%),
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.17), rgba(3, 5, 10, 0.98));
}

.replay-ai-fab-mark svg,
.replay-ai-logo svg,
.replay-ai-welcome-orb svg {
  fill: color-mix(in srgb, var(--replay-blue) 58%, #fff);
  filter: drop-shadow(0 0 11px rgba(var(--accent-rgb), 0.78));
}

.replay-ai-fab:hover .replay-ai-fab-label,
.replay-ai-fab:focus-visible .replay-ai-fab-label {
  width: 101px;
}

.replay-ai-fab-label b {
  font-size: 11px;
}

.replay-ai-fab-label small {
  color: var(--replay-muted);
  font-size: 9px;
}

.replay-shell.is-order-collapsed .replay-ai-fab {
  right: 20px;
}

.replay-ai-backdrop {
  inset-block-start: 58px;
}

.replay-ai-panel {
  top: 58px;
  width: min(430px, calc(100% - 52px));
  border-color: rgba(var(--accent-rgb), 0.25);
  background:
    radial-gradient(circle at 100% 0%, rgba(33, 196, 169, 0.11), transparent 35%),
    radial-gradient(circle at 20% 100%, rgba(var(--accent-rgb), 0.23), transparent 43%),
    linear-gradient(160deg, color-mix(in srgb, #0c111a 95%, var(--accent-primary)), #050810);
}

/* Interactive first-entry Replay guide */
.replay-tour {
  position: absolute;
  inset: 0;
  z-index: 120;
  overflow: hidden;
  color: var(--replay-text);
}

.replay-tour.hidden {
  display: none !important;
}

.replay-tour-highlight {
  position: absolute;
  z-index: 1;
  border: 1px solid color-mix(in srgb, var(--replay-blue) 68%, #fff);
  border-radius: 13px;
  box-shadow:
    0 0 0 9999px rgba(2, 4, 9, 0.77),
    0 0 0 5px rgba(var(--accent-rgb), 0.11),
    0 0 38px rgba(var(--accent-rgb), 0.45);
  pointer-events: none;
  transition:
    left 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    top 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.replay-tour-highlight::after {
  content: "";
  position: absolute;
  top: -5px;
  right: -5px;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 50%;
  background: var(--replay-blue);
  box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.8);
}

.replay-tour-highlight.is-chart {
  border-radius: 7px;
  box-shadow:
    0 0 0 9999px rgba(2, 4, 9, 0.66),
    inset 0 0 70px rgba(var(--accent-rgb), 0.025),
    0 0 0 4px rgba(var(--accent-rgb), 0.09);
}

.replay-tour-map {
  position: absolute;
  top: 92px;
  left: 78px;
  z-index: 3;
  display: grid;
  width: min(258px, calc(100% - 490px));
  min-width: 220px;
  padding: 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(var(--accent-rgb), 0.12), transparent 40%),
    rgba(10, 14, 22, 0.88);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
}

.replay-tour-map-head {
  display: grid;
  gap: 7px;
  padding: 3px 5px 17px;
}

.replay-tour-map-head > span {
  color: color-mix(in srgb, var(--replay-blue) 64%, #fff);
  font-size: 9px;
  font-weight: 780;
  letter-spacing: 0.14em;
}

.replay-tour-map-head strong {
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.replay-tour-map button {
  position: relative;
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 5px 8px;
  border: 0;
  border-radius: 11px;
  color: #768197;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.replay-tour-map button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 24px;
  width: 1px;
  height: calc(100% + 1px);
  background: rgba(144, 155, 177, 0.16);
}

.replay-tour-map button:last-child::before {
  display: none;
}

.replay-tour-map button b {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(144, 155, 177, 0.2);
  border-radius: 9px;
  background: #0c1018;
  font: 750 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-tour-map button span {
  font-size: 11px;
  font-weight: 680;
}

.replay-tour-map button:hover {
  color: var(--replay-text);
  background: rgba(255, 255, 255, 0.035);
}

.replay-tour-map button.is-active {
  color: var(--replay-text);
  background: rgba(var(--accent-rgb), 0.11);
  transform: translateX(4px);
}

.replay-tour-map button.is-active b,
.replay-tour-map button.is-complete b {
  color: #fff;
  border-color: rgba(var(--accent-rgb), 0.56);
  background: var(--replay-blue);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.35);
}

.replay-tour-card {
  position: absolute;
  top: 90px;
  right: 28px;
  z-index: 4;
  width: min(400px, calc(100% - 380px));
  min-width: 350px;
  padding: 27px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 23px;
  background:
    radial-gradient(circle at 100% 0, rgba(var(--accent-rgb), 0.19), transparent 39%),
    linear-gradient(155deg, rgba(17, 22, 33, 0.97), rgba(7, 10, 16, 0.98));
  box-shadow: 0 32px 100px rgba(0, 0, 0, 0.56), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(24px);
}

.replay-tour-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  margin-block: 24px;
  border-radius: 2px;
  background: linear-gradient(180deg, transparent, var(--replay-blue), transparent);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.58);
}

.replay-tour-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.replay-tour-card-top > span {
  color: color-mix(in srgb, var(--replay-blue) 62%, #fff);
  font: 760 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.13em;
}

.replay-tour-card-top button {
  padding: 5px 0;
  border: 0;
  color: var(--replay-muted);
  background: transparent;
  font-size: 10px;
  cursor: pointer;
}

.replay-tour-card-top button:hover {
  color: var(--replay-text);
}

.replay-tour-visual {
  position: relative;
  display: flex;
  align-items: center;
  height: 82px;
  margin: 17px 0 8px;
}

.replay-tour-visual > span {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.95);
  font: 820 64px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: -0.1em;
  text-shadow: 0 0 30px rgba(var(--accent-rgb), 0.32);
}

.replay-tour-visual > i {
  position: absolute;
  left: 58px;
  width: 170px;
  height: 1px;
  background: linear-gradient(90deg, var(--replay-blue), transparent);
}

.replay-tour-visual > i::before,
.replay-tour-visual > i::after {
  content: "";
  position: absolute;
  top: 50%;
  border-radius: 50%;
  transform: translateY(-50%);
}

.replay-tour-visual > i::before {
  right: 44px;
  width: 7px;
  height: 7px;
  background: var(--replay-blue);
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.9);
}

.replay-tour-visual > i::after {
  right: 0;
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, 0.55);
}

.replay-tour-kicker {
  display: block;
  margin-bottom: 11px;
  color: color-mix(in srgb, var(--replay-blue) 58%, #fff);
  font-size: 9px;
  font-weight: 780;
  letter-spacing: 0.16em;
}

.replay-tour-card h3 {
  margin: 0;
  color: #f4f6fb;
  font-size: clamp(24px, 2.2vw, 33px);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.replay-tour-card > p {
  margin: 15px 0 0;
  color: #9aa4b7;
  font-size: 13px;
  line-height: 1.66;
}

.replay-tour-actions {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr);
  gap: 9px;
  margin-top: 23px;
}

.replay-tour-actions button {
  min-height: 43px;
  padding-inline: 15px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 720;
  cursor: pointer;
}

.replay-tour-prev {
  border: 1px solid var(--replay-border);
  color: var(--replay-muted);
  background: rgba(255, 255, 255, 0.025);
}

.replay-tour-prev:disabled {
  opacity: 0.34;
  cursor: default;
}

.replay-tour-next {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--replay-blue) 76%, #9b8cff), var(--replay-blue));
  box-shadow: 0 10px 28px rgba(var(--accent-rgb), 0.24);
}

.replay-tour-next b {
  font-size: 17px;
  font-weight: 500;
}

.replay-tour-card > small {
  display: block;
  margin-top: 13px;
  color: #687389;
  font-size: 9px;
  line-height: 1.45;
}

body.replay-focus-mode .app {
  padding: 0 !important;
}

body.replay-focus-mode .replay-workspace .replay-shell {
  height: 100dvh !important;
  border: 0;
  border-radius: 0;
}

body[data-theme="white"] .replay-workspace.page {
  --replay-bg: #f4f6fb;
  --replay-chart-bg: #f9faff;
  --replay-panel: #ffffff;
  --replay-panel-raised: #ffffff;
  --replay-hover: rgba(var(--accent-rgb), 0.08);
  --replay-border: rgba(var(--accent-rgb), 0.18);
  --replay-border-soft: rgba(37, 47, 66, 0.09);
  --replay-text: #182033;
  --replay-muted: #6d788e;
}

body[data-theme="white"] .replay-tour-map,
body[data-theme="white"] .replay-tour-card {
  color: var(--replay-text);
  background:
    radial-gradient(circle at 100% 0, rgba(var(--accent-rgb), 0.11), transparent 38%),
    rgba(255, 255, 255, 0.97);
}

body[data-theme="white"] .replay-tour-map button b {
  background: #f6f8fc;
}

body[data-theme="white"] .replay-tour-card h3 {
  color: #172033;
}

body[data-theme="white"] .replay-tour-card > p {
  color: #5f6b82;
}

body[data-theme="white"] .replay-workspace .replay-input-shell,
body[data-theme="white"] .replay-workspace .replay-ticket-levels input,
body[data-theme="white"] .replay-workspace .replay-ticket textarea {
  background: #f7f9fd;
}

@media (max-width: 1180px) {
  .replay-terminal-grid {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .replay-ai-fab {
    right: 318px;
  }

  .replay-tour-map {
    left: 68px;
  }

  .replay-tour-card {
    right: 20px;
    width: 360px;
    min-width: 330px;
  }
}

@media (max-width: 980px) {
  .replay-workspace .replay-shell {
    grid-template:
      "topbar topbar" 54px
      "tools terminal" minmax(0, 1fr)
      "docktabs docktabs" 42px
      "dock dock" 156px
      / 48px minmax(0, 1fr);
  }

  .replay-shell.is-dock-collapsed {
    grid-template-rows: 54px minmax(0, 1fr) 42px 0;
  }

  .replay-tv-topbar {
    height: 54px;
  }

  .replay-ai-backdrop {
    inset-block-start: 54px;
  }

  .replay-ai-panel {
    top: 54px;
  }

  .replay-ai-fab,
  .replay-shell.is-dock-collapsed .replay-ai-fab {
    right: 18px;
  }

  .replay-tour-map {
    top: 76px;
    left: 66px;
    width: 224px;
    min-width: 0;
    padding: 13px;
  }

  .replay-tour-map button {
    min-height: 43px;
  }

  .replay-tour-card {
    top: 74px;
    right: 16px;
    width: 330px;
    min-width: 0;
    padding: 23px;
  }
}

@media (max-width: 680px) {
  .replay-workspace .replay-shell {
    grid-template:
      "topbar" 50px
      "terminal" minmax(0, 1fr)
      "tools" 46px
      "docktabs" 42px
      "dock" 140px
      / minmax(0, 1fr);
    height: 100dvh;
    min-height: 610px;
    border-radius: 0;
  }

  .replay-shell.is-dock-collapsed {
    grid-template-rows: 50px minmax(0, 1fr) 46px 42px 0;
  }

  .replay-tv-topbar {
    height: 50px;
  }

  .replay-symbol-button {
    min-width: 100px;
    margin-inline: 3px;
    padding-inline: 7px;
  }

  .replay-symbol-button > span {
    font-size: 11px;
  }

  .replay-top-timeframes button {
    min-width: 29px;
    padding-inline: 4px;
  }

  #replayIndicatorsBtn,
  .replay-tour-button {
    width: 34px;
    padding: 0;
  }

  .replay-drawing-toolbar {
    padding: 4px 7px;
  }

  .replay-drawing-toolbar button {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  .replay-workspace .replay-terminal {
    grid-template-rows: 39px 26px minmax(0, 1fr) 54px;
  }

  .replay-workspace .replay-terminal-head {
    height: 39px;
  }

  .replay-workspace .replay-transport-bar {
    grid-template-columns: auto minmax(70px, 1fr) auto;
    min-height: 54px;
  }

  .replay-workspace .replay-play-button {
    min-width: 72px;
    height: 35px;
  }

  .replay-tv-attribution span {
    display: none;
  }

  .replay-ai-fab,
  .replay-shell.is-dock-collapsed .replay-ai-fab {
    right: 12px;
    bottom: 292px;
    width: 54px;
    height: 54px;
    border-radius: 18px;
  }

  .replay-shell.is-dock-collapsed .replay-ai-fab {
    bottom: 154px;
  }

  .replay-ai-fab-mark {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .replay-ai-panel {
    top: 50px;
  }

  .replay-ai-backdrop {
    inset-block-start: 50px;
  }

  .replay-tour {
    background: rgba(2, 4, 9, 0.72);
  }

  .replay-tour-highlight {
    box-shadow:
      0 0 0 9999px rgba(2, 4, 9, 0.69),
      0 0 0 4px rgba(var(--accent-rgb), 0.1),
      0 0 26px rgba(var(--accent-rgb), 0.36);
  }

  .replay-tour-map {
    top: 62px;
    right: 10px;
    left: 10px;
    display: flex;
    width: auto;
    padding: 8px;
    overflow-x: auto;
    border-radius: 14px;
    scrollbar-width: none;
  }

  .replay-tour-map-head,
  .replay-tour-map button span,
  .replay-tour-map button::before {
    display: none;
  }

  .replay-tour-map button {
    flex: 1 0 42px;
    display: grid;
    grid-template-columns: 1fr;
    min-height: 40px;
    padding: 4px;
  }

  .replay-tour-map button b {
    margin: auto;
  }

  .replay-tour-map button.is-active {
    transform: none;
  }

  .replay-tour-card {
    inset: auto 10px 12px;
    width: auto;
    min-width: 0;
    padding: 20px;
    border-radius: 19px;
  }

  .replay-tour-visual {
    height: 50px;
    margin-block: 10px 6px;
  }

  .replay-tour-visual > span {
    font-size: 44px;
  }

  .replay-tour-card h3 {
    font-size: 24px;
  }

  .replay-tour-card > p {
    margin-top: 10px;
    font-size: 11px;
    line-height: 1.52;
  }

  .replay-tour-actions {
    margin-top: 15px;
  }

  .replay-tour-card > small {
    display: none;
  }
}

body.reduced-motion .sentra-ai-mark::before {
  animation: none !important;
}

body.reduced-motion .ai-spirit svg {
  animation: none !important;
}

/* Dashboard SENTRA ? round primary AI entry point */
.dashboard-ai-orb {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 180;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: transparent;
  cursor: pointer;
  isolation: isolate;
}

.dashboard-ai-orb[hidden] {
  display: none !important;
}

.dashboard-ai-orb-glow {
  position: absolute;
  inset: -12px;
  z-index: -2;
  border-radius: 50%;
  opacity: 0.55;
  background: rgb(var(--accent-rgb));
  filter: blur(18px);
}

.dashboard-ai-orb::before {
  content: "";
  position: absolute;
  inset: -4px;
  z-index: -1;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.35);
}

.dashboard-ai-orb-core {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 50%;
  color: rgb(var(--accent-rgb));
  background: color-mix(in srgb, #070a10 88%, rgb(var(--accent-rgb)));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.4),
    0 0 24px rgba(var(--accent-rgb), 0.28);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease;
}

.dashboard-ai-orb svg {
  width: 30px;
  height: 30px;
  color: inherit;
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.75));
}

.dashboard-sentra-monogram {
  position: relative;
  display: inline-block;
  color: currentColor;
  font-size: 29px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.08em;
  text-shadow: 0 0 14px rgba(var(--accent-rgb), 0.55);
  transform: translateX(-1px);
}

.dashboard-sentra-monogram::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: 1px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.dashboard-ai-orb-spin {
  animation: dashboard-ai-spin 4.5s linear infinite;
  transform-origin: center;
}

.dashboard-ai-orb-tooltip {
  position: absolute;
  top: 50%;
  right: calc(100% + 14px);
  min-width: max-content;
  padding: 9px 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 10px;
  color: var(--text-primary);
  background: color-mix(in srgb, var(--surface, #0c1018) 94%, transparent);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  font-size: 11px;
  font-weight: 720;
  opacity: 0;
  pointer-events: none;
  transform: translate(7px, -50%);
  transition: opacity 0.18s ease, transform 0.18s ease;
  backdrop-filter: blur(16px);
}

.dashboard-ai-orb:hover .dashboard-ai-orb-core,
.dashboard-ai-orb:focus-visible .dashboard-ai-orb-core {
  border-color: rgba(var(--accent-rgb), 0.5);
  transform: translateY(-3px) scale(1.045);
}

.dashboard-ai-orb:hover .dashboard-ai-orb-tooltip,
.dashboard-ai-orb:focus-visible .dashboard-ai-orb-tooltip {
  opacity: 1;
  transform: translate(0, -50%);
}

/* Dashboard AI drawer ? shared conversation, focused left-side workspace */
body.dashboard-ai-drawer-open {
  overflow: hidden;
}

.dashboard-ai-drawer-shell {
  position: fixed;
  inset: 0;
  z-index: 920;
  pointer-events: none;
}

.dashboard-ai-drawer-shell[hidden] {
  display: none !important;
}

.dashboard-ai-drawer-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  background: rgba(1, 4, 10, 0.7);
  cursor: default;
  transition: opacity 0.28s ease;
  backdrop-filter: blur(10px);
}

.dashboard-ai-drawer {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: clamp(16px, 2.4vh, 26px);
  width: 100%;
  max-width: none;
  padding: clamp(20px, 3vw, 36px);
  overflow: hidden;
  border: 0;
  color: var(--text-primary);
  opacity: 0;
  background:
    radial-gradient(circle at 8% 8%, rgba(var(--accent-rgb), 0.22), transparent 32%),
    radial-gradient(circle at 92% 58%, rgba(var(--accent-rgb), 0.09), transparent 38%),
    linear-gradient(155deg, color-mix(in srgb, var(--surface, #080c13) 96%, #000), color-mix(in srgb, var(--card-bg) 94%, #000));
  box-shadow: none;
  transform: translateX(104%);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease;
  isolation: isolate;
}

.dashboard-ai-drawer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.28;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(var(--accent-rgb), 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--accent-rgb), 0.07) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

.dashboard-ai-drawer-shell.is-open {
  pointer-events: auto;
}

.dashboard-ai-drawer-shell.is-open .dashboard-ai-drawer-backdrop {
  opacity: 1;
}

.dashboard-ai-drawer-shell.is-open .dashboard-ai-drawer {
  opacity: 1;
  transform: translateX(0);
}

.dashboard-ai-drawer-head,
.dashboard-ai-drawer-brand,
.dashboard-ai-drawer-intro-row,
.dashboard-ai-drawer-status-row {
  display: flex;
  align-items: center;
}

.dashboard-ai-drawer-head,
.dashboard-ai-drawer-intro-row,
.dashboard-ai-drawer-status-row {
  justify-content: space-between;
}

.dashboard-ai-drawer-head {
  gap: 20px;
}

.dashboard-ai-drawer-brand {
  gap: 13px;
}

.dashboard-sentra-brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 13px;
  color: rgb(var(--accent-rgb));
  background: rgba(var(--accent-rgb), 0.09);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.07);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.dashboard-ai-drawer-brand > div {
  display: grid;
  gap: 2px;
}

.dashboard-ai-drawer-brand > div span {
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.dashboard-ai-drawer-brand > div strong {
  font-size: 15px;
  letter-spacing: 0.12em;
}

.dashboard-ai-drawer-close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 14px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.dashboard-ai-drawer-close svg {
  display: block;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.dashboard-ai-drawer-close:hover {
  transform: rotate(7deg);
  border-color: rgba(var(--accent-rgb), 0.48);
  background: rgba(var(--accent-rgb), 0.11);
}

.dashboard-ai-drawer-intro > p {
  margin: 0 0 7px;
  color: rgb(var(--accent-rgb));
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.2em;
}

.dashboard-ai-drawer-intro h2 {
  margin: 0;
  color: rgb(var(--accent-rgb));
  font-size: clamp(62px, 7.4vw, 102px);
  font-weight: 850;
  line-height: 0.88;
  letter-spacing: -0.085em;
  white-space: nowrap;
  text-shadow: 0 0 34px rgba(var(--accent-rgb), 0.48);
}

.dashboard-ai-drawer-intro-row {
  gap: 20px;
  margin-top: 15px;
}

.dashboard-ai-drawer-intro-row p {
  max-width: 390px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.dashboard-ai-drawer-intro-row span {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 999px;
  color: rgb(var(--accent-rgb));
  background: rgba(var(--accent-rgb), 0.07);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.dashboard-ai-drawer-prompts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-ai-drawer-prompts button,
.dashboard-ai-drawer-center-link {
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.dashboard-ai-drawer-prompts button {
  min-height: 50px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
  text-align: left;
}

.dashboard-ai-drawer-prompts button:hover,
.dashboard-ai-drawer-center-link:hover {
  border-color: rgba(var(--accent-rgb), 0.42);
  background: rgba(var(--accent-rgb), 0.1);
  transform: translateY(-2px);
}

.dashboard-ai-drawer-chat {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 0;
}

.dashboard-ai-drawer-status-row {
  gap: 16px;
  min-height: 30px;
}

.dashboard-ai-drawer-status-row .ai-assistant-status {
  position: relative;
  margin: 0;
  padding-left: 16px;
  font-size: 11px;
}

.dashboard-ai-drawer-status-row .ai-assistant-status::before {
  content: "";
  position: absolute;
  top: 0.42em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.dashboard-ai-drawer-status-row .ai-assistant-status.is-online::before {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1), 0 0 14px rgba(16, 185, 129, 0.35);
}

.dashboard-ai-drawer-status-row .ai-assistant-status.is-offline::before {
  background: var(--error);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.dashboard-ai-drawer-center-link {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 10px;
}

.dashboard-ai-drawer-messages.ai-assistant-messages {
  min-height: 0;
  max-height: none;
  padding: 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 20px;
  background:
    linear-gradient(150deg, rgba(var(--accent-rgb), 0.055), transparent 48%),
    rgba(0, 0, 0, 0.13);
}

.dashboard-ai-drawer-messages .ai-assistant-msg {
  max-width: 88%;
  font-size: 13.5px;
  line-height: 1.55;
}

.dashboard-ai-drawer-form.ai-assistant-form {
  padding: 8px;
  border-color: rgba(var(--accent-rgb), 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.dashboard-ai-drawer-form .primary-button {
  min-height: 48px;
  border-radius: 13px;
}

body[data-theme="white"] .dashboard-ai-drawer {
  background:
    radial-gradient(circle at 84% 10%, rgba(102, 78, 255, 0.18), transparent 30%),
    linear-gradient(158deg, #05040e 0%, #0a0818 34%, #070b1c 68%, #04060f 100%);
  box-shadow: none;
}

body[data-theme="white"] .dashboard-ai-drawer-backdrop {
  background: rgba(2, 4, 12, 0.86);
}

@media (max-width: 680px) {
  .dashboard-ai-drawer {
    width: 100vw;
    padding: 18px 16px;
    border-right: 0;
  }

  .dashboard-ai-drawer-intro h2 {
    font-size: clamp(58px, 18vw, 86px);
  }

  .dashboard-ai-drawer-intro-row span {
    display: none;
  }

  .dashboard-ai-drawer-prompts {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .dashboard-ai-drawer-prompts::-webkit-scrollbar {
    display: none;
  }

  .dashboard-ai-drawer-prompts button {
    flex: 0 0 160px;
  }

  .dashboard-ai-drawer-messages.ai-assistant-messages {
    padding: 14px;
  }

  .dashboard-ai-drawer-messages .ai-assistant-msg {
    max-width: 94%;
  }
}

.replay-ai-fab,
.replay-ai-backdrop,
.replay-ai-panel {
  display: none !important;
}

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

@media (max-width: 680px) {
  .dashboard-ai-orb {
    right: 17px;
    bottom: 88px;
    width: 62px;
    height: 62px;
  }

  .dashboard-ai-orb-core {
    width: 58px;
    height: 58px;
  }

  .dashboard-ai-orb svg {
    width: 28px;
    height: 28px;
  }

  .dashboard-ai-orb-tooltip {
    display: none;
  }
}

body.reduced-motion .dashboard-ai-orb-spin,
body.reduced-motion .dashboard-ai-drawer,
body.reduced-motion .dashboard-ai-drawer-backdrop {
  animation: none !important;
  transition: none !important;
}

/* Replay Challenge Upgrade ? scroll review, execution ledger and prop objectives */
body.replay-focus-mode .app {
  padding: 0 !important;
}

body.replay-focus-mode .main-content {
  height: 100dvh;
  overflow: hidden;
}

body.replay-focus-mode .replay-workspace.page {
  position: relative;
  display: block;
  width: 100%;
  height: 100dvh;
  padding: 6px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;
  background: #06080d;
  scrollbar-color: rgba(var(--accent-rgb), .42) #080a10;
}

body.replay-focus-mode .replay-workspace.page::-webkit-scrollbar { width: 8px; }
body.replay-focus-mode .replay-workspace.page::-webkit-scrollbar-track { background: #080a10; }
body.replay-focus-mode .replay-workspace.page::-webkit-scrollbar-thumb {
  border: 2px solid #080a10;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), .48);
}

body.replay-focus-mode .replay-workspace .replay-shell {
  height: calc(100dvh - 12px) !important;
  min-height: 620px !important;
}

.replay-scroll-below {
  position: absolute;
  z-index: 120;
  top: calc(100dvh - 66px);
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(var(--accent-rgb), .25);
  border-radius: 999px;
  color: #c9cede;
  background: rgba(7, 10, 16, .86);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  transform: translateX(-50%);
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.replay-scroll-below i {
  color: rgb(var(--accent-rgb));
  font-size: 14px;
  font-style: normal;
  animation: replay-scroll-down 1.7s ease-in-out infinite;
}

@keyframes replay-scroll-down {
  50% { transform: translateY(4px); }
}

.replay-workspace .replay-mode-switch {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.replay-prop-setup {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(var(--accent-rgb), .18);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0, rgba(var(--accent-rgb), .11), transparent 42%),
    rgba(255, 255, 255, .018);
}

.replay-prop-setup-content { display: grid; gap: 12px; }
.replay-prop-pickers { display: grid; grid-template-columns: 1.25fr .75fr; gap: 10px; }
.replay-prop-pickers label { display: grid; gap: 6px; }
.replay-prop-pickers label > span {
  color: var(--replay-muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.replay-prop-pickers .ghost-select {
  width: 100%;
  min-height: 38px;
  border-color: rgba(var(--accent-rgb), .18);
  border-radius: 9px;
  background: #0d1119;
}

.replay-prop-rule-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.replay-prop-rule-preview > span {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(var(--accent-rgb), .11);
  border-radius: 9px;
  background: rgba(255, 255, 255, .018);
}

.replay-prop-rule-preview small {
  overflow: hidden;
  color: var(--replay-muted);
  font-size: 7px;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.replay-prop-rule-preview b {
  color: var(--replay-text);
  font: 760 13px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-prop-resume,
.replay-prop-locked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(var(--accent-rgb), .16);
  border-radius: 10px;
  background: rgba(var(--accent-rgb), .055);
}

.replay-prop-resume > div,
.replay-prop-locked > div { display: grid; gap: 4px; }
.replay-prop-resume span,
.replay-prop-locked span {
  color: rgb(var(--accent-rgb));
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.replay-prop-resume strong,
.replay-prop-locked strong { color: var(--replay-text); font-size: 11px; }
.replay-prop-locked p { margin: 0; color: var(--replay-muted); font-size: 9px; line-height: 1.4; }
.replay-prop-resume button,
.replay-prop-locked button {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(var(--accent-rgb), .22);
  border-radius: 7px;
  color: var(--replay-text);
  background: rgba(var(--accent-rgb), .1);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.replay-prop-hud {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid rgba(var(--accent-rgb), .19);
  border-radius: 10px;
  background:
    radial-gradient(circle at 100% 0, rgba(var(--accent-rgb), .11), transparent 46%),
    #11151d;
}

.replay-prop-hud header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.replay-prop-hud header > div { display: grid; gap: 3px; min-width: 0; }
.replay-prop-hud header span,
.replay-prop-hud > p {
  margin: 0;
  color: var(--replay-muted);
  font: 700 7px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.replay-prop-hud header strong {
  overflow: hidden;
  color: var(--replay-text);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.replay-prop-hud header > b {
  padding: 5px 7px;
  border: 1px solid rgba(52, 211, 153, .22);
  border-radius: 999px;
  color: #66e0ad;
  background: rgba(52, 211, 153, .07);
  font: 800 7px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .08em;
}
.replay-prop-hud header > b[data-status="breached"],
.replay-prop-hud header > b[data-status="expired"] {
  border-color: rgba(251, 113, 133, .25);
  color: #fb8fa2;
  background: rgba(251, 113, 133, .08);
}
.replay-prop-hud header > b[data-status="passed"] {
  border-color: rgba(var(--accent-rgb), .3);
  color: rgb(var(--accent-rgb));
  background: rgba(var(--accent-rgb), .09);
}

.replay-prop-objective { display: grid; gap: 4px; }
.replay-prop-objective > div { display: flex; justify-content: space-between; gap: 8px; }
.replay-prop-objective > div span,
.replay-prop-objective > div b { color: var(--replay-muted); font-size: 7px; font-weight: 700; }
.replay-prop-objective > i {
  display: block;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: #252b37;
}
.replay-prop-objective > i > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: rgb(var(--accent-rgb));
  transition: width .25s ease;
}
.replay-prop-objective > i > span[data-tone="warning"] { background: #f59e0b; }
.replay-prop-objective > i > span[data-tone="danger"] { background: #ef5b74; }
.replay-prop-hud > small { color: #8f99ac; font-size: 7.5px; line-height: 1.35; }

.replay-trade-item-head {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.replay-trade-item-head > b { font-size: 9px; }

.replay-result-chip,
.replay-side-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 21px;
  padding: 0 7px;
  border: 1px solid rgba(148, 163, 184, .15);
  border-radius: 999px;
  color: #aab3c3;
  background: rgba(148, 163, 184, .06);
  font: 800 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .06em;
}
.replay-result-chip.is-positive { border-color: rgba(22, 199, 132, .23); color: #42d99f; background: rgba(22, 199, 132, .07); }
.replay-result-chip.is-negative { border-color: rgba(239, 91, 116, .24); color: #fb8297; background: rgba(239, 91, 116, .07); }
.replay-result-chip.is-open { border-color: rgba(var(--accent-rgb), .23); color: rgb(var(--accent-rgb)); background: rgba(var(--accent-rgb), .07); }
.replay-side-chip.is-long { color: #42d99f; }
.replay-side-chip.is-short { color: #fb8297; }

.replay-below-fold {
  position: relative;
  min-height: 100vh;
  margin: 6px -6px -6px;
  overflow: hidden;
  color: #f0f2f8;
  background:
    radial-gradient(circle at 8% 8%, rgba(var(--accent-rgb), .1), transparent 24%),
    radial-gradient(circle at 91% 58%, rgba(25, 211, 176, .055), transparent 24%),
    #07090e;
}

.replay-below-fold::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(#000, transparent 78%);
}

.replay-ledger-section,
.replay-challenge-review,
.replay-story-section,
.replay-process-section,
.replay-story-finale {
  position: relative;
  z-index: 1;
  width: min(1540px, calc(100% - clamp(36px, 7vw, 130px)));
  margin: 0 auto;
}

.replay-ledger-section { padding: clamp(100px, 12vw, 180px) 0 80px; }

.replay-below-heading {
  display: grid;
  grid-template-columns: minmax(320px, 1.3fr) minmax(260px, .7fr);
  gap: clamp(32px, 7vw, 120px);
  align-items: end;
  margin-bottom: clamp(48px, 7vw, 92px);
}

.replay-below-heading > div { display: grid; gap: 20px; }
.replay-below-heading span,
.replay-challenge-review-copy > span,
.replay-story-kicker {
  color: rgb(var(--accent-rgb));
  font: 750 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.replay-below-heading h2,
.replay-challenge-review h2 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(48px, 6.8vw, 110px);
  line-height: .9;
  letter-spacing: -.06em;
}
.replay-below-heading > p,
.replay-challenge-review p {
  max-width: 38ch;
  margin: 0;
  color: rgba(218, 222, 235, .6);
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.65;
}

.replay-ledger-metrics {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, .11);
  border-bottom: 1px solid rgba(255, 255, 255, .11);
}
.replay-ledger-metrics article {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 24px clamp(12px, 1.6vw, 24px);
  border-right: 1px solid rgba(255, 255, 255, .09);
}
.replay-ledger-metrics article:last-child { border-right: 0; }
.replay-ledger-metrics span {
  overflow: hidden;
  color: rgba(214, 219, 234, .45);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .09em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.replay-ledger-metrics strong {
  color: #f3f5fa;
  font: 750 clamp(20px, 2vw, 31px)/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-ledger-table-wrap {
  position: relative;
  margin-top: 38px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  background: rgba(10, 13, 20, .74);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}
.replay-ledger-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  font: 650 10px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.replay-ledger-table th {
  height: 48px;
  padding: 0 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  color: rgba(206, 213, 230, .42);
  background: rgba(255, 255, 255, .018);
  font-size: 8px;
  letter-spacing: .1em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.replay-ledger-table td {
  height: 58px;
  padding: 8px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .065);
  color: #aeb7c9;
  white-space: nowrap;
}
.replay-ledger-table tr:last-child td { border-bottom: 0; }
.replay-ledger-table tbody tr { transition: background .18s ease; }
.replay-ledger-table tbody tr:hover { background: rgba(var(--accent-rgb), .04); }
.replay-ledger-table td strong { display: block; color: #e4e8f1; font-size: 10px; }
.replay-ledger-table td small { display: block; margin-top: 3px; color: #626c80; font-size: 7px; }
.replay-ledger-note {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.replay-ledger-empty {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 220px;
  padding: 36px;
  color: rgba(211, 217, 231, .48);
  text-align: center;
}
.replay-ledger-empty span {
  color: rgba(var(--accent-rgb), .42);
  font: 750 52px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.replay-ledger-empty p { max-width: 42ch; margin: 0; line-height: 1.55; }

.replay-challenge-review {
  display: grid;
  grid-template-columns: minmax(300px, .8fr) minmax(520px, 1.2fr);
  gap: clamp(50px, 9vw, 150px);
  align-items: end;
  padding: clamp(100px, 13vw, 190px) 0;
  border-top: 1px solid rgba(255, 255, 255, .09);
}
.replay-challenge-review-copy { display: grid; gap: 24px; }
.replay-challenge-review h2 { font-size: clamp(52px, 6vw, 94px); }
.replay-challenge-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, .1);
  border-left: 1px solid rgba(255, 255, 255, .1);
}
.replay-challenge-review-grid article {
  display: grid;
  gap: 13px;
  min-height: 160px;
  padding: 24px;
  border-right: 1px solid rgba(255, 255, 255, .1);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.replay-challenge-review-grid span,
.replay-challenge-review-grid small { color: rgba(212, 218, 232, .46); font-size: 9px; text-transform: uppercase; }
.replay-challenge-review-grid strong { font: 750 30px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.replay-challenge-review-grid i {
  align-self: end;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}
.replay-challenge-review-grid i b { display: block; height: 100%; background: rgb(var(--accent-rgb)); }

.replay-story-section {
  display: grid;
  align-content: center;
  min-height: 100vh;
  padding: 100px 0;
}
.replay-story-display {
  position: relative;
  z-index: 1;
  max-width: 9ch;
  margin: 28px 0 0;
  font-size: clamp(72px, 13vw, 210px);
  line-height: .77;
  letter-spacing: -.08em;
}
.replay-story-intro {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(300px, 1fr);
  gap: clamp(32px, 8vw, 130px);
  max-width: 920px;
  margin: clamp(70px, 10vw, 140px) 0 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .13);
}
.replay-story-intro h3 { margin: 0; font-size: clamp(24px, 2.7vw, 42px); line-height: 1; letter-spacing: -.04em; }
.replay-story-intro p { margin: 0; color: rgba(216, 222, 235, .58); font-size: 17px; line-height: 1.7; }
.replay-story-orbit {
  position: absolute;
  top: 12%;
  right: -8%;
  width: min(48vw, 720px);
  aspect-ratio: 1;
  border: 1px solid rgba(var(--accent-rgb), .15);
  border-radius: 50%;
  animation: replay-story-orbit 34s linear infinite;
}
.replay-story-orbit::before,
.replay-story-orbit::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(var(--accent-rgb), .11);
  border-radius: 50%;
}
.replay-story-orbit::before { inset: 16%; transform: rotate(62deg) scaleX(.38); }
.replay-story-orbit::after { inset: 32%; box-shadow: 0 0 80px rgba(var(--accent-rgb), .14); }
.replay-story-orbit i {
  position: absolute;
  top: 50%;
  left: -5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgb(var(--accent-rgb));
  box-shadow: 0 0 22px rgba(var(--accent-rgb), .8);
}
.replay-story-orbit i:nth-child(2) { top: 16%; left: 78%; width: 6px; height: 6px; }
.replay-story-orbit i:nth-child(3) { top: 82%; left: 73%; width: 4px; height: 4px; }
@keyframes replay-story-orbit { to { transform: rotate(360deg); } }

.replay-process-section { padding: clamp(100px, 13vw, 190px) 0; }
.replay-process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, .11);
  border-bottom: 1px solid rgba(255, 255, 255, .11);
}
.replay-process-grid article {
  min-height: 370px;
  padding: 30px clamp(18px, 2.5vw, 40px);
  border-right: 1px solid rgba(255, 255, 255, .09);
}
.replay-process-grid article:last-child { border-right: 0; }
.replay-process-grid b { color: rgba(var(--accent-rgb), .62); font: 750 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .15em; }
.replay-process-grid h3 { max-width: 10ch; margin: 120px 0 18px; font-size: clamp(24px, 2vw, 34px); line-height: 1; letter-spacing: -.04em; }
.replay-process-grid p { max-width: 31ch; margin: 0; color: rgba(215, 221, 235, .52); font-size: 13px; line-height: 1.65; }

.replay-story-finale {
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: 92vh;
  padding: 110px 0;
}
.replay-story-finale > span { color: rgb(var(--accent-rgb)); font: 750 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .2em; text-transform: uppercase; }
.replay-story-finale h2 { max-width: 11ch; margin: 28px 0 70px; font-size: clamp(62px, 9vw, 148px); line-height: .82; letter-spacing: -.07em; }
.replay-story-finale button {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  min-height: 64px;
  padding: 0 12px 0 24px;
  border: 1px solid rgba(var(--accent-rgb), .3);
  border-radius: 999px;
  color: #f3f5fa;
  background: rgba(var(--accent-rgb), .09);
  font: 750 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.replay-story-finale button i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #080a0f;
  background: #eef1f7;
  font-size: 17px;
  font-style: normal;
}

.replay-below-reveal {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(48px);
  transition: opacity .85s cubic-bezier(.2, .7, .2, 1), filter .85s ease, transform .85s cubic-bezier(.2, .7, .2, 1);
}
.replay-below-reveal.is-visible { opacity: 1; filter: none; transform: none; }
.replay-process-grid article:nth-child(2) { transition-delay: .08s; }
.replay-process-grid article:nth-child(3) { transition-delay: .16s; }
.replay-process-grid article:nth-child(4) { transition-delay: .24s; }

@media (max-width: 1100px) {
  .replay-ledger-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .replay-ledger-metrics article { border-bottom: 1px solid rgba(255, 255, 255, .09); }
  .replay-challenge-review { grid-template-columns: 1fr; }
  .replay-process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .replay-process-grid article:nth-child(2) { border-right: 0; }
  .replay-process-grid article { border-bottom: 1px solid rgba(255, 255, 255, .09); }
}

@media (max-width: 720px) {
  body.replay-focus-mode .replay-workspace.page { padding: 0 !important; }
  body.replay-focus-mode .replay-workspace .replay-shell { height: 100dvh !important; }
  .replay-scroll-below { top: calc(100dvh - 56px); }
  .replay-workspace .replay-mode-switch { grid-template-columns: 1fr; }
  .replay-prop-pickers,
  .replay-story-intro,
  .replay-below-heading { grid-template-columns: 1fr; }
  .replay-prop-rule-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .replay-below-fold { margin: 0; }
  .replay-ledger-section,
  .replay-challenge-review,
  .replay-story-section,
  .replay-process-section,
  .replay-story-finale { width: calc(100% - 28px); }
  .replay-ledger-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .replay-ledger-metrics article { min-height: 94px; }
  .replay-below-heading h2,
  .replay-challenge-review h2 { font-size: clamp(44px, 14vw, 70px); }
  .replay-story-display { font-size: clamp(68px, 21vw, 120px); }
  .replay-story-orbit { right: -45%; width: 100vw; }
  .replay-process-grid { grid-template-columns: 1fr; }
  .replay-process-grid article { min-height: 300px; border-right: 0; }
  .replay-process-grid h3 { margin-top: 85px; }
  .replay-story-finale h2 { font-size: clamp(56px, 16vw, 88px); }
}

body.reduced-motion .replay-scroll-below i,
body.reduced-motion .replay-story-orbit {
  animation: none !important;
}
body.reduced-motion .replay-below-reveal {
  opacity: 1;
  filter: none;
  transform: none;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .replay-scroll-below i,
  .replay-story-orbit { animation: none; }
  .replay-below-reveal { opacity: 1; filter: none; transform: none; transition: none; }
}

/* Replay roomy terminal ? preserve hierarchy instead of compressing every panel */
body.replay-focus-mode .replay-workspace .replay-shell {
  grid-template:
    "topbar topbar" 68px
    "tools terminal" minmax(0, 1fr)
    "docktabs docktabs" 58px
    "dock dock" 280px
    / 64px minmax(0, 1fr);
  height: max(calc(100dvh - 12px), 1080px) !important;
  min-height: 1080px !important;
}

.replay-workspace .replay-tv-topbar {
  height: 68px;
}

.replay-workspace .replay-tv-brand {
  padding-inline: 20px;
  font-size: 13px;
}

.replay-workspace .replay-tv-brand-mark {
  width: 36px;
  height: 36px;
  font-size: 15px;
}

.replay-workspace .replay-symbol-button {
  min-width: 154px;
  height: 46px;
  padding-inline: 14px;
}

.replay-workspace .replay-symbol-button > span {
  font-size: 15px;
}

.replay-workspace .replay-symbol-button small,
.replay-workspace .replay-symbol-button b,
.replay-workspace .replay-top-timeframes button,
.replay-workspace .replay-top-tool,
.replay-workspace .replay-top-mode {
  font-size: 12px;
}

.replay-workspace .replay-top-timeframes button,
.replay-workspace .replay-top-tool,
.replay-workspace .replay-top-mode {
  height: 42px;
}

.replay-workspace .replay-account-strip {
  height: 44px;
}

.replay-workspace .replay-account-strip > span {
  min-width: 108px;
  padding-inline: 14px;
}

.replay-workspace .replay-account-strip small {
  font-size: 9px;
}

.replay-workspace .replay-account-strip b {
  font-size: 13px;
}

.replay-workspace .replay-drawing-toolbar {
  padding-block: 12px;
}

.replay-workspace .replay-drawing-toolbar button {
  flex-basis: 46px;
  width: 46px;
  height: 46px;
}

.replay-workspace .replay-drawing-toolbar svg {
  width: 21px;
  height: 21px;
}

.replay-workspace .replay-terminal-grid {
  grid-template-columns: minmax(0, 1fr) 390px;
}

.replay-workspace .replay-terminal {
  grid-template-rows: 60px 38px minmax(0, 1fr) 74px 36px;
}

.replay-workspace .replay-terminal-head {
  height: 60px;
  padding-inline: 20px;
}

.replay-workspace .replay-session-identity strong {
  font-size: 14px;
}

.replay-workspace .replay-panel-index {
  font-size: 9px;
  letter-spacing: .15em;
}

.replay-workspace .replay-source-badge,
.replay-workspace .replay-progress-label {
  min-height: 28px;
  padding-inline: 10px;
  font-size: 9px;
}

.replay-workspace .replay-terminal-kpis {
  gap: 32px;
}

.replay-workspace .replay-terminal-kpis small {
  font-size: 9px;
}

.replay-workspace .replay-terminal-kpis b {
  margin-top: 4px;
  font-size: 13px;
}

.replay-workspace .replay-market-line {
  min-height: 38px;
  padding-inline: 20px;
  font-size: 11px;
}

.replay-workspace .replay-market-state {
  font-size: 10px;
}

.replay-workspace .replay-chart-watermark strong {
  font-size: clamp(42px, 5vw, 80px);
}

.replay-workspace .replay-chart-watermark span {
  font-size: 11px;
}

.replay-workspace .replay-transport-bar {
  min-height: 74px;
  padding: 12px 18px;
}

.replay-workspace .replay-icon-button {
  min-width: 40px;
  height: 40px;
  font-size: 11px;
}

.replay-workspace .replay-play-button {
  min-width: 112px;
  height: 44px;
  font-size: 13px;
}

.replay-workspace .replay-speed-field,
.replay-workspace .replay-finish-button {
  min-height: 42px;
  font-size: 11px;
}

.replay-workspace .replay-shortcuts {
  min-height: 36px;
  padding-inline: 20px;
}

.replay-workspace .replay-shortcuts > span {
  font-size: 9px;
}

.replay-workspace .replay-order-panel {
  gap: 16px;
  padding: 24px;
}

.replay-workspace .replay-ticket-head h3 {
  max-width: 18ch;
  font-size: 19px;
  line-height: 1.08;
}

.replay-workspace .replay-position-state {
  min-height: 30px;
  padding-inline: 11px;
  font-size: 9px;
}

.replay-workspace .replay-ticket-price {
  padding: 19px;
}

.replay-workspace .replay-ticket-price span,
.replay-workspace .replay-ticket > label > span,
.replay-workspace .replay-ticket-levels label > span {
  font-size: 11px;
}

.replay-workspace .replay-ticket-price strong {
  font-size: 34px;
}

.replay-workspace .replay-ticket-price small {
  font-size: 11px;
}

.replay-workspace .replay-input-shell,
.replay-workspace .replay-ticket-levels input {
  min-height: 48px;
  font-size: 13px;
}

.replay-workspace .replay-ticket textarea {
  min-height: 86px;
  padding: 13px;
  font-size: 12px;
}

.replay-workspace .replay-risk-preview {
  min-height: 44px;
  padding-inline: 13px;
  font-size: 12px;
}

.replay-workspace .replay-order-actions .primary-button {
  min-height: 52px;
  font-size: 13px;
}

.replay-workspace .replay-close-button {
  min-height: 42px;
  font-size: 11px;
}

.replay-workspace .replay-dock-tabs button {
  min-width: 190px;
  padding-inline: 24px;
  font-size: 13px;
}

.replay-workspace .replay-dock-tabs b {
  min-width: 23px;
  height: 23px;
  border-radius: 7px;
  font-size: 10px;
}

.replay-workspace .replay-review-grid > section {
  padding: 24px 28px;
}

.replay-workspace .replay-review-grid > section.is-active {
  gap: 16px;
}

.replay-workspace .replay-card-head {
  min-height: 48px;
  margin-bottom: 0;
  padding-bottom: 14px;
}

.replay-workspace .replay-card-head .replay-panel-index {
  display: block;
  margin-bottom: 7px;
  color: color-mix(in srgb, var(--replay-blue) 64%, var(--replay-muted));
  font-size: 9px;
}

.replay-workspace .replay-card-head h3 {
  font-size: 22px;
  letter-spacing: -.025em;
}

.replay-workspace .replay-count-badge {
  min-width: 34px;
  min-height: 34px;
  font-size: 12px;
}

.replay-workspace .replay-stats-panel {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.replay-workspace .replay-stat-row,
.replay-workspace .replay-stat-row:first-child {
  grid-column: auto;
  align-content: center;
  min-height: 86px;
  padding: 16px 18px;
  border-radius: 12px;
}

.replay-workspace .replay-stat-row span {
  font-size: 10px;
}

.replay-workspace .replay-stat-row strong {
  font-size: 24px;
}

.replay-workspace .replay-trades-list,
.replay-workspace .replay-history-list {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  align-content: start;
  gap: 12px;
  max-height: none;
}

.replay-workspace .replay-trade-item,
.replay-workspace .replay-history-item {
  min-height: 88px;
  padding: 15px 17px;
  border-radius: 12px;
}

.replay-workspace .replay-trade-item {
  font-size: 12px;
}

.replay-workspace .replay-trade-item-head strong {
  font-size: 13px;
}

.replay-workspace .replay-trade-item-meta {
  margin-top: 10px;
  font-size: 10px;
}

.replay-workspace .replay-history-symbol {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-size: 9px;
}

.replay-workspace .replay-history-item {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 14px;
}

.replay-workspace .replay-history-item strong {
  font-size: 13px;
}

.replay-workspace .replay-history-item small {
  font-size: 10px;
}

.replay-shell.is-dock-collapsed {
  grid-template-rows: 68px minmax(0, 1fr) 58px 0;
}

@media (max-width: 1180px) {
  .replay-workspace .replay-terminal-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .replay-workspace .replay-account-strip > span {
    min-width: 92px;
    padding-inline: 10px;
  }
}

@media (max-width: 980px) {
  body.replay-focus-mode .replay-workspace .replay-shell {
    grid-template:
      "topbar topbar" 58px
      "tools terminal" minmax(0, 1fr)
      "docktabs docktabs" 56px
      "dock dock" 280px
      / 54px minmax(0, 1fr);
    height: max(100dvh, 980px) !important;
    min-height: 980px !important;
  }

  .replay-workspace .replay-tv-topbar {
    height: 58px;
  }

  .replay-workspace .replay-dock-tabs button {
    min-width: 150px;
    padding-inline: 16px;
    font-size: 11px;
  }

  .replay-workspace .replay-review-grid > section {
    padding: 20px;
  }
}

@media (max-width: 720px) {
  body.replay-focus-mode .replay-workspace .replay-shell {
    grid-template:
      "topbar" 54px
      "terminal" minmax(0, 1fr)
      "docktabs" 54px
      "dock" 300px
      / minmax(0, 1fr);
    height: max(100dvh, 960px) !important;
    min-height: 960px !important;
  }

  .replay-workspace .replay-tv-topbar {
    height: 54px;
  }

  .replay-workspace .replay-terminal {
    grid-template-rows: 54px 34px minmax(0, 1fr) 68px 32px;
  }

  .replay-workspace .replay-terminal-head {
    height: 54px;
    padding-inline: 12px;
  }

  .replay-workspace .replay-terminal-kpis {
    gap: 12px;
  }

  .replay-workspace .replay-market-line {
    min-height: 34px;
    padding-inline: 12px;
  }

  .replay-workspace .replay-transport-bar {
    min-height: 68px;
    padding-inline: 10px;
  }

  .replay-workspace .replay-dock-tabs {
    overflow-x: auto;
  }

  .replay-workspace .replay-dock-tabs button {
    flex: 0 0 auto;
    min-width: 128px;
    padding-inline: 12px;
    font-size: 10px;
  }

  .replay-workspace .replay-review-grid > section {
    padding: 18px 14px;
  }

  .replay-workspace .replay-card-head h3 {
    font-size: 19px;
  }

  .replay-workspace .replay-stats-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .replay-workspace .replay-stat-row,
  .replay-workspace .replay-stat-row:first-child {
    min-height: 78px;
    padding: 13px;
  }

  .replay-workspace .replay-stat-row strong {
    font-size: 20px;
  }

  .replay-workspace .replay-trades-list,
  .replay-workspace .replay-history-list {
    grid-template-columns: 1fr;
  }
}

/* Cinematic Replay v4 ? authoritative active layer */
body.replay-focus-mode .replay-workspace.page {
  padding: 0 !important;
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.035), transparent 28%),
    #05070b;
}

body.replay-focus-mode .replay-workspace .replay-shell {
  grid-template:
    "topbar topbar" 60px
    "tools terminal" minmax(0, 1fr)
    "docktabs docktabs" 46px
    "dock dock" 230px
    / 56px minmax(0, 1fr);
  width: 100%;
  height: 100dvh !important;
  min-height: 620px !important;
  border: 0;
  border-radius: 0;
  background: #080a0f;
}

body.replay-focus-mode .replay-workspace .replay-shell.is-dock-collapsed {
  grid-template-rows: 60px minmax(0, 1fr) 46px 0;
}

.replay-workspace .replay-tv-topbar {
  height: 60px;
  padding-inline: 10px;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: rgba(7, 9, 14, 0.96);
  backdrop-filter: blur(18px);
}

.replay-workspace .replay-tv-brand-mark,
.replay-ai-fab-mark,
.replay-ai-logo,
.replay-ai-welcome-orb {
  display: grid;
  place-items: center;
  color: rgb(var(--accent-rgb));
  font-size: 0;
}

.replay-workspace .replay-tv-brand-mark::before,
.replay-ai-fab-mark::before,
.replay-ai-logo::before,
.replay-ai-welcome-orb::before {
  content: "";
  display: block;
  width: 62%;
  aspect-ratio: 1;
  background: currentColor;
  clip-path: polygon(8% 8%, 92% 8%, 66% 34%, 46% 34%, 61% 50%, 46% 66%, 66% 66%, 92% 92%, 8% 92%, 48% 50%);
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.6));
}

.replay-ai-fab-mark svg,
.replay-ai-logo svg,
.replay-ai-welcome-orb svg,
.sentra-ai-mark svg {
  display: none !important;
}

.sentra-ai-mark::after,
.dashboard-sentra-monogram::before,
.dashboard-sentra-brand-mark::before,
.sentra-assistant-avatar::before {
  content: "";
  display: block;
  width: 62%;
  aspect-ratio: 1;
  background: currentColor;
  clip-path: polygon(8% 8%, 92% 8%, 66% 34%, 46% 34%, 61% 50%, 46% 66%, 66% 66%, 92% 92%, 8% 92%, 48% 50%);
}

.replay-workspace .replay-briefing {
  overflow-y: auto;
  background:
    linear-gradient(90deg, rgba(4, 6, 10, 0.93), rgba(4, 6, 10, 0.74)),
    radial-gradient(circle at 78% 22%, rgba(var(--accent-rgb), 0.2), transparent 28%),
    #05070b;
  backdrop-filter: blur(18px);
}

.replay-workspace .replay-briefing.is-open {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(440px, 0.72fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: center;
  padding: clamp(34px, 6vw, 92px);
}

.replay-workspace .replay-briefing .replay-hero-copy {
  display: block;
  max-width: 740px;
}

.replay-workspace .replay-briefing .replay-hero-copy h1 {
  font-size: clamp(84px, 12vw, 190px);
  line-height: 0.75;
  letter-spacing: -0.09em;
}

.replay-workspace .replay-briefing .replay-setup-card {
  width: 100%;
  max-width: 620px;
  max-height: calc(100dvh - 70px);
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 24px;
  background: rgba(12, 15, 22, 0.94);
  box-shadow: 0 32px 110px rgba(0, 0, 0, 0.5);
}

.replay-market-theater {
  position: relative;
  grid-template-columns: minmax(0, 1fr) !important;
  background: #080a0f;
}

.replay-workspace .replay-terminal {
  grid-template-rows: 54px 32px minmax(0, 1fr) 78px 30px !important;
  background: #080a0f;
}

.replay-workspace .replay-chart-shell {
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.025), transparent 18%),
    #080b10;
}

.replay-workspace .replay-chart-watermark {
  opacity: 0.085;
}

.replay-workspace .replay-transport-bar {
  min-height: 78px;
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 13, 19, 0.96);
}

.replay-workspace .replay-play-button {
  min-width: 132px;
  height: 50px;
  border-radius: 14px;
  font-size: 14px;
}

.replay-workspace .replay-icon-button {
  min-width: 44px;
  height: 44px;
}

.replay-workspace .replay-order-panel {
  position: absolute !important;
  inset: 0 0 0 auto;
  z-index: 86;
  width: min(400px, calc(100vw - 74px));
  height: 100%;
  padding: 24px;
  overflow-y: auto;
  border-left: 1px solid rgba(var(--accent-rgb), 0.2);
  background: rgba(12, 15, 22, 0.98);
  box-shadow: -30px 0 90px rgba(0, 0, 0, 0.48);
  opacity: 0;
  pointer-events: none;
  transform: translateX(102%);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
  backdrop-filter: blur(18px);
}

.replay-workspace .replay-order-panel.is-mobile-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.replay-workspace .replay-dock-tabs {
  min-height: 46px;
  background: #0b0e14;
}

.replay-workspace .replay-review-grid {
  min-height: 0;
  overflow: auto;
  background: #0a0d12;
}

.replay-workspace .replay-prop-hud {
  position: absolute;
  z-index: 78;
  top: 68px;
  left: 68px;
  right: 16px;
  display: grid;
  grid-template-columns: auto auto repeat(3, minmax(120px, 1fr)) minmax(120px, auto);
  gap: 14px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 12px;
  background: rgba(8, 11, 16, 0.9);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.replay-workspace .replay-prop-hud header {
  align-items: center;
}

.replay-workspace .replay-prop-hud > p,
.replay-workspace .replay-prop-hud > small {
  margin: 0;
}

.replay-workspace .replay-prop-objective {
  min-width: 0;
}

.replay-ai-fab {
  right: 18px !important;
  bottom: 58px !important;
  z-index: 88 !important;
  display: inline-flex !important;
  border-radius: 14px !important;
}

.replay-ai-backdrop {
  display: block !important;
}

.replay-ai-panel {
  display: grid !important;
}

.replay-review-reel {
  min-height: 100dvh;
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.08), transparent 24%),
    #07090e;
}

.replay-review-intro {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - clamp(30px, 7vw, 120px)));
  margin: 0 auto;
  padding: clamp(86px, 10vw, 150px) 0 50px;
}

.replay-review-kicker {
  color: rgb(var(--accent-rgb));
  font: 760 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.2em;
}

.replay-review-intro > div:nth-child(2) {
  display: grid;
  grid-template-columns: minmax(300px, 1.1fr) minmax(260px, 0.55fr);
  gap: clamp(30px, 7vw, 110px);
  align-items: end;
  margin-top: 24px;
}

.replay-review-intro h2 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(52px, 7vw, 108px);
  line-height: 0.88;
  letter-spacing: -0.065em;
}

.replay-review-intro p {
  margin: 0;
  color: rgba(218, 222, 235, 0.6);
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.65;
}

.replay-review-takeaways {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(44px, 6vw, 82px);
  border-block: 1px solid rgba(255, 255, 255, 0.1);
}

.replay-review-takeaways article {
  display: grid;
  gap: 16px;
  min-height: 128px;
  padding: 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.replay-review-takeaways article:last-child {
  border-right: 0;
}

.replay-review-takeaways small {
  color: rgba(216, 222, 235, 0.44);
  font: 720 9px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.replay-review-takeaways strong {
  align-self: end;
  font-size: clamp(18px, 2vw, 30px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.replay-review-reel .replay-ledger-section {
  padding-top: 54px;
}

.replay-review-reel .replay-story-section,
.replay-review-reel .replay-process-section {
  display: none;
}

.replay-review-reel .replay-story-finale {
  min-height: 42vh;
  padding-block: 80px;
}

.replay-review-reel .replay-story-finale h2 {
  margin-bottom: 44px;
  font-size: clamp(48px, 7vw, 104px);
}

.dashboard-ai-drawer {
  width: 100%;
  max-width: none;
  gap: 13px;
}

.dashboard-ai-drawer-intro h2 {
  font-size: clamp(38px, 4.4vw, 58px);
  text-shadow: none;
}

.ai-workspace-hero::after,
.ai-workspace-orbit {
  display: none;
}

.support-partner-card {
  align-items: center;
}

@media (max-width: 920px) {
  .replay-workspace .replay-briefing.is-open {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 30px;
    padding: 28px 20px;
  }

  .replay-workspace .replay-briefing .replay-hero-copy h1 {
    font-size: clamp(72px, 18vw, 120px);
  }

  .replay-workspace .replay-prop-hud {
    grid-template-columns: 1fr repeat(3, minmax(90px, 1fr));
  }

  .replay-workspace .replay-prop-hud header,
  .replay-workspace .replay-prop-hud > p,
  .replay-workspace .replay-prop-hud > small {
    display: none;
  }
}

@media (max-width: 720px) {
  body.replay-focus-mode .replay-workspace .replay-shell {
    grid-template:
      "topbar" 52px
      "terminal" minmax(0, 1fr)
      "tools" 46px
      "docktabs" 44px
      "dock" 230px
      / minmax(0, 1fr);
    height: 100dvh !important;
    min-height: 610px !important;
  }

  body.replay-focus-mode .replay-workspace .replay-shell.is-dock-collapsed {
    grid-template-rows: 52px minmax(0, 1fr) 46px 44px 0;
  }

  .replay-workspace .replay-terminal {
    grid-template-rows: 48px 30px minmax(0, 1fr) 70px 0 !important;
  }

  .replay-workspace .replay-order-panel {
    width: 100%;
  }

  .replay-workspace .replay-prop-hud {
    top: 58px;
    left: 8px;
    right: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    padding: 7px;
  }

  .replay-workspace .replay-transport-bar {
    padding-inline: 8px;
  }

  .replay-workspace .replay-play-button {
    min-width: 94px;
  }

  .replay-ai-fab {
    bottom: 98px !important;
  }

  .replay-review-intro > div:nth-child(2),
  .replay-review-takeaways {
    grid-template-columns: 1fr;
  }

  .replay-review-takeaways article {
    min-height: 96px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .replay-review-takeaways article:last-child {
    border-bottom: 0;
  }
}

body.reduced-motion .replay-workspace .replay-order-panel {
  transition: none !important;
}

body.reduced-motion .replay-review-reel * {
  scroll-behavior: auto !important;
}

@media (prefers-reduced-motion: reduce) {
  .replay-workspace .replay-order-panel {
    transition: none !important;
  }
}

/* SENTRA visual refinement ? calm, theme-aware product language */
.sentra-ai-mark,
.dashboard-sentra-monogram,
.dashboard-sentra-brand-mark,
.sentra-assistant-avatar,
.replay-workspace .replay-tv-brand-mark,
.replay-ai-fab-mark,
.replay-ai-logo,
.replay-ai-welcome-orb {
  position: relative;
  display: grid;
  place-items: center;
  color: rgb(var(--accent-rgb));
  font-size: 0;
}

.sentra-ai-mark,
.dashboard-sentra-brand-mark,
.dashboard-ai-orb-core,
.sentra-assistant-avatar {
  background:
    linear-gradient(150deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-rgb), 0.04)),
    color-mix(in srgb, var(--card-bg, #0d1119) 92%, #000);
}

.sentra-ai-mark::before,
.sentra-ai-mark::after,
.dashboard-sentra-monogram::before,
.dashboard-sentra-monogram::after,
.dashboard-sentra-brand-mark::before,
.dashboard-sentra-brand-mark::after,
.sentra-assistant-avatar::before,
.sentra-assistant-avatar::after,
.replay-workspace .replay-tv-brand-mark::before,
.replay-workspace .replay-tv-brand-mark::after,
.replay-ai-fab-mark::before,
.replay-ai-fab-mark::after,
.replay-ai-logo::before,
.replay-ai-logo::after,
.replay-ai-welcome-orb::before,
.replay-ai-welcome-orb::after {
  content: none;
}

.sentra-ai-mark::after,
.dashboard-sentra-monogram::before,
.dashboard-sentra-brand-mark::before,
.sentra-assistant-avatar::before,
.replay-workspace .replay-tv-brand-mark::before,
.replay-ai-fab-mark::before,
.replay-ai-logo::before,
.replay-ai-welcome-orb::before {
  content: "";
  position: static;
  display: block;
  width: 56%;
  height: 56%;
  border: 0;
  border-radius: 0;
  opacity: 1;
  background: currentColor;
  box-shadow: none;
  clip-path: none;
  filter: none;
  animation: none;
  transform: none;
  -webkit-mask: url("assets/sentra-mark.svg") center / contain no-repeat;
  mask: url("assets/sentra-mark.svg") center / contain no-repeat;
}

.dashboard-ai-orb {
  right: 24px;
  bottom: 24px;
  width: 64px;
  height: 64px;
}

.dashboard-ai-orb-glow {
  inset: -7px;
  opacity: 0.2;
  filter: blur(15px);
}

.dashboard-ai-orb::before {
  inset: -2px;
  border-color: rgba(var(--accent-rgb), 0.2);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.36);
}

.dashboard-ai-orb-core {
  width: 60px;
  height: 60px;
  border-color: rgba(var(--accent-rgb), 0.24);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.06),
    0 12px 30px rgba(0, 0, 0, 0.34);
}

.dashboard-sentra-monogram {
  width: 34px;
  height: 34px;
}

.dashboard-ai-orb:hover .dashboard-ai-orb-core,
.dashboard-ai-orb:focus-visible .dashboard-ai-orb-core {
  border-color: rgba(var(--accent-rgb), 0.4);
  transform: translateY(-2px);
}

.dashboard-ai-drawer {
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  max-width: none;
  padding: 22px;
  border-right-color: transparent;
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.06), transparent 180px),
    color-mix(in srgb, var(--bg-secondary, #090c13) 97%, #000);
  box-shadow: none;
}

.dashboard-ai-drawer::before {
  opacity: 0.08;
  background-size: 64px 64px;
}

.dashboard-ai-drawer-head {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-ai-drawer-brand {
  gap: 11px;
}

.dashboard-sentra-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border-color: rgba(var(--accent-rgb), 0.2);
}

.dashboard-ai-drawer-brand > div span {
  color: rgb(var(--accent-rgb));
  font-size: 8px;
  letter-spacing: 0.18em;
}

.dashboard-ai-drawer-brand > div strong {
  font-size: 14px;
  letter-spacing: 0.1em;
}

.dashboard-ai-drawer-close {
  width: 38px;
  height: 38px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.025);
  font-size: 22px;
}

.dashboard-ai-drawer-close:hover {
  border-color: rgba(var(--accent-rgb), 0.28);
  background: rgba(var(--accent-rgb), 0.07);
  transform: none;
}

.dashboard-ai-drawer-intro {
  padding: 5px 2px 2px;
}

.dashboard-ai-drawer-intro > p {
  margin: 0 0 8px;
  font-size: 8px;
  letter-spacing: 0.16em;
}

.dashboard-ai-drawer-intro h2 {
  max-width: 420px;
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 720;
  line-height: 1.05;
  letter-spacing: -0.04em;
  white-space: normal;
  text-shadow: none;
}

.dashboard-ai-drawer-intro-row {
  align-items: flex-start;
  gap: 14px;
  margin-top: 10px;
}

.dashboard-ai-drawer-intro-row p {
  max-width: 330px;
  font-size: 12px;
  line-height: 1.5;
}

.dashboard-ai-drawer-intro-row span {
  padding: 6px 8px;
  border-color: rgba(var(--accent-rgb), 0.13);
  color: color-mix(in srgb, rgb(var(--accent-rgb)) 72%, var(--text-secondary));
  background: rgba(var(--accent-rgb), 0.035);
  font-size: 7px;
}

.dashboard-ai-drawer-prompts {
  gap: 7px;
}

.dashboard-ai-drawer-prompts button {
  min-height: 42px;
  padding: 9px 10px;
  border-color: rgba(255, 255, 255, 0.07);
  border-radius: 11px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.022);
  font-size: 10px;
  font-weight: 620;
}

.dashboard-ai-drawer-prompts button:hover {
  border-color: rgba(var(--accent-rgb), 0.22);
  color: var(--text-primary);
  background: rgba(var(--accent-rgb), 0.055);
  transform: none;
}

.dashboard-ai-drawer-chat {
  gap: 8px;
}

.dashboard-ai-drawer-status-row {
  min-height: 28px;
  padding-inline: 2px;
}

.dashboard-ai-drawer-center-link {
  padding: 5px 8px;
  border: 0;
  color: var(--text-secondary);
  background: transparent;
  font-size: 9px;
}

.dashboard-ai-drawer-center-link:hover {
  color: rgb(var(--accent-rgb));
  background: transparent;
  transform: none;
}

.dashboard-ai-drawer-messages.ai-assistant-messages {
  min-height: 0;
  padding: 10px 2px 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-ai-drawer-messages .ai-assistant-msg {
  max-width: 86%;
  padding: 12px 14px;
  border-color: rgba(255, 255, 255, 0.065);
  border-radius: 14px;
  font-size: 12.5px;
  line-height: 1.55;
  box-shadow: none;
}

.dashboard-ai-drawer-messages .ai-assistant-msg.is-assistant {
  background: rgba(255, 255, 255, 0.035);
}

.dashboard-ai-drawer-messages .ai-assistant-msg.is-user {
  border-color: rgba(var(--accent-rgb), 0.16);
  background: rgba(var(--accent-rgb), 0.07);
}

.sentra-assistant-avatar {
  width: 24px;
  height: 24px;
  border-color: rgba(var(--accent-rgb), 0.16);
  border-radius: 8px;
  box-shadow: none;
}

.dashboard-ai-drawer-form.ai-assistant-form {
  gap: 7px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.2);
}

.dashboard-ai-drawer-form textarea {
  min-height: 44px;
  max-height: 130px;
  padding: 11px 12px;
  font-size: 12px;
}

.dashboard-ai-drawer-form .primary-button {
  min-width: 104px;
  min-height: 44px;
  border-radius: 11px;
  box-shadow: none;
}

.ai-workspace-hero {
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: clamp(28px, 4vw, 58px);
  align-items: center;
  min-height: 270px;
  padding: clamp(30px, 4vw, 50px);
  border-color: rgba(var(--accent-rgb), 0.13);
  border-radius: 24px;
  background:
    linear-gradient(110deg, rgba(var(--accent-rgb), 0.075), transparent 48%),
    color-mix(in srgb, var(--card-bg, #0d1119) 96%, #000);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.035),
    0 22px 60px rgba(0, 0, 0, 0.16);
}

.ai-workspace-hero::before {
  opacity: 0.1;
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, #000, transparent 62%);
}

.ai-workspace-hero h2 {
  max-width: 680px;
  font-size: clamp(38px, 4.4vw, 62px);
  font-weight: 730;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.ai-workspace-lead {
  max-width: 630px;
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.6;
}

.sentra-ai-brand-line {
  margin-bottom: 17px;
}

.sentra-ai-mark--hero {
  width: 38px;
  height: 38px;
  border-color: rgba(var(--accent-rgb), 0.18);
  border-radius: 12px;
  box-shadow: none;
}

.ai-workspace-kicker {
  color: color-mix(in srgb, rgb(var(--accent-rgb)) 74%, var(--text-secondary));
  font-size: 9px;
  letter-spacing: 0.18em;
}

.ai-workspace-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-self: stretch;
  align-content: center;
  justify-self: stretch;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: none;
}

.ai-workspace-status > .ai-command-eyebrow,
.ai-workspace-status > p,
.ai-workspace-status > .primary-button {
  grid-column: 1 / -1;
}

.ai-workspace-status > .ai-command-eyebrow {
  color: var(--text-secondary);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.ai-workspace-status .pill {
  min-height: 30px;
  justify-self: stretch;
  justify-content: center;
  border-color: rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
  font-size: 8px;
}

.ai-workspace-status > p {
  margin: 5px 0 0;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.45;
}

.ai-workspace-status > .primary-button {
  min-height: 42px;
  margin-top: 3px;
  border-radius: 11px;
  box-shadow: none;
}

body[data-theme="white"] .dashboard-ai-drawer,
body[data-theme="white"] .ai-workspace-hero {
  background:
    linear-gradient(120deg, rgba(var(--accent-rgb), 0.06), transparent 50%),
    #f8fafc;
}

body[data-theme="white"] .dashboard-ai-drawer-messages .ai-assistant-msg.is-assistant,
body[data-theme="white"] .dashboard-ai-drawer-form,
body[data-theme="white"] .ai-workspace-status {
  border-color: rgba(32, 43, 62, 0.09);
  background: rgba(32, 43, 62, 0.035);
}

@media (max-width: 820px) {
  .ai-workspace-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 26px 22px;
  }

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

@media (max-width: 560px) {
  .dashboard-ai-drawer {
    width: 100vw;
    padding: 16px 14px;
    border-right: 0;
  }

  .dashboard-ai-drawer-intro h2 {
    font-size: 25px;
  }

  .dashboard-ai-drawer-intro-row span {
    display: none;
  }

  .dashboard-ai-drawer-prompts {
    display: flex;
  }

  .dashboard-ai-drawer-prompts button {
    flex: 0 0 145px;
  }

  .dashboard-ai-drawer-form .primary-button {
    min-width: 88px;
  }
}

/* SENTRA chat ? assistant rail in the Sentrage surface language */
.dashboard-ai-drawer {
  gap: 12px;
  width: 100%;
  max-width: none;
  padding: 18px 18px 16px;
  border-right: 0;
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.05), transparent 210px),
    color-mix(in srgb, var(--bg-secondary, #0b1120) 88%, #04060b);
  box-shadow: none;
}

.dashboard-ai-drawer::before {
  content: none;
}

.dashboard-ai-drawer-head {
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-ai-drawer-brand {
  gap: 10px;
}

.dashboard-sentra-brand-mark {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 11px;
}

.dashboard-ai-drawer-brand > div span {
  color: var(--text-soft, var(--text-secondary));
  font-size: 8px;
  letter-spacing: 0.2em;
}

.dashboard-ai-drawer-brand > div strong {
  font-size: 13px;
  letter-spacing: 0.14em;
}

.dashboard-ai-drawer-close {
  width: 34px;
  height: 34px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  font-size: 20px;
}

.dashboard-ai-drawer-intro {
  padding: 2px 0 0;
}

.dashboard-ai-drawer-intro > p {
  margin: 0 0 7px;
  font-size: 8px;
  letter-spacing: 0.18em;
}

.dashboard-ai-drawer-intro h2 {
  max-width: 32ch;
  color: var(--text-primary);
  font-size: 19px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.dashboard-ai-drawer-intro-row {
  gap: 12px;
  margin-top: 9px;
}

.dashboard-ai-drawer-intro-row p {
  max-width: 100%;
  font-size: 11.5px;
  line-height: 1.5;
}

.dashboard-ai-drawer-intro-row span {
  padding: 5px 8px;
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-soft, var(--text-secondary));
  background: rgba(255, 255, 255, 0.022);
  font-size: 7px;
  letter-spacing: 0.14em;
}

.dashboard-ai-drawer-prompts {
  gap: 6px;
}

.dashboard-ai-drawer-prompts button {
  min-height: 38px;
  padding: 8px 9px;
  border-color: rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.022);
  font-size: 10px;
  font-weight: 600;
}

.dashboard-ai-drawer-messages .ai-assistant-msg {
  max-width: 92%;
  padding: 11px 13px;
  border-radius: 13px;
  font-size: 12px;
}

.dashboard-ai-drawer-form.ai-assistant-form {
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.dashboard-ai-drawer-form .primary-button {
  min-width: 96px;
  min-height: 42px;
  border-radius: 10px;
  font-size: 12px;
}

.dashboard-ai-orb {
  width: 58px;
  height: 58px;
}

.dashboard-ai-orb-core {
  width: 54px;
  height: 54px;
}

.dashboard-sentra-monogram {
  width: 30px;
  height: 30px;
}

/* SENTRAGE REWIND ? terminal aligned to the product surface language */
.replay-workspace.page {
  --replay-bg: color-mix(in srgb, var(--bg-secondary, #0b1120) 56%, #04060b);
  --replay-panel: color-mix(in srgb, var(--bg-secondary, #0b1120) 74%, #04060b);
  --replay-panel-raised: color-mix(in srgb, var(--bg-secondary, #0b1120) 92%, #04060b);
  --replay-hover: rgba(var(--accent-rgb), 0.08);
  --replay-border: rgba(255, 255, 255, 0.07);
  --replay-border-soft: rgba(255, 255, 255, 0.04);
  --replay-text: var(--text-primary);
  --replay-muted: var(--text-secondary);
  --replay-blue: var(--accent-primary);
}

body.replay-focus-mode .replay-workspace.page,
body.replay-focus-mode .replay-workspace .replay-shell,
.replay-workspace .replay-terminal,
.replay-market-theater,
.replay-workspace .replay-review-grid {
  background: var(--replay-bg);
}

.replay-workspace .replay-chart-shell {
  background: var(--replay-chart-bg);
}

.replay-workspace .replay-tv-topbar {
  border-bottom: 1px solid var(--replay-border);
  background: var(--replay-panel);
  backdrop-filter: none;
}

.replay-chart-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid var(--replay-border, rgba(255, 255, 255, 0.08));
  background: rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

.replay-chart-mode-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--replay-muted, #8c96aa);
  font: 650 11px/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.replay-chart-mode-toggle button.is-active {
  background: rgba(var(--accent-rgb, 124, 92, 255), 0.18);
  color: var(--replay-text, #e8ecf5);
}

.replay-live-frame {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: var(--replay-chart-bg, #090b11);
}

.replay-live-frame[hidden] {
  display: none !important;
}

.replay-live-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: transparent;
}

.replay-workspace.is-live-mode .replay-transport-bar,
.replay-workspace.is-live-mode .replay-drawing-toolbar,
.replay-workspace.is-live-mode .replay-drawing-layer,
.replay-workspace.is-live-mode .replay-chart-watermark,
.replay-workspace.is-live-mode .replay-tv-attribution,
.replay-workspace.is-live-mode #replayEmptyState,
.replay-workspace.is-live-mode #replayLoading {
  display: none !important;
}

.replay-workspace.is-live-mode #replayTvChart,
.replay-workspace.is-live-mode #replayChart {
  visibility: hidden;
}

.replay-workspace.is-live-mode .replay-live-frame {
  display: block !important;
}

.replay-workspace.is-live-mode #replayIndicatorsBtn {
  opacity: 0.45;
  pointer-events: none;
}

.replay-workspace .replay-transport-bar,
.replay-workspace .replay-dock-tabs {
  border-top: 1px solid var(--replay-border);
  background: var(--replay-panel);
}

.replay-workspace .replay-drawing-toolbar {
  width: 46px;
  padding: 8px 0;
  gap: 2px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: #12161f;
}

.replay-workspace .replay-drawing-toolbar button.is-active {
  color: #fff;
  background: rgba(var(--accent-rgb), 0.22);
  border-color: rgba(var(--accent-rgb), 0.55);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.25);
}

.replay-workspace .replay-prop-hud {
  border: 1px solid var(--replay-border);
  background: color-mix(in srgb, var(--replay-panel-raised) 92%, transparent);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.34);
}

.replay-workspace .replay-order-panel {
  border-left: 1px solid var(--replay-border);
  background: var(--replay-panel-raised);
  box-shadow: -26px 0 70px rgba(0, 0, 0, 0.48);
}

.replay-scroll-below {
  border: 1px solid var(--replay-border);
  color: var(--text-secondary);
  background: var(--replay-panel-raised);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

.replay-tour-highlight,
.replay-tour-highlight.is-chart {
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 0 0 9999px rgba(2, 4, 9, 0.72),
    0 0 0 3px rgba(var(--accent-rgb), 0.13);
}

.replay-ai-fab {
  width: 52px;
  height: 52px;
  padding: 4px;
  border: 1px solid var(--replay-border);
  border-radius: 15px !important;
  background: var(--replay-panel-raised);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
}

.replay-ai-fab:hover,
.replay-ai-fab:focus-visible {
  width: 164px;
  border-color: rgba(var(--accent-rgb), 0.32);
  transform: none;
}

.replay-ai-fab-glow {
  display: none;
}

.replay-ai-fab-mark {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 11px;
  background: rgba(var(--accent-rgb), 0.09);
}

.replay-ai-fab-label b {
  color: var(--text-primary);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.replay-ai-fab-label small {
  color: var(--text-secondary);
  font-size: 8px;
}

.replay-ai-panel {
  border-left: 1px solid var(--replay-border);
  color: var(--replay-text);
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.055), transparent 190px),
    var(--replay-panel-raised);
  box-shadow: -25px 0 70px rgba(0, 0, 0, 0.46);
}

.replay-ai-logo {
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 11px;
  background: rgba(var(--accent-rgb), 0.09);
  box-shadow: none;
}

.replay-ai-welcome-orb {
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 16px;
  background: rgba(var(--accent-rgb), 0.07);
  box-shadow: none;
  animation: none;
}

/* Chart canvas ? Sentrage viewfinder instead of a default chart pane.
   The chart engine parses these two tokens directly, so they stay plain colors. */
.replay-workspace.page {
  --replay-chart-bg: #080a10;
  --replay-chart-bg-top: #0c0f17;
}

.replay-workspace .replay-chart-shell {
  background:
    radial-gradient(130% 90% at 50% -10%, rgba(var(--accent-rgb), 0.055), transparent 62%),
    var(--replay-chart-bg);
}

.replay-workspace .replay-chart-shell::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 3;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 5px;
  pointer-events: none;
  opacity: 0.45;
  -webkit-mask:
    linear-gradient(#000, #000) left top / 22px 22px no-repeat,
    linear-gradient(#000, #000) right top / 22px 22px no-repeat,
    linear-gradient(#000, #000) left bottom / 22px 22px no-repeat,
    linear-gradient(#000, #000) right bottom / 22px 22px no-repeat;
  mask:
    linear-gradient(#000, #000) left top / 22px 22px no-repeat,
    linear-gradient(#000, #000) right top / 22px 22px no-repeat,
    linear-gradient(#000, #000) left bottom / 22px 22px no-repeat,
    linear-gradient(#000, #000) right bottom / 22px 22px no-repeat;
}

.replay-workspace .replay-chart-shell::after {
  content: none;
  display: none;
  box-shadow: none;
}

/* Global canvas { max-width:100% } must not shrink the LWC plot */
.replay-tv-chart,
.replay-tv-chart table,
.replay-tv-chart canvas,
.replay-chart-shell > .replay-tv-chart {
  max-width: none !important;
  width: 100% !important;
  height: 100%;
}

.replay-tv-chart canvas {
  display: block;
}

.replay-workspace .replay-chart-watermark {
  gap: 12px;
  justify-items: center;
  opacity: 1;
  color: rgba(var(--accent-rgb), 0.045);
}

.replay-workspace .replay-chart-watermark::before {
  content: "";
  display: block;
  width: clamp(64px, 6vw, 104px);
  aspect-ratio: 1;
  background: currentColor;
  -webkit-mask: url("assets/sentra-mark.svg") center / contain no-repeat;
  mask: url("assets/sentra-mark.svg") center / contain no-repeat;
}

.replay-workspace .replay-chart-watermark strong {
  color: rgba(255, 255, 255, 0.055);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.52em;
  text-indent: 0.52em;
}

.replay-workspace .replay-chart-watermark span {
  color: rgba(255, 255, 255, 0.04);
  font-size: 9px;
  letter-spacing: 0.24em;
}

.replay-workspace .replay-chart-watermark small {
  color: rgba(var(--accent-rgb), 0.1);
  font: 650 8px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
  text-align: center;
}

.replay-tv-attribution {
  bottom: 10px;
  left: 12px;
  padding: 2px 5px;
  border: 0;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.12);
  background: transparent;
  font-size: 7px;
  opacity: 0.35;
  pointer-events: none;
}

.replay-workspace .replay-market-line {
  border-bottom: 1px solid var(--replay-border);
  background: var(--replay-panel);
}

.replay-workspace .replay-terminal-head {
  border-bottom: 1px solid var(--replay-border);
  background: var(--replay-panel);
}

.replay-workspace .replay-tv-brand-mark {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 10px;
  background: rgba(var(--accent-rgb), 0.1);
  box-shadow: none;
}

.replay-workspace .replay-tv-brand {
  padding-inline: 16px;
  font-size: 11px;
  letter-spacing: 0.18em;
}

.replay-workspace .replay-drawing-toolbar button {
  flex: 0 0 38px;
  flex-basis: 38px;
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #d5dde8;
  background: transparent;
}

.replay-workspace .replay-drawing-toolbar button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.replay-workspace .replay-drawing-toolbar button b {
  font-size: 11px;
  font-weight: 700;
}

.replay-workspace .replay-drawing-toolbar svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.65;
}

.replay-workspace .replay-drawing-toolbar > span:not(.replay-tool-spacer) {
  width: 28px;
  margin: 6px 0;
  background: rgba(255, 255, 255, 0.08);
}

.replay-workspace .replay-drawing-toolbar .replay-tool-long {
  color: #3dd68c;
}

.replay-workspace .replay-drawing-toolbar .replay-tool-short {
  color: #f07178;
}

.replay-scroll-below {
  top: calc(100dvh - 54px);
  min-height: 34px;
  font-size: 10px;
}

.replay-workspace .replay-briefing {
  background: var(--replay-bg);
  backdrop-filter: none;
}

.replay-workspace .replay-briefing .replay-hero-copy h1 {
  font-size: clamp(56px, 7vw, 104px);
  line-height: 0.86;
  letter-spacing: -0.055em;
}

.replay-workspace .replay-briefing .replay-setup-card {
  border: 1px solid var(--replay-border);
  border-radius: 20px;
  background: var(--replay-panel-raised);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

body[data-theme="white"] .replay-workspace.page {
  --replay-bg: #f3f5fa;
  --replay-chart-bg: #ffffff;
  --replay-chart-bg-top: #ffffff;
  --replay-panel: #ffffff;
  --replay-panel-raised: #ffffff;
  --replay-border: rgba(32, 43, 62, 0.12);
  --replay-border-soft: rgba(32, 43, 62, 0.07);
}

body[data-theme="white"] .replay-workspace .replay-chart-shell::after {
  content: none;
  display: none;
  box-shadow: none;
}

body[data-theme="white"] .replay-workspace .replay-drawing-toolbar {
  background: #e8ecf3;
  border-right-color: rgba(32, 43, 62, 0.12);
}

body[data-theme="white"] .replay-workspace .replay-drawing-toolbar button {
  color: #2a3448;
}

body[data-theme="white"] .replay-workspace .replay-chart-watermark strong,
body[data-theme="white"] .replay-workspace .replay-chart-watermark span,
body[data-theme="white"] .replay-workspace .replay-chart-watermark small {
  color: rgba(32, 43, 62, 0.08);
}

/* Saved strategies and ideas ? presentation mode */
.workspace-record-view {
  display: grid;
  gap: 18px;
  min-height: 440px;
  color: var(--text-primary);
}

.workspace-record-view > * {
  opacity: 0;
  transform: translateY(22px);
  animation: workspace-record-reveal 0.72s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: calc(var(--reveal-index, 0) * 90ms);
}

.workspace-record-hero {
  position: relative;
  display: block;
  padding: 10px 4px 30px;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.18);
}

.workspace-record-identity {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.workspace-record-identity .kicker,
.workspace-record-section .kicker {
  margin: 0;
  color: var(--accent-primary);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.workspace-record-identity h3 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(48px, 6.2vw, 88px);
  font-weight: 790;
  line-height: 0.9;
  letter-spacing: -0.065em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.workspace-record-chips,
.workspace-record-actions,
.workspace-record-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.workspace-record-chips span,
.workspace-record-tags span {
  padding: 7px 11px;
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  border-radius: 999px;
  color: var(--text-secondary);
  background: rgba(var(--accent-rgb), 0.06);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.03em;
}

.workspace-record-actions {
  position: absolute;
  top: 8px;
  right: 4px;
  flex: 0 0 auto;
  justify-content: flex-end;
}

.workspace-record-actions .ghost-button {
  min-height: 38px;
}

.workspace-record-delete {
  color: #f87171;
}

.workspace-record-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(68px, 0.16fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 42px);
  min-width: 0;
  padding: clamp(22px, 3vw, 38px);
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 54%),
    rgba(4, 6, 13, 0.36);
}

.workspace-record-section::after {
  content: "";
  position: absolute;
  top: -90px;
  right: -80px;
  width: 220px;
  aspect-ratio: 1;
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.workspace-record-section > div {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 17px;
  min-width: 0;
}

.workspace-record-index {
  position: relative;
  z-index: 1;
  color: rgba(var(--accent-rgb), 0.56);
  font-size: clamp(46px, 5vw, 72px);
  font-weight: 780;
  line-height: 0.8;
  letter-spacing: -0.07em;
}

.workspace-record-copy {
  display: grid;
  gap: 14px;
  max-width: 900px;
}

.workspace-record-copy p {
  margin: 0;
  color: var(--text-secondary);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.72;
}

.workspace-record-section--statement .workspace-record-copy p:first-child {
  color: var(--text-primary);
  font-size: clamp(22px, 2.3vw, 34px);
  font-weight: 650;
  line-height: 1.28;
  letter-spacing: -0.035em;
}

.workspace-record-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.workspace-record-split .workspace-record-section {
  grid-template-columns: 1fr;
  align-content: start;
  min-height: 290px;
}

.workspace-record-split .workspace-record-index {
  font-size: 48px;
}

.workspace-record-empty {
  margin: 0;
  color: var(--text-tertiary, var(--text-secondary));
  font-size: 14px;
  line-height: 1.6;
}

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

.workspace-record-checklist li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.1);
}

.workspace-record-checklist li:last-child {
  border-bottom: 0;
}

.workspace-record-checklist li > span {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  border-radius: 5px;
  background: rgba(var(--accent-rgb), 0.08);
}

.workspace-record-checklist strong {
  font-size: 15px;
  font-weight: 640;
  line-height: 1.45;
}

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

.workspace-record-facts article {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 15px;
  border: 1px solid rgba(var(--accent-rgb), 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.workspace-record-facts span {
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.workspace-record-facts strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 680;
  line-height: 1.35;
}

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

.workspace-record-links button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 14px;
  color: var(--text-primary);
  background: rgba(var(--accent-rgb), 0.055);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.workspace-record-links button:hover {
  border-color: rgba(var(--accent-rgb), 0.34);
  background: rgba(var(--accent-rgb), 0.1);
  transform: translateY(-2px);
}

.workspace-record-links button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 650;
}

.workspace-record-links button strong {
  color: var(--accent-primary);
  font-size: 18px;
}

@keyframes workspace-record-reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body[data-theme="white"] .workspace-record-section {
  border-color: rgba(15, 23, 42, 0.09);
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.045), transparent 54%),
    rgba(248, 250, 252, 0.78);
}

body[data-theme="white"] .workspace-record-facts article {
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

@media (max-width: 960px) {
  .workspace-record-hero {
    display: grid;
    gap: 20px;
  }

  .workspace-record-actions {
    position: static;
    justify-content: flex-start;
  }

  .workspace-record-split,
  .workspace-record-facts {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .workspace-record-view {
    gap: 12px;
  }

  .workspace-record-identity h3 {
    font-size: clamp(42px, 14vw, 64px);
  }

  .workspace-record-section {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 20px 16px;
    border-radius: 18px;
  }

  .workspace-record-index {
    font-size: 42px;
  }

  .workspace-record-links {
    grid-template-columns: minmax(0, 1fr);
  }
}

body.reduced-motion .workspace-record-view > * {
  opacity: 1;
  transform: none;
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .workspace-record-view > * {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* Language controls use real SVG flags so Windows never falls back to GB/RU text glyphs. */
.ui-select-trigger--language,
.ui-select-menu--language {
  min-width: 176px;
}

.ui-select-language-content {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ui-select-language-content img,
.welcome-lang-current-flag,
.welcome-lang-option .welcome-lang-flag {
  display: block;
  width: 27px;
  height: 18px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.welcome-lang-current-flag {
  width: 24px;
  height: 16px;
}

.welcome-lang-option .welcome-lang-flag {
  padding: 0;
  background: transparent;
}

.settings-language-panel {
  display: grid;
  gap: 10px;
  align-content: start;
  justify-items: start;
  padding: 20px 22px;
}

.settings-language-panel h3 {
  margin: 0;
}

.settings-language-hint {
  margin: 0;
  max-width: 42rem;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.settings-language-control {
  width: min(280px, 100%);
  min-width: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  align-items: stretch;
}

.settings-language-control > span {
  line-height: 1.2;
}

.settings-language-control .ui-select-wrap,
.settings-language-control .ui-select-trigger,
.settings-language-control .ghost-select {
  width: 100%;
  min-width: 0;
}

.settings-language-control .ui-select-trigger--language {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.settings-language-control .ui-select-language-content {
  align-items: center;
  line-height: 1;
}

.settings-language-control .ui-select-language-content img {
  align-self: center;
}

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

.ideas-rail-new {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 11px;
}

/* Risk Calculator */
.risk-calculator-section {
  gap: 0;
}

.workspace-editor-hero--risk {
  overflow: hidden;
}

.workspace-editor-symbol--risk {
  width: clamp(112px, 15vw, 188px);
}

.risk-calculator-badge {
  position: relative;
  z-index: 3;
  align-self: flex-end;
  padding: 10px 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 999px;
  color: var(--accent-primary);
  background: rgba(var(--accent-rgb), 0.08);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.risk-calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 20px;
  align-items: stretch;
}

.risk-calculator-inputs,
.risk-calculator-results {
  min-width: 0;
  margin: 0;
  border-color: rgba(var(--accent-rgb), 0.13);
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.05), transparent 50%),
    var(--card-bg);
}

.risk-calculator-inputs {
  display: grid;
  gap: 24px;
}

.risk-calculator-panel-head,
.risk-calculator-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.risk-calculator-panel-head h3 {
  margin: 5px 0 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.035em;
}

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

.risk-calculator-grid label {
  display: grid;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.risk-calculator-grid input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 13px;
  outline: none;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.035);
  font: inherit;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.risk-calculator-grid input:focus {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.055);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.risk-calculator-grid label small {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.45;
}

.risk-calculator-error {
  min-height: 18px;
  margin: -8px 0 0;
  color: var(--negative);
  font-size: 12px;
}

.risk-calculator-results {
  position: relative;
  display: grid;
  gap: 22px;
  align-content: start;
  overflow: hidden;
}

.risk-calculator-results::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -110px;
  bottom: -130px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.12);
  filter: blur(40px);
  pointer-events: none;
}

.risk-calculator-primary-result {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  padding: 24px 0 20px;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.12);
}

.risk-calculator-primary-result span,
.risk-calculator-result-grid span {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.risk-calculator-primary-result strong {
  font-size: clamp(52px, 7vw, 86px);
  font-weight: 680;
  letter-spacing: -0.075em;
  line-height: 0.95;
}

.risk-calculator-primary-result small {
  color: var(--accent-primary);
  font-size: 13px;
  font-weight: 700;
}

.risk-calculator-result-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.risk-calculator-result-grid article {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(var(--accent-rgb), 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.risk-calculator-result-grid strong {
  overflow-wrap: anywhere;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.risk-calculator-note {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.55;
}

body[data-theme="white"] .risk-calculator-inputs,
body[data-theme="white"] .risk-calculator-results {
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.045), transparent 50%),
    rgba(255, 255, 255, 0.92);
}

body[data-theme="white"] .risk-calculator-grid input,
body[data-theme="white"] .risk-calculator-result-grid article {
  border-color: rgba(15, 23, 42, 0.1);
  background: rgba(248, 250, 252, 0.84);
}

@media (max-width: 960px) {
  .risk-calculator-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .strategy-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 78vw);
    gap: 10px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
  }

  .strategy-list-item {
    scroll-snap-align: start;
  }
}

@media (max-width: 720px) {
  .settings-language-panel,
  .risk-calculator-panel-head {
    display: grid;
  }

  .settings-language-control {
    width: 100%;
    min-width: 0;
  }

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

  .risk-calculator-badge {
    align-self: flex-start;
  }
}

@media (max-width: 520px) {
  .risk-calculator-result-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .risk-calculator-primary-result strong {
    font-size: 56px;
  }
}

/* Replay entry v2 ? a dedicated coach-selection screen, never an overlay on the chart */
.replay-workspace.is-casting-open {
  min-height: 100dvh;
  padding: 0 !important;
  overflow: hidden;
}

.replay-workspace.is-casting-open > .replay-shell,
.replay-workspace.is-casting-open > .replay-ambient,
.replay-workspace.is-casting-open > .replay-scroll-below,
.replay-workspace.is-casting-open > .replay-below-fold {
  display: none !important;
}

.replay-workspace.is-casting-open .replay-entry-splash {
  display: none !important;
}

.replay-casting {
  position: fixed;
  inset: 0;
  z-index: 1360;
  display: block;
  padding: 0;
  overflow: auto;
  color: #f5f7fb;
  background:
    radial-gradient(circle at 50% -8%, rgba(var(--accent-rgb), 0.2), transparent 32%),
    radial-gradient(circle at 4% 52%, rgba(58, 92, 170, 0.12), transparent 27%),
    radial-gradient(circle at 96% 66%, rgba(121, 76, 210, 0.12), transparent 30%),
    #06080d;
}

.replay-casting-veil {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 82%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 82%);
  backdrop-filter: none;
}

.replay-casting-veil::before,
.replay-casting-veil::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 34vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.35), transparent);
}

.replay-casting-veil::before {
  left: -9vw;
  transform: rotate(66deg);
}

.replay-casting-veil::after {
  right: -9vw;
  transform: rotate(-66deg);
}

.replay-casting-noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.19;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.13'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.replay-casting-stage {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto auto minmax(300px, 1fr) auto;
  gap: clamp(22px, 3.2vh, 40px);
  width: min(1540px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 84px) clamp(24px, 4vh, 48px);
}

.replay-casting-brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.replay-casting-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.replay-casting-brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(var(--accent-rgb), 0.38);
  border-radius: 11px;
  color: rgb(var(--accent-rgb));
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-rgb), 0.04)),
    rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06), 0 0 20px rgba(var(--accent-rgb), 0.1);
}

.replay-casting-brand-mark::before,
.replay-casting-brand-mark::after {
  content: none !important;
  display: none !important;
}

.replay-casting-brand-mark svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.replay-casting-brand-mark svg circle,
.replay-casting-brand-mark svg .replay-lab-play {
  fill: currentColor;
  stroke: none;
}

.replay-casting-brand span,
.replay-casting-engine span {
  display: grid;
  gap: 3px;
}

.replay-casting-brand small,
.replay-casting-engine small {
  color: #717b91;
  font: 700 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.22em;
}

.replay-casting-brand strong {
  font: 780 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.13em;
}

.replay-casting-engine {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
}

.replay-casting-engine i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #37e5a7;
  box-shadow: 0 0 0 5px rgba(55, 229, 167, 0.08), 0 0 18px rgba(55, 229, 167, 0.5);
  animation: replay-engine-pulse 2.2s ease-in-out infinite;
}

.replay-casting-engine strong {
  color: #aab2c3;
  font: 720 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
}

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

.replay-casting-head {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 0;
  text-align: center;
  animation: replay-landing-fade 0.55s ease both;
}

.replay-casting-step {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 5px;
  color: #717b91;
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.16em;
}

.replay-casting-step span {
  color: rgb(var(--accent-rgb));
}

.replay-casting-step i {
  width: 42px;
  height: 1px;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.8), transparent);
}

.replay-casting-kicker {
  color: rgb(var(--accent-rgb));
  font-size: 10px;
  letter-spacing: 0.32em;
}

.replay-casting-head h2 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(34px, 5vw, 68px);
  font-weight: 730;
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-wrap: balance;
}

.replay-casting-head p {
  max-width: 62ch;
  margin: 4px 0 0;
  color: #8992a6;
  font-size: clamp(13px, 1.35vw, 16px);
  line-height: 1.55;
}

.replay-casting-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 18px);
  width: 100%;
  align-self: center;
}

.replay-casting-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  min-height: clamp(300px, 36vh, 380px);
  padding: clamp(20px, 2.1vw, 30px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 4px;
  color: #f5f7fb;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.045), transparent 55%),
    rgba(11, 14, 22, 0.86);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.22);
  text-align: left;
  isolation: isolate;
  animation: replay-card-arrive 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.replay-casting-card:nth-child(2) { animation-delay: 0.07s; }
.replay-casting-card:nth-child(3) { animation-delay: 0.14s; }
.replay-casting-card:nth-child(4) { animation-delay: 0.21s; }

@keyframes replay-card-arrive {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes replay-landing-fade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.replay-casting-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 28%, rgba(var(--accent-rgb), 0.18), transparent 34%),
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.06), transparent 64%);
  transition: opacity 0.25s ease;
}

.replay-casting-card::after {
  content: "";
  position: absolute;
  right: -60%;
  bottom: -1px;
  left: -60%;
  height: 1px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgb(var(--accent-rgb)), transparent);
  transition: opacity 0.25s ease;
}

.replay-casting-card:hover,
.replay-casting-card:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.36);
  outline: none;
  transform: translateY(-5px);
}

.replay-casting-card.is-active {
  border-color: rgba(132, 102, 255, 0.82);
  background:
    linear-gradient(155deg, rgba(119, 85, 238, 0.14), transparent 58%),
    rgba(11, 14, 22, 0.96);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(132, 102, 255, 0.16);
}

.replay-casting-card.is-active::before,
.replay-casting-card.is-active::after {
  opacity: 1;
}

.replay-casting-index {
  top: 16px;
  right: 16px;
  width: auto;
  height: auto;
  border: 0;
  color: #616b80;
  background: transparent;
  font-size: 9px;
  letter-spacing: 0.16em;
}

.replay-casting-card.is-active .replay-casting-index {
  color: rgb(var(--accent-rgb));
  background: transparent;
}

.replay-agent-orb {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(78px, 7vw, 104px);
  height: clamp(78px, 7vw, 104px);
  margin: 3px 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.16), transparent 24%),
    radial-gradient(circle, rgba(var(--accent-rgb), 0.15), transparent 66%),
    #0b0f18;
  box-shadow: inset 0 0 34px rgba(var(--accent-rgb), 0.08), 0 0 0 8px rgba(255, 255, 255, 0.012);
}

.replay-agent-orb::before,
.replay-agent-orb::after,
.replay-agent-orb i {
  content: "";
  position: absolute;
  border: 1px solid rgba(var(--accent-rgb), 0.32);
  border-radius: 50%;
}

.replay-agent-orb::before {
  inset: 9px;
  border-style: dashed;
  animation: replay-orb-spin 18s linear infinite;
}

.replay-agent-orb::after {
  inset: 19px;
  border-right-color: transparent;
  border-left-color: transparent;
  transform: rotate(28deg);
}

.replay-agent-orb i {
  inset: -6px;
  border-color: transparent;
  border-top-color: rgba(var(--accent-rgb), 0.65);
  transform: rotate(-35deg);
}

.replay-agent-orb b {
  color: #e9edf7;
  font: 500 clamp(22px, 2.2vw, 30px)/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-shadow: 0 0 18px rgba(var(--accent-rgb), 0.5);
}

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

.replay-casting-card[data-replay-persona="risk"] .replay-agent-orb {
  filter: hue-rotate(34deg);
}

.replay-casting-card[data-replay-persona="execution"] .replay-agent-orb {
  filter: hue-rotate(-32deg);
}

.replay-casting-card[data-replay-persona="debrief"] .replay-agent-orb {
  filter: hue-rotate(92deg);
}

.replay-casting-role {
  color: rgb(var(--accent-rgb));
  font-size: 9px;
  letter-spacing: 0.2em;
}

.replay-casting-card > strong {
  font-size: clamp(19px, 1.7vw, 25px);
  font-weight: 720;
  letter-spacing: -0.035em;
}

.replay-casting-card > small {
  min-height: 3em;
  color: #828ca0;
  font-size: 12px;
  line-height: 1.5;
}

.replay-casting-tags {
  margin-top: auto;
  color: #687287;
  font: 680 8px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.replay-casting-state {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  color: #777f91;
  font: 750 9px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.replay-casting-state::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.replay-casting-card.is-active .replay-casting-state {
  color: rgb(var(--accent-rgb));
}

.replay-casting-card.is-active .replay-casting-state::before {
  border-color: rgb(var(--accent-rgb));
  background: radial-gradient(circle, rgb(var(--accent-rgb)) 0 34%, transparent 38%);
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.32);
}

.replay-casting-footer {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto;
  align-items: center;
  gap: 16px 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.replay-casting-footer > div:first-child {
  display: grid;
  gap: 5px;
}

.replay-casting-selected-label {
  color: #667086;
  font: 700 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.18em;
}

.replay-casting-footer > div:first-child strong {
  font-size: 16px;
  letter-spacing: -0.02em;
}

.replay-casting-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
}

.replay-casting-actions button {
  min-height: 48px;
  border-radius: 3px;
}

.replay-casting-actions .primary-button {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  min-width: 230px;
  justify-content: space-between;
  border-color: rgba(162, 137, 255, 0.64);
  color: #fff;
  background: linear-gradient(135deg, #6845e8, #8a61f5);
  box-shadow: 0 12px 34px rgba(104, 69, 232, 0.28);
}

.replay-casting-actions .primary-button b {
  font-size: 18px;
}

.replay-casting-hint {
  grid-column: 1 / -1;
  margin: -5px 0 0;
  color: #586176;
  font: 650 8px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
  text-align: right;
}

@media (max-width: 980px) {
  .replay-casting-stage {
    grid-template-rows: auto auto auto auto;
    gap: 24px;
    padding-inline: 24px;
  }

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

  .replay-casting-card {
    min-height: 270px;
  }
}

@media (max-width: 620px) {
  .replay-casting-stage {
    display: block;
    padding: 0 14px 24px;
  }

  .replay-casting-brandbar {
    min-height: 62px;
  }

  .replay-casting-engine span {
    display: none;
  }

  .replay-casting-head {
    margin: 34px 0 24px;
  }

  .replay-casting-head h2 {
    font-size: clamp(34px, 11vw, 46px);
  }

  .replay-casting-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .replay-casting-card {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr) auto;
    grid-template-areas:
      "orb role index"
      "orb name index"
      "orb desc desc"
      "tags tags state";
    gap: 5px 13px;
    min-height: 0;
    padding: 16px;
  }

  .replay-casting-index {
    position: static;
    grid-area: index;
    align-self: start;
  }

  .replay-agent-orb {
    grid-area: orb;
    width: 62px;
    height: 62px;
    margin: 0;
  }

  .replay-casting-role { grid-area: role; align-self: end; }
  .replay-casting-card > strong { grid-area: name; }
  .replay-casting-card > small { grid-area: desc; min-height: 0; }
  .replay-casting-tags { grid-area: tags; margin-top: 10px; }
  .replay-casting-state { grid-area: state; justify-self: end; margin-top: 10px; }

  .replay-casting-footer {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 22px;
  }

  .replay-casting-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .replay-casting-actions .primary-button {
    min-width: 0;
  }

  .replay-casting-hint {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .replay-casting-head,
  .replay-casting-card,
  .replay-casting-engine i,
  .replay-agent-orb::before {
    animation: none !important;
  }
}

/* Replay SENTRA ? the active coach is visible and switchable in the chat */
.replay-ai-personas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 11px 14px 13px;
  border-bottom: 1px solid var(--replay-border, rgba(255, 255, 255, 0.08));
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.025), transparent),
    rgba(255, 255, 255, 0.012);
}

.replay-ai-personas > span {
  grid-column: 1 / -1;
  color: var(--replay-muted, #7b8498);
  font: 720 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.18em;
}

.replay-ai-personas button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 34px;
  padding: 5px 7px;
  border: 1px solid var(--replay-border, rgba(255, 255, 255, 0.08));
  border-radius: 5px;
  color: var(--replay-muted, #7b8498);
  background: rgba(255, 255, 255, 0.018);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.replay-ai-personas button:hover,
.replay-ai-personas button:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.35);
  outline: none;
  color: var(--text-primary, #f5f7fb);
}

.replay-ai-personas button.is-active {
  border-color: rgba(var(--accent-rgb), 0.58);
  color: var(--text-primary, #f5f7fb);
  background: rgba(var(--accent-rgb), 0.09);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.08);
}

.replay-ai-personas button b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 50%;
  color: rgb(var(--accent-rgb));
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(var(--accent-rgb), 0.04);
}

.replay-ai-personas button small {
  overflow: hidden;
  font-size: 9px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Unified SENTRA chat ? one surface for journal and Replay context */
#replayAiFab,
#replayAiBackdrop,
#replayAiPanel {
  display: none !important;
}

.dashboard-ai-orb {
  right: 22px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: auto;
  height: 52px;
  padding: 5px 13px 5px 5px;
  border: 1px solid rgba(139, 109, 255, 0.32);
  border-radius: 16px;
  color: #f7f5ff;
  background:
    linear-gradient(145deg, rgba(116, 79, 238, 0.18), transparent 58%),
    rgba(9, 11, 18, 0.94);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(18px);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-ai-orb:hover,
.dashboard-ai-orb:focus-visible {
  border-color: rgba(157, 130, 255, 0.68);
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 19px 48px rgba(0, 0, 0, 0.48), 0 0 30px rgba(111, 72, 232, 0.16);
}

.dashboard-ai-orb-glow {
  inset: 5px;
  opacity: 0.24;
  border-radius: 13px;
  background: linear-gradient(135deg, #7653ee, #5c8bff);
  filter: blur(13px);
}

.dashboard-ai-orb::before,
.dashboard-ai-orb::after,
.dashboard-ai-orb-core::before,
.dashboard-ai-orb-core::after {
  display: none !important;
}

.dashboard-ai-orb-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(163, 139, 255, 0.34);
  border-radius: 12px;
  color: #a98eff;
  background: linear-gradient(145deg, rgba(125, 84, 246, 0.2), rgba(71, 55, 136, 0.08));
  box-shadow: inset 0 0 18px rgba(119, 80, 239, 0.12);
}

.dashboard-ai-orb-core svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
  filter: drop-shadow(0 0 8px rgba(150, 119, 255, 0.58));
}

.dashboard-ai-orb-copy {
  display: grid;
  gap: 3px;
  text-align: left;
}

.dashboard-ai-orb-copy strong {
  font: 780 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.16em;
}

.dashboard-ai-orb-copy small {
  color: #858da0;
  font-size: 8px;
  font-weight: 650;
}

.dashboard-ai-drawer-shell {
  z-index: 1480;
}

.dashboard-ai-drawer-backdrop {
  background: rgba(2, 4, 8, 0.64);
  backdrop-filter: blur(8px);
}

.dashboard-ai-drawer {
  inset: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: clamp(360px, 36vw, 460px);
  min-width: 0;
  max-width: calc(100vw - 20px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-left: 1px solid rgba(120, 132, 220, 0.16);
  color: #eef1f7;
  background:
    radial-gradient(circle at 84% 10%, rgba(102, 78, 255, 0.18), transparent 30%),
    linear-gradient(180deg, #0b0e16 0%, #080b12 42%, #070910 100%);
  box-shadow: -26px 0 70px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translateX(104%);
}

.dashboard-ai-drawer::before {
  opacity: 0.16;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 52px 52px;
}

.dashboard-ai-drawer-head {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  min-height: 70px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.dashboard-ai-drawer-brand {
  gap: 11px;
}

.dashboard-sentra-brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(153, 124, 255, 0.3);
  border-radius: 12px;
  color: #a98eff;
  background: rgba(118, 78, 237, 0.1);
}

.dashboard-sentra-brand-mark::before,
.dashboard-sentra-brand-mark::after {
  display: none !important;
}

.dashboard-sentra-brand-mark svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(153, 119, 255, 0.52));
}

.dashboard-ai-drawer-brand > div span {
  color: #8170c6;
  font: 720 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.17em;
}

.dashboard-ai-drawer-brand > div strong {
  color: #f5f2ff;
  font-size: 14px;
  letter-spacing: 0.14em;
}

.dashboard-ai-drawer-head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.dashboard-ai-context-badge {
  padding: 6px 8px;
  border: 1px solid rgba(140, 111, 247, 0.22);
  border-radius: 7px;
  color: #a28cf2;
  background: rgba(118, 78, 237, 0.055);
  font: 720 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
}

.dashboard-ai-drawer-close {
  width: 36px;
  height: 36px;
  border-color: rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  color: #8991a2;
  background: rgba(255, 255, 255, 0.025);
  font-size: 20px;
}

.dashboard-ai-drawer-intro {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: 22px 20px 17px;
}

.dashboard-ai-drawer-intro > p:first-child {
  margin: 0 0 8px;
  color: #8065e5;
  font: 730 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.2em;
}

.dashboard-ai-drawer-intro h2 {
  max-width: 430px;
  margin: 0;
  color: #f4f2f9;
  font-size: clamp(25px, 3.2vw, 32px);
  font-weight: 730;
  line-height: 1.08;
  letter-spacing: -0.04em;
  white-space: normal;
  text-shadow: none;
}

.dashboard-ai-drawer-intro > .dashboard-ai-drawer-subtitle {
  max-width: 420px;
  margin: 9px 0 0;
  color: #838c9e;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.5;
}

.dashboard-ai-replay-context {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  margin: 0 20px 14px;
  padding: 12px;
  border: 1px solid rgba(139, 107, 255, 0.18);
  border-radius: 13px;
  background:
    linear-gradient(145deg, rgba(119, 80, 239, 0.07), transparent 55%),
    rgba(255, 255, 255, 0.018);
}

.dashboard-ai-replay-context[hidden],
.dashboard-ai-drawer-center-link[hidden] {
  display: none !important;
}

.dashboard-ai-replay-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dashboard-ai-replay-meta > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #818a9d;
}

.dashboard-ai-replay-meta i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #43dda8;
  box-shadow: 0 0 10px rgba(67, 221, 168, 0.48);
}

.dashboard-ai-replay-meta small {
  font-size: 9px;
}

.dashboard-ai-replay-meta strong {
  overflow: hidden;
  color: #b7bfce;
  font: 690 9px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-ai-coach-switch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.dashboard-ai-coach-switch button {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 48px;
  padding: 6px 4px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 9px;
  color: #778094;
  background: rgba(255, 255, 255, 0.018);
  cursor: pointer;
}

.dashboard-ai-coach-switch button:hover,
.dashboard-ai-coach-switch button:focus-visible {
  border-color: rgba(139, 107, 255, 0.34);
  outline: none;
  color: #c7c2dd;
}

.dashboard-ai-coach-switch button.is-active {
  border-color: rgba(139, 107, 255, 0.62);
  color: #f2efff;
  background: rgba(119, 80, 239, 0.1);
  box-shadow: inset 0 0 0 1px rgba(139, 107, 255, 0.07);
}

.dashboard-ai-coach-switch button b {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: #9174ef;
  font: 700 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.dashboard-ai-coach-switch button span {
  overflow: hidden;
  max-width: 100%;
  font-size: 8px;
  font-weight: 670;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-ai-drawer-prompts {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  gap: 7px;
  padding: 0 20px 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.dashboard-ai-drawer-prompts::-webkit-scrollbar {
  display: none;
}

.dashboard-ai-drawer-prompts button {
  flex: 1 0 130px;
  min-height: 38px;
  padding: 8px 10px;
  border-color: rgba(255, 255, 255, 0.065);
  border-radius: 10px;
  color: #9aa2b2;
  background: rgba(255, 255, 255, 0.018);
  font-size: 9px;
  line-height: 1.3;
}

.dashboard-ai-drawer-prompts button:hover {
  border-color: rgba(139, 107, 255, 0.28);
  color: #e5e1f5;
  background: rgba(119, 80, 239, 0.055);
  transform: none;
}

.dashboard-ai-drawer-chat {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 9px;
  min-height: 220px;
  padding: 0 20px 18px;
}

.dashboard-ai-drawer-status-row {
  min-height: 24px;
}

.dashboard-ai-drawer-status-row .ai-assistant-status {
  color: #747d8e;
  font-size: 9px;
}

.dashboard-ai-drawer-center-link {
  padding: 5px 7px;
  border: 0;
  color: #776b9e;
  background: transparent;
  font-size: 9px;
}

.dashboard-ai-drawer-center-link:hover {
  color: #ab94ff;
  background: transparent;
  transform: none;
}

.dashboard-ai-drawer-messages.ai-assistant-messages {
  min-height: 0;
  padding: 14px 12px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 14px;
  background:
    linear-gradient(150deg, rgba(119, 80, 239, 0.025), transparent 42%),
    rgba(3, 5, 9, 0.2);
}

.dashboard-ai-drawer-messages .ai-assistant-msg {
  max-width: 88%;
  padding: 11px 12px;
  border-radius: 13px;
  color: #c8cfdb;
  font-size: 12px;
  line-height: 1.5;
}

.dashboard-ai-drawer-messages .ai-assistant-msg.is-assistant {
  border-color: rgba(255, 255, 255, 0.055);
  background: rgba(255, 255, 255, 0.026);
}

.dashboard-ai-drawer-messages .ai-assistant-msg.is-user {
  border-color: rgba(139, 107, 255, 0.25);
  color: #f0edff;
  background: linear-gradient(145deg, rgba(119, 80, 239, 0.16), rgba(119, 80, 239, 0.08));
}

.sentra-assistant-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(139, 107, 255, 0.25);
  border-radius: 8px;
  color: #9c82f4;
  background: rgba(119, 80, 239, 0.08);
}

.sentra-assistant-avatar::before,
.sentra-assistant-avatar::after {
  display: none !important;
}

.sentra-assistant-avatar svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.dashboard-ai-drawer-form.ai-assistant-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: end;
  gap: 8px;
  padding: 7px;
  border: 1px solid rgba(139, 107, 255, 0.25);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.dashboard-ai-drawer-form textarea {
  min-height: 42px;
  max-height: 130px;
  padding: 11px 9px 8px;
  border: 0;
  color: #edf0f6;
  background: transparent;
  font-size: 12px;
  line-height: 1.4;
  resize: none;
}

.dashboard-ai-drawer-form textarea:focus {
  outline: none;
}

.dashboard-ai-drawer-form .primary-button {
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid rgba(168, 142, 255, 0.52);
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #6847e8, #865bf4);
  box-shadow: 0 8px 22px rgba(104, 71, 232, 0.28);
}

.dashboard-ai-drawer-form .primary-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-theme="white"] .dashboard-ai-drawer {
  color: #f3f5fa;
  background:
    radial-gradient(circle at 84% 10%, rgba(102, 78, 255, 0.18), transparent 30%),
    linear-gradient(158deg, #05040e 0%, #0a0818 34%, #070b1c 68%, #04060f 100%);
  box-shadow: none;
}

body[data-theme="white"] .dashboard-ai-drawer-intro h2,
body[data-theme="white"] .dashboard-ai-drawer-brand > div strong,
body[data-theme="white"] .dashboard-ai-drawer-form textarea {
  color: #f5f7fb;
}

body[data-theme="white"] .dashboard-ai-drawer-messages.ai-assistant-messages {
  background: rgba(4, 6, 18, 0.74);
}

@media (max-width: 680px) {
  .dashboard-ai-orb {
    right: 12px;
    bottom: 82px;
    width: 48px;
    height: 48px;
    padding: 4px;
    border-radius: 15px;
  }

  .dashboard-ai-orb-core {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .dashboard-ai-orb-copy {
    display: none;
  }

  .dashboard-ai-drawer {
    width: 100vw;
  }

  .dashboard-ai-drawer-intro {
    padding: 18px 14px 13px;
  }

  .dashboard-ai-drawer-intro h2 {
    font-size: 25px;
  }

  .dashboard-ai-replay-context {
    margin-inline: 14px;
  }

  .dashboard-ai-drawer-prompts {
    padding-inline: 14px;
  }

  .dashboard-ai-drawer-chat {
    padding: 0 10px 12px;
  }

  .dashboard-ai-coach-switch button span {
    display: none;
  }

  .dashboard-ai-coach-switch button {
    min-height: 38px;
  }
}

/* Final welcome step must never inherit the two-column hero layout. */
.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2,
body.is-web-guest .welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  place-items: center !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  padding: 0 !important;
  overflow: hidden !important;
  background-color: #09091a !important;
  background-image:
    linear-gradient(180deg, rgba(4, 3, 10, .68), rgba(4, 3, 10, .82)),
    url("assets/welcome-hero.jpg") !important;
  background-position: 72% center !important;
  background-size: max(145vw, 150vh) auto !important;
  background-repeat: no-repeat !important;
}

.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-hero-stage,
body.is-web-guest .welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-hero-stage {
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  place-items: center !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  padding: clamp(12px, 3vw, 32px) !important;
  background: transparent !important;
}

.welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-wizard-card,
body.is-web-guest .welcome-modal.welcome-wizard-modal.welcome-wizard-step-2 .welcome-wizard-card {
  grid-column: 1 !important;
  align-self: center !important;
  justify-self: center !important;
  margin: 0 !important;
  max-height: calc(100dvh - clamp(24px, 6vw, 64px)) !important;
}

/* SENTRA immersive chat ? clean circular launcher + true full-viewport workspace. */
#dashboardAiOrb.dashboard-ai-orb,
.dashboard-ai-orb {
  position: fixed;
  right: 26px;
  bottom: 26px;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  gap: 0;
  isolation: isolate;
}

body.dashboard-ai-drawer-open .dashboard-ai-orb {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}

.dashboard-ai-orb:hover,
.dashboard-ai-orb:focus-visible {
  border-color: transparent;
  outline: none;
  transform: translateY(-3px) scale(1.03);
  box-shadow: none;
}

.dashboard-ai-orb::before,
.dashboard-ai-orb::after {
  display: none !important;
  content: none !important;
}

.dashboard-ai-orb-glow {
  position: absolute;
  inset: -14px;
  z-index: -1;
  border-radius: 50%;
  opacity: .7;
  background: radial-gradient(circle, rgba(92, 78, 255, .68) 0%, rgba(52, 110, 255, .28) 44%, transparent 72%);
  filter: blur(14px);
  animation: sentraLauncherGlow 3.4s ease-in-out infinite;
  pointer-events: none;
}

.dashboard-ai-orb-ring,
.dashboard-ai-orb-ring--outer,
.dashboard-ai-orb-ring--inner,
.dashboard-ai-orb-status {
  display: none !important;
}

.dashboard-ai-orb-core {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(168, 178, 255, .48);
  border-radius: 50%;
  color: #eef2ff;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .3), transparent 28%),
    radial-gradient(circle at 72% 76%, rgba(64, 126, 255, .38), transparent 42%),
    linear-gradient(148deg, #5a4dff 0%, #2d2578 48%, #10183a 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    inset 0 -14px 26px rgba(8, 10, 36, .34),
    0 14px 34px rgba(24, 28, 88, .52),
    0 0 28px rgba(88, 96, 255, .36);
  animation: sentraLauncherPulse 3.4s ease-in-out infinite;
}

.dashboard-ai-orb-core::before,
.dashboard-ai-orb-core::after {
  display: none !important;
  content: none !important;
}

.dashboard-ai-orb-core svg,
.dashboard-ai-orb svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
  filter: drop-shadow(0 0 10px rgba(210, 220, 255, .88));
}

.dashboard-ai-orb-core .sentra-tornado-icon,
.dashboard-sentra-brand-mark .sentra-tornado-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-ai-orb-copy {
  display: none !important;
}

/* Compact chat panel ? defeats legacy fullscreen / left-rail drawer rules. */
#dashboardAiDrawer.dashboard-ai-drawer-shell,
#dashboardAiDrawer.dashboard-ai-drawer-shell--compact {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  z-index: 1480 !important;
  width: 100vw !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
  transform: none !important;
}

#dashboardAiDrawer .dashboard-ai-drawer-backdrop {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0;
  background: rgba(2, 4, 12, .62);
  backdrop-filter: blur(12px);
  transition: opacity .26s ease;
}

#dashboardAiDrawer.dashboard-ai-drawer-shell--compact .dashboard-ai-drawer,
#dashboardAiDrawer.dashboard-ai-drawer-shell .dashboard-ai-drawer,
#dashboardAiDrawer .dashboard-ai-drawer {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  bottom: 10px !important;
  left: auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  width: clamp(360px, 36vw, 460px) !important;
  min-width: 0 !important;
  max-width: calc(100vw - 20px) !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: calc(100dvh - 20px) !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(120, 132, 220, .16) !important;
  border-radius: 22px !important;
  color: #f3f5fa;
  opacity: 0;
  background:
    radial-gradient(circle at 84% 10%, rgba(102, 78, 255, .26), transparent 30%),
    radial-gradient(circle at 46% 44%, rgba(56, 98, 230, .14), transparent 36%),
    radial-gradient(circle at 16% 100%, rgba(36, 72, 220, .4), transparent 44%),
    linear-gradient(158deg, #05040e 0%, #0a0818 34%, #070b1c 68%, #04060f 100%) !important;
  box-shadow: -28px 0 72px rgba(0, 0, 0, .45) !important;
  transform: translateX(104%) !important;
  transition: transform .34s cubic-bezier(.22, 1, .36, 1), opacity .26s ease !important;
  isolation: isolate;
}

#dashboardAiDrawer .dashboard-ai-drawer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .34;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(110, 128, 210, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 128, 210, .03) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(circle at center, #000 0%, transparent 76%);
}

#dashboardAiDrawer .dashboard-ai-drawer::after {
  content: "";
  position: absolute;
  inset: auto 8% -22% 8%;
  z-index: -1;
  height: 48%;
  border-radius: 50%;
  background: rgba(72, 78, 230, .26);
  filter: blur(110px);
  pointer-events: none;
}

#dashboardAiDrawer.dashboard-ai-drawer-shell.is-open .dashboard-ai-drawer-backdrop {
  opacity: 1;
}

#dashboardAiDrawer.dashboard-ai-drawer-shell.is-open .dashboard-ai-drawer,
#dashboardAiDrawer.dashboard-ai-drawer-shell--compact.is-open .dashboard-ai-drawer,
#dashboardAiDrawer.is-open .dashboard-ai-drawer {
  opacity: 1 !important;
  transform: translateX(0) !important;
}

.dashboard-ai-drawer-head {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  flex: 0 0 58px;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 8px 10px 8px 12px;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .045);
  background: linear-gradient(180deg, rgba(0, 0, 0, .34), transparent);
}

.dashboard-ai-drawer-brand.dashboard-ai-drawer-center-link {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 4px;
  border: 0;
  color: #f2efff;
  background: transparent;
  cursor: pointer;
}

.dashboard-ai-drawer-brand.dashboard-ai-drawer-center-link:hover {
  color: #fff;
  background: transparent;
  transform: none;
}

.dashboard-sentra-brand-mark {
  width: 38px;
  height: 38px;
  border-color: rgba(155, 128, 255, .3);
  border-radius: 12px;
  color: #ae94ff;
  background: linear-gradient(145deg, rgba(126, 83, 242, .16), rgba(41, 35, 76, .12));
  box-shadow: 0 0 20px rgba(111, 72, 232, .12);
}

.dashboard-ai-agent-picker {
  display: none !important;
}

.dashboard-ai-agent-picker[hidden] {
  display: none !important;
}

.dashboard-ai-agent-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 220px;
  min-width: 0;
  min-height: 44px;
  padding: 5px 8px 5px 6px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 15px;
  color: #eff2f8;
  background: rgba(255, 255, 255, .035);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .18);
  cursor: pointer;
  backdrop-filter: blur(16px);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.dashboard-ai-agent-toggle:hover,
.dashboard-ai-agent-toggle[aria-expanded="true"] {
  border-color: rgba(104, 137, 255, .48);
  background: rgba(54, 82, 145, .12);
  transform: translateY(-1px);
}

.dashboard-ai-agent-avatar,
.dashboard-ai-agent-menu button b {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(135, 164, 255, .4);
  border-radius: 11px;
  color: #c6d7ff;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .22), transparent 30%),
    linear-gradient(145deg, #3159a9, #152852);
  box-shadow: 0 0 18px rgba(45, 99, 210, .2);
  font: 760 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.dashboard-ai-agent-toggle-copy {
  display: grid;
  flex: 1 1 auto;
  gap: 3px;
  min-width: 0;
  text-align: left;
}

.dashboard-ai-agent-toggle-copy small {
  color: #748094;
  font: 700 7px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.dashboard-ai-agent-toggle-copy strong {
  overflow: hidden;
  font-size: 12px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-ai-agent-toggle > svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #768197;
  stroke-width: 1.6;
  transition: transform .2s ease;
}

.dashboard-ai-agent-toggle[aria-expanded="true"] > svg {
  transform: rotate(180deg);
}

.dashboard-ai-agent-menu {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  z-index: 60;
  display: grid;
  gap: 5px;
  width: min(300px, calc(100vw - 28px));
  max-width: calc(50vw - 28px);
  padding: 8px;
  border: 1px solid rgba(124, 151, 232, .18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 90% 0, rgba(29, 100, 155, .16), transparent 36%),
    rgba(6, 11, 18, .96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
  transform: translateX(-50%);
  backdrop-filter: blur(28px);
}

.dashboard-ai-agent-menu[hidden] {
  display: none !important;
}

.dashboard-ai-agent-menu button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 54px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #b5bdcb;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.dashboard-ai-agent-menu button:hover,
.dashboard-ai-agent-menu button.is-active {
  border-color: rgba(91, 129, 240, .26);
  color: #f3f6fb;
  background: rgba(49, 91, 181, .1);
}

.dashboard-ai-agent-menu button b {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.dashboard-ai-agent-menu button > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.dashboard-ai-agent-menu button strong {
  font-size: 12px;
  font-weight: 690;
}

.dashboard-ai-agent-menu button small {
  color: #727d8f;
  font-size: 9px;
}

.dashboard-ai-drawer-head-actions {
  justify-self: end;
}

.dashboard-ai-context-badge {
  display: none !important;
}

.dashboard-ai-drawer-close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #aab2c0;
  background: rgba(255, 255, 255, .035);
  font-size: 25px;
}

.dashboard-ai-drawer-close:hover {
  border-color: transparent;
  color: #fff;
  background: rgba(255, 255, 255, .09);
  transform: rotate(7deg);
}

.dashboard-ai-drawer-intro {
  display: none !important;
}

.dashboard-ai-intro-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border: 1px solid rgba(111, 148, 255, .24);
  border-radius: 50%;
  color: #68a8ff;
  background: rgba(21, 67, 125, .12);
  box-shadow: 0 0 28px rgba(37, 119, 225, .24);
}

.dashboard-ai-intro-mark svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
  filter: drop-shadow(0 0 8px rgba(67, 151, 255, .75));
}

.dashboard-ai-drawer-intro > p:first-of-type {
  display: none;
}

.dashboard-ai-drawer-intro h2 {
  max-width: 100%;
  margin: 0;
  color: #f5f7fb;
  font-size: clamp(28px, 4.2vw, 42px);
  font-weight: 760;
  line-height: 1.05;
  letter-spacing: -.045em;
  white-space: normal;
  text-shadow: 0 0 36px rgba(52, 123, 219, .18);
}

.dashboard-ai-drawer-intro > .dashboard-ai-drawer-subtitle {
  max-width: 100%;
  margin: 12px 0 0;
  color: #8993a4;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
}

.dashboard-ai-replay-context {
  z-index: 3;
  flex: 0 0 auto;
  width: calc(100% - 28px);
  max-width: 100%;
  margin: 14px auto 0;
}

.dashboard-ai-drawer-chat {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: calc(100% - 28px);
  max-width: 100%;
  min-height: 0;
  margin: 0 auto;
  padding: 12px 0 14px;
  padding: 0;
  overflow: hidden;
}

.dashboard-ai-drawer-status-row {
  justify-content: center;
  min-height: 0;
}

.dashboard-ai-drawer-status-row .ai-assistant-status {
  color: #687487;
  font-size: 9px;
}

.dashboard-ai-drawer-messages.ai-assistant-messages {
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px;
  overflow-y: auto;
  border: 1px solid rgba(95, 126, 181, .1);
  border-radius: 20px;
  background: rgba(0, 0, 0, .15);
  box-shadow: inset 0 1px rgba(255, 255, 255, .02);
  backdrop-filter: blur(12px);
}

.dashboard-ai-drawer-messages .ai-assistant-msg {
  max-width: min(92%, 100%);
  padding: 12px 13px;
  border-radius: 16px;
  color: #cdd4df;
  font-size: 12.5px;
}

.dashboard-ai-drawer-messages .ai-assistant-msg.is-user {
  border-color: rgba(73, 123, 232, .28);
  background: linear-gradient(145deg, rgba(35, 85, 190, .22), rgba(21, 50, 112, .14));
}

.dashboard-ai-drawer-form.ai-assistant-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: end;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(52, 105, 235, .72);
  border-radius: 18px;
  background: rgba(0, 3, 8, .72);
  box-shadow:
    0 0 0 1px rgba(43, 91, 210, .12),
    0 0 28px rgba(15, 75, 184, .13),
    0 20px 48px rgba(0, 0, 0, .28);
  backdrop-filter: blur(18px);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.dashboard-ai-drawer-form.ai-assistant-form:focus-within {
  border-color: rgba(67, 129, 255, .98);
  box-shadow:
    0 0 0 1px rgba(65, 121, 255, .2),
    0 0 38px rgba(18, 90, 220, .18),
    0 20px 48px rgba(0, 0, 0, .3);
}

.dashboard-ai-drawer-form textarea {
  min-height: 48px;
  max-height: 150px;
  padding: 13px 10px 9px;
  color: #eef3fb;
  font-size: 13px;
}

.dashboard-ai-drawer-form .primary-button {
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  border: 1px solid rgba(96, 142, 255, .5);
  border-radius: 13px;
  background: linear-gradient(145deg, #244ea6, #112d67);
  box-shadow: 0 9px 24px rgba(18, 69, 161, .32);
}

.dashboard-ai-drawer-form .primary-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: none;
  filter: none;
}

.dashboard-ai-drawer-prompts {
  display: none !important;
}

.dashboard-ai-prompts-label {
  flex: 0 0 100%;
  color: #5f6a7c;
  font-size: 10px;
  text-align: center;
}

.dashboard-ai-drawer-prompts button {
  flex: 0 1 auto;
  min-height: 34px;
  padding: 7px 12px;
  border-color: rgba(102, 126, 168, .14);
  border-radius: 999px;
  color: #8792a4;
  background: rgba(255, 255, 255, .018);
  font-size: 9px;
  text-align: center;
}

.dashboard-ai-drawer-prompts button:hover {
  border-color: rgba(69, 120, 227, .36);
  color: #dce5f5;
  background: rgba(31, 79, 170, .1);
}

.dashboard-ai-drawer-shell.is-welcome-state .dashboard-ai-drawer-messages {
  display: block;
}

.dashboard-ai-drawer-shell.is-welcome-state .dashboard-ai-drawer-chat {
  flex: 1 1 auto;
  margin: 0 auto;
  overflow: hidden;
}

.dashboard-ai-drawer-shell.is-welcome-state .dashboard-ai-drawer-prompts {
  display: none !important;
}

.dashboard-ai-drawer-shell:not(.is-welcome-state) .dashboard-ai-drawer-intro {
  display: none;
}

.dashboard-ai-drawer-shell:not(.is-welcome-state) .dashboard-ai-replay-context {
  margin-top: 12px;
}

.dashboard-ai-drawer-shell:not(.is-welcome-state) .dashboard-ai-drawer-chat {
  padding-top: 18px;
}

body[data-theme="white"] #dashboardAiDrawer.dashboard-ai-drawer-shell,
body[data-theme="white"] #dashboardAiDrawer.dashboard-ai-drawer-shell--compact {
  color: #f3f5fa;
  background: transparent !important;
}

body[data-theme="white"] #dashboardAiDrawer .dashboard-ai-drawer {
  color: #f3f5fa;
  background:
    radial-gradient(circle at 84% 10%, rgba(102, 78, 255, .26), transparent 30%),
    radial-gradient(circle at 46% 44%, rgba(56, 98, 230, .14), transparent 36%),
    radial-gradient(circle at 16% 100%, rgba(36, 72, 220, .4), transparent 44%),
    linear-gradient(158deg, #05040e 0%, #0a0818 34%, #070b1c 68%, #04060f 100%) !important;
  box-shadow: -28px 0 72px rgba(0, 0, 0, .45) !important;
}

body[data-theme="white"] .dashboard-ai-drawer-intro h2,
body[data-theme="white"] .dashboard-ai-drawer-brand > div strong,
body[data-theme="white"] .dashboard-ai-drawer-form textarea,
body[data-theme="white"] .dashboard-ai-agent-toggle,
body[data-theme="white"] .dashboard-ai-agent-toggle-copy strong {
  color: #f5f7fb;
}

body[data-theme="white"] .dashboard-ai-drawer-messages.ai-assistant-messages,
body[data-theme="white"] .dashboard-ai-drawer-form.ai-assistant-form {
  border-color: rgba(88, 110, 255, .45);
  background: rgba(4, 6, 18, .74);
  color: #eef3fb;
}

body[data-theme="white"] #dashboardAiDrawer .dashboard-ai-drawer-backdrop {
  background: rgba(2, 4, 12, .86);
}

@keyframes sentraLauncherGlow {
  0%, 100% { opacity: .48; transform: scale(.9); }
  50% { opacity: .82; transform: scale(1.12); }
}

@keyframes sentraLauncherPulse {
  0%, 100% { transform: scale(1); box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    inset 0 -14px 26px rgba(8, 10, 36, .34),
    0 14px 34px rgba(24, 28, 88, .52),
    0 0 28px rgba(88, 96, 255, .36); }
  50% { transform: scale(1.035); box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .32),
    inset 0 -14px 26px rgba(8, 10, 36, .3),
    0 16px 38px rgba(24, 28, 88, .56),
    0 0 36px rgba(98, 110, 255, .48); }
}

@media (max-width: 1100px) {
  #dashboardAiDrawer .dashboard-ai-drawer-brand > div,
  #dashboardAiDrawer .dashboard-ai-context-badge {
    display: none;
  }

  #dashboardAiDrawer .dashboard-ai-drawer-head {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 8px;
    padding: 10px 12px;
  }

  #dashboardAiDrawer .dashboard-ai-agent-toggle {
    max-width: none;
  }
}

@media (max-width: 700px) {
  #dashboardAiOrb.dashboard-ai-orb,
  .dashboard-ai-orb {
    right: 15px;
    bottom: 88px;
    width: 64px;
    height: 64px;
    padding: 0;
    border-radius: 50%;
  }

  .dashboard-ai-orb-core {
    width: 52px;
    height: 52px;
    border-radius: 50%;
  }

  .dashboard-ai-orb-core svg,
  .dashboard-ai-orb svg {
    width: 25px;
    height: 25px;
  }

  #dashboardAiDrawer.dashboard-ai-drawer-shell--compact .dashboard-ai-drawer,
  #dashboardAiDrawer.dashboard-ai-drawer-shell .dashboard-ai-drawer,
  #dashboardAiDrawer .dashboard-ai-drawer {
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    max-height: 100dvh !important;
    border-left: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .dashboard-ai-drawer-head {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    flex-basis: 66px;
    min-height: 66px;
    padding: 9px 12px;
  }

  .dashboard-ai-drawer-brand.dashboard-ai-drawer-center-link {
    padding: 0;
  }

  .dashboard-ai-drawer-brand > div,
  .dashboard-ai-context-badge {
    display: none;
  }

  .dashboard-sentra-brand-mark {
    width: 38px;
    height: 38px;
  }

  .dashboard-ai-agent-toggle {
    width: min(206px, 52vw);
    max-width: none;
    min-width: 0;
    min-height: 44px;
  }

  .dashboard-ai-agent-avatar {
    width: 31px;
    height: 31px;
  }

  .dashboard-ai-agent-menu {
    width: min(320px, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
  }

  .dashboard-ai-drawer-close {
    width: 40px;
    height: 40px;
  }

  .dashboard-ai-drawer-intro {
    margin-top: clamp(36px, 8vh, 84px);
  }

  .dashboard-ai-drawer-intro h2 {
    font-size: clamp(30px, 9vw, 42px);
  }

  .dashboard-ai-drawer-intro > .dashboard-ai-drawer-subtitle {
    margin-top: 12px;
    font-size: 12px;
  }

  .dashboard-ai-drawer-chat {
    width: calc(100% - 20px);
    margin-bottom: 12px;
  }

  .dashboard-ai-coach-switch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-ai-drawer-shell.is-welcome-state .dashboard-ai-drawer-prompts {
    margin-top: clamp(26px, 5vh, 56px);
  }

  .dashboard-ai-drawer-prompts {
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 2px;
    overflow-x: auto;
  }

  .dashboard-ai-prompts-label {
    display: none;
  }

  .dashboard-ai-drawer-prompts button {
    flex: 0 0 auto;
  }
}

body.reduced-motion .dashboard-ai-orb-glow,
body.reduced-motion .dashboard-ai-orb-core,
body.reduced-motion #dashboardAiDrawer .dashboard-ai-drawer {
  animation: none !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-ai-orb-glow,
  .dashboard-ai-orb-core,
  #dashboardAiDrawer .dashboard-ai-drawer {
    animation: none !important;
    transition: none !important;
  }

  #dashboardAiDrawer.dashboard-ai-drawer-shell.is-open .dashboard-ai-drawer,
  #dashboardAiDrawer.dashboard-ai-drawer-shell--compact.is-open .dashboard-ai-drawer,
  #dashboardAiDrawer.is-open .dashboard-ai-drawer {
    transform: translateX(0) !important;
  }
}

/* Replay final cut ? session statistics as a cinematic debrief */
.replay-cinematic-analysis {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100% - clamp(30px, 7vw, 120px)));
  min-height: clamp(590px, 62vw, 820px);
  margin: clamp(34px, 5vw, 72px) auto clamp(86px, 10vw, 150px);
  padding: clamp(34px, 5vw, 76px);
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: clamp(24px, 3vw, 44px);
  color: #f2f4f8;
  background:
    radial-gradient(circle at 12% 18%, rgba(var(--accent-rgb), 0.18), transparent 30%),
    radial-gradient(circle at 88% 78%, rgba(var(--accent-rgb), 0.1), transparent 26%),
    linear-gradient(135deg, #0b0d13 0%, #07090d 48%, #0d1118 100%);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.07),
    inset 0 -80px 140px rgba(0, 0, 0, 0.28),
    0 50px 120px rgba(0, 0, 0, 0.34);
}

.replay-cinematic-analysis::before {
  content: "03";
  position: absolute;
  top: -0.18em;
  right: -0.04em;
  color: rgba(var(--accent-rgb), 0.045);
  font: 800 clamp(220px, 31vw, 500px)/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: -0.12em;
  pointer-events: none;
}

.replay-cinematic-analysis::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.13;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg, transparent 0 5px, rgba(255, 255, 255, 0.025) 6px);
  mix-blend-mode: screen;
}

.replay-cinematic-frame {
  position: absolute;
  z-index: 2;
  inset: 12px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.replay-cinematic-frame::before,
.replay-cinematic-frame::after {
  content: "";
  width: 1px;
  height: 100%;
  background: linear-gradient(transparent, rgba(var(--accent-rgb), 0.38) 16%, rgba(var(--accent-rgb), 0.12) 84%, transparent);
}

.replay-cinematic-frame i {
  position: absolute;
  width: 8px;
  height: 13px;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  border-radius: 2px;
  background: #07090d;
}

.replay-cinematic-frame i:nth-child(1) { top: 24px; left: 14px; }
.replay-cinematic-frame i:nth-child(2) { bottom: 24px; left: 14px; }
.replay-cinematic-frame i:nth-child(3) { top: 24px; right: 14px; }
.replay-cinematic-frame i:nth-child(4) { right: 14px; bottom: 24px; }

.replay-cinematic-head,
.replay-cinematic-stage,
.replay-cinematic-verdict,
.replay-cinematic-analysis > .replay-exam-result {
  position: relative;
  z-index: 3;
}

.replay-cinematic-head {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(420px, 1.2fr);
  gap: clamp(28px, 7vw, 110px);
  align-items: end;
  padding-bottom: clamp(32px, 5vw, 62px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.replay-cinematic-head > div:first-child {
  display: grid;
  gap: 14px;
}

.replay-cinematic-head span,
.replay-cinematic-head small,
.replay-cinematic-score > small,
.replay-cinematic-verdict > span {
  font: 760 10px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.replay-cinematic-head span {
  color: rgb(var(--accent-rgb));
}

.replay-cinematic-head small {
  color: rgba(226, 231, 242, 0.42);
}

.replay-cinematic-head h2 {
  max-width: 10ch;
  margin: 0;
  font-size: clamp(46px, 6.3vw, 96px);
  line-height: 0.86;
  letter-spacing: -0.065em;
}

.replay-cinematic-head p {
  max-width: 640px;
  margin: 28px 0 0;
  color: rgba(226, 231, 242, 0.56);
  font-size: clamp(14px, 1.15vw, 18px);
  line-height: 1.65;
}

.replay-cinematic-stage {
  display: grid;
  grid-template-columns: minmax(240px, 0.52fr) minmax(0, 1.48fr);
  gap: clamp(18px, 3vw, 44px);
  margin-top: clamp(30px, 4vw, 54px);
}

.replay-cinematic-score {
  display: grid;
  align-content: space-between;
  min-height: 316px;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.14), rgba(var(--accent-rgb), 0.025) 52%),
    rgba(255, 255, 255, 0.018);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

.replay-cinematic-score > small {
  color: rgba(226, 231, 242, 0.48);
}

.replay-cinematic-score > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.replay-cinematic-score strong {
  color: #fff;
  font: 780 clamp(84px, 10vw, 150px)/0.78 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: -0.11em;
  text-shadow: 0 0 50px rgba(var(--accent-rgb), 0.14);
}

.replay-cinematic-score div span {
  color: rgba(226, 231, 242, 0.34);
  font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.replay-cinematic-score > i {
  display: block;
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.replay-cinematic-score > i b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: rgb(var(--accent-rgb));
  box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.75);
  transition: width 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.replay-workspace .replay-cinematic-analysis .replay-cinematic-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.replay-workspace .replay-cinematic-analysis .replay-cinematic-stat {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 18px;
  min-height: 146px;
  padding: clamp(18px, 2vw, 26px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.replay-workspace .replay-cinematic-analysis .replay-cinematic-stat::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 54%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.48));
}

.replay-workspace .replay-cinematic-analysis .replay-cinematic-stat[data-metric="pnl"] {
  grid-column: span 2;
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), transparent 62%),
    rgba(255, 255, 255, 0.025);
}

.replay-workspace .replay-cinematic-analysis .replay-cinematic-stat span {
  color: rgba(226, 231, 242, 0.42);
  font: 740 9px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.replay-workspace .replay-cinematic-analysis .replay-cinematic-stat strong {
  color: #f5f7fb;
  font: 760 clamp(28px, 3.4vw, 52px)/0.9 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: -0.07em;
}

.replay-workspace .replay-cinematic-analysis .replay-cinematic-metrics[data-tone="positive"] [data-metric="pnl"] strong,
.replay-workspace .replay-cinematic-analysis .replay-cinematic-stat[data-metric="wins"] strong {
  color: #6ee7b7;
}

.replay-workspace .replay-cinematic-analysis .replay-cinematic-metrics[data-tone="negative"] [data-metric="pnl"] strong,
.replay-workspace .replay-cinematic-analysis .replay-cinematic-stat[data-metric="losses"] strong {
  color: #fda4af;
}

.replay-cinematic-verdict {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1.48fr);
  gap: clamp(28px, 7vw, 110px);
  align-items: center;
  margin-top: clamp(30px, 4vw, 52px);
  padding-top: clamp(24px, 3vw, 38px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.replay-cinematic-verdict span {
  color: rgb(var(--accent-rgb));
}

.replay-cinematic-verdict strong {
  max-width: 24ch;
  font-size: clamp(22px, 2.4vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.replay-cinematic-analysis > .replay-exam-result {
  margin-top: 24px;
  border-color: rgba(var(--accent-rgb), 0.25);
  background: rgba(var(--accent-rgb), 0.08);
}

@media (max-width: 900px) {
  .replay-cinematic-head,
  .replay-cinematic-stage,
  .replay-cinematic-verdict {
    grid-template-columns: 1fr;
  }

  .replay-cinematic-head {
    align-items: start;
  }

  .replay-cinematic-score {
    min-height: 250px;
  }
}

@media (max-width: 620px) {
  .replay-cinematic-analysis {
    width: calc(100% - 20px);
    min-height: 0;
    margin-block: 24px 72px;
    padding: 32px 20px;
    border-radius: 24px;
  }

  .replay-cinematic-frame {
    display: none;
  }

  .replay-cinematic-head h2 {
    font-size: clamp(42px, 14vw, 66px);
  }

  .replay-cinematic-head p {
    margin-top: 20px;
  }

  .replay-cinematic-score {
    min-height: 220px;
  }

  .replay-workspace .replay-cinematic-analysis .replay-cinematic-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .replay-workspace .replay-cinematic-analysis .replay-cinematic-stat,
  .replay-workspace .replay-cinematic-analysis .replay-cinematic-stat[data-metric="pnl"] {
    grid-column: auto;
    min-height: 118px;
  }

  .replay-workspace .replay-cinematic-analysis .replay-cinematic-stat[data-metric="pnl"] {
    grid-column: 1 / -1;
  }
}

body.reduced-motion .replay-cinematic-score > i b {
  transition: none;
}

/* SENTRA drawer — mockup chat from the dashboard orb */
#dashboardAiDrawer .dashboard-ai-drawer-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 12px 16px;
}

#dashboardAiDrawer .dashboard-ai-drawer-form.ai-assistant-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

#dashboardAiDrawer .dashboard-ai-drawer-form .ai-chat-attach-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 8px;
}

#dashboardAiDrawer .dashboard-ai-drawer-form .ai-chat-attach-btn {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
}

#dashboardAiDrawer .dashboard-ai-drawer-form .primary-button {
  display: grid;
  place-items: center;
  place-content: center;
  width: 48px;
  min-width: 48px;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0;
  line-height: 0;
}

#dashboardAiDrawer .dashboard-ai-drawer-form .primary-button svg {
  display: block;
  width: 18px;
  height: 18px;
  margin: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: none;
}

.replay-workspace .replay-tv-brand-mark {
  display: grid !important;
  place-items: center;
  color: #fff !important;
  background: linear-gradient(145deg, rgba(var(--accent-rgb), 0.95), color-mix(in srgb, var(--accent-primary) 70%, #1a2744)) !important;
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.22) !important;
}

.replay-workspace .replay-tv-brand-mark::before,
.replay-workspace .replay-tv-brand-mark::after {
  content: none !important;
  display: none !important;
}

.replay-workspace .replay-tv-brand-mark svg {
  display: block !important;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.replay-workspace .replay-tv-brand-mark svg circle,
.replay-workspace .replay-tv-brand-mark svg .replay-lab-play {
  fill: currentColor;
  stroke: none;
}

/* Pattern confirmation cards ? premium visual picker */
.trade-setup-heading {
  display: block;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.trade-setup-sub {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.45;
}

.trade-setup-custom {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-secondary);
}

.trade-setup-custom input {
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--inset-card-border);
  border-radius: 12px;
  color: var(--text-primary);
  background: var(--inset-card-bg);
  font-size: 13px;
}

.pattern-picker {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.trade-setup-factors {
  container-type: inline-size;
}

.pattern-picker-toolbar {
  display: grid;
  gap: 10px;
}

.pattern-search {
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 12px;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.28);
  font-size: 13px;
}

.pattern-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pattern-category-chip {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.pattern-category-chip:hover,
.pattern-category-chip.is-active {
  border-color: rgba(var(--accent-rgb), 0.42);
  color: var(--text-primary);
  background: rgba(var(--accent-rgb), 0.12);
}

.pattern-selected-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 10px 12px;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 14px;
  background: rgba(var(--accent-rgb), 0.07);
}

.pattern-selected-bar strong {
  color: rgb(var(--accent-rgb));
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pattern-selected-bar span {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pattern-selected-bar i {
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.22);
  font: 650 10px/1.2 ui-sans-serif, system-ui, sans-serif;
  font-style: normal;
}

.pattern-visual-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.pattern-visual-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
}

.pattern-visual-legend b {
  font-size: 10px;
  font-weight: 600;
}

.pattern-visual-legend i {
  position: relative;
  display: block;
  width: 13px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 2px;
}

.pattern-visual-legend i.is-bull {
  background: #35d08b;
  box-shadow: 0 0 9px rgba(53, 208, 139, 0.28);
}

.pattern-visual-legend i.is-bear {
  background: #f0626e;
  box-shadow: 0 0 9px rgba(240, 98, 110, 0.25);
}

.pattern-visual-legend i.is-zone {
  border: 1px solid rgba(96, 165, 250, 0.72);
  background: rgba(96, 165, 250, 0.25);
}

.pattern-visual-legend i.is-level {
  height: 1px;
  border-top: 1px dashed rgba(251, 191, 36, 0.9);
  border-radius: 0;
}

.pattern-visual-legend i.is-event {
  width: 16px;
  height: 10px;
  border-radius: 0;
}

.pattern-visual-legend i.is-event::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 1px;
  width: 12px;
  border-top: 2px solid #d8c9ff;
}

.pattern-visual-legend i.is-event::after {
  content: "";
  position: absolute;
  top: 1px;
  right: 0;
  width: 6px;
  height: 6px;
  border-top: 2px solid #d8c9ff;
  border-right: 2px solid #d8c9ff;
  transform: rotate(45deg);
}

.pattern-visual-legend i.is-retest {
  width: 9px;
  height: 9px;
  border: 2px solid #08110c;
  border-radius: 50%;
  background: #7dd3fc;
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.72);
}

.pattern-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.pattern-empty {
  margin: 0;
  padding: 18px;
  color: var(--text-secondary);
  font-size: 12px;
  text-align: center;
}

.pattern-card {
  position: relative;
  display: grid;
  gap: 0;
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(10, 14, 18, 0.72);
  box-shadow: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.pattern-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  z-index: 2;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--pattern-accent, rgba(255, 255, 255, 0.35)),
    transparent
  );
  opacity: 0.55;
  pointer-events: none;
}

.pattern-card[data-color="green"] { --pattern-accent: #35d08b; }
.pattern-card[data-color="red"] { --pattern-accent: #f0626e; }
.pattern-card[data-color="blue"] { --pattern-accent: #60a5fa; }
.pattern-card[data-color="yellow"] { --pattern-accent: #f2c14e; }
.pattern-card[data-color="purple"] { --pattern-accent: #b794f6; }

.pattern-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(14, 18, 24, 0.88);
}

.pattern-card.is-selected {
  border-color: color-mix(in srgb, var(--pattern-accent, rgb(var(--accent-rgb))) 55%, rgba(255, 255, 255, 0.2));
  background: rgba(12, 16, 22, 0.92);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--pattern-accent, rgb(var(--accent-rgb))) 28%, transparent);
}

.pattern-card-check {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #04110a;
  background: rgb(var(--accent-rgb));
  font-size: 11px;
  font-weight: 800;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.pattern-card.is-selected .pattern-card-check {
  opacity: 1;
  transform: scale(1);
}

.pattern-card-info {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: var(--text-secondary);
  background: rgba(2, 8, 5, 0.72);
  opacity: 0.62;
  cursor: pointer;
  transition: opacity 160ms ease, color 160ms ease, border-color 160ms ease;
}

.pattern-card-info svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.pattern-card-info:hover {
  color: var(--text-primary);
  border-color: rgba(var(--accent-rgb), 0.4);
  opacity: 1;
}

.pattern-card-main {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 8px 8px 14px;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.pattern-card-chart {
  display: block;
  overflow: hidden;
  min-height: 92px;
  aspect-ratio: 5 / 3;
  border-radius: 16px;
  background: transparent;
}

.pattern-mini-chart {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.18));
  transition: filter 180ms ease, opacity 180ms ease;
}

.pattern-card:hover .pattern-mini-chart {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.22)) brightness(1.05);
}

.pattern-card-copy {
  display: grid;
  gap: 5px;
  padding: 0 8px;
}

.pattern-card-copy strong {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px 8px;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.pattern-card-copy strong em {
  color: rgba(205, 218, 210, 0.58);
  font-size: 9px;
  font-style: normal;
  font-weight: 650;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.pattern-card-copy small {
  display: -webkit-box;
  min-height: 32px;
  overflow: hidden;
  color: rgba(216, 229, 221, 0.88);
  font-size: 12px;
  font-weight: 520;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pattern-card-badge {
  display: none;
  justify-self: start;
  margin-top: 2px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: rgba(186, 198, 188, 0.82);
  background: rgba(255, 255, 255, 0.03);
  font: 650 9px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pattern-tf-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 10px 10px;
}

.pattern-tf-chip {
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.28);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.pattern-tf-chip:hover,
.pattern-tf-chip.is-active {
  border-color: rgba(var(--accent-rgb), 0.5);
  color: var(--text-primary);
  background: rgba(var(--accent-rgb), 0.16);
}

.pattern-info-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.pattern-info-modal.hidden,
.pattern-info-modal[hidden] {
  display: none !important;
}

.pattern-info-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.62);
  cursor: pointer;
}

.pattern-info-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 18px;
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 0%, rgba(var(--accent-rgb), 0.16), transparent 36%),
    #0a0f0c;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.pattern-info-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pattern-info-panel h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.pattern-info-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  font-size: 20px;
  cursor: pointer;
}

.pattern-info-chart {
  margin-bottom: 12px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
}

.pattern-info-chart .pattern-mini-chart {
  min-height: 160px;
}

.pattern-info-panel p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

.pattern-legacy-presets {
  display: none !important;
}

@container (max-width: 900px) {
  .pattern-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@container (max-width: 620px) {
  .pattern-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container (max-width: 360px) {
  .pattern-card-grid {
    grid-template-columns: 1fr;
  }
}

.trade-entry-modal .pattern-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.trade-entry-modal .trade-setup-grid--patterns {
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
  grid-template-areas:
    "factors factors"
    "chart color";
}

.trade-entry-modal .trade-setup-color {
  width: 100%;
  max-width: none;
  justify-self: stretch;
}

.trade-entry-modal .pattern-card-main {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  grid-template-rows: auto;
  align-items: center;
  gap: 10px;
  padding: 10px 11px 10px 13px;
}

.trade-entry-modal .pattern-card-chart {
  aspect-ratio: 16 / 10;
}

.trade-entry-modal .pattern-card-copy {
  min-width: 0;
  gap: 6px;
}

.trade-entry-modal .pattern-card-copy strong {
  font-size: 14px;
}

.trade-entry-modal .pattern-card-copy small {
  display: -webkit-box;
  min-height: 0;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.trade-entry-modal .pattern-card-info {
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
}

@media (max-width: 1200px) {
  .pattern-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .trade-setup-grid--patterns {
    grid-template-columns: 1fr;
    grid-template-areas:
      "factors"
      "chart"
      "color";
  }

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

  .trade-entry-modal .pattern-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .pattern-card-grid {
    grid-template-columns: 1fr;
  }

  .trade-entry-modal .pattern-card-grid {
    grid-template-columns: 1fr;
  }

  .trade-entry-modal .trade-setup-grid--patterns {
    grid-template-columns: 1fr;
    grid-template-areas:
      "factors"
      "chart"
      "color";
  }

  .trade-entry-modal .pattern-card-main {
    grid-template-columns: 1fr;
  }

  .trade-entry-modal .pattern-card-chart {
    aspect-ratio: 5 / 3;
  }

  .pattern-visual-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.reduced-motion .pattern-card,
body.reduced-motion .pattern-card-check,
body.reduced-motion .pattern-mini-chart {
  transition: none !important;
}

/* Journal desk ? premium stats + rich trade rows */
.journal-table-section {
  border-color: rgba(var(--accent-rgb), 0.18);
  background:
    radial-gradient(circle at 8% 0%, rgba(var(--accent-rgb), 0.12), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(var(--accent-rgb), 0.08), transparent 24%),
    linear-gradient(180deg, rgba(4, 12, 8, 0.55), rgba(3, 8, 6, 0.2)),
    var(--card-bg);
}

.journal-table-head {
  align-items: flex-start;
}

.journal-calendar-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 12px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.journal-calendar-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.journal-summary-bar--cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.journal-stat-card {
  position: relative;
  display: grid;
  gap: 2px;
  min-height: 0;
  padding: 8px 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.04), transparent 48%),
    rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04);
}

.journal-stat-card span {
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.journal-stat-card strong {
  color: var(--text-primary);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.journal-stat-card strong.is-pos { color: #6ee7b7; }
.journal-stat-card strong.is-neg { color: #fda4af; }

.journal-stat-card small {
  color: rgba(186, 198, 188, 0.72);
  font-size: 10px;
}

.journal-stat-card--wr .journal-wr-bar {
  display: block;
  height: 4px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.journal-stat-card--wr .journal-wr-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.55), rgb(var(--accent-rgb)));
}

.journal-stat-ico {
  display: none;
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 18px;
  height: 18px;
  opacity: 0.55;
  background: currentColor;
  color: rgb(var(--accent-rgb));
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.journal-stat-ico--chart {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M3 14.5 7 10l3 2.5L16 5' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.journal-stat-ico--trophy {
  color: #e7c56a;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 4h8v3a4 4 0 0 1-8 0V4Z' stroke='black' stroke-width='1.6'/%3E%3Cpath d='M6 5H4.5A1.5 1.5 0 0 0 3 6.5 2.5 2.5 0 0 0 5.5 9H6M14 5h1.5A1.5 1.5 0 0 1 17 6.5 2.5 2.5 0 0 1 14.5 9H14M8 16h4M10 11v5' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
}

.journal-toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.journal-table-section .journal-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(110px, 0.7fr)) repeat(2, minmax(120px, 0.75fr)) auto;
  align-items: end;
  gap: 8px;
  margin: 0;
}

.journal-table-section .journal-filters > label > span {
  display: none;
}

.journal-table-section .filter-search-field {
  position: relative;
}

.journal-table-section .filter-search-field::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 12px;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  opacity: 0.55;
  background: currentColor;
  color: var(--text-secondary);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Ccircle cx='9' cy='9' r='5.5' stroke='black' stroke-width='1.7'/%3E%3Cpath d='m13.2 13.2 3.3 3.3' stroke='black' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}

.journal-table-section .filter-search-field input {
  padding-left: 34px;
}

.journal-table-section .trade-table-wrapper {
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.18);
}

.journal-table-section .trade-table-wrapper table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1180px;
}

.journal-table-section .trade-table-wrapper tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  vertical-align: middle;
  font-size: 12px;
}

.journal-col-index {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.journal-pair {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.journal-pair b {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.journal-pair-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 20px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #e8f5ee;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.24);
}

.pair-ico-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pair-ico-fallback {
  font: 750 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ui-select-pair-content {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.ui-select-pair-content > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journal-pair-mark.tone-eur { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.journal-pair-mark.tone-gbp { background: rgba(129, 140, 248, 0.22); color: #c7d2fe; }
.journal-pair-mark.tone-usd { background: rgba(52, 211, 153, 0.18); color: #6ee7b7; }
.journal-pair-mark.tone-jpy { background: rgba(251, 113, 133, 0.18); color: #fda4af; }
.journal-pair-mark.tone-xau { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.journal-pair-mark.tone-btc { background: rgba(249, 115, 22, 0.2); color: #fdba74; }
.journal-pair-mark.tone-ger { background: rgba(250, 204, 21, 0.16); color: #fde68a; }
.journal-pair-mark.tone-us { background: rgba(56, 189, 248, 0.18); color: #7dd3fc; }
.journal-pair-mark.tone-us30 { background: rgba(56, 189, 248, 0.18); color: #7dd3fc; }
.journal-pair-mark.tone-us100 { background: rgba(129, 140, 248, 0.2); color: #c4b5fd; }

.journal-session {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 700;
}

.journal-session.tone-london { color: #93c5fd; background: rgba(59, 130, 246, 0.14); border-color: rgba(59, 130, 246, 0.28); }
.journal-session.tone-ny { color: #c4b5fd; background: rgba(139, 92, 246, 0.14); border-color: rgba(139, 92, 246, 0.28); }
.journal-session.tone-asia { color: #5eead4; background: rgba(20, 184, 166, 0.14); border-color: rgba(20, 184, 166, 0.28); }
.journal-session.tone-frankfurt { color: #fcd34d; background: rgba(245, 158, 11, 0.14); border-color: rgba(245, 158, 11, 0.28); }
.journal-session.tone-gen { color: var(--text-secondary); background: rgba(255, 255, 255, 0.05); }

.journal-side {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 740;
}

.journal-side.is-buy { color: #6ee7b7; background: rgba(16, 185, 129, 0.14); }
.journal-side.is-sell { color: #fda4af; background: rgba(244, 63, 94, 0.14); }

.journal-metric {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.journal-metric.is-pos { color: #6ee7b7; }
.journal-metric.is-neg { color: #fda4af; }

.journal-metric-bars {
  display: inline-flex;
  align-items: end;
  gap: 2px;
  height: 14px;
}

.journal-metric-bars i {
  width: 3px;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
}

.journal-metric-bars i:nth-child(2) { height: 10px; }
.journal-metric-bars i:nth-child(3) { height: 14px; }
.journal-metric-bars.tone-pos i.is-on { background: #34d399; }
.journal-metric-bars.tone-neg i.is-on { background: #fb7185; }

.journal-factors-cell {
  max-width: 220px;
}

.journal-factors-cell .tag {
  margin: 0 4px 4px 0;
}

.journal-note-btn,
.journal-chart-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
}

.journal-note-btn svg,
.journal-icon-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.journal-chart-btn span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.journal-spark {
  display: block;
  width: 64px;
  height: 24px;
  pointer-events: none;
}

.journal-chart-empty {
  display: inline-flex;
  opacity: 0.55;
}

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

.journal-icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
}

.journal-icon-btn.delete-button {
  color: #fda4af;
  border-color: rgba(251, 113, 133, 0.22);
  background: rgba(251, 113, 133, 0.08);
}

.journal-table-section .trade-table-wrapper tbody tr:hover {
  background: rgba(var(--accent-rgb), 0.05);
}

@media (max-width: 1200px) {
  .journal-summary-bar--cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .journal-table-section .journal-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journal-table-section .filter-search-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .journal-summary-bar--cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* SENTRA orb chat — matches the dashboard mockup */
#dashboardAiDrawer.dashboard-ai-drawer-shell--compact .dashboard-ai-drawer,
#dashboardAiDrawer .dashboard-ai-drawer {
  top: 12px !important;
  right: 12px !important;
  bottom: 12px !important;
  width: min(400px, calc(100vw - 24px)) !important;
  max-width: min(400px, calc(100vw - 24px)) !important;
  border: 1px solid rgba(140, 118, 255, 0.16) !important;
  border-radius: 28px !important;
  background:
    radial-gradient(circle at 88% 8%, rgba(124, 82, 255, 0.22), transparent 28%),
    linear-gradient(180deg, #0d0d17 0%, #0a0a14 48%, #080812 100%) !important;
  box-shadow: -18px 0 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(108, 72, 255, 0.08) !important;
}

#dashboardAiDrawer .dashboard-ai-drawer-head {
  flex: 0 0 auto;
  min-height: 76px;
  padding: 16px 16px 14px 18px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent;
}

#dashboardAiDrawer .dashboard-ai-drawer-brand {
  position: static !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 0 !important;
  border: 0;
  background: transparent;
  text-align: left;
}

#dashboardAiDrawer .dashboard-sentra-brand-mark,
#dashboardAiDrawer .dashboard-sentra-brand-mark::before,
#dashboardAiDrawer .dashboard-sentra-brand-mark::after {
  content: none !important;
}

#dashboardAiDrawer .dashboard-sentra-brand-mark {
  position: relative;
  display: grid !important;
  place-items: center;
  width: 46px !important;
  height: 46px !important;
  overflow: visible;
  border: 1px solid rgba(168, 132, 255, 0.45) !important;
  border-radius: 50% !important;
  color: #f4efff;
  background:
    radial-gradient(circle at 35% 30%, rgba(198, 168, 255, 0.35), transparent 42%),
    linear-gradient(160deg, #6d4bff, #3b2a88) !important;
  box-shadow:
    0 0 0 4px rgba(124, 82, 255, 0.12),
    0 0 22px rgba(124, 82, 255, 0.55) !important;
  font-size: 0;
}

#dashboardAiDrawer .dashboard-sentra-brand-glow {
  position: absolute;
  inset: -10px;
  z-index: -1;
  border-radius: 50%;
  background: rgba(124, 82, 255, 0.45);
  filter: blur(12px);
  pointer-events: none;
}

#dashboardAiDrawer .dashboard-sentra-monogram {
  display: none !important;
}

#dashboardAiDrawer .dashboard-sentra-brand-mark .sentra-tornado-icon {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #f6f1ff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.35));
}

#dashboardAiDrawer .dashboard-sentra-monogram::before,
#dashboardAiDrawer .dashboard-sentra-monogram::after {
  content: none !important;
}

#dashboardAiDrawer .dashboard-ai-drawer-brand > div {
  display: grid !important;
  gap: 2px;
  min-width: 0;
}

#dashboardAiDrawer .dashboard-ai-drawer-brand > div span#dashboardAiDrawerMode {
  color: rgba(232, 228, 255, 0.62);
  font-size: 9px !important;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

#dashboardAiDrawer .dashboard-ai-drawer-brand > div strong {
  color: #fff;
  font-size: 20px !important;
  font-weight: 780;
  letter-spacing: -0.04em;
  line-height: 1;
}

#dashboardAiDrawer .dashboard-ai-online-line {
  display: none !important;
}

#dashboardAiDrawer .dashboard-ai-online-line::before {
  content: "";
  position: absolute;
  top: 0.45em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12), 0 0 10px rgba(34, 197, 94, 0.45);
}

#dashboardAiDrawer .dashboard-ai-online-line.is-offline::before {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

#dashboardAiDrawer .dashboard-ai-drawer-head-actions {
  position: static !important;
  grid-column: auto;
}

#dashboardAiDrawer .dashboard-ai-drawer-close {
  display: grid !important;
  place-items: center !important;
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 50% !important;
  color: #c5c9d6 !important;
  background: rgba(255, 255, 255, 0.04) !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

#dashboardAiDrawer .dashboard-ai-drawer-close svg {
  display: block;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

#dashboardAiDrawer .dashboard-ai-drawer-chat {
  width: 100% !important;
  margin: 0 !important;
  padding: 8px 16px 14px !important;
  gap: 10px;
}

#dashboardAiDrawer .dashboard-ai-drawer-messages.ai-assistant-messages {
  padding: 8px 2px 6px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

#dashboardAiDrawer .dashboard-ai-drawer-messages .ai-assistant-msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 92%;
  padding: 0;
  border: 0;
  background: transparent;
}

#dashboardAiDrawer .dashboard-ai-drawer-messages .ai-assistant-msg.is-assistant {
  margin-right: auto;
}

#dashboardAiDrawer .dashboard-ai-drawer-messages .ai-assistant-msg.is-user {
  flex-direction: row-reverse;
  margin-left: auto;
  max-width: 82%;
}

#dashboardAiDrawer .dashboard-ai-drawer-messages .sentra-assistant-avatar {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  border-radius: 8px;
  color: #d8c8ff;
  background: linear-gradient(160deg, #7b55ff, #4b32b5);
  box-shadow: 0 0 14px rgba(124, 82, 255, 0.35);
}

#dashboardAiDrawer .dashboard-ai-drawer-messages .sentra-assistant-avatar::before,
#dashboardAiDrawer .dashboard-ai-drawer-messages .sentra-assistant-avatar::after {
  content: none !important;
}

#dashboardAiDrawer .dashboard-ai-drawer-messages .sentra-assistant-avatar svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

#dashboardAiDrawer .ai-assistant-msg-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

#dashboardAiDrawer .ai-assistant-msg-text {
  display: block;
  padding: 12px 14px;
  border-radius: 16px;
  color: #d5dae6;
  background: rgba(22, 22, 34, 0.92);
  font-size: 13px;
  line-height: 1.5;
}

#dashboardAiDrawer .is-user .ai-assistant-msg-text {
  border-radius: 16px 16px 6px 16px;
  color: #fff;
  background: linear-gradient(160deg, #8b5cff, #6d3dff);
  box-shadow: 0 8px 22px rgba(109, 61, 255, 0.28);
}

#dashboardAiDrawer .ai-assistant-msg-meta {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  color: #6b7288;
  font-size: 10px;
}

#dashboardAiDrawer .dashboard-ai-drawer-prompts {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 2px 0 4px;
}

#dashboardAiDrawer.is-welcome-state .dashboard-ai-drawer-prompts,
#dashboardAiDrawer.dashboard-ai-drawer-shell.is-welcome-state .dashboard-ai-drawer-prompts {
  display: grid !important;
}

#dashboardAiDrawer .dashboard-ai-drawer-prompts button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  color: #e7e9f2;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  font-weight: 620;
  text-align: left;
  transform: none;
}

#dashboardAiDrawer .dashboard-ai-drawer-prompts button svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #b7a4ff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#dashboardAiDrawer .dashboard-ai-drawer-prompts button:hover {
  border-color: rgba(139, 92, 255, 0.36);
  background: rgba(139, 92, 255, 0.1);
  transform: none;
}

#dashboardAiDrawer .dashboard-ai-drawer-form.ai-assistant-form {
  display: flex !important;
  flex-direction: column;
  gap: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#dashboardAiDrawer .dashboard-ai-drawer-form .ai-chat-attach-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 6px;
  min-height: 54px;
  padding: 6px 6px 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  background: rgba(16, 16, 26, 0.92);
}

#dashboardAiDrawer .dashboard-ai-drawer-form .ai-chat-attach-btn {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  border: 0;
  border-radius: 50%;
  color: #8b90a5;
  background: transparent;
}

#dashboardAiDrawer .dashboard-ai-drawer-form textarea {
  min-height: 22px !important;
  height: 22px;
  max-height: 72px;
  padding: 0 4px !important;
  border: 0;
  color: #eef1f8;
  background: transparent;
  font-size: 13px !important;
  line-height: 22px;
  overflow-x: hidden;
  overflow-y: hidden;
  resize: none;
}

#dashboardAiDrawer .dashboard-ai-drawer-form textarea:placeholder-shown {
  white-space: nowrap;
  text-overflow: ellipsis;
}

#dashboardAiDrawer .dashboard-ai-drawer-form textarea:not(:placeholder-shown) {
  overflow-y: auto;
}

#dashboardAiDrawer .dashboard-ai-send,
#dashboardAiDrawer .dashboard-ai-drawer-form .primary-button {
  width: 42px !important;
  min-width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  border: 0 !important;
  border-radius: 50% !important;
  color: #fff;
  background: linear-gradient(160deg, #9b6dff, #6d3dff) !important;
  box-shadow: 0 0 0 4px rgba(124, 82, 255, 0.16), 0 0 18px rgba(124, 82, 255, 0.55) !important;
}

#dashboardAiDrawer .dashboard-ai-drawer-form .primary-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

#dashboardAiDrawer .dashboard-ai-disclaimer {
  margin: 8px 0 0;
  color: #5d6478;
  font-size: 10px;
  text-align: center;
}

#dashboardAiDrawer .sentra-ai-insight-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  background: rgba(18, 18, 30, 0.94);
}

#dashboardAiDrawer .sentra-ai-insight-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

#dashboardAiDrawer .sentra-ai-insight-kpis > div {
  display: grid;
  gap: 4px;
  padding: 8px 6px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}

#dashboardAiDrawer .sentra-ai-insight-kpis span {
  color: #7d8498;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#dashboardAiDrawer .sentra-ai-insight-kpis strong {
  color: #f3f5fb;
  font-size: 13px;
}

#dashboardAiDrawer .sentra-ai-insight-kpis [data-tone="up"] strong {
  color: #4ade80;
}

#dashboardAiDrawer .sentra-ai-insight-kpis [data-tone="down"] strong {
  color: #fb7185;
}

#dashboardAiDrawer .sentra-ai-insight-note {
  margin: 0;
  padding-left: 22px;
  color: #d7dce8;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2'><path d='M12 9v4m0 4h.01M10.3 4.3 2.8 18a2 2 0 0 0 1.7 3h15a2 2 0 0 0 1.7-3L13.7 4.3a2 2 0 0 0-3.4 0Z'/></svg>") no-repeat 0 1px / 16px;
  font-size: 12px;
  line-height: 1.45;
}

#dashboardAiDrawer .sentra-ai-insight-more {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #cfc8ff;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}

.ai-hub-chat-block .sentra-ai-insight-card,
.ai-hub-chat-block .ai-assistant-msg-meta {
  display: none;
}

@media (max-width: 700px) {
  #dashboardAiDrawer.dashboard-ai-drawer-shell--compact .dashboard-ai-drawer,
  #dashboardAiDrawer .dashboard-ai-drawer {
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    border-radius: 0 !important;
  }
}

.daily-briefing {
  position: relative;
  overflow: hidden;
  padding: 8px 0 64px;
}

.daily-briefing::before {
  content: "01";
  position: absolute;
  top: -0.1em;
  right: -0.04em;
  color: rgba(var(--accent-rgb), 0.06);
  font: 800 clamp(180px, 26vw, 420px)/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: -0.12em;
  pointer-events: none;
}

.daily-briefing::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(80% 40% at 10% 0%, rgba(var(--accent-rgb), 0.08), transparent 55%);
}

.daily-briefing-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 28px;
  align-items: end;
  margin-bottom: 22px;
  padding: 28px 28px 24px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 28px;
  background:
    radial-gradient(70% 80% at 100% 0%, rgba(var(--accent-rgb), 0.18), transparent 46%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 42%),
    rgba(7, 8, 16, 0.72);
  overflow: hidden;
}

.daily-briefing-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-bottom: 14px;
}

.daily-briefing-hero h2 {
  margin: 0 0 12px;
  max-width: 16ch;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 0.92;
  letter-spacing: -0.06em;
  background: linear-gradient(180deg, #fff 20%, #c7c4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.daily-briefing-hero p {
  max-width: 52ch;
  color: var(--text-secondary);
}

.daily-briefing-hero-plaque {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 140px;
}

.daily-briefing-hero-plaque em {
  font: 800 clamp(28px, 4vw, 42px)/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: -0.04em;
  color: #f4f6fb;
}

.daily-briefing-hero-plaque span {
  color: #8b93a8;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.daily-briefing-stamp {
  margin-top: 16px;
  color: #8b93a8;
  font-size: 12px;
}

.daily-briefing-assets {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.daily-briefing-chip {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #d7dce8;
  background: rgba(255, 255, 255, 0.03);
  font: 680 12px/1 inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.daily-briefing-chip:hover {
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.daily-briefing-chip.is-active {
  border-color: rgba(var(--accent-rgb), 0.62);
  color: #fff;
  background: rgba(var(--accent-rgb), 0.2);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1), 0 10px 24px rgba(var(--accent-rgb), 0.16);
}

.daily-briefing-act {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  margin: 0 0 34px;
  padding: 28px 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 28%),
    rgba(6, 7, 14, 0.55);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.daily-briefing-act.is-visible {
  opacity: 1;
  transform: none;
}

.daily-briefing-act-no {
  color: rgb(var(--accent-rgb));
  font: 800 22px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.daily-briefing-act-kicker {
  margin: 0 0 8px;
  color: rgb(var(--accent-rgb));
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.daily-briefing-thesis {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
}

.daily-briefing-thesis.is-short {
  background: linear-gradient(135deg, rgba(251, 113, 133, 0.1), rgba(255, 255, 255, 0.02) 46%);
}

.daily-briefing-thesis.is-long {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.1), rgba(255, 255, 255, 0.02) 46%);
}

.daily-briefing-thesis-copy h3 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: -0.04em;
}

.daily-briefing-bias {
  display: inline-flex;
  width: max-content;
  padding: 6px 10px;
  border-radius: 999px;
  font: 800 12px/1 inherit;
  letter-spacing: 0.08em;
}

.daily-briefing-bias.is-long { color: #4ade80; background: rgba(74, 222, 128, 0.12); }
.daily-briefing-bias.is-short { color: #fb7185; background: rgba(251, 113, 133, 0.12); }
.daily-briefing-bias.is-wait { color: #fbbf24; background: rgba(251, 191, 36, 0.12); }

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

.daily-briefing-kpis > div {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.daily-briefing-kpis span {
  display: block;
  color: #7d8498;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-briefing-kpis strong { font-size: 20px; }
.daily-briefing-kpis [data-tone="up"] strong { color: #4ade80; }
.daily-briefing-kpis [data-tone="down"] strong { color: #fb7185; }

.daily-briefing-chart-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
  margin: 12px 0 8px;
}

.daily-briefing-workstation {
  margin: 16px 0 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(18, 16, 32, 0.96), rgba(8, 10, 18, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.daily-briefing-chart-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 10, 20, 0.72);
}

.daily-briefing-chart-brand {
  margin-right: 4px;
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.daily-briefing-chart-bar .daily-briefing-modes {
  gap: 6px;
}

.daily-briefing-chart-bar .daily-briefing-chip {
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 10px;
}

.daily-briefing-tv-open {
  margin-left: auto;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #d7dce8;
  background: rgba(255, 255, 255, 0.04);
  font: 680 12px/1 inherit;
  cursor: pointer;
}

.daily-briefing-tv-open.is-active,
.daily-briefing-tv-open:hover {
  border-color: rgba(var(--accent-rgb), 0.5);
  color: #fff;
  background: rgba(var(--accent-rgb), 0.16);
}

.daily-briefing-ai-rail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.18);
  background: linear-gradient(90deg, rgba(91, 33, 182, 0.28), rgba(12, 10, 24, 0.9) 42%, rgba(91, 33, 182, 0.22));
}

.daily-briefing-ai-rail em {
  color: #ddd6fe;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.daily-briefing-ai-rail p {
  margin: 0;
  color: #f4f6fb;
  font-size: 13px;
  line-height: 1.4;
}

.daily-briefing-ai-rail span {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.95);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.daily-briefing-ai-eta {
  display: grid;
  justify-items: end;
  gap: 1px;
  min-width: 92px;
  color: #c4b5fd;
  font-style: normal;
  line-height: 1.1;
}

.daily-briefing-ai-eta small {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-briefing-ai-eta b {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: #f5f3ff;
}

.daily-briefing-ai-eta.is-soon b {
  color: #fbbf24;
}

.daily-briefing-ai-eta.is-now b {
  color: #86efac;
}

.daily-briefing-plan {
  position: absolute;
  top: 16px;
  right: var(--briefing-price-gutter, 110px);
  z-index: 4;
  display: grid;
  gap: 8px;
  min-width: 196px;
  max-width: 240px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(10, 12, 22, 0.88);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  pointer-events: none;
}

.daily-briefing-plan > span {
  color: #9aa3b8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.daily-briefing-plan > strong {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.daily-briefing-plan > strong.is-long { color: #4ade80; }
.daily-briefing-plan > strong.is-short { color: #fb7185; }
.daily-briefing-plan > strong.is-wait { color: #fbbf24; }

.daily-briefing-plan div {
  display: grid;
  gap: 2px;
}

.daily-briefing-plan small {
  color: #7d8498;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-briefing-plan b {
  color: #60a5fa;
  font-size: 15px;
  font-weight: 750;
}

.daily-briefing-plan b.is-stop { color: #fb7185; }
.daily-briefing-plan b.is-target { color: #fbbf24; }
.daily-briefing-plan.is-scenario {
  min-width: 228px;
  max-width: 280px;
  padding: 16px 18px;
}
.daily-briefing-plan.is-scenario > strong { font-size: 20px; }
.daily-briefing-plan.is-scenario b { font-size: 16px; }

.daily-briefing-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.daily-briefing-tfs article.is-active {
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.45);
}

.daily-briefing-chart-hint {
  margin: 0 0 12px;
  color: #8b93a8;
  font-size: 13px;
}

.daily-briefing-views {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
}

.daily-briefing-views article {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.daily-briefing-views article:not(.is-active) {
  display: none;
}

.daily-briefing-views article.is-active {
  border-color: rgba(var(--accent-rgb), 0.4);
  background: rgba(var(--accent-rgb), 0.08);
}

.daily-briefing-views span {
  display: block;
  margin-bottom: 6px;
  color: rgb(var(--accent-rgb));
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.daily-briefing-views p {
  margin: 0;
  color: #d7dce8;
  font-size: 13px;
  line-height: 1.5;
}

.daily-briefing-tv-shell,
.daily-briefing-tv {
  position: relative;
  overflow: hidden;
  height: min(70vh, 640px);
  margin: 16px 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: #0b0d14;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.daily-briefing-workstation .daily-briefing-tv-shell,
.daily-briefing-workstation .daily-briefing-tv {
  height: min(66vh, 620px);
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.daily-briefing-tv-shell .daily-briefing-tv {
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.daily-briefing-desk,
.daily-briefing-lwc {
  position: absolute;
  inset: 0;
}

.daily-briefing-lwc {
  top: 0;
  right: 0;
  bottom: 8px;
  left: 0;
  z-index: 1;
}

.daily-briefing-overlay {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  pointer-events: none;
}

.daily-briefing-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -6px 0 16px;
}

.daily-briefing-desk .daily-briefing-legend {
  position: absolute;
  left: 14px;
  bottom: 34px;
  z-index: 4;
  margin: 0;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(8, 10, 18, 0.62);
  backdrop-filter: blur(10px);
}

.daily-briefing-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9aa3b8;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.daily-briefing-legend span::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.daily-briefing-legend [data-legend="demand"]::before,
.daily-briefing-legend [data-legend="support"]::before { background: rgba(74, 222, 128, 0.7); }
.daily-briefing-legend [data-legend="supply"]::before,
.daily-briefing-legend [data-legend="resistance"]::before { background: rgba(251, 113, 133, 0.7); }
.daily-briefing-legend [data-legend="fvg"]::before,
.daily-briefing-legend [data-legend="zone"]::before { background: rgba(45, 212, 191, 0.85); }
.daily-briefing-legend [data-legend="liq"]::before { background: rgba(251, 191, 36, 0.85); }
.daily-briefing-legend [data-legend="structure"]::before { background: rgba(248, 250, 252, 0.9); }
.daily-briefing-legend [data-legend="levels"]::before { background: #fbbf24; }
.daily-briefing-legend [data-legend="trend"]::before { background: #86efac; }
.daily-briefing-legend [data-legend="fib"]::before { background: #60a5fa; }
.daily-briefing-legend [data-legend="path"]::before { background: #4ade80; }
.daily-briefing-legend [data-legend="ema"]::before { background: linear-gradient(90deg, #8b93ff, #f0b429); }

.daily-briefing-tv {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.daily-briefing-tv-hint {
  margin: 0;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 18, 0.88);
  color: #cdd3e1;
  font-size: 12px;
  line-height: 1.45;
}

.daily-briefing-tv iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
}

.daily-briefing-tfs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.daily-briefing-tfs article {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.daily-briefing-tfs [data-trend="bullish"] strong { color: #4ade80; }
.daily-briefing-tfs [data-trend="bearish"] strong { color: #fb7185; }

.daily-briefing-path-stage {
  position: relative;
  min-height: 392px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(ellipse at 18% 20%, rgba(139, 92, 246, 0.16), transparent 42%),
    radial-gradient(ellipse at 82% 80%, rgba(251, 113, 133, 0.1), transparent 46%),
    rgba(6, 8, 16, 0.55);
}

.daily-briefing-path-stage.is-long {
  background:
    radial-gradient(ellipse at 20% 78%, rgba(74, 222, 128, 0.14), transparent 44%),
    radial-gradient(ellipse at 80% 18%, rgba(139, 92, 246, 0.14), transparent 42%),
    rgba(6, 8, 16, 0.55);
}

.daily-briefing-path-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.daily-briefing-path-track,
.daily-briefing-path-flow {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.daily-briefing-path-track {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 2.4;
  stroke-dasharray: 1800;
  stroke-dashoffset: 1800;
  animation: briefPathDraw 1.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.daily-briefing-path-flow {
  stroke-width: 3;
  stroke-dasharray: 10 16;
  animation: briefPathFlow 2.4s linear infinite;
  filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.45));
}

.daily-briefing-path-line {
  position: relative;
  z-index: 1;
  display: block;
  height: 392px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.daily-briefing-path-line li {
  position: absolute;
  left: var(--path-x);
  top: var(--path-y);
  display: grid;
  gap: 5px;
  width: min(188px, 21vw);
  padding: 14px 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  background: rgba(10, 12, 22, 0.82);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  transform: translate(-50%, -50%) translateY(16px);
  opacity: 0;
  animation: briefPathCardIn 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--path-i) * 95ms);
}

.daily-briefing-path-node {
  position: absolute;
  left: 50%;
  top: -7px;
  width: 11px;
  height: 11px;
  border: 2px solid #c4b5fd;
  border-radius: 50%;
  background: #11131c;
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.16);
}

.daily-briefing-path-line [data-dir="up"] .daily-briefing-path-node {
  border-color: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.16);
}

.daily-briefing-path-line [data-dir="down"] .daily-briefing-path-node {
  border-color: #fb7185;
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.16);
}

.daily-briefing-path-line b {
  color: #8b93a8;
  font-size: 10px;
  letter-spacing: 0.14em;
}

.daily-briefing-path-line strong { font-size: 18px; line-height: 1.1; }
.daily-briefing-path-line em {
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.daily-briefing-path-line em[data-tone="up"] { color: #4ade80; }
.daily-briefing-path-line em[data-tone="down"] { color: #fb7185; }
.daily-briefing-path-line span { color: #9aa3b8; font-size: 12px; line-height: 1.4; }
.daily-briefing-path-line [data-step="now"] { box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), 0.4), 0 16px 40px rgba(0, 0, 0, 0.28); }
.daily-briefing-path-line [data-step="now"] .daily-briefing-path-node {
  animation: briefPathPulse 1.8s ease-in-out infinite;
}
.daily-briefing-path-line [data-step="t1"],
.daily-briefing-path-line [data-step="t2"] { background: rgba(16, 28, 22, 0.88); }
.daily-briefing-path-line [data-step="invalid"] { background: rgba(32, 14, 20, 0.88); }

@keyframes briefPathDraw {
  to { stroke-dashoffset: 0; }
}
@keyframes briefPathFlow {
  to { stroke-dashoffset: -130; }
}
@keyframes briefPathCardIn {
  to { opacity: 1; transform: translate(-50%, -50%) translateY(0); }
}
@keyframes briefPathPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.16); }
  50% { box-shadow: 0 0 0 8px rgba(139, 92, 246, 0.08); }
}
@keyframes briefPathCardInMobile {
  to { opacity: 1; transform: none; }
}

.daily-briefing-levels { display: grid !important; gap: 16px; margin-top: 16px; }

.daily-briefing .ai-market-summary-card,
.daily-briefing .ai-market-scenario,
.daily-briefing .ai-market-levels,
.daily-briefing .ai-market-catalysts {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 22px;
  background: rgba(10, 12, 22, 0.55);
}

.daily-briefing .ai-market-summary-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  padding: 22px;
  overflow: hidden;
}

.daily-briefing .ai-market-summary-card.is-short {
  background:
    radial-gradient(circle at 0 0, rgba(251, 113, 133, 0.18), transparent 42%),
    rgba(10, 12, 22, 0.55);
}

.daily-briefing .ai-market-summary-card.is-long {
  background:
    radial-gradient(circle at 0 0, rgba(74, 222, 128, 0.16), transparent 42%),
    rgba(10, 12, 22, 0.55);
}

.daily-briefing .ai-market-bias {
  min-width: 104px;
  padding: 16px 12px;
  border-radius: 18px;
  font-size: 18px;
}

.daily-briefing .ai-market-confidence {
  position: relative;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  text-align: center;
}

.daily-briefing .ai-market-confidence i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(#a78bfa calc(var(--conf, 0) * 1%), rgba(255, 255, 255, 0.08) 0);
}

.daily-briefing .ai-market-summary-card.is-short .ai-market-confidence i {
  background: conic-gradient(#fb7185 calc(var(--conf, 0) * 1%), rgba(255, 255, 255, 0.08) 0);
}

.daily-briefing .ai-market-summary-card.is-long .ai-market-confidence i {
  background: conic-gradient(#4ade80 calc(var(--conf, 0) * 1%), rgba(255, 255, 255, 0.08) 0);
}

.daily-briefing .ai-market-confidence i::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #0b0d16;
}

.daily-briefing .ai-market-confidence strong,
.daily-briefing .ai-market-confidence span { position: relative; z-index: 1; }

.daily-briefing .ai-market-scenarios { gap: 16px; }

.daily-briefing .ai-market-scenario {
  padding: 20px;
  opacity: 0.72;
  transition: transform 0.22s ease, opacity 0.22s ease, border-color 0.22s ease;
}

.daily-briefing .ai-market-scenario.is-favored {
  opacity: 1;
  border-color: rgba(var(--accent-rgb), 0.38);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  transform: translateY(-2px);
}

.daily-briefing .ai-market-scenario--long.is-favored { border-color: rgba(74, 222, 128, 0.42); }
.daily-briefing .ai-market-scenario--short.is-favored { border-color: rgba(251, 113, 133, 0.42); }

.daily-briefing .ai-market-ladder {
  display: grid;
  gap: 8px;
  margin: 4px 0 12px;
}

.daily-briefing .ai-market-ladder > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.daily-briefing .ai-market-ladder [data-rung="entry"] { box-shadow: inset 3px 0 0 #a78bfa; }
.daily-briefing .ai-market-ladder [data-rung="targets"] { box-shadow: inset 3px 0 0 #4ade80; }
.daily-briefing .ai-market-ladder [data-rung="stop"] { box-shadow: inset 3px 0 0 #fb7185; }
.daily-briefing .ai-market-ladder span { color: #8b93a8; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.daily-briefing .ai-market-ladder strong { font-size: 14px; }

.daily-briefing .ai-market-level-row {
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.daily-briefing .ai-market-level-row.is-support strong { color: #4ade80; }
.daily-briefing .ai-market-level-row.is-resist strong { color: #fb7185; }

.daily-briefing-act[data-brief-act="note"] {
  background:
    linear-gradient(180deg, rgba(167, 139, 250, 0.08), transparent 40%),
    rgba(6, 7, 14, 0.55);
}

.daily-briefing-act[data-brief-act="note"] .ai-market-disclaimer {
  max-width: 62ch;
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.55;
  color: #c9ceda;
}

@media (max-width: 860px) {
  .daily-briefing-hero,
  .daily-briefing-act,
  .daily-briefing-tfs,
  .daily-briefing-kpis {
    grid-template-columns: 1fr;
  }

  .daily-briefing-hero { padding: 20px 16px; }
  .daily-briefing-hero-plaque { justify-items: start; }

  .daily-briefing-path-stage,
  .daily-briefing-path-line {
    min-height: 0;
    height: auto;
  }

  .daily-briefing-path-svg { display: none; }

  .daily-briefing-path-line {
    display: grid;
    gap: 12px;
    padding: 14px;
  }

  .daily-briefing-path-line li {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    transform: none;
    animation-name: briefPathCardInMobile;
  }

  .daily-briefing-path-node { top: 16px; left: auto; right: 14px; transform: none; }

  .daily-briefing-act-no { margin-bottom: 4px; }
  .daily-briefing-tv-shell,
  .daily-briefing-tv,
  .daily-briefing-workstation .daily-briefing-tv-shell,
  .daily-briefing-workstation .daily-briefing-tv { height: 360px; }

  .daily-briefing-chart-bar { padding: 10px 12px; }
  .daily-briefing-tv-open { margin-left: 0; width: 100%; }
  .daily-briefing-ai-rail {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
  }
  .daily-briefing-ai-rail em { grid-column: 1 / -1; }
  .daily-briefing-ai-eta { justify-items: start; }
  .daily-briefing-plan {
    top: 10px;
    right: var(--briefing-price-gutter, 100px);
    min-width: 168px;
    padding: 12px 13px;
  }
}

.trade-review {
  display: grid;
  gap: 28px;
}

.trade-review-hero {
  display: grid;
  gap: 12px;
}

.trade-review-hero h2 {
  margin: 8px 0 10px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.trade-review-hero p {
  max-width: 52ch;
  color: var(--text-secondary);
}

.tilt-detector-toggle span {
  display: grid;
  gap: 4px;
}

.tilt-detector-toggle small {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.tilt-detector-card {
  align-items: flex-start;
  min-width: min(360px, 100%);
  max-width: 420px;
  margin: 0;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(8, 9, 16, 0.55);
}

.tilt-detector-card small {
  font-size: 13px;
  line-height: 1.5;
}

.active-trades-tools {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.trade-review-stage {
  display: grid;
  gap: 14px;
}

.trade-review-drop {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(58vh, 520px);
  padding: 28px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 32px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(var(--accent-rgb), 0.14), transparent 58%),
    rgba(6, 7, 14, 0.72);
  cursor: pointer;
  overflow: hidden;
}

.trade-review-drop.is-dragover {
  border-color: rgba(var(--accent-rgb), 0.7);
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(var(--accent-rgb), 0.22), transparent 58%),
    rgba(6, 7, 14, 0.82);
}

.trade-review-drop.has-image {
  border-style: solid;
  padding: 0;
}

.trade-review-drop-copy {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  pointer-events: none;
}

.trade-review-drop-copy strong {
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: -0.04em;
}

.trade-review-drop-copy p {
  margin: 0;
  color: #8b93a8;
}

.trade-review-drop-icon {
  width: 72px;
  height: 56px;
  margin-bottom: 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.03);
}

.trade-review-drop-icon::after {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  margin: 10px 0 0 12px;
  border: 2px solid rgba(var(--accent-rgb), 0.85);
  border-radius: 50%;
}

.trade-review-preview {
  width: 100%;
  height: 100%;
  min-height: min(58vh, 520px);
  object-fit: contain;
  background: #05060c;
}

.trade-review-preview.hidden,
.trade-review-drop.has-image .trade-review-drop-copy {
  display: none;
}

.trade-review-stage textarea,
.trade-review-link-row input {
  min-height: 64px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  color: #eef1f8;
  background: rgba(8, 9, 16, 0.65);
}

.trade-review-stage textarea {
  resize: vertical;
}

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

.trade-review-link-row input {
  min-height: 48px;
  width: 100%;
}

.trade-review-links {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trade-review-links li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.trade-review-links a {
  overflow: hidden;
  color: #d7dce8;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-review-link-remove {
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #d7dce8;
  background: rgba(255, 255, 255, 0.06);
  font-size: 18px;
  line-height: 1;
}

.trade-review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.trade-review-status {
  min-height: 1.2em;
  margin: 0;
  color: #8b93a8;
  font-size: 13px;
}

.trade-review-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.trade-review-loading span {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(var(--accent-rgb), 0.2);
  border-top-color: rgb(var(--accent-rgb));
  border-radius: 50%;
  animation: marketSpin 0.8s linear infinite;
}

.trade-review-loading p { margin: 0; }

.trade-review-reel { display: grid; }

.trade-review-verdict {
  margin-bottom: 8px;
  padding: 28px 8px 8px;
}

.trade-review-verdict .trade-review-title {
  margin: 0 0 10px;
  color: rgb(var(--accent-rgb));
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.trade-review-verdict h3 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.trade-review-verdict[data-verdict="tilt"] h3,
.trade-review-verdict[data-verdict="flawed"] h3 {
  color: #fb7185;
}

.trade-review-verdict[data-verdict="clean"] h3 {
  color: #86efac;
}

.tilt-stop-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 20%, rgba(190, 24, 48, 0.28), transparent 58%),
    rgba(4, 4, 8, 0.92);
  backdrop-filter: blur(16px);
}

.tilt-stop-modal.hidden {
  display: none;
}

body.tilt-stop-open {
  overflow: hidden;
}

.tilt-stop-card {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 920px;
  text-align: center;
}

.tilt-stop-kicker {
  margin: 0;
  color: #fb7185;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.28em;
}

.tilt-stop-card h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(56px, 14vw, 148px);
  line-height: 0.86;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

.tilt-stop-card p#tiltStopBody {
  max-width: 36ch;
  margin: 0;
  color: #d7dce8;
  font-size: clamp(16px, 2.4vw, 22px);
}

.tilt-stop-ack {
  min-width: 220px;
  min-height: 52px;
  margin-top: 10px;
  border: 0;
  background: #fff !important;
  color: #111 !important;
}

body[data-theme="white"] .trade-review-drop,
body[data-theme="white"] .tilt-detector-card,
body[data-theme="white"] .trade-review-stage textarea,
body[data-theme="white"] .trade-review-link-row input {
  border-color: rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #111827;
}

body[data-theme="white"] .tilt-stop-modal {
  background:
    radial-gradient(ellipse 70% 50% at 50% 20%, rgba(190, 24, 48, 0.16), transparent 58%),
    rgba(255, 255, 255, 0.94);
}

body[data-theme="white"] .tilt-stop-card h2 {
  color: #9f1239;
}

@media (max-width: 860px) {
  .trade-review-hero {
    display: grid;
  }

  .active-trades-tools {
    justify-content: stretch;
  }

  .tilt-detector-card {
    max-width: none;
  }

  .trade-review-link-row {
    grid-template-columns: 1fr;
  }

  .trade-review-drop,
  .trade-review-preview {
    min-height: 240px;
  }

  .trade-review-hero h2 {
    font-size: clamp(28px, 9vw, 40px);
  }

  .tilt-stop-card h2 {
    font-size: clamp(42px, 16vw, 84px);
  }
}

/* Final mobile dock: glass + real horizontal swipe. Wins later v2/v3/v4 overrides. */
@media (max-width: 900px) {
  html,
  body,
  body.vertical-layout,
  body.vertical-layout-stacked {
    overflow-x: hidden;
  }

  .app,
  body.vertical-layout .app,
  body.vertical-layout-stacked .app {
    padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .sidebar,
  body.vertical-layout .sidebar,
  body.vertical-layout-stacked .sidebar,
  .is-capacitor-app .sidebar,
  .is-android-app .sidebar,
  .is-ios-app .sidebar {
    position: fixed !important;
    inset: auto 10px max(8px, env(safe-area-inset-bottom, 0px)) 10px !important;
    z-index: 1200 !important;
    display: block !important;
    width: auto !important;
    height: 76px !important;
    min-height: 76px !important;
    max-height: 76px !important;
    padding: 6px !important;
    overflow: hidden !important;
    border: 1px solid rgba(var(--accent-rgb), 0.28) !important;
    border-radius: 24px !important;
    background: rgba(11, 12, 24, 0.4) !important;
    background: color-mix(in srgb, var(--card-bg, #0b0c18) 38%, transparent) !important;
    box-shadow:
      0 10px 28px rgba(0, 0, 0, 0.22),
      inset 0 1px rgba(255, 255, 255, 0.12) !important;
    backdrop-filter: blur(22px) saturate(1.35) !important;
    -webkit-backdrop-filter: blur(22px) saturate(1.35) !important;
  }

  .sidebar::before,
  .sidebar::after {
    content: "";
    position: absolute;
    z-index: 3;
    top: 8px;
    bottom: 8px;
    width: 18px;
    pointer-events: none;
  }

  .sidebar::before {
    left: 6px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--card-bg, #0b0c18) 55%, transparent), transparent);
  }

  .sidebar::after {
    right: 6px;
    background: linear-gradient(-90deg, color-mix(in srgb, var(--card-bg, #0b0c18) 55%, transparent), transparent);
  }

  .sidebar-nav,
  body.vertical-layout-stacked .sidebar-nav,
  .sidebar-nav.mobile-scroll-dock,
  body.is-web-guest .sidebar-nav {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 4px !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 10px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 16px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    touch-action: pan-x !important;
    -webkit-overflow-scrolling: touch;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  .sidebar-nav.is-dragging {
    scroll-snap-type: none;
    cursor: grabbing;
  }

  .sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar-nav button,
  body.vertical-layout-stacked .sidebar-nav button,
  .sidebar-nav button:nth-child(n),
  body.is-web-guest .sidebar-nav button,
  .sidebar-nav button:nth-child(n + 6) {
    display: grid !important;
    flex: 0 0 78px !important;
    grid-template-columns: 1fr !important;
    place-items: center !important;
    align-content: center !important;
    gap: 3px !important;
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
    min-height: 62px !important;
    height: 62px !important;
    margin: 0 !important;
    padding: 4px 3px !important;
    border: 1px solid transparent !important;
    border-radius: 16px !important;
    color: color-mix(in srgb, var(--text-primary) 68%, transparent) !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 9px !important;
    line-height: 1.05 !important;
    white-space: normal !important;
    scroll-snap-align: center;
    touch-action: manipulation !important;
    pointer-events: auto !important;
  }

  .sidebar-nav button.is-active {
    color: var(--text-primary) !important;
    border-color: rgba(var(--accent-rgb), 0.34) !important;
    background: color-mix(in srgb, rgb(var(--accent-rgb)) 18%, transparent) !important;
  }

  .sidebar-nav button.nav-item-hidden {
    display: none !important;
  }

  .sidebar-nav button .mobile-nav-icon {
    color: rgb(var(--accent-rgb));
  }

  #dashboardAiOrb.dashboard-ai-orb,
  .dashboard-ai-orb {
    right: 16px !important;
    bottom: calc(118px + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 1180 !important;
  }

  .ai-workspace-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    grid-template-columns: none !important;
    gap: 6px !important;
    overflow-x: auto !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .ai-workspace-tab {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 108px !important;
  }

  .ai-assistant-layout {
    min-height: 0 !important;
  }

  body[data-theme="white"] .sidebar,
  body[data-theme="white"].vertical-layout .sidebar,
  body[data-theme="white"].vertical-layout-stacked .sidebar {
    background: rgba(255, 255, 255, 0.58) !important;
    background: color-mix(in srgb, #ffffff 58%, transparent) !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
  }
}

/* Mobile dashboard hero — same composition as desktop, just stacked. */
@media (max-width: 900px) {
  .hero-card:not(.is-active),
  .hero-card.card:not(.is-active),
  .page.card.hero-card:not(.is-active) {
    display: none !important;
  }

  .hero-card.is-active,
  .hero-card.card.is-active,
  .page.card.hero-card.is-active {
    display: flex !important;
    align-items: stretch !important;
    min-height: 0 !important;
    padding: 22px 16px 20px !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 22px !important;
    background:
      radial-gradient(circle at 50% 0%, var(--hero-glow, rgba(var(--accent-rgb), 0.16)), transparent 42%),
      linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.016)) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  .hero-card::before {
    display: block !important;
    opacity: 0.55;
  }

  .hero-card .ai-spirit {
    display: none !important;
  }

  .hero-inner {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    width: 100%;
    max-width: none;
  }

  .hero-copy {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    text-align: left !important;
  }

  .hero-copy > .kicker,
  .hero-card .kicker {
    margin: 0 !important;
    color: rgb(var(--accent-rgb)) !important;
    font-family: inherit !important;
    font-size: 10px !important;
    font-weight: 720 !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase !important;
  }

  .hero-copy > .kicker::before,
  .hero-card .kicker::before {
    content: none !important;
  }

  .hero-copy h1 {
    display: block !important;
    max-width: none !important;
    margin: 0 !important;
    color: var(--text-primary) !important;
    font-family: inherit !important;
    font-size: clamp(26px, 7.4vw, 36px) !important;
    font-weight: 760 !important;
    line-height: 1.04 !important;
    letter-spacing: -0.055em !important;
    text-wrap: balance;
  }

  .hero-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: baseline !important;
    gap: 8px 12px !important;
    min-height: 0 !important;
  }

  .hero-meta .greeting {
    color: var(--text-primary) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
  }

  .hero-meta .date-time {
    display: inline !important;
    max-width: none !important;
    overflow: visible !important;
    color: var(--text-secondary) !important;
    font-size: 12px !important;
    white-space: normal !important;
  }

  .hero-live-metrics {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .hero-live-metrics span,
  .hero-live-metrics span:nth-child(n) {
    position: relative;
    min-width: 0 !important;
    min-height: 68px !important;
    padding: 12px 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.055) !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.035) !important;
    box-shadow: none !important;
    overflow: hidden;
  }

  .hero-live-metrics span::before,
  .hero-live-metrics span:nth-child(n)::before {
    display: none !important;
    content: none !important;
  }

  .hero-live-metrics strong {
    overflow: hidden;
    color: var(--text-primary) !important;
    font-family: inherit !important;
    font-size: clamp(20px, 5.6vw, 26px) !important;
    font-weight: 750 !important;
    letter-spacing: -0.03em !important;
    line-height: 1.1 !important;
    text-overflow: ellipsis;
    text-transform: none !important;
    white-space: nowrap;
  }

  .hero-live-metrics small {
    margin-top: 4px;
    color: var(--text-secondary) !important;
    font-family: inherit !important;
    font-size: 11px !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }

  .hero-card .ai-insight-card,
  .ai-insight-card {
    display: grid !important;
    gap: 8px !important;
    min-height: 0 !important;
    padding: 18px 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-left: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    box-shadow: none !important;
    text-align: center;
  }

  .sentra-signal-pattern,
  .ai-insight-card .motivation-text {
    margin: 0 !important;
    color: var(--text-primary) !important;
    font-size: clamp(16px, 4.6vw, 20px) !important;
    font-weight: 740 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.03em !important;
  }

  .sentra-signal-metric {
    margin: 0 !important;
    color: var(--text-secondary) !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  .sentra-signal-action {
    margin: 6px 0 0 !important;
    padding-top: 10px !important;
    border-top: 1px solid rgba(var(--accent-rgb), 0.16) !important;
    color: color-mix(in srgb, rgb(var(--accent-rgb)) 78%, #fff) !important;
    font-size: 12px !important;
    font-weight: 720 !important;
  }

  body[data-theme="white"] .hero-card,
  body[data-theme="white"] .hero-card.card {
    border-color: rgba(15, 23, 42, 0.08) !important;
    background:
      radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.1), transparent 46%),
      #ffffff !important;
  }

  body[data-theme="white"] .hero-live-metrics span,
  body[data-theme="white"] .hero-card .ai-insight-card {
    border-color: rgba(15, 23, 42, 0.08) !important;
    background: rgba(15, 23, 42, 0.03) !important;
  }
}

/* Shared linear nav icons — same stroke style on desktop and mobile. */
.sidebar-nav .nav-icon,
.sidebar-nav .mobile-nav-icon,
.sidebar-nav .forex-news-nav-icon,
.sidebar-nav .sentra-ai-mark--nav,
.mobile-more-btn .nav-icon,
.mobile-more-btn .mobile-nav-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: color-mix(in srgb, var(--text-primary) 78%, transparent);
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: none;
}

.sidebar-nav .nav-icon svg,
.sidebar-nav .mobile-nav-icon svg,
.sidebar-nav .forex-news-nav-icon svg,
.sidebar-nav .sentra-ai-mark--nav svg,
.mobile-more-btn .nav-icon svg,
.mobile-more-btn .mobile-nav-icon svg,
.mobile-nav-more-grid .nav-icon svg,
.mobile-nav-more-grid .mobile-nav-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: none;
}

.sidebar-nav [data-route="faq"] .nav-icon circle:last-child,
.sidebar-nav [data-route="faq"] .mobile-nav-icon circle:last-child,
.mobile-more-btn .nav-icon circle,
.mobile-more-btn .mobile-nav-icon circle {
  fill: currentColor;
  stroke: none;
}

.sidebar-nav button:hover .nav-icon,
.sidebar-nav button:hover .mobile-nav-icon,
.sidebar-nav button.is-active .nav-icon,
.sidebar-nav button.is-active .mobile-nav-icon,
.sidebar-nav button.is-active .forex-news-nav-icon,
.sidebar-nav button.is-active .sentra-ai-mark--nav {
  color: var(--text-primary);
}

.sidebar-nav [data-route="dashboard"] .nav-icon svg,
.sidebar-nav [data-route="dashboard"] .mobile-nav-icon svg {
  fill: none !important;
  stroke: currentColor !important;
}

@media (max-width: 900px) {
  body,
  body.vertical-layout,
  body.vertical-layout-stacked,
  body.platform-android,
  body.platform-ios {
    color: var(--text-primary) !important;
    background:
      radial-gradient(circle at 72% 8%, var(--body-glow-a), transparent 28%),
      radial-gradient(circle at 20% 18%, var(--body-glow-b), transparent 26%),
      linear-gradient(180deg, var(--bg-primary), #030510 70%, #02030a) !important;
  }

  body[data-theme="white"],
  body[data-theme="white"].vertical-layout,
  body[data-theme="white"].vertical-layout-stacked,
  body[data-theme="white"].platform-android,
  body[data-theme="white"].platform-ios {
    background: var(--bg-primary) !important;
  }

  .card,
  .page.card,
  .hero-card,
  .hero-card.card,
  .ai-insight-card,
  .top-profile-bar,
  .top-profile-bar.card,
  .active-trade-card {
    background: var(--card-bg) !important;
    border-color: var(--card-border) !important;
    box-shadow: none !important;
    backdrop-filter: blur(18px) saturate(130%) !important;
  }

  .hero-card,
  .hero-card.card,
  .page.card.hero-card {
    background:
      radial-gradient(circle at 50% 0%, var(--hero-glow, rgba(var(--accent-rgb), 0.16)), transparent 42%),
      linear-gradient(135deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.016)) !important;
  }

  .kicker {
    font-family: inherit !important;
    color: var(--kicker-color) !important;
    letter-spacing: 0.16em !important;
  }

  .kicker::before {
    content: none !important;
  }

  .hero-live-metrics strong,
  .insight-grid strong,
  .metric-value,
  .hero-live-metrics small,
  .insight-grid small,
  .sidebar-nav button[data-route] span:nth-child(2),
  .mobile-more-btn span:nth-child(2) {
    font-family: inherit !important;
    text-transform: none !important;
  }

  .hero-live-metrics span,
  .hero-live-metrics span:nth-child(n),
  .insight-grid span,
  .metrics > div {
    background: rgba(255, 255, 255, 0.035) !important;
    border: 1px solid rgba(255, 255, 255, 0.055) !important;
    box-shadow: none !important;
  }

  .hero-live-metrics span::before,
  .hero-live-metrics span:nth-child(n)::before,
  .insight-grid span::before {
    display: none !important;
    content: none !important;
  }

  .sidebar,
  body.vertical-layout .sidebar,
  body.vertical-layout-stacked .sidebar,
  .is-capacitor-app .sidebar,
  .is-android-app .sidebar,
  .is-ios-app .sidebar,
  .sidebar-nav {
    background: color-mix(in srgb, var(--bg-secondary) 62%, transparent) !important;
    border-color: color-mix(in srgb, var(--card-border) 80%, transparent) !important;
    box-shadow: none !important;
  }

  .page:not(.is-active),
  .hero-card:not(.is-active),
  .page.card.hero-card:not(.is-active) {
    display: none !important;
  }

  .sidebar-nav button,
  .sidebar-nav button[data-route],
  .sidebar-nav button:nth-child(n),
  .mobile-more-btn {
    color: color-mix(in srgb, var(--text-primary) 58%, transparent) !important;
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    transition:
      color 0.22s ease,
      background 0.22s ease,
      border-color 0.22s ease,
      transform 0.22s ease,
      box-shadow 0.22s ease !important;
  }

  .sidebar-nav button .nav-icon,
  .sidebar-nav button .mobile-nav-icon,
  .sidebar-nav button[data-route] .nav-icon {
    color: color-mix(in srgb, var(--text-primary) 72%, transparent) !important;
    filter: none !important;
    transform: none !important;
  }

  .sidebar-nav button.is-active,
  .sidebar-nav button[data-route].is-active,
  .sidebar-nav button.is-active:nth-child(n),
  .mobile-more-btn.is-active {
    color: #111018 !important;
    background: rgb(var(--accent-rgb)) !important;
    border-color: rgb(var(--accent-rgb)) !important;
    box-shadow: 0 8px 20px rgba(var(--accent-rgb), 0.38) !important;
    transform: translateY(-2px) scale(1.04) !important;
  }

  .sidebar-nav button.is-active .nav-icon,
  .sidebar-nav button.is-active .mobile-nav-icon,
  .sidebar-nav button[data-route].is-active .nav-icon,
  .sidebar-nav button.is-active span:nth-child(2) {
    color: #111018 !important;
  }

  .sidebar-nav button[data-route].is-active::after {
    display: none !important;
  }

  .mobile-nav-sheet,
  .mobile-nav-more-grid button,
  .mobile-dashboard-empty {
    background: color-mix(in srgb, var(--bg-secondary) 88%, #000) !important;
    border-color: var(--card-border) !important;
  }

  body[data-theme="white"] .card,
  body[data-theme="white"] .page.card,
  body[data-theme="white"] .hero-card,
  body[data-theme="white"] .ai-insight-card,
  body[data-theme="white"] .top-profile-bar {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
  }

  body[data-theme="white"] .hero-card,
  body[data-theme="white"] .hero-card.card {
    background:
      radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.1), transparent 46%),
      #ffffff !important;
  }

  body[data-theme="white"] .sidebar,
  body[data-theme="white"] .sidebar-nav {
    background: rgba(255, 255, 255, 0.72) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
  }
}

/* Mobile dashboard — calm cinematic home, not a landing page. */
@media (max-width: 900px) {
  .hero-card.is-active[data-page="dashboard"],
  .hero-card.card.is-active[data-page="dashboard"] {
    position: relative;
    padding: 18px 14px 16px !important;
    border-radius: 24px !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    background:
      radial-gradient(120% 80% at 12% -10%, rgba(var(--accent-rgb), 0.28), transparent 46%),
      radial-gradient(90% 70% at 100% 110%, rgba(34, 211, 238, 0.1), transparent 42%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(8, 10, 18, 0.2)) !important;
    overflow: hidden !important;
  }

  .hero-card.is-active[data-page="dashboard"]::before {
    display: block !important;
    opacity: 0.42;
    animation: hero-gradient 16s linear infinite;
  }

  .hero-card.is-active[data-page="dashboard"] .hero-inner {
    gap: 14px !important;
  }

  .hero-card.is-active[data-page="dashboard"] .hero-copy {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .hero-card.is-active[data-page="dashboard"] .hero-copy > .kicker {
    order: 1;
    animation: dashHomeIn 0.62s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .hero-card.is-active[data-page="dashboard"] .hero-meta {
    order: 2;
    display: grid !important;
    gap: 4px !important;
    animation: dashHomeIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
  }

  .hero-card.is-active[data-page="dashboard"] .hero-meta .greeting {
    font-size: clamp(26px, 8vw, 34px) !important;
    font-weight: 760 !important;
    letter-spacing: -0.045em !important;
    line-height: 1.05 !important;
  }

  .hero-card.is-active[data-page="dashboard"] .hero-meta .date-time {
    display: block !important;
    max-width: none !important;
    color: #9aa3b8 !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .hero-card.is-active[data-page="dashboard"] .hero-copy h1 {
    order: 3;
    display: block !important;
    max-width: 38ch !important;
    color: #9aa3b8 !important;
    font-size: 13px !important;
    font-weight: 520 !important;
    line-height: 1.45 !important;
    letter-spacing: 0 !important;
    animation: dashHomeIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
  }

  .hero-card.is-active[data-page="dashboard"] .hero-live-metrics {
    order: 4;
    gap: 10px !important;
  }

  .hero-card.is-active[data-page="dashboard"] .hero-live-metrics span {
    min-height: 76px !important;
    padding: 12px 13px 14px !important;
    border-radius: 18px !important;
    border-color: rgba(255, 255, 255, 0.07) !important;
    background: rgba(8, 10, 18, 0.45) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    animation: dashHomeIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .hero-card.is-active[data-page="dashboard"] .hero-live-metrics span:nth-child(1) { animation-delay: 0.16s; }
  .hero-card.is-active[data-page="dashboard"] .hero-live-metrics span:nth-child(2) { animation-delay: 0.22s; }
  .hero-card.is-active[data-page="dashboard"] .hero-live-metrics span:nth-child(3) { animation-delay: 0.28s; }
  .hero-card.is-active[data-page="dashboard"] .hero-live-metrics span:nth-child(4) { animation-delay: 0.34s; }

  .hero-card.is-active[data-page="dashboard"] .hero-live-metrics span::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 28%;
    bottom: 10px;
    height: 2px;
    border-radius: 999px;
    opacity: 0.85;
  }

  .hero-card.is-active[data-page="dashboard"] .hero-live-metrics span:nth-child(1)::after { background: linear-gradient(90deg, #a3e635, transparent); }
  .hero-card.is-active[data-page="dashboard"] .hero-live-metrics span:nth-child(2)::after { background: linear-gradient(90deg, #22d3ee, transparent); }
  .hero-card.is-active[data-page="dashboard"] .hero-live-metrics span:nth-child(3)::after { background: linear-gradient(90deg, #fbbf24, transparent); }
  .hero-card.is-active[data-page="dashboard"] .hero-live-metrics span:nth-child(4)::after { background: linear-gradient(90deg, #a78bfa, transparent); }

  .hero-card.is-active[data-page="dashboard"] .ai-insight-card {
    padding: 16px 16px 14px !important;
    border-radius: 20px !important;
    border-color: rgba(167, 139, 250, 0.2) !important;
    background:
      radial-gradient(80% 90% at 0% 0%, rgba(167, 139, 250, 0.16), transparent 50%),
      rgba(10, 12, 22, 0.55) !important;
    text-align: left !important;
    animation: dashHomeIn 0.76s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
  }

  .hero-card.is-active[data-page="dashboard"] .sentra-signal-action {
    animation: dashHomePulse 2.8s ease-in-out 1s infinite;
  }

  @keyframes dashHomeIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }

  @keyframes dashHomePulse {
    0%, 100% { opacity: 0.78; }
    50% { opacity: 1; }
  }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  .hero-card.is-active[data-page="dashboard"]::before,
  .hero-card.is-active[data-page="dashboard"] .hero-copy > .kicker,
  .hero-card.is-active[data-page="dashboard"] .hero-meta,
  .hero-card.is-active[data-page="dashboard"] .hero-copy h1,
  .hero-card.is-active[data-page="dashboard"] .hero-live-metrics span,
  .hero-card.is-active[data-page="dashboard"] .ai-insight-card,
  .hero-card.is-active[data-page="dashboard"] .sentra-signal-action {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.journal-streak-badge{
  display:none !important;
}
.journal-streak-badge strong{
  display:none !important;
}
.journal-streak-badge.is-hot{
  display:none !important;
}

/* Cinematic Journal: Analytics + Discipline */
body:not([data-theme="white"]) .journal-hub-panel[data-journal-tab="analytics"],
body:not([data-theme="white"]) .discipline-section.journal-hub-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  background:
    radial-gradient(ellipse at 12% -10%, rgba(var(--accent-rgb), 0.17), transparent 42%),
    radial-gradient(ellipse at 96% 10%, rgba(48, 80, 180, 0.12), transparent 35%),
    linear-gradient(145deg, rgba(10, 13, 29, 0.97), rgba(5, 8, 20, 0.98));
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

body:not([data-theme="white"]) .journal-hub-panel[data-journal-tab="analytics"]::before,
body:not([data-theme="white"]) .discipline-section.journal-hub-panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(105deg, transparent 0 48%, rgba(255, 255, 255, 0.018) 48.2% 48.5%, transparent 48.7%),
    repeating-linear-gradient(90deg, transparent 0 89px, rgba(255, 255, 255, 0.012) 90px);
  mask-image: linear-gradient(to bottom, #000, transparent 92%);
}

body:not([data-theme="white"]) .journal-hub-panel[data-journal-tab="analytics"]::after,
body:not([data-theme="white"]) .discipline-section.journal-hub-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: 7%;
  width: 36%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.95), transparent);
  box-shadow: 0 0 28px rgba(var(--accent-rgb), 0.55);
  pointer-events: none;
}

/* Discipline command deck */
.discipline-section.journal-hub-panel {
  padding: clamp(22px, 3vw, 42px);
}

.discipline-section > .section-header {
  position: relative;
  align-items: flex-end;
  min-height: 104px;
  margin: 0 0 24px;
  padding: 6px 4px 24px;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.14);
}

.discipline-section > .section-header::before {
  content: "01";
  position: absolute;
  top: -12px;
  left: 2px;
  color: rgba(var(--accent-rgb), 0.3);
  font: 700 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.16em;
}

.discipline-section > .section-header > div:first-child {
  text-align: left;
}

.discipline-section > .section-header h2 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 0.95;
  text-shadow: 0 8px 32px rgba(var(--accent-rgb), 0.18);
}

.discipline-section > .section-header .subtitle {
  max-width: 570px;
  font-size: 13px;
}

.discipline-section > .section-header .tab-switcher {
  padding: 5px;
  border-color: rgba(var(--accent-rgb), 0.2);
  background: rgba(3, 6, 16, 0.64);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}

body:not([data-theme="white"]) .discipline-priority-panel {
  position: relative;
  padding: clamp(20px, 2.5vw, 30px);
  border-color: rgba(224, 178, 96, 0.2);
  background:
    linear-gradient(115deg, rgba(224, 178, 96, 0.08), transparent 35%),
    radial-gradient(circle at 85% 0, rgba(var(--accent-rgb), 0.16), transparent 35%),
    rgba(7, 10, 23, 0.72);
  box-shadow: inset 3px 0 0 rgba(224, 178, 96, 0.48);
}

.discipline-priority-copy h3 {
  font-size: clamp(19px, 2vw, 26px);
  letter-spacing: -0.025em;
}

body:not([data-theme="white"]) .discipline-priority-card {
  min-height: 92px;
  align-content: space-between;
  border-color: rgba(255, 255, 255, 0.07);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.discipline-priority-card .kicker {
  color: rgb(var(--accent-rgb));
  letter-spacing: 0.15em;
}

.discipline-priority-card strong {
  font-size: clamp(15px, 1.5vw, 19px);
}

.discipline-section .discipline-grid,
.discipline-section .discipline-charts {
  gap: 18px;
}

body:not([data-theme="white"]) .discipline-section .discipline-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: clamp(18px, 2.2vw, 28px);
  border-radius: 22px;
  border-color: rgba(var(--accent-rgb), 0.16);
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.065), rgba(255, 255, 255, 0.012)),
    rgba(7, 10, 23, 0.7);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.03);
}

.discipline-section .discipline-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  width: 56px;
  height: 2px;
  background: rgb(var(--accent-rgb));
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.6);
}

.discipline-section .discipline-card h3 {
  font-size: clamp(17px, 1.6vw, 22px);
  letter-spacing: -0.025em;
}

body:not([data-theme="white"]) .discipline-section .routine-item {
  min-height: 43px;
  border-color: rgba(var(--accent-rgb), 0.13);
  background: rgba(255, 255, 255, 0.025);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

body:not([data-theme="white"]) .discipline-section .routine-item:hover {
  transform: translateX(4px);
  border-color: rgba(var(--accent-rgb), 0.36);
  background: rgba(var(--accent-rgb), 0.08);
}

.discipline-section .discipline-history {
  gap: 18px;
}

body:not([data-theme="white"]) .discipline-section .discipline-calendar,
body:not([data-theme="white"]) .discipline-section .discipline-details,
body:not([data-theme="white"]) .discipline-section .rules-table {
  border-radius: 22px;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  background: rgba(4, 7, 17, 0.52);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.discipline-section .rules-table {
  padding: 12px;
}

body:not([data-theme="white"]) .discipline-section .rules-row:not(.rules-head) {
  border-color: rgba(var(--accent-rgb), 0.12);
  background: rgba(255, 255, 255, 0.022);
}

/* Analytics screening room */
.journal-analytics-insights {
  padding: clamp(24px, 3vw, 42px);
}

.journal-analytics-insights .dashboard-analytics-grid {
  grid-template-columns: minmax(260px, 0.85fr) minmax(400px, 1.55fr);
  align-items: stretch;
  gap: 18px;
}

body:not([data-theme="white"]) .journal-analytics-insights .score-index-card,
body:not([data-theme="white"]) .journal-analytics-insights .most-traded-card {
  position: relative;
  min-height: 330px;
  padding: clamp(20px, 2.5vw, 30px);
  overflow: hidden;
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 110%, rgba(var(--accent-rgb), 0.14), transparent 52%),
    rgba(4, 7, 17, 0.52);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.journal-analytics-insights .score-index-card::before,
.journal-analytics-insights .most-traded-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  width: 70px;
  height: 2px;
  background: linear-gradient(90deg, rgb(var(--accent-rgb)), transparent);
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.65);
}

.journal-analytics-insights .score-index-kicker,
.journal-analytics-insights .instrument-donut-kicker {
  color: rgba(var(--accent-rgb), 0.86);
  letter-spacing: 0.16em;
}

.journal-analytics-insights .score-index-value {
  font-size: clamp(46px, 5vw, 72px);
  letter-spacing: -0.055em;
  text-shadow: 0 0 34px rgba(var(--accent-rgb), 0.22);
}

.journal-analytics-insights .score-index-radar {
  margin-top: auto;
  filter: drop-shadow(0 0 14px rgba(var(--accent-rgb), 0.2));
}

.journal-analytics-insights .instrument-donut-grid {
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 12px;
}

body:not([data-theme="white"]) .journal-analytics-insights .instrument-donut {
  padding: 22px 14px;
  border-color: rgba(var(--accent-rgb), 0.13);
  background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.065), rgba(255, 255, 255, 0.018));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

body:not([data-theme="white"]) .journal-analytics-insights .instrument-donut:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb), 0.35);
}

.journal-analytics-insights .instrument-donut-chart {
  width: 126px;
  height: 126px;
  filter: drop-shadow(0 0 12px rgba(37, 99, 235, 0.22));
}

.performance-breakdown-card,
.weekly-section.journal-hub-panel,
.sessions-analytics-section.journal-hub-panel {
  padding: clamp(24px, 3vw, 36px);
}

body:not([data-theme="white"]) .performance-breakdown-panel {
  padding: clamp(18px, 2vw, 26px);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: 22px;
  background: rgba(4, 7, 17, 0.5);
}

.performance-breakdown-header h2,
.weekly-section.journal-hub-panel .section-header h2,
.sessions-analytics-section.journal-hub-panel .section-header h2 {
  font-size: clamp(19px, 2vw, 27px);
  letter-spacing: -0.035em;
}

body:not([data-theme="white"]) .performance-breakdown-card .stat-row {
  min-height: 42px;
  align-items: center;
  border-color: rgba(var(--accent-rgb), 0.12);
  background: rgba(255, 255, 255, 0.022);
}

.weekly-section.journal-hub-panel .weekly-bars {
  min-height: 260px;
  padding: 34px 18px 4px;
  border-top: 1px solid rgba(var(--accent-rgb), 0.1);
}

body:not([data-theme="white"]) .weekly-section.journal-hub-panel .weekly-track {
  width: 54px;
  height: 176px;
  border-color: rgba(var(--accent-rgb), 0.2);
  background: rgba(2, 5, 14, 0.72);
  box-shadow: inset 0 0 30px rgba(var(--accent-rgb), 0.045);
}

.weekly-section.journal-hub-panel .weekly-fill {
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.42);
}

.sessions-analytics-section .session-heatmap {
  gap: 14px;
}

body:not([data-theme="white"]) .sessions-analytics-section .session-heatmap-card {
  position: relative;
  min-height: 150px;
  padding: 22px;
  overflow: hidden;
  border-color: rgba(var(--accent-rgb), 0.14);
  border-radius: 20px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.028);
}

.sessions-analytics-section .session-heatmap-card h3 {
  margin-top: auto;
  font-size: clamp(23px, 2.4vw, 34px);
  letter-spacing: -0.04em;
}

.journal-hub-panel.is-active-tab[data-journal-tab="analytics"],
.discipline-section.journal-hub-panel.is-active-tab {
  animation: cinematic-panel-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cinematic-panel-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.995);
    filter: saturate(0.75);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@media (max-width: 900px) {
  .discipline-section > .section-header {
    align-items: stretch;
  }

  .discipline-section > .section-header .tab-switcher {
    align-self: flex-start;
  }

  .journal-analytics-insights .dashboard-analytics-grid {
    grid-template-columns: 1fr;
  }

  .journal-analytics-insights .score-index-card,
  .journal-analytics-insights .most-traded-card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .discipline-section.journal-hub-panel,
  .journal-hub-panel[data-journal-tab="analytics"] {
    border-radius: 18px;
    padding: 18px 14px;
  }

  .discipline-section > .section-header h2 {
    font-size: 34px;
  }

  .discipline-section > .section-header .tab-switcher {
    width: 100%;
  }

  .discipline-section > .section-header .tab-button {
    flex: 1;
  }

  .journal-analytics-insights .instrument-donut-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .weekly-section.journal-hub-panel .weekly-bars {
    padding-inline: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .journal-hub-panel.is-active-tab[data-journal-tab="analytics"],
  .discipline-section.journal-hub-panel.is-active-tab,
  .discipline-section .routine-item,
  .journal-analytics-insights .instrument-donut {
    animation: none !important;
    transition: none !important;
  }
}
