/* =====================================================
   CROUSTY TAC — Admin Panel Stylesheet
   - Company name on top-left (admin top bar)
   - Centered nav toggle & back arrow buttons
   - Clean responsive cards/tiles for mobile
   - Scroll options removed on sides
   - Zero horizontal overflow, vertical scroll when needed
   ===================================================== */

/* Global reset and scrollbar removal ("remove the scroll options in the sides") */
html {
  overflow-x: hidden;
  max-width: 100vw;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE / Edge */
}

*::-webkit-scrollbar,
html::-webkit-scrollbar,
body.admin::-webkit-scrollbar,
.admin-shell::-webkit-scrollbar,
.sidebar::-webkit-scrollbar,
.panel::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

body.admin {
  background: var(--bg);
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* -----------------------------------------------------
   Admin Login Screen
   ----------------------------------------------------- */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
  box-sizing: border-box;
}

.admin-login .box {
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 40px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow);
  box-sizing: border-box;
}

.admin-login .brand {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--orange);
  text-align: center;
  margin-bottom: 2px;
}

.admin-login p.sub {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
}

.admin-login input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  font-size: 14px;
  box-sizing: border-box;
}

.admin-login button {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  border: none;
  background: var(--orange);
  color: #fff;
  font-weight: 800;
  font-size: 14.5px;
  cursor: pointer;
}

.admin-login .error {
  color: var(--orange-deep);
  font-size: 13px;
  margin-bottom: 10px;
  text-align: center;
}

/* -----------------------------------------------------
   Admin Top Bar with Company Name on Top Left
   ----------------------------------------------------- */
.admin-topbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(251, 249, 247, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1.5px solid var(--line);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-sizing: border-box;
  box-shadow: 0 2px 12px rgba(34, 27, 21, 0.04);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
}

.topbar-brand .brand-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.03em;
  line-height: 1;
}

.topbar-brand .brand-badge {
  font-size: 10px;
  font-weight: 800;
  background: var(--orange-tint);
  color: var(--orange);
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
  border: 1px solid rgba(255, 122, 41, 0.2);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-lang {
  display: flex;
  gap: 4px;
  background: #fff;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.topbar-lang a {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.15s ease;
  line-height: 1.1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.topbar-lang a.active {
  background: var(--orange);
  color: #fff;
}

.topbar-profile-container {
  position: relative;
}

.topbar-staff {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

.topbar-staff:hover,
.topbar-staff:focus-visible {
  border-color: var(--orange);
  box-shadow: 0 2px 10px rgba(255, 91, 10, 0.15);
  outline: none;
}

.topbar-staff .staff-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-staff .staff-name-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.profile-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 10px 30px rgba(32, 33, 36, 0.12);
  z-index: 100;
  box-sizing: border-box;
}

.profile-dropdown-menu.show {
  display: block;
  animation: fadeInDown 0.15s ease forwards;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.profile-dropdown-header {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-dropdown-header strong {
  font-size: 13.5px;
  color: var(--ink);
}

.profile-role-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--orange-deep);
  background: var(--orange-tint);
  padding: 2px 8px;
  border-radius: 999px;
  align-self: flex-start;
}

.profile-dropdown-divider {
  height: 1px;
  background: var(--line);
  margin: 4px 0;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.profile-dropdown-item:hover {
  background: var(--bg);
  color: var(--orange-deep);
}

.profile-dropdown-item.logout-action {
  color: #d93025;
}

.profile-dropdown-item.logout-action:hover {
  background: #fdf2f2;
  color: #b91c1c;
}

/* Nav toggle button (Centered icon) */
.nav-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  cursor: pointer;
  box-shadow: var(--shadow);
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}

.nav-toggle-btn:hover {
  background: var(--charcoal);
  transform: scale(1.03);
}

.nav-toggle-btn svg.nav-icon {
  display: block;
  margin: auto;
}

/* Backdrop */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 45;
  display: none;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.nav-backdrop.show { display: block; }

/* -----------------------------------------------------
   Sidebar Navigation & Centered Back Arrow
   ----------------------------------------------------- */
.sidebar {
  width: 230px;
  background: var(--ink);
  color: var(--bg);
  flex-shrink: 0;
  padding: 22px 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 50;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  transform: translateX(-100%);
  transition: transform .22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 4px 0 24px rgba(0,0,0,0.3);
}
.sidebar.open { transform: translateX(0); }

/* Sidebar Header & Centered Back Arrow Button */
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-close-btn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--orange);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  line-height: 1;
  transition: all 0.18s ease;
}

.sidebar-close-btn:hover {
  background: rgba(255, 122, 41, 0.2);
  border-color: var(--orange);
  transform: scale(1.05);
}

.sidebar-close-btn svg.nav-back-icon {
  display: block;
  margin: auto;
}

.sidebar .brand {
  font-family: var(--font-display);
  color: var(--orange);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 0;
  line-height: 1;
}

.sidebar nav {
  padding-top: 10px;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: #cbbfa8;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}

.sidebar nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar nav a.active {
  color: var(--orange);
  background: rgba(255, 122, 41, 0.12);
  border-left-color: var(--orange);
  font-weight: 700;
}

.sidebar .staff-name {
  padding: 18px 20px 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.sidebar-lang {
  display: flex;
  gap: 6px;
  padding: 16px 20px 0;
}

.sidebar-lang a {
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #3a3226;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.15s ease;
}

.sidebar-lang a.active {
  background: var(--orange);
  color: #14100c;
  border-color: var(--orange);
}

.sidebar .logout {
  display: block;
  padding: 12px 20px;
  font-size: 12.5px;
  font-weight: 700;
  color: #ff8a7a;
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  transition: color 0.15s ease;
}
.sidebar .logout:hover {
  color: #ff5b5b;
}

/* -----------------------------------------------------
   Layout shell & Main container
   ----------------------------------------------------- */
.admin-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

.main {
  flex: 1;
  padding: 28px 32px 48px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 14px;
}

.page-head h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

.page-head p {
  color: var(--muted);
  font-size: 13.5px;
  margin: 4px 0 0;
}

/* -----------------------------------------------------
   Buttons
   ----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
  line-height: 1.2;
}

.btn:hover {
  background: var(--orange-deep);
  transform: translateY(-1px);
}

.btn.secondary {
  background: var(--ink);
  color: #fff;
}
.btn.secondary:hover {
  background: var(--charcoal);
}

.btn.ghost {
  background: transparent;
  color: var(--orange);
  border: 1.5px solid var(--orange);
}
.btn.ghost:hover {
  background: var(--orange-tint);
}

.btn.small {
  padding: 6px 13px;
  font-size: 12px;
  border-radius: 8px;
}

/* -----------------------------------------------------
   Stat Grid & Stat Tiles
   ----------------------------------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border-radius: var(--radius-m);
  padding: 18px 20px;
  box-shadow: 0 2px 10px rgba(34, 27, 21, 0.04);
  border: 1.5px solid var(--line);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(34, 27, 21, 0.08);
}

.stat-card .num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--orange);
  line-height: 1.1;
}

.stat-card .lbl {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 600;
}

/* -----------------------------------------------------
   Panels
   ----------------------------------------------------- */
.panel {
  background: #fff;
  border-radius: var(--radius-m);
  box-shadow: 0 2px 12px rgba(34, 27, 21, 0.04);
  border: 1.5px solid var(--line);
  padding: 22px;
  margin-bottom: 22px;
  box-sizing: border-box;
}

.chart-container { position: relative; height: 280px; max-width: 100%; }
.chart-container-small { height: 220px; max-width: 320px; margin: 0 auto; }
.panel h2 { font-size: 16px; font-weight: 800; margin: 0 0 16px; color: var(--ink); }

/* Quick link action tiles */
.quick-links-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* -----------------------------------------------------
   Tables (Desktop standard, Mobile tiles)
   ----------------------------------------------------- */
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.data-table th {
  text-align: left;
  padding: 11px 12px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--line);
}

table.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.data-table tr:last-child td {
  border-bottom: none;
}

table.data-table img.thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--bg);
}

/* -----------------------------------------------------
   Badges
   ----------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.2;
}

.badge.available, .badge.active, .badge.successful { background: #e4f3e6; color: var(--green); }
.badge.unavailable, .badge.inactive, .badge.pending { background: #f3e9d4; color: #8a6d1f; }
.badge.new { background: #e4ecfb; color: #3a5fc7; }
.badge.preparing { background: #fdf1cf; color: #8a6d1f; }
.badge.ready { background: #e4f3e6; color: var(--green); }
.badge.collected { background: #ece5d8; color: #6b6055; }

/* Status toggle button */
.status-group { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.status-group form { display: inline; margin: 0; }
.status-toggle-btn {
  border: 1.5px solid var(--line);
  background: #fff;
  color: #6b6055;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}
.status-toggle-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

/* Action group */
.action-group { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.action-group form { display: inline; margin: 0; }

/* -----------------------------------------------------
   Forms
   ----------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field { margin-bottom: 6px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.field input:not([type="checkbox"]), .field select, .field textarea {
  width: 100%; padding: 11px 12px; border-radius: 8px; border: 1.5px solid var(--line); font-size: 14px; background: var(--bg); box-sizing: border-box;
  transition: border-color 0.15s ease;
}
.field input:not([type="checkbox"]):focus, .field select:focus, .field textarea:focus {
  border-color: var(--orange);
  outline: none;
}
.field textarea { min-height: 70px; resize: vertical; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-top: 8px; }
.checkbox-row input[type="checkbox"] { width: auto; flex-shrink: 0; margin: 0; }
.day-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.day-picker label { border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 11px; font-size: 12px; font-weight: 700; background: var(--bg); cursor: pointer; }
.day-picker input { margin-right: 4px; }

.filter-bar { display: flex; gap: 10px; margin-bottom: 18px; align-items: flex-end; flex-wrap: wrap; }
.filter-bar .field { margin-bottom: 0; }

/* -----------------------------------------------------
   QR Card Tiles
   ----------------------------------------------------- */
.qr-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border-radius: var(--radius-m);
  box-shadow: 0 2px 10px rgba(34, 27, 21, 0.04);
  border: 1.5px solid var(--line);
  padding: 16px 18px;
  margin-bottom: 12px;
  box-sizing: border-box;
}
.qr-card img { width: 84px; height: 84px; border: 1px solid var(--line); border-radius: 10px; flex-shrink: 0; }
.qr-card .meta { flex: 1; min-width: 0; }
.qr-card .meta .num { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--ink); }
.qr-card .meta .link { font-size: 12px; color: var(--muted); word-break: break-all; margin: 3px 0 6px; }

.qr-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.qr-actions form {
  display: inline;
  margin: 0;
}

.empty { text-align: center; color: var(--muted); padding: 40px; font-size: 13.5px; }
.flash { background: #e4f3e6; color: var(--green); padding: 12px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; margin-bottom: 16px; }

/* =====================================================
   MOBILE VIEW ENHANCEMENTS
   - Clean card/tile layout
   - No horizontal scrollbar / horizontal overflow
   - Smooth vertical scroll only if needed
   - Removed scroll options in the sides
   ===================================================== */
@media (max-width: 768px) {
  .admin-topbar {
    padding: 0 12px;
    height: 56px;
  }
  .topbar-left {
    gap: 10px;
  }
  .topbar-brand .brand-title {
    font-size: 17px;
  }
  .topbar-brand .brand-badge {
    display: none; /* Keep clean on small mobile */
  }
  .topbar-staff .staff-name-text {
    display: none; /* Show only avatar pill on mobile */
  }
  .topbar-staff {
    padding: 3px;
  }

  .sidebar {
    width: 82vw;
    max-width: 290px;
  }

  .main {
    padding: 16px 12px 36px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }

  .page-head {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 18px;
  }
  .page-head h1 {
    font-size: 22px;
  }
  .page-head > .btn,
  .page-head > div:not(:first-child) {
    width: 100%;
    text-align: center;
  }

  /* Stat cards as responsive 2-column tiles */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 18px;
  }
  .stat-card {
    padding: 14px 12px;
  }
  .stat-card .num {
    font-size: 24px;
  }
  .stat-card .lbl {
    font-size: 11.5px;
  }

  .panel {
    padding: 14px;
    border-radius: var(--radius-m);
    margin-bottom: 16px;
    overflow-x: hidden; /* Remove panel horizontal scroll */
  }

  /* Transform tables into touch-friendly modern TILES / CARDS */
  table.data-table {
    display: block;
    width: 100%;
    border: none;
  }

  table.data-table thead {
    display: none; /* Hide header row on mobile */
  }

  table.data-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  table.data-table tr {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #faf7f2;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-m);
    padding: 14px;
    box-shadow: 0 2px 8px rgba(34, 27, 21, 0.04);
    box-sizing: border-box;
    width: 100%;
  }

  table.data-table tr:hover {
    border-color: rgba(255, 122, 41, 0.4);
  }

  table.data-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(239, 231, 220, 0.85);
    font-size: 13px;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    word-break: break-word;
  }

  table.data-table td:last-child {
    border-bottom: none;
    padding-top: 8px;
  }

  /* Key-value label inside tile */
  table.data-table td[data-label]::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 12px;
    flex-shrink: 0;
  }

  /* Full width cells (e.g. dish header, descriptions, breakdown) */
  table.data-table td.tile-full {
    display: block;
  }
  table.data-table td.tile-full[data-label]::before {
    display: block;
    margin-bottom: 4px;
  }

  /* Tile header row (Photo + Dish title or Order header) */
  table.data-table td.tile-header {
    border-bottom: 1.5px solid var(--line);
    padding-bottom: 10px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
  }
  table.data-table td.tile-header::before {
    display: none;
  }

  /* Tile action buttons row */
  table.data-table td.tile-actions {
    border-bottom: none;
    padding-top: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
  }
  table.data-table td.tile-actions::before {
    display: none;
  }

  .action-group, .status-group {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Responsive QR card tile */
  .qr-card {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px;
  }
  .qr-card img {
    width: 96px;
    height: 96px;
    margin: 0 auto;
  }
  .qr-card .meta {
    text-align: center;
  }

  .qr-actions {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }
  .qr-actions a.btn, .qr-actions button.btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
  .qr-actions form {
    width: 100%;
  }

  /* Form grid mobile */
  .form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .filter-bar .btn, .filter-bar a.btn {
    text-align: center;
  }

  .quick-links-group .btn {
    flex: 1 1 100%;
    text-align: center;
  }
}
