:root{
  --green: #7aa987;
  --dark: #0f1724;
  --muted: #6b7280;
  --bg: #f7fafb;
  --card-bg: #ffffff;
  --radius: 14px;
  --max-width: 1200px;
  --container-padding: 24px;
  --text: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--text);
  background:var(--bg);
  color:var(--dark);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* utility container */
.container{
  width:100%;
  max-width:var(--max-width);
  margin:0 auto;
  padding:0 var(--container-padding);
}

/* HEADER */
.site-header{
  position:sticky;
  top:0;
  z-index:40;
  background:rgba(255,255,255,0.7);
  backdrop-filter: blur(6px);
  border-bottom:1px solid rgba(15,23,36,0.04);
}
.header-inner{
  display:flex;
  align-items:center;
  gap:16px;
  height:76px;
}
.logo{
  font-weight:700;
  color:var(--green);
  font-size:20px;
  letter-spacing:0.2px;
}

.main-nav{
  margin-left:18px;
  display:flex;
  gap:18px;
  align-items:center;
}
.main-nav a{
  text-decoration:none;
  color:var(--dark);
  font-weight:500;
  opacity:0.85;
}
.header-actions{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:12px;
}
.search input{
  width:320px;
  max-width:42vw;
  height:38px;
  border-radius:22px;
  border:1px solid rgba(15,23,36,0.08);
  padding:0 14px;
  outline:none;
  font-size:14px;
  background:white;
}
.link-login{
  text-decoration:none;
  color:var(--dark);
  margin-right:6px;
}
.btn-register{
  display:inline-block;
  padding:8px 14px;
  background:var(--green);
  color:#fff;
  border-radius:22px;
  text-decoration:none;
  font-weight:600;
  box-shadow: 0 6px 18px rgba(122,169,135,0.18);
}
.mobile-toggle{
  display:none;
  border:0;
  background:transparent;
  font-size:20px;
}

/* HERO */
.hero{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:520px;
  overflow:hidden;
}
.hero-bg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  transform:scale(1.06);
  filter: blur(4px) brightness(0.7) saturate(0.95);
  -webkit-filter: blur(4px) brightness(0.7) saturate(0.95);
}

.hero-overlay{
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.06));
  pointer-events:none;
}

.hero-content{
  position:relative;
  text-align:center;
  padding:40px 20px;
  color:white;
  max-width:900px;
}
.hero-title{
  margin:0;
  font-size:clamp(36px,6vw,64px);
  line-height:1.02;
  color:#0b1620;
  font-weight:800;
  text-shadow: 0 8px 28px rgba(15,23,36,0.08);
}
.hero-sub{
  color:#334155;
  margin-top:14px;
  font-size:18px;
  font-weight:500;
}

/* CTA */
.cta-btn{
  display:inline-block;
  margin-top:26px;
  padding:14px 28px;
  border-radius:999px;
  background:var(--green);
  color:#fff;
  text-decoration:none;
  font-weight:700;
  box-shadow: 0 8px 30px rgba(122,169,135,0.18);
}

/* POPULAR SECTION */
.popular{
  margin-top:48px;
  margin-bottom:40px;
}
.section-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  margin-bottom:18px;
}
.section-header h2{
  margin:0;
  font-size:28px;
}
.section-header .muted{
  margin:6px 0 0 0;
  color:var(--muted);
}
.see-all{
  color:var(--green);
  text-decoration:none;
  font-weight:600;
}

/* cards grid */
.cards-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:18px;
}
.card{
  background:var(--card-bg);
  border-radius:16px;
  overflow:hidden;
  box-shadow: 0 10px 30px rgba(15,23,36,0.05);
  transition:transform .22s ease, box-shadow .22s ease;
  position:relative;
}
.card img{
  width:100%;
  height:210px;
  object-fit:cover;
  display:block;
}
.card-body{
  padding:14px 16px;
}
.card h3{
  margin:0;
  font-size:16px;
}
.card p{
  margin:8px 0 0 0;
  color:var(--muted);
  font-size:13px;
}

/* footer */
.site-footer{
  margin-top:48px;
  padding:20px 0;
  background:#fff;
  border-top:1px solid rgba(15,23,36,0.04);
}
.site-footer .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
}

/* FEATURES SECTION */
.features{
  background:#f3f5f6;
  padding:70px 0;
  margin-top:40px;
}
.features-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:40px;
  text-align:center;
}
.feature h3{
  margin-top:14px;
  margin-bottom:6px;
  font-size:20px;
}
.feature p{
  color:#6b7280;
  max-width:260px;
  margin:auto;
  font-size:14px;
}
.icon-circle{
  width:70px;
  height:70px;
  margin:auto;
  border-radius:50%;
  background:#a9cbb7;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:26px;
  color:white;
}

/* LARGE FOOTER */
.footer-large{
  background:#f3f5f6;
  border-top:1px solid #e5e7eb;
}
.footer-columns{
  padding:60px 0 40px 0;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:60px;
}
.footer-col h4{
  margin-bottom:14px;
  font-size:18px;
}
.footer-col a{
  display:block;
  text-decoration:none;
  color:#6b7280;
  margin-bottom:10px;
  font-size:14px;
}
.footer-col a:hover{
  color:#111827;
}

/* bottom footer */
.footer-bottom{
  border-top:1px solid #e5e7eb;
  padding:18px 0;
}
.footer-bottom-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.copyright{
  color:#6b7280;
  font-size:14px;
}
.socials{
  display:flex;
  gap:18px;
  color:#9ca3af;
  font-size:18px;
}

/* Auth pages */
.auth-container {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.auth-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}
.auth-card h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
}
.form-group {
    margin-bottom: 20px;
    position:relative;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}
.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    box-sizing: border-box;
}
.form-group input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(122,169,135,0.1);
}
.auth-link {
    text-align: center;
    margin-top: 20px;
    color: #6b7280;
}
.auth-link a {
    color: var(--green);
    text-decoration: none;
    font-weight: 500;
}

/* Password wrapper */
.password-wrapper {
    position: relative;
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    color: #9ca3af;
    z-index: 10;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: var(--green);
}

/* Nasconde l'occhio del browser */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear,
input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-contacts-auto-fill-button,
input[type="password"]::-webkit-credit-card-auto-fill-button,
input[type="password"]::-webkit-strong-password-auto-fill-button {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    right: 0 !important;
}

/* Upload page */
.upload-container {
    min-height: 70vh;
    padding: 40px 20px;
    background: #f9fafb;
}
.upload-card {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
}
.upload-card h1 {
    margin-bottom: 8px;
    font-size: 32px;
}
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
}
.form-group.half {
    flex: 1;
}
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
input[type="file"] {
    padding: 10px 0;
    border: none;
}
small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
}

/* Star rating system */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
.star-rating input {
    display: none;
}
.star-rating label {
    font-size: 30px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
    pointer-events: auto;
    display: inline-block;
    -webkit-tap-highlight-color: transparent;
}
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #fbbf24;
}
.star-rating * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Disabilita selezione testo su etichette e testi non interattivi */
label, .muted, .logo, .main-nav a:not(.btn-register):not(.link-login) {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Mantieni selezionabile il testo negli input */
input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="search"],
input[type="number"],
textarea {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    box-sizing: border-box;
}

/* Per i pulsanti, niente selezione */
button, .btn-register, .link-login, .tab-btn {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Stile per il badge boost */
.boost-badge-card {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(251, 191, 36, 0.95);
    color: #92400e;
    border-radius: 50px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(251, 191, 36, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: subtle-pulse 2s infinite;
}

@keyframes subtle-pulse {
    0% { box-shadow: 0 4px 10px rgba(251, 191, 36, 0.3); }
    50% { box-shadow: 0 6px 15px rgba(251, 191, 36, 0.5); }
    100% { box-shadow: 0 4px 10px rgba(251, 191, 36, 0.3); }
}

/* Menu a tendina */
.profile-menu-container {
    position: relative;
    display: inline-block;
    margin-left: 10px;
}

.profile-button {
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 30px;
    padding: 6px 16px 6px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--dark);
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    min-width: 220px;
    border: 1px solid #e5e7eb;
    display: none;
    z-index: 1000;
}

.profile-menu-container:hover .profile-dropdown,
.profile-dropdown:hover {
    display: block;
}

.profile-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--dark);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.profile-dropdown a:hover {
    background: #f9f9f9;
}

.profile-dropdown a:first-child {
    border-radius: 16px 16px 0 0;
}

.profile-dropdown a:last-child {
    border-radius: 0 0 16px 16px;
}

.logout-link {
    color: #dc2626 !important;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

.dropdown-badge {
    margin-left: auto;
    background: #dc2626;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

/* Badge */
.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: #dc2626;
    color: white;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.badge.green {
    background: var(--green);
}

.badge.orange {
    background: #f59e0b;
}

/* Captcha */
.captcha-container {
    margin: 20px 0;
}

.captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.captcha-image {
    background: #f9f9f9;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 5px;
}

.captcha-image img {
    max-width: 140px !important;
    height: 32px !important;
    border-radius: 6px;
}

.captcha-image input[type="text"] {
    width: 70px !important;
    height: 32px !important;
    padding: 0 8px !important;
    margin-left: 5px;
    font-size: 14px;
    border: none !important;
    background: transparent;
}

.captcha-refresh {
    background: #f3f5f6;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    width: 38px;
    height: 38px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-refresh:hover {
    background: #e5e7eb;
    color: var(--green);
    border-color: var(--green);
}

.captcha-hint {
    color: #9ca3af;
    font-size: 11px;
    margin-top: 6px;
    font-style: italic;
}

/* Calcolatore commissioni */
.price-calculator {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid var(--green);
}

.calculator-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #6b7280;
}

.calculator-total {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #e5e7eb;
    font-weight: 700;
    color: var(--dark);
}

.calculator-total span:last-child {
    color: var(--green);
    font-size: 18px;
}

/* Modale Beta */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gentleSwing {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(3deg); }
    75% { transform: rotate(-3deg); }
    100% { transform: rotate(0deg); }
}

.beta-badge {
    animation: gentleSwing 2s ease-in-out infinite;
    transform-origin: top center;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.beta-badge i {
    font-size: 10px;
    transform: rotate(-45deg);
    transition: transform 0.3s;
}

.beta-badge:hover i {
    transform: rotate(0deg);
}

.beta-badge:hover {
    animation: none;
    transform: scale(1.05);
}

/* Stripe button */
.btn-stripe {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #635bff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-stripe:hover {
    background: #4b46cc;
    transform: translateY(-2px);
}

/* ============================================================ */
/* OTTIMIZZAZIONI MOBILE - COMPLETE E DEFINITIVE */
/* ============================================================ */






/* ============================================================ */
/* BOTTONI ACCEDI E REGISTRATI - FORZATI UGUALI OVUNQUE */
/* ============================================================ */

/* Selettori universali per coprire TUTTE le pagine */
.btn-login,
.btn-register,
a.btn-login,
a.btn-register,
.header-actions .btn-login,
.header-actions .btn-register,
.site-header .btn-login,
.site-header .btn-register {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 75px !important;
    height: 34px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    line-height: 1 !important;
    border-radius: 30px !important;
    border: 1px solid var(--green) !important;
    box-sizing: border-box !important;
    text-align: center !important;
    margin: 0 3px !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: all 0.2s !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

/* Colori specifici per OGNI tipo */
.btn-login,
a.btn-login,
.header-actions .btn-login,
.site-header .btn-login {
    background: transparent !important;
    color: var(--green) !important;
}

.btn-register,
a.btn-register,
.header-actions .btn-register,
.site-header .btn-register {
    background: var(--green) !important;
    color: white !important;
    border: 1px solid var(--green) !important;
}

/* Hover */
.btn-login:hover,
a.btn-login:hover,
.header-actions .btn-login:hover,
.site-header .btn-login:hover {
    background: rgba(122, 169, 135, 0.1) !important;
}

.btn-register:hover,
a.btn-register:hover,
.header-actions .btn-register:hover,
.site-header .btn-register:hover {
    background: #5f8e6b !important;
}

/* TABLET (max 820px) */
@media (max-width:820px){
    .main-nav{ 
        display: none; 
    }
    
    .header-actions {
        gap: 3px;
    }
    
    /* Ricerca: nasconde input e testo, mostra solo icona */
    .search-input {
        display: none !important;
    }
    
    .search-text {
        display: none !important;
    }
    
    .search-button {
        background: transparent !important;
        border: none !important;
        color: var(--dark) !important;
        padding: 0 !important;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50% !important;
    }
    
    .search-button i {
        font-size: 16px !important;
        color: var(--dark);
    }
    
    /* Nasconde icone superflue */
    .messages-icon,
    .notifications-icon,
    .wishlist-container {
        display: none !important;
    }
    
    .cart-container {
        margin-right: 1px !important;
    }
    
    .cart-container i {
        font-size: 16px !important;
    }
    
    .profile-button {
        display: none !important;
    }
    
    /* Bottoni ridimensionati per tablet */
    .btn-login,
    .btn-register,
    a.btn-login,
    a.btn-register,
    .header-actions .btn-login,
    .header-actions .btn-register,
    .site-header .btn-login,
    .site-header .btn-register {
        min-width: 65px !important;
        height: 32px !important;
        padding: 0 10px !important;
        font-size: 12px !important;
    }
    
    .mobile-toggle{ 
        display: inline-block; 
        font-size: 20px;
        width: 32px;
        height: 32px;
        margin-left: 1px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .cards-grid{ 
        grid-template-columns: repeat(2,1fr); 
        gap: 10px;
    }
    
    .hero{ 
        min-height: 380px; 
    }
    
    .hero-sub{ 
        font-size: 14px; 
    }
    
    .header-inner{ 
        gap: 3px; 
        justify-content: space-between;
    }
    
    .logo {
        font-size: 19px !important;
    }
}

/* SMARTPHONE STANDARD (max 600px) */
@media (max-width:600px){
    .header-inner {
        gap: 2px;
    }
    
    .logo {
        font-size: 17px !important;
    }
    
    /* Badge Beta normale ma ridotto */
    .beta-badge {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }
    
    .beta-badge i {
        font-size: 8px !important;
        transform: rotate(-45deg);
    }
    
    .search-button {
        width: 28px;
        height: 28px;
    }
    
    .search-button i {
        font-size: 14px !important;
    }
    
    .cart-container i {
        font-size: 14px !important;
    }
    
    /* Bottoni per smartphone */
    .btn-login,
    .btn-register,
    a.btn-login,
    a.btn-register,
    .header-actions .btn-login,
    .header-actions .btn-register,
    .site-header .btn-login,
    .site-header .btn-register {
        min-width: 55px !important;
        height: 28px !important;
        padding: 0 6px !important;
        font-size: 11px !important;
    }
    
    .mobile-toggle {
        font-size: 18px;
        width: 28px;
        height: 28px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }
    
    .card img {
        height: 90px;
    }
    
    .card-body {
        padding: 6px;
    }
    
    .card h3 {
        font-size: 12px;
    }
    
    .card p {
        font-size: 10px;
    }
    
    .hero {
        min-height: 260px;
    }
    
    .hero-title {
        font-size: 26px;
    }
    
    .hero-sub {
        font-size: 12px;
    }
    
    .cta-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .footer-columns {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px;
        padding: 25px 0 15px;
    }
    
    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }
    
    .socials {
        justify-content: center;
    }
    
    .auth-card {
        padding: 20px 12px;
    }
    
    .name-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .upload-card {
        padding: 12px;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-avatar {
        margin: 0 auto;
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
    
    .profile-meta {
        justify-content: center;
        font-size: 11px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 8px;
    }
    
    .stat-number {
        font-size: 26px;
    }
    
    .action-links {
        flex-direction: column;
    }
    
    .action-link {
        width: 100%;
        justify-content: center;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .commission-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .boost-grid {
        grid-template-columns: 1fr !important;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn-primary, .btn-cart {
        width: 100%;
        text-align: center;
    }
    
    .action-buttons {
        justify-content: center;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-item-price {
        text-align: left;
    }
    
    .cart-actions {
        flex-direction: column;
    }
    
    .chat-container {
        margin: 12px auto;
        padding: 0 8px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .chat-footer form {
        flex-direction: column;
    }
    
    .chat-footer button {
        width: 100%;
    }
    
    .wishlist-grid {
        grid-template-columns: 1fr !important;
    }
    
    .chart-container {
        padding: 8px;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .chart-controls {
        width: 100%;
        flex-direction: column;
    }
    
    .notifications-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filters {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-btn {
        flex: 1;
        text-align: center;
        font-size: 11px;
        padding: 5px 6px;
    }
}

/* SMARTPHONE PICCOLI (max 480px) */
@media (max-width:480px){
    .logo {
        font-size: 16px !important;
    }
    
    .beta-badge {
        font-size: 9px !important;
        padding: 2px 5px !important;
    }
    
    .beta-badge i {
        font-size: 7px !important;
    }
    
    .search-button {
        width: 26px;
        height: 26px;
    }
    
    .search-button i {
        font-size: 13px !important;
    }
    
    .cart-container i {
        font-size: 13px !important;
    }
    
    /* Bottoni per smartphone piccoli */
    .btn-login,
    .btn-register,
    a.btn-login,
    a.btn-register,
    .header-actions .btn-login,
    .header-actions .btn-register,
    .site-header .btn-login,
    .site-header .btn-register {
        min-width: 48px !important;
        height: 26px !important;
        padding: 0 4px !important;
        font-size: 10px !important;
    }
    
    .mobile-toggle {
        font-size: 16px;
        width: 26px;
        height: 26px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr !important;
    }
    
    .hero-title {
        font-size: 22px;
    }
    
    .hero-sub {
        font-size: 11px;
    }
    
    .footer-columns {
        grid-template-columns: 1fr !important;
    }
    
    .private-section {
        padding: 10px;
    }
    
    .private-section div {
        flex-direction: column;
        gap: 6px !important;
    }
    
    .payment-section {
        padding: 10px;
    }
    
    .payment-section h3 {
        flex-wrap: wrap;
        font-size: 15px;
    }
    
    .btn-stripe {
        width: 100%;
        justify-content: center;
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* SMARTPHONE PICCOLISSIMI (max 360px) */
@media (max-width:360px){
    .logo {
        font-size: 14px !important;
    }
    
    .beta-badge {
        font-size: 8px !important;
        padding: 1px 4px !important;
    }
    
    .beta-badge i {
        font-size: 6px !important;
    }
    
    .search-button {
        width: 24px;
        height: 24px;
    }
    
    .search-button i {
        font-size: 12px !important;
    }
    
    .cart-container i {
        font-size: 12px !important;
    }
    
    /* Bottoni per piccolissimi */
    .btn-login,
    .btn-register,
    a.btn-login,
    a.btn-register,
    .header-actions .btn-login,
    .header-actions .btn-register,
    .site-header .btn-login,
    .site-header .btn-register {
        min-width: 42px !important;
        height: 24px !important;
        padding: 0 3px !important;
        font-size: 9px !important;
    }
    
    .mobile-toggle {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
    
    .hero-title {
        font-size: 20px;
    }
    
    .hero {
        min-height: 180px;
    }
    
    .container {
        padding: 0 5px;
    }
    
    h1 {
        font-size: 18px !important;
    }
    
    h2 {
        font-size: 16px !important;
    }
    
    .auth-card {
        padding: 10px 6px;
    }
}

/* ORIENTAMENTO ORIZZONTALE SU MOBILE */
@media (max-width:900px) and (orientation: landscape){
    .hero {
        min-height: 150px;
    }
    
    .hero-title {
        font-size: 22px;
    }
    
    .hero-sub {
        font-size: 11px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .profile-header {
        flex-direction: row;
        text-align: left;
    }
    
    .profile-avatar {
        margin: 0;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* STAMPA */
@media print {
    .site-header,
    .site-footer,
    .tabs,
    .action-links,
    .btn-login,
    .btn-register,
    a.btn-login,
    a.btn-register,
    .mobile-toggle,
    .boost-section {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .page-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================================ */
/* HEADER MOBILE PER UTENTI LOGGATI - CON PULSANTE VENDI */
/* ============================================================ */

@media (max-width:820px){
    /* Mostra il menu mobile quando loggato */
    .profile-menu-container {
        display: inline-block !important;
    }
    
    .profile-button {
        display: flex !important;
        padding: 4px 8px !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 30px !important;
        background: white !important;
    }
    
    .profile-button span {
        display: none !important; /* Nasconde "Ciao, Nome" */
    }
    
    .profile-button i {
        font-size: 18px !important;
        margin: 0 !important;
        color: var(--dark) !important;
    }
    
    /* Pulsante Vendi nell'header */
    .header-actions a[href*="upload"] {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: var(--green) !important;
        color: white !important;
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        margin-right: 2px !important;
        text-decoration: none !important;
    }
    
    .header-actions a[href*="upload"] i {
        font-size: 16px !important;
    }
    
    .header-actions a[href*="upload"] span {
        display: none !important; /* Nasconde il testo "Vendi" */
    }
    
    /* Dropdown menu */
    .profile-dropdown {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        margin-top: 10px !important;
        background: white !important;
        border-radius: 16px !important;
        box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
        min-width: 220px !important;
        border: 1px solid #e5e7eb !important;
        z-index: 1000 !important;
    }
    
    .profile-dropdown a {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 12px 20px !important;
        color: var(--dark) !important;
        text-decoration: none !important;
        font-size: 14px !important;
    }
    
    .profile-dropdown a:hover {
        background: #f9f9f9 !important;
    }
    
    .profile-dropdown a:first-child {
        border-radius: 16px 16px 0 0 !important;
    }
    
    .profile-dropdown a:last-child {
        border-radius: 0 0 16px 16px !important;
        color: #dc2626 !important;
    }
    
    .dropdown-divider {
        height: 1px !important;
        background: #e5e7eb !important;
        margin: 8px 0 !important;
    }
    
    .dropdown-badge {
        margin-left: auto !important;
        background: #dc2626 !important;
        color: white !important;
        padding: 2px 8px !important;
        border-radius: 12px !important;
        font-size: 11px !important;
    }
}

/* Smartphone (max 600px) */
@media (max-width:600px){
    .profile-button {
        padding: 3px 6px !important;
    }
    
    .profile-button i {
        font-size: 16px !important;
    }
    
    .header-actions a[href*="upload"] {
        width: 28px !important;
        height: 28px !important;
    }
    
    .header-actions a[href*="upload"] i {
        font-size: 14px !important;
    }
    
    .profile-dropdown {
        min-width: 200px !important;
    }
    
    .profile-dropdown a {
        padding: 10px 16px !important;
        font-size: 13px !important;
    }
}

@media (max-width:480px){
    .profile-button {
        padding: 2px 5px !important;
    }
    
    .profile-button i {
        font-size: 14px !important;
    }
    
    .header-actions a[href*="upload"] {
        width: 26px !important;
        height: 26px !important;
    }
    
    .header-actions a[href*="upload"] i {
        font-size: 13px !important;
    }
}

/* ============================================================ */
/* MENU MOBILE A TENDINA - COMPLETO */
/* ============================================================ */

/* Overlay per il menu */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.mobile-menu-overlay.active {
    display: block;
}

/* Menu laterale */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 1000;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

/* Intestazione menu */
.mobile-menu-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-menu-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--dark);
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #9ca3af;
}

.mobile-menu-close:hover {
    color: var(--dark);
}

/* Sezioni menu */
.mobile-menu-section {
    padding: 15px 0;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-menu-section h4 {
    padding: 0 20px;
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: var(--dark);
    text-decoration: none;
    font-size: 15px;
    transition: background 0.2s;
}

.mobile-menu-item:hover {
    background: #f9f9f9;
}

.mobile-menu-item i {
    width: 24px;
    font-size: 18px;
    color: #6b7280;
}

.mobile-menu-item .badge {
    margin-left: auto;
    background: #dc2626;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

/* Header mobile */
@media (max-width:820px){
    /* Nasconde elementi desktop */
    .main-nav,
    .messages-icon,
    .notifications-icon,
    .wishlist-container,
    .profile-name,
    .btn-login,
    .btn-register {
        display: none !important;
    }
    
    /* Mostra il menu mobile */
    .mobile-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        background: transparent;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: var(--dark);
    }
    
    /* Header compatto */
    .header-inner {
        gap: 2px;
    }
    
    .logo {
        font-size: 18px !important;
    }
    
    .beta-badge {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }
    
    .beta-badge i {
        display: none !important;
    }
    
    .beta-badge:after {
        content: "B";
        font-size: 10px;
        font-weight: 600;
    }
    
    /* Icone sempre visibili */
    .search-button {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent !important;
        border: none !important;
    }
    
    .search-button i {
        font-size: 18px !important;
        color: var(--dark);
    }
    
    .cart-container {
        margin-right: 0 !important;
    }
    
    .cart-container i {
        font-size: 18px !important;
    }
    
    .profile-menu-container {
        display: none !important;
    }
}

@media (max-width:600px){
    .mobile-toggle {
        width: 32px;
        height: 32px;
        font-size: 22px;
    }
    
    .logo {
        font-size: 16px !important;
    }
    
    .search-button {
        width: 32px;
        height: 32px;
    }
    
    .search-button i {
        font-size: 16px !important;
    }
    
    .cart-container i {
        font-size: 16px !important;
    }
}

@media (max-width:480px){
    .mobile-toggle {
        width: 28px;
        height: 28px;
        font-size: 20px;
    }
    
    .search-button {
        width: 28px;
        height: 28px;
    }
    
    .search-button i {
        font-size: 14px !important;
    }
    
    .cart-container i {
        font-size: 14px !important;
    }
}

/* Stili per i badge nel menu mobile */
.mobile-menu-item .badge {
    margin-left: auto;
    background: #dc2626;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    min-width: 20px;
    text-align: center;
}

/* ============================================================ */
/* AUMENTO SPAZIATURA ICONE HEADER MOBILE */
/* ============================================================ */

@media (max-width:820px){
    .header-actions {
        gap: 6px !important;
    }
    
    .search-button {
        margin-right: 6px !important;
    }
    
    .cart-container {
        margin-right: 6px !important;
    }
    
    .mobile-toggle {
        margin-left: 6px !important;
    }
}

@media (max-width:600px){
    .header-actions {
        gap: 6px !important;
    }
    
    .search-button {
        margin-right: 6px !important;
    }
    
    .cart-container {
        margin-right: 6px !important;
    }
    
    .mobile-toggle {
        margin-left: 6px !important;
    }
}

@media (max-width:480px){
    .header-actions {
        gap: 6px !important;
    }
    
    .search-button {
        margin-right: 6px !important;
    }
    
    .cart-container {
        margin-right: 6px !important;
    }
    
    .mobile-toggle {
        margin-left: 6px !important;
    }
}

/* ============================================================ */
/* GRIGLIA APPUNTI MOBILE COMPATTA */
/* ============================================================ */

@media (max-width: 600px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }
    
    .card {
        margin: 0;
        border-radius: 12px;
    }
    
    .card img {
        height: 90px;
        object-fit: cover;
    }
    
    .card-body {
        padding: 8px 6px;
    }
    
    .card h3 {
        font-size: 12px;
        margin: 0 0 4px 0;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .card p {
        font-size: 10px;
        margin: 0 0 4px 0;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .card .muted {
        font-size: 9px;
    }
    
    .card .price {
        font-size: 13px;
        font-weight: 700;
    }
    
    .card .university {
        font-size: 9px;
        color: #6b7280;
    }
}

/* Per schermi molto piccoli, manteniamo 2 colonne ma ancora più compatte */
@media (max-width: 400px) {
    .card img {
        height: 80px;
    }
    
    .card h3 {
        font-size: 11px;
    }
    
    .card p {
        font-size: 9px;
    }
    
    .card .price {
        font-size: 12px;
    }
}

/* Per tablet in verticale, 3 colonne */
@media (min-width: 601px) and (max-width: 820px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px;
    }
    
    .card img {
        height: 110px;
    }
}

/* ============================================================ */
/* MENU MOBILE - COMPORTAMENTO SOLO SU MOBILE */
/* ============================================================ */

/* Su desktop (>820px) il menu è nascosto */
@media (min-width: 821px) {
    .mobile-menu-overlay,
    .mobile-menu {
        display: none !important;
    }
}

/* Su mobile (<820px) il menu funziona */
@media (max-width: 820px) {
    /* Overlay */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }

    .mobile-menu-overlay.active {
        display: block;
    }

    /* Menu laterale */
    .mobile-menu {
        display: block;
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        height: 100%;
        background: white;
        z-index: 1000;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        overflow-y: auto;
    }

    .mobile-menu.active {
        right: 0;
    }

    /* Intestazione */
    .mobile-menu-header {
        padding: 20px;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .mobile-menu-header h3 {
        margin: 0;
        font-size: 18px;
        color: var(--dark);
    }

    .mobile-menu-close {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        color: #9ca3af;
    }

    .mobile-menu-close:hover {
        color: var(--dark);
    }

    /* Sezioni */
    .mobile-menu-section {
        padding: 15px 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .mobile-menu-section h4 {
        padding: 0 20px;
        margin: 0 0 10px 0;
        font-size: 13px;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .mobile-menu-item {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 12px 20px;
        color: var(--dark);
        text-decoration: none;
        font-size: 15px;
        transition: background 0.2s;
    }

    .mobile-menu-item:hover {
        background: #f9f9f9;
    }

    .mobile-menu-item i {
        width: 24px;
        font-size: 18px;
        color: #6b7280;
    }

    .mobile-menu-item .badge {
        margin-left: auto;
        background: #dc2626;
        color: white;
        padding: 2px 8px;
        border-radius: 12px;
        font-size: 11px;
    }
}

/* ============================================================ */
/* FEATURE SECTION - ORIZZONTALE E COMPATTA SU MOBILE */
/* ============================================================ */

@media (max-width: 600px) {
    .features-grid {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        gap: 12px !important;
        padding: 5px 0 15px !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .feature {
        flex: 0 0 45% !important;  /* Più piccolo, ora 45% invece di 80% */
        scroll-snap-align: start !important;
        background: white;
        border-radius: 12px;
        padding: 12px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.03);
        margin-right: 8px;
        text-align: center;
    }
    
    .feature:last-child {
        margin-right: 0;
    }
    
    .icon-circle {
        width: 40px;  /* Ridotto da 60px */
        height: 40px;
        font-size: 18px;  /* Ridotto da 24px */
        margin-bottom: 8px;
    }
    
    .feature h3 {
        font-size: 13px;  /* Ridotto da 16px */
        margin: 5px 0 3px;
        font-weight: 600;
    }
    
    .feature p {
        font-size: 11px;  /* Ridotto da 12px */
        line-height: 1.3;
        max-width: 100%;
        color: #6b7280;
    }
}

@media (max-width: 480px) {
    .feature {
        flex: 0 0 50% !important;  /* Su schermi più piccoli, 50% */
        padding: 10px;
    }
    
    .icon-circle {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .feature h3 {
        font-size: 12px;
    }
    
    .feature p {
        font-size: 10px;
    }
}

@media (max-width: 360px) {
    .feature {
        flex: 0 0 60% !important;  /* Su schermi piccolissimi, 60% */
    }
}

/* ============================================================ */
/* TITOLO APPUNTI POPOLARI - MOBILE */
/* ============================================================ */

@media (max-width: 600px) {
    .section-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .section-header h2 {
        font-size: 22px !important;  /* Ridotto da 28px */
        white-space: nowrap !important;
        margin: 0;
    }
    
    .section-header .muted {
        font-size: 12px !important;
        margin: 0;
    }
    
    .see-all {
        font-size: 12px !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 16px !important;
    }
    
    .section-header .muted {
        font-size: 11px !important;
    }
    
    .see-all {
        font-size: 11px !important;
    }
}

@media (max-width: 360px) {
    .section-header h2 {
        font-size: 14px !important;
    }
}

/* ============================================================ */
/* LOGO NOTERO PIÙ GRANDE SU MOBILE (SCALA PROPORZIONALE) */
/* ============================================================ */

@media (max-width: 820px) {
    .logo {
        font-size: 38px !important;  /* Proporzionale a 30px su 480px */
    }
    
    .beta-badge {
        font-size: 14px !important;
        padding: 4px 10px !important;
    }
    
    .beta-badge i {
        font-size: 12px !important;
    }
}

@media (max-width: 768px) {
    .logo {
        font-size: 36px !important;
    }
    
    .beta-badge {
        font-size: 13px !important;
        padding: 4px 9px !important;
    }
}

@media (max-width: 600px) {
    .logo {
        font-size: 34px !important;  /* Leggermente ridotto */
    }
    
    .beta-badge {
        font-size: 12px !important;
        padding: 3px 8px !important;
    }
    
    .beta-badge i {
        font-size: 10px !important;
    }
}

@media (max-width: 520px) {
    .logo {
        font-size: 32px !important;
    }
    
    .beta-badge {
        font-size: 10px !important;
        padding: 3px 7px !important;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 30px !important;  /* Il tuo valore */
    }
    
    .beta-badge {
        font-size: 9px !important;
        padding: 2px 5px !important;
    }
    
    .beta-badge i {
        font-size: 8px !important;
    }
}

@media (max-width: 400px) {
    .logo {
        font-size: 26px !important;  /* Riduzione proporzionale */
    }
    
    .beta-badge {
        font-size: 8px !important;
        padding: 2px 4px !important;
    }
}

@media (max-width: 360px) {
    .logo {
        font-size: 24px !important;
    }
    
    .beta-badge {
        font-size: 7px !important;
        padding: 2px 4px !important;
    }
}

@media (max-width: 320px) {
    .logo {
        font-size: 22px !important;
    }
    
    .beta-badge {
        font-size: 7px !important;
        padding: 1px 3px !important;
    }
}

/* ============================================================ */
/* LOGO E BADGE BETA SU MOBILE (SEPARATI) */
/* ============================================================ */

@media (max-width: 820px) {
    .logo {
        font-size: 38px !important;
    }
    
    .beta-badge {
        font-size: 14px !important;
        padding: 4px 10px !important;
        cursor: pointer !important;  /* Mantieni il puntatore */
    }
}

@media (max-width: 600px) {
    .logo {
        font-size: 34px !important;
    }
    
    .beta-badge {
        font-size: 12px !important;
        padding: 3px 8px !important;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 30px !important;
    }
    
    .beta-badge {
        font-size: 9px !important;
        padding: 2px 5px !important;
    }
}

@media (max-width: 360px) {
    .logo {
        font-size: 24px !important;
    }
    
    .beta-badge {
        font-size: 7px !important;
        padding: 2px 4px !important;
    }
}

/* ============================================================ */
/* PROFILO MOBILE - STATISTICHE COMPATTE */
/* ============================================================ */

@media (max-width: 600px) {
    /* Griglia statistiche a 2 colonne */
    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        margin: 15px 0 !important;
    }
    
    .stat-card {
        padding: 12px 8px !important;
        border-radius: 12px !important;
    }
    
    .stat-number {
        font-size: 22px !important;
        margin-bottom: 2px !important;
    }
    
    .stat-label {
        font-size: 11px !important;
    }
    
    /* Sezione guadagni più compatta */
    .private-section {
        padding: 15px !important;
        margin: 15px 0 !important;
    }
    
    .private-section h3 {
        font-size: 16px !important;
        margin-bottom: 10px !important;
    }
    
    .private-section div[style*="display: flex"] {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    .private-section div[style*="display: flex"] > div {
        text-align: center !important;
    }
    
    .private-section div[style*="font-size: 14px"] {
        font-size: 12px !important;
    }
    
    .private-section div[style*="font-size: 32px"] {
        font-size: 24px !important;
    }
    
    .private-section small {
        font-size: 10px !important;
    }
    
    /* Sezione pagamenti più compatta */
    .payment-section {
        padding: 15px !important;
        margin: 15px 0 !important;
    }
    
    .payment-section h3 {
        font-size: 16px !important;
        flex-wrap: nowrap !important;
    }
    
    .payment-status {
        padding: 10px !important;
        font-size: 13px !important;
    }
    
    .payment-status i {
        font-size: 14px !important;
    }
    
    .payment-section p {
        font-size: 12px !important;
        margin: 8px 0 !important;
    }
    
    .btn-stripe {
        padding: 8px 15px !important;
        font-size: 13px !important;
        width: 100% !important;
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .stat-number {
        font-size: 20px !important;
    }
    
    .stat-label {
        font-size: 10px !important;
    }
    
    .private-section div[style*="font-size: 32px"] {
        font-size: 22px !important;
    }
}

@media (max-width: 360px) {
    .stats-grid {
        gap: 5px !important;
    }
    
    .stat-card {
        padding: 8px 5px !important;
    }
    
    .stat-number {
        font-size: 18px !important;
    }
    
    .stat-label {
        font-size: 9px !important;
    }
}

/* ============================================================ */
/* NASCONDI REGISTRATI SU MOBILE (AGGIUNTA) */
/* ============================================================ */

@media (max-width:820px){
    /* Nascondi il pulsante Registrati su mobile */
    .btn-register,
    a.btn-register,
    .header-actions .btn-register,
    .site-header .btn-register {
        display: none !important;
    }
    
    /* Opzionale: mantieni visibile solo Accedi */
    .btn-login,
    a.btn-login,
    .header-actions .btn-login,
    .site-header .btn-login {
        display: inline-flex !important;
    }
}

@media (max-width:600px){
    .btn-login,
    a.btn-login,
    .header-actions .btn-login,
    .site-header .btn-login {
        min-width: 48px !important;
        height: 26px !important;
        font-size: 10px !important;
    }
}


/* ============================================================ */
/* ECCEZIONE PER PULSANTI SU PAGINE DI AUTENTICAZIONE (MOBILE) */
/* ============================================================ */

@media (max-width: 820px) {
    /* Mantieni visibili i pulsanti SOLO nelle pagine di login/registrazione */
    .auth-container .btn-login,
    .auth-container .btn-register,
    .auth-container a.btn-login,
    .auth-container a.btn-register {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-width: 85px !important;
        height: 38px !important;
    }
}