/* -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
/* AR - STILI APP WORKSHOP
 * (rev_00003)
 * Note
 * Stili responsive mobile-first per App Workshop
 * Layout card, pulsanti grandi, ottimizzato per smartphone
 * rev_00002: aggiunto stile .aw-btn-notifica (arancione) per pulsante notifica sessione
 * rev_00003: pulsanti azioni su due colonne con wrap, stile .aw-btn-stato per pulsanti secondari cambio stato attivita
/* -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */

.aw-app-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
}

.aw-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px 0;
}

.aw-header h1 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.aw-subtitle {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Tabs */
.aw-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: #fff;
    padding: 4px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.aw-tab-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.aw-tab-btn.active {
    background: #607F99;
    color: #fff;
}

.aw-tab-content {
    display: none;
}

.aw-tab-content.active {
    display: block;
}

/* Loading */
.aw-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

/* Lista */
.aw-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Card */
.aw-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-left: 4px solid #607F99;
}

.aw-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 8px;
}

.aw-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    flex: 1;
    word-break: break-word;
}

.aw-card-body {
    margin-bottom: 12px;
}

.aw-meta {
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
    line-height: 1.4;
}

.aw-meta strong {
    color: #333;
    font-weight: 600;
}

/* Badge */
.aw-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aw-badge-warning {
    background: #FFF3CD;
    color: #856404;
}

.aw-badge-success {
    background: #D4EDDA;
    color: #155724;
}

.aw-priorita-bassa {
    background: #E8F5E9;
    color: #2E7D32;
}

.aw-priorita-media {
    background: #FFF8E1;
    color: #F57F17;
}

.aw-priorita-alta {
    background: #FFEBEE;
    color: #C62828;
}

/* Pulsanti azioni */
.aw-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.aw-btn {
    flex: 1 1 calc(50% - 8px);
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
}

.aw-btn-stato {
    background: #8ea9bd;
    color: #fff;
}

.aw-btn-stato:hover {
    background: #7490a5;
}

.aw-btn-completa {
    background: #607F99;
    color: #fff;
}

.aw-btn-completa:hover {
    background: #4a5f73;
}

.aw-btn-notifica {
    background: #E95100;
    color: #fff;
}

.aw-btn-notifica:hover {
    background: #c43e00;
}

.aw-btn-evasa {
    background: #28a745;
    color: #fff;
}

.aw-btn-evasa:hover {
    background: #1e7e34;
}

.aw-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Errori */
.aw-error {
    background: #FFEBEE;
    color: #C62828;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 14px;
    border-left: 4px solid #C62828;
}

/* Accesso negato */
.aw-accesso-negato {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 20px;
}

.aw-accesso-box {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 400px;
}

.aw-accesso-box h2 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 22px;
}

.aw-accesso-box p {
    margin: 0 0 12px 0;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

.aw-errore {
    color: #C62828;
    font-weight: 600;
}

.aw-hint {
    font-size: 13px;
    color: #888;
}

/* Empty state */
.aw-empty {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 15px;
    background: #fff;
    border-radius: 8px;
}

/* Responsive tablet e desktop */
@media (min-width: 768px) {
    .aw-app-container {
        padding: 24px;
    }

    .aw-header h1 {
        font-size: 28px;
    }

    .aw-card {
        padding: 20px;
    }

    .aw-card-title {
        font-size: 18px;
    }

    .aw-btn {
        font-size: 15px;
        padding: 14px 20px;
    }
}

@media (min-width: 1024px) {
    .aw-app-container {
        max-width: 900px;
    }
}
