/* Admin panel — same palette, plainer chrome than the public site. */

.admin-top {
  background: var(--green-deep);
  color: var(--sage-pale);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-top a { color: var(--sage-pale); text-decoration: none; font-size: 0.88rem; }
.admin-top a:hover { color: #fff; }

.admin-top__title {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: #fff;
}

.admin-top__meta {
  font-size: 0.76rem;
  color: var(--sage-soft);
  letter-spacing: 0.06em;
}

.admin-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 34px 24px 80px;
}

.login {
  max-width: 400px;
  margin: 12vh auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 32px;
  box-shadow: var(--shadow-md);
}

.login h1 { font-size: 1.5rem; margin-bottom: 6px; }
.login p { color: var(--ink-soft); font-size: 0.9rem; margin: 0 0 22px; }

.field { display: block; margin-bottom: 16px; }

.field > span {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-mid);
  font-weight: 600;
  margin-bottom: 6px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.field textarea { min-height: 84px; resize: vertical; }

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0 16px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.panel > h2 { font-size: 1.3rem; margin-bottom: 6px; }

/* Generated / your own */
.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin: -6px 0 22px;
}

.tab {
  padding: 9px 16px;
  border-radius: 9px 9px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.tab:hover { background: rgba(181, 200, 172, 0.18); }

.tab.is-active {
  color: var(--green-deep);
  border-bottom-color: var(--green-mid);
}

.paste-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}

.paste-box > summary {
  cursor: pointer;
  padding: 12px 16px;
  background: rgba(181, 200, 172, 0.22);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--green-deep);
  list-style: none;
}

.paste-box > summary::-webkit-details-marker { display: none; }
.paste-box > summary::after { content: " ▾"; color: var(--green-mid); }
.paste-box[open] > summary::after { content: " ▴"; }

.paste-box__inner { padding: 18px 18px 20px; }

.panel > .panel__hint {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin: 0 0 20px;
}

.admin-section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 38px 0 16px;
}

.admin-section-title h2 { font-size: 1.25rem; }

.badge {
  background: rgba(144, 167, 106, 0.28);
  color: var(--green-deep);
  border-radius: 20px;
  padding: 2px 11px;
  font-size: 0.76rem;
  font-weight: 600;
}

.badge--draft { background: rgba(142, 161, 134, 0.3); }
.badge--live { background: rgba(144, 167, 106, 0.4); }

.entry {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.entry__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.entry__head h3 { font-size: 1.15rem; }

.entry__sub {
  color: var(--ink-soft);
  font-size: 0.87rem;
  margin: 4px 0 0;
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.thumb {
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(34, 44, 29, 0.75);
  color: #fff;
  font-size: 0.8rem;
  line-height: 1;
}

.dropzone {
  display: block;
  border: 1.5px dashed var(--sage-soft);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.88rem;
  background: rgba(181, 200, 172, 0.12);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dropzone:hover,
.dropzone.is-over {
  background: rgba(181, 200, 172, 0.28);
  border-color: var(--green-mid);
}

.dropzone input { display: none; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
  align-items: center;
}

.btn-primary,
.btn-secondary,
.btn-danger {
  border-radius: 9px;
  padding: 10px 17px;
  font-weight: 600;
  font-size: 0.88rem;
  transition: filter 0.15s ease, background 0.15s ease;
}

.btn-primary { background: var(--green-deep); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--green-mid); }

.btn-secondary {
  background: rgba(181, 200, 172, 0.35);
  color: var(--green-deep);
}
.btn-secondary:hover:not(:disabled) { background: rgba(181, 200, 172, 0.6); }

.btn-danger { background: transparent; color: #8a3a2c; }
.btn-danger:hover:not(:disabled) { background: rgba(138, 58, 44, 0.09); }

button:disabled { opacity: 0.45; cursor: not-allowed; }

.gate-note {
  font-size: 0.83rem;
  color: #8a5a2c;
  background: rgba(212, 160, 90, 0.16);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 14px;
}

.notice {
  border-radius: 10px;
  padding: 11px 15px;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.notice--error { background: rgba(160, 60, 45, 0.1); color: #7d2f22; }
.notice--ok { background: rgba(144, 167, 106, 0.22); color: var(--green-deep); }
.notice--warn { background: rgba(212, 160, 90, 0.18); color: #7d5622; }

.recipe-preview {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.recipe-preview > summary {
  padding: 11px 16px;
  cursor: pointer;
  background: rgba(181, 200, 172, 0.2);
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--green-deep);
}

.recipe-preview__inner {
  padding: 16px 18px;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(200px, 1fr) 1.6fr;
  font-size: 0.9rem;
}

.recipe-preview h4 {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-mid);
  margin-bottom: 8px;
}

.recipe-preview ul,
.recipe-preview ol { margin: 0; padding-left: 19px; }
.recipe-preview li { margin-bottom: 6px; }

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 7px;
  vertical-align: -2px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-note {
  color: var(--ink-soft);
  font-size: 0.9rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
}

@media (max-width: 700px) {
  .admin-wrap { padding: 22px 16px 60px; }
  .panel { padding: 20px 18px; }
  .recipe-preview__inner { grid-template-columns: 1fr; }
}
