/* =====================================================================
   Fanta-Trade.eu - Foglio di stile base (mobile first)
   I colori e i font arrivano dalle variabili in theme.css.php
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }
/* l'attributo hidden deve vincere su qualsiasi display impostato da una classe */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: env(safe-area-inset-top, 0px); }
body {
  margin: 0;
  font-family: var(--ft-font, 'Saira', Arial, sans-serif);
  font-size: var(--ft-font-size, 16px);
  line-height: 1.55;
  color: var(--ft-text, #1f2328);
  background: var(--ft-bg, #f3f2ee);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
img { max-width: 100%; height: auto; }
a { color: var(--ft-primary); text-decoration: none; }
a:hover { color: var(--ft-primary-dark); }
h1, h2, h3, h4 { color: var(--ft-ink); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ft-muted); }
.small { font-size: .875rem; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.up { color: var(--ft-success); } .down { color: var(--ft-danger); }

/* ---------- Logo ---------- */
.ft-logo {
  font-family: var(--ft-logo-font, var(--ft-font));
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--ft-ink);
  letter-spacing: -.02em;
  white-space: nowrap;
  line-height: 1;
}
.ft-logo { display: inline-flex; align-items: center; gap: .35em; vertical-align: middle; }
.ft-logo .ft-mark { height: 1.3em; width: auto; flex: 0 0 auto; display: block; }
.ft-logo .ft-euro { color: var(--ft-primary); }
.ft-logo-sm { font-size: 1.3rem; }
.ft-logo-lg { font-size: clamp(2rem, 6vw, 3rem); }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .72em 1.25em; border-radius: var(--ft-radius); border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s, border-color .15s, transform .05s;
  min-height: 44px; line-height: 1.1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ft-primary); color: #fff; }
.btn-primary:hover { background: var(--ft-primary-dark); color: #fff; }
.btn-dark { background: var(--ft-ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-outline { background: transparent; border-color: var(--ft-border); color: var(--ft-ink); }
.btn-outline:hover { border-color: var(--ft-ink); color: var(--ft-ink); }
.btn-sm { padding: .5em .9em; min-height: 38px; font-size: .92rem; }
.btn-block { display: flex; width: 100%; }
.btn-google { background: #fff; color: #1f1f1f; border-color: #dadce0; }
.btn-google:hover { background: #f7f8f8; color: #1f1f1f; border-color: #c6c9cc; }
.icon-btn { background: none; border: 0; color: var(--ft-muted); padding: 8px; border-radius: 8px; cursor: pointer; display: inline-flex; }
.icon-btn:hover { background: var(--ft-sidebar-active); color: var(--ft-primary); }

/* ---------- Form ---------- */
.form-group { margin-bottom: 1rem; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; color: var(--ft-ink); }
.input, input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%; font: inherit; color: var(--ft-text); background: var(--ft-surface);
  border: 1px solid var(--ft-border); border-radius: var(--ft-radius);
  padding: .7em .85em; min-height: 44px; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--ft-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ft-primary) 18%, transparent);
}
.checkbox { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.checkbox input { margin-top: .3rem; width: 18px; height: 18px; flex: 0 0 auto; }
.help { font-size: .82rem; color: var(--ft-muted); margin-top: .3rem; }
.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.hp-field { position: absolute !important; left: -9999px !important; }
.divider { display: flex; align-items: center; gap: .8rem; color: var(--ft-muted); font-size: .85rem; margin: 1.2rem 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--ft-border); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 3rem; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--ft-muted); cursor: pointer; padding: 6px; }

/* ---------- Alert ---------- */
.alert { padding: .85rem 1rem; border-radius: var(--ft-radius); margin-bottom: 1rem; border: 1px solid; font-size: .95rem; }
.alert a { font-weight: 600; text-decoration: underline; }
.alert-success { background: #e8f5ef; border-color: #b9e0cd; color: #0b5c41; }
.alert-danger  { background: #fdecec; border-color: #f5c2c4; color: #8f0d12; }
.alert-warning { background: #fdf5e6; border-color: #f1d9a8; color: #7a4f10; }
.alert-info    { background: #eef3fb; border-color: #c9d8f0; color: #1f4476; }

/* ---------- Card ---------- */
.card { background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: var(--ft-radius); box-shadow: var(--ft-shadow); padding: 1.25rem; }
.card + .card { margin-top: 1rem; }
/* nelle griglie le schede affiancate devono avere la stessa altezza e partire allineate */
.grid > .card + .card { margin-top: 0; }
.grid > .card { display: flex; flex-direction: column; min-width: 0; }
.grid > .card > .chart-box, .grid > .card > .map-wrap { flex: 1 1 auto; }
.card-title { font-size: 1.05rem; margin-bottom: .9rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }

/* =====================================================================
   PARTE PUBBLICA
   ===================================================================== */
.pub-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ft-bg);
  background: color-mix(in srgb, var(--ft-bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--ft-border);
  padding-top: env(safe-area-inset-top, 0px);
}
.pub-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 1rem; }
.pub-nav { display: none; }
.pub-nav.open {
  display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 100%;
  background: var(--ft-surface); border-bottom: 1px solid var(--ft-border); padding: 1rem 20px 1.2rem; gap: .25rem;
  box-shadow: var(--ft-shadow);
}
.pub-nav a { color: var(--ft-ink); font-weight: 500; padding: .6rem .2rem; }
.pub-nav a.active { color: var(--ft-primary); }
.pub-nav a.btn { color: #fff; margin-top: .4rem; }

.nav-toggle { width: 44px; height: 44px; border: 0; background: none; display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; cursor: pointer; border-radius: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ft-ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.pub-main { min-height: 60vh; }
.pub-footer { border-top: 1px solid var(--ft-border); background: var(--ft-surface); margin-top: 4rem; padding: 2.5rem 0 1.5rem; }
.pub-footer-inner { display: flex; flex-direction: column; gap: 1.5rem; }
.pub-footer-inner p { margin-top: .8rem; max-width: 460px; }
.pub-footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.pub-footer-links a { color: var(--ft-ink); }
.pub-copy { margin-top: 1.5rem; }

/* Ticker */
.ticker { background: var(--ft-ink); color: #fff; overflow: hidden; white-space: nowrap; font-variant-numeric: tabular-nums; font-size: .88rem; }
.ticker-track { display: inline-flex; gap: 2.2rem; padding: .55rem 0; animation: ticker 40s linear infinite; }
.ticker-track span b { font-weight: 600; margin-right: .4rem; }
.ticker .up { color: #4ade9a; } .ticker .down { color: #ff6b6f; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* Hero */
.hero { padding: 3rem 0 2rem; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ft-primary); margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2.2rem, 7vw, 4rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; }
.hero h1 em { font-style: normal; color: var(--ft-primary); }
.hero .lead { font-size: 1.15rem; color: var(--ft-muted); max-width: 540px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero-panel { background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: calc(var(--ft-radius) + 6px); box-shadow: var(--ft-shadow); padding: 1.1rem 1.1rem .6rem; }
.hero-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.hero-panel-head .val { font-size: 1.7rem; font-weight: 700; color: var(--ft-ink); font-variant-numeric: tabular-nums; }
.chart-box { width: 100%; height: 300px; }
.chart-box-sm { height: 240px; }

.section { padding: 3rem 0; }
.section-head { max-width: 640px; margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: -.02em; }
.features { display: grid; gap: 1px; background: var(--ft-border); border: 1px solid var(--ft-border); border-radius: var(--ft-radius); overflow: hidden; }
.feature { background: var(--ft-surface); padding: 1.5rem; }
.feature .num { font-size: .8rem; font-weight: 700; color: var(--ft-primary); letter-spacing: .1em; }
.feature h3 { font-size: 1.15rem; margin-top: .5rem; }
.feature p { color: var(--ft-muted); margin: 0; }

.steps { counter-reset: s; display: grid; gap: 1rem; }
.step { display: flex; gap: 1rem; align-items: flex-start; }
.step::before { counter-increment: s; content: counter(s); flex: 0 0 44px; height: 44px; border-radius: 50%; background: var(--ft-ink); color: #fff; font-weight: 700; display: grid; place-items: center; }
.step h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.step p { margin: 0; color: var(--ft-muted); }

.cta-band { background: var(--ft-ink); color: #fff; border-radius: calc(var(--ft-radius) + 6px); padding: 2.2rem 1.5rem; display: flex; flex-direction: column; gap: 1.2rem; align-items: flex-start; }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 0; }
.cta-band p { color: #c9cbd0; margin: 0; }

/* Auth */
.auth-wrap { min-height: calc(100vh - 64px); display: flex; align-items: flex-start; justify-content: center; padding: 2rem 16px 3rem; }
.auth-card { width: 100%; max-width: 440px; background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: calc(var(--ft-radius) + 4px); box-shadow: var(--ft-shadow); padding: 1.6rem 1.3rem; }
.auth-card h1 { font-size: 1.6rem; font-weight: 800; }
.auth-card .sub { color: var(--ft-muted); margin-bottom: 1.3rem; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .9rem; margin-top: 1rem; }
.pw-meter { height: 4px; background: var(--ft-border); border-radius: 4px; margin-top: .45rem; overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; background: var(--ft-danger); transition: width .2s, background .2s; }

/* Contatti */
.about-grid { display: grid; gap: 2rem; }
.about-grid h1 { font-size: clamp(2rem, 6vw, 3rem); font-weight: 800; letter-spacing: -.03em; }
.contact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .6rem; }
.contact-list li { display: flex; gap: .7rem; align-items: center; }

/* =====================================================================
   AREA RISERVATA
   ===================================================================== */
body.app { min-height: 100vh; }
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  width: min(86vw, var(--ft-sidebar-width, 260px));
  background: var(--ft-sidebar-bg); color: var(--ft-sidebar-text);
  border-right: 1px solid var(--ft-border);
  display: flex; flex-direction: column;
  transform: translateX(-102%); transition: transform .25s ease;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
}
body.sidebar-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.2); }
.app-overlay { position: fixed; inset: 0; background: rgba(17,18,20,.45); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .25s; }
body.sidebar-open .app-overlay { opacity: 1; pointer-events: auto; }
body.sidebar-open { overflow: hidden; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 1.3rem 1.2rem 1.1rem; border-bottom: 1px solid var(--ft-border); }
.sidebar-brand .ft-logo { font-size: 1.55rem; }
.sidebar-close { background: none; border: 0; font-size: 1.8rem; line-height: 1; color: var(--ft-muted); cursor: pointer; width: 40px; height: 40px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .8rem .7rem; }
.nav-label { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ft-muted); padding: 1rem .7rem .4rem; }
.sidebar-nav a { display: flex; align-items: center; gap: .75rem; padding: .7rem .75rem; border-radius: var(--ft-radius); color: var(--ft-sidebar-text); font-weight: 500; margin-bottom: 2px; }
.sidebar-nav a svg { opacity: .7; flex: 0 0 auto; }
.sidebar-nav a:hover { background: var(--ft-sidebar-active); color: var(--ft-ink); }
.sidebar-nav a.active { background: var(--ft-sidebar-active); color: var(--ft-primary); font-weight: 600; }
.sidebar-nav a.active svg { opacity: 1; }
.badge { margin-left: auto; font-style: normal; background: var(--ft-primary); color: #fff; font-size: .72rem; font-weight: 700; border-radius: 20px; padding: .1rem .5rem; }
.sidebar-user { display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem; border-top: 1px solid var(--ft-border); }
.sidebar-user form { margin: 0 0 0 auto; }
.sidebar-user-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sidebar-user-info strong { font-size: .92rem; color: var(--ft-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info span { font-size: .78rem; color: var(--ft-muted); }
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.avatar-txt { background: var(--ft-ink); color: #fff; display: grid; place-items: center; font-weight: 700; }

.app-main { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: .6rem;
  background: var(--ft-bg);
  background: color-mix(in srgb, var(--ft-bg) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ft-border);
  padding: calc(.5rem + env(safe-area-inset-top, 0px)) 1rem .5rem; min-height: 60px;
}
.topbar-title { font-size: 1.15rem; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 599px) {
  .topbar-balance small, .topbar-total em { display: none; }
  .topbar-figures { gap: .3rem; }
  .topbar-balance { padding: .3rem .6rem; font-size: .8rem; }
}
.topbar-balance { display: inline-flex; align-items: baseline; gap: .35rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ft-ink); background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: 30px; padding: .35rem .8rem; font-size: .88rem; white-space: nowrap; }
.topbar-balance small { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ft-muted); }
.topbar-figures { display: flex; gap: .4rem; align-items: center; flex: 0 0 auto; }
.topbar-total.up { color: var(--ft-success); border-color: color-mix(in srgb, var(--ft-success) 40%, var(--ft-border)); background: #eef8f3; }
.topbar-total.down { color: var(--ft-danger); border-color: color-mix(in srgb, var(--ft-danger) 40%, var(--ft-border)); background: #fdf0f0; }
.topbar-total em { font-style: normal; font-size: .75rem; font-weight: 600; }
.topbar-total:hover { filter: brightness(.97); }
.app-content { padding: 1rem; flex: 1; width: 100%; max-width: 1400px; }

.kpis { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin-bottom: 1rem; }
.kpi { background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: var(--ft-radius); padding: 1rem; box-shadow: var(--ft-shadow); min-width: 0; }
.kpi span { display: block; font-size: .78rem; color: var(--ft-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.kpi strong { display: block; font-size: clamp(1.1rem, 4vw, 1.5rem); color: var(--ft-ink); font-variant-numeric: tabular-nums; margin-top: .25rem; overflow-wrap: anywhere; }

/* Tabelle */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td { padding: .7rem .6rem; border-bottom: 1px solid var(--ft-border); text-align: left; vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ft-muted); font-weight: 600; }
.table tr.unread td { font-weight: 600; }

/* Admin: CSS & impostazioni */
.settings-group { margin-bottom: 1.2rem; }
.settings-group h2 { font-size: 1.05rem; margin: 0 0 .25rem; }
.settings-group > p { margin-bottom: 1rem; }
.secret-state { display: inline-block; font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 20px; margin-left: .4rem; vertical-align: middle; }
.secret-state.on { background: #e8f5ef; color: #0b5c41; }
.secret-state.off { background: #f1f1ef; color: var(--ft-muted); }
.color-field { display: flex; gap: .5rem; align-items: center; }
.color-field input[type=color] { width: 48px; height: 44px; padding: 3px; border: 1px solid var(--ft-border); border-radius: var(--ft-radius); background: var(--ft-surface); flex: 0 0 auto; cursor: pointer; }
.css-editor { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; min-height: 260px; line-height: 1.45; tab-size: 2; }
.preview-box { border: 1px dashed var(--ft-border); border-radius: var(--ft-radius); padding: 1rem; background: var(--ft-bg); }
.preview-box .swatches { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.preview-box .sw { width: 30px; height: 30px; border-radius: 8px; border: 1px solid rgba(0,0,0,.08); }
.actions-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: flex-end; position: sticky; bottom: 0; background: var(--ft-bg); background: color-mix(in srgb, var(--ft-bg) 94%, transparent); padding: .8rem 0 calc(.8rem + env(safe-area-inset-bottom, 0px)); margin-top: 1rem; border-top: 1px solid var(--ft-border); }
.copy-row { display: flex; gap: .5rem; }
.copy-row input { flex: 1; font-size: .85rem; }
details.msg summary { cursor: pointer; }
.msg-body { white-space: pre-wrap; background: var(--ft-bg); padding: .8rem; border-radius: var(--ft-radius); margin-top: .5rem; font-weight: 400; }

/* =====================================================================
   PROFILO E VERIFICA IN DUE PASSAGGI
   ===================================================================== */
.sidebar-user-link { display: flex; align-items: center; gap: .7rem; min-width: 0; flex: 1; color: inherit; border-radius: var(--ft-radius); }
.sidebar-user-link:hover { color: inherit; }
.sidebar-user-link:hover strong { color: var(--ft-primary); }
.avatar-xl { width: 88px; height: 88px; font-size: 2rem; border: 3px solid var(--ft-surface); box-shadow: 0 0 0 1px var(--ft-border); }
.profile-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.profile-meta { display: flex; flex-direction: column; min-width: 0; gap: .1rem; }
.profile-meta strong { font-size: 1.15rem; color: var(--ft-ink); overflow-wrap: anywhere; }
.profile-meta span { overflow-wrap: anywhere; }
.avatar-form { display: inline-flex; gap: .5rem; align-items: center; margin: 0 .4rem .4rem 0; vertical-align: middle; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.btn-link { background: none; border: 0; padding: .3rem 0; color: var(--ft-primary); font: inherit; cursor: pointer; text-decoration: underline; }
.btn-danger { background: var(--ft-danger); color: #fff; }
.btn-danger:hover { filter: brightness(.9); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.btn-row form { margin: 0; }
.status-pill { font-size: .78rem; font-weight: 600; padding: .25rem .7rem; border-radius: 20px; }
.status-pill.on { background: #e8f5ef; color: #0b5c41; }
.status-pill.off { background: #f1f1ef; color: var(--ft-muted); }
.method-options { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.method { border: 1px solid var(--ft-border); border-radius: var(--ft-radius); padding: 1.1rem; margin: 0; }
.method h3 { font-size: 1rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.tag { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: var(--ft-sidebar-active); color: var(--ft-primary); border-radius: 20px; padding: .1rem .5rem; }
.setup-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.qr-box { width: 224px; height: 224px; padding: 12px; background: #fff; border: 1px solid var(--ft-border); border-radius: var(--ft-radius); margin: .5rem 0 1rem; }
.qr-box img, .qr-box canvas { display: block; width: 200px !important; height: 200px !important; }
.mono, .code-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .12em; }
.code-input { font-size: 1.35rem; text-align: center; max-width: 260px; }
.inline-code { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.inline-code .code-input { flex: 1 1 160px; }
.recovery-box { border: 2px dashed var(--ft-warning); background: #fdf8ec; border-radius: var(--ft-radius); padding: 1.1rem; margin-bottom: 1.2rem; }
.recovery-box h3 { font-size: 1.05rem; }
.recovery-codes { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1rem; }
.recovery-codes li { background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: 8px; padding: .45rem .6rem; text-align: center; }
.danger-zone { border-top: 1px solid var(--ft-border); padding-top: 1rem; margin-top: .5rem; }
@media (min-width: 600px) { .method-options { grid-template-columns: 1fr 1fr; } .recovery-codes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 900px) { .setup-grid { grid-template-columns: auto 1fr; gap: 2.5rem; } }
@media print { .sidebar, .topbar, .app-overlay, .btn-row, form, .card-title .status-pill { display: none !important; } .app-main { margin: 0 !important; } }

/* =====================================================================
   RICERCA E DETTAGLIO TITOLO
   ===================================================================== */
.topbar { flex-wrap: wrap; }
.topbar-search { position: relative; order: 3; flex: 1 1 100%; display: flex; align-items: center; margin-top: .1rem; }
.topbar-search > svg { position: absolute; left: .75rem; color: var(--ft-muted); pointer-events: none; }
.topbar-search input { padding-left: 2.3rem; min-height: 40px; border-radius: 30px; background: var(--ft-surface); }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 60; background: var(--ft-surface); border: 1px solid var(--ft-border); border-radius: var(--ft-radius); box-shadow: 0 12px 32px rgba(17,18,20,.14); max-height: min(70vh, 480px); overflow-y: auto; padding: .35rem; }
.sg-head { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ft-muted); padding: .55rem .6rem .3rem; }
.sg-item { display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem; border-radius: 8px; color: var(--ft-text); }
.sg-item:hover, .sg-item.focus { background: var(--ft-sidebar-active); color: var(--ft-ink); }
.sg-item .avatar { width: 30px; height: 30px; font-size: .85rem; }
.sg-main { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sg-main strong { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-main small { color: var(--ft-muted); font-size: .78rem; }
.sg-more { justify-content: center; font-weight: 600; color: var(--ft-primary); border-top: 1px solid var(--ft-border); border-radius: 0 0 8px 8px; margin-top: .3rem; }
.sg-empty { padding: .8rem .6rem; color: var(--ft-muted); font-size: .9rem; }
.sym { display: inline-block; flex: 0 0 auto; min-width: 64px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; font-weight: 700; background: var(--ft-ink); color: #fff; border-radius: 6px; padding: .2rem .45rem; text-align: center; }

.search-big { display: flex; gap: .5rem; flex-wrap: wrap; }
.search-big input { flex: 1 1 240px; }
.tabs { display: flex; gap: .3rem; margin: 1rem 0 .6rem; border-bottom: 1px solid var(--ft-border); overflow-x: auto; }
.tabs a { padding: .55rem .9rem; color: var(--ft-muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--ft-primary); border-color: var(--ft-primary); }
.result-list { list-style: none; margin: 0; padding: 0; }
.result-list li + li { border-top: 1px solid var(--ft-border); }
.result-list a, .res-user { display: flex; align-items: center; gap: .8rem; padding: .75rem .3rem; color: var(--ft-text); }
.result-list a:hover { background: var(--ft-bg); }
.res-main { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.res-main strong { color: var(--ft-ink); overflow-wrap: anywhere; }
.chev { font-size: 1.4rem; color: var(--ft-muted); }

.stock-head { display: flex; flex-direction: column; gap: 1rem; }
.stock-head h2 { font-size: clamp(1.3rem, 4vw, 1.8rem); margin: .3rem 0 .4rem; }
.stock-tags { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.market-state { font-size: .75rem; font-weight: 600; padding: .15rem .6rem; border-radius: 20px; background: #f1f1ef; color: var(--ft-muted); }
.market-state.open { background: #e8f5ef; color: #0b5c41; }
.stock-price .price { font-size: clamp(1.8rem, 6vw, 2.4rem); font-weight: 800; color: var(--ft-ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.stock-price .chg { font-weight: 700; font-variant-numeric: tabular-nums; margin: .2rem 0; }
.range-btns { display: flex; gap: 2px; background: var(--ft-bg); border: 1px solid var(--ft-border); border-radius: 30px; padding: 3px; overflow-x: auto; max-width: 100%; }
.range-btns button { border: 0; background: none; font: inherit; font-size: .82rem; font-weight: 600; color: var(--ft-muted); padding: .35rem .7rem; border-radius: 20px; cursor: pointer; min-height: 32px; white-space: nowrap; }
.range-btns button.active { background: var(--ft-surface); color: var(--ft-ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.chart-wrap { position: relative; }
.chart-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 1rem; background: rgba(255,255,255,.75); background: color-mix(in srgb, var(--ft-surface) 75%, transparent); color: var(--ft-muted); font-size: .92rem; }
.stats { display: grid; grid-template-columns: 1fr; margin: 0; }
.stats > div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--ft-border); }
.stats dt { color: var(--ft-muted); font-size: .9rem; }
.stats dd { margin: 0; font-weight: 600; color: var(--ft-ink); text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.desc { margin-top: 1rem; }
.desc summary { cursor: pointer; font-weight: 600; }
.desc p { margin-top: .6rem; font-size: .92rem; line-height: 1.6; }
.trade-cta { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (min-width: 600px) {
  .topbar { flex-wrap: nowrap; gap: 1rem; }
  .topbar-title { flex: 0 0 auto; max-width: 28%; }
  /* margini "auto" in flex annullano la crescita: la ricerca occupa tutto lo spazio libero */
  .topbar-search { order: 0; flex: 1 1 0; min-width: 0; width: auto; margin: 0; max-width: none; }
  .topbar-search input { width: 100%; }
  .topbar-search input { min-height: 44px; font-size: 1rem; }
  .stock-head { flex-direction: row; justify-content: space-between; align-items: flex-end; }
  .stock-price { text-align: right; }
}

/* =====================================================================
   ADMIN SORGENTI DATI
   ===================================================================== */
.nowrap { white-space: nowrap; }
.table-inputs td { vertical-align: middle; }
.input-sm { min-height: 36px !important; padding: .35em .5em !important; width: 92px !important; font-size: .9rem; }
.select-sm { min-height: 36px; padding: .3em .5em; font-size: .88rem; min-width: 150px; }
.input-sm:disabled { opacity: .35; }
.usage-bar { height: 4px; background: var(--ft-border); border-radius: 4px; margin-top: .3rem; overflow: hidden; min-width: 70px; }
.usage-bar i { display: block; height: 100%; background: var(--ft-primary); }
.test-form { display: flex; gap: .4rem; align-items: center; margin: 0; }
.test-form select { min-height: 36px; padding: .3em .5em; font-size: .85rem; width: auto; }
.select-row { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.select-row select { width: auto; flex: 1 1 140px; }
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.src-line { margin-top: .15rem; }

/* =====================================================================
   TITOLI SEGUITI
   ===================================================================== */
.follow-form { margin: 0 0 .6rem; display: flex; }
.btn-following { background: var(--ft-sidebar-active); color: var(--ft-primary); border-color: transparent; }
.btn-following span[aria-hidden] { color: var(--ft-primary); }
.btn-following .lbl-off { display: none; }
.btn-following:hover { background: var(--ft-surface); border-color: var(--ft-danger); color: var(--ft-danger); }
.btn-following:hover .lbl-on { display: none; }
.btn-following:hover .lbl-off { display: inline; }
.empty-state { text-align: center; padding: 1.2rem .5rem; }
.watchlist { list-style: none; margin: 0 0 .6rem; padding: 0; }
.wl-row { display: flex; align-items: center; gap: .3rem; border-bottom: 1px solid var(--ft-border); }
.wl-row:last-child { border-bottom: 0; }
.wl-link { flex: 1; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "sym name price" "sym name chg"; column-gap: .75rem; align-items: center; padding: .7rem .3rem; color: var(--ft-text); border-radius: 8px; }
.wl-link:hover { background: var(--ft-bg); color: var(--ft-text); }
.wl-link .sym { grid-area: sym; }
.wl-name { grid-area: name; display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.wl-name strong { color: var(--ft-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-name small { font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-price { grid-area: price; font-weight: 700; color: var(--ft-ink); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wl-chg { grid-area: chg; font-size: .85rem; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wl-remove { margin: 0; }
.wl-remove .icon-btn:hover { color: var(--ft-danger); }
@media (min-width: 600px) {
  .wl-link { grid-template-columns: auto minmax(0, 1fr) 130px 90px; grid-template-areas: "sym name price chg"; }
  .wl-chg { font-size: .95rem; }
}

/* =====================================================================
   TRADING SIMULATO
   ===================================================================== */
.btn-xs { padding: .28em .7em; min-height: 30px; font-size: .78rem; border-radius: 20px; }
.title-row { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .7rem; margin: .3rem 0 .4rem; }
.title-row h2 { margin: 0; }
.title-row .follow-form { margin: 0; }
.trade-btns { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.trade-btns .btn { flex: 1 1 140px; }
.pos-pl { display: flex; align-items: baseline; flex-wrap: wrap; gap: .3rem .6rem; margin-bottom: .6rem; }
.pos-pl strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.pos-pl span { font-weight: 700; }
.sub-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ft-muted); margin: 1.2rem 0 .4rem; }
.tx-list { list-style: none; padding: 0; margin: 0 0 .8rem; }
.tx-list li { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-bottom: 1px solid var(--ft-border); }
.tx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .9rem; font-variant-numeric: tabular-nums; }
.tx-main small { font-size: .75rem; }
.tx-amt { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; font-size: .9rem; }
.tx-amt small { font-size: .78rem; }
.tx-side { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .2rem .5rem; border-radius: 6px; white-space: nowrap; }
.tx-side.buy { background: #e8f5ef; color: #0b5c41; }
.tx-side.sell { background: #fdecec; color: #8f0d12; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.pos-name { display: flex; align-items: center; gap: .5rem; color: var(--ft-ink); min-width: 180px; }
.pos-name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.pos-table small { font-weight: 600; }
.liq-note { background: var(--ft-bg); border-radius: var(--ft-radius); padding: .6rem .8rem; margin: .8rem 0 0; }
.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1rem 0; flex-wrap: wrap; }

.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(17,18,20,.5); }
.modal-box { position: relative; width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto; background: var(--ft-surface); border-radius: 16px 16px 0 0; padding: 1.4rem 1.2rem calc(1.2rem + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -8px 40px rgba(0,0,0,.25); }
.modal-box h3 { margin: 0; font-size: 1.3rem; }
.modal-close { position: absolute; top: .6rem; right: .6rem; width: 40px; height: 40px; border: 0; background: none; font-size: 1.8rem; line-height: 1; color: var(--ft-muted); cursor: pointer; }
body.modal-open { overflow: hidden; }
.trade-info { margin-bottom: 1rem; }
.trade-info > div { padding: .4rem 0; }
.qty-row { display: flex; gap: .5rem; }
.qty-row input { flex: 1; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.trade-est { display: flex; justify-content: space-between; align-items: baseline; background: var(--ft-bg); border-radius: var(--ft-radius); padding: .8rem 1rem; margin: .4rem 0 .6rem; }
.trade-est strong { font-size: 1.35rem; color: var(--ft-ink); font-variant-numeric: tabular-nums; }
.modal-actions { justify-content: flex-end; margin-top: 1rem; }
.modal-actions .btn { flex: 1 1 auto; }
@media (min-width: 600px) {
  .modal { align-items: center; padding: 1rem; }
  .modal-box { border-radius: 16px; padding: 1.8rem; }
  .trade-btns { justify-content: flex-end; }
  .trade-btns .btn { flex: 0 0 auto; }
}

/* =====================================================================
   UTENTI (ADMIN), IMPERSONAZIONE, PORTAFOGLIO
   ===================================================================== */
.impersonation-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; background: #fdf1c7; border-bottom: 1px solid #ecd27a; color: #5c4608; padding: .6rem 1rem; font-size: .9rem; }
.impersonation-bar form { margin: 0; }
.sidebar-user-link.active strong { color: var(--ft-primary); }
.status-pill.susp { background: #fdecec; color: #8f0d12; }
.row-muted td { opacity: .6; }
.user-cell { display: flex; align-items: center; gap: .7rem; min-width: 220px; }
.user-cell .avatar { width: 36px; height: 36px; font-size: .9rem; }
.user-actions { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; min-width: 190px; }
.pl-badge { display: inline-block; font-weight: 700; padding: .2rem .55rem; border-radius: 6px; font-variant-numeric: tabular-nums; }
.pl-badge.up { background: #e8f5ef; color: #0b5c41; }
.pl-badge.down { background: #fdecec; color: #8f0d12; }
.table tfoot th { border-top: 2px solid var(--ft-border); border-bottom: 0; color: var(--ft-ink); font-size: .9rem; text-transform: none; letter-spacing: 0; }
.pf-table td { vertical-align: middle; }

/* =====================================================================
   SEZIONI, TREEMAP, NOTA CAMBIO
   ===================================================================== */
.sidebar-nav a.sub { padding: .45rem .75rem .45rem 2.1rem; font-size: .9rem; }
.sidebar-nav a.sub svg { width: 16px; height: 16px; }
.class-tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 20px; color: #fff; background: var(--c, #1f4e8c); }
.class-tag:hover { color: #fff; filter: brightness(1.1); }
.section-head { border-top: 4px solid var(--c, var(--ft-primary)); }
.section-head h2 { margin-bottom: .2rem; }
.admin-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; background: #fdf8ec; border: 1px dashed var(--ft-warning); border-radius: var(--ft-radius); padding: .5rem .8rem; margin-top: 1rem; }
.admin-strip select { width: auto; }
.admin-add { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px dashed var(--ft-border); display: flex; flex-direction: column; gap: .5rem; }
.fx-note { margin-top: 1rem; padding: .8rem 1rem; border-left: 4px solid var(--ft-warning); background: #fdf8ec; border-radius: 0 var(--ft-radius) var(--ft-radius) 0; line-height: 1.5; }
.tree-legend { list-style: none; margin: .8rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .85rem; }
.tree-legend li { display: flex; align-items: center; gap: .35rem; }
.tree-legend li.empty { opacity: .45; }
.tree-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.tree-legend strong { font-variant-numeric: tabular-nums; }

/* =====================================================================
   MAPPA DEI MERCATI
   ===================================================================== */
.map-wrap { position: relative; }
.map-box { width: 100%; height: 280px; }
.map-legend { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .8rem; color: var(--ft-muted); }
.map-legend li { display: flex; align-items: center; gap: .35rem; }
.map-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid rgba(0,0,0,.06); }
.index-chips { list-style: none; margin: .8rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.index-chips .chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; padding: .25rem .55rem; border-radius: 20px; background: var(--ft-bg); color: var(--ft-text); border: 1px solid var(--ft-border); white-space: nowrap; }
.index-chips .chip b { font-variant-numeric: tabular-nums; }
.index-chips .chip.up b { color: var(--ft-success); }
.index-chips .chip.down b { color: var(--ft-danger); }
.index-chips .chip.closed b, .index-chips .chip.nodata b { color: var(--ft-muted); font-weight: 600; }
.index-chips .chip:hover { border-color: var(--ft-ink); }
.input-md { width: 150px !important; }
.idx-table input[type=time] { width: 110px !important; }
@media (min-width: 600px) { .map-box { height: 340px; } }
@media (min-width: 1200px) { .map-box { height: 380px; } }

/* =====================================================================
   TABELLE ORDINABILI, PAGINE GRAFICO ESTESE
   ===================================================================== */
table.js-sort th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
table.js-sort th[data-sort]:hover { color: var(--ft-ink); }
table.js-sort th[data-sort]::after { content: '↕'; margin-left: .3rem; opacity: .35; font-size: .8em; }
table.js-sort th[aria-sort="ascending"]::after { content: '▲'; opacity: .9; color: var(--ft-primary); }
table.js-sort th[aria-sort="descending"]::after { content: '▼'; opacity: .9; color: var(--ft-primary); }
.expand-link { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 600; color: var(--ft-muted); }
.expand-link:hover { color: var(--ft-primary); }
.card-title .title-right { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.chart-xl { width: 100%; height: 62vh; min-height: 340px; max-height: 720px; }
.range-bar { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.class-bar { display: flex; height: 14px; border-radius: 8px; overflow: hidden; background: var(--ft-border); margin: .4rem 0 .2rem; }
.class-bar span { display: block; height: 100%; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .4rem; vertical-align: middle; }

.btn-expand { background: var(--ft-ink); color: #fff; border-color: var(--ft-ink); gap: .35rem; padding: .4em .85em; min-height: 34px; font-size: .82rem; }
.btn-expand:hover { background: var(--ft-primary); border-color: var(--ft-primary); color: #fff; }
.btn-expand svg { flex: 0 0 auto; }
.ev-dot { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: .62rem; font-weight: 700; margin-right: .2rem; }
.ev-dot.buy { background: var(--ft-success); }
.ev-dot.sell { background: var(--ft-danger); }

/* =====================================================================
   CLASSIFICA, INDICI
   ===================================================================== */
.leaderboard { list-style: none; margin: 0 0 .6rem; padding: 0; }
.leaderboard li { display: flex; align-items: center; gap: .6rem; padding: .5rem .4rem; border-bottom: 1px solid var(--ft-border); border-radius: 6px; }
.leaderboard li.me { background: var(--ft-sidebar-active); }
.leaderboard .avatar { width: 30px; height: 30px; font-size: .8rem; }
.lb-rank { flex: 0 0 26px; text-align: center; font-weight: 700; color: var(--ft-muted); font-size: .95rem; }
.lb-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--ft-ink); font-size: .92rem; }
.lb-name small { color: var(--ft-muted); font-weight: 400; }
.lb-gain { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .9rem; display: flex; flex-direction: column; line-height: 1.2; }
.lb-gain small { font-size: .72rem; font-weight: 600; }
.lb-me { font-size: .88rem; background: var(--ft-bg); border-radius: var(--ft-radius); padding: .5rem .7rem; margin-bottom: .5rem; }
.flag { font-size: 1.1rem; }

.mail-preview { width: 100%; height: 640px; border: 1px solid var(--ft-border); border-radius: var(--ft-radius); background: #f3f2ee; }
.send-bar { height: 8px; margin: .8rem 0 .4rem; }

.input-days { width: 80px !important; }
.flag-cell { width: 44px; text-align: center; font-size: 1.4rem; line-height: 1; }
.idx-list tr[hidden] { display: none; }

.flag-img { display: inline-block; vertical-align: middle; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.idx-admin tr.group-start td { border-top: 2px solid var(--ft-border); }
.idx-admin tr.is-main { background: #f7fbf9; }
.main-radio { display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; font-weight: 400; margin: 0; }
.main-radio input:checked + .main-lbl::after { content: 'principale'; font-size: .72rem; font-weight: 700; color: var(--ft-success); }

/* =====================================================================
   BREAKPOINT
   ===================================================================== */
@media (min-width: 600px) {
  .form-row { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 2.2rem 2rem; }
  .features { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: repeat(4, 1fr); }
  .cta-band { flex-direction: row; align-items: center; justify-content: space-between; padding: 2.5rem; }
  .pub-footer-inner { flex-direction: row; justify-content: space-between; }
  .app-content { padding: 1.5rem; }
}
@media (min-width: 900px) {
  .pub-nav { display: flex; align-items: center; gap: 1.6rem; position: static; }
  .pub-nav a.btn { margin-top: 0; }
  .pub-header .nav-toggle { display: none; }
  .hero { padding: 4.5rem 0 3rem; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 3.5rem; }
  .chart-box { height: 340px; }
  .features { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .about-grid { grid-template-columns: 1.1fr 1fr; gap: 3.5rem; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3-1 { grid-template-columns: 2fr 1fr; }
}
@media (min-width: 1024px) {
  .sidebar { transform: none; width: var(--ft-sidebar-width, 260px); }
  .app-overlay, .sidebar-close, .topbar .nav-toggle { display: none; }
  body.sidebar-open { overflow: auto; }
  .app-main { margin-left: var(--ft-sidebar-width, 260px); }
  .app-content { padding: 2rem; }
  .topbar { padding-left: 2rem; padding-right: 2rem; }
}
