/* mobile/app.css — l'app del telefono.
   Fondo nero come cTrader (foto 4), verde e rosso del PC (web/style.css),
   arancio per i ribassi della watchlist come cTrader. Pensata per il
   pollice: schede in basso, bersagli di almeno 44 px (la misura minima di
   Apple), niente che si apra col passaggio del mouse, che sul telefono
   non c'e'. */
:root {
  --fondo: #000;
  --panel: #141414;
  --panel2: #1c1c1e;
  --bordo: #2a2a2a;
  --testo: #e5e7eb;
  --forte: #fff;
  --sotto: #8e8e93;
  --spento: #636366;
  --verde: #10b981;
  --rosso: #ef4444;
  --arancio: #f0703a;
  --blu: #2962ff;
  --ambra: #f5b70a;
  --schede: 56px;
  --graf-fondo: #0d0d0d;
  --graf-griglia: #1c1c1c;
  --graf-testo: #8e8e93;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--fondo); color: var(--testo); }
body {
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overscroll-behavior: none;
  -webkit-user-select: none; user-select: none;
  -webkit-text-size-adjust: 100%;
}
input { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }

/* ---- schede ---- */
.vista { display: none; padding: env(safe-area-inset-top) 0 calc(env(safe-area-inset-bottom) + var(--schede) + 16px); min-height: 100vh; }
.vista.on { display: block; }
.vista > * { max-width: 680px; margin-left: auto; margin-right: auto; }
.vista-piena.on { position: fixed; inset: 0 0 calc(env(safe-area-inset-bottom) + var(--schede)) 0; padding: env(safe-area-inset-top) 0 0; min-height: 0; }
.vista-piena > * { max-width: none; }
/* I fogli (Statistiche, calendario, watchlist…) stanno dentro una scheda, ma
   il velo copre TUTTO lo schermo: senza questa riga prendeva la larghezza
   massima delle schede (6/10/2026, «segue le larghezze del menu»). */
.vista > .foglio { max-width: none; margin: 0; }

.schede {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: space-around;
  height: calc(var(--schede) + env(safe-area-inset-bottom));
  padding: 4px 4px env(safe-area-inset-bottom);
  background: #0a0a0a; border-top: 1px solid var(--bordo);
}
.schede button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--spento); font-size: 10.5px; border-radius: 12px; min-width: 0;
}
.schede svg { width: 24px; height: 24px; }
.schede button.on { color: var(--forte); background: #1c1c1e; }

.avviso {
  position: fixed; left: 16px; right: 16px; z-index: 40;
  bottom: calc(env(safe-area-inset-bottom) + var(--schede) + 12px);
  background: #1f2937; color: #fff; padding: 12px 14px; border-radius: 12px; font-size: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,.5);
  transform: translateY(20px); opacity: 0; pointer-events: none; transition: .2s;
}
.avviso.on { transform: none; opacity: 1; }
.avviso.cattivo { background: #7f1d1d; }

/* ---- testate di pagina ---- */
.pg-testa { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 10px; border-bottom: 1px solid var(--bordo); }
.pg-testa b { font-size: 20px; color: var(--forte); }
.pg-testa b.su { color: var(--verde); }
.pg-testa b.giu { color: var(--rosso); }

/* ---- blocchi comuni ---- */
.carta { background: var(--panel); border: 1px solid var(--bordo); border-radius: 14px; padding: 14px 16px; margin: 12px 12px 0; }
.carta h2 { margin: 0 0 8px; font-size: 20px; font-weight: 600; color: var(--forte); padding-bottom: 10px; border-bottom: 1px solid var(--bordo); }
.etichetta { font-size: 12px; color: var(--sotto); }
.riga { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; }
.riga > span:last-child { text-align: right; color: var(--forte); }
.num { font-variant-numeric: tabular-nums; font-weight: 600; }
.su { color: var(--verde); }
.giu { color: var(--rosso); }
.giu-ar { color: var(--arancio); }
.chip { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--panel2); color: var(--sotto); }
.chip.on { background: var(--blu); color: #fff; }
.chip.su { background: rgba(16,185,129,.16); color: var(--verde); }
.chip.demo { background: rgba(245,183,10,.16); color: var(--ambra); }
.pos-lato { font-size: 12px; font-weight: 700; margin-left: 4px; }
.griglia { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.griglia > div { background: var(--panel2); border-radius: 12px; padding: 12px; }
.griglia .num { display: block; font-size: 20px; margin-top: 2px; }
.curva { width: 100%; display: block; }
.vuoto-msg { text-align: center; color: var(--sotto); padding: 48px 20px; }
.errore { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.35); color: #fca5a5; border-radius: 14px; padding: 14px; margin: 12px; }
.voce { width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 10px 0; }
.voce + .voce { border-top: 1px solid var(--bordo); }
.voce small { display: block; color: var(--sotto); font-size: 12px; }
.voce .chip { flex: none; }
.voce.on > span:first-child { color: var(--blu, #2962ff); font-weight: 700; }

/* ---- foglio dal basso (aggiungi mercato, scelta conto) ---- */
.foglio { position: fixed; inset: 0; z-index: 30; }
.foglio-velo { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.foglio-corpo {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 75vh; overflow: auto;
  background: #161618; border-radius: 18px 18px 0 0; padding: 8px 18px calc(env(safe-area-inset-bottom) + 18px);
  max-width: 680px; margin: 0 auto;
}
.foglio-testa { display: flex; justify-content: space-between; align-items: center; min-height: 52px; font-size: 17px; }
.foglio-testa button { width: 44px; height: 44px; font-size: 18px; color: var(--sotto); }

/* ============================================================ MERCATI («Oggi»)
   Non la lista prezzi di un broker: la giornata in testa, le sessioni, e
   per ogni mercato range del giorno, volatilita' e il tuo storico. Righe a
   schede staccate, niente bid/ask a riquadri: vTrade, non cTrader. */
.og { margin: 12px 12px 0; padding: 14px 14px 12px; border-radius: 16px; background: linear-gradient(160deg, #10172a, #0c0f17); border: 1px solid #1d2742; }
.og-riga { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.og-riga > div { display: flex; flex-direction: column; min-width: 0; }
.og-equity { font-size: 26px; font-weight: 800; color: var(--forte); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.og-oggi { align-items: flex-end; text-align: right; }
.og-oggi b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.og-oggi small { font-size: 12px; font-weight: 600; }
.og-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.og-chip { font-size: 12px; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--testo); }
.og-chip.spento { color: var(--sotto); }
.og-chip.avviso { color: var(--ambra); background: rgba(245, 183, 10, .12); }

.ss { margin: 10px 12px 0; }
.ss-righe { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ss-s { padding: 7px 8px; border-radius: 10px; background: var(--panel); border: 1px solid var(--bordo); min-width: 0; }
.ss-s i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3a3a3e; margin-right: 5px; vertical-align: 1px; }
.ss-s b { font-size: 12.5px; color: var(--sotto); }
.ss-s small { display: block; font-size: 10.5px; color: var(--spento); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-s.on { border-color: rgba(16, 185, 129, .4); background: rgba(16, 185, 129, .07); }
.ss-s.on i { background: var(--verde); box-shadow: 0 0 6px var(--verde); }
.ss-s.on b { color: var(--forte); }
.ss-s.on small { color: #8fe3c3; }
.ss-nota, .ss-chiuso { margin-top: 6px; font-size: 12px; color: #9fb4ff; }
.ss-chiuso { color: var(--sotto); padding: 8px 10px; border-radius: 10px; background: var(--panel); }

.mt-testa { display: flex; align-items: center; justify-content: space-between; padding: 14px 8px 4px 16px; }
.mt-nome { display: flex; flex-direction: column; align-items: flex-start; min-height: 44px; justify-content: center; }
.mt-nome b { font-size: 19px; color: var(--forte); }
.mt-nome-r { display: flex; align-items: center; gap: 6px; }
.mt-nome-r .mt-fr { color: var(--sotto); font-size: 13px; }
.mt-azioni { display: flex; gap: 2px; }
.mt-azioni button { width: 44px; height: 44px; display: grid; place-items: center; color: var(--testo); border-radius: 12px; }
.mt-azioni button.on { background: var(--panel2); color: var(--blu); }
.mt-lista { display: flex; flex-direction: column; gap: 8px; padding: 0 12px; }
.mt-riga { position: relative; display: flex; align-items: stretch; gap: 8px; padding: 11px 12px 10px; border-radius: 14px; background: var(--panel); border: 1px solid var(--bordo); }
.mt-riga:active { background: var(--panel2); }
.mt-riga.presa { z-index: 2; box-shadow: 0 8px 24px rgba(0,0,0,.6); }
.mt-presa { display: grid; place-items: center; width: 28px; color: var(--sotto); font-size: 20px; touch-action: none; }
.mt-corpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.mt-r1 { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.mt-nomi { min-width: 0; display: flex; flex-direction: column; }
.mt-sim { font-size: 17px; color: var(--forte); }
.mt-nomi small { font-size: 11.5px; color: var(--sotto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-px { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.mt-px b { font-size: 18px; font-weight: 700; color: var(--forte); font-variant-numeric: tabular-nums; }
.mt-var { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 6px; margin-top: 2px; font-variant-numeric: tabular-nums; background: var(--panel2); color: var(--sotto); }
.mt-var.su { color: #34d399; background: rgba(16, 185, 129, .14); }
.mt-var.giu { color: #fca5a5; background: rgba(239, 68, 68, .14); }
.mt-r2 { display: flex; align-items: center; gap: 7px; }
.mt-hl { font-size: 10.5px; color: var(--spento); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mt-range { position: relative; flex: 1; height: 6px; border-radius: 3px; background: #26262b; min-width: 40px; }
.mt-range i { position: absolute; top: 0; height: 6px; border-radius: 3px; }
.mt-range i.su { background: rgba(16, 185, 129, .55); }
.mt-range i.giu { background: rgba(239, 68, 68, .55); }
.mt-range b { position: absolute; top: -3px; width: 4px; height: 12px; margin-left: -2px; border-radius: 2px; background: #fff; }
.mt-vol { font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 6px; white-space: nowrap; color: var(--sotto); background: var(--panel2); }
.mt-vol:empty { display: none; }
.mt-vol.alta { color: #fdba74; background: rgba(249, 115, 22, .14); }
.mt-vol.bassa { color: #93c5fd; background: rgba(59, 130, 246, .12); }
.mt-r3 { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11.5px; color: var(--sotto); }
.mt-tuo b { color: var(--testo); font-variant-numeric: tabular-nums; }
.mt-tuo b.su { color: var(--verde); }
.mt-tuo b.giu { color: var(--rosso); }
.mt-tuo .spento { color: var(--spento); }
.mt-pos { display: flex; gap: 8px; font-weight: 700; white-space: nowrap; }
.mt-togli { align-self: center; width: 34px; height: 34px; border-radius: 50%; background: #3a1515; color: #fca5a5; flex: none; }
.mt-cerca { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--bordo); background: var(--panel2); color: var(--forte); padding: 0 12px; font: 15px -apple-system, Roboto, sans-serif; margin-bottom: 6px; }

/* ================================================= GRAFICO (foto 1 e 2) */
.gr { position: relative; height: 100%; display: flex; flex-direction: column; background: var(--graf-fondo); }
.gr-ipotesi { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 10px; background: #0a0a0a; flex: none; }
.gr-ipotesi button { min-height: 46px; border-radius: 12px; font-size: 16px; font-weight: 700; color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; }
.gr-buy { background: #0e8f63; }
.gr-sell { background: #c73434; }
.gr-ipotesi button:active { filter: brightness(1.2); }
.gr-fr { font-size: 20px; }
.gr-area { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.graf-cv { display: block; touch-action: none; }
.gr-info { position: absolute; left: 10px; top: 6px; z-index: 2; pointer-events: none; font-size: 15px; color: var(--forte); text-shadow: 0 1px 2px #000; }
.gr-info b { font-size: 17px; }
.gr-tf { color: var(--sotto); margin-left: 4px; }
.gr-ohlc { font-size: 11px; font-variant-numeric: tabular-nums; margin-top: 1px; }
.gr-verifica { flex: none; padding: 8px 10px; background: #0a0a0a; border-top: 1px solid var(--bordo); }
.gr-verifica button { width: 100%; min-height: 46px; border-radius: 12px; background: var(--blu); color: #fff; font-size: 16px; font-weight: 700; }
.gr-barra { flex: none; display: flex; align-items: center; height: 54px; background: #0a0a0a; border-top: 1px solid var(--bordo); }
.ruota { flex: none; width: 86px; height: 54px; position: relative; border-right: 1px solid var(--bordo); }
.ruota-tf { width: 56px; }
.ruota-lista { height: 54px; overflow-y: auto; scroll-snap-type: y mandatory; padding: 16px 0; scrollbar-width: none; overscroll-behavior: contain; }
.ruota-lista::-webkit-scrollbar { display: none; }
.ruota-v { height: 22px; line-height: 22px; text-align: center; scroll-snap-align: center; font-size: 12px; color: #4a4a4e; white-space: nowrap; }
.ruota-v.on { color: var(--forte); font-size: 15px; font-weight: 700; }
.gr-attrezzi { flex: 1; display: flex; align-items: center; gap: 2px; overflow-x: auto; padding: 0 6px; scrollbar-width: none; }
.gr-attrezzi::-webkit-scrollbar { display: none; }
.gr-attrezzi button { flex: none; width: 44px; height: 44px; display: grid; place-items: center; color: var(--testo); border-radius: 10px; }
.gr-attrezzi button svg { width: 24px; height: 24px; }
.gr-attrezzi button.on { background: var(--blu); color: #fff; }
.gr-attrezzi button.via { color: #fca5a5; }

/* checklist: velata al 10% (cioe' opaca al 90%), copre quasi tutto il grafico */
.gr-check {
  position: absolute; left: 8px; right: 8px; top: 64px; bottom: 62px; z-index: 5;
  background: rgba(18, 18, 20, .9); border: 1px solid #333; border-radius: 16px;
  display: flex; flex-direction: column; overflow: hidden;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.ck-testa { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #333; }
.ck-testa b { font-size: 17px; color: var(--forte); flex: 1; }
.ck-x { width: 36px; height: 36px; border-radius: 50%; background: #2a2a2c; font-size: 15px; }
.ck-voci { flex: 1; overflow: auto; padding: 2px 0; }
/* Compatta (richiesta dell'utente): voci da una o due righe, il dito ha
   comunque 44 px di bersaglio sulla spunta e sulla freccia. */
.ck-voce { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px 12px; border-bottom: 1px solid #262628; min-height: 46px; }
.ck-spunta { flex: none; width: 26px; height: 26px; border-radius: 7px; border: 2px solid #5a5a5e; color: #fff; font-weight: 800; font-size: 15px; display: grid; place-items: center; }
.ck-voce.on .ck-spunta { background: var(--verde); border-color: var(--verde); }
.ck-testo { flex: 1; min-width: 0; font-size: 14px; line-height: 1.3; color: var(--forte); }
.ck-testo small { color: var(--sotto); font-size: 10.5px; }
.ck-voce.on .ck-testo { color: #b7f5dc; }
.ck-vai { flex: none; min-width: 44px; height: 44px; display: flex; align-items: center; justify-content: flex-end; gap: 2px; padding: 0 4px; color: var(--sotto); border-radius: 10px; }
.ck-vai:active { background: #2a2a2c; }
.ck-tf { font-size: 11px; font-weight: 700; color: #c7d4ff; background: rgba(41, 98, 255, .22); border-radius: 6px; padding: 2px 6px; }
.ck-piede { padding: 8px 14px; border-top: 1px solid #333; }

/* parametri: il grafico si stringe in alto, i campi sotto */
/* Sotto la card c'e' solo l'invio (6/10/2026): il grafico si prende il resto. */
.gr[data-stadio="parametri"] .gr-area { flex: 1; }
.gr[data-stadio="parametri"] .gr-barra { display: none; }
.gr-param { flex: 0 0 auto; max-height: 62%; min-height: 0; overflow: auto; background: #0a0a0a; border-top: 1px solid var(--bordo); padding: 10px 12px 14px; }
.pm-testa { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pm-lati { display: flex; background: var(--panel2); border-radius: 10px; padding: 3px; }
.pm-lati button { min-width: 64px; min-height: 38px; border-radius: 8px; font-weight: 700; color: var(--sotto); }
.pm-lati button.on.buy { background: #0e8f63; color: #fff; }
.pm-lati button.on.sell { background: #c73434; color: #fff; }
.pm-tipi { flex: 1; display: flex; gap: 4px; flex-wrap: wrap; }
.pm-tipi .chip { min-height: 34px; padding: 0 11px; font-size: 13px; }
.pm-x { width: 38px; height: 38px; border-radius: 50%; background: #2a2a2c; }
.pm-num { display: flex; align-items: center; background: var(--panel2); border-radius: 10px; overflow: hidden; }
.pm-num button { flex: none; width: 40px; height: 44px; font-size: 20px; color: var(--sotto); }
.pm-num button:active { background: #2c2c2e; }
.pm-num input { flex: 1; min-width: 0; width: 100%; height: 44px; background: none; border: 0; color: var(--forte); text-align: center; font: 600 16px/1 -apple-system, Roboto, sans-serif; font-variant-numeric: tabular-nums; outline: none; }

/* RISCHIO e RR grandi: sono la decisione del trade. */
.pm-grandi { display: grid; grid-template-columns: 1.25fr 1fr; gap: 8px; margin-bottom: 8px; }
.pm-grande { background: var(--panel2); border-radius: 12px; padding: 8px 10px 8px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pm-grande.rischio { background: rgba(239, 68, 68, .1); box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .28); }
.pm-grande > b { font-size: 24px; line-height: 1.15; font-weight: 750; color: var(--forte); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-grande.rischio > b { color: #ff8a8a; }
.pm-grande.rischio > b.su { color: var(--verde); }
.pm-grande small { color: var(--sotto); font-size: 11px; min-height: 13px; }
.pm-num.piccolo { margin-top: 4px; background: rgba(255, 255, 255, .06); }
.pm-num.piccolo button { width: 34px; height: 32px; font-size: 18px; }
.pm-num.piccolo input { height: 32px; font-size: 14px; }
.pm-unita { color: var(--sotto); font-size: 13px; margin-right: 2px; }

/* Ingresso, stop, target, lotti: piccoli, si leggono e si ritoccano. */
.pm-minis { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
.pm-mini { display: block; min-width: 0; }
.pm-mini > span { display: block; font-size: 10.5px; color: var(--sotto); margin: 0 0 2px 2px; text-transform: uppercase; letter-spacing: .04em; }
.pm-mini .pm-num button { width: 30px; height: 32px; font-size: 16px; }
.pm-mini .pm-num input { height: 32px; font-size: 13.5px; font-weight: 600; }
.pm-riep { margin: 8px 2px 10px; font-size: 12px; line-height: 1.4; }
.pm-riep b { font-variant-numeric: tabular-nums; }
.pm-invia { width: 100%; min-height: 52px; border-radius: 14px; font-size: 17px; font-weight: 800; color: #fff; }
.pm-invia.buy { background: #0e8f63; }
.pm-invia.sell { background: #c73434; }
.pm-invia:disabled { opacity: .5; }

/* =============================================================== POSIZIONI */
.ps-riga { width: calc(100% - 24px); margin: 10px 12px 0; text-align: left; display: block; background: var(--panel); border: 1px solid var(--bordo); border-radius: 14px; padding: 12px 14px; }
.ps-riga:active { background: var(--panel2); }
.ps-r1 { display: flex; align-items: center; gap: 6px; font-size: 17px; color: var(--forte); }
.ps-r1 .chip { font-size: 11px; }
.ps-pl { margin-left: auto; }
.ps-r2 { font-size: 12.5px; color: var(--sotto); margin-top: 3px; font-variant-numeric: tabular-nums; }
.ps-dett { position: fixed; inset: 0 0 calc(env(safe-area-inset-bottom) + var(--schede)) 0; display: flex; flex-direction: column; background: var(--fondo); padding-top: env(safe-area-inset-top); z-index: 3; max-width: none !important; }
.ps-testa { display: flex; align-items: center; gap: 10px; padding: 6px 12px; min-height: 52px; border-bottom: 1px solid var(--bordo); }
.ps-testa > div { flex: 1; }
.ps-testa b { font-size: 18px; color: var(--forte); }
.indietro { width: 40px; height: 40px; font-size: 30px; line-height: 1; color: var(--blu); }
.ps-corpo { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ps-graf { flex: 0 0 50%; display: flex; flex-direction: column; min-height: 0; }
.ps-corpo.grande .ps-graf { display: none; }
.ps-tf { display: flex; gap: 2px; padding: 6px 8px; overflow-x: auto; flex: none; background: #0a0a0a; scrollbar-width: none; }
.ps-tf button { flex: none; min-width: 42px; height: 32px; border-radius: 8px; font-size: 13px; color: var(--sotto); }
.ps-tf button.on { background: var(--panel2); color: var(--forte); font-weight: 700; }
.ps-area { flex: 1; min-height: 0; position: relative; }
.ps-mod { flex: 1; min-height: 0; overflow: auto; padding: 0 12px 14px; border-top: 1px solid var(--bordo); background: #0a0a0a; }
.ps-freccia { display: block; margin: 0 auto; width: 64px; height: 30px; color: var(--sotto); }
.ps-dati { margin: 0 2px 8px; font-size: 12px; line-height: 1.4; }
.ps-dati b { color: var(--testo); font-variant-numeric: tabular-nums; }
.ps-azioni { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
.bott { min-height: 48px; border-radius: 12px; background: var(--panel2); font-weight: 700; color: var(--forte); }
.bott.primario { background: var(--blu); }
.bott.pericolo { background: #3a1515; color: #fca5a5; }

/* ================================================================ STORICO
   Il journal: periodo e riepilogo in testa, giorni coi quadratini vinti/
   persi, trade in R. Il dettaglio racconta il trade invece di elencarne i
   campi (quelli stanno in fondo, chiusi). */
.st-conto { text-align: left; min-height: 44px; }
.st-conto b { font-size: 19px; }
.st-periodi, .st-filtri { display: flex; gap: 6px; padding: 10px 12px 0; overflow-x: auto; scrollbar-width: none; }
.st-periodi::-webkit-scrollbar, .st-filtri::-webkit-scrollbar { display: none; }
.st-periodi button, .st-filtri button { flex: none; min-height: 34px; padding: 0 13px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--sotto); background: var(--panel); border: 1px solid var(--bordo); }
.st-periodi button.on { color: #fff; background: var(--blu); border-color: var(--blu); }
.st-filtri button.on { color: var(--forte); border-color: #4b5563; background: var(--panel2); }
.st-riep { margin: 10px 12px 0; padding: 12px 14px; border-radius: 16px; background: linear-gradient(160deg, #10172a, #0c0f17); border: 1px solid #1d2742; }
.st-riep-1 { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.st-riep-1 > div:first-child { display: flex; flex-direction: column; }
.st-riep-1 b { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.st-riep-1 small { font-size: 12px; font-weight: 600; }
.st-curva { flex: 1; max-width: 55%; min-width: 0; }
.st-riep-2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.st-riep-2 > div { display: flex; flex-direction: column; background: rgba(255, 255, 255, .05); border-radius: 10px; padding: 6px 8px; min-width: 0; }
.st-riep-2 b { font-size: 15px; color: var(--forte); font-variant-numeric: tabular-nums; }
.st-riep-2 b.su { color: var(--verde); }
.st-riep-2 b.giu { color: var(--rosso); }
.st-giorno { margin: 12px 12px 0; }
.st-giorno-t { display: flex; align-items: center; gap: 8px; margin: 0 2px 6px; font-size: 12.5px; color: var(--sotto); }
.st-giorno-t > b:first-child { color: var(--testo); text-transform: capitalize; }
.st-quadri { display: flex; gap: 2px; }
.st-quadri i { width: 8px; height: 8px; border-radius: 2px; background: #3a3a3e; }
.st-quadri i.su { background: var(--verde); }
.st-quadri i.giu { background: var(--rosso); }
.st-giorno-n { margin-left: auto; font-variant-numeric: tabular-nums; }
.trade { width: 100%; margin: 0 0 6px; text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 12px 10px 14px; background: var(--panel); border: 1px solid var(--bordo); border-radius: 12px; position: relative; overflow: hidden; }
.trade::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: #3a3a3e; }
.trade.su::before { background: var(--verde); }
.trade.giu::before { background: var(--rosso); }
.trade:active { background: var(--panel2); }
.st-sim b { color: var(--forte); font-size: 15px; }
.st-r { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.trade-sotto { font-size: 12px; color: var(--sotto); }
.st-soldi { text-align: right; font-variant-numeric: tabular-nums; }
.st-esito { font-weight: 700; }
.st-esito.target { color: #34d399; }
.st-esito.stop { color: #fca5a5; }
.st-esito.tempo { color: #c7d4ff; }
#st-dett .ps-testa { position: sticky; top: 0; z-index: 2; background: var(--fondo); }
.st-eroe { margin: 12px 12px 0; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--bordo); background: var(--panel); }
.st-eroe.su { background: linear-gradient(160deg, rgba(16, 185, 129, .16), rgba(16, 185, 129, .03)); border-color: rgba(16, 185, 129, .35); }
.st-eroe.giu { background: linear-gradient(160deg, rgba(239, 68, 68, .16), rgba(239, 68, 68, .03)); border-color: rgba(239, 68, 68, .35); }
.st-eroe-r { font-size: 40px; font-weight: 850; letter-spacing: -.02em; color: var(--forte); font-variant-numeric: tabular-nums; line-height: 1.05; }
.st-eroe.su .st-eroe-r { color: #34d399; }
.st-eroe.giu .st-eroe-r { color: #ff8a8a; }
.st-eroe-d { display: flex; gap: 8px; align-items: baseline; margin-top: 2px; }
.st-eroe-d b { font-size: 17px; color: var(--forte); font-variant-numeric: tabular-nums; }
.st-eroe-d span { font-size: 13px; color: var(--sotto); }
.st-eroe-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.st-eroe-chips span { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: var(--testo); }
.st-graf { padding: 0; overflow: hidden; }
.st-area { height: 260px; position: relative; }
.st-perc { position: relative; padding: 10px 4px 0; }
.st-perc-tr { position: relative; height: 12px; border-radius: 6px; background: #26262b; }
.st-perc-tr i { position: absolute; top: 0; height: 12px; }
.st-perc-tr i.contro, .st-leg i.contro { background: rgba(239, 68, 68, .7); }
.st-perc-tr i.favore, .st-leg i.favore { background: rgba(16, 185, 129, .75); }
.st-perc-tr i.dopo, .st-leg i.dopo { background: repeating-linear-gradient(45deg, rgba(16, 185, 129, .45) 0 4px, rgba(16, 185, 129, .15) 4px 8px); }
.st-perc-tr .m { position: absolute; top: -4px; width: 2px; height: 20px; margin-left: -1px; background: #9ca3af; }
.st-perc-tr .m.sl { background: #ef4444; }
.st-perc-tr .m.tp { background: #10b981; }
.st-perc-tr .m.en { background: var(--blu); }
.st-perc-tr .m.usc { width: 4px; margin-left: -2px; background: #fff; }
.st-perc-lab { position: relative; height: 18px; margin-top: 6px; font-size: 10.5px; color: var(--sotto); }
.st-perc-lab span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.st-perc-lab span.usc { top: 0; color: var(--forte); font-weight: 700; transform: translateX(-50%) translateY(10px); }
.st-leg { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 16px; font-size: 11.5px; color: var(--sotto); }
.st-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.st-frasi { margin: 10px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.45; color: var(--testo); }
.st-frasi li + li { margin-top: 4px; }
.st-frasi b { color: var(--forte); }
.st-nota-t { margin: 0; font-size: 15px; line-height: 1.5; color: var(--forte); font-style: italic; }
.st-stelle { margin-top: 10px; display: flex; align-items: center; gap: 2px; }
.st-stelle button { color: var(--sotto); font-size: 24px; line-height: 1; padding: 4px 3px; min-width: 36px; min-height: 36px; }
.st-stelle button.on { color: var(--ambra); }
.st-stelle small { color: var(--sotto); font-size: 11px; margin-left: 6px; }
.st-sinc { font-size: 11px; font-weight: 500; color: var(--sotto); margin-left: 4px; }
.st-scrivi { margin-top: 12px; width: 100%; }
/* Il piano con cui il trade e' nato. */
.st-piano-n { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.st-piano-n > div { display: flex; flex-direction: column; gap: 2px; }
.st-piano-n b { font-size: 17px; }
.st-piano-n small { font-size: 12px; color: var(--sotto); font-weight: 500; }
.st-piano-r { margin: 10px 0 4px; font-size: 13px; line-height: 1.5; color: var(--testo); }
.st-ck { margin-top: 10px; border-top: 1px solid var(--bordo); padding-top: 8px; }
.st-ck-v { font-size: 13px; padding: 3px 0; }
.st-ck-v.su { color: var(--testo); }
.st-ck-v.giu { color: var(--sotto); text-decoration: line-through; }
.st-tuo { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.st-tuo > div { display: flex; flex-direction: column; background: var(--panel2); border-radius: 10px; padding: 8px; min-width: 0; }
.st-tuo b { font-size: 15px; color: var(--forte); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-tuo b.su { color: var(--verde); }
.st-tuo b.giu { color: var(--rosso); }
.st-tuo small { font-size: 11px; color: var(--sotto); }
.st-dettagli summary { list-style: none; cursor: pointer; }
.st-dettagli summary::-webkit-details-marker { display: none; }
.st-dettagli summary h2 { display: flex; justify-content: space-between; margin-bottom: 0; border-bottom: 0; padding-bottom: 0; }
.st-dettagli summary h2::after { content: "▾"; color: var(--sotto); }
.st-dettagli[open] summary h2 { margin-bottom: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--bordo); }
.st-dettagli[open] summary h2::after { content: "▴"; }
.carta h2 { font-size: 17px; }

/* ============================================================ STATISTICHE */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-t { font-size: 11px; color: var(--spento); text-align: center; }
.cal-g { aspect-ratio: 1; border-radius: 8px; background: var(--panel2); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: var(--sotto); min-width: 0; }
.cal-g b { font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-g.vuoto { background: none; }
.cal-g.su { background: rgba(16,185,129,.2); color: var(--testo); }
.cal-g.giu { background: rgba(239,68,68,.2); color: var(--testo); }
.cal-testa { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-mese { text-transform: capitalize; color: var(--forte); }
.cal-testa button { width: 44px; height: 36px; border-radius: 10px; color: var(--sotto); font-size: 22px; }

/* ---- collegamento: banner di Mercati e foglio dei conti ---- */
.mt-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 12px 0;
  padding: 12px 14px; border-radius: 12px; background: rgba(41, 98, 255, .14); border: 1px solid rgba(41, 98, 255, .35);
  color: #c7d4ff; font-size: 13.5px; cursor: pointer; }
.mt-banner b { color: #fff; white-space: nowrap; }
.cn-passo { padding: 14px 0; border-top: 1px solid var(--bordo); }
.cn-passo > b { display: block; margin-bottom: 4px; color: var(--forte); }
.cn-passo .bott { width: 100%; margin-top: 10px; }
.cn-riga { display: flex; gap: 8px; margin-top: 10px; }
.cn-riga input { flex: 1; min-width: 0; height: 48px; border-radius: 12px; border: 1px solid var(--bordo); background: var(--panel2);
  color: var(--forte); font: 700 20px/1 ui-monospace, Menlo, monospace; letter-spacing: 2px; text-align: center; text-transform: uppercase; }
.cn-riga .bott { width: auto; margin-top: 0; padding: 0 18px; }

/* ---- conferme e domande (al posto di confirm/prompt) ---- */
#foglio-domanda { z-index: 45; }
.dm-testo { margin: 14px 0 12px; font-size: 16px; color: var(--forte); line-height: 1.45; }
.dm-campo { width: 100%; height: 48px; border-radius: 12px; border: 1px solid var(--bordo); background: var(--panel2);
  color: var(--forte); font: 16px -apple-system, Roboto, sans-serif; padding: 0 14px; margin-bottom: 12px; }
.dm-bottoni { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }


/* ================================================ LA CARD DEL TRADE (carta.js)
   La stessa ossatura della card di vTrade PC (web/nt_carte.js, trade_manager):
   rischio in rosso e guadagno in verde in grande, l'RR in una pillola viola,
   la barra dello stop → target sotto. Fondo velato del colore del P&L. */
.ct { background: var(--panel); border: 1px solid var(--bordo); border-radius: 14px; padding: 10px 12px 10px; display: flex; flex-direction: column; gap: 8px; }
.ct.posizione.su { background: linear-gradient(180deg, rgba(16, 185, 129, .10), rgba(16, 185, 129, .03)); border-color: rgba(16, 185, 129, .35); }
.ct.posizione.giu { background: linear-gradient(180deg, rgba(239, 68, 68, .10), rgba(239, 68, 68, .03)); border-color: rgba(239, 68, 68, .35); }
.ct-testa { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ct-sim { font-size: 16px; color: var(--forte); }
.ct-lato { font-size: 11px; font-weight: 800; letter-spacing: .03em; padding: 2px 7px; border-radius: 999px; }
.ct-lato.buy { color: #34d399; background: rgba(16, 185, 129, .16); }
.ct-lato.sell { color: #fca5a5; background: rgba(239, 68, 68, .16); }
.ct-tipo { font-size: 12px; color: var(--sotto); }
.ct-vol.piccolo { font-size: 12px; color: var(--sotto); font-variant-numeric: tabular-nums; }
.ct-ora { margin-left: auto; font-size: 12px; color: var(--sotto); white-space: nowrap; }
.ct-rr { margin-left: auto; font-size: 13px; font-weight: 800; color: #c4b5fd; background: rgba(139, 92, 246, .2); padding: 3px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.ct-x { width: 30px; height: 30px; border-radius: 50%; background: #2a2a2c; color: var(--sotto); font-size: 13px; flex: none; }
.ct-tre { display: grid; grid-template-columns: 1.15fr .9fr 1.15fr; gap: 6px; }
.ct-k { border-radius: 10px; padding: 6px 8px; display: flex; flex-direction: column; min-width: 0; }
.ct-k b { font-size: 21px; line-height: 1.15; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-k small { font-size: 11px; color: var(--sotto); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-k.rischio { background: rgba(239, 68, 68, .1); box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .3); }
.ct-k.rischio b { color: #ff8a8a; }
.ct-k.presa { background: rgba(16, 185, 129, .1); box-shadow: inset 0 0 0 1px rgba(16, 185, 129, .3); }
.ct-k.presa b { color: #34d399; }
.ct-k.mezzo { align-items: center; justify-content: center; background: var(--panel2); }
.ct-vol { font-size: 14px; font-weight: 700; color: var(--forte); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-pl { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.ct-pl .ct-k { padding: 0; }
.ct-pl .ct-k b { font-size: 24px; color: var(--forte); }
.ct-pl .ct-k b.su { color: var(--verde); }
.ct-pl .ct-k b.giu { color: var(--rosso); }
.ct-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ct-chip { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--panel2); color: var(--testo); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ct-chip.vuoto { display: none; }
.ct-chip.su { color: #34d399; box-shadow: inset 0 0 0 1px rgba(16, 185, 129, .45); background: none; }
.ct-chip.giu { color: #fca5a5; box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .45); background: none; }
.ct-chip.scudo { color: var(--testo); box-shadow: inset 0 0 0 1px var(--bordo); background: none; }
.ct-chip.scudo.su { color: #34d399; }
.ct-chip.scudo.avviso { color: var(--ambra); box-shadow: inset 0 0 0 1px rgba(245, 183, 10, .5); }

/* la barra: a sinistra lo stop, a destra il target, nel verso del trade */
.ct-bar { touch-action: none; }
.ct-track { position: relative; height: 22px; }
.ct-track::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 2px; background: #2c2c30; }
.ct-loss, .ct-gain { position: absolute; top: 9px; height: 4px; }
.ct-loss { background: linear-gradient(90deg, #ef4444, rgba(239, 68, 68, .45)); border-radius: 2px 0 0 2px; }
.ct-gain { background: linear-gradient(90deg, rgba(16, 185, 129, .45), #10b981); border-radius: 0 2px 2px 0; }
.ct-entry { position: absolute; top: 4px; width: 3px; height: 14px; margin-left: -1.5px; border-radius: 2px; background: var(--blu); }
.ct-now { position: absolute; top: 2px; width: 2px; height: 18px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); }
.ct-h { position: absolute; top: 0; width: 22px; height: 22px; margin-left: -11px; border-radius: 6px; border: 2.5px solid var(--blu); background: #0f0f10; }
.ct-h::after { content: ""; position: absolute; inset: -12px -10px; }   /* bersaglio per il dito */
.ct-h.sl { border-color: #ef4444; }
.ct-h.tp { border-color: #10b981; }
.ct-h.entry { border-radius: 50%; }
.ct-h.presa { transform: scale(1.15); box-shadow: 0 0 0 4px rgba(41, 98, 255, .25); }
.ct-lab { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 4px; font-size: 11px; font-variant-numeric: tabular-nums; }
.ct-lab .sl, .ct-lab .tp { padding: 2px 7px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.ct-lab .sl { color: #fca5a5; box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .45); }
.ct-lab .tp { color: #34d399; box-shadow: inset 0 0 0 1px rgba(16, 185, 129, .45); }
.ct-lab .vuoto { color: var(--spento); box-shadow: none; font-weight: 500; }
.ct-lab .en { color: var(--sotto); }
.ct-azioni { display: flex; gap: 8px; padding-top: 8px; border-top: 1px solid var(--bordo); }
.ct-btn { min-height: 38px; padding: 0 14px; border-radius: 10px; background: var(--panel2); font-weight: 700; font-size: 14px; color: var(--forte); }
.ct-btn.chiudi { color: #fca5a5; box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .45); background: rgba(239, 68, 68, .08); }

/* dove sta: lista delle posizioni, dettaglio, parametri */
.ps-carte { display: flex; flex-direction: column; gap: 10px; padding: 10px 12px 0; }
.ps-carta { cursor: pointer; }
.ps-carta-dett { margin-bottom: 8px; }
.pm-carta { margin-bottom: 8px; }
.pm-regola { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; margin-bottom: 6px; }
.ct-lab .tocca { cursor: pointer; }
.ct-lab .tocca:active { filter: brightness(1.4); }
.ps-aiuto { margin: 2px 4px 12px; font-size: 11.5px; }
.dm-campo.lungo { height: auto; min-height: 130px; padding: 12px; font: inherit; line-height: 1.45; resize: vertical; }
/* «Installa vTrade»: finche' l'app gira nel browser (app.js _invitoInstalla). */
.mt-installa { display: flex; align-items: center; gap: 4px; margin: 8px 12px 0; border-radius: 12px; background: rgba(41, 98, 255, .14);
  border: 1px solid rgba(41, 98, 255, .4); }
.mt-installa-si { flex: 1; text-align: left; padding: 11px 12px; font-size: 14px; color: var(--forte); }
.mt-installa-si span { color: var(--sotto); font-size: 12px; margin-left: 4px; }
.mt-installa-no { width: 40px; height: 40px; color: var(--sotto); }
/* Quanto chiudere (App.sceltaChiusura). */
.ch-scelte { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ch-pct { min-height: 44px; border-radius: 11px; background: var(--panel2); border: 1px solid var(--bordo); color: var(--forte); font-weight: 700; }
.ch-pct.on { border-color: var(--blu); background: rgba(41, 98, 255, .18); }
.ch-cursore { width: 100%; margin: 16px 0 6px; accent-color: var(--blu); }
.ch-dice { font-size: 15px; color: var(--testo); margin-bottom: 14px; line-height: 1.5; }
/* L'occhio dell'equity in Mercati. */
.og-eq-t { display: flex; align-items: center; gap: 6px; }
.og-occhio { width: 30px; height: 30px; margin: -6px 0; display: inline-flex; align-items: center; justify-content: center; color: var(--sotto); border-radius: 8px; }
.og-occhio[aria-pressed="true"] { color: var(--blu); }
/* Statistiche: ogni numero si tocca (v_stat.js _info). */
.griglia > .st-k { text-align: left; background: var(--panel2); border-radius: 12px; padding: 12px; color: inherit; width: 100%; }
.st-piu { font-style: normal; color: var(--spento); font-size: 13px; margin-left: 2px; }
button.riga.st-r-t { width: 100%; text-align: left; color: inherit; border-bottom: 1px solid var(--bordo); }
.st-tocca { cursor: pointer; }
button.cal-g { border: 0; color: var(--testo); font: inherit; font-size: 11px; padding: 0; }
.sa-corpo { max-height: 86vh; overflow-y: auto; }
.sa-corpo h3 { font-size: 13px; color: var(--sotto); text-transform: uppercase; letter-spacing: .04em; margin: 18px 0 8px; font-weight: 600; }
.sa-spiega { font-size: 14px; line-height: 1.5; color: var(--testo); margin: 4px 0 10px; }
.sa-tre { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 4px; }
.sa-tre > div { background: var(--panel2); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.sa-tre b { font-size: 16px; }
.sa-tre small { font-size: 11px; color: var(--sotto); }
.sa-trade { display: flex; flex-direction: column; }
.sa-t { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--bordo); text-align: left; color: inherit; width: 100%; }
.sa-t small { display: block; font-size: 12px; color: var(--sotto); font-weight: 400; }
.sa-t .num { text-align: right; }
.sa-tab { display: flex; flex-direction: column; gap: 8px; }
.sa-riga { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.sa-nome small { display: block; font-size: 11px; color: var(--sotto); }
.sa-barra { height: 8px; border-radius: 4px; background: var(--panel2); overflow: hidden; }
.sa-barra i { display: block; height: 100%; border-radius: 4px; background: var(--verde); }
.sa-barra i.giu { background: var(--rosso); }
/* La barra dei disegni: posa col mirino, modifiche, «altri». */
.gr-posa { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 0 6px; line-height: 1.25; }
.gr-posa b { font-size: 13px; color: var(--forte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gr-posa small { font-size: 11px; color: var(--sotto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gr-pallino, .gr-col i { display: block; width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); }
.gr-attrezzi button.gr-col.on { background: var(--panel2); }
.gr-attrezzi button.gr-col.on i { border-color: #fff; }
.gr-gruppo { font-size: 12px; color: var(--sotto); text-transform: uppercase; letter-spacing: .04em; margin: 14px 2px 6px; font-weight: 600; }
.gr-strumenti { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gr-strumenti button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; background: var(--panel2); color: var(--testo); font-size: 11px; text-align: center; }
.gr-strumenti svg { width: 26px; height: 26px; }
/* La barra delle modifiche del disegno selezionato, sopra il grafico. */
.gr-modifica { position: absolute; z-index: 4; top: 46px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px;
  padding: 4px; border-radius: 14px; background: rgba(28,28,30,.96); border: 1px solid var(--bordo); box-shadow: 0 6px 20px rgba(0,0,0,.5);
  max-width: calc(100% - 16px); overflow-x: auto; scrollbar-width: none; }
.gr-modifica button { flex: none; width: 40px; height: 40px; display: grid; place-items: center; color: var(--testo); border-radius: 10px; }
.gr-modifica button svg { width: 22px; height: 22px; }
.gr-modifica button.on { background: var(--blu); color: #fff; }
.gr-modifica button.via { color: #fca5a5; }
.gr-modifica button.gr-col.on { background: var(--panel2); }
/* La card del ticket: ogni pezzo si tocca (v_grafico._toccoCarta). */
.ct [data-ct="lato"], .ct [data-ct="tipo"], .ct [data-ct="rr"], .ct [data-ct="rischio"], .ct [data-ct="lotti"],
.ct [data-ct="tp"], .ct [data-ct="sl"], .ct [data-ct="entry"], .ct [data-ct="parziale"] { cursor: pointer; -webkit-tap-highlight-color: rgba(41,98,255,.25); }
.ct .ct-k[data-ct] { border-radius: 10px; }
.ct .ct-k[data-ct]:active, .ct span[data-ct]:active { background: rgba(255,255,255,.08); }
.ct-lab .en[data-ct] { text-decoration: underline dotted rgba(255,255,255,.35); text-underline-offset: 3px; }
/* La conferma sullo stesso bottone. */
.pm-invia.arma, .bott.arma { animation: arma 0.9s ease-in-out infinite alternate; box-shadow: 0 0 0 3px rgba(255,255,255,.55); }
@keyframes arma { from { filter: brightness(1); } to { filter: brightness(1.35); } }
/* GESTIONE DEL TRADE (6/10/2026): via la barra «Setup Buy/Sell», il nome del
   pair piccolo, le opzioni d'esecuzione sopra la card, il piano sotto. */
.gr[data-stadio="checklist"] .gr-ipotesi, .gr[data-stadio="checklist-min"] .gr-ipotesi, .gr[data-stadio="parametri"] .gr-ipotesi { display: none; }
.gr[data-stadio="parametri"] .gr-info, .gr[data-stadio="checklist"] .gr-info { font-size: 11px; padding: 4px 8px; }
.gr[data-stadio="parametri"] .gr-info b, .gr[data-stadio="checklist"] .gr-info b { font-size: 13px; }
.gr[data-stadio="parametri"] .gr-ohlc, .gr[data-stadio="checklist"] .gr-ohlc { display: none; }
.pm-esec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--panel2); border-radius: 11px; padding: 3px; margin: 0 0 6px; }
.pm-esec button { min-height: 34px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--sotto); }
.pm-esec button.on { background: var(--blu); color: #fff; }
.ct-piano { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ct-piano .ct-chip { min-height: 30px; display: inline-flex; align-items: center; padding: 0 10px; font-size: 12px; touch-action: none; }
.ct-piano .ct-chip.vuoto { opacity: .6; }
.ct [data-ct="rr"], .ct [data-ct="rischio"], .ct [data-ct="lotti"] { touch-action: none; }
.ct-scorri { position: fixed; z-index: 50; pointer-events: none; padding: 6px 12px; border-radius: 10px; background: #2962ff; color: #fff;
  font: 700 15px -apple-system, Roboto, sans-serif; transform: translate(-50%, -130%); box-shadow: 0 6px 18px rgba(0,0,0,.5); }
/* Il tipo d'ordine e' gia' nei bottoni sopra la card: nella card non si ripete. */
.pm-carta .ct-tipo { display: none; }
.ct-piano { margin-top: 0; }
