:root {
  --cream: #fff8ee;
  --ink: #2e2118;
  --muted: #7d6a5c;
  --pistachio: #5b7a4e;
  --pistachio-deep: #33512f;
  --rose: #c4576e;
  --gold: #c9a24b;
  --line: #efdfc9;
  --danger: #b3261e;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body.admin-body {
  margin: 0;
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
}

.admin-header {
  background: var(--pistachio-deep);
  color: #fff;
  padding: 22px 18px;
}
.admin-header-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.admin-title { font-family: var(--serif); margin: 0; font-size: 1.7rem; }
.admin-sub { margin: 4px 0 0; opacity: 0.85; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.78rem; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-btn {
  border: 0; border-radius: 999px; padding: 10px 18px;
  font-weight: 800; font: inherit; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center;
}
.admin-btn.light { background: #fff; color: var(--pistachio-deep); }
.admin-btn.gold { background: var(--gold); color: #2e2118; }
.admin-btn.danger { background: var(--rose); color: #fff; }

.admin-main { max-width: 1180px; margin: 0 auto; padding: 22px 18px 60px; }

.demo-alert {
  background: #fdf3da; border: 1px dashed var(--gold); border-radius: 14px;
  padding: 14px 18px; font-size: 0.95rem; margin-bottom: 20px;
}

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat-tile {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 18px; display: flex; flex-direction: column; gap: 4px;
}
.stat-num { font-family: var(--serif); font-size: 1.9rem; font-weight: 800; color: var(--pistachio-deep); }
.stat-name { color: var(--muted); font-weight: 700; font-size: 0.88rem; }

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 20px; margin-bottom: 22px;
}
.panel-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head h2 { font-family: var(--serif); margin: 0; font-size: 1.35rem; }
.panel-note { color: var(--muted); font-size: 0.88rem; font-weight: 600; }

.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 640px; }
.admin-table th {
  text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--line);
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted);
}
.admin-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table tr:last-child td { border-bottom: 0; }
.cell-sub { color: var(--muted); font-size: 0.84rem; }
.sample-tag {
  background: #f7ecd2; color: #6b5316; font-size: 0.7rem; font-weight: 800;
  padding: 2px 8px; border-radius: 999px; margin-left: 6px; text-transform: uppercase; letter-spacing: 0.05em;
}
.empty-cell { color: var(--muted); text-align: center; padding: 26px 12px !important; font-weight: 700; }

.status-select {
  font: inherit; font-weight: 700; border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px;
  background: var(--cream);
}
.row-btn {
  border: 1px solid var(--line); background: var(--cream); border-radius: 999px;
  padding: 7px 13px; font-weight: 800; font: inherit; font-size: 0.84rem; cursor: pointer;
}
.row-btn:hover { background: #fceedd; }
.danger-btn { color: var(--danger); border-color: #f0c8c4; }

.price-input {
  width: 110px; font: inherit; font-weight: 700;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--cream);
}
.switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.88rem; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--pistachio); }
.editor-actions { white-space: nowrap; }
.editor-table { min-width: 720px; }

.admin-foot { color: var(--muted); font-size: 0.88rem; text-align: center; }

.admin-toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 16px);
  background: var(--ink); color: #fff; font-weight: 800; font-size: 0.9rem;
  padding: 11px 18px; border-radius: 999px;
  opacity: 0; visibility: hidden; transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  max-width: 92vw; text-align: center; z-index: 50;
}
.admin-toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
