/* Reset e stili di base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

h1, h2, h3 {
    margin-bottom: 1rem;
    color: #1a365d;
}

/* Layout principale */
.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #1a365d;
    color: #fff;
    padding: 1.5rem;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar .logo {
    font-size: 1.5rem;
    font-weight: bold;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1.5rem;
}

.sidebar .menu {
    list-style: none;
}

.sidebar .menu a {
    color: #cbd5e0;
    text-decoration: none;
    display: block;
    padding: 0.75rem 0;
    transition: 0.3s;
    display: flex;
    align-items: center;
}

.sidebar .menu a i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.sidebar .menu a:hover, .sidebar .menu a.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
    padding-left: 0.5rem;
}

/* Hamburger menu per mobile */
.hamburger, .close-sidebar {
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: #1a365d;
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    display: none;
}

.close-sidebar {
    left: 220px;
    background-color: #f8f9fa;
    color: #333;
    display: none;
}

/* Contenuto principale */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Stili per gli abbonamenti */
section {
    margin-bottom: 2.5rem;
    background-color: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.abbonamento-attivo .card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.card-header {
    background-color: #f8f9fa;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 1.5rem;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.badge.active {
    background-color: #48bb78;
    color: white;
}

.badge.expired {
    background-color: #e53e3e;
    color: white;
}

/* Barra di progresso */
.progress-container {
    margin-top: 1.5rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.progress {
    height: 10px;
    background-color: #edf2f7;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #4299e1;
    border-radius: 5px;
}

/* Grid per gli abbonamenti disponibili */
.abbonamenti-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.abbonamento-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.abbonamento-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.abbonamento-card h3 {
    font-size: 1.2rem;
    color: #2b6cb0;
    margin-bottom: 0.5rem;
}

.abbonamento-card .descrizione {
    color: #718096;
    margin-bottom: 1rem;
    min-height: 60px;
}

.abbonamento-card .durata {
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.abbonamento-card .prezzo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 1rem;
}

.btn-acquista {
    background-color: #4299e1;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s;
}

.btn-acquista:hover {
    background-color: #3182ce;
}

/* Tabella per lo storico */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

table th, table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

table tr:hover {
    background-color: #f8f9fa;
}

/* FAQ */
.faq-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h3 {
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.faq-item p {
    color: #718096;
}

/* Messaggi di successo ed errore */
.success, .error {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.success {
    background-color: #c6f6d5;
    border: 1px solid #9ae6b4;
    color: #276749;
}

.error {
    background-color: #fed7d7;
    border: 1px solid #feb2b2;
    color: #c53030;
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: #718096;
    background-color: #f8f9fa;
    border-radius: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 99;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .hamburger {
        display: block;
    }
    
    .sidebar.open .close-sidebar {
        display: block;
    }
    
    .abbonamenti-grid {
        grid-template-columns: 1fr;
    }
    
    table {
        display: block;
        overflow-x: auto;
    }
}