:root {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #181818;
  background: #f5f5f6;
  font-size: 100%;
  line-height: 1.55;
  --purple: #3e1b86;
  --pale: #f0ecf7;
  --cyan: #54cdd9;
  --line: #dddde4;
}
* {
  box-sizing: border-box;
  border-radius: 0;
}
body {
  margin: 0;
}
a {
  color: var(--purple);
  text-underline-offset: 3px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
input,
select,
textarea {
  max-width: 100%;
}
h1,
h2,
h3,
p {
  margin: 0 0 0.7rem;
}
h1 {
  font-size: clamp(1.65rem, 3vw, 2.3rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 1.3rem;
  line-height: 1.3;
}
h3 {
  font-size: 1.05rem;
}
p:last-child {
  margin-bottom: 0;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible,
select:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}
.skip {
  position: absolute;
  left: 12px;
  top: -100px;
  background: white;
  padding: 12px;
  z-index: 10;
}
.skip:focus {
  top: 12px;
}
.app-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1240px;
  margin: auto;
  min-height: 90px;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--purple);
  font-size: 1.25rem;
  font-weight: 750;
  line-height: 1.25;
}
.brand-mark {
  width: 42px;
  height: 42px;
  background: #dadc12;
  color: var(--purple);
  display: grid;
  place-items: center;
  font-size: 1.65rem;
}
.brand-sub {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #61616a;
  margin-top: 5px;
}
.app-header nav {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.9rem;
}
.app-header nav a {
  text-decoration: none;
}
.app-header nav a:hover {
  text-decoration: underline;
}
.app-header nav form {
  margin: 0;
}
.account-link {
  border-left: 1px solid var(--line);
  padding-left: 20px;
}
.link-button {
  border: 0;
  padding: 0;
  background: none;
  color: var(--purple);
  text-decoration: underline;
  font-size: inherit;
}
.shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 32px 56px;
  min-height: calc(100vh - 165px);
}
.app-footer {
  font-size: 0.8rem;
  color: #61616a;
  border-top: 1px solid var(--line);
  padding: 18px 32px;
  text-align: center;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.dashboard-heading {
  align-items: stretch;
  flex-direction: column;
  gap: 18px;
}
.dashboard-heading > .actions {
  flex-wrap: nowrap;
}
.page-heading h1 {
  margin-bottom: 12px;
}
.eyebrow {
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  color: var(--purple);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.muted {
  color: #60606a;
}
.small {
  font-size: 0.875rem;
}
.back-link {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 0.875rem;
  text-decoration: none;
}
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.9rem;
  gap: 8px;
  line-height: 1.4;
}
.primary {
  background: var(--purple);
  color: #fff;
}
.primary:hover {
  background: #2f1468;
}
.secondary {
  border-color: var(--purple);
  background: #fff;
  color: var(--purple);
}
.secondary:hover {
  background: var(--pale);
}
.small-button {
  min-height: 40px;
  padding: 8px 12px;
}
.text-link {
  font-size: 0.875rem;
}
.actions {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.actions form {
  margin: 0;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  padding: 24px;
  margin-bottom: 22px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}
.section-heading h2,
.section-heading h3 {
  margin-bottom: 6px;
}
.stack {
  display: grid;
  gap: 18px;
}
.stack > .button {
  justify-self: start;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.875rem;
  font-weight: 650;
  min-width: 0;
}
.field input,
.field textarea,
.field select,
.input-static {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #b7b7c4;
  background: #fff;
  color: #181818;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.35;
}
.field input[readonly] {
  background: #f5f5f6;
  color: #61616a;
}
.field textarea {
  resize: vertical;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}
.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--purple);
  flex-shrink: 0;
}
.notice {
  background: var(--pale);
  padding: 16px 20px;
  border-left: 4px solid var(--purple);
  margin-bottom: 22px;
}
.notice ul {
  margin: 10px 0 0;
  padding-left: 22px;
}
.notice.error {
  background: #fff0ef;
  border-color: #aa2525;
  color: #781717;
}
.notice.success {
  background: #e5f4ef;
  border-color: #1b6c51;
  color: #164e3c;
}
.notice.warning {
  background: #fff4d6;
  border-color: #96721a;
  color: #624a0e;
}
.auth-card {
  max-width: 480px;
  margin: 36px auto;
  background: #fff;
  padding: 36px;
  border-top: 5px solid var(--purple);
}
.auth-card.wide {
  max-width: 580px;
}
.auth-card form {
  margin: 26px 0;
}
.auth-card .button {
  width: 100%;
}
.filters {
  display: flex;
  gap: 16px;
  align-items: end;
  margin-bottom: 24px;
}
.filters .field {
  min-width: 220px;
}
.filters select {
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23181818' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
}
.empty {
  text-align: center;
  background: white;
  border: 1px solid var(--line);
  padding: 60px 24px;
}
.empty-mark {
  margin: 0 auto 20px;
  background: var(--pale);
  color: var(--purple);
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 2rem;
}
.empty p {
  margin-bottom: 24px;
}
.menu-list {
  display: grid;
  gap: 12px;
}
.menu-row {
  display: flex;
  gap: 24px;
  background: #fff;
  padding: 24px;
  border: 1px solid var(--line);
  align-items: center;
}
.week-badge {
  min-width: 76px;
  background: var(--pale);
  color: var(--purple);
  text-align: center;
  padding: 10px;
}
.week-badge span {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  font-weight: 650;
}
.week-badge strong {
  font-size: 2rem;
  line-height: 1.3;
}
.menu-row-main {
  flex: 1;
  min-width: 0;
}
.menu-row-main h2 {
  font-size: 1.2rem;
  margin: 5px 0;
}
.menu-row-main h2 a {
  text-decoration: none;
}
.campus-name {
  font-size: 0.85rem;
  color: var(--purple);
  font-weight: 600;
}
.menu-row-status {
  display: grid;
  gap: 8px;
  justify-items: start;
}
.status {
  display: inline-block;
  padding: 5px 10px;
  font-size: 0.875rem;
  font-weight: 650;
}
.status.draft {
  background: #ececf0;
  color: #4b4b56;
}
.status.submitted {
  background: #e2f5f7;
  color: #165862;
}
.status.published {
  background: #e5f4ef;
  color: #1a5c45;
}
.late {
  color: #9b2424;
}
.row-actions {
  display: grid;
  gap: 10px;
}
.week-settings {
  border-top: 4px solid var(--purple);
}
.deadline {
  font-size: 0.875rem;
  margin-top: 18px;
  color: #51515d;
}
.editor-layout {
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.day-sidebar {
  position: sticky;
  top: 20px;
}
.day-sidebar nav {
  display: grid;
  margin: 12px 0 20px;
  background: #fff;
  border: 1px solid var(--line);
}
.day-sidebar nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 12px;
  text-decoration: none;
  font-size: 0.875rem;
  border-left: 3px solid transparent;
}
.day-sidebar nav a:hover,
.day-sidebar nav a:focus {
  background: var(--pale);
  border-left-color: var(--purple);
}
.day-sidebar small {
  color: #666;
}
.day-editor {
  background: #fff;
  border: 1px solid var(--line);
  margin-bottom: 24px;
  scroll-margin-top: 20px;
}
.day-heading {
  padding: 20px;
  background: var(--pale);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.day-heading h2 {
  margin: 0;
  color: var(--purple);
}
.day-heading h2 span {
  font-size: 1rem;
  font-weight: 500;
}
.day-content {
  padding: 20px;
}
.day-note {
  margin-bottom: 20px;
}
.choice-editor {
  border-left: 4px solid var(--purple);
  padding: 16px;
  margin-bottom: 20px;
  background: #fafafa;
}
.choice-editor.vegetarian {
  border-left-color: var(--cyan);
}
.choice-heading {
  display: flex;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}
.grow {
  flex: 1;
  min-width: 0;
}
.remove-button {
  border: 0;
  background: none;
  padding: 8px 0;
  color: #862323;
  font-size: 0.8rem;
  white-space: nowrap;
}
.component {
  border: 1px solid var(--line);
  background: #fff;
  margin-bottom: 16px;
}
.component > summary {
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 650;
  font-size: 0.95rem;
  background: #f1f1f4;
}
.component > summary::after {
  content: "−";
  font-size: 1.1rem;
}
.component:not([open]) > summary::after {
  content: "+";
}
.component-hint {
  font-size: 0.75rem;
  font-weight: 400;
  color: #666;
  margin-left: auto;
}
.component-body {
  padding: 16px;
}
.component-top {
  display: flex;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}
.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.nutrition-grid .field {
  font-size: 0.875rem;
}
.nutrition-grid input {
  padding: 9px;
}
.allergens {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 12px 0 0;
  margin: 18px 0 0;
  min-width: 0;
}
.allergens legend {
  padding: 0 8px 0 0;
  font-size: 0.875rem;
  font-weight: 650;
}
.no-allergens {
  margin: 4px 0 14px;
}
.allergen-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 16px;
}
.allergen-grid .check {
  font-size: 0.875rem;
  align-items: flex-start;
}
.allergen-grid .check input {
  margin-top: 2px;
}
.shared-editor {
  border-top: 2px solid var(--line);
  margin-top: 24px;
  padding-top: 22px;
}
.live-totals {
  padding: 18px;
  background: #f5f5f6;
  margin-top: 22px;
  font-size: 0.875rem;
}
.live-totals h3 {
  font-size: 1rem;
}
.live-total {
  margin-bottom: 12px;
}
.live-total > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 16px;
  margin-top: 6px;
}
.live-total span {
  white-space: nowrap;
}
.save-bar {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 3px solid var(--purple);
  box-shadow: 0 -3px 14px #00000008;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 18px 20px;
  z-index: 2;
}
.save-bar > .small {
  max-width: 520px;
  color: #555;
}
.save-bar .actions {
  flex-shrink: 0;
}
.export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.code-output {
  display: block;
  width: 100%;
  height: 125px;
  border: 1px solid #b7b7c4;
  background: #f8f8fa;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  padding: 12px;
  margin: 14px 0;
  resize: vertical;
}
.preview-panel > summary {
  font-size: 1.2rem;
  color: var(--purple);
  font-weight: 650;
  cursor: pointer;
}
.menu-preview {
  width: 100%;
  height: 800px;
  border: 0;
  margin-top: 18px;
  background: #fff;
}
.table-scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}
th {
  background: #f5f5f6;
  font-weight: 650;
}
th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.user-list {
  display: grid;
}
.user-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.user-row h3 {
  margin-bottom: 4px;
}
.user-row p {
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}
.reset-password {
  margin-top: 12px;
  font-size: 0.875rem;
}
.reset-password summary {
  cursor: pointer;
  color: var(--purple);
}
.reset-password form {
  margin-top: 14px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 20px;
  background: #181818;
  color: #fff;
  font-size: 0.9rem;
  max-width: 90vw;
  z-index: 20;
}
.toast[hidden] {
  display: none;
}
@media (max-width: 1000px) {
  .dashboard-heading > .actions {
    flex-wrap: wrap;
  }
  .header-inner {
    align-items: start;
  }
  .app-header nav {
    gap: 14px;
  }
  .account-link {
    border: 0;
    padding: 0;
  }
  .menu-row {
    gap: 16px;
    flex-wrap: wrap;
  }
  .menu-row-status {
    margin-left: auto;
  }
  .row-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
  }
  .editor-layout {
    grid-template-columns: 160px minmax(0, 1fr);
  }
  .choice-heading {
    flex-wrap: wrap;
  }
  .choice-heading .field {
    flex-basis: 100%;
  }
  .component-hint {
    display: none;
  }
  .nutrition-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .save-bar {
    flex-wrap: wrap;
  }
}
@media (max-width: 700px) {
  .header-inner {
    padding: 16px;
    flex-direction: column;
    gap: 18px;
  }
  .app-header nav {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }
  .shell {
    padding: 24px 16px 36px;
  }
  .page-heading {
    align-items: start;
    flex-direction: column;
    gap: 14px;
  }
  .page-heading > .button {
    width: 100%;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 18px;
  }
  .filters {
    flex-wrap: wrap;
  }
  .filters .field {
    min-width: 0;
    flex: 1 1 220px;
  }
  .menu-row {
    padding: 18px;
    gap: 16px;
  }
  .week-badge {
    min-width: 62px;
  }
  .menu-row-main {
    flex-basis: calc(100% - 80px);
  }
  .menu-row-status {
    margin-left: 0;
  }
  .row-actions {
    width: 100%;
    justify-content: space-between;
  }
  .auth-card {
    padding: 24px;
    margin: 12px auto;
  }
  .editor-layout {
    display: block;
  }
  .day-sidebar {
    position: static;
  }
  .day-sidebar > p.small {
    display: none;
  }
  .day-sidebar nav {
    display: flex;
    overflow: auto;
    margin-bottom: 24px;
  }
  .day-sidebar nav a {
    flex-direction: column;
    white-space: nowrap;
    gap: 2px;
  }
  .day-sidebar nav a span {
    font-size: 0.8rem;
  }
  .day-heading {
    flex-direction: column;
    align-items: start;
    padding: 16px;
  }
  .day-content {
    padding: 14px;
  }
  .choice-editor {
    padding: 12px;
  }
  .component-body {
    padding: 12px;
  }
  .component-top {
    flex-wrap: wrap;
  }
  .nutrition-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .allergen-grid {
    grid-template-columns: 1fr;
  }
  .save-bar {
    padding: 14px;
    position: static;
  }
  .save-bar .actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
  }
  .export-grid {
    grid-template-columns: 1fr;
  }
  .section-heading {
    align-items: start;
    flex-direction: column;
  }
  .user-row {
    flex-direction: column;
  }
  .menu-preview {
    height: 700px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

.component-name,
.menu-row-main,
.live-total strong {
  overflow-wrap: anywhere;
  min-width: 0;
}

.button.danger {
  background: #a51d2d;
  border-color: #a51d2d;
  color: #fff;
}
.button.danger:hover {
  background: #841724;
  border-color: #841724;
}
