/* ============================================================
   Sip & Ship — Speakeasy theme (charcoal + amber/gold)
   Shared across customer / admin / partner apps
   ============================================================ */

:root {
  --bg:          #0a0a0b;
  --bg-2:        #131316;
  --surface:     #18181b;
  --surface-2:   #1f1f24;
  --surface-3:   #27272a;
  --border:      #2e2e33;
  --border-2:    #3a3a42;
  --text:        #fafafa;
  --text-2:      #d4d4d8;
  --muted:       #a1a1aa;
  --muted-2:     #71717a;

  --amber:       #f59e0b;
  --amber-2:     #fbbf24;
  --amber-soft:  rgba(245,158,11,0.12);
  --gold:        #d4af37;
  --emerald:     #10b981;
  --emerald-2:   #34d399;
  --rose:        #f43f5e;
  --rose-2:      #fb7185;

  --radius:      14px;
  --radius-sm:   10px;
  --radius-lg:   20px;
  --shadow:      0 10px 30px -10px rgba(0,0,0,0.6);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  background-image:
    radial-gradient(900px 500px at 100% -10%, rgba(245,158,11,0.06), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(212,175,55,0.05), transparent 60%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ---------- Layout ---------- */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}
.main { flex: 1; padding: 22px 0 80px; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,10,11,0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--amber), var(--gold));
  display: grid; place-items: center;
  color: #1a1206; font-weight: 800; font-size: 18px;
  box-shadow: 0 6px 18px -6px rgba(245,158,11,0.5);
}
.brand-name {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 700; letter-spacing: .2px;
}
.brand-name span { color: var(--amber); }
.header-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- Footer ---------- */
.footer {
  margin-top: auto;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 18px 0;
  color: var(--muted-2);
  font-size: 13px;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
.h-display { font-size: 28px; }
.h-section { font-size: 20px; }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.amber { color: var(--amber); }
.emerald { color: var(--emerald); }
.rose { color: var(--rose); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.card-2 { background: var(--surface-2); }
.card-hover { transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.card-hover:hover { transform: translateY(-2px); border-color: var(--border-2); background: var(--surface-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px;
  font-weight: 600; font-size: 14px;
  border: 1px solid transparent;
  background: var(--surface-3); color: var(--text);
  transition: transform .12s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--border); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--amber), #e08a06);
  color: #1a1206; border-color: transparent;
  box-shadow: 0 8px 20px -8px rgba(245,158,11,0.55);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--amber-2), var(--amber)); }
.btn-ghost { background: transparent; border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: rgba(244,63,94,0.12); color: var(--rose-2); border-color: rgba(244,63,94,0.3); }
.btn-danger:hover { background: rgba(244,63,94,0.2); }
.btn-sm { padding: 7px 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 13px 22px; font-size: 15px; }
.btn-block { width: 100%; }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 500; }
.input, .select, .textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-soft);
}
.textarea { min-height: 80px; resize: vertical; }

/* ---------- Badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  border: 1px solid var(--border-2);
}
.badge-amber { background: var(--amber-soft); color: var(--amber-2); border-color: rgba(245,158,11,0.3); }
.badge-emerald { background: rgba(16,185,129,0.12); color: var(--emerald-2); border-color: rgba(16,185,129,0.3); }
.badge-rose { background: rgba(244,63,94,0.12); color: var(--rose-2); border-color: rgba(244,63,94,0.3); }
.badge-muted { background: var(--surface-3); color: var(--muted); }
.badge-dot::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; display: inline-block;
}

/* ---------- Grids ---------- */
.grid { display: grid; gap: 14px; }
.grid-products { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) {
  .grid-cols-2, .grid-cols-3 { grid-template-columns: 1fr; }
}

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; }
.tab {
  padding: 9px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  border: 1px solid transparent; white-space: nowrap;
  background: transparent; transition: all .15s ease;
}
.tab:hover { color: var(--text); }
.tab.active {
  background: var(--amber-soft); color: var(--amber-2);
  border-color: rgba(245,158,11,0.3);
}

/* ---------- Product card ---------- */
.product-card { display: flex; flex-direction: column; gap: 10px; }
.product-thumb {
  height: 120px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #2a2a30, #18181b);
  display: grid; place-items: center;
  font-size: 36px;
  border: 1px solid var(--border);
}
.product-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); }
.product-name { font-weight: 600; font-size: 15px; }
.product-price { font-weight: 700; color: var(--amber); font-size: 16px; }
.product-desc { font-size: 12px; color: var(--muted); min-height: 32px; }

/* ---------- Cart ---------- */
.cart-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  background: linear-gradient(135deg, var(--amber), #e08a06);
  color: #1a1206; border-radius: 999px;
  padding: 14px 18px; font-weight: 700;
  box-shadow: 0 14px 30px -8px rgba(245,158,11,0.6);
  display: inline-flex; align-items: center; gap: 8px;
  border: none;
}
.cart-count {
  background: #1a1206; color: var(--amber-2);
  border-radius: 999px; padding: 1px 8px; font-size: 12px;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.65); backdrop-filter: blur(4px);
  display: none; align-items: flex-end; justify-content: center;
  padding: 0;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px 18px 0 0; width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  padding: 20px; animation: slideUp .25s ease;
}
@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: 20px; }
  .modal { border-radius: var(--radius); }
}
@keyframes slideUp { from { transform: translateY(20px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-title { font-size: 18px; font-family: var(--font-display); }
.modal-close {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--surface-3); border: none; color: var(--muted);
  font-size: 18px; display: grid; place-items: center;
}
.modal-close:hover { background: var(--border); color: var(--text); }

/* ---------- OTP box ---------- */
.otp-display {
  background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(212,175,55,0.05));
  border: 1px dashed rgba(245,158,11,0.5);
  border-radius: var(--radius);
  padding: 20px; text-align: center;
}
.otp-code {
  font-family: var(--font-display);
  font-size: 42px; letter-spacing: 10px;
  color: var(--amber-2); font-weight: 800;
  margin: 6px 0;
}

/* ---------- Order / list items ---------- */
.list { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kv { display: flex; flex-direction: column; }
.kv-k { font-size: 12px; color: var(--muted-2); }
.kv-v { font-size: 14px; font-weight: 600; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
.toast {
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: 10px; padding: 12px 14px; font-size: 14px;
  box-shadow: var(--shadow); animation: toastIn .2s ease;
}
.toast.success { border-color: rgba(16,185,129,0.4); }
.toast.error { border-color: rgba(244,63,94,0.4); }
.toast.info { border-color: rgba(245,158,11,0.4); }
@keyframes toastIn { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- QR ---------- */
.qr-box {
  background: #fff; padding: 12px; border-radius: 12px;
  display: inline-grid; place-items: center;
}
.qr-box img, .qr-box canvas { display: block; }

/* ---------- Map ---------- */
.map-picker {
  height: 320px; border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
}
#mapCanvas { height: 100%; width: 100%; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state .emoji { font-size: 40px; margin-bottom: 10px; }
.scroll-area { max-height: 420px; overflow-y: auto; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2); border-top-color: currentColor;
  animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hide { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--border-2); }
