/* ============================================================
   area-studenti.css
   Estende style.css — riusa le variabili :root e le classi
   già definite (.btn-primary, .pill, .stat-card, .input-wrapper...)
   ============================================================ */

.area-studenti-body {
    min-height: 100vh;
}

/* ── SCREEN SWITCHING ──────────────────────────────────────── */
.as-screen {
    display: none;
}

.as-screen--active {
    display: block;
}

.as-back-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.as-back-link:hover {
    color: var(--accent-blue);
}

/* ── LOGIN ──────────────────────────────────────────────────── */
.as-login-wrap {
    min-height: calc(100vh - 88px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.as-login-card {
    width: 100%;
    max-width: 440px;
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.as-tabs {
    display: flex;
    background: var(--bg-light);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 1.8rem;
}

.as-tab {
    flex: 1;
    padding: 0.65rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.as-tab--active {
    background: white;
    color: var(--accent-blue);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.as-form {
    display: block;
}

.as-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.8rem 0;
    color: var(--text-light);
    font-size: 0.85rem;
}

.as-divider::before,
.as-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.as-divider span {
    padding: 0 1rem;
}

/* ── APP SHELL ──────────────────────────────────────────────── */
.as-app-tabs {
    display: flex;
    gap: 2rem;
}

.as-app-tab {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-light);
    position: relative;
    padding-bottom: 4px;
}

.as-app-tab--active {
    color: var(--accent-blue);
    font-weight: 600;
}

.as-app-tab--active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-blue);
}

.as-user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.as-user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-blue);
}

.as-main {
    padding: 3rem 2rem 6rem;
    max-width: 900px;
}

.as-page-head {
    margin-bottom: 2rem;
}

.as-page-head h2 {
    margin-bottom: 0.3rem;
}

.as-page-head p {
    margin-bottom: 0;
}

/* ── TAB PANELS ─────────────────────────────────────────────── */
.as-tab-panel {
    display: none;
}

.as-tab-panel--active {
    display: block;
}

/* ── STATS ──────────────────────────────────────────────────── */
.as-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 600px) {
    .as-stats-row {
        grid-template-columns: 1fr;
    }
}

/* ── CARDS ──────────────────────────────────────────────────── */
.as-card {
    background: white;
    border-radius: 16px;
    padding: 1.8rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 1.5rem;
}

.as-card--accent {
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue));
    border: none;
}

.as-card-accent-row {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.as-card-accent-row > i {
    font-size: 1.8rem;
    color: var(--accent-light);
}

.as-card-accent-row > div {
    flex: 1;
    min-width: 200px;
}

/* ── EMPTY STATE ────────────────────────────────────────────── */
.as-empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-light);
}

.as-empty-state i {
    font-size: 2rem;
    color: #cbd5e1;
    margin-bottom: 0.8rem;
    display: block;
}

.as-empty-state p {
    margin-bottom: 1rem;
}

/* ── LOADING ────────────────────────────────────────────────── */
.as-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    font-size: 0.95rem;
}

.as-loading i {
    margin-right: 0.5rem;
    color: var(--accent-blue);
}

/* ── VIDEO GRID ─────────────────────────────────────────────── */
.as-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.as-video-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: var(--transition-smooth);
}

.as-video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.as-video-thumb {
    height: 140px;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

.as-video-thumb i.fa-play {
    font-size: 2.2rem;
    color: rgba(255, 255, 255, 0.92);
}

.as-video-thumb i.fa-lock {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.as-video-dur {
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 0.7rem;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 2px 7px;
    border-radius: 4px;
}

.as-video-badge {
    position: absolute;
    top: 8px;
    left: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--accent-blue);
}

.as-video-info {
    padding: 1.1rem;
}

.as-video-title {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.98rem;
    margin-bottom: 0.3rem;
}

.as-video-meta {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 0.8rem;
}

.as-progress-bar {
    height: 5px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.6rem;
}

.as-progress-fill {
    height: 100%;
    background: var(--accent-blue);
    border-radius: 3px;
}

/* ── BOOKING ────────────────────────────────────────────────── */
.as-select {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: var(--bg-light);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    cursor: pointer;
}

.as-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.7rem;
}

.as-slot-btn {
    padding: 0.8rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    text-align: center;
    transition: var(--transition-smooth);
}

.as-slot-btn:hover {
    border-color: var(--accent-blue);
    background: rgba(37, 99, 235, 0.05);
}

.as-slot-btn--selected {
    border-color: var(--accent-blue);
    background: var(--accent-blue);
    color: white;
}

.as-slot-mode {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.75;
    margin-top: 2px;
    text-transform: uppercase;
}

/* ── BOOKING LIST ───────────────────────────────────────────── */
.as-booking-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--bg-light);
}

.as-booking-row:last-child {
    border-bottom: none;
}

.as-booking-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.as-booking-info {
    flex: 1;
}

.as-booking-title {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 0.95rem;
}

.as-booking-meta {
    font-size: 0.82rem;
    color: var(--text-light);
}

.as-status {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.as-status--pendente { background: #fef3c7; color: #92400e; }
.as-status--confermata { background: #d1fae5; color: #065f46; }
.as-status--completata { background: #e2e8f0; color: #475569; }
.as-status--annullata { background: #fee2e2; color: #991b1b; }

/* ── QUIZ ───────────────────────────────────────────────────── */
.as-quiz-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.as-pill-btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.as-quiz-question-card {
    background: white;
    border-radius: 16px;
    padding: 1.8rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 1.5rem;
}

.as-quiz-progress {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 1.2rem 0;
}

.as-quiz-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--bg-light);
    color: var(--text-light);
}

.as-quiz-dot--done { background: var(--accent-blue); color: white; }
.as-quiz-dot--current { background: rgba(37,99,235,0.12); color: var(--accent-blue); border: 1.5px solid var(--accent-blue); }

.as-quiz-line {
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.as-quiz-option {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1.1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 0.7rem;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: var(--transition-smooth);
}

.as-quiz-option:hover {
    border-color: var(--accent-blue);
    background: rgba(37, 99, 235, 0.04);
}

.as-quiz-option--correct {
    border-color: #10b981;
    background: #ecfdf5;
    color: #065f46;
}

.as-quiz-option--wrong {
    border-color: #ef4444;
    background: #fef2f2;
    color: #991b1b;
}

.as-quiz-option-letter {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
}

.as-quiz-feedback {
    padding: 1rem 1.2rem;
    border-radius: 12px;
    font-size: 0.92rem;
    line-height: 1.5;
    margin-top: 0.8rem;
}

.as-quiz-feedback--correct {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #10b981;
}

.as-quiz-feedback--wrong {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

/* ── MODAL VIDEO ────────────────────────────────────────────── */
.as-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.as-modal--open {
    display: flex;
}

.as-modal-content {
    width: 100%;
    max-width: 900px;
    background: black;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.as-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 10;
    font-size: 1rem;
}

.as-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

#as-video-player-wrap {
    aspect-ratio: 16/9;
    width: 100%;
}

#as-video-player-wrap iframe,
#as-video-player-wrap video {
    width: 100%;
    height: 100%;
    display: block;
}

/* ── RECENSIONI ─────────────────────────────────────────────── */
.as-textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: var(--bg-light);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    resize: vertical;
}

.as-review-stars {
    display: flex;
    gap: 0.4rem;
    font-size: 1.6rem;
    color: #f59e0b;
}

.as-review-stars i {
    cursor: pointer;
    transition: transform 0.1s;
}

.as-review-stars i:hover {
    transform: scale(1.15);
}

.as-review-row {
    padding: 1rem 0;
    border-bottom: 1px solid var(--bg-light);
}

.as-review-row:last-child {
    border-bottom: none;
}

.as-review-stars-static {
    color: #f59e0b;
    font-size: 1rem;
    letter-spacing: 2px;
}

/* ── MOBILE ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .as-app-tabs {
        gap: 1rem;
    }
    .as-user-name {
        display: none;
    }
    .as-main {
        padding: 2rem 1.2rem 5rem;
    }
    .as-login-card {
        padding: 2rem 1.5rem;
    }

    /* Nasconde i tab su mobile e mostra hamburger */
    .nav-links.as-app-tabs {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
        padding: 1rem 0;
        z-index: 999;
    }

    .nav-links.as-app-tabs.active {
        display: flex;
    }

    .nav-links.as-app-tabs li {
        width: 100%;
        text-align: center;
    }

    .nav-links.as-app-tabs li a {
        display: block;
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
        border-bottom: none;
    }

    .nav-links.as-app-tabs li a::after {
        display: none;
    }

    .hamburger {
        display: flex !important;
    }
}