:root {
  color-scheme: light;
  --ink: #1b1d1f;
  --muted: #66717c;
  --line: #d9e0e6;
  --paper: #fbfcfd;
  --surface: #ffffff;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --blue: #315c8a;
  --rose: #9f3a4d;
  --gold: #9a6b12;
  --shadow: 0 12px 30px rgba(24, 31, 38, 0.08);
}

* {
  box-sizing: border-box;
}

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

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

button,
.button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.5rem;
  padding: 0.65rem 0.95rem;
  font: inherit;
  font-weight: 700;
  max-width: 100%;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

button:hover,
.button:hover {
  background: var(--accent-strong);
  text-decoration: none;
}

button.secondary,
.button.secondary {
  background: #e8eef2;
  color: var(--ink);
}

button.danger,
.button.danger {
  background: var(--rose);
}

button.subtle,
.button.subtle {
  background: transparent;
  color: var(--accent-strong);
  border: 1px solid var(--line);
}

input,
textarea,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
}

label.checkbox,
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  color: var(--ink);
  line-height: 1.35;
}

label.checkbox input,
.checkbox input {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 1.25rem;
  margin-top: 0.05rem;
  accent-color: var(--accent);
}

.admin-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 15rem 1fr;
}

.admin-sidebar {
  background: #17202a;
  color: #f7fafc;
  padding: 1.25rem;
  position: sticky;
  top: 0;
  height: 100vh;
  min-width: 0;
}

.brand {
  font-size: 1.15rem;
  font-weight: 850;
  margin-bottom: 1.25rem;
}

.admin-sidebar nav {
  display: grid;
  gap: 0.35rem;
}

.admin-sidebar a,
.admin-sidebar button {
  color: #e9eef2;
  background: transparent;
  justify-content: flex-start;
  border-radius: 6px;
  padding: 0.65rem 0.75rem;
  min-height: auto;
  font-weight: 650;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
  background: rgba(255, 255, 255, 0.12);
  text-decoration: none;
}

.admin-main {
  min-width: 0;
  padding: 1.5rem;
}

.admin-header,
.public-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-header h1,
.public-title h1,
.page-title {
  margin: 0;
  line-height: 1.1;
}

.grid {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.public-shell {
  max-width: 44rem;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem;
}

.panel,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  max-width: 100%;
  padding: 1rem;
  box-shadow: var(--shadow);
  overflow-wrap: anywhere;
}

.panel h2,
.card h2,
.panel h3,
.card h3 {
  margin-top: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.stack {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.stack > *,
.grid > * {
  min-width: 0;
}

.row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.spread {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.spread > * {
  min-width: 0;
}

.muted {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: #e8eef2;
  color: #27313a;
  font-size: 0.82rem;
  font-weight: 750;
}

.badge.open,
.badge.accepted,
.badge.ready,
.badge.paid {
  background: #d8f2e9;
  color: #105f53;
}

.badge.pending,
.badge.manual,
.badge.scheduled {
  background: #fff2cc;
  color: #77520d;
}

.badge.closed,
.badge.canceled,
.badge.error {
  background: #f8d7df;
  color: #8c263a;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 44rem;
}

th,
td {
  text-align: left;
  padding: 0.8rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: #f0f4f7;
  color: #42505b;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.notice {
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  font-weight: 650;
}

.notice.ok {
  background: #dff4eb;
  color: #105f53;
}

.notice.error {
  background: #fde2e8;
  color: #8c263a;
}

.public-shell {
  min-height: 100vh;
  overflow-x: clip;
  background: #f5f8fa;
}

.public-wrap {
  width: 100%;
  min-width: 0;
  max-width: 52rem;
  margin: 0 auto;
  padding: 1rem;
}

.hero {
  width: 100%;
  max-width: 100vw;
  min-height: 18rem;
  border-radius: 0 0 14px 14px;
  background-size: cover;
  background-position: center;
  color: white;
  position: relative;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 24, 32, 0.18), rgba(16, 24, 32, 0.76));
}

.hero-content {
  position: relative;
  padding: 1.25rem;
  width: 100%;
  min-width: 0;
  max-width: min(42rem, 100vw);
}

.hero h1 {
  margin: 0 0 0.45rem;
  max-width: calc(100vw - 2.5rem);
  font-size: clamp(2rem, 6vw, 3.4rem);
  letter-spacing: 0;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.hero-content p,
.hero-content .muted,
.public-wrap p,
.public-wrap h1,
.public-wrap h2,
.public-wrap h3 {
  max-width: calc(100vw - 2rem);
  overflow-wrap: anywhere;
}

.public-wrap .panel h2,
.public-wrap .panel h3,
.public-wrap .card h2,
.public-wrap .card h3,
.public-wrap .panel p,
.public-wrap .card p {
  max-width: 100%;
}

.menu-grid {
  display: grid;
  gap: 1rem;
}

.item-card {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  align-items: start;
}

.item-card > * {
  min-width: 0;
}

.item-card img {
  width: 7rem;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: #dfe8ee;
}

.item-card h3 {
  margin: 0;
  overflow-wrap: anywhere;
}

.item-card p {
  max-width: 100%;
}

.price {
  font-size: 1.15rem;
  font-weight: 850;
  color: var(--accent-strong);
}

.cart-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: #17202a;
  color: #fff;
  border-radius: 10px 10px 0 0;
  padding: 0.9rem 1rem;
  box-shadow: 0 -10px 30px rgba(24, 31, 38, 0.18);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.login-card {
  width: min(100%, 28rem);
}

.qr {
  width: 15rem;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.copy-box {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  background: #f0f4f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    max-width: 100vw;
    overflow: hidden;
    position: static;
    height: auto;
    padding: 0.75rem 1rem;
    width: 100%;
  }

  .admin-sidebar nav {
    display: flex;
    gap: 0.5rem;
    margin-inline: -1rem;
    max-width: 100vw;
    overflow-x: auto;
    padding: 0 1rem 0.25rem;
    scrollbar-width: thin;
  }

  .admin-sidebar a,
  .admin-sidebar button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .brand {
    margin-bottom: 0.75rem;
  }

  .admin-main {
    padding: 1rem;
  }

  .public-shell {
    max-width: none;
    padding: 0;
  }

  .hero h1 {
    max-width: 20rem;
  }

  .hero-content p {
    max-width: 18rem;
  }

  .grid.two,
  .grid.three,
  .grid.four {
    grid-template-columns: 1fr;
  }

  .admin-header,
  .public-bar,
  .spread {
    align-items: flex-start;
    flex-direction: column;
  }

  .item-card {
    grid-template-columns: 1fr;
  }

  .item-card img {
    width: 100%;
    max-height: 12rem;
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 430px) {
  .item-card {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .item-card img {
    width: 100%;
    max-height: 12rem;
    aspect-ratio: 16 / 10;
  }

  .cart-bar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media print {
  .admin-sidebar,
  .admin-header .row,
  button,
  .button,
  form.print-hidden,
  .notice {
    display: none !important;
  }

  .admin-layout {
    display: block;
  }

  .admin-main {
    padding: 0;
  }

  .panel,
  .card,
  .table-wrap {
    box-shadow: none;
    border-color: #999;
  }
}

.marketing-page {
  background: #f6f3ed;
  color: #202326;
  overflow-x: hidden;
  max-width: 100vw;
}

.marketing-page main {
  max-width: 100vw;
  overflow-x: hidden;
}

.marketing-page .button {
  min-height: 2.8rem;
}

.marketing-nav,
.marketing-footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.marketing-nav {
  padding: 1.1rem 0;
}

.marketing-nav nav,
.marketing-footer span:last-child {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.marketing-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #1e252b;
  font-weight: 850;
}

.marketing-logo:hover {
  text-decoration: none;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 8px;
  background: #0f766e;
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.marketing-hero,
.marketing-section {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.marketing-hero {
  min-height: calc(100vh - 5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(19rem, 0.75fr);
  gap: clamp(1.25rem, 4vw, 3.25rem);
  align-items: center;
  padding: clamp(2rem, 6vw, 5rem) 0 3rem;
}

.hero-copy {
  min-width: 0;
  max-width: 100%;
}

.eyebrow {
  color: #9a6b12;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  margin: 0 0 0.7rem;
  text-transform: uppercase;
}

.marketing-hero h1 {
  max-width: 49rem;
  margin: 0;
  font-size: clamp(2.65rem, 7vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

br.mobile-break {
  display: none;
}

.hero-lede {
  max-width: 39rem;
  color: #4f5b64;
  font-size: 1.18rem;
  margin: 1.2rem 0 0;
  overflow-wrap: anywhere;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}

.product-shot {
  justify-self: center;
  width: min(100%, 23rem);
  padding: 0.8rem;
  border: 1px solid #d7cec0;
  border-radius: 22px;
  background: #27211b;
  box-shadow: 0 28px 70px rgba(31, 25, 18, 0.24);
}

.product-shot img {
  width: 100%;
  border-radius: 15px;
}

.marketing-section {
  padding: clamp(2.2rem, 6vw, 4.6rem) 0;
  border-top: 1px solid #ded6c9;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1.4rem, 5vw, 4rem);
}

.marketing-section h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.marketing-section h3 {
  margin: 0 0 0.35rem;
}

.marketing-section p {
  color: #56616a;
}

.feature-list,
.integration-grid {
  display: grid;
  gap: 0.9rem;
}

.feature-list {
  grid-template-columns: 1fr;
}

.feature-list > div,
.integration-grid article,
.lead-form,
.screen-card {
  background: #fffdf9;
  border: 1px solid #ddd3c4;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(31, 25, 18, 0.08);
}

.feature-list > div,
.integration-grid article {
  padding: 1rem;
}

.screenshot-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.screen-card {
  padding: 0.75rem;
  overflow: hidden;
}

.screen-card img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid #e1e5e8;
}

.section-heading {
  max-width: 44rem;
  margin-bottom: 1.2rem;
}

.integration-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.beta-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(20rem, 0.9fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}

.beta-copy {
  position: sticky;
  top: 1rem;
}

.lead-form {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
}

.form-footnote {
  margin: 0;
  color: #66717c;
  font-size: 0.9rem;
}

.legal-page {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) 0;
}

.legal-page h1 {
  font-size: clamp(2.3rem, 6vw, 4.2rem);
  line-height: 1;
  margin: 0 0 0.7rem;
  letter-spacing: 0;
}

.legal-page section {
  border-top: 1px solid #ded6c9;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}

.marketing-footer {
  border-top: 1px solid #ded6c9;
  color: #66717c;
  padding: 1.1rem 0 2rem;
}

@media (max-width: 900px) {
  .marketing-hero,
  .two-column,
  .beta-section,
  .screenshot-band {
    grid-template-columns: 1fr;
  }

  .marketing-hero {
    min-height: auto;
    padding-top: 2rem;
  }

  .product-shot {
    width: min(100%, 19rem);
    justify-self: start;
  }

  .integration-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .beta-copy {
    position: static;
  }
}

@media (max-width: 620px) {
  .marketing-nav,
  .marketing-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .marketing-footer > span {
    width: 86vw;
    max-width: 22rem;
    overflow-wrap: anywhere;
  }

  .marketing-nav nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.2rem;
  }

  .marketing-hero {
    width: 100%;
    max-width: 100vw;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .marketing-section {
    width: 100%;
    max-width: 100vw;
    padding-left: 1rem;
    padding-right: 1rem;
    overflow-x: hidden;
  }

  .marketing-section > *,
  .feature-list,
  .integration-grid,
  .section-heading,
  .beta-copy {
    min-width: 0;
    max-width: 100%;
  }

  .feature-list > div,
  .integration-grid article,
  .lead-form,
  .screen-card {
    width: 86vw;
    max-width: 22rem;
  }

  .marketing-section h2,
  .marketing-section h3,
  .marketing-section p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  body.marketing-page .marketing-section h2 {
    width: 86vw;
    max-width: 22rem;
    font-size: clamp(1.7rem, 8vw, 2.15rem);
    line-height: 1.08;
  }

  body.marketing-page .marketing-section p {
    width: 78vw;
    max-width: 20rem;
  }

  body.marketing-page .feature-list > div p,
  body.marketing-page .integration-grid article p,
  body.marketing-page .lead-form p {
    width: auto;
    max-width: calc(100vw - 4rem);
  }

  .marketing-hero h1 {
    font-size: clamp(1.85rem, 8.4vw, 2.25rem);
    width: 86vw;
    max-width: 22rem;
    line-height: 1.02;
  }

  br.mobile-break {
    display: block;
  }

  .hero-lede {
    font-size: 1.05rem;
    width: 86vw;
    max-width: 22rem;
  }

  .hero-actions,
  .hero-actions .button,
  .lead-form button {
    width: 100%;
  }

  .integration-grid {
    grid-template-columns: 1fr;
  }
}
