/* ═══════════════════════════════════════════════════
   KuboRESTO — Admin Panel Styles (Desktop-first)
   ═══════════════════════════════════════════════════ */

:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --bg-accent: #e8ecf1;
  --ink: #1a202c;
  --muted: #64748b;
  --primary: #dc2626;
  --secondary: #5B4B9E;
  --secondary-light: #7c6cbf;
  --secondary-dark: #453880;
  --success: #10b981;
  --card: #ffffff;
  --stroke: rgba(26, 32, 44, 0.08);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
  --sidebar-w: 260px;
  --topbar-h: 64px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Custom Scrollbars ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.25);
  border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.45);
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.25) transparent;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 0.9375rem;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

/* ── App Shell ── */
.app-shell {
  min-height: 100vh;
}

/* ── Sidebar ── */
.side-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: linear-gradient(180deg, var(--secondary) 0%, var(--secondary-dark) 100%);
  color: #ffffff;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  z-index: 1001;
  overflow-y: auto;
  transition: left 0.3s cubic-bezier(.4,0,.2,1);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 4px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.brand__title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand__subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.side-nav__item {
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.75);
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.side-nav__item:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.side-nav__item.is-active {
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #fff;
}

.side-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.logout-btn-menu {
  width: 100%;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.logout-btn-menu:hover {
  background: rgba(220, 38, 38, 0.7);
  border-color: transparent;
  color: #fff;
}

/* ── Main Content ── */
.main-content {
  margin-left: var(--sidebar-w);
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* ── Top Bar ── */
.top-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 40px;
  height: var(--topbar-h);
  background: var(--card);
  border-bottom: 1px solid var(--stroke);
  position: sticky;
  top: 0;
  z-index: 100;
}

.business-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.business-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.business-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  font-weight: 400;
}

/* Hamburger: hidden on desktop */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.menu-toggle:hover {
  background: var(--bg);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--secondary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.brand-mobile {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-mobile .brand__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary);
}

.brand-mobile .brand__subtitle {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Overlay: only for mobile sidebar */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.menu-overlay.show {
  opacity: 1;
  visibility: visible;
}

.top-actions {
  display: flex;
  gap: 12px;
}

/* ── Buttons ── */
button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.15s ease;
  border: 1.5px solid transparent;
}

button.primary {
  background: var(--secondary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(91, 75, 158, 0.3);
}

button.primary:hover {
  background: var(--secondary-dark);
  box-shadow: 0 4px 16px rgba(91, 75, 158, 0.4);
  transform: translateY(-1px);
}

button.primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(91, 75, 158, 0.3);
}

button.ghost {
  background: transparent;
  border: 1.5px solid var(--stroke);
  color: var(--ink);
}

button.ghost:hover {
  background: var(--bg);
  border-color: var(--secondary-light);
  color: var(--secondary);
}

button.ghost:active {
  background: var(--bg-accent);
}

/* ── Sections ── */
.section {
  display: none;
  flex-direction: column;
  gap: 28px;
  animation: fadeIn 0.35s ease;
  padding: 32px 40px;
}

.section.is-visible {
  display: flex;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.section-header h2 {
  font-size: 1.5rem;
  color: var(--ink);
}

.section-header p {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 4px;
}

/* ── Grid & Cards (Metrics) ── */
.grid.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1400px) {
  .grid.cards {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

.card {
  background: var(--card);
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary), var(--secondary-light));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(91, 75, 158, 0.15);
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.card p {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

.metric {
  font-size: 2rem;
  font-weight: 800;
  display: block;
  margin: 8px 0 4px;
  color: var(--ink);
  letter-spacing: -0.03em;
  font-family: "Outfit", sans-serif;
}

/* ── Layout helpers ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 1200px) {
  .three-col {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .two-col,
  .three-col {
    grid-template-columns: 1fr;
  }
}

/* ── Panels ── */
.panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-sm);
}

.panel h2 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--ink);
}

.panel.accent {
  background: var(--bg-accent);
}

/* ── Chips ── */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.chips li {
  background: var(--bg);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
}

/* ── Category sections (Menu) ── */
.category-section {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  padding: 28px;
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--bg);
}

.category-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-title h3 {
  font-size: 1.25rem;
  margin: 0;
  color: var(--secondary);
  font-weight: 700;
}

.category-title p {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}

.category-actions {
  display: flex;
  gap: 8px;
}

/* ── Menu grid / cards ── */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.menu-card {
  background: #fff;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.menu-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(91, 75, 158, 0.15);
}

.menu-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.menu-card-info {
  flex: 1;
}

.menu-card-info h4 {
  font-size: 1.05rem;
  margin: 0 0 4px 0;
  color: var(--ink);
  font-weight: 600;
}

.menu-card-info p {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.5;
}

.menu-card .price {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--secondary);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.menu-card-footer {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--bg-accent);
}

/* ── Status badges ── */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  white-space: nowrap;
}

.status-badge.active {
  background: #ecfdf5;
  color: #065f46;
  border-color: #6ee7b7;
}

.status-badge.inactive {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

.empty-category {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.empty-category p {
  margin-bottom: 16px;
}

/* ── Orders ── */
.orders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 16px;
}

.order-card {
  background: var(--card);
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.order-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: rgba(91, 75, 158, 0.12);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--stroke);
}

.order-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-id {
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary);
}

.order-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.order-customer-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
}

.customer-detail {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.875rem;
}

.customer-label {
  font-weight: 600;
  color: var(--muted);
  min-width: 90px;
  font-size: 0.8rem;
}

.customer-value {
  color: var(--ink);
  font-weight: 500;
}

.order-type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg);
  color: var(--secondary);
  border: 1px solid var(--stroke);
}

.table-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.order-notes {
  background: #fffbeb;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid #f59e0b;
  font-size: 0.85rem;
  color: #78350f;
}

.order-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1.5px solid transparent;
}

.order-status-badge.pending {
  background: #fefce8;
  color: #854d0e;
  border-color: #fde047;
}

.order-status-badge.confirmed {
  background: #eff6ff;
  color: #1e40af;
  border-color: #93c5fd;
}

.order-status-badge.preparing {
  background: #fdf4ff;
  color: #86198f;
  border-color: #e879f9;
}

.order-status-badge.ready {
  background: #ecfdf5;
  color: #065f46;
  border-color: #6ee7b7;
}

.order-status-badge.delivered {
  background: #eef2ff;
  color: #3730a3;
  border-color: #a5b4fc;
}

.order-status-badge.ready_pickup {
  background: #ecfdf5;
  color: #065f46;
  border-color: #6ee7b7;
}

.order-status-badge.picked_up {
  background: #eef2ff;
  color: #3730a3;
  border-color: #a5b4fc;
}

.order-status-badge.served {
  background: #ecfdf5;
  color: #065f46;
  border-color: #6ee7b7;
}

.order-status-badge.on_the_way {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fdba74;
}

.order-status-badge.cancelled {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

.order-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--stroke);
}

.order-total {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--secondary);
  letter-spacing: -0.02em;
}

/* ── Customers ── */
.customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.customer-card {
  background: var(--card);
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

.customer-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(91, 75, 158, 0.12);
}

.customer-card h3 {
  margin: 0 0 6px 0;
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 600;
}

.customer-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.customer-card .customer-phone {
  font-weight: 600;
  color: var(--ink);
}

/* ── QR Panel ── */
.qr-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
}

.qr-preview {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--stroke);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.qr-box {
  width: 180px;
  height: 180px;
  background: var(--bg);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  font-weight: 700;
  margin: 0 auto 16px;
}

.qr-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Modal (Desktop: centered card) ── */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 40px;
  z-index: 1000;
}

.modal.is-open {
  display: flex;
}

.modal-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 0;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.25s ease;
  overflow: hidden;
}

.modal-card > div,
.modal-card form {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-card header {
  background: var(--secondary);
  color: #fff;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: var(--radius) var(--radius) 0 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-card header h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.modal-card header button {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.modal-card header button:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.modal-card form {
  display: grid;
  gap: 16px;
  padding: 24px;
}

/* ── Forms ── */
label {
  display: grid;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}

label small {
  font-weight: 400;
  margin-top: 2px;
  color: var(--muted);
}

input,
select,
textarea {
  border: 1.5px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.875rem;
  transition: all 0.15s ease;
  background: var(--bg);
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--secondary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(91, 75, 158, 0.1);
}

input[type="file"] {
  padding: 10px;
  cursor: pointer;
}

.filter {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
}

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Login ── */
.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
}

.login-container {
  width: min(420px, 100%);
}

.login-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 40px 36px;
  border: none;
  box-shadow: var(--shadow-lg);
  display: grid;
  gap: 24px;
}

.brand-login {
  text-align: center;
  display: grid;
  gap: 6px;
}

.login-form {
  display: grid;
  gap: 16px;
}

.form-group {
  display: grid;
  gap: 6px;
}

.btn-block {
  width: 100%;
}

.divider {
  text-align: center;
  color: var(--muted);
  position: relative;
  margin: 8px 0;
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--stroke);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

.toggle-form {
  text-align: center;
}

/* ── Toggle Switch ── */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.25s;
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--success);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.error-message {
  color: var(--primary);
  font-size: 0.85rem;
  min-height: 20px;
}

.logout-btn {
  margin-left: auto;
}

/* ── Tap behavior ── */
button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE — Mobile (max-width: 1024px)
   ═══════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .side-panel {
    left: -280px;
    width: 280px;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  }

  .side-panel.open {
    left: 0;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .menu-toggle {
    display: flex;
  }

  .top-bar {
    padding: 0 20px;
    height: 56px;
  }

  .section {
    padding: 20px;
  }

  .grid.cards {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .orders {
    grid-template-columns: 1fr;
  }

  .qr-panel {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 0;
  }

  .modal-card {
    max-width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
  }

  .modal-card header {
    border-radius: 0;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 16px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .section-header > div:last-child {
    width: 100%;
  }

  .section-header button,
  .section-header .filter {
    width: 100%;
  }

  .grid.cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .card {
    padding: 16px;
  }

  .metric {
    font-size: 1.6rem;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }

  .menu-card-header {
    flex-direction: column;
    gap: 8px;
  }

  .menu-card-footer {
    flex-direction: column;
  }

  .menu-card-footer button {
    width: 100%;
  }

  .category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .category-actions {
    width: 100%;
  }

  .category-actions button {
    flex: 1;
  }

  .order-actions {
    flex-direction: column;
  }

  .order-actions select,
  .order-actions button {
    width: 100%;
  }

  .customer-grid {
    grid-template-columns: 1fr;
  }

  input, select, textarea {
    font-size: 16px !important;
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .top-bar {
    padding: 0 12px;
  }

  .section {
    padding: 12px;
  }

  .grid.cards {
    grid-template-columns: 1fr;
  }

  .business-name {
    font-size: 1.1rem;
  }

  .category-section {
    padding: 16px 12px;
  }

  .order-card,
  .menu-card,
  .customer-card {
    padding: 14px;
  }
}
