/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Banner Section - Removed */


/* ===== HEADER & NAVIGATION ===== */
.header {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-menu {
    display: flex;
    gap: 1rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #fbbf24;
}

.nav-auth-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-auth {
    display: flex;
    gap: 10px;
}

.auth-link {
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.auth-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.login-btn {
    background-color: #fbbf24;
    color: #333;
}

.login-btn:hover {
    background-color: #f59e0b;
}

/* Profile Menu Styles */
.profile-menu {
    position: relative;
}

.profile-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 200px;
    display: none;
    flex-direction: column;
    padding: 8px 0;
    margin-top: 10px;
    z-index: 1000;
}

.profile-dropdown.show {
    display: flex;
}

.dropdown-item {
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f5f5f5;
    color: #c62828;
}

.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 8px 0;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.mobile-auth {
    display: none;
}

/* Profile Menu */
.profile-menu {
    position: relative;
}

.profile-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.profile-dropdown.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-item:first-child {
    border-radius: 10px 10px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 10px 10px;
}

.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 5px 0;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    padding: 30px 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Page Header */
.page-header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 15px;
    margin-bottom: 30px;
}

.page-title {
    font-size: 2.5rem;
    color: #c62828;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.page-title i {
    color: #c62828;
}

.page-description {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Grid Layout */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

/* ===== FILTER SECTION ===== */
.filter-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 2px solid #c62828;
}

.filter-header {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c62828;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.filter-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-select {
    flex: 1;
    min-width: 200px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    color: #333;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
}

.filter-select:focus {
    outline: none;
    border-color: #c62828;
}

.filter-btn {
    padding: 12px 30px;
    background: #c62828;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.filter-btn:hover {
    background: #b71c1c;
}

/* ===== DOCUMENTS LIST ===== */
.documents-section {
    min-width: 0;
}

.documents-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.documents-list-header h2 {
    font-size: 1.3rem;
    color: #333;
}

.document-count {
    background: #c62828;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.documents-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Document Card */
.document-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.document-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.document-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.document-type-badge {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.document-type-badge.luat {
    background: #c62828;
}

.document-type-badge.nghi-dinh {
    background: #1565c0;
}

.document-type-badge.nghi-quyet {
    background: #2e7d32;
}

.document-type-badge.thong-tu {
    background: #f57c00;
}

.document-type-badge.quyet-dinh {
    background: #7b1fa2;
}

.document-number {
    color: #666;
    font-size: 0.9rem;
}

.document-title {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.5;
}

.document-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.document-category,
.document-issuer {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
}

.document-category i,
.document-issuer i {
    color: #999;
}

.document-actions {
    display: flex;
    gap: 10px;
}

.btn-view {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #c62828;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-view:hover {
    background: #b71c1c;
}

.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border: none;
    border-radius: 8px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: #e0e0e0;
    color: #333;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
    color: #666;
    gap: 15px;
}

.loading-spinner i {
    font-size: 2rem;
    color: #c62828;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px;
    background: white;
    border-radius: 15px;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

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

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

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination-btn {
    padding: 10px 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-btn:hover:not(:disabled) {
    background: #c62828;
    color: white;
    border-color: #c62828;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: #c62828;
    color: white;
    border-color: #c62828;
}

/* ===== SIDEBAR ===== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 2px solid #c62828;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c62828;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Statistics Card */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 10px;
    border-left: 3px solid #c62828;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #c62828;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* Recent Updates Card */
.recent-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recent-item {
    display: flex;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.recent-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.recent-icon {
    width: 40px;
    height: 40px;
    background: #fce4ec;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.recent-icon i {
    color: #c62828;
}

.recent-info {
    flex: 1;
    min-width: 0;
}

.recent-title {
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-year {
    font-size: 0.85rem;
    color: #999;
}

/* Categories Card */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f8f8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.category-item:hover {
    background: #fce4ec;
}

.category-name {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
}

.category-count {
    background: #c62828;
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===== FOOTER ===== */
.footer {
    background: #1f2937;
    color: #fff;
    padding: 1.5rem 0;
    text-align: center;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content p {
    font-size: 0.9rem;
    color: #9ca3af;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
        flex-direction: column;
        padding: 20px;
        transition: left 0.3s;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-auth {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }

    .desktop-auth {
        display: none;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .filter-controls {
        flex-direction: column;
    }

    .filter-select {
        min-width: 100%;
    }

    .document-header {
        flex-direction: column;
        gap: 10px;
    }

    .document-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .sidebar {
        grid-template-columns: 1fr;
    }
}
