/* =====================================================================
   facilpedido — styles.css
   Paleta: branco + azul claro, inspirada no anotai.ai
   ===================================================================== */

:root {
  --brand:        #2563eb;
  --brand-dark:   #1d4ed8;
  --brand-light:  #3b82f6;
  --brand-soft:   #dbeafe;
  --sky-50:       #f0f9ff;
  --sky-100:      #e0f2fe;
  --blue-50:      #eff6ff;
  --blue-100:     #dbeafe;

  --ink:          #0f172a;
  --ink-2:        #1e293b;
  --muted:        #64748b;
  --muted-2:      #94a3b8;
  --line:         #e2e8f0;
  --line-2:       #f1f5f9;

  --paper:        #ffffff;
  --bg:           #f8fafc;

  --green:        #10b981;
  --green-soft:   #d1fae5;
  --orange:       #f59e0b;
  --orange-soft:  #fef3c7;
  --red:          #ef4444;
  --red-soft:     #fee2e2;

  --shadow-sm:    0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.04);
  --shadow-md:    0 4px 6px -1px rgba(15,23,42,.06), 0 10px 15px -3px rgba(15,23,42,.06);
  --shadow-lg:    0 10px 25px -5px rgba(15,23,42,.08), 0 25px 50px -12px rgba(15,23,42,.10);
  --shadow-blue:  0 10px 30px -10px rgba(37,99,235,.45);

  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-2xl: 32px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-display {
  font-family: 'Sora', 'Inter', sans-serif;
  letter-spacing: -0.025em;
}
.font-mono { font-family: 'JetBrains Mono', monospace; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; padding: 0; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
img { display: block; max-width: 100%; }

/* =================== LAYOUT =================== */
.container        { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm     { max-width: 720px;  margin: 0 auto; padding: 0 24px; }
.container-md     { max-width: 960px;  margin: 0 auto; padding: 0 24px; }

/* =================== HELPERS =================== */
.hidden          { display: none; }
.flex            { display: flex; }
.flex-col        { flex-direction: column; }
.flex-1          { flex: 1; }
.items-center    { align-items: center; }
.items-start     { align-items: flex-start; }
.items-end       { align-items: flex-end; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1           { gap: 4px; }
.gap-2           { gap: 8px; }
.gap-3           { gap: 12px; }
.gap-4           { gap: 16px; }
.gap-5           { gap: 20px; }
.gap-6           { gap: 24px; }
.gap-8           { gap: 32px; }
.grid            { display: grid; }
.text-center     { text-align: center; }
.text-right      { text-align: right; }
.opacity-50      { opacity: 0.5; }
.opacity-60      { opacity: 0.6; }
.opacity-70      { opacity: 0.7; }
.opacity-80      { opacity: 0.8; }
.truncate        { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-1, .line-clamp-2 {
  display: -webkit-box; -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-1 { -webkit-line-clamp: 1; }
.line-clamp-2 { -webkit-line-clamp: 2; }

/* =================== TYPOGRAPHY =================== */
.h-display-1, h1 { font-family: 'Sora', sans-serif; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; font-size: clamp(2.25rem, 5vw, 3.75rem); margin: 0; color: var(--ink); }
.h-display-2     { font-family: 'Sora', sans-serif; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1;  font-size: clamp(1.875rem, 3.5vw, 2.75rem); margin: 0; color: var(--ink); }
h2               { font-family: 'Sora', sans-serif; font-weight: 700; letter-spacing: -0.02em;  line-height: 1.15; font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; color: var(--ink); }
h3               { font-family: 'Sora', sans-serif; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; font-size: 1.25rem; margin: 0; color: var(--ink); }

.t-body          { color: var(--muted); font-size: 1rem; line-height: 1.6; }
.t-body-lg       { color: var(--muted); font-size: 1.125rem; line-height: 1.65; }
.t-sm            { font-size: 0.875rem; color: var(--muted); }
.t-xs            { font-size: 0.75rem; color: var(--muted); }
.t-mono          { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; }
.t-tag           { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand); }

/* =================== BUTTONS =================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  transition: all .18s cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
}
.btn-sm  { padding: 8px 16px; font-size: 0.875rem; }
.btn-lg  { padding: 14px 28px; font-size: 1rem; }

.btn-primary  { background: var(--brand); color: #fff; box-shadow: var(--shadow-blue); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; pointer-events: none; }

.btn-ghost    { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--blue-50); border-color: var(--brand-soft); color: var(--brand); }

.btn-soft     { background: var(--brand-soft); color: var(--brand-dark); }
.btn-soft:hover { background: var(--blue-100); }

.btn-dark     { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); }

.btn-link     { color: var(--brand); padding: 0; background: none; }
.btn-link:hover { color: var(--brand-dark); }

/* =================== CARDS =================== */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 24px;
  transition: all .18s ease;
}
.card-hover:hover {
  border-color: var(--brand-soft);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card-soft {
  background: var(--blue-50);
  border-radius: var(--r-xl);
  padding: 24px;
}
.card-blue {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  border-radius: var(--r-2xl);
  padding: 32px;
  box-shadow: var(--shadow-blue);
}
.card-glass {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226,232,240,.6);
  border-radius: var(--r-xl);
}

/* =================== BADGES / PILLS =================== */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600;
  background: var(--blue-50); color: var(--brand-dark);
}
.pill-brand   { background: var(--brand-soft); color: var(--brand-dark); }
.pill-green   { background: var(--green-soft); color: var(--green); }
.pill-orange  { background: var(--orange-soft); color: #92400e; }
.pill-red     { background: var(--red-soft);   color: #991b1b; }

.dot { width: 6px; height: 6px; border-radius: 999px; display: inline-block; background: currentColor; }
.dot-pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity:1; transform:scale(1) } 50% { opacity:.4; transform:scale(1.6) } }

/* =================== FORMS =================== */
.field { display: block; }
.field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.input, .textarea, .select {
  width: 100%;
  padding: 11px 14px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.textarea { resize: vertical; min-height: 80px; }
.field-hint { font-size: 0.72rem; color: var(--muted-2); margin-top: 4px; }

.check {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  cursor: pointer;
  display: inline-grid; place-content: center;
  transition: all .15s;
}
.check:checked { background: var(--brand); border-color: var(--brand); }
.check:checked::after { content: "✓"; color: #fff; font-size: 12px; font-weight: 800; }

/* =================== NAV =================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-links {
  display: flex; gap: 28px; align-items: center;
  font-size: 0.92rem; font-weight: 500; color: var(--ink-2);
}
.nav-links a:hover { color: var(--brand); }
@media (max-width: 768px) { .nav-links { display: none; } }

/* =================== LOGO =================== */
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.18rem;
  color: var(--ink); letter-spacing: -0.02em;
}
.logo-mark { width: 30px; height: 30px; flex-shrink: 0; }

/* =================== HERO =================== */
.hero {
  background: linear-gradient(180deg, var(--blue-50) 0%, var(--paper) 90%);
  position: relative;
  overflow: hidden;
}
.hero-blob {
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
}

/* =================== PHONE MOCKUP =================== */
.phone {
  position: relative;
  max-width: 320px;
  margin: 0 auto;
  border-radius: 36px;
  padding: 12px;
  background: var(--ink);
  box-shadow: 0 30px 60px -20px rgba(15,23,42,.25);
}
.phone-screen {
  border-radius: 26px;
  overflow: hidden;
  background: var(--paper);
}
.phone-notch {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 80px; height: 22px; border-radius: 0 0 14px 14px;
  background: var(--ink);
}

/* =================== MARQUEE =================== */
.marquee {
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  padding: 18px 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex; gap: 48px;
  animation: marquee 30s linear infinite;
  font-family: 'Sora', sans-serif;
  font-weight: 600; font-size: 1.35rem;
  white-space: nowrap;
}
@keyframes marquee { from { transform: translateX(0) } to { transform: translateX(-50%) } }

/* =================== TABLES =================== */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.92rem; }
.tbl th { text-align: left; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--bg); }
.tbl td { padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.tbl tbody tr:hover td { background: var(--blue-50); }

/* =================== MODAL / OVERLAY =================== */
.overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal {
  background: var(--paper);
  border-radius: var(--r-2xl);
  max-width: 480px; width: 100%;
  max-height: 90vh; overflow: auto;
  box-shadow: var(--shadow-lg);
  animation: modal-in .25s ease both;
}
@keyframes modal-in { from { opacity:0; transform: translateY(20px) } to { opacity:1; transform: none } }

/* =================== UTILITIES =================== */
.spinner {
  width: 22px; height: 22px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg) } }

.fade-in { animation: fadeIn .35s ease both; }
@keyframes fadeIn { from { opacity:0; transform: translateY(8px) } to { opacity:1; transform: none } }

.qr-placeholder {
  width: 200px; height: 200px;
  background-image:
    linear-gradient(45deg, var(--ink) 25%, transparent 25%, transparent 75%, var(--ink) 75%),
    linear-gradient(45deg, var(--ink) 25%, transparent 25%, transparent 75%, var(--ink) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  border-radius: var(--r-md);
  border: 8px solid var(--paper);
  box-shadow: 0 0 0 1px var(--line);
}

/* =================== SCROLLBAR =================== */
.scroll-thin::-webkit-scrollbar { width: 8px; height: 8px; }
.scroll-thin::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.scroll-thin::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

/* =================== DASHBOARD =================== */
.dash {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: var(--bg);
}
@media (max-width: 1024px) {
  .dash { grid-template-columns: 1fr; }
  .dash-sidebar { display: none; }
}

.dash-sidebar {
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 24px 16px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.dash-tabbar {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  display: flex; gap: 8px;
  overflow-x: auto;
}
@media (min-width: 1025px) { .dash-tabbar { display: none; } }

.tab-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 0.92rem; font-weight: 500;
  color: var(--ink-2);
  text-align: left;
  transition: all .15s;
}
.tab-btn:hover { background: var(--blue-50); color: var(--brand); }
.tab-btn.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.tab-btn-pill {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.8rem; font-weight: 500;
  background: var(--bg); color: var(--ink-2);
  border: 1px solid var(--line);
}
.tab-btn-pill.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* =================== FLOATING CART =================== */
.cart-fab {
  position: fixed;
  bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 30;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  color: #fff;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-blue);
  animation: fadeIn .3s ease both;
}
.cart-drawer {
  position: fixed; inset: 0;
  z-index: 90;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
}
.cart-drawer-inner {
  background: var(--paper);
  width: 100%; max-width: 520px;
  max-height: 90vh;
  border-radius: 24px 24px 0 0;
  display: flex; flex-direction: column;
  animation: slide-up .3s cubic-bezier(.4,0,.2,1) both;
}
@keyframes slide-up { from { transform: translateY(100%) } to { transform: none } }
@media (min-width: 640px) {
  .cart-drawer { align-items: center; }
  .cart-drawer-inner { border-radius: 24px; max-height: 86vh; }
}

/* =================== PUBLIC MENU =================== */
.menu-hero {
  position: relative;
  height: 260px;
  overflow: hidden;
}
.menu-hero img { width: 100%; height: 100%; object-fit: cover; }
.menu-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(15,23,42,.65) 0%, rgba(15,23,42,.1) 60%, transparent);
}
.menu-hero-content {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 24px;
  color: #fff;
  display: flex; gap: 16px; align-items: flex-end;
}
.menu-logo-emoji {
  width: 64px; height: 64px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-size: 2rem;
  border: 2px solid rgba(255,255,255,.35);
  flex-shrink: 0;
}

.product-row {
  display: flex; gap: 12px; align-items: center;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: all .15s;
}
.product-row:hover { border-color: var(--brand-soft); }
.product-row.unavailable { opacity: 0.45; }
.product-img {
  width: 80px; height: 80px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}
@media (min-width: 640px) {
  .product-img { width: 96px; height: 96px; }
}

.qty-btn {
  width: 32px; height: 32px;
  border-radius: 999px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  font-weight: 700;
  display: grid; place-items: center;
  transition: all .15s;
}
.qty-btn:hover { border-color: var(--brand); color: var(--brand); }
.qty-btn-plus {
  background: var(--brand); color: #fff; border-color: var(--brand);
}
.qty-btn-plus:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

/* =================== TOASTS / ALERTS =================== */
.alert {
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 0.875rem;
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid;
}
.alert-info    { background: var(--blue-50);   border-color: var(--brand-soft);  color: var(--brand-dark); }
.alert-warn    { background: var(--orange-soft); border-color: #fcd34d; color: #92400e; }
.alert-success { background: var(--green-soft); border-color: #86efac; color: #065f46; }
.alert-error   { background: var(--red-soft);   border-color: #fca5a5; color: #991b1b; }

/* =================== LOADERS =================== */
.skeleton {
  background: linear-gradient(90deg, var(--line-2) 0%, var(--bg) 50%, var(--line-2) 100%);
  background-size: 200% 100%;
  animation: skeleton 1.4s ease-in-out infinite;
  border-radius: var(--r-md);
}
@keyframes skeleton { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }
