/* ===================================
   DOCUMENTS PAGE STYLING
   =================================== */

/* Search Bar */
.search-bar-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.search-input-group {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 20px;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: #3b82f6;
    border: 1.5px solid #3b82f6;
    padding: 9px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-btn:hover {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-50%) translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* Category Filter */
.category-filter {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.category-filter h5 {
    margin-bottom: 15px;
    font-weight: 700;
    color: #333;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-badge {
    padding: 8px 18px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.category-badge:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
    transform: translateY(-2px) !important;
}

.category-badge.active {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

/* Upload Button */
.upload-btn-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--primary-gradient) !important;
    color: white !important;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4) !important;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    z-index: 1000;
}

.upload-btn-float:hover {
    transform: scale(1.1) rotate(90deg) !important;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5) !important;
}

/* Document Cards Grid */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}
.document-card {
    background: #ffffff !important;
    border-radius: 16px !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    overflow: hidden !important;
    box-shadow: var(--card-shadow) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer;
}

.document-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: var(--hover-shadow) !important;
}

/* File Icon/Thumbnail */
.document-thumbnail {
    height: 180px;
    background: var(--primary-gradient) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.file-icon {
    font-size: 60px;
    opacity: 0.9;
}

.file-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #667eea;
}

/* Document Info */
.document-info {
    padding: 20px;
}

.document-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.document-description {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.document-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #999;
}

.document-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.document-stats {
    display: flex;
    gap: 12px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Tags */
.document-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.tag-badge {
    background: #f0f0f0;
    color: #667eea;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

/* Sidebar */
.documents-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.sidebar-card h5 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-item a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    display: block;
    transition: color 0.3s ease;
}

.popular-item a:hover {
    color: #667eea;
}

.popular-stats {
    display: flex;
    gap: 15px;
    margin-top: 5px;
    font-size: 12px;
    color: #999;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 80px;
    opacity: 0.3;
    margin-bottom: 20px;
}

.empty-state h4 {
    color: #666;
    margin-bottom: 10px;
}

.empty-state p {
    color: #999;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination {
    display: flex;
    gap: 8px;
}

.page-link {
    padding: 10px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: #667eea;
    color: white;
}

.page-link.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Responsive */
@media (max-width: 768px) {
    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .search-input {
        padding: 12px 40px 12px 40px;
    }

    .search-btn {
        padding: 8px 18px;
        font-size: 14px;
    }

    .upload-btn-float {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}