:root {
  color-scheme: light;
  --ink: #171916;
  --muted: #666a64;
  --line: #d9ddd7;
  --surface: #ffffff;
  --background: #f4f6f3;
  --green: #2f6b4f;
  --green-dark: #22513b;
  --gold: #b7a15c;
  --gold-soft: #f5f0dc;
  --red: #9d4137;
  --shadow: 0 14px 35px rgb(23 25 22 / 9%);
  font-family: Arial, "Noto Sans Hebrew", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--background);
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgb(10 12 10 / 68%), rgb(10 12 10 / 68%)),
    url("assets/jennyfer-kitchen.jpg") center / cover fixed;
}

.login-shell {
  width: min(420px, 100%);
  padding: 30px;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 8px;
  background: rgb(255 255 255 / 96%);
  box-shadow: var(--shadow);
}

.login-shell > img {
  display: block;
  width: 180px;
  height: 76px;
  margin: 0 auto 18px;
  object-fit: contain;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form h1,
.login-form p {
  margin: 0;
}

.login-form h1 {
  font-size: 1.75rem;
  letter-spacing: 0;
}

.login-form > p {
  color: var(--muted);
  line-height: 1.55;
}

.login-form label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.login-form input {
  width: 100%;
  min-height: 46px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.login-form .login-error {
  padding: 10px 12px;
  color: var(--red);
  border: 1px solid rgb(157 65 55 / 35%);
  border-radius: 6px;
  background: rgb(157 65 55 / 7%);
  font-weight: 700;
}

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

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(47 107 79 / 28%);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.a11y-launcher {
  position: fixed;
  top: 120px;
  left: 20px;
  z-index: 1000;
  display: grid;
  width: 50px;
  height: 50px;
  padding: 0;
  color: #fff;
  border: 2px solid #fff;
  border-radius: 4px;
  background: var(--ink);
  box-shadow: 0 5px 16px rgb(0 0 0 / 24%);
  place-items: center;
}

.a11y-launcher svg {
  width: 30px;
  height: 30px;
}

.a11y-panel {
  position: fixed;
  top: 55px;
  left: 20px;
  z-index: 1001;
  width: min(330px, calc(100vw - 40px));
  max-height: calc(100vh - 75px);
  overflow-y: auto;
  color: var(--ink);
  border: 1px solid #c9cec7;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 18px 48px rgb(0 0 0 / 28%);
  direction: rtl;
}

.a11y-panel[hidden] {
  display: none;
}

.a11y-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 12px 16px;
  color: #fff;
  background: var(--ink);
}

.a11y-panel__header h2 {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.a11y-panel__close {
  width: 36px;
  height: 36px;
  padding: 0;
  color: #fff;
  border: 1px solid rgb(255 255 255 / 48%);
  border-radius: 4px;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
}

.a11y-panel__controls {
  display: grid;
  padding: 8px;
}

.a11y-option {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 50px;
  padding: 8px 10px;
  color: inherit;
  border: 0;
  border-bottom: 1px solid #e1e4df;
  background: transparent;
  text-align: right;
}

.a11y-option:hover,
.a11y-option[aria-pressed="true"] {
  background: #f1eee2;
}

.a11y-option__icon {
  display: grid;
  width: 30px;
  height: 30px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-weight: 700;
  place-items: center;
}

.a11y-option__state {
  color: var(--muted);
  font-size: 0.8rem;
}

.a11y-font-control {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 8px;
  align-items: center;
  padding: 14px 10px;
  border-bottom: 1px solid #e1e4df;
}

.a11y-font-control button {
  width: 44px;
  height: 40px;
  padding: 0;
  color: var(--ink);
  border: 1px solid #9da39b;
  border-radius: 4px;
  background: #fff;
  font-weight: 700;
}

.a11y-font-control output {
  text-align: center;
}

.a11y-reset {
  min-height: 44px;
  margin: 10px;
  color: #fff;
  border: 0;
  border-radius: 4px;
  background: var(--green-dark);
  font-weight: 700;
}

html.a11y-font-small {
  font-size: 87.5%;
}

html.a11y-font-large {
  font-size: 118.75%;
}

html.a11y-readable body,
html.a11y-readable button,
html.a11y-readable input,
html.a11y-readable select,
html.a11y-readable textarea {
  font-family: Arial, sans-serif !important;
}

html.a11y-reduce-motion,
html.a11y-reduce-motion * {
  scroll-behavior: auto !important;
  animation: none !important;
  transition: none !important;
}

html.a11y-keyboard *:focus {
  outline: 3px solid #ffd54f !important;
  outline-offset: 3px !important;
}

html.a11y-mark-headings :is(h1, h2, h3, h4, h5, h6) {
  color: #000 !important;
  outline: 2px solid #000 !important;
  background: #ffeb3b !important;
}

html.a11y-mark-links :is(a, button) {
  outline: 2px solid currentColor !important;
  outline-offset: 2px !important;
  text-decoration: underline !important;
}

html.a11y-contrast body,
html.a11y-contrast body
  :is(header, nav, main, section, article, aside, footer, div, form, fieldset) {
  color: #fff !important;
  border-color: #fff !important;
  background-color: #000 !important;
  background-image: none !important;
  box-shadow: none !important;
}

html.a11y-contrast body :is(a, button, input, select, textarea) {
  color: #fff !important;
  border-color: #fff !important;
  background: #000 !important;
}

html.a11y-contrast img {
  filter: grayscale(1) contrast(1.25);
}

html.a11y-contrast .a11y-option__state {
  color: #fff !important;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
}

.site-logo {
  display: block;
  width: 150px;
  height: 58px;
}

.site-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgb(0 0 0 / 18%));
}

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav__links a {
  color: var(--ink);
  text-decoration: none;
}

.site-nav__links button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 12px;
  color: #fff;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
}

.site-nav__links button span {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  color: var(--ink);
  border-radius: 50%;
  background: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
}

.site-nav__links #history-nav-button {
  color: var(--ink);
  border-color: var(--line);
  background: #fff;
}

.brand-hero {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  color: #fff;
  background: var(--ink) url("assets/jennyfer-kitchen.jpg") center 43% / cover no-repeat;
}

.brand-hero__shade {
  position: absolute;
  inset: 0;
  background: rgb(10 12 10 / 58%);
}

.brand-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(1180px, calc(100% - 40px));
  min-height: 250px;
  margin: 0 auto;
}

.brand-hero__content > p:first-child {
  color: #eadca8;
  font-weight: 700;
}

.brand-hero h1 {
  margin: 4px 0 10px;
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.brand-hero p {
  max-width: 620px;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(350px, 0.9fr);
  gap: 24px;
  align-items: start;
  width: min(1180px, calc(100% - 40px));
  margin: 28px auto 54px;
}

.dish-browser,
.order-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.dish-browser {
  padding: 24px;
}

.order-panel {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  padding: 24px;
  overflow: auto;
}

.section-heading,
.order-panel__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 700;
}

h2 {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.result-count,
.selected-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.88rem;
}

.dish-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 12px;
  margin-bottom: 22px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.search-field span[aria-hidden] {
  color: var(--muted);
  font-size: 1.35rem;
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.category-field {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 0.8rem;
}

.category-field select {
  min-width: 0;
  height: 36px;
  color: var(--ink);
  border: 0;
  outline: 0;
  background: #fff;
}

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

.dish-card {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.dish-card.is-selected {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}

.dish-card__categories {
  margin: 0 0 9px;
  color: var(--green);
  font-size: 0.76rem;
  font-weight: 700;
}

.dish-card h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.4;
  letter-spacing: 0;
}

.dish-card__description {
  display: -webkit-box;
  margin: 8px 0 15px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.dish-card__actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: auto;
}

.dish-card__actions > button {
  min-height: 38px;
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: 6px;
  background: transparent;
  font-weight: 700;
}

.dish-card.is-selected .dish-card__actions > button {
  color: #fff;
  background: var(--green);
}

.dish-card__quantity {
  min-width: 34px;
  color: var(--muted);
  text-align: center;
  font-size: 0.82rem;
}

.empty-state {
  padding: 34px 10px;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.order-lines {
  margin-bottom: 18px;
  border-block: 1px solid var(--line);
}

.order-placeholder {
  padding: 26px 8px;
  color: var(--muted);
  text-align: center;
}

.order-placeholder strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
}

.order-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.order-line:last-child {
  border-bottom: 0;
}

.order-line__name {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
}

.order-line__remove {
  padding: 0;
  margin-top: 4px;
  color: var(--red);
  border: 0;
  background: transparent;
  font-size: 0.74rem;
}

.quantity-control {
  display: grid;
  grid-template-columns: 30px 32px 30px;
  align-items: center;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.quantity-control button {
  height: 100%;
  padding: 0;
  color: var(--ink);
  border: 0;
  background: #f3f4f2;
  font-size: 1rem;
}

.quantity-control output {
  text-align: center;
  font-size: 0.84rem;
  font-weight: 700;
}

.order-form {
  display: grid;
  gap: 18px;
}

.order-form fieldset {
  display: grid;
  gap: 11px;
  padding: 0;
  margin: 0;
  border: 0;
}

.order-form legend {
  width: 100%;
  padding: 0 0 9px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  font-weight: 700;
}

.order-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.79rem;
}

.order-form input,
.order-form textarea {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.order-form input {
  min-height: 40px;
}

.order-form textarea {
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.order-note {
  padding: 10px 11px;
  margin: 0;
  color: #5d552f;
  border-inline-start: 3px solid var(--gold);
  background: var(--gold-soft);
  font-size: 0.79rem;
  line-height: 1.45;
}

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

.button {
  min-height: 42px;
  padding: 8px 11px;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 700;
}

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

.button--whatsapp {
  color: #fff;
  border: 1px solid var(--green);
  background: var(--green);
}

.button--secondary {
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
}

.button--danger {
  color: var(--red);
  border: 1px solid #dfbcb8;
  background: #fff;
}

.order-history-dialog {
  width: min(720px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--background);
  box-shadow: 0 24px 80px rgb(0 0 0 / 32%);
}

.order-history-dialog::backdrop {
  background: rgb(12 14 12 / 62%);
}

.order-history-dialog__header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.order-history-dialog__header button {
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-size: 1.6rem;
  line-height: 1;
}

.order-history-list {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.order-history-item {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.order-history-item > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.order-history-item > header strong,
.order-history-item > header span {
  display: block;
}

.order-history-item > header span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
}

.order-history-item .order-history-item__status {
  padding: 5px 8px;
  color: #5d552f;
  border: 1px solid #d7c77d;
  border-radius: 4px;
  background: var(--gold-soft);
  font-weight: 700;
  white-space: nowrap;
}

.order-history-item ul {
  display: grid;
  gap: 7px;
  padding: 12px 0;
  margin: 0;
  list-style: none;
}

.order-history-item li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.order-history-item p {
  margin: 5px 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.order-history-item > button {
  width: 100%;
  margin-top: 12px;
}

.order-history-empty,
.order-history-loading,
.order-history-error {
  padding: 46px 18px;
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.order-history-empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.order-history-error {
  color: var(--red);
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 130px;
  padding: 24px;
  color: #fff;
  background: var(--ink);
}

footer img {
  width: 110px;
  height: 54px;
  object-fit: contain;
}

footer p {
  margin: 3px 0;
  font-size: 0.78rem;
}

.status-message {
  position: fixed;
  bottom: 22px;
  left: 50%;
  z-index: 10;
  min-width: 220px;
  max-width: calc(100% - 32px);
  padding: 11px 16px;
  color: #fff;
  border-radius: 6px;
  background: var(--ink);
  box-shadow: var(--shadow);
  text-align: center;
  transform: translate(-50%, 120px);
  transition: transform 180ms ease;
}

.status-message.is-visible {
  transform: translate(-50%, 0);
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .order-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 620px) {
  .site-nav {
    width: calc(100% - 24px);
    min-height: 64px;
  }

  .site-logo {
    width: 116px;
    height: 48px;
  }

  .site-nav__links {
    gap: 7px;
  }

  .site-nav__links a {
    display: none;
  }

  .site-nav__links button {
    min-height: 38px;
    padding: 7px 9px;
    font-size: 0.82rem;
  }

  .brand-hero,
  .brand-hero__content {
    min-height: 210px;
  }

  .brand-hero__content {
    width: calc(100% - 28px);
  }

  .brand-hero h1 {
    font-size: 2.35rem;
  }

  .brand-hero p {
    font-size: 0.92rem;
  }

  .app-shell {
    width: calc(100% - 24px);
    margin-top: 14px;
  }

  .dish-browser,
  .order-panel {
    padding: 18px;
  }

  .dish-tools,
  .dish-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .dish-card {
    min-height: 190px;
  }

  .order-history-dialog {
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
  }

  .order-history-dialog__header,
  .order-history-list {
    padding: 14px;
  }

  .order-history-item {
    padding: 14px;
  }
}

@media print {
  .a11y-launcher,
  .a11y-panel,
  .order-history-dialog,
  .site-header,
  .dish-browser,
  .order-form,
  footer,
  .status-message {
    display: none !important;
  }

body {
    background: #fff;
  }

  .app-shell {
    display: block;
    width: 100%;
    margin: 0;
  }

  .order-panel {
    position: static;
    max-height: none;
    border: 0;
    box-shadow: none;
  }
}

@media (max-width: 680px) {
  .a11y-launcher {
    top: 104px;
    left: 12px;
  }

  .a11y-panel {
    top: 12px;
    left: 12px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }
}
