.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 200" fill="rgba(255,255,255,0.1)"><rect x="100" y="30" width="80" height="80" rx="10"/><rect x="300" y="60" width="60" height="60" rx="8"/><rect x="700" y="20" width="70" height="70" rx="8"/><rect x="500" y="80" width="50" height="50" rx="6"/></svg>');
    background-size: 100% 100%;
    animation: float 15s linear infinite;
}

.jdih-intro {
    background: white;
    padding: 5rem 0;
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 3rem;
}

.intro-content h3 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.intro-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 1.5rem;
}

.intro-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-badge:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    color: white;
}

.intro-image {
    position: relative;
}

.intro-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.filter-section {
    background: #f8f9fa;
    padding: 3rem 0;
    border-bottom: 1px solid #eee;
}

.filter-container {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-group label {
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

.filter-select {
    padding: 0.8rem 1.2rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background: white;
    color: #2c3e50;
    font-size: 0.95rem;
    min-width: 180px;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-box {
    position: relative;
    min-width: 300px;
}

.search-box input {
    width: 100%;
    padding: 0.8rem 1.2rem 0.8rem 3rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.documents-section {
    background: white;
    padding: 5rem 0;
}

.document-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.category-card {
    background: white;
    border: 2px solid #f0f4f8;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.category-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.15);
}

.category-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
}

.category-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
}

.category-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.category-subtitle {
    opacity: 0.9;
    font-size: 0.95rem;
}

.document-count {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.document-list {
    padding: 0;
    margin: 0;
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
}

.document-item {
    padding: 1.5rem;
    border-bottom: 1px solid #f0f4f8;
    transition: background-color 0.3s ease;
    display: block;
    /* Ubah dari flex ke block */
    position: relative;
}

.document-item:hover {
    background: #f8f9fa;
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.document-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.document-info {
    flex: 1;
}

.document-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.document-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.document-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-start;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f4f8;
}

.action-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    min-width: 100px;
    
    /* PERBAIKAN UTAMA: Tetapkan tinggi tetap */
    height: 36px; /* Tinggi tetap */
    line-height: 1;
    
    /* Pastikan konten tidak membuat tombol bertambah tinggi */
    box-sizing: border-box;
    align-items: center; /* Pastikan konten tetap di tengah vertikal */
}

.action-btn span {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
    vertical-align: middle;
}

.btn-view {
    background: #3498db;
    color: white;
    border: 2px solid #3498db;
}

.btn-download {
    background: #27ae60;
    color: white;
    border: 2px solid #27ae60;
}

.action-btn .btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-btn i {
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination button {
    padding: 0.6rem 1rem;
    border: 2px solid #e9ecef;
    background: white;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pagination button:hover,
.pagination button.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

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

.statistics-section {
    background: #2c3e50;
    color: white;
    padding: 5rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.stat-title {
    font-size: 1rem;
    opacity: 0.9;
}

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

    .filter-container {
        flex-direction: column;
        gap: 1rem;
    }

    .search-box {
        min-width: auto;
        width: 100%;
    }

    .document-categories {
        grid-template-columns: 1fr;
    }

    .document-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .document-actions {
        width: 100%;
        justify-content: space-between;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

/* Styles untuk document description */
.document-description {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Enhanced meta items */
.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.meta-item i {
    font-size: 0.8rem;
    color: #999;
}

/* Loading state untuk category cards */
.category-card.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.category-card.loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 1.5s infinite;
    z-index: 1;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Enhanced button states */
.action-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    white-space: nowrap;
}

.action-btn::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;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn.loading {
    opacity: 0.7;
    pointer-events: none;
    cursor: not-allowed;
}

.action-btn.success {
    background: #27ae60 !important;
    color: white !important;
    border-color: #27ae60 !important;
}

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

/* Page info styles */
.page-info {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.page-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.page-stats span {
    padding: 0.4rem 0.8rem;
    background: white;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid #e9ecef;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.current-range {
    color: #667eea !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-color: #667eea !important;
}

/* Enhanced pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.pagination.visible {
    opacity: 1;
    transform: translateY(0);
}

.pagination button {
    padding: 0.6rem 1rem;
    border: 2px solid #e9ecef;
    background: white;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 44px;
    position: relative;
    overflow: hidden;
}

.pagination button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(102, 126, 234, 0.1),
        transparent
    );
    transition: left 0.3s;
}

.pagination button:hover::before {
    left: 100%;
}

.pagination button:hover,
.pagination button.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Empty state improvements */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
    animation: fadeInUp 0.5s ease;
}

.empty-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.empty-text h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #666;
}

.empty-text p {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.4;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }
}

/* Document count updating animation */
.document-count.updating {
    color: #667eea;
    transform: scale(1.05);
    transition: all 0.3s ease;
}

/* Enhanced hover effects */
.document-item {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.document-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.document-icon {
    transition: all 0.3s ease;
}

.document-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    /* Tambah margin bottom */
}

.document-item:hover .document-icon {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

/* Filter enhancements */
.filter-select:focus,
.search-box input:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Notification improvements */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    max-width: 400px;
    border-left: 4px solid #3498db;
    backdrop-filter: blur(10px);
}

.notification.show {
    transform: translateX(0);
}

.notification.notification-success {
    border-left-color: #27ae60;
    background: linear-gradient(
        135deg,
        rgba(39, 174, 96, 0.05) 0%,
        rgba(255, 255, 255, 0.95) 100%
    );
}

.notification.notification-error {
    border-left-color: #e74c3c;
    background: linear-gradient(
        135deg,
        rgba(231, 76, 60, 0.05) 0%,
        rgba(255, 255, 255, 0.95) 100%
    );
}

.notification.notification-warning {
    border-left-color: #f39c12;
    background: linear-gradient(
        135deg,
        rgba(243, 156, 18, 0.05) 0%,
        rgba(255, 255, 255, 0.95) 100%
    );
}

/* Responsive improvements */
@media (max-width: 768px) {
    .document-item {
        padding: 1rem;
    }

    .document-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .document-icon {
        align-self: flex-start;
    }

    .document-actions {
        width: 100%;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .action-btn {
        flex: 1;
        justify-content: center;
        min-width: auto;
        padding: 0.7rem 1rem;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .pagination button {
        min-width: 40px;
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .page-stats {
        flex-direction: column;
        gap: 0.5rem;
    }

    .page-stats span {
        text-align: center;
        width: 100%;
    }

    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }

    .notification.show {
        transform: translateY(0);
    }
}

/* Print styles */
@media print {
    .category-card,
    .document-item,
    .pagination,
    .filter-section,
    .notification {
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .action-btn {
        display: none;
    }

    .pagination {
        display: none;
    }

    .filter-section {
        display: none;
    }
}
