:root {
  --bg: #f7f3ec;
  --panel: #fffdf8;
  --ink: #1f2522;
  --muted: #68706a;
  --line: #ddd4c8;
  --coffee: #6d4c3d;
  --matcha: #4d6b55;
  --copper: #b87745;
  --admin: #f3f5f1;
  --shadow: 0 20px 60px rgba(31, 37, 34, 0.12);
}

* {
  box-sizing: border-box;
}

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

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

button {
  border: 1px solid var(--line);
  background: #fffaf2;
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.primary {
  background: var(--matcha);
  border-color: var(--matcha);
  color: white;
}

.ghost {
  background: rgba(255, 255, 255, 0.14);
  color: white;
}

.small {
  padding: 8px 10px;
  font-size: 13px;
}

.public-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px 34px;
  background: rgba(247, 243, 236, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-block;
  background: radial-gradient(circle at 40% 35%, #fff7e8 0 18%, var(--copper) 19% 34%, var(--coffee) 35% 100%);
}

.public-header nav {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.public-header nav button,
.locale-switcher button {
  border: 0;
  background: transparent;
}

.locale-switcher {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.locale-switcher button {
  border-radius: 0;
  padding: 8px 10px;
}

.locale-switcher .active {
  background: var(--ink);
  color: white;
}

.hero {
  min-height: 680px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 900ms ease, transform 4200ms ease;
}

.hero-slides img.active {
  opacity: 1;
  transform: scale(1);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(24, 27, 25, 0.76), rgba(24, 27, 25, 0.12));
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin-left: clamp(28px, 8vw, 110px);
  color: white;
}

.carousel-dots {
  position: absolute;
  right: clamp(28px, 6vw, 90px);
  bottom: 42px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.carousel-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.32);
  transition: background 240ms ease, transform 240ms ease;
  cursor: pointer;
}

.carousel-dots button:hover,
.carousel-dots button:focus-visible {
  background: rgba(255, 255, 255, 0.78);
  outline: none;
  transform: scale(1.18);
}

.carousel-dots button.active {
  background: #fffaf2;
  transform: scale(1.28);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--copper);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 680px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero p {
  max-width: 620px;
  font-size: 21px;
  line-height: 1.6;
  color: #f0e7d8;
}

.status-row,
.hero-actions,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.status-row {
  margin: 24px 0;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #7ed395;
  box-shadow: 0 0 0 4px rgba(126, 211, 149, 0.16);
}

.status-dot.open {
  background: #7ed395;
  box-shadow: 0 0 0 4px rgba(126, 211, 149, 0.16);
}

.status-dot.closed {
  background: #d59a5b;
  box-shadow: 0 0 0 4px rgba(213, 154, 91, 0.18);
}

.section,
.split-section,
.page-title,
.menu-layout {
  width: min(1160px, calc(100vw - 40px));
  margin: 0 auto;
}

.section {
  padding: 66px 0 30px;
}

.section-heading,
.admin-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-heading span,
.page-title h1,
.split-section h2,
.admin-title h1 {
  margin: 0;
  font-size: 36px;
  letter-spacing: 0;
}

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

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

.menu-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  min-height: 190px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.compact .menu-card {
  display: block;
}

.item-photo {
  min-height: 150px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.86);
  background: radial-gradient(circle at 40% 35%, #ead7b7 0 18%, #7b4b35 20% 46%, #2b211d 47% 100%);
}

.item-photo span {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.item-photo.sweets {
  background: radial-gradient(circle at 40% 40%, #d6e4b8 0 25%, #78945d 26% 48%, #584037 49% 100%);
}

.item-photo.non-coffee {
  background: radial-gradient(circle at 40% 38%, #f9ef91 0 22%, #d0aa4a 23% 48%, #4b6a55 49% 100%);
}

.item-photo.light-food {
  background: radial-gradient(circle at 45% 40%, #f4d69f 0 26%, #c88b43 27% 52%, #5b4435 53% 100%);
}

.menu-card-body {
  padding: 18px;
}

.item-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.item-title h3 {
  margin: 0;
  font-size: 20px;
}

.menu-card p {
  min-height: 48px;
  color: var(--muted);
  line-height: 1.45;
}

.tag-row span,
.info-band span {
  border: 1px solid var(--line);
  background: #fffaf2;
  color: var(--coffee);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.info-band {
  width: min(1160px, calc(100vw - 40px));
  margin: 36px auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 26px;
  background: var(--ink);
  border-radius: 8px;
}

.info-band span {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-color: rgba(255, 255, 255, 0.18);
}

.split-section {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  padding: 54px 0 80px;
  align-items: center;
}

.align-start {
  align-items: start;
}

.mini-map,
.map-block,
.note-card,
.form-card,
.pickup-panel,
.admin-panel,
.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.mini-map,
.map-block {
  min-height: 260px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;
  padding: 28px;
  background:
    linear-gradient(120deg, rgba(77, 107, 85, 0.16), rgba(184, 119, 69, 0.15)),
    repeating-linear-gradient(45deg, #fffaf2 0 18px, #f1eadf 18px 20px);
}

.map-block {
  min-height: 430px;
  align-content: center;
  cursor: default;
}

.map-block strong {
  font-size: 30px;
}

.map-block span {
  color: var(--muted);
  max-width: 360px;
}

.map-pin {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 10px;
  background: var(--green);
  color: white;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  box-shadow: 0 18px 40px rgba(77, 107, 85, 0.28);
}

.mini-map button {
  justify-self: center;
}

.page-title {
  padding: 82px 0 30px;
}

.page-title h1 {
  font-size: clamp(42px, 5vw, 64px);
}

.page-title p {
  color: var(--muted);
  font-size: 19px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tabs .active {
  background: var(--ink);
  color: white;
}

.menu-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 22px;
  padding-bottom: 80px;
  align-items: start;
}

.pickup-panel {
  position: sticky;
  top: 86px;
  padding: 20px;
}

.cart-line,
.subtotal,
.table-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.cart-line button {
  width: 28px;
  height: 28px;
  padding: 0;
}

form {
  display: grid;
  gap: 12px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 8px;
  padding: 12px;
}

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

.field-label {
  display: grid;
  gap: 7px;
}

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

.field-label b {
  color: #b85d45;
}

.required-hint {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 13px;
}

.form-card,
.note-card {
  padding: 24px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--ink);
}

.login-card {
  width: min(420px, calc(100vw - 40px));
  padding: 34px;
  background: var(--panel);
  border-radius: 8px;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
  background: var(--admin);
}

.admin-sidebar {
  min-height: 100vh;
  padding: 22px;
  background: #242b27;
  color: white;
}

.admin-brand {
  margin-bottom: 26px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.admin-brand small {
  display: block;
  margin-top: 6px;
  color: #aeb8b0;
  font-weight: 500;
}

.admin-profile {
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.admin-profile strong,
.admin-profile span {
  display: block;
}

.admin-profile span {
  margin-top: 4px;
  color: #aeb8b0;
  font-size: 13px;
}

.admin-sidebar button {
  width: 100%;
  margin-bottom: 8px;
  text-align: left;
  color: #dfe8df;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.1);
}

.admin-sidebar .active {
  background: var(--matcha);
  color: white;
}

.admin-locale {
  margin: 0 0 16px;
  border-color: rgba(255, 255, 255, 0.18);
}

.admin-locale button {
  color: #dfe8df;
  text-align: center;
}

.admin-locale .active {
  background: #fffdf8;
  color: var(--ink);
}

.admin-page {
  padding: 34px;
}

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

.stat-card {
  padding: 20px;
}

.stat-card strong {
  display: block;
  font-size: 32px;
  color: var(--matcha);
}

.stat-card span {
  color: var(--muted);
}

.admin-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.admin-panel {
  padding: 22px;
  box-shadow: none;
}

.dashboard-card {
  padding: 24px;
  overflow: hidden;
}

.dashboard-card .panel-title-row {
  margin-bottom: 18px;
}

.dashboard-table {
  display: grid;
  gap: 0;
}

.dashboard-row {
  display: grid;
  gap: 14px;
  align-items: center;
  min-height: 58px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.dashboard-head,
.notification-head {
  min-height: auto;
  padding-top: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.queue-row,
.dashboard-head {
  grid-template-columns: minmax(150px, 1fr) 72px 76px minmax(150px, 230px);
}

.customer-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.customer-cell strong {
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-cell small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.time-cell {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f4eee4;
  color: var(--ink);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.count-pill {
  display: inline-flex;
  min-width: 48px;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(77, 107, 85, 0.12);
  color: var(--matcha);
  font-style: normal;
  font-weight: 900;
}

.compact-select {
  min-height: 42px;
  padding: 9px 12px;
}

.notification-dashboard {
  margin-top: 0;
}

.notification-row,
.notification-head {
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 220px) 180px;
}

.notify-status {
  display: grid;
  gap: 4px;
}

.notify-status strong {
  font-size: 14px;
}

.notify-status i {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f4eee4;
  color: var(--coffee);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.notification-time {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.45;
}

.table-row.detailed {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.6fr 0.45fr 1.1fr 1fr 150px;
  gap: 12px;
  align-items: center;
}

.table-row.detailed > * {
  min-width: 0;
}

.table-row small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.notification-cell {
  display: grid;
  gap: 6px;
}

button.tiny {
  width: fit-content;
  padding: 6px 9px;
  font-size: 12px;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-user-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.admin-user-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.muted-row {
  opacity: 0.58;
}

.role-pill {
  width: fit-content;
  padding: 8px 10px;
  border-radius: 999px;
  background: #eee6dc;
  color: var(--coffee);
  font-size: 13px;
  font-weight: 800;
}

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

.permission-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.permission-picker legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.permission-picker label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.permission-picker input {
  width: auto;
}

.compact-permissions {
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: center;
}

.readonly-permissions {
  opacity: 0.72;
  background: #faf6ef;
}

.editor-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 20px;
}

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

.form-grid .full-span {
  grid-column: 1 / -1;
}

.form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.form-section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.form-section legend {
  padding: 0 6px;
  color: var(--ink);
  font-weight: 900;
}

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

.template-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.45);
}

.template-group summary {
  cursor: pointer;
  font-weight: 900;
}

.template-language {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.template-language textarea {
  min-height: 150px;
}

.form-grid label.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.checkbox-row input {
  width: auto;
}

.form-grid .permission-picker label,
.admin-list .permission-picker label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
}

.permission-picker label span {
  min-width: 0;
}

.hero-image-controls {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-image-controls legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.image-mode-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.image-mode-row label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
}

.image-mode-row input,
.hero-image-controls input[type="radio"] {
  width: auto;
}

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

.carousel-admin-slot {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
}

.carousel-admin-slot strong {
  color: var(--ink);
}

.field-help {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.featured-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.featured-picker legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.featured-picker label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--ink);
}

.featured-picker input {
  width: auto;
}

.live-preview img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  border-radius: 8px;
}

.menu-admin-table .table-row {
  display: grid;
  grid-template-columns: 1.2fr 110px 150px 130px 90px;
}

.bar {
  display: grid;
  grid-template-columns: 50px 1fr 34px;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
}

.bar strong {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: #eee6dc;
  overflow: hidden;
  min-width: 0;
}

.bar strong i {
  display: block;
  height: 100%;
  max-width: 100%;
  border-radius: inherit;
  background: var(--matcha);
}

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(31, 37, 34, 0.94);
  color: #fffdf8;
  box-shadow: 0 18px 44px rgba(31, 37, 34, 0.22);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-title-row h2 {
  margin: 0;
}

.segmented {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.segmented button {
  border: 0;
  border-radius: 0;
  padding: 8px 12px;
  background: transparent;
}

.segmented .active {
  background: var(--ink);
  color: white;
}

.pie-layout {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  align-items: center;
  min-height: 190px;
}

.pie-chart {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 18px rgba(255, 253, 248, 0.75);
}

.pie-legend {
  display: grid;
  gap: 12px;
}

.pie-legend span {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

@media (max-width: 900px) {
  .public-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .public-header nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .menu-grid,
  .menu-grid.compact,
  .split-section,
  .menu-layout,
  .admin-columns,
  .editor-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 620px;
  }

  .hero-copy {
    margin: 100px 24px 44px;
  }

  .menu-card,
  .compact .menu-card {
    grid-template-columns: 120px 1fr;
    display: grid;
  }

  .pickup-panel {
    position: static;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    min-height: auto;
  }

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

  .table-row,
  .table-row.detailed,
  .menu-admin-table .table-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .dashboard-row,
  .queue-row,
  .dashboard-head,
  .notification-row,
  .notification-head {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: stretch;
  }

  .dashboard-head,
  .notification-head {
    display: none;
  }

  .compact-select {
    max-width: none;
  }
}
