
.documents-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1.5rem;
padding: 1rem 0;
}

.document-card {
background: #fff;
border-radius: 12px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
overflow: hidden;
cursor: pointer;
border: 1px solid #e9ecef;

/* NEW: Garantir altura uniforme e flexbox */
display: flex;
flex-direction: column;
height: 100%;
}

.document-cover {
width: 100%;
height: 200px;
background: linear-gradient(135deg, #07294d 0%, #0891b2 100%);
display: flex;
align-items: center;
justify-content: center;
position: relative;
overflow: hidden;
flex-shrink: 0;
}

.document-info {
padding: 1.5rem;

/* NEW: Cresce para ocupar o espaço restante */
flex-grow: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
}

.document-actions {
padding: 1rem 1.5rem;
background: #f8f9fa;
border-top: 1px solid #e9ecef;

/* NEW: Fixar na base */
flex-shrink: 0;
display: flex;
justify-content: space-between;
align-items: center;
}

 .document-card {
     background: #fff;
     border-radius: 12px;
     box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
     transition: all 0.3s ease;
     overflow: hidden;
     cursor: pointer;
     border: 1px solid #e9ecef;
 }

 .document-card:hover {
     transform: translateY(-5px);
     box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
     border-color: #007bff;
 }

 .document-cover {
     width: 100%;
     height: 200px;
     background: linear-gradient(135deg, #07294d 0%, #0891b2 100%);
     display: flex;
     align-items: center;
     justify-content: center;
     position: relative;
     overflow: hidden;
 }

 .document-cover img {
     width: 100%;
     height: 100%;
     object-fit: cover;
 }

 .document-cover.no-cover {
     background: linear-gradient(135deg, #07294d 0%, #0891b2 100%);
 }

 .document-cover.no-cover::before {
     content: '\f15b';
     font-family: 'Font Awesome 6 Free';
     font-weight: 900;
     font-size: 4rem;
     color: rgba(255, 255, 255, 0.8);
 }

 .document-info {
     padding: 1.5rem;
 }

 .document-title {
     font-size: 1.1rem;
     font-weight: 600;
     color: #2c3e50;
     margin-bottom: 0.5rem;
     line-height: 1.4;
     display: -webkit-box;
     -webkit-line-clamp: 2;
     -webkit-box-orient: vertical;
     overflow: hidden;
 }

 .document-url {
     font-size: 0.85rem;
     color: #6c757d;
     text-decoration: none;
     word-break: break-all;
     display: -webkit-box;
     -webkit-line-clamp: 1;
     -webkit-box-orient: vertical;
     overflow: hidden;
 }

 .document-actions {
     padding: 1rem 1.5rem;
     background: #f8f9fa;
     border-top: 1px solid #e9ecef;
     display: flex;
     justify-content: space-between;
     align-items: center;
 }

 .btn-open {
     background: linear-gradient(45deg, #007bff, #0056b3);
     border: none;
     color: white;
     padding: 0.5rem 1rem;
     border-radius: 6px;
     font-size: 0.9rem;
     transition: all 0.3s ease;
 }

 .btn-open:hover {
     background: linear-gradient(45deg, #0056b3, #004085);
     transform: translateY(-1px);
     color: white;
 }

 .document-type {
     font-size: 0.75rem;
     background: #e9ecef;
     color: #495057;
     padding: 0.25rem 0.5rem;
     border-radius: 12px;
     text-transform: uppercase;
     letter-spacing: 0.5px;
 }

 .search-container {
     margin-bottom: 2rem;
 }

 .search-input {
     border-radius: 25px;
     padding: 0.75rem 1.25rem;
     border: 2px solid #e9ecef;
     transition: border-color 0.3s ease;
 }

 .search-input:focus {
     border-color: #007bff;
     box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
 }

 .documents-header {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 2rem;
     flex-wrap: wrap;
     gap: 1rem;
 }

 .documents-count {
     color: #6c757d;
     font-size: 0.9rem;
 }

 @media (max-width: 768px) {
     .documents-grid {
         grid-template-columns: 1fr;
         gap: 1rem;
     }

     .documents-header {
         flex-direction: column;
         align-items: stretch;
     }
 }