:root {
  --bg: #1C1B18;
  --surface: #242320;
  --surface2: #2E2C27;
  --accent: #E7A33E;
  --accent-2: #93A56C;
  --text: #F3ECDF;
  --muted: #A79E8E;
  --danger: #C1554A;
  --border: #3a382f;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
}
.hidden { display: none !important; }
.display { font-family: 'Bricolage Grotesque', sans-serif; }
.mono { font-family: 'IBM Plex Mono', monospace; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.danger { color: var(--danger); }
.small { font-size: 13px; }
.tiny { font-size: 11px; line-height: 1.5; }
.center { text-align: center; }
::selection { background: var(--accent); color: #1C1B18; }

button { font-family: inherit; cursor: pointer; border: none; }
input, textarea, select { font-family: 'Inter', sans-serif; color: var(--text); }
input:focus, textarea:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- buttons ---------- */
.btn { border-radius: 8px; padding: 10px 16px; font-weight: 600; font-size: 14px; }
.btn-accent { background: var(--accent); color: #1C1B18; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); opacity: 0.8; font-size: 13px; padding: 7px 12px; border-radius: 6px; }
.btn-outline:hover { opacity: 1; }
.btn-ghost { background: var(--surface2); color: var(--text); font-size: 14px; padding: 7px 12px; border-radius: 6px; position: relative; }
.btn-danger-ghost { background: none; color: var(--danger); opacity: 0.6; font-size: 12px; }
.btn-danger-ghost:hover { opacity: 1; }
.full-width { width: 100%; }
.input { width: 100%; padding: 9px 12px; font-size: 14px; background: var(--surface2); border-radius: 6px; border: 1px solid var(--border); }

/* ---------- header ---------- */
.header { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(6px); background: rgba(28,27,24,0.9); border-bottom: 1px solid var(--border); }
.header-inner { max-width: 1000px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.header-left { display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 8px; background: none; }
.brand-name { font-size: 18px; font-weight: 600; color: var(--text); }
.brand-logo { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.brand-icon { font-size: 18px; }
.badge-count { position: absolute; top: -8px; right: -8px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #1C1B18; display: flex; align-items: center; justify-content: center; }

/* ---------- hero + store ---------- */
.hero { max-width: 1000px; margin: 0 auto; padding: 40px 20px 16px; }
.table-badge { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 12px; font-size: 12px; font-weight: 600; padding: 6px 12px; background: rgba(231,163,62,0.14); color: var(--accent); border-radius: 20px; }
.eyebrow { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 8px; }
.hero-title { font-size: 42px; font-weight: 700; line-height: 1.05; margin: 0 0 8px; }
.hero-sub { font-size: 14px; color: var(--muted); margin: 0; }

.category-tabs { max-width: 1000px; margin: 0 auto; padding: 0 20px 16px; display: flex; gap: 8px; overflow-x: auto; }
.cat-tab { white-space: nowrap; font-size: 14px; padding: 7px 14px; border-radius: 20px; background: var(--surface2); color: var(--text); font-weight: 500; }
.cat-tab.active { background: var(--accent); color: #1C1B18; font-weight: 600; }

.menu-grid { max-width: 1000px; margin: 0 auto; padding: 8px 20px 120px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.menu-card { display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border-radius: 10px; border: 1px solid #34322b; }
.menu-card-img { height: 144px; width: 100%; background: var(--surface2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.menu-card-img img { width: 100%; height: 100%; object-fit: cover; }
.menu-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.menu-card-desc { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0; }
.add-btn { align-self: flex-start; margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 7px 12px; background: var(--accent-2); color: #16170f; border-radius: 6px; }

/* dotted price leader */
.leader { display: flex; align-items: baseline; gap: 8px; }
.leader-name { font-weight: 600; white-space: nowrap; }
.leader-fill { flex: 1; border-bottom: 1px dotted var(--text); opacity: 0.3; transform: translateY(-3px); }
.leader-price { font-family: 'IBM Plex Mono', monospace; color: var(--accent); white-space: nowrap; }

/* ---------- ticket / receipt (cart + orders) ---------- */
.ticket { position: relative; background: var(--surface); border-radius: 2px; padding: 22px 16px 16px; }
.ticket::before {
  content: ""; position: absolute; top: -7px; left: 0; right: 0; height: 14px;
  background-image: radial-gradient(circle at 10px 7px, transparent 7px, var(--bg) 7.5px);
  background-size: 20px 14px; background-repeat: repeat-x;
}
.ticket-line { display: flex; align-items: center; gap: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 14px; margin-bottom: 10px; }
.ticket-line .name { flex: 1; font-family: 'Inter', sans-serif; }
.ticket-line .name small { display: block; font-size: 11px; opacity: 0.5; }
.qty-controls { display: flex; align-items: center; gap: 6px; }
.qty-btn { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; background: var(--surface2); border-radius: 4px; }
.ticket-total { display: flex; justify-content: space-between; font-weight: 600; border-top: 1px dashed #4a473c; padding-top: 10px; margin-top: 4px; }

/* ---------- cart drawer ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.6); display: flex; justify-content: flex-end; }
.overlay.center { align-items: center; justify-content: center; padding: 16px; }
.drawer { position: relative; width: 100%; max-width: 400px; height: 100%; overflow-y: auto; padding: 32px 20px 20px; background: var(--bg); }
.close-btn { position: absolute; top: 16px; right: 16px; background: none; color: var(--text); opacity: 0.6; font-size: 18px; }
.close-btn:hover { opacity: 1; }
.drawer-title { font-size: 24px; font-weight: 700; margin: 0 0 16px; display: flex; align-items: center; gap: 8px; }

/* ---------- checkout / item modal ---------- */
.modal { position: relative; width: 100%; max-width: 420px; padding: 24px; background: var(--surface); border-radius: 12px; border: 1px solid var(--border); max-height: 90vh; overflow-y: auto; }
.modal-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.field-label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 6px; }
.row { display: flex; gap: 8px; }
.payment-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.payment-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 4px; font-size: 12px; font-weight: 500; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text); }
.payment-btn.active { border: 1.5px solid var(--accent); background: rgba(231,163,62,0.1); color: var(--accent); }
.card-fields { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }

/* ---------- login ---------- */
.login-box { max-width: 360px; margin: 96px auto 0; padding: 24px; text-align: center; background: var(--surface); border-radius: 12px; border: 1px solid var(--border); }
.login-card .input { margin-top: 0; }

/* ---------- admin ---------- */
.admin { max-width: 1000px; margin: 0 auto; padding: 32px 20px; }
.admin-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-tab { font-size: 14px; padding: 8px 16px; border-radius: 8px; background: var(--surface2); color: var(--text); font-weight: 500; }
.admin-tab.active { background: var(--accent); color: #1C1B18; }
.admin-section-title { font-size: 24px; font-weight: 700; margin: 0 0 16px; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.admin-card { display: flex; gap: 12px; padding: 12px; background: var(--surface); border-radius: 10px; border: 1px solid #34322b; }
.admin-card-img { width: 64px; height: 64px; flex-shrink: 0; border-radius: 6px; overflow: hidden; background: var(--surface2); display: flex; align-items: center; justify-content: center; }
.admin-card-img img { width: 100%; height: 100%; object-fit: cover; }
.admin-card-actions { display: flex; gap: 12px; margin-top: 8px; }
.admin-card-actions button { background: none; color: var(--text); opacity: 0.6; font-size: 11px; display: flex; align-items: center; gap: 4px; }
.admin-card-actions button:hover { opacity: 1; }
.list-row { display: flex; align-items: center; justify-content: between; gap: 8px; padding: 10px 12px; background: var(--surface); border-radius: 8px; border: 1px solid #34322b; margin-bottom: 8px; justify-content: space-between; }
.role-badge { font-size: 11px; margin-left: 8px; padding: 2px 6px; border-radius: 4px; background: var(--surface2); text-transform: uppercase; letter-spacing: 0.05em; }
.image-upload { width: 100%; height: 120px; margin-bottom: 16px; display: flex; align-items: center; justify-content: center; cursor: pointer; background: var(--surface2); border-radius: 8px; border: 1px dashed #4a473c; font-size: 13px; color: var(--muted); overflow: hidden; }
.image-upload img { width: 100%; height: 100%; object-fit: cover; }
.status-btn { margin-top: 12px; width: 100%; padding: 8px; font-size: 12px; font-weight: 600; border-radius: 6px; }
.status-todo { background: var(--accent); color: #1C1B18; }
.status-done { background: var(--surface2); color: var(--accent-2); }
.paid-badge { font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 4px; }
.paid-yes { background: rgba(147,165,108,0.18); color: var(--accent-2); }
.paid-no { background: rgba(193,85,74,0.18); color: var(--danger); }
.pay-tag { font-size: 11px; font-weight: 500; padding: 4px 8px; border-radius: 4px; background: var(--surface2); text-transform: uppercase; letter-spacing: 0.05em; }
.qr-card { display: flex; gap: 16px; padding: 16px; background: var(--surface); border-radius: 10px; border: 1px solid #34322b; }
.qr-card img { width: 96px; height: 96px; border-radius: 6px; background: #fff; flex-shrink: 0; }
.link-btn { display: flex; align-items: center; gap: 6px; font-size: 11px; padding: 6px 8px; background: var(--surface2); border-radius: 6px; color: var(--text); text-align: left; width: 100%; overflow: hidden; }
.link-btn span.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 12px 20px; background: var(--accent-2); color: #16170f; border-radius: 6px; font-size: 14px; font-weight: 500; z-index: 100; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }

/* ==================== MODERN POLISH: glow, 3D, animations ==================== */

/* ---------- entrance animation ---------- */
.fade-up { opacity: 0; transform: translateY(18px); animation: fadeUp .7s cubic-bezier(.16,.8,.3,1) forwards; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* ---------- glow background blobs ---------- */
.landing-hero { position: relative; overflow: hidden; padding: 72px 0 48px; }
.glow-blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.35; pointer-events: none; z-index: 0; animation: drift 14s ease-in-out infinite alternate; }
.glow-blob-1 { width: 380px; height: 380px; background: radial-gradient(circle, var(--accent), transparent 70%); top: -140px; left: -80px; }
.glow-blob-2 { width: 320px; height: 320px; background: radial-gradient(circle, var(--accent-2), transparent 70%); bottom: -120px; right: -60px; animation-delay: 3s; }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(24px,-18px) scale(1.08); } }

.accent-text { color: var(--accent); text-shadow: 0 0 24px rgba(231,163,62,0.35); }

/* ---------- hero layout ---------- */
.hero-grid { position: relative; z-index: 1; max-width: 1000px; margin: 0 auto; padding: 0 20px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero-copy .eyebrow { text-align: left; }
.hero-copy .landing-title { text-align: left; }
.hero-copy .landing-sub { margin: 0 0 28px; text-align: left; max-width: 520px; }
.hero-copy .landing-cta { justify-content: flex-start; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 320px; margin: 0 auto 12px; }
}

/* ---------- floating 3D ticket mockup (pure CSS) ---------- */
.hero-visual { display: flex; justify-content: center; }
.mock-stage { position: relative; width: 260px; height: 320px; perspective: 900px; }
.mock-card { position: absolute; inset: 0; border-radius: 16px; padding: 20px; box-sizing: border-box; }
.mock-card-back {
  background: linear-gradient(160deg, var(--surface2), var(--surface));
  transform: rotate(-7deg) translate(10px, 14px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  border: 1px solid #3a382f;
}
.mock-card-front {
  background: linear-gradient(160deg, rgba(46,44,39,0.95), rgba(28,27,24,0.95));
  border: 1px solid #423f34;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), 0 0 40px rgba(231,163,62,0.12);
  transform: rotate(4deg);
  animation: floatCard 5s ease-in-out infinite;
  backdrop-filter: blur(6px);
}
@keyframes floatCard { 0%,100% { transform: rotate(4deg) translateY(0); } 50% { transform: rotate(4deg) translateY(-10px); } }
.mock-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); margin-bottom: 14px; }
.mock-line { display: block; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #4a473c, #3a382f); }
.mock-line-title { width: 70%; height: 12px; margin-bottom: 18px; }
.mock-line-sm { width: 55%; }
.mock-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.mock-price { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--accent); }
.mock-divider { height: 1px; background: repeating-linear-gradient(90deg, #4a473c 0 4px, transparent 4px 8px); margin: 8px 0 14px; }
.mock-total { font-weight: 700; font-size: 13px; color: var(--text); }
.mock-btn { margin-top: 16px; background: var(--accent); color: #1C1B18; text-align: center; font-weight: 700; font-size: 12px; padding: 10px; border-radius: 8px; box-shadow: 0 0 24px rgba(231,163,62,0.45); }
.mock-qr { position: absolute; bottom: -22px; left: -28px; width: 64px; height: 64px; background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; animation: floatCard 5s ease-in-out infinite; animation-delay: .4s; }
.mock-qr-grid { width: 44px; height: 44px; background-image: repeating-linear-gradient(0deg, #1C1B18 0 6px, transparent 6px 12px), repeating-linear-gradient(90deg, #1C1B18 0 6px, transparent 6px 12px); background-blend-mode: multiply; opacity: .85; }
.mock-check { position: absolute; top: -14px; right: -10px; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-2); color: #16170f; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 22px rgba(147,165,108,0.55); animation: pop 2.4s ease-in-out infinite; }
@keyframes pop { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* ---------- glow buttons ---------- */
.btn-glow { position: relative; transition: transform .2s ease, box-shadow .2s ease; box-shadow: 0 0 0 rgba(231,163,62,0); }
.btn-glow:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(231,163,62,0.35), 0 0 18px rgba(231,163,62,0.3); }
.btn-accent, .btn-outline, .btn-ghost { transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease; }
.btn-accent:hover { box-shadow: 0 6px 20px rgba(231,163,62,0.28); transform: translateY(-1px); }

/* ---------- feature card icon badge (pseudo 3D) ---------- */
.feature-icon-badge {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--surface2), var(--surface));
  border: 1px solid #423f34;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 8px 18px rgba(0,0,0,0.35);
  margin-bottom: 12px; font-size: 19px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.feature-card { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.feature-card:hover { transform: translateY(-4px); border-color: rgba(231,163,62,0.35); box-shadow: 0 16px 36px rgba(0,0,0,0.35), 0 0 0 1px rgba(231,163,62,0.08); }
.feature-card:hover .feature-icon-badge { transform: translateY(-2px) rotate(-3deg); box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 22px rgba(231,163,62,0.18); }

/* ---------- consistent hover lift for cards across the app ---------- */
.menu-card, .business-card, .qr-card, .admin-card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.menu-card:hover, .business-card:hover, .qr-card:hover, .admin-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,0.35); border-color: rgba(231,163,62,0.25); }

/* ---------- bottom CTA glow border ---------- */
.landing-cta-bottom { position: relative; overflow: hidden; }
.landing-cta-bottom::before {
  content: ""; position: absolute; inset: -1px; border-radius: 14px; padding: 1px;
  background: linear-gradient(120deg, rgba(231,163,62,0.5), transparent 40%, transparent 60%, rgba(147,165,108,0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}

@media (max-width: 640px) {
  .hero-title { font-size: 30px; }
  .payment-grid { gap: 6px; }
}

/* ---------- header right / account menu ---------- */
.header-right { display: flex; align-items: center; gap: 10px; }
.account-menu-wrap { position: relative; }
.account-dropdown { position: absolute; top: calc(100% + 8px); right: 0; min-width: 200px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,0.4); z-index: 60; }
.dropdown-item { display: block; width: 100%; text-align: left; padding: 10px 14px; background: none; color: var(--text); font-size: 13px; }
.dropdown-item:hover { background: var(--surface2); }
.dropdown-item.danger { color: var(--danger); }

/* ---------- landing page ---------- */
#landingView { max-width: 1000px; margin: 0 auto; padding: 0 20px 80px; }
.landing-hero { text-align: center; padding: 64px 0 40px; max-width: 720px; margin: 0 auto; }
.eyebrow.center { text-align: center; }
.landing-title { font-size: 44px; font-weight: 700; line-height: 1.1; margin: 8px 0 16px; }
.landing-sub { font-size: 15px; color: var(--muted); line-height: 1.7; margin: 0 auto 28px; max-width: 620px; }
.landing-cta { display: flex; justify-content: center; }
.landing-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 24px 0 56px; }
.feature-card { background: var(--surface); border: 1px solid #34322b; border-radius: 12px; padding: 20px; }
.feature-card .feature-icon { font-size: 24px; margin-bottom: 10px; }
.feature-card h3 { font-size: 15px; margin: 0 0 6px; font-weight: 600; }
.feature-card p { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }
.landing-cta-bottom { text-align: center; padding: 40px 20px; background: var(--surface); border-radius: 14px; border: 1px solid #34322b; }

/* ---------- auth modal ---------- */
.auth-tabs { display: flex; gap: 4px; margin-bottom: 20px; background: var(--surface2); border-radius: 8px; padding: 4px; }
.auth-tab { flex: 1; padding: 8px; font-size: 13px; font-weight: 600; border-radius: 6px; background: none; color: var(--muted); }
.auth-tab.active { background: var(--accent); color: #1C1B18; }

/* ---------- business card (my business) ---------- */
.business-card { display: flex; gap: 16px; padding: 20px; background: var(--surface); border-radius: 12px; border: 1px solid #34322b; max-width: 480px; align-items: center; }
.business-card-logo { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }