@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");
:root {
	--primary: #2563eb;
	--primary-d: #1d4ed8;
	--primary-l: #dbeafe;
	--success: #10b981;
	--warning: #f59e0b;
	--danger: #ef4444;
	--bg: #f0f4f8;
	--surface: #fff;
	--surface-2: #f8fafc;
	--border: #e2e8f0;
	--text: #0f172a;
	--muted: #64748b;
	--light: #94a3b8;
	--sh-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
	--sh: 0 4px 16px rgba(0, 0, 0, 0.07);
	--r: 16px;
	--r-sm: 10px;
	--font: "Plus Jakarta Sans", sans-serif;
}
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}
body {
	font-family: var(--font);
	background: var(--bg);
	color: var(--text);
}
.topbar {
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	padding: 0 1rem;
	height: 58px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: sticky;
	top: 0;
	z-index: 100;
}
.topbar-brand {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	text-decoration: none;
}
.topbar-logo {
	width: 36px;
	height: 36px;
	background: linear-gradient(135deg, var(--primary), #3b82f6);
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	color: #fff;
}
.topbar-name {
	font-weight: 800;
	color: var(--text);
}
.icon-btn {
	width: 36px;
	height: 36px;
	border-radius: 9px;
	border: 1px solid var(--border);
	background: var(--surface-2);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.page-wrap {
	padding: 1rem;
	max-width: 640px;
	margin: 0 auto;
}
.page-title {
	font-size: 1.2rem;
	font-weight: 800;
}
.stats-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.7rem;
	margin-bottom: 1rem;
}
.stat-card {
	background: var(--surface);
	border-radius: var(--r);
	padding: 1rem;
	border: 1px solid var(--border);
}
.stat-value {
	font-size: 1.2rem;
	font-weight: 800;
}
.form-card {
	background: var(--surface);
	border-radius: var(--r);
	border: 1px solid var(--border);
	padding: 1rem;
	margin-bottom: 0.875rem;
}
.form-section-title {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--primary);
	margin-bottom: 0.75rem;
}
.form-control,
.form-select {
	width: 100%;
	padding: 0.6rem 0.8rem;
	border-radius: var(--r-sm);
	border: 1.5px solid var(--border);
}
.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.6rem 1rem;
	border-radius: var(--r-sm);
	font-weight: 600;
	cursor: pointer;
	border: none;
}
.btn-primary {
	background: var(--primary);
	color: #fff;
}
.btn-outline {
	background: transparent;
	border: 1.5px solid var(--primary);
	color: var(--primary);
}
.btn-danger {
	background: var(--danger);
	color: #fff;
}
.btn-wa {
	background: #25d366;
	color: #fff;
}
.btn-block {
	width: 100%;
}
.order-card {
	background: var(--surface);
	border-radius: var(--r);
	padding: 0.8rem;
	margin-bottom: 0.6rem;
	border: 1px solid var(--border);
	cursor: pointer;
}
.badge-success {
	background: #d1fae5;
	color: #065f46;
	padding: 0.2rem 0.6rem;
	border-radius: 20px;
	font-size: 0.7rem;
	font-weight: 700;
}
.badge-warning {
	background: #fef3c7;
	color: #92400e;
}
.badge-danger {
	background: #fee2e2;
	color: #991b1b;
}
.empty-state {
	text-align: center;
	padding: 2rem;
	color: var(--muted);
}
.loading-overlay {
	position: fixed;
	inset: 0;
	background: rgba(255, 255, 255, 0.7);
	backdrop-filter: blur(3px);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}
.loading-overlay.show {
	display: flex;
}
.spinner {
	width: 38px;
	height: 38px;
	border: 3px solid var(--border);
	border-top-color: var(--primary);
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
}
@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}
.toast-container {
	position: fixed;
	top: 1rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10000;
}
.toast {
	background: var(--text);
	color: white;
	padding: 0.6rem 1rem;
	border-radius: var(--r-sm);
	margin-bottom: 0.5rem;
}
.login-page {
	min-height: 100vh;
	background: linear-gradient(135deg, #1e40af, #2563eb);
	display: flex;
	align-items: center;
	justify-content: center;
}
.login-card {
	background: var(--surface);
	border-radius: var(--r);
	padding: 2rem;
	width: 100%;
	max-width: 360px;
}
.brand-logo {
	width: 60px;
	height: 60px;
	background: linear-gradient(135deg, var(--primary), #3b82f6);
	border-radius: 17px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	font-weight: 800;
	color: white;
	margin: 0 auto 0.8rem;
}
.pin-display {
	display: flex;
	justify-content: center;
	gap: 0.7rem;
	margin: 1.5rem 0;
}
.pin-dot {
	width: 15px;
	height: 15px;
	border-radius: 50%;
	border: 2px solid var(--border);
}
.pin-dot.filled {
	background: var(--primary);
	border-color: var(--primary);
}
.pin-keypad {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.55rem;
}
.pin-key {
	background: var(--surface-2);
	border: 1.5px solid var(--border);
	border-radius: var(--r-sm);
	padding: 0.8rem;
	font-size: 1.2rem;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
}
.text-danger {
	color: var(--danger);
}
.text-success {
	color: var(--success);
}
.list-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem;
	background: var(--surface-2);
	border-radius: 8px;
	margin-bottom: 0.5rem;
}
.form-row {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}
@media print {
	.no-print {
		display: none !important;
	}
	body {
		background: white;
	}
	.invoice-wrap {
		box-shadow: none;
	}
}

/* ── sz-table (dipakai di log.html & purchase.html) ──────────── */
.sz-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.82rem;
}
.sz-table th,
.sz-table td {
	padding: 0.45rem 0.6rem;
	border-bottom: 1px solid var(--border);
	text-align: left;
}
.sz-table thead tr {
	background: var(--surface-2);
}
.sz-table th {
	font-weight: 700;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--muted);
}
.sz-table tbody tr:hover {
	background: color-mix(in srgb, var(--primary) 4%, transparent);
}

/* ── list-item (dipakai di settings.html & purchase.html) ─────── */
.list-item {
	padding: 0.6rem 0.25rem;
	border-bottom: 1px solid var(--border);
	font-size: 0.875rem;
}
.list-item:last-child {
	border-bottom: none;
}

/* ── Missing global utility classes ──────────────────────────── */
.hidden { display: none !important; }

/* ── Login page missing styles ──────────────────────────────── */
.login-title {
	font-size: 1.4rem;
	font-weight: 800;
	text-align: center;
	margin-bottom: 0.2rem;
	color: var(--text);
}
.login-subtitle {
	font-size: 0.82rem;
	color: var(--muted);
	text-align: center;
	margin-bottom: 0;
}
.error-msg {
	color: var(--danger);
	font-size: 0.78rem;
	text-align: center;
	min-height: 1.2em;
	margin: 0.2rem 0;
}
@keyframes shake {
	0%, 100% { transform: translateX(0); }
	20% { transform: translateX(-8px); }
	40% { transform: translateX(8px); }
	60% { transform: translateX(-6px); }
	80% { transform: translateX(6px); }
}
.pin-display.shake { animation: shake 0.4s ease; }
.pin-key:hover { background: var(--primary-l); border-color: var(--primary); color: var(--primary); }
.pin-key:active { transform: scale(0.94); }
.pin-key { transition: background 0.12s, transform 0.1s; }

/* ── Button size variants ────────────────────────────────────── */
.btn-sm {
	padding: 0.35rem 0.7rem;
	font-size: 0.78rem;
	border-radius: 8px;
}
.btn-icon {
	width: 32px;
	height: 32px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	border: 1.5px solid var(--border);
	background: var(--surface-2);
	cursor: pointer;
	font-size: 1rem;
	color: var(--text);
}
.btn-icon:hover { background: var(--border); }
.btn-icon.danger { color: var(--danger); border-color: var(--danger); }
.btn-icon.danger:hover { background: #fee2e2; }

/* ── Badge base ──────────────────────────────────────────────── */
.badge {
	display: inline-block;
	padding: 0.18rem 0.55rem;
	border-radius: 20px;
	font-size: 0.68rem;
	font-weight: 700;
}
.badge-info {
	background: #dbeafe;
	color: #1e40af;
}

/* ── Tab navigation (settings.html) ─────────────────────────── */
.tab-nav {
	display: flex;
	gap: 0.4rem;
	overflow-x: auto;
	margin-bottom: 1rem;
	padding-bottom: 0.2rem;
	scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn {
	padding: 0.45rem 0.9rem;
	border-radius: 20px;
	border: 1.5px solid var(--border);
	background: var(--surface);
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--muted);
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.15s;
}
.tab-btn.active {
	background: var(--primary);
	border-color: var(--primary);
	color: #fff;
}

/* ── Toast type variants ─────────────────────────────────────── */
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.warning { background: var(--warning); color: #1c1c1c; }
.toast         { transition: opacity 0.3s; }

/* ── Stat card color variants (dashboard) ───────────────────── */
.stat-icon { font-size: 1.3rem; margin-bottom: 0.3rem; display: block; }
.stat-label { font-size: 0.72rem; color: var(--muted); margin-top: 0.15rem; }
.stat-body { display: flex; flex-direction: column; }

/* ── Topbar actions group ────────────────────────────────────── */
.topbar-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

/* ── Form label ─────────────────────────────────────────────── */
.form-label {
	display: block;
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--muted);
	margin-bottom: 0.3rem;
}

/* ── Section label ──────────────────────────────────────────── */
.section-label {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--muted);
	margin: 1rem 0 0.5rem;
}

/* ── Order card utilities ───────────────────────────────────── */
.order-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.order-inv { font-size: 0.7rem; font-weight: 700; color: var(--primary); }
.order-name { font-weight: 700; font-size: 0.92rem; margin: 0.1rem 0; }
.order-meta { font-size: 0.73rem; color: var(--muted); }
.order-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 0.5rem; }
.order-actions { display: flex; gap: 0.4rem; }
