.venue-card,
.qr-card,
.stat-card,
.insight-card,
.panel-card,
.notice,
.mz-product-card,
.mz-add-product-card,
.mz-product-editor,
.mz-allergen-editor,
.mz-visibility-switch,
.mz-modal,
.mz-drawer,
.mz-toast,
.mz-tooltip {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.venue-card {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  box-shadow: none;
}

.venue-card strong,
.qr-card strong {
  font-size: 14px;
}

.venue-card span,
.qr-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 12px;
}

.side-nav {
  display: grid;
  gap: 6px;
}

.side-nav a {
  padding: 11px 14px;
  border-radius: var(--radius-control);
  font-size: 14px;
  font-weight: 500;
  transition: background-color var(--motion-base) var(--ease-standard), color var(--motion-base) var(--ease-standard), box-shadow var(--motion-base) var(--ease-standard);
}

.side-nav a:hover {
  color: var(--color-green-dark);
  background: rgba(234, 244, 230, 0.7);
}

.side-nav a:active {
  background: var(--color-surface-pressed);
}

.side-nav a.active,
.side-nav a[aria-current="page"] {
  color: var(--color-green-dark);
  background: var(--color-green-soft);
  font-weight: 600;
}

.qr-card {
  position: relative;
  margin-top: auto;
  padding: 18px 48px 18px 16px;
  background: #edf7e9;
  box-shadow: none;
}

.qr-card span {
  position: absolute;
  right: 16px;
  bottom: 17px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--color-green);
}

.owner-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.owner-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--color-green-soft);
  padding: 5px;
}

.owner-card strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.owner-card span {
  display: block;
  margin-top: 4px;
  color: var(--color-muted);
  font-size: 12px;
}

.owner-logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--motion-base) var(--ease-standard), border-color var(--motion-base) var(--ease-standard), color var(--motion-base) var(--ease-standard), box-shadow var(--motion-base) var(--ease-standard);
}

.owner-logout-button:hover {
  border-color: var(--color-border-strong, var(--color-border));
  background: var(--color-green-soft);
  color: var(--color-green-dark);
}

.owner-logout-button:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.owner-logout-button:disabled {
  cursor: not-allowed;
  opacity: .62;
}

.button,
.mz-button,
.mz-tabs button,
.mz-search-sort button,
.mz-allergen-input-row button,
.mz-save-btn,
.mz-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
  transition: background-color var(--motion-base) var(--ease-standard), border-color var(--motion-base) var(--ease-standard), box-shadow var(--motion-base) var(--ease-standard), color var(--motion-base) var(--ease-standard);
}

.button,
.mz-button {
  padding: 0 16px;
}

.button:hover,
.mz-button:hover,
.mz-tabs button:hover,
.mz-search-sort button:hover,
.mz-delete-btn:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface-hover);
  box-shadow: var(--shadow-sm);
}

.button:active,
.button[aria-pressed="true"],
.mz-button:active,
.mz-button[aria-pressed="true"],
.mz-tabs button:active,
.mz-search-sort button:active,
.mz-delete-btn:active {
  background: var(--color-surface-pressed);
  box-shadow: none;
}

.button-primary,
.mz-button-primary,
.mz-save-btn,
.mz-allergen-input-row button {
  color: #ffffff;
  border-color: var(--color-green);
  background: var(--color-green);
}

.button-primary:hover,
.mz-button-primary:hover,
.mz-save-btn:hover,
.mz-allergen-input-row button:hover {
  border-color: var(--color-green-dark);
  background: #367d36;
  box-shadow: 0 10px 26px rgba(67, 139, 61, 0.18);
}

.button-primary:active,
.button-primary[aria-pressed="true"],
.mz-button-primary:active,
.mz-button-primary[aria-pressed="true"],
.mz-save-btn:active,
.mz-allergen-input-row button:active {
  background: #2f7131;
  box-shadow: none;
}

.button-secondary,
.button-ghost,
.mz-button-secondary,
.mz-button-ghost {
  background: #ffffff;
}

.mz-button-danger,
.mz-delete-btn:hover {
  border-color: var(--border-danger);
  color: #b62d2d;
  background: var(--surface-danger);
}

.mz-delete-btn:active {
  background: #ffecec;
}

.mz-icon-button,
.mz-editor-head button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: #526253;
  font-size: 26px;
  line-height: 1;
  transition: background-color var(--motion-base) var(--ease-standard), border-color var(--motion-base) var(--ease-standard), color var(--motion-base) var(--ease-standard);
}

.mz-icon-button:hover,
.mz-editor-head button:hover {
  border-color: var(--color-border);
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.mz-icon-button:active,
.mz-editor-head button:active {
  background: var(--color-surface-pressed);
}

.mz-icon-button-danger {
  border-color: var(--border-danger);
  color: var(--color-danger);
  background: var(--surface-danger);
}

.mz-icon-button-danger:hover {
  border-color: #efb4b4;
  color: #a92020;
  background: #ffecec;
}

.button[aria-busy="true"],
.mz-button[aria-busy="true"],
button[aria-busy="true"],
.is-loading {
  cursor: progress;
  opacity: var(--opacity-loading);
}

.button:disabled,
.mz-button:disabled,
.mz-icon-button:disabled,
.mz-save-btn:disabled,
.mz-delete-btn:disabled {
  cursor: not-allowed;
  opacity: var(--opacity-disabled);
  box-shadow: none;
}

.mz-form-group,
.mz-product-editor label {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 600;
}

.mz-input,
.mz-textarea,
.mz-select,
.mz-search-sort input,
.mz-product-editor input,
.mz-product-editor select,
.mz-product-editor textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: #ffffff;
  padding: 13px 14px;
  color: var(--color-text);
}

.mz-textarea,
.mz-product-editor textarea {
  min-height: 92px;
  resize: vertical;
}

.mz-search-sort input {
  width: min(260px, calc(100vw - 48px));
  cursor: text;
  font-weight: 400;
}

.mz-help-text,
.mz-product-editor small {
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.4;
}

.mz-toolbar,
.mz-product-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.mz-action-group,
.mz-tabs,
.mz-search-sort,
.mz-allergen-tags,
.mz-allergen-presets {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.mz-tabs button,
.mz-search-sort button {
  min-height: 46px;
  padding: 0 16px;
}

.mz-tabs button.active,
.mz-tabs button[aria-selected="true"],
.mz-chip.is-selected,
.mz-badge-success {
  color: var(--color-green-dark);
  border-color: #cae0c5;
  background: var(--color-green-soft);
}

.mz-badge,
.mz-tabs span,
.mz-editor-head span,
.mz-allergen-head span,
.mz-product-card em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  color: var(--color-green-dark);
  background: #e4f2df;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.mz-tabs span {
  display: inline-grid;
  min-width: 26px;
  height: 26px;
  place-items: center;
  margin-left: 8px;
  padding: 0;
  background: #dcefd8;
}

.mz-chip,
.mz-allergen-tags button,
.mz-allergen-presets button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: #ffffff;
  padding: 0 12px;
  color: var(--color-text);
  font-weight: 600;
  transition: background-color var(--motion-base) var(--ease-standard), border-color var(--motion-base) var(--ease-standard), color var(--motion-base) var(--ease-standard);
}

.mz-chip:hover,
.mz-allergen-tags button:hover,
.mz-allergen-presets button:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface-hover);
}

.mz-allergen-tags button {
  background: #f4f8f1;
}

.mz-panel-card {
  overflow: hidden;
}

.mz-list {
  display: grid;
}

.mz-list-item {
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: background-color var(--motion-base) var(--ease-standard), border-color var(--motion-base) var(--ease-standard), box-shadow var(--motion-base) var(--ease-standard), color var(--motion-base) var(--ease-standard);
}

.mz-list-item:hover {
  background: var(--color-surface-hover);
}

.mz-list-item:active {
  background: var(--color-surface-pressed);
}

.mz-list-item.active,
.mz-list-item[aria-selected="true"] {
  background: linear-gradient(90deg, #f4fbf1, #ffffff);
  box-shadow: inset 3px 0 0 var(--color-green);
}

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

.mz-data-table th {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

.mz-data-table th,
.mz-data-table td {
  border-bottom: 1px solid var(--color-border);
  padding: 14px 22px;
}

.mz-data-table tbody tr {
  transition: background-color var(--motion-base) var(--ease-standard);
}

.mz-data-table tbody tr:hover {
  background: var(--color-surface-hover);
}

.mz-notice {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-green-soft);
  color: var(--color-green-dark);
  padding: 16px;
  line-height: 1.5;
}

.mz-dropdown {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-hover);
}

.mz-dropdown-item {
  width: 100%;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--color-text);
  padding: 11px 12px;
  text-align: left;
  font-weight: 600;
}

.mz-dropdown-item:hover {
  background: var(--color-surface-hover);
  color: var(--color-green-dark);
}

.mz-dropdown-item.danger {
  color: var(--color-danger);
}

.mz-dropdown-item.danger:hover {
  background: var(--surface-danger);
}

.mz-empty-action-card {
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-card);
  background: #fbfdf9;
  cursor: pointer;
  transition: background-color var(--motion-base) var(--ease-standard), border-color var(--motion-base) var(--ease-standard), box-shadow var(--motion-base) var(--ease-standard);
}

.mz-empty-action-card:hover {
  border-color: var(--color-green);
  background: var(--color-green-soft);
  box-shadow: var(--shadow-sm);
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 146px;
  padding: 26px 22px;
}

.stat-icon {
  display: grid;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 16px;
  font-size: 25px;
}

.stat-icon.green {
  color: var(--color-green);
  background: #e4f2df;
}

.stat-icon.amber {
  color: var(--color-amber);
  background: #fff0d8;
}

.stat-icon.danger {
  color: var(--color-danger);
  background: #ffe3e5;
}

.stat-card p,
.stat-card small {
  margin: 0;
  color: var(--color-muted);
}

.stat-card strong {
  display: block;
  margin: 8px 0;
  font-size: 28px;
  line-height: 1;
}

.insight-card,
.panel-card {
  margin-top: 24px;
  overflow: hidden;
}

.mz-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 0 22px;
  border-bottom: 1px solid var(--color-border);
}

.mz-section-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.insight-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 18px 22px 22px;
  list-style-position: inside;
}

.insight-list li,
.empty-band,
.mz-empty-state,
.mz-empty-state-compact {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, #f2f8ef, #fbfdf9);
}

.insight-list li {
  padding: 14px 16px;
}

.mz-empty-state {
  display: grid;
  min-height: 318px;
  place-content: center;
  padding: 24px;
  color: var(--color-muted);
  text-align: center;
}

.mz-empty-state strong {
  color: var(--color-text);
}

.mz-empty-state-compact {
  margin: 32px 22px 38px;
  padding: 20px;
  color: var(--color-muted);
}

.empty-band,
.notice {
  margin-bottom: 18px;
  padding: 16px 18px;
}

.notice {
  display: grid;
  gap: 4px;
}

.notice-danger {
  border-color: #f4b4b4;
  color: #7d1f1f;
  background: #fff2f2;
}

.mz-product-card {
  position: relative;
  min-height: 306px;
  overflow: hidden;
  cursor: pointer;
  border-radius: var(--radius-card);
  transition: transform var(--motion-slow) var(--ease-standard), border-color var(--motion-slow) var(--ease-standard), box-shadow var(--motion-slow) var(--ease-standard), background-color var(--motion-slow) var(--ease-standard);
}

.mz-product-card:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface-hover);
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.mz-product-card:active {
  box-shadow: var(--shadow-soft);
  transform: translateY(0);
}

.mz-product-card.selected,
.mz-product-card[aria-selected="true"] {
  border-color: var(--color-green);
  background: linear-gradient(180deg, #ffffff, #fbfdf9);
  box-shadow: var(--shadow-selected);
}

.mz-product-card > img {
  width: 100%;
  height: 168px;
  object-fit: cover;
  background: var(--color-surface-soft);
}

.mz-product-card em {
  position: absolute;
  top: 20px;
  right: 18px;
  font-style: normal;
  background: #e7f4e3;
}

.mz-product-card-body {
  padding: 16px;
}

.mz-product-card-body > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mz-product-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.mz-product-card p {
  margin: 8px 0 18px;
  color: var(--color-muted);
  font-size: 13px;
}

.mz-product-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.mz-product-metrics span,
.mz-metric-chip {
  display: grid;
  gap: 4px;
  border-radius: 12px;
  background: rgba(242, 248, 239, 0.72);
  padding: 9px 10px;
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 400;
}

.mz-product-metrics b,
.mz-metric-chip b {
  color: var(--color-text);
  font-size: 14px;
  font-weight: 600;
}

.mz-add-product-card {
  display: grid;
  min-height: 306px;
  place-content: center;
  padding: 28px;
  border-style: dashed;
  border-radius: var(--radius-card);
  text-align: center;
  cursor: pointer;
  transition: transform var(--motion-slow) var(--ease-standard), border-color var(--motion-slow) var(--ease-standard), box-shadow var(--motion-slow) var(--ease-standard), background-color var(--motion-slow) var(--ease-standard);
}

.mz-add-product-card:hover {
  border-color: var(--color-green);
  background: #fbfdf9;
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.mz-add-product-card:active {
  box-shadow: var(--shadow-soft);
  transform: translateY(0);
}

.mz-add-product-card div {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  color: var(--color-green);
  background: #eaf4e6;
  font-size: 32px;
  font-weight: 600;
}

.mz-add-product-card h3 {
  margin: 0 0 10px;
  color: var(--color-green-dark);
}

.mz-add-product-card p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.45;
}

.mz-product-editor {
  border-radius: var(--radius-panel);
  padding: 24px;
}

.mz-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.mz-editor-head h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}

.mz-image-upload-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  align-items: center;
}

.mz-image-upload-row img {
  width: 88px;
  height: 88px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  object-fit: cover;
  background: var(--color-surface-soft);
}

.mz-file-upload,
.mz-file-input::file-selector-button,
.mz-product-editor input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #ffffff;
  padding: 9px 12px;
  color: var(--color-text);
  font-weight: 600;
}

.mz-file-upload:hover,
.mz-file-input::file-selector-button:hover,
.mz-product-editor input[type="file"]::file-selector-button:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface-hover);
}

.mz-allergen-editor {
  margin-bottom: 22px;
  padding: 16px;
}

.mz-allergen-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.mz-allergen-head h4,
.mz-allergen-head p {
  margin: 0;
}

.mz-allergen-head p {
  margin-top: 5px;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.35;
}

.mz-allergen-head span {
  align-self: start;
  background: #eaf4e6;
}

.mz-allergen-empty {
  border-radius: var(--radius-control);
  background: #f4f8f1;
  padding: 12px 14px;
  color: var(--color-muted);
}

.mz-allergen-input-row {
  display: grid;
  grid-template-columns: 1fr 82px;
  gap: 10px;
  margin: 14px 0;
}

.mz-editor-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.mz-visibility-switch {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 12px;
  width: 100%;
  margin: 4px 0 14px;
  padding: 15px;
  text-align: left;
}

.mz-visibility-switch span {
  position: relative;
  grid-row: span 2;
  width: 42px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: #b8c3bc;
}

.mz-visibility-switch span i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  transition: left var(--motion-base) var(--ease-standard);
}

.mz-visibility-switch.is-on span {
  background: var(--color-green);
}

.mz-visibility-switch.is-on span i {
  left: 21px;
}

.mz-visibility-switch em {
  color: var(--color-muted);
  font-style: normal;
  font-size: 12px;
}

.mz-save-btn,
.mz-delete-btn {
  width: 100%;
  min-height: 48px;
}

.mz-delete-btn {
  margin-top: 10px;
  color: #6c5d4e;
}

.mz-modal {
  max-width: min(620px, calc(100vw - 32px));
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  z-index: var(--z-modal);
}

.mz-drawer {
  width: min(480px, 100%);
  min-height: 100%;
  padding: var(--space-6);
  border-radius: var(--radius-xl) 0 0 var(--radius-xl);
  z-index: var(--z-drawer);
}

.mz-toast {
  display: grid;
  gap: var(--space-1);
  max-width: 360px;
  padding: var(--space-4);
  z-index: var(--z-toast);
}

.mz-tooltip {
  max-width: 260px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: #ffffff;
  background: var(--mz-text-900);
  box-shadow: var(--shadow-sm);
  font-size: 12px;
  z-index: var(--z-tooltip);
}

@media (max-width: 1180px) {
  .mz-product-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (min-width: 768px) and (max-width: 1180px) {
  .mz-product-card,
  .mz-add-product-card {
    width: 100%;
    min-height: 286px;
  }

  .mz-product-card > img {
    height: 142px;
  }

  .mz-product-card-body {
    padding: 14px;
  }

  .mz-product-card p {
    margin: 6px 0 14px;
  }

  .mz-product-metrics span {
    padding: 8px 9px;
  }

  .mz-add-product-card {
    padding: 24px;
  }

  .mz-add-product-card div {
    width: 54px;
    height: 54px;
    margin-bottom: 14px;
    font-size: 28px;
  }
}

@media (max-width: 980px) {
  .side-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .side-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .qr-card {
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .mz-search-sort,
  .mz-tabs {
    align-items: stretch;
    flex-direction: column;
  }

  .mz-search-sort input,
  .mz-search-sort button,
  .mz-tabs button {
    width: 100%;
  }

  .mz-editor-row,
  .mz-image-upload-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mz-product-card,
  .mz-add-product-card {
    transition: none;
  }

  .mz-product-card:hover,
  .mz-add-product-card:hover {
    transform: none;
  }
}
