@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Karla:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --coal: #103d2c; --coal-2: #17422f; --paper: #fffdf6; --bg: #f4efdd; --ink: #22302a; --muted: #5c6b60;
  --red: #8dc63f; --red-dark: #5e9426; --amber: #e9b949; --green: #237a57;
  --line: rgba(16,61,44,.15); --shadow: 0 16px 38px rgba(16,61,44,.12);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Karla", 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(16,61,44,.97); backdrop-filter: blur(14px);
  border-bottom: 3px solid var(--red); color: #faf5e9;
}
.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% 50% 50% 8px; background: var(--red); color: #0a2a1d; border: 3px solid #faf5e9; font-family: "DM Serif Display", serif; font-size: 1.3rem; }
.admin-title-wrap { display: grid; line-height: 1.1; }
.admin-title { font-family: "DM Serif Display", serif; font-size: 1.3rem; letter-spacing: .03em; }
.admin-subtitle { color: #b9cdb4; font-size: .82rem; font-weight: 700; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.admin-button { border: 2px solid #faf5e9; border-radius: 999px; padding: 10px 15px; font-weight: 900; background: transparent; color: #faf5e9; text-decoration: none; }
.primary-button { background: var(--red); border-color: var(--red); color: #0a2a1d; }
.ghost-button { box-shadow: none; }
.danger-button { background: #fdecec; color: #b3402e; border-color: #b3402e; box-shadow: none; }
.admin-main { width: min(1240px, calc(100% - 28px)); margin: 0 auto; padding: 28px 0 54px; }
.demo-alert { background: #fdf3d7; border: 1.5px dashed #b07d4f; color: #7a5a33; border-radius: 16px; padding: 16px 18px; font-weight: 750; }
.admin-hero { display: flex; justify-content: space-between; align-items: end; gap: 22px; margin: 28px 0 18px; }
.admin-heading { font-family: "DM Serif Display", serif; font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: .98; letter-spacing: .01em; text-transform: uppercase; margin: 0; }
.admin-intro { color: var(--muted); max-width: 690px; margin: 10px 0 0; }
.sample-tag { display: inline-block; background: var(--amber); color: var(--ink); border-radius: 999px; padding: 3px 8px; font-size: .72rem; font-weight: 900; letter-spacing: .04em; }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 20px 0; }
.admin-stat { background: var(--paper); border: 1.5px solid var(--line); border-top: 5px solid var(--red); border-radius: 16px; padding: 20px; box-shadow: 0 10px 24px rgba(16,61,44,.07); }
.stat-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-weight: 900; font-size: .82rem; text-transform: uppercase; letter-spacing: .09em; }
.stat-num { display: block; font-family: "DM Serif Display", serif; font-size: 2.2rem; line-height: 1; margin-top: 13px; }
.stat-name { color: var(--muted); font-weight: 650; }
.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(16,61,44,.06); }
.section-bar { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.admin-section-title { font-family: "DM Serif Display", serif; font-size: 1.55rem; letter-spacing: .02em; text-transform: uppercase; margin: 0; }
.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(--coal); color: #faf5e9; 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: 900; }
.record-sub { color: var(--muted); font-size: .87rem; }
.items-summary { max-width: 330px; }
.status-select { border: 1.5px solid var(--line); background: #fffaf0; border-radius: 999px; padding: 8px 10px; font-weight: 800; }
.delete-button { border: 0; background: transparent; color: #b3402e; font-weight: 900; padding: 6px; }
.empty-state { padding: 24px; text-align: center; color: var(--muted); font-weight: 800; background: #fffaf0; border-radius: 14px; }
.message-list { display: grid; gap: 11px; }
.message-card { border: 1.3px solid var(--line); background: #fffaf0; border-radius: 14px; padding: 15px; }
.message-head { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.message-text { color: #4c5a50; 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: #fffaf0; font-weight: 800; }
.toggle-wrap { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; }
.availability-toggle { width: 21px; height: 21px; accent-color: var(--green); }
.save-button { border: 2px solid var(--coal); background: var(--amber); color: var(--ink); border-radius: 999px; padding: 8px 13px; font-weight: 900; }
.override-note { color: var(--red-dark); font-size: .82rem; font-weight: 850; }
.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(--coal); color: #fff; border-radius: 999px; padding: 12px 17px; font-weight: 900; transition: .22s ease; }
.admin-toast.show { opacity: 1; transform: translate(-50%, 0); }
@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; } }
