:root {
  --bg: #f3f1ec;
  --ink: #1c1917;
  --muted: #78716c;
  --accent: #0f766e;
  --surface: #fff;
  --danger: #b91c1c;
  --ok: #15803d;
  --radius: 12px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); }
a { color: inherit; text-decoration: none; }
h1,h2,h3 { font-family: var(--display); font-weight: 600; }

.panel { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; background: #1c1917; color: #fafaf9; padding: 1.25rem 1rem;
  display: flex; flex-direction: column; gap: .5rem; flex-shrink: 0;
}
.sidebar.dark { background: #0c0a09; }
.sidebar .brand { font-family: var(--display); font-size: 1.25rem; margin-bottom: 1rem; }
.branch-switch {
  margin-bottom: .85rem;
  padding: .5rem .35rem .75rem;
  border-bottom: 1px solid #44403c;
}
.branch-switch label {
  display: flex; flex-direction: column; gap: .35rem;
  font-size: .75rem; color: #a8a29e; text-transform: uppercase; letter-spacing: .04em;
}
.branch-switch select {
  font: inherit; font-size: .9rem; text-transform: none; letter-spacing: 0;
  color: #fafaf9; background: #292524; border: 1px solid #44403c;
  border-radius: 8px; padding: .45rem .55rem;
}
.sidebar nav { display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.sidebar a { padding: .55rem .75rem; border-radius: 8px; color: #e7e5e4; }
.sidebar a:hover { background: #292524; }
.sidebar .nav-divider {
  margin: .85rem 0 .35rem;
  padding: .35rem .75rem 0;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #78716c;
  border-top: 1px solid #44403c;
  padding-top: .75rem;
}
.sidebar-user { font-size: .85rem; color: #a8a29e; padding-top: 1rem; border-top: 1px solid #44403c; }
.main { flex: 1; padding: 1.5rem 2rem; overflow: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #d6d3d1; background: #fff; color: var(--ink);
  padding: .55rem 1rem; border-radius: 8px; cursor: pointer; font: inherit;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { background: #fef2f2; border-color: #fecaca; color: var(--danger); }
.btn.sm { padding: .35rem .65rem; font-size: .85rem; }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }

.stack { display: flex; flex-direction: column; gap: .75rem; }
.stack.compact { gap: .5rem; }
.stack label { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; }
input, select, textarea {
  font: inherit; padding: .55rem .7rem; border: 1px solid #d6d3d1;
  border-radius: 8px; background: #fff;
}
textarea { min-height: 70px; resize: vertical; }

.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: .75rem; border-bottom: 1px solid #e7e5e4; font-size: .95rem; }
.table th { background: #fafaf9; font-weight: 600; }

.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.alert.ok { background: #f0fdf4; color: var(--ok); }
.alert.err { background: #fef2f2; color: var(--danger); }

.stats { display: flex; gap: 1rem; margin: 1rem 0 1.5rem; flex-wrap: wrap; }
.stat {
  background: var(--surface); padding: 1rem 1.25rem; border-radius: var(--radius);
  min-width: 120px; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.stat span { display: block; font-size: 1.6rem; font-family: var(--display); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } .panel { flex-direction: column; } .sidebar { width: 100%; } }

.box { background: var(--surface); padding: 1rem; border-radius: var(--radius); margin: .75rem 0; border: 1px solid #e7e5e4; }
.muted { color: var(--muted); }
.hint { font-size: .85rem; color: var(--muted); margin-top: 1rem; }
.demo-login-hint {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  background: #f4f7fb;
  border: 1px dashed #c5d0de;
  font-size: .9rem;
}
.demo-login-hint strong { display: block; margin-bottom: .35rem; }
.demo-login-hint p { margin: 0 0 .55rem; color: var(--muted); }
.demo-login-hint ul { list-style: none; margin: 0 0 .75rem; padding: 0; }
.demo-login-hint li {
  display: flex; flex-wrap: wrap; gap: .35rem .65rem;
  align-items: baseline;
  margin-bottom: .35rem;
}
.demo-login-hint li span { color: var(--muted); min-width: 3.5rem; }
.demo-login-hint code {
  font-size: .86rem;
  padding: .15rem .4rem;
  border-radius: 5px;
  background: #fff;
  border: 1px solid #d7e0ea;
}
.badge { display: inline-block; padding: .15rem .5rem; border-radius: 999px; background: #e7e5e4; font-size: .8rem; }
.badge.ok { background: #dcfce7; color: var(--ok); }
.badge.warn { background: #fef3c7; color: #92400e; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.inline, .inline-form { display: inline-flex; gap: .35rem; align-items: center; margin: .25rem 0; flex-wrap: wrap; }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }

.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
.theme-card { background: #fff; border: 2px solid; border-radius: var(--radius); padding: 1rem; }
.theme-swatch { height: 48px; border-radius: 8px; margin-bottom: .5rem; }

.auth-page {
  min-height: 100vh; display: grid; place-items: center;
  background: linear-gradient(145deg, #0f766e 0%, #134e4a 40%, #1c1917 100%);
}
.auth-card {
  background: #fff; padding: 2rem; border-radius: 16px; width: min(400px, 92vw);
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
}

.staff-header {
  display: flex; gap: 1rem; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; background: #1c1917; color: #fafaf9; flex-wrap: wrap;
}
.staff-header nav { display: flex; gap: .75rem; }
.staff-header a { color: #d6d3d1; }
.staff-main { padding: 1.25rem; max-width: 900px; margin: 0 auto; }

.order-list { display: flex; flex-direction: column; gap: 1rem; }
.order-card {
  background: #fff; border-radius: var(--radius); padding: 1rem;
  border-left: 4px solid #a8a29e; box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.order-card.status-pending { border-left-color: #ea580c; }
.order-card.status-kitchen_approved { border-left-color: #0284c7; }
.order-card.status-preparing { border-left-color: #7c3aed; }
.order-card.status-ready { border-left-color: #16a34a; }
.order-card .note { background: #fff7ed; padding: .5rem .75rem; border-radius: 8px; }
.order-card .note.highlight { background: #fef3c7; font-weight: 500; }
.order-card ul { margin: .5rem 0; padding-left: 1.1rem; }
.order-card footer { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .5rem; }

/* Pricing */
.pricing-page { padding: 2rem 1.25rem 3rem; max-width: 1100px; margin: 0 auto; color: #1c1917; }
.pricing-hero { margin-bottom: 2rem; }
.pricing-hero .brand-mark { font-family: var(--display); font-size: 1.75rem; margin: 0; }
.pricing-hero h1 { font-size: 1.35rem; font-weight: 500; max-width: 36ch; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.pricing-card {
  background: #fff; border: 1px solid #e7e5e4; border-radius: 16px; padding: 1.25rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.pricing-card h2, .pricing-card h3 { font-family: var(--display); margin: 0; }
.price-tag { font-size: 1.6rem; font-weight: 700; margin: .25rem 0; }
.capacity { font-size: .95rem; }
.feat-list { margin: .5rem 0 1rem; padding-left: 1.1rem; flex: 1; color: #57534e; }
.feat-list li { margin: .25rem 0; }
.pricing-foot { text-align: center; margin-top: 2rem; }
.admin-pricing .pricing-card { box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.package-edit { margin-bottom: 1rem; }

