
.page-content {
    padding: 2rem 0;
    width: 100%;
}

.page-title {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title h1 {
    color: #1a202c;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.page-title p {
    color: #64748b;
    font-size: 1.125rem;
    margin: 0;
}

/* Controls Section */
.controls-section {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-area {
    flex: 1;
    min-width: 300px;
}

.search-field {
    position: relative;
    max-width: 500px;
}

.search-field .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1rem;
    z-index: 2;
}

.search-field input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 2.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    background: white;
    transition: border-color 0.2s ease;
}

.search-field input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.clear-search {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.clear-search:hover {
    background-color: #f1f5f9;
}

.actions-area {
    display: flex;
    gap: 0.75rem;
}

.action-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-button:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background-color: #f8fafc;
}

.action-button:active {
    transform: translateY(1px);
}

/* Search Results */
.search-results {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.clear-button {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.clear-button:hover {
    background: #b91c1c;
}

/* Loading */
.loading-container {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Documents Area */
.documents-area {
    margin-top: 1rem;
}

/* Year Sections */
.year-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.year-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    transition: background-color 0.2s ease;
}

.year-header:hover {
    background: #f1f5f9;
}

.year-info h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.year-info p {
    color: #64748b;
    font-size: 0.875rem;
    margin: 0;
}

.year-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.document-count {
    background: #3b82f6;
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.expand-icon {
    color: #64748b;
    font-size: 1.25rem;
    transition: transform 0.2s ease;
}

.year-section.collapsed .expand-icon {
    transform: rotate(-90deg);
}

/* Documents Container */
.documents-container {
    padding: 1.5rem;
}

.year-section.collapsed .documents-container {
    display: none;
}

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

/* Document Cards */
.document-card {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.document-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.document-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    line-height: 1.4;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

.doc-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.doc-btn-view {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.doc-btn-view:hover {
    background: #166534;
    color: white;
}

.doc-btn-download {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

.doc-btn-download:hover {
    background: #1d4ed8;
    color: white;
}

/* Empty States */
.empty-message {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.empty-message i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.empty-message h3 {
    color: #374151;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-content {
        padding: 1rem 0;
    }
    
    .page-title h1 {
        font-size: 2rem;
    }
    
    .controls-section {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .search-area {
        min-width: auto;
    }
    
    .actions-area {
        justify-content: center;
    }
    
    .action-button {
        flex: 1;
        max-width: 150px;
        justify-content: center;
    }
    
    .year-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .year-stats {
        align-self: flex-end;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
    }
    
    .document-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .page-content {
        padding: 0.5rem 0;
    }
    
    .page-title h1 {
        font-size: 1.75rem;
    }
    
    .documents-container {
        padding: 1rem;
    }
    
    .action-button span {
        display: none;
    }
}
