/**
 * Stili condivisi per il Sistema di Contabilità Veterinaria
 * File CSS unificato per tutte le pagine
 */

/* === LAYOUT GENERALE === */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
}

.content-area {
    background-color: #f8f9fa;
    min-height: 100vh;
    padding: 0;
}

/* Container principale centrato */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* === HEADER UNIFORMATO === */
.page-header {
    background: #fff;
    color: #222;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0;
}

.page-header .header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* === CARDS === */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.stat-card {
    border-left: 4px solid #3498db;
    transition: transform 0.2s ease;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-card:hover {
    transform: translateY(-2px);
}

.card-tessera {
    border-left: 4px solid #3498db;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* === FILTRI E SEZIONI === */
.filters-section {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 2rem;
}

/* === TABELLE === */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
    font-weight: 600;
}

.table thead.table-dark th {
    background-color: #343a40;
    border-color: #454d55;
}

.table-hover tbody tr:hover {
    background-color: rgba(0,123,255,0.05);
}

/* === BOTTONI === */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
}

.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.action-buttons .btn {
    margin: 0 2px;
}

/* === DROPDOWN EXPORT === */
.export-dropdown .dropdown-toggle::after {
    margin-left: 0.5em;
}

/* === BADGES E STATI === */
.badge-stato {
    font-size: 0.8em;
    padding: 0.4em 0.8em;
}

.currency {
    font-family: 'Courier New', monospace;
    text-align: right;
}

.tessera-code {
    font-family: monospace;
    font-size: 1.1em;
    letter-spacing: 1px;
}

/* === SIDEBAR === */
.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
}

.sidebar .nav-link {
    color: #bdc3c7;
    padding: 12px 20px;
    border-radius: 8px;
    margin: 4px 8px;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

/* === NAVBAR === */
.navbar-brand {
    font-weight: bold;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .page-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .header-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .filters-section {
        padding: 1rem;
    }
    
    .main-container {
        padding: 0 10px;
    }
}

/* === STATISTICHE === */
.stats-card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.stats-card:hover {
    transform: translateY(-2px);
}

/* === UTILITÀ === */
.text-primary { color: #3498db !important; }
.text-success { color: #27ae60 !important; }
.text-info { color: #17a2b8 !important; }
.text-warning { color: #f39c12 !important; }
.text-danger { color: #e74c3c !important; }

/* === ANIMAZIONI === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* === CENTRATURA CONTENUTO === */
.container-fluid > .row {
    justify-content: center;
}

.content-area .container {
    max-width: 1200px;
}

/* Assicura che il contenuto sia sempre centrato */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* === TESSERA STATISTICS CONTAINER === */
.tessera-statistics-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 2rem;
    margin-top: 2rem;
}

.tessera-statistics-container h4 {
    color: #198754;
    font-weight: 600;
}

.tessera-statistics-container .stats-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.tessera-statistics-container .stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(25, 135, 84, 0.15);
}

.tessera-statistics-container .stats-card.border-success:hover {
    border-color: #198754;
}

.tessera-statistics-container .stats-card.border-info:hover {
    border-color: #0dcaf0;
}

.tessera-statistics-container .stats-card.border-primary:hover {
    border-color: #0d6efd;
}

.tessera-statistics-container .stats-card.border-warning:hover {
    border-color: #ffc107;
}

.tessera-statistics-container .btn-outline-success {
    border-color: #198754;
    color: #198754;
}

.tessera-statistics-container .btn-outline-success:hover,
.tessera-statistics-container .btn-outline-success.active {
    background-color: #198754;
    border-color: #198754;
    color: white;
}

.tessera-statistics-container .progress-bar {
    transition: width 0.6s ease;
}

/* === FATTURE STATISTICS CONTAINER === */
.fatture-statistics-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 2rem;
    margin-top: 2rem;
}

.fatture-statistics-container h4 {
    color: #0d6efd;
    font-weight: 600;
}

.fatture-statistics-container .stats-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.fatture-statistics-container .stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.15);
}

.fatture-statistics-container .stats-card.border-primary:hover {
    border-color: #0d6efd;
}

.fatture-statistics-container .stats-card.border-success:hover {
    border-color: #198754;
}

.fatture-statistics-container .stats-card.border-info:hover {
    border-color: #0dcaf0;
}

.fatture-statistics-container .stats-card.border-warning:hover {
    border-color: #ffc107;
}

.fatture-statistics-container .btn-outline-primary {
    border-color: #0d6efd;
    color: #0d6efd;
}

.fatture-statistics-container .btn-outline-primary:hover,
.fatture-statistics-container .btn-outline-primary.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.fatture-statistics-container .progress-bar {
    transition: width 0.6s ease;
}
