:root {
  --green: #16a34a;
  --green-light: #22c55e;
  --green-dark: #14532d;
  --mango: #f59e0b;
  --mango-light: #fcd34d;
  --bg: #f8fdf9;
  --card: #ffffff;
  --text: #1a2e1a;
  --muted: #6b7280;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; background: var(--bg); font-family: 'Nunito', sans-serif; margin: 0; padding: 0; }
#app { height: 100%; display: flex; flex-direction: column; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #bbf7d0; border-radius: 999px; }

.screen { display: none; flex-direction: column; height: 100%; overflow: hidden; animation: fadeIn 0.3s ease; }
.screen.active { display: flex; }

.nav-btn.active { color: var(--green); }
.nav-btn.active svg { stroke: var(--green); }
.nav-btn.active .nav-dot { opacity: 1; }
.nav-dot { opacity: 0; width: 4px; height: 4px; background: var(--green); border-radius: 999px; margin: 0 auto; transition: opacity 0.2s; }

.numpad-btn { background: white; border: 2px solid #e5f7ec; border-radius: 14px; font-size: 1.5rem; font-weight: 800; color: #166534; box-shadow: 0 3px 10px rgba(0,0,0,0.07); transition: all 0.12s; cursor: pointer; user-select: none; display: flex; align-items: center; justify-content: center; min-height: 56px; }
.numpad-btn:active { transform: scale(0.93); background: #dcfce7; box-shadow: none; }
.numpad-btn.btn-clear { background: #fef2f2; border-color: #fecaca; color: #dc2626; }
.numpad-btn.btn-del { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.numpad-btn.btn-ok { background: linear-gradient(135deg, #16a34a, #22c55e); border-color: transparent; color: white; font-size: 1.6rem; box-shadow: 0 4px 14px rgba(22,163,74,0.4); }

.product-card { background: white; border-radius: 16px; border: 2px solid #e5f7ec; transition: all 0.15s; cursor: pointer; }
.product-card:active { transform: scale(0.96); border-color: var(--green-light); background: #f0fdf4; }

.pos-input { background: #f0fdf4; border: 2px solid #bbf7d0; border-radius: 12px; padding: 10px 14px; font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 1rem; color: #14532d; width: 100%; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.pos-input:focus { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,0.15); }

.hero-gradient { background: linear-gradient(135deg, #14532d 0%, #15803d 40%, #16a34a 70%, #22c55e 100%); }

.stat-card { background: white; border-radius: 16px; border: 2px solid #e5f7ec; padding: 16px; }
.admin-card { background: white; border-radius: 16px; border: 2px solid #e5f7ec; padding: 20px; margin-bottom: 20px; }

.scroll-area { overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }

#adsense-bar { height: 50px; background: #f0f0f0; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; color: #9ca3af; letter-spacing: 1px; border-top: 1px solid #e5e7eb; flex-shrink: 0; }

.toast { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); background: #14532d; color: white; padding: 10px 20px; border-radius: 999px; font-weight: 700; font-size: 0.9rem; box-shadow: 0 4px 16px rgba(0,0,0,0.2); z-index: 9999; animation: slideUp 0.3s ease both; }
.toast.error { background: #dc2626; }
.toast.warning { background: #f59e0b; }

.cat-pill { padding: 6px 14px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; border: 2px solid transparent; white-space: nowrap; cursor: pointer; transition: all 0.15s; }
.cat-pill.active { background: #16a34a; color: white; border-color: #16a34a; }
.cat-pill:not(.active) { background: white; color: #374151; border-color: #e5e7eb; }

.bill-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed #e5e7eb; }
.bill-row:last-child { border-bottom: none; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: flex-end; justify-content: center; z-index: 1100; animation: fadeIn 0.2s ease; }
.modal-overlay.hidden { display: none !important; }
.modal-sheet { background: white; border-radius: 24px 24px 0 0; width: 100%; max-width: 480px; padding: 24px; animation: slideUp 0.35s cubic-bezier(0.34,1.56,0.64,1) both; max-height: 90vh; overflow-y: auto; }
.modal-handle { width: 40px; height: 4px; background: #e5e7eb; border-radius: 999px; margin: 0 auto 20px; }

.qty-btn { transition: all 0.1s; cursor: pointer; user-select: none; }
.qty-btn:active { transform: scale(0.95); }

.admin-sidebar { position: fixed; left: -280px; top: 0; bottom: 0; width: 280px; background: linear-gradient(135deg, #14532d 0%, #16a34a 100%); z-index: 1200; transition: left 0.3s ease; overflow-y: auto; box-shadow: 2px 0 10px rgba(0,0,0,0.1); }
.admin-sidebar.open { left: 0; }
.admin-sidebar .nav-link { display: flex; align-items: center; gap: 12px; padding: 14px 20px; margin: 4px 12px; border-radius: 12px; color: white; text-decoration: none; transition: background 0.2s; cursor: pointer; }
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active { background: rgba(255,255,255,0.2); }

.admin-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1199; display: none; }
.admin-overlay.open { display: block; }

.admin-content { position: fixed; inset: 0; background: #f0fdf4; z-index: 1300; overflow-y: auto; display: none; }
.admin-content.open { display: block; }

.admin-header { position: sticky; top: 0; background: white; border-bottom: 2px solid #e5f7ec; padding: 15px 20px; display: flex; align-items: center; gap: 15px; z-index: 10; }

.admin-input { background: #f0fdf4; border: 2px solid #bbf7d0; border-radius: 12px; padding: 10px 14px; width: 100%; outline: none; }
.admin-input:focus { border-color: #16a34a; }

.btn-primary { background: linear-gradient(135deg, #16a34a, #22c55e); color: white; padding: 10px 20px; border-radius: 12px; font-weight: 700; border: none; cursor: pointer; }
.btn-danger { background: #dc2626; color: white; padding: 10px 20px; border-radius: 12px; font-weight: 700; border: none; cursor: pointer; }
.btn-warning { background: #f59e0b; color: white; padding: 10px 20px; border-radius: 12px; font-weight: 700; border: none; cursor: pointer; }
.btn-secondary { background: #e5e7eb; color: #374151; padding: 10px 20px; border-radius: 12px; font-weight: 700; border: none; cursor: pointer; }

.trial-banner { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: white; padding: 8px 12px; font-size: 0.8rem; font-weight: bold; text-align: center; }
.trial-expired-banner { background: #dc2626; color: white; padding: 8px 12px; font-size: 0.8rem; font-weight: bold; text-align: center; }

.hidden { display: none !important; }

#loading-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.3); display: none; align-items: center; justify-content: center; z-index: 99999; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 768px) {
  .product-card .text-4xl { font-size: 1.8rem; }
  .numpad-btn { min-height: 45px; font-size: 1.2rem; }
}