/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d1117;
  --bg2: #161b22;
  --bg3: #1c2330;
  --border: #21262d;
  --text: #c9d1d9;
  --text-dim: #6e7681;
  --text-muted: #484f58;
  --accent: #58a6ff;
  --up: #26a69a;
  --dn: #ef5350;
  --orange: #ff8c00;
  --yellow: #ffd700;
  --green: #00c851;
  --sidebar-w: 264px;
  --status-h: 26px;
  --font: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

html, body { height: 100%; overflow: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.4;
}

.hidden { display: none !important; }

.language-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #8b98ad;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
}

.language-control > .material-symbols-rounded {
  color: #9c8cff;
  font-size: 17px;
}

.language-control-label {
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.language-switch {
  padding: 3px;
  display: inline-flex;
  gap: 3px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.32);
}

.language-switch button {
  min-width: 34px;
  padding: 6px 9px;
  border: 0;
  border-radius: 999px;
  color: #7d8aa1;
  background: transparent;
  font: 800 9px 'Inter', system-ui, sans-serif;
  letter-spacing: 0.7px;
  cursor: pointer;
  transition: 160ms ease;
}

.language-switch button:hover {
  color: #d8ddff;
  background: rgba(124, 108, 255, 0.10);
}

.language-switch button.active {
  color: #ffffff;
  background: linear-gradient(135deg, #7565ef, #8d7cff);
  box-shadow: 0 8px 24px rgba(117, 101, 239, 0.24);
}

#app {
  width: 100%;
  max-width: 100vw;
  display: flex;
  flex-direction: row;
  height: 100vh;
  min-width: 0;
  overflow: hidden;
}

#app.auth-locked { display: none; }

/* ===== poolcod authentication ===== */
.auth-view {
  --auth-surface: rgba(15, 23, 42, 0.82);
  --auth-outline: rgba(148, 163, 184, 0.18);
  --auth-primary: #7c6cff;
  --auth-primary-bright: #9c8cff;
  height: 100vh;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(420px, 0.8fr);
  grid-template-rows: minmax(100vh, auto) auto;
  align-content: start;
  background:
    radial-gradient(circle at 12% 15%, rgba(58, 91, 192, 0.18), transparent 32%),
    radial-gradient(circle at 85% 85%, rgba(124, 108, 255, 0.13), transparent 30%),
    #080d18;
  color: #eef2ff;
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
}

.auth-visual {
  position: relative;
  min-height: 100vh;
  padding: 42px clamp(40px, 6vw, 96px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid rgba(148, 163, 184, 0.08);
}

.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(100, 116, 139, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 116, 139, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
  pointer-events: none;
}

.auth-language-control {
  margin: -2px 0 22px auto;
  align-self: flex-end;
}

.auth-market-visual {
  position: absolute;
  z-index: 0;
  top: clamp(70px, 8vh, 104px);
  left: 61%;
  width: min(63%, 700px);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0.62;
  transform: translateX(-46%) perspective(1000px) rotateX(3deg) rotateY(-2deg);
  filter:
    saturate(1.08)
    drop-shadow(0 28px 45px rgba(45, 37, 111, 0.13));
  -webkit-mask-image: radial-gradient(
    ellipse 76% 72% at 51% 48%,
    #000 33%,
    rgba(0, 0, 0, 0.86) 52%,
    rgba(0, 0, 0, 0.38) 72%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 76% 72% at 51% 48%,
    #000 33%,
    rgba(0, 0, 0, 0.86) 52%,
    rgba(0, 0, 0, 0.38) 72%,
    transparent 100%
  );
  animation: liquidityFieldFloat 9s ease-in-out infinite;
}

.market-visual-glow {
  position: absolute;
  z-index: 0;
  width: 340px;
  height: 340px;
  top: -180px;
  right: -80px;
  border-radius: 50%;
  background: rgba(122, 105, 255, 0.28);
  filter: blur(64px);
  animation: liquidityGlow 6.5s ease-in-out infinite;
}

.market-visual-head {
  display: none;
}

.market-visual-head > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.market-coin {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff2cf;
  background: linear-gradient(145deg, #f7a52a, #c8700a);
  box-shadow: 0 8px 24px rgba(247, 147, 26, 0.20);
  font: 700 14px var(--font);
}

.market-visual-head p,
.market-visual-head strong,
.market-visual-head small {
  display: block;
}

.market-visual-head strong {
  color: #e7ebf4;
  font-size: 10px;
  letter-spacing: 0.2px;
}

.market-visual-head small {
  margin-top: 2px;
  color: #66748a;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.market-live {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid rgba(48, 211, 168, 0.14);
  border-radius: 999px;
  color: #72d9bc;
  background: rgba(22, 103, 83, 0.13);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.market-live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #32d3a9;
  box-shadow: 0 0 12px #32d3a9;
  animation: signalPulse 2.2s ease-in-out infinite;
}

.market-visual-stage {
  position: relative;
  height: clamp(240px, 31vh, 310px);
  overflow: hidden;
  background:
    radial-gradient(circle at 68% 34%, rgba(111, 95, 242, 0.13), transparent 31%),
    radial-gradient(circle at 34% 63%, rgba(33, 195, 167, 0.06), transparent 32%);
}

.market-visual-stage > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.market-grid {
  fill: none;
  stroke: rgba(116, 131, 155, 0.075);
  stroke-width: 1;
}

.market-heatmap rect {
  shape-rendering: crispEdges;
  filter: drop-shadow(0 0 3px rgba(20, 154, 119, 0.16));
  transform-box: fill-box;
  transform-origin: center;
  animation: liquidityBandFlow 7.2s ease-in-out infinite;
}

.market-heatmap rect:nth-child(3n + 1) { animation-delay: -1.8s; }
.market-heatmap rect:nth-child(3n + 2) { animation-delay: -4.1s; }
.market-heatmap rect:nth-child(5n) { animation-duration: 9.4s; }

.market-candles line {
  stroke-width: 1.25;
}

.market-candles rect {
  stroke-width: 0;
  shape-rendering: crispEdges;
}

.market-candles {
  animation: liquidityCandlesDrift 8s ease-in-out infinite;
}

.market-candles > g {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: liquidityCandlePulse 3.8s ease-in-out infinite;
}

.market-candles > g:nth-child(3n + 1) { animation-delay: -0.9s; }
.market-candles > g:nth-child(3n + 2) { animation-delay: -2.1s; }
.market-candles > g:nth-child(4n) { animation-duration: 4.8s; }

.market-candles .candle-up line { stroke: rgba(38, 198, 174, 0.92); }
.market-candles .candle-up rect { fill: rgba(38, 198, 174, 0.96); }
.market-candles .candle-down line { stroke: rgba(241, 84, 91, 0.90); }
.market-candles .candle-down rect { fill: rgba(241, 84, 91, 0.94); }

.market-current-line {
  stroke: rgba(66, 216, 185, 0.54);
  stroke-width: 1;
  stroke-dasharray: 4 7;
  animation: liquidityScan 5.6s ease-in-out infinite;
}

.market-price-tag {
  display: none;
}

.market-data-label {
  display: none;
}

.auth-brand,
.auth-mobile-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.poolcod-logo {
  width: 34px;
  height: 34px;
  padding: 7px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #6958f5, #9384ff);
  box-shadow: 0 9px 30px rgba(124, 108, 255, 0.32);
}

.poolcod-logo span {
  width: 4px;
  border-radius: 4px;
  background: currentColor;
}
.poolcod-logo span:nth-child(1) { height: 9px; opacity: 0.65; }
.poolcod-logo span:nth-child(2) { height: 18px; }
.poolcod-logo span:nth-child(3) { height: 13px; opacity: 0.82; }

.auth-hero {
  position: relative;
  z-index: 1;
  width: min(670px, 92%);
  margin: auto 0 38px;
}

.auth-eyebrow {
  display: inline-flex;
  padding: 7px 11px;
  margin-bottom: 24px;
  border: 1px solid rgba(139, 126, 255, 0.34);
  border-radius: 999px;
  background: rgba(124, 108, 255, 0.10);
  color: #b9afff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.auth-hero h1 {
  max-width: 620px;
  font-size: clamp(42px, 5vw, 70px);
  line-height: 1.02;
  letter-spacing: -3.3px;
  color: #f8fafc;
}

.auth-hero > p {
  max-width: 590px;
  margin-top: 24px;
  color: #94a3b8;
  font-size: clamp(15px, 1.4vw, 19px);
  line-height: 1.65;
}

.auth-feature-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.auth-feature-grid article {
  min-width: 0;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(12px);
}

.auth-feature-grid .material-symbols-rounded {
  color: #9688ff;
  font-size: 21px;
}

.auth-feature-grid strong,
.auth-feature-grid small {
  display: block;
  white-space: nowrap;
}
.auth-feature-grid strong { color: #e2e8f0; font-size: 12px; }
.auth-feature-grid small { margin-top: 3px; color: #64748b; font-size: 9px; }

.auth-community {
  position: relative;
  z-index: 2;
}

.auth-community-desktop {
  max-width: 500px;
  margin-top: 24px;
}

.auth-community-mobile {
  display: none;
  margin-top: 22px;
}

.auth-community-label {
  display: block;
  margin: 0 0 9px 2px;
  color: #64748b;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.25px;
}

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

.auth-community-links a {
  min-width: 0;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 14px;
  color: #dbe4f2;
  background: rgba(15, 23, 42, 0.52);
  text-decoration: none;
  backdrop-filter: blur(14px);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.auth-community-links a:hover {
  border-color: rgba(139, 126, 255, 0.38);
  background: rgba(29, 37, 64, 0.76);
  transform: translateY(-1px);
}

.auth-community-links a > span:nth-child(2) {
  min-width: 0;
}

.auth-community-links strong,
.auth-community-links small {
  display: block;
  white-space: nowrap;
}

.auth-community-links strong {
  color: #e8edf7;
  font-size: 11px;
}

.auth-community-links small {
  margin-top: 3px;
  overflow: hidden;
  color: #6f7e93;
  font-size: 8px;
  text-overflow: ellipsis;
}

.community-icon {
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  display: grid;
  place-items: center;
  border-radius: 9px;
}

.community-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.discord-icon {
  color: #aeb4ff;
  background: rgba(88, 101, 242, 0.16);
}

.telegram-icon {
  color: #86d9ff;
  background: rgba(39, 166, 229, 0.14);
}

.community-arrow {
  margin-left: auto;
  color: #59677b;
  font-size: 15px;
}

.auth-heatmap-preview {
  position: absolute;
  z-index: 0;
  right: -6%;
  bottom: 4%;
  width: 76%;
  height: 33%;
  opacity: 0.34;
  transform: perspective(800px) rotateX(56deg) rotateZ(-6deg);
  transform-origin: right bottom;
  filter: saturate(1.3);
}

.preview-bars {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 7px,
    rgba(21, 115, 195, 0.7) 8px 10px,
    transparent 11px 14px,
    rgba(45, 190, 132, 0.62) 15px 17px
  );
  mask-image: linear-gradient(to right, transparent, #000 18%, #000);
}

.auth-heatmap-preview svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.auth-heatmap-preview polyline {
  fill: none;
  stroke: #9c8cff;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 8px #7c6cff);
}

.auth-legal {
  position: relative;
  z-index: 1;
  color: #475569;
  font-size: 10px;
}

.public-legal-links {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  display: flex;
  gap: 14px;
}
.public-legal-links a,
.auth-policy-links a,
.billing-policy-links a {
  color: #66758b;
  text-decoration: none;
  font-size: 9px;
}
.public-legal-links a:hover,
.auth-policy-links a:hover,
.billing-policy-links a:hover { color: #aaa0ff; }

.auth-policy-links {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
}

.auth-access {
  min-height: 100vh;
  padding: 40px clamp(28px, 5vw, 76px);
  display: grid;
  place-items: center;
  background: rgba(8, 13, 24, 0.62);
}

.auth-panel {
  width: min(430px, 100%);
  padding: 34px;
  border: 1px solid var(--auth-outline);
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(24, 33, 54, 0.90), rgba(13, 20, 36, 0.94));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(24px);
}

.auth-mobile-brand { display: none; margin-bottom: 28px; }

.auth-heading h2 {
  color: #f8fafc;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -1.2px;
}
.auth-heading p {
  margin-top: 8px;
  color: #94a3b8;
  font-size: 13px;
}

.auth-tabs {
  margin: 28px 0 24px;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.45);
}
.auth-tabs button {
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  color: #7c8aa0;
  background: transparent;
  font: 600 12px 'Inter', sans-serif;
  cursor: pointer;
  transition: 160ms ease;
}
.auth-tabs button.active {
  color: #fff;
  background: rgba(124, 108, 255, 0.20);
  box-shadow: inset 0 0 0 1px rgba(150, 136, 255, 0.26);
}

.auth-form { display: flex; flex-direction: column; gap: 15px; }
.md-field { display: flex; flex-direction: column; gap: 7px; }
.md-field > span:first-child {
  color: #bac4d5;
  font-size: 11px;
  font-weight: 600;
}

.field-shell {
  width: 100%;
  min-width: 0;
  height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.32);
  transition: 160ms ease;
}
.field-shell:focus-within {
  border-color: #8273ff;
  box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.12);
  background: rgba(2, 6, 23, 0.52);
}
.field-shell > .material-symbols-rounded {
  color: #65748a;
  font-size: 20px;
}
.field-shell input {
  width: 100%;
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #f1f5f9;
  background: transparent;
  font: 500 13px 'Inter', sans-serif;
}
.field-shell input::placeholder { color: #526074; }
.toggle-password {
  padding: 4px;
  border: 0;
  color: #68778d;
  background: transparent;
  font-size: 19px;
  cursor: pointer;
}

.auth-link,
.auth-switch button {
  border: 0;
  color: #9b8eff;
  background: transparent;
  font: 600 11px 'Inter', sans-serif;
  cursor: pointer;
}
.forgot-link { align-self: flex-end; margin-top: -5px; }

.auth-submit {
  position: relative;
  height: 50px;
  margin-top: 3px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #6f5ff2, #8d7dff);
  box-shadow: 0 12px 30px rgba(100, 83, 235, 0.26);
  font: 700 13px 'Inter', sans-serif;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.auth-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 15px 35px rgba(100, 83, 235, 0.36);
}
.auth-submit:disabled { opacity: 0.66; cursor: wait; }
.submit-arrow { font-size: 19px; }
.auth-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.32);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.auth-submit.loading > span:not(.auth-spinner) { display: none; }
.auth-submit.loading .auth-spinner { display: block; }

.auth-switch {
  margin-top: 3px;
  color: #6f7e93;
  text-align: center;
  font-size: 11px;
}

.account-consent-copy {
  color: #637288;
  text-align: center;
  font-size: 8px;
  line-height: 1.5;
}
.account-consent-copy a { color: #9589ef; }

.auth-feedback,
.auth-config-notice {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 13px;
  font-size: 11px;
  line-height: 1.5;
}
.auth-feedback.info { color: #b8c5d9; background: rgba(59, 130, 246, 0.10); border: 1px solid rgba(59, 130, 246, 0.20); }
.auth-feedback.success { color: #9de4bf; background: rgba(34, 197, 94, 0.10); border: 1px solid rgba(34, 197, 94, 0.20); }
.auth-feedback.error { color: #ffb4b4; background: rgba(239, 68, 68, 0.10); border: 1px solid rgba(239, 68, 68, 0.20); }

.auth-availability-notice {
  margin-bottom: 14px;
  padding: 11px 12px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid rgba(250, 204, 21, 0.2);
  border-radius: 13px;
  color: #e8d9a3;
  background: rgba(250, 204, 21, 0.065);
}

.auth-availability-notice .material-symbols-rounded {
  color: #facc15;
  font-size: 18px;
}

.auth-availability-notice p {
  margin: 0;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.55;
}

.auth-tabs button:disabled,
.auth-form.auth-unavailable,
[data-auth-target].is-disabled {
  opacity: 0.42;
}

.auth-tabs button:disabled,
[data-auth-target].is-disabled {
  cursor: not-allowed;
}

[data-auth-target].is-disabled {
  pointer-events: auto;
  filter: saturate(0.35);
}

.auth-config-notice {
  margin-top: 22px;
  display: flex;
  gap: 11px;
  color: #e7ddad;
  background: rgba(245, 158, 11, 0.09);
  border: 1px solid rgba(245, 158, 11, 0.20);
}
.auth-config-notice .material-symbols-rounded { color: #f6b84a; }
.auth-config-notice strong { display: block; color: #ffe39a; }
.auth-config-notice p { margin-top: 3px; color: #a99d80; }
.auth-config-notice code { color: #f8cf72; }
.configuration-required .auth-tabs,
.configuration-required .auth-heading,
.configuration-required .auth-form { opacity: 0.45; }

.auth-form-title {
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.auth-form-title > .material-symbols-rounded {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #a99fff;
  border-radius: 13px;
  background: rgba(124, 108, 255, 0.14);
}
.auth-form-title h3 { color: #f1f5f9; font-size: 16px; }
.auth-form-title p { margin-top: 3px; color: #718096; font-size: 10px; }

.password-meter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: -7px;
}
.password-meter i {
  height: 3px;
  border-radius: 4px;
  background: #273349;
}
.password-meter span {
  grid-column: 1 / -1;
  margin-top: 2px;
  color: #607087;
  font-size: 9px;
}
.password-meter[data-score="1"] i:nth-child(-n+1),
.password-meter[data-score="2"] i:nth-child(-n+2),
.password-meter[data-score="3"] i:nth-child(-n+3),
.password-meter[data-score="4"] i { background: #7c6cff; }

.public-content {
  position: relative;
  grid-column: 1 / -1;
  overflow: visible;
  padding: clamp(84px, 9vw, 132px) clamp(22px, 6vw, 88px) 42px;
  border-top: 1px solid rgba(148, 163, 184, 0.09);
  background:
    linear-gradient(rgba(100, 116, 139, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 116, 139, 0.035) 1px, transparent 1px),
    #080d18;
  background-size: 56px 56px;
  color: #eef2ff;
}

.public-content-container {
  position: relative;
  z-index: 1;
  width: min(1160px, 100%);
  margin: 0 auto;
}

.public-content-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
}

.public-content-glow-one {
  top: 3%;
  left: -12%;
  width: 440px;
  height: 440px;
  background: rgba(69, 82, 190, 0.13);
}

.public-content-glow-two {
  right: -13%;
  bottom: 18%;
  width: 480px;
  height: 480px;
  background: rgba(31, 176, 147, 0.07);
}

.public-section-heading {
  max-width: 760px;
}

.public-section-heading-centered {
  margin: 0 auto;
  text-align: center;
}

.public-kicker {
  display: inline-block;
  margin-bottom: 17px;
  color: #9e92ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
}

.public-section-heading h2,
.public-reading-copy > h2,
.public-cta h2 {
  color: #f8fafc;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.08;
  letter-spacing: -2px;
}

.public-section-heading > p,
.public-reading-copy > p,
.public-cta p {
  margin-top: 18px;
  color: #8d9bb0;
  font-size: 15px;
  line-height: 1.75;
}

.public-data-grid {
  margin-top: 54px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.public-data-card {
  position: relative;
  min-height: 420px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(22, 31, 52, 0.82), rgba(10, 16, 29, 0.88));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

.public-data-card::after {
  content: '';
  position: absolute;
  right: -55px;
  bottom: -65px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  opacity: 0.16;
  filter: blur(25px);
}

.real-data-card::after { background: #24c6a6; }
.estimated-data-card::after { background: #7c6cff; }
.context-data-card::after { background: #3f8cff; }

.public-card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #b8afff;
  background: rgba(124, 108, 255, 0.13);
}

.real-data-card .public-card-icon {
  color: #78ddc0;
  background: rgba(37, 190, 157, 0.11);
}

.context-data-card .public-card-icon {
  color: #8abaff;
  background: rgba(63, 140, 255, 0.11);
}

.public-card-label {
  display: block;
  margin-top: 25px;
  color: #67758a;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.25px;
}

.public-data-card h3 {
  margin-top: 9px;
  color: #f1f5f9;
  font-size: 21px;
  letter-spacing: -0.6px;
}

.public-data-card > p {
  margin-top: 15px;
  color: #8d9bb0;
  font-size: 13px;
  line-height: 1.72;
}

.public-data-card ul {
  margin-top: 22px;
  list-style: none;
}

.public-data-card li {
  position: relative;
  padding-left: 17px;
  color: #748298;
  font-size: 11px;
  line-height: 1.6;
}

.public-data-card li + li { margin-top: 11px; }

.public-data-card li::before {
  content: '';
  position: absolute;
  top: 7px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #7c6cff;
  box-shadow: 0 0 10px rgba(124, 108, 255, 0.55);
}

.real-data-card li::before { background: #36cdaa; }
.context-data-card li::before { background: #5d9dff; }

.public-map-preview {
  position: relative;
  margin: clamp(34px, 5vw, 62px) 0 0;
}

.public-map-preview::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 9% 7% -7%;
  border-radius: 34px;
  background: linear-gradient(90deg, rgba(30, 169, 151, 0.18), rgba(105, 87, 238, 0.22));
  filter: blur(42px);
  opacity: 0.55;
  pointer-events: none;
}

.public-map-preview-open {
  position: relative;
  width: 100%;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(130, 151, 187, 0.2);
  border-radius: 26px;
  color: #f8fafc;
  background: #070d17;
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.34),
    inset 0 1px rgba(255, 255, 255, 0.05);
  cursor: zoom-in;
  isolation: isolate;
}

.public-map-preview-open::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(124, 108, 255, 0);
  transition: box-shadow 220ms ease;
  pointer-events: none;
}

.public-map-preview-open > img {
  width: 100%;
  height: auto;
  aspect-ratio: 2555 / 1308;
  display: block;
  object-fit: cover;
  transition: transform 420ms cubic-bezier(0.2, 0.75, 0.25, 1), filter 240ms ease;
}

.public-map-preview-open:hover::after,
.public-map-preview-open:focus-visible::after {
  box-shadow: inset 0 0 0 1px rgba(143, 130, 255, 0.58);
}

.public-map-preview-open:hover > img,
.public-map-preview-open:focus-visible > img {
  transform: scale(1.012);
  filter: saturate(1.08) brightness(1.04);
}

.public-map-preview-open:focus-visible {
  outline: 3px solid rgba(124, 108, 255, 0.4);
  outline-offset: 4px;
}

.public-map-preview-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(22px, 3.5vw, 42px);
  background:
    linear-gradient(180deg, transparent 48%, rgba(5, 10, 19, 0.3) 66%, rgba(5, 10, 19, 0.92) 100%),
    linear-gradient(90deg, rgba(5, 10, 19, 0.28), transparent 52%);
  text-align: left;
  pointer-events: none;
}

.public-map-preview-copy {
  max-width: 610px;
  display: grid;
  gap: 10px;
}

.public-map-preview-copy > strong {
  max-width: 560px;
  color: #f8fafc;
  font-size: clamp(18px, 2.4vw, 29px);
  line-height: 1.15;
  letter-spacing: -0.7px;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.72);
}

.public-map-preview-badge {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #94e6d2;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 1.25px;
}

.public-map-preview-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #36d5ae;
  box-shadow: 0 0 12px rgba(54, 213, 174, 0.9);
}

.public-map-preview-action {
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  color: #e9e6ff;
  background: rgba(13, 18, 33, 0.77);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
  font-size: 11px;
  font-weight: 650;
}

.public-map-preview-action .material-symbols-rounded { font-size: 18px; }

.public-map-preview > figcaption {
  margin-top: 13px;
  color: #627086;
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.map-preview-dialog {
  width: min(96vw, 1840px);
  max-width: none;
  height: min(92dvh, 1050px);
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(137, 151, 181, 0.2);
  border-radius: 24px;
  color: #eef2ff;
  background: #080e18;
  box-shadow: 0 38px 140px rgba(0, 0, 0, 0.72);
}

.map-preview-dialog[open] { animation: mapPreviewEnter 220ms ease-out; }

.map-preview-dialog::backdrop {
  background: rgba(2, 5, 11, 0.82);
  backdrop-filter: blur(12px) saturate(0.7);
}

.map-preview-dialog-shell {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.map-preview-dialog-header,
.map-preview-dialog-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 15px 18px;
  background: rgba(11, 17, 30, 0.96);
}

.map-preview-dialog-header { border-bottom: 1px solid rgba(148, 163, 184, 0.12); }
.map-preview-dialog-footer { border-top: 1px solid rgba(148, 163, 184, 0.12); }

.map-preview-dialog-header .public-card-label {
  margin: 0 0 3px;
  color: #8f84ee;
}

.map-preview-dialog-header h2 {
  color: #f3f6fc;
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: -0.25px;
}

.map-preview-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  cursor: zoom-in;
  background:
    linear-gradient(rgba(100, 116, 139, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 116, 139, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 45%, rgba(42, 65, 112, 0.15), transparent 55%),
    #050a12;
  background-size: 42px 42px, 42px 42px, auto, auto;
}

.map-preview-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 55px rgba(0, 0, 0, 0.32);
  pointer-events: none;
}

.map-preview-stage > img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
  pointer-events: none;
  transform-origin: center;
  will-change: transform;
  transition: transform 150ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.map-preview-stage.is-zoomed { cursor: grab; }
.map-preview-stage.is-dragging { cursor: grabbing; }
.map-preview-stage.is-dragging > img { transition: none; }

.map-preview-help {
  margin: 0;
  color: #718097;
  font-size: 10px;
  line-height: 1.5;
}

.map-preview-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.map-preview-icon-button,
.map-preview-reset {
  min-width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  color: #d6dbea;
  background: rgba(124, 108, 255, 0.09);
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease, transform 150ms ease;
}

.map-preview-reset {
  min-width: 66px;
  padding: 0 10px;
  color: #a99fff;
  font-size: 10px;
  font-weight: 700;
}

.map-preview-icon-button:hover,
.map-preview-icon-button:focus-visible,
.map-preview-reset:hover,
.map-preview-reset:focus-visible {
  border-color: rgba(139, 124, 255, 0.52);
  color: #fff;
  background: rgba(124, 108, 255, 0.2);
  outline: none;
}

.map-preview-icon-button:active,
.map-preview-reset:active { transform: scale(0.95); }

.map-preview-icon-button .material-symbols-rounded { font-size: 20px; }

@keyframes mapPreviewEnter {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.public-pricing {
  margin-top: clamp(100px, 12vw, 154px);
}

.public-pricing-grid {
  margin-top: clamp(60px, 7vw, 90px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.5vw, 28px);
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.public-pricing-card {
  position: relative;
  min-width: 0;
  padding: 28px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(22, 31, 52, 0.82), rgba(10, 16, 29, 0.88));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
}

.public-pricing-card::after {
  content: '';
  position: absolute;
  right: -55px;
  bottom: -65px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  opacity: 0.16;
  background: radial-gradient(circle, rgba(124, 108, 255, 0.55), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.public-pricing-featured {
  border-color: rgba(124, 108, 255, 0.28);
  background: linear-gradient(145deg, rgba(26, 35, 62, 0.92), rgba(14, 22, 42, 0.96));
}

.public-pricing-featured::after {
  opacity: 0.24;
  background: radial-gradient(circle, rgba(124, 108, 255, 0.75), transparent 70%);
}

.public-pricing-trial {
  border-color: rgba(68, 211, 166, 0.24);
  background:
    radial-gradient(circle at 10% 0%, rgba(52, 211, 153, 0.11), transparent 38%),
    linear-gradient(145deg, rgba(19, 34, 48, 0.9), rgba(9, 17, 29, 0.94));
}

.public-pricing-trial::after {
  opacity: 0.2;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.72), transparent 70%);
}

.public-pricing-trial .public-card-icon {
  color: #62ddb4;
  background: rgba(52, 211, 153, 0.1);
}

.public-pricing-head .public-card-icon {
  color: #9e92ff;
  background: rgba(124, 108, 255, 0.11);
}

.public-pricing-badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7c6cff, #5b4dc7);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.public-pricing-trial-badge {
  background: linear-gradient(135deg, #238f72, #176b58);
  box-shadow: 0 8px 22px rgba(35, 143, 114, 0.18);
}

.public-pricing-price {
  margin-top: 22px;
}

.public-pricing-price b {
  display: block;
  color: #f8fafc;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
}

.public-pricing-price small {
  display: block;
  margin-top: 6px;
  color: #67758a;
  font-size: 12px;
  font-weight: 500;
}

.public-pricing-desc {
  margin-top: 16px;
  color: #8d9bb0;
  font-size: 13px;
  line-height: 1.72;
}

.public-pricing-benefits {
  margin-top: 20px;
  list-style: none;
  flex-grow: 1;
}

.public-pricing-benefits li {
  position: relative;
  padding-left: 20px;
  color: #748298;
  font-size: 11px;
  line-height: 1.6;
}

.public-pricing-benefits li + li {
  margin-top: 11px;
}

.public-pricing-benefits li::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6bd69b;
  box-shadow: 0 0 10px rgba(107, 214, 155, 0.55);
}

.public-pricing-cta {
  margin-top: 26px;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c6cff, #5b4dc7);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.public-pricing-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(124, 108, 255, 0.3);
}

.public-pricing-trial .public-pricing-cta {
  background: linear-gradient(135deg, #2da986, #217a66);
}

.public-pricing-trial .public-pricing-cta:hover {
  box-shadow: 0 8px 24px rgba(45, 169, 134, 0.26);
}

.public-reading-layout {
  margin-top: clamp(90px, 11vw, 142px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.78fr);
  align-items: center;
  gap: clamp(45px, 8vw, 110px);
}

.public-reading-copy {
  max-width: 650px;
}

.public-steps {
  margin-top: 36px;
  display: grid;
  gap: 13px;
  list-style: none;
}

.public-steps li {
  padding: 17px 18px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 13px;
  border: 1px solid rgba(148, 163, 184, 0.11);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.48);
}

.public-steps li > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #a99fff;
  background: rgba(124, 108, 255, 0.12);
  font-size: 10px;
  font-weight: 700;
}

.public-steps h3 {
  color: #e8edf6;
  font-size: 13px;
}

.public-steps p {
  margin-top: 5px;
  color: #718096;
  font-size: 11px;
  line-height: 1.6;
}

.public-heatmap-explainer {
  position: relative;
  min-height: 430px;
  padding: 27px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 28px;
  background:
    radial-gradient(circle at 80% 10%, rgba(124, 108, 255, 0.13), transparent 36%),
    rgba(10, 16, 29, 0.78);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.24);
}

.public-heatmap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.public-heatmap-head small,
.public-heatmap-head strong {
  display: block;
}

.public-heatmap-head small {
  color: #64748b;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.public-heatmap-head strong {
  margin-top: 5px;
  color: #e7edf6;
  font-size: 14px;
}

.public-heatmap-head > span {
  color: #66758a;
  font-size: 9px;
}

.public-heatmap-bands {
  height: 238px;
  margin-top: 25px;
  padding: 13px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.public-heatmap-bands i {
  height: 10px;
  border-radius: 999px;
  transform-origin: center;
  animation: publicBandPulse 7s ease-in-out infinite;
}

.public-heatmap-bands i:nth-child(1) { width: 72%; background: #063d85; animation-delay: -1s; }
.public-heatmap-bands i:nth-child(2) { width: 86%; margin-left: 8%; background: #075c94; animation-delay: -4s; }
.public-heatmap-bands i:nth-child(3) { width: 62%; margin-left: 25%; background: #087f8c; animation-delay: -2s; }
.public-heatmap-bands i:nth-child(4) { width: 94%; background: #169d67; animation-delay: -5s; }
.public-heatmap-bands i:nth-child(5) { width: 76%; margin-left: 18%; background: #69bc35; animation-delay: -3s; }
.public-heatmap-bands i:nth-child(6) { width: 88%; margin-left: 4%; background: #c7d429; animation-delay: -6s; }
.public-heatmap-bands i:nth-child(7) { width: 68%; margin-left: 27%; background: #f1d719; animation-delay: -2.5s; }
.public-heatmap-bands i:nth-child(8) { width: 91%; background: linear-gradient(90deg, #d2cf25, #ff8b00); animation-delay: -4.5s; }

.public-heatmap-scale {
  display: flex;
  justify-content: space-between;
  color: #5f6e83;
  font-size: 8px;
}

.public-heatmap-explainer > p {
  margin-top: 22px;
  color: #718096;
  font-size: 11px;
  line-height: 1.65;
}

.public-markets {
  margin-top: clamp(100px, 12vw, 154px);
}

.public-market-list {
  margin-top: 38px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.public-market-list > span {
  min-width: 0;
  padding: 17px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(148, 163, 184, 0.11);
  border-radius: 15px;
  background: rgba(15, 23, 42, 0.46);
}

.public-market-list img {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.24));
}

.public-market-list b {
  flex: 0 0 auto;
  color: #ddd9ff;
  font-size: 12px;
}

.public-market-list small {
  overflow: hidden;
  color: #637288;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-faq {
  margin-top: clamp(100px, 12vw, 154px);
  display: grid;
  grid-template-columns: minmax(280px, 0.68fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(40px, 8vw, 105px);
}

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

.public-faq-list details {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 15px;
  background: rgba(15, 23, 42, 0.48);
}

.public-faq-list summary {
  position: relative;
  padding: 18px 50px 18px 19px;
  color: #dfe6f1;
  font-size: 12px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.public-faq-list summary::-webkit-details-marker { display: none; }

.public-faq-list summary::after {
  content: '+';
  position: absolute;
  top: 14px;
  right: 18px;
  color: #998cff;
  font-size: 21px;
  font-weight: 400;
  transition: transform 160ms ease;
}

.public-faq-list details[open] summary::after { transform: rotate(45deg); }

.public-faq-list details p {
  padding: 0 19px 19px;
  color: #718096;
  font-size: 11px;
  line-height: 1.7;
}

.public-guides {
  margin-top: clamp(100px, 12vw, 154px);
}

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

.public-guide-card {
  position: relative;
  min-height: 245px;
  padding: 27px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(91, 77, 199, 0.10), transparent 42%),
    linear-gradient(145deg, rgba(19, 28, 48, 0.82), rgba(9, 15, 28, 0.90));
  color: inherit;
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.public-guide-card:hover {
  transform: translateY(-3px);
  border-color: rgba(158, 146, 255, 0.34);
}

.public-guide-featured {
  border-color: rgba(124, 108, 255, 0.28);
  background:
    radial-gradient(circle at 92% 2%, rgba(124, 108, 255, 0.20), transparent 40%),
    radial-gradient(circle at 4% 110%, rgba(31, 176, 147, 0.10), transparent 38%),
    linear-gradient(145deg, rgba(24, 33, 58, 0.93), rgba(11, 18, 33, 0.94));
}

.public-guide-number {
  position: absolute;
  top: 22px;
  right: 24px;
  color: rgba(171, 163, 255, 0.22);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -2px;
}

.public-guide-card .public-card-label {
  margin-top: 0;
}

.public-guide-card h3 {
  max-width: 82%;
  margin-top: 11px;
  color: #eef2ff;
  font-size: 21px;
  letter-spacing: -0.5px;
}

.public-guide-card p {
  max-width: 500px;
  margin-top: 15px;
  color: #7d8ba0;
  font-size: 12px;
  line-height: 1.7;
}

.public-guide-card strong {
  position: absolute;
  bottom: 26px;
  left: 27px;
  color: #aaa0ff;
  font-size: 11px;
  font-weight: 600;
}

.public-guides-more {
  position: relative;
  margin-top: 16px;
  min-height: 132px;
  padding: 24px 26px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  overflow: hidden;
  border: 1px solid rgba(139, 126, 255, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at 8% 30%, rgba(124, 108, 255, 0.15), transparent 27%),
    radial-gradient(circle at 88% 120%, rgba(31, 176, 147, 0.09), transparent 34%),
    linear-gradient(120deg, rgba(18, 27, 47, 0.9), rgba(9, 15, 28, 0.94));
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.16);
}

.public-guides-more::after {
  content: '';
  position: absolute;
  top: 0;
  right: 20%;
  width: 32%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(148, 135, 255, 0.72), transparent);
  box-shadow: 0 0 18px rgba(124, 108, 255, 0.5);
}

.public-guides-more-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(155, 143, 255, 0.25);
  border-radius: 17px;
  color: #b4aaff;
  background: linear-gradient(145deg, rgba(124, 108, 255, 0.2), rgba(31, 176, 147, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.public-guides-more-icon .material-symbols-rounded {
  font-size: 25px;
}

.public-guides-more-copy {
  min-width: 0;
}

.public-guides-more-copy .public-card-label {
  margin: 0 0 8px;
}

.public-guides-more-copy h3 {
  color: #eef2ff;
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.25;
  letter-spacing: -0.35px;
}

.public-guides-more-copy p {
  max-width: 740px;
  margin-top: 8px;
  color: #7d8ba0;
  font-size: 11px;
  line-height: 1.65;
}

.public-guides-more-cta {
  min-width: 154px;
  padding: 13px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(151, 137, 255, 0.28);
  border-radius: 13px;
  color: #d9d4ff;
  background: rgba(103, 86, 223, 0.13);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.public-guides-more-cta:hover {
  transform: translateY(-2px);
  border-color: rgba(163, 151, 255, 0.52);
  background: rgba(103, 86, 223, 0.22);
}

.public-soro {
  position: relative;
  isolation: isolate;
  margin-top: clamp(100px, 12vw, 154px);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px;
}

.public-soro::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -56px -34px;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 9%, rgba(124, 108, 255, 0.09), transparent 30%),
    radial-gradient(circle at 84% 48%, rgba(31, 176, 147, 0.055), transparent 34%);
}

.public-soro > .public-section-heading {
  grid-column: span 2;
  align-self: stretch;
  padding: clamp(22px, 3vw, 34px) clamp(18px, 3vw, 32px) 32px 0;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.public-soro > .public-section-heading::after {
  content: '';
  width: 72px;
  height: 2px;
  margin-top: 30px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8172ff, rgba(31, 176, 147, 0.15));
  box-shadow: 0 0 22px rgba(124, 108, 255, 0.32);
}

.public-soro .public-section-heading h2 {
  font-size: clamp(34px, 3.35vw, 46px);
}

.public-soro .public-section-heading > p {
  max-width: 34ch;
}

.public-articles-link {
  width: fit-content;
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #aaa0ff;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.public-articles-link:hover {
  color: #d5d0ff;
  transform: translateX(3px);
}

.public-soro-card {
  position: relative;
  grid-column: span 4;
  min-height: 320px;
  padding: clamp(18px, 3vw, 28px);
  overflow: hidden;
  border: 1px solid rgba(139, 126, 255, 0.17);
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 0%, rgba(124, 108, 255, 0.16), transparent 34%),
    radial-gradient(circle at 10% 110%, rgba(31, 176, 147, 0.10), transparent 36%),
    linear-gradient(145deg, rgba(17, 26, 45, 0.88), rgba(9, 15, 28, 0.94));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.22);
}

.public-soro-card:has(.poolcod-blog-card),
.public-soro-card:has(.poolcod-blog-card) #poolcod-blog {
  display: contents;
}

.public-soro-card:has(.poolcod-blog-card)::before,
.public-soro-card:has(.poolcod-blog-card)::after {
  content: none;
}

.public-soro-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 72%);
}

.public-soro-card::after {
  content: '';
  position: absolute;
  right: -90px;
  top: -110px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(124, 108, 255, 0.18);
  filter: blur(38px);
  pointer-events: none;
}

#poolcod-blog {
  position: relative;
  z-index: 1;
  min-height: 240px;
  color: #dfe6f1;
}

.poolcod-blog-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

#poolcod-blog .poolcod-blog-card {
  grid-column: span 3;
  display: flex;
  min-width: 0;
  height: 100%;
  padding: 0;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(139, 126, 255, 0.20);
  border-radius: 18px;
  color: #dfe6f1;
  background:
    radial-gradient(circle at 100% 0%, rgba(124, 108, 255, 0.12), transparent 40%),
    linear-gradient(150deg, rgba(20, 29, 49, 0.96), rgba(10, 16, 29, 0.98));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

#poolcod-blog .poolcod-blog-card:nth-child(-n + 2) {
  grid-column: span 2;
}

#poolcod-blog .poolcod-blog-card:hover {
  border-color: rgba(151, 137, 255, 0.48);
  transform: translateY(-3px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
}

#poolcod-blog .poolcod-blog-card-image {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  display: block;
  flex: none;
  object-fit: cover;
  border-radius: 0;
}

#poolcod-blog .poolcod-blog-card-content {
  min-width: 0;
  padding: 16px 17px 18px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

#poolcod-blog .poolcod-blog-card-title {
  margin: 0 0 9px;
  display: -webkit-box;
  overflow: hidden;
  color: #f2f4fb;
  font-size: clamp(14px, 1.22vw, 17px);
  font-weight: 680;
  line-height: 1.3;
  letter-spacing: -0.25px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#poolcod-blog .poolcod-blog-card-excerpt {
  margin: 0 0 13px;
  display: -webkit-box;
  overflow: hidden;
  color: #8e9bb0;
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

#poolcod-blog .poolcod-blog-card-date {
  margin-top: auto;
  color: #647187;
  font-size: 10px;
  letter-spacing: 0.15px;
}

#poolcod-blog .poolcod-blog-card:last-child:nth-child(odd) {
  width: calc(50% - 9px);
  grid-column: 1 / -1;
  justify-self: center;
}

.poolcod-blog-empty {
  grid-column: 1 / -1;
  color: #718096;
  font-size: 12px;
}

.public-soro-card :where(a) {
  color: #aaa0ff;
}

.public-soro-card :where(img, iframe) {
  max-width: 100%;
  border-radius: 16px;
}

.public-cta {
  margin-top: clamp(100px, 12vw, 154px);
  padding: clamp(30px, 5vw, 55px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  overflow: hidden;
  border: 1px solid rgba(139, 126, 255, 0.20);
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 15%, rgba(124, 108, 255, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(24, 33, 54, 0.88), rgba(13, 20, 36, 0.92));
}

.public-cta > div { max-width: 720px; }

.public-cta a {
  min-width: 160px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #6f5ff2, #8d7dff);
  box-shadow: 0 14px 34px rgba(100, 83, 235, 0.25);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.public-cta a .material-symbols-rounded { font-size: 17px; }

.public-content-footer {
  margin-top: 70px;
  padding-top: 27px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 25px;
  border-top: 1px solid rgba(148, 163, 184, 0.10);
}

.public-content-footer .auth-brand {
  font-size: 16px;
}

.public-content-footer .poolcod-logo {
  width: 29px;
  height: 29px;
  padding: 6px;
  border-radius: 9px;
}

.public-content-footer p {
  color: #536175;
  font-size: 9px;
}

.public-content-footer nav {
  display: flex;
  gap: 16px;
}

.public-content-footer a {
  color: #66758b;
  font-size: 9px;
  text-decoration: none;
}

.public-content-footer a:hover { color: #aaa0ff; }

.material-symbols-rounded {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ===== Account menu ===== */
#account-control {
  position: relative;
  flex-shrink: 0;
  padding: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.10);
  background: rgba(8, 12, 19, 0.82);
}
#account-button {
  width: 100%;
  height: 46px;
  max-width: none;
  padding: 0 9px 0 5px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  font: 500 10px var(--font);
  cursor: pointer;
}
#account-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #6958f5, #9384ff);
  font-weight: 700;
}
#account-email {
  max-width: 160px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#account-button > .material-symbols-rounded { color: var(--text-dim); font-size: 17px; }

.account-popover {
  position: absolute;
  z-index: 100;
  top: auto;
  right: 10px;
  bottom: 64px;
  left: 10px;
  width: auto;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 13px;
  background: rgba(22, 27, 34, 0.97);
  box-shadow: 0 18px 45px rgba(0,0,0,0.42);
  backdrop-filter: blur(16px);
}
.account-caption { display: block; color: #6e7681; font-size: 9px; letter-spacing: 1px; }
.account-popover strong {
  display: block;
  margin: 7px 0 12px;
  overflow: hidden;
  color: #e6edf3;
  font-size: 11px;
  text-overflow: ellipsis;
}
#btn-logout {
  width: 100%;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  color: #ff9b9b;
  background: rgba(239, 83, 80, 0.10);
  font: 600 10px var(--font);
  cursor: pointer;
}
#btn-logout .material-symbols-rounded { font-size: 17px; }

.account-discord {
  width: 100%;
  margin-bottom: 7px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  color: #b8b5ff;
  background: rgba(88, 101, 242, 0.13);
  font: 600 10px var(--font);
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}

.account-discord:hover {
  color: #dddfff;
  background: rgba(88, 101, 242, 0.23);
}

.discord-mark {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  color: #8d95ff;
  font-size: 16px;
}

.account-link-arrow {
  margin-left: auto;
  color: #747bb3;
  font-size: 15px;
}

@media (max-width: 980px) {
  .auth-view { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-access { padding: 28px 18px; }
  .auth-mobile-brand { display: flex; }
  .auth-community-mobile { display: block; }
  .auth-panel { padding: 28px 24px; }
  .public-data-grid { grid-template-columns: 1fr; }
  .public-data-card { min-height: 0; }
  .public-pricing-grid { grid-template-columns: 1fr; max-width: 560px; }
  .public-reading-layout,
  .public-faq { grid-template-columns: 1fr; }
  .public-soro { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-soro > .public-section-heading,
  .public-soro-card { grid-column: 1 / -1; }
  .public-soro > .public-section-heading {
    max-width: 760px;
    padding-right: 0;
  }
  #poolcod-blog .poolcod-blog-card,
  #poolcod-blog .poolcod-blog-card:nth-child(-n + 2) { grid-column: span 1; }
  .public-guides-grid { grid-template-columns: 1fr; }
  .public-reading-copy { max-width: none; }
  .public-market-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .public-soro { grid-template-columns: minmax(0, 1fr); }

  .public-map-preview-overlay {
    padding: 18px;
  }

  .public-map-preview-copy > strong { font-size: 17px; }

  .public-map-preview-action {
    width: 40px;
    height: 40px;
    min-width: 40px;
    justify-content: center;
    padding: 0;
    border-radius: 11px;
  }

  .public-map-preview-action > span:last-child { display: none; }

  .map-preview-dialog {
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .map-preview-dialog-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .map-preview-controls { justify-content: center; }

  .map-preview-controls > * { flex: 1; }

  .public-guides-more {
    padding: 22px;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .public-guides-more-cta {
    width: 100%;
    grid-column: 1 / -1;
  }

  #poolcod-blog .poolcod-blog-card,
  #poolcod-blog .poolcod-blog-card:nth-child(-n + 2) { grid-column: auto; }

  #poolcod-blog .poolcod-blog-card:last-child:nth-child(odd) {
    width: 100%;
    grid-column: auto;
  }
}

@media (max-height: 760px) and (min-width: 981px) {
  .auth-market-visual {
    top: 76px;
    width: 57%;
    opacity: 0.48;
  }
  .market-visual-stage { height: 128px; }
  .market-visual-head { height: 46px; }
  .market-price-tag { right: 6px; }
}

@media (max-width: 520px) {
  .auth-access { align-items: start; }
  .auth-panel {
    margin-top: 18px;
    padding: 24px 18px;
    border-radius: 22px;
  }
  .auth-heading h2 { font-size: 26px; }
  .auth-community-links { grid-template-columns: 1fr; }
  .public-content { padding: 70px 18px 28px; }
  .public-section-heading h2,
  .public-reading-copy > h2,
  .public-cta h2 {
    font-size: 30px;
    letter-spacing: -1.3px;
  }
  .public-data-card,
  .public-heatmap-explainer,
  .public-pricing-card { padding: 22px; border-radius: 20px; }
  .public-map-preview-open { border-radius: 18px; }
  .public-map-preview-copy > strong { display: none; }
  .public-map-preview-badge { font-size: 8px; letter-spacing: 0.9px; }
  .public-map-preview > figcaption { padding: 0 12px; }
  .public-pricing-price b { font-size: 28px; }
  .public-reading-layout { gap: 42px; }
  .public-heatmap-explainer { min-height: 390px; }
  .public-market-list { grid-template-columns: 1fr 1fr; gap: 8px; }
  .public-market-list > span { padding: 13px; }
  .public-soro-card { min-height: 260px; border-radius: 22px; }
  .public-guide-card { min-height: 230px; padding: 23px; }
  .public-guide-card strong { left: 23px; bottom: 23px; }
  .public-cta { padding: 28px 22px; flex-direction: column; align-items: stretch; }
  .public-cta a { width: 100%; }
  .public-content-footer {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .public-content-footer nav { flex-wrap: wrap; }
  #account-email { display: none; }
}

/* ===== Wompi subscriptions ===== */
.billing-view {
  height: 100vh;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  color: #eef2ff;
  background:
    radial-gradient(circle at 10% 10%, rgba(61, 85, 177, 0.16), transparent 30%),
    radial-gradient(circle at 88% 90%, rgba(124, 108, 255, 0.12), transparent 28%),
    #080d18;
  font-family: 'Inter', system-ui, sans-serif;
}

.billing-header {
  height: 72px;
  padding: 0 clamp(22px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
  background: rgba(8, 13, 24, 0.76);
  backdrop-filter: blur(18px);
}

.billing-user {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #8390a4;
  font-size: 11px;
}

.billing-language-control .language-control-label {
  display: none;
}

.billing-user button {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 9px;
  color: #b5c0d1;
  background: rgba(15, 23, 42, 0.64);
  font: 600 10px 'Inter', sans-serif;
  cursor: pointer;
}
.billing-user .material-symbols-rounded { font-size: 16px; }

.billing-content {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(45px, 7vw, 90px) 0 70px;
}

.billing-intro {
  max-width: 710px;
  margin-bottom: 38px;
}
.billing-intro h2 {
  color: #f8fafc;
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -2.5px;
  line-height: 1.05;
}
.billing-intro p {
  max-width: 680px;
  margin-top: 16px;
  color: #8795aa;
  font-size: 14px;
  line-height: 1.65;
}

.billing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(370px, 0.78fr);
  gap: 24px;
  align-items: start;
}

.billing-offer-column {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 18px;
}

.plan-column,
.payment-card {
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(24, 33, 54, 0.86), rgba(13, 20, 36, 0.92));
  box-shadow: 0 24px 70px rgba(0,0,0,0.24);
}

.trial-card {
  position: relative;
  isolation: isolate;
  padding: 26px;
  overflow: hidden;
  border: 1px solid rgba(130, 115, 255, 0.32);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(31, 38, 71, 0.94), rgba(14, 20, 38, 0.96));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.23), inset 0 1px rgba(255, 255, 255, 0.035);
}

.trial-glow {
  position: absolute;
  z-index: -1;
  top: -110px;
  right: -75px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(124, 108, 255, 0.24);
  filter: blur(55px);
  pointer-events: none;
}

.trial-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.trial-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(182, 173, 255, 0.24);
  border-radius: 14px;
  color: #f1eeff;
  background: linear-gradient(145deg, #6757e8, #8d7eff);
  box-shadow: 0 12px 28px rgba(98, 80, 223, 0.30);
  font-size: 21px;
}

.trial-badge {
  padding: 6px 9px;
  border: 1px solid rgba(112, 226, 177, 0.24);
  border-radius: 999px;
  color: #7fe0b0;
  background: rgba(32, 133, 94, 0.12);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
}

.trial-card h3 {
  max-width: 480px;
  margin-top: 20px;
  color: #f8fafc;
  font-size: clamp(21px, 2.5vw, 28px);
  letter-spacing: -0.8px;
  line-height: 1.18;
}

.trial-copy {
  max-width: 540px;
  margin-top: 11px;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.65;
}

.trial-details {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.trial-details span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #aab6c8;
  font-size: 9px;
  line-height: 1.45;
}

.trial-details i {
  color: #a89cff;
  font-size: 16px;
}

.trial-cta {
  width: 100%;
  min-height: 48px;
  margin-top: 21px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(100deg, #6151df, #8979ff);
  box-shadow: 0 14px 32px rgba(91, 74, 210, 0.26);
  font: 700 12px 'Inter', sans-serif;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.trial-cta:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 17px 38px rgba(91, 74, 210, 0.36);
}

.trial-cta:disabled { cursor: wait; opacity: 0.72; }
.trial-arrow { font-size: 18px; }
.trial-cta.loading > span:not(.auth-spinner) { display: none; }
.trial-cta.loading .auth-spinner { display: block; }

.trial-note {
  margin-top: 10px;
  display: block;
  color: #66758a;
  font-size: 8px;
  text-align: center;
}

.billing-plans { display: flex; flex-direction: column; gap: 12px; }

.billing-plan {
  position: relative;
  width: 100%;
  min-height: 104px;
  padding: 19px 18px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 18px;
  color: #dfe7f3;
  background: rgba(2, 6, 23, 0.27);
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}
.billing-plan:hover { border-color: rgba(137, 121, 255, 0.42); }
.billing-plan.selected {
  border-color: #8171ff;
  background: rgba(124, 108, 255, 0.11);
  box-shadow: inset 0 0 0 1px rgba(124,108,255,0.20);
}
.billing-plan em {
  position: absolute;
  top: 0;
  right: 0;
  padding: 5px 10px;
  border-radius: 0 17px 0 11px;
  color: #d9d2ff;
  background: rgba(124, 108, 255, 0.36);
  font: 700 8px 'Inter', sans-serif;
  letter-spacing: 0.7px;
}
.plan-check {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border: 1px solid #526078;
  border-radius: 50%;
  color: transparent;
  font-size: 16px;
}
.billing-plan.selected .plan-check {
  color: #fff;
  border-color: #8171ff;
  background: #7565ef;
}
.plan-copy strong,
.plan-copy small,
.plan-price b,
.plan-price small { display: block; }
.plan-copy strong { color: #edf2f7; font: 700 14px 'Inter', sans-serif; }
.plan-copy small { margin-top: 5px; color: #6f7e93; font: 500 10px 'Inter', sans-serif; }
.plan-price { text-align: right; }
.plan-price b { color: #fff; font: 700 17px 'Inter', sans-serif; }
.plan-price small { margin-top: 4px; color: #77869b; font: 500 9px 'Inter', sans-serif; }

.plan-skeleton {
  height: 104px;
  border-radius: 18px;
  background: linear-gradient(90deg, #121c30, #1b2942, #121c30);
  background-size: 200% 100%;
  animation: skeleton 1.3s ease infinite;
}
@keyframes skeleton { to { background-position: -200% 0; } }

.billing-benefits {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.billing-benefits span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #91a0b5;
  font-size: 10px;
}
.billing-benefits i { color: #6bd69b; font-size: 17px; }

.payment-card { display: flex; flex-direction: column; gap: 15px; }
.payment-title {
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.payment-title > .material-symbols-rounded {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #aaa0ff;
  background: rgba(124, 108, 255, 0.14);
}
.payment-title h2 { color: #f3f6fb; font-size: 17px; }
.payment-title p { margin-top: 3px; color: #6e7d91; font-size: 9px; }
.payment-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.payment-grid > .md-field { min-width: 0; }
.payment-grid .field-shell { padding-inline: 12px; }
.card-brand { color: #a99fff; font-size: 9px; font-weight: 800; }

.payment-unavailable {
  padding: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 13px;
  color: #ccb978;
  background: rgba(245, 158, 11, 0.08);
}
.payment-unavailable > .material-symbols-rounded {
  color: #f0b54c;
  font-size: 21px;
}
.payment-unavailable strong {
  display: block;
  color: #f6d98c;
  font-size: 11px;
}
.payment-unavailable p {
  margin-top: 4px;
  color: #9d906f;
  font-size: 9px;
  line-height: 1.5;
}
.payment-unavailable button {
  margin-top: 9px;
  padding: 7px 9px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 8px;
  color: #f3ce78;
  background: rgba(245, 158, 11, 0.08);
  font: 600 9px 'Inter', sans-serif;
  cursor: pointer;
}
.payment-result {
  position: relative;
  padding: 14px 15px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  overflow: hidden;
  border: 1px solid rgba(129, 113, 255, 0.24);
  border-radius: 16px;
  color: #cbd5e1;
  background:
    linear-gradient(135deg, rgba(124, 108, 255, 0.12), rgba(15, 23, 42, 0.34)),
    rgba(8, 13, 24, 0.66);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  animation: paymentResultIn 220ms ease both;
}
.payment-result::after {
  content: "";
  position: absolute;
  inset: auto 16px 0 56px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 108, 255, 0.55), transparent);
}
.payment-result.hidden { display: none; }
.payment-result-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #b9afff;
  background: rgba(124, 108, 255, 0.16);
  font-size: 20px;
}
.payment-result strong {
  display: block;
  color: #f4f7fb;
  font-size: 12px;
  line-height: 1.4;
}
.payment-result p {
  margin-top: 4px;
  color: #8795aa;
  font-size: 10px;
  line-height: 1.55;
}
.payment-result.processing .payment-result-icon {
  animation: paymentResultSpin 1.1s linear infinite;
}
.payment-result.success {
  border-color: rgba(34, 197, 94, 0.28);
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(15, 23, 42, 0.34)),
    rgba(8, 13, 24, 0.66);
}
.payment-result.success .payment-result-icon {
  color: #87e9bd;
  background: rgba(34, 197, 94, 0.14);
  animation: paymentResultPop 260ms ease both;
}
.payment-result.success::after {
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.55), transparent);
}
.payment-result.error {
  border-color: rgba(239, 68, 68, 0.30);
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(15, 23, 42, 0.34)),
    rgba(8, 13, 24, 0.66);
}
.payment-result.error .payment-result-icon {
  color: #ffb4b4;
  background: rgba(239, 68, 68, 0.14);
  animation: paymentResultPop 260ms ease both;
}
.payment-result.error::after {
  background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.58), transparent);
}
@keyframes paymentResultIn {
  from { transform: translateY(-6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes paymentResultSpin {
  to { transform: rotate(360deg); }
}
@keyframes paymentResultPop {
  0% { transform: scale(0.82); }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.payment-card.billing-unavailable > .md-field,
.payment-card.billing-unavailable > .payment-grid,
.payment-card.billing-unavailable > .billing-consent,
.payment-card.billing-unavailable > .payment-summary,
.payment-card.billing-unavailable > .auth-submit {
  opacity: 0.38;
}

.billing-consent {
  display: flex;
  gap: 9px;
  color: #748399;
  font-size: 9px;
  line-height: 1.5;
  cursor: pointer;
}
.billing-consent input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: #7c6cff;
}
.billing-consent a { color: #a297ff; }

.payment-summary {
  padding: 13px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.10);
  border-radius: 12px;
  color: #77869b;
  background: rgba(2, 6, 23, 0.22);
  font-size: 10px;
}
.payment-summary strong { color: #f5f7fb; font-size: 15px; }
.payment-summary strong b,
.payment-summary strong small { display: block; }
.payment-summary strong b { color: #f5f7fb; font-size: 15px; }
.payment-summary strong small {
  margin-top: 3px;
  color: #77869b;
  font-size: 8px;
  font-weight: 500;
}

.payment-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #5f6d81;
  font-size: 8px;
}
.payment-security .material-symbols-rounded { color: #71839b; font-size: 15px; }

.billing-policy-links {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 18px;
}

.account-plan {
  margin-bottom: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #a99fff;
  background: rgba(124, 108, 255, 0.10);
  font-size: 9px;
  line-height: 1.5;
}

#btn-manage-subscription[hidden] {
  display: none !important;
}

.account-language-control {
  margin-bottom: 7px;
  padding: 8px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.46);
}

.account-language-control .material-symbols-rounded {
  color: #a99fff;
  font-size: 17px;
}

.account-language-control .language-control-label {
  margin-right: auto;
  color: #aeb8ca;
  font: 700 9px var(--font);
}

.account-language-control .language-switch {
  padding: 2px;
  background: rgba(2, 6, 23, 0.34);
}

.account-language-control .language-switch button {
  min-width: 30px;
  padding: 5px 7px;
  font-family: var(--font);
}

#btn-manage-subscription {
  width: 100%;
  margin-bottom: 7px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  color: #c6bfff;
  background: rgba(124, 108, 255, 0.10);
  font: 600 10px var(--font);
  cursor: pointer;
}
#btn-manage-subscription .material-symbols-rounded { font-size: 17px; }

#btn-change-password {
  width: 100%;
  margin-bottom: 7px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  color: #cbd5e1;
  background: rgba(100, 116, 139, 0.10);
  font: 600 10px var(--font);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

#btn-change-password:hover {
  color: #f1f5f9;
  background: rgba(124, 108, 255, 0.14);
}

#btn-change-password:disabled {
  opacity: 0.58;
  cursor: wait;
}

#btn-change-password > .material-symbols-rounded:first-child {
  color: #a99fff;
  font-size: 17px;
}

.account-security-status {
  margin: 0 0 7px;
  padding: 8px 9px;
  border-radius: 8px;
  font-size: 9px;
  line-height: 1.45;
}

.account-security-status.info {
  color: #b8c5d9;
  background: rgba(59, 130, 246, 0.10);
}

.account-security-status.success {
  color: #9de4bf;
  background: rgba(34, 197, 94, 0.10);
}

.account-security-status.error {
  color: #ffb4b4;
  background: rgba(239, 68, 68, 0.10);
}

@media (max-width: 860px) {
  .billing-layout { grid-template-columns: 1fr; }
  .billing-content { padding-top: 45px; }
}

@media (max-width: 540px) {
  .billing-header { padding: 0 16px; }
  .billing-user > span { display: none; }
  .billing-content { width: min(100% - 24px, 1120px); }
  .plan-column, .payment-card, .trial-card { padding: 18px; border-radius: 20px; }
  .trial-details { grid-template-columns: 1fr; }
  .billing-benefits { grid-template-columns: 1fr; }
  .billing-plan { grid-template-columns: 25px 1fr; }
  .plan-price { grid-column: 2; text-align: left; }
  .payment-grid { grid-template-columns: 1fr 1fr; }
  .payment-grid .md-field:last-child { grid-column: 1 / -1; }
}

@media (max-width: 360px) {
  .billing-header {
    padding-inline: 10px;
    gap: 8px;
  }

  .billing-header .auth-brand {
    gap: 7px;
    font-size: 16px;
  }

  .billing-header .poolcod-logo {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .billing-user { gap: 5px; }
  .billing-language-control > .material-symbols-rounded { display: none; }

  .billing-language-control .language-switch button {
    min-width: 28px;
    padding-inline: 6px;
  }

  #billing-logout {
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
    overflow: hidden;
    font-size: 0;
  }

  #billing-logout .material-symbols-rounded { font-size: 18px; }
}

/* ===== Persistent chart sidebar ===== */
#header {
  width: var(--sidebar-w);
  height: 100vh;
  background:
    linear-gradient(180deg, rgba(27, 31, 39, 0.98), rgba(15, 19, 26, 0.99));
  border-right: 1px solid rgba(148, 163, 184, 0.13);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-shrink: 0;
  overflow: hidden;
  font-family: 'Inter', system-ui, sans-serif;
  box-shadow: 12px 0 32px rgba(0, 0, 0, 0.16);
  z-index: 20;
  transition: width 200ms ease, box-shadow 200ms ease;
}

.sidebar-brand {
  height: 64px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.sidebar-brand-copy {
  min-width: 0;
  flex: 1;
}

#sidebar-toggle {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 9px;
  color: #8995a7;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}

#sidebar-toggle:hover {
  color: #f0f4fa;
  border-color: rgba(124, 108, 255, 0.38);
  background: rgba(124, 108, 255, 0.12);
}

#sidebar-toggle .material-symbols-rounded { font-size: 18px; }

#sidebar-quick-timeframes {
  display: none;
}

.sidebar-brand .poolcod-logo {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.sidebar-brand strong,
.sidebar-brand small {
  display: block;
}

.sidebar-brand strong {
  color: #f5f7fb;
  font-size: 16px;
  letter-spacing: -0.35px;
}

.sidebar-brand small {
  margin-top: 1px;
  color: #626d7c;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.sidebar-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #303845 transparent;
}

.sidebar-scroll::-webkit-scrollbar { width: 5px; }
.sidebar-scroll::-webkit-scrollbar-thumb {
  border-radius: 9px;
  background: #303845;
}

#header.sidebar-collapsed {
  width: 58px;
  box-shadow: 8px 0 24px rgba(0, 0, 0, 0.12);
}

#header.sidebar-collapsed .sidebar-brand {
  height: auto;
  flex: 1;
  padding: 12px 8px;
  flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  border-bottom: 0;
}

#header.sidebar-collapsed .sidebar-brand .poolcod-logo {
  width: 34px;
  height: 34px;
}

#header.sidebar-collapsed .sidebar-brand-copy,
#header.sidebar-collapsed .sidebar-scroll {
  display: none;
}

#header.sidebar-collapsed #sidebar-toggle {
  width: 34px;
  height: 34px;
  color: #b9b2ff;
  border-color: rgba(124, 108, 255, 0.28);
  background: rgba(124, 108, 255, 0.11);
}

#header.sidebar-collapsed #sidebar-quick-timeframes {
  margin-top: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

#sidebar-quick-timeframes > span {
  margin-bottom: 1px;
  color: #536176;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1px;
}

#sidebar-quick-timeframes button {
  width: 34px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #748196;
  background: transparent;
  font: 700 8px var(--font);
  cursor: pointer;
  transition:
    color 120ms ease,
    border-color 120ms ease,
    background 120ms ease,
    transform 120ms ease;
}

#sidebar-quick-timeframes button:hover {
  color: #e8edf5;
  border-color: rgba(148, 163, 184, 0.15);
  background: rgba(148, 163, 184, 0.07);
}

#sidebar-quick-timeframes button:active {
  transform: scale(0.94);
}

#sidebar-quick-timeframes button.active {
  color: #fff;
  border-color: rgba(88, 166, 255, 0.52);
  background: linear-gradient(145deg, rgba(88, 166, 255, 0.82), rgba(79, 128, 235, 0.82));
  box-shadow: 0 5px 16px rgba(64, 128, 230, 0.2);
  animation: timeframeActivate 240ms cubic-bezier(.2, .85, .3, 1.18);
}

/* Perfil rápido en el extremo inferior de la barra contraída. El mismo
   disparador conserva el menú de cuenta completo, sin duplicar acciones. */
#header.sidebar-collapsed #account-control {
  width: 100%;
  padding: 9px 11px 10px;
  border-top-color: rgba(148, 163, 184, 0.13);
  background: rgba(8, 12, 19, 0.9);
}

#header.sidebar-collapsed #account-button {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
  border-radius: 10px;
}

#header.sidebar-collapsed #account-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 10px;
}

#header.sidebar-collapsed #account-email,
#header.sidebar-collapsed #account-button > .material-symbols-rounded {
  display: none;
}

#header.sidebar-collapsed .account-popover {
  position: fixed;
  top: auto;
  right: auto;
  bottom: 10px;
  left: 66px;
  width: min(280px, calc(100vw - 78px));
}

.market-card {
  margin: 12px 10px 7px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  background: rgba(5, 9, 15, 0.38);
}

.sidebar-section-label {
  display: block;
  margin: 14px 2px 8px;
  color: #728097;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
}

.market-card > .sidebar-section-label {
  margin: 0 0 10px;
}

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

#symbol-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  flex-shrink: 0;
  min-width: 0;
  overflow: hidden;
}

#symbol-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  padding: 3px;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(9, 14, 25, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
}

#symbol-logo,
#chart-market-logo {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border-radius: 50%;
  object-fit: contain;
}

#symbol-logo {
  width: 28px;
  height: 28px;
}

#symbol-icon-fallback,
#chart-market-icon-fallback {
  width: 100%;
  height: 100%;
  place-items: center;
}

#symbol-icon-fallback:not([hidden]),
#chart-market-icon-fallback:not([hidden]) {
  display: grid;
}

#symbol-logo[hidden],
#symbol-icon-fallback[hidden],
#chart-market-logo[hidden],
#chart-market-icon-fallback[hidden] {
  display: none !important;
}

#symbol-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#market-select {
  font-weight: 700;
  max-width: 82px;
  font-size: 12px;
  color: #fff;
  letter-spacing: 0.5px;
  font-family: inherit;
  background: transparent;
  border: 0;
  outline: 0;
  cursor: pointer;
  padding: 0 18px 0 0;
}

#market-select option {
  color: var(--text);
  background: var(--bg2);
}

#exchange-name {
  max-width: 82px;
  margin-top: 2px;
  overflow: hidden;
  font-size: 7px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* OHLC */
#ohlc-info {
  margin-top: 12px;
  padding-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.09);
  font-size: 8px;
  color: var(--text-dim);
}

.ohlc-item {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  white-space: nowrap;
}
.ohlc-item span { color: #c7ced8; }
.ohlc-item.hi span { color: var(--up); }
.ohlc-item.lo span { color: var(--dn); }

#price-change {
  grid-column: 1 / -1;
  justify-self: start;
  font-weight: 600;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 5px;
}
#price-change.up { color: var(--up); background: rgba(38,166,154,0.15); }
#price-change.dn { color: var(--dn); background: rgba(239,83,80,0.15); }
#price-change.neutral { color: var(--text-dim); }

/* Controls */
#controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  padding: 0 12px 18px;
}

.control-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
}

.control-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.control-label .material-symbols-rounded {
  color: #77849a;
  font-size: 16px;
}

.btn-group {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(148, 163, 184, 0.11);
  border-radius: 9px;
  background: rgba(2, 6, 12, 0.34);
}

.btn-tf, .btn-history, .btn-mode, .btn-liq, .btn-source, .btn-pool {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--font);
  min-width: 0;
  flex: 1;
  font-size: 9px;
  font-weight: 600;
  padding: 6px 3px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-tf:hover, .btn-history:hover, .btn-mode:hover, .btn-liq:hover, .btn-source:hover, .btn-pool:hover {
  background: var(--bg2);
  color: var(--text);
}

.btn-tf.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 13px rgba(88, 166, 255, 0.24);
  animation: timeframeActivate 240ms cubic-bezier(.2, .85, .3, 1.18);
}

@keyframes timeframeActivate {
  0% { transform: scale(0.86); opacity: 0.56; }
  62% { transform: scale(1.07); opacity: 1; }
  100% { transform: scale(1); }
}

.btn-history.active {
  background: rgba(88, 166, 255, 0.20);
  color: var(--accent);
  border: 1px solid rgba(88, 166, 255, 0.35);
}

.btn-mode.active {
  background: rgba(255, 140, 0, 0.20);
  color: var(--orange);
  border: 1px solid rgba(255, 140, 0, 0.40);
}

.btn-liq.active {
  background: rgba(255, 140, 0, 0.25);
  color: var(--orange);
  border: 1px solid rgba(255,140,0,0.4);
}

.btn-liq.long-side.active {
  background: rgba(239, 83, 80, 0.18);
  color: var(--dn);
  border-color: rgba(239, 83, 80, 0.45);
}

.btn-liq.short-side.active {
  background: rgba(38, 166, 154, 0.18);
  color: var(--up);
  border-color: rgba(38, 166, 154, 0.45);
}

.btn-liq:not(.active) {
  color: var(--text-muted);
}

.btn-source.active {
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
}

.btn-source.binance-source.active { background: rgba(240, 185, 11, 0.28); color: #f0b90b; }
.btn-source.bybit-source.active { background: rgba(247, 151, 31, 0.25); color: #f7971f; }
.btn-source.gate-source.active { background: rgba(35, 177, 126, 0.25); color: #23b17e; }
.btn-source:not(.active) { color: var(--text-muted); }

.btn-pool.active {
  background: rgba(200, 200, 30, 0.16);
  color: var(--yellow);
  border: 1px solid rgba(200, 200, 30, 0.35);
}

.btn-pool:not(.active) {
  color: var(--text-muted);
}

/* Slider */
.slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid rgba(148, 163, 184, 0.11);
  border-radius: 9px;
  background: rgba(2, 6, 12, 0.34);
}

#filter-slider, #pool-filter-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--orange) 0%, var(--orange) 20%, var(--bg3) 20%);
  outline: none;
  cursor: pointer;
}

#filter-slider::-webkit-slider-thumb, #pool-filter-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--orange);
  cursor: pointer;
  border: 2px solid var(--bg2);
  box-shadow: 0 0 4px rgba(255,140,0,0.5);
}

#filter-val, #pool-filter-val {
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
  min-width: 46px;
  text-align: right;
}

#btn-settings {
  width: 100%;
  height: 38px;
  margin-top: 4px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--text-dim);
  border-radius: 9px;
  font: 600 10px 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}

#btn-settings .material-symbols-rounded { font-size: 17px; }

#btn-settings:hover {
  background: var(--bg3);
  color: var(--text);
}

/* Live price */
#live-price {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

#current-price {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  min-width: 62px;
  text-align: right;
}

#chart-workspace {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

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

.dot.live {
  background: var(--up);
  box-shadow: 0 0 5px var(--up);
  animation: pulse 2s ease-in-out infinite;
}

.dot.offline {
  background: var(--text-muted);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ===== Chart Wrapper ===== */
#chart-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#heatmap-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

#chart-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

#drawing-canvas {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  pointer-events: none;
  touch-action: none;
}

#drawing-toolbar {
  position: absolute;
  top: 45px;
  left: 11px;
  z-index: 14;
  width: 39px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background: rgba(15, 18, 24, 0.92);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
}

.drawing-tool,
.drawing-action {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #9aa5b5;
  background: transparent;
  cursor: pointer;
  transition:
    color 120ms ease,
    border-color 120ms ease,
    background 120ms ease,
    transform 120ms ease;
}

.drawing-tool:hover,
.drawing-action:hover {
  color: #f3f6fb;
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(148, 163, 184, 0.08);
}

.drawing-tool:active,
.drawing-action:active {
  transform: scale(0.94);
}

.drawing-tool.active,
.drawing-action.active {
  color: #fff;
  border-color: rgba(124, 108, 255, 0.48);
  background: rgba(124, 108, 255, 0.24);
  box-shadow: 0 0 18px rgba(124, 108, 255, 0.13);
}

.drawing-tool .material-symbols-rounded,
.drawing-action .material-symbols-rounded {
  font-size: 18px;
}

.drawing-magnet-icon {
  width: 18px;
  height: 18px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drawing-action.danger:hover {
  color: #ff9494;
  border-color: rgba(239, 83, 80, 0.3);
  background: rgba(239, 83, 80, 0.11);
}

.drawing-action.confirm {
  color: #ffd27d;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.14);
  animation: drawingConfirmPulse 850ms ease-in-out infinite;
}

.drawing-tool:disabled,
.drawing-action:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  transform: none;
}

.drawing-divider {
  width: 24px;
  height: 1px;
  margin: 3px 0;
  background: rgba(148, 163, 184, 0.15);
}

.drawing-save-state {
  width: 26px;
  height: 22px;
  margin-top: 1px;
  display: grid;
  place-items: center;
  color: #4f5d70;
}

.drawing-save-state .material-symbols-rounded {
  font-size: 15px;
}

.drawing-save-state[data-state="saving"],
.drawing-save-state[data-state="loading"] {
  color: #9588ff;
}

.drawing-save-state[data-state="saving"] .material-symbols-rounded,
.drawing-save-state[data-state="loading"] .material-symbols-rounded {
  animation: drawingSaveSpin 1.2s linear infinite;
}

.drawing-save-state[data-state="cloud"] { color: #50cfae; }
.drawing-save-state[data-state="local"] { color: #7f8da3; }

.drawing-text-editor {
  position: absolute;
  z-index: 16;
  width: 238px;
  height: 40px;
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 31px 31px;
  gap: 3px;
  border: 1px solid rgba(124, 108, 255, 0.48);
  border-radius: 10px;
  background: rgba(16, 21, 31, 0.97);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
}

.drawing-text-editor input {
  min-width: 0;
  padding: 0 9px;
  border: 0;
  outline: 0;
  color: #eef2ff;
  background: transparent;
  font: 500 11px 'Inter', sans-serif;
}

.drawing-text-editor button {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: #a99fff;
  background: rgba(124, 108, 255, 0.12);
  cursor: pointer;
}

.drawing-text-editor button:last-child {
  color: #8b97a8;
  background: rgba(148, 163, 184, 0.08);
}

.drawing-text-editor .material-symbols-rounded { font-size: 17px; }

@keyframes drawingSaveSpin {
  to { transform: rotate(360deg); }
}

@keyframes drawingConfirmPulse {
  50% { opacity: 0.62; }
}

#chart-loading {
  position: absolute;
  inset: 0;
  z-index: 18;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  overflow: hidden;
  color: #eef1ff;
  background:
    radial-gradient(circle at 50% 47%, rgba(105, 88, 245, 0.13), transparent 24%),
    rgba(8, 12, 19, 0.58);
  backdrop-filter: blur(7px) saturate(0.72);
  cursor: wait;
}

#chart-loading.hidden { display: none; }

.loading-aura {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(111, 95, 242, 0.13);
  filter: blur(75px);
  animation: loadingAura 2.8s ease-in-out infinite;
}

.loading-brand {
  position: relative;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
}

.loading-logo {
  position: relative;
  z-index: 2;
  width: 50px;
  height: 50px;
  padding: 10px;
  border-radius: 16px;
  box-shadow:
    0 12px 38px rgba(105, 88, 245, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.10);
  animation: loadingLogoFloat 1.8s ease-in-out infinite;
}

.loading-logo span {
  transform-origin: bottom;
  animation: loadingBar 1s ease-in-out infinite;
}
.loading-logo span:nth-child(2) { animation-delay: 120ms; }
.loading-logo span:nth-child(3) { animation-delay: 240ms; }

.loading-rings,
.loading-rings i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.loading-rings i {
  border: 1px solid rgba(133, 119, 255, 0.35);
  animation: loadingRing 2.4s ease-out infinite;
}
.loading-rings i:nth-child(2) { animation-delay: 0.8s; }
.loading-rings i:nth-child(3) { animation-delay: 1.6s; }

#chart-loading > strong {
  position: relative;
  font: 700 13px 'Inter', sans-serif;
  letter-spacing: -0.15px;
}

#chart-loading-message {
  position: relative;
  min-height: 17px;
  color: #8490a4;
  font: 500 10px 'Inter', sans-serif;
}

.loading-progress {
  position: relative;
  width: 156px;
  height: 3px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.11);
}

.loading-progress i {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #7c6cff, #49d7ba, transparent);
  animation: loadingProgress 1.35s ease-in-out infinite;
}

.is-loading #real-legend,
.is-loading #tooltip {
  opacity: 0;
}

@keyframes signalPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.72); }
}

@keyframes liquidityFieldFloat {
  0%, 100% {
    transform: translateX(-46%) translateY(0) perspective(1000px) rotateX(3deg) rotateY(-2deg);
  }
  50% {
    transform: translateX(-46%) translateY(-9px) perspective(1000px) rotateX(2deg) rotateY(1deg);
  }
}

@keyframes liquidityGlow {
  0%, 100% { opacity: 0.45; transform: translate3d(0, 0, 0) scale(0.86); }
  50% { opacity: 0.9; transform: translate3d(-35px, 28px, 0) scale(1.12); }
}

@keyframes liquidityBandFlow {
  0%, 100% { opacity: 0.32; transform: translateX(-2%) scaleX(0.92); }
  45% { opacity: 0.95; transform: translateX(2.5%) scaleX(1.02); }
  70% { opacity: 0.58; transform: translateX(0) scaleX(0.97); }
}

@keyframes liquidityCandlesDrift {
  0%, 100% { transform: translateY(2px); opacity: 0.72; }
  50% { transform: translateY(-4px); opacity: 1; }
}

@keyframes liquidityCandlePulse {
  0%, 100% { opacity: 0.48; transform: scaleY(0.82); }
  48% { opacity: 1; transform: scaleY(1.08); }
}

@keyframes liquidityScan {
  0%, 100% { opacity: 0.15; transform: translateY(74px); }
  45% { opacity: 0.75; transform: translateY(-24px); }
  70% { opacity: 0.34; transform: translateY(15px); }
}

@keyframes publicBandPulse {
  0%, 100% { opacity: 0.42; transform: translateX(-3%) scaleX(0.94); }
  50% { opacity: 1; transform: translateX(3%) scaleX(1.03); }
}

@keyframes loadingAura {
  0%, 100% { opacity: 0.55; transform: scale(0.86); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes loadingLogoFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.035); }
}

@keyframes loadingBar {
  0%, 100% { transform: scaleY(0.72); opacity: 0.65; }
  50% { transform: scaleY(1.12); opacity: 1; }
}

@keyframes loadingRing {
  0% { opacity: 0; transform: scale(0.42); }
  18% { opacity: 0.65; }
  100% { opacity: 0; transform: scale(1.12); }
}

@keyframes loadingProgress {
  0% { left: -45%; }
  100% { left: 105%; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-market-visual,
  .market-visual-glow,
  .market-heatmap rect,
  .market-candles,
  .market-candles > g,
  .market-current-line,
  .public-heatmap-bands i,
  .market-live i,
  .loading-aura,
  .loading-logo,
  .loading-logo span,
  .loading-rings i,
  .loading-progress i,
  .chart-market-live,
  .btn-tf.active,
  #sidebar-quick-timeframes button.active,
  .payment-result,
  .payment-result.processing .payment-result-icon,
  .payment-result.success .payment-result-icon,
  .payment-result.error .payment-result-icon {
    animation: none;
  }
  .public-map-preview-open::after,
  .public-map-preview-open > img,
  .map-preview-stage > img,
  .map-preview-icon-button,
  .map-preview-reset,
  .map-preview-dialog[open] {
    animation: none;
    transition: none;
  }
  .loading-progress i {
    left: 28%;
    width: 44%;
  }
}

/* Make chart background transparent to show heatmap */
#chart-container > div {
  background: transparent !important;
}

#chart-top-hud {
  position: absolute;
  top: 8px;
  left: 10px;
  right: 74px;
  z-index: 8;
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 8px;
  pointer-events: none;
}

#real-legend {
  position: static;
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  padding: 5px 8px;
  border: 1px solid rgba(88, 166, 255, 0.25);
  border-radius: 5px;
  background: rgba(13, 17, 23, 0.78);
  color: var(--text-dim);
  font-size: 10px;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

#chart-market-identity {
  position: relative;
  min-width: 136px;
  height: 32px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 24px 3px 4px;
  overflow: hidden;
  border: 1px solid rgba(139, 124, 255, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(17, 22, 34, 0.92), rgba(26, 24, 54, 0.86));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22), inset 0 1px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(8px);
}

#chart-market-icon {
  position: relative;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 50%;
  color: #fff;
  background: rgba(9, 14, 25, 0.78);
  box-shadow: 0 0 16px rgba(124, 108, 255, 0.28);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

#chart-market-logo {
  width: 20px;
  height: 20px;
}

.chart-market-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 1px;
}

#chart-market-pair,
#chart-market-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#chart-market-pair {
  color: #f4f6fb;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.25px;
}

#chart-market-name {
  max-width: 106px;
  color: #78859a;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.18px;
}

.chart-market-live {
  position: absolute;
  top: 50%;
  right: 9px;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: #586579;
  box-shadow: none;
}

#chart-market-identity[data-connection="live"] .chart-market-live {
  background: #32d5b2;
  box-shadow: 0 0 8px rgba(50, 213, 178, 0.88);
  animation: chartMarketPulse 2.2s ease-in-out infinite;
}

#chart-market-identity[data-connection="rest"] .chart-market-live {
  background: #f0b90b;
  box-shadow: 0 0 7px rgba(240, 185, 11, 0.7);
}

@keyframes chartMarketPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.38; transform: scale(0.7); }
}

.legend-badge {
  color: #fff;
  background: rgba(88, 166, 255, 0.25);
  border: 1px solid rgba(88, 166, 255, 0.45);
  border-radius: 3px;
  padding: 1px 5px;
  font-weight: 700;
}

.legend-long { color: var(--dn); }
.legend-short { color: var(--up); }
.legend-sources { color: #a8b3c1; }
.legend-estimated { color: var(--yellow); }
.legend-intensity {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #7d8590;
}
.legend-intensity i,
.legend-intensity b {
  height: 6px;
  border-radius: 1px;
}
.legend-intensity i {
  width: 68px;
  background: linear-gradient(
    to right,
    #06265c,
    #074b94,
    #007fa5,
    #19ae52,
    #84cd27,
    #f1de19,
    #ff8f00,
    #ff3700
  );
}
.legend-intensity b { display: none; }

body[data-mode="real"] .estimated-controls,
body[data-mode="real"] .legend-estimated,
body[data-mode="real"] .legend-intensity {
  display: none;
}

body[data-mode="estimated"] .real-controls,
body[data-mode="estimated"] .legend-badge,
body[data-mode="estimated"] .legend-long,
body[data-mode="estimated"] .legend-short {
  display: none;
}

body[data-mode="estimated"] .legend-sources {
  display: none;
}

@media (max-width: 900px) {
  #chart-top-hud { right: 64px; }
  #real-legend .legend-sources { display: none; }
  #chart-market-identity { min-width: 120px; }
  #chart-market-name { max-width: 82px; }
}

@media (max-width: 680px) {
  #chart-top-hud { right: 56px; gap: 5px; }
  #real-legend .legend-badge,
  #real-legend .legend-long,
  #real-legend .legend-short { display: none; }
  #chart-market-identity { min-width: 104px; }
  #chart-market-name { display: none; }
}

/* Tooltip */
#tooltip {
  position: absolute;
  background: rgba(22, 27, 34, 0.92);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 6px 10px;
  pointer-events: none;
  z-index: 10;
  font-size: 11px;
  backdrop-filter: blur(4px);
  min-width: 140px;
}

#tooltip.hidden { display: none; }

#tt-price {
  color: var(--text);
  font-weight: 700;
  margin-bottom: 3px;
}

#tt-liq {
  color: var(--orange);
  font-size: 10px;
}

/* ===== Status Bar ===== */
#statusbar {
  height: var(--status-h);
  background: var(--bg2);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-dim);
}

@media (max-width: 1080px) {
  :root { --sidebar-w: 238px; }
  .market-card { margin-inline: 8px; padding: 10px; }
  #controls { padding-inline: 10px; }
  #account-control { padding: 8px; }
  #current-price { min-width: 55px; font-size: 10px; }
  #market-select,
  #exchange-name { max-width: 70px; }
}

#status-msg {
  flex: 1;
}

#ws-label {
  font-size: 10px;
}

#last-update {
  color: var(--text-muted);
  font-size: 10px;
  margin-left: auto;
}

/* ===== Settings modal ===== */
#settings-modal {
  position: fixed;
  inset: 0;
  background: rgba(13, 17, 23, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
#settings-modal.hidden { display: none; }

.settings-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  width: 280px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.settings-panel h3 {
  margin: 0 0 14px;
  font-size: 14px;
  color: #fff;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.settings-note {
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.5;
  margin-bottom: 14px;
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text);
  margin-bottom: 16px;
  cursor: pointer;
}

.setting-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 8px 12px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: #4791e3; }

/* ===== Loading overlay ===== */
#loading {
  position: absolute;
  inset: 0;
  background: rgba(13, 17, 23, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 100;
}

#loading.hidden { display: none; }

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: var(--text-dim);
  font-size: 12px;
}

/* Mobile chart: the compact rail remains visible while the expanded panel
   floats above the workspace instead of consuming the whole viewport. */
@media (max-width: 760px) {
  #app {
    position: relative;
    width: 100vw;
    min-width: 0;
    max-width: 100vw;
  }

  #header {
    position: absolute;
    inset: 0 auto 0 0;
    width: min(280px, calc(100vw - 44px));
    max-width: calc(100vw - 44px);
    box-shadow: 18px 0 44px rgba(0, 0, 0, 0.38);
  }

  #header.sidebar-collapsed {
    width: 58px;
    max-width: 58px;
    box-shadow: 8px 0 24px rgba(0, 0, 0, 0.18);
  }

  #chart-workspace {
    width: calc(100% - 58px);
    min-width: 0;
    margin-left: 58px;
  }

  #chart-top-hud {
    left: 7px;
    right: 48px;
  }

  #drawing-toolbar {
    top: 43px;
    left: 7px;
  }

  #statusbar {
    min-width: 0;
    gap: 5px;
    padding-inline: 8px;
  }

  #status-msg {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #ws-label,
  #last-update {
    display: none;
  }

  .settings-panel {
    width: min(280px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
  }
}

@media (max-height: 700px) {
  #drawing-toolbar {
    max-height: calc(100dvh - var(--status-h) - 52px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  #drawing-toolbar::-webkit-scrollbar { display: none; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ===== Admin dashboard ===== */
html.admin-document,
html.admin-document body,
body.admin-page {
  min-height: 100%;
  height: auto;
  overflow: auto;
}

body.admin-page {
  color: #eef2ff;
  background:
    radial-gradient(circle at 15% 10%, rgba(124, 108, 255, 0.16), transparent 32%),
    radial-gradient(circle at 90% 80%, rgba(31, 176, 147, 0.10), transparent 30%),
    #080d18;
  font-family: 'Inter', system-ui, sans-serif;
}

.admin-shell {
  min-height: 100vh;
  padding: clamp(18px, 3vw, 34px);
}

.admin-login-card,
.admin-card,
.admin-topbar {
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px);
}

.admin-login-card {
  width: min(460px, 100%);
  margin: 8vh auto;
  padding: 34px;
  border-radius: 28px;
}

.admin-login-card h1,
.admin-section-head h2,
.admin-empty h2 {
  color: #f8fafc;
  letter-spacing: -0.8px;
}

.admin-login-card h1 {
  margin-top: 28px;
  font-size: 34px;
}

.admin-login-card p,
.admin-muted,
.admin-empty p {
  color: #8492a8;
  line-height: 1.7;
}

.admin-login-card code {
  color: #b9afff;
}

.admin-login-status {
  margin: 18px 0;
  font-size: 13px;
  line-height: 1.5;
}

.admin-kicker {
  display: inline-block;
  margin-top: 22px;
  color: #9e92ff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.admin-panel {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 16px;
}

.admin-topbar {
  min-height: 68px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 22px;
}

.admin-topbar-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #94a3b8;
  font-size: 12px;
}

#admin-session-email {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-ghost-link,
.admin-topbar button,
.admin-card button,
.admin-form button,
.admin-search button {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  color: #f8fafc;
  background: rgba(124, 108, 255, 0.14);
  font: 800 11px 'Inter', system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: 160ms ease;
}

.admin-ghost-link,
.admin-topbar button,
.admin-card button,
.admin-search button {
  padding: 10px 13px;
}

.admin-form button {
  padding: 13px 14px;
}

.admin-ghost-link:hover,
.admin-topbar button:hover,
.admin-card button:hover,
.admin-form button:hover,
.admin-search button:hover {
  border-color: rgba(156, 140, 255, 0.46);
  background: rgba(124, 108, 255, 0.24);
}

.admin-layout {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.admin-sidebar,
.admin-detail,
.admin-grid {
  min-width: 0;
  display: grid;
  gap: 16px;
}

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

.admin-card {
  min-width: 0;
  padding: 22px;
  border-radius: 22px;
}

.admin-section-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-section-head .admin-kicker {
  margin-top: 0;
}

.admin-section-head h2 {
  margin-top: 6px;
  font-size: 19px;
}

.admin-form {
  display: grid;
  gap: 13px;
}

.admin-form.compact {
  margin-top: 14px;
}

.admin-form label {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: #8d9bb0;
  font-size: 11px;
  font-weight: 700;
}

.admin-form input,
.admin-form select,
.admin-form textarea,
.admin-search input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.38);
  font: 600 12px 'Inter', system-ui, sans-serif;
  outline: none;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  padding: 12px 13px;
}

.admin-form textarea {
  min-height: 84px;
  resize: vertical;
}

.admin-form input[readonly] {
  color: #718096;
}

.admin-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 14px;
}

.admin-search input {
  padding: 11px 12px;
}

.admin-check {
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row;
  align-items: center;
  gap: 10px !important;
}

.admin-check input {
  width: 16px;
  height: 16px;
  accent-color: #7c6cff;
}

.admin-create-user {
  border-top: 1px solid rgba(148, 163, 184, 0.10);
  padding-top: 14px;
  color: #dbe4f0;
}

.admin-create-user summary {
  color: #b9afff;
  cursor: pointer;
  font-weight: 800;
}

.admin-users {
  display: grid;
  gap: 9px;
  max-height: calc(100vh - 350px);
  overflow: auto;
}

.admin-user-row {
  width: 100%;
  padding: 12px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, 0.10);
  border-radius: 15px;
  text-align: left;
  background: rgba(15, 23, 42, 0.55);
}

.admin-user-row > span:last-child {
  min-width: 0;
}

.admin-user-row.active {
  border-color: rgba(124, 108, 255, 0.55);
  background: rgba(124, 108, 255, 0.14);
}

.admin-user-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #7565ef, #8d7cff);
  font-weight: 800;
}

.admin-user-row strong,
.admin-user-row small {
  display: block;
}

.admin-user-row strong {
  overflow: hidden;
  color: #f8fafc;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-row small {
  margin-top: 3px;
  overflow: hidden;
  color: #64748b;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-badge {
  margin-top: 8px;
  padding: 4px 8px;
  display: inline-flex;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  color: #b9afff;
  background: rgba(124, 108, 255, 0.12);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-badge.active,
.admin-badge.approved {
  color: #78ddc0;
  background: rgba(37, 190, 157, 0.12);
}

.admin-badge.past_due,
.admin-badge.error,
.admin-badge.declined {
  color: #ffb4b4;
  background: rgba(255, 80, 118, 0.13);
}

.admin-badge.canceled,
.admin-badge.muted {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.10);
}

.admin-empty,
.admin-empty-list {
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  color: #8492a8;
}

.admin-empty .material-symbols-rounded,
.admin-empty-list .material-symbols-rounded {
  color: #9c8cff;
  font-size: 42px;
}

.admin-meta {
  display: grid;
  gap: 8px;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.55;
}

.admin-meta strong {
  color: #dbe4f0;
}

.admin-meta pre {
  max-height: 170px;
  overflow: auto;
  padding: 12px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.38);
  color: #94a3b8;
  font-size: 10px;
}

.admin-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.admin-table th,
.admin-table td {
  padding: 10px 9px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  color: #94a3b8;
  font-size: 10px;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: #dbe4f0;
  font-size: 9px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.admin-status {
  padding: 13px 15px;
  border: 1px solid rgba(124, 108, 255, 0.22);
  border-radius: 15px;
  color: #c7d2fe;
  background: rgba(124, 108, 255, 0.12);
  font-weight: 700;
}

.admin-status.error {
  border-color: rgba(255, 107, 129, 0.35);
  color: #ffb4b4;
  background: rgba(255, 107, 129, 0.12);
}

.admin-status.success {
  border-color: rgba(37, 190, 157, 0.35);
  color: #77d9bc;
  background: rgba(37, 190, 157, 0.12);
}

.admin-platform-panel {
  position: relative;
  overflow: hidden;
}

.admin-platform-panel::before {
  content: '';
  position: absolute;
  width: 420px;
  height: 260px;
  top: -190px;
  left: 15%;
  border-radius: 50%;
  background: rgba(37, 190, 157, 0.13);
  filter: blur(52px);
  pointer-events: none;
}

.admin-platform-heading,
.admin-platform-grid,
.admin-platform-footer {
  position: relative;
}

.admin-platform-heading p {
  max-width: 760px;
  margin-top: 8px;
  color: #8492a8;
  font-size: 12px;
  line-height: 1.65;
}

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

.admin-setting-block {
  min-width: 0;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 14px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(124, 108, 255, 0.07), transparent 45%),
    rgba(2, 6, 23, 0.28);
}

.admin-setting-block > div > strong,
.admin-announcement-heading strong {
  display: block;
  color: #f8fafc;
  font-size: 13px;
}

.admin-setting-block > div > p,
.admin-announcement-heading p {
  margin-top: 4px;
  color: #718096;
  font-size: 10px;
  line-height: 1.5;
}

.admin-setting-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #b9afff;
  background: rgba(124, 108, 255, 0.14);
}

.admin-trial-setting .admin-setting-icon {
  color: #78ddc0;
  background: rgba(37, 190, 157, 0.12);
}

.admin-chart-announcement-setting .admin-setting-icon {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.13);
}

.admin-trial-setting input {
  font-size: 18px;
  font-weight: 800;
}

.admin-switch-list {
  display: grid;
  gap: 9px;
}

.admin-switch-row {
  min-height: 58px;
  padding: 10px 11px;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px !important;
  border: 1px solid rgba(148, 163, 184, 0.11);
  border-radius: 13px;
  background: rgba(15, 23, 42, 0.5);
  cursor: pointer;
}

.admin-switch-row.compact {
  min-height: 44px;
  flex: 0 0 auto;
}

.admin-switch-row span,
.admin-switch-row strong,
.admin-switch-row small {
  display: block;
}

.admin-switch-row strong {
  color: #dbe4f0;
  font-size: 11px;
}

.admin-switch-row small {
  margin-top: 3px;
  color: #64748b;
  font-size: 9px;
}

.admin-switch-row input {
  position: relative;
  width: 38px !important;
  height: 22px;
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #263246;
  cursor: pointer;
  transition: 160ms ease;
}

.admin-switch-row input::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: #94a3b8;
  transition: 160ms ease;
}

.admin-switch-row input:checked {
  background: rgba(37, 190, 157, 0.42);
}

.admin-switch-row input:checked::after {
  left: 19px;
  background: #78ddc0;
}

.admin-announcement-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.admin-announcement-fields {
  display: grid;
  grid-template-columns: 0.58fr 1fr 1fr;
  gap: 10px;
}

.admin-announcement-preview {
  padding: 12px 13px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid rgba(96, 165, 250, 0.26);
  border-radius: 13px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.09);
}

.admin-announcement-preview.warning,
.admin-announcement-preview.maintenance {
  border-color: rgba(250, 204, 21, 0.25);
  color: #fde68a;
  background: rgba(250, 204, 21, 0.075);
}

.admin-announcement-preview.success {
  border-color: rgba(37, 190, 157, 0.28);
  color: #a7f3d0;
  background: rgba(37, 190, 157, 0.08);
}

.admin-announcement-preview .material-symbols-rounded {
  font-size: 18px;
}

.admin-announcement-preview p {
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-line;
}

.admin-platform-footer {
  padding-top: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.09);
  color: #718096;
  font-size: 10px;
  line-height: 1.5;
}

.admin-platform-footer button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.admin-platform-footer button .material-symbols-rounded {
  font-size: 16px;
}

.admin-pricing-panel {
  position: relative;
  overflow: hidden;
}

.admin-pricing-panel::before {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  top: -250px;
  right: -80px;
  border-radius: 50%;
  background: rgba(124, 108, 255, 0.17);
  filter: blur(48px);
  pointer-events: none;
}

.admin-pricing-heading {
  position: relative;
}

.admin-pricing-heading p {
  max-width: 760px;
  margin-top: 8px;
  color: #8492a8;
  font-size: 12px;
  line-height: 1.65;
}

.admin-pricing-warning {
  position: relative;
  margin-bottom: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid rgba(250, 204, 21, 0.16);
  border-radius: 14px;
  color: #b8c4d6;
  background: rgba(250, 204, 21, 0.055);
  font-size: 11px;
  line-height: 1.55;
}

.admin-pricing-warning .material-symbols-rounded {
  color: #facc15;
  font-size: 18px;
}

.admin-plan-pricing {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-plan-price-form {
  min-width: 0;
  padding: 18px;
  display: grid;
  gap: 17px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(124, 108, 255, 0.08), transparent 44%),
    rgba(2, 6, 23, 0.28);
}

.admin-plan-price-form[aria-busy='true'] {
  opacity: 0.72;
}

.admin-plan-price-title {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.admin-plan-price-title > div {
  min-width: 0;
}

.admin-plan-price-title > .material-symbols-rounded {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #b9afff;
  background: rgba(124, 108, 255, 0.14);
}

.admin-plan-price-title strong,
.admin-plan-price-title small {
  display: block;
}

.admin-plan-price-title strong {
  color: #f8fafc;
  font-size: 14px;
}

.admin-plan-price-title small {
  margin-top: 4px;
  color: #718096;
  font-size: 9px;
}

.admin-plan-price-title .admin-badge {
  margin-top: 0;
}

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

.admin-plan-price-fields label {
  display: grid;
  gap: 7px;
  color: #8d9bb0;
  font-size: 10px;
  font-weight: 700;
}

.admin-money-input {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.38);
}

.admin-money-input > span {
  height: 100%;
  padding: 0 12px;
  display: grid;
  place-items: center;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  color: #9e92ff;
  font-size: 10px;
  font-weight: 800;
}

.admin-money-input input {
  min-width: 0;
  padding: 12px;
  border: 0;
  color: #f8fafc;
  background: transparent;
  font: 700 13px 'Inter', system-ui, sans-serif;
  outline: none;
}

.admin-money-input:focus-within {
  border-color: rgba(156, 140, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.09);
}

.admin-plan-price-footer {
  padding-top: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.09);
  color: #8492a8;
  font-size: 10px;
  line-height: 1.5;
}

.admin-plan-price-footer strong {
  color: #dbe4f0;
}

.admin-plan-price-footer button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.admin-plan-price-footer button .material-symbols-rounded {
  font-size: 16px;
}

.admin-price-history {
  position: relative;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid rgba(148, 163, 184, 0.09);
}

.admin-price-history summary {
  width: fit-content;
  color: #b9afff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.admin-price-history[open] summary {
  margin-bottom: 14px;
}

.admin-price-history-table {
  min-width: 920px;
}

button.danger,
.admin-card button.danger {
  color: #ffb4b4;
  background: rgba(255, 107, 129, 0.12);
}

@media (max-width: 1100px) {
  .admin-layout,
  .admin-grid,
  .admin-plan-pricing,
  .admin-platform-grid {
    grid-template-columns: 1fr;
  }

  .admin-users {
    max-height: 420px;
  }
}

@media (max-width: 700px) {
  .admin-topbar,
  .admin-topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-topbar-actions {
    width: 100%;
  }

  .admin-topbar-actions .admin-ghost-link,
  .admin-topbar-actions button {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 620px) {
  .admin-shell {
    padding: 12px;
  }

  .admin-card {
    padding: 18px;
    border-radius: 18px;
  }

  .admin-section-head,
  .admin-announcement-heading {
    flex-wrap: wrap;
  }

  .admin-section-head > button {
    max-width: 100%;
    white-space: normal;
  }

  .admin-form input,
  .admin-form select,
  .admin-search input,
  .admin-card button,
  .admin-topbar button,
  .admin-ghost-link {
    min-height: 44px;
  }

  .admin-search {
    grid-template-columns: 1fr;
  }

  .admin-plan-price-fields {
    grid-template-columns: 1fr;
  }

  .admin-plan-price-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-announcement-fields {
    grid-template-columns: 1fr;
  }

  .admin-platform-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-plan-price-footer button {
    justify-content: center;
  }
}
