* { box-sizing: border-box; }
body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background: #f4f6f5;
	color: #1b2420;
}
.muted { color: #6b7570; }
.small { font-size: 12px; }

.input {
	width: 100%;
	padding: 14px 16px;
	font-size: 18px;
	border: 1px solid #cfd8d3;
	border-radius: 10px;
	background: #fff;
}
.btn {
	padding: 12px 20px;
	font-size: 16px;
	border: none;
	border-radius: 10px;
	cursor: pointer;
}
.btn-primary { background: #2d6b1a; color: #fff; }
.btn-primary:disabled { background: #9fb79a; cursor: not-allowed; }
.btn-large { width: 100%; padding: 20px; font-size: 20px; font-weight: 600; margin-top: 16px; }

.link { color: #2d6b1a; text-decoration: none; margin-left: 16px; font-weight: 600; }
.link-btn { background: none; border: none; color: #2d6b1a; cursor: pointer; font-weight: 600; }

/* Login */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-wrap { width: 100%; max-width: 380px; padding: 16px; }
.login-card { background: #fff; border-radius: 16px; padding: 32px; box-shadow: 0 4px 24px rgba(0,0,0,.08); text-align: center; }
.login-card h1 { margin: 0 0 4px; }
.login-card .sub { color: #6b7570; margin-bottom: 20px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.form-error { background: #fdecea; color: #a4292c; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }

/* Topbar */
.topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 20px;
	background: #fff;
	border-bottom: 1px solid #e2e8e4;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }

/* Till layout */
.till-layout {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 20px;
	padding: 20px;
	max-width: 1200px;
	margin: 0 auto;
}
@media (max-width: 900px) {
	.till-layout { grid-template-columns: 1fr; }
}

.till-left, .till-right { background: #fff; border-radius: 14px; padding: 20px; }

.scan-box, .search-box, .customer-box, .payment-box { margin-bottom: 18px; position: relative; }
.scan-box label, .search-box label, .customer-box label, .payment-box label {
	display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px;
}
#barcodeInput { font-size: 22px; padding: 18px; text-align: center; border: 2px solid #2d6b1a; }

.dropdown-results {
	position: absolute;
	z-index: 10;
	background: #fff;
	border: 1px solid #e2e8e4;
	border-radius: 10px;
	width: 100%;
	max-height: 260px;
	overflow-y: auto;
	box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.dropdown-item { padding: 12px 16px; cursor: pointer; border-bottom: 1px solid #f0f2f1; }
.dropdown-item:hover { background: #f4f6f5; }

.cart-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.cart-table th, .cart-table td { padding: 10px 8px; border-bottom: 1px solid #eef1ef; text-align: left; }
.cart-table .num { text-align: right; }
.qty-input { width: 64px; padding: 6px; text-align: right; border: 1px solid #cfd8d3; border-radius: 6px; }
.remove-btn { background: none; border: none; color: #a4292c; font-size: 18px; cursor: pointer; }
.total-label { font-weight: 700; text-align: right; }
.total-amount { font-weight: 700; font-size: 18px; }

.selected-customer {
	display: flex; justify-content: space-between; align-items: center;
	background: #eef5ec; padding: 14px 16px; border-radius: 10px; margin-top: 6px;
}

.payment-buttons { display: flex; gap: 12px; }
.payment-btn {
	flex: 1; padding: 20px; font-size: 18px; font-weight: 600;
	border: 2px solid #cfd8d3; border-radius: 10px; background: #fff; cursor: pointer;
}
.payment-btn.active { border-color: #2d6b1a; background: #eef5ec; color: #2d6b1a; }

.overlay {
	position: fixed; inset: 0; background: rgba(0,0,0,.5);
	display: flex; align-items: center; justify-content: center; z-index: 50;
}
.overlay[hidden] { display: none; }
.overlay-card { background: #fff; border-radius: 16px; padding: 32px; text-align: center; min-width: 300px; }
.overlay-card h2 { margin-top: 0; color: #2d6b1a; }
