/* Timeline styling */
.timeline {
    position: relative;
    padding-left: 1.5rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    padding-left: 1.5rem;
    border-left: 2px solid #e9ecef;
}

.timeline-item:last-child {
    padding-bottom: 0;
    border-left-color: transparent;
}

.timeline-marker {
    position: absolute;
    left: -8px;
    top: 0;
    z-index: 1;
    font-size: 0.875rem;
}

/* Status colors */
.badge-diajukan {
    background-color: #fff3cd;
    color: #856404;
}
.badge-diproses {
    background-color: #cce5ff;
    color: #004085;
}
.badge-disetujui {
    background-color: #d4edda;
    color: #155724;
}
.badge-ditolak {
    background-color: #f8d7da;
    color: #721c24;
}
.badge-selesai {
    background-color: #e2e3e5;
    color: #383d41;
}

/* Status icon colors */
.text-diajukan {
    color: #ffc107;
}
.text-diproses {
    color: #17a2b8;
}
.text-disetujui {
    color: #28a745;
}
.text-ditolak {
    color: #dc3545;
}
.text-selesai {
    color: #6c757d;
}

.notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: 350px;
}

.notifications-container .alert {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Style untuk dropdown notifikasi */
.dropdown-menu {
    scrollbar-width: thin;
    scrollbar-color: #adb5bd #f8f9fa;
}

.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 10px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background-color: #adb5bd;
    border-radius: 10px;
}

/* Batasi tinggi maksimal dan tambahkan scroll */
.notification-dropdown {
    max-height: 400px;
    overflow-y: auto;
}

/* Style untuk item notifikasi */
.dropdown-item {
    white-space: normal;
    padding: 0.75rem 1.25rem;
}

/* Minimalist Loading Overlay Styles */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#loading-overlay.d-none {
    display: none !important;
}

.loader-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.minimalist-spinner {
    width: 45px;
    height: 45px;
    border: 3px solid rgba(255, 107, 53, 0.1);
    border-radius: 50%;
    border-top-color: #ff6b35;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.loader-text {
    font-family: 'Public Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #566a7f;
    letter-spacing: 0.5px;
    animation: pulse-text 2s infinite ease-in-out;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse-text {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Accessibility: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .minimalist-spinner {
        animation: spin 3s linear infinite;
    }
    .loader-text {
        animation: none;
    }
}

/* ==========================================================================
   Sidebar & Menu Optimization (v2 - No Truncation)
   ========================================================================== */

/* Optimasi Elemen Menu agar teks TIDAK terpotong (Wrap Text) */
.menu-vertical .menu-item .menu-link {
    display: flex !important;
    align-items: center;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}


.menu-vertical .menu-item .menu-link > div {
    flex: 1;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    font-weight: 500;
    word-break: break-word;
}

/* Styling Badge agar tidak menimpa arrow dropdown */
.menu-link .badge {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.4em 0.6em;
    min-width: 1.5rem;
    text-align: center;
    border-radius: 50rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #ff3e1d !important;
    color: #fff !important;
    z-index: 2;
}


/* Memperbaiki posisi arrow dropdown agar TIDAK tertimpa badge */
.menu-toggle::after {
    position: absolute !important;
    right: 1rem !important; /* Kunci posisi arrow di paling kanan */
    margin-left: 0 !important;
    top: 50%;
    transform: translateY(-50%);
}
