/* Stili moderni tabelle gestionali */

/* Tabella base */
.gestione-table {
    table-layout: fixed !important;
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
}

/* Header tabella moderno */
.gestione-table thead th {
    background: #2c3e50 !important;
    color: white !important;
    border: none !important;
    padding: 14px 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    vertical-align: middle !important;
}

.gestione-table thead th:first-child {
    border-radius: 8px 0 0 8px;
}

.gestione-table thead th:last-child {
    border-radius: 0 8px 8px 0;
}

/* Righe tabella con card effect */
.gestione-table tbody tr {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-radius: 8px;
}

.gestione-table tbody tr:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.gestione-table tbody td {
    padding: 14px 12px !important;
    vertical-align: middle !important;
    border: none !important;
    background: transparent;
}

.gestione-table tbody td:first-child {
    border-radius: 8px 0 0 8px;
}

.gestione-table tbody td:last-child {
    border-radius: 0 8px 8px 0;
    text-align: center !important;
}

/* Stile colonna principale (prima colonna) */
.gestione-table tbody td:first-child strong {
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
}

.gestione-table tbody td:first-child small {
    display: block;
    margin-top: 4px;
    line-height: 1.3;
}

/* Stile contatti */
.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    gap: 6px;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item i {
    width: 16px;
    font-size: 0.85rem;
}

.contact-item a {
    color: #495057;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.contact-item a:hover {
    color: #667eea;
    text-decoration: underline;
}

/* Badge migliorati */
.gestione-table .badge {
    font-weight: 500;
    padding: 5px 10px;
    font-size: 0.8rem;
    border-radius: 6px;
}

.gestione-table .badge.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.gestione-table .badge.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.gestione-table .badge.bg-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    color: white;
}

.gestione-table .badge.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

.gestione-table .badge.bg-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
}

/* Azioni compatte e moderne */
.gestione-actions {
    display: inline-flex !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
    justify-content: center;
}

.gestione-actions a.btn,
.gestione-actions button.btn {
    padding: 0 !important;
    font-size: 0.75rem !important;
    line-height: 1 !important;
    border-width: 2px !important;
    border-radius: 6px !important;
    width: 38px !important;
    height: 38px !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.gestione-actions a.btn:hover,
.gestione-actions button.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.gestione-actions a.btn i,
.gestione-actions button.btn i {
    font-size: 1.4rem !important;
    margin: 0 !important;
    display: block !important;
    line-height: 1 !important;
}

/* Colori pulsanti azioni */
.gestione-actions .btn-outline-info {
    border-color: #17a2b8;
    color: #17a2b8;
}

.gestione-actions .btn-outline-info:hover {
    background: #17a2b8;
    color: white;
}

.gestione-actions .btn-outline-primary {
    border-color: #667eea;
    color: #667eea;
}

.gestione-actions .btn-outline-primary:hover {
    background: #667eea;
    color: white;
}

.gestione-actions .btn-outline-success {
    border-color: #10b981;
    color: #10b981;
}

.gestione-actions .btn-outline-success:hover {
    background: #10b981;
    color: white;
}

.gestione-actions .btn-outline-danger {
    border-color: #ef4444;
    color: #ef4444;
}

.gestione-actions .btn-outline-danger:hover {
    background: #ef4444;
    color: white;
}

.gestione-actions .btn-outline-warning {
    border-color: #f59e0b;
    color: #f59e0b;
}

.gestione-actions .btn-outline-warning:hover {
    background: #f59e0b;
    color: white;
}

/* Animazione smooth */
.gestione-table tbody tr,
.gestione-actions a.btn,
.contact-item a {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Allineamento centrale */
.text-center-td {
    text-align: center !important;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .gestione-table {
        font-size: 0.9rem;
    }
    
    .gestione-actions a.btn {
        width: 34px !important;
        height: 34px !important;
    }
    
    .gestione-actions a.btn i {
        font-size: 1.2rem !important;
    }
}
