body {
    background-color: #f8f9fa;
}

/* Card Styles */
.card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Alert Styles */
.alert {
    border-radius: 8px;
}

/* Certificate Details */
.certificate-details {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
    background-color: #f9f9f9; /* Light background for contrast */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Soft shadow for depth */
}

/* QR Code Container */
.qr-code-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
    justify-content: center;
}

.qr-code-container img {
    max-width: 200px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* Mobile Styles for QR Code */
@media (max-width: 768px) {
    .qr-code-container {
        flex-direction: column;
        align-items: center;
    }

    .certificate-details {
        text-align: center;
    }
}

/* General Form and Table Layout */
.form-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: flex-start;
}

.form-layout .form-control {
    height: calc(1.5em + 0.75rem + 2px); /* Compact height */
    font-size: 14px; /* Smaller font size */
}

/* Align pagination buttons */
#pagination-controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 14px;
}

table thead {
    background-color: #f8f9fa;
    font-weight: bold;
}

table th, table td {
    text-align: left;
    padding: 0.5rem;
    border: 1px solid #ddd;
}

table th.sortable {
    cursor: pointer;
    position: relative;
}

table th.sortable:hover {
    background-color: #e9ecef;
}

table th.sortable:after {
    content: '⇅';
    position: absolute;
    right: 10px;
    font-size: 10px;
    opacity: 0.5;
}
/* Sortable Headers - Ascending */
table th.sortable.asc:after {
    content: '↑';
    opacity: 1;
}
.sortable {
    cursor: pointer;
    position: relative;
}

.sortable.asc::after {
    content: " ▲";
    position: absolute;
    right: 8px;
}

.sortable.desc::after {
    content: " ▼";
    position: absolute;
    right: 8px;
}
/* Sortable Headers - Descending */
table th.sortable.desc:after {
    content: '↓';
    opacity: 1;
}

/* Highlight Active Sorted Column */
table th.sortable.active {
    background-color: #d4edda;
}
table tr:nth-child(even) {
    background-color: #f8f9fa;
}

table tr:hover {
    background-color: #f1f1f1;
}

/* Empty State */
#certificate-list td {
    text-align: center;
    color: #999;
}

/* Mobile Responsive Table */
@media (max-width: 768px) {
    .form-layout {
        flex-direction: column;
        align-items: stretch;
    }

    table th, table td {
        font-size: 12px;
        padding: 8px;
    }
}