:root {
  --bg: #08131a;
  --bg-soft: #10252f;
  --field-bg: #142730;
  --field-bg-strong: #1a313b;
  --panel: rgba(6, 22, 29, 0.78);
  --panel-border: rgba(150, 197, 202, 0.18);
  --text: #ecf7f4;
  --muted: #93aca8;
  --accent: #f7b955;
  --accent-soft: rgba(247, 185, 85, 0.12);
  --positive: #5ce1a6;
  --negative: #ff7d7d;
  --positive-accent-text: #7ef0bd;
  --negative-accent-text: #ff9aa3;
  --positive-ink: #f4fff8;
  --negative-ink: #fff4f6;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

:root[data-theme="light"] {
  --bg: #f3f7f8;
  --bg-soft: #e1eaee;
  --field-bg: #f8fbfc;
  --field-bg-strong: #edf3f5;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-border: rgba(25, 48, 60, 0.12);
  --text: #10202a;
  --muted: #667980;
  --accent: #d48e26;
  --accent-soft: rgba(212, 142, 38, 0.14);
  --positive: #1b9d6d;
  --negative: #d55663;
  --positive-accent-text: #0e8b61;
  --negative-accent-text: #c64a57;
  --positive-ink: #103626;
  --negative-ink: #4a1820;
  --shadow: 0 20px 60px rgba(19, 39, 48, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  scrollbar-gutter: stable;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(247, 185, 85, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(92, 225, 166, 0.15), transparent 26%),
    linear-gradient(135deg, #071117 0%, #0a1b22 45%, #102730 100%);
}

:root[data-theme="light"] body {
  background:
    radial-gradient(circle at top left, rgba(212, 142, 38, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(27, 157, 109, 0.14), transparent 26%),
    linear-gradient(135deg, #f7f9fa 0%, #eff4f6 48%, #e4edf1 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease,
    opacity 160ms ease;
  will-change: transform;
}

button:not(:disabled):active,
button:not(:disabled).is-pressed {
  transform: translateY(2px) scale(0.985);
}

.app-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.menu-shell {
  position: relative;
  z-index: 170;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 60px;
  flex-shrink: 0;
  margin-left: auto;
  overflow: hidden;
}

.menu-toggle-button {
  position: relative;
  z-index: 171;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(8, 19, 26, 0.88);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
  transition:
    border-color 400ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 400ms cubic-bezier(0.22, 1, 0.36, 1),
    background 400ms cubic-bezier(0.22, 1, 0.36, 1),
    color 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.menu-toggle-button:hover {
  border-color: rgba(247, 185, 85, 0.18);
  background: rgba(12, 24, 33, 0.96);
  color: var(--accent);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
}

.menu-toggle-button:not(:disabled):active,
.menu-toggle-button:not(:disabled).is-pressed,
.menu-close-button:not(:disabled):active,
.menu-close-button:not(:disabled).is-pressed,
.menu-theme-button:not(:disabled):active,
.menu-theme-button:not(:disabled).is-pressed,
.menu-google-login-button:not(:disabled):active,
.menu-google-login-button:not(:disabled).is-pressed,
.menu-sign-out-button:not(:disabled):active,
.menu-sign-out-button:not(:disabled).is-pressed,
.menu-scroll-button:not(:disabled):active,
.menu-scroll-button:not(:disabled).is-pressed {
  transform: none;
}

.menu-toggle-line {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition:
    top 400ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 400ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 400ms cubic-bezier(0.22, 1, 0.36, 1),
    width 400ms cubic-bezier(0.22, 1, 0.36, 1),
    background 400ms cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateX(-50%);
}

.menu-toggle-line:nth-child(1) {
  top: 13px;
}

.menu-toggle-line:nth-child(2) {
  top: 19px;
  width: 14px;
}

.menu-toggle-line:nth-child(3) {
  top: 25px;
}

.menu-toggle-button.is-open {
  border-color: rgba(247, 185, 85, 0.18);
  background: rgba(10, 22, 30, 0.92);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
  color: var(--accent);
}

.menu-toggle-button.is-open .menu-toggle-line:nth-child(1) {
  top: 19px;
  transform: translateX(-50%) rotate(45deg);
}

.menu-toggle-button.is-open .menu-toggle-line:nth-child(2) {
  width: 0;
  opacity: 0;
}

.menu-toggle-button.is-open .menu-toggle-line:nth-child(3) {
  top: 19px;
  transform: translateX(-50%) rotate(-45deg);
}

.menu-layer {
  --menu-anchor-top: 28px;
  --menu-anchor-right: 20px;
  position: fixed;
  inset: 0;
  z-index: 165;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(12px, var(--menu-anchor-top)) 24px 24px;
  pointer-events: none;
  overflow: visible;
}

.menu-layer.is-open {
  pointer-events: auto;
}

.menu-overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(4, 12, 17, 0.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: opacity 220ms ease;
}

.menu-layer.is-open .menu-overlay {
  opacity: 1;
}

.menu-dialog {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.menu-layer.is-open .menu-dialog {
  pointer-events: auto;
}

.menu-caption {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-height: 40px;
  padding-inline: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  transition:
    transform 480ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease,
    visibility 0s linear 480ms;
  pointer-events: none;
}

.menu-layer.is-open .menu-caption {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition-delay: 0ms;
}

.menu-signature {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  min-height: 40px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  transition:
    transform 480ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease,
    visibility 0s linear 480ms;
  pointer-events: none;
}

.menu-layer.is-open .menu-signature {
  opacity: 0.78;
  visibility: visible;
  transform: translateX(0);
  transition-delay: 0ms;
}

.app-menu-panel {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: min(560px, calc(100vh - 120px));
  max-height: min(560px, calc(100dvh - 120px));
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 0 10px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(9, 21, 28, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  transition:
    transform 480ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease,
    visibility 0s linear 480ms;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.app-menu-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.menu-layer.is-open .app-menu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition-delay: 0ms;
}

.menu-row-items {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  padding-top: 0;
}

.menu-inline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
  overflow: visible;
  text-align: center;
  opacity: 0;
  transform: translateX(18px);
  transition:
    transform 480ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 260ms ease;
}

.menu-layer.is-open .menu-inline-item {
  opacity: 1;
  transform: translateX(0);
}

.menu-layer.is-open .menu-language-item {
  transition-delay: 70ms;
}

.menu-layer.is-open .menu-theme-item {
  transition-delay: 120ms;
}

.menu-layer.is-open .menu-account-item {
  transition-delay: 170ms;
}

.menu-language-item {
  width: 100%;
  order: 2;
  align-items: center;
}

.menu-theme-item {
  width: 100%;
  order: 3;
  align-items: center;
}

.menu-account-item {
  width: 100%;
  order: 1;
  flex: 1 1 auto;
  align-items: center;
  justify-content: stretch;
  padding-top: 8px;
}

.menu-account-actions {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: visible;
}

.menu-inline-label {
  display: block;
  margin: 0;
  width: 100%;
  padding-inline: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

.menu-account-item .menu-inline-label {
  display: none;
}

.menu-language-item .menu-select,
.menu-theme-button,
.menu-user-chip,
.menu-google-login-button,
.menu-sign-out-button {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
}

.menu-close-button {
  display: none;
}

.app-menu-body {
  min-height: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.app-menu-body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.menu-section {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  margin: 0;
  flex-shrink: 0;
  min-width: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  transition:
    border-color 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease;
  overflow: hidden;
}

.menu-section + .menu-section {
  margin-top: 0;
}

.menu-section:hover {
  border-color: rgba(247, 185, 85, 0.14);
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.menu-section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
}

.menu-section-heading strong {
  font-size: 1rem;
  letter-spacing: 0.01em;
  font-weight: 700;
}

.menu-section-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.04);
  color: var(--accent);
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.menu-section-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-control {
  gap: 8px;
}

.menu-select,
.menu-theme-button,
.menu-google-login-button,
.menu-sign-out-button,
.menu-scroll-button {
  width: auto;
  max-width: 100%;
}

.menu-theme-button,
.menu-sign-out-button,
.menu-scroll-button,
.menu-google-login-button {
  min-height: 40px;
  height: auto;
}

.menu-select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  height: 40px;
  padding: 0 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}

.menu-select,
.menu-theme-button,
.menu-google-login-button,
.menu-sign-out-button,
.menu-user-copy strong,
.menu-user-copy span {
  font-size: 1rem;
  text-align: center;
}

.menu-language-item .menu-select {
  text-align: center;
  text-align-last: center;
  font-weight: 700;
}

.menu-account-section {
  display: flex;
  flex-direction: column;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(247, 185, 85, 0.08), rgba(255, 255, 255, 0.035) 34%, rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.03);
}

.menu-user-chip {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  height: auto;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.menu-user-copy {
  min-width: 0;
  flex: 1;
  width: 100%;
  text-align: center;
}

.menu-user-copy strong,
.menu-user-copy span {
  display: block;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
  line-height: 1.25;
}

.menu-user-copy strong {
  font-weight: 700;
}

.menu-user-copy span {
  color: var(--muted);
  font-weight: 600;
}

.menu-user-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background-image:
    linear-gradient(135deg, #4285f4 0 34%, #ea4335 34% 56%, #fbbc05 56% 74%, #34a853 74% 100%),
    linear-gradient(135deg, rgba(247, 185, 85, 0.16), rgba(35, 201, 134, 0.12)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08));
  background-clip: text, padding-box, padding-box;
  -webkit-background-clip: text, padding-box, padding-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  color: #4285f4;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  -webkit-text-fill-color: transparent;
}

.menu-theme-button,
.menu-google-login-button,
.menu-sign-out-button,
.menu-scroll-button {
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.menu-theme-button:hover,
.menu-google-login-button:hover,
.menu-sign-out-button:hover,
.menu-scroll-button:hover {
  border-color: rgba(247, 185, 85, 0.2);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

.menu-theme-button {
  position: relative;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 0 52px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  white-space: nowrap;
  text-align: center;
}

.menu-theme-button::before {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 8px;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-50%);
  transition: background 220ms ease;
}

.menu-theme-button::after {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 24px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(247, 185, 85, 0.28);
  transform: translateY(-50%);
  transition:
    inset-inline-end 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease;
}

.google-login-button.menu-google-login-button {
  position: relative;
  min-width: 0;
  min-height: 40px;
  padding: 0 14px;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  white-space: normal;
  text-align: center;
}

.menu-google-login-button .google-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background-image:
    linear-gradient(135deg, #4285f4 0 34%, #ea4335 34% 56%, #fbbc05 56% 74%, #34a853 74% 100%),
    linear-gradient(180deg, #ffffff, #ffffff);
  background-clip: text, padding-box;
  -webkit-background-clip: text, padding-box;
  color: #4285f4;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  -webkit-text-fill-color: transparent;
}

.menu-sign-out-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  white-space: normal;
  text-align: center;
}

.menu-language-item .menu-select,
.menu-theme-item .menu-theme-button,
.menu-account-item .menu-user-chip,
.menu-account-item .menu-google-login-button,
.menu-account-item .menu-sign-out-button {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
}

.menu-theme-button[data-theme="dark"]::before {
  background: rgba(35, 201, 134, 0.26);
}

.menu-theme-button[data-theme="dark"]::after {
  inset-inline-end: 11px;
  background: #23c986;
  box-shadow: 0 8px 18px rgba(35, 201, 134, 0.32);
}

.menu-scroll-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.menu-scroll-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.menu-scroll-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
  font-size: 1rem;
}

.app-menu-footer {
  margin-top: auto;
  padding: 22px 0 4px;
  display: flex;
  justify-content: center;
}

.app-menu-footer-mark {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.07);
  box-shadow: none;
  color: rgba(232, 240, 244, 0.62);
  font-size: 0.7rem;
  letter-spacing: 0.32em;
}

.app-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 24px;
  padding: 10px 0 4px;
}

.app-footer-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(0.78rem, 0.3vw + 0.72rem, 0.9rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.platform-stats-section {
  position: relative;
  margin-top: 28px;
  padding: 28px 24px 48px;
  overflow: hidden;
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.platform-stats-section::before,
.platform-stats-section::after {
  content: "";
  position: absolute;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.32;
}

.platform-stats-section::before {
  top: 12%;
  left: 14%;
  width: 180px;
  height: 180px;
  background: rgba(92, 225, 166, 0.1);
}

.platform-stats-section::after {
  right: 14%;
  bottom: 16%;
  width: 180px;
  height: 180px;
  background: rgba(247, 185, 85, 0.08);
}

.platform-stats-inner {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.platform-stats-copy {
  max-width: 700px;
}

.platform-stats-eyebrow {
  margin: 0;
  color: rgba(232, 240, 244, 0.58);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.platform-stats-title {
  margin: 8px 0 0;
  color: var(--text);
  font-size: clamp(1.3rem, 1vw + 1.08rem, 1.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.platform-stats-description {
  margin: 16px auto 0;
  max-width: 54ch;
  color: rgba(214, 228, 235, 0.72);
  font-size: clamp(1rem, 1vw + 0.8rem, 1.14rem);
  line-height: 1.7;
}

.platform-stats-grid {
  width: min(720px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.platform-stats-signature {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(720px, 100%);
  min-height: 40px;
  margin: 4px 0 0;
  color: rgba(232, 240, 244, 0.62);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.12);
}

:root[data-theme="light"] .platform-stats-signature {
  color: rgba(16, 32, 42, 0.56);
  text-shadow: none;
}

.platform-stat-card {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 14px;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    var(--panel);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.platform-stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 50%;
  width: 68%;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.12) 20%, rgba(255, 255, 255, 0.12) 80%, transparent 100%);
}

.platform-stat-card-traders {
  background:
    radial-gradient(circle at top center, rgba(92, 225, 166, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    var(--panel);
}

.platform-stat-card-logged {
  background:
    radial-gradient(circle at top center, rgba(247, 185, 85, 0.09), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    var(--panel);
}

.platform-stat-label {
  color: rgba(218, 230, 236, 0.62);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.platform-stat-value {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(1.28rem, 1.2vw + 1rem, 1.72rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  will-change: transform, opacity;
}

.platform-stat-card-traders .platform-stat-value {
  color: #ecfffb;
  text-shadow:
    0 0 18px rgba(92, 225, 166, 0.14),
    0 0 42px rgba(92, 225, 166, 0.12);
}

.platform-stat-card-logged .platform-stat-value {
  color: #fff6e8;
  text-shadow:
    0 0 12px rgba(247, 185, 85, 0.1),
    0 0 24px rgba(247, 185, 85, 0.08);
}

.platform-stat-meta {
  max-width: 28ch;
  color: rgba(214, 228, 235, 0.68);
  font-size: 0.82rem;
  line-height: 1.45;
}

.platform-stat-value.is-updating {
  animation: platform-stat-pulse 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

 :root[data-theme="light"] .platform-stats-eyebrow {
  color: rgba(16, 32, 42, 0.62);
}

:root[data-theme="light"] .platform-stat-label {
  color: rgba(16, 32, 42, 0.72);
}

:root[data-theme="light"] .platform-stat-card-traders .platform-stat-value {
  color: #12744f;
  text-shadow:
    0 0 10px rgba(27, 157, 109, 0.08),
    0 0 20px rgba(27, 157, 109, 0.05);
}

:root[data-theme="light"] .platform-stat-card-logged .platform-stat-value {
  color: #935d16;
  text-shadow:
    0 0 10px rgba(212, 142, 38, 0.08),
    0 0 20px rgba(212, 142, 38, 0.05);
}

:root[data-theme="light"] .platform-stat-meta {
  color: rgba(16, 32, 42, 0.72);
}

@keyframes platform-stat-pulse {
  0% {
    opacity: 0.72;
    transform: translateY(8px) scale(0.985);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

:root[data-theme="light"] .auth-card,
:root[data-theme="light"] .menu-toggle-button,
:root[data-theme="light"] .app-menu-panel,
:root[data-theme="light"] .menu-section,
:root[data-theme="light"] .menu-section-icon,
:root[data-theme="light"] .menu-scroll-button,
:root[data-theme="light"] .metric-card,
:root[data-theme="light"] .stat-card,
:root[data-theme="light"] .trade-card,
:root[data-theme="light"] .calendar-cell,
:root[data-theme="light"] .user-chip,
:root[data-theme="light"] .streak-pill,
:root[data-theme="light"] .badge,
:root[data-theme="light"] .secondary-button,
:root[data-theme="light"] .google-login-button,
:root[data-theme="light"] .toolbar-button,
:root[data-theme="light"] .toolbar-select,
:root[data-theme="light"] .calendar-nav-button,
:root[data-theme="light"] .trade-image-field,
:root[data-theme="light"] .scroll-top-button,
:root[data-theme="light"] .app-footer-mark {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(25, 48, 60, 0.1);
  box-shadow: 0 10px 30px rgba(25, 48, 60, 0.08);
}

:root[data-theme="light"] .metric-card,
:root[data-theme="light"] .calendar-cell,
:root[data-theme="light"] .trade-media img,
:root[data-theme="light"] .trade-action-button {
  border-color: rgba(25, 48, 60, 0.08);
}

:root[data-theme="light"] .stat-card-positive {
  background:
    linear-gradient(180deg, rgba(27, 157, 109, 0.14), rgba(27, 157, 109, 0.05)),
    rgba(27, 157, 109, 0.04);
  border-color: rgba(27, 157, 109, 0.16);
  box-shadow: 0 8px 20px rgba(27, 157, 109, 0.04);
}

:root[data-theme="light"] .stat-card-negative {
  background:
    linear-gradient(180deg, rgba(213, 86, 99, 0.14), rgba(213, 86, 99, 0.05)),
    rgba(213, 86, 99, 0.04);
  border-color: rgba(213, 86, 99, 0.16);
  box-shadow: 0 8px 20px rgba(213, 86, 99, 0.04);
}

:root[data-theme="light"] .menu-overlay {
  background: rgba(132, 153, 160, 0.2);
}

:root[data-theme="light"] .menu-toggle-button,
:root[data-theme="light"] .app-menu-panel {
  box-shadow: 0 18px 44px rgba(25, 48, 60, 0.14);
}

:root[data-theme="light"] .app-menu-panel {
  background:
    radial-gradient(circle at top right, rgba(247, 185, 85, 0.18), transparent 32%),
    radial-gradient(circle at bottom left, rgba(35, 201, 134, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.84)),
    rgba(243, 247, 248, 0.96);
}

:root[data-theme="light"] .app-menu-header .card-label,
:root[data-theme="light"] .menu-close-button,
:root[data-theme="light"] .menu-section,
:root[data-theme="light"] .menu-section-icon,
:root[data-theme="light"] .menu-user-chip,
:root[data-theme="light"] .menu-theme-button,
:root[data-theme="light"] .menu-google-login-button,
:root[data-theme="light"] .menu-sign-out-button {
  border-color: rgba(25, 48, 60, 0.08);
}

:root[data-theme="light"] .app-menu-header .card-label {
  background: rgba(255, 255, 255, 0.68);
  color: rgba(16, 32, 42, 0.76);
}

:root[data-theme="light"] .menu-close-button,
:root[data-theme="light"] .menu-theme-button,
:root[data-theme="light"] .menu-google-login-button,
:root[data-theme="light"] .menu-sign-out-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78)),
    rgba(255, 255, 255, 0.86);
}

:root[data-theme="light"] .menu-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.74)),
    rgba(255, 255, 255, 0.78);
}

:root[data-theme="light"] .menu-account-section {
  background:
    linear-gradient(180deg, rgba(247, 185, 85, 0.12), rgba(255, 255, 255, 0.84) 34%, rgba(255, 255, 255, 0.78)),
    rgba(255, 255, 255, 0.8);
}

:root[data-theme="light"] .menu-user-chip {
  background: rgba(255, 255, 255, 0.84);
}

:root[data-theme="light"] .menu-user-avatar {
  background-image:
    linear-gradient(135deg, #4285f4 0 34%, #ea4335 34% 56%, #fbbc05 56% 74%, #34a853 74% 100%),
    linear-gradient(135deg, rgba(247, 185, 85, 0.18), rgba(35, 201, 134, 0.16)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.84));
  background-clip: text, padding-box, padding-box;
  -webkit-background-clip: text, padding-box, padding-box;
}

:root[data-theme="light"] .menu-theme-button::before {
  background: rgba(16, 32, 42, 0.12);
}

:root[data-theme="light"] .menu-scroll-icon {
  background: rgba(16, 32, 42, 0.08);
}

:root[data-theme="light"] .app-menu-footer-mark {
  color: rgba(16, 32, 42, 0.5);
  background: rgba(255, 255, 255, 0.56);
  border-color: rgba(25, 48, 60, 0.08);
}

:root[data-theme="light"] .scroll-top-button {
  background: rgba(255, 255, 255, 0.48);
  border-color: rgba(25, 48, 60, 0.08);
  opacity: 0.42;
}

:root[data-theme="light"] .google-mark {
  background-image:
    linear-gradient(135deg, #4285f4 0 34%, #ea4335 34% 56%, #fbbc05 56% 74%, #34a853 74% 100%),
    linear-gradient(180deg, #ffffff, #ffffff);
  background-clip: text, padding-box;
  -webkit-background-clip: text, padding-box;
}

:root[data-theme="light"] .trade-pnl-type-button:not(.profit):not(.loss),
:root[data-theme="light"] .trade-side-type-button:not(.long):not(.short) {
  background: var(--field-bg);
  border-color: rgba(25, 48, 60, 0.08);
  color: var(--muted);
  box-shadow: none;
}

.hero-panel,
.panel {
  backdrop-filter: blur(18px);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: 28px;
}

.hero-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.hero-copy {
  width: 100%;
  min-width: 0;
}

.hero-brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  height: 60px;
  min-height: 60px;
  overflow: hidden;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.hero-toolbar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.app-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.control-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toolbar-select,
.toolbar-button {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  backdrop-filter: blur(12px);
}

.toolbar-select {
  min-width: 148px;
  padding: 0 14px;
}

.toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-weight: 800;
  cursor: pointer;
}

.custom-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.custom-select-field,
.menu-language-item .custom-select,
.control-field .custom-select {
  width: 100%;
}

.custom-select-filter {
  flex: 0 0 auto;
  width: min(220px, 100%);
}

.custom-select-native {
  position: absolute !important;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.custom-select-trigger {
  position: relative;
  width: 100%;
  min-height: 48px;
  padding: 12px 46px 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025)),
    var(--field-bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 28px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.custom-select-trigger:hover {
  border-color: rgba(247, 185, 85, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 32px rgba(0, 0, 0, 0.14);
}

.custom-select-trigger:focus-visible {
  outline: 0;
  border-color: rgba(247, 185, 85, 0.4);
  box-shadow:
    0 0 0 4px rgba(247, 185, 85, 0.16),
    0 14px 30px rgba(0, 0, 0, 0.14);
}

.custom-select.is-open .custom-select-trigger {
  border-color: rgba(247, 185, 85, 0.34);
  box-shadow:
    0 0 0 4px rgba(247, 185, 85, 0.12),
    0 20px 38px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px) scale(1.01);
}

.custom-select.is-disabled .custom-select-trigger {
  opacity: 0.58;
  cursor: not-allowed;
  box-shadow: none;
}

.custom-select-value {
  display: block;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.custom-select[data-tone="positive"] .custom-select-value {
  color: var(--positive);
}

.custom-select[data-tone="negative"] .custom-select-value {
  color: var(--negative);
}

.custom-select-chevron {
  position: absolute;
  top: 50%;
  right: 18px;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.7;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 220ms ease, opacity 180ms ease;
  pointer-events: none;
}

.custom-select.is-open .custom-select-chevron {
  opacity: 1;
  transform: translateY(-35%) rotate(-135deg);
}

.custom-select-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  display: grid;
  gap: 4px;
  max-height: 240px;
  padding: 8px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(12, 26, 34, 0.98), rgba(9, 21, 29, 0.98)),
    rgba(8, 19, 26, 0.98);
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.24);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.custom-select-menu-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.custom-select.is-open .custom-select-menu-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.custom-select-option {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.custom-select-option:hover,
.custom-select-option:focus-visible {
  outline: 0;
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.custom-select-option.is-selected {
  background: linear-gradient(135deg, rgba(247, 185, 85, 0.96), rgba(247, 185, 85, 0.82));
  color: #1f1503;
  box-shadow: 0 10px 20px rgba(247, 185, 85, 0.2);
}

.custom-select-option[data-tone="positive"] {
  color: var(--positive);
}

.custom-select-option[data-tone="negative"] {
  color: var(--negative);
}

.custom-select-option.is-selected[data-tone] {
  color: #1f1503;
}

.custom-select-menu .custom-select-trigger,
.menu-language-item .custom-select-trigger {
  min-height: 40px;
  height: 40px;
  padding: 8px 40px 8px 16px;
  border-radius: 12px;
  justify-content: center;
}

.custom-select-menu .custom-select-value,
.menu-language-item .custom-select-value {
  text-align: center;
}

.custom-select-filter .custom-select-trigger {
  min-height: 46px;
}

:root[data-theme="light"] .custom-select-trigger {
  border-color: rgba(25, 48, 60, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.84)),
    var(--field-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.56),
    0 12px 24px rgba(19, 39, 48, 0.08);
}

:root[data-theme="light"] .custom-select-trigger:hover {
  border-color: rgba(212, 142, 38, 0.24);
}

:root[data-theme="light"] .custom-select.is-open .custom-select-trigger {
  border-color: rgba(212, 142, 38, 0.28);
  box-shadow:
    0 0 0 4px rgba(212, 142, 38, 0.12),
    0 18px 32px rgba(19, 39, 48, 0.12);
}

:root[data-theme="light"] .custom-select-menu-panel {
  border-color: rgba(25, 48, 60, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 251, 0.96)),
    rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 40px rgba(19, 39, 48, 0.12);
}

:root[data-theme="light"] .custom-select-option:hover,
:root[data-theme="light"] .custom-select-option:focus-visible {
  background: rgba(16, 32, 42, 0.05);
}

[dir="rtl"] .hero-topbar,
[dir="rtl"] .strip-header,
[dir="rtl"] .panel-heading,
[dir="rtl"] .auth-summary,
[dir="rtl"] .app-controls,
[dir="rtl"] .menu-section-heading,
[dir="rtl"] .app-menu-header,
[dir="rtl"] .trade-main,
[dir="rtl"] .trade-meta,
[dir="rtl"] .form-actions,
[dir="rtl"] .trade-actions,
[dir="rtl"] .calendar-nav {
  direction: rtl;
}

[dir="rtl"] .hero-toolbar {
  align-items: flex-start;
}

.hero-panel::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -40px;
  top: -60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 185, 85, 0.24), transparent 70%);
}

.eyebrow,
.card-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 800;
}

h1,
h2 {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.04em;
}

h1 {
  margin: 12px 0 10px;
  max-width: 11ch;
  font-size: clamp(2.5rem, 7vw, 4.8rem);
  line-height: 0.95;
}

.subcopy {
  max-width: 580px;
  margin: 0;
  color: var(--muted);
  font-size: 1.35rem;
}

.auth-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.user-chip strong,
.user-chip span {
  display: block;
}

.user-chip strong {
  color: var(--text);
}

.user-avatar {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.hidden {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr auto;
  gap: 18px;
  align-items: center;
  margin-top: 22px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-card.is-signed-in {
  border-color: rgba(92, 225, 166, 0.28);
}

.auth-card h2 {
  margin: 6px 0 8px;
  font-size: 1.35rem;
}

.auth-copy,
.auth-message {
  margin: 0;
  color: var(--muted);
}

.auth-message {
  grid-column: 1 / -1;
}

.google-login-button {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.google-login-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.google-mark {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  color: #1c1f24;
  font-weight: 800;
}

.google-login-button:hover {
  transform: translateY(-1px);
}

.google-login-button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(247, 185, 85, 0.18);
}

.workspace-panel.is-locked {
  opacity: 0.52;
  pointer-events: none;
}

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

.metric-card,
.stat-card,
.heat-day,
.trade-card {
  border-radius: 20px;
}

.metric-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.metric-card span,
.stat-card span,
.heat-day span,
.trade-main span,
.trade-meta span,
.trade-notes,
.empty-state,
label {
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin-top: 6px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(1.05rem, 1.2vw + 0.8rem, 1.45rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.metric-card.positive strong,
.positive,
.value-positive,
.badge.badge-positive {
  color: var(--positive);
}

.metric-card.negative strong,
.negative,
.value-negative,
.badge.badge-negative {
  color: var(--negative);
}

.insight-card {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(247, 185, 85, 0.12), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(247, 185, 85, 0.18);
}

.insight-card h2 {
  margin: 6px 0 0;
  max-width: 28ch;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
}

.streak-pill,
.badge {
  white-space: nowrap;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.88rem;
}

.workspace-panel {
  margin-top: 20px;
  display: grid;
  gap: 18px;
}

.add-trade-strip {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(247, 185, 85, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    var(--panel);
}

.strip-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.strip-header h2 {
  margin: 6px 0 0;
  font-size: 1.8rem;
}

.strip-copy {
  max-width: 38ch;
  margin: 0;
  color: var(--muted);
}

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

.trade-form-strip label.full-width,
.trade-form-strip .form-actions {
  grid-column: 1 / -1;
}

.trade-side-field,
.trade-pnl-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.trade-pnl-controls-inline {
  display: grid;
  grid-template-columns: minmax(96px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.trade-side-field > *,
.trade-pnl-field > *,
.trade-pnl-controls-inline > * {
  min-width: 0;
}

.trade-side-type-button,
.trade-pnl-type-button {
  width: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 13px 14px;
  background: var(--field-bg);
  color: var(--muted);
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease;
}

.trade-side-type-button {
  width: 100%;
}

.trade-side-type-button.long,
.trade-pnl-type-button.profit {
  background:
    linear-gradient(180deg, rgba(92, 225, 166, 0.16), rgba(92, 225, 166, 0.08)),
    rgba(92, 225, 166, 0.09);
  border-color: rgba(92, 225, 166, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 14px rgba(92, 225, 166, 0.08);
  color: var(--positive-accent-text);
  text-shadow: 0 1px 0 rgba(8, 19, 26, 0.08);
}

.trade-side-type-button.short,
.trade-pnl-type-button.loss {
  background:
    linear-gradient(180deg, rgba(255, 125, 125, 0.16), rgba(255, 125, 125, 0.08)),
    rgba(255, 125, 125, 0.09);
  border-color: rgba(255, 125, 125, 0.26);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 14px rgba(255, 125, 125, 0.08);
  color: var(--negative-accent-text);
  text-shadow: 0 1px 0 rgba(8, 19, 26, 0.08);
}

:root[data-theme="light"] .trade-side-type-button.long,
:root[data-theme="light"] .trade-pnl-type-button.profit {
  background:
    linear-gradient(180deg, rgba(27, 157, 109, 0.12), rgba(27, 157, 109, 0.06)),
    rgba(27, 157, 109, 0.05);
  border-color: rgba(27, 157, 109, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 4px 10px rgba(27, 157, 109, 0.06);
  color: var(--positive-accent-text);
}

:root[data-theme="light"] .trade-side-type-button.short,
:root[data-theme="light"] .trade-pnl-type-button.loss {
  background:
    linear-gradient(180deg, rgba(213, 86, 99, 0.12), rgba(213, 86, 99, 0.06)),
    rgba(213, 86, 99, 0.05);
  border-color: rgba(213, 86, 99, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 4px 10px rgba(213, 86, 99, 0.06);
  color: var(--negative-accent-text);
}

.trade-form-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.trade-form-pair > .trade-form-split-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 148px;
  height: 100%;
}

.workspace-surface {
  --workspace-row-height: clamp(560px, 68vh, 680px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: var(--workspace-row-height);
  gap: 18px;
  align-items: stretch;
  width: min(1320px, 100%);
  margin: 0 auto;
}

.workspace-surface > .panel {
  min-height: var(--workspace-row-height);
  height: var(--workspace-row-height);
  overflow: hidden;
}

.history-stage {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top left, rgba(92, 225, 166, 0.08), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    var(--panel);
}

.stats-panel {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top center, rgba(92, 225, 166, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    var(--panel);
}

.target-panel {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top right, rgba(247, 185, 85, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    var(--panel);
}

.calendar-strip {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(247, 185, 85, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)),
    var(--panel);
}

.calendar-strip::after {
  content: "";
  position: absolute;
  inset: auto auto -100px -100px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(92, 225, 166, 0.12), transparent 68%);
  pointer-events: none;
}

.panel {
  padding: 22px;
  border-radius: 24px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin: 6px 0 0;
  font-size: 1.5rem;
}

.panel-heading-compact {
  align-items: center;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calendar-nav-button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.calendar-nav-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

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

.calendar-weekdays {
  margin-bottom: 8px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.user-chip .menu-user-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background-image:
    linear-gradient(135deg, #4285f4 0 34%, #ea4335 34% 56%, #fbbc05 56% 74%, #34a853 74% 100%),
    linear-gradient(135deg, rgba(247, 185, 85, 0.16), rgba(35, 201, 134, 0.12)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08));
  background-clip: text, padding-box, padding-box;
  -webkit-background-clip: text, padding-box, padding-box;
  color: #4285f4;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  -webkit-text-fill-color: transparent;
}

.calendar-cell {
  min-width: 0;
  min-height: 76px;
  padding: 10px 9px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.calendar-cell.outside {
  opacity: 0.35;
}

.calendar-cell.today {
  border-color: rgba(247, 185, 85, 0.45);
  box-shadow: inset 0 0 0 1px rgba(247, 185, 85, 0.15);
}

.calendar-cell.positive {
  box-shadow: inset 0 0 0 1px rgba(92, 225, 166, 0.18);
}

.calendar-cell.negative {
  box-shadow: inset 0 0 0 1px rgba(255, 125, 125, 0.18);
}

.calendar-date {
  color: var(--text);
  font-weight: 800;
  font-size: 0.9rem;
}

.calendar-pnl {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(0.72rem, 0.4vw + 0.68rem, 0.82rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.calendar-pnl.empty {
  color: rgba(255, 255, 255, 0.18);
}

.calendar-count {
  color: var(--muted);
  font-size: 0.68rem;
}

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

.stats-grid-compact {
  flex: 1;
  align-content: stretch;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: 10px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.stat-card-positive {
  background:
    linear-gradient(180deg, rgba(92, 225, 166, 0.14), rgba(92, 225, 166, 0.05)),
    rgba(92, 225, 166, 0.04);
  border: 1px solid rgba(92, 225, 166, 0.18);
}

.stat-card-positive span,
.stat-card-positive strong,
.stat-card-positive .value-positive,
.stat-card-positive .stat-value-date,
.stat-card-positive .stat-value-trailing,
.stat-card-positive .stat-value-separator {
  color: var(--positive-ink);
}

.stat-card-negative {
  background:
    linear-gradient(180deg, rgba(255, 125, 125, 0.14), rgba(255, 125, 125, 0.05)),
    rgba(255, 125, 125, 0.04);
  border: 1px solid rgba(255, 125, 125, 0.18);
}

.stat-card-negative span,
.stat-card-negative strong,
.stat-card-negative .value-negative,
.stat-card-negative .stat-value-date,
.stat-card-negative .stat-value-trailing,
.stat-card-negative .stat-value-separator {
  color: var(--negative-ink);
}

.stat-card strong {
  display: block;
  margin: 8px 0 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(0.98rem, 0.9vw + 0.7rem, 1.2rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-split-value {
  display: flex;
  align-items: baseline;
  gap: 0;
}

.stat-value-date {
  color: var(--text);
}

.stat-value-trailing {
  display: inline-flex;
  align-items: baseline;
  color: inherit;
}

.stat-value-separator {
  color: inherit;
}

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

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 13px 14px;
  color: var(--text);
  background: var(--field-bg);
  outline: none;
}

select {
  color-scheme: dark;
  background-color: var(--field-bg);
}

:root[data-theme="light"] select {
  color-scheme: light;
}

select option,
select optgroup {
  background: var(--field-bg-strong);
  color: var(--text);
}

.trade-side.long {
  color: var(--positive);
}

.trade-side.short {
  color: var(--negative);
}

.filter-select.win {
  color: var(--positive);
}

.filter-select.loss {
  color: var(--negative);
}

.filter-select.neutral {
  color: var(--text);
}

.filter-select option[value="win"] {
  color: var(--positive);
}

.filter-select option[value="loss"] {
  color: var(--negative);
}

.filter-select option[value="all"],
.filter-select option[value="month"] {
  color: var(--text);
}

.trade-side {
  font-weight: 800;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(247, 185, 85, 0.55);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

textarea {
  resize: vertical;
  min-height: 110px;
}

.trade-form-split-field textarea {
  flex: 1;
  min-height: 148px;
  height: 100%;
}

.full-width {
  grid-column: 1 / -1;
}

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

.trade-image-panel {
  gap: 8px;
}

.trade-field-title {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.trade-image-field {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 12px;
  flex: 1;
  min-height: 148px;
  height: 100%;
  padding: 14px;
  border-radius: 16px;
  background: var(--field-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.trade-image-field.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.trade-image-field.is-empty .trade-image-actions {
  justify-content: center;
}

.trade-image-preview {
  display: grid;
  align-content: stretch;
  min-height: 0;
}

.trade-image-preview img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.form-status {
  flex-basis: 100%;
  margin: 0;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 800;
}

.primary-button,
.secondary-button {
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 800;
}

.primary-button {
  background: var(--accent);
  color: #1f1503;
}

.primary-button:hover {
  filter: brightness(1.03);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

.primary-button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(247, 185, 85, 0.18);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

:root[data-theme="light"] #trade-submit-button,
:root[data-theme="light"] #target-submit-button {
  background: #f7b955;
  color: #1f1503;
  border: 0;
  box-shadow: none;
}

:root[data-theme="light"] #trade-submit-button:hover,
:root[data-theme="light"] #target-submit-button:hover {
  background: #f7b955;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

:root[data-theme="light"] #trade-submit-button:focus-visible,
:root[data-theme="light"] #target-submit-button:focus-visible {
  box-shadow:
    0 0 0 4px rgba(247, 185, 85, 0.18),
    0 12px 28px rgba(0, 0, 0, 0.14);
}

.target-summary {
  min-width: 0;
  margin-bottom: 18px;
}

.target-summary strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: clamp(1.35rem, 2vw + 0.9rem, 2.2rem);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.target-summary p {
  margin: 10px 0 0;
  color: var(--muted);
}

.target-progress-track {
  width: 100%;
  height: 12px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.target-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f7b955 0%, #5ce1a6 100%);
  transition: width 180ms ease;
}

.target-progress-fill.negative {
  background: linear-gradient(90deg, #ff7d7d 0%, #f7b955 100%);
}

.target-scale {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.85rem;
}

.target-scale span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.target-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: end;
}

.trade-list {
  display: grid;
  flex: 1;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
}

.trade-list::-webkit-scrollbar {
  width: 8px;
}

.trade-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.trade-list::-webkit-scrollbar-track {
  background: transparent;
}

.filter-select {
  min-width: 130px;
}

.trade-card {
  min-width: 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
}

.trade-card.is-editing {
  border-color: rgba(247, 185, 85, 0.28);
  box-shadow: inset 0 0 0 1px rgba(247, 185, 85, 0.14);
}

.trade-main,
.trade-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.trade-main {
  min-width: 0;
  align-items: center;
}

.trade-main > div {
  min-width: 0;
  flex: 1 1 auto;
}

.trade-main p,
.trade-notes {
  margin: 0;
}

.trade-main p {
  color: var(--text);
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-main strong {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 9ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: right;
  font-size: clamp(0.98rem, 0.8vw + 0.74rem, 1.2rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.trade-main > div > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card span,
.stat-card span,
.calendar-count {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-meta {
  margin: 12px 0 10px;
}

.trade-media {
  margin-top: 14px;
}

.trade-media img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.trade-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.trade-action-button {
  flex: 1 1 0;
  min-width: 96px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.danger-button {
  background: rgba(255, 125, 125, 0.12);
  border-color: rgba(255, 125, 125, 0.24);
  color: var(--negative);
}

.empty-state {
  margin: 0;
  padding: 28px 0 8px;
}

.scroll-top-button {
  display: none !important;
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  width: 42px;
  min-width: 42px;
  height: 42px;
  border: 1px solid rgba(247, 185, 85, 0.12);
  border-radius: 50%;
  padding: 0;
  background: rgba(8, 19, 26, 0.44);
  color: var(--text);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(14px);
  opacity: 0.36;
  font-size: 0;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.scroll-top-button::before {
  content: "↑";
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.scroll-top-button:hover {
  opacity: 0.72;
  transform: translateY(-1px);
  background: rgba(8, 19, 26, 0.7);
  border-color: rgba(247, 185, 85, 0.18);
}

.scroll-top-button span {
  display: none;
}

@media (max-width: 960px) {
  .platform-stats-section {
    padding: 24px 24px 40px;
  }

  .platform-stats-grid {
    grid-template-columns: 1fr;
  }

  .platform-stat-card {
    min-height: 124px;
  }

  .trade-form-strip,
  .workspace-surface,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .workspace-surface {
    grid-auto-rows: auto;
  }

  .trade-form-pair {
    grid-template-columns: 1fr;
  }

  .stats-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .history-stage {
    min-height: auto;
  }

  .workspace-surface > .panel {
    min-height: auto;
    height: auto;
    overflow: visible;
  }

  .trade-list {
    overflow: visible;
    padding-right: 0;
  }
}

@media (max-width: 640px) {
  .platform-stats-section {
    margin-top: 24px;
    padding: 20px 20px 34px;
  }

  .platform-stats-inner {
    width: min(100%, calc(100% - 8px));
    gap: 16px;
  }

  .platform-stat-card {
    min-height: 118px;
    padding: 14px;
    border-radius: 18px;
  }

  .platform-stat-meta {
    font-size: 0.78rem;
  }

  .app-shell {
    width: min(100%, calc(100% - 20px));
    padding-top: 12px;
  }

  .hero-panel,
  .panel {
    padding: 18px;
    border-radius: 20px;
  }

  .trade-form {
    grid-template-columns: 1fr;
  }

  .target-form {
    grid-template-columns: 1fr;
  }

  .strip-header {
    flex-direction: column;
    align-items: stretch;
  }

  .calendar-grid-month {
    gap: 6px;
  }

  .calendar-weekdays {
    gap: 6px;
  }

  .calendar-cell {
    min-height: 72px;
    padding: 10px 8px;
  }

  .calendar-pnl {
    font-size: 0.84rem;
  }

  .calendar-count {
    font-size: 0.7rem;
  }

  .stats-grid-compact {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .hero-topbar,
  .auth-card,
  .strip-header,
  .trade-image-toolbar,
  .insight-card,
  .trade-main,
  .trade-meta,
  .trade-actions,
  .form-actions,
  .panel-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .app-controls {
    flex-direction: column;
  }

  .toolbar-select,
  .toolbar-button {
    width: 100%;
  }

  .menu-shell {
    margin-left: auto;
  }

  .app-menu-panel {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 60px;
    align-items: flex-start;
    padding: 0 12px 12px;
  }

  .menu-caption {
    width: 100%;
    max-width: 100%;
  }

  .menu-row-items {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .menu-inline-item,
  .menu-language-item,
  .menu-theme-item,
  .menu-account-item {
    width: 100%;
    flex: 1 1 100%;
  }

  .menu-account-actions {
    flex-wrap: wrap;
    justify-content: center;
  }

  .menu-user-chip,
  .menu-google-login-button,
  .menu-sign-out-button {
    width: 100%;
  }

  .auth-card {
    display: flex;
  }

  .google-login-button {
    justify-self: start;
  }

  .menu-toggle-button {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .menu-layer {
    --menu-anchor-top: 12px;
    --menu-anchor-right: 12px;
  }
}
