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

.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: none;
}

.card-header {
    background-color: #0d6efd;
    color: white;
    font-weight: 600;
}

.sticky-toggle.locked i {
    color: #dc3545;
}

.sticky-toggle:not(.locked) i {
    color: #6c757d;
}

.sticky-toggle.locked {
    color: #dc3545;
}

#results .barcode-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    background: white;
    transition: transform 0.2s;
}

#results .barcode-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.barcode-container {
    background: white;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 10px;
    text-align: center;
}

.barcode-container canvas {
    max-width: 100%;
    height: auto;
}

.barcode-canvas-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin-bottom: 10px;
}

.barcode-display {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.barcode-display:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.barcode-resize-controls {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.barcode-scale-display {
    min-width: 60px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
}

.barcode-info {
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 10px;
}

.btn-download {
    margin: 5px;
}

.form-label {
    font-weight: 500;
}

input[readonly].sticky {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.badge-sticky {
    font-size: 0.7em;
    margin-left: 5px;
}

/* Real DL barcode dimensions - approximately 2.5" x 1" */
.barcode-container canvas {
    width: 240px;  /* ~2.5 inches at 96 DPI */
    height: 96px;  /* ~1 inch at 96 DPI */
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .navbar-nav {
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0;
    }
    
    .d-flex.gap-3 {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    
    #userCredits {
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h5 {
        font-size: 1.1rem;
    }
    
    .form-control,
    .form-select {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
    
    .barcode-container canvas {
        width: 100%;
        max-width: 240px;
        height: auto;
    }
    
    .row.g-3 > * {
        margin-bottom: 1rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-content {
        font-size: 0.9rem;
    }
    
    .dropdown-menu {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1rem;
    }
    
    .card-header h5 {
        font-size: 1rem;
    }
    
    .col-md-4,
    .col-md-6,
    .col-md-3 {
        margin-bottom: 1rem;
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-group .btn {
        width: auto;
    }
    
    .sticky-toggle {
        font-size: 0.8rem;
    }
    
    .barcode-item {
        margin-bottom: 1rem;
    }
}

/* Improve touch targets on mobile */
@media (max-width: 768px) {
    .btn,
    .nav-link,
    .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
    }
}

/* Ensure tables are scrollable on mobile */
@media (max-width: 768px) {
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
        display: block;
        width: 100%;
    }
    
    .table {
        min-width: 600px;
    }
}