/* Custom Styles untuk Sistem Jasa Pengiriman - Minimalis Design */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #333;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Sidebar Vertical */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: #4a4a4a;
    color: white;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.sidebar-brand:hover {
    color: rgba(255, 255, 255, 0.8);
    transform: translateX(5px);
}

.sidebar-brand i {
    font-size: 1.5rem;
}

.sidebar-user {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.user-role {
    font-size: 0.8rem;
}

.badge-admin {
    background: rgba(220, 53, 69, 0.8);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-kurir {
    background: rgba(255, 193, 7, 0.8);
    color: #333;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-operator {
    background: rgba(13, 110, 253, 0.8);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-customer {
    background: rgba(25, 135, 84, 0.8);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: rgba(255, 255, 255, 0.5);
}

.nav-item.active .nav-link {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: #0066ff;
    font-weight: 600;
}

.nav-link i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 6px;
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.logout-btn:hover {
    background: rgba(220, 53, 69, 0.3);
    color: white;
    transform: translateX(5px);
}

.logout-btn i {
    font-size: 1.2rem;
}

/* Main Content Area dengan Sidebar */
body.has-sidebar {
    margin: 0;
    padding: 0;
}

.main-content {
    margin-left: 260px;
    padding: 30px;
    min-height: 100vh;
    background: #f8f9fa;
    width: calc(100% - 260px);
    box-sizing: border-box;
}

.main-content .container-fluid {
    padding: 0;
    max-width: 100%;
}

/* Card Styles */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
    border-radius: 8px;
    background: white;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* Buttons */
.btn {
    transition: all 0.3s ease;
    border-radius: 6px;
    font-weight: 500;
    padding: 10px 20px;
}

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

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Tables */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table-hover tbody tr {
    transition: all 0.2s ease;
}

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

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.85rem;
}

/* Form Controls */
.form-control {
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

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

/* Responsive Sidebar */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px 15px;
    }
    
    body.has-sidebar {
        margin: 0;
    }
    
    .mobile-menu-toggle {
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        background: #4a4a4a;
        color: white;
        border: none;
        padding: 10px 15px;
        border-radius: 6px;
        font-size: 1.2rem;
        cursor: pointer;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    /* Responsive Tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        font-size: 0.9rem;
    }

    .table th,
    .table td {
        padding: 8px 6px;
        white-space: nowrap;
    }

    /* Responsive Cards */
    .card {
        margin-bottom: 15px;
    }

    /* Responsive Buttons */
    .btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .btn-sm {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 15px 10px;
    }

    .table {
        font-size: 0.85rem;
    }

    .table th,
    .table td {
        padding: 6px 4px;
    }

    .card-header h5 {
        font-size: 1rem;
    }

    .card-body {
        padding: 15px;
    }

    h2 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #333;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

