
        /* CSS STYLES */
        :root {
            --primary-color: #007bff; --primary-hover: #0056b3; --secondary-color: #28a745;
            --secondary-hover: #218838; --danger-color: #dc3545; --danger-hover: #c82333;
            --light-bg: #f8f9fa; --white-bg: #ffffff; --border-color: #dee2e6;
            --text-color: #212529; --header-bg: #343a40;
            --toast-success: #28a745; --toast-error: #dc3545; --toast-info: #007bff;
        }
        body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background-color: #f0f2f5; margin: 0; color: var(--text-color); }
        .container { max-width: 1600px; margin: 0 auto; padding: 20px; }
        header { background-color: var(--header-bg); color: white; padding: 10px 25px; border-radius: 12px; margin-bottom: 25px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
        .header-logo { display: flex; align-items: center; gap: 15px; }
        .header-logo img { max-height: 40px; border-radius: 5px; background-color: white; }
        .header-logo h1 { margin: 0; font-size: 1.8em; }
        nav a { color: white; text-decoration: none; margin-left: 15px; font-size: 1.1em; padding: 10px 15px; border-radius: 8px; transition: background-color 0.3s; cursor: pointer; }
        nav a:hover, nav a.active { background-color: var(--primary-color); }
        .page { display: none; }
        .page.active { display: block; }
        .main-content { display: grid; gap: 25px; }
        .single-column { grid-template-columns: 1fr; }
        .two-column { grid-template-columns: 2fr 1fr; }
        .four-column { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
        .panel { border: 1px solid var(--border-color); padding: 25px; border-radius: 12px; background: var(--white-bg); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
        h2, h3 { color: var(--text-color); }
        h2 { font-size: 1.6em; border-bottom: 2px solid var(--border-color); padding-bottom: 10px; margin-top: 0; margin-bottom: 20px; }
        .form-group { margin-bottom: 20px; position: relative; }
        label { display: block; margin-bottom: 8px; font-weight: 600; }
        input, textarea, select { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 8px; box-sizing: border-box; font-size: 1em; }
        button { padding: 12px 20px; color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 1em; font-weight: 600; transition: background-color 0.2s, transform 0.1s; }
        button:active { transform: scale(0.98); }
        .btn { width: 100%; /* Default for .btn to span width */ }
        .btn-primary { background-color: var(--primary-color); } .btn-primary:hover { background-color: var(--primary-hover); }
        .btn-secondary { background-color: var(--secondary-color); } .btn-secondary:hover { background-color: var(--secondary-hover); }
        .btn-danger { background-color: var(--danger-color); } .btn-danger:hover { background-color: var(--danger-hover); }
        .btn-info { background-color: #17a2b8; } .btn-info:hover { background-color: #138496; }
        table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
        th, td { padding: 12px; border: 1px solid var(--border-color); text-align: left; }
        th { background-color: var(--light-bg); }
        .text-right { text-align: right; }
        .bill-total { font-size: 1.8em; font-weight: bold; color: var(--secondary-color); margin-top: 20px; }
        #transactionList { list-style: none; padding: 0; max-height: 500px; overflow-y: auto; user-select: none; }
        #transactionList li { padding: 12px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
        #transactionList li:hover { background-color: #e9ecef; }
        .stat-card { background-color: var(--light-bg); padding: 20px; border-radius: 8px; text-align: center; }
        .stat-card h3 { margin: 0 0 10px; color: var(--primary-color); }
        .stat-card p { font-size: 2em; font-weight: bold; margin: 0; color: var(--text-color); }
        #logo-preview { max-width: 100px; max-height: 100px; margin-top: 10px; border: 1px solid var(--border-color); padding: 5px; border-radius: 5px; }
        #currencyList { max-height: 250px; overflow-y: auto; border: 1px solid var(--border-color); border-radius: 5px; }
        #currencyList div { padding: 8px 12px; cursor: pointer; }
        #currencyList div:hover { background-color: #e9ecef; }
        #context-menu { display: none; position: absolute; background-color: var(--white-bg); border: 1px solid var(--border-color); box-shadow: 0 2px 10px rgba(0,0,0,0.1); border-radius: 5px; padding: 5px 0; z-index: 1000; }
        #context-menu div { padding: 8px 15px; cursor: pointer; }
        #context-menu div:hover { background-color: var(--primary-color); color: white; }
        #searchResults { display: none; position: absolute; background-color: white; border: 1px solid var(--border-color); border-top: none; width: 100%; z-index: 100; max-height: 200px; overflow-y: auto; box-sizing: border-box; border-radius: 0 0 8px 8px; }
        .search-item { padding: 10px; cursor: pointer; }
        .search-item:hover, .search-item.selected { background-color: var(--primary-color); color: white; }
        kbd { background-color: #eee; border-radius: 3px; border: 1px solid #b4b4b4; box-shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 2px 0 0 rgba(255, 255, 255, .7) inset; color: #333; display: inline-block; font-family: monospace; font-size: .85em; font-weight: 701; line-height: 1; padding: 2px 4px; white-space: nowrap; }
        /* Toast Notifications */
        #toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; }
        .toast { background-color: #333; color: white; padding: 10px 15px; border-radius: 5px; opacity: 0; transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out; transform: translateY(20px); min-width: 250px; text-align: center; }
        .toast.show { opacity: 1; transform: translateY(0); }
        .toast.success { background-color: var(--toast-success); }
        .toast.error { background-color: var(--toast-error); }
        .toast.info { background-color: var(--toast-info); }

        /* Cash Modal */
        .modal {
            display: none; position: fixed; z-index: 10001; left: 0; top: 0; width: 100%; height: 100%;
            background-color: rgba(0,0,0,0.5); justify-content: center; align-items: center;
        }
        .modal-content {
            background-color: var(--white-bg); padding: 30px; border-radius: 12px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.3); width: 90%; max-width: 400px; text-align: center;
        }
        .modal-content h3 { margin-top: 0; font-size: 1.8em; color: var(--primary-color); }
        .modal-content .total-due { font-size: 2.2em; font-weight: bold; margin-bottom: 20px; color: var(--secondary-color); }
        .modal-content .form-group { margin-bottom: 15px; }
        .modal-content .form-group label { font-size: 1.1em; }
        .modal-content .form-group input { font-size: 1.5em; text-align: center; padding: 10px; }
        .modal-content .change-due { font-size: 1.8em; font-weight: bold; margin-top: 20px; color: var(--text-color); }
        .modal-buttons { display: flex; gap: 10px; margin-top: 30px; }
        .modal-buttons button { flex: 1; padding: 12px; font-size: 1.1em; }

        .product-actions { display: flex; gap: 5px; } /* For update/remove buttons */

        #manualItemSection {
            background-color: var(--light-bg); /* Add a light background */
            border: 1px dashed var(--border-color);
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 25px;
            display: none; /* Hidden by default */
        }
        #manualItemSection h3 { margin-top: 0; margin-bottom: 15px; color: var(--primary-color); }
        
        /* Specific styling for billing controls grouping */
        .billing-controls-group {
            display: grid;
            grid-template-columns: 1fr;
            gap: 15px;
            margin-bottom: 20px;
        }
        @media (min-width: 768px) {
            .billing-controls-group {
                grid-template-columns: 2fr 1fr; /* Product search + Quantity side-by-side */
            }
        }
        .billing-controls-group .form-group:last-child {
            margin-bottom: 0; /* Remove extra margin for last form-group in group */
        }
        .billing-actions {
            margin-top: 25px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        /* New style for a compact, auto-width toggle button */
        .toggle-button-compact {
            width: auto !important; /* Override .btn's 100% width */
            padding: 8px 15px !important; /* Smaller padding */
            font-size: 0.95em !important; /* Slightly smaller text */
            display: inline-block !important; /* Necessary with width: auto */
        }

        /* Compact buttons for Clear Bill and Add Manual Item */
        .btn-compact {
            padding: 8px 15px !important;
            font-size: 0.95em !important;
        }

        /* Reset Confirmation Modal (separate from cash modal) */
        #resetConfirmModal {
            display: none; /* Hidden by default */
            position: fixed; z-index: 10002; left: 0; top: 0; width: 100%; height: 100%;
            background-color: rgba(0,0,0,0.5); justify-content: center; align-items: center;
        }
        #resetConfirmModal .modal-content {
            background-color: var(--white-bg); padding: 30px; border-radius: 12px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.3); width: 90%; max-width: 450px; text-align: center;
        }
        #resetConfirmModal h3 { color: var(--danger-color); }
        #resetConfirmModal .reset-code-display {
            font-size: 1.5em; font-weight: bold; color: var(--danger-color);
            margin: 15px 0; padding: 10px; border: 1px dashed var(--border-color); border-radius: 5px;
        }
        #resetConfirmModal input {
            font-size: 1.2em; text-align: center;
        }
        #resetConfirmModal .modal-buttons { margin-top: 20px; }

        /* Styles for View Bills Page */
        #viewBillsList {
            list-style: none;
            padding: 0;
            max-height: 600px; /* Adjust as needed */
            overflow-y: auto;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            background-color: var(--white-bg);
        }
        #viewBillsList li {
            padding: 15px;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            flex-direction: column;
            gap: 5px;
            cursor: pointer;
            position: relative; /* For context menu positioning */
        }
        #viewBillsList li:hover {
            background-color: var(--light-bg);
        }
        #viewBillsList li span strong {
            font-weight: 600;
            color: var(--primary-color);
        }
        #viewBillsList li .bill-details {
            display: flex;
            justify-content: space-between;
            flex-wrap: wrap;
            font-size: 0.9em;
            color: #666;
        }
        #viewBillsList li .bill-total-amount {
            font-size: 1.2em;
            font-weight: bold;
            color: var(--secondary-color);
        }
        .view-bills-filters {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* Adjusted minmax for smaller inputs */
            gap: 15px;
            margin-bottom: 25px;
            align-items: flex-end; /* Align inputs and button to the bottom */
        }
        .view-bills-filters .form-group {
            margin-bottom: 0; /* Remove default margin to let grid handle spacing */
        }
        .view-bills-filters button {
            width: auto; /* Allow button to size to its content */
            padding: 8px 15px; /* Make it smaller */
            font-size: 0.95em; /* Make text smaller */
            justify-self: end; /* Push button to the right within its grid cell */
            align-self: end; /* Align to the bottom of its grid cell */
            min-width: 100px; /* Ensure a minimum width for readability */
        }
        @media (max-width: 768px) {
             .view-bills-filters {
                grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Slightly smaller for tablets */
            }
        }
        @media (max-width: 576px) {
            .view-bills-filters {
                grid-template-columns: 1fr; /* Stack vertically on small phones */
            }
            .view-bills-filters button {
                width: 100%; /* On very small screens, let it fill the width */
                justify-self: stretch;
                min-width: unset;
            }
        }

        /* Keyboard Settings Specific Styles */
        .hotkey-settings-item {
            display: grid;
            grid-template-columns: 1fr auto auto; /* Label | Input | Button */
            gap: 10px;
            align-items: center;
            margin-bottom: 10px;
        }
        .hotkey-settings-item input[type="text"] {
            text-align: center;
            font-weight: bold;
            background-color: var(--light-bg);
            cursor: pointer;
            width: 120px; /* Fixed width for keys */
            flex-shrink: 0;
            user-select: none; /* Prevent selection of text */
        }
        .hotkey-settings-item label {
            margin-bottom: 0; /* Align with input */
            text-align: left;
        }

        /* Styles for About Us Page */
        #about-us .panel p {
            line-height: 1.8;
            margin-bottom: 15px;
            font-size: 1.1em;
        }
        #about-us .panel h3 {
            margin-top: 25px;
            color: var(--secondary-color);
        }

        /* New: Import Products section styles */
        #importProductSection {
            border: 1px dashed var(--border-color);
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 25px;
            background-color: var(--light-bg);
        }
        #importProductSection .form-group {
            margin-bottom: 10px;
        }
        #importProductSection h3 {
            color: var(--primary-color);
            margin-top: 0;
        }
        #importProductsBtn {
            margin-top: 10px;
        }

        /* Maintain compact styling for table action buttons */
        .remove-item {
            padding: 4px 8px;
            font-size: 0.85em;
            width: auto;
            display: inline-block;
        }

        /* --- PRINTING STYLES --- */
        #print-area { display: none; } /* Hidden by default in normal view */

        body.printing .container, /* Hide the main app container when printing */
        body.printing #context-menu,
        body.printing #toast-container,
        body.printing .modal, /* Hide cash modal */
        body.printing #resetConfirmModal { /* Hide reset modal */
            display: none !important;
        }

        body.printing #print-area { /* Show only the print area when printing */
            display: block !important;
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: auto;
            overflow: visible;
        }

        @media (max-width: 992px) { .two-column { grid-template-columns: 1fr; } .header-logo h1 { font-size: 1.4em; } header { flex-direction: column; align-items: flex-start; } nav { margin-top: 15px; width: 100%; display: flex; justify-content: flex-start; } nav a { margin: 0 10px 0 0; } }
