﻿/* =========================
   RESET & BASE
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', 'Poppins', system-ui, sans-serif;
}

html {
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

body {
  overflow-x: hidden;
  background: #0e0f12;
  color: #e5e7eb;
  min-height: 100vh;
  padding-bottom: 80px; /* spazio per navbar */
}

/* Evita il flash del login mentre Firebase verifica la sessione */
body.auth-pending #authBar,
body.auth-pending #app {
  display: none !important;
}

body.auth-pending #authLoader {
  display: flex;
}

.auth-loader {
  position: fixed;
  inset: 0;
  z-index: 12050;
  background:
    radial-gradient(1200px 520px at 50% -20%, rgba(212, 175, 55, 0.14), transparent 60%),
    rgba(10, 12, 16, 0.78);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-loader__panel {
  width: min(320px, 90vw);
  background: linear-gradient(180deg, rgba(20, 24, 32, 0.92), rgba(15, 18, 24, 0.9));
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 14px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(212, 175, 55, 0.08) inset;
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.auth-loader__orbital {
  width: 58px;
  height: 58px;
  position: relative;
  display: grid;
  place-items: center;
}

.auth-loader__ring {
  position: absolute;
  inset: 0;
  border-radius: 999px;
}

.auth-loader__ring--outer {
  border: 2px solid rgba(212, 175, 55, 0.23);
  border-top-color: rgba(212, 175, 55, 0.9);
  border-right-color: rgba(212, 175, 55, 0.55);
  animation: authSpin 1.2s linear infinite;
}

.auth-loader__ring--inner {
  inset: 9px;
  border: 2px solid rgba(246, 214, 118, 0.2);
  border-bottom-color: rgba(246, 214, 118, 0.82);
  border-left-color: rgba(246, 214, 118, 0.5);
  animation: authSpinReverse 0.9s linear infinite;
}

.auth-loader__core {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, #ffe9a4 0%, #d4af37 70%, #967720 100%);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.75);
}

.auth-loader__brand {
  font-size: 12px;
  letter-spacing: 2.2px;
  color: #f2d98b;
  font-weight: 700;
}

.auth-loader__text {
  margin: 0;
  color: #d8dde7;
  font-size: 12px;
  letter-spacing: 0.3px;
}

.auth-loader__bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.auth-loader__bar-fill {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.2), rgba(245, 209, 95, 0.95), rgba(212, 175, 55, 0.2));
  animation: authBarSlide 1.25s ease-in-out infinite;
}

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

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

@keyframes authBarSlide {
  0% { transform: translateX(-140%); }
  60% { transform: translateX(190%); }
  100% { transform: translateX(190%); }
}

/* =========================
   COLORI GLOBALI
========================= */
:root {
  --bg-main: #0e0f12;
  --bg-card: #16181d;
  --bg-soft: #1e2128;

  --gold: #d4af37;
  --gold-dark: #b8962e;
  --green: #2ecc71;
  --red: #e74c3c;
  --gray: #9ca3af;
}

/* =========================
   CONTAINER
========================= */
.container {
  max-width: 420px;
  margin: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px; /* SPAZIATURA VERA */
}

/* =========================
   TITOLI
========================= */
h1 {
  font-size: 22px;
  color: #fff;
}

h2 {
  font-size: 18px;
  color: #fff;
}

/* =========================
   CARD
========================= */
.card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px; /* evita effetto “attaccato” */
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
}
.card h3 {
  text-align: center;
  margin-bottom: 14px;
  letter-spacing: 0.3px;
}

.equity-chart-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.equity-chart-actions {
  display: flex;
  justify-content: center;
  margin-top: 12px;
  margin-bottom: 4px;
}

.equity-chart-customize {
  min-width: 150px;
}

/* ================= XM CTA ================= */
.xm-cta-section {
  max-width: 1080px;
  margin: 30px auto 20px;
  padding: 0 22px;
  display: flex;
  justify-content: center;
}

.xm-cta-card {
  width: 100%;
  max-width: 980px;
  border: 1px solid rgba(255, 58, 58, 0.24);
  border-radius: 22px;
  padding: 28px;
  background: linear-gradient(135deg, #0b0b0d 0%, #0f0f17 48%, #1a0101 100%);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55), inset 0 0 50px rgba(255, 58, 58, 0.08);
}

.xm-cta-badge {
  display: inline-flex;
  font-size: 0.72rem;
  color: #ffd6d6;
  border: 1px solid rgba(255, 58, 58, 0.38);
  padding: 6px 10px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
  background: rgba(166, 0, 0, 0.2);
}

.xm-cta-title {
  margin: 0 0 10px;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  color: #ffe9e9;
  text-shadow: 0 2px 18px rgba(255, 58, 58, 0.35);
}

.xm-cta-text {
  margin: 0;
  color: #c7c7c7;
  font-size: 1rem;
  line-height: 1.55;
  max-width: 760px;
}

.xm-cta-actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.xm-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 58, 58, 0.5);
  background: linear-gradient(180deg, #ff1f1f 0%, #b90000 100%);
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  font-size: 0.9rem;
  box-shadow: 0 10px 22px rgba(166, 0, 0, 0.45);
}

.xm-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 26px rgba(166, 0, 0, 0.55);
}

.xm-cta-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffd1d1;
  border: 1px solid rgba(255, 209, 209, 0.2);
  background: rgba(255, 255, 255, 0.02);
  padding: 12px 16px;
  border-radius: 14px;
}

@media (max-width: 720px) {
  .xm-cta-section {
    padding: 0 16px;
  }

  .xm-cta-card {
    padding: 22px;
    border-radius: 18px;
    text-align: center;
  }

  .xm-cta-text {
    margin-left: auto;
    margin-right: auto;
  }

  .xm-cta-actions {
    justify-content: center;
  }

  .xm-cta-btn,
  .xm-cta-ghost {
    width: 100%;
  }
}

/* ================= CONTACT WIDGET ================= */
.contact-widget-section {
  max-width: 1080px;
  margin: 24px auto 18px;
  padding: 0 22px;
}

.contact-widget-card {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 22px;
  padding: 28px;
  border-radius: 24px;
  border: 1px solid rgba(245, 196, 0, 0.24);
  background:
    radial-gradient(circle at 0% 0%, rgba(245, 196, 0, 0.16), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(87, 138, 255, 0.12), transparent 28%),
    linear-gradient(135deg, rgba(8, 10, 14, 0.96), rgba(14, 18, 26, 0.94));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.contact-widget-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 34%);
}

.contact-widget-copy,
.contact-widget-panel {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.contact-widget-copy {
  flex: 1 1 460px;
}

.contact-widget-panel {
  flex: 1 1 300px;
}

.contact-widget-badge,
.contact-widget-tags span,
.contact-widget-label {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-widget-badge {
  border: 1px solid rgba(245, 196, 0, 0.26);
  background: rgba(245, 196, 0, 0.08);
  color: #f8dfa2;
}

.contact-widget-title {
  margin: 14px 0 0;
  color: #fff7df;
  font-size: clamp(1.45rem, 2.8vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.contact-widget-text,
.contact-widget-note {
  margin: 12px 0 0;
  color: #a8b0bc;
  line-height: 1.7;
}

.contact-widget-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.contact-widget-tags span {
  color: #d8dee8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.contact-widget-panel {
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  align-content: start;
  gap: 12px;
}

.contact-widget-label {
  width: fit-content;
  color: #a9c7ff;
  border: 1px solid rgba(105, 168, 255, 0.2);
  background: rgba(105, 168, 255, 0.08);
}

.contact-widget-email {
  display: inline-flex;
  width: fit-content;
  color: #fff6d7;
  font-size: clamp(1.06rem, 2vw, 1.28rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.contact-widget-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.contact-widget-btn,
.contact-widget-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-widget-btn {
  border: 1px solid rgba(255, 215, 104, 0.7);
  background: linear-gradient(135deg, #f5c400, #ffd968);
  color: #12161f;
  box-shadow: 0 14px 26px rgba(245, 196, 0, 0.2);
}

.contact-widget-link {
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e8edf5;
  background: rgba(255, 255, 255, 0.04);
}

.contact-widget-btn:hover,
.contact-widget-link:hover {
  transform: translateY(-2px);
}

@media (max-width: 720px) {
  .contact-widget-section {
    padding: 0 16px;
  }

  .contact-widget-card {
    padding: 22px;
    border-radius: 20px;
  }
}

@media (max-width: 520px) {
  .contact-widget-card {
    padding: 18px;
  }

  .contact-widget-actions {
    flex-direction: column;
  }

  .contact-widget-btn,
  .contact-widget-link {
    width: 100%;
  }
}

.equity-chart-custom-range {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.equity-chart-custom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.equity-chart-custom-label {
  font-size: 12px;
  color: var(--gray);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.equity-chart-custom-label input {
  margin: 0;
}

.equity-chart-apply {
  width: 100%;
  padding: 9px;
  font-size: 12px;
}

/* =========================
   INPUT & FORM
========================= */
input, select {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid #2a2d35;
  border-radius: 12px;
  padding: 13px;
  color: white;
  font-size: 14px;
}

input::placeholder {
  color: var(--gray);
}

input:focus, select:focus {
  outline: none;
  border-color: var(--gold);
}

.asset-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 10px;
}

.asset-field {
  position: relative;
}

.asset-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid #2a2d35;
  border-radius: 12px;
  max-height: 240px;
  overflow: auto;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
  z-index: 20;
}

.asset-results.hidden {
  display: none;
}

.asset-item {
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #23262e;
}

.asset-item:last-child {
  border-bottom: none;
}

.asset-item:hover,
.asset-item.active {
  background: #1f232b;
}

.asset-symbol {
  font-weight: 600;
  color: #fff;
}

.asset-name {
  color: var(--gray);
  font-size: 12px;
}

.tv-widget {
  background: var(--bg-soft);
  border: 1px solid #2a2d35;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tv-widget__inner {
  min-height: 150px;
}

.tv-widget__note {
  font-size: 12px;
  color: var(--gray);
}

@media (max-width: 460px) {
  .asset-row {
    grid-template-columns: 1fr;
  }
}

/* =========================
   BOTTONI (FIX ATTACCATI)
========================= */
.btn {
  width: 100%;
  padding: 15px;
  border-radius: 14px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
/*
.btn + .btn {
  margin-top: 12px; /* SPAZIO TRA BOTTONI 
}
*/
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0e0f12;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(212,175,55,0.25);
}

.forum-btn{
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color:#0e0f12;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.forum-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(212,175,55,0.25);
}

.btn-danger {
  background: var(--red);
  color: white;
}

/* =========================
   DASHBOARD STATS
========================= */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-box {
  background: var(--bg-soft);
  padding: 14px;
  border-radius: 14px;
  text-align: center;
}

.stat-box span {
  font-size: 12px;
  color: var(--gray);
}

.stat-box strong {
  font-size: 17px;
  display: block;
  margin-top: 4px;
}

/* =========================
   TRADE LIST
========================= */
.trade {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg-soft);
}

.trade-left,
.trade-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trade-right {
  gap: 10px;
}

.trade-dir {
  opacity: 0.85;
  font-size: 13px;
}

.trade-badge {
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(212,175,55,0.18);
  color: var(--gold);
  border: 1px solid rgba(212,175,55,0.35);
}

.trade-badge.scalp {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.15);
}

.trade-badge.session {
  background: rgba(46, 196, 182, 0.12);
  color: #8ef3e6;
  border-color: rgba(46, 196, 182, 0.35);
}

.trade-badge.session.overlap {
  background: rgba(255, 183, 3, 0.16);
  color: #ffd166;
  border-color: rgba(255, 209, 102, 0.45);
}

.trade-swing {
  border-left: 4px solid var(--gold);
  box-shadow: 0 6px 16px rgba(212,175,55,0.12);
}

.trade-scalp {
  border-left: 4px solid rgba(255,255,255,0.12);
}

.trade + .trade {
  margin-top: 10px;
}

.trade.profit {
  border-left: 4px solid var(--green);
}

.trade.loss {
  border-left: 4px solid var(--red);
}

.trade .asset {
  font-weight: 600;
}

.trade .profit {
  font-weight: bold;
}

.partials-inline-title {
  margin-top: 12px;
  font-size: 13px;
  color: var(--gray);
}

.partials-inline {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px;
}

.partials-inline.empty {
  color: var(--gray);
  font-size: 13px;
}

.partial-inline-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

/* =========================
   CHECKLIST CONFERME
========================= */
.confirmations {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.confirm-button {
  background: var(--bg-soft);
  border: 1px solid #2a2d35;
  color: var(--gray);
  padding: 12px;
  border-radius: 12px;
  font-size: 13px;
  cursor: pointer;
  transition: .15s;
}

.confirm-button.active {
  background: rgba(212,175,55,0.15);
  border-color: var(--gold);
  color: var(--gold);
}

/* =========================
   GRAFICO (LINEA ONDULATA)
========================= */
.chart {
  background: var(--bg-soft);
  border-radius: 16px;
  padding: 16px;
}

.chart svg {
  width: 100%;
  height: 120px;
}

.chart path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================
   NAV BAR
========================= */
.navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--bg-card);
  display: flex;
  justify-content: space-around;
  padding: 14px 0;
  border-top: 1px solid #2a2d35;
}

.navbar a {
  color: var(--gray);
  text-decoration: none;
  font-size: 12px;
}

.navbar a.active {
  color: var(--gold);
  font-weight: 600;
}
/* =========================
   AUTH BAR (PICCOLA)
========================= */
.auth-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
}

.auth-email {
  color: var(--gray);
  font-size: 12px;
}

/* Bottoni piccoli */
.auth-btn {
  background: transparent;
  border: 1px solid #2a2d35;
  color: var(--gray);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}

.auth-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.auth-btn.logout {
  border-color: var(--red);
  color: var(--red);
}
.chart-center-text {
  position: relative;
  top: -120px;
  text-align: center;
  font-weight: 600;
  color: white;
  pointer-events: none;
}
.hidden {
  display: none !important;
}
/* ===== CONFERME OPERAZIONE ===== */
.conf {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.conf-btn {
  background: #FFD700;          /* giallo */
  color: #111;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.conf-btn:hover {
  background: #e6c200;
}

/* STATO SELEZIONATO */
.conf-btn.active {
  background: #c9a600;          /* giallo scuro */
  color: #000;
  box-shadow: inset 0 0 0 2px #00000030;
}
/* ===== NOTE INPUT MODERNO ===== */
.notes-input {
  width: 100%;
  min-height: 42px;              /* 1 riga */
  max-height: 180px;             /* limite */
  padding: 10px 14px;
  background: #f7f7f4;           /* bianco sporco */
  color: #111;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  resize: none;                  /* niente resize manuale */
  line-height: 1.4;
  transition: all 0.2s ease;
}

/* focus moderno */
.notes-input:focus {
  outline: none;
  border-color: #FFD700;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.25);
  background: #fffdf5;
}

/* placeholder soft */
.notes-input::placeholder {
  color: #999;
}
/* HERO SECTION */
.hero {
  padding: 32px 20px;
  margin: 20px auto 10px;
  max-width: 900px;
  text-align: center;
}

.hero-title {
  font-size: 28px;
  font-weight: 600;
  color: #f5c400; /* giallo principale */
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 650px;
  margin: 0 auto 18px;
  line-height: 1.5;
}

.hero-points {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}

.hero-points span {
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(245, 196, 0, 0.25);
}
/* GRAPH INFO SECTION */
.graph-info {
  max-width: 800px;
  margin: 24px auto 40px;
  padding: 0 20px;
  text-align: center;
}

.graph-info-title {
  font-size: 18px;
  font-weight: 600;
  color: #f5c400; /* giallo principale */
  margin-bottom: 10px;
}

.graph-info-text {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 8px;
}

.graph-info-text.muted {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
}

/* STATS – PILL STYLE */
#stats {
  max-width: 900px;
  margin: 30px auto 45px;
  padding: 0 20px;

  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;

  padding: 10px 14px;
  min-width: 120px;

  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(245, 196, 0, 0.25);
  border-radius: 999px; /* pill vera */

  backdrop-filter: blur(6px);
}

.stat-value {
  font-size: 18px;
  font-weight: 600;
  color: #f5c400; /* giallo */
  line-height: 1.2;
}

.stat-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
  white-space: nowrap;
}
/* SAVED TRADES SECTION */
.trades-section {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #f5c400;
  text-align: center;
  margin-bottom: 6px;
}

.section-subtitle {
  font-size: 14px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 20px;
}

/* LIST */
.trades-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* CARD */
.trade-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(245, 196, 0, 0.2);
  border-radius: 12px;
  padding: 12px 14px;
}

.trade-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.trade-asset {
  font-size: 14px;
  font-weight: 500;
  color: white;
}

.trade-result {
  font-size: 14px;
  font-weight: 600;
}

.trade-result.positive {
  color: #4caf50;
}

.trade-result.negative {
  color: #f44336;
}

.trade-details {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}
/* WHY SAVE TRADES SECTION */
.why-section {
  max-width: 800px;
  margin: 30px auto 45px;
  padding: 0 20px;
  text-align: center;
}

.why-text {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 14px;
}

.why-points {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.why-points span {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(245, 196, 0, 0.25);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

@media (max-width: 600px) {
  .hero-points,
  .why-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    justify-items: stretch;
  }

  .hero-points span,
  .why-points span {
    width: 100%;
    text-align: center;
    padding: 5px 8px;
    font-size: 12px;
  }

  .hero-points span:last-child,
  .why-points span:last-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: fit-content;
    max-width: 100%;
    white-space: nowrap;
  }
}
/* PERFORMANCE INSIGHTS SECTION */
.performance-section {
  max-width: 850px;
  margin: 40px auto 45px;
  padding: 0 20px;
  text-align: center;
}

.performance-text {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 18px;
}

.performance-tips {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.performance-tip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(245, 196, 0, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}
/* FINAL MESSAGE SECTION */
.final-section {
  max-width: 900px;
  margin: 60px auto 70px;
  padding: 0 20px;
  text-align: center;
}

.final-text {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.6;
  color: #f5c400; /* giallo focus */
}
.trade-pnl {
  font-weight: 600;
}

.trade-pnl.positive {
  color: #4caf50; /* verde */
}

.trade-pnl.negative {
  color: #f44336; /* rosso */
}
.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.8);
}

.btn.ghost:hover {
  border-color: #f5c400;
  color: #f5c400;
}
.trade {
  cursor: pointer;
}

.trade * {
  pointer-events: none;
}
/* ===== STATS CIRCLES ===== */
.stats-circles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.stat-circle {
  border: 2px solid #FFD700;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 215, 0, 0.05);
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #FFD700;
}

.stat-label {
  font-size: 13px;
  opacity: 0.8;
  margin-top: 4px;
}

/* Responsive */
@media (max-width: 900px) {
  .stats-circles {
    grid-template-columns: repeat(2, 1fr);
  }
}

.fake-chart {
  background: linear-gradient(
    to top,
    rgba(212,175,55,0.08),
    transparent
  );
  border-radius: 22px;

  /* QUI È IL FIX */
  padding: 22px 14px;   /* meno spazio laterale */
  margin: 22px auto 18px;
  max-width: 94%;       /* grafico più “incassato” */
}

.fake-chart svg {
  width: 100%;
  height: 300px;
}

.fake-chart path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* =========================
   STATISTICHE — VALORI %
========================= */
.stat-box strong {
  color: var(--gold);
}


/* ===== WELCOME TEXT ===== */
.welcome-text {
  text-align: center;
  font-size: 28px;
  font-weight: 600;
  color: #FFD700;
  margin: 40px 0 30px;
  letter-spacing: 0.5px;
}

/* Sottile separatore elegante */
.welcome-text::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, transparent, #FFD700, transparent);
  border-radius: 2px;
}

/* Mobile */
@media (max-width: 600px) {
  .welcome-text {
    font-size: 22px;
    margin: 25px 0 20px;
  }
}
.trial-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.trial-box {
  background: #111;
  border: 1px solid #FFD700;
  padding: 30px;
  max-width: 420px;
  width: 90%;
  border-radius: 12px;
  text-align: center;
}

.trial-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.hidden {
  display: none;
}

.tutorial-welcome-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10002;
  padding: 18px;
}

.tutorial-welcome-box {
  position: relative;
  background: #101112;
  border: 1px solid rgba(245, 196, 0, 0.5);
  border-radius: 14px;
  width: min(94vw, 520px);
  padding: 24px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.close-tutorial-welcome {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #f3f4f6;
  font-size: 18px;
  cursor: pointer;
}

.close-tutorial-welcome:hover {
  border-color: rgba(245, 196, 0, 0.7);
  color: #f5c400;
}

.tutorial-welcome-badge {
  margin: 0 0 8px;
  color: #f5c400;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tutorial-welcome-title {
  margin: 0 0 18px;
  color: #fff7d1;
}

.tutorial-preview-card {
  display: block;
  text-decoration: none;
  color: #f3f4f6;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.tutorial-preview-card,
.tutorial-preview-card * {
  text-decoration: none;
}

.tutorial-preview-card:hover {
  border-color: rgba(245, 196, 0, 0.65);
}

.tutorial-preview-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0b0c0d;
}

.tutorial-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tutorial-preview-play {
  position: absolute;
  inset: auto auto 10px 10px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(245, 196, 0, 0.75);
  color: #f5c400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.tutorial-preview-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  align-items: center;
  text-align: center;
}

.tutorial-preview-meta strong {
  color: #ffffff;
}

.tutorial-preview-meta span {
  color: #cbd0d8;
  font-size: 13px;
}

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

.tutorial-welcome-actions a,
.tutorial-welcome-actions a:hover,
.tutorial-welcome-actions a:focus,
.tutorial-welcome-actions a:visited {
  text-decoration: none;
}

.renewal-required-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
}

.renewal-required-box {
  position: relative;
  background: #111;
  border: 1px solid #ffb347;
  padding: 28px;
  width: min(92%, 460px);
  border-radius: 12px;
  text-align: center;
}

.renewal-required-title {
  margin-top: 0;
  color: #ffb347;
}

.close-renewal-required {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  color: #bbb;
  font-size: 20px;
  cursor: pointer;
}

.close-renewal-required:hover {
  color: #fff;
}

.renewal-required-actions {
  margin-top: 18px;
}

.premium-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 10000;
}

.premium-box {
  position: relative;
  background: #0f0f0f;
  border: 1px solid #FFD700;
  padding: 32px;
  max-width: 520px;
  width: 92%;
  border-radius: 14px;
  text-align: center;
}

.premium-title {
  color: #FFD700;
  margin-bottom: 20px;
}

.premium-graph {
  height: 120px;
  margin: 20px 0;
  position: relative;
  background: rgba(255,215,0,0.05);
  border-radius: 8px;
}

.graph-line {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  height: 3px;
  background: linear-gradient(90deg, #FFD700, #4caf50);
  transform: rotate(-5deg);
}

.premium-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.premium-stats .stat strong {
  color: #FFD700;
  font-size: 20px;
}

.premium-stats .stat span {
  font-size: 12px;
  opacity: 0.8;
}

.premium-plans {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.close-premium {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.7);
  background: rgba(255, 215, 0, 0.12);
  font-size: 18px;
  color: #FFD700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.close-premium:hover {
  color: #0f0f0f;
  background: #FFD700;
  border-color: #FFD700;
}

/* === FIX DEFINITIVO PULSANTI PREMIUM === */
.premium-plans button {
  flex: 1 !important;
  height: 48px !important;
  padding: 0 !important;

  display: flex !important;
  align-items: center;
  justify-content: center;

  font-size: 14px !important;
  font-weight: 600 !important;

  border-radius: 10px;
  box-sizing: border-box !important;
}

/* --- CALC WRAPPER --- */
.calc-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.calc-link {
  width: 92%;
  max-width: 420px;
  background: #141720;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  font-size: 14px;
  cursor: pointer;
  color: #fff;
  border: none;
}

/* ===== MODAL BACKDROP ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 18px;
}

.hidden {
  display: none !important;
}

/* ===== MODAL CONTENT ===== */
.modal-content {
  width: 100%;
  max-width: 420px;
  background: #0f1115;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  animation: slideUp .18s ease-out;
}

/* Calculator modal: allow full-height scrolling when lot section is expanded */
#calculatorModal {
  align-items: flex-start;
  overflow-y: auto;
}

#calculatorModal .modal-content {
  margin: 10px auto 20px;
}

#calculatorModal .replica-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

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

#calculatorModal .field label {
  text-align: left;
  font-size: 13px;
  color: #cfd5df;
}

#calculatorModal #openLotFormBtn {
  margin-top: 2px;
}

#calculatorModal .percent-results,
#calculatorModal .lot-result-card {
  margin-top: 4px;
}

#calculatorModal .warning-line {
  margin-top: 4px;
}

#calculatorModal .lot-warning-line {
  margin: 2px 0 0;
  text-align: left;
  font-size: 13px;
  color: #cfd5df;
}

.lot-calculator-collapsed {
  max-height: 0;
  opacity: 0;
  transform: translateY(8px) scale(0.99);
  overflow: hidden;
  pointer-events: none;
  margin-top: 0;
  gap: 0;
  transition: max-height 0.28s ease, opacity 0.22s ease, transform 0.22s ease, margin-top 0.22s ease;
}

.lot-calculator-collapsed.is-open {
  max-height: 1200px;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  margin-top: 4px;
  gap: 10px;
}

/* Title */
.modal-content h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

/* Inputs */
.modal-content input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  outline: none;
  background: #1a1d24;
  color: #fff;
  font-size: 15px;
  text-align: center;
}

/* Results */
.results {
  background: #141720;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.results p {
  margin: 0;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.results strong { font-weight: 600; }

/* Buttons */
.modal-content .btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn.primary {
  background: linear-gradient(180deg, #ffd84d 0%, #f5c400 100%);
  color: #000;
  border: none;
  box-shadow:
    0 4px 10px rgba(245, 196, 0, 0.35),
    inset 0 1px 0 rgba(255,255,255,0.4);
}

.btn.ghost {
  background: transparent;
  border: 1px solid #2a2e3a;
  color: #ccc;
}

.note {
  font-size: 12px;
  opacity: 0.75;
}

.modal-text {
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.85;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-actions .btn {
  flex: 1;
}

@keyframes slideUp {
  from { transform: translateY(14px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* small screens adjustments (optional but safe) */
@media (max-width: 420px) {
  .modal-content { padding: 16px; border-radius: 14px; }
  .calc-link { padding: 10px; font-size: 14px; }
}

.calc-link {
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 15px;
}



.app-footer {
  margin-top: 40px;
  padding: 20px 12px;
  text-align: center;
  font-size: 12px;
  opacity: 1;
}

.app-footer > p,
.app-footer .footer-links,
.app-footer .footer-note-center,
.app-footer .muted-text {
  opacity: 0.55;
}

.support-card {
  max-width: 460px;
  margin: 0 auto 14px;
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.12), rgba(255, 255, 255, 0.03));
}

.support-card h4 {
  margin: 0 0 6px;
  font-size: 13px;
  color: #f5d47a;
}

.support-card p {
  margin: 0 0 10px;
  line-height: 1.45;
  opacity: 0.9;
}

.support-card-mail {
  display: inline-flex;
  margin-top: 10px;
  color: #f7d97d;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.support-card-mail:hover {
  color: #ffe7a9;
  text-decoration: underline;
}

.support-modal-content {
  max-width: 520px;
  text-align: left;
}

.support-modal-content textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid #2a2d35;
  border-radius: 12px;
  padding: 13px;
  color: #fff;
  font-size: 14px;
  resize: vertical;
  min-height: 120px;
}

.support-modal-content textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.app-footer p {
  margin: 6px 0;
}

.footer-links a {
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.footer-note {
  max-width: 420px;
  margin: 10px auto 0;
  line-height: 1.4;
  text-align: center;
}


/* ===== LEGAL MODALS ===== */
.modal-content.legal {
  max-height: 80vh;
  overflow-y: auto;
}

.legal-text {
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.85;
}

.legal-text p {
  margin-bottom: 10px;
}

/* ===== FOOTER CENTER FIX DEFINITIVO ===== */

.footer-center {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}

.footer-center p {
  text-align: center;
}

.footer-note-center {
  margin-top: 10px;
  line-height: 1.4;
  opacity: 0.75;
}

.footer-settings {
  margin-top: 14px;
  padding: 12px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
}

.footer-settings h4 {
  margin: 0 0 8px;
  font-size: 13px;
  opacity: 0.9;
}

.settings-toggle{
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
}

.settings-panel{
  margin-top:10px;
  padding:10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(0,0,0,0.25);
  display:none;
}

.settings-panel.active{
  display:block;
}

.footer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 6px;
}

.chat-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  color: #ffd166;
}

.footer-toggle{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin:8px 0;
  font-size:12px;
  opacity:0.9;
}

.settings-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 10px 0;
}

.settings-group {
  display: grid;
  gap: 8px;
  text-align: left;
}

.settings-language-actions {
  display: flex;
  gap: 8px;
}

.settings-lang-btn {
  flex: 1;
}

.settings-lang-btn.is-active {
  border-color: rgba(245, 196, 0, 0.75);
  color: #f5c400;
  background: rgba(245, 196, 0, 0.12);
}

.settings-group-title {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.4px;
  opacity: 0.82;
}

.settings-subgroup {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.settings-subtitle {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}


.settings-input {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
}

.settings-modal-content {
  max-width: 520px;
  text-align: left;
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#settingsModal {
  align-items: flex-start;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#settingsPanel {
  margin: 8px auto;
}

.settings-modal-content::-webkit-scrollbar,
#settingsModal::-webkit-scrollbar {
  width: 0;
  height: 0;
}

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

.settings-modal-close {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px;
}

.settings-modal-close:hover {
  color: #fff;
}

.settings-modal-content .footer-toggle {
  justify-content: space-between;
  margin: 0;
  font-size: 14px;
}

.date-input {
  cursor: pointer;
}

.date-picker {
  position: absolute;
  z-index: 14000;
  background: #0f1116;
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  padding: 10px;
  width: 260px;
}

.date-picker.hidden {
  display: none;
}

.date-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.date-picker-title {
  font-size: 13px;
  font-weight: 600;
  color: #f5f5f5;
}

.date-picker-nav {
  display: inline-flex;
  gap: 6px;
}

.date-picker-nav button {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.35);
  background: rgba(255, 215, 0, 0.08);
  color: #f5c400;
  cursor: pointer;
}

.date-picker-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
}

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

.date-picker-day {
  height: 28px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #e6e6e6;
  cursor: pointer;
  font-size: 12px;
}

.date-picker-day:hover {
  border-color: rgba(245, 196, 0, 0.6);
  color: #f5c400;
}

.date-picker-day.is-today {
  border-color: rgba(255, 255, 255, 0.35);
}

.date-picker-day.is-selected {
  background: rgba(245, 196, 0, 0.18);
  border-color: rgba(245, 196, 0, 0.8);
  color: #f5c400;
  font-weight: 600;
}

.date-picker-day.is-empty {
  cursor: default;
  background: transparent;
  border-color: transparent;
}

@media (max-width: 768px) {
  #settingsModal {
    padding: 10px;
  }

  #settingsPanel {
    margin: 0 auto;
    max-height: calc(100dvh - 20px);
  }
}

.subscription-modal-content {
  max-width: 460px;
  text-align: left;
}

.subscription-status-row {
  display: flex;
  justify-content: flex-start;
}

.subscription-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
}

.subscription-badge.is-active {
  border-color: rgba(46, 204, 113, 0.45);
  background: rgba(46, 204, 113, 0.14);
  color: #bbf7d0;
}

.subscription-badge.is-warning {
  border-color: rgba(245, 196, 0, 0.45);
  background: rgba(245, 196, 0, 0.14);
  color: #fde68a;
}

.subscription-badge.is-expired {
  border-color: rgba(231, 76, 60, 0.45);
  background: rgba(231, 76, 60, 0.14);
  color: #fecaca;
}

.subscription-grid {
  display: grid;
  gap: 8px;
  background: #141720;
  border-radius: 12px;
  padding: 12px;
}

.subscription-grid p {
  margin: 0;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.86);
}

.subscription-grid span {
  opacity: 0.8;
}

.subscription-grid strong {
  font-weight: 700;
}

.switch{
  position:relative;
  display:inline-block;
  width:44px;
  height:24px;
}
.switch input{opacity:0;width:0;height:0}
.slider{
  position:absolute;
  cursor:pointer;
  top:0;left:0;right:0;bottom:0;
  background:rgba(255,255,255,0.08);
  border-radius:24px;
  transition:all .2s ease;
}
.slider:before{
  position:absolute;
  content:"";
  height:18px;width:18px;
  left:3px;top:3px;
  background:#fff;
  border-radius:50%;
  transition:all .2s ease;
}
.switch input:checked + .slider{
  background:rgba(255,209,102,0.35);
}
.switch input:checked + .slider:before{
  transform:translateX(20px);
  background:#ffd166;
}

.swing-monitoring-block {
  margin: 16px 0;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.24);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.1), rgba(255, 255, 255, 0.02));
}

.swing-monitoring-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.swing-monitoring-head h4 {
  margin: 0;
  font-size: 16px;
}

.swing-monitoring-state p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.45;
}

.swing-monitoring-link {
  width: auto;
  padding: 10px 12px;
}

.swing-monitoring-cta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}

.swing-monitor-modal-content {
  text-align: left;
}

.swing-monitoring-list {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.55;
  display: grid;
  gap: 6px;
}

.floating-chat-badge{
  position:fixed;
  right:16px;
  bottom:16px;
  width:58px;
  height:58px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,0.18);
  background:radial-gradient(circle at 30% 20%, #fff3c4 0%, #ffd166 35%, #ffb703 100%);
  color:#1b1b1b;
  font-weight:700;
  box-shadow:0 12px 30px rgba(0,0,0,0.4);
  display:none;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index:50;
  letter-spacing:0.5px;
}
.floating-chat-badge.active{display:flex;}

.floating-chat-badge::after{
  content:"";
  position:absolute;
  inset:-6px;
  border-radius:50%;
  border:1px solid rgba(255,209,102,0.4);
  box-shadow:0 0 20px rgba(255,209,102,0.35);
  opacity:0;
  animation:chatPulse 2.4s infinite;
}

@keyframes chatPulse{
  0%{transform:scale(0.92);opacity:0;}
  30%{opacity:0.8;}
  70%{transform:scale(1.08);opacity:0.2;}
  100%{transform:scale(1.12);opacity:0;}
}


.disclaimer-text {
  opacity: 0.7;
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
}

.card-title {
  text-align: center;
}

#openCalcBtn {
   background: linear-gradient(180deg, #ffd84d 0%, #f5c400 100%);
  color: #000;
  border: none;
  box-shadow:
    0 4px 10px rgba(245, 196, 0, 0.35),
    inset 0 1px 0 rgba(255,255,255,0.4);

  /* 👇 QUESTO è il punto chiave per il testo */
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1;
  text-align: center;

  cursor: pointer;
}



.discipline-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.discipline-box {
  max-width: 520px;
  background: #111;
  color: #fff;
  padding: 28px;
  border-radius: 12px;
  text-align: center;
  font-family: system-ui, sans-serif;
}

.discipline-box h2 {
  color: #ff4d4d;
  margin-bottom: 16px;
}

.discipline-box p {
  margin-bottom: 14px;
  line-height: 1.5;
  font-size: 15px;
}

.discipline-box button {
  margin-top: 18px;
  padding: 10px 22px;
  border: none;
  background: #ff4d4d;
  color: #fff;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
}


/* ================= CONTAINER DASHBOARD ================= */
.control-console,
.report-section {
  margin-top: 40px;
  padding: 28px;
  background: linear-gradient(180deg, #0e0e0e, #0b0b0b);
  border: 1px solid #222;
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.04);
}

/* ================= HEADER ================= */
.console-header,
.report-section h2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.console-header h3,
.report-section h2 {
  color: #ffd700;
  font-size: 22px;
  margin: 0;
}

.console-sub {
  font-size: 13px;
  color: #999;
}

/* ================= STATUS ================= */
.console-status {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(0, 200, 120, 0.12);
  color: #00d084;
  border: 1px solid rgba(0, 200, 120, 0.3);
}

/* ================= METRICHE ================= */
.console-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

.console-metric {
  background: #0b0b0b;
  border: 1px solid #222;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
}

.metric-title {
  display: block;
  font-size: 13px;
  color: #aaa;
  margin-bottom: 6px;
}

.metric-number {
  font-size: 26px;
  font-weight: 700;
  color: #ffd700;
}

/* ================= REPORT ACTIONS ================= */
.report-actions {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
}

#downloadReport {
  width: fit-content;
  min-width: 180px;
  display: block;
  margin: 18px auto 0;
  padding-left: 22px;
  padding-right: 22px;
}

/* ================= BOTTONI ================= */
.btn {
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn.primary {
  background: #ffd700;
  color: #000;
  border: none;
}

.btn.primary:hover {
  opacity: 0.85;
}

.btn.ghost {
  background: transparent;
  color: #ffd700;
  border: 1px solid #333;
}

.btn.ghost:hover {
  background: rgba(255, 215, 0, 0.08);
}

#logoutBottom {
  color: #ef4444;
  border-color: #ef4444;
}

#logoutBottom:hover {
  color: #f87171;
  border-color: #f87171;
  background: rgba(239, 68, 68, 0.12);
}

.btn.small {
  padding: 6px 12px;
  font-size: 12px;
}

/* ================= REPORT PREVIEW ================= */
.report-preview {
  margin-top: 22px;
  padding: 22px;
  background: #0b0b0b;
  border: 1px solid #222;
  border-radius: 14px;
}

.report-preview h3 {
  color: #ffd700;
  margin-bottom: 10px;
}

.report-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 14px;
}

.report-columns h4 {
  font-size: 15px;
  margin-bottom: 8px;
}

.positive {
  color: #00d084;
}

.negative {
  color: #ff5f5f;
}

.report-footer {
  margin-top: 18px;
  text-align: right;
}

/* ================= LISTE ================= */
.report-columns ul {
  padding-left: 18px;
  font-size: 13px;
  color: #ccc;
}

/* ================= SUGGERIMENTI ================= */
.suggestion-box {
  margin-top: 18px;
  padding: 22px;
  background: #0b0b0b;
  border: 1px solid #222;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.6;
  color: #ddd;
}

.suggestion-actions {
  margin-top: 16px;
  text-align: right;
}

/* Stati colore */
.status-loss {
  background: rgba(255, 80, 80, 0.15);
  color: #ff5f5f;
  border-color: rgba(255, 80, 80, 0.4);
}

.status-profit {
  background: rgba(0, 208, 132, 0.15);
  color: #00d084;
  border-color: rgba(0, 208, 132, 0.4);
}

.status-neutral {
  background: rgba(180, 180, 180, 0.15);
  color: #bbb;
  border-color: rgba(180, 180, 180, 0.4);
}

.panel-separator {
  margin: 28px 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 215, 0, 0.15),
    transparent
  );
}

/* ================= PRE GRAPH SECTION ================= */
.pre-graph-section {
  margin: 50px auto 30px;
  padding: 32px;
  max-width: 1000px;
  background: linear-gradient(180deg, #0e0e0e, #0b0b0b);
  border: 1px solid #222;
  border-radius: 16px;
  text-align: center;
}

.pre-graph-section h2 {
  color: #ffd700;
  font-size: 24px;
  margin-bottom: 8px;
}

.pre-graph-subtitle {
  color: #aaa;
  font-size: 14px;
  margin-bottom: 30px;
}

/* Box pillole */
.pill-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

/* Singola pillola */
.pill {
  padding: 18px 16px;
  background: #0f0f0f;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.pill:hover {
  transform: translateY(-4px);
  border-color: #ffd70055;
}

.pill-title {
  display: block;
  color: #ffd700;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 15px;
}

.pill p {
  color: #ccc;
  font-size: 13px;
  line-height: 1.5;
}

/* CTA finale */
.pre-graph-cta {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #1f1f1f;
  color: #ffd700;
  font-size: 14px;
}

.pre-graph-readmore__toggle {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 215, 0, 0.35);
  background: rgba(255, 215, 0, 0.08);
  color: #ffd700;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.pre-graph-readmore__toggle::after {
  content: ">";
  font-size: 12px;
  transform: rotate(90deg);
  transition: transform 0.25s ease;
}

.pre-graph-fade-preview {
  margin-top: 16px;
  position: relative;
  max-height: 132px;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.pre-graph-fade-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 110px;
  background: linear-gradient(
    to bottom,
    rgba(11, 11, 11, 0),
    rgba(11, 11, 11, 0.72) 58%,
    rgba(11, 11, 11, 0.97)
  );
  backdrop-filter: blur(2px);
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.pre-graph-readmore__content {
  margin-top: 0;
}

.pre-graph-fade-preview.is-expanded {
  max-height: 1200px;
}

.pre-graph-fade-preview.is-expanded .pre-graph-fade-overlay {
  opacity: 0;
}

.pre-graph-readmore__toggle[aria-expanded="true"]::after {
  transform: rotate(-90deg);
}


/* ================= TRADER PROFILE ================= */
.trader-profile-section {
  margin: 50px auto;
  padding: 32px;
  max-width: 1000px;
  background: linear-gradient(180deg, #0e0e0e, #0b0b0b);
  border: 1px solid #222;
  border-radius: 16px;
  text-align: center;
}

.trader-profile-section h2 {
  color: #ffd700;
  font-size: 24px;
  margin-bottom: 8px;
}

.profile-subtitle {
  color: #aaa;
  font-size: 14px;
  margin-bottom: 30px;
}

/* GRID */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

/* CARD */
.profile-card {
  padding: 16px;
  background: #0f0f0f;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  text-align: left;
}

.profile-card.full {
  grid-column: span 2;
}

.profile-label {
  display: block;
  color: #ffd700;
  font-size: 13px;
  margin-bottom: 6px;
}

.profile-card input,
.profile-card select,
.profile-card textarea {
  width: 100%;
  background: #0b0b0b;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 10px;
  color: #eee;
  font-size: 13px;
}

.profile-card textarea {
  min-height: 80px;
  resize: vertical;
}

/* BUTTON */
.save-profile-btn {
  margin-top: 26px;
  padding: 12px 26px;
  background: linear-gradient(90deg, #ffd700, #e6c200);
  border: none;
  border-radius: 30px;
  color: #000;
  font-weight: 600;
  cursor: pointer;
}

.save-profile-btn:hover {
  opacity: 0.9;
}

/* INFO */
.profile-info {
  margin-top: 18px;
  color: #999;
  font-size: 13px;
}

.trader-profile-section {
  margin: 40px auto;
  padding: 28px;
  max-width: 1000px;
  background: linear-gradient(180deg,#0e0e0e,#0b0b0b);
  border: 1px solid #222;
  border-radius: 14px;
  color: #ddd;
}

.trader-profile-section h2 { color: #ffd700; margin-bottom: 6px; }
.profile-subtitle { color: #aaa; margin-bottom: 16px; }

.insight-box {
  background: #0f0f0f;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 12px;
}

.insight-list { margin: 8px 0 16px 18px; color: #ccc; }

.insights-controls {
  display:flex;
  gap:10px;
  align-items:center;
  margin-top:10px;
}

.save-profile-btn { padding:10px 18px; border-radius:26px; border:none; cursor:pointer; background: linear-gradient(90deg,#ffd700,#e6c200); color:#000; font-weight:600;}
.save-profile-btn.alt { background: transparent; color:#ffd700; border:1px solid #ffd700; }

.ai-text-output { margin-top:12px; color:#cfcfcf; font-size:14px; background:#0b0b0b; padding:12px; border-radius:8px; border:1px solid #1b1b1b; min-height:40px; }


/* base section */
/* ================= TRADER PROFILE AUTO ================= */

.trader-profile-section {
  margin: 50px auto;
  padding: 32px;
  max-width: 1000px;
  background: linear-gradient(180deg, #0e0e0e, #0b0b0b);
  border: 1px solid #222;
  border-radius: 16px;
  text-align: center;
}

.trader-profile-section h2 {
  color: #ffd700;
  font-size: 24px;
  margin-bottom: 6px;
}

.profile-subtitle {
  color: #aaa;
  font-size: 14px;
  margin-bottom: 30px;
}

.section-title {
  text-align: center;
  color: #ffd700;
  margin: 28px 0 12px;
  font-size: 16px;
}

/* GRID */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

/* CARD */
.profile-card {
  padding: 16px;
  background: #0f0f0f;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  text-align: left;
}

.profile-label {
  color: #ffd700;
  font-size: 13px;
  margin-bottom: 6px;
}

.profile-value {
  color: #eee;
  font-size: 15px;
  font-weight: 500;
}

/* STATUS */
.good { border-left: 4px solid #2ecc71; }
.warn { border-left: 4px solid #f39c12; }
.bad  { border-left: 4px solid #e74c3c; }

/* valore automatico (sostituisce input/select) */
.profile-value {
  background: #0b0b0b;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 10px;
  color: #eee;
  font-size: 13px;
  min-height: 38px;
  display: flex;
  align-items: center;
  white-space: pre-wrap;
}

#bestDay.profile-value,
#worstDay.profile-value {
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
  gap: 12px;
  width: 100%;
}

.profile-day-date {
  color: #d9dee7;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  min-width: 0;
  flex: 1 1 auto;
}

.profile-day-amount {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  margin-left: auto;
  white-space: nowrap;
  flex: 0 0 auto;
}

.performance-intelligence-shell {
  margin-top: 28px;
}

.performance-intelligence-panel {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  background:
    radial-gradient(560px 260px at 100% -10%, rgba(212, 175, 55, 0.13), transparent 58%),
    linear-gradient(180deg, rgba(15, 18, 24, 0.96), rgba(10, 12, 16, 0.97));
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.34);
  text-align: left;
}

.performance-intelligence-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0), rgba(212, 175, 55, 0.4), rgba(212, 175, 55, 0));
}

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

.pi-head-main h3 {
  margin: 0;
  font-size: 24px;
  color: #f5f7fb;
}

.pi-eyebrow {
  margin: 0 0 6px;
  color: #f0d27a;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pi-subtitle {
  margin: 8px 0 0;
  max-width: 640px;
  color: #aeb5c1;
  font-size: 14px;
  line-height: 1.6;
}

.pi-head-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.pi-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #d6dbe4;
  font-size: 12px;
  white-space: nowrap;
}

.pi-chip-gold {
  border-color: rgba(212, 175, 55, 0.28);
  background: rgba(212, 175, 55, 0.09);
  color: #f5de97;
}

.pi-status {
  margin-bottom: 18px;
  color: #8f98a6;
  font-size: 13px;
}

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

.pi-kpi {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.pi-kpi:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.2);
}

.pi-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.pi-kpi-label {
  color: #9ca3af;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pi-kpi-context {
  color: #f2d98b;
  font-size: 12px;
  font-weight: 600;
}

.pi-kpi-value {
  display: block;
  color: #f7f8fa;
  font-size: 28px;
  line-height: 1.05;
  margin-bottom: 8px;
}

.pi-kpi-meta {
  margin: 0;
  color: #99a2af;
  font-size: 12px;
  line-height: 1.5;
}

.pi-tone-positive .pi-kpi-value,
.pi-tone-positive .pi-insight-title {
  color: #6cf0a7;
}

.pi-tone-warn .pi-kpi-value,
.pi-tone-warn .pi-insight-title {
  color: #ff8e82;
}

.pi-tone-neutral .pi-insight-title {
  color: #f2d98b;
}

.pi-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  gap: 16px;
  margin-top: 18px;
}

.pi-main-column,
.pi-side-column {
  min-width: 0;
}

.pi-section-head {
  margin-bottom: 12px;
}

.pi-section-head h4 {
  margin: 0;
  color: #f3f4f6;
  font-size: 17px;
}

.pi-section-head p {
  margin: 6px 0 0;
  color: #9ca3af;
  font-size: 13px;
  line-height: 1.55;
}

.pi-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 12px;
}

.pi-summary-card {
  min-width: 0;
}

.pi-summary-card .profile-value {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.06);
  font-size: 14px;
  font-weight: 600;
}

.pi-summary-meta {
  display: block;
  margin-top: 9px;
  color: #9aa3af;
  font-size: 12px;
  line-height: 1.45;
}

.pi-boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.pi-board-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.025);
}

.pi-board-head h4 {
  margin: 0 0 10px;
  color: #edf2f7;
  font-size: 15px;
}

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

.pi-board-row {
  min-width: 0;
}

.pi-board-row-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 6px;
}

.pi-board-row-label {
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 600;
  word-break: break-word;
}

.pi-board-row-value {
  color: #f2d98b;
  font-size: 13px;
}

.pi-board-row-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.pi-board-row-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.35), rgba(212, 175, 55, 0.95));
}

.pi-board-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 7px;
  color: #8d96a3;
  font-size: 11px;
}

.pi-board-empty {
  margin: 0;
  color: #9aa3af;
  font-size: 13px;
  line-height: 1.6;
}

.pi-insights-list {
  display: grid;
  gap: 12px;
}

.pi-insight {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 11, 15, 0.7);
}

.pi-insight-title {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pi-insight-text {
  margin: 0;
  color: #eef2f7;
  font-size: 14px;
  line-height: 1.65;
}

.pi-insight-evidence {
  display: block;
  margin-top: 10px;
  color: #8e98a5;
  font-size: 12px;
}

.pi-callout {
  margin-top: 14px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.02));
}

.pi-callout-label {
  display: inline-block;
  margin-bottom: 8px;
  color: #f2d98b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pi-callout p {
  margin: 0;
  color: #f5f7fb;
  font-size: 14px;
  line-height: 1.65;
}

.pi-footer-note {
  margin: 15px 0 0;
  color: #8e98a5;
  font-size: 12px;
  line-height: 1.6;
}

.pi-empty {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 18px 2px 4px;
}

.pi-empty-orb {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  background:
    radial-gradient(circle at 32% 32%, rgba(255, 235, 171, 0.46), rgba(212, 175, 55, 0.12) 45%, rgba(212, 175, 55, 0) 72%),
    rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 0 18px rgba(212, 175, 55, 0.08), 0 0 20px rgba(212, 175, 55, 0.08);
}

.pi-empty-title {
  margin: 0 0 8px;
  color: #f4f5f7;
  font-size: 18px;
  font-weight: 600;
}

.pi-empty-text,
.pi-empty-hint {
  margin: 0;
  color: #9ba4b0;
  font-size: 14px;
  line-height: 1.65;
}

.pi-empty-hint {
  margin-top: 6px;
  font-size: 12px;
}

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

@media (max-width: 768px) {
  .performance-intelligence-panel {
    padding: 18px;
  }

  .pi-head {
    flex-direction: column;
  }

  .pi-head-chips {
    justify-content: flex-start;
  }

  .pi-summary-grid,
  .pi-boards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  #bestDay.profile-value,
  #worstDay.profile-value {
    padding: 12px;
    gap: 10px;
  }

  .profile-day-date {
    font-size: 12px;
  }

  .profile-day-amount {
    font-size: 15px;
  }

  .performance-intelligence-shell {
    margin-top: 24px;
  }

  .pi-kpi-grid {
    grid-template-columns: 1fr;
  }

  .pi-empty {
    grid-template-columns: 1fr;
  }

  .pi-head-main h3 {
    font-size: 22px;
  }
}

.mindset-wrapper {
  padding: 80px 20px;
  display: flex;
  justify-content: center;
}

.mindset-box {
  max-width: 800px;
  text-align: center;
  border-radius: 20px;
  display: flex;              /* 👈 CHIAVE */
  flex-direction: column;     /* 👈 CHIAVE */
  align-items: center;
}

.mindset-title {
  font-size: 2rem;
  margin-bottom: 20px;
}

.mindset-text {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 35px;
  opacity: 0.9;
}

.mindset-btn {
  display: block;
  padding: 14px 28px;
  background: #000;
  color: #FFD700;
  border: 2px solid #FFD700;
  text-decoration: none;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.25s ease;
}

.mindset-btn:hover {
  background: #FFD700;
  color: #000;
}

/* 🔥 QUESTA È LA CHIAVE */
.mindset-btn + .mindset-btn {
  margin-top: 16px;
}








/* WRAPPER */
.calendar-wrapper {
  max-width: 420px;
  margin: 40px auto;
}

/* CARD */
.calendar {
  background: linear-gradient(180deg, #0e0e0e, #0b0b0b);
  border: 1px solid #222;
  border-radius: 16px;
  padding: 18px;
}

/* HEADER */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.calendar-header h2 {
  color: #ffd700;
  font-size: 15px;
}

.calendar-header button {
  background: #0b0b0b;
  border: 1px solid #222;
  color: #ffd700;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
}

/* WEEKDAYS */
.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}

.calendar-weekdays div {
  font-size: 11px;
  color: #777;
  margin-bottom: 6px;
}

/* DAYS */
.calendar-days div {
  background: #0b0b0b;
  border: 1px solid #1f1f1f;
  border-radius: 8px;
  padding: 8px 0;
  font-size: 13px;
  cursor: pointer;
}

/* STATES */
.calendar-days .today {
  background: #ffd700;
  color: #000;
  font-weight: 700;
}

.calendar-days .profit {
  border-color: #2ecc71;
  color: #2ecc71;
}

.calendar-days .loss {
  border-color: #e74c3c;
  color: #e74c3c;
}

.calendar-days .inactive {
  visibility: hidden;
}

.calendar-wrapper {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
}
.hidden {
  display: none !important;
}
.calendar-note {
  margin-top: 16px;
  font-size: 13px;
  color: #aaa;
  line-height: 1.5;
  text-align: center;
}

.calendar-note .note-profit {
  color: #2ecc71;
  font-weight: 500;
}

.calendar-note .note-loss {
  color: #e74c3c;
  font-weight: 500;
}


.trader-profile-section {
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

.trader-profile-section.collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}
.add-profile-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

 /* wrapper compatto quando la tendina è chiusa */
.add-profile-wrapper.compact {
  margin-bottom: 4px;
  transition: margin-bottom 0.25s ease;
}


/* BUTTON - AGGIUNGI PROFILO */
.add-profile-btn {
  margin-top: 26px;
  padding: 12px 26px;
  background: linear-gradient(90deg, #ffd700, #e6c200);
  border: none;
  border-radius: 30px;
  color: #000;
  font-weight: 600;
  cursor: pointer;

  /* centratura */
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.add-profile-btn:hover {
  opacity: 0.9;
}

#toggleProfileBtn {
  margin-bottom: 4px;
}

#traderProfileSection {
  margin-top: 8px;
}
/* MOBILE */
@media (max-width: 768px) {

  /* wrapper compatto SOLO da chiuso */
  .add-profile-wrapper.compact {
    margin-bottom: 2px; /* super compatto */
  }

  /* opzionale: bottone leggermente più compatto su mobile */
  .add-profile-btn {
    padding: 10px 22px;
    font-size: 14px;
  }

  #toggleProfileBtn {
    margin-bottom: 4px;
  }

  #traderProfileSection {
    margin-top: 6px;
  }

}




.export-mode button {
  display: none !important;
}
/* blocca animazioni durante export */
.export-mode * {
  transition: none !important;
  animation: none !important;
}

/* garantisce larghezza corretta */
.export-section {
  width: 100%;
  box-sizing: border-box;
}


/* ===== ANALIZZIAMO (profilo) ===== */
.analysis-grid {
  display: grid;
  gap: 12px;
}

.analysis-questions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.analysis-q {
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  gap: 8px;
}

.trend-grid {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-top: 8px;
}

.trend-item {
  flex: 1;
  text-align: center;
}

.trend-title {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 6px;
}

.trend-select {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid #2a2d35;
  color: #fff;
}

.analysis-decision {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: rgba(255,255,255,0.9);
}

#analysisSuggestion {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.03);
  padding: 10px;
  border-radius: 10px;
}

/* mobile minor tweaks */
@media (max-width: 600px) {
  .trend-grid {
    flex-direction: column;
  }
}


.analysis-questions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.analysis-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px;
}

.analysis-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.analysis-row label {
  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;
}


.analysis-section {
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease;
}

.analysis-section.collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.analysis-section:not(.collapsed) {
  max-height: 1200px; /* abbastanza per tutto */
  opacity: 1;
}



/* ===== ANALIZZIAMO – TESTI ===== */

.analysis-wrapper {
  max-width: 1040px;
  margin: 40px auto;
   padding: 0 16px; /* respiro su mobile */
}

#toggleAnalysisBtn {
  margin-top: 0;
  margin-bottom: 14px;
}

#analysisContentWrap {
  margin-top: 6px;
}

.analysis-flow-card {
  background: linear-gradient(180deg, rgba(14, 17, 22, 0.92), rgba(10, 12, 16, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
  width: min(1000px, calc(100% - 32px));
  margin: 0 auto 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.analysis-flow-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.analysis-flow-eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #9aa4b2;
}

.analysis-flow-head h3 {
  margin: 0;
  font-size: 18px;
  color: #e7edf7;
}

.analysis-flow-note {
  margin: 2px 0 0;
  max-width: 420px;
  font-size: 13px;
  line-height: 1.45;
  color: #9ca3af;
}

.analysis-flow-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.analysis-flow-kpi {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 10px 12px;
}

.analysis-flow-kpi span {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 4px;
}

.analysis-flow-kpi strong {
  font-size: 18px;
  color: #f3f4f6;
}

.analysis-flow-chart-wrap {
  min-height: 260px;
  background: rgba(8, 10, 13, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
}

.analysis-flow-hint {
  margin-top: 10px;
  font-size: 13px;
  color: #9ca3af;
}

.withdrawals-card {
  background: linear-gradient(180deg, #0e0e0e, #0b0b0b);
  border: 1px solid #222;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  width: min(1000px, calc(100% - 32px));
  margin: 14px auto 12px;
}

.withdrawals-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.withdrawals-title-wrap {
  justify-self: start;
}

.withdrawals-eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #aaa;
}

.withdrawals-head h3 {
  margin: 0;
  font-size: 18px;
  color: #ffd700;
}

.withdrawals-capital-wrap {
  min-width: 170px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.withdrawals-prelevati-wrap {
  justify-self: center;
  align-items: center;
  text-align: center;
}

.premium-back-login {
  min-width: 220px;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid #FFD700;
  background: rgba(0, 0, 0, 0.45);
  color: #FFD700;
  font-weight: 700;
  cursor: pointer;
}

.premium-back-login:hover {
  background: rgba(0, 0, 0, 0.58);
}

.withdrawals-capital-wrap-right {
  justify-self: end;
}

.withdrawals-capital-wrap span {
  font-size: 12px;
  color: #aaa;
}

#withdrawCapitalValue {
  font-size: 20px;
  color: #ffd700;
}

#withdrawTotalValue {
  font-size: 20px;
  color: #ffd700;
}

.withdrawals-chart-wrap {
  min-height: 170px;
  background: #0f0f0f;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  padding: 8px;
}

.withdrawals-empty-note {
  margin-top: 10px;
  color: #999;
  font-size: 13px;
}

.withdrawals-actions {
  margin-top: 10px;
}

.withdrawal-inline-form {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.withdrawal-inline-form .btn {
  width: auto;
  min-width: 140px;
  padding: 12px 16px;
}

@media (max-width: 680px) {
  .withdrawals-card {
    width: calc(100% - 20px);
    margin: 10px auto;
    padding: 12px;
    border-radius: 12px;
  }

  .analysis-flow-head {
    flex-direction: column;
  }

  .analysis-flow-note {
    max-width: none;
  }

  .analysis-flow-kpis {
    grid-template-columns: 1fr;
  }

  .withdrawals-head {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
  }

  .withdrawals-title-wrap {
    grid-column: 1 / -1;
  }

  .withdrawals-capital-wrap {
    align-items: flex-start;
    justify-self: start;
    min-width: 0;
  }

  .withdrawals-prelevati-wrap {
    align-items: flex-start;
    text-align: left;
  }

  .withdrawals-head h3 {
    font-size: 16px;
  }

  .withdrawals-eyebrow {
    font-size: 11px;
    margin-bottom: 4px;
  }

  #withdrawCapitalValue,
  #withdrawTotalValue {
    font-size: 18px;
  }

  .withdrawals-chart-wrap {
    min-height: 145px;
    padding: 6px;
  }

  .withdrawals-actions .btn {
    width: 100%;
  }

  .withdrawal-inline-form {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .withdrawal-inline-form .btn {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
  }
}

.trader-dna-widget-top {
  width: 100%;
  margin: 0 0 6px;
}

.dna-challenge-widget-top {
  width: 100%;
  padding: 7px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FFD700, #e6c200);
  color: #0e0f12;
  box-shadow: 0 6px 18px rgba(255, 215, 0, 0.25);
}

.dna-challenge-widget-top.is-violated {
  background: linear-gradient(135deg, #ff4d4f, #d9363e);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 77, 79, 0.3);
}

.dna-challenge-widget-top.is-dismissible {
  cursor: pointer;
}

.dna-challenge-widget__top {
  display: grid;
  grid-template-columns: 92px 1fr 92px;
  align-items: center;
  min-height: 18px;
  text-align: center;
}

.dna-challenge-widget__title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  grid-column: 2;
  text-align: center;
}

.dna-challenge-widget__timer {
  grid-column: 3;
  justify-self: end;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.4px;
  color: #0e0f12;
}

.dna-challenge-widget-top.is-violated .dna-challenge-widget__timer {
  color: #fff;
}

.dna-challenge-widget__summary {
  margin: 2px 0 0;
  color: #1b1b1b;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
}

.dna-challenge-widget-top.is-violated .dna-challenge-widget__summary {
  color: #fff;
}

.analysis-intro,
.analysis-outro {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 18px 20px;
}

.analysis-title {
  text-align: center;
  color: #FFD700;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 14px;
}

.analysis-intro p,
.analysis-outro p {
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 10px;
}

.analysis-emphasis {
  color: #fff;
  font-weight: 500;
}

.analysis-note {
  text-align: center;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
}


#partialsList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.partial-row {
  background: rgba(255,255,255,0.05);
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
}

.muted-text {
  font-size: 13px;
  opacity: 0.7;
  text-align: center;
}

.muted-text-inline {
  font-size: 12px;
  opacity: 0.72;
}

.session-live-badge {
  margin-top: 8px;
  margin-bottom: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 209, 102, 0.28);
  background: rgba(255, 209, 102, 0.08);
  font-size: 12px;
  color: #ffe08a;
}



.daily-performance {
  margin-top: 10px;
}

.profile-card .delta {
  font-size: 12px;
  margin-top: 4px;
  opacity: 0.75;
}

.profile-card .delta.positive {
  color: #4caf50;
}

.profile-card .delta.negative {
  color: #f44336;
}

.profile-card .delta.muted {
  color: #9ca3af;
}

.profile-card.full {
  grid-column: span 2;
}

.profile-value.positive {
  color: #4caf50;
}

.profile-value.negative {
  color: #f44336;
}


/* 🔥 NASCONDE I SOTTO-RISULTATI GIORNALIERI */
.daily-performance .delta {
  display: none;
}



/* =========================
   DELETE ACCOUNT – COMPACT
========================= */
#deleteAccount {
  width: fit-content !important;   /* 🔥 override totale */
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;

  background: #e74c3c;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

#deleteAccount:hover {
  background: #d63b2b;
}


.consistency-card {
  margin-top: 20px;
  text-align: center;
  background: linear-gradient(180deg, #0e0e0e, #0b0b0b);
  border: 1px solid #222;
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.consistency-card h3 {
  margin-bottom: 10px;
  color: #ffd700;
  letter-spacing: 0.2px;
}

.consistency-sub {
  font-size: 14px;
  line-height: 1.55;
  color: #aaa;
  margin: 0 auto 14px;
  max-width: 720px;
}

.consistency-chart-wrap {
  position: relative;
  width: 100%;
  height: 260px;
  background: #0f0f0f;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  padding: 8px;
}

.consistency-note {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: #999;
}

.consistency-toggle {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.toggle-btn {
  background: transparent;
  border: 1px solid #222;
  color: #aaa;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s ease;
}

.toggle-btn.active {
  background: #ffd700;
  color: #111;
  border-color: #ffd700;
}

.toggle-btn:hover {
  border-color: #ffd700;
  color: #ffd700;
}


.register-top-bar {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 14px;

  text-align: center;
  font-size: 13px;
  font-weight: 500;

  color: #0e0f12;
  background: linear-gradient(135deg, #FFD700, #e6c200);
  border-radius: 12px;

  box-shadow: 0 6px 18px rgba(255, 215, 0, 0.25);
}

.register-top-bar strong {
  font-weight: 700;
}

#loginBox {
  display: grid;
  gap: 10px;
}

#registerBox {
  display: grid;
  gap: 10px;
}

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

.auth-register-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.68);
}

#forgotPassword.auth-link-btn {
  width: auto;
  justify-self: center;
  margin-top: 8px;
  padding: 2px 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#forgotPassword.auth-link-btn:hover {
  color: #f5c400;
}
.fast-register-hint {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  line-height: 1.4;
}

.fast-register-hint strong {
  color: #FFD700;
  font-weight: 600;
}

@media (max-width: 640px) {
  .auth-register-grid {
    grid-template-columns: 1fr;
  }
}


.hero-cta {
  padding: 16px;
  text-align: center;
  background: #0F1116;
  color: #FFF;
  margin-bottom: 20px;
}

.hero-problem {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #FFD700;
}

.hero-benefit {
  font-size: 15px;
  margin-bottom: 10px;
  line-height: 1.5;
}

.hero-urgency {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 10px;
  color: #FF5F57;
}

.fast-register-bar {
  font-size: 14px;
  margin: 12px 0;
  color: #FFF;
  background: #333;
  padding: 8px;
  border-radius: 8px;
}

.hero-testimonial {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 16px;
}

.btn-primary {
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 600;
  background: #FFD700;
  color: #0E0F12;
  border-radius: 8px;
}




/* ===============================
   IMPATTO DECISIONALE – SEZIONE
================================ */

.decision-impact-card {
  max-width: 900px;
  margin: 48px auto;
  padding: 22px 18px;
  background: linear-gradient(180deg, rgba(24, 28, 36, 0.92), rgba(14, 17, 23, 0.94));
  border: 1px solid rgba(160, 176, 200, 0.2);
  border-radius: 22px;
  text-align: center;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.decision-impact-title {
  font-size: 22px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 10px;
}

.decision-impact-title .hl {
  color: #9fb4d1;
}

.decision-impact-subtitle {
  font-size: 15px;
  color: rgba(255,255,255,0.75);
  max-width: 640px;
  margin: 0 auto 26px;
  line-height: 1.6;
}

/* GRAFICO */
.impact-chart {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(160, 176, 200, 0.18);
  border-radius: 14px;
  padding: 12px 10px 10px;
  margin: 18px auto 20px;
  max-width: 95%;
}

.impact-chart svg {
  width: 100%;
  height: 210px;
}

.impact-chart path {
  fill: none;
  stroke: #7f95b3;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* STATISTICHE */
.impact-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.impact-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(160, 176, 200, 0.22);
  border-radius: 12px;
  padding: 12px 10px;
}

.impact-label {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 6px;
}

.impact-value {
  font-size: 20px;
  font-weight: 700;
}

.impact-value.positive {
  color: #4CAF50;
}

.impact-value.discipline {
  color: #5b8def;
}

.impact-value.negative {
  color: #F44336;
}

/* DISCLAIMER */
.impact-disclaimer {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
}

/* RESPONSIVE */
@media (max-width: 700px) {
  .decision-impact-card {
    margin: 26px auto;
    padding: 14px 12px;
    border-radius: 16px;
  }

  .decision-impact-title {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .decision-impact-subtitle {
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.45;
  }

  .impact-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .impact-chart svg {
    height: 150px;
  }

  .impact-label {
    font-size: 11px;
    margin-bottom: 4px;
  }

  .impact-value {
    font-size: 16px;
  }
}
/* ===== MULTI-LINE CHART ===== */

.impact-chart svg {
  width: 100%;
}

/* base */
.line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* linee */
.line.impulsive {
  stroke: #F44336;
  opacity: 0.9;
}

.line.discipline {
  stroke: #5b8def;
}

.line.awareness {
  stroke: #4CAF50;
  opacity: 0.9;
}

/* legenda */
.impact-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
  font-size: 12px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.75);
}

.legend-item::before {
  content: "";
  width: 12px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}

.legend-item.impulsive::before {
  background: #F44336;
}

.legend-item.discipline::before {
  background: #5b8def;
}

.legend-item.awareness::before {
  background: #4CAF50;
}



/* ===== HOW IT WORKS – PRE LOGIN ===== */
.how-it-works {
  max-width: 820px;
  margin: 50px auto 60px;
  padding: 0 20px;
  text-align: center;
}

.how-title {
  font-size: 20px;
  font-weight: 600;
  color: #f5c400;
  margin-bottom: 10px;
}

.how-subtitle {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
  margin-bottom: 30px;
}

.how-steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 35px;
}

.how-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  text-align: left;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(245,196,0,0.2);
  border-radius: 12px;
  padding: 14px 16px;
}

.step-number {
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f5c400;
  color: #111;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.how-step p {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255,255,255,0.85);
}

.how-cta {
  margin-top: 20px;
}

.cta-text {
  font-size: 16px;
  color: #f5c400;
  margin-bottom: 14px;
}

.cta-note {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-top: 8px;
}


/* ===== FILTER SECTION ===== */
.filter-section {
  max-width: 760px;
  margin: 60px auto 70px;
  padding: 0 20px;
  text-align: center;
}

.filter-text {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255,255,255,0.9);
  margin-bottom: 14px;
}

.filter-text.muted {
  font-size: 15px;
  color: rgba(255,255,255,0.65);
}

.filter-text.highlight {
  color: #f5c400;
  font-weight: 500;
}

.filter-text.final {
  font-size: 17px;
  font-weight: 600;
  color: #f5c400;
  margin-top: 18px;
}

/* ===== SERIOUS TRADER CTA ===== */
.serious-btn {
  margin-top: 24px;
  max-width: 320px;
}

/* =========================
   TOAST NOTIFICATIONS
========================= */
.toast-area {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10050;
  max-width: min(92vw, 360px);
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #15181f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid #c9a600;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  animation: toast-in 0.2s ease;
}

.toast--success { border-left-color: #2ecc71; }
.toast--error { border-left-color: #e74c3c; }
.toast--warn { border-left-color: #f5c400; }
.toast--info { border-left-color: #c9a600; }

.toast__message {
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-line;
  flex: 1;
}

.toast__close {
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}

.toast__close:hover {
  color: #fff;
}

.toast--hide {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  .toast-area {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    top: 12px;
    max-width: 92vw;
  }
}

/* =========================
   COACH DISCLIPLY
========================= */

.coach-evidence {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

.coach-evidence .evidence-line {
  padding: 2px 0;
}

.coach-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.coach-custom {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.2);
}

.coach-legend {
  margin: 10px 0 14px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
}

.coach-templates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.coach-template label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
}

.coach-template textarea {
  width: 100%;
  min-height: 120px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  resize: vertical;
}

.coach-template textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
}

.coach-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  z-index: 9998;
  padding: 16px;
}

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

.coach-modal-box {
  width: min(560px, 92vw);
  background: linear-gradient(140deg, #111319 0%, #171c26 55%, #10141d 100%);
  border-radius: 20px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.coach-modal-box h2 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: 0.2px;
}

.coach-modal-header {
  margin-bottom: 12px;
}

.coach-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 206, 84, 0.15);
  border: 1px solid rgba(255, 206, 84, 0.35);
  color: #ffd66b;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.coach-modal-sub {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.coach-modal-message {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.55;
  color: #fff;
}

.coach-popup-evidence {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 15, 22, 0.7);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.8);
}

.coach-popup-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.notifications-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.68);
  z-index: 10001;
  padding: 16px;
}

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

.notifications-modal-box {
  width: min(460px, 92vw);
  background: linear-gradient(140deg, #111319 0%, #171c26 55%, #10141d 100%);
  border-radius: 18px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.notifications-logo {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  margin-bottom: 10px;
}

.notifications-modal-box h2 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #fff;
}

.notifications-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
}

.notifications-actions {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

/* =========================
   HAMBURGER MENU
========================= */
.language-badge {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  right: 14px;
  z-index: 12100;
  transform: translateZ(0);
  will-change: transform;
}

.language-badge-btn {
  border: 1px solid rgba(245, 196, 0, 0.45);
  border-radius: 999px;
  background: rgba(8, 10, 14, 0.92);
  color: #f5c400;
  min-height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.language-badge-btn:hover {
  border-color: rgba(245, 196, 0, 0.75);
}

.language-badge-flag {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background-size: cover;
  background-position: center;
  display: inline-block;
}

.language-option-flag {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background-size: cover;
  background-position: center;
  display: inline-block;
  margin-right: 8px;
  flex-shrink: 0;
}

.flag-it {
  background-image: linear-gradient(90deg, #009246 33.33%, #ffffff 33.33%, #ffffff 66.66%, #ce2b37 66.66%);
}

.flag-us {
  background:
    linear-gradient(#3c3b6e, #3c3b6e) left top / 42% 54% no-repeat,
    repeating-linear-gradient(
      180deg,
      #b22234 0% 7.69%,
      #ffffff 7.69% 15.38%
    );
}

.language-menu {
  display: none;
  margin-top: 6px;
  padding: 6px;
  border: 1px solid rgba(245, 196, 0, 0.4);
  border-radius: 12px;
  background: rgba(8, 10, 14, 0.98);
  min-width: 136px;
}

.language-menu.open {
  display: grid;
  gap: 4px;
}

.language-option {
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #f3f4f6;
  text-align: left;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.language-option:hover,
.language-option.is-active {
  border-color: rgba(245, 196, 0, 0.5);
  color: #f5c400;
  background: rgba(245, 196, 0, 0.08);
}

.hamburger-btn {
  position: fixed;
  top: 14px;
  left: 14px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(245, 196, 0, 0.45);
  border-radius: 12px;
  background: rgba(8, 10, 14, 0.92);
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  z-index: 12000;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.hamburger-btn span {
  width: 22px;
  height: 2px;
  background: #f5c400;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.menu-profile-btn {
  position: fixed;
  top: 14px;
  left: 70px;
  height: 48px;
  min-width: 86px;
  padding: 0 14px;
  border: 1px solid rgba(245, 196, 0, 0.45);
  border-radius: 12px;
  background: rgba(8, 10, 14, 0.92);
  color: #f5c400;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.menu-alerts-btn {
  position: fixed;
  top: 14px;
  left: 164px;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(245, 196, 0, 0.45);
  border-radius: 12px;
  background: rgba(8, 10, 14, 0.92);
  color: #f5c400;
  font-size: 20px;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.menu-alerts-btn .menu-alerts-icon,
.menu-alerts-btn .menu-alerts-icon-svg {
  width: 22px;
  height: 22px;
  display: block;
}

.menu-alerts-btn .menu-alerts-icon-svg {
  stroke: #f5c400;
  fill: transparent;
}

.menu-alerts-btn.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.menu-alerts-btn:hover {
  border-color: rgba(245, 196, 0, 0.75);
}

.menu-alerts-btn.has-unread::after {
  content: "";
  position: absolute;
  top: 9px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f5c400;
  box-shadow: 0 0 0 3px rgba(245, 196, 0, 0.2);
}

.menu-profile-btn.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.menu-profile-btn:hover {
  border-color: rgba(245, 196, 0, 0.75);
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 11990;
}

.menu-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: min(320px, 84vw);
  height: 100vh;
  background: linear-gradient(180deg, #11141c 0%, #0d1016 100%);
  border-right: 1px solid rgba(245, 196, 0, 0.35);
  padding: 84px 20px calc(28px + env(safe-area-inset-bottom, 0px));
  display: none;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  transform: translateX(-110%);
  transition: transform 0.3s ease;
  z-index: 11995;
}

.mobile-menu .menu-link:last-child {
  margin-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.mobile-menu::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu .menu-link {
  text-decoration: none;
  color: #f3f4f6;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.mobile-menu .menu-link--with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mobile-menu .menu-link--with-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.menu-link-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f5c400;
  color: #131722;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.menu-link-badge--dot {
  min-width: 10px;
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  background: #f5c400;
  box-shadow: 0 0 0 3px rgba(245, 196, 0, 0.2);
}

.menu-link-badge--pulse {
  animation: swingBadgePulse 1.5s ease-in-out infinite;
}

@keyframes swingBadgePulse {
  0% { transform: translateY(-50%) scale(1); opacity: 0.3; }
  40% { transform: translateY(-50%) scale(1); opacity: 1; }
  100% { transform: translateY(-50%) scale(1); opacity: 0.3; }
}

.mobile-menu .menu-link--news {
  position: relative;
  padding-right: 30px;
}

.mobile-menu .menu-link--with-dot {
  position: relative;
  padding-right: 30px;
}

.mobile-menu .menu-link--news .menu-link-badge--dot,
.mobile-menu .menu-link--with-dot .menu-link-badge--dot {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.mobile-menu .menu-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 14px;
}

.menu-link-icon-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.menu-link-icon-svg {
  width: 18px;
  height: 18px;
  display: block;
}

.mobile-menu .menu-link:hover {
  border-color: rgba(245, 196, 0, 0.6);
  color: #f5c400;
  transform: translateX(4px);
}

.mobile-menu .menu-link--gold {
  color: #f6d676;
  border-color: rgba(245, 196, 0, 0.45);
  background: linear-gradient(135deg, rgba(245, 196, 0, 0.14), rgba(212, 175, 55, 0.06));
}

.mobile-menu .menu-link--gold:hover {
  color: #ffd85a;
  border-color: rgba(245, 196, 0, 0.8);
  background: linear-gradient(135deg, rgba(245, 196, 0, 0.22), rgba(212, 175, 55, 0.1));
}

.mobile-menu .menu-link--contact {
  color: #f7e7ba;
  border-color: rgba(245, 196, 0, 0.42);
  background: linear-gradient(135deg, rgba(245, 196, 0, 0.16), rgba(12, 16, 24, 0.9));
  box-shadow: 0 0 0 1px rgba(245, 196, 0, 0.08), 0 10px 22px rgba(0, 0, 0, 0.2);
}

.mobile-menu .menu-link--contact .menu-link-icon-svg {
  filter: drop-shadow(0 0 8px rgba(245, 196, 0, 0.28));
}

.mobile-menu .menu-link--contact:hover {
  color: #fff4d0;
  border-color: rgba(245, 196, 0, 0.74);
  background: linear-gradient(135deg, rgba(245, 196, 0, 0.22), rgba(12, 16, 24, 0.96));
}

.mobile-menu .menu-link--affiliate {
  color: #161616;
  border-color: #f5c400;
  background: #f5c400;
}

.mobile-menu .menu-link--affiliate:hover {
  color: #101010;
  border-color: #ffd84a;
  background: #ffd84a;
}

.mobile-menu .menu-link--sponsor {
  color: #dbeafe;
  border-color: rgba(59, 130, 246, 0.55);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(30, 64, 175, 0.16));
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.18), 0 10px 22px rgba(37, 99, 235, 0.16);
  animation: sponsor-blue-breathe 8s ease-in-out infinite;
}

.mobile-menu .menu-link--sponsor .menu-link-icon-svg {
  filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.42));
}

.mobile-menu .menu-link--sponsor:hover {
  color: #eff6ff;
  border-color: rgba(96, 165, 250, 0.9);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.38), rgba(30, 64, 175, 0.22));
}

.mobile-menu .menu-link--news {
  color: #fee2e2;
  border-color: rgba(239, 68, 68, 0.55);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.28), rgba(127, 29, 29, 0.18));
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.16), 0 10px 22px rgba(220, 38, 38, 0.15);
  animation: news-red-breathe 8s ease-in-out infinite;
}

.mobile-menu .menu-link--news .menu-link-icon-svg {
  filter: drop-shadow(0 0 8px rgba(252, 165, 165, 0.42));
}

.mobile-menu .menu-link--news:hover {
  color: #fff1f2;
  border-color: rgba(252, 165, 165, 0.9);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.36), rgba(127, 29, 29, 0.24));
}

.mobile-menu .menu-link--institute {
  color: #dcfce7;
  border-color: rgba(34, 197, 94, 0.55);
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.3), rgba(21, 128, 61, 0.16));
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.18), 0 10px 22px rgba(22, 163, 74, 0.16);
  animation: institute-green-breathe 8s ease-in-out infinite;
}

.mobile-menu .menu-link--institute .menu-link-icon-svg {
  filter: drop-shadow(0 0 8px rgba(74, 222, 128, 0.4));
}

.mobile-menu .menu-link--institute:hover {
  color: #f0fdf4;
  border-color: rgba(74, 222, 128, 0.9);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.38), rgba(21, 128, 61, 0.22));
}

.mobile-menu .menu-link--broker {
  color: #ffd6d6;
  border-color: rgba(239, 68, 68, 0.75);
  background: linear-gradient(135deg, #0c0c0f 0%, #200000 40%, #2c0101 100%);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35), 0 10px 22px rgba(0, 0, 0, 0.35), inset 0 0 22px rgba(255, 45, 45, 0.08);
  animation: broker-red-breathe 6.5s ease-in-out infinite;
}

.mobile-menu .menu-link--broker .menu-link-icon-svg {
  filter: drop-shadow(0 0 8px rgba(255, 80, 80, 0.45));
}

.mobile-menu .menu-link--broker:hover {
  color: #fff6f6;
  border-color: rgba(252, 165, 165, 0.95);
  background: linear-gradient(135deg, #1f0000 0%, #300101 50%, #1a0000 100%);
  box-shadow: 0 0 0 1px rgba(252, 165, 165, 0.75), 0 14px 28px rgba(255, 0, 0, 0.28);
}

@keyframes broker-red-breathe {
  0%, 100% {
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.22), 0 10px 22px rgba(0, 0, 0, 0.34), inset 0 0 22px rgba(255, 45, 45, 0.05);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(252, 165, 165, 0.45), 0 14px 28px rgba(255, 60, 60, 0.34), inset 0 0 28px rgba(255, 45, 45, 0.12);
  }
}

.mobile-menu .menu-link--danger {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.6);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(127, 29, 29, 0.14));
}

.mobile-menu .menu-link--danger:hover {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.85);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(127, 29, 29, 0.2));
}

body.menu-open {
  overflow-y: hidden;
}

@keyframes sponsor-blue-breathe {
  0% {
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.14), 0 8px 18px rgba(37, 99, 235, 0.13);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.35), 0 12px 28px rgba(37, 99, 235, 0.26);
  }
  100% {
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.14), 0 8px 18px rgba(37, 99, 235, 0.13);
  }
}

@keyframes news-red-breathe {
  0% {
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.14), 0 8px 18px rgba(220, 38, 38, 0.13);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(252, 165, 165, 0.34), 0 12px 28px rgba(220, 38, 38, 0.24);
  }
  100% {
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.14), 0 8px 18px rgba(220, 38, 38, 0.13);
  }
}

@keyframes institute-green-breathe {
  0% {
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.14), 0 8px 18px rgba(22, 163, 74, 0.13);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.35), 0 12px 28px rgba(22, 163, 74, 0.24);
  }
  100% {
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.14), 0 8px 18px rgba(22, 163, 74, 0.13);
  }
}

body.menu-auth-enabled .hamburger-btn {
  display: flex;
}

body.menu-auth-enabled .mobile-menu {
  display: flex;
}

body.menu-auth-enabled .menu-backdrop {
  display: block;
}

body.menu-auth-enabled .menu-profile-btn {
  display: inline-flex;
}

body.menu-auth-enabled .menu-alerts-btn {
  display: inline-flex;
}

.menu-profile-modal {
  position: fixed;
  inset: 0;
  z-index: 13000;
  background: rgba(0, 0, 0, 0.62);
  display: grid;
  place-items: center;
  padding: 20px 14px;
}

.menu-profile-modal.hidden {
  display: none;
}

.menu-profile-box {
  width: min(640px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: linear-gradient(140deg, #111319 0%, #171c26 55%, #10141d 100%);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 209, 102, 0.75) rgba(255, 255, 255, 0.08);
}

.menu-alerts-panel {
  position: fixed;
  inset: 0;
  z-index: 13000;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  height: 100dvh;
  padding: 20px 14px;
}

.menu-alerts-panel.hidden {
  display: none;
}

.menu-alerts-box {
  width: min(560px, 100%);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  background: linear-gradient(145deg, #10131b 0%, #151b26 100%);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}

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

.menu-alerts-header h3 {
  margin: 0;
  font-size: 20px;
  color: #fff;
}

.menu-alerts-section {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.menu-alerts-section-title {
  margin: 0 0 8px;
  color: #ffd700;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.menu-alerts-list {
  margin: 0;
  padding: 0;
  color: #e5e7eb;
  font-size: 14px;
  line-height: 1.45;
  list-style: none;
}

.menu-alerts-list li + li {
  margin-top: 8px;
}

#blogAlertsList li {
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  overflow: hidden;
}

.blog-alert-link {
  display: block;
  text-decoration: none;
  color: #e5e7eb;
  line-height: 1.45;
  padding: 10px 28px 10px 12px;
  position: relative;
  border-radius: 12px;
}

.blog-alert-link:hover {
  color: #fff;
}

.blog-alert-link::before {
  content: "⟶";
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: #e5e7eb;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.blog-alert-title {
  display: block;
  overflow: hidden;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
  line-height: 1.28;
  max-height: 2.56em;
}

.blog-alert-preview {
  display: block;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.35;
  max-height: 2.7em;
}

.blog-alert-link.is-unread::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f5c400;
}

.reminder-item {
  list-style: none;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.reminder-head {
  font-size: 12px;
  color: #f5c400;
  font-weight: 700;
  margin-bottom: 6px;
}

.reminder-question {
  font-size: 14px;
  color: #f3f4f6;
  margin-bottom: 10px;
}

.reminder-actions {
  display: flex;
  gap: 8px;
}

.reminder-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: #e5e7eb;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.reminder-btn.active {
  border-color: rgba(245, 196, 0, 0.75);
  color: #f5c400;
  background: rgba(245, 196, 0, 0.14);
}

.menu-profile-box::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.menu-profile-box::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.menu-profile-box::-webkit-scrollbar-thumb {
  background: rgba(255, 209, 102, 0.75);
  border-radius: 999px;
}

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

.menu-profile-header h3 {
  margin: 0;
  font-size: 20px;
  color: #fff;
}

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

.menu-profile-grid .profile-card {
  margin: 0;
}

.menu-profile-grid .profile-value {
  font-size: 14px;
}

.menu-profile-form {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.menu-profile-box .modal-actions {
  margin-top: 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}

.menu-profile-form label {
  color: #ffd700;
  font-size: 13px;
}

.menu-profile-form .settings-input {
  width: 100%;
}

.menu-profile-target-label {
  color: #bff7d6;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.menu-profile-target-input {
  border: 2px solid #7be3ac;
  background: rgba(123, 227, 172, 0.16);
  color: #eafff3;
  font-size: 16px;
  font-weight: 700;
}

.menu-profile-target-input:focus {
  border-color: #9ff0c4;
  box-shadow: 0 0 0 3px rgba(123, 227, 172, 0.3);
  outline: none;
}

.menu-roadmap-section {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.menu-roadmap-title {
  margin: 0 0 10px;
  color: #ffd700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.menu-roadmap-grid {
  display: grid;
  gap: 10px;
}

.menu-roadmap-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
  background: rgba(12, 14, 18, 0.9);
}

.menu-roadmap-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.menu-roadmap-head h4 {
  margin: 0;
  font-size: 14px;
  color: #fff;
}

.menu-roadmap-badge {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
  white-space: nowrap;
}

.menu-roadmap-subtitle {
  margin: 6px 0 8px;
  color: #b8c0d0;
  font-size: 12px;
}

.menu-roadmap-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.menu-roadmap-bar {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
}

.menu-roadmap-metric {
  margin: 8px 0 0;
  color: #d3d9e6;
  font-size: 12px;
}

.menu-roadmap-badge.is-good {
  color: #14361e;
  background: #56e08a;
  border-color: #56e08a;
}

.menu-roadmap-badge.is-warn {
  color: #3f2f00;
  background: #ffd166;
  border-color: #ffd166;
}

.menu-roadmap-badge.is-bad {
  color: #3f1218;
  background: #ff8a8a;
  border-color: #ff8a8a;
}

.menu-roadmap-bar.is-good {
  background: linear-gradient(90deg, #38d39f, #5ce1a8);
}

.menu-roadmap-bar.is-warn {
  background: linear-gradient(90deg, #f7b84b, #ffd166);
}

.menu-roadmap-bar.is-bad {
  background: linear-gradient(90deg, #ff5a67, #ff8a8a);
}

@media (max-width: 680px) {
  .language-badge {
    top: calc(env(safe-area-inset-top, 0px) + 14px);
    right: 10px;
  }

  .language-badge-btn {
    min-height: 32px;
    padding: 0 9px;
    font-size: 11px;
  }

  .menu-profile-btn {
    left: 66px;
    min-width: 80px;
    padding: 0 12px;
    font-size: 13px;
  }

  .menu-alerts-btn {
    left: 152px;
    width: 44px;
    height: 44px;
    font-size: 18px;
    border-radius: 11px;
  }

  .menu-profile-box {
    padding: 16px;
    max-height: 88vh;
  }

  .menu-alerts-box {
    padding: 12px;
    width: calc(100% - 6px);
    margin: 0;
    max-height: calc(100dvh - 86px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }

  .menu-alerts-section {
    padding: 10px;
  }

  .blog-alert-link {
    padding: 10px 24px 10px 10px;
  }

  .blog-alert-link::before {
    right: 8px;
    font-size: 20px;
  }

  .menu-profile-grid {
    grid-template-columns: 1fr;
  }

  .menu-alerts-panel {
    align-items: flex-start;
    justify-content: center;
    padding-top: calc(66px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
}

.performance-intelligence-shell {
  margin-top: 24px;
  animation: pi-fade-in 0.7s ease;
}

.performance-intelligence-panel {
  --pi-bg: #0b0b0f;
  --pi-border: rgba(255, 255, 255, 0.09);
  --pi-border-glow: rgba(244, 207, 122, 0.3);
  --pi-surface: rgba(255, 255, 255, 0.04);
  --pi-gold: #f2cb6a;
  --pi-text-main: #f5f7fb;
  --pi-text-soft: #8f98a8;
  --pi-text-strong: #f3f8ff;
  --pi-danger: #ff5f63;
  --pi-success: #56df9a;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--pi-border);
  padding: clamp(16px, 1.8vw, 24px);
  background:
    radial-gradient(740px 320px at 85% -18%, rgba(242, 203, 106, 0.14), transparent 58%),
    linear-gradient(175deg, rgba(19, 21, 28, 0.92), rgba(10, 12, 16, 0.95));
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(14px);
  text-align: left;
}

.performance-intelligence-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
  opacity: 0.5;
  animation: pi-sheen 6s ease-in-out infinite;
}

.performance-intelligence-panel .pi-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.performance-intelligence-panel .pi-head-main {
  min-width: 0;
}

.performance-intelligence-panel .pi-head-main h3 {
  margin: 0;
  color: var(--pi-text-main);
  font-size: 26px;
  letter-spacing: 0.01em;
  line-height: 1.12;
}

.performance-intelligence-panel .pi-eyebrow {
  margin: 0 0 6px;
  color: var(--pi-gold);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.performance-intelligence-panel .pi-subtitle {
  margin: 6px 0 0;
  color: var(--pi-text-soft);
  max-width: 860px;
  font-size: 14px;
  line-height: 1.55;
}

.performance-intelligence-panel .pi-head-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.performance-intelligence-panel .pi-chip {
  min-height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--pi-surface);
  color: #dae1ec;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  gap: 6px;
  white-space: nowrap;
}

.performance-intelligence-panel .pi-chip-gold {
  color: var(--pi-text-main);
  border-color: var(--pi-border-glow);
  background: rgba(242, 203, 106, 0.14);
}

.performance-intelligence-panel .pi-status {
  margin: 2px 0 14px;
  color: var(--pi-text-soft);
  font-size: 13px;
}

.performance-intelligence-panel .pi-kpi-grid,
.performance-intelligence-panel .pi-summary-grid,
.performance-intelligence-panel .pi-boards-grid {
  position: relative;
  z-index: 1;
}

.performance-intelligence-panel .pi-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.performance-intelligence-panel .pi-kpi,
.performance-intelligence-panel .pi-summary-card,
.performance-intelligence-panel .pi-chart-card,
.performance-intelligence-panel .pi-board-card,
.performance-intelligence-panel .pi-ai-item,
.performance-intelligence-panel .pi-ai-card {
  position: relative;
  z-index: 1;
}

.performance-intelligence-panel .pi-kpi {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.performance-intelligence-panel .pi-kpi:hover {
  transform: translateY(-3px);
  border-color: rgba(242, 203, 106, 0.28);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.3), 0 0 20px rgba(242, 203, 106, 0.12);
}

.performance-intelligence-panel .pi-kpi-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.performance-intelligence-panel .pi-kpi-label {
  color: #9ea4b0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.performance-intelligence-panel .pi-kpi-context {
  color: #f1cf74;
  font-size: 11px;
  font-weight: 600;
}

.performance-intelligence-panel .pi-kpi-value {
  margin: 0 0 6px;
  color: var(--pi-text-main);
  font-size: 30px;
  line-height: 1;
  display: block;
  letter-spacing: 0.01em;
}

.performance-intelligence-panel .pi-kpi-meta {
  margin: 0;
  color: #98a0ad;
  font-size: 12px;
  line-height: 1.5;
}

.performance-intelligence-panel .pi-kpi-chart-shell {
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 7px;
  height: 54px;
  overflow: hidden;
  border-radius: 12px;
}

.performance-intelligence-panel .pi-kpi-chart-shell canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.performance-intelligence-panel .pi-tone-danger .pi-kpi-value,
.performance-intelligence-panel .pi-tone-danger .pi-summary-value {
  color: var(--pi-danger);
}

.performance-intelligence-panel .pi-tone-positive .pi-kpi-value,
.performance-intelligence-panel .pi-tone-positive .pi-summary-value,
.performance-intelligence-panel .pi-tone-positive .pi-board-row-fill {
  color: var(--pi-success);
}

.performance-intelligence-panel .pi-tone-neutral .pi-kpi-value,
.performance-intelligence-panel .pi-tone-neutral .pi-summary-value {
  color: var(--pi-text-main);
}

.performance-intelligence-panel .pi-tone-warn .pi-kpi-value,
.performance-intelligence-panel .pi-tone-warning .pi-kpi-value,
.performance-intelligence-panel .pi-tone-warn .pi-summary-value {
  color: var(--pi-danger);
}

.performance-intelligence-panel .pi-visual-grid {
  margin: 14px 0 0;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}

.performance-intelligence-panel .pi-chart-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 14px;
  background: rgba(255, 255, 255, 0.028);
}

.performance-intelligence-panel .pi-chart-head {
  margin-bottom: 6px;
}

.performance-intelligence-panel .pi-chart-tag {
  color: var(--pi-gold);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.performance-intelligence-panel .pi-chart-head h4 {
  margin: 6px 0 0;
  color: var(--pi-text-main);
  font-size: 17px;
}

.performance-intelligence-panel .pi-chart-card > p {
  margin: 8px 0 8px;
  color: var(--pi-text-soft);
  font-size: 12px;
  line-height: 1.45;
}

.performance-intelligence-panel .pi-chart-body {
  height: 210px;
  position: relative;
}

.performance-intelligence-panel .pi-chart-body canvas {
  width: 100% !important;
  height: 100% !important;
}

.performance-intelligence-panel .pi-ai-card {
  position: relative;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
}

.performance-intelligence-panel .pi-ai-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.performance-intelligence-panel .pi-ai-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1b1f26;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, #f2cb6a, #e39d2d);
}

.performance-intelligence-panel .pi-ai-header h4 {
  margin: 0;
  color: var(--pi-text-main);
  font-size: 17px;
}

.performance-intelligence-panel .pi-ai-header p {
  margin: 4px 0 0;
  color: var(--pi-text-soft);
  font-size: 12px;
  line-height: 1.5;
}

.performance-intelligence-panel .pi-ai-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.performance-intelligence-panel .pi-ai-item {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.02);
}

.performance-intelligence-panel .pi-ai-item-title {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--pi-gold);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.performance-intelligence-panel .pi-ai-item-text {
  margin: 0;
  color: #eff2f6;
  font-size: 13px;
  line-height: 1.45;
}

.performance-intelligence-panel .pi-ai-item-evidence {
  display: block;
  margin-top: 6px;
  color: #94a0b0;
  font-size: 12px;
}

.performance-intelligence-panel .pi-ai-tone-danger .pi-ai-item-title,
.performance-intelligence-panel .pi-ai-tone-danger .pi-ai-item-evidence,
.performance-intelligence-panel .pi-ai-tone-danger .pi-ai-item {
  color: var(--pi-danger);
}

.performance-intelligence-panel .pi-ai-tone-positive .pi-ai-item-title,
.performance-intelligence-panel .pi-ai-tone-positive .pi-ai-item-evidence {
  color: var(--pi-success);
}

.performance-intelligence-panel .pi-ai-callout {
  margin: 12px 0 0;
  border-radius: 12px;
  border: 1px solid rgba(242, 203, 106, 0.24);
  background: rgba(242, 203, 106, 0.06);
  color: #f5f4ee;
  padding: 11px 12px;
  font-size: 12px;
  line-height: 1.45;
}

.performance-intelligence-panel .pi-breakdown-stage {
  margin-top: 14px;
}

.performance-intelligence-panel .pi-section-head {
  margin-bottom: 10px;
}

.performance-intelligence-panel .pi-section-head h4 {
  margin: 0;
  color: var(--pi-text-main);
  font-size: 18px;
}

.performance-intelligence-panel .pi-section-head p {
  margin: 6px 0 0;
  color: var(--pi-text-soft);
  font-size: 12px;
  line-height: 1.5;
}

.performance-intelligence-panel .pi-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 12px;
}

.performance-intelligence-panel .pi-summary-card {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
}

.performance-intelligence-panel .pi-summary-label {
  color: #a4acb9;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.performance-intelligence-panel .pi-summary-value {
  margin-top: 4px;
  color: var(--pi-text-strong);
  font-size: 22px;
  line-height: 1.1;
}

.performance-intelligence-panel .pi-summary-meta {
  margin-top: 7px;
  color: #93a0ad;
  display: block;
  font-size: 12px;
  line-height: 1.4;
}

.performance-intelligence-panel .pi-boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(216px, 1fr));
  gap: 12px;
}

.performance-intelligence-panel .pi-board-card {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.performance-intelligence-panel .pi-board-head h4 {
  margin: 0 0 8px;
  color: #eef1f7;
  font-size: 16px;
}

.performance-intelligence-panel .pi-board-list {
  display: grid;
  gap: 10px;
}

.performance-intelligence-panel .pi-board-row {
  min-width: 0;
}

.performance-intelligence-panel .pi-board-row-top {
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.performance-intelligence-panel .pi-board-row-label {
  color: #eaedf2;
  font-size: 13px;
  font-weight: 600;
}

.performance-intelligence-panel .pi-board-row-value {
  color: #f4d07a;
  font-size: 13px;
}

.performance-intelligence-panel .pi-board-row-bar {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.performance-intelligence-panel .pi-board-row-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(242, 203, 106, 0.24), rgba(242, 203, 106, 0.86));
}

.performance-intelligence-panel .pi-board-row-fill.pi-tone-danger {
  background: linear-gradient(90deg, rgba(255, 95, 99, 0.35), rgba(255, 95, 99, 0.9));
}

.performance-intelligence-panel .pi-board-row-meta {
  margin-top: 6px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: #95a1b0;
  font-size: 11px;
}

.performance-intelligence-panel .pi-board-empty {
  margin: 0;
  color: #95a1b0;
  font-size: 12px;
}

.performance-intelligence-panel .pi-footer-note {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  font-size: 12px;
  color: #919cac;
  line-height: 1.55;
}

.performance-intelligence-panel .pi-empty {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.performance-intelligence-panel .pi-empty-orb {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  border: 1px solid rgba(242, 203, 106, 0.22);
  background:
    radial-gradient(circle at 35% 32%, rgba(255, 235, 171, 0.46), rgba(242, 203, 106, 0.11) 45%, rgba(242, 203, 106, 0) 72%),
    rgba(255, 255, 255, 0.02);
  box-shadow: inset 0 0 18px rgba(242, 203, 106, 0.08), 0 0 20px rgba(242, 203, 106, 0.1);
}

.performance-intelligence-panel .pi-empty-title {
  margin: 0 0 6px;
  color: #f3f5f8;
  font-size: 17px;
}

.performance-intelligence-panel .pi-empty-text,
.performance-intelligence-panel .pi-empty-hint {
  margin: 0;
  color: #97a2b0;
  font-size: 13px;
  line-height: 1.6;
}

.performance-intelligence-panel .pi-empty-hint {
  margin-top: 5px;
  font-size: 12px;
}

@keyframes pi-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pi-sheen {
  0% {
    transform: translateX(-6px);
    opacity: 0.3;
  }
  50% {
    transform: translateX(6px);
    opacity: 0.06;
  }
  100% {
    transform: translateX(-6px);
    opacity: 0.3;
  }
}

@media (max-width: 1040px) {
  .performance-intelligence-panel .pi-visual-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .performance-intelligence-panel {
    padding: 16px;
  }

  .performance-intelligence-panel .pi-head {
    flex-direction: column;
  }

  .performance-intelligence-panel .pi-head h3 {
    font-size: 28px;
  }

  .performance-intelligence-panel .pi-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  }

  .performance-intelligence-panel .pi-summary-grid,
  .performance-intelligence-panel .pi-boards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .performance-intelligence-shell {
    margin-top: 24px;
  }

  .performance-intelligence-panel .pi-head h3 {
    font-size: 24px;
  }

  .performance-intelligence-panel .pi-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .performance-intelligence-panel .pi-summary-grid {
    grid-template-columns: 1fr;
  }

  .performance-intelligence-panel .pi-kpi {
    min-width: 0;
    padding: 12px;
    border-radius: 14px;
  }

  .performance-intelligence-panel .pi-kpi-top {
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
  }

  .performance-intelligence-panel .pi-kpi-context {
    align-self: flex-start;
  }

  .performance-intelligence-panel .pi-kpi-value {
    font-size: clamp(1.45rem, 7vw, 1.8rem);
  }

  .performance-intelligence-panel .pi-kpi-meta {
    font-size: 11px;
    line-height: 1.4;
  }

  .performance-intelligence-panel .pi-kpi-chart-shell {
    margin-top: 8px;
    height: 44px;
  }

  .performance-intelligence-panel .pi-empty {
    grid-template-columns: 1fr;
  }

  .performance-intelligence-panel .pi-empty-orb {
    width: 54px;
    height: 54px;
  }
}

.performance-intelligence-shell {
  margin-top: 30px;
}

.performance-intelligence-panel,
.pi-chart-card,
.pi-ai-card,
.pi-kpi,
.pi-board-card,
.pi-insight,
.pi-callout {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)),
    rgba(11, 15, 24, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.18);
}

.performance-intelligence-panel {
  --glass-deep: rgba(11, 15, 24, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text-main: #f4f8ff;
  --text-soft: #9da9bd;
  --text-dim: #72809a;
  --cyan: #f5c400;
  --blue: #ffd75a;
  --purple: #ffb300;
  --success: #81f0d5;
  --warning: #ffb86b;
  --danger: #ff5f73;
  --danger-soft: #ffb0ba;
  --danger-glow: rgba(255, 95, 115, 0.18);
  --shadow-card: 0 16px 30px rgba(0, 0, 0, 0.18);
  --ease-soft: cubic-bezier(0.22, 0.82, 0.24, 1);
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: 28px;
  animation: surface-enter 0.78s var(--ease-soft) both;
}

.performance-intelligence-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 179, 0, 0.14), transparent 30%),
    radial-gradient(circle at 0% 100%, rgba(245, 196, 0, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 28%);
}

.performance-intelligence-panel::after {
  content: "";
  position: absolute;
  top: -24%;
  left: -18%;
  width: 220px;
  height: 160%;
  transform: rotate(18deg) translateX(-240px);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  animation: panel-sheen 8s ease-in-out infinite;
  pointer-events: none;
}

.pi-head,
.pi-kpi-grid,
.pi-visual-grid,
.pi-breakdown-stage,
.pi-board-stage,
.pi-footer-note {
  position: relative;
  z-index: 1;
}

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

.pi-head-main {
  max-width: 700px;
}

.pi-head-main h3 {
  margin: 0;
  font-size: clamp(1.85rem, 3vw, 2.75rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.pi-eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pi-subtitle {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.8;
}

.pi-head-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 320px;
}

.pi-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #f0e5c4;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pi-chip-gold {
  background: rgba(255, 179, 0, 0.14);
  color: #f8e8b5;
  border-color: rgba(245, 196, 0, 0.18);
}

.pi-status {
  margin: 14px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.7;
}

.pi-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.pi-kpi {
  padding: 18px;
  border-radius: 24px;
  transition: transform 0.28s var(--ease-soft), border-color 0.28s var(--ease-soft), box-shadow 0.28s var(--ease-soft), background 0.28s var(--ease-soft);
  animation: surface-enter 0.66s var(--ease-soft) both;
}

.pi-kpi:hover,
.pi-chart-card:hover,
.pi-ai-card:hover,
.pi-board-card:hover,
.pi-summary-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 196, 0, 0.18);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(245, 196, 0, 0.08) inset;
}

.pi-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.pi-kpi-label {
  color: #b4c2d8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pi-kpi-context {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f3e7c8;
  font-size: 11px;
  font-weight: 700;
}

.pi-kpi-value {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(2rem, 3.5vw, 2.45rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.pi-kpi-meta {
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.7;
}

.pi-kpi-chart-shell {
  position: relative;
  margin-top: 14px;
  height: 64px;
  padding-top: 8px;
  overflow: hidden;
  border-radius: 14px;
}

.pi-kpi-chart-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}

.pi-kpi-chart-shell canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.pi-mini-chart {
  position: relative;
  z-index: 1;
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.pi-tone-positive .pi-kpi-value,
.pi-tone-positive .pi-summary-value,
.pi-tone-positive .pi-board-row-value,
.pi-tone-positive .pi-chart-metric-value {
  color: var(--success);
}

.pi-tone-warn .pi-kpi-context {
  color: var(--danger);
  background: rgba(255, 95, 115, 0.12);
  box-shadow: 0 0 0 1px rgba(255, 95, 115, 0.14) inset;
}

.pi-tone-warn .pi-kpi-value,
.pi-tone-warn .pi-summary-value,
.pi-tone-warn .pi-board-row-value,
.pi-tone-warn .pi-chart-metric-value {
  color: var(--danger);
}

.pi-tone-neutral .pi-kpi-value {
  color: #f0e6cf;
}

.pi-tone-neutral .pi-summary-value,
.pi-tone-neutral .pi-board-row-value,
.pi-tone-neutral .pi-chart-metric-value {
  color: var(--text-main);
}

.pi-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 16px;
  margin-top: 24px;
}

.pi-chart-card,
.pi-ai-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: 24px;
  transition: transform 0.28s var(--ease-soft), border-color 0.28s var(--ease-soft), box-shadow 0.28s var(--ease-soft);
  animation: surface-enter 0.74s var(--ease-soft) both;
}

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

.pi-chart-card::before,
.pi-ai-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 32%);
}

.pi-chart-head,
.pi-ai-head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.pi-chart-kicker,
.pi-ai-kicker {
  margin: 0 0 6px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pi-chart-head h4,
.pi-ai-head h4,
.pi-section-head h4,
.pi-board-head h4 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.15;
}

.pi-chart-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pi-chart-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #f0e5c4;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pi-chart-body {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  height: 220px;
}

.pi-chart-body--tall {
  height: 270px;
}

.pi-chart-body--compact {
  height: 230px;
}

.pi-chart-body canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.performance-intelligence-panel .pi-ai-card {
  position: relative;
  overflow: hidden;
  margin-top: 0;
  padding: 20px;
  border-radius: 24px;
  transition: transform 0.28s var(--ease-soft), border-color 0.28s var(--ease-soft), box-shadow 0.28s var(--ease-soft);
  animation: surface-enter 0.74s var(--ease-soft) both;
  display: grid;
  gap: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)),
    var(--glass-deep);
  border: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-card);
}

.performance-intelligence-panel .pi-ai-head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.performance-intelligence-panel .pi-ai-head h4 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.15;
}

.performance-intelligence-panel .pi-ai-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  padding: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(245, 196, 0, 0.18), rgba(255, 179, 0, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f5c400;
}

.performance-intelligence-panel .pi-ai-icon svg {
  width: 60px;
  height: 60px;
  display: block;
  fill: currentColor;
  filter: drop-shadow(0 0 12px rgba(245, 196, 0, 0.22));
}

.performance-intelligence-panel .pi-ai-lead {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.8;
}

.performance-intelligence-panel .pi-ai-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.performance-intelligence-panel .pi-ai-item {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.04);
}

.performance-intelligence-panel .pi-ai-item.is-danger {
  border-color: rgba(255, 95, 115, 0.18);
  background: linear-gradient(180deg, rgba(255, 95, 115, 0.1), rgba(255, 95, 115, 0.04));
  box-shadow: inset 0 0 0 1px rgba(255, 95, 115, 0.04);
}

.performance-intelligence-panel .pi-ai-item-title {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.performance-intelligence-panel .pi-ai-item p {
  margin: 0;
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.72;
}

.performance-intelligence-panel .pi-ai-item small {
  display: block;
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 12px;
}

.performance-intelligence-panel .pi-ai-item.is-danger .pi-ai-item-title,
.performance-intelligence-panel .pi-ai-item.is-danger small {
  color: var(--danger);
}

.performance-intelligence-panel .pi-ai-callout {
  position: relative;
  z-index: 1;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(245, 196, 0, 0.18);
  background: linear-gradient(180deg, rgba(245, 196, 0, 0.14), rgba(255, 179, 0, 0.08));
}

.performance-intelligence-panel .pi-ai-callout-label {
  display: inline-block;
  margin-bottom: 8px;
  color: #f8e8b5;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.performance-intelligence-panel .pi-ai-callout p {
  margin: 0;
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.72;
}

.pi-chart-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.pi-chart-metric {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pi-chart-metric-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pi-chart-metric-value {
  color: var(--text-main);
  font-size: 15px;
  font-weight: 700;
}

.pi-ai-card {
  display: grid;
  gap: 16px;
}

.pi-ai-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  padding: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(245, 196, 0, 0.18), rgba(255, 179, 0, 0.18));
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f5c400;
}

.pi-ai-icon svg {
  width: 60px;
  height: 60px;
  display: block;
  fill: currentColor;
  filter: drop-shadow(0 0 12px rgba(245, 196, 0, 0.22));
}

.pi-ai-lead {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.8;
}

.pi-ai-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.pi-ai-item {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.04);
}

.pi-ai-item.is-danger {
  border-color: rgba(255, 95, 115, 0.18);
  background: linear-gradient(180deg, rgba(255, 95, 115, 0.1), rgba(255, 95, 115, 0.04));
  box-shadow: inset 0 0 0 1px rgba(255, 95, 115, 0.04);
}

.pi-ai-item-title {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pi-ai-item p {
  margin: 0;
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.72;
}

.pi-ai-item small {
  display: block;
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 12px;
}

.pi-ai-item.is-danger .pi-ai-item-title,
.pi-ai-item.is-danger small {
  color: var(--danger);
}

.pi-ai-callout {
  position: relative;
  z-index: 1;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(245, 196, 0, 0.18);
  background: linear-gradient(180deg, rgba(245, 196, 0, 0.14), rgba(255, 179, 0, 0.08));
}

.pi-ai-callout-label {
  display: inline-block;
  margin-bottom: 8px;
  color: #f8e8b5;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pi-ai-callout p {
  margin: 0;
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.72;
}

.pi-breakdown-stage,
.pi-board-stage {
  position: relative;
  z-index: 1;
  margin-top: 24px;
}

.pi-section-head {
  margin-bottom: 14px;
}

.pi-section-head h4 {
  margin-bottom: 6px;
}

.pi-section-head p {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.75;
}

.pi-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.pi-summary-card {
  transition: transform 0.28s var(--ease-soft), border-color 0.28s var(--ease-soft), box-shadow 0.28s var(--ease-soft);
}

.pi-summary-card .profile-value {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 15px;
}

.pi-summary-meta {
  display: block;
  margin-top: 10px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.6;
}

.pi-boards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.pi-board-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 24px;
  transition: transform 0.28s var(--ease-soft), border-color 0.28s var(--ease-soft), box-shadow 0.28s var(--ease-soft);
  animation: surface-enter 0.76s var(--ease-soft) both;
}

.pi-board-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--cyan), var(--blue), var(--purple));
  opacity: 0.95;
}

.pi-board-head {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
}

.pi-board-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.pi-board-row-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 6px;
}

.pi-board-row-label {
  color: #f2e8cf;
  font-size: 13px;
  font-weight: 700;
}

.pi-board-row-value {
  color: #eadfbf;
  font-size: 13px;
  font-weight: 700;
}

.pi-board-row-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.pi-board-row-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--purple));
  animation: metric-bar 1.05s var(--ease-soft) 0.35s forwards;
}

.pi-board-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.pi-board-row-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  font-size: 11px;
}

.pi-footer-note {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.65;
}

@keyframes pulse-dot {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(245, 196, 0, 0.45);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(245, 196, 0, 0);
  }
}

@keyframes surface-enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes panel-sheen {
  0%, 100% {
    transform: rotate(18deg) translateX(-240px);
    opacity: 0;
  }
  18% {
    opacity: 0.4;
  }
  38% {
    transform: rotate(18deg) translateX(1240px);
    opacity: 0;
  }
}

@keyframes metric-bar {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@media (max-width: 1040px) {
  .pi-boards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .pi-visual-grid {
    grid-template-columns: 1fr;
  }

  .pi-chart-card--wide {
    grid-column: auto;
  }
}

@media (max-width: 860px) {
  .pi-head {
    flex-direction: column;
  }

  .pi-head-chips {
    justify-content: flex-start;
    max-width: none;
  }

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

@media (max-width: 720px) {
  .trader-profile-section {
    padding: 24px 16px;
    border-radius: 22px;
  }

  .performance-intelligence-panel,
  .pi-chart-card,
  .pi-ai-card,
  .pi-board-card {
    padding: 18px;
    border-radius: 20px;
  }

  .profile-grid,
  .pi-summary-grid {
    grid-template-columns: 1fr;
  }

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

  .pi-kpi {
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .profile-card.full {
    grid-column: auto;
  }

  .pi-chart-body {
    height: 210px;
  }

  .pi-chart-body--tall {
    height: 250px;
  }

  .pi-chart-body--compact {
    height: 220px;
  }
}

