/* ========================================
   DASHBOARD ARTIGIANO STYLES
   ======================================== */

/* ---------- Background ---------- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 700px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0) 100%);
}

body[data-category="muratore"]::before {
    background-image: url('https://images.unsplash.com/photo-1504307651254-35680f356dfd?w=1200') !important;
}

body[data-category="elettricista"]::before,
body[data-category="Elettricista"]::before {
    background-image: url('https://images.unsplash.com/photo-1621905251918-48416bd8575a?w=1200') !important;
}

body[data-category="idraulico"]::before {
    background-image: url('https://images.unsplash.com/photo-1607472586893-edb57bdc0e39?w=1200') !important;
}

body[data-category="stuccatore"]::before {
    background-image: url('https://images.unsplash.com/photo-1589939705384-5185137a7f0f?w=1200') !important;
}

body[data-category="pittore"]::before {
    background-image: url('https://images.unsplash.com/photo-1562259949-e8e7689d7828?w=1200') !important;
}

body[data-category="cartongessista"]::before {
    background-image: url('https://images.unsplash.com/photo-1581094271901-8022df4466f9?w=1200') !important;
}

/* ---------- Layout ---------- */
.dashboard {
    min-height: calc(100vh - 80px);
    padding: 40px 0;
    position: relative;
    z-index: 1;
}

.dashboard__title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 32px;
}

/* ---------- Header Actions ---------- */
.dashboard__user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin-right: 16px;
}

.dashboard__logout-btn {
    padding: 8px 16px;
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}

.dashboard__logout-btn:hover {
    background: var(--surface-alt);
    border-color: var(--text-secondary);
}

/* ---------- Sections ---------- */
.dashboard__section {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.dashboard__section-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.dashboard__section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

/* ---------- Form ---------- */
.dashboard__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-family: inherit;
    transition: all var(--duration) var(--ease);
    background: var(--surface);
    color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .12);
}

.form-group input[readonly] {
    background: var(--surface-alt);
    cursor: not-allowed;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* ---------- Buttons ---------- */
.btn {
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn--primary {
    background: var(--primary);
    color: #fff;
    box-shadow: none;
}

.btn--primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: none;
}

.btn--secondary {
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn--secondary:hover {
    background: var(--surface-alt);
    border-color: var(--text-secondary);
}

.btn--danger {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.btn--danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

/* ---------- Photo Section ---------- */
.dashboard__photo-section {
    display: flex;
    gap: 32px;
    align-items: center;
}

.dashboard__photo-preview {
    flex-shrink: 0;
}

.dashboard__photo-preview img {
    width: 150px;
    height: 150px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 3px solid var(--border);
}

.dashboard__photo-actions {
    flex: 1;
}

.dashboard__photo-actions p {
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ---------- Empty State ---------- */
.dashboard__empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}

.dashboard__empty-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.dashboard__empty-state p {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.dashboard__empty-state small {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ---------- Danger Zone ---------- */
.dashboard__section--danger {
    border: 2px solid #fee2e2;
    background: #fef2f2;
}

.dashboard__danger-zone {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.dashboard__danger-zone h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #991b1b;
    margin-bottom: 8px;
}

.dashboard__danger-zone p {
    font-size: 0.88rem;
    color: #7f1d1d;
    line-height: 1.5;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .dashboard__photo-section {
        flex-direction: column;
        text-align: center;
    }

    .dashboard__danger-zone {
        flex-direction: column;
        text-align: center;
    }

    .dashboard__section {
        padding: 24px 20px;
    }
}

/* ========================================
   CARD RICHIESTE
   ======================================== */

.richieste-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.richiesta-card {
    background: var(--surface);
    opacity: 1;
    border-radius: var(--radius-lg);
    padding: 24px;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
    transition: all var(--duration) var(--ease);
}

.richiesta-card:hover {
    box-shadow: var(--shadow-md);
}

.richiesta-card--in_attesa {
    border-left-color: var(--primary);
}

.richiesta-card--accettata {
    border-left-color: #10b981;
}

.richiesta-card--rifiutata {
    border-left-color: #ef4444;
}

.richiesta-card--completata {
    border-left-color: #6b7280;
}

.richiesta-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 16px;
}

.richiesta-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.richiesta-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.richiesta-body {
    margin-bottom: 16px;
}

.richiesta-body p {
    margin-bottom: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.richiesta-body strong {
    font-weight: 600;
    color: var(--text);
}

.richiesta-descrizione {
    color: var(--text-secondary);
    margin: 12px 0;
}

.richiesta-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 12px;
}

/* Badge Stati */
.badge {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge--in_attesa {
    background: #FFF8E1;
    color: #F5B800;
}

.badge--accettata {
    background: #d1fae5;
    color: #10b981;
}

.badge--rifiutata {
    background: #fee2e2;
    color: #ef4444;
}

.badge--completata {
    background: #f3f4f6;
    color: #6b7280;
}

.badge--urgente {
    background: #FFF3E0;
    color: #E67E22;
    border: 1px solid #FFCC80;
    box-shadow: 0 2px 4px rgba(230, 126, 34, 0.1);
}

/* Badge Riparazione */
.badge--riparazione {
    background: #EFF6FF;
    color: #2563EB;
    border: 1px solid #BFDBFE;
}

.richiesta-card--riparazione {
    border-left-color: #2563EB !important;
    background: linear-gradient(to right, #F0F6FF, var(--surface));
}


.richiesta-card--urgente {
    border-left-width: 6px !important;
    border-left-color: #E67E22 !important;
    background: linear-gradient(to right, #FFFBF5, var(--surface));
}

.urgency-price-breakdown {
    margin: 16px 0;
    padding: 16px;
    background: #FFF8F0;
    border-radius: var(--radius-md);
    border: 1px dashed #FFCC80;
}

.urgency-price-breakdown p {
    margin-bottom: 8px !important;
    color: #AD5C00;
}

.price-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.price-row--total {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #FFCC80;
    font-weight: 700;
    color: var(--text);
    font-size: 0.95rem;
}

/* Risposta Artigiano */
.risposta-artigiano {
    margin-top: 16px;
    padding: 16px;
    border-radius: var(--radius-md);
    background: var(--surface-alt);
}

.risposta-artigiano--accettata {
    background: #d1fae5;
    border: 2px solid #10b981;
}

.risposta-artigiano--rifiutata {
    background: #fee2e2;
    border: 2px solid #ef4444;
}

.risposta-artigiano h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.risposta-artigiano p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

.info-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

.status-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 12px;
}

/* Azioni Richiesta */
.richiesta-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.richiesta-actions textarea {
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 80px;
}

.richiesta-actions textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.richiesta-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}

.richiesta-actions button:first-of-type {
    background: #10b981;
    color: white;
}

.richiesta-actions button:first-of-type:hover {
    background: #059669;
}

.richiesta-actions button:last-of-type {
    background: #ef4444;
    color: white;
}

.richiesta-actions button:last-of-type:hover {
    background: #dc2626;
}

@media (max-width: 768px) {
    .richiesta-header {
        flex-direction: column;
    }

    .richiesta-actions {
        gap: 8px;
    }
}

/* Risposta Inviata */
.risposta-inviata {
    margin-top: 16px;
    padding: 12px;
    background: var(--surface-alt);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.risposta-inviata strong {
    color: var(--text);
}

.risposta-inviata small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ========================================
   CARD ARTIGIANO (PREFERITI)
   ======================================== */

.artisan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.artisan-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--duration) var(--ease);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.artisan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.artisan-card__image-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.artisan-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.artisan-card:hover .artisan-card__image {
    transform: scale(1.05);
}

.artisan-card__favorite {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    color: #ccc;
    z-index: 10;
}

.artisan-card__favorite:hover {
    background: #fff;
    transform: scale(1.1);
}

.artisan-card__favorite.active {
    color: #e74c3c;
    fill: #e74c3c;
}

.artisan-card__favorite svg {
    width: 20px;
    height: 20px;
    fill: inherit;
    /* Inherit fill from parent color */
}

.artisan-card__content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.artisan-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.artisan-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.artisan-card__price {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    background: var(--surface-alt);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.artisan-card__category {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.artisan-card__location {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.artisan-card__description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.artisan-card__content .btn {
    margin-top: auto;
    width: 100%;
}

/* ========================================
   SISTEMA CONFERMA SOPRALLUOGO
   ======================================== */

/* --- Codice Conferma (Vista Cliente) --- */
.codice-conferma-box {
    margin-top: 16px;
    padding: 24px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    border: 2px solid rgba(245, 184, 0, 0.4);
    box-shadow: 0 8px 32px rgba(245, 184, 0, 0.15);
    color: #fff;
}

.codice-conferma-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.codice-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.codice-conferma-header h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px 0;
}

.codice-conferma-header p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.codice-cifre {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 18px;
    color: #F5B800;
    text-align: center;
    padding: 20px 0;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 30px rgba(245, 184, 0, 0.6);
    background: rgba(245, 184, 0, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(245, 184, 0, 0.2);
    margin: 8px 0 16px;
}

.codice-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    margin: 0;
    line-height: 1.4;
}

/* --- Input Codice (Vista Artigiano) --- */
.codice-input-box {
    margin-top: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-radius: 14px;
    border: 2px solid #4CAF50;
}

.codice-input-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.codice-input-header>span {
    font-size: 2rem;
    line-height: 1;
}

.codice-input-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1b5e20;
    margin: 0 0 4px 0;
}

.codice-input-header p {
    font-size: 0.82rem;
    color: #388e3c;
    margin: 0;
}

.codice-input-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.codice-input-field {
    flex: 1;
    min-width: 160px;
    padding: 14px 20px;
    font-size: 2rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 12px;
    text-align: center;
    border: 3px solid #4CAF50;
    border-radius: 12px;
    background: #fff;
    color: #1b5e20;
    outline: none;
    transition: all 0.2s ease;
}

.codice-input-field:focus {
    border-color: #2e7d32;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.2);
}

/* Animazione shake errore */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    50%,
    90% {
        transform: translateX(-8px);
    }

    30%,
    70% {
        transform: translateX(8px);
    }
}

/* --- Form Data Alternativa --- */
.form-alternativa {
    margin-top: 16px;
    padding: 20px;
    background: #fff8e1;
    border-radius: 12px;
    border: 2px dashed #ff9800;
}

.form-alternativa h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #e65100;
    margin-bottom: 16px;
}

.form-alternativa .form-group input,
.form-alternativa .form-group textarea {
    border-color: #ffcc80;
    background: #fff;
}

.form-alternativa .form-group input:focus,
.form-alternativa .form-group textarea:focus {
    border-color: #ff9800;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.15);
}

/* Badge nuovi stati */
.badge--pagata {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge--confermata {
    background: #e3f2fd;
    color: #1565c0;
}

.badge--annullata {
    background: #fbe9e7;
    color: #bf360c;
}

.badge--data_alternativa {
    background: #fff3e0;
    color: #e65100;
}

/* Colori border-left nuovi stati */
.richiesta-card--pagata {
    border-left-color: #4CAF50;
}

.richiesta-card--confermata {
    border-left-color: #2196F3;
}

.richiesta-card--annullata {
    border-left-color: #ff5722;
}

.richiesta-card--data_alternativa {
    border-left-color: #ff9800;
}

/* Risposta alternatica */
.risposta-artigiano--alternativa {
    background: #fff3e0;
    border: 2px solid #ff9800;
}

/* Btn warning */
.btn--warning {
    background: #ff9800;
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.25);
}

.btn--warning:hover {
    background: #f57c00;
    transform: translateY(-2px);
}

.btn--success {
    background: #4CAF50;
    color: #fff;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.25);
}

.btn--success:hover {
    background: #388e3c;
    transform: translateY(-2px);
}

.btn--outline {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--border);
}

.btn--outline:hover {
    background: var(--surface-alt);
}

/* Rank Score Display */
.rank-score-widget {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: var(--surface-alt);
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 700;
    border: 2px solid var(--border);
    margin-top: 8px;
}

.rank-score-label {
    color: var(--text-secondary);
}

/* Richiesta status box generico */
.richiesta-status {
    margin-top: 16px;
    padding: 14px;
    border-radius: 10px;
    background: var(--surface-alt);
}

.richiesta-status--success {
    background: #e8f5e9;
    border-left: 4px solid #4CAF50;
}

.richiesta-status--danger {
    background: #ffebee;
    border-left: 4px solid #f44336;
}

.richiesta-status p {
    margin: 4px 0;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .codice-cifre {
        font-size: 2.2rem;
        letter-spacing: 10px;
    }

    .codice-input-row {
        flex-direction: column;
    }

    .codice-input-field {
        width: 100%;
    }
}

/* ========================================
   FORM RECENSIONE
   ======================================== */

.recensione-form {
    margin-top: 14px;
    padding: 16px;
    background: #fffde7;
    border-radius: 12px;
    border: 2px dashed #F5B800;
}

.star-picker {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.star-btn {
    font-size: 2rem;
    color: #ddd;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.12s, transform 0.12s;
}

.star-picker:hover .star-btn {
    color: #F5B800;
}

.star-picker .star-btn:hover~.star-btn {
    color: #ddd;
}

.star-btn--active {
    color: #F5B800;
}

.star-btn:hover {
    transform: scale(1.2);
}

.recensione-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #ffe082;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 70px;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
    display: block;
}

.recensione-textarea:focus {
    border-color: #F5B800;
    box-shadow: 0 0 0 3px rgba(245, 184, 0, 0.15);
}

.star-display {
    display: flex;
    gap: 2px;
    margin: 4px 0;
}

/* ========================================
   MOSTRA ID RICHIESTA (assistenza clienti)
   ======================================== */

.richiesta-id-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    flex-wrap: wrap;
}

.btn-show-id {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-show-id:hover {
    background: var(--surface-alt);
    border-color: var(--text-secondary);
    color: var(--text);
}

.richiesta-id-value {
    font-size: 0.78rem;
    color: var(--text-secondary);
    align-items: center;
    gap: 4px;
}

.richiesta-id-value code {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    background: var(--surface-alt);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text);
    border: 1px solid var(--border);
    word-break: break-all;
    user-select: all;
}

/* ========================================
   GRAFICI DASHBOARD (Chart.js)
   ======================================== */

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
}

.chart-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px 20px 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.chart-card--wide {
    grid-column: 1 / -1;
    /* occupa entrambe le colonne */
}

.chart-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 16px 0;
}

.chart-wrap {
    position: relative;
    height: 220px;
}

.chart-wrap--donut {
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-wrap--donut canvas {
    max-height: 240px;
}

@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-card--wide {
        grid-column: 1;
    }

    .chart-wrap {
        height: 200px;
    }
}
