:root {
    --primary: #3498db;
    --secondary: #2c3e50;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
}

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 56px;
}

/* Sidebar untuk desktop */
.sidebar {
    background-color: var(--secondary);
    color: white;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding-top: 70px;
    z-index: 1000;
    width: 250px;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.sidebar.mobile-sidebar {
    transform: translateX(-100%);
    width: 280px;
}

.sidebar.mobile-sidebar.show {
    transform: translateX(0);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    margin: 2px 10px;
    border-radius: 6px;
    transition: all 0.3s;
    border: none;
    text-align: left;
    width: calc(100% - 20px);
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateX(5px);
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.main-content {
    margin-left: 0;
    padding: 15px;
    transition: all 0.3s ease;
    min-height: calc(100vh - 56px);
}

@media (min-width: 992px) {
    .main-content {
        margin-left: 250px;
        padding: 20px;
    }
    
    .sidebar.mobile-sidebar {
        transform: translateX(0);
        width: 250px;
    }
    
    .mobile-only {
        display: none !important;
    }
}

/* Navbar mobile-friendly */
.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.mobile-menu-btn {
    border: none;
    background: none;
    font-size: 1.25rem;
    color: var(--dark);
    padding: 5px 10px;
}

.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--secondary);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
    height: 60px;
}

.card {
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
    border: none;
}

.section {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Overlay untuk mobile sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
}

.sidebar-overlay.show {
    display: block;
}

/* Shipping Label Styles */
.shipping-label {
    border: 2px solid #333;
    padding: 15px;
    font-family: 'Courier New', monospace;
    background: white;
    max-width: 800px;
    margin: 0 auto;
}

.label-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.label-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.courier-logo {
    background: #007bff;
    color: white;
    padding: 5px 15px;
    border-radius: 4px;
    font-weight: bold;
}

.label-body {
    margin-bottom: 15px;
}

.label-body h6 {
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 12px;
}

.label-body p {
    margin-bottom: 5px;
    font-size: 11px;
    line-height: 1.3;
}

.label-instructions {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 8px;
    margin-top: 10px;
    border-radius: 4px;
}

.label-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed #333;
    padding-top: 10px;
    font-size: 10px;
}

.barcode-placeholder {
    text-align: center;
    padding: 10px;
    border: 1px dashed #666;
}

.print-date {
    font-style: italic;
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    .shipping-label, .shipping-label * {
        visibility: visible;
    }
    .shipping-label {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        border: none;
        box-shadow: none;
    }
    .no-print {
        display: none !important;
    }
}

.label-preview {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    background: #f8f9fa;
}

/* Sisa CSS yang lain */
.card-stats {
    transition: transform 0.3s;
}

.card-stats:hover {
    transform: translateY(-3px);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.table-responsive {
    font-size: 0.9rem;
}

.table th {
    font-weight: 600;
    font-size: 0.85rem;
}

.btn-group-responsive {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 15px;
}

.btn-group-responsive .btn {
    flex: 1;
    min-width: 120px;
    font-size: 0.8rem;
    padding: 6px 12px;
}

.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .desktop-only {
        display: block;
    }
    
    .btn-group-responsive {
        flex-wrap: nowrap;
    }
}

.form-group {
    margin-bottom: 1rem;
}

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

.modal-dialog {
    margin: 10px;
}

.modal-content {
    border-radius: 10px;
}

@media (min-width: 576px) {
    .modal-dialog {
        margin: 1.75rem auto;
    }
}

.connection-status {
    position: fixed;
    bottom: 10px;
    right: 10px;
    padding: 8px 12px;
    border-radius: 5px;
    font-weight: 500;
    z-index: 1000;
    font-size: 0.8rem;
}

.toast-container {
    position: fixed;
    top: 70px;
    right: 10px;
    left: 10px;
    z-index: 9999;
}

@media (min-width: 576px) {
    .toast-container {
        left: auto;
        max-width: 350px;
    }
}

.product-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.action-buttons .btn {
    font-size: 0.75rem;
    padding: 4px 8px;
}

.payment-proof-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-top: 10px;
}

.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: var(--primary);
    background-color: #f8f9fa;
}

.upload-area i {
    font-size: 2rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.hide-on-mobile {
    display: table-cell;
}

@media (max-width: 768px) {
    .hide-on-mobile {
        display: none;
    }
}

.batch-actions {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Badge colors */
.badge.bg-warning {
    background-color: #ffc107 !important;
}

.badge.bg-info {
    background-color: #0dcaf0 !important;
}

.badge.bg-primary {
    background-color: #0d6efd !important;
}

.badge.bg-success {
    background-color: #198754 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
}

/* Custom scrollbar */
.label-preview::-webkit-scrollbar {
    width: 6px;
}

.label-preview::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.label-preview::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.label-preview::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Order Management Styles */
.customer-avatar {
    font-weight: 600;
}

.action-buttons .btn {
    margin: 0 2px;
    padding: 0.25rem 0.5rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.025);
}

/* Order Detail Modal Styles */
.order-detail-section {
    margin-bottom: 1.5rem;
}

.order-detail-section:last-child {
    margin-bottom: 0;
}

.product-image {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

/* Edit Order Modal Styles */
#editOrderItems input,
#editOrderItems select {
    font-size: 0.875rem;
}

#editOrderItems .form-control-sm {
    padding: 0.25rem 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }
    
    .action-buttons .btn {
        margin: 1px;
        padding: 0.2rem 0.4rem;
    }
}