﻿/* ============================================
   AUDIT LOG SYSTEM - FOGLIO DI STILE UNICO
   Colore base: Blu (#2563eb)
   ============================================ */

/* === RESET E BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f4f8;
    color: #1e293b;
    line-height: 1.6;
}

/* === HEADER === */
.site-header {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    padding: 20px 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .site-header h1 {
        font-size: 24px;
        font-weight: 600;
    }

.header-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

/* === CONTAINER === */
.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

.container-small {
    max-width: 500px;
    margin: 0 auto;
}

/* === CARDS === */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    background: #f8fafc;
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #334155;
}

.card-body {
    padding: 20px;
}

/* === LOGIN PAGE === */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

    .login-header h1 {
        color: #1e293b;
        font-size: 28px;
        margin-bottom: 8px;
    }

    .login-header p {
        color: #64748b;
        font-size: 14px;
    }

/* === STATISTICS GRID === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #2563eb;
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 5px;
}

.stat-label {
    color: #64748b;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === FORMS === */
.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        color: #334155;
        font-weight: 500;
        font-size: 14px;
    }

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

    .form-control:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }

/* === BUTTONS === */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

    .btn-primary:hover {
        background: #1d4ed8;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    }

.btn-secondary {
    background: #64748b;
    color: white;
}

    .btn-secondary:hover {
        background: #475569;
    }

.btn-success {
    background: #10b981;
    color: white;
}

    .btn-success:hover {
        background: #059669;
    }

.btn-danger {
    background: #ef4444;
    color: white;
}

    .btn-danger:hover {
        background: #dc2626;
    }

.btn-block {
    width: 100%;
}

/* === FILTERS === */
.filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.button-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* === TABLES === */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

    .data-table thead {
        background: #f8fafc;
    }

    .data-table th {
        padding: 15px;
        text-align: left;
        font-weight: 600;
        color: #334155;
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-bottom: 2px solid #e2e8f0;
    }

    .data-table td {
        padding: 12px 15px;
        border-bottom: 1px solid #e2e8f0;
        font-size: 14px;
        color: #475569;
    }

    .data-table tr:hover {
        background: #f8fafc;
    }

/* === BADGES === */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* === ALERTS === */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #2563eb;
}

/* === PAGINATION === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 20px;
}

    .pagination a,
    .pagination span {
        display: inline-block;
        padding: 8px 14px;
        background: white;
        border: 1px solid #cbd5e1;
        border-radius: 6px;
        color: #2563eb;
        text-decoration: none;
        font-weight: 600;
        font-size: 14px;
        transition: all 0.3s;
    }

        .pagination a:hover {
            background: #2563eb;
            color: white;
            border-color: #2563eb;
        }

    .pagination span {
        background: #2563eb;
        color: white;
        border-color: #2563eb;
    }

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

    .empty-state h3 {
        font-size: 20px;
        color: #64748b;
        margin-bottom: 10px;
    }

    .empty-state p {
        font-size: 14px;
    }

/* === FOOTER === */
.site-footer {
    text-align: center;
    padding: 20px;
    color: #94a3b8;
    font-size: 13px;
    margin-top: 40px;
}

/* === CHAIN STATUS === */
.chain-status {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.chain-valid {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.chain-broken {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .filter-row {
        grid-template-columns: 1fr;
    }

    .button-row {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .data-table {
        font-size: 12px;
    }

        .data-table th,
        .data-table td {
            padding: 8px;
        }
}

/* === UTILITY CLASSES === */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}
