:root {
  --cream: #f6eddf;
  --paper: #fffdf8;
  --paper-2: #fff8ee;
  --brown: #502418;
  --brown-dark: #2a1c18;
  --muted: #806a60;
  --red: #d92708;
  --red-dark: #b81f06;
  --orange: #ff7e18;
  --gold: #ffb821;
  --green: #118b48;
  --line: #e9ddd0;
  --danger-bg: #fff0eb;
  --danger-line: #efb09c;
  --success-bg: #edf8f0;
  --success-line: #b8dec3;
  --shadow: 0 22px 58px rgba(80, 36, 24, 0.12);
  --shadow-small: 0 9px 25px rgba(80, 36, 24, 0.09);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--cream);
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--brown-dark);
  background:
    radial-gradient(circle at 7% 5%, rgba(255, 126, 24, 0.12), transparent 26rem),
    radial-gradient(circle at 96% 92%, rgba(217, 39, 8, 0.08), transparent 27rem),
    var(--cream);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

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

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

h1,
h2,
.admin-brand,
button {
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
}

button,
select,
input[type="file"] {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.eyebrow {
  margin-bottom: 9px;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  gap: 11px;
  letter-spacing: -0.035em;
}

.admin-brand > span:last-child {
  display: grid;
  line-height: 0.93;
}

.admin-brand strong {
  color: var(--brown);
  font-size: 22px;
}

.admin-brand small {
  margin-top: 5px;
  color: var(--red);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.admin-brand-mark {
  position: relative;
  width: 47px;
  height: 47px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 7px 18px rgba(217, 39, 8, 0.18);
}

.admin-brand-mark i {
  position: absolute;
  left: 8px;
  width: 31px;
  background: var(--gold);
}

.admin-brand-mark i:nth-child(1) {
  top: 9px;
  height: 12px;
  border-radius: 18px 18px 5px 5px;
}

.admin-brand-mark i:nth-child(2) {
  top: 24px;
  height: 5px;
  border-radius: 5px;
  background: var(--brown);
}

.admin-brand-mark i:nth-child(3) {
  top: 33px;
  height: 7px;
  border-radius: 3px 3px 12px 12px;
}

/* Login */

.login-shell {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 36px 20px;
}

.login-shell::before,
.login-shell::after {
  position: fixed;
  z-index: 0;
  width: 290px;
  height: 92px;
  border-radius: 999px;
  content: "";
  pointer-events: none;
  transform: rotate(-28deg);
}

.login-shell::before {
  top: -35px;
  left: -92px;
  background: var(--red);
  box-shadow: 0 52px 0 var(--orange);
}

.login-shell::after {
  right: -92px;
  bottom: -38px;
  background: var(--orange);
  box-shadow: 0 -52px 0 var(--red);
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 510px);
  padding: 40px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: var(--shadow);
}

.login-card::after {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 7px;
  background: linear-gradient(90deg, var(--red) 0 56%, var(--orange) 56% 78%, var(--gold) 78%);
  content: "";
}

.login-card .admin-brand {
  margin-bottom: 38px;
}

.login-card h1 {
  margin-bottom: 10px;
  color: var(--brown);
  font-size: clamp(37px, 8vw, 54px);
  line-height: 0.94;
  letter-spacing: -0.065em;
}

.login-card .intro {
  max-width: 380px;
  margin-bottom: 27px;
  color: var(--muted);
  font-size: 15px;
}

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

.login-form label,
.item-form > label,
.field-grid label {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.login-form label > span,
.item-form > label > span:first-child,
.field-grid label > span:first-child {
  color: var(--brown);
  font-size: 12px;
  font-weight: 900;
}

.login-form input,
.item-form input,
.item-form select,
.item-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  color: var(--brown-dark);
  background: #fffefa;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.login-form input,
.item-form input,
.item-form select {
  min-height: 51px;
  padding: 0 15px;
}

.login-form input:hover,
.item-form input:hover,
.item-form select:hover,
.item-form textarea:hover {
  border-color: #d9c6b4;
}

.login-form input:focus,
.item-form input:focus,
.item-form select:focus,
.item-form textarea:focus {
  border-color: var(--orange);
  background: white;
  box-shadow: 0 0 0 4px rgba(255, 126, 24, 0.12);
}

.login-form button,
.save-button {
  min-height: 54px;
  padding: 0 23px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--red);
  box-shadow: 0 11px 23px rgba(217, 39, 8, 0.18);
  font-size: 13px;
  font-weight: 900;
  transition: transform 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.login-form button {
  margin-top: 5px;
}

.login-form button:hover,
.save-button:hover {
  background: var(--red-dark);
  box-shadow: 0 14px 26px rgba(217, 39, 8, 0.24);
  transform: translateY(-2px);
}

.login-form button:active,
.save-button:active {
  transform: translateY(0) scale(0.99);
}

.back-link {
  display: inline-block;
  margin-top: 24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.back-link:hover {
  color: var(--red);
}

/* Shared messages */

.message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 20px;
  padding: 15px 18px;
  border: 1px solid;
  border-radius: 15px;
  font-size: 13px;
}

.message p {
  margin: 0;
}

.message p + p {
  margin-top: 4px;
}

.message-error {
  display: block;
  border-color: var(--danger-line);
  color: #84230f;
  background: var(--danger-bg);
}

.message-success {
  border-color: var(--success-line);
  color: #175f32;
  background: var(--success-bg);
}

.message-success a {
  flex: 0 0 auto;
  font-weight: 900;
}

/* Dashboard */

.admin-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  gap: 24px;
  padding: 12px max(24px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(233, 221, 208, 0.92);
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 9px 28px rgba(80, 36, 24, 0.06);
  backdrop-filter: blur(16px);
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-actions form {
  margin: 0;
}

.admin-actions a,
.admin-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 41px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brown);
  background: var(--paper);
  font-size: 10px;
  font-weight: 900;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}

.admin-actions button {
  border-color: var(--brown);
  color: white;
  background: var(--brown);
}

.admin-actions a:hover {
  border-color: var(--red);
  color: var(--red);
}

.admin-actions button:hover {
  border-color: var(--red);
  background: var(--red);
}

.dashboard-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 74px;
}

.dashboard-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.dashboard-intro h1 {
  margin-bottom: 8px;
  color: var(--brown);
  font-size: clamp(40px, 5.2vw, 66px);
  line-height: 0.92;
  letter-spacing: -0.067em;
}

.dashboard-intro > div:first-child > p:last-child {
  max-width: 610px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
}

.live-status {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-width: 190px;
  gap: 1px 10px;
  padding: 14px 17px;
  border: 1px solid var(--success-line);
  border-radius: 15px;
  color: #175f32;
  background: var(--success-bg);
  box-shadow: var(--shadow-small);
}

.live-status > span {
  grid-row: 1 / span 2;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(17, 139, 72, 0.1);
}

.live-status strong {
  font-size: 11px;
}

.live-status small {
  color: #4c7e5d;
  font-size: 9px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 342px;
  align-items: start;
  gap: 22px;
}

.item-form {
  display: grid;
  min-width: 0;
  gap: 17px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

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

.form-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 27px;
  border-top: 1px solid var(--line);
}

.form-section-heading:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.form-section-heading > span {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--red);
  background: #ffe5c7;
  font-size: 10px;
  font-weight: 900;
}

.form-section-heading h2 {
  margin-bottom: 2px;
  color: var(--brown);
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.form-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.item-form label b {
  color: var(--red);
}

.item-form label > small {
  color: var(--muted);
  font-size: 10px;
}

.item-form select {
  padding-right: 42px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--brown) 50%),
    linear-gradient(135deg, var(--brown) 50%, transparent 50%);
  background-position:
    calc(100% - 19px) 22px,
    calc(100% - 14px) 22px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.item-form select:disabled {
  cursor: not-allowed;
  color: #a89890;
  background-color: #f7f1ea;
  opacity: 1;
}

.item-form textarea {
  min-height: 126px;
  padding: 14px 15px;
  resize: vertical;
  line-height: 1.5;
}

.price-field {
  max-width: 260px;
}

.price-input {
  position: relative;
  display: block;
}

.price-input i {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 16px;
  color: var(--brown);
  font-style: normal;
  font-weight: 900;
  transform: translateY(-50%);
}

.price-input input {
  padding-left: 32px;
  font-weight: 800;
}

.upload-field {
  position: relative;
  display: grid !important;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  min-height: 116px;
  gap: 18px !important;
  padding: 13px;
  overflow: hidden;
  border: 1.5px dashed #dfc7b1;
  border-radius: 18px;
  background: var(--paper-2);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.upload-field:hover,
.upload-field:focus-within {
  border-color: var(--orange);
  background: #fff4e4;
}

.upload-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.upload-preview {
  position: relative;
  display: grid;
  width: 112px;
  height: 90px;
  overflow: hidden;
  place-items: center;
  border-radius: 13px;
  color: var(--red);
  background: #f8dfc4;
}

.upload-preview i {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 35px;
  font-style: normal;
  font-weight: 300;
  line-height: 1;
}

.upload-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.upload-copy strong {
  color: var(--brown);
  font-size: 14px;
}

.upload-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.save-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  margin-top: 6px;
  padding: 0 25px;
}

.save-button span {
  font-size: 14px;
}

.save-button small {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9px;
  font-weight: 800;
  opacity: 0.78;
}

.save-button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

/* Edit mode */

.item-form.is-editing {
  border-color: #efb681;
  box-shadow: 0 22px 58px rgba(80, 36, 24, 0.14), 0 0 0 3px rgba(255, 126, 24, 0.08);
}

.edit-mode-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 18px;
  margin: -9px -9px 4px;
  padding: 17px 18px;
  border: 1px solid #efbd8e;
  border-radius: 17px;
  color: var(--brown);
  background: #fff1dd;
}

.edit-mode-banner > div {
  min-width: 0;
}

.edit-mode-banner > span:first-child {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--red);
  background: #ffdbac;
  font-size: 16px;
  font-weight: 900;
}

.edit-mode-banner > p {
  min-width: 0;
  flex: 1 1 auto;
}

.edit-mode-banner p,
.edit-mode-banner h2,
.edit-mode-banner strong,
.edit-mode-banner small {
  margin: 0;
}

.edit-mode-banner h2,
.edit-mode-banner strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--brown);
  font-size: 15px;
  line-height: 1.25;
}

.edit-mode-banner p,
.edit-mode-banner small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.cancel-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  flex: 0 0 auto;
  padding: 0 15px;
  border: 1px solid #d5bca4;
  border-radius: 999px;
  color: var(--brown);
  background: var(--paper);
  font-size: 10px;
  font-weight: 900;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}

.cancel-edit:hover {
  border-color: var(--red);
  color: var(--red);
  background: white;
}

.current-image-gallery {
  display: grid;
  gap: 10px;
}

.current-image-preview {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  gap: 13px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #faf3ea;
}

.current-image-preview img {
  width: 88px;
  height: 68px;
  object-fit: contain;
  border-radius: 10px;
  background: white;
}

.current-image-preview > div,
.current-image-preview > span:not(:first-child),
.current-image-preview > p {
  display: grid;
  min-width: 0;
  gap: 3px;
  margin: 0;
}

.current-image-preview strong {
  color: var(--brown);
  font-size: 11px;
}

.current-image-preview small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.current-image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
}

.current-image-actions button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #d9c0a9;
  border-radius: 999px;
  color: var(--brown);
  background: white;
  font-family: inherit;
  font-size: 8px;
  font-weight: 900;
  cursor: pointer;
}

.current-image-actions button:hover,
.current-image-actions button:focus-visible {
  border-color: var(--red);
  color: var(--red);
}

.current-image-actions button:disabled {
  cursor: default;
  opacity: 0.38;
}

.current-image-actions button[data-image-remove] {
  color: var(--red);
}

.new-image-previews {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.new-image-previews:empty {
  display: none;
}

.new-image-previews figure {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #faf3ea;
}

.new-image-previews img {
  display: block;
  width: 100%;
  height: 72px;
  object-fit: cover;
  background: white;
}

.new-image-previews figcaption {
  overflow: hidden;
  padding: 7px;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Menu library */

.menu-manager {
  min-width: 0;
  margin-top: 28px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.menu-manager-header,
.menu-manager-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  min-width: 0;
  gap: 24px;
  margin-bottom: 20px;
}

.menu-manager-header > div,
.menu-manager-heading > div {
  min-width: 0;
}

.menu-manager-header h2,
.menu-manager-heading h2 {
  margin-bottom: 5px;
  color: var(--brown);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.menu-manager-header p,
.menu-manager-heading p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.menu-manager-count,
[data-menu-count] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  flex: 0 0 auto;
  margin-left: 6px;
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--brown);
  background: #f8e8d4;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}

.add-item-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  flex: 0 0 auto;
  padding: 0 16px;
  border-radius: 999px;
  color: white;
  background: var(--brown);
  font-size: 10px;
  font-weight: 900;
  transition: background-color 150ms ease, transform 150ms ease;
}

.add-item-link:hover {
  background: var(--red);
  transform: translateY(-1px);
}

.menu-manager-toolbar,
.menu-manager-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  gap: 11px;
  margin-bottom: 18px;
  padding: 12px;
  border-radius: 17px;
  background: #f9f2e9;
}

.menu-manager-toolbar label,
.menu-manager-controls label {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.menu-manager-toolbar label > span,
.menu-manager-controls label > span {
  color: var(--brown);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.menu-manager-toolbar input,
.menu-manager-toolbar select,
.menu-manager-controls input,
.menu-manager-controls select,
#menu-search,
#menu-category-filter {
  width: 100%;
  min-width: 0;
  min-height: 45px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  color: var(--brown-dark);
  background: white;
  font-size: 12px;
}

.menu-manager-toolbar input:focus,
.menu-manager-toolbar select:focus,
.menu-manager-controls input:focus,
.menu-manager-controls select:focus,
#menu-search:focus,
#menu-category-filter:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 126, 24, 0.12);
}

.published-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  gap: 13px;
}

.published-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: stretch;
  min-width: 0;
  min-height: 154px;
  gap: 15px;
  padding: 11px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffefa;
  box-shadow: 0 5px 16px rgba(80, 36, 24, 0.05);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.published-item:hover {
  border-color: #ddc7b2;
  box-shadow: var(--shadow-small);
  transform: translateY(-1px);
}

.published-item[hidden] {
  display: none !important;
}

.published-item-image {
  position: relative;
  display: grid;
  width: 112px;
  min-height: 132px;
  overflow: hidden;
  place-items: center;
  border-radius: 13px;
  color: var(--red);
  background: #f8e8d4;
  font-size: 24px;
  font-weight: 900;
}

.published-item-image img {
  width: 100%;
  height: 100%;
  max-height: 145px;
  object-fit: contain;
}

.published-item-image > span {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  color: var(--brown);
  background: #ffd49c;
  font-size: 11px;
}

.published-item-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  padding: 4px 3px 2px 0;
}

.published-item-content h3 {
  margin: 0 0 4px;
  overflow-wrap: anywhere;
  color: var(--brown);
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.published-item-content > p {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.published-item-content > strong {
  margin-top: auto;
  color: var(--brown);
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1;
}

.published-item-meta {
  display: flex;
  align-items: center;
  min-width: 0;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.published-item-meta span,
.published-item-meta small {
  max-width: 100%;
  padding: 4px 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--paper-2);
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.published-item-meta strong {
  margin-right: 2px;
  color: var(--brown);
  font-size: 13px;
  line-height: 1;
}

.published-item-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.published-item-actions form {
  min-width: 0;
  margin: 0;
}

.edit-item-link,
.delete-item-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #cfb9a6;
  border-radius: 999px;
  color: var(--brown);
  background: white;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}

.edit-item-link:hover {
  border-color: var(--brown);
  color: white;
  background: var(--brown);
}

.delete-item-button {
  border-color: #efb09c;
  color: #a12812;
  background: #fff7f3;
}

.delete-item-button:hover {
  border-color: var(--red);
  color: white;
  background: var(--red);
}

.delete-item-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.menu-empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 34px 18px;
  border: 1px dashed #d9c2ad;
  border-radius: 17px;
  color: var(--muted);
  background: var(--paper-2);
  text-align: center;
  font-size: 12px;
}

.menu-empty-state[hidden] {
  display: none !important;
}

/* Category and subcategory manager */

.taxonomy-sidebar {
  position: sticky;
  top: 101px;
  max-height: calc(100vh - 122px);
  min-width: 0;
  padding: 24px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--paper);
  box-shadow: var(--shadow);
  scrollbar-width: thin;
  scrollbar-color: #d8bda8 transparent;
}

.taxonomy-sidebar-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  min-width: 0;
  gap: 14px;
}

.taxonomy-sidebar-heading h2 {
  margin: 0;
  color: var(--brown);
  font-size: 29px;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.taxonomy-sidebar-heading > a,
.taxonomy-category-actions a,
.taxonomy-category-body li > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #d9c2ad;
  border-radius: 999px;
  color: var(--brown);
  background: white;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease;
}

.taxonomy-sidebar-heading > a {
  flex: 0 0 auto;
  border-color: var(--brown);
  color: white;
  background: var(--brown);
}

.taxonomy-sidebar-heading > a:hover,
.taxonomy-category-actions a:hover,
.taxonomy-category-body li > a:hover {
  border-color: var(--red);
  color: white;
  background: var(--red);
}

.taxonomy-intro {
  margin: 13px 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.taxonomy-editor {
  display: grid;
  gap: 11px;
  margin-bottom: 17px;
  padding: 15px;
  border: 1px solid #efbd8e;
  border-radius: 16px;
  background: #fff3e2;
}

.taxonomy-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid #edd7bd;
}

.taxonomy-editor-heading strong {
  color: var(--brown);
  font-size: 13px;
}

.taxonomy-editor-heading a {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: var(--brown);
  background: white;
  font-size: 19px;
  line-height: 1;
}

.taxonomy-editor > p {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.taxonomy-editor label {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.taxonomy-editor label > span {
  color: var(--brown);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.035em;
}

.taxonomy-editor label b {
  color: var(--red);
}

.taxonomy-editor input,
.taxonomy-editor select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #dbc6b2;
  border-radius: 10px;
  outline: 0;
  color: var(--brown-dark);
  background: white;
  font-size: 13px;
}

.taxonomy-editor input:focus,
.taxonomy-editor select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 126, 24, 0.12);
}

.taxonomy-editor > button {
  min-height: 43px;
  margin-top: 2px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: var(--red);
  font-size: 12px;
}

.taxonomy-list {
  display: grid;
  gap: 8px;
}

.taxonomy-category {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffefa;
}

.taxonomy-category[open] {
  border-color: #dfc3aa;
  box-shadow: 0 5px 15px rgba(80, 36, 24, 0.06);
}

.taxonomy-category summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 12px;
  padding: 12px 13px;
  cursor: pointer;
  list-style: none;
}

.taxonomy-category summary::-webkit-details-marker {
  display: none;
}

.taxonomy-category summary > span,
.taxonomy-category-body li > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.taxonomy-category summary strong {
  overflow: hidden;
  color: var(--brown);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taxonomy-category summary small,
.taxonomy-category-body li small {
  color: var(--muted);
  font-size: 10px;
}

.taxonomy-category summary > i {
  flex: 0 0 auto;
  color: var(--red);
  font-size: 14px;
  font-style: normal;
  transform: rotate(0deg);
  transition: transform 150ms ease;
}

.taxonomy-category[open] summary > i {
  transform: rotate(180deg);
}

.taxonomy-category-body {
  padding: 0 12px 12px;
  border-top: 1px solid #f0e3d6;
}

.taxonomy-category-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 0 7px;
}

.taxonomy-category-actions a {
  width: 100%;
  min-height: 31px;
  padding: 0 7px;
  font-size: 10px;
}

.taxonomy-section-label,
.taxonomy-empty {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.taxonomy-category-body ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.taxonomy-category-body li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  gap: 8px;
  padding: 8px 8px 8px 10px;
  border-radius: 10px;
  background: #f9f2e9;
}

.taxonomy-category-body li strong {
  overflow: hidden;
  color: var(--brown);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taxonomy-category-body li > a {
  min-height: 28px;
  padding: 0 9px;
  font-size: 10px;
}

.taxonomy-safety {
  display: flex;
  align-items: start;
  gap: 8px;
  margin: 15px 0 0;
  padding: 11px;
  border-radius: 12px;
  color: #287044;
  background: var(--success-bg);
  font-size: 10px;
  line-height: 1.45;
}

.taxonomy-safety span {
  display: grid;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-weight: 900;
}

.admin-guide {
  position: sticky;
  top: 105px;
  padding: 29px;
  border-radius: 25px;
  color: #fff5ec;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 126, 24, 0.18), transparent 14rem),
    var(--brown);
  box-shadow: var(--shadow);
}

.admin-guide .eyebrow {
  color: #ffbd75;
}

.admin-guide h2 {
  max-width: 270px;
  margin-bottom: 24px;
  color: white;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.055em;
}

.admin-guide ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-guide li {
  display: grid;
  grid-template-columns: 33px minmax(0, 1fr);
  gap: 11px;
  padding: 15px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.admin-guide li > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: var(--brown);
  background: #ffe0b7;
  font-size: 9px;
  font-weight: 900;
}

.admin-guide li strong {
  display: block;
  margin-bottom: 3px;
  color: white;
  font-size: 12px;
}

.admin-guide li p {
  margin: 0;
  color: #d8c2b8;
  font-size: 10px;
  line-height: 1.45;
}

.security-note {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 21px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
}

.security-note > span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.security-note p {
  display: grid;
  margin: 0;
  color: #d8c2b8;
  font-size: 9px;
  line-height: 1.35;
}

.security-note strong {
  margin-bottom: 2px;
  color: white;
  font-size: 10px;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) 290px;
  }

  .admin-guide {
    padding: 24px;
  }

  .taxonomy-sidebar {
    padding: 20px;
  }
}

@media (max-width: 760px) {
  .admin-header {
    min-height: 72px;
    padding: 10px 16px;
  }

  .admin-header .admin-brand-mark {
    width: 40px;
    height: 40px;
  }

  .admin-header .admin-brand-mark i {
    left: 7px;
    width: 27px;
  }

  .admin-header .admin-brand-mark i:nth-child(1) {
    top: 8px;
    height: 10px;
  }

  .admin-header .admin-brand-mark i:nth-child(2) {
    top: 21px;
    height: 4px;
  }

  .admin-header .admin-brand-mark i:nth-child(3) {
    top: 29px;
    height: 6px;
  }

  .admin-header .admin-brand strong {
    font-size: 17px;
  }

  .admin-header .admin-brand small {
    font-size: 6px;
  }

  .admin-actions {
    gap: 6px;
  }

  .admin-actions a,
  .admin-actions button {
    min-height: 38px;
    padding: 0 11px;
    font-size: 8px;
  }

  .dashboard-shell {
    width: min(100% - 26px, 680px);
    padding: 34px 0 56px;
  }

  .dashboard-intro {
    display: grid;
    align-items: start;
    gap: 18px;
    margin-bottom: 22px;
  }

  .dashboard-intro h1 {
    font-size: clamp(39px, 12vw, 56px);
  }

  .live-status {
    justify-self: start;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .item-form {
    padding: 23px;
    border-radius: 21px;
  }

  .admin-guide {
    position: static;
  }

  .taxonomy-sidebar {
    position: static;
    max-height: none;
    order: -1;
  }

  .menu-manager {
    margin-top: 20px;
    padding: 23px;
    border-radius: 21px;
  }

  .published-items {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .login-shell {
    align-items: center;
    padding: 20px 13px;
  }

  .login-card {
    padding: 32px 22px 26px;
    border-radius: 23px;
  }

  .login-card .admin-brand {
    margin-bottom: 31px;
  }

  .login-card h1 {
    font-size: 43px;
  }

  .login-shell::before,
  .login-shell::after {
    width: 210px;
    height: 65px;
  }

  .admin-header {
    align-items: center;
  }

  .admin-actions a {
    display: none;
  }

  .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .price-field {
    max-width: none;
  }

  .upload-field {
    grid-template-columns: 86px minmax(0, 1fr);
    min-height: 100px;
    gap: 13px !important;
  }

  .upload-preview {
    width: 86px;
    height: 74px;
  }

  .save-button {
    padding: 0 20px;
  }

  .save-button small {
    display: none;
  }

  .message-success {
    display: grid;
  }

  .edit-mode-banner {
    align-items: start;
    margin: -5px -5px 2px;
    padding: 14px;
  }

  .cancel-edit {
    min-height: 37px;
    padding: 0 12px;
  }

  .current-image-preview {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .current-image-preview img {
    width: 76px;
    height: 61px;
  }

  .new-image-previews {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .menu-manager {
    padding: 18px;
  }

  .menu-manager-header,
  .menu-manager-heading {
    display: grid;
    align-items: start;
    gap: 10px;
  }

  .menu-manager-count,
  [data-menu-count] {
    justify-self: start;
  }

  .add-item-link {
    justify-self: start;
  }

  .menu-manager-toolbar,
  .menu-manager-controls {
    grid-template-columns: minmax(0, 1fr);
    padding: 10px;
  }

  .published-item {
    grid-template-columns: 88px minmax(0, 1fr);
    min-height: 132px;
    gap: 11px;
    padding: 9px;
  }

  .published-item-image {
    width: 88px;
    min-height: 112px;
  }

  .published-item-content {
    padding-top: 2px;
  }

  .published-item-content h3 {
    font-size: 14px;
  }

  .published-item-actions {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .published-item-actions form,
  .edit-item-link,
  .delete-item-button {
    width: 100%;
  }

  .edit-item-link,
  .delete-item-button {
    min-height: 34px;
    padding: 0 8px;
  }
}

@media (max-width: 360px) {
  .edit-mode-banner {
    display: grid;
  }

  .cancel-edit {
    justify-self: start;
  }

  .published-item {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .published-item-image {
    width: 76px;
  }

  .published-item-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
