
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        body {
            background-color: #f0f7ff;
            color: #333;
            line-height: 1.6;
            padding: 20px;
        }
        
        .container {
            max-width: 1400px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
        }
        
        @media (max-width: 1100px) {
            .container {
                grid-template-columns: 1fr;
            }
        }
        
        header {
            grid-column: 1 / -1;
            background: linear-gradient(135deg, #004a8d, #0066cc);
            color: white;
            padding: 25px;
            border-radius: 12px;
            margin-bottom: 20px;
            box-shadow: 0 8px 20px rgba(0, 74, 141, 0.2);
            border: 1px solid #004a8d;
        }
        
        header h1 {
            font-size: 2.8rem;
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 15px;
            font-weight: 700;
        }
        
        .logo-container {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 20px;
        }
        
        .logo-text {
            flex: 1;
        }
        
        .card {
            background: white;
            border-radius: 12px;
            padding: 25px;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
            margin-bottom: 20px;
            border: 1px solid #e0e7ff;
        }
        
        .card h2 {
            color: #004a8d;
            margin-bottom: 20px;
            padding-bottom: 12px;
            border-bottom: 3px solid #e6f0ff;
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 1.8rem;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #444;
        }
        
        input, select, textarea {
            width: 100%;
            padding: 14px 16px;
            border: 1px solid #ccc;
            border-radius: 8px;
            font-size: 16px;
            transition: all 0.3s;
            background: #fafdff;
        }
        
        input:focus, select:focus, textarea:focus {
            border-color: #0066cc;
            outline: none;
            box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
            background: white;
        }
        
        .btn {
            background: linear-gradient(to right, #0066cc, #004a8d);
            color: white;
            border: none;
            padding: 16px 24px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 17px;
            font-weight: 600;
            transition: all 0.3s;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
        }
        
        .btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
            background: linear-gradient(to right, #004a8d, #0066cc);
        }
        
        .btn-success {
            background: linear-gradient(to right, #00a651, #00843d);
            box-shadow: 0 4px 12px rgba(0, 166, 81, 0.3);
        }
        
        .btn-danger {
            background: linear-gradient(to right, #ff4d4d, #cc0000);
            box-shadow: 0 4px 12px rgba(255, 77, 77, 0.3);
        }
        
        .btn-warning {
            background: linear-gradient(to right, #ff9900, #e68a00);
            box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
        }
        
        .parts-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
            margin-top: 15px;
        }
        
        .part-item {
            background: #f8fbff;
            border: 2px solid #e0e7ff;
            border-radius: 10px;
            padding: 20px;
            transition: all 0.3s;
            position: relative;
            overflow: hidden;
        }
        
        .part-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0, 102, 204, 0.1);
            border-color: #0066cc;
        }
        
        .part-item.low-stock {
            border-color: #ff4d4d;
            background: #fff5f5;
        }
        
        .part-name {
            font-weight: 700;
            color: #004a8d;
            margin-bottom: 8px;
            font-size: 1.1rem;
        }
        
        .part-category {
            display: inline-block;
            background: #e6f0ff;
            color: #0066cc;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            margin-bottom: 10px;
        }
        
        .part-details {
            display: flex;
            justify-content: space-between;
            margin-top: 12px;
            font-size: 15px;
        }
        
        .part-price {
            color: #00a651;
            font-weight: 700;
            font-size: 1.2rem;
        }
        
        .part-quantity {
            font-weight: 700;
            font-size: 1.1rem;
        }
        
        .quantity-normal {
            color: #0066cc;
        }
        
        .quantity-low {
            color: #ff4d4d;
            animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.7; }
            100% { opacity: 1; }
        }
        
        .part-info {
            font-size: 13px;
            color: #666;
            margin-bottom: 8px;
        }
        
        .cart-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 18px 0;
            border-bottom: 1px solid #eee;
        }
        
        .cart-item:last-child {
            border-bottom: none;
        }
        
        .cart-item-details h4 {
            margin-bottom: 6px;
            color: #004a8d;
            font-size: 1.1rem;
        }
        
        .cart-item-actions {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .cart-quantity {
            width: 70px;
            text-align: center;
            padding: 10px;
            font-weight: 600;
        }
        
        .cart-total {
            margin-top: 25px;
            padding-top: 25px;
            border-top: 3px solid #eee;
            font-size: 1.8rem;
            font-weight: 800;
            color: #004a8d;
            display: flex;
            justify-content: space-between;
            background: #f8fbff;
            padding: 20px;
            border-radius: 10px;
        }
        
        .payment-options {
            display: flex;
            gap: 15px;
            margin-top: 15px;
        }
        
        .payment-option {
            flex: 1;
            text-align: center;
            padding: 20px 15px;
            border: 3px solid #ddd;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s;
            background: white;
        }
        
        .payment-option:hover, .payment-option.active {
            border-color: #0066cc;
            background-color: #e6f0ff;
        }
        
        .status-message {
            padding: 18px;
            border-radius: 8px;
            margin-top: 20px;
            display: none;
        }
        
        .status-success {
            background-color: #d4edda;
            color: #155724;
            border: 2px solid #c3e6cb;
            display: block;
        }
        
        .status-error {
            background-color: #f8d7da;
            color: #721c24;
            border: 2px solid #f5c6cb;
            display: block;
        }
        
        /* Mobile toast notification style */
        @media (max-width: 480px) {
            .status-message {
                position: fixed;
                top: 10px;
                left: 10px;
                right: 10px;
                margin: 0;
                z-index: 2000;
                padding: 16px;
                border-radius: 8px;
                font-size: 15px;
                font-weight: 600;
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
                animation: slideDown 0.3s ease-out;
            }
            
            .status-success {
                background-color: #00a651;
                color: white;
                border: none;
            }
            
            .status-error {
                background-color: #ff4d4d;
                color: white;
                border: none;
            }
            
            @keyframes slideDown {
                from {
                    transform: translateY(-100%);
                    opacity: 0;
                }
                to {
                    transform: translateY(0);
                    opacity: 1;
                }
            }
        }
        
        .database-info {
            background: #f8fbff;
            border-left: 5px solid #0066cc;
            padding: 20px;
            margin-top: 20px;
            border-radius: 0 8px 8px 0;
        }
        
        .firestore-data {
            max-height: 350px;
            overflow-y: auto;
            margin-top: 15px;
            background: white;
            border: 1px solid #eee;
            border-radius: 8px;
            padding: 15px;
            font-family: 'Courier New', monospace;
        }
        
        .firestore-item {
            padding: 12px;
            border-bottom: 1px solid #eee;
            font-size: 14px;
            word-break: break-all;
        }
        
        .firebase-status {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: white;
            padding: 10px 15px;
            border-radius: 8px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.15);
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 600;
            z-index: 1000;
            border-left: 4px solid #00a651;
        }
        
        .firebase-status.offline {
            border-left-color: #ff4d4d;
        }
        
        .search-box {
            margin-bottom: 20px;
            position: relative;
            display: flex;
            align-items: center;
        }
        
        .search-box i {
            position: absolute;
            left: 15px;
            color: #666;
            pointer-events: none;
        }
        
        .search-box input {
            padding-left: 45px;
            padding-right: 40px;
            width: 100%;
        }
        
        .search-clear-btn {
            position: absolute;
            right: 12px;
            background: none;
            border: none;
            color: #999;
            cursor: pointer;
            font-size: 18px;
            padding: 5px;
            display: none;
            z-index: 10;
        }
        
        .search-clear-btn:hover {
            color: #333;
        }
        
        .search-clear-btn.active {
            display: block;
        }
        
        .loading {
            text-align: center;
            padding: 40px;
            color: #666;
            font-size: 1.2rem;
        }
        
        .loading i {
            font-size: 2rem;
            margin-bottom: 15px;
            color: #0066cc;
            animation: spin 2s linear infinite;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        .stats-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }
        
        .stat-box {
            background: #f8fbff;
            padding: 20px;
            border-radius: 10px;
            text-align: center;
            border-left: 4px solid #0066cc;
        }
        
        .stat-box.low-stock {
            border-left-color: #ff4d4d;
            background: #fff5f5;
        }
        
        .stat-value {
            font-size: 2rem;
            font-weight: 800;
            color: #004a8d;
        }
        
        .stat-label {
            color: #666;
            font-size: 0.9rem;
            margin-top: 5px;
        }
        
        footer {
            grid-column: 1 / -1;
            text-align: center;
            margin-top: 40px;
            padding-top: 25px;
            border-top: 1px solid #ddd;
            color: #666;
            font-size: 14px;
            background: white;
            padding: 25px;
            border-radius: 10px;
        }
        
        /* New: Receipts Section */
        .receipts-section {
            grid-column: 1 / -1;
        }
        
        .receipts-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 20px;
            margin-top: 15px;
        }
        
        .receipt-card {
            background: white;
            border: 1px solid #e0e7ff;
            border-radius: 10px;
            padding: 20px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
            transition: all 0.3s;
        }
        
        .receipt-card:hover {
            box-shadow: 0 6px 16px rgba(0, 102, 204, 0.1);
            border-color: #0066cc;
        }
        
        .receipt-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 2px solid #e6f0ff;
        }
        
        .receipt-id {
            font-weight: bold;
            color: #004a8d;
            font-size: 1.1rem;
        }
        
        .receipt-date {
            color: #666;
            font-size: 0.9rem;
        }
        
        .receipt-customer {
            margin-bottom: 10px;
        }
        
        .receipt-customer-name {
            font-weight: 600;
            color: #004a8d;
        }
        
        .receipt-items {
            margin: 15px 0;
            max-height: 150px;
            overflow-y: auto;
            padding: 10px;
            background: #f8fbff;
            border-radius: 5px;
        }
        
        .receipt-item {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px dashed #ddd;
        }
        
        .receipt-item:last-child {
            border-bottom: none;
        }
        
        .receipt-total {
            display: flex;
            justify-content: space-between;
            margin-top: 15px;
            padding-top: 15px;
            border-top: 2px solid #e6f0ff;
            font-weight: bold;
            font-size: 1.1rem;
        }
        
        .receipt-actions {
            display: flex;
            justify-content: space-between;
            margin-top: 15px;
            gap: 10px;
        }
        
        .no-receipts {
            text-align: center;
            padding: 40px;
            color: #666;
            grid-column: 1 / -1;
        }
        
        .status-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background-color: #00a651;
        }
        
        .status-dot.offline {
            background-color: #ff4d4d;
        }
        
        /* Search highlight */
        .highlight {
            background-color: #ffeb3b;
            padding: 0 2px;
            border-radius: 2px;
        }
        /* Add to existing CSS at the bottom or replace responsive sections */

/* ================== RESPONSIVE DESIGN ================== */

/* Large tablets and small laptops (1024px and below) */
@media (max-width: 1024px) {
    .container {
        gap: 20px;
        padding: 15px;
    }
    
    .parts-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .receipts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .stats-container {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

/* Tablets (768px and below) */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px;
    }
    
    header {
        padding: 20px 15px;
        margin-bottom: 15px;
    }
    
    header h1 {
        font-size: 2.2rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .logo-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .card {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .card h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .parts-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .receipts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-box {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 1.6rem;
    }
    
    .payment-options {
        flex-direction: column;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .cart-item-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .firebase-status {
        bottom: 10px;
        right: 10px;
        left: 10px;
        font-size: 0.9rem;
    }
}

/* Mobile devices (480px and below) */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 15px;
        border-radius: 10px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 15px;
        border-radius: 10px;
    }
    
    .card h2 {
        font-size: 1.3rem;
        padding-bottom: 8px;
    }
    
    .btn {
        padding: 14px 20px;
        font-size: 16px;
        width: 100%;
    }
    
    /* Make buttons stack on mobile */
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .parts-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* Reorder cards on mobile - inventory below receipts */
    .container {
        display: grid;
        grid-template-columns: 1fr;
    }
    
    header {
        order: 1;
    }
    
    .receipts-section {
        order: 2;
    }
    
    .inventory-card {
        order: 3;
    }
    
    .part-item {
        padding: 10px 12px;
    }
    
    .part-name {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }
    
    .part-category {
        font-size: 11px;
        padding: 2px 8px;
    }
    
    .part-info {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .part-details {
        font-size: 13px;
        margin-top: 8px;
    }
    
    .part-price {
        font-size: 1rem;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .cart-total {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        font-size: 1.5rem;
    }
    
    .receipt-actions {
        flex-direction: column;
    }
    
    .receipt-actions .btn {
        width: 100%;
    }
    
    /* Improve form inputs for mobile */
    input, select, textarea {
        padding: 12px 14px;
        font-size: 16px; /* Prevents iOS zoom */
    }
    
    .search-box input {
        padding-left: 40px;
    }
    
    /* Adjust part details layout */
    .part-details {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    /* Make firebase status more visible on mobile */
    .firebase-status {
        position: static;
        margin-top: 15px;
        width: auto;
    }
    
    /* Receipt card adjustments */
    .receipt-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .receipt-total {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }
}

/* Very small mobile devices (360px and below) */
@media (max-width: 360px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 12px;
    }
    
    .btn {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .part-name {
        font-size: 1rem;
    }
    
    .cart-quantity {
        width: 60px;
        padding: 8px;
    }
    
    .stat-box {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 1.4rem;
    }
}

/* ================== TOUCH-FRIENDLY IMPROVEMENTS ================== */

/* Increase touch target sizes */
button, 
.payment-option,
.part-item {
    min-height: 44px; /* Apple's recommended minimum touch target */
}

/* Make buttons easier to tap */
.btn {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Make form elements easier to interact with */
input, select, textarea {
    min-height: 48px;
}

/* Improve dropdown appearance on mobile */
select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Prevent text from being too small */
body {
    font-size: 16px;
    -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape */
}

/* Improve scrolling on mobile */
.firestore-data,
.receipt-items {
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* ================== ORIENTATION SPECIFIC ================== */

/* Landscape orientation improvements */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        grid-template-columns: repeat(2, 1fr);
        max-height: 90vh;
        overflow-y: auto;
    }
    
    header {
        grid-column: 1 / -1;
    }
    
    .card {
        margin-bottom: 10px;
    }
    
    .parts-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* Portrait orientation */
@media (orientation: portrait) {
    .container {
        grid-template-columns: 1fr;
    }
}

/* ================== ACCESSIBILITY IMPROVEMENTS ================== */

/* Focus styles for keyboard navigation */
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .part-item {
        border: 2px solid #004a8d;
    }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .part-item:hover {
        transform: none;
    }
    
    .quantity-low {
        animation: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #f0f0f0;
    }
    
    .card {
        background-color: #2d2d2d;
        border-color: #404040;
    }
    
    input, select, textarea {
        background-color: #3d3d3d;
        color: #f0f0f0;
        border-color: #555;
    }
    
    .part-item {
        background-color: #3d3d3d;
        border-color: #404040;
    }
    
    .status-success {
        background-color: #155724;
        color: #d4edda;
    }
    
    .status-error {
        background-color: #721c24;
        color: #f8d7da;
    }
}
/* Mobile menu styles */
.mobile-menu-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-toggle i {
    font-size: 1.5rem;
    color: white;
}

/* Mobile menu open state */
@media (max-width: 768px) {
    .container.mobile-menu-open {
        display: block;
    }
    
    .container.mobile-menu-open .card {
        margin-bottom: 10px;
    }
}
  