/* Repository SATU - Main CSS */
/* Version: 1.0.0 */

/* ============================================
   Root Variables
   ============================================ */
:root {
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --danger-color: #f56565;
    --warning-color: #ed8936;
    --info-color: #4299e1;
    --dark-color: #2d3748;
    --light-color: #f7fafc;
    --gray-color: #a0aec0;
}

/* ============================================
   Global Styles
   ============================================ */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #2d3748;
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.text-justify {
    text-align: justify;
}

/* ============================================
   Navbar Styles
   ============================================ */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ============================================
   Card Styles
   ============================================ */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.25rem;
}

.card-footer {
    background-color: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ============================================
   Button Styles
   ============================================ */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 100%, var(--success-color) 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-outline-primary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-color: transparent;
}

/* ============================================
   Form Styles
   ============================================ */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.625rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* ============================================
   Table Styles
   ============================================ */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    border-top: none;
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* ============================================
   Alert Styles
   ============================================ */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.alert-dismissible .btn-close {
    padding: 1.25rem;
}

/* ============================================
   Footer Styles
   ============================================ */
footer {
    margin-top: auto;
}

footer a:hover {
    color: white !important;
    text-decoration: underline !important;
}

/* ============================================
   Pagination Styles
   ============================================ */
.pagination {
    margin-bottom: 0;
}

.page-link {
    border-radius: 8px;
    margin: 0 3px;
    color: var(--primary-color);
    border: 1px solid #e2e8f0;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-color: transparent;
}

/* ============================================
   Badge Styles
   ============================================ */
.badge {
    padding: 0.35rem 0.75rem;
    font-weight: 500;
    border-radius: 20px;
}

.badge-lg {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* ============================================
   Custom Components
   ============================================ */
.stat-card {
    border-radius: 12px;
    transition: transform 0.3s ease;
    cursor: default;
}

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

.hover-card {
    transition: all 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

/* Search box */
.search-box {
    position: relative;
}

.search-box .form-control {
    padding-left: 2.5rem;
}

.search-box .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-color);
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ============================================
   Responsive Styles
   ============================================ */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* ============================================
   Enhanced Table Styles untuk Admin Dokumen
   ============================================ */
.table-dokumen {
    font-size: 0.875rem;
}

.table-dokumen th {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    color: white;
    font-weight: 600;
    padding: 12px 8px;
    vertical-align: middle;
    white-space: nowrap;
}

.table-dokumen td {
    padding: 10px 8px;
    vertical-align: middle;
    word-wrap: break-word;
}

.table-dokumen .td-judul {
    max-width: 300px;
    word-wrap: break-word;
    white-space: normal;
}

.table-dokumen .td-judul a {
    color: var(--dark-color);
    display: block;
    line-height: 1.4;
}

.table-dokumen .td-judul a:hover {
    color: var(--primary-color);
}

.table-actions {
    white-space: nowrap;
    text-align: center;
}

.btn-action {
    padding: 4px 8px;
    font-size: 12px;
    margin: 0 2px;
    border-radius: 4px;
}

.btn-action i {
    font-size: 12px;
}

/* Badge styling lebih rapi */
.badge {
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 20px;
}

/* Responsive table untuk mobile */
@media (max-width: 768px) {
    .table-dokumen th,
    .table-dokumen td {
        padding: 8px 4px;
        font-size: 0.75rem;
    }
    
    .table-dokumen .td-judul {
        max-width: 150px;
    }
    
    .btn-action {
        padding: 2px 4px;
    }
    
    .btn-action i {
        font-size: 10px;
    }
}

/* Striped rows untuk tabel */
.table-dokumen tbody tr:nth-child(even) {
    background-color: #f8f9fc;
}

.table-dokumen tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.08);
}

/* Card styling */
.card {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card-body {
    padding: 1.25rem;
}

/* Filter form styling */
.card.mb-4 .card-body {
    background-color: #f8f9fa;
}

/* Pagination styling */
.pagination .page-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.pagination .active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-color: transparent;
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .navbar,
    footer,
    .btn,
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ======================================================
   6 OPSI BACKGROUND GRADIENT UNTUK HERO SECTION
   ====================================================== */

/* Opsi 1: Biru Muda Solid */
.bg-soft-blue-solid {
    background-color: #7cb9e8;
    color: #ffffff;
}

/* Opsi 2: Gradient Biru Muda ke Putih */
.bg-gradient-blue-white {
    background: linear-gradient(135deg, #89CFF0 0%, #FFFFFF 100%);
    color: #2c3e50;
}

/* Opsi 3: Gradient Putih ke Biru Muda (Rekomendasi) */
.bg-gradient-white-blue {
    background: linear-gradient(135deg, #FFFFFF 0%, #D6EAF8 50%, #A9CCE3 100%);
    color: #2c3e50;
}

/* Opsi 4: Biru Muda dengan Opacity (Seperti Awan) */
.bg-soft-blue-opacity {
    background: rgba(102, 126, 234, 0.15);
    backdrop-filter: blur(2px);
    color: #2c3e50;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
}

/* Opsi 5: Campuran Biru Muda dengan White Smoke (AliceBlue) */
.bg-mix-blue-white {
    background: #f0f8ff; /* AliceBlue */
    color: #2c3e50;
    border-bottom: 3px solid #89CFF0;
}

/* Opsi 6: Gradient Biru Muda Lembut ke Biru Langit */
.bg-gradient-sky-blue {
    background: linear-gradient(135deg, #a8d8ff 0%, #6bb5ff 50%, #4a90e2 100%);
    color: #ffffff;
}

/* Tambahan: Gradient Ungu ke Biru (seperti default) */
.bg-gradient-purple-blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

/* Class tambahan untuk teks gelap jika diperlukan */
.text-dark-custom {
    color: #2c3e50;
}

.text-white-custom {
    color: #ffffff;
}

/* ============================================
   VARIANT THEMES FOR ADMIN TABLE
   ============================================ */

/* ----- THEME 1: BIRU TUA (DARK BLUE) ----- */
.theme-dark-blue .table-dokumen th {
    background: linear-gradient(135deg, #0B2447 0%, #1B4F72 100%);
    color: white;
}
.theme-dark-blue .btn-primary {
    background: linear-gradient(135deg, #0B2447 0%, #1B4F72 100%);
}
.theme-dark-blue .btn-primary:hover {
    background: linear-gradient(135deg, #1B4F72 0%, #0B2447 100%);
}
.theme-dark-blue .pagination .active .page-link {
    background: linear-gradient(135deg, #0B2447 0%, #1B4F72 100%);
}

/* ----- THEME 2: BIRU MUDA (LIGHT BLUE) ----- */
.theme-light-blue .table-dokumen th {
    background: linear-gradient(135deg, #89CFF0 0%, #A9CCE3 100%);
    color: #2c3e50;
}
.theme-light-blue .btn-primary {
    background: linear-gradient(135deg, #89CFF0 0%, #A9CCE3 100%);
    color: #2c3e50;
}
.theme-light-blue .btn-primary:hover {
    background: linear-gradient(135deg, #A9CCE3 0%, #89CFF0 100%);
}
.theme-light-blue .pagination .active .page-link {
    background: linear-gradient(135deg, #89CFF0 0%, #A9CCE3 100%);
}

/* ----- THEME 3: PUTIH (WHITE) ----- */
.theme-white .table-dokumen th {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    color: #333333;
    border-bottom: 2px solid #ddd;
}
.theme-white .btn-primary {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    color: #333333;
    border: 1px solid #ccc;
}
.theme-white .btn-primary:hover {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}
.theme-white .btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ccc;
}
.theme-white .pagination .active .page-link {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    color: #333;
    border-color: #ccc;
}

/* ----- THEME 4: HITAM (BLACK) ----- */
.theme-black .table-dokumen th {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    color: white;
}
.theme-black .btn-primary {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
}
.theme-black .btn-primary:hover {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
}
.theme-black .btn-secondary {
    background: #333333;
    color: white;
    border: none;
}
.theme-black .btn-secondary:hover {
    background: #444444;
}
.theme-black .pagination .active .page-link {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
}
.theme-black .card {
    background-color: #1a1a1a;
    color: white;
}
.theme-black .card-body {
    background-color: #1a1a1a;
}
.theme-black .table {
    color: white;
}
.theme-black .table td {
    background-color: #1a1a1a;
    color: #e0e0e0;
}
.theme-black .table tbody tr:nth-child(even) {
    background-color: #252525;
}
.theme-black .form-control,
.theme-black .form-select {
    background-color: #333;
    color: white;
    border-color: #555;
}

/* ----- THEME 5: HITAM AGAK MUDA (DARK GRAY) ----- */
.theme-dark-gray .table-dokumen th {
    background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
    color: white;
}
.theme-dark-gray .btn-primary {
    background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
}
.theme-dark-gray .btn-primary:hover {
    background: linear-gradient(135deg, #3a3a3a 0%, #2d2d2d 100%);
}
.theme-dark-gray .pagination .active .page-link {
    background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
}

/* ----- THEME 6: ABU-ABU GELAP (GRAY DARK) ----- */
.theme-gray-dark .table-dokumen th {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: white;
}
.theme-gray-dark .btn-primary {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}
.theme-gray-dark .btn-primary:hover {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
}
.theme-gray-dark .pagination .active .page-link {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
}

/* ----- THEME 7: ABU-ABU MUDA (LIGHT GRAY) ----- */
.theme-light-gray .table-dokumen th {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
    color: #2d3748;
}
.theme-light-gray .btn-primary {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
    color: #2d3748;
}
.theme-light-gray .btn-primary:hover {
    background: linear-gradient(135deg, #cbd5e0 0%, #e2e8f0 100%);
}
.theme-light-gray .pagination .active .page-link {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
    color: #2d3748;
}

/* Tombol Reset (btn-secondary) untuk semua tema */
.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}
.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}