:root {
  --acai-950: #190820;
  --acai-900: #26102f;
  --acai-800: #3d155f;
  --acai-600: #6d238d;
  --pink: #d836a9;
  --pink-soft: #ffe4f6;
  --leaf: #8bdc2f;
  --leaf-dark: #407e17;
  --paper: #fffdf9;
  --surface: #ffffff;
  --wash: #f7f1ea;
  --ink: #211827;
  --muted: #746779;
  --line: #eadfe8;
  --danger: #b42318;
  --ok: #198754;
  --shadow: 0 18px 50px rgba(45, 18, 58, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.internal-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

.store-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.store-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.cover {
  min-height: 190px;
  background:
    radial-gradient(circle at 78% 18%, rgba(139, 220, 47, 0.55), transparent 26%),
    radial-gradient(circle at 18% 82%, rgba(216, 54, 169, 0.5), transparent 30%),
    linear-gradient(135deg, #21092c, #4a146f 52%, #24112c);
}

.store-profile {
  display: grid;
  grid-template-columns: 174px 1fr;
  gap: 24px;
  align-items: end;
  padding: 0 0 28px;
  margin-top: -72px;
}

.store-logo {
  width: 174px;
  height: 174px;
  object-fit: contain;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  padding: 10px;
}

.store-info {
  padding: 24px 0 8px;
}

.store-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.store-info h1 {
  margin-bottom: 8px;
  font-size: clamp(2.4rem, 7vw, 4.9rem);
  line-height: 0.95;
  color: var(--acai-950);
  letter-spacing: 0;
}

.store-info p,
.search-row p,
.cart-head p,
.internal-top p,
.choice-head p {
  color: var(--muted);
}

.store-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.store-meta span,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef9df;
  color: var(--leaf-dark);
  font-weight: 800;
  font-size: 0.86rem;
}

.store-meta span {
  background: #f4edf6;
  color: var(--acai-800);
}

.status-pill.closed {
  background: #fff1ef;
  color: var(--danger);
}

.status-pill.soft {
  background: var(--pink-soft);
  color: var(--acai-800);
}

.category-strip {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 253, 249, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.category-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 0;
}

.category-button,
.ghost-button,
.secondary,
.mini-button,
.text-link,
.tab {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  min-height: 40px;
  padding: 9px 14px;
  font-weight: 800;
}

.category-button.active,
.tab.active {
  border-color: var(--acai-800);
  background: var(--acai-800);
  color: white;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 26px;
  align-items: start;
  padding: 26px 0 60px;
}

.promo-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  margin-bottom: 22px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(120deg, var(--acai-900), var(--acai-600) 60%, var(--pink));
  box-shadow: var(--shadow);
}

.promo-band span {
  display: block;
  color: #dfffad;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.promo-band strong {
  font-size: 1.2rem;
}

.mini-button {
  border: 0;
  background: white;
  color: var(--acai-800);
  white-space: nowrap;
}

.search-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}

.search-row h2 {
  margin-bottom: 4px;
  font-size: 2rem;
}

.search-box,
.checkout-grid label,
.manager-form label,
.note-field,
.login-modal label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.search-box {
  min-width: min(340px, 100%);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  min-height: 44px;
  padding: 11px 12px;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 4px rgba(216, 54, 169, 0.12);
}

textarea {
  resize: vertical;
  min-height: 82px;
}

.menu-list {
  display: grid;
  gap: 14px;
}

.menu-item {
  display: grid;
  grid-template-columns: 156px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(45, 18, 58, 0.06);
}

.menu-item img {
  width: 156px;
  height: 118px;
  border-radius: 12px;
  object-fit: cover;
}

.menu-copy h3 {
  margin-bottom: 6px;
  font-size: 1.18rem;
}

.menu-copy p {
  color: var(--muted);
  margin-bottom: 12px;
}

.menu-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  border-radius: 999px;
  background: #f4edf6;
  color: var(--acai-800);
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 900;
}

.tag.promo {
  background: var(--pink-soft);
  color: #9f146f;
}

.menu-buy {
  display: grid;
  gap: 12px;
  justify-items: end;
  min-width: 126px;
}

.price {
  color: var(--acai-800);
  font-size: 1.16rem;
  font-weight: 950;
}

.primary {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--acai-800), var(--pink));
  color: white;
  min-height: 44px;
  padding: 11px 16px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(109, 35, 141, 0.22);
}

.primary.full {
  width: 100%;
}

.whatsapp-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.secondary.full {
  width: 100%;
}

.success-code {
  display: inline-flex;
  justify-content: center;
  border-radius: 12px;
  background: #f4edf6;
  color: var(--acai-800);
  padding: 12px 16px;
  font-size: 1.4rem;
  letter-spacing: 0;
}

.secondary {
  color: var(--acai-800);
  border-color: #d8c7df;
}

.ghost-button {
  background: transparent;
  color: var(--muted);
}

.danger {
  border-color: #ffd6d1;
  color: var(--danger);
  background: #fff6f4;
}

.danger-text {
  color: var(--danger);
  font-weight: 800;
}

.order-aside {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 16px;
}

.cart-card,
.track-card,
.modal-card,
.manager-form,
.manager-item,
.order-column,
.order-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(45, 18, 58, 0.08);
}

.cart-card,
.track-card {
  padding: 16px;
}

.cart-head,
.cart-row,
.totals div,
.modal-actions,
.manager-item-head,
.order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-head h2,
.track-card h3 {
  margin-bottom: 2px;
}

.cart-items {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  max-height: 340px;
  overflow: auto;
}

.cart-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px;
  background: #fffafc;
}

.cart-item small,
.muted {
  color: var(--muted);
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.qty-row button {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: white;
  font-weight: 900;
}

.remove-button {
  width: auto !important;
  padding: 0 10px;
  color: var(--danger);
}

.totals {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.grand-total {
  font-size: 1.22rem;
}

.track-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.tracking-result {
  margin-top: 12px;
}

.timeline {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.timeline-step {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: center;
}

.dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--line);
}

.timeline-step.done .dot {
  background: var(--leaf);
}

.staff-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.staff-entry strong {
  display: block;
  color: var(--ink);
}

.text-link {
  border: 0;
  background: transparent;
  color: var(--acai-800);
  text-decoration: underline;
  padding: 6px 0;
  min-height: auto;
}

.modal {
  width: min(760px, calc(100% - 24px));
  padding: 0;
  border: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(25, 8, 32, 0.68);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  padding: 20px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: white;
  font-size: 1.4rem;
}

.modal-product {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  align-items: center;
  padding-right: 34px;
}

.modal-product img {
  width: 190px;
  height: 150px;
  border-radius: 14px;
  object-fit: cover;
}

.modal-price,
.modal-actions strong {
  color: var(--acai-800);
  font-size: 1.35rem;
}

.choice-section {
  margin: 20px 0;
}

.choice-head {
  margin-bottom: 10px;
}

.extras-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.extra-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffafc;
  color: var(--ink);
  text-align: left;
}

.extra-card.selected {
  border-color: var(--pink);
  background: var(--pink-soft);
  box-shadow: 0 0 0 4px rgba(216, 54, 169, 0.12);
}

.extra-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--acai-800), var(--pink));
  font-weight: 950;
}

.extra-card strong,
.extra-card span {
  display: block;
}

.extra-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

.note-field {
  margin-bottom: 16px;
}

.modal-actions {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.checkout-modal {
  width: min(820px, 100%);
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.wide {
  grid-column: 1 / -1;
}

.login-modal {
  width: min(430px, 100%);
  display: grid;
  gap: 12px;
  text-align: center;
}

.login-logo {
  width: 180px;
  margin: 0 auto;
}

.login-modal small {
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 100;
  transform: translateX(-50%) translateY(18px);
  opacity: 0;
  pointer-events: none;
  border-radius: 12px;
  background: var(--acai-950);
  color: white;
  padding: 13px 16px;
  max-width: min(520px, calc(100vw - 24px));
  box-shadow: var(--shadow);
  transition: 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.hidden {
  display: none !important;
}

.internal-app {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: 280px 1fr;
  background: #f6f2ee;
}

.internal-sidebar {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 24px;
  background: var(--acai-950);
  color: white;
}

.internal-sidebar img {
  width: 170px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  padding: 8px;
}

.internal-sidebar span {
  color: #d7c9dd;
}

.internal-sidebar nav {
  display: grid;
  gap: 8px;
}

.internal-sidebar .tab {
  justify-content: start;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-color: rgba(255, 255, 255, 0.12);
}

.internal-sidebar .tab.active {
  background: white;
  color: var(--acai-800);
}

.internal-main {
  overflow: auto;
  padding: 28px;
}

.internal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.owner-only {
  display: none !important;
}

.is-owner .owner-only {
  display: inline-flex !important;
}

.orders-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
}

.order-column {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  min-height: 280px;
  box-shadow: none;
}

.order-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  box-shadow: none;
}

.order-card p {
  margin-bottom: 0;
}

.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.manager-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  align-items: start;
}

.manager-form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.manager-list {
  display: grid;
  gap: 10px;
}

.manager-item {
  padding: 14px;
  box-shadow: none;
}

.check-row {
  display: flex !important;
  align-items: center;
}

.check-row input {
  width: auto;
}

.settings-form {
  max-width: 560px;
}

@media (max-width: 980px) {
  .page-grid {
    grid-template-columns: 1fr;
  }

  .order-aside {
    position: static;
  }

  .orders-board,
  .manager-grid {
    grid-template-columns: 1fr;
  }

  .internal-app {
    grid-template-columns: 1fr;
  }

  .internal-sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
    grid-template-columns: auto 1fr;
  }

  .internal-sidebar nav {
    grid-column: 1 / -1;
    grid-auto-flow: column;
    overflow-x: auto;
  }
}

@media (max-width: 720px) {
  .store-profile,
  .menu-item,
  .modal-product,
  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .store-logo {
    width: 150px;
    height: 150px;
  }

  .search-row,
  .promo-band,
  .staff-entry,
  .internal-top {
    align-items: stretch;
    flex-direction: column;
  }

  .menu-item img,
  .modal-product img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .menu-buy {
    justify-items: stretch;
  }

  .track-form {
    grid-template-columns: 1fr;
  }
}
