/* =============================== BASE =============================== */
body:not(.login) { 
  background: #0b0d12 !important; 
  color: #ffffff; 
  margin: 0; 
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

/* =============================== TYPOGRAPHY SCALE =============================== */
:root{
  --abet-text: 14px;
  --abet-small: 12px;
  --abet-label: 13px;
  --abet-title: 24px;
  --abet-section-title: 18px;
  --abet-kpi-value: 26px;
  --abet-button: 14px;
}

/* =============================== WRAPPER ESTERNO =============================== */
.abet-app-wrap{
  background: radial-gradient(circle at top, #151923 0%, #0b0d12 60%);
  min-height: 100vh;
  padding: 40px 20px;
}

/* =============================== DASHBOARD CONTAINER =============================== */
.abet-dash{
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 36px;
  border-radius: 28px;
  background: linear-gradient(180deg, #111520, #0b0d12);
  box-shadow: 0 50px 140px rgba(0,0,0,.85), inset 0 0 0 1px rgba(230,255,75,.15);
}

/* =============================== HEADER =============================== */
.abet-header{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 44px;
}

.abet-brand{
  font-size: var(--abet-title);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .2px;
}

.abet-brand span{
  color: #e6ff4b;
}

.abet-sub{
  margin-top: 6px;
  font-size: var(--abet-label);
  line-height: 1.4;
  opacity: .75;
}

.abet-role{
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: var(--abet-small);
  line-height: 1.2;
  background: #1a1f2b;
  color: #e6ff4b;
  border: 1px solid rgba(230,255,75,.6);
}

/* =============================== NAVIGATION =============================== */
.abet-nav{
  display: flex;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.abet-nav button{
  padding: 12px 22px;
  border-radius: 14px;
  border: 1px solid #222;
  background: #1a1f2b;
  color: #fff;
  font-weight: 700;
  font-size: var(--abet-label);
  line-height: 1.2;
  cursor: pointer;
  transition: .2s ease;
}

.abet-nav button:hover{
  transform: translateY(-2px);
  background: #202635;
}

.abet-nav button.active{
  background: #e6ff4b;
  color: #000;
  border: 0;
}

/* =============================== TAB VISIBILITY =============================== */
.abet-section{
  display: none;
}
.abet-section.active{
  display: block;
}

/* =============================== KPI =============================== */
.abet-kpi{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-bottom: 52px;
}

.abet-kpi-card{
  background: linear-gradient(180deg, #161b28, #0f131d);
  border-radius: 22px;
  padding: 26px;
  text-align: center;
  border: 1px solid rgba(230,255,75,.6);
  transition: .2s ease;
}

.abet-kpi-card:hover{
  transform: translateY(-4px);
}

.abet-kpi-card .icon{
  font-size: 20px;
  margin-bottom: 8px;
}

.abet-kpi-card .value{
  font-size: var(--abet-kpi-value);
  font-weight: 800;
  line-height: 1.15;
  color: #e6ff4b;
}

.abet-kpi-card .label{
  font-size: var(--abet-label);
  line-height: 1.35;
  opacity: .85;
}

/* =============================== BOX SECTIONS =============================== */
.abet-box{
  background: linear-gradient(180deg, #151923, #0f131d);
  border-radius: 24px;
  padding: 28px;
  margin-bottom: 44px;
  border: 1px solid rgba(255,255,255,.05);
}

.abet-box h3{
  margin: 0 0 16px;
  font-size: var(--abet-section-title);
  font-weight: 800;
  line-height: 1.25;
  color: #e6ff4b !important;
}

.abet-box p,
.abet-box li,
.abet-box span,
.abet-box div,
.abet-box label{
  font-size: var(--abet-text);
  line-height: 1.5;
}

/* =============================== REF LINK =============================== */
.abet-ref{
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #2a2f3c;
  background: #0b0d12;
  color: #e6ff4b;
  font-weight: 600;
  font-size: var(--abet-text);
  line-height: 1.4;
}

.abet-help{
  margin-top: 8px;
  font-size: var(--abet-small);
  line-height: 1.4;
  opacity: .65;
}

/* =============================== TABELLE =============================== */
table{
  width: 100%;
  border-collapse: collapse;
}

table th{
  font-size: var(--abet-label);
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
}

table td{
  font-size: var(--abet-text);
  font-weight: 400;
  line-height: 1.45;
}

table th,
table td{
  padding: 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

/* =============================== FORM GLOBAL =============================== */
input,
select,
textarea,
button{
  font-family: inherit;
}

input,
select,
textarea{
  font-size: var(--abet-text);
  line-height: 1.4;
}

label{
  font-size: var(--abet-label);
  font-weight: 700;
  line-height: 1.3;
}

/* =============================== LICENZE GRID =============================== */
.abet-licenses-grid{
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.abet-license-card{
  width: 220px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.abet-license-card img{
  width: 100%;
  border-radius: 18px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}

.abet-license-title{
  margin-top: 4px;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.abet-license-price{
  margin-bottom: 14px;
  font-size: var(--abet-text);
  font-weight: 600;
  line-height: 1.25;
}

.abet-buy{
  padding: 10px 20px;
  border-radius: 14px;
  border: 0;
  background: #e6ff4b;
  color: #000;
  font-weight: 800;
  font-size: var(--abet-button);
  line-height: 1.2;
  cursor: pointer;
  transition: .2s ease;
  text-decoration: none;
}

.abet-buy:hover{
  transform: translateY(-2px);
}

/* =============================== SISTEMA PROGRESSIVO =============================== */
.abet-progressivo{
  margin-top: 20px;
}

.abet-progressivo input{
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  background: #000;
  color: #fff;
  border: 1px solid #333;
  border-radius: 10px;
  font-size: var(--abet-text);
  line-height: 1.4;
}

.abet-progressivo button{
  padding: 10px 18px;
  border-radius: 10px;
  border: 0;
  background: #e6ff4b;
  color: #000;
  font-weight: 800;
  font-size: var(--abet-button);
  line-height: 1.2;
  cursor: pointer;
}

/* =============================== FOOTER =============================== */
.abet-footer{
  margin-top: 60px;
  padding: 45px 20px;
  background: linear-gradient(180deg, #0f131d, #0b0d12);
  border-top: 1px solid rgba(230,255,75,.20);
}

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

.abet-footer-logo{
  text-align: center;
}

.abet-footer-logo img{
  width: 120px;
  max-width: 60%;
  height: auto;
  display: block;
  margin: 0 auto 20px auto;
}

.abet-footer-company{
  font-size: var(--abet-text);
  line-height: 1.7;
  opacity: .85;
  margin-bottom: 18px;
}

.abet-footer-disclaimer a{
  display: inline-block;
  padding: 12px 22px;
  border-radius: 14px;
  background: #e6ff4b;
  color: #000;
  font-weight: 800;
  font-size: var(--abet-label);
  line-height: 1.2;
  text-decoration: none;
  transition: .2s ease;
}

.abet-footer-disclaimer a:hover{
  transform: translateY(-2px);
  filter: brightness(.95);
}

/* =============================== PURCHASE PAGE =============================== */
.abet-purchase-product{
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.abet-purchase-img{
  width: 120px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  border: 1px solid rgba(230,255,75,.35);
}

.abet-purchase-title{
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.abet-purchase-price{
  margin-top: 6px;
  color: #e6ff4b;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.25;
}

.abet-purchase-small{
  margin-top: 8px;
  opacity: .8;
  font-size: var(--abet-label);
  line-height: 1.4;
}

.abet-pay-tabs{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0 18px;
}

.abet-pay-tab{
  padding: 10px 16px;
  border-radius: 14px;
  border: 0;
  background: #1a1f2b;
  color: #fff;
  font-weight: 700;
  font-size: var(--abet-label);
  line-height: 1.2;
  cursor: pointer;
}

.abet-pay-tab.active{
  background: #e6ff4b;
  color: #000;
}

.abet-pay-panel{
  display: none;
}
.abet-pay-panel.active{
  display: block;
}

.abet-field{
  margin: 14px 0;
}

.abet-field label{
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: var(--abet-label);
  line-height: 1.3;
  opacity: .9;
}

.abet-field input,
.abet-field textarea{
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #2a2f3c;
  background: #0b0d12;
  color: #fff;
  font-size: var(--abet-text);
  line-height: 1.4;
}

.abet-hint{
  font-size: var(--abet-small);
  line-height: 1.4;
  opacity: .75;
  margin-top: 6px;
}

.abet-alert{
  padding: 12px 14px;
  border-radius: 14px;
  margin: 0 0 18px;
  font-weight: 700;
  font-size: var(--abet-label);
  line-height: 1.35;
}

.abet-alert-ok{
  background: rgba(0,200,120,.12);
  border: 1px solid rgba(0,200,120,.35);
}

.abet-alert-error{
  background: rgba(255,80,80,.12);
  border: 1px solid rgba(255,80,80,.35);
}

/* =============================== RESPONSIVE =============================== */
@media(max-width:1024px){
  .abet-kpi{
    grid-template-columns: repeat(2,1fr);
  }
}

@media(max-width:600px){
  .abet-kpi{
    grid-template-columns: 1fr;
  }

  .abet-header{
    flex-direction: column;
    gap: 20px;
  }

  .abet-nav{
    flex-wrap: wrap;
  }

  .abet-dash{
    padding: 32px 20px;
  }

  .abet-brand{
    font-size: 22px;
  }

  .abet-box h3{
    font-size: 17px;
  }

  .abet-kpi-card .value{
    font-size: 24px;
  }

  table th,
  table td{
    padding: 12px 8px;
    font-size: 13px;
  }
}

/* ===============================
   PREMIUM / FINTECH MODERN UPGRADE
   mantiene tutta la logica attuale
=============================== */
:root{
  --abet-text: 16px;
  --abet-small: 13px;
  --abet-label: 15px;
  --abet-title: 42px;
  --abet-section-title: 28px;
  --abet-kpi-value: 44px;
  --abet-button: 16px;
}

.abet-app-wrap{
  padding: 70px 40px 100px;
}

.abet-dash{
  max-width: 1850px;
  width: 96%;
  margin: 0 auto;
  padding: 56px 48px;
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, rgba(230,255,75,.10), transparent 24%),
    linear-gradient(180deg, #101521 0%, #0a0f18 100%);
  box-shadow:
    0 55px 160px rgba(0,0,0,.88),
    inset 0 0 0 1px rgba(230,255,75,.16),
    inset 0 1px 0 rgba(255,255,255,.03);
}

.abet-header{
  gap: 32px;
  margin-bottom: 50px;
}

.abet-brand{
  font-size: var(--abet-title);
  letter-spacing: -.02em;
}

.abet-sub{
  font-size: 17px;
  opacity: .82;
}

.abet-logout a,
.abet-buy,
.abet-copy-btn,
.abet-nav button{
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, filter .18s ease;
}

.abet-nav{
  gap: 18px;
  margin-bottom: 54px;
}

.abet-nav button{
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 16px;
  background: linear-gradient(180deg, #1b2230 0%, #151b27 100%);
  border: 1px solid rgba(255,255,255,.05);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.abet-nav button:hover{
  background: linear-gradient(180deg, #232c3d 0%, #1a2232 100%);
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
}

.abet-nav button.active{
  background: linear-gradient(180deg, #edff69 0%, #dff54b 100%);
  box-shadow: 0 14px 36px rgba(230,255,75,.24);
}

.abet-kpi{
  gap: 24px;
  margin-bottom: 58px;
}

.abet-kpi-card{
  padding: 32px 26px;
  min-height: 142px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top center, rgba(230,255,75,.08), transparent 55%),
    linear-gradient(180deg, #151d2b 0%, #0e1420 100%);
  border: 1px solid rgba(230,255,75,.42);
  box-shadow:
    0 18px 44px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.03);
}

.abet-kpi-card:hover{
  transform: translateY(-6px);
  box-shadow:
    0 22px 54px rgba(0,0,0,.34),
    0 0 0 1px rgba(230,255,75,.20);
}

.abet-kpi-card .value{
  font-size: var(--abet-kpi-value);
  letter-spacing: -.03em;
}

.abet-kpi-card .label{
  margin-top: 8px;
  font-size: 16px;
}

.abet-box{
  padding: 34px;
  margin-bottom: 48px;
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(230,255,75,.05), transparent 28%),
    linear-gradient(180deg, #131a27 0%, #0d1320 100%);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow:
    0 18px 50px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.02);
}

.abet-box h3{
  margin-bottom: 18px;
  letter-spacing: -.02em;
}

.abet-ref{
  min-height: 58px;
  padding: 16px 18px;
  border-radius: 16px;
  font-weight: 700;
}

.abet-copy-btn,
.abet-buy,
.abet-logout a{
  min-height: 52px;
  padding: 14px 22px;
  border-radius: 16px;
  font-size: var(--abet-button);
  box-shadow: 0 12px 30px rgba(230,255,75,.16);
}

.abet-copy-btn:hover,
.abet-buy:hover,
.abet-logout a:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(230,255,75,.24);
}

/* livelli sblocco: stessa riga e più premium */
.abet-levels-grid{
  display: grid !important;
  grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  gap: 14px !important;
  margin-top: 18px !important;
}

.abet-levels-grid > div{
  min-height: 188px;
  padding: 16px 14px !important;
  border-radius: 18px !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 12px 28px rgba(0,0,0,.16);
}

.abet-levels-grid > div > div:first-child{
  font-size: 24px !important;
  line-height: 1.1 !important;
  letter-spacing: -.02em;
}

.abet-levels-grid > div > div:nth-child(2){
  font-size: 30px !important;
  line-height: 1.05 !important;
  margin-top: 10px !important;
}

.abet-levels-grid > div > div:nth-child(3){
  font-size: 15px !important;
  line-height: 1.55 !important;
  margin-top: 10px !important;
  opacity: .88 !important;
}

.abet-levels-grid > div > div:nth-child(4){
  font-size: 15px !important;
  margin-top: 12px !important;
}

/* rete e details più SaaS */
.abet-box details{
  border-radius: 18px !important;
  padding: 16px 18px !important;
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.015)) !important;
}

.abet-box summary{
  font-size: 22px !important;
}

/* cards prodotti un po' più premium */
.abet-license-card{
  width: 240px;
}

.abet-license-card img{
  border-radius: 20px;
  box-shadow: 0 18px 42px rgba(0,0,0,.45);
}

.abet-license-title{
  font-size: 18px;
}

.abet-license-price{
  font-size: 16px;
}

/* tabelle più leggibili */
table th,
table td{
  padding: 16px 12px;
}

/* responsive elegante */
@media (max-width: 1520px){
  .abet-dash{ max-width: 1540px; width: 97%; }
  .abet-levels-grid{ grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

@media (max-width: 1100px){
  :root{
    --abet-title: 34px;
    --abet-section-title: 24px;
    --abet-kpi-value: 36px;
  }
  .abet-dash{ padding: 40px 28px; }
  .abet-kpi{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px){
  :root{
    --abet-text: 14px;
    --abet-label: 13px;
    --abet-title: 28px;
    --abet-section-title: 20px;
    --abet-kpi-value: 30px;
    --abet-button: 14px;
  }
  .abet-app-wrap{ padding: 28px 14px 60px; }
  .abet-dash{ padding: 28px 18px; border-radius: 24px; }
  .abet-header{ flex-direction: column; margin-bottom: 32px; }
  .abet-nav{ gap: 12px; margin-bottom: 34px; }
  .abet-nav button{ width: 100%; justify-content: center; }
  .abet-kpi{ grid-template-columns: 1fr; gap: 16px; }
  .abet-box{ padding: 22px; border-radius: 20px; }
  .abet-levels-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 520px){
  .abet-levels-grid{ grid-template-columns: 1fr !important; }
  .abet-copy-btn,
  .abet-buy,
  .abet-logout a{ width: 100%; justify-content: center; text-align:center; }
}
