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

button {
	cursor: pointer;
}

/* 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;
	color: white !important;
}

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

.hidden {
	display: none !important;
}

.discount-banner {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	background: #c62828;
	color: #fff;
	padding: 12px 20px;
	text-align: center;
	z-index: 10000;
	font-weight: bold;
}

.discount-banner.success {
	background: #1b8f3a;
}

.discount-banner.error {
	background: #c62828;
}

/* ============ 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: #888;
	border-radius: 12px;
}

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








.sidebar {
	width: 110px;
	/* border-right: 2px solid #d3d1d1; */
	color: white;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 25px;
	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;
	display: flex;
	flex-direction: column;
	gap: 15px;
	width: 80%;
}

.has-pending {
	/* border:1px solid orange !important; */
}

.sidebar-btn {
	/* width: 100%; */
	border: none;
	border: 1px solid #1a242f;
	color: #fff;
	border-radius: 8px;
	padding: 10px 6px;
	font-size: 11px;
	text-align: center;
	background: #1a242f;
}

.sidebar-btn:hover {
	border: 1px solid #2b3239;

}

.sidebar-btn.active {
	border-color: #27d62d;
	color: #27d62d;
}

/* ============ 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 0px 10px 0px;
	/* margin: 0 auto; */
	margin-bottom: 10px
}

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(270px, 1fr));
	gap: 1rem;
	overflow-y: scroll;
	/* flex: 1; */
	padding: 0 5px 0 0px;
}

.quick-add {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.quick-add-card {
	width: min(520px, 90%);
	/* background: #111a24; */
	/* border: 1px solid #1f2b38; */
	border-radius: 10px;
	padding: 24px;
	text-align: center;
}

.quick-add-card h3 {
	color: #fff;
	font-size: 18px;
	margin-bottom: 12px;
}

.quick-add-card input {
	width: 100%;
	padding: 16px;
	border-radius: 8px;
	border: 1px solid #2f3740;
	background: #19212b;
	color: #fff;
	font-size: 16px;
	text-align: center;
}

.quick-add-card input:focus {
	outline: none;
	background: #1a242f;
}

.quick-add-hint {
	margin-top: 8px;
	font-size: 12px;
	color: #9db0c1;
}

.quick-add-status {
	margin-top: 10px;
	font-size: 12px;
	color: #9db0c1;
	min-height: 14px;
}

.quick-add-status.error {
	color: #ffb3b3;
}

.quick-add-status.success {
	color: #7ee081;
}

.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: auto;
	color: white;
	font-weight: 200;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: stretch;
	padding: 7px 12px 15px 15px;
	/* border: 1px solid #2f3740; */
	margin: 0 0 0px 0px;
}

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

.product-card img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 6px;
}

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

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

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

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

.cart-header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.checkout-back-row {
	display: flex;
	justify-content: flex-start;
	padding: 6px 0 0;
}

#checkoutBackBtn {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 16px;
}

.icon-left {
	font-weight: bold;
}

#cartItems {
	flex: 1 1 auto;
	overflow-y: scroll;
	/* margin: 1.5rem 0; */
	background: #1a242f;
	padding: 5px 10px 0px 15px;
	border-radius: 4px;
	/* border-bottom: 1px solid; */
	/* display: flex; */
	flex-direction: column;
	height: 54vh;
	/* justify-content: center; */
}


.cart-empty-indicator {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #556476;
	font-size: 12px;
	opacity: 0.7;
	pointer-events: none;
	align-self: center;
	margin: auto;
	justify-content: center;
	/* align-items: center; */
	/* justify-items: center; */
	height: 100%;
}

.cart-empty-icon {
	font-size: 16px;
}

#tilcta {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}

#checkoutTotals,
#checkoutPayments,
#checkoutFinal {
	display: flex;
	flex-direction: column;
	height: 100%;
	flex: 1 1 auto;
	min-height: 0;
}

#checkoutFinal {
	overflow: hidden;
}

#checkoutComplete {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.complete-title {
	font-size: 18px;
	margin-bottom: 10px;
	color: #27d62d;
}

.order-result {
	text-align: center;
	padding: 20px 10px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.order-result-icon {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 36px;
	font-weight: bold;
	margin: 0 auto 6px;
	background: #203a2a;
	color: #27d62d;
	transform: scale(0.7);
	opacity: 0.6;
}

.order-result.success .order-result-icon {
	background: #1b3f28;
	color: #27d62d;
	animation: pop-in 320ms ease-out forwards;
}

.order-result.error .order-result-icon {
	background: #3a2020;
	color: #ff6b6b;
}

.order-result.pending .order-result-icon {
	background: #2a2f36;
	color: #9db0c1;
}

.order-result-title {
	font-size: 18px;
	font-weight: bold;
	color: #fff;
}

.order-result-ref {
	font-size: 12px;
	color: #9db0c1;
}

.order-result-error {
	font-size: 12px;
	color: #ffb3b3;
	white-space: pre-wrap;
}

@keyframes pop-in {
	0% {
		transform: scale(0.4);
		opacity: 0.2;
	}

	70% {
		transform: scale(1.1);
		opacity: 1;
	}

	100% {
		transform: scale(1);
		opacity: 1;
	}
}

.checkout-actions,
.actions-full {
	margin-top: auto;
}

.cart.checkout-mode #tilcta {
	flex: 1;
}

.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;
	transition: transform 0.2s ease;
	touch-action: pan-y;
}

.cart-item-wrap {
	position: relative;
	overflow: hidden;
	border-radius: 4px;
	/* background: #0d1a23; */
}

.cart-item-wrap::last-child() {
	border-bottom: none !important;
}

.cart-item-content {
	background: #1a242f;
	position: relative;
	z-index: 1;
}

.cart-item-delete {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 92px;
	border: none;
	background: #d32f2f;
	color: #fff;
	font-weight: bold;
	cursor: pointer;
	z-index: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 103px;
}

.cart-item-wrap.reveal-delete .cart-item-content {
	transform: translateX(-92px);
}

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

.cart-item .meta-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
}

.cart-item .meta-row label {
	font-size: 12px;
	color: #9db0c1;
}

.cart-item .meta-row input[type="number"] {
	width: 70px;
	padding: 6px 8px;
	font-size: 12px;
	background: #0d1a23;
	border: 1px solid #2f3740;
	color: white;
	border-radius: 6px;
}

.cart-item .transfer-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 8px;
	font-size: 12px;
	color: #c7d3df;
}

.cart-item .transfer-row label {
	font-size: 12px;
	color: #9db0c1;
}

.cart-item .transfer-select {
	padding: 6px 8px;
	font-size: 12px;
	background: #0d1a23;
	border: 1px solid #2f3740;
	color: white;
	border-radius: 6px;
}

.cart-item .transfer-note {
	color: #ffb74d;
	font-size: 11px;
}

.cart-item-wrap.transfer-required .cart-item-content {
	border-left: 3px solid #ffb74d;
}

.cart-item-wrap.transfer-required .transfer-note {
	color: #ff7043;
	font-weight: bold;
}


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;
}

.actions-row {
	align-items: center;
}

.actions-full button {
	width: 100%;
}

.checkout-actions {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
	position: sticky;
	bottom: 0;
	background: #1a242f;
	padding: 10px 0 4px;
	z-index: 2;
	align-items: flex-end;
	display: grid;
}

.checkout-actions .actions,
.checkout-actions .actions-full {
	justify-content: flex-end;
}

.checkout-actions .btn,
.checkout-actions .btn-success {
	width: auto;
}

.backorder-details {
	margin-top: 14px;
	padding: 12px;
	border-radius: 10px;
	background: #0d1a23;
	border: 1px solid #1f2b38;
}

.backorder-title {
	font-size: 13px;
	color: #9db0c1;
	margin-bottom: 10px;
}

.backorder-grid {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 10px;
}

.backorder-field label {
	display: block;
	font-size: 12px;
	color: #9db0c1;
	margin-bottom: 6px;
}

.backorder-field input,
.backorder-field select {
	width: 100%;
	padding: 10px;
	border-radius: 8px;
	border: 1px solid #2f3740;
	background: #19212b;
	color: #fff;
}

.backorder-address {
	margin-top: 10px;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 10px;
}

.backorder-note {
	margin-top: 8px;
	font-size: 12px;
	color: #7f95a8;
}

.pending-orders-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border: 1px solid #1f252b;
	background: #0d1a23;
	color: #fff;
	border-radius: 8px;
}

.refresh-btn {
	min-width: 200px;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
}

.refresh-btn .refresh-text {
	color: #9db0c1;
	font-size: 12px;
}

.refresh-btn .refresh-label {
	font-size: 13px;
	font-weight: bold;
}

.search-btn {
	width: 42px;
	justify-content: center;
	padding: 8px;
}

.search-icon {
	font-size: 16px;
}

.search-modal-content {
	width: min(640px, 92vw);
}

.search-modal-input input {
	width: 100%;
	padding: 12px;
	border-radius: 8px;
	border: 1px solid #2f3740;
	background: #19212b;
	color: #fff;
}

.search-results {
	margin-top: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 60vh;
	overflow-y: auto;
}

.search-result-row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 10px;
	align-items: center;
	background: #1a242f;
	border: 1px solid #2f3740;
	border-radius: 8px;
	padding: 10px 12px;
}

.search-result-title {
	color: #fff;
	font-size: 14px;
}

.search-result-meta {
	color: #9db0c1;
	font-size: 12px;
}

.search-result-actions {
	display: flex;
	gap: 6px;
}

.pending-orders-btn.has-pending {
	border-color: #ffb74d;
	box-shadow: 0 0 0 2px rgba(255, 183, 77, 0.2);
}

.pending-count {
	min-width: 22px;
	height: 22px;
	border-radius: 11px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	background: #2f3740;
	color: #fff;
	padding: 0 6px;
}

.refresh-timestamp {
	color: #9db0c1;
	font-size: 12px;
}

.pending-orders-btn.has-pending .pending-count {
	background: #ffb74d;
	color: #111;
}

.pending-orders-view {
	background: #111a24;
	color: #fff;
	padding: 20px;
	border-radius: 8px;
	overflow-y: auto;
	height: 100%;
	margin-top: 10px;
}

.pending-orders-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.pending-orders-title h3 {
	margin: 0;
	font-size: 20px;
}

.pending-orders-meta {
	font-size: 12px;
	color: #9db0c1;
}

.pending-orders-grid {
	--pending-cols: 1.4fr 0.6fr 0.8fr 1.2fr 0.7fr;
	background: #0d1a23;
	border-radius: 6px;
	overflow: hidden;
}

.pending-orders-grid-header {
	display: grid;
	grid-template-columns: var(--pending-cols);
	background: #101a24;
	color: #9db0c1;
	font-weight: normal;
	margin-bottom: 8px;
}

.pending-orders-grid-header>div {
	padding: 10px;
	border-bottom: none;
	color: #9db0c1;
	font-size: 13px;
}

.pending-orders-grid-body {
	max-height: 56vh;
	overflow-y: auto;
}

.pending-orders-row {
	display: grid;
	grid-template-columns: var(--pending-cols);
}

.pending-orders-row>div {
	padding: 10px;
	border-bottom: 1px solid #1f2b38;
	font-size: 13px;
	color: #d7e2ee;
	background: #0d1a23;
}

.audit-orders-grid {
	--pending-cols: 1.4fr 0.6fr 0.9fr 1.2fr 0.9fr;
}

.audit-orders-header {
	justify-content: space-between;
}

.audit-orders-header .btn {
	position: static;
}

.audit-orders-title {
	text-align: left;
	margin: 0;
}

.audit-orders-row {
	cursor: pointer;
}

.audit-orders-row:hover > div {
	background: #122131;
}

.audit-filter {
	background: #0d1a23;
	border: 1px solid #1f2b38;
	border-radius: 6px;
	color: #d7e2ee;
	font-size: 12px;
	padding: 6px 10px;
	width: 100%;
}

.audit-filter::placeholder {
	color: #9db0c1;
}

.audit-order-filter-cell {
	display: grid;
	gap: 6px;
	align-content: start;
}

.audit-order-details {
	display: none;
	background: #0b1620;
	border-bottom: 1px solid #1f2b38;
}

.audit-order-details.open {
	display: block;
}

.audit-order-items {
	display: grid;
	grid-template-columns: 1.6fr 0.5fr 0.7fr 0.7fr;
}

.audit-order-items > div {
	padding: 8px 10px;
	font-size: 12px;
	color: #c7d4e2;
}

.audit-order-items-header {
	background: #101a24;
	color: #9db0c1;
}

.audit-order-items-row > div {
	border-top: 1px solid #1f2b38;
}

.audit-order-meta {
	padding: 10px;
	border-top: 1px solid #1f2b38;
}

.audit-order-meta-title {
	font-size: 12px;
	color: #9db0c1;
	margin-bottom: 8px;
}

.audit-order-meta-row {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 8px;
	padding: 6px 0;
	border-top: 1px solid #1f2b38;
	font-size: 12px;
	color: #d7e2ee;
}

.audit-order-meta-row:first-of-type {
	border-top: none;
}

.audit-order-meta-key {
	color: #9db0c1;
	word-break: break-word;
}

.audit-order-meta-value {
	word-break: break-word;
}

.pending-orders-empty {
	padding: 12px;
	color: #9db0c1;
	font-size: 13px;
	background: #0d1a23;
	border-radius: 6px;
}

#checkoutPayments,
#checkoutFinal {
	display: flex;
	flex-direction: column;
	height: 100%;
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: scroll;
}

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;
}


.discount {
	background: #0d1a23;
	color: #c8cacb;
}

.actions button:first-child,
.blue {
	background: #28333f;
	color: #ffffff;
	border: none;
	padding: 20px;
}

button#loginBtn {
	background: #27d62d;
	color: #fff;
}

.btn-success {
	background: #27d62d !important;
	color: #fff;
	border: none;
	border-radius: 5px;
	font-weight: bold;
	margin: 0px 0 10px 0;
	width: 100%;
	padding: 20px 20px !important;
	cursor: pointer;
}

.actions .btn-success {
	/* background: #27d62d !important; */
	/* color: #fff; */
}

.actions .btn-success:hover,
.btn-success:hover {
	background: #2ddd33;
}

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;
}

span#storeName {
	color: #556476;
	font-size: 14px;
	border-left: 1px solid #262e39;
	padding: 0 10px;
	font-weight: bold;
	text-align: center;
}

.signal-icon {
	display: flex;
	align-items: flex-end;
	gap: 2px;
	height: 17px;
	width: max-content;
	padding-left: 14px;
	top: -3px;
	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;
}

.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 120;
}

.modal {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #fff;
	color: #0b1722;
	border-radius: 10px;
	padding: 16px;
	width: min(90vw, 420px);
	z-index: 121;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.modal h3 {
	margin: 0 0 8px;
}

.modal .muted {
	color: #6b7280;
	margin: 0 0 14px;
}

.modal .actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
}

.modal input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	margin-bottom: 12px;
}

.modal .sbtn-state {
	background: #f3f4f6;
	border: 1px solid #d1d5db;
	color: #111827;
}

.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;
}

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

.receipt-header .btn {
	width: auto;
	margin: 0;
	padding: 6px 10px;
}

.receipt-actions {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	/* margin-top: 1rem; */
}

.checkout-actions .btn,
.receipt-actions,
#paymentLines .btn {
	/* padding: 20px; */
	font-size: 1rem;
	border-radius: 4px;
	font-weight: bold;
	cursor: pointer;
}

.confetti {
	position: absolute;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
	z-index: 10001;
	perspective: 900px;
}

.confetti-piece {
	position: absolute;
	width: var(--w, 6px);
	height: var(--h, 12px);
	opacity: var(--o, 0.6);
	border-radius: 2px;
	top: var(--top, -12px);
	left: var(--left, 50%);
	transform-origin: center;
	will-change: transform, opacity;
	animation: confetti-fall var(--t, 3.4s) linear forwards;
}

@keyframes confetti-fall {
	0% {
		opacity: var(--o, 0.7);
		transform: translate3d(var(--x, 0px), 0, 0) rotateZ(var(--r, 180deg)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
	}

	70% {
		opacity: var(--fade, 0.6);
		transform: translate3d(var(--x2, var(--x, 0px)), 70vh, 0) rotateZ(var(--r2, 720deg)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
	}

	100% {
		opacity: 0;
		transform: translate3d(var(--x2, var(--x, 0px)), 120vh, 0) rotateZ(var(--r2, 720deg)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
	}
}

.receipt-actions .btn {
	padding: 10px;
}

#receiptItems,
#receiptSummary,
#receiptMeta,
#receiptPayments,
#finalReceiptItems,
#finalReceiptSummary,
#finalReceiptMeta,
#finalReceiptPayments,
#completeReceiptItems,
#completeReceiptSummary,
#completeReceiptMeta,
#completeReceiptPayments {
	margin-bottom: 0.8rem;
	font-size: 14px;
	color: #111;
}

#finalReceiptItems {
	flex: 1 1 auto;
	min-height: 0;
	max-height: 100%;
	overflow-y: auto;
	padding-right: 4px;
}

#finalReceiptItems,
#finalReceiptSummary,
#finalReceiptMeta,
#finalReceiptPayments,
#completeReceiptItems,
#completeReceiptSummary,
#completeReceiptMeta,
#completeReceiptPayments {
	color: #fff;
}

#receiptItems .receipt-line,
#receiptSummary .receipt-line,
#receiptMeta .receipt-line,
#receiptPayments .receipt-line,
#finalReceiptItems .receipt-line,
#finalReceiptSummary .receipt-line,
#finalReceiptMeta .receipt-line,
#finalReceiptPayments .receipt-line,
#completeReceiptItems .receipt-line,
#completeReceiptSummary .receipt-line,
#completeReceiptMeta .receipt-line,
#completeReceiptPayments .receipt-line {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 4px 0;
	border-bottom: 1px dashed #d7d7d7;
}

#finalReceiptItems .receipt-line,
#finalReceiptSummary .receipt-line,
#finalReceiptMeta .receipt-line,
#finalReceiptPayments .receipt-line,
#completeReceiptItems .receipt-line,
#completeReceiptSummary .receipt-line,
#completeReceiptMeta .receipt-line,
#completeReceiptPayments .receipt-line {
	border-bottom: 1px dashed #2f3740;
}

#receiptPayments .payment-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 6px;
}

#receiptPayments select,
#receiptPayments input[type="number"] {
	padding: 6px 8px;
	font-size: 12px;
}

#paymentLines .payment-row {
	display: grid;
	align-items: center;
	gap: 10px;
	margin: 8px 0px;
	grid-template-columns: 1fr 1fr 20% 30px;
	border-bottom: 2px solid #212d3b;
	padding: 10px 0;
}

#paymentLines {
	flex: 1 1 auto;
	min-height: 0;
	max-height: 100%;
	overflow-y: auto;
	padding-right: 4px;
}

#paymentLines select,
#paymentLines input[type="number"] {
	padding: 16px 10px;
	font-size: 12px;
	background: #0d1a23;
	color: #8b8b8b;
	border: 1px solid #2f3740;
	border-radius: 6px;
	/* min-width: 90px; */
}

.remove {
	border-radius: 100% !important;
	padding: 0px !important;
	width: 30px;
	height: 30px;
	font-size: 13px !important;
	border: 3px solid #2f3740 !important;
	cursor: pointer;
	background: #0d1a23;
	color: white;
	font-weight: 100 !important;
}

.remove:hover,
.actions button:first-child:hover,
#paymentLines .btn:hover {
	background: #2f3b47;
}

#paymentLines .btn {
	/* padding: 8px 10px; */
}

#paymentLines .btn.btn-success {
	width: 100%;
	margin-top: 6px;
}

#paymentCompleteBtn {
	width: 100%;
	margin-top: 10px;
}

#amountDue {
	font-weight: bold;
}

#discountContent .inline-field {
	flex-direction: column;
	align-items: stretch;
	gap: 6px;
}

#discountContent input[type="text"] {
	padding: 10px;
	border-radius: 6px;
	border: 1px solid #d0d0d0;
}

.inline-field {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 8px 0;
}

.inline-field label {
	font-size: 12px;
	color: #9db0c1;
}

.inline-field input[type="number"] {
	width: 80px;
	background: #0d1a23;
	color: #fff;
	border: 1px solid #2f3740;
	padding: 6px 8px;
	border-radius: 6px;
}

#receiptContent .btn.subtle,
#productContent .btn.subtle {
	background: #e0e0e0;
	color: #222;
}

.product-card .stock {
	font-size: 11px;
	color: #9db0c1;
}

.product-card .actions {
	display: flex;
	gap: 6px;
	margin-top: 6px;
}

.tile-info-btn {
	background: #2f3740;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 11px;
	cursor: pointer;
}

.tile-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-top: 16px;
}

.tile-add-btn {
	border: none;
	border-radius: 6px;
	font-size: 11px;
	cursor: pointer;
	padding: 6px 8px;
}

#productDetailsView {
	background: #111a24;
	color: #fff;
	padding: 20px;
	border-radius: 8px;
	overflow-y: auto;
	/* max-height: calc(100vh - 160px); */
	margin-top: 10px;
}

#productDetailsView.full-height {
	height: 100%;
	/* margin-top: 10px; */
}

.product-details-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
}

.product-details-title {
	display: flex;
	align-items: center;
	gap: 12px;
}

#productDetailsThumb {
	width: 64px;
	height: 64px;
	border-radius: 8px;
	object-fit: cover;
	background: #1a242f;
}

#productDetailsTitle {
	margin: 0;
	font-size: 20px;
}

.product-details-sku {
	font-size: 12px;
	color: #9db0c1;
}

.product-details-description {
	margin: 12px 0 18px;
	color: #cfd8e3;
	line-height: 1.4;
}

.product-details-table {
	width: 100%;
	border-collapse: collapse;
	background: #0d1a23;
	border-radius: 6px;
	overflow: hidden;
}

.product-details-table th,
.product-details-table td {
	text-align: left;
	padding: 10px;
	border-bottom: 1px solid #1f2b38;
	font-size: 13px;
}

.product-details-table th {
	background: #101a24;
	color: #9db0c1;
	font-weight: normal;
}

.product-details-grid {
	--details-cols: 1.4fr 0.6fr;
	background: #0d1a23;
	border-radius: 6px;
	overflow: hidden;
}

.product-details-components-title {
	margin: 4px 0 10px;
	font-size: 13px;
	color: #9db0c1;
}

.product-details-components-grid {
	--details-cols: 1.6fr 0.4fr 0.6fr;
}

.product-details-grid-header {
	display: grid;
	grid-template-columns: var(--details-cols);
	background: #101a24;
	color: #9db0c1;
	font-weight: normal;
	margin-bottom: 8px;
}

.product-details-grid-header>div {
	text-align: left;
	padding: 10px;
	border-bottom: none;
	color: #9db0c1;
	font-size: 13px;
}

.product-details-grid-body {
	max-height: 50vh;
	overflow-y: auto;
}

.product-details-row {
	display: grid;
	grid-template-columns: var(--details-cols);
}

.product-details-row>div {
	text-align: left;
	padding: 10px;
	border-bottom: 1px solid #1f2b38;
	font-size: 13px;
	color: #d7e2ee;
	background: #0d1a23;
}

#productDetails .receipt-line {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 4px 0;
	border-bottom: 1px dashed #d7d7d7;
}

#productLocations {
	margin-top: 10px;
}

#productLocations .location-row {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 4px 0;
	border-bottom: 1px dashed #d7d7d7;
}

#tilcta {
	/* position: absolute; */
	bottom: 0px;
	right: 0px;
	width: inherit;
	/* height: auto; */
	/* overflow: hidden; */
	background: #1a242f;
	padding: 10px 10px 0px 10px;
	/* border-top: 1px solid #2f3740; */
	width: 100%;
	border-radius: 4px;
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}


.product-tile-top {
	display: grid;
	grid-template-columns: 48px 1fr;
	gap: 10px;
	align-items: center;
	text-align: left;
}

.product-tile-top.no-image {
	grid-template-columns: 1fr;
}

.tile-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.tile-info-btn {
	/* margin-top: 6px; */
	background: #2f3740;
	color: #fff;
	border: none;
	padding: 12px 10px;
	border-radius: 4px;
	font-size: 11px;
	cursor: pointer;
}

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;
}

#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;
}

#refreshBtn {
	display: flex;
	align-items: center;
	/* gap: 8px; */
	/* width: 240px; */
	justify-content: center;
}

.refresh-text {
	font-size: 12px;
	color: #9db0c1;
}

.refresh-icon .icon {
	display: inline-block;
	flex-shrink: 0;
}

.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: grid;
	justify-content: center;
	padding: 15px 0 7px 0px;
	grid-template-columns: auto 1fr auto;
	align-items: center;
}

.header-left {
	display: flex;
	align-items: center;
	gap: 8px;
}

.status-sep {
	width: 1px;
	height: 18px;
	background: #1f2b38;
	display: inline-block;
}

.menu-container {
	position: relative;
}

.menu-btn {
	padding: 6px 10px;
	border: 1px solid #1f252b;
	background: #0d1a23;
	color: #fff;
	border-radius: 8px;
}

.menu-dots {
	font-size: 18px;
	line-height: 1;
}

.menu-dropdown {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
	background: #0d1a23;
	border: 1px solid #1f2b38;
	border-radius: 10px;
	padding: 8px;
	min-width: 160px;
	z-index: 50;
}

.menu-item {
	background: #1a242f;
	color: #fff;
	border: none;
	padding: 8px 10px;
	border-radius: 6px;
	text-align: left;
	cursor: pointer;
}

.cta {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}

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);
	}
}

.btn {
	position: relative;
	/* padding: 15px 10px;
	border-radius: 4px;
	border: none; */
}

.btn.loading {
	color: transparent !important;
	pointer-events: none;
}

.btn.loading::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 1em;
	height: 1em;
	border: 2px solid white;
	border-right-color: transparent;
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg)
	}
}

@media print {
	@page {
		margin: 0;
		size: 80mm auto;
	}

	html,
	body {
		margin: 0;
		padding: 0;
	}

	body * {
		visibility: hidden;
	}

	#checkoutFinal,
	#checkoutFinal * {
		visibility: visible;
	}

	#checkoutFinal {
		position: fixed;
		top: 0;
		left: 0;
		width: 80mm;
		max-width: 80mm;
		margin: 0;
		padding: 0;
		display: block;
	}

	#finalReceiptMeta,
	#finalReceiptItems,
	#finalReceiptSummary,
	#finalReceiptPayments {
		width: 100%;
		max-height: none;
		border-radius: 0;
		padding: 0;
		background: #fff;
		color: #111;
	}

	.receipt-actions {
		display: none;
	}
}

.blue {
	background: #28333f !important;
}

.blue:hover {
	background: #2c3743 !important;
}

.green {
	background: #27d62d !important;
	border: none;
	color: white;
	padding: 10px 20px;
	border-radius: 4px;
}

.green:hover {
	background: #2ddd33 !important
}

.red {
	background: red;
	padding: 15px 10px;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
}

.red:hover {
	background: #ff1111;
}

.cart-scroll {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 0;
}
