:root {
  --plum: #2a1030; --plum-2: #3d1745; --paper: #fffdf8; --bg: #f6efe3; --ink: #2c2130; --muted: #837489;
  --gold: #c9a227; --gold-soft: #e9c56a; --green: #1e7a4f; --wine: #8e2a4e;
  --line: rgba(42,16,48,.14); --shadow: 0 16px 38px rgba(42,16,48,.10);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Jost", system-ui, sans-serif; line-height: 1.5; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.admin-body { min-height: 100vh; }
.admin-topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 13px max(18px, calc((100vw - 1240px)/2)); background: rgba(42,16,48,.97); backdrop-filter: blur(14px);
  border-bottom: 3px solid var(--gold); color: #faf3e3;
}
.admin-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.admin-badge { width: 47px; height: 47px; display: grid; place-items: center; border-radius: 50%; background: var(--plum-2); color: var(--gold-soft); border: 2px solid var(--gold); font-family: "Marcellus", serif; font-size: 1.35rem; }
.admin-title-wrap { display: grid; line-height: 1.15; }
.admin-title { font-family: "Marcellus", serif; font-size: 1.3rem; letter-spacing: .04em; }
.admin-subtitle { color: #cdbcd2; font-size: .82rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.admin-button { border: 1.5px solid var(--gold-soft); border-radius: 999px; padding: 10px 15px; font-weight: 600; background: transparent; color: #faf3e3; text-decoration: none; }
.primary-button { background: var(--gold); border-color: var(--gold); color: var(--plum); }
.ghost-button { box-shadow: none; }
.danger-button { background: #fbeef2; color: var(--wine); border-color: var(--wine); box-shadow: none; }
.admin-main { width: min(1240px, calc(100% - 28px)); margin: 0 auto; padding: 28px 0 54px; }
.demo-alert { background: #fdf3d3; border: 1.5px dashed #9a7a12; color: #5f4a00; border-radius: 16px; padding: 16px 18px; font-weight: 600; }
.admin-hero { display: flex; justify-content: space-between; align-items: end; gap: 22px; margin: 28px 0 18px; }
.admin-heading { font-family: "Marcellus", serif; font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.05; letter-spacing: .01em; margin: 0; color: var(--plum); }
.admin-intro { color: var(--muted); max-width: 690px; margin: 10px 0 0; }
.sample-tag { display: inline-block; background: var(--gold-soft); color: var(--plum); border-radius: 999px; padding: 3px 8px; font-size: .72rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.admin-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin: 20px 0; }
.admin-stat { background: var(--paper); border: 1.5px solid var(--line); border-top: 5px solid var(--gold); border-radius: 16px; padding: 20px; box-shadow: 0 10px 24px rgba(42,16,48,.06); }
.stat-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .09em; }
.stat-num { display: block; font-family: "Marcellus", serif; font-size: 2.1rem; line-height: 1; margin-top: 13px; color: var(--plum); }
.stat-name { color: var(--muted); font-weight: 500; }
.admin-section { background: var(--paper); border: 1.5px solid var(--line); border-radius: 20px; padding: 22px; margin-top: 17px; box-shadow: 0 12px 28px rgba(42,16,48,.05); }
.section-bar { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.admin-section-title { font-family: "Marcellus", serif; font-size: 1.5rem; letter-spacing: .02em; margin: 0; color: var(--plum); }
.admin-section-note { color: var(--muted); margin: 6px 0 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.data-table th { text-align: left; background: var(--plum); color: #f3e5bb; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; padding: 12px; }
.data-table td { padding: 13px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.record-main { font-weight: 600; }
.record-sub { color: var(--muted); font-size: .87rem; }
.items-summary { max-width: 330px; }
.status-select { border: 1.5px solid var(--line); background: #fdf8ec; border-radius: 999px; padding: 8px 10px; font-weight: 600; }
.delete-button { border: 0; background: transparent; color: var(--wine); font-weight: 600; padding: 6px; }
.empty-state { padding: 24px; text-align: center; color: var(--muted); font-weight: 600; background: #fdf8ec; border-radius: 14px; }
.message-list { display: grid; gap: 11px; }
.message-card { border: 1.3px solid var(--line); background: #fdf8ec; border-radius: 14px; padding: 15px; }
.message-head { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.message-text { color: #574a5e; margin: 8px 0 0; }
.menu-editor-table { min-width: 820px; }
.price-input { width: 120px; border: 1.5px solid var(--line); border-radius: 11px; padding: 9px 10px; background: #fdf8ec; font-weight: 600; }
.toggle-wrap { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.availability-toggle { width: 21px; height: 21px; accent-color: var(--green); }
.save-button { border: 1.5px solid var(--plum); background: var(--gold); color: var(--plum); border-radius: 999px; padding: 8px 13px; font-weight: 600; }
.override-note { color: var(--wine); font-size: .82rem; font-weight: 600; }
.admin-footer { color: var(--muted); text-align: center; padding: 24px 0 0; font-size: .9rem; }
.admin-toast { position: fixed; left: 50%; bottom: 24px; z-index: 40; transform: translate(-50%, 18px); opacity: 0; pointer-events: none; background: var(--plum); color: #fff; border: 1px solid var(--gold); border-radius: 999px; padding: 12px 17px; font-weight: 600; transition: .22s ease; }
.admin-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 1020px) { .admin-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-topbar, .admin-hero { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 520px) { .admin-stats { grid-template-columns: 1fr; } .admin-main { width: min(100% - 18px, 1240px); } .admin-section { padding: 16px; } }
