/* ============ General Reset ============ */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Firefox */
input[type=number] {
	-moz-appearance: textfield;
}

body {
	font-family: 'Segoe UI', sans-serif;
	background: #f4f4f4;
	color: #333;
	padding-top: 0px;
}

/* ============ Layout ============ */
.pos-container {
	display: flex;
	height: 100vh;
	overflow: hidden;
}


::-webkit-scrollbar {
	width: 5px;
}

/* #left-side-nav-container::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 0px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  background: lightgreen;
} */

::-webkit-scrollbar-track {
	background: #1a242f;
	border-radius: 12px;
}

/* Handle */
::-webkit-scrollbar-thumb {
	background: #0a141f;
	border-radius: 12px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
	background: #888;
	border-radius: 12px;
}








.sidebar {
	width: 90px;
	/* border-right: 2px solid #d3d1d1; */
	color: white;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 30px;
	background: #0d1a23;
}

.sidebar .logo {
	font-size: 2rem;
	/* margin-bottom: 2rem; */
}

.sidebar .nav {
	/* writing-mode: vertical-rl; */
	/* transform: rotate(180deg); */
	cursor: pointer;
	font-size: 12px;
	font-weight: bold;
}

/* ============ Main Content ============ */
.main-content {
	flex: 1;
	padding: 1rem;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #0a141f;
	padding-right: 30px;
}

.pos-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.pos-header input {
	padding: 0.5rem;
	width: 300px;
	font-size: 1rem;
}

.status-bar {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.status-bar select {
	padding: 0.4rem;
}

.status-bar .online {
	color: green;
	font-weight: bold;
}

.status-bar .offline {
	color: red;
	font-weight: bold;
}

section.right-col {
	width: 194px;
	text-align: left;
	display: flex;
	align-items: center;
	justify-content: right;
	justify-items: center;
}

.status {
	float: left;
}

#status-label {
	font-size: 12px;
	margin-left: 4px;
	color: white;
	/* align-items: center; */
	/* display: flex; */
	position: relative;
	bottom: -2px;
}

section.search {
	width: 100%;
	padding: 10px 0 10px 0px;
}

section.search input {
	border: none;
	font-size: 16px;
	padding: 20px;
	width: 100%;
	border-radius: 8px;
	background: #19212b;
	/* border: 1px solid #2f3740; */
	color: white;
}

section.search input:focus {
	outline: none;
	background: #1a242f;
}

input[type="search"]::-webkit-search-cancel-button {
	filter: invert(1);
}

/* ============ Category Buttons ============ */
.categories {
	margin: 1rem 0 2rem 0px;
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.categories button {
	padding: 15px;
	border: none;
	background: #e0e0e0;
	border-radius: 4px;
	cursor: pointer;
}

.categories .active {
	background: #27d62d;
	color: #fff;
}

/* ============ Product Grid ============ */
.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1rem;
	/* overflow-y: auto; */
	/* flex: 1; */
}

.product-card {
	background: #1a242f;
	padding: 0.5rem;
	border-radius: 6px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	text-align: center;
	cursor: pointer;
	transition: transform 0.2s ease;
	height: 97px;
	color: white;
	font-weight: 200;
	justify-content: space-between;
	display: flex;
	justify-items: center;
	align-items: center;
	padding: 7px 5px 5px 20px;
	/* border: 1px solid #2f3740; */
}

.product-card:hover {
	transform: scale(1.05);
}

.product-card img {
	width: 100%;
	height: 80px;
	object-fit: cover;
	border-radius: 4px;
	/* margin: 0; */
	/* float: left; */
	/* width: 140%; */
	/* padding: 5px; */
}

.product-card h4 {
	font-size: 0.9rem;
	font-weight: normal;
	float: left;
	color: white;
}

.product-card span {
	font-weight: bold;
}

/* ============ Cart Panel ============ */
.cart {
	width: 35%;
	background: #0d1a23;
	padding: 15px 1rem;
	display: flex;
	flex-direction: column;
	/* border-left: 1px solid #ccc; */
	color: white;
	position: relative;
}

.cart-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

#cartItems {
	flex: 1;
	overflow-y: auto;
	margin: 1.5rem 0;
	max-height: 60%;
	height: 60%;
	background: #1a242f;
	padding: 10px 10px 10px 15px;
	border-radius: 9px;
	/* border-bottom: 1px solid; */
}

.cart-item {
	/* display: flex; */
	align-items: center;
	/* justify-content: space-between; */
	gap: 0.5rem;
	margin-bottom: 0.5rem;
	border-bottom: 1px solid #2f3740;
	padding-bottom: 20px;
	padding-top: 10px;
	color: white;
}

.cart-item span {
	font-size: 16px;
	width: 30%;
	margin-left: 20px;
	/* float: left; */
	font-weight: normal;
}


span.price {
	float: right;
	margin-top: 5px;
	text-align: right;
	padding-right: 5px;
	font-weight: bold;
}

.cart-item input[type="number"] {
	width: 50px;
	padding: 10px;
	background: none;
	border: none;
	font-weight: bold;
	text-align: center;
	border-radius: 12px;
	border: 1px solid #2f3740;
	color: white;
}

.totals {
	font-size: 0.9rem;
	/* background: #1a242f; */
	/* padding: 10px 20px 10px 20px; */
	/* border-radius: 8px; */
}

.total {
	font-weight: bold;
	font-size: 1.1rem;
	margin-top: 0.3rem;
}

.actions {
	display: flex;
	gap: 0.5rem;
	margin-top: 1rem;
	/* border-top: 1px solid #2f3740; */
	padding-top: 10px;
}

button.clear {
	border: none;
	background: orange;
	padding: 10px;
	width: 50%;
	border-radius: 5px;
	color: white;
	font-weight: bold;
	font-size: 1.0rem;
}

button#loginBtn {
	width: 35%;
	border-radius: 12px;
	margin-top: 10px;
}

.actions button,
button#loginBtn {
	/* flex: 1; */
	padding: 20px;
	font-size: 1.0rem;
	border: none;
	cursor: pointer;
	border-radius: 4px;
	font-weight: bold;
}

.actions button:first-child {
	background: #28333f;
	color: #ffffff;
}

.actions button:last-child,
button#loginBtn {
	background: #27d62d;
	color: #fff;
}

header {
	background: #0f324c;
	padding: 10px 20px;
	color: white;
	display: flex;
	justify-content: space-between;
	align-items: anchor-center;
	/* flex: inherit; */
	position: fixed;
	width: 100%;
	top: 0;
}

header img {
	height: 30px;
	float: left;
	/* margin: 9px 10px 0 10px; */
}

header h1 {
	font-size: 16px;
	float: left;
	color: #00324b;
	width: 250px;
}

.signal-icon {
	display: flex;
	align-items: flex-end;
	gap: 2px;
	height: 17px;
	width: max-content;
	padding-left: 14px;
	padding-top: 30px;
	position: relative;
	z-index: 9999;
}

.signal-icon span {
	width: 5px;
	background-color: #ccc;
	/* default offline */
	border-radius: 2px;
	transition: background-color 0.3s, opacity 0.3s;
}

.signal-icon span:nth-child(1) {
	height: 5px;
}

.signal-icon span:nth-child(2) {
	height: 9px;
}

.signal-icon span:nth-child(3) {
	height: 14px;
}

.signal-icon span:nth-child(4) {
	height: 24px;
}

/* Connected: all bars green */
.signal-icon.connected span {
	background-color: #27d62d;
}

/* Connecting: animated bars pulsing */
.signal-icon.connecting span {
	animation: blink 1.2s infinite ease-in-out;
}

.signal-icon.connecting span:nth-child(2) {
	animation-delay: 0.2s;
}

.signal-icon.connecting span:nth-child(3) {
	animation-delay: 0.4s;
}

.signal-icon.connecting span:nth-child(4) {
	animation-delay: 0.6s;
}

@keyframes blink {

	0%,
	100% {
		opacity: 0.4;
	}

	50% {
		opacity: 1;
	}
}

/* Weak signal: only 2 bars green */
.signal-icon.weak span {
	background-color: #ccc;
}

.signal-icon.weak span:nth-child(1),
.signal-icon.weak span:nth-child(2) {
	background-color: orange;
}

/* No signal: gray bars */
.signal-icon.offline span {
	background-color: #bbb;
}

/* ============ Receipt Modal ============ */
.receipt-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 100;
}

.receipt-modal.hidden {
	display: none;
}

.receipt-content {
	background: #fff;
	padding: 2rem;
	width: 300px;
	border-radius: 6px;
	max-height: 80vh;
	overflow-y: auto;
}

.receipt-content h2 {
	margin-bottom: 1rem;
}

.receipt-content button {
	margin-top: 1rem;
	width: 100%;
	padding: 0.5rem;
	font-weight: bold;
	cursor: pointer;
}

#tilcta {
	/* position: absolute; */
	bottom: 0px;
	right: 0px;
	width: inherit;
	/* height: auto; */
	/* overflow: hidden; */
	background: #1a242f;
	padding: 20px 20px 20px 20px;
	/* border-top: 1px solid #2f3740; */
	width: 100%;
	border-radius: 7px;
}


.image_tile {
	width: 50%;
	padding: 5px;
}

.info {
	text-align: left;
}

span.userid {
	font-size: 12px;
	font-weight: 100;
}

#pinScreen,
#loginScreen {
	position: fixed;
	inset: 0;
	background: #0a141f;
	color: white;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	font-family: sans-serif;
}

#loginScreen {
	z-index: 99999;
}

#pinDisplay {
	display: flex;
	gap: 10px;
	margin-bottom: 30px;
}

.pin-dot {
	width: 40px;
	height: 40px;
	border: 2px solid #19212b;
	border-radius: 50%;
	/* background: #19212b; */
}

.pin-dot.filled {
	background: white;
}

.keypad {
	display: grid;
	grid-template-columns: repeat(3, 80px);
	gap: 15px;
	justify-content: center;
	/* background: #0e111c; */
	/* padding: 20px; */
	/* border-radius: 12px; */
}

.key {
	background: #19212b;
	color: white;
	font-size: 24px;
	border: none;
	border-radius: 50%;
	width: 80px;
	height: 80px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s;
}

#loginScreen input {
	background: #19212b;
	color: white;
	font-size: 16px;
	border: none;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s;
	padding: 20px;
	margin: 10px;
	min-width: 35%;
	text-align: center;
}

#loginError {
	margin: 10px;
}

.key:active {
	background: #555;
}

.key.zero {
	grid-column: span 3;
	border-radius: 15px;
}

.key.delete {
	background: #aa0000;
}

#refreshBtn,
#logoutBtn {
	/* display: flex; */
	/* align-items: center; */
	/* gap: 13px; */
	background: none;
	color: white;
	border: none;
	padding: 8px 25px;
	border-radius: 5px;
	cursor: pointer;
	font-size: 14px;
	float: left;
	border: 1px solid #1f252b;
	margin: 5px;
}

.refresh-icon .icon {
	position: relative;
	width: 16px;
	height: 16px;
}

.refresh-icon .icon::before {
	content: '';
	position: absolute;
	width: 100%;
	height: 100%;
	border: 2px solid white;
	border-radius: 50%;
	border-right-color: transparent;
	border-bottom-color: transparent;
	transform: rotate(-45deg);
}

.refresh-icon .icon::after {
	content: '';
	position: absolute;
	top: -3px;
	left: 50%;
	width: 6px;
	height: 6px;
	border-top: 2px solid white;
	border-left: 2px solid white;
	transform: rotate(45deg);
}

.funcs {
	display: flex;
	justify-content: space-between;
	padding: 0px 0 0 0px;
}

.cta {
	justify-content: space-between;
	display: flex;
}

span.barcode {
	clear: both;
	font-size: 10px;
	font-weight: 100;
	font-style: italic;
}

.spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid #ccc;
	border-top: 2px solid #333;
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
	vertical-align: middle;
}

@keyframes spin {
	100% {
		transform: rotate(360deg);
	}
}