﻿/* Logs Page Styles */

.container-fluid {
    padding:90px 5% 0 5% ;
}

/* Table Column Widths */
.logs-table .col-timestamp {
    width: 180px;
}

.logs-table .col-user {
    width: 200px;
}

.logs-table .col-table {
    width: 150px;
}

.logs-table .col-entity {
    width: 150px;
}

.logs-table .col-action {
    width: 100px;
}

.logs-table .col-changes {
    min-width: 300px;
}

/* Table Cells */
.timestamp-cell {
    font-size: 0.875rem;
}

.user-cell {
    line-height: 1.4;
}

    .user-cell strong {
        color: #2c3e50;
        font-weight: 600;
    }

    .user-cell small {
        font-size: 0.8rem;
    }

.table-cell .badge {
    font-size: 0.85rem;
    padding: 0.4em 0.8em;
    font-weight: 500;
}

.entity-cell strong {
    color: #34495e;
    font-size: 0.95rem;
}

.action-badge {
    font-size: 0.85rem;
    padding: 0.5em 0.9em;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Changes Cell Styling */
.changes-cell {
    font-size: 0.9rem;
    line-height: 1.6;
}

.changes-content {
    padding: 0.5rem 0;
}

.change-item {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.field-name {
    color: #6c757d;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: capitalize;
}

.field-value {
    color: #212529;
}

.old-value {
    color: #dc3545;
}

    .old-value del {
        text-decoration: line-through;
        opacity: 0.8;
    }

.new-value {
    color: #28a745;
}

.deleted-value {
    color: #6c757d;
}

/* Empty State */
.empty-state {
    padding: 3rem 1rem !important;
}

    .empty-state i {
        color: #adb5bd;
    }

    .empty-state p {
        color: #6c757d;
        font-size: 1rem;
    }

/* Pagination */
.pagination-container {
    background-color: #f8f9fa;
}

.pagination .page-link {
    color: #0d6efd;
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
    margin: 0 0.125rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

    .pagination .page-link:hover {
        background-color: #e9ecef;
        border-color: #dee2e6;
    }

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
    font-weight: 600;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
    opacity: 0.5;
}

/* Card Styling */
.card {
    border: none;
    border-radius: 0.5rem;
}

.card-header {
    border-radius: 0.5rem 0.5rem 0 0 !important;
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 1rem;
}

/* Filter Section */
.form-label {
    margin-bottom: 0.5rem;
    color: #495057;
    font-size: 0.9rem;
}

.form-select,
.form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

    .form-select:focus,
    .form-control:focus {
        border-color: #86b7fe;
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    }

/* Buttons */
.btn {
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .btn i {
        margin-right: 0.5rem;
    }

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

    .btn-primary:hover {
        background-color: #0b5ed7;
        border-color: #0a58ca;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(13, 110, 253, 0.2);
    }

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(25, 135, 84, 0.2);
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.2);
}

.btn-outline-secondary:hover {
    transform: translateY(-1px);
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Badge Styling */
.badge {
    font-weight: 500;
    letter-spacing: 0.3px;
}

    .badge.fs-6 {
        font-size: 1rem !important;
        padding: 0.5rem 1rem;
    }

/* Table Hover Effect */
.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logs-table .col-timestamp,
    .logs-table .col-user,
    .logs-table .col-table,
    .logs-table .col-entity,
    .logs-table .col-action {
        width: auto;
    }

    .changes-cell {
        font-size: 0.85rem;
    }

    .change-item {
        padding: 0.4rem;
    }

    .btn {
        margin-bottom: 0.5rem;
        width: 100%;
    }
}

/* Animation for new rows */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.table tbody tr {
    animation: fadeIn 0.3s ease-in-out;
}

/* Scrollbar Styling */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

    .table-responsive::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
