/* SET BBQ admin dashboard — full-width application layout */
:root {
  --admin-bg: #f4f4f1;
  --admin-surface: #ffffff;
  --admin-sidebar: #151515;
  --admin-sidebar-text: #d7d7d7;
  --admin-sidebar-muted: #929292;
  --admin-ink: #202020;
  --admin-muted: #6f6f6f;
  --admin-line: #e4e4e1;
  --admin-line-strong: #d4d4d0;
  --admin-red: #a83a28;
  --admin-red-dark: #8f3021;
  --admin-green: #2f7d4a;
  --admin-error: #a51d1d;
  --admin-radius: 10px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--admin-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--admin-bg);
  color: var(--admin-ink);
}

body,
button,
input,
textarea {
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover { text-decoration: none; }

button {
  border: 0;
  border-radius: 7px;
  padding: 10px 15px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: var(--admin-ink);
  color: #fff;
}

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

button:disabled {
  opacity: .6;
  cursor: wait;
}

/* Login remains intentionally focused; the authenticated dashboard is full-screen. */
.admin-shell {
  min-height: 100vh;
  padding: 0;
}

#login-card {
  width: min(460px, calc(100% - 32px));
  margin: 7vh auto;
  padding: 32px;
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  box-shadow: 0 10px 35px rgba(0,0,0,.06);
}

.admin-card {
  background: var(--admin-surface);
}

.brand {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #747474;
}

h1 {
  margin: 7px 0 8px;
  font-size: clamp(30px, 3vw, 38px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -.025em;
}

h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
  font-weight: 700;
}

p {
  color: var(--admin-muted);
  line-height: 1.5;
}

form {
  display: grid;
  gap: 7px;
  max-width: 420px;
}

input,
textarea {
  width: 100%;
  font: inherit;
  border: 1px solid #cfcfcb;
  border-radius: 6px;
  background: #fff;
  color: var(--admin-ink);
}

form input {
  padding: 10px;
  margin-bottom: 8px;
}

form button {
  margin-top: 4px;
}

#login-card > a {
  display: inline-block;
  margin-top: 20px;
  color: #666;
  font-size: 13px;
  font-weight: 700;
}

.admin-message {
  margin-top: 8px;
  min-height: 20px;
}

.admin-message.success { color: #176b35; }
.admin-message.error { color: var(--admin-error); }

/* Full-width application shell */
.admin-dashboard[hidden] { display: none !important; }
.admin-dashboard {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;

  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: start;
}

/* Header belongs to the working area, not a centered card. */
.admin-page-head {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  padding: 30px clamp(24px, 4vw, 54px) 24px;
  background: #fff;
  border-bottom: 1px solid var(--admin-line);
}

.admin-page-head p {
  margin: 7px 0 0;
  max-width: 620px;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 360px;
  padding-top: 5px;
  color: #666;
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-align: right;
}

.status-dot,
.status-summary-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #888;
}

.status-dot { background: var(--admin-green); }

/* Desktop navigation: quiet, persistent sidebar. */
.admin-nav {
  grid-column: 1;
  grid-row: 1 / span 20;
  position: sticky;
  top: 0;
  z-index: 10;
  height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  padding: 28px 14px 20px;
  background: var(--admin-sidebar);
  color: var(--admin-sidebar-text);
  border-right: 1px solid #262626;
}

.admin-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-left: 2px solid transparent;
  border-radius: 6px;
  color: var(--admin-sidebar-muted);
  font-size: 13px;
  font-weight: 700;
  transition: color .15s, background .15s, border-color .15s;
}

.admin-nav a:hover,
.admin-nav a:focus-visible {
  color: #fff;
  background: rgba(255,255,255,.055);
  border-left-color: #777;
}

.admin-nav a[href="#menu"] {
  margin-top: 4px;
}

.admin-nav a[href="#menu"]::before,
.admin-nav a[href="#website"]::before,
.admin-nav a[href="#system"]::before,
.admin-nav a[href="#account"]::before {
  width: 22px;
  margin-right: 9px;
  color: #777;
  font-size: 12px;
  text-align: center;
}

.admin-nav a[href="#menu"]::before { content: "☰"; }
.admin-nav a[href="#website"]::before { content: "↗"; }
.admin-nav a[href="#system"]::before { content: "●"; font-size: 8px; }
.admin-nav a[href="#account"]::before { content: "○"; font-size: 14px; }

.admin-nav a:hover::before,
.admin-nav a:focus-visible::before {
  color: var(--admin-red);
}

/* Main content uses the entire remaining browser width. */
.admin-section {
  grid-column: 2;
  min-width: 0;
  padding: 32px clamp(24px, 4vw, 54px) 34px;
  border-bottom: 1px solid var(--admin-line);
  scroll-margin-top: 20px;
  background: var(--admin-bg);
}

.admin-section:last-of-type {
  border-bottom: 0;
}

.admin-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 15px;
}

.section-kicker {
  display: block;
  margin-bottom: 5px;
  color: #888;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.section-note {
  color: #8a8a8a;
  font-size: 12px;
  font-weight: 600;
}

/* Tool links are rows, not giant cards. They expand across the available canvas. */
.admin-tool-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 8px;
}

.admin-tool {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 12px 14px;
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius);
  background: #fff;
  transition: border-color .15s, background .15s, transform .15s;
}

.admin-tool:hover {
  border-color: #c9c9c5;
  background: #fdfdfc;
  transform: translateY(-1px);
}

.tool-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #dededb;
  border-radius: 7px;
  color: #5f5f5f;
  font-size: 15px;
  font-weight: 400;
}

.tool-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.tool-copy strong {
  font-size: 14px;
  line-height: 1.25;
}

.tool-copy span {
  color: #747474;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}

.tool-arrow {
  color: #999;
  font-size: 17px;
  text-align: right;
}

/* Website section has three natural quick-access links. */
#website .admin-tool-list {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
}

.text-button {
  padding: 5px 0;
  background: transparent;
  color: #555;
  font-size: 13px;
  font-weight: 700;
}

.text-button:hover {
  color: #111;
  background: transparent;
}

/* Status is intentionally a clean, full-width operational list. */
.status-summary {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  margin-bottom: 10px;
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius);
  background: #fff;
}

.status-summary-dot.ok { background: var(--admin-green); }
.status-summary-dot.error { background: var(--admin-error); }

.status-summary div {
  display: grid;
  gap: 2px;
}

.status-summary strong { font-size: 14px; }
.status-summary span { color: #777; font-size: 12px; }

.status-list {
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius);
  overflow: hidden;
  background: #fff;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px 16px;
  border-bottom: 1px solid #ededeb;
}

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

.status-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.status-row strong { font-size: 14px; }
.status-row div span { color: #777; font-size: 12px; }

.check-result {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
}

.check-result.pending { color: #888; }
.check-result.ok { color: var(--admin-green); }
.check-result.error { color: var(--admin-error); }

.system-note {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
  color: #777;
  font-size: 12px;
  line-height: 1.45;
}

.system-note strong { color: #555; }

/* Account area stays light and compact. */
.account-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, .3fr) auto;
  align-items: center;
  gap: 26px;
  padding: 16px;
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius);
  background: #fff;
}

.account-panel > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.account-label {
  color: #888;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.account-panel strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.dashboard-footer {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(24px, 4vw, 54px) 24px;
  background: #fff;
  color: #888;
  font-size: 12px;
}

.dashboard-footer a {
  color: #666;
  font-size: 12px;
}

.dashboard-footer a:hover {
  color: var(--admin-red);
}

/* Tablet */
@media (max-width: 900px) {
  .admin-dashboard {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .admin-page-head {
    padding-left: 26px;
    padding-right: 26px;
  }

  .admin-section {
    padding-left: 26px;
    padding-right: 26px;
  }

  .dashboard-footer {
    padding-left: 26px;
    padding-right: 26px;
  }

  #website .admin-tool-list {
    grid-template-columns: 1fr;
  }
}

/* Mobile: sidebar becomes a compact horizontal navigation. */
@media (max-width: 680px) {
  .admin-dashboard {
    display: block;
    min-height: 100vh;
  }

  .admin-page-head {
    position: relative;
    display: block;
    padding: 22px 18px 18px;
  }

  .admin-page-head p {
    margin-top: 6px;
  }

  .admin-user {
    margin-top: 14px;
    padding-top: 0;
    max-width: none;
    text-align: left;
  }

  .admin-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 4px;
    overflow-x: auto;
    padding: 7px 10px;
    background: #171717;
    border-right: 0;
    border-bottom: 1px solid #2a2a2a;
    scrollbar-width: none;
  }

  .admin-nav::-webkit-scrollbar {
    display: none;
  }

  .admin-nav::before {
    display: none;
  }

  .admin-nav a {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 9px 11px;
    border-left: 0;
    border-bottom: 2px solid transparent;
    border-radius: 5px;
    font-size: 12px;
  }

  .admin-nav a:hover,
  .admin-nav a:focus-visible {
    border-left: 0;
    border-bottom-color: #777;
  }

  .admin-nav a::before {
    display: none !important;
  }

  .admin-section {
    padding: 24px 16px 28px;
  }

  .admin-section-heading {
    align-items: center;
  }

  .admin-tool-list,
  #website .admin-tool-list {
    grid-template-columns: 1fr;
  }

  .admin-tool {
    min-height: 64px;
    padding: 10px;
  }

  .status-row {
    align-items: flex-start;
    padding: 12px;
  }

  .account-panel {
    grid-template-columns: 1fr;
    gap: 13px;
  }

  .account-panel button {
    justify-self: start;
  }

  .dashboard-footer {
    flex-direction: column;
    gap: 8px;
    padding: 16px;
  }
}

/* Very narrow phones */
@media (max-width: 390px) {
  #login-card {
    padding: 24px 18px;
  }

  h1 {
    font-size: 28px;
  }

  .admin-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .status-row {
    gap: 10px;
  }
}

.editor-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin: 22px 0 12px;
}
.editor-help { display: block; color: #777; font-size: 13px; margin-top: 4px; }
.toolbar-actions { display: flex; align-items: center; gap: 10px; }
.delivery-price {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  font-weight: 700;
}
.delivery-price input {
  width: 82px;
  padding: 7px 8px;
  margin: 0;
  font-weight: 600;
}

.add-item-button {
  padding: 8px 12px;
  border: 1px solid #c8c8c8;
  background: #fff;
  color: #202020;
  font-size: 13px;
}
.add-item-button:hover { border-color: #999; background: #f7f7f7; }

.menu-table-wrap {
  overflow-x: auto;
  border: 1px solid #d4d4d4;
  border-radius: 9px;
  background: #fff;
}
.menu-editor-table {
  width: 100%;
  min-width: 1160px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.menu-editor-table th,
.menu-editor-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #e7e7e7;
  vertical-align: middle;
  text-align: left;
}
.menu-editor-table thead th {
  height: 34px;
  padding: 7px 8px;
  background: #f1f1f1;
  color: #555;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 800;
  border-bottom: 1px solid #d7d7d7;
}
.menu-editor-table thead th:first-child { border-top-left-radius: 8px; }
.menu-editor-table thead th:last-child { border-top-right-radius: 8px; }

/* Explicit spreadsheet column proportions. Description gets extra room
   for longer customer-facing copy as the menu grows. */
.menu-editor-table col.col-order { width: 5%; }
.menu-editor-table col.col-item { width: 15%; }
.menu-editor-table col.col-unit { width: 8%; }
.menu-editor-table col.col-price { width: 8%; }
.menu-editor-table col.col-options { width: 19%; }
.menu-editor-table col.col-description { width: 33%; }
.menu-editor-table col.col-id { width: 7%; }
.menu-editor-table col.col-actions { width: 5%; }

.menu-editor-table tbody tr:not(.menu-category-row) {
  height: 56px;
  transition: background .12s;
}
.menu-editor-table tbody tr:not(.menu-category-row):hover { background: #fafafa; }
.menu-editor-table tbody tr:last-child td { border-bottom: 0; }

.menu-editor-table input,
.menu-editor-table textarea {
  width: 100%;
  padding: 7px 8px;
  border: 1px solid #d2d2d2;
  border-radius: 5px;
  font-size: 13px;
  color: #202020;
}
.menu-editor-table input:focus,
.menu-editor-table textarea:focus,
.menu-category-description:focus,
.delivery-price input:focus {
  outline: 2px solid rgba(32,32,32,.12);
  border-color: #888;
}
.menu-editor-table textarea {
  min-height: 38px;
  resize: vertical;
  line-height: 1.35;
  field-sizing: content;
  overflow-y: auto;
}
.menu-category-row th {
  padding: 9px 10px;
  background: #f8f8f8;
  border-bottom: 1px solid #d9d9d9;
}
.category-row-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: 100%;
}
.category-row-head > div:first-child {
  width: 100%;
  min-width: 0;
}
.category-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
}
.menu-category-description {
  display: block;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: 38px;
  padding: 8px 10px;
  color: #666;
  background: #fff;
  font-size: 13px;
}
.category-row-head .add-item-button {
  flex: 0 0 auto;
  white-space: nowrap;
}
.menu-id {
  color: #777;
  font: 11px/1.3 monospace;
  overflow-wrap: anywhere;
}
.menu-order {
  padding: 5px 6px !important;
  text-align: center !important;
  color: #777;
  font-weight: 700;
}
.order-controls {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-top: 4px;
}
.move-item {
  width: 25px;
  height: 23px;
  padding: 0;
  border: 1px solid #d3d3d3;
  border-radius: 5px;
  background: #f7f7f7;
  color: #333;
  font-size: 13px;
  line-height: 1;
}
.move-item:hover:not(:disabled) { background: #eee; border-color: #aaa; }
.move-item:disabled { opacity: .3; cursor: default; }
.menu-delete-cell { text-align: center !important; }
.delete-item {
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: #fff;
  color: #9b2525;
  font-size: 12px;
}
.delete-item:hover { border-color: #c9a0a0; background: #fff7f7; }

.editor-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
}
#save-menu { min-width: 130px; }
#reload-menu { min-width: 130px; }
code { background: #eee; padding: 2px 4px; border-radius: 4px; }

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.42);
}
.admin-modal[hidden] { display: none; }
.admin-modal-card {
  width: min(100%,560px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 18px 55px rgba(0,0,0,.18);
}
.admin-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.admin-modal-head h2 { margin-top: 6px; }
.admin-modal-card-wide { width: min(100%, 720px); }
.options-editor {
  width: 100%;
  min-height: 340px;
  padding: 12px 14px;
  border: 1px solid #d2d2d2;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  color: #202020;
  resize: vertical;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}
.options-editor:focus { outline: 2px solid rgba(32,32,32,.12); border-color: #888; }
.options-open {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  background: #fff;
  border: 1px solid #d2d2d2;
  border-radius: 5px;
  font-size: 13px;
  color: #202020;
  text-align: left;
  cursor: pointer;
}
.options-open:hover { border-color: #888; background: #fafafa; }
.options-preview { white-space: pre-line; line-height: 1.35; }
.options-edit-hint { flex: 0 0 auto; font-weight: 700; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: #8f3323; }
.modal-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  background: #eee;
  color: #202020;
  font-size: 22px;
  line-height: 1;
}
.add-item-form { display: grid; gap: 13px; }
.add-item-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
.add-item-form input,
.add-item-form select,
.add-item-form textarea {
  width: 100%;
  padding: 9px 10px;
}
.add-item-form textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-note { color: #777; font-weight: 400; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 4px; }

@media (max-width: 650px) {
  .admin-shell { padding: 10px; }
  .admin-card { padding: 22px 16px; margin: 8px auto; }
  h1 { font-size: 30px; }
  .admin-page-head { flex-direction: column; }
  .editor-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { width: 100%; justify-content: space-between; }
  .delivery-price { align-self: center; }
}

/* The menu grid needs the full desktop width so the complete spreadsheet fits
   without an unnecessary horizontal scrollbar. Keep the other admin pages at
   the normal card width. */
.menu-editor-page {
  width: min(100%, 1270px);
}
.menu-editor-page .admin-page-head {
  margin-bottom: 0;
}
@media (max-width: 1300px) {
  .menu-editor-page {
    width: min(100%, calc(100vw - 36px));
  }
}


/* SET BBQ dashboard refinement: compact controls, deliberate whitespace, no stretched cards. */
.admin-tool-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  align-items: stretch;
  gap: 10px;
}
.admin-tool {
  width: auto;
  min-height: 68px;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 7px;
  box-shadow: none;
}
.admin-tool:hover {
  border-color: #c9aaa3;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,.045);
}
.tool-icon {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  color: var(--admin-red);
  background: #fff;
}
.tool-copy { gap: 2px; }
.tool-copy strong { font-size: 14px; }
.tool-copy span { font-size: 11px; line-height: 1.35; }
.tool-arrow { color: #aaa; font-size: 15px; }

#website .admin-tool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
#website .admin-tool {
  flex: 0 1 300px;
  width: 300px;
}

.admin-section {
  padding-top: 28px;
  padding-bottom: 30px;
}
.admin-dashboard .admin-section > *,
.admin-dashboard .admin-page-head > * { max-width: none; }
.admin-dashboard .admin-section { max-width: 1280px; }
.admin-section-heading { margin-bottom: 12px; }
.section-kicker { color: var(--admin-red); }

.status-summary {
  width: 100%;
  padding: 11px 14px;
  margin-bottom: 8px;
}
.status-list {
  width: 100%;
  border-radius: 8px;
}
.status-row {
  padding: 11px 14px;
  min-height: 0;
}
.status-row strong { font-size: 13px; }
.status-row div span { font-size: 11px; }
.check-result { font-size: 11px; }
.system-note {
  width: 100%;
  margin-top: 8px;
  font-size: 11px;
}

.account-panel {
  width: min(100%, 760px);
  padding: 14px 15px;
  gap: 22px;
}

.dashboard-footer { padding-top: 15px; padding-bottom: 18px; }

/* Preserve the established spreadsheet editor. The dashboard redesign must
   never alter its table proportions or controls. */
.menu-editor-page {
  width: min(100%, 1270px);
  margin: 18px auto;
  padding: 32px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(0,0,0,.06);
}
.menu-editor-page .admin-page-head { margin-bottom: 0; }
.menu-editor-page .back-link { white-space: nowrap; padding-top: 4px; }

@media (max-width: 1050px) {
  .admin-tool { flex-basis: 330px; width: 330px; }
  #website .admin-tool { flex-basis: 280px; width: 280px; }
}
@media (max-width: 680px) {
  .admin-tool-list,
  #website .admin-tool-list {
    display: grid;
    grid-template-columns: 1fr;
  }
  .admin-tool,
  #website .admin-tool {
    width: auto;
    flex-basis: auto;
  }
}

/* v0.1.33: keep section metadata beside its heading instead of pinning it
   to the far edge of a wide desktop canvas. */
.admin-section-heading {
  justify-content: flex-start;
  align-items: baseline;
}
.section-note {
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid var(--admin-line-strong);
  white-space: nowrap;
}

/* Signed-in identity belongs in the application header. Logout stays next to it
   instead of making the user hunt through the page for account controls. */
.admin-user {
  align-items: center;
  gap: 9px;
  color: #555;
}
.header-signout {
  margin-left: 7px;
  padding: 7px 11px;
  border: 1px solid #d7d7d3;
  border-radius: 6px;
  background: #fff;
  color: #333;
  font-size: 12px;
  font-weight: 700;
}
.header-signout:hover {
  background: #f4f4f1;
  border-color: #bdbdb8;
}
@media (max-width: 680px) {
  .admin-section-heading {
    align-items: center;
  }
  .section-note {
    margin-left: 0;
    padding-left: 10px;
  }
  .admin-user {
    flex-wrap: wrap;
  }
  .header-signout {
    margin-left: auto;
  }
}


/* v0.1.34 — practical admin navigation and a true full-width menu editor. */
.nav-brand {
  display: block;
  padding: 0 12px 22px;
  color: #f1f1f1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.nav-label {
  margin: 16px 12px 5px;
  color: #666;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 12px 9px 13px;
  border-left: 2px solid transparent;
  border-radius: 5px;
  color: #a2a2a2;
  font-size: 12px;
  font-weight: 700;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #fff;
  background: rgba(255,255,255,.055);
  border-left-color: #777;
}

.nav-link.nav-dashboard {
  color: #fff;
  background: #242424;
  border-left-color: var(--admin-red);
}

.nav-link[target="_blank"]::after {
  content: "↗";
  margin-left: auto;
  color: #666;
  font-size: 11px;
}

.nav-link[target="_blank"]:hover::after {
  color: #aaa;
}

/* The menu editor is a working spreadsheet, so give it the whole canvas. */
.menu-editor-page {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 28px clamp(20px, 3vw, 48px) 38px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}

.menu-editor-page .admin-page-head {
  padding: 0 0 22px;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--admin-line);
}

.menu-editor-page .editor-toolbar {
  margin-top: 0;
}

.menu-editor-page .menu-table-wrap {
  width: 100%;
}

.menu-editor-table {
  min-width: 1240px;
}

.menu-editor-table col.col-order { width: 5%; }
.menu-editor-table col.col-item { width: 14%; }
.menu-editor-table col.col-unit { width: 8%; }
.menu-editor-table col.col-price { width: 8%; }
.menu-editor-table col.col-options { width: 17%; }
.menu-editor-table col.col-description { width: 34%; }
.menu-editor-table col.col-id { width: 6%; }
.menu-editor-table col.col-actions { width: 8%; }

@media (max-width: 680px) {
  .nav-brand,
  .nav-label {
    display: none;
  }

  .admin-nav {
    padding: 7px 10px;
  }

  .nav-link {
    min-height: 38px;
    padding: 8px 11px;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }

  .nav-link.nav-dashboard {
    border-left: 0;
    border-bottom-color: var(--admin-red);
  }

  .menu-editor-page {
    min-height: 100vh;
    padding: 20px 12px 30px;
  }

  .menu-editor-page .admin-page-head {
    padding-bottom: 17px;
    margin-bottom: 16px;
  }
}

@media (max-width: 680px) {
  .admin-shell { padding: 0; }
}
