:root {
  --primary: #ff4757;
  --secondary: #ff6348;
  --on-primary: #ffffff;
  /* default glow/fallbacks based on original theme */
  --primary-glow-very-weak: rgba(255,71,87,0.02);
  --primary-glow-weak: rgba(255,71,87,0.04);
  --primary-glow: rgba(255,71,87,0.06);
  --primary-glow-strong: rgba(255,71,87,0.12);
  --primary-glow-xstrong: rgba(255,71,87,0.30);
  --primary-glow-medium: rgba(255,71,87,0.20);
  --primary-glow-xxstrong: rgba(255,71,87,0.50);
  --secondary-glow-weak: rgba(255,99,72,0.03);
  --success: #26de81;
  --danger: #fc5c65;
  --warning: #fed330;
  --dark: #2f3542;
  --darker: #1e272e;
  --light: #57606f;
  --lighter: #a4b0be;
  --white: #ffffff;
  --bg-dark: #1e1e1e;
  --bg-card: #2d2d2d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-dark);
  min-height: 100vh;
  color: var(--white);
}

#app {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
}

/* Top navbar removed: UI uses no fixed topbar */

/* When admin is active, add left padding to keep main content centered and limited width
   Sidebar is fixed on the left; body.admin-active shifts the page content to the right
   while the centered `#app.admin-full .admin-main` keeps a max-width. */
body.admin-active {
  padding-left: 0; /* sidebar is fixed; do not shift content */
}

/* Override: do not push the main centered content to the right — keep sidebar fixed without shifting layout */
body.admin-active #app, #app.admin-full {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

#app.admin-full {
  max-width: 980px; /* limit content width in admin */
  margin: 0 auto;   /* center horizontally in the available area */
}

#app.admin-full .admin-main {
  margin: 80px auto 40px; /* centered with top/bottom spacing */
  max-width: 980px;
  padding: 0 20px;
}



/* Login */
.login-container {
  background: var(--bg-card);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  text-align: center;
  border: 1px solid var(--primary-glow-medium);
}

.login-container h1 {
  color: var(--primary);
  margin-bottom: 10px;
  font-size: 36px;
  text-shadow: 0 0 20px var(--primary-glow-xstrong);
}

.login-container .subtitle {
  color: var(--lighter);
  margin-bottom: 30px;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--white);
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--light);
  border-radius: 10px;
  font-size: 16px;
  transition: all 0.3s;
  background: var(--darker);
  color: var(--white);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow-xstrong);
}

.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--on-primary, #ffffff);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--primary-glow-xxstrong);
  filter: brightness(1.1);
}

/* Header */
.header {
  background: var(--bg-card);
  padding: 15px 20px;
  border-radius: 15px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  border: 1px solid var(--primary-glow-medium);
}

/* Header variation for store: stacked into three lines (logo / status+address / actions) */
.header-store {
  display: block;
  text-align: center;
  padding: 18px;
}
.header-store .store-top { display:block; margin-bottom:8px; }
.header-store .store-top .store-logo-large { display:block; margin:0 auto; max-height:84px; }
.store-meta-line2 { display:block; margin-top:6px; color:var(--white); font-size:15px; }
.store-meta-line2 .store-address { color:var(--lighter); margin-left:8px; font-weight:600 }
.store-meta-line3 { display:flex; justify-content:center; gap:8px; margin-top:10px; }
.store-meta-line3 .btn { padding:8px 12px; border-radius:10px; background:var(--primary); color:var(--on-primary); min-height:44px; display:inline-flex; align-items:center; gap:8px; box-shadow: 0 6px 18px rgba(0,0,0,0.18); border:1px solid rgba(0,0,0,0.06); }
.store-meta-line3 .btn.btn-sm { padding:8px 12px; }
.store-meta-line3 .meta-label { font-weight:800; color:var(--on-primary); font-size:14px }
.store-meta-line3 .btn i { font-size:18px }
.store-meta-line3 .btn:hover { transform:translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,0.22); }

/* make status and address more prominent */
.store-meta-line2 { color: var(--white); font-weight:700; display:block; }
.store-meta-line2 .status-badge { font-weight:800; padding:8px 12px; font-size:14px }
.store-address { color: var(--white); margin-left:10px; font-weight:600 }

/* small screens: keep compact spacing but maintain contrast */
@media (max-width:700px) {
  .store-meta-line3 .btn { min-height:40px; padding:6px 10px; gap:6px }
  .store-meta-line3 .meta-label { font-size:13px }
}

@media (max-width:700px) {
  .header-store .store-top .store-logo-large { max-height:72px }
  .store-meta-line2 { font-size:14px }
  .store-meta-line3 { gap:6px }
}

/* Cardápio open/closed badge */
.status-badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
}
.status-badge.open {
  background: linear-gradient(90deg, rgba(38,222,129,0.18), rgba(38,222,129,0.08));
  color: var(--success);
  border: 1px solid rgba(38,222,129,0.18);
}
.status-badge.closed {
  background: linear-gradient(90deg, rgba(252,92,101,0.06), rgba(252,92,101,0.02));
  color: var(--danger);
  border: 1px solid rgba(252,92,101,0.08);
}

/* Admin panel layout: sidebar + main */

.admin-panel {
  position: relative;
}

.admin-sidebar {
  width: 240px;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  border: 1px solid var(--primary-glow);
  position: fixed; /* fixada no canto esquerdo */
  left: 0;
  top: 40px; /* mais próximo do topo, sem topbar */
  z-index: 50;
}

/* richer sidebar visual */
.admin-sidebar {
  background: linear-gradient(180deg, rgba(28,28,30,0.98), rgba(36,36,38,0.96));
  box-shadow: 6px 6px 30px rgba(0,0,0,0.6);
}

.admin-sidebar .admin-sidebar-nav button { padding: 10px 12px; border-radius: 10px; }
.admin-sidebar .admin-sidebar-nav button i { width:18px; font-size:14px; color:var(--primary); }
.admin-sidebar .admin-sidebar-nav button span { margin-left:8px; font-weight:600; color:var(--lighter); }
.admin-sidebar .admin-sidebar-nav button.active { background: linear-gradient(90deg, var(--primary-glow), var(--secondary-glow-weak)); color:var(--white); }

.admin-sidebar-header h3 {
  color: var(--primary);
  margin: 6px 0 12px 0;
  font-size: 16px;
}

.admin-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-sidebar-nav button {
  background: transparent;
  color: var(--lighter);
  border: none;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-sidebar-nav button i { color: var(--primary); width: 18px; }

.admin-sidebar-nav button.active {
  background: linear-gradient(90deg, var(--primary-glow-strong), var(--secondary-glow-weak));
  color: var(--white);
  box-shadow: 0 4px 18px var(--primary-glow);
}

.admin-main {
  /* Centro limitado do conteúdo quando em modo admin */
  margin: 80px auto 40px;
  max-width: 980px;
  width: 100%;
  padding: 0 20px;
}

.admin-content {
  background: var(--bg-card);
  padding: 18px;
  border-radius: 12px;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
  border: 1px solid var(--primary-glow-very-weak);
}

.header h2 {
  color: var(--primary);
  font-size: 24px;
  text-shadow: 0 0 10px var(--primary-glow-xstrong);
}

.btn-logout {
  background: var(--danger);
  color: white;
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

/* Selects e Textareas */

/* Spinner e estados de loading */
.spinner { width:20px; height:20px; border-radius:50%; border:3px solid rgba(255,255,255,0.08); border-top-color:var(--primary); animation:spin 1s linear infinite; display:inline-block; vertical-align:middle }
@keyframes spin { to { transform: rotate(360deg) } }

.btn-disabled { opacity: 0.45; pointer-events: none; }

.group-select-panel { background: #111; padding:10px; border-radius:8px; border:1px solid rgba(255,255,255,0.03); max-height:260px; overflow:auto }
.group-select-item { display:flex; align-items:center; justify-content:space-between; padding:8px; border-bottom:1px dashed rgba(255,255,255,0.02) }
.group-select-item:last-child { border-bottom:none }
.group-select-item .label { color:var(--light); }
.group-select-item .controls { display:flex; gap:6px }

.checkout-details { background: #0f0f10; padding:16px; border-radius:8px; border:1px solid rgba(255,255,255,0.03); margin-top:12px }
.checkout-details input, .checkout-details select { padding:8px; border-radius:6px; border:1px solid rgba(255,255,255,0.04); background:transparent; color:var(--light); width:100% }
.checkout-details label { display:block; margin-bottom:6px; color:var(--lighter); font-weight:600 }
/* Standardize inputs/selects/textarea inside config cards for consistent look */

.config-card input[type="text"], .config-card input[type="number"], .config-card input[type="file"], .config-card input[type="time"],
.config-card input[type="color"], .config-card textarea, .config-card select, .config-card .forma-item .forma-label, .config-card .logo-preview img {
  background: var(--white) !important;
  color: #0b0b0b !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
}
.collapse { border-radius:8px; overflow:hidden; }
.collapse .collapse-toggle { width:100%; padding:12px 14px; display:flex; justify-content:space-between; align-items:center; background:transparent; border:none; cursor:pointer; transition: background 160ms ease, box-shadow 160ms ease; }
.collapse .collapse-toggle:hover { background: rgba(0,0,0,0.04); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.collapse .collapse-toggle .chev { transition: transform 180ms ease; }
.collapse .collapse-content { max-height: 0; overflow: hidden; opacity: 0; transition: max-height 260ms ease, opacity 220ms ease, padding 200ms ease; padding: 0 12px; }
.collapse.open .collapse-content { max-height: 1200px; opacity: 1; padding: 12px; }

/* Smooth chevron rotation when open */
.collapse.open .collapse-toggle .chev { transform: rotate(180deg); }

/* Modal animations: fade + zoom */
@keyframes fadeIn {
  from { opacity: 0 }
  to { opacity: 1 }
}
@keyframes zoomIn {
  from { transform: translateY(8px) scale(0.98); opacity: 0 }
  to { transform: translateY(0) scale(1); opacity: 1 }
}

/* Ensure modal box uses these animations if present */
.aq-modal-box { animation: zoomIn .18s ease; }
#aq-modal { animation: fadeIn .15s ease; }

/* Page transitions for route/content changes */
.page-fade { animation: pageFade .22s ease; }
@keyframes pageFade { from { opacity: 0.0; transform: translateY(6px) } to { opacity: 1; transform: translateY(0) } }

.config-card textarea { min-height:48px; resize:vertical }

.config-card input:focus, .config-card textarea:focus, .config-card select:focus {
  outline: none !important;
  box-shadow: 0 4px 18px rgba(0,0,0,0.12) !important;
  border-color: var(--primary) !important;
}

/* Collapse header styling for better contrast */
.collapse-toggle { color: var(--white); background: transparent; border-bottom: 1px solid rgba(255,255,255,0.02); }
.collapse-toggle .chev { color: var(--white); font-weight:700 }

/* keep global selects/textarea defaults but avoid overriding config-card styles */
select, textarea { background: var(--darker) !important; color: var(--white) !important; border: 2px solid var(--light) !important; }

select:focus, textarea:focus { border-color: var(--primary) !important; box-shadow: 0 0 10px var(--primary-glow-xstrong) !important; outline: none !important; }

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: linear-gradient(135deg, var(--success), #20c463);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(38, 222, 129, 0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  z-index: 10000;
  opacity: 0;
  transition: all 0.3s ease;
}

/* SaaS sidebar styles (scoped, non-destructive) */
.saas-sidebar {
  width: 240px;
  background: linear-gradient(180deg, rgba(20,20,24,0.72), rgba(28,28,30,0.84));
  backdrop-filter: blur(6px) saturate(120%);
  -webkit-backdrop-filter: blur(6px) saturate(120%);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.03);
  position: fixed;
  left: 12px;
  top: 36px;
  z-index: 60;
  transition: transform 220ms cubic-bezier(.2,.9,.2,1), opacity 180ms ease;
}

.saas-sidebar .saas-sidebar-top {
  display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px;
}
.saas-sidebar .saas-brand h3 { color:var(--primary); font-size:16px; margin:0; font-weight:800; text-shadow:0 0 12px rgba(255,71,87,0.12); }
.saas-sidebar-toggle { background:transparent; border:none; color:var(--lighter); font-size:20px; display:none; cursor:pointer }

.saas-nav-list { display:flex; flex-direction:column; gap:8px; }
.saas-nav-item {
  display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:10px; border:none; background:transparent; color:var(--lighter); cursor:pointer; font-weight:700; text-align:left;
  transition: transform 180ms ease, box-shadow 200ms ease, background 160ms ease;
}
.saas-nav-item i { color:var(--primary); width:18px; }
.saas-nav-item span { color:var(--lighter); }
.saas-nav-item:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,0.5); background: linear-gradient(90deg, rgba(255,71,87,0.03), rgba(255,99,72,0.02)); }
.saas-nav-item.active { background: linear-gradient(90deg, rgba(255,71,87,0.06), rgba(255,99,72,0.03)); color:var(--white); box-shadow: 0 6px 24px rgba(255,71,87,0.04); }

/* Neon accent for active state */
.saas-nav-item.active::before { content: ''; width:4px; height:36px; background: linear-gradient(180deg, var(--primary), var(--secondary)); border-radius:4px; margin-right:8px; }

/* Responsive: collapse into drawer on small screens */
@media (max-width: 900px) {
  .saas-sidebar { transform: translateX(-100%); left: 12px; }
  body.saas-sidebar-open .saas-sidebar { transform: translateX(0); }
  .saas-sidebar-toggle { display:block }
}

/* Mobile: ensure main content leaves space when sidebar open */
@media (max-width: 900px) {
  body.saas-sidebar-open .admin-main { margin-left: 260px; }
}

/* Subtle microanimation on hover for icons */
.saas-nav-item i { transition: transform 180ms ease, color 160ms ease }
.saas-nav-item:hover i { transform: translateY(-3px) rotate(-6deg); color: var(--secondary) }

/* Scoped utility for buttons inside pedido cards (kept earlier) */
.pedido-actions .pedido-btn { width:100%; max-width:220px; min-width:180px; }
@media (max-width:700px) { .pedido-actions .pedido-btn { width:100%; max-width:100%; min-width:0 } }

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast i {
  font-size: 20px;
}

/* Bottom nav badge positioning */
.bottom-nav { display:flex; justify-content:space-around; padding:8px 12px; background:var(--bg-card); border-top:1px solid rgba(255,255,255,0.03); position:fixed; bottom:0; left:0; right:0; z-index:999; }
.bottom-nav .bottom-nav-btn { background:transparent; border:none; color:var(--lighter); padding:8px 12px; border-radius:8px; display:flex; flex-direction:column; align-items:center; gap:6px; position:relative; }
.bottom-nav .bottom-nav-btn .badge-cart { position:static; display:inline-block; margin-left:6px; background:var(--success); color:#042; padding:2px 6px; border-radius:999px; font-weight:800; font-size:12px; }

/* Complemento small image in modal */
.modal-img { max-width:220px; border-radius:10px; }
.comp-img { width:48px; height:48px; object-fit:cover; border-radius:6px }

/* ensure complement row layout: image at left, name flows, controls fixed at right */
.comp-row { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.comp-row .left { display:flex; align-items:center; gap:12px; flex:1; }
.comp-row .right { display:flex; align-items:center; gap:8px; flex-shrink:0 }
.comp-img { width:40px; height:40px; flex-shrink:0 }

/* comp +/- buttons: no background, white icon, larger */
.comp-plus, .comp-minus { background:transparent; border:none; color:#fff; font-size:18px; width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center; border-radius:6px; cursor:pointer }

/* icon-only button used in checkout actions */
.icon-btn { background:#fff; border-radius:8px; padding:8px; display:inline-flex; align-items:center; justify-content:center; border:none; cursor:pointer }
.icon-btn i { color:#000 }

/* Checkout item action buttons in row */
.checkout-actions { display:flex; gap:8px; align-items:center }

/* hide auxiliary dynamic price elements (we'll show price on the proceed button) */
.dynamic-price, #footerPrice, #basePrice { display:none !important }

/* proceed button two-line layout (compact) */
.btn-proceed { display:flex; flex-direction:column; align-items:center; gap:6px; padding:8px 14px; border-radius:8px }
.btn-proceed .proceed-line1 { font-weight:700; font-size:14px; display:inline-block }
.btn-proceed .proceed-line2 { font-weight:900; font-size:14px; display:inline-block }
.btn-proceed svg { width:18px; height:18px; margin-left:6px; display:inline-block; fill: currentColor }
.btn-proceed i { font-size:18px; margin-left:6px; display:inline-block; color: inherit; line-height:1 }
/* match heights between qty control and proceed button */
.btn-proceed { min-height:48px }

#qtyControl { min-width:120px; min-height:48px; padding:0 10px; box-sizing:border-box; display:flex; align-items:center; border-radius:8px }
#qtyControl button { height:100%; display:inline-flex; align-items:center; justify-content:center; padding:0 12px }
#qtyControl #qtyDisplay { padding:0 14px; min-width:44px; display:inline-flex; align-items:center; justify-content:center; height:100%; font-weight:800 }

/* modal content safe spacing to avoid image crop on mobile */
.aq-modal-box { padding-top:48px }
.aq-modal-box .aq-modal-close { position:absolute; top:14px; right:14px; background:transparent; border:none; color:#fff; font-size:18px }
/* main product image in modal (do not target all images) */
.modal-main-img { max-width:160px; width:auto; height:auto; display:block; margin:0 auto }

/* back button in modal (top-left) */
.aq-modal-back { position:absolute; top:14px; left:14px; background:transparent; border:none; color:#fff; font-size:18px; display:inline-flex; align-items:center; justify-content:center; padding:6px; cursor:pointer }
@media (max-width: 700px) {
  .aq-modal-box { padding-top:72px }
  .aq-modal-content { padding-bottom:4px }
  .aq-modal-box { max-height: 100vh; box-sizing: border-box; }
  .aq-modal-content { max-height: calc(100vh - 72px); overflow:auto }
  /* hide native scrollbars but keep touch scrolling */
  .aq-modal-content, .aq-modal-box .modal-content-body {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
  }
  .aq-modal-content::-webkit-scrollbar, .aq-modal-box .modal-content-body::-webkit-scrollbar { display: none; }
}

/* When modal opened on mobile devices (class added by JS), force full-screen compact layout */
.mobile-modal .aq-modal-box {
  width: 100% !important;
  max-width: 100% !important;
  height: 100vh !important;
  border-radius: 0 !important;
  padding: 12px !important;
  box-sizing: border-box;
}
.mobile-modal .aq-modal-content { height: 100%; padding: 12px !important; overflow: hidden; }
.mobile-modal .aq-modal-box .modal-content-body { max-height: calc(100vh - 160px); overflow: auto; padding-right:6px; }
.mobile-modal .aq-modal-box .modal-footer { position: sticky; bottom: 0; }

/* Modal layout: make content body scrollable and footer sticky */
.aq-modal-box { display:flex; flex-direction:column; overflow:hidden; }
.aq-modal-box .aq-modal-content { display:flex; flex-direction:column; padding:20px; }
.aq-modal-box .modal-content-body { overflow:auto; flex:1 1 auto; padding-right:6px; padding-bottom:0; -webkit-overflow-scrolling: touch; }

/* Mobile: make the groupList use remaining viewport height to avoid large gaps before the footer */
@media (max-width: 700px) {
  .aq-modal-content #groupList, .aq-modal-box #groupList {
    max-height: calc(100vh - 380px);
    overflow: auto;
    padding-bottom: 6px;
  }
}
.aq-modal-box .modal-footer { position: sticky; bottom: 0; background: linear-gradient(180deg, rgba(24,24,27,0), rgba(24,24,27,1)); padding-top:8px; padding-bottom:6px; justify-content:flex-start; gap:10px; }
.modal-footer .btn-proceed { box-shadow: 0 -4px 12px rgba(0,0,0,0.25); }

/* ensure comp name doesn't overflow into controls */
.comp-row .left div { min-width:0 }
.comp-row .left div > div:first-child { white-space:normal; overflow-wrap:break-word }

/* Modal fullscreen on small screens */
@media (max-width: 700px) {
  #aq-modal { align-items:flex-start; }
  .aq-modal-box { width:100% !important; max-width:100% !important; height:100vh; border-radius:0 !important; padding:16px !important; box-sizing:border-box; }
  .aq-modal-content { height:100%; overflow:auto; }
}

/* Compact quantity controls near add button */
.btn-sm { padding:6px 8px; border-radius:6px; font-size:13px }

/* ===== Styles específicos para página de Configurações (visual profissional) ===== */
.config-section { max-width:980px; margin: 0 auto; }
.config-card { background: linear-gradient(180deg, rgba(30,30,30,0.95), rgba(24,24,24,0.95)); padding:20px; border-radius:12px; border:1px solid var(--primary-glow-very-weak); box-shadow: 0 8px 30px rgba(0,0,0,0.6); }
.config-card h3 { margin:0 0 8px 0; color:var(--primary); font-size:20px }
.config-card p { color:var(--lighter); margin-bottom:12px }
.config-overview { display:flex; gap:12px; flex-wrap:wrap }
.config-card-overview { background:linear-gradient(180deg, rgba(36,36,38,0.6), rgba(28,28,30,0.6)); padding:14px; border-radius:10px; flex:1 1 300px; display:flex; gap:12px; align-items:center; cursor:pointer; border:1px solid rgba(255,255,255,0.03) }
.config-card-overview:hover { transform:translateY(-4px); box-shadow: 0 8px 30px var(--primary-glow-medium); }
/* New SaaS-style cards grid for Configurações overview */
.configs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; /* between cards */
  align-items: start;
}
.config-saas-card {
  display: grid;
  grid-template-columns: 44px 1fr 28px;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: rgba(24,24,27,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  cursor: pointer;
  transition: box-shadow 180ms ease, transform 160ms ease, border-color 160ms ease;
  min-height: 72px;
}
.config-saas-card .card-left { display:flex; align-items:center; justify-content:center; width:44px; height:44px; border-radius:10px; background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.02)); }
.config-saas-card .card-left i { font-size:20px; color: var(--primary); }
.config-saas-card .card-body { align-self:stretch; display:flex; flex-direction:column; justify-content:center; }
.config-saas-card .card-title { margin:0; font-weight:600; font-size:15px; color:var(--white); font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; }
.config-saas-card .card-desc { margin:6px 0 0; color:#8a8b93; font-size:13px; }
.config-saas-card .card-chevron { display:flex; align-items:center; justify-content:center; color:var(--lighter); }
.config-saas-card .card-chevron i { font-size:14px }
.config-saas-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px var(--primary-glow-medium); border-color: rgba(255,255,255,0.06); }
.config-saas-card:active { transform: translateY(-2px) }
.config-saas-card:focus { outline: none; box-shadow: 0 8px 30px var(--primary-glow-medium); border-color: rgba(255,255,255,0.06); }

/* allow the whole card to be clickable via delegated listener (data-route handling in router) */
.config-saas-card[tabindex] { -webkit-tap-highlight-color: transparent }

@media (max-width: 900px) {
  .configs-grid { grid-template-columns: 1fr; }
}

.config-card .form-actions { display:flex; gap:12px; margin-top:6px }
.config-card label { display:block; font-weight:700; color:var(--lighter); margin-bottom:6px }
.config-card input[type="text"], .config-card input[type="number"], .config-card input[type="time"], .config-card select, .config-card input[type="color"], .config-card input[type="file"] { width:100%; padding:10px 12px; border-radius:10px; border:1px solid rgba(255,255,255,0.04); background:var(--darker); color:var(--white); box-shadow:none }
.config-card input[type="time"] { padding:8px }
.config-card hr { border:none; border-top:1px solid rgba(255,255,255,0.04); margin:16px 0 }
.logo-preview img { max-height:96px; display:block; margin-top:8px }

/* Formas de pagamento list */
.config-card #formasPagamentoContainer > div { background: rgba(255,255,255,0.02); padding:10px; border-radius:8px; display:flex; align-items:center; gap:12px }
.config-card #formasPagamentoContainer > div span { color:var(--white); font-weight:700 }
.config-card #formasPagamentoContainer > div button { padding:6px 10px; border-radius:8px; background:transparent; border:1px solid rgba(255,255,255,0.04); color:var(--light); cursor:pointer }
.config-card #formasPagamentoContainer > div button:hover { background:rgba(255,255,255,0.02) }

/* delivery inputs inline group */
.delivery-grid { display:flex; gap:12px; flex-wrap:wrap; align-items:center }
.delivery-grid input { width:220px }

/* small helpers */
.muted { color:var(--lighter); font-size:13px }

@media (max-width:900px) {
  .config-overview { flex-direction:column }
  .delivery-grid input { width:100% }
}

/* Compact icon button used across config UI */
.btn-icon { width:40px; height:40px; padding:0; border-radius:8px; display:inline-flex; align-items:center; justify-content:center; background:transparent; border:1px solid rgba(255,255,255,0.04); color:var(--light); cursor:pointer }
.btn-icon i { font-size:14px }
.btn-icon[disabled] { opacity:0.45; pointer-events:none }

/* payment method item visuals */
.forma-item { background: rgba(255,255,255,0.02); padding:8px; border-radius:8px; display:flex; align-items:center; gap:8px; cursor:grab }
.forma-item.dragging { opacity:0.6 }
.forma-item .forma-label { font-weight:700; color:var(--white) }
.forma-item input.forma-edit { background:transparent; border:1px solid rgba(255,255,255,0.04); color:var(--white); padding:6px; border-radius:6px }

/* Save config button placement */
.config-card .save-config { width:100%; margin-top:8px }

/* Dynamic price in modal */
.dynamic-price { color: var(--success); font-weight:800; margin-top:6px }

/* Coupon box styling: keep input wide and make apply button compact */
.cupom-box { display:flex; gap:8px; align-items:center; margin-top:8px; }
.cupom-box input { flex:1; padding:10px; border-radius:6px; background:var(--bg); border:1px solid var(--muted); color:var(--light) }
.cupom-box .btn { width:auto; padding:8px 10px; font-size:14px }

/* small circular plus used in product modal */

/* ----- Admin centering fixes -----
   These rules ensure the admin main area stays centered in the viewport
   even when the left sidebar is fixed/overlaying the page. They are
   conservative and do not change visual sizes, only centering behavior.
*/
body.admin-active #app, #app.admin-full {
  margin: 0 auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: 1100px; /* allow a slightly wider admin area */
  box-sizing: border-box;
}

#app.admin-full .admin-main {
  margin: 80px auto 40px !important;
  max-width: 1100px;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Center the three-column pedidos grid and give each column a fixed max width */
.pedidos-columns {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  box-sizing: border-box;
}
.pedidos-columns .coluna {
  flex: 0 0 360px; /* fixed column width that keeps layout predictable */
  max-width: 360px;
}

/* If content still looks off for your screen, I can nudge the whole admin-main
   by a few pixels left/right — tell me +/- px and I will adjust. */

/* Header: keep title and small finalize button inline */
.page-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-header h1 {
  font-size: 22px;
  margin: 0;
  color: var(--white);
}
.btn-finalizar {
  padding: 3px 6px;
  font-size: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--primary-glow), var(--secondary-glow-weak));
  color: var(--white);
  border: 1px solid var(--primary-glow);
  min-width: 72px;
  text-align: center;
}
.btn-concluir-todos {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(38,222,129,0.08), rgba(38,222,129,0.03));
  color: var(--white);
  border: 1px solid rgba(38,222,129,0.06);
  margin-left: 8px;
}
.btn-concluir-todos[disabled] { opacity: 0.45; pointer-events: none }
.temporarily-disabled {
  opacity: 0.5 !important;
  pointer-events: none !important;
}
.btn-circle-small { width:36px; height:36px; border-radius:8px; display:inline-flex; align-items:center; justify-content:center; background:transparent; color:#fff; border:none; cursor:pointer; font-size:18px }

/* Checkbox customizado */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary);
  border-radius: 4px;
  background: var(--darker);
  cursor: pointer;
  position: relative;
  transition: all 0.3s;
  flex-shrink: 0;
}

input[type="checkbox"]:hover {
  border-color: var(--secondary);
  box-shadow: 0 0 8px var(--primary-glow-xstrong);
}

input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: var(--primary);
}

input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 14px;
  font-weight: bold;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Prevent text selection and native touch callout on interactive elements to avoid
   Android 'Search' popup when long-pressing or tapping text. Keep inputs/textareas selectable. */
.produto-card,
.aq-modal-box,
.aq-modal-content,
.comp-option,
.comp-row,
.btn,
.btn-circle-small,
.icon-btn,
.comp-plus,
.comp-minus {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

/* Ensure clickable product cards show pointer and don't allow selection */
.produto-card { cursor: pointer }

/* Cupom */
.cupom-container {
  background: var(--bg-card);
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1px solid var(--primary-glow-medium);
}

.cupom-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cupom-input-group input {
  flex: 1;
}

.cupom-input-group .btn {
  width: auto;
  padding: 12px 24px;
}

.cupom-aplicado {
  background: rgba(38, 222, 129, 0.1);
  border: 1px solid var(--success);
  padding: 12px;
  border-radius: 8px;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cupom-aplicado span {
  color: var(--success);
  font-weight: 600;
}

.cupom-aplicado button {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 18px;
  padding: 0 8px;
}

/* Cardápio */
.categorias {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0;
  margin-bottom: 20px;
}

.categoria-btn {
  background: var(--bg-card);
  padding: 10px 20px;
  border: 2px solid var(--light);
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 600;
  transition: all 0.3s;
  color: var(--lighter);
}

.categoria-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow-xxstrong);
}

/* Header / store overrides to make logo more prominent and force 3 stacked lines */
.header.header-store { display:flex; flex-direction:column; align-items:center; gap:10px; padding: 18px 12px; }
.header.header-store .store-top { display:flex; align-items:center; justify-content:center; width:100%; }
.header.header-store .store-meta { width:100%; max-width:1100px; }
.store-logo-large { height:120px; max-height:160px; width:auto; object-fit:contain; display:block; margin:0 auto; }
@media (max-width: 768px) {
  .store-logo-large { height:84px; max-height:96px; }
  .header.header-store { padding:12px 8px; }
}

/* ensure the two meta lines are visually separated and responsive */
.store-meta-line2 { width:100%; text-align:center; margin-top:4px; color:var(--lighter); }
.store-meta-line3 { width:100%; text-align:center; margin-top:2px; display:flex; justify-content:center; gap:8px; }
.meta-label { display:inline-block; font-weight:700; font-size:14px; }

.produtos-grid {
  display: grid;
  gap: 15px;
}

.produto-card {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 15px;
  display: flex;
  gap: 15px;
  align-items: center;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 6px 18px rgba(0,0,0,0.22); /* suaviza a sombra do card */
  border: none; /* borda removida para visual mais clean */
  position: relative;
}

.produto-card .btn { min-width: 110px; }

.produto-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--primary-glow-xstrong);
  border-color: var(--primary);
}

.produto-img {
  width: 72px;
  height: 72px;
  border-radius: 15px; /* igual ao card para visual flush */
  object-fit: cover;
  background: transparent;
  box-shadow: none; /* remover sombra dentro da imagem para ficar uniforme */
  flex-shrink: 0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.produto-body { flex: 1; display:flex; flex-direction:column; }
.produto-nome { color: var(--white); font-size:16px; font-weight:700; margin: 0 0 6px 0; }
.descricao { color: var(--lighter); font-size:13px; margin: 0 0 10px 0; line-height:1.2; }
.preco { color: var(--success); font-weight:800; font-size:16px; margin-top:4px; }

/* Modal: constrain product modal and center content */
.aq-modal-box { max-width: 520px !important; width: 90% !important; }
.aq-modal-content img { max-width: 260px; height: auto; display:block; margin: 0 auto 12px; }
.aq-modal-content { text-align: left; font-size: 14px; color: var(--lighter); }
.aq-modal-content h2 { color: var(--white); margin-bottom:8px; }
.aq-modal-content .form-group label { color: var(--lighter); }

.produto-card:hover .produto-img {
  transform: scale(1.04);
}

.produto-especial {
  box-shadow: 0 8px 28px rgba(255, 99, 72, 0.12); /* leve glow quente */
  border-left: 6px solid #ff6b6b;
}

/* badge removido - apenas destaque visual permanece via .produto-especial */

.produto-info h3 {
  color: var(--white);
  margin: 0 0 6px 0;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.produto-info p {
  color: var(--lighter);
  font-size: 13px;
  margin: 0 0 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.produto-preco {
  color: var(--success);
  font-size: 20px;
  font-weight: 700;
}

.produto-info {
  flex: 1;
}

.produto-info h3 {
  color: var(--white);
  margin-bottom: 5px;
}

.produto-info p {
  color: var(--lighter);
  font-size: 14px;
  margin-bottom: 8px;
}

.produto-preco {
  color: var(--success);
  font-size: 20px;
  font-weight: bold;
}

/* Carrinho Flutuante */
.cart-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--success);
  color: white;
  padding: 15px 25px;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  cursor: pointer;
  font-weight: bold;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-float:hover {
  transform: scale(1.05);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 30px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--primary-glow-medium);
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--lighter);
  transition: color 0.3s;
}

.modal-close:hover {
  color: var(--primary);
}

/* AQ Modal custom close button (FA icon) */
.aq-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--lighter);
  font-size: 18px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}
.aq-modal-close i { font-size: 18px; }
.aq-modal-close:hover { background: rgba(255,255,255,0.02); color: var(--primary); }

/* Observations textarea in modal */
.obs-textarea {
  width: 100%;
  min-height: 68px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 2px solid var(--light);
  background: var(--darker);
  color: var(--white);
  resize: vertical;
  font-size: 14px;
}
.obs-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 8px var(--primary-glow-strong); }

/* Modal form elements styling */
.aq-modal-content form { display:flex; flex-direction:column; gap:10px; }
.aq-modal-content form label { color: var(--lighter); font-weight:700; font-size:13px; }
.aq-modal-content form input[type="text"],
.aq-modal-content form input[type="number"],
.aq-modal-content form select,
.aq-modal-content form textarea {
  width:100%;
  padding:10px 12px;
  border-radius:8px;
  border:2px solid var(--light);
  background:var(--darker);
  color:var(--white);
  font-size:14px;
}
.aq-modal-content form textarea { min-height:80px; resize:vertical; }
.aq-modal-content .btn { width:100%; padding:12px 14px; font-size:15px; border-radius:10px; }
.aq-modal-content .btn + .btn { margin-top:6px; }
.aq-modal-content .btn-primary { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: var(--on-primary); border: none; }
.aq-modal-content .btn-success { background: linear-gradient(135deg, #19c67a, #26de81); color: #fff; border: none; }
.aq-modal-content .btn-sm { padding:8px 10px; font-size:13px; }

/* Make modal close icon visually aligned and accessible */
.aq-modal-close { display:flex; align-items:center; justify-content:center; }

/* Name + price inline on cards */
.produto-top { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.produto-preco-inline { color: var(--success); font-weight:800; font-size:15px; margin-left:8px; white-space:nowrap; }

/* Slightly bigger vertical gap between product cards */
.produtos-grid { display: grid; gap: 20px; }

.produto-card { padding: 14px; }

/* Admin */
.admin-main {
  /* Conteúdo centralizado na tela */
  margin: 80px auto 40px;
  max-width: 1200px;
  padding: 0 20px;
}

/* Expanded admin main when admin mode is active: center the content while accounting for fixed sidebar
   Keep the centered layout consistent across /admin/* pages so columns don't shift to the right. */
#app.admin-full .admin-main {
  margin: 80px auto 40px; /* center horizontally */
  max-width: 1200px;
  padding: 0 40px;
  width: 100%;
  box-sizing: border-box;
}

/* Compensate for fixed left sidebar by nudging the centered admin content slightly right
   so the visual center aligns with the page center (not the content area left of the sidebar). */
/* No forced translate: keep admin content centered in the viewport.
   Sidebar is fixed at the left and overlays the content; visual center is the viewport center. */
.admin-tabs button {
  background: var(--bg-card);
  border: 2px solid var(--light);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  color: var(--lighter);
}

.admin-tabs button.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow-xxstrong);
}

.admin-content {
  background: var(--bg-card);
  border-radius: 15px;
  padding: 20px;
  border: 1px solid var(--primary-glow-medium);
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: var(--darker);
  border-radius: 10px;
  border: 1px solid var(--light);
}

/* Orders 3-column layout */
.orders-container {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.orders-col {
  flex-basis: 30%;
  max-width: 30%;
  min-width: 220px;
}

.orders-col.center {
  flex-basis: 40%;
  max-width: 40%;
}

.order-card {
  background: var(--darker);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--light);
}

.order-card .order-status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

/* Buttons container inside cards */
.order-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }

/* Responsive: stack columns on small screens */
@media (max-width: 900px) {
  .orders-container { flex-direction: column; }
  .orders-col, .orders-col.center { flex-basis: 100%; max-width: 100%; }
}


/* Pedidos - colunas e cards */
.pedidos-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.coluna {
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 16px;
  border-radius: 8px;
  min-height: 480px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.6);
}

/* adiciona espaçamento entre o header e as colunas de pedidos */
.pedidos-columns { margin-top: 28px; }

.coluna h2 {
  margin: 0 0 12px 0;
  font-size: 18px;
  color: #ffffff;
}
/* Centralizar títulos das colunas de pedidos */
.coluna h2 {
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.pedido-card {
  background: linear-gradient(180deg, #2b2b2b, #242424);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  color: #fff;
  border-left: 4px solid rgba(255,255,255,0.06);
}

/* entry and movement animations */
.pedido-card {
  opacity: 0;
  transform: translateY(8px) scale(1);
  transition: transform 220ms ease, opacity 220ms ease, box-shadow 220ms ease;
}
.pedido-card.entered {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.pedido-card.moving {
  opacity: 0.5;
  transform: translateY(-6px) scale(0.98);
}

.pedido-card .pedido-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.pedido-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.6); }

.pedido-card h3 {
  margin: 0;
  font-size: 14px;
}

.pedido-card .status {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  color: #fff;
}

.pedido-body { margin-top: 8px; font-size: 13px; line-height: 1.3; }
.pedido-body p { margin: 4px 0; }
.pedido-valor { margin-top: 8px; font-weight: 700; }

.pedido-actions { margin-top: 10px; display:flex; gap:8px; flex-wrap:wrap }
.pedido-actions button { background:#444; color:#fff; border:0; padding:6px 10px; border-radius:6px; cursor:pointer; font-size:13px; display:inline-flex; align-items:center; gap:8px }
.pedido-actions button:hover { filter:brightness(1.05) }

/* Style specifically for the Meus Pedidos action buttons (Repetir / Cancelar)
   - Scoped via .pedido-actions .pedido-btn so other buttons are unaffected
   - Desktop: limited max-width (180-220px) and left aligned
   - Mobile: full width (responsive) */
.pedido-actions { justify-content: flex-start; }
.pedido-actions .pedido-btn {
  /* default (mobile-first): allow full width on small screens */
  width: 100%;
  box-sizing: border-box;
}

/* Desktop/tablet: keep buttons narrower and left-aligned */
@media (min-width: 768px) {
  .pedido-actions .pedido-btn {
    width: auto;            /* do not force 100% */
    max-width: 220px;      /* maximum width on larger screens */
    min-width: 180px;      /* practical minimum to keep shape */
  }
}

.btn-para-entrega { background: #4CAF50 !important; color: #fff !important }
.btn-concluir { background: #4CAF50 !important; color: #fff !important }
.btn-cancelar { background: #d46b6b !important; color: #fff !important }
.btn-detalhes { background: #6b9cff; color:#fff }
.pedido-actions i.fa-solid { font-size:14px; }

/* small screens: colapse para 1 coluna, ou 2 em tablets */
@media (max-width: 1000px) {
  .pedidos-columns { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .pedidos-columns { grid-template-columns: 1fr; }
}

/* status color accents (optional) */
.pedido-card.pedido-pendente { border-left-color: #ffb86b }
.pedido-card.pedido-preparando, .pedido-card.pedido-aceito { border-left-color: #ffb86b }
.pedido-card.pedido-pronto, .pedido-card.pedido-entrega { border-left-color: #6b9cff }
.pedido-card.pedido-concluido { border-left-color: #6bd46b }
.pedido-card.pedido-entregue { border-left-color: #6bd46b }
.pedido-card.pedido-cancelado { border-left-color: #d46b6b }

/* center container and increase column width */
.pedidos-columns {
  max-width: 1200px;
  margin: 0 auto;
  grid-template-columns: repeat(3, 360px);
  justify-content: center;
  gap: 28px;
}

/* Ensure the pedidos columns are visually centered even when admin sidebar offsets the main container */
#app.admin-full .pedidos-columns {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-left: 0;
  margin-right: 0;
}

/* Smaller Finalizar Período button */
#btnFinalizarPeriodo, .btn-finalizar {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 8px;
  min-width: auto;
}

/* totals bar */
.pedidos-totais { display:flex; gap:12px; margin-bottom:12px; align-items:center; grid-column: 1 / -1 }
.pedidos-totais .tot-item { background: rgba(255,255,255,0.03); padding:8px 10px; border-radius:6px; font-size:13px }

/* global UI transitions */
button, .btn { transition: transform 150ms ease, box-shadow 150ms ease, opacity 120ms ease }
button:active { transform: translateY(1px) scale(0.995) }

/* modal transition hooks (if modal toggles classes) */
.aq-modal-box { transition: transform 180ms ease, opacity 180ms ease }
.aq-modal-box.open { opacity:1; transform: translateY(0) }
.aq-modal-box.close { opacity:0; transform: translateY(-8px) }
.admin-actions {
  display: flex;
  gap: 10px;
}

/* Admin card (center panel visual) */
.admin-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.05));
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  border: 1px solid var(--primary-glow);
}

.top-btn {
  padding: 12px 18px;
  border-radius: 10px;
  font-weight:800;
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.admin-card-inner {
  display: block;
}

.admin-actions .btn-sm {
  padding: 10px 14px;
  border-radius: 10px;
}

.admin-card .produtos-grid {
  display: grid;
  grid-template-columns: 1fr; /* empilhar verticalmente no admin */
  gap: 16px;
  margin-top: 12px;
}

.admin-category-section { margin-top: 18px; }
.admin-category-header {
  background: linear-gradient(90deg, var(--primary-glow-strong), var(--primary-glow-very-weak));
  color: var(--primary);
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 800;
  margin-bottom: 12px;
}
.admin-category-header { display:flex; justify-content:space-between; align-items:center; }
.admin-category-header .admin-category-title { font-size:16px; }
.admin-category-header .admin-category-controls { display:flex; gap:8px; align-items:center; }
.admin-category-header .admin-category-controls .btn-sm { padding:8px 10px; }
.admin-category-header .admin-category-controls .switch { margin-right:6px; }
.admin-category-header .admin-category-controls .btn-edit { background: var(--warning); color:#fff }
.admin-category-header .admin-category-controls .btn-delete { background: var(--danger); color:#fff }
.admin-category-list { display:flex; flex-direction:column; gap:12px; }

/* Cardápio (cliente) category section to mirror admin visuals */
.cardapio-category { margin-top: 18px; }
.category-header {
  background: linear-gradient(90deg, var(--primary-glow), var(--primary-glow-very-weak));
  color: var(--primary);
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 800;
  margin-bottom: 12px;
  display:flex; justify-content:space-between; align-items:center;
}
.category-title { font-size:16px; }
.category-products { display:flex; flex-direction:column; gap:12px; }

/* Make category title more to the left and indent products for clearer separation */
.category-header { padding-left: 8px; }
.category-title { margin-left: 0; text-align: left; }
.category-products { margin-left: 18px; }

/* make product cards in client match admin shadows and spacing */
.produto-card { box-shadow: 0 6px 18px rgba(0,0,0,0.22); border-radius: 12px; }
.produto-card .produto-info h3 { font-size:18px; }

/* ensure price is green in client category cards */
.cardapio-category .preco { color: var(--success); font-weight:800; }

/* Store header adjustments (larger logo + meta row) */
.header-store { margin-bottom: 18px; display:flex; flex-direction:column; align-items:center; }
.store-top { padding: 12px 12px 6px 12px; display:block; text-align:center; width:100%; }
.store-logo-large { height:84px; object-fit:contain; display:inline-block; }
.store-meta { padding: 6px 12px 12px 12px; display:block; text-align:center; width:100%; }
.store-address { font-size:14px; color:var(--lighter); display:inline-block; margin-left:8px }

/* Ensure buttons/icons in the store-meta row stay inline and don't expand to full width */
.store-meta .btn, .store-meta a { display:inline-flex !important; width:auto !important; }
.store-meta .btn-sm { padding:8px 10px; }

.produto-reorder button { background: var(--bg-card); border:1px solid rgba(255,255,255,0.02); color:var(--lighter); border-radius:8px; padding:8px; }
.produto-reorder button:hover { background: rgba(255,255,255,0.02); }
.status-badge .btn-success { background: var(--success); color: #fff; padding:6px 8px; border-radius:8px; font-size:13px; }
.status-badge .btn-delete { background: var(--danger); color:#fff; padding:6px 8px; border-radius:8px; font-size:13px; }

/* Complementos: separar grupos por faixa e espaçamento similar aos produtos */
.complemento-grupo {
  border-top: 1px solid rgba(255,255,255,0.03);
  padding-top: 12px;
  margin-top: 12px;
}
.complemento-grupo .grupo-header { padding-bottom: 6px; }
.complemento-grupo .complementos-list { margin-top: 8px; display:flex; flex-direction:column; gap:12px; }

/* Force-disable text selection globally for UI, enable only for form fields */
html, body, #app { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
/* strong rule to prevent accidental selection */
body * { -webkit-user-select: none !important; -moz-user-select: none !important; -ms-user-select: none !important; user-select: none !important; -webkit-touch-callout: none !important; }
/* Allow selection in text inputs, textareas and selects */
input, textarea, select, .obs-textarea { -webkit-user-select: text !important; -moz-user-select: text !important; -ms-user-select: text !important; user-select: text !important; }

.complemento-card {
  display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:12px; background: rgba(255,255,255,0.02); border-radius:10px; border:1px solid rgba(255,255,255,0.04);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.complemento-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,0.22); }

/* subtle separator for stacked complemento cards */
.complemento-card + .complemento-card { margin-top:8px }
.complemento-card:not(:last-child) { border-bottom: 1px solid rgba(255,255,255,0.03); }
.complemento-info h3 { margin:0; color:var(--white); font-size:16px; }
.complemento-info .descricao { margin-top:4px; color:var(--lighter); font-size:13px }
.complemento-actions { display:flex; gap:8px; align-items:center }

/* Style for modal complement options (list inside product modal) */
.comp-option {
  background: rgba(255,255,255,0.01);
  border: 1px solid rgba(255,255,255,0.02) !important; /* override inline dashed */
  border-radius: 8px;
  padding: 10px 12px !important;
  margin-bottom: 8px;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  box-shadow: 0 6px 14px rgba(0,0,0,0.14);
}
.comp-option:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.2); }
.comp-option .left img, .comp-option .comp-img { width:44px; height:44px; border-radius:8px; object-fit:cover }
.comp-option .middle { min-width:0 }
.comp-option .middle div:first-child { white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.comp-option .right button { background: transparent; border:none; color:var(--white); font-weight:700; padding:6px 8px; border-radius:6px }

/* Ensure the list container doesn't double-space when we add margins */
#groupList { padding:6px 6px 10px 6px }

/* Make admin action buttons visually prominent */
.btn-primary {
  padding: 10px 16px;
  border-radius: 10px;
}

/* Slightly larger product card in admin view */
.admin-main .produto-card, .admin-card .produto-card {
  padding: 14px;
  border-radius: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.admin-card .produto-info { flex: 1; }

.admin-card .produto-actions { display:flex; flex-direction:row; gap:8px; align-items:center; }

.admin-card .produto-img { width:64px; height:64px; }

/* Tidy up product action buttons on admin cards */
.produto-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Align header inside admin panel */
.admin-panel h2 { margin: 0; color: var(--primary); }

/* ensure responsive spacing when sidebar is fixed */
@media (max-width: 1000px) {
  #app.admin-full .admin-main { margin-left: 20px; width: auto; }
  .admin-sidebar { position: relative; left: 0; top: 0; width: 100%; }
}

.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.btn-edit {
  background: var(--warning);
  color: white;
}

.btn-delete {
  background: var(--danger);
  color: white;
}

.btn-success {
  background: var(--success);
  color: white;
}

/* Lista de Cupons */
.cupom-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.cupom-status.ativo {
  background: rgba(38, 222, 129, 0.2);
  color: var(--success);
}

.cupom-status.inativo {
  background: rgba(165, 177, 194, 0.2);
  color: var(--lighter);
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--lighter);
  font-size: 18px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--darker);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}

/* Responsive */
@media (max-width: 600px) {
  #app {
    padding: 10px;
  }
  
  .modal-content {
    padding: 20px;
  }
}

/* Micro-loading procedural for smooth transitions (used on finalize) */
#app.micro-fade-out {
  transition: opacity 80ms linear, transform 80ms linear, filter 80ms linear;
  opacity: 0;
  transform: scale(0.95);
  filter: blur(2px);
}

#app.micro-fade-in {
  transition: opacity 120ms ease, transform 120ms ease, filter 120ms ease;
  opacity: 1;
  transform: none;
  filter: none;
}

.skeleton-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10002;
}

.skeleton-card {
  width: min(720px, 92%);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.6);
}

.skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border-radius: 8px;
  margin-bottom: 12px;
  animation: skeletonPulse 120ms linear;
}

@keyframes skeletonPulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* Utilitários */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--primary-glow-strong);
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  z-index: 9999;
  box-shadow: 0 -6px 20px rgba(0,0,0,0.5);
}

.bottom-nav .bottom-nav-btn { background: transparent; border: none; color: var(--lighter); display:flex; flex-direction:column; align-items:center; gap:4px; padding:6px 8px; }
.bottom-nav .bottom-nav-btn i { font-size:18px; color:var(--lighter); }
.bottom-nav .bottom-nav-btn.active, .bottom-nav .bottom-nav-btn:hover { color: var(--white); }
.bottom-nav { box-shadow: 0 -6px 20px rgba(0,0,0,0.5); }

/* Ajustar padding do app para não ficar atrás do bottom nav */
#app {
  padding-bottom: 80px;
}

/* Configurações */
.config-section {
  margin-top: 20px;
}

.config-section h3 {
  color: var(--primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.config-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 15px;
  border: 1px solid var(--primary-glow-medium);
}

.config-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--primary-glow-xstrong);
  border-color: var(--primary);
}

.config-card h4 {
  color: var(--white);
  margin-bottom: 10px;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  background: var(--bg-dark);
  border: 2px solid var(--light);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.config-card-overview i { margin-right: 8px }
.config-card-overview h4 { font-size: 16px }
.concluir-todos-wrapper .btn-concluir-todos { min-width: 0; padding:6px 10px }

/* Small back buttons used inside config cards */
.config-card #btnBackConfigs,
.config-card #btnBackConfigs2,
.config-card #btnBackConfigs3 {
  width: auto !important;
  padding: 6px 10px !important;
  font-size: 13px !important;
}
.theme-swatch { cursor:pointer; border:2px solid rgba(255,255,255,0.06); }
.theme-swatch.active { outline: 3px solid rgba(255,255,255,0.06); transform: translateY(-2px) }

.radio-option:hover {
  border-color: var(--primary);
  background: var(--primary-glow-weak);
}

.radio-option input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.radio-option input[type="radio"]:checked {
  accent-color: var(--primary);
}

.radio-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-glow-strong);
}

.radio-content {
  flex: 1;
}

.radio-content strong {
  display: block;
  color: var(--white);
  margin-bottom: 4px;
}

.radio-content small {
  color: var(--text-secondary);
}

/* ===== Botões do card (store-meta-line3) - padronização visual ===== */
.store-meta-line3 {
  display:flex;
  justify-content:center;
  align-items:center;
  gap:16px; /* espaçamento fixo entre botões */
  margin-top:10px;
  flex-wrap:wrap;
}

.store-btn {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:10px;
  padding:12px 18px !important; /* leve aumento do padding */
  border-radius:10px !important; /* bordas arredondadas entre 8-12px */
  min-width:150px; /* garante largura igual quando possível */
  min-height:52px; /* altura fixa */
  background: #e54848; /* tom vermelho profissional */
  color: #fff !important;
  border: none !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.28);
  cursor: pointer;
  font-weight:700;
  transition: transform .14s ease, box-shadow .18s ease, filter .12s ease;
}

.store-btn .fa-fw { width: 18px; text-align: center; }

.store-btn-primary { background: linear-gradient(180deg, #e54848, #cc3f3f); }
.store-btn-ghost { background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02)); color: #fff; border: 1px solid rgba(255,255,255,0.04); }
.store-btn-icon { padding:12px !important; min-width:52px; min-height:52px; border-radius:12px; }

.store-btn:hover{ transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,0.32); filter: brightness(1.03); }
.store-btn:active{ transform: translateY(-1px); }

.store-btn .meta-label{ display:inline-block; vertical-align:middle; }

/* Força igualdade mesmo quando alguns botões têm apenas ícone */
.store-meta-line3 .store-btn { text-align:center; }

/* Mobile: grid 2x2 */
@media (max-width:599px){
  .store-meta-line3{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
  .store-btn{ width:100%; min-width:0; }
  .store-btn-icon{ justify-self:center; }
}

/* Small tablet: allow wrap with center alignment */
@media (min-width:600px) and (max-width:979px){
  .store-meta-line3{ display:flex; flex-wrap:wrap; justify-content:center; gap:12px; }
  .store-btn{ min-width:140px; }
}

/* Ensure old inline margins don't disturb layout */
.store-meta-line3 .btn { margin: 0 !important; }

/* End botões do card */
