/* Custom CSS for Modern Layout */

:root {
    --primary-color: #1e3c72;
    --secondary-color: #2a5298;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --sidebar-width: 250px;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fb;
    padding-top: 56px;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

/* Sidebar */
.offcanvas-lg {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.offcanvas-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.offcanvas-title {
    color: white;
    font-weight: 600;
}

.user-info {
    background: rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.user-avatar {
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
}

.nav-link {
    color: rgba(255,255,255,0.8) !important;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: white !important;
    background: rgba(255,255,255,0.1);
}

.nav-link.active {
    color: white !important;
    background: rgba(255,255,255,0.15);
    border-right: 3px solid white;
}

.sidebar-menu .nav-link[data-bs-toggle="collapse"] {
    position: relative;
}

.sidebar-menu .nav-link[data-bs-toggle="collapse"] .bi-chevron-down {
    transition: transform 0.3s ease;
}

.sidebar-menu .nav-link[data-bs-toggle="collapse"][aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

.sidebar-divider {
    margin: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.5);
}

/* Main Content */
main {
    min-height: calc(100vh - 56px);
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    background: white;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    border-radius: 15px 15px 0 0 !important;
    padding: 1.25rem 1.5rem;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(42, 82, 152, 0.3);
}

/* Tables */
.table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    font-weight: 600;
    color: var(--dark-color);
}

.table tbody tr {
    transition: background-color 0.3s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.5rem 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(42, 82, 152, 0.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
}

/* Badges */
.badge {
    border-radius: 10px;
    padding: 0.35em 0.65em;
    font-weight: 500;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
}

/* Responsive Adjustments */
@media (min-width: 992px) {
    body {
        padding-top: 56px;
        padding-left: var(--sidebar-width);
    }
    
    .offcanvas-lg {
        transform: none;
        visibility: visible !important;
        position: fixed;
        top: 56px;
        left: 0;
        height: calc(100vh - 56px);
    }
    
    main {
        margin-left: var(--sidebar-width);
    }
}

@media (max-width: 991.98px) {
    .offcanvas-lg {
        top: 56px;
        height: calc(100vh - 56px);
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

/* Status Indicators */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-processing {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}

.status-draft {
    background-color: #f8f9fa;
    color: #6c757d;
}

.status-approved {
    background-color: #d4edda;
    color: #155724;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Tambahkan di style.css atau di bagian head */
.profile-info label {
    color: #6e707e;
    font-size: 0.9rem;
}

.profile-info p {
    font-size: 1.1rem;
    color: #2e2e2e;
    background-color: #f8f9fc;
    padding: 8px 12px;
    border-radius: 5px;
    border-left: 3px solid #4e73df;
}

.custom-switch .custom-control-label::before {
    width: 3rem;
}

.custom-switch .custom-control-label::after {
    width: 1.5rem;
}

/* Animasi untuk badge status */
.badge {
    transition: all 0.3s ease;
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Card hover effect */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}