*,
*::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;
}

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: 14px;
}

.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: 4px;
  width: 100%;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.35;
  text-align: left;
}

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

.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 {
  padding: 12px 12px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

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

.key-metric-chart-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.key-metric-chart-card canvas {
  width: 100%;
  min-height: 140px;
  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;
  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: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 1, 6, 0.82);
  backdrop-filter: blur(18px);
}

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

.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: 10px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(34, 158, 217, 0.28);
  background:
    linear-gradient(135deg, rgba(34, 158, 217, 0.16), rgba(var(--accent-rgb), 0.1));
  color: #d8ecff;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(8, 14, 28, 0.22);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.app-footer .footer-telegram:hover {
  border-color: rgba(34, 158, 217, 0.52);
  background:
    linear-gradient(135deg, rgba(34, 158, 217, 0.24), rgba(var(--accent-rgb), 0.16));
  color: #f2f8ff;
  box-shadow: 0 10px 28px rgba(34, 158, 217, 0.18);
  transform: translateY(-1px);
}

.footer-telegram-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(34, 158, 217, 0.22);
  color: #8ed8ff;
}

.footer-telegram-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
  line-height: 1.2;
}

.footer-telegram-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(216, 236, 255, 0.72);
}

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

.footer-telegram-arrow {
  font-size: 13px;
  line-height: 1;
  opacity: 0.55;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-footer .footer-telegram:hover .footer-telegram-arrow {
  opacity: 0.95;
  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: 10px;
  margin-top: 10px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 166, 64, 0.3);
  background:
    linear-gradient(135deg, rgba(255, 166, 64, 0.18), rgba(var(--accent-rgb), 0.08));
  color: #ffe8cc;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(8, 14, 28, 0.18);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.news-link:hover {
  border-color: rgba(255, 166, 64, 0.52);
  background:
    linear-gradient(135deg, rgba(255, 166, 64, 0.28), rgba(var(--accent-rgb), 0.12));
  color: #fff4e8;
  box-shadow: 0 10px 26px rgba(255, 166, 64, 0.16);
  transform: translateY(-1px);
}

.news-link-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(255, 166, 64, 0.22);
  color: #ffc98a;
}

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

.news-link-arrow {
  font-size: 13px;
  line-height: 1;
  opacity: 0.55;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.news-link:hover .news-link-arrow {
  opacity: 0.95;
  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-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;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.055);
}

.profile-orb {
  width: 36px;
  height: 36px;
  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;
}

.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 div,
.sync-status-card div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sidebar-profile strong,
.sync-status-card strong {
  font-size: 13px;
}

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

.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: cover;
  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: rgba(var(--accent-rgb), 0.72);
  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(3, minmax(0, 1fr));
}

.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: 100%;
  overflow: visible;
}

@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;
  }
}

.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-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;
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  filter: saturate(0.96) contrast(1.06) brightness(0.98);
  -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-bg.is-bear {
  opacity: 0.6;
}

.behavior-animal-bg.is-bull {
  opacity: 0.58;
}

.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.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 {
  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 {
  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: #b45309;
}

body[data-theme="white"] .news-link {
  border-color: rgba(217, 119, 6, 0.28);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.16), rgba(99, 102, 241, 0.06));
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

body[data-theme="white"] .news-link:hover {
  color: #92400e;
  border-color: rgba(217, 119, 6, 0.45);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.24), rgba(99, 102, 241, 0.08));
}

body[data-theme="white"] .news-link-icon {
  background: rgba(251, 191, 36, 0.22);
  color: #d97706;
}

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: #0369a1;
  border-color: rgba(14, 165, 233, 0.28);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(99, 102, 241, 0.08));
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

body[data-theme="white"] .footer-telegram:hover {
  color: #075985;
  border-color: rgba(14, 165, 233, 0.42);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(99, 102, 241, 0.1));
}

body[data-theme="white"] .footer-telegram-label {
  color: rgba(3, 105, 161, 0.72);
}

body[data-theme="white"] .footer-telegram-icon {
  background: rgba(14, 165, 233, 0.16);
  color: #0284c7;
}

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;
  }
}

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: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  margin-bottom: 0;
}

.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 {
  padding-left: 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(160px, 200px);
  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: inline-block;
  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: 12px 14px;
  border-radius: 14px;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.16);
  max-height: min(42vh, 360px);
  overflow-y: auto;
}

.trade-chart-ai-block h4 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.trade-chart-ai-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  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(220px, 300px);
}

.trade-chart-details.is-tv-opinion {
  overflow-y: auto;
  padding: 18px 16px 16px;
}

.tv-opinion-chart-text {
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
}

.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: repeat(2, minmax(0, 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);
}

.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;
}

.security-device-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  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: 0.35rem 0.75rem;
  margin-top: 0.35rem;
}

.prop-analytics-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.06);
}

.prop-analytics-pill.is-danger {
  background: rgba(214, 76, 76, 0.18);
  color: #ff9a9a;
}

.prop-analytics-pill.is-warning {
  background: rgba(255, 180, 80, 0.16);
  color: #ffd099;
}

.prop-analytics-pill.is-positive {
  background: rgba(60, 187, 126, 0.16);
  color: #8ef0bf;
}

.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: show one at a time ── */
.welcome-wizard-modal .welcome-step:not(.is-active),
.account-wizard-modal .account-wizard-step:not(.is-active) {
  display: none;
}

.welcome-wizard-modal .welcome-wizard-card {
  width: min(720px, 100%);
  max-height: min(88vh, 860px);
  overflow: auto;
  gap: 18px;
  padding: 24px 24px 18px;
}

.welcome-wizard-modal.welcome-wizard-step-1 .welcome-wizard-card {
  width: min(520px, 100%);
}

.welcome-wizard-brand {
  display: grid;
  justify-items: center;
  gap: 14px;
}

.welcome-wizard-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.18);
}

.welcome-wizard-brand .welcome-progress {
  width: min(280px, 100%);
  grid-template-columns: repeat(3, 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 h2 {
  max-width: none;
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.welcome-step-copy-center {
  text-align: center;
}

.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: 18px;
  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;
  }
}

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

.welcome-lang-card {
  display: grid;
  gap: 4px;
  align-content: start;
  text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.welcome-lang-card:hover,
.welcome-lang-card.is-active {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: rgba(var(--accent-rgb), 0.12);
  transform: translateY(-1px);
}

.welcome-lang-hint {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.welcome-lang-card strong {
  font-size: 15px;
}

.welcome-profile-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.welcome-auth-panel {
  display: grid;
  gap: 10px;
}

.welcome-auth-divider {
  margin: 2px 0;
}

.welcome-auth-field {
  display: grid;
  gap: 8px;
  margin: 0;
  min-width: 0;
}

.welcome-auth-field > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.welcome-auth-field .table-edit-input {
  width: 100%;
  box-sizing: border-box;
}

.welcome-auth-btn {
  width: 100%;
  min-height: 46px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.welcome-auth-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.welcome-auth-btn:disabled {
  opacity: 0.72;
  cursor: wait;
}

.welcome-auth-btn--telegram {
  color: #fff;
  background: linear-gradient(135deg, #2aabee, #229ed9);
  border-color: rgba(42, 171, 238, 0.45);
  box-shadow: 0 10px 28px rgba(42, 171, 238, 0.22);
}

.welcome-auth-btn--google {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.welcome-auth-btn.is-connected {
  box-shadow: inset 0 0 0 2px rgba(96, 220, 140, 0.45);
}

.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-profile-block {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.welcome-profile-orb,
.profile-preview-orb {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 28px;
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.personal-profile-insights {
  display: grid;
  gap: 14px;
}

.personal-profile-preview-strip {
  display: grid;
  grid-template-columns: auto 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;
}

.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;
}

@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;
  padding-top: 4px;
}

.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 {
  display: none;
}

.crypto-checkout.checkout-yookassa-mode .checkout-main {
  grid-column: 1 / -1;
}

.crypto-checkout.checkout-yookassa-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 {
  align-items: flex-start;
  overflow-y: auto;
  padding: 16px 12px;
}

body.is-web-guest .welcome-wizard-modal .welcome-wizard-card,
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 {
  display: none;
}

.crypto-checkout.checkout-yookassa-mode .checkout-main {
  gap: 18px;
}

.crypto-checkout.checkout-yookassa-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(760px, 96vw);
  max-height: min(94vh, 920px);
  overflow: auto;
  margin: 0;
  border-radius: 36px;
  transform: translateY(22px) scale(0.965);
  opacity: 0;
  transition:
    transform 380ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 300ms cubic-bezier(0.22, 1, 0.36, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 48px 140px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(var(--accent-rgb), 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.checkout-modal-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--accent-rgb), 0.9) 22%,
    rgba(var(--accent-rgb), 0.5) 50%,
    rgba(var(--accent-rgb), 0.9) 78%,
    transparent
  );
  pointer-events: none;
  z-index: 1;
}

.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;
  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: 18px;
  bottom: 18px;
  z-index: 13000;
  width: min(320px, calc(100vw - 24px));
  pointer-events: none;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
}

.web-install-prompt:not(.hidden) {
  pointer-events: auto;
}

.web-install-prompt.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.web-install-prompt-card {
  position: relative;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), 0.14), transparent 52%),
    rgba(8, 10, 22, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 24px 64px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  overflow: hidden;
}

.web-install-prompt-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
}

.web-install-prompt-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.web-install-prompt-brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding-right: 22px;
}

.web-install-prompt-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(var(--accent-rgb), 0.35), transparent 55%),
    rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.web-install-prompt-icon img {
  width: 20px;
  height: 20px;
}

.web-install-prompt-copy h3 {
  margin: 0 0 2px;
  font-size: 14.5px;
  letter-spacing: -0.02em;
}

.web-install-prompt-copy .subtitle {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

.web-install-prompt-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  width: 100%;
}

.web-install-prompt-action-btn {
  width: 100%;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-inline: 12px;
  font-size: 14px;
  text-align: center;
}

.web-install-prompt-action-btn.is-ready {
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.35);
}

.web-install-prompt-install-icon {
  font-size: 14px;
  opacity: 0.9;
  line-height: 1;
}

.web-install-prompt-hint {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.web-install-prompt-hint.hidden {
  display: none;
}

.web-install-prompt-never {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 2px 0 0;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  opacity: 0.78;
}

.web-install-prompt-never:hover {
  opacity: 1;
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .web-install-prompt {
    right: 12px;
    left: 12px;
    width: auto;
  }
}

/* ── 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: 14px;
  margin-bottom: clamp(28px, 4vw, 40px);
}

.subs-pricing .subs-pricing-title {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: var(--text-primary);
}

.subs-pricing .subs-pricing-lead {
  margin: 0;
  max-width: 56ch;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.subs-pricing .subs-pricing-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.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 {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.subs-pricing .billing-tab {
  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.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.subs-pricing .billing-tab:hover {
  color: var(--text-primary);
}

.subs-pricing .billing-tab.is-active {
  color: #fff;
  background: var(--subs-accent);
  box-shadow: 0 10px 28px rgba(93, 95, 239, 0.28);
}

.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: 100%;
  padding: 28px 24px 24px;
  border-radius: 24px;
  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 22px;
  min-height: 44px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--subs-card-muted);
}

.subs-pricing .subs-pricing-price-wrap {
  margin-bottom: 8px;
}

.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);
}

.subs-pricing .subs-pricing-billed {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--subs-card-muted);
}

.subs-pricing .subs-pricing-save {
  min-height: 18px;
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  color: #86efac;
  opacity: 0;
}

.subs-pricing .subs-pricing-save.is-visible {
  opacity: 1;
}

.subs-pricing .subs-pricing-btn {
  width: 100%;
  margin-bottom: 22px;
  padding: 13px 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: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.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;
  }
}

@media (max-width: 640px) {
  .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: 0 auto 24px;
  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[data-subs-panel="plans"] .subs-billing-pill {
  display: flex;
  justify-content: center;
  margin: 0 auto 22px;
}

.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 — minimalist */
.checkout-minimal.checkout-panel,
.checkout-modal-card.checkout-minimal {
  max-width: none;
  width: 100%;
  padding: clamp(32px, 5vw, 48px);
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 10, 20, 0.96);
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.5);
}

.checkout-modal-card.checkout-minimal {
  width: min(760px, 96vw);
}

.checkout-minimal .checkout-head {
  margin-bottom: 24px;
}

.checkout-minimal .checkout-section-title {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 650;
  letter-spacing: -0.03em;
}

.checkout-minimal .payment-segment-shell {
  padding: 3px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: none;
}

.checkout-minimal .checkout-plan-card,
.checkout-minimal .checkout-box {
  padding: 24px 26px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.checkout-minimal .checkout-plan-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.checkout-minimal .checkout-amount {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.checkout-minimal .checkout-layout--solo,
.checkout-minimal .checkout-layout {
  max-width: none;
  width: 100%;
}

.checkout-minimal .checkout-pay-button {
  width: 100%;
  padding: 15px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
}

.checkout-minimal .payment-segment-shell {
  padding: 4px;
  border-radius: 16px;
}

.checkout-minimal .checkout-savings {
  font-size: 12px;
  font-weight: 500;
  color: #6ee7b7;
}

.checkout-minimal .checkout-instructions,
.checkout-minimal .checkout-expiry {
  font-size: 13px;
  line-height: 1.5;
}

.checkout-minimal .checkout-pay-button {
  width: 100%;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

.checkout-minimal .checkout-promo-toggle {
  min-height: 40px;
  border-radius: 10px;
  font-size: 13px;
}

.checkout-minimal .checkout-promo-panel {
  border-radius: 12px;
}

.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 {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

body[data-theme="white"] .checkout-modal-card.checkout-minimal {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.12);
}

/* 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;
}

@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; }
  .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: 13px; }
  .welcome-wizard-modal .welcome-step-copy h2 { font-size: clamp(25px, 8vw, 32px); }
  .welcome-lang-grid { grid-template-columns: 1fr !important; gap: 8px; }
  .welcome-lang-card { min-height: 62px; padding: 10px 14px; }
  .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: 10px; left: 10px; bottom: calc(72px + env(safe-area-inset-bottom, 0px)); width: auto; }
  .web-install-prompt-card { padding: 10px 12px; border-radius: 15px; }
  .web-install-prompt-copy .subtitle, .web-install-prompt-never { display: none; }
  .web-install-prompt-brand { grid-template-columns: 32px minmax(0,1fr); gap: 9px; }
  .web-install-prompt-icon { width: 32px; height: 32px; }
  .web-install-prompt-actions { margin-top: 8px; }
}

@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: 320px; }
}

@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;
  }
}
