:root {
  color-scheme: light;
  --bg: #faf7f2;
  --bg-soft: #f4efe7;
  --card: #fffdf8;
  --card-tint: #f2f6ff;
  --ink: #111827;
  --muted: #667085;
  --line: #e6ded2;
  --primary: #b54834;
  --primary-dark: #7f2f22;
  --navy: #0b1f3a;
  --accent-blue: #dfe7ff;
  --accent-blue-soft: #f1f5ff;
  --danger: #b42318;
  --ok: #027a48;
  --cutoff-timer: #22c55e;
  --cutoff-timer-track: #bbf7d0;
  --accent-gold: #a38a5f;
  --brand: #dc2626;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans:
    "DM Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    Arial, sans-serif;
  --shadow: 0 24px 60px rgba(63, 38, 22, 0.1);
  --shadow-soft: 0 14px 34px rgba(63, 38, 22, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #eceae4;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  letter-spacing: -0.01em;
}

body:has(#appView:not(.hidden)) {
  background:
    radial-gradient(circle at top left, rgba(210, 74, 46, 0.1), transparent 28rem),
    linear-gradient(180deg, #fffaf2 0%, var(--bg) 42%, #f7f9ff 100%);
}

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

button {
  border: 0;
  border-radius: 0;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.15rem;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

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

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

button.danger {
  background: #fee4e2;
  color: var(--danger);
}

button.mark-payment-paid,
button.mark-payment-paid.current-summary-action {
  background: #027a48;
  border-color: #027a48;
  color: #fff;
}

button.mark-payment-paid:hover,
button.mark-payment-paid.current-summary-action:hover {
  background: #05603a;
  border-color: #05603a;
  color: #fff;
}

input,
textarea,
select {
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fffaf2;
  color: var(--ink);
  padding: 0.85rem 0.95rem;
  width: 100%;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(181, 72, 52, 0.12);
  outline: none;
}

label {
  color: #3f342a;
  display: grid;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

h1,
h2,
h3,
h4 {
  color: #0f172a;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

h1 {
  font-size: clamp(1.85rem, 3vw, 3rem);
  margin-bottom: 0.4rem;
}

h2 {
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
}

h3 {
  font-size: 1.4rem;
}

p {
  line-height: 1.55;
}

.shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 1rem 1.5rem 1.25rem;
}

#appView {
  display: flex;
  flex-direction: column;
}

#appView .topbar {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  gap: 0.1rem;
  margin-bottom: 0.9rem;
  order: 1;
  padding: 0;
  width: 100%;
}

.topbar-eyebrow {
  color: var(--accent-gold);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-mark {
  color: var(--brand);
  font-weight: 800;
}

.brand-heart {
  display: inline-block;
  font-size: 0.95em;
  margin-right: 0.15em;
}

.topbar-title-row {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  width: 100%;
}

.topbar-leading {
  flex: 1;
  min-width: 0;
}

.topbar-title-row h1,
.topbar-title-row h2 {
  margin: 0;
  min-width: 0;
}

#appView .user-panel {
  align-items: center;
  display: flex;
  flex-direction: row;
  flex-shrink: 0;
  flex-wrap: nowrap;
  gap: 0.75rem;
  text-align: right;
  width: max-content;
  max-width: 100%;
}

#appView .user-badge {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  justify-content: center;
  line-height: 1.2;
  min-width: 0;
  text-align: right;
}

#appView .topbar h1,
#appView .topbar h2 {
  font-size: clamp(1.85rem, 5vw, 2.45rem);
  font-weight: 600;
  line-height: 1;
  margin: 0;
}

#appView .user-badge-name {
  font-size: 0.88rem;
  font-weight: 700;
}

#appView .user-badge-limit {
  color: #6b6560;
  font-size: 0.74rem;
  font-weight: 500;
}

#appView .topbar button.secondary {
  align-self: center;
  background: #000;
  border-radius: 0;
  box-shadow: none;
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 0.55rem 0.8rem;
  text-transform: uppercase;
  width: auto;
}

#appView .topbar button.secondary:hover {
  background: #1a1a1a;
}

.topbar {
  margin-bottom: 0;
  padding: 0;
}

#message {
  order: 2;
}

#adminPanel {
  order: 3;
}

#lunchPanel {
  order: 4;
}

.panel {
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(230, 222, 210, 0.75);
  border-radius: 0;
  box-shadow: var(--shadow);
}

.developer-panel {
  display: grid;
  gap: 1.5rem;
  padding: 1.4rem 1.5rem 1.6rem;
}

.developer-header h3,
.developer-section-head h4,
.developer-restore h5 {
  margin: 0 0 0.35rem;
}

.developer-section {
  border-top: 1px solid rgba(230, 222, 210, 0.9);
  display: grid;
  gap: 0.85rem;
  padding-top: 1.15rem;
}

.developer-section-danger {
  border-top-color: rgba(140, 62, 43, 0.28);
}

.developer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.developer-inventory {
  display: grid;
  gap: 0.45rem;
}

.developer-inventory-row {
  align-items: center;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1fr) auto auto auto auto;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(230, 222, 210, 0.9);
  font-size: 0.95rem;
}

.developer-inventory-row:last-child {
  border-bottom: 0;
}

.developer-inventory-type {
  color: #6b6358;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.developer-inventory-row .secondary {
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
}

.developer-restore {
  border-top: 1px solid rgba(230, 222, 210, 0.9);
  padding-top: 1.1rem;
}

.warn-hint {
  color: #8c3e2b;
}

@media (max-width: 720px) {
  .developer-inventory-row {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .developer-inventory-type,
  .developer-inventory-size {
    grid-column: 1 / -1;
  }
}

.login-card {
  background: #f9f7f2;
  border: 1px solid rgba(221, 214, 203, 0.85);
  border-radius: 0;
  box-shadow: 0 18px 48px rgba(26, 42, 64, 0.08);
  display: grid;
  gap: 2.5rem 3rem;
  grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
  margin: 7vh auto 0;
  max-width: 920px;
  padding: 2.4rem 2.5rem;
}

.login-brand {
  display: grid;
  gap: 1.1rem;
  min-width: 0;
}

.login-eyebrow {
  color: #8c3e2b;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.login-title {
  color: #1a2a40;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.15rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
  max-width: 11ch;
}

.login-form {
  align-content: center;
  align-self: center;
  gap: 1.15rem;
  max-width: 22rem;
  width: 100%;
}

.login-form label {
  color: #1a2a40;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.login-card input {
  background: #fff;
  border: 1px solid #d8d2c8;
  border-radius: 0;
  color: #1a2a40;
  padding: 0.78rem 0.9rem;
}

.login-card input:focus {
  border-color: #8c3e2b;
  box-shadow: 0 0 0 3px rgba(140, 62, 43, 0.14);
}

.login-card button {
  background: #8c3e2b;
  border-radius: 0;
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 0.2rem;
  padding: 0.85rem 1rem;
  width: 100%;
}

.login-card button:hover {
  background: #733224;
}

.login-hero {
  background: linear-gradient(
    125deg,
    #fff4e8,
    #ffe8f0,
    #f2f6ff,
    #e8f5f0,
    #fff8e8,
    #fff4e8
  );
  background-size: 300% 300%;
  animation: pastelShift 14s ease-in-out infinite;
  border: 1px solid #ead8c2;
  border-radius: 0;
  margin: 0.35rem 0 0;
  overflow: hidden;
  padding: 0.85rem;
}

@keyframes pastelShift {
  0% {
    background-position: 0% 40%;
  }
  25% {
    background-position: 80% 20%;
  }
  50% {
    background-position: 100% 70%;
  }
  75% {
    background-position: 20% 90%;
  }
  100% {
    background-position: 0% 40%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-hero {
    animation: none;
    background-position: 40% 50%;
  }
}

.login-hero img {
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  border-radius: 0;
  width: 100%;
}

.login-hero figcaption {
  color: #8c3e2b;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 0.7rem;
}

.topbar button.secondary {
  background: #050505;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.14);
  color: #fff;
}

.topbar button.secondary:hover {
  background: #2a211d;
}

.user-panel {
  align-items: center;
  display: flex;
  gap: 1rem;
}

.user-badge {
  display: grid;
  gap: 0.15rem;
  justify-items: end;
  line-height: 1.25;
  text-align: right;
}

.user-badge-name {
  font-weight: 700;
}

.user-badge-limit {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.panel {
  margin-bottom: 1rem;
  padding: 1rem 1.2rem;
}

#lunchPanel.panel {
  margin-bottom: 0.75rem;
  padding: 0.95rem 1.15rem 1.15rem;
}

.section-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.day-tabs {
  display: grid;
  column-gap: 1rem;
  row-gap: 0.45rem;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  margin-bottom: 0.7rem;
}

.day-tab {
  background: transparent;
  border: 0;
  border-radius: 0;
  border-top: 3px solid transparent;
  box-shadow: none;
  color: #000;
  display: grid;
  gap: 0.12rem;
  grid-template-columns: 1fr;
  justify-items: start;
  min-height: 0;
  overflow: visible;
  padding: 0.5rem 0.55rem 0.55rem;
  position: relative;
  text-align: left;
  text-transform: none;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.day-tab:hover:not(.active) {
  background: transparent;
  border-top-color: transparent;
  transform: none;
}

.day-tab.active {
  background: #ebe6db;
  border-top-color: #a38a5f;
  box-shadow: none;
  color: #000;
  transform: none;
}

.day-tab-weekday,
.day-tab-day,
.day-tab-month {
  min-width: 0;
  width: 100%;
}

.day-tab:has(.day-tab-trailing) .day-tab-weekday,
.day-tab:has(.day-tab-trailing) .day-tab-day {
  padding-right: 1.55rem;
}

.day-tab-trailing {
  align-items: center;
  display: grid;
  gap: 0.18rem;
  justify-items: center;
  pointer-events: none;
  position: absolute;
  right: 0.45rem;
  top: 0.55rem;
}

.day-tab-badge {
  align-items: center;
  display: grid;
  height: 1.35rem;
  justify-items: center;
  opacity: 0;
  position: static;
  width: 1.35rem;
}

.day-tab-badge svg {
  display: block;
  height: 1.35rem;
  width: 1.35rem;
}

.day-tab.active .day-tab-badge {
  opacity: 1;
}

.day-cutoff-pie {
  align-items: center;
  display: inline-flex;
  height: 1.15rem;
  justify-content: center;
  position: static;
  width: 1.15rem;
}

.day-cutoff-pie svg {
  display: block;
  height: 100%;
  overflow: visible;
  width: 100%;
}

.day-cutoff-track {
  fill: none;
  stroke: var(--cutoff-timer-track);
  stroke-width: 2.4;
}

.day-cutoff-progress {
  fill: none;
  stroke: var(--cutoff-timer);
  stroke-linecap: butt;
  stroke-width: 2.6;
  transition: stroke-dasharray 200ms ease;
}

.day-cutoff-hub {
  fill: var(--cutoff-timer);
}

.day-cutoff-pie.is-closed .day-cutoff-track {
  stroke: #d5d0c8;
}

.day-cutoff-pie.is-closed .day-cutoff-progress {
  stroke: #b4aea5;
}

.day-cutoff-pie.is-closed .day-cutoff-hub {
  fill: #b4aea5;
}

.day-cutoff-tooltip {
  background: #1a1a1a;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  opacity: 0;
  padding: 0.35rem 0.45rem;
  pointer-events: none;
  position: absolute;
  left: 50%;
  text-transform: uppercase;
  top: calc(100% + 0.35rem);
  transform: translateX(-50%);
  transition: opacity 140ms ease;
  white-space: nowrap;
  z-index: 5;
}

.day-tab:hover .day-cutoff-tooltip,
.day-tab:focus-visible .day-cutoff-tooltip {
  opacity: 1;
}

.day-tab-weekday {
  align-items: center;
  color: #6b6560;
  display: inline-flex;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 700;
  gap: 0.25rem;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.day-tab.active .day-tab-weekday {
  color: #000;
}

.day-tab-day {
  color: #000;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.day-tab-month {
  color: #6b6560;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-tab.active .day-tab-month {
  color: #000;
}

.day-tab small {
  color: #6b6560;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.2;
}

.day-tab.active small {
  color: #000;
}

.day-tab.weekend .day-tab-weekday,
.day-tab.weekend .day-tab-month {
  color: var(--primary-dark);
  font-weight: 800;
}

.day-tab.weekend .day-tab-day {
  color: var(--primary);
}

.day-tab.active.weekend .day-tab-weekday,
.day-tab.active.weekend .day-tab-month {
  color: var(--primary-dark);
}

.day-tab.active.weekend .day-tab-day {
  color: var(--primary);
}

.day-tab-holiday-tag {
  align-items: center;
  background: #f0e4b8;
  border: 1px solid #d4c07a;
  box-sizing: border-box;
  color: #5c4d1f;
  display: flex;
  font-size: 0.68rem;
  font-weight: 600;
  gap: 0.2rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-top: 0.35rem;
  min-width: 0;
  padding: 0.14rem 0.4rem;
  text-transform: uppercase;
  white-space: nowrap;
  width: 100%;
}

.day-tab-holiday-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-tab-holiday-icon {
  flex: 0 0 auto;
  font-size: 0.85rem;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
}

.holiday-settings {
  border-top: 1px solid #e4ddd0;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
}

.holiday-form {
  align-items: end;
  display: grid;
  gap: 0.75rem;
  grid-template-columns:
    minmax(9rem, 11rem)
    minmax(11rem, 14rem)
    minmax(10rem, 1fr)
    minmax(6.5rem, 7.5rem)
    auto;
}

.holiday-form label {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.holiday-no-ordering-field {
  white-space: nowrap;
}

.holiday-no-ordering-control {
  align-items: center;
  display: flex;
  height: 2.35rem;
}

.holiday-no-ordering-control input {
  margin: 0;
  width: auto;
}

.holiday-row-no-ordering {
  background: #f4efe7;
  border: 1px solid #e0d6c8;
  border-radius: 999px;
  color: #7a4b2f;
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-left: 0.45rem;
  padding: 0.12rem 0.45rem;
  text-transform: uppercase;
  vertical-align: middle;
}

.holiday-form select,
.holiday-form input[type="date"],
.holiday-form input[type="text"] {
  width: 100%;
}

.holiday-list {
  display: grid;
  gap: 0.65rem;
}

.holiday-row {
  align-items: center;
  background: #fbf8f1;
  border: 1px solid #e8e0d2;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.7rem 0.85rem;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.holiday-row.is-duplicate {
  background: #fee4e2;
  border-color: #f2b8b5;
  box-shadow: 0 0 0 2px rgba(217, 45, 32, 0.15);
}

.holiday-form-message {
  margin: 0.25rem 0 0;
}

.holiday-row > div {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
}

.holiday-row-actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.45rem;
}

.holiday-row.is-editing {
  align-items: end;
  background: #f7f3ea;
  border-color: #d4c07a;
}

.holiday-edit-fields {
  align-items: end;
  display: grid;
  flex: 1;
  gap: 0.65rem;
  grid-template-columns:
    minmax(8rem, auto)
    minmax(10rem, 12rem)
    minmax(8rem, 1fr)
    minmax(6.5rem, 7.5rem);
  min-width: 0;
}

.holiday-edit-fields label {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.holiday-edit-fields select,
.holiday-edit-fields input[type="text"] {
  width: 100%;
}

.holiday-edit-date {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  padding-bottom: 0.45rem;
}

.holiday-row-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.holiday-row-label {
  font-size: 0.9rem;
}

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

  .holiday-form button[type="submit"] {
    grid-column: 1 / -1;
  }

  .holiday-edit-fields {
    grid-template-columns: 1fr 1fr;
  }

  .holiday-edit-date {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .holiday-form {
    grid-template-columns: 1fr;
  }

  .holiday-edit-fields {
    grid-template-columns: 1fr;
  }

  .holiday-row,
  .holiday-row.is-editing {
    align-items: stretch;
    flex-direction: column;
  }

  .holiday-row-actions {
    justify-content: flex-end;
  }
}

.day-summary-toast {
  align-items: center;
  background: #fff4e8;
  border: 1px solid #ead8c2;
  border-radius: 0;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  justify-content: space-between;
  margin: 0.15rem 0 0.85rem;
  padding: 0.7rem 0.85rem;
}

.vendor-copy-notice {
  background: #fff1f0;
  border: 1px solid #f0c4c0;
  border-radius: 0;
  color: #7f1d1d;
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 0.35rem 0 0.85rem;
  padding: 0.75rem 0.9rem;
}

.vendor-copy-notice strong {
  color: #991b1b;
}

.link-button {
  background: transparent;
  color: var(--primary-dark);
  padding: 0;
  text-decoration: underline;
}

.link-button:hover {
  background: transparent;
  color: var(--primary);
}

.stack {
  display: grid;
  gap: 1rem;
}

.menu-grid {
  display: grid;
  column-gap: 1.75rem;
  row-gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.menu-card {
  background: #fff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.menu-image-frame {
  position: relative;
}

.menu-card img {
  aspect-ratio: 4 / 3;
  background: #ebe6db;
  display: block;
  object-fit: cover;
  width: 100%;
}

.menu-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem 0 0.55rem;
}

.menu-card h3,
.menu-item-title {
  color: #000;
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.2vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0;
}

.free-badge {
  align-self: start;
  background: #f0f7f4;
  border: 1px solid #2d5a47;
  border-radius: 0;
  color: #2d5a47;
  display: inline-flex;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.45rem;
  text-transform: uppercase;
  width: fit-content;
}

.menu-item-description {
  color: #4a4a4a;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.55;
  margin: 0;
}

.menu-note-field {
  align-items: center;
  color: #6b6560;
  display: flex;
  font-size: 0.7rem;
  font-weight: 700;
  gap: 0.55rem;
  letter-spacing: 0.06em;
  margin-top: 0.15rem;
  text-transform: uppercase;
}

.menu-note-field > span {
  flex: 0 0 auto;
}

.menu-card .item-note {
  background: #fff;
  border: 1px solid #d8d2c8;
  border-radius: 0;
  color: #1a2a40;
  flex: 1 1 auto;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0;
  min-height: 2.1rem;
  min-width: 0;
  padding: 0.4rem 0.6rem;
  resize: vertical;
  text-transform: none;
}

.price-line {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.price-line strong {
  color: #000;
  font-family: var(--font-sans);
  font-size: 0.95rem;
}

.menu-card-footer {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 0.35rem;
  padding-bottom: 0.15rem;
}

.menu-actions {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.menu-select-btn {
  background: #faf1ee;
  border: 1px solid #edd9d2;
  border-radius: 0;
  box-shadow: none;
  color: var(--primary);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.45rem 0.85rem;
  text-transform: uppercase;
  width: auto;
}

.menu-select-btn:hover:not(:disabled) {
  background: #f4e4df;
  border-color: #e0c4bb;
  color: var(--primary-dark);
  transform: none;
}

.menu-closed-label {
  color: #6b6560;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.payment-date-status {
  align-items: center;
  border-radius: 0;
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 700;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem 0.3rem 0.3rem;
}

.payment-date-status.pending {
  background: #f8e7e3;
  color: #b42318;
}

.payment-date-status.paid {
  background: #ecfdf3;
  color: #027a48;
}

.payment-date-icon {
  align-items: center;
  border-radius: 0;
  color: #fff;
  display: inline-flex;
  font-size: 0.7rem;
  font-weight: 800;
  height: 1.25rem;
  justify-content: center;
  line-height: 1;
  outline: 2px solid #fff;
  width: 1.25rem;
}

.payment-date-icon.pending {
  background: #d92d20;
}

.payment-date-icon.paid {
  background: #039855;
}

.payment-day-panel {
  align-items: center;
  background: #fff4e8;
  border: 1px solid #ead8c2;
  border-radius: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.85rem 1rem;
}

.payment-day-panel p {
  margin-bottom: 0;
}

.payment-status-card {
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 0;
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
}

.item-rating,
.rating-control {
  align-items: center;
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  max-width: 100%;
  padding: 0.55rem 0.75rem;
  width: fit-content;
}

.rating-control {
  background: transparent;
}

.rating-control-inline {
  background: #fffaf2;
  border: 1px solid var(--line);
  gap: 0.3rem;
  padding: 0.2rem 0.45rem;
}

.rating-control-inline > span {
  font-size: 0.68rem;
}

.rating-control-inline .rating-star {
  font-size: 1.05rem;
  padding: 0.05rem;
}

.rating-control-inline small {
  font-size: 0.72rem;
}

.item-rating {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 0;
  bottom: auto;
  color: #000;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0;
  padding: 0.32rem 0.65rem;
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  text-shadow: none;
}

.item-rating small {
  color: #111827;
  font-weight: 700;
}

.rating-control > span {
  color: #5f5146;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rating-stars {
  display: inline-flex;
  gap: 0.15rem;
}

.rating-star {
  background: transparent;
  color: #c8b8a8;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.15rem;
}

.rating-star.active {
  color: #d97706;
}

.rating-star:hover {
  background: transparent;
  color: #b45309;
  transform: none;
}

.rating-control small {
  color: var(--muted);
  font-weight: 700;
}

.payment-tracking {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.payment-group {
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 0;
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
}

.payment-row {
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.75rem;
}

.payment-row.cancelled {
  background: #f2f4f7;
  color: #475467;
}

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

.admin-tabs,
.lunch-tabs {
  align-items: stretch;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.lunch-tabs {
  border-bottom: 1px solid var(--line);
  gap: 0;
  margin-bottom: 0.55rem;
  padding-bottom: 0;
}

.admin-tab,
.lunch-tab {
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
}

.lunch-tab {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  flex: 1 1 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  min-width: 8rem;
  padding: 0.55rem 1.15rem;
}

.admin-tab:hover,
.admin-tab.active,
.lunch-tab:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.lunch-tab:hover {
  background: rgba(11, 31, 58, 0.06);
  border-bottom-color: transparent;
  color: var(--navy);
  transform: none;
}

.lunch-tab.active {
  background: transparent;
  border-bottom-color: var(--primary);
  color: var(--primary-dark);
  transform: none;
}

.lunch-tab.active:hover {
  background: rgba(181, 72, 52, 0.06);
  border-bottom-color: var(--primary);
  color: var(--primary-dark);
}

.orders-subtabs {
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 1.1rem;
  width: fit-content;
  max-width: 100%;
}

.orders-subtab {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  box-shadow: none;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.55rem 0.95rem;
  width: auto;
}

.orders-subtab:hover {
  background: rgba(11, 31, 58, 0.06);
  border-bottom-color: transparent;
  color: var(--navy);
  transform: none;
}

.orders-subtab.active {
  background: transparent;
  border-bottom-color: var(--primary);
  color: var(--primary-dark);
  transform: none;
}

.orders-subtab.active:hover {
  background: rgba(181, 72, 52, 0.06);
  border-bottom-color: var(--primary);
  color: var(--primary-dark);
}

.admin-subtabs {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: 0 0 1.1rem;
}

.admin-subtab {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  box-shadow: none;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.55rem 1rem;
}

.admin-subtab:hover {
  background: rgba(181, 72, 52, 0.08);
  color: var(--primary-dark);
}

.admin-subtab.active {
  background: transparent;
  border-bottom-color: var(--primary);
  color: var(--primary-dark);
}

.settings-heading {
  margin-bottom: 0.85rem;
}

.current-assignment-heading {
  margin-top: 1.5rem;
}

.settings-heading h3,
.settings-heading p {
  margin: 0;
}

.create-menu-toolbar {
  align-items: end;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(12rem, 1fr) auto;
}

.create-menu-list-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 1rem;
}

.app-dialog.create-menu-item-dialog {
  max-width: min(44rem, calc(100vw - 2rem));
  overflow: hidden;
  padding: 0;
  width: min(44rem, calc(100vw - 2rem));
}

.app-dialog.create-menu-item-dialog .app-dialog-titlebar {
  padding-left: 3rem;
  padding-right: 2.75rem;
}

.app-dialog.create-menu-item-dialog .create-menu-item-form {
  max-height: min(78vh, 48rem);
  overflow: auto;
  padding: 1.5rem 3rem 1.75rem;
}

.app-dialog.create-menu-copy-dialog {
  max-width: min(48rem, calc(100vw - 2rem));
  overflow: hidden;
  padding: 0;
  width: min(48rem, calc(100vw - 2rem));
}

.app-dialog.create-menu-copy-dialog .create-menu-copy-form {
  padding: 1.75rem 3rem 2rem;
}

.app-dialog.create-menu-copy-dialog .create-menu-copy-form h3 {
  margin: 0;
}

.app-dialog.create-menu-copy-dialog .create-menu-day-toggles {
  gap: 0.55rem;
}

.app-dialog-titlebar {
  align-items: center;
  background: #ebe6db;
  border-bottom: 1px solid #d8d0c2;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.85rem 1rem 0.85rem 1.25rem;
}

.app-dialog-titlebar h3 {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  min-width: 0;
}

.app-dialog-close {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  color: #5f5146;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 1.45rem;
  font-weight: 500;
  height: 2.1rem;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 2.1rem;
}

.app-dialog-close:hover {
  background: rgba(63, 38, 22, 0.08);
  border-color: #d8d0c2;
  color: var(--ink);
  transform: none;
}

.create-menu-item-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.create-menu-item-card {
  align-items: center;
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 0;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  padding: 0.75rem;
}

.create-menu-item-card.no-image {
  grid-template-columns: minmax(0, 1fr) auto;
}

.create-menu-item-card.draft {
  border-style: dashed;
}

.create-menu-item-card img,
.create-menu-image-preview img {
  background: #f3ebe0;
  border-radius: 0;
  display: block;
  height: 4.5rem;
  object-fit: cover;
  width: 4.5rem;
}

.create-menu-item-card .item-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.create-menu-item-card strong {
  color: var(--navy);
}

.create-menu-item-card small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.create-menu-item-actions {
  align-content: start;
  display: grid;
  gap: 0.3rem;
}

.create-menu-item-actions button {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  min-width: 5.5rem;
  padding: 0.55rem 0.85rem;
}

.create-menu-image-preview {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  min-height: 4.5rem;
}

.create-menu-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.create-menu-hint {
  font-size: 0.9rem;
  margin: 0;
}

.create-menu-copy-day-header {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}

.create-menu-copy-day-header span {
  font-weight: 700;
}

.create-menu-copy-day-header .secondary {
  padding: 0.35rem 0.7rem;
}

.create-menu-day-toggles {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.create-menu-day-toggle {
  background: #f3ebe0;
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  min-height: 2.6rem;
  padding: 0.45rem 0.2rem;
}

.create-menu-day-toggle:hover:not(:disabled) {
  background: rgba(181, 72, 52, 0.08);
}

.create-menu-day-toggle.active {
  background: var(--primary);
  border-color: var(--primary-dark);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.18);
  color: #fff;
  transform: translateY(1px);
}

.create-menu-day-toggle.weekend:not(.active) {
  color: var(--primary);
  font-weight: 800;
}

.create-menu-day-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.create-menu-item-form textarea {
  resize: vertical;
}

input.readonly-field,
input[readonly].readonly-field {
  background: #f3ebe0;
  color: #5f5146;
  cursor: default;
}

.app-dialog {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: var(--shadow-soft);
  max-width: min(28rem, calc(100vw - 2rem));
  padding: 0;
  width: 100%;
}

.app-dialog::backdrop {
  background: rgba(42, 31, 24, 0.45);
}

.app-dialog-form {
  padding: 1.25rem;
}

.app-dialog-form h3,
.app-dialog-form p {
  margin: 0;
}

.app-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.confirm-order-details {
  display: grid;
  gap: 0.65rem;
}

.confirm-order-details > div {
  display: grid;
  gap: 0.15rem;
}

.confirm-order-details span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.confirm-order-details strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

[data-settings-subtab-section] h4 {
  margin: 0 0 0.75rem;
}

.admin-card {
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 0;
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.span-2 {
  grid-column: 1 / -1;
}

.rating-summary-list {
  display: grid;
  gap: 1rem;
}

.rating-summary-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.rating-summary-header {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.rating-summary-header h4,
.rating-summary-header p {
  margin: 0;
}

.rating-verdict {
  border-radius: 0;
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.45rem 0.8rem;
  white-space: nowrap;
}

.rating-verdict.excellent,
.rating-verdict.good {
  background: #ecfdf3;
  color: var(--ok);
}

.rating-verdict.mixed {
  background: #fff4e8;
  color: #b54708;
}

.rating-verdict.needs-review {
  background: #f8e7e3;
  color: var(--danger);
}

.rating-verdict.no-ratings-yet {
  background: #f4efe7;
  color: #5f5146;
}

.rating-summary-stats {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rating-summary-stats div {
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 0;
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
}

.rating-summary-stats span {
  color: #5f5146;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rating-summary-stats strong {
  color: var(--navy);
  font-size: 1.45rem;
  line-height: 1;
}

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

.rating-item-grid h5 {
  color: #5f5146;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  margin: 0 0 0.6rem;
  text-transform: uppercase;
}

.rating-item-row {
  align-items: center;
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 0;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.75rem;
}

.rating-item-row div {
  display: grid;
  gap: 0.15rem;
}

.rating-item-row small {
  color: var(--muted);
}

.rating-item-row span {
  color: var(--primary-dark);
  font-weight: 800;
  white-space: nowrap;
}

.order-list {
  display: grid;
  gap: 1.15rem;
}

.current-order-detail-section {
  display: grid;
  gap: 1.25rem;
}

.current-summary-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 1rem;
  padding: 1.35rem 1.6rem;
}

.current-summary-top {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding-bottom: 1rem;
}

.current-summary-top h4,
.current-summary-top p {
  margin: 0;
}

.current-summary-top h4 {
  font-family: var(--font-sans);
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.current-summary-top p {
  color: #4b5563;
  font-size: 1rem;
}

.current-summary-badge,
.current-order-verify {
  align-items: center;
  border-radius: 0;
  display: inline-flex;
  font-weight: 800;
  gap: 0.4rem;
  justify-content: center;
  white-space: nowrap;
}

.current-summary-badge {
  padding: 0.65rem 1rem;
}

.current-summary-inline-badge {
  justify-self: start;
  padding: 0.45rem 0.8rem;
}

.current-summary-badge.paid,
.current-order-verify.paid {
  background: #ecfdf3;
  color: #027a48;
}

.current-summary-badge.pending,
.current-order-verify.pending {
  background: #f8e7e3;
  color: var(--danger);
}

.current-summary-badge.neutral,
.current-order-verify.neutral {
  background: #f4efe7;
  color: #5f5146;
}

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

.current-summary-stats div {
  display: grid;
  gap: 0.25rem;
}

.current-summary-stats span,
.current-order-footer span {
  color: #5f5146;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.current-summary-stats strong,
.current-order-footer strong {
  color: #9a3f25;
  font-size: 1.85rem;
  line-height: 1;
}

.current-summary-stats div:first-child strong {
  color: #111827;
}

.current-summary-action {
  background: #dff8e8;
  border: 1px solid #abefc6;
  color: #027a48;
  justify-self: stretch;
  width: 100%;
}

.current-summary-action:hover {
  background: #c7f0d8;
  color: #02633b;
}

.current-order-detail-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.current-order-detail-heading h3 {
  font-family: var(--font-sans);
  font-size: 1.6rem;
  letter-spacing: -0.04em;
  margin: 0;
}

.current-order-detail-heading span {
  color: #5f5146;
  font-size: 1.35rem;
}

.current-order-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: var(--shadow-soft);
  display: grid;
  overflow: hidden;
}

.current-order-main {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 100px minmax(0, 1fr);
  padding: 1.15rem 1.25rem;
}

.current-order-main img,
.current-order-image-placeholder {
  aspect-ratio: 1;
  border-radius: 0;
  height: 100px;
  object-fit: cover;
  width: 100px;
}

.current-order-image-placeholder {
  align-items: center;
  background: #f4efe7;
  display: flex;
  font-size: 2rem;
  justify-content: center;
}

.current-order-content {
  display: grid;
  gap: 0.35rem;
}

.current-order-content p,
.current-order-content h4 {
  margin: 0;
}

.current-order-content small {
  color: var(--muted);
}

.current-order-heading {
  align-items: start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.current-order-heading .order-title-leading {
  align-items: center;
}

.current-order-heading h4 {
  font-family: var(--font-sans);
  font-size: 1.45rem;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.current-order-footer {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 1.25rem 1.25rem;
  padding: 0.75rem 1rem;
}

.current-order-footer div {
  display: grid;
  gap: 0.2rem;
}

.current-order-verify {
  padding: 0.65rem 1rem;
}

.current-order-cancel {
  justify-self: stretch;
  margin: 0 1.25rem 1.25rem;
  width: auto;
}

.current-order-footer + .current-order-cancel {
  margin-top: 0;
}

.current-order-footer:has(+ .current-order-cancel) {
  margin-bottom: 0.75rem;
}

.history-list {
  display: grid;
  gap: 1rem;
}

.history-group {
  background: #fffaf2;
  border: 1px solid #ead8c2;
  border-left: 5px solid var(--primary);
  border-radius: 0;
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.history-group.attention {
  box-shadow: 0 0 0 4px rgba(181, 72, 52, 0.16);
}

.history-group > .order-title {
  border-bottom: 1px solid #ead8c2;
  padding-bottom: 0.75rem;
}

.history-group h4 {
  margin: 0;
}

.order-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 10px 24px rgba(63, 38, 22, 0.06);
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem 1rem;
}

.order-card-cancelled {
  background: #f1eee8;
  border-color: #ded4c8;
  color: #5b5148;
}

.cancelled-orders-collapse {
  background: #f1eee8;
  border: 1px solid #ded4c8;
  border-radius: 0;
  display: grid;
  gap: 0.75rem;
  padding: 0.75rem;
}

.cancelled-orders-collapse summary {
  color: #475467;
  cursor: pointer;
  font-weight: 700;
}

.order-card-details {
  display: grid;
  gap: 0.12rem;
}

.order-card-meta,
.order-card-notes {
  margin: 0;
}

.order-title {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.order-title-leading {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  min-width: 0;
}

.order-title-rating:empty {
  display: none;
}

.order-group-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.icon-text {
  align-items: center;
  display: inline-flex;
  gap: 0.45rem;
}

.inline-icon {
  align-items: center;
  background: var(--accent-blue-soft);
  border: 1px solid #dce5fb;
  border-radius: 0;
  color: #334155;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.9rem;
  height: 1.75rem;
  justify-content: center;
  line-height: 1;
  width: 1.75rem;
}

.calendar-icon {
  background: #fff4e8;
  border-color: #ead8c2;
  color: var(--primary-dark);
}

.food-icon {
  background: none;
  border: none;
  border-radius: 0;
  font-size: 1.45rem;
  height: auto;
  width: auto;
}

.status {
  background: var(--accent-blue-soft);
  border-radius: 0;
  color: #334155;
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
}

.order-count-badge {
  font-size: 1rem;
  padding: 0.45rem 0.9rem;
}

.assignment-list {
  display: grid;
  gap: 0.5rem;
}

.folder-form-preview {
  grid-column: 1 / -1;
  margin: -0.15rem 0 0;
}

.assignment-card {
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 0;
  display: grid;
  gap: 0.75rem;
  padding: 0.75rem;
}

.assignment-card.editable {
  align-items: stretch;
  grid-template-columns: 1fr;
}

.assignment-fields {
  align-items: end;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.assignment-card.readonly {
  opacity: 0.75;
}

.assignment-card-actions {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.assignment-card-actions > small {
  flex: 1 1 auto;
  min-width: 0;
}

.assignment-card-buttons {
  display: flex;
  flex-shrink: 0;
  gap: 0.5rem;
  margin-left: auto;
}

.assignment-card small {
  color: var(--muted);
}

.summary-pre {
  background: #101828;
  border-radius: 0;
  color: #e4e7ec;
  margin: 0;
  min-height: 180px;
  overflow-x: auto;
  padding: 1rem;
  white-space: pre-wrap;
}

.summary-copy-grid {
  display: grid;
  gap: 1rem;
}

.summary-copy-card {
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 0;
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.summary-copy-card .order-title h4 {
  margin: 0;
}

.summary-hide-prices {
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
}

.summary-copy-card .summary-pre {
  min-height: 120px;
}

.copy-summary {
  padding: 0.5rem 0.75rem;
}

.vendor-day-tabs {
  margin-top: 1rem;
}

.employee-settings {
  overflow-x: auto;
}

.employee-user-count {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 0.65rem;
}

.user-import-export {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.75rem;
  margin: 0.85rem 0 1rem;
}

.add-user-form {
  align-items: stretch;
  display: grid;
  gap: 0.65rem 0.75rem;
  grid-template-columns:
    minmax(7.5rem, 1.35fr)
    minmax(7rem, 1.2fr)
    minmax(7rem, 1.2fr)
    minmax(8.5rem, 1fr)
    minmax(6.75rem, 0.7fr)
    minmax(4.5rem, 0.55fr)
    auto;
  margin: 0.85rem 0 0.35rem;
  width: 100%;
}

.add-user-field,
.add-user-submit {
  display: grid;
  gap: 0.3rem;
  grid-template-rows: 1.15rem 2.15rem;
  min-width: 0;
}

.add-user-role {
  min-width: 8.5rem;
}

.add-user-field {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.15rem;
  white-space: nowrap;
}

.add-user-name,
.add-user-username,
.add-user-password,
.add-user-role,
.add-user-special,
.add-user-limit,
.add-user-submit {
  flex: unset;
  max-width: none;
}

.add-user-form input,
.add-user-form select {
  box-sizing: border-box;
  font-weight: 500;
  height: 2.15rem;
  line-height: normal;
  min-width: 0;
  padding-block: 0;
  padding-inline: 0.55rem;
  width: 100%;
}

.add-user-form select {
  padding-inline-end: 1.35rem;
}

.add-user-form .add-user-role select {
  min-width: 0;
}

.add-user-control {
  align-items: center;
  display: flex;
  height: 2.15rem;
}

.add-user-form .add-user-special input {
  margin: 0;
  width: auto;
}

.add-user-limit-input {
  appearance: textfield;
  max-width: 3.75rem;
  padding-inline: 0.2rem;
  text-align: center;
  width: 3.75rem;
}

.add-user-limit-input::-webkit-outer-spin-button,
.add-user-limit-input::-webkit-inner-spin-button {
  margin: 0;
  opacity: 1;
}

.add-user-submit-label {
  display: block;
  line-height: 1.15rem;
}

.add-user-form button {
  height: 2.15rem;
  padding: 0 0.95rem;
  white-space: nowrap;
}

.user-import-export .hint {
  flex: 1 1 100%;
  margin: 0;
}

.employee-table {
  border-collapse: collapse;
  min-width: 900px;
  width: 100%;
}

.employee-table th,
.employee-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.75rem;
  text-align: left;
  vertical-align: middle;
}

.employee-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.employee-row-actions .danger {
  background: #fff;
  border: 1px solid rgba(180, 55, 45, 0.45);
  color: #9f2d22;
}

.employee-row-actions .danger:hover {
  background: #fee4e2;
}

.employee-table th {
  background: #f4efe7;
  color: #5f5146;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.employee-table input,
.employee-table select {
  box-sizing: border-box;
  min-width: 110px;
  padding: 0.55rem;
}

.employee-table select[name="role"] {
  height: 2.15rem;
  line-height: normal;
  min-width: 5.75rem;
  padding-block: 0;
  padding-inline: 0.45rem 1.35rem;
  width: 5.75rem;
}

.employee-table .daily-order-limit-input {
  min-width: 0;
  width: 4.75rem;
}

.employee-table input[type="checkbox"] {
  min-width: 0;
  width: auto;
}

.employee-table button {
  padding: 0.55rem 0.8rem;
}

.password-cell {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
  max-width: 180px;
}

.password-cell .password-value {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  min-width: 0;
  padding: 0.45rem 0.6rem;
  width: 110px;
}

.password-toggle {
  align-items: center;
  background: #fffaf2;
  border: 1px solid var(--line);
  border-radius: 0;
  color: #5f5146;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
  min-width: 0;
  padding: 0.4rem;
}

.password-toggle:hover,
.password-toggle.is-visible {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.password-toggle-icon {
  display: inline-flex;
}

.checkbox-label {
  align-items: center;
  display: flex;
  gap: 0.5rem;
}

.checkbox-label input {
  width: auto;
}

.message {
  border-radius: 0;
  margin-bottom: 1rem;
  padding: 1rem;
}

.message.error {
  background: #fee4e2;
  color: var(--danger);
}

.message.success {
  background: #dcfae6;
  color: var(--ok);
}

.toast-container {
  bottom: 1.5rem;
  display: grid;
  gap: 0.75rem;
  max-width: min(360px, calc(100vw - 2rem));
  position: fixed;
  right: 1.5rem;
  z-index: 20;
}

.toast {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-left: 5px solid var(--ok);
  border-radius: 0;
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  display: grid;
  gap: 0.55rem;
  font-weight: 700;
  opacity: 0;
  padding: 1rem 1.1rem;
  transform: translateY(0.75rem);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.error {
  background: #fff5f4;
  border-left-color: var(--danger);
}

.toast.success {
  background: #f0fdf6;
  border-left-color: var(--ok);
}

.toast-message {
  line-height: 1.35;
}

.toast-action {
  align-self: start;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--primary-dark);
  border-radius: 0;
  box-shadow: none;
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.1rem 0;
  text-transform: uppercase;
  width: fit-content;
}

.toast-action:hover {
  background: transparent;
  border-bottom-color: var(--primary);
  color: var(--primary);
  transform: none;
}

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

.eyebrow {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.hint {
  font-size: 0.85rem;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

#loginMessage {
  margin-bottom: 0;
  min-height: 3rem;
}

#loginMessage.hidden {
  display: block !important;
  visibility: hidden;
}

.usage-header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.usage-header h3,
.usage-header p {
  margin: 0;
}

.usage-dashboard {
  display: grid;
  gap: 1.25rem;
}

.usage-summary {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.usage-stat {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 1rem 1.1rem;
}

.usage-stat span {
  color: #6b7280;
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
}

.usage-stat strong {
  display: block;
  font-size: 1.8rem;
  letter-spacing: -0.04em;
  margin-top: 0.25rem;
}

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

.usage-panel {
  border: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
}

.usage-panel h4 {
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  margin: 0;
  padding: 0.85rem 1rem;
}

.usage-table {
  border-collapse: collapse;
  width: 100%;
}

.usage-table th,
.usage-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 1rem;
  text-align: left;
}

.usage-table th {
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.usage-table td:last-child,
.usage-table th:last-child {
  text-align: right;
  white-space: nowrap;
}

.usage-table tr:last-child td {
  border-bottom: 0;
}

.insights-dashboard {
  display: grid;
  gap: 1rem;
}

.insight-range {
  margin: 0;
}

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

.insight-card {
  border: 1px solid var(--line);
  border-radius: 0;
  display: grid;
  gap: 1rem;
  padding: 1rem 1.1rem 1.15rem;
}

.insight-card.span-2 {
  grid-column: 1 / -1;
}

.insight-card h4,
.insight-card h5,
.insight-subsection h5 {
  margin: 0;
}

.insight-card h4 {
  font-size: 1.05rem;
}

.insight-card h5,
.insight-subsection h5 {
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.insight-stats .usage-stat strong {
  font-size: 1.35rem;
}

.insight-verdict {
  font-size: 1.05rem !important;
}

.insight-subsection {
  display: grid;
  gap: 0.65rem;
}

.insight-bar-row {
  align-items: center;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) auto;
}

.insight-bar-label {
  color: #374151;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-bar-track {
  background: #eef2f7;
  border-radius: 0;
  height: 0.55rem;
  overflow: hidden;
}

.insight-bar-fill {
  background: #9a3f25;
  border-radius: 0;
  display: block;
  height: 100%;
  min-width: 0.35rem;
}

.insight-bar-value {
  color: #111827;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

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

.insight-list {
  display: grid;
  gap: 0.55rem;
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
}

.insight-list li {
  align-items: baseline;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
}

.insight-list span {
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 820px) {
  .shell {
    padding: 1rem;
  }

  .login-card,
  .admin-grid,
  .assignment-fields,
  .usage-summary,
  .usage-panels,
  .create-menu-toolbar,
  .create-menu-item-card {
    grid-template-columns: 1fr;
  }

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

  .insights-grid,
  .insight-rating-columns,
  .insight-stats {
    grid-template-columns: 1fr;
  }

  .insight-bar-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .insight-bar-track {
    display: none;
  }

  .topbar-title-row {
    align-items: center;
    gap: 0.75rem;
  }

  #appView .user-panel {
    align-items: center;
    flex-direction: row;
    flex-shrink: 0;
    flex-wrap: nowrap;
    max-width: 100%;
    width: auto;
  }

  #appView .user-badge {
    white-space: normal;
  }

  #appView .user-badge-name,
  #appView .user-badge-limit {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 42vw;
  }

  .section-heading,
  .current-summary-top,
  .current-order-heading,
  .current-order-footer,
  .usage-header {
    align-items: stretch;
    flex-direction: column;
  }

  .current-summary-stats,
  .rating-summary-stats,
  .rating-item-grid,
  .current-order-main {
    grid-template-columns: 1fr;
  }

  .current-order-main img,
  .current-order-image-placeholder {
    height: 140px;
    width: 100%;
  }

  .toast-container {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    max-width: none;
  }
}
