/* ===== SCROLLBAR MODERN (AUTO HIDE) ===== */

/* Chrome, Edge, Safari */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(229, 57, 53, 0);
    /* awalnya invisible */
    border-radius: 20px;
    transition: background 0.3s ease;
}

/* muncul saat hover */
body:hover::-webkit-scrollbar-thumb {
    background: rgba(229, 57, 53, 0.6);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(229, 57, 53, 0.9);
}

.legal-hero {
    background: linear-gradient(135deg, #e53935, #c62828);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

.legal-hero::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 1200 120"><path d="M0,0 Q300,60 600,30 T1200,0 L1200,120 L0,120 Z" fill="rgba(255,255,255,0.05)"/></svg>') no-repeat bottom;
    background-size: cover;
}

.legal-hero-content {
    position: relative;
    z-index: 1;
    color: white;
}

.legal-hero h1 {
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.legal-hero p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.btn-add-legal {
    background: linear-gradient(135deg, #66bb6a, #43a047);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.btn-add-legal:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(67, 160, 71, 0.4);
    color: white;
}

/* Stats Cards */
.stats-section {
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #e53935;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #e53935, #c62828);
    color: white;
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #42a5f5, #1e88e5);
    color: white;
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #66bb6a, #43a047);
    color: white;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.95rem;
}

/* Filter Section */
.filter-section {
    background: white;
    border-radius: 15px;
    padding: 20px 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    margin-bottom: 30px;
}

.filter-section .form-control,
.filter-section .form-select {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 10px 15px;
}

.btn-filter {
    background: linear-gradient(135deg, #e53935, #c62828);
    border: none;
    color: white;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.3);
    color: white;
}

.btn-reset {
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #666;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    background: #e0e0e0;
}

/* Documents Grid */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.document-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.document-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.document-preview {
    height: 200px;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.document-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.document-card:hover .document-preview img {
    transform: scale(1.1);
}

.document-preview .pdf-icon {
    font-size: 5rem;
    color: #e53935;
    opacity: 0.8;
}

.document-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #e53935, #c62828);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(229, 57, 53, 0.3);
}

.document-body {
    padding: 20px;
}

.document-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.document-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.document-meta i {
    color: #e53935;
}

.document-actions {
    display: flex;
    gap: 10px;
}

.btn-view {
    flex: 1;
    background: linear-gradient(135deg, #42a5f5, #1e88e5);
    border: none;
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.4);
    color: white;
}

.btn-edit {
    background: linear-gradient(135deg, #ffa726, #fb8c00);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 167, 38, 0.4);
}

.btn-delete {
    background: linear-gradient(135deg, #ef5350, #e53935);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.4);
}

/* Alert Custom */
.alert-success {
    background: linear-gradient(135deg, #66bb6a, #43a047);
    border: none;
    color: white;
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 4px 15px rgba(67, 160, 71, 0.3);
    margin-bottom: 30px;
}

.alert-success .btn-close {
    filter: brightness(0) invert(1);
}

/* Empty State */
.empty-state {
    background: white;
    border-radius: 15px;
    padding: 80px 40px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.empty-state i {
    font-size: 5rem;
    color: #e0e0e0;
    margin-bottom: 20px;
}

.empty-state h4 {
    color: #666;
    margin-bottom: 10px;
}

.empty-state p {
    color: #999;
    margin-bottom: 25px;
}

/* Pagination Custom */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination .page-link {
    color: #e53935;
    border: 1px solid #ddd;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: #e53935;
    color: white;
    border-color: #e53935;
}

.pagination .active .page-link {
    background: linear-gradient(135deg, #e53935, #c62828);
    border-color: #e53935;
}

/* Document Type Badges */
.type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 5px;
}

.type-pdf {
    background: linear-gradient(135deg, #ef5350, #e53935);
    color: white;
}

.type-image {
    background: linear-gradient(135deg, #42a5f5, #1e88e5);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .legal-hero {
        padding: 40px 0;
    }

    .legal-hero h1 {
        font-size: 1.8rem;
    }

    .documents-grid {
        grid-template-columns: 1fr;
    }

    .filter-section {
        padding: 15px;
    }

    .document-actions {
        flex-direction: column;
    }

    .btn-view {
        width: 100%;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.document-card {
    animation: fadeInUp 0.5s ease;
}

.document-card:nth-child(1) {
    animation-delay: 0.1s;
}

.document-card:nth-child(2) {
    animation-delay: 0.2s;
}

.document-card:nth-child(3) {
    animation-delay: 0.3s;
}