:root {
  --ink: #17233a;
  --muted: #647083;
  --line: #e2e6df;
  --paper: #f5f6f1;
  --panel: #fff;
  --green: #1c8a64;
  --lime: #d8fa61;
  --orange: #dc7041;
  --navy: #101a2c;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
aside {
  position: fixed;
  inset: 0 auto 0 0;
  width: 230px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 14px;
  background: var(--navy);
  color: #fff;
  overflow: hidden;
}
.brand {
  display: block;
  flex: 0 0 auto;
  margin-bottom: 4px;
  color: var(--lime);
  font: italic 700 27px Georgia, serif;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
nav {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 4px;
  overflow-y: auto;
  padding-right: 2px;
}
nav a {
  padding: 9px 10px;
  border-radius: 8px;
  color: #b8c0cf;
  font-weight: 750;
  line-height: 1.18;
}
nav a.on, nav a:hover { background: var(--lime); color: var(--navy); }
.who {
  flex: 0 0 auto;
  position: static;
  display: grid;
  gap: 3px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-weight: 800;
  line-height: 1.2;
}
.who small, .who a { color: #94a0b2; font-size: 12px; font-weight: 650; }
main {
  width: calc(100% - 230px);
  max-width: 1420px;
  margin-left: 230px;
  padding: 30px;
}
.login-main {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  overflow: auto;
  background:
    radial-gradient(circle at 18% 18%, rgba(216,250,97,.22), transparent 26%),
    radial-gradient(circle at 82% 86%, rgba(28,138,100,.12), transparent 30%),
    #f7f8f4;
}
.login-main::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(16,26,44,.035) 1px, transparent 1px);
  background-size: 100% 44px;
  pointer-events: none;
}
.login-main::after {
  display: none;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  min-width: 0;
}
h1 { margin: 0; font: 700 34px Georgia, serif; }
h2 { margin: 0 0 14px; font: 700 20px Georgia, serif; }
.card, .login-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 12px 34px rgba(16,26,44,.05);
}
.featured-card {
  border: 1px solid rgba(28, 138, 100, .18);
  background:
    linear-gradient(180deg, rgba(216,250,97,.24), rgba(255,255,255,.95) 28%),
    #fff;
  box-shadow: 0 16px 42px rgba(16,26,44,.08);
}
.featured-card h2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.featured-card .set-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.featured-card .set-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.featured-card table {
  background: rgba(255,255,255,.72);
  border-radius: 10px;
}
.featured-card td, .featured-card th {
  background: transparent;
}
.card > * { min-width: 0; }
.card p { overflow-wrap: anywhere; }
.card ul {
  display: grid;
  gap: 7px;
  margin: 0 0 14px 18px;
  padding: 0;
}
.card li {
  padding-left: 2px;
  overflow-wrap: anywhere;
}
.card li small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.login-shell {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 48px;
  align-items: center;
}
.login-hero {
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}
.login-hero::before {
  display: none;
}
.login-topline {
  position: static;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.login-topline span + span::before { content: "•"; margin-right: 10px; color: #aab3a2; }
.login-badge { display: none; }
.login-hero h1 {
  position: relative;
  margin: 0 0 18px;
  color: var(--navy);
  font: italic 900 clamp(54px, 7vw, 86px) Georgia, serif;
  letter-spacing: -.05em;
  text-shadow: none;
}
.login-hero p {
  position: relative;
  max-width: 560px;
  margin: 0;
  color: #3a4558;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.45;
  font-weight: 750;
}
.login-metrics { display: none; }
.login-points { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.login-points span {
  padding: 8px 11px;
  border: 1px solid #dfe5db;
  border-radius: 999px;
  background: rgba(255,255,255,.74);
  color: #415065;
  font-weight: 850;
  font-size: 12px;
}
.login-card {
  width: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px;
  border: 1px solid #e1e6dc;
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 24px 70px rgba(16,26,44,.10);
}
.login-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
  box-shadow: none;
  font: italic 900 18px Georgia, serif;
}
.login-card h2 { margin-bottom: 7px; color: var(--navy); font: 850 31px Georgia, serif; letter-spacing: -.02em; }
.login-subtitle { margin: 0 0 24px; color: var(--muted); font-weight: 800; }
.login-card label { color: #536072; }
.login-card input {
  min-height: 54px;
  border-color: #d9dfd5;
  background: #fff;
  font-size: 16px;
  box-shadow: inset 0 1px 0 rgba(16,26,44,.03);
}
.login-card input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(28,138,100,.12);
}
.login-card button {
  min-height: 54px;
  margin-top: 4px;
  background: var(--navy);
  font-size: 16px;
  box-shadow: 0 14px 26px rgba(16,26,44,.14);
}
.login-card button:hover { transform: translateY(-1px); }
.login-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #edf6e9;
  color: #28624c;
  font-size: 12px;
  font-weight: 850;
}
.login-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 7px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.login-footer a { color: var(--green); font-weight: 950; }
.grid.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpis div {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.kpis span { color: var(--muted); font-size: 12px; font-weight: 750; }
.kpis b { font: 700 28px Georgia, serif; }
form { display: grid; gap: 12px; }
form.compact {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: end;
  margin-bottom: 16px;
}
.compact.card { align-items: end; }
.line { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.big-form input, .big-form select { min-height: 48px; font-size: 16px; }
details {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}
summary { cursor: pointer; color: var(--muted); font-weight: 850; }
details label { margin-top: 10px; }
[hidden] { display: none !important; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 800; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #fbfcf8;
  color: var(--ink);
  font-weight: 700;
}
textarea { min-height: 90px; resize: vertical; }
input.short { width: 110px; }
.chef-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.chef-card { display: grid; gap: 12px; }
.chef-meal-builder, .chef-meal-block { display: grid; gap: 12px; }
.chef-meal-block {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcf8;
}
.chef-service-panels { display: grid; gap: 12px; }
.chef-service-panel {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid #e3e8dd;
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff 0%, #f7faf2 100%);
  box-shadow: 0 8px 24px rgba(25, 38, 24, .06);
}
.chef-service-panel h3 {
  margin: 0 0 2px;
  color: var(--ink);
  font: 700 21px Georgia, serif;
}
.chef-service-panel > p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}
.chef-meal-builder > label:first-child {
  max-width: 340px;
}
.chef-service-panel button {
  min-height: 44px;
}
.chef-service-panel .chef-meal-block {
  margin-top: 4px;
  background: rgba(255,255,255,.72);
}
.event-page { align-items: start; }
.page-lead { margin: -8px 0 0; color: var(--muted); }
.calendar-list { overflow: hidden; }
.empty-state { padding: 36px 16px; text-align: center; color: var(--muted); }
.empty-state h2 { color: var(--ink); }
.event-page > * { min-width: 0; }
.event-page .event-menu-panel { grid-column: 1 / -1; width: 100%; min-width: 0; }
.selected-event-menu { width: 100%; min-width: 0; }
.event-page .event-menu-panel table,
.event-page .event-menu-panel form,
.event-page .event-menu-panel input,
.event-page .event-menu-panel select,
.event-page .event-menu-panel textarea { max-width: 100%; }
.event-info-form {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}
.guest-split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; grid-column: 1 / -1; padding: 12px; border: 1px solid #e3e8dd; border-radius: 12px; background: #f7faf2; }
.event-summary, .event-menu-panel { display: grid; gap: 12px; }
.event-menu-actions { display: grid; gap: 14px; }
.section-kicker { color: var(--green); font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.event-locked { min-height: 150px; align-content: center; background: linear-gradient(145deg, #fff 0%, #f7faf2 100%); }
.event-lock-note { display: inline-flex; width: fit-content; padding: 8px 12px; border-radius: 999px; background: #edf5e1; color: var(--green); font-size: 12px; font-weight: 800; }
.event-copy-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid #e3e8dd;
  border-radius: 12px;
  background: #f7faf2;
}
.event-copy-form label { min-width: 0; }
.event-menu-panel > h2:first-child { margin-bottom: 0; }
.event-menu-panel > p { margin-top: -4px; color: var(--muted); }
.event-item-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 130px) minmax(90px, 110px) minmax(104px, auto);
  gap: 10px;
  align-items: end;
  min-width: 0;
  padding: 16px;
  border: 1px solid #e3e8dd;
  border-radius: 12px;
  background: linear-gradient(145deg, #ffffff 0%, #f7faf2 100%);
}
.event-item-form label { min-width: 0; }
.event-item-form button { min-width: 0; white-space: normal; }
.event-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.dish-check {
  display: grid;
  grid-template-columns: 1fr 95px auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcf8;
  color: var(--ink);
}
.dish-check b { display: block; font-size: 15px; }
.dish-check input { min-height: 48px; text-align: center; font-size: 18px; }
.sticky-save {
  position: sticky;
  bottom: 14px;
  width: min(420px, 100%);
  margin-top: 16px;
  min-height: 52px;
  background: var(--green);
  font-size: 16px;
}
.add-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 110px 90px auto;
  gap: 8px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.chef-add-row {
  grid-template-columns: minmax(180px, 1fr) 110px auto;
}
.product-page {
  display: grid;
  gap: 16px;
}
.product-new-form {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: end;
}
.product-list {
  display: grid;
  gap: 10px;
}
.product-row {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #edf0ea;
  border-radius: 10px;
  background: #fbfcf8;
}
.product-row-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.product-row-head b {
  display: block;
  overflow-wrap: anywhere;
}
.product-row-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 800;
}
.product-edit-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) repeat(6, minmax(82px, .55fr)) auto;
  gap: 8px;
  align-items: end;
}
.inline-form { display: inline-flex; margin-left: 8px; }
.recipe-edit summary {
  display: grid;
  gap: 6px;
  cursor: pointer;
}
.recipe-list-card {
  margin-top: 16px;
}
.recipe-list-card table {
  max-height: 62vh;
  overflow: auto;
}
.recipe-list-card th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
}
.recipe-editor-area {
  margin-top: 16px;
}
.recipe-editor-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.recipe-editor-head h2 {
  margin-bottom: 4px;
}
.recipe-editor-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}
.recipe-empty-editor {
  border-style: dashed;
  background: #fbfcf8;
}
.recipe-summary-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.recipe-summary-row > span:first-child {
  min-width: 0;
}
.recipe-summary-row b {
  display: inline-block;
  margin-right: 8px;
  overflow-wrap: anywhere;
}
.recipe-edit h3 { margin: 18px 0 10px; font: 800 15px/1.2 Inter, sans-serif; }
.recipe-main-form {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: end;
  margin-top: 16px;
}
.recipe-main-form label:nth-last-of-type(2) { grid-column: 1 / -1; }
.ingredient-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) 100px 90px 90px minmax(120px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  padding: 10px 0;
  border-top: 1px solid #edf0ea;
}
.add-ingredient-row {
  margin-bottom: 8px;
  padding: 12px;
  border: 1px dashed #d7ded3;
  border-radius: 10px;
  background: #fbfcf8;
}
.pill {
  display: inline-flex;
  width: fit-content;
  margin-right: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #edf6e9;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.table-wrap { width: 100%; overflow-x: auto; }
.danger { background: #b42318; color: #fff; }
.bad { color: #b42318; font-weight: 900; }
.good { color: var(--green); font-weight: 900; }
.small {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}
.price-chart {
  min-height: 170px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 14px 8px 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcf8;
  overflow-x: auto;
}
.price-chart .bar {
  position: relative;
  min-width: 30px;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, var(--green), #126247);
}
.price-chart .bar span {
  position: absolute;
  left: 50%;
  bottom: -27px;
  transform: translateX(-50%);
  min-width: 92px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}
button, .button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border: 0;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
  text-align: center;
  white-space: normal;
}
.button.ghost { margin-left: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.actions .button.ghost { margin-left: 0; }
table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
}
th, td { padding: 11px 8px; border-bottom: 1px solid #edf0ea; text-align: left; vertical-align: top; }
th { color: #7f887a; font-size: 11px; text-transform: uppercase; }
td { overflow-wrap: anywhere; }
td small { display: block; color: var(--muted); }
.event-packages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.event-package-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}
.event-package-card h2 {
  margin-bottom: 6px;
  font-size: 20px;
}
.event-package-card ul {
  flex: 1;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
  font-size: 12px;
  line-height: 1.3;
}
.event-package-form {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 145px 95px;
  gap: 10px;
  align-items: end;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid #edf0ea;
}
.event-package-form button { min-height: 42px; }
.package-editor {
  margin-top: 16px;
}
.package-item-row {
  display: grid;
  grid-template-columns: 130px minmax(220px, 1fr) 110px 100px auto auto;
  gap: 8px;
  align-items: end;
  padding: 10px 0;
  border-top: 1px solid #edf0ea;
}
.event-add-dish {
  grid-template-columns: minmax(260px, 1.5fr) 120px 105px auto !important;
}
.event-summary-actions {
  margin-top: 14px;
}
.event-calendar td:nth-child(8) {
  min-width: 260px;
}
.flash {
  margin: 0 0 14px;
  padding: 11px 13px;
  border-radius: 8px;
  background: #fff4dd;
  color: #8a5d14;
  font-weight: 800;
}

@media (max-width: 900px) {
  aside {
    position: sticky;
    top: 0;
    z-index: 30;
    width: auto;
    padding: 12px 12px 14px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .brand { margin-bottom: 10px; font-size: 24px; }
  nav {
    display: grid;
    flex: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
    padding-right: 0;
  }
  nav a {
    min-width: 0;
    padding: 9px 10px;
    white-space: normal;
    text-align: center;
    font-size: 12px;
  }
  .who {
    position: static;
    margin-top: 12px;
    padding-top: 10px;
    font-size: 13px;
  }
  .who small,
  .who a {
    font-size: 11px;
    line-height: 1.25;
  }
  main { width: 100%; max-width: none; margin: 0; padding: 16px; }
  header { display: grid; gap: 10px; }
  h1 { font-size: 30px; }
  .login-main { padding: 22px 16px; place-items: start center; }
  .login-shell { grid-template-columns: 1fr; gap: 26px; }
  .login-hero { min-height: auto; padding: 0; border-radius: 0; }
  .login-topline { align-items: center; margin-bottom: 12px; font-size: 11px; }
  .login-hero h1 { font-size: clamp(46px, 16vw, 64px); margin-bottom: 10px; }
  .login-hero p { font-size: 17px; }
  .login-points { gap: 7px; margin-top: 18px; }
  .login-points span { padding: 7px 10px; font-size: 11px; }
  .login-metrics { grid-template-columns: 1fr; gap: 8px; margin-top: 22px; }
  .login-metrics div { min-height: auto; padding: 13px; }
  .login-card { padding: 24px; border-radius: 20px; }
  .login-footer { display: grid; gap: 2px; }
  .grid.two, .kpis, form.compact, .event-packages, .event-package-form, .event-add-dish { grid-template-columns: 1fr !important; }
  .line { grid-template-columns: 1fr; }
  .dish-check, .add-row { grid-template-columns: 1fr; }
  .chef-meal-block { grid-template-columns: 1fr; }
  .chef-service-panel { grid-template-columns: 1fr; }
  .event-info-form, .event-item-form { grid-template-columns: 1fr; }
  .ingredient-row { grid-template-columns: 1fr; }
  .product-edit-row, .package-item-row { grid-template-columns: 1fr; min-width: 0; }
  .recipe-editor-head { display: grid; }
  .recipe-summary-row { display: grid; }
  .recipe-summary-row .button { width: fit-content; }
  .card { padding: 16px; }
  .button.ghost { margin-left: 0; }
  table { display: block; overflow-x: auto; }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .grid.two { grid-template-columns: 1fr; }
  .event-packages { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
  .event-package-form { grid-template-columns: 1fr 1fr; }
  .event-package-form button { grid-column: 1 / -1; }
}
