        :root { 
            --terminal-bg: #0a0a0a; --panel-bg: #1a1a1a; --accent: #8bc34a; 
            --success: #00e676; --danger: #ff1744; --warning: #ff9800; --text-main: #ffffff;
            --text-dim: #757575; --border: #333; --admin-bg: #f1f5f9;
        }

        body { font-family: 'Segoe UI', sans-serif; background: var(--terminal-bg); color: var(--text-main); margin: 0; display: flex; height: 100vh; overflow: hidden; }
        
        #top-bar { position: fixed; top: 0; left: 0; right: 0; height: 50px; background: #000; display: flex; align-items: center; padding: 0 20px; border-bottom: 2px solid var(--accent); z-index: 100; justify-content: space-between;}
        .screen { display: none; width: 100%; height: calc(100% - 50px); margin-top: 50px; }
        .active-screen { display: flex; }
		
        #pos-lock-screen {
            position: fixed;
            inset: 0;
            background: #000;
            z-index: 999999; 
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            font-family: sans-serif;
        }
        .lock-box {
            background: #111;
            padding: 30px;
            border: 2px solid #8bc34a;
            border-radius: 15px;
            text-align: center;
        }
        .lock-input {
            background: #222;
            color: #8bc34a;
            border: 1px solid #444;
            font-size: 32px;
            width: 150px;
            text-align: center;
            margin-bottom: 20px;
            padding: 10px;
            letter-spacing: 5px;
        }

        #grid-section { flex: 3; padding: 20px; overflow-y: auto; background: #050505; display: flex; flex-direction: column; position: relative; }
        #sidebar { width: 420px; background: #111; border-left: 2px solid #000; display: flex; flex-direction: column; }
        
        .search-container { margin-bottom: 15px; position: relative; }
        #stock-search { width: 100%; padding: 12px 15px; background: #111; border: 1px solid #444; color: white; border-radius: 6px; font-size: 16px; box-sizing: border-box; outline: none; }
        #stock-search:focus { border-color: var(--accent); box-shadow: 0 0 5px rgba(139, 195, 74, 0.3); }

        #touch-keyboard {
            display: none;
            position: absolute;
			top: 60%;
            bottom: 0;          
            left: 0;
            width: 90%; 
			height:200px;			
            background: #1a1a1a;
            border: 2px solid var(--accent);
            border-radius: 8px;
            padding: 10px;
            z-index: 500;
            grid-template-columns: repeat(10, 1fr);
            gap: 5px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        }
        .kb-key {
            padding: 12px 0;
            background: #333;
            color: white;
            border: none;
            border-radius: 4px;
            font-weight: bold;
            cursor: pointer;
            text-align: center;
            font-size: 14px;
        }
        .kb-key:active { background: var(--accent); color: black; }
        .kb-key.wide { grid-column: span 2; background: #444; }
        .kb-key.danger { background: var(--danger); }

        #dept-filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; padding-bottom: 5px; }
        
        .dept-btn { 
            width: 100px; 
            height: 100px; 
            display: flex;
            align-items: center;
            justify-content: center;
            background: #222; 
            border: 1px solid #444; 
            color: white; 
            border-radius: 8px; 
            cursor: pointer; 
            font-weight: bold; 
            text-align: center;
            font-size: 13px;
            text-transform: uppercase;
            word-break: break-word;
            padding: 5px;
        }
        .dept-btn.active { background: var(--accent); color: black; border-color: var(--accent); }

        #product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; }
        .product-btn { background: var(--panel-bg); border: 1px solid var(--border); border-radius: 8px; padding: 20px 15px; cursor: pointer; text-align: left; }

        #cart-list { flex-grow: 1; overflow-y: auto; padding: 20px; font-family: 'Courier New', monospace; font-size: 14px; }
        .cart-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #222; }
       
        #admin-screen { background: var(--admin-bg); color: #333; flex-direction: column; width: 100%; overflow-y: auto; }
        .admin-menu { display: flex; background: #fff; border-bottom: 1px solid #ddd; padding: 0 20px; gap: 10px; position: sticky; top:0; z-index: 10; }
        .tab-btn { padding: 15px 20px; border: none; background: none; cursor: pointer; font-weight: bold; color: #64748b; border-bottom: 3px solid transparent; }
        .tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
        .admin-content { display: none; padding: 25px; width: 100%; box-sizing: border-box; }
        .admin-content.active { display: block; }
        .admin-card { background: #f8fafc; padding: 25px; border-radius: 10px; border: 1px solid #ddd; margin-bottom: 25px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
        .admin-input { padding: 12px; border: 1px solid #ccc; border-radius: 6px; margin-bottom: 15px; width: 100%; box-sizing: border-box; font-size: 14px; }
        .label { display: block; margin-bottom: 5px; font-weight: bold; color: #64748b; font-size: 12px; text-transform: uppercase; }

        .sales-table { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 13px; }
        .sales-table th { padding: 5px 15px 5px ; text-align: left; color: white; background: black; xt-transform: uppercase; font-size: 11px; }
        .sales-table tr td { background: #fff; padding: 5px 15px 0px; border-top: 1px solid #edf2f7; border-bottom: 1px solid #edf2f7; }

        .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; margin bottom: 25px; }
        .stat-card { background: #fff; padding: 15px; border-radius: 10px; border: 1px solid #ddd; }
        .stat-label { font-size: 11px; color: #64748b; font-weight: bold; text-transform: uppercase; }
        .stat-value { font-size: 20px; font-weight: 800; color: #1e293b; }

        .editable-cell { background: #f8fafc; border: 1px solid #e2e8f0; padding: 8px 12px; border-radius: 5px; cursor: text; font-family: monospace; font-size: 14px; transition: all 0.2s; }
        .editable-cell:hover { border-color: var(--accent); background: #fff; }
        
        .btn-action { padding: 12px; border: none; font-weight: bold; cursor: pointer; border-radius: 6px; text-transform: uppercase; transition: all 0.2s; }
        
        @keyframes pulse-red {
            0% { background-color: var(--danger); transform: scale(1); }
            50% { background-color: #ff5252; transform: scale(1.02); }
            100% { background-color: var(--danger); transform: scale(1); }
        }
        .refund-active {
            animation: pulse-red 1.5s infinite ease-in-out;
            box-shadow: 0 0 15px rgba(255, 23, 68, 0.4);
        }

        #payment-modal, #barcode-modal, #login-overlay, #message-modal, #misc-modal 
		{ display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(5px); z-index: 9000; flex-direction: column; justify-content: center; align-items: center; }
		 
		 
		 .barcode-spacer {
  height: 12mm;   /* printer-safe spacing */
}
		 #receipt-print-area { 
    display: none; /* Hidden by default */
    position: fixed; 
   
    transform: translate(-50%, -50%);
    width: 300px;
    background: white; 
    color: black;
    padding: 0 0 40px 20px;
    border: 0px solid #333;
    z-index: 99999; /* Ensures it is on top */
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
} 
        @media print {
            body > * { display: none !important; }
			@media print {
    body > * { display: none !important; }
    #receipt-print-area { display: block !important; position: static; transform: none; box-shadow: none; border: none; }
}
			 }
			 
			 
        
         
	
	#rcpt-tax-rate, rcpt-total, rcpt-change, rcpt-paid-amount, rcpt-taxline { display: inline; }

        .modal-card { background: white; padding: 30px; border-radius: 12px; text-align: center; width: 450px; color: #333; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5); }
        .message-modal-content { max-width: 400px; width: 90%; }
        .modal-title { font-size: 20px; font-weight: bold; margin-bottom: 10px; color: #1a1a1a; }
        .modal-body { font-size: 16px; margin-bottom: 25px; color: #4b5563; }

        .keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
        .key { padding: 20px; background: #f1f5f9; border: 1px solid #cbd5e1; font-size: 20px; font-weight: bold; border-radius: 8px; cursor: pointer; }
        .key:active { background: #e2e8f0; }

        #cash-entry-view { display: none; }
        #change-display-box { display: none; background: #e8f5e9; border: 2px solid var(--success); color: #2e7d32; padding: 15px; border-radius: 8px; margin-bottom: 15px; font-weight: 900; }
    
	/* This creates the confirm modal */
	dialog {
  border: none;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  text-align: center;
  font-family: sans-serif;
  min-width: 300px;
}

/* This creates the dark background behind the modal */
dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.5);
}

button#close-modal-btn {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
}

button#close-modal-btn:hover {
  background-color: #45a049;
}
	
