/* ==========================================================================
   ร้านเฝอลาว ณ เชียงแสน — ธีมหลักของระบบ
   โทนสีอบอุ่นสบายตา: ครีม + แดงลาว + ทอง ให้เข้ากับโลโก้ร้าน
   ========================================================================== */

:root {
  --cream:       #FDF8F0;
  --cream-deep:  #F6EADA;
  --surface:     #FFFFFF;
  --ink:         #2E2320;
  --muted:       #7A6A62;
  --line:        #EADFD2;

  --brand:       #8C1F23;
  --brand-dark:  #6E1619;
  --brand-soft:  #F8E9E6;
  --gold:        #B98B22;
  --gold-soft:   #F7EBCD;
  --green:       #3F6B4B;
  --green-soft:  #E7F0E8;

  --radius:      16px;
  --radius-sm:   10px;
  --shadow:      0 2px 10px rgba(99, 50, 35, .06);
  --shadow-lg:   0 10px 30px rgba(99, 50, 35, .10);
  --font:        'Sarabun', 'Noto Sans Thai', system-ui, -apple-system, sans-serif;
  --font-head:   'Kanit', 'Sarabun', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 500; line-height: 1.35; margin: 0; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

img { max-width: 100%; display: block; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.container-narrow { max-width: 760px; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.money { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.row-between { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.flex { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.grow { flex: 1 1 auto; min-width: 0; }
/* ช่องกรอกที่อยู่ในแถว flex ต้องยืดได้โดยไม่ดันปุ่มตกบรรทัด */
.flex > input.grow, .flex > select.grow { flex: 1 1 220px; width: auto; }

/* ---------- ส่วนหัวฝั่งลูกค้า ---------- */
.topbar {
  background: var(--brand);
  color: #FFF4E8;
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar .container { display: flex; align-items: center; gap: 14px; padding-top: 10px; padding-bottom: 10px; }
.topbar a { color: #FFF4E8; text-decoration: none; }
.topbar-logo { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; background: #fff; flex: 0 0 auto; }
.topbar-title { font-family: var(--font-head); font-size: 1.12rem; font-weight: 500; letter-spacing: .01em; }
.topbar-sub { font-size: .76rem; color: #EFC9A9; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.table-chip {
  background: var(--gold-soft);
  color: #5A3A05;
  border-radius: 999px;
  padding: 5px 13px;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- การ์ด ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card-tight { padding: 14px 16px; }
.card-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform .06s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--cream-deep); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #FFF6EC; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #FFF6EC; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #2B1F06; }
.btn-gold:hover { background: #A67C18; border-color: #A67C18; color: #2B1F06; }
.btn-green { background: var(--green); border-color: var(--green); color: #F2F8F3; }
.btn-green:hover { background: #335740; border-color: #335740; color: #F2F8F3; }
.btn-danger { background: #FFF; border-color: #D9A7A4; color: #9B2520; }
.btn-danger:hover { background: #FBECEA; color: #7C1C18; }
.btn-sm { min-height: 38px; padding: 0 13px; font-size: .86rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

/* ---------- ฟอร์ม ---------- */
label { font-size: .9rem; font-weight: 500; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
input[type=text], input[type=number], input[type=date], input[type=search],
input[type=password], input[type=time], select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid #D9CBBB;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: .95rem;
}
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 16px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: .95rem; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }

/* ---------- แจ้งเตือน ---------- */
.alert { border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; font-size: .93rem; }
.alert-success { background: var(--green-soft); border: 1px solid #BFD6C5; color: #2C5338; }
.alert-error { background: #FBEBE9; border: 1px solid #E2BCB8; color: #8C2A24; }
.alert-info { background: var(--gold-soft); border: 1px solid #E6D2A6; color: #5E4310; }

/* ---------- ป้ายสถานะ ---------- */
.badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-pending { background: #EFE8DF; color: #5A4A3E; }
.badge-cooking { background: var(--gold-soft); color: #6B4A06; }
.badge-ready   { background: #E3F0FA; color: #1E4E6B; }
.badge-served  { background: var(--green-soft); color: #2C5338; }
.badge-billing { background: var(--brand-soft); color: var(--brand-dark); }
.badge-paid    { background: var(--green-soft); color: #2C5338; }
.badge-off     { background: #EDE6DD; color: #6B5C52; }

/* ---------- หมวดหมู่แบบชิป ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: .92rem;
}
.chip:hover { background: var(--cream-deep); color: var(--ink); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #FFF4E8; font-weight: 500; }

/* ---------- การ์ดเมนูอาหาร ---------- */
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
[hidden] { display: none !important; }

.menu-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .12s ease, box-shadow .12s ease;
}
.menu-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.menu-card.is-out { opacity: .62; }
.menu-photo { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; background: var(--cream-deep); }
.menu-photo-empty {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  background: linear-gradient(135deg, var(--cream-deep), #EFDFC9);
  color: #8A6A4A;
  font-family: var(--font-head);
  font-size: 1rem;
}
.menu-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; }
.menu-name { font-family: var(--font-head); font-size: 1.02rem; font-weight: 500; }
.menu-desc { font-size: .83rem; color: var(--muted); line-height: 1.5; }
.menu-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.price { font-size: 1.12rem; font-weight: 600; color: var(--brand); font-variant-numeric: tabular-nums; }
.price-special { font-size: .8rem; color: var(--muted); }

/* ---------- แถบตะกร้าล่างจอ ---------- */
.cart-bar {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(99, 50, 35, .08);
  padding: 10px 0;
  z-index: 15;
}
.cart-bar .container { display: flex; gap: 12px; align-items: center; justify-content: space-between; }

/* ---------- ตาราง ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.data th, table.data td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.data th { font-size: .8rem; font-weight: 600; color: var(--muted); background: var(--cream); white-space: nowrap; }
table.data tbody tr:hover { background: #FCF7F0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tfoot td { font-weight: 600; border-top: 2px solid var(--line); }

/* ---------- หน้าแรกลูกค้า ---------- */
.hero {
  background: linear-gradient(180deg, #FFFDF9, var(--cream));
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: center;
  padding: 28px 20px 24px;
}
.hero img.logo { width: 132px; height: 132px; border-radius: 50%; margin: 0 auto 14px; border: 3px solid var(--gold); object-fit: cover; }
.hero h1 { font-size: 1.8rem; color: var(--brand); }
.hero p { color: var(--muted); margin: 6px 0 0; }
.table-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.table-pick a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 86px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
}
.table-pick a:hover { border-color: var(--brand); color: var(--ink); }
.table-pick .tnum { font-family: var(--font-head); font-size: 1.32rem; color: var(--brand); }

/* ---------- ไทม์ไลน์สถานะ ---------- */
.steps { display: flex; flex-wrap: wrap; gap: 10px; }
.step { flex: 1 1 140px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface); }
.step.is-done { border-color: var(--green); background: var(--green-soft); color: #2C5338; }
.step .n { font-size: .75rem; color: var(--muted); }
.step.is-done .n { color: #4A7558; }

/* ==========================================================================
   หลังบ้าน (Admin / Cashier / Kitchen)
   ========================================================================== */
.admin-shell { display: flex; min-height: 100vh; flex-wrap: wrap; align-items: stretch; }

.sidebar {
  flex: 1 1 236px;
  max-width: 262px;
  min-width: 236px;
  background: #241916;
  color: #E9DED4;
  padding: 18px 14px 26px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.sidebar-brand img { width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--gold); }
.sidebar-brand b { font-family: var(--font-head); font-weight: 500; font-size: .98rem; display: block; }
.sidebar-brand span { font-size: .74rem; color: #B5A294; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-title { font-size: .7rem; letter-spacing: .09em; color: #9B8778; padding: 10px 8px 6px; font-weight: 600; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 9px;
  color: #DCCFC3;
  text-decoration: none;
  font-size: .93rem;
}
.nav-link:hover { background: #342521; color: #FFF1E3; }
.nav-link.is-active { background: var(--gold-soft); color: #40260B; font-weight: 600; }
.nav-foot { margin-top: auto; border-top: 1px solid #3A2A25; padding-top: 14px; font-size: .8rem; color: #B5A294; }

.admin-main { flex: 999 1 640px; min-width: 0; padding: 22px 26px 42px; background: var(--cream); }
.page-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.page-head h1 { font-size: 1.5rem; }
.crumb { font-size: .8rem; color: var(--muted); }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.kpi .label { font-size: .84rem; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.kpi .value { font-family: var(--font-head); font-size: 1.62rem; font-weight: 500; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .hint { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dot-rev { background: var(--green); }
.dot-exp { background: var(--gold); }
.dot-profit { background: var(--brand); }
.dot-order { background: #7A6A62; }
.text-green { color: #2C6B45; }
.text-red { color: #A32A22; }

/* กราฟแท่งแบบ CSS ล้วน (ไม่ต้องพึ่งไลบรารีภายนอก) */
.chart { display: flex; gap: 12px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; height: 220px; padding-bottom: 26px; font-size: .72rem; color: var(--muted); text-align: right; min-width: 56px; font-variant-numeric: tabular-nums; }
.chart-area { flex: 1 1 auto; min-width: 0; overflow-x: auto; }
.chart-bars { display: flex; align-items: flex-end; gap: 10px; height: 194px; border-bottom: 1px solid var(--line); min-width: 420px; }
.chart-col { flex: 1 1 0; min-width: 26px; display: flex; align-items: flex-end; gap: 3px; height: 100%; }
.bar { flex: 1 1 0; border-radius: 4px 4px 0 0; min-height: 2px; }
.bar-rev { background: var(--green); }
.bar-exp { background: var(--gold); }
.chart-x { display: flex; gap: 10px; padding-top: 7px; min-width: 420px; }
.chart-x span { flex: 1 1 0; min-width: 26px; text-align: center; font-size: .72rem; color: var(--muted); }
.legend { display: flex; gap: 16px; align-items: center; font-size: .85rem; }
.legend i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }

.meter { height: 8px; border-radius: 4px; background: var(--cream-deep); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--brand); }

/* จอห้องครัว (โทนเข้ม อ่านง่ายจากระยะไกล) */
.kds { background: #17120F; min-height: 100vh; color: #F3EBE2; padding: 16px 20px 32px; }
.kds-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; border-bottom: 1px solid #332722; padding-bottom: 12px; margin-bottom: 16px; }
.kds-cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.kds-col { flex: 1 1 300px; min-width: 282px; display: flex; flex-direction: column; gap: 12px; }
.kds-col h2 { font-size: 1.05rem; display: flex; align-items: center; gap: 9px; border-bottom: 2px solid #332722; padding-bottom: 9px; }
.ticket { background: #211915; border: 2px solid #342821; border-radius: 13px; overflow: hidden; }
.ticket.is-late { border-color: #B3453A; }
.ticket-head { display: flex; flex-wrap: wrap; gap: 9px; align-items: baseline; padding: 12px 15px; border-bottom: 1px solid #342821; }
.ticket-table { font-family: var(--font-head); font-size: 1.25rem; }
.ticket-code { font-size: .78rem; color: #A3938A; }
.ticket-time { margin-left: auto; font-size: .8rem; padding: 3px 10px; border-radius: 999px; background: #342821; color: #D6C8BD; font-variant-numeric: tabular-nums; }
.ticket.is-late .ticket-time { background: #58201B; color: #FFCFC8; }
.ticket-body { padding: 12px 15px; display: flex; flex-direction: column; gap: 8px; }
.ticket-qty { font-family: var(--font-head); font-size: 1.1rem; color: #EFC071; min-width: 34px; }
.ticket-name { font-size: 1.04rem; }
.ticket-note { font-size: .86rem; font-weight: 600; color: #F0B86B; }
.ticket-foot { padding: 0 15px 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.kds .btn { border-color: #44362F; background: transparent; color: #E6DBD1; }
.kds .btn:hover { background: #2C221C; color: #FFF; }
.kds .btn-primary { background: var(--green); border-color: var(--green); color: #F2F8F3; }
.kds .btn-gold { background: #8A6413; border-color: #8A6413; color: #FFF3DA; }
.kds-empty { border: 1px dashed #3A2D26; border-radius: 12px; padding: 24px; text-align: center; color: #8E7F75; }

/* ---------- ปฏิทินไทย พ.ศ. ---------- */
.thaidate-wrap { position: relative; }
input.thaidate-display { cursor: pointer; background-image: none; }
.thaidate-panel {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  left: 0;
  min-width: 290px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}
.thaidate-head { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.thaidate-title {
  flex: 1 1 auto;
  text-align: center;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 500;
}
.thaidate-nav {
  width: 32px; height: 32px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.thaidate-nav:hover { background: var(--cream-deep); }
.thaidate-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.thaidate-dow { margin-bottom: 4px; }
.thaidate-dow span {
  text-align: center;
  font-size: .76rem;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 0;
}
.thaidate-day {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font);
  font-size: .95rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.thaidate-day:hover { background: var(--cream-deep); }
.thaidate-day.is-today { border-color: var(--gold); font-weight: 600; }
.thaidate-day.is-selected { background: var(--brand); border-color: var(--brand); color: #FFF4E8; font-weight: 600; }
.thaidate-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.thaidate-link {
  border: 0;
  background: none;
  color: var(--brand);
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 4px;
  min-height: 36px;
}
.thaidate-link:hover { color: var(--brand-dark); text-decoration: underline; }

/* ---------- ช่องจำนวนในตะกร้า (บันทึกอัตโนมัติ) ---------- */
input.qty-input {
  width: 96px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.qty-form.is-saving { opacity: .5; pointer-events: none; }

/* ---------- ช่องแสดงเงินทอน (หน้าแคชเชียร์) ---------- */
input.input-lg {
  min-height: 56px;
  font-size: 1.4rem;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.change-box {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 20px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--green-soft);
  border: 2px solid #9CC3A8;
}
.change-label { font-size: 1rem; font-weight: 600; color: #2C5338; }
.change-amount {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #2C6B45;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}
.change-box.is-short { background: #FBEBE9; border-color: #DCA19C; }
.change-box.is-short .change-label { color: #8C2A24; }
.change-box.is-short .change-amount { color: #A32A22; }
.change-box.is-idle { background: var(--cream); border-color: var(--line); }
.change-box.is-idle .change-label,
.change-box.is-idle .change-amount { color: var(--muted); }

/* ---------- ใบเสร็จ ---------- */
.receipt {
  max-width: 360px;
  margin: 20px auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 20px;
  font-size: .9rem;
}
.receipt h2 { text-align: center; font-size: 1.15rem; }
.receipt .line { border-top: 1px dashed #C9BBAC; margin: 10px 0; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt td { padding: 3px 0; vertical-align: top; }

@media print {
  body { background: #fff; }
  .no-print, .topbar, .sidebar, .cart-bar { display: none !important; }
  .admin-main { padding: 0; background: #fff; }
  .receipt { border: 0; box-shadow: none; margin: 0; max-width: 100%; }
}

@media (max-width: 560px) {
  /* บนมือถือแสดงเมนู 2 คอลัมน์ ลูกค้าจะเลื่อนหาเมนูได้เร็วกว่า */
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .menu-name { font-size: .95rem; }
  .menu-desc { display: none; }
  .menu-foot { gap: 6px; }
}

@media (max-width: 520px) {
  .topbar-title { font-size: 1rem; }
  .topbar-sub { display: none; }
  .topbar .container { gap: 10px; }
  .topbar-logo { width: 40px; height: 40px; }
}

@media (max-width: 720px) {
  .admin-main { padding: 18px 14px 36px; }
  .sidebar { max-width: 100%; min-width: 100%; flex-direction: column; }
  .sidebar .nav-group { flex-direction: row; flex-wrap: wrap; }
  .nav-title { width: 100%; }
  h1 { font-size: 1.45rem; }
}
