.document-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.document-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
    border-left-width: 5px;
}

.document-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

/* Status-based border colors */
.document-card.status-missing,
.document-card.status-rejected {
    border-left-color: #dc3545; /* Red */
}
.document-card.status-uploaded {
    border-left-color: #0dcaf0; /* Blue */
}
.document-card.status-accepted {
    border-left-color: #198754; /* Green */
}
.document-card.status-na {
    border-left-color: #6c757d; /* Grey */
}


.document-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.document-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0;
}

.document-card .card-body {
    padding: 1.25rem;
    flex-grow: 1;
}

.document-card .card-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 40px; /* Ensure cards have similar height */
}

.document-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.status-badge {
    padding: 0.3em 0.6em;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 0.25rem;
    color: #92400e;
    text-transform: uppercase;
}

.badge-danger { background-color: #dc3545; }
.badge-info { background-color: #0dcaf0; }
.badge-success { background-color: #198754; }
.badge-secondary { background-color: #6c757d; }

.uploaded-file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: #e9f5ff;
    border: 1px solid #bde0fe;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.uploaded-file-info i {
    color: #0d6efd;
    flex-shrink: 0;
}
.uploaded-file-info span {
    overflow: hidden;
    text-overflow: ellipsis;
}


.expiration-date-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.expiration-date-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #495057;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.spacer {
    min-height: 1px;
}
