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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    padding-bottom: 20px;
}

.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.warehouse-display {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.warehouse-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    background: #2563eb;
    cursor: pointer;
    text-align: center;
    padding: 0.75rem 1.5rem;
    border: 2px solid #1d4ed8;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
    display: inline-block;
}

.warehouse-name:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.warehouse-name:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

.nav-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.nav-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(37, 99, 235, 0.15);
    color: #2563eb;
}

.nav-btn.active {
    background: rgba(37, 99, 235, 0.2);
    color: #1d4ed8;
    font-weight: 600;
}

.page {
    display: none !important;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.page.active {
    display: block !important;
}

.warehouse-selection.page.active {
    display: flex !important;
    align-items: flex-start;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding-top: 4rem;
}

.warehouse-selection-container {
    text-align: center;
    max-width: 800px;
    width: 100%;
    padding: 2rem;
    margin: 0 auto;
}

.warehouse-selection-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 3rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.warehouse-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    max-width: 700px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.warehouse-btn {
    flex: 0 0 300px;
    min-width: 280px;
    max-width: 300px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 3rem 2rem;
    cursor: pointer;
    font-size: 1.8rem;
    font-weight: 600;
    color: #1f2937;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.warehouse-btn[data-warehouse="NEW JERSEY"] {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(30, 64, 175, 0.05) 100%);
    border-color: rgba(37, 99, 235, 0.2);
}

.warehouse-btn[data-warehouse="TEXAS"] {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.08) 0%, rgba(185, 28, 28, 0.05) 100%);
    border-color: rgba(220, 38, 38, 0.2);
}

.warehouse-btn:hover {
    border-color: #2563eb;
    background: #f8fafc;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    transform: translateY(-2px);
}

.warehouse-btn[data-warehouse="NEW JERSEY"]:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(30, 64, 175, 0.08) 100%);
    border-color: rgba(37, 99, 235, 0.4);
}

.warehouse-btn[data-warehouse="TEXAS"]:hover {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.12) 0%, rgba(185, 28, 28, 0.08) 100%);
    border-color: rgba(220, 38, 38, 0.4);
}

.warehouse-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.warehouse-btn-text {
    position: relative;
    z-index: 1;
}

.page-title {
    color: #333;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 600;
}

.buttons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 2rem 0;
    max-width: 1400px;
    margin: 0 auto;
}

.route-btn {
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 2rem 1.5rem;
    cursor: pointer;
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

/* Route button colors - using more transparent, professional tones */
.route-btn[data-color="blue"] {
    background: rgba(37, 99, 235, 0.88);
}

.route-btn[data-color="green"] {
    background: rgba(22, 163, 74, 0.88);
}

.route-btn[data-color="black"] {
    background: rgba(31, 41, 55, 0.92);
}

.route-btn[data-color="purple"] {
    background: rgba(147, 51, 234, 0.88);
}

.route-btn[data-color="orange"] {
    background: rgba(234, 88, 12, 0.88);
}

.route-btn[data-color="pink"] {
    background: rgba(236, 72, 153, 0.88);
}

.route-btn[data-color="brown"] {
    background: rgba(146, 64, 14, 0.88);
}

.route-btn[data-color="silver"] {
    background: rgba(107, 114, 128, 0.88);
}

.route-btn[data-color="lightblue"] {
    background: rgba(14, 165, 233, 0.88);
}

.route-btn[data-color="red"] {
    background: rgba(220, 38, 38, 0.88);
}

.route-btn[data-color="cyan"] {
    background: rgba(6, 182, 212, 0.88);
}

.route-btn[data-color="navy"] {
    background: rgba(30, 58, 138, 0.88);
}

.route-btn[data-color="teal"] {
    background: rgba(20, 184, 166, 0.88);
}

.route-btn[data-color="coral"] {
    background: rgba(255, 127, 80, 0.88);
}

.route-btn[data-color="lime"] {
    background: rgba(132, 204, 22, 0.88);
}

.route-btn[data-color="amber"] {
    background: rgba(245, 158, 11, 0.88);
}

.route-btn[data-color="emerald"] {
    background: rgba(16, 185, 129, 0.88);
}

.route-btn[data-color="rose"] {
    background: rgba(244, 63, 94, 0.88);
}

.route-btn[data-color="plum"] {
    background: rgba(147, 51, 234, 0.88);
}

.route-btn[data-color="slateblue"] {
    background: rgba(106, 90, 205, 0.88);
}

.route-btn[data-color="slategray"] {
    background: rgba(112, 128, 144, 0.88);
}

.route-btn[data-color="goldenrod"] {
    background: rgba(218, 165, 32, 0.88);
}

.route-btn[data-color="darkolivegreen"] {
    background: rgba(85, 107, 47, 0.88);
}

.route-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.route-btn:hover::before {
    left: 100%;
}

.route-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    opacity: 1;
    border-color: rgba(0, 0, 0, 0.2);
}

.route-btn:active {
    transform: translateY(-1px);
}

.route-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.route-name {
    position: relative;
    z-index: 1;
}

.management-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    position: relative;
}

.stat-decrement-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 38px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.stat-decrement-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.7);
    transform: scale(1.1);
}

.stat-decrement-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.stat-card[data-color="blue"] {
    background: #2563eb;
}

.stat-card[data-color="green"] {
    background: #16a34a;
}

.stat-card[data-color="black"] {
    background: #1f2937;
}

.stat-card[data-color="purple"] {
    background: #9333ea;
}

.stat-card[data-color="orange"] {
    background: #ea580c;
}

.stat-card[data-color="pink"] {
    background: #ec4899;
}

.stat-card[data-color="brown"] {
    background: #92400e;
}

.stat-card[data-color="silver"] {
    background: #6b7280;
}

.stat-card[data-color="lightblue"] {
    background: #0ea5e9;
}

.stat-card[data-color="red"] {
    background: #dc2626;
}

.stat-card[data-color="cyan"] {
    background: #06b6d4;
}

.stat-card[data-color="navy"] {
    background: #1e3a8a;
}

.stat-card[data-color="teal"] {
    background: #14b8a6;
}

.stat-card[data-color="coral"] {
    background: #ff7f50;
}

.stat-card[data-color="lime"] {
    background: #84cc16;
}

.stat-card[data-color="amber"] {
    background: #f59e0b;
}

.stat-card[data-color="emerald"] {
    background: #10b981;
}

.stat-card[data-color="rose"] {
    background: #f43f5e;
}

.stat-card[data-color="plum"] {
    background: #9333ea;
}

.stat-card[data-color="indigo"] {
    background: #4f46e5;
}

.stat-card[data-color="slateblue"] {
    background: #6a5acd;
}

.stat-card[data-color="slategray"] {
    background: #708090;
}

.stat-card[data-color="goldenrod"] {
    background: #daa520;
}

.stat-card[data-color="darkolivegreen"] {
    background: #556b2f;
}

.stat-route {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-count {
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-batch {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.stat-close-btn {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.stat-close-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.stat-close-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.stat-bulk-edit-btn {
    margin-top: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.stat-bulk-edit-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.batch-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.route-select {
    flex: 1;
    min-width: 200px;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.route-select:focus {
    outline: none;
    border-color: #667eea;
}

.close-batch-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-batch-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-batch-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.batch-history {
    margin-top: 2rem;
}

.batch-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.batch-history h3 {
    color: #333;
    font-size: 1.5rem;
}

.history-scroll {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding-right: 0.5rem;
}

.history-scroll::-webkit-scrollbar {
    width: 8px;
}

.history-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.history-scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.history-scroll::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.inventory-report-section {
    margin: 1rem 0 2rem;
    display: flex;
    justify-content: center;
}

.clear-batches-section {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.inventory-report-btn {
    padding: 0.75rem 2rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.inventory-report-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.clear-batches-btn {
    padding: 0.75rem 2rem;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.clear-batches-btn:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.inventory-modal-content {
    max-width: 520px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.close-batch-modal-content {
    max-width: 420px;
    text-align: center;
}

.close-batch-helper {
    margin: 0.5rem 0 1rem;
    color: #374151;
}

.close-batch-input {
    width: 100%;
    max-width: 220px;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 1.1rem;
    text-align: center;
}

.close-batch-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.close-batch-error {
    min-height: 1.2rem;
    margin: 0.5rem 0 1rem;
    color: #dc2626;
    font-weight: 600;
}
.inventory-summary {
    margin: 1rem 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    max-height: 50vh;
    padding-right: 0.25rem;
}

.inventory-summary-header {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    color: #1f2937;
}

.inventory-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    background: #f8fafc;
}

.inventory-summary-row strong {
    font-weight: 700;
    flex: 1;
}

.inventory-summary-row span {
    min-width: 2.5rem;
    text-align: right;
}

.clear-history-btn {
    flex: 1;
    min-width: 150px;
    padding: 0.75rem 1.5rem;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-history-btn:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.activity-log {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
}

.activity-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.activity-log-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.activity-log-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.activity-log-select {
    padding: 0.4rem 0.6rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

.activity-log-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.activity-log-header h3 {
    color: #333;
    font-size: 1.5rem;
    margin: 0;
}

.export-log-btn {
    padding: 0.5rem 1rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-log-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.activity-scroll {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding-right: 0.5rem;
}

.activity-scroll::-webkit-scrollbar {
    width: 8px;
}

.activity-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.activity-scroll::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.activity-scroll::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.activity-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid #2563eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    gap: 1rem;
}

.activity-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.activity-actions {
    display: flex;
    gap: 0.5rem;
}

.reprint-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.reprint-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.reprint-btn:active {
    transform: translateY(0);
}

.activity-time {
    color: #666;
    font-size: 0.85rem;
    min-width: 150px;
}

.activity-action {
    color: #333;
    font-weight: 500;
}

.clear-log-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.clear-log-btn:hover {
    background: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.history-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid #667eea;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.history-route {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.history-date {
    color: #666;
    font-size: 0.9rem;
}

.history-count {
    color: #667eea;
    font-weight: 600;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 1rem;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 95vh;
    overflow: visible;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.label-content {
    padding: 1rem;
    border: 2px solid #333;
    border-radius: 8px;
    text-align: center;
    margin: 1rem 0;
    background: white;
    width: 100%;
    max-width: 4in;
    min-height: auto;
    max-height: calc(95vh - 120px); /* Leave space for buttons and padding */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    flex-shrink: 1;
}

.label-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.label-route {
    font-size: 4.5rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    line-height: 1.1;
}

.label-route-full {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.label-info {
    font-size: 1.1rem;
    color: #333;
    margin: 0.75rem 0;
    font-weight: 500;
}

.label-info strong {
    color: #666;
    font-weight: 600;
}

.label-batch {
    font-size: 0.85rem;
    color: #666;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid #ddd;
    font-weight: 500;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
    flex-shrink: 0;
    padding: 0.5rem 0;
}

.print-btn, .close-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-btn {
    background: #f0f0f0;
    color: #333;
}

.close-btn:hover {
    background: #e0e0e0;
}

@media print {
    /* Set page size for 4x6 labels */
    @page {
        size: 4in 6in;
        margin: 0;
    }
    
    /* Hide EVERYTHING including body, html default styles */
    html, body {
        width: 4in !important;
        height: 6in !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        overflow: hidden !important;
    }
    
    /* Hide all body children EXCEPT label modal */
    body > *:not(#label-modal) {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Show ONLY label modal structure needed for label */
    #label-modal {
        display: block !important;
        visibility: visible !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 4in !important;
        height: 6in !important;
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 9999 !important;
        overflow: hidden !important;
    }
    
    #label-modal .modal-content {
        display: flex !important;
        visibility: visible !important;
        width: 4in !important;
        height: 6in !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        overflow: hidden !important;
    }
    
    /* Hide all buttons and UI elements */
    #inventory-modal,
    .close,
    .modal-actions,
    .print-btn,
    .close-btn,
    .navbar,
    .page,
    .warehouse-selection {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Show and style ONLY label content */
    .label-content {
        display: flex !important;
        visibility: visible !important;
        width: 4in !important;
        height: 6in !important;
        margin: 0 !important;
        padding: 0.5in !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: white !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        overflow: hidden !important;
    }
    
    /* Ensure label content children are visible */
    .label-content * {
        visibility: visible !important;
    }
    
    /* Prevent any page breaks */
    * {
        page-break-after: avoid !important;
        page-break-before: avoid !important;
        page-break-inside: avoid !important;
    }
        visibility: visible !important;
        page-break-inside: avoid;
        /* Ensure exact dimensions for thermal printers */
        min-width: 288pt;
        max-width: 288pt;
        min-height: 432pt;
        max-height: 432pt;
    }
    
    .label-content * {
        visibility: visible !important;
    }
    
    .label-route {
        font-size: 4.5rem !important;
        margin-bottom: 0.5rem;
        line-height: 1.1;
        font-weight: 900;
        color: #000 !important;
        text-transform: uppercase;
        letter-spacing: 2px;
    }
    
    .label-route-full {
        font-size: 0.9rem !important;
        margin-bottom: 1rem;
        color: #000 !important;
        font-weight: 600;
        text-transform: uppercase;
    }
    
    .label-info {
        font-size: 1.2rem !important;
        margin: 0.5rem 0;
        line-height: 1.5;
        color: #000 !important;
        font-weight: 500;
    }
    
    .label-info strong {
        color: #000 !important;
        font-weight: 700;
    }
    
    .label-batch {
        font-size: 1rem !important;
        margin-top: 1rem;
        padding-top: 0.75rem;
        border-top: 1px solid #ccc;
        color: #000 !important;
        font-weight: 500;
    }
    
    .label-batch strong {
        color: #000 !important;
        font-weight: 700;
    }
}

@media (max-width: 1200px) {
    .buttons-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.printer-settings-header {
    display: flex;
    align-items: center;
    position: relative;
}

.printer-toggle-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    border-radius: 8px;
}

.printer-toggle-btn:hover {
    background: rgba(37, 99, 235, 0.15);
    color: #2563eb;
}

.printer-toggle-btn:active {
    transform: scale(0.95);
}

.printer-dropdown-container {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 250px;
}

.printer-select-header {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
    min-width: 180px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.printer-select-header:hover {
    border-color: #2563eb;
}

.printer-select-header:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.refresh-printers-btn-header {
    padding: 0.5rem;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    color: #666;
}

.refresh-printers-btn-header:hover {
    background: rgba(37, 99, 235, 0.1);
    border-color: #2563eb;
    color: #2563eb;
}

.refresh-printers-btn-header:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .buttons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .modal-content {
        padding: 0.75rem;
        max-height: 98vh;
        width: 95%;
    }
    
    .label-content {
        padding: 0.75rem;
        margin: 0.5rem 0;
        max-height: calc(98vh - 100px);
        max-width: 100%;
    }
    
    .label-route {
        font-size: 3rem;
    }
    
    .label-info {
        font-size: 0.95rem;
        margin: 0.5rem 0;
    }
    
    .modal-actions {
        margin-top: 0.75rem;
        gap: 0.75rem;
    }
    
    .print-btn, .close-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .route-btn {
        padding: 1.5rem 1rem;
        font-size: 1.4rem;
        min-height: 120px;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .printer-settings-header {
        width: 100%;
    }
    
    .printer-dropdown-container {
        right: auto;
        left: 0;
        width: 100%;
        min-width: auto;
        flex-direction: column;
    }
    
    .printer-select-header {
        width: 100%;
        min-width: auto;
    }
    
    .printer-settings {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .printer-select {
        width: 100%;
        margin-right: 0;
    }
    
    .batch-controls {
        flex-direction: column;
    }
    
    .route-select {
        width: 100%;
    }
    
    .modal-content {
        padding: 0.75rem;
        max-height: 98vh;
        width: 95%;
    }
    
    .label-content {
        padding: 0.75rem;
        margin: 0.5rem 0;
        max-height: calc(98vh - 100px);
        max-width: 100%;
    }
    
    .label-route {
        font-size: 3rem;
    }
    
    .label-info {
        font-size: 0.95rem;
        margin: 0.5rem 0;
    }
    
    .modal-actions {
        margin-top: 0.75rem;
        gap: 0.75rem;
    }
    
    .print-btn, .close-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 0.5rem;
        max-height: 99vh;
        width: 98%;
    }
    
    .label-content {
        padding: 0.5rem;
        margin: 0.25rem 0;
        max-height: calc(99vh - 90px);
    }
    
    .label-route {
        font-size: 2.5rem;
        margin-bottom: 0.25rem;
    }
    
    .label-route-full {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }
    
    .label-info {
        font-size: 0.85rem;
        margin: 0.4rem 0;
    }
    
    .label-batch {
        font-size: 0.75rem;
        margin-top: 1rem;
        padding-top: 0.75rem;
    }
    
    .modal-actions {
        margin-top: 0.5rem;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .print-btn, .close-btn {
        padding: 0.5rem 1.25rem;
        font-size: 0.85rem;
        flex: 1;
        min-width: 120px;
    }
}

