.admin-list-page,
.admin-editor-page {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 5px 18px rgba(73, 38, 44, .05);
}

.admin-list-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 10px;
}

.admin-list-controls input,
.admin-list-controls select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cfc1bd;
  border-radius: 10px;
  padding: .68rem .75rem;
  background: #fff;
}

.admin-dish-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.admin-dish-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdfb;
}

.admin-dish-summary {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.admin-dish-thumb,
.admin-dish-placeholder {
  width: 96px;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: #f0e9e3;
}

.admin-dish-thumb {
  display: block;
  object-fit: cover;
}

.admin-dish-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.admin-dish-copy {
  min-width: 0;
}

.admin-dish-heading {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.admin-dish-heading h2 {
  margin: 0;
  font-size: 1.05rem;
}

.admin-dish-copy p,
.admin-dish-copy small {
  display: block;
  margin: 3px 0 0;
  color: var(--muted);
}

.status-pill {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 800;
}

.status-pill.published {
  background: #e4f5e9;
  color: #226035;
}

.status-pill.draft {
  background: #f3eee7;
  color: #68594c;
}

.admin-dish-actions,
.editor-save-actions,
.editor-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-dish-actions button {
  min-width: 64px;
}

.editor-nav {
  justify-content: space-between;
  margin-bottom: 8px;
}

.editor-save-actions {
  justify-content: flex-end;
  margin-top: 4px;
}

.admin-editor-page {
  max-width: 900px;
  margin: 0 auto;
}

.admin-list-empty {
  margin-top: 0;
}

.upload-policy {
  display: grid;
  gap: 3px;
  margin: 10px 0 14px;
  padding: 12px 14px;
  border: 1px solid #e5c879;
  border-radius: 12px;
  background: #fff7df;
  color: #4d3b11;
}

.upload-policy span {
  font-size: .9rem;
}

.upload-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: end;
}

.upload-picker,
.upload-alt {
  display: grid;
  gap: 6px;
}

.field-label,
.upload-alt {
  font-size: .92rem;
  font-weight: 700;
}

.image-file-trigger {
  display: grid;
  place-items: center;
  gap: 2px;
  width: 100%;
  min-height: 88px;
  border: 2px solid var(--brand);
  border-radius: 14px;
  background: #fff3f6;
  color: var(--brand);
  box-shadow: 0 7px 18px rgba(159, 23, 61, .1);
}

.image-file-trigger strong {
  font-size: 1.08rem;
}

.image-file-trigger span {
  font-size: .84rem;
  font-weight: 500;
}

.image-file-trigger:not(:disabled):hover {
  border-color: var(--brand-dark);
  background: #ffe8ee;
}

.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.upload-alt input {
  min-height: 48px;
}

.upload-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
}

.prepared-image {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8f5f1;
}

.prepared-image[hidden] {
  display: none;
}

.prepared-image img {
  width: 120px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #fff;
}

.prepared-image div {
  display: grid;
  gap: 2px;
}

.prepared-image span {
  color: var(--muted);
  font-size: .85rem;
}

.crop-dialog {
  width: min(720px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(45, 36, 38, .28);
}

.crop-dialog::backdrop {
  background: rgba(32, 25, 27, .68);
}

.crop-card {
  padding: 20px;
}

.crop-card h2 {
  margin: .15rem 0;
}

.crop-card > p {
  margin: .35rem 0 12px;
}

.crop-card canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  background: #f7f5f2;
  box-shadow: inset 0 0 0 1px var(--line);
}

.crop-position-label {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  font-weight: 700;
}

.crop-position-label input {
  width: 100%;
}

@media (max-width: 600px) {
  .admin-list-page,
  .admin-editor-page {
    padding: 13px;
  }

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

  .admin-list-controls,
  .admin-dish-card {
    grid-template-columns: 1fr;
  }

  .admin-dish-summary {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .admin-dish-thumb,
  .admin-dish-placeholder {
    width: 84px;
  }

  .admin-dish-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .admin-dish-actions button,
  .editor-save-actions button {
    width: 100%;
  }

  .editor-save-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .upload-fields {
    grid-template-columns: 1fr;
  }

  .crop-card {
    padding: 14px;
  }

  .prepared-image {
    align-items: flex-start;
  }

  .prepared-image img {
    width: 100px;
  }
}
