:root {
  color-scheme: light;
  --bg: #f6f2ea;
  --surface: #ffffff;
  --surface-2: #fff8ed;
  --text: #2d2118;
  --muted: #7b6c60;
  --line: #eadfce;
  --primary: #9a4f16;
  --primary-2: #c97824;
  --accent: #2e7d59;
  --danger: #b13a2f;
  --shadow: 0 20px 60px rgba(94, 55, 18, 0.13);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.dark {
  color-scheme: dark;
  --bg: #130f0b;
  --surface: #211913;
  --surface-2: #2b2118;
  --text: #fff7ef;
  --muted: #c4b4a5;
  --line: #3c2c21;
  --primary: #f0a24d;
  --primary-2: #d77a25;
  --accent: #81c995;
  --danger: #ff8178;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(circle at top left, rgba(201, 120, 36, 0.18), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(46, 125, 89, 0.12), transparent 32rem),
    var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

body.dark .topbar {
  background: rgba(33, 25, 19, 0.78);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-slot {
  width: 82px;
  height: 82px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(154, 79, 22, 0.45);
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  color: var(--primary);
  font-weight: 900;
  letter-spacing: 0.08em;
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-size: 0.73rem;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 2px;
  font-size: clamp(1.35rem, 2vw, 2.1rem);
}

.subtitle,
.hero-card p,
.qr-card p,
.small-note {
  color: var(--muted);
}

.subtitle {
  margin-bottom: 0;
}

.topbar-actions,
.button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.theme-toggle,
.admin-btn,
.primary-btn,
.outline-btn,
.ghost-btn,
.danger-btn,
.icon-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.theme-toggle,
.outline-btn,
.ghost-btn,
.icon-btn {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
}

.theme-toggle:hover,
.admin-btn:hover,
.primary-btn:hover,
.outline-btn:hover,
.ghost-btn:hover,
.danger-btn:hover,
.icon-btn:hover {
  transform: translateY(-2px);
}

.admin-btn,
.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 12px 28px rgba(154, 79, 22, 0.24);
}

.danger-btn {
  background: rgba(177, 58, 47, 0.12);
  color: var(--danger);
  border: 1px solid rgba(177, 58, 47, 0.25);
}

.full {
  width: 100%;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 24px;
  align-items: start;
}

.menu-area {
  min-width: 0;
}

.hero-card,
.filters-card,
.order-card,
.qr-card,
.admin-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-card {
  min-height: 260px;
  padding: 28px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  position: relative;
}

.hero-card::after {
  content: "☕";
  position: absolute;
  right: 28px;
  bottom: -34px;
  font-size: 10rem;
  opacity: 0.08;
  transform: rotate(-12deg);
}

.hero-content {
  max-width: 680px;
  position: relative;
  z-index: 1;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(154, 79, 22, 0.12);
  color: var(--primary);
  font-weight: 800;
}

.hero-card h2 {
  font-size: clamp(2rem, 4vw, 4.1rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
  margin-bottom: 14px;
}

.hero-stats {
  display: grid;
  gap: 14px;
  align-content: center;
  min-width: 130px;
  position: relative;
  z-index: 1;
}

.hero-stats div {
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.hero-stats strong {
  display: block;
  font-size: 1.8rem;
}

.hero-stats span {
  color: var(--muted);
  font-weight: 700;
}

.filters-card {
  margin-top: 18px;
  padding: 16px;
  display: grid;
  gap: 14px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 14px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 15px 0;
  background: transparent;
  color: var(--text);
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
}

.pill.active {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

.section-heading {
  margin: 26px 0 14px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.section-heading.compact {
  margin: 0 0 16px;
}

.section-heading h2,
.section-heading h3 {
  margin-bottom: 0;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.product-media {
  height: 150px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top left, rgba(240, 162, 77, 0.26), transparent 14rem),
    linear-gradient(145deg, var(--surface-2), var(--surface));
  font-size: 4.4rem;
  overflow: hidden;
  position: relative;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(46, 125, 89, 0.14);
  color: var(--accent);
  border: 1px solid rgba(46, 125, 89, 0.22);
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
}

.product-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.category-label {
  color: var(--primary);
  font-weight: 900;
  font-size: 0.78rem;
}

.price {
  font-size: 1.18rem;
  font-weight: 900;
}

.product-body h3 {
  margin-bottom: 8px;
  line-height: 1.15;
}

.product-body p {
  color: var(--muted);
  margin-bottom: 18px;
}

.product-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.qty-mini {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.qty-mini button,
.order-item-controls button {
  border: 0;
  background: transparent;
  color: var(--text);
  width: 36px;
  height: 36px;
  font-weight: 900;
}

.qty-mini span {
  width: 28px;
  text-align: center;
  font-weight: 900;
}

.add-btn {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 11px 12px;
  background: var(--text);
  color: var(--surface);
  font-weight: 900;
}

.order-panel {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 18px;
}

.order-card,
.qr-card {
  padding: 20px;
}

.order-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.cart-count {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--primary);
  font-weight: 900;
}

.order-items {
  display: grid;
  gap: 12px;
  max-height: 310px;
  overflow: auto;
  padding: 16px 4px 16px 0;
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
}

.empty-state span {
  font-size: 2.2rem;
}

.order-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 18px;
}

.order-item strong {
  display: block;
}

.order-item small {
  color: var(--muted);
}

.order-item-controls {
  display: flex;
  align-items: center;
  gap: 2px;
  align-self: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.order-item-controls span {
  min-width: 22px;
  text-align: center;
  font-weight: 900;
}

.order-notes {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

label {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.92rem;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 13px;
  outline: 0;
  background: var(--surface-2);
  color: var(--text);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(201, 120, 36, 0.12);
}

.order-total {
  margin: 18px 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-total strong {
  font-size: 1.55rem;
}

.small-note {
  margin: 12px 0 0;
  font-size: 0.82rem;
  text-align: center;
}

.qr-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.qr-card img,
.qr-admin-box img {
  width: 118px;
  height: 118px;
  border-radius: 18px;
  background: #fff;
  padding: 8px;
  border: 1px solid var(--line);
  object-fit: contain;
}

.admin-modal {
  width: min(1180px, calc(100% - 24px));
  border: 0;
  border-radius: 28px;
  padding: 0;
  background: transparent;
  color: var(--text);
}

.admin-modal::backdrop {
  background: rgba(12, 8, 4, 0.72);
  backdrop-filter: blur(4px);
}

.modal-content {
  max-height: min(88vh, 920px);
  overflow: auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  flex: 0 0 auto;
}

.admin-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-card {
  padding: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.span-2 {
  grid-column: span 2;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}

.check-line input {
  width: auto;
  margin: 0;
  box-shadow: none;
}

.qr-admin-box {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-2);
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: var(--surface);
}

th,
td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--primary);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

td {
  color: var(--text);
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.table-action {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 10px;
  width: 38px;
  height: 36px;
}

.status {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.status.ok {
  background: rgba(46, 125, 89, 0.14);
  color: var(--accent);
}

.status.off {
  background: rgba(177, 58, 47, 0.12);
  color: var(--danger);
}

.orders-list {
  display: grid;
  gap: 12px;
}

.order-demo-card {
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.order-demo-card p {
  color: var(--muted);
  margin-bottom: 8px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  max-width: min(520px, calc(100% - 32px));
  background: var(--text);
  color: var(--surface);
  padding: 14px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
  font-weight: 800;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1180px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main-grid {
    grid-template-columns: minmax(0, 1fr) 350px;
  }
}

@media (max-width: 940px) {
  .app-shell {
    padding: 14px;
  }

  .topbar,
  .brand,
  .main-grid,
  .admin-grid,
  .hero-card,
  .qr-card {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions button {
    flex: 1;
  }

  .main-grid {
    display: grid;
  }

  .order-panel {
    position: static;
  }

  .admin-grid {
    display: grid;
  }
}

@media (max-width: 640px) {
  .brand {
    align-items: flex-start;
  }

  .logo-slot {
    width: 66px;
    height: 66px;
    border-radius: 18px;
    font-size: 0.78rem;
  }

  .hero-card {
    padding: 20px;
  }

  .hero-card h2 {
    font-size: 2.25rem;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
  }

  .products-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .button-row,
  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button-row button,
  .topbar-actions button {
    width: 100%;
  }

  .modal-content {
    padding: 14px;
    border-radius: 22px;
  }

  .qr-admin-box {
    align-items: flex-start;
    flex-direction: column;
  }

  .toast {
    border-radius: 18px;
  }
}

/* =========================================================
   RESPONSIVIDADE FINAL - Desktop, Tablet e Mobile
   ========================================================= */

img,
svg,
video,
canvas {
  max-width: 100%;
}

html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100dvh;
}

button,
input,
select,
textarea,
.product-card,
.order-card,
.admin-card,
.hero-card,
.filters-card,
.qr-card {
  min-width: 0;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 10px 0 0;
  font-family: inherit;
  color: var(--text);
}

.products-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
}

.product-card {
  isolation: isolate;
}

.product-body h3,
.order-item strong,
td,
th,
.qr-admin-box p,
.qr-admin-box strong {
  overflow-wrap: anywhere;
}

.mobile-cart-shortcut {
  display: none;
}

#pedido {
  scroll-margin-top: 18px;
}

@media (min-width: 1280px) {
  .main-grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 390px);
  }
}

@media (max-width: 1180px) {
  .main-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 350px);
  }

  .hero-card h2 {
    font-size: clamp(2rem, 4.6vw, 3.5rem);
  }
}

@media (max-width: 980px) {
  .app-shell {
    padding: 16px;
  }

  .topbar {
    position: static;
  }

  .main-grid {
    grid-template-columns: 1fr;
  }

  .order-panel {
    position: static;
    grid-template-columns: 1fr;
  }

  .order-card {
    order: 1;
  }

  .qr-card {
    order: 2;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-modal {
    width: calc(100% - 20px);
  }

  .modal-content {
    max-height: 92dvh;
  }
}

@media (max-width: 780px) {
  body {
    padding-bottom: 82px;
  }

  .app-shell {
    padding: 12px;
  }

  .topbar {
    gap: 16px;
    padding: 14px;
    border-radius: 22px;
  }

  .brand {
    width: 100%;
  }

  .brand > div:last-child {
    min-width: 0;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .topbar-actions button {
    width: 100%;
    min-height: 46px;
    padding-inline: 10px;
  }

  .hero-card {
    min-height: auto;
    padding: 18px;
    border-radius: 22px;
  }

  .hero-card::after {
    right: 8px;
    bottom: -18px;
    font-size: 7.5rem;
  }

  .hero-card h2 {
    font-size: clamp(1.85rem, 9vw, 3rem);
    letter-spacing: -0.045em;
  }

  .hero-card p {
    font-size: 0.96rem;
  }

  .hero-stats {
    grid-template-columns: 1fr 1fr;
    min-width: 0;
    width: 100%;
  }

  .hero-stats div {
    padding: 12px;
  }

  .hero-stats strong {
    font-size: 1.45rem;
  }

  .filters-card {
    padding: 12px;
    border-radius: 22px;
  }

  .category-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .pill {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .products-grid {
    gap: 12px;
  }

  .product-card,
  .order-card,
  .qr-card,
  .admin-card {
    border-radius: 22px;
  }

  .product-media {
    height: 132px;
    font-size: 3.7rem;
  }

  .product-body {
    padding: 14px;
  }

  .product-body p {
    margin-bottom: 14px;
  }

  .product-actions {
    gap: 8px;
  }

  .qty-mini button,
  .order-item-controls button {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .add-btn {
    min-height: 42px;
  }

  .order-card,
  .qr-card,
  .admin-card {
    padding: 14px;
  }

  .order-items {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .qr-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .qr-card img,
  .qr-admin-box img {
    width: 132px;
    height: 132px;
  }

  .mobile-cart-shortcut {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    text-decoration: none;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    font-weight: 900;
  }

  .mobile-cart-shortcut span,
  .mobile-cart-shortcut strong {
    color: #fff;
    white-space: nowrap;
  }

  .mobile-cart-shortcut strong {
    font-size: 0.9rem;
    opacity: 0.95;
  }

  .admin-modal {
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .modal-content {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    padding: 14px;
  }

  .modal-header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
  }

  .modal-header h2 {
    font-size: 1.25rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .button-row {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .button-row button {
    width: 100%;
    min-height: 44px;
  }

  .table-wrap {
    border: 0;
    overflow: visible;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  table {
    min-width: 0;
    background: transparent;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  tbody {
    display: grid;
    gap: 12px;
  }

  tr {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px;
    box-shadow: var(--shadow);
  }

  td {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }

  td:last-child {
    border-bottom: 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  td[colspan] {
    display: block;
  }

  td[colspan]::before {
    content: "";
  }

  .action-buttons {
    justify-content: flex-start;
  }

  .table-action {
    width: 44px;
    height: 40px;
  }
}

@media (max-width: 520px) {
  .topbar-actions {
    grid-template-columns: 1fr;
  }

  .brand {
    gap: 12px;
  }

  .logo-slot {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    font-size: 0.7rem;
  }

  h1 {
    font-size: 1.22rem;
    line-height: 1.1;
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .eyebrow {
    font-size: 0.66rem;
    letter-spacing: 0.08em;
  }

  .hero-card h2 {
    font-size: 1.85rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .section-heading {
    margin-top: 20px;
  }

  .section-heading h2 {
    font-size: 1.35rem;
  }

  .product-media {
    height: 118px;
  }

  .product-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .product-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .qty-mini {
    justify-content: space-between;
    width: 100%;
  }

  .qty-mini span {
    flex: 1;
  }

  .order-header {
    align-items: flex-start;
  }

  .order-item {
    grid-template-columns: 1fr;
  }

  .order-item-controls {
    justify-content: space-between;
    width: 100%;
  }

  .order-total strong {
    font-size: 1.28rem;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .qr-admin-box {
    padding: 12px;
  }

  td {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .mobile-cart-shortcut {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}

@media (max-width: 360px) {
  .app-shell {
    padding: 8px;
  }

  .topbar,
  .hero-card,
  .filters-card,
  .product-card,
  .order-card,
  .qr-card,
  .admin-card {
    border-radius: 18px;
  }

  .hero-card h2 {
    font-size: 1.65rem;
  }

  .theme-toggle,
  .admin-btn,
  .primary-btn,
  .outline-btn,
  .ghost-btn,
  .danger-btn {
    padding-inline: 12px;
  }
}

@media (hover: none) {
  .theme-toggle:hover,
  .admin-btn:hover,
  .primary-btn:hover,
  .outline-btn:hover,
  .ghost-btn:hover,
  .danger-btn:hover,
  .icon-btn:hover {
    transform: none;
  }
}
