:root {
  --ink: #17211f;
  --muted: #60706b;
  --line: #dce6e0;
  --paper: #fff8ec;
  --surface: #ffffff;
  --green: #13795b;
  --green-dark: #0d5f48;
  --amber: #f2b84b;
  --tomato: #d84f3f;
  --blue: #2867a6;
  --shadow: 0 18px 45px rgba(20, 39, 34, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 44px);
  background: rgba(255, 250, 241, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  flex: 0 0 auto;
  color: white;
  background: var(--green);
  border-radius: 8px;
  font-weight: 850;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: var(--muted);
  font-size: 13px;
}

.icon-btn {
  position: relative;
  display: inline-grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

#cartCount {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  color: white;
  background: var(--tomato);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

main {
  width: min(1160px, calc(100% - 28px));
  margin: 0 auto;
  padding: 14px 0 80px;
}

.hero {
  display: block;
  min-height: 260px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(115deg, rgba(18, 32, 29, 0.9), rgba(18, 32, 29, 0.46)),
    url("https://images.unsplash.com/photo-1555939594-58d7cb561ad1?auto=format&fit=crop&w=1400&q=80");
  background-position: center;
  background-size: cover;
  color: white;
}

.hero-copy {
  align-self: end;
  max-width: 680px;
  padding: clamp(24px, 5vw, 52px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--amber);
}

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

h1 {
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(34px, 8vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero p {
  max-width: 620px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 17px;
  line-height: 1.55;
}

.home-intro {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 14px;
  margin: 16px 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(22, 43, 37, 0.08);
}

.home-intro.compact {
  grid-template-columns: 1fr;
}

.home-intro h2 {
  margin-bottom: 10px;
  font-size: clamp(26px, 5vw, 38px);
}

.home-intro p {
  color: var(--muted);
  line-height: 1.55;
}

.home-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-steps div {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: #f7faf7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.home-steps svg {
  width: 30px;
  height: 30px;
  color: var(--green);
}

.home-steps span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0;
  padding: 6px;
  background: #eef4ef;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-weight: 800;
}

.tab.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(19, 121, 91, 0.12);
}

.tab svg,
.primary svg,
.notice svg {
  width: 18px;
  height: 18px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

label svg {
  width: 18px;
  height: 18px;
  color: var(--green);
}

select {
  width: 100%;
  min-height: 54px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 24px;
  padding: 13px 14px;
  color: #684810;
  background: #fff1c8;
  border: 1px solid #f3d987;
  border-radius: 8px;
}

.step-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0;
}

.step-strip div {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 12px 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(22, 43, 37, 0.06);
}

.step-strip svg {
  width: 26px;
  height: 26px;
  color: var(--green);
}

.step-strip strong {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: white;
  background: var(--green);
  border-radius: 999px;
}

.step-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 10px 0 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 26px;
}

#nearbyCount {
  color: var(--muted);
  font-weight: 800;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.restaurant-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.restaurant-card {
  display: grid;
  min-height: 118px;
  align-content: center;
  justify-items: center;
  gap: 6px;
  padding: 12px;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(22, 43, 37, 0.08);
  text-align: center;
}

.restaurant-card.active {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(19, 121, 91, 0.12);
}

.restaurant-card.closed {
  opacity: 0.68;
}

.food-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  color: white;
  background: var(--green);
  border-radius: 999px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(19, 121, 91, 0.2);
}

.food-icon svg {
  width: 30px;
  height: 30px;
}

.image-icon {
  background-position: center;
  background-size: cover;
  border: 3px solid #e8f5ee;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.55);
}

.icon-only {
  background: var(--green);
}

.restaurant-card strong {
  font-size: 16px;
}

.restaurant-card small {
  color: var(--muted);
  font-weight: 750;
}

.page-hint {
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
}

.restaurant-profile {
  display: grid;
  gap: 14px;
  margin: 0 0 24px;
}

.restaurant-hero {
  min-height: 310px;
  display: grid;
  align-items: end;
  padding: clamp(20px, 5vw, 42px);
  color: white;
  background-position: center;
  background-size: cover;
  border-radius: 8px;
  overflow: hidden;
}

.restaurant-hero h2 {
  margin-bottom: 10px;
  font-size: clamp(34px, 8vw, 62px);
}

.restaurant-hero p {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.55;
}

.restaurant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.phone-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 850;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.service-list,
.testimonial-list {
  display: grid;
  gap: 10px;
}

.service-list span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  color: var(--muted);
  background: #f7faf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.service-list svg {
  width: 16px;
  height: 16px;
  color: var(--green);
}

blockquote {
  margin: 0;
  padding: 12px;
  color: var(--muted);
  background: #f7faf7;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  line-height: 1.5;
}

blockquote strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
}

.open-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.is-open {
  color: var(--green);
  background: #e8f5ee;
}

.is-closed {
  color: #a01818;
  background: #fff0f0;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 12px;
  margin-top: -4px;
}

.category-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  white-space: nowrap;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 850;
}

.category-tabs button.active {
  color: white;
  background: var(--green);
  border-color: var(--green);
}

.category-tabs span {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  color: inherit;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 12px;
}

.meal-card,
.panel,
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(22, 43, 37, 0.08);
}

.meal-card {
  overflow: hidden;
}

.meal-photo {
  height: 150px;
  background-position: center;
  background-size: cover;
}

.meal-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.meal-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.category-pill {
  width: fit-content;
  padding: 5px 8px;
  color: var(--green);
  background: #e8f5ee;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.meal-title {
  margin: 0;
  font-size: 21px;
}

.meal-desc {
  min-height: 42px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.meal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.price {
  font-weight: 900;
}

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 16px;
  color: white;
  background: var(--green);
  border: 0;
  border-radius: 8px;
  font-weight: 850;
}

.add-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 0 16px;
  color: white;
  background: #910014;
  border: 0;
  border-radius: 5px;
  font-weight: 850;
}

.add-btn:hover {
  background: #c4001f;
}

.add-btn:disabled {
  cursor: not-allowed;
  background: #9aa7a2;
}

.primary:hover {
  background: var(--green-dark);
}

.primary.small {
  min-height: 42px;
  white-space: nowrap;
}

.primary.full {
  width: 100%;
}

.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 16px;
  color: white;
  background: #ed001f;
  border: 0;
  border-radius: 8px;
  font-weight: 850;
}

.secondary.small {
  min-height: 44px;
}

.hidden {
  display: none !important;
}

.login-panel {
  display: grid;
  justify-items: center;
  gap: 14px;
  max-width: 480px;
  margin: 24px auto;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-align: center;
}

.login-icon {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  color: white;
  background: var(--green);
  border-radius: 999px;
}

.admin-lock {
  background: #17211f;
}

.login-icon svg {
  width: 38px;
  height: 38px;
}

.login-panel h2 {
  margin: 0;
  font-size: 28px;
}

.login-panel p {
  margin: 0;
  color: var(--muted);
}

.login-panel input {
  max-width: 240px;
  min-height: 64px;
  text-align: center;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 6px;
}

.error-text {
  min-height: 20px;
  color: #c4001f;
  font-weight: 850;
}

.secondary.full {
  width: 100%;
}

.restaurant-layout,
.admin-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
}

.dashboard-controls {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  max-width: 100%;
  padding-right: 6px;
  margin: 0 0 14px;
}

.dashboard-controls button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 14px;
  white-space: nowrap;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 850;
}

.dashboard-controls button.active {
  color: white;
  background: var(--green);
  border-color: var(--green);
}

.dashboard-controls svg {
  width: 18px;
  height: 18px;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.chart-card canvas {
  width: 100%;
  height: 220px;
  display: block;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  background: #f7faf7;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 800;
}

.chart-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.generated-code {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #f7faf7;
  border: 1px dashed var(--green);
  border-radius: 8px;
}

.generated-code span {
  color: var(--muted);
  font-weight: 800;
}

.generated-code strong {
  font-size: 32px;
  letter-spacing: 4px;
}

.whatsapp-box {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  background: #e8f5ee;
  border: 1px solid #bddfcd;
  border-radius: 8px;
}

.whatsapp-box span {
  color: var(--green);
  font-size: 22px;
  font-weight: 900;
}

.whatsapp-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  color: white;
  background: #25d366;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 850;
}

.whatsapp-link.full {
  width: 100%;
}

.admin-row-actions {
  display: grid;
  gap: 8px;
}

.panel {
  padding: 16px;
}

.panel h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 18px;
}

.panel h3 svg,
.compact-heading svg {
  width: 19px;
  height: 19px;
  color: var(--green);
}

.menu-panel {
  margin-top: 14px;
}

.compact-heading {
  align-items: center;
  margin: 0 0 12px;
}

.compact-heading h3 {
  margin: 0;
}

.compact-field {
  min-width: min(280px, 100%);
}

.stack-form {
  display: grid;
  gap: 12px;
}

.order-list,
.published-menu,
.cart-items {
  display: grid;
  gap: 10px;
}

.order-row,
.published-row,
.cart-row,
.zone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #f7faf7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.order-row {
  align-items: flex-start;
}

.order-controls {
  display: grid;
  min-width: 190px;
  gap: 8px;
}

.status-select {
  min-height: 38px;
}

.quick-ready {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 10px;
  color: var(--green);
  background: #e8f5ee;
  border: 1px solid #bddfcd;
  border-radius: 8px;
  font-weight: 850;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 10px;
  color: var(--blue);
  background: #e8f1fb;
  border-radius: 999px;
  font-weight: 850;
}

.quick-ready svg {
  width: 16px;
  height: 16px;
}

.status-pret {
  border-color: #99d7b6;
  background: #f2fbf6;
}

.status-en-livraison {
  border-color: #b9d4f0;
  background: #f2f8ff;
}

.status-livre {
  border-color: #dad2a0;
  background: #fffbe5;
}

.status-annule {
  border-color: #f0b6b6;
  background: #fff5f5;
}

.order-row span,
.published-row span,
.cart-row span {
  color: var(--muted);
  font-size: 13px;
}

.payment-switches {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.availability-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  color: white;
  font-weight: 900;
}

.availability-switch button.open {
  background: var(--green);
}

.availability-switch button.closed {
  background: #a01818;
}

.availability-switch svg {
  width: 20px;
  height: 20px;
}

.pay-chip {
  display: block;
}

.pay-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pay-chip span {
  display: grid;
  min-height: 58px;
  place-items: center;
  padding: 8px;
  color: var(--muted);
  background: #f7faf7;
  border: 2px solid var(--line);
  border-radius: 8px;
  font-weight: 850;
  text-align: center;
}

.pay-chip input:checked + span {
  color: var(--green);
  background: #e8f5ee;
  border-color: var(--green);
}

.admin-restaurant span b {
  color: var(--green);
  font-size: 16px;
}

.menu-category {
  display: grid;
  gap: 8px;
}

.menu-category h4 {
  margin: 12px 0 2px;
  color: var(--green);
  font-size: 13px;
  text-transform: uppercase;
}

.cart-row em {
  display: block;
  margin-top: 4px;
  color: var(--green);
  font-size: 13px;
  font-style: normal;
}

.status {
  padding: 5px 8px;
  color: var(--blue);
  background: #e8f1fb;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric {
  padding: 16px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.watch-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(13, 31, 27, 0.48);
}

.cart-drawer.open {
  display: flex;
}

.cart {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: hidden;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
  color: white;
  background: #ed001f;
}

.cart-head h2 {
  margin: 0;
  font-size: 24px;
}

.cart-head .icon-btn {
  color: white;
  background: transparent;
  border-color: transparent;
}

.cart-head .icon-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.cart-items {
  overflow: auto;
  padding: 18px 20px;
}

.cart-actions {
  display: grid;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid var(--line);
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 8px;
  font-size: 20px;
}

.loyalty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px 2px;
  color: var(--ink);
  font-size: 15px;
}

.loyalty svg {
  width: 17px;
  height: 17px;
}

.delete-line {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ed001f;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.delete-line:hover {
  background: #fff0f2;
}

.delete-line:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.delete-line svg {
  width: 17px;
  height: 17px;
}

.empty {
  color: var(--muted);
  line-height: 1.5;
}

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 22, 20, 0.52);
}

.product-modal.open {
  display: flex;
}

.modal-card {
  width: min(620px, 100%);
  overflow: hidden;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px;
  color: white;
  background: #ed001f;
}

.modal-head h2 {
  margin: 0;
  font-size: 24px;
}

.modal-close {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: white;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.modal-body {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.order-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.order-mode button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 58px;
  color: var(--muted);
  background: #f7faf7;
  border: 2px solid var(--line);
  border-radius: 8px;
  font-weight: 900;
}

.order-mode button.active {
  color: white;
  background: var(--green);
  border-color: var(--green);
}

.order-mode svg {
  width: 20px;
  height: 20px;
}

.modal-product {
  display: grid;
  grid-template-columns: 86px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #f7faf7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.modal-product img {
  width: 86px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
}

.modal-product strong,
.modal-product span {
  display: block;
}

.modal-product strong {
  font-size: 20px;
}

.modal-product span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  padding: 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

input {
  width: 100%;
  min-height: 54px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

input[type="file"] {
  display: grid;
  align-items: center;
  padding: 12px;
}

.image-preview {
  min-height: 160px;
  background-position: center;
  background-size: cover;
  border: 2px solid var(--line);
  border-radius: 8px;
}

.checkbox-label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.contact-card {
  width: min(620px, 100%);
}

.site-footer {
  width: min(1160px, calc(100% - 28px));
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto 24px;
  padding: 18px;
  color: white;
  background: var(--ink);
  border-radius: 8px;
}

.site-footer span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-socials a {
  color: white;
  text-decoration: none;
  font-weight: 850;
}

@media (max-width: 860px) {
  .restaurant-layout,
  .admin-grid,
  .home-intro,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .menu-grid,
  .metrics,
  .restaurant-cards,
  .chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  main {
    width: min(100% - 14px, 1160px);
    padding-top: 8px;
  }

  .brand span {
    display: none;
  }

  .hero {
    min-height: 210px;
  }

  .home-steps {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .menu-grid,
  .metrics,
  .restaurant-cards,
  .payment-switches,
  .chart-grid {
    grid-template-columns: 1fr;
  }

  .tabs {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 30;
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
    box-shadow: 0 12px 40px rgba(20, 39, 34, 0.22);
  }

  .tab {
    min-height: 54px;
    padding: 4px;
    font-size: 12px;
  }

  .tab svg {
    width: 20px;
    height: 20px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .order-row,
  .published-row,
  .cart-row,
  .zone-row {
    align-items: stretch;
    flex-direction: column;
  }

  .order-controls {
    min-width: 0;
  }

  .step-strip {
    gap: 6px;
  }

  .cart-drawer,
  .product-modal {
    padding: 8px;
  }

  .order-mode {
    grid-template-columns: 1fr;
  }

  .restaurant-hero {
    min-height: 420px;
  }

  .restaurant-actions,
  .site-footer {
    flex-direction: column;
  }
}
