/* ===========================
   COLOR VARIABLES
   =========================== */
:root {
    --primary-green: #46c32d;
    --primary-red: #e1140a;
    --primary-blue: #3d91e7;
    --primary-yellow: #ffd000;
    --gradient-main: linear-gradient(135deg, #3d91e7 0%, #46c32d 100%);
    --gradient-accent: linear-gradient(135deg, #e1140a 0%, #ffd000 100%);
}


/* ===========================
   PAGE HEADING
   =========================== */
.container h3 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1a202c;
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.container h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: var(--gradient-main);
    border-radius: 2px;
}

.container h3 .text-warning {
    color: #1a202c !important;
    background: none;

}


/* ===========================
   MAIN CARD CONTAINER
   =========================== */
.card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(61, 145, 231, 0.12);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 12px 40px rgba(61, 145, 231, 0.18);
}

.card-body {
    padding: 2rem;
}


/* ===========================
   CONTROLS SECTION
   =========================== */
.d-flex.justify-content-between {
    gap: 1rem;
}

.d-flex.justify-content-between > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-select {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.5rem 2rem 0.5rem 1rem;
    font-weight: 600;
    color: #1a202c;
    transition: all 0.3s ease;
    background-color: white;
}

.form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(61, 145, 231, 0.1);
    outline: none;
}

.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.6rem 1rem;
    transition: all 0.3s ease;
    width: 250px;
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(61, 145, 231, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #a0aec0;
}


/* ===========================
   TABLE STYLES
   =========================== */
.table {
    border-radius: 12px;
    overflow: hidden;
    margin-top: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table thead {
    background: var(--gradient-main);
    color: white;
}

.table thead th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    padding: 1rem;
    border: none;
    vertical-align: middle;
}

.table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:hover {
    background: linear-gradient(to right, rgba(61, 145, 231, 0.05), transparent);
    transform: translateX(5px);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    color: #4a5568;
    font-size: 0.9rem;
}

.table tbody td:first-child {
    font-weight: 700;
    color: var(--primary-blue);
}

.table-bordered {
    border: none;
}

.table-bordered td,
.table-bordered th {
    border: 1px solid #e9ecef;
}


/* ===========================
   IMAGE THUMBNAIL
   =========================== */
.img-thumbnail {
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.25rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.img-thumbnail:hover {
    border-color: var(--primary-blue);
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(61, 145, 231, 0.2);
    z-index: 10;
    position: relative;
}


/* ===========================
   DOWNLOAD BUTTON (UNIFIED)
   =========================== */
.btn-download {
    border: 2px solid;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 140px; 
    transition: all 0.3s ease;
}

.btn-download i {
    font-size: 1.1rem;
}

/* PDF */
.btn-download.pdf {
    border-color: var(--primary-red);
    color: var(--primary-red);
}

.btn-download.pdf:hover {
    background: var(--gradient-accent);
    color: #fff;
    border-color: transparent;
}

/* CLOUD */
.btn-download.cloud {
    border-color: #0d6efd;
    color: #0d6efd;
}

.btn-download.cloud:hover {
    background: #0d6efd;
    color: #fff;
}



/* ===========================
   PAGINATION
   =========================== */
.d-flex.justify-content-between.mt-3 {
    padding-top: 1rem;
    border-top: 2px solid #f0f0f0;
}

.d-flex.justify-content-between.mt-3 > div:first-child {
    color: #718096;
    font-weight: 600;
    font-size: 0.9rem;
}

.pagination {
    gap: 0.5rem;
    margin: 0;
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-link {
    border: 2px solid #e2e8f0;
    color: var(--primary-blue);
    border-radius: 10px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 0 0.25rem;
}

.pagination .page-link:hover {
    background: var(--gradient-main);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(61, 145, 231, 0.3);
}

.pagination .page-item.active .page-link {
    background: var(--gradient-main);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(61, 145, 231, 0.3);
}

.pagination .page-item.disabled .page-link {
    background-color: #f7fafc;
    border-color: #e2e8f0;
    color: #a0aec0;
}


/* ===========================
   EMPTY STATE
   =========================== */
.text-muted {
    color: #a0aec0 !important;
    font-size: 1rem;
    padding: 2rem;
    font-style: italic;
}


/* ===========================
   RESPONSIVE STYLES
   =========================== */
@media (max-width: 992px) {
    .table {
        font-size: 0.85rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.75rem 0.5rem;
    }

    .img-thumbnail {
        width: 60px !important;
        height: 80px !important;
    }

    .btn-outline-danger {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .container h3 {
        font-size: 1.5rem;
    }

    .card-body {
        padding: 1.25rem;
    }

    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }

    .form-control {
        width: 100%;
    }

    /* Make table scrollable on mobile */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 800px;
    }

    .table thead th {
        font-size: 0.75rem;
        padding: 0.75rem 0.5rem;
    }

    .table tbody td {
        font-size: 0.8rem;
        padding: 0.75rem 0.5rem;
    }

    .img-thumbnail {
        width: 50px !important;
        height: 70px !important;
    }

    .btn-outline-danger {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }

    .btn-outline-danger i {
        font-size: 0.9rem;
    }

    .d-flex.justify-content-between.mt-3 {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .pagination {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .container h3 {
        font-size: 1.25rem;
    }

    .container h3::after {
        width: 80px;
    }
}


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

.card {
    animation: fadeIn 0.6s ease-out;
}

.table tbody tr {
    animation: fadeIn 0.4s ease-out;
}

.table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.table tbody tr:nth-child(4) { animation-delay: 0.2s; }
.table tbody tr:nth-child(5) { animation-delay: 0.25s; }
.table tbody tr:nth-child(6) { animation-delay: 0.3s; }
.table tbody tr:nth-child(7) { animation-delay: 0.35s; }
.table tbody tr:nth-child(8) { animation-delay: 0.4s; }
.table tbody tr:nth-child(9) { animation-delay: 0.45s; }
.table tbody tr:nth-child(10) { animation-delay: 0.5s; }





/* ===========================
   HOVER EFFECTS ENHANCEMENT
   =========================== */
.table tbody tr:hover .btn-outline-danger {
    transform: scale(1.05);
}

.table tbody tr:hover .img-thumbnail {
    border-color: var(--primary-blue);
}