:root {
  --blue: #2f73ee;
  --blue-soft: #eef5ff;
  --green: #12856c;
  --red: #ff4d55;
  --text: #181b22;
  --muted: #657080;
  --panel: rgba(255, 255, 255, .88);
  --line: #edf0f5;
  --shadow: 0 34px 110px rgba(86, 117, 154, .16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body, #app { min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); background: #f7f8fa; }
button, input, select { font: inherit; }
button { border: 0; cursor: pointer; min-height: 46px; border-radius: 22px; background: #f7f8fb; color: var(--text); font-weight: 650; }
input, select, textarea { font-size: 16px; }
input, select { width: 100%; min-height: 48px; border: 0; border-radius: 22px; background: #f7f8fb; padding: 0 18px; color: var(--text); outline: none; }
h1, h2, h3, p { margin-top: 0; }

.login {
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 84% 12%, rgba(20, 184, 166, .22), transparent 30%),
    radial-gradient(circle at 8% 90%, rgba(47, 115, 238, .24), transparent 34%),
    linear-gradient(135deg, #f8fafc, #eaf2ff);
}
.login-shell {
  width: min(1220px, 100%);
  height: min(720px, calc(100vh - 48px));
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 450px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 34px;
  background: rgba(255,255,255,.74);
  box-shadow: 0 34px 110px rgba(20, 42, 75, .2);
  backdrop-filter: blur(26px);
}
.login-showcase {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 28px;
  min-height: 0;
  padding: clamp(28px, 3vw, 42px);
  background:
    linear-gradient(90deg, rgba(6, 18, 34, .88) 0%, rgba(6, 18, 34, .55) 48%, rgba(6,18,34,.2) 100%),
    url("/assets/uslupos-tablet-hero.png");
  background-size: cover;
  background-position: center;
  color: white;
}
.login-showcase::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(20,184,166,.14));
  pointer-events: none;
}
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.showcase-copy { position: relative; z-index: 1; align-self: center; max-width: 560px; padding: clamp(22px, 2.3vw, 28px); border: 1px solid rgba(255,255,255,.16); border-radius: 28px; background: rgba(5, 18, 34, .34); box-shadow: 0 22px 70px rgba(0,0,0,.18); backdrop-filter: blur(10px); }
.login-logo-circle {
  width: 76px;
  height: 76px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  background: white;
  padding: 4px;
  box-shadow: 0 18px 44px rgba(0,0,0,.24);
}
.logo-wide { width: min(260px, 72%); height: auto; display: block; }
.brand-mark, .avatar {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-size: 24px;
  font-weight: 850;
}
.login-brand strong { display: block; font-size: 30px; color: white; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.login-brand span { display: block; color: rgba(255,255,255,.78); font-weight: 700; }
.showcase-copy p, .login-panel p { color: var(--muted); }
.eyebrow, .panel-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 18px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
  font-size: 13px;
}
.eyebrow { background: rgba(255,255,255,.16); color: white; border: 1px solid rgba(255,255,255,.18); }
.showcase-copy h1 { max-width: 560px; margin: 16px 0; color: white; font-size: clamp(38px, 4.6vw, 58px); line-height: 1; letter-spacing: 0; text-shadow: 0 5px 28px rgba(0,0,0,.34); }
.showcase-copy p { max-width: 480px; color: rgba(255,255,255,.84); font-size: 18px; line-height: 1.55; }
.showcase-strip { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; }
.showcase-strip span { min-height: 42px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 21px; color: white; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.16); font-weight: 800; backdrop-filter: blur(10px); }
.hero-tablet { display: none; }
.login-panel { display: grid; align-content: center; min-height: 0; padding: clamp(24px, 3vw, 34px); background: linear-gradient(180deg, #ffffff, #fbfcff); }
.login-card { display: grid; gap: 16px; padding: clamp(24px, 2.5vw, 30px); border: 1px solid var(--line); border-radius: 30px; background: white; box-shadow: 0 24px 70px rgba(80, 105, 137, .14); }
.login-card-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.login-card-top img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.login-panel h2 { margin: 0; font-size: 32px; line-height: 1.1; }
.login-panel p { margin-bottom: 4px; line-height: 1.48; }
.form { display: grid; gap: 15px; }
label { display: grid; gap: 8px; color: #4c5360; font-weight: 700; font-size: 13px; }
.primary, .login-submit, .place-order { background: var(--blue); color: white; }
.login-submit { min-height: 56px; border-radius: 18px; font-size: 17px; box-shadow: 0 18px 34px rgba(47, 115, 238, .26); }
.error { min-height: 20px; color: var(--red); font-weight: 700; }

.app-bg {
  height: 100vh;
  height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background:
    linear-gradient(110deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.92) 44%, rgba(213,231,250,.78) 100%),
    #f6f7f9;
}
.pos-window {
  width: min(1540px, 100%);
  height: min(900px, calc(100vh - 48px));
  min-height: 720px;
  display: grid;
  grid-template-columns: 300px 1fr;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 28px;
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}
.activity-sidebar {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 26px;
  padding: 26px 16px;
  background: rgba(255,255,255,.72);
  border-right: 1px solid var(--line);
}
.staff-card { display: flex; align-items: center; gap: 12px; padding: 0 10px; }
.staff-card .avatar { width: 52px; height: 52px; font-size: 18px; }
.logo-avatar { object-fit: contain; background: white; border: 1px solid var(--line); padding: 4px; }
.staff-card strong, .staff-card span { display: block; }
.staff-card span { color: var(--muted); font-size: 13px; }
.activity-sidebar nav { display: grid; align-content: start; gap: 10px; }
.activity-sidebar nav button, .activity-menu button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  min-height: 72px;
  padding: 0 24px;
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  font-size: 19px;
  box-shadow: 0 12px 28px rgba(92, 118, 150, .04);
}
.activity-sidebar nav button span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #f4f6f9; color: #6d7480; }
.activity-sidebar nav button.active, .activity-menu button.active { background: var(--blue); color: white; }
.activity-sidebar nav button.active span { background: white; color: var(--blue); }
.sidebar-footer { padding: 14px; }
.footer-logo { display: block; width: min(190px, 100%); height: auto; margin-bottom: 12px; }
.sidebar-footer strong { color: var(--blue); font-size: 20px; }
.sidebar-footer p { color: var(--muted); line-height: 1.45; }
.sidebar-footer button { width: 100%; color: var(--red); background: #fff1f2; }

.workspace { min-width: 0; display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.pos-topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.58);
}
.icon-btn { width: 56px; min-width: 56px; padding: 0; border-radius: 50%; color: var(--blue); background: white; box-shadow: 0 14px 34px rgba(93, 116, 143, .08); }
.date-pill, .status-pill {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  border-radius: 28px;
  background: white;
  box-shadow: 0 14px 34px rgba(93, 116, 143, .06);
}
.status-pill { margin-left: auto; color: var(--green); font-weight: 750; }
.status-pill span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
#businessSwitch { max-width: 260px; background: white; box-shadow: 0 10px 26px rgba(93, 116, 143, .08); }
.language-select {
  width: 82px;
  min-width: 82px;
  background: white;
  color: var(--blue);
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(93, 116, 143, .08);
}
.login-lang { display: flex; justify-content: flex-end; margin-bottom: 4px; }

.sales-grid { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 430px; overflow: hidden; }
.catalog-area { position: relative; min-width: 0; overflow: auto; padding: 22px 24px 126px; }
.table-strip {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 42px rgba(92, 118, 150, .06);
}
.table-strip .track-head button {
  min-height: 40px;
  padding: 0 16px;
  color: var(--blue);
  background: var(--blue-soft);
}
.table-chip-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(96px, 112px);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.table-chip-row::-webkit-scrollbar, .track-row::-webkit-scrollbar { display: none; }
.table-chip-row button {
  position: relative;
  min-height: 88px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
}
.table-chip-row strong {
  min-width: 46px;
  min-height: 30px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: white;
  color: #5c6470;
}
.table-chip-row span {
  width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-chip-row small {
  color: inherit;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}
.table-chip-row button.has-bill:not(.active) {
  border-color: #efc17a;
  background: #fff7e9;
  color: #a55b00;
}
.table-chip-row button.has-bill:not(.active) strong {
  color: #9b5600;
  background: #ffe3b5;
}
.table-chip-row button.has-bill:not(.active) span { color: #744b18; }
.table-chip-row button.active {
  border-color: #123c69;
  background: #123c69;
  color: white;
  box-shadow: 0 8px 18px rgba(18,60,105,.22);
}
.table-chip-row button.active strong {
  color: white;
  background: rgba(255,255,255,.16);
}
.table-chip-row button.active span { color: white; }
.category-row { display: grid; grid-template-columns: repeat(6, minmax(118px, 1fr)); gap: 12px; margin-bottom: 18px; }
.category-card {
  min-height: 116px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  background: white;
  border: 1px solid transparent;
  box-shadow: 0 18px 42px rgba(92, 118, 150, .06);
}
.category-card span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #f4f6f9; color: #7b838f; }
.category-card small { color: var(--muted); }
.category-card.active { color: var(--blue); border-color: var(--blue); background: var(--blue-soft); }
.category-card.active span { background: var(--blue); color: white; }
.search-pill {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  margin-bottom: 20px;
  border-radius: 32px;
  background: white;
  box-shadow: 0 18px 42px rgba(92, 118, 150, .06);
}
.search-pill span { font-size: 24px; color: var(--muted); }
.search-pill input { background: transparent; padding: 0; }
.search-pill.small { min-height: 58px; margin: 0 0 14px; }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 16px; padding-bottom: 18px; }
.product-card {
  min-height: 244px;
  display: grid;
  grid-template-rows: 142px auto auto;
  justify-items: stretch;
  gap: 12px;
  padding: 12px;
  text-align: left;
  border-radius: 18px;
  background: white;
  box-shadow: 0 18px 44px rgba(92, 118, 150, .07);
}
.product-image {
  width: 100%;
  height: 142px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 42%, rgba(47, 115, 238, .08), transparent 44%),
    #f7f8fb;
  padding: 12px;
}
.product-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(27, 36, 48, .12));
}
.line-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.product-card strong { display: block; min-height: 42px; font-size: 18px; line-height: 1.18; }
.product-card span { display: inline-flex; width: fit-content; margin-top: 8px; padding: 4px 9px; border-radius: 10px; background: #fff6e6; color: #d58609; font-size: 12px; }
.product-card b { justify-self: end; align-self: end; font-size: 22px; }

.order-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto 1fr auto auto auto;
  background: white;
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 44px rgba(92, 118, 150, .05);
}
.order-head {
  min-height: 96px;
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.order-head > span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: #f7f8fb; color: var(--blue); }
.order-head h3 { margin: 0 0 3px; text-align: center; font-size: 24px; }
.order-head p { margin: 0; text-align: center; color: var(--muted); }
.order-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 18px 20px; }
.receipt-list { overflow: auto; padding: 0 20px; border-bottom: 1px dashed #d9dee7; }
.empty-order { min-height: 180px; display: grid; place-items: center; color: var(--muted); }
.receipt-line {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px dashed #e5e8ee;
}
.line-image { width: 96px; height: 74px; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: #f7f8fb; padding: 8px; }
.receipt-line strong, .receipt-line span { display: block; }
.receipt-line span { color: var(--muted); margin-top: 6px; }
.qty { display: grid; grid-template-columns: 34px 30px 34px; align-items: center; gap: 6px; }
.qty button { min-height: 34px; width: 34px; padding: 0; background: #f7f8fb; }
.qty b { text-align: center; }
.totals { padding: 18px 20px; }
dl { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 800; }
dt:last-of-type, dd:last-of-type { color: var(--text); font-size: 20px; padding-top: 10px; border-top: 1px dashed #d9dee7; }
.payment-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 20px 18px; }
.payment-row button:first-child { color: var(--green); border: 1px solid var(--green); background: #f2fffb; }
.payment-row button:last-child { border: 1px solid var(--text); background: white; }
.place-order { min-height: 78px; border-radius: 0; font-size: 20px; }

.track-dock {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  background: rgba(255,255,255,.95);
  box-shadow: 0 -16px 36px rgba(92, 118, 150, .08);
  backdrop-filter: blur(16px);
}
.track-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--blue); }
.track-head span { color: var(--muted); font-size: 13px; font-weight: 750; }
.track-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr);
  gap: 10px;
  overflow-x: auto;
}
.track-row button, .track-row > span {
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  text-align: left;
}
.track-row small { color: var(--muted); }
.track-row button.active { border-color: #123c69; background: #edf4fb; box-shadow: inset 4px 0 0 #123c69; }
.track-row button.active strong { color: #123c69; }

.activity-layout { min-height: 0; display: grid; grid-template-columns: 320px 1fr; overflow: hidden; }
.activity-menu { padding: 22px 14px; background: rgba(255,255,255,.72); border-right: 1px solid var(--line); }
.activity-menu button { width: 100%; margin-bottom: 10px; }
.activity-content { min-width: 0; overflow: auto; padding: 26px; }
.section-head { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h2 { margin: 0; font-size: 26px; }
.queue-pill, .download-btn { color: var(--blue); background: var(--blue-soft); padding: 0 22px; border-radius: 24px; min-height: 48px; display: inline-flex; align-items: center; }
.queue-list { display: grid; gap: 0; background: white; border-radius: 20px; overflow: hidden; }
.queue-list article { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 18px; border-bottom: 1px solid var(--line); }
.queue-list p { margin: 4px 0 0; color: var(--muted); }
.history-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.history-summary article {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  background: white;
  box-shadow: 0 14px 34px rgba(92, 118, 150, .08);
}
.history-summary span, .history-summary small, .day-list small, .timeline-list p { color: var(--muted); }
.history-summary strong { font-size: 30px; }
.history-panel {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  min-height: 0;
}
.history-panel h3 { margin-bottom: 12px; }
.day-list, .timeline-list {
  display: grid;
  gap: 10px;
}
.day-list button {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 92px;
  padding: 16px;
  text-align: left;
  border-radius: 16px;
  background: white;
  box-shadow: 0 10px 26px rgba(92, 118, 150, .07);
}
.day-list button.active {
  color: white;
  background: var(--blue);
}
.day-list button.active small, .day-list button.active span { color: rgba(255,255,255,.82); }
.timeline-list article {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border-radius: 16px;
  background: white;
  box-shadow: 0 10px 26px rgba(92, 118, 150, .07);
}
.timeline-list time {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--blue);
  background: var(--blue-soft);
  font-weight: 850;
}
.timeline-list p { margin: 5px 0 0; line-height: 1.4; }
.round-blue { width: 52px; padding: 0; border-radius: 50%; color: white; background: var(--blue); }
.table-add-bar {
  display: grid;
  grid-template-columns: auto minmax(140px, 180px) minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 18px;
  background: white;
  box-shadow: 0 18px 42px rgba(92, 118, 150, .06);
}
.table-add-bar strong { padding: 0 6px; font-size: 18px; white-space: nowrap; }
.table-add-bar button { min-width: 130px; border-radius: 18px; }
.table-board { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 14px; }
.table-tile {
  position: relative;
  min-height: 150px;
  display: grid;
  border-radius: 16px;
  background: #f7f7f8;
  overflow: hidden;
}
.table-main {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 18px;
  border-radius: 16px;
  background: transparent;
}
.table-tile strong { min-width: 80px; min-height: 42px; display: grid; place-items: center; border-radius: 22px; background: white; color: #777d86; }
.table-tile.served { background: var(--blue-soft); }
.table-tile.served strong { background: var(--blue); color: white; }
.table-tile span { color: var(--blue); font-weight: 800; }
.table-tile small { color: var(--muted); }
.table-delete {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  color: var(--red);
  background: rgba(255,255,255,.9);
  box-shadow: 0 8px 18px rgba(80, 91, 110, .1);
}
.table-delete:hover { color: white; background: var(--red); }
.legend { display: flex; gap: 28px; justify-content: flex-end; padding-top: 24px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 10px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; background: #d6d8dc; }
.legend i.blue { background: var(--blue); }
.table-empty-state { grid-column: 1 / -1; min-height: 230px; display: grid; place-items: center; align-content: center; gap: 10px; padding: 28px; text-align: center; border: 1px dashed #cfd8e3; background: #f8fafc; }
.table-empty-state .lucide { width: 34px; height: 34px; color: var(--blue); }
.table-empty-state h3, .table-empty-state p { margin: 0; }
.table-empty-state p { max-width: 440px; color: var(--muted); line-height: 1.5; }

.settings-grid { min-height: 0; overflow: auto; display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 22px; padding: 26px; }
.soft-card { padding: 24px; border-radius: 22px; background: white; box-shadow: 0 14px 34px rgba(92, 118, 150, .08); }
.inline-check { width: auto; min-height: 0; margin-right: 8px; vertical-align: middle; }
.business-list { display: grid; gap: 12px; }
.business-list article { display: grid; grid-template-columns: 54px minmax(150px,1fr) auto auto auto; gap: 10px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 16px; }
.business-list span { display: block; color: var(--muted); margin-top: 4px; }
.business-list small { display: block; color: var(--green); margin-top: 5px; font-weight: 700; }
.business-list button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.business-list button .lucide { width: 17px; height: 17px; }
.business-thumb { width: 54px; height: 54px; object-fit: contain; padding: 5px; border-radius: 50%; background: white; border: 1px solid var(--line); }
.danger { color: white; background: var(--red); }

table { width: 100%; border-collapse: collapse; background: white; border-radius: 18px; overflow: hidden; }
th, td { padding: 15px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-size: 13px; background: #f7f8fb; }
td button { min-height: 36px; color: var(--blue); background: transparent; text-decoration: underline; }

@media (max-width: 1120px) {
  .pos-window { height: calc(100svh - 28px); min-height: 0; grid-template-columns: 1fr; }
  .activity-sidebar { display: none; position: fixed; inset: 18px auto 18px 18px; width: 320px; z-index: 10; border-radius: 24px; box-shadow: var(--shadow); }
  .activity-sidebar.open { display: grid; }
  .sales-grid, .activity-layout { grid-template-columns: 1fr; }
  .order-panel { border-left: 0; border-top: 1px solid var(--line); }
  .category-row { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .activity-content { min-height: 620px; }
}

@media (max-width: 720px) {
  .app-bg, .login { padding: 0; display: block; }
  .pos-window, .login-shell { width: 100%; min-height: 0; height: 100svh; border-radius: 0; box-shadow: none; }
  .login-shell { grid-template-columns: 1fr; }
  .login-showcase { padding: 22px; min-height: 390px; }
  .logo-wide { width: min(220px, 86%); }
  .showcase-copy { padding: 18px; border-radius: 22px; }
  .showcase-copy h1 { font-size: clamp(34px, 11vw, 44px); }
  .showcase-copy p { font-size: 15px; }
  .showcase-strip span { min-height: 38px; font-size: 13px; }
  .login-card { padding: 20px; border-radius: 24px; }
  .login-card-top img { width: 58px; height: 58px; }
  .login-panel { padding: 18px; }
  .login-panel h2 { font-size: 28px; }
  .settings-grid { grid-template-columns: 1fr; }
  .workspace { height: 100%; min-height: 0; display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
  .pos-topbar {
    position: sticky;
    top: 0;
    z-index: 8;
    min-height: 70px;
    padding: 10px;
    gap: 8px;
    overflow-x: auto;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(18px);
  }
  .pos-topbar::-webkit-scrollbar { display: none; }
  .icon-btn { width: 48px; min-width: 48px; min-height: 48px; }
  .date-pill, .status-pill { min-height: 48px; padding: 0 14px; white-space: nowrap; font-size: 13px; }
  #businessSwitch { min-width: 170px; max-width: 210px; }
  .language-select { width: 70px; min-width: 70px; }
  .catalog-area, .activity-content { height: 100%; min-height: 0; overflow: auto; padding: 14px; }
  .table-strip { margin-bottom: 14px; padding: 12px; border-radius: 18px; }
  .table-chip-row { grid-auto-columns: minmax(82px, 92px); gap: 8px; }
  .table-chip-row button { min-height: 68px; border-radius: 14px; }
  .category-row, .product-grid, .table-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-row { gap: 10px; margin-bottom: 14px; }
  .category-card { min-height: 92px; padding: 12px; border-radius: 14px; }
  .category-card span { width: 38px; height: 38px; }
  .search-pill { min-height: 54px; margin-bottom: 14px; }
  .sales-grid { min-height: 0; display: block; overflow: hidden; }
  .product-grid { gap: 12px; padding-bottom: 18px; }
  .track-dock { margin-bottom: 430px; }
  .receipt-line { grid-template-columns: 70px 1fr; }
  .qty { grid-column: 1 / -1; justify-content: end; }
  .line-image { width: 70px; height: 60px; }
  .product-card { min-height: 204px; grid-template-rows: 104px auto auto; gap: 9px; padding: 10px; border-radius: 16px; }
  .product-image { height: 104px; padding: 10px; }
  .product-card strong { min-height: 36px; font-size: 16px; }
  .product-card b { font-size: 20px; }
  .order-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9;
    max-height: min(68svh, 430px);
    grid-template-rows: auto auto minmax(86px, 1fr) auto auto auto;
    border-top-left-radius: 22px;
    border-top-right-radius: 22px;
    border-top: 1px solid var(--line);
    box-shadow: 0 -18px 48px rgba(40, 55, 75, .16);
    overflow: hidden;
  }
  .order-head { min-height: 70px; grid-template-columns: 44px 1fr 44px; padding: 10px 14px; }
  .order-head > span { width: 40px; height: 40px; }
  .order-head h3 { font-size: 19px; }
  .order-head p { font-size: 12px; }
  .order-selects { grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 14px; }
  .order-selects select, .payment-row button, .place-order { min-height: 48px; border-radius: 16px; }
  .receipt-list { padding: 0 14px; }
  .receipt-line { gap: 10px; padding: 10px 0; }
  .totals { padding: 12px 14px; }
  dl { gap: 8px; font-size: 13px; }
  dt:last-of-type, dd:last-of-type { font-size: 18px; padding-top: 8px; }
  .payment-row { gap: 8px; padding: 0 14px 10px; }
  .place-order { min-height: 60px; font-size: 18px; }
  .activity-menu { display: none; }
  .section-head { min-height: 56px; align-items: flex-start; flex-direction: column; gap: 10px; }
  .section-head h2 { font-size: 22px; }
  .queue-list article, .business-list article { grid-template-columns: 1fr; }
  .business-list article > button { width: 100%; }
  .history-summary, .history-panel { grid-template-columns: 1fr; }
  .history-summary strong { font-size: 26px; }
  .timeline-list article { grid-template-columns: 64px 1fr; }
  .timeline-list b { grid-column: 2; }
  .table-add-bar { grid-template-columns: 1fr; }
  .table-add-bar strong { padding: 0; }
  .table-add-bar button { width: 100%; }
  .table-tile { min-height: 128px; }
  table { min-width: 760px; }
}

@media (max-width: 430px) {
  .product-grid { gap: 10px; }
  .product-card { min-height: 190px; grid-template-rows: 94px auto auto; }
  .product-image { height: 94px; }
  .product-card strong { font-size: 15px; }
  .category-card { min-height: 86px; }
  .date-pill { display: none; }
  .order-panel { max-height: min(72svh, 420px); }
}

@media (min-width: 721px) and (max-width: 1120px) {
  .app-bg { padding: 14px; }
  .pos-window { height: calc(100svh - 28px); min-height: 0; border-radius: 24px; }
  .sales-grid { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; overflow: hidden; }
  .order-panel { border-top: 0; border-left: 1px solid var(--line); }
  .category-row { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
  .product-grid { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
  .product-card { min-height: 220px; grid-template-rows: 120px auto auto; }
  .product-image { height: 120px; }
  .track-dock { margin-bottom: 0; }
}

/* The shell stays fixed; only the active work area scrolls. */
html, body, #app { width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
* { letter-spacing: 0; }
button, input, select { border-radius: 8px; }
button { touch-action: manipulation; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
button .lucide { flex: none; }
.lucide { width: 20px; height: 20px; stroke-width: 1.7; vertical-align: middle; }
.app-bg { height: 100dvh; padding: 12px; background: #f2f4f7; }
.pos-window { height: 100%; min-height: 0; width: 100%; max-width: none; border-radius: 12px; box-shadow: none; grid-template-columns: 208px minmax(0,1fr); }
.activity-sidebar { gap: 24px; padding: 22px 12px; background: white; }
.activity-sidebar nav button { min-height: 54px; padding: 0 12px; gap: 10px; font-size: 15px; border-radius: 8px; box-shadow: none; }
.staff-card { padding: 0; min-width: 0; }
.staff-card > div { min-width: 0; overflow-wrap: anywhere; }
.staff-card strong { font-size: 15px; }
.staff-card .avatar { flex: 0 0 46px; height: 46px; }
.staff-card span { font-size: 12px; margin-top: 4px; }
.sidebar-footer { padding: 8px; }
.sidebar-footer p { display: none; }
.pos-topbar { min-height: 72px; padding: 12px 20px; gap: 10px; background: white; flex-wrap: nowrap; }
.date-pill { padding: 0 8px; font-size: 13px; min-height: 44px; box-shadow: none; white-space: nowrap; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; min-width: 44px; min-height: 44px; box-shadow: none; }
.status-pill { min-height: 44px; padding: 0 10px; font-size: 12px; white-space: nowrap; box-shadow: none; }
.language-select { width: 66px; min-width: 66px; padding: 0 10px; min-height: 44px; box-shadow: none; }
.day-toggle { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; min-height: 44px; white-space: nowrap; font-size: 13px; font-weight: 700; border: 1px solid transparent; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.day-toggle.open-day { background: #e4f5ee; border-color: #b8dfd0; color: #0e6a4e; }
.day-toggle.open-day:hover { background: #cfeadd; border-color: #91cbb4; }
.day-toggle.close-day { background: #d83b4d; border-color: #d83b4d; color: white; }
.day-toggle.close-day:hover { background: #bd293b; border-color: #bd293b; }
#saveStatus { font-size: 12px; color: var(--muted); }
#saveStatus:empty { display: none; }
.sales-grid { grid-template-columns: minmax(0,1fr) 340px; }
.catalog-area { padding: 20px; background: #f8f9fb; }
.table-strip { padding: 0 0 16px; border-radius: 0; background: transparent; box-shadow: none; }
.table-strip .track-head button { display: flex; align-items: center; gap: 8px; }
.table-chip-row { grid-auto-columns: 100px; }
.table-chip-row button { border-radius: 8px; min-height: 88px; }
.table-chip-row span { white-space: normal; overflow-wrap: anywhere; }
.product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.product-card { grid-template-rows: 150px auto auto; min-height: 238px; border-radius: 8px; padding: 10px; box-shadow: none; border: 1px solid #edf0f4; }
.product-card > div:not(.product-image) { min-width: 0; }
.product-card strong { min-height: 0; font-size: 17px; overflow-wrap: anywhere; }
.product-card b { font-size: 22px; }
.product-image { height: 150px; padding: 8px; border-radius: 6px; background: #f5f6f8; }
.product-image img, .line-image img { width: 100%; height: 100%; object-fit: contain; object-position: center; transform: none; }
.track-dock { margin-top: 24px; border-radius: 0; box-shadow: none; padding: 16px 0 0; background: transparent; }
.track-row button { border-radius: 8px; }
.order-panel { min-width: 0; min-height: 0; background: white; grid-template-rows: auto auto minmax(0,1fr) auto auto auto; }
.order-head { min-height: 88px; padding: 16px; grid-template-columns: 32px minmax(0,1fr) 40px; gap: 8px; }
.order-head > span { width: 32px; height: 40px; background: none; }
.order-head h3 { font-size: 19px; overflow-wrap: anywhere; }
.order-head p { font-size: 12px; margin-top: 4px; }
.order-selects { grid-template-columns: 1fr; padding: 0 16px 14px; }
.receipt-list { padding: 0 16px; }
.receipt-line { grid-template-columns: 54px minmax(0,1fr) auto; gap: 10px; padding: 16px 0; }
.line-image { width: 54px; height: 58px; padding: 3px; background: #f5f6f8; border-radius: 6px; }
.receipt-line strong { font-size: 14px; overflow-wrap: anywhere; }
.qty { grid-column: auto; display: flex; align-items: center; gap: 4px; }
.qty button { width: 34px; height: 40px; min-height: 40px; display: grid; place-items: center; border-radius: 6px; }
.qty b { min-width: 18px; text-align: center; font-size: 14px; }
.totals { padding: 16px; }
.payment-row { padding: 0 16px 12px; grid-template-columns: 1fr 1fr; }
.payment-row button { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; }
.place-order { min-height: 64px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 0; font-size: 17px; }
.empty-order { display: grid; align-content: center; justify-items: center; gap: 12px; color: var(--muted); min-height: 150px; padding: 24px; }
.empty-order p { margin: 0; }
.activity-layout { grid-template-columns: minmax(0,1fr); }
.activity-menu { display: none; }
.activity-content { min-height: 0; padding: 24px; }
.section-head { min-height: 48px; margin-bottom: 16px; }
.section-head h2 { font-size: 24px; }
.table-add-bar { border-radius: 0; box-shadow: none; padding: 0 0 20px; grid-template-columns: auto 130px minmax(140px,1fr) auto; border-bottom: 1px solid var(--line); background: transparent; }
.table-add-bar button { border-radius: 8px; }
.table-board { grid-template-columns: repeat(auto-fill,minmax(145px,1fr)); gap: 12px; }
.table-tile { min-height: 154px; border: 1px solid #e7ebef; border-radius: 8px; background: white; }
.table-main { padding: 18px 12px 44px; border-radius: 8px; gap: 8px; }
.table-main strong { min-width: 44px; font-size: 18px; background: #f5f6f8; }
.table-main small { font-size: 14px; color: #354153; overflow-wrap: anywhere; }
.table-delete, .table-rename { top: auto; bottom: 4px; width: 38px; min-height: 38px; padding: 0; display: grid; place-items: center; background: transparent; box-shadow: none; border-radius: 6px; }
.table-delete { right: 6px; }
.table-rename { position: absolute; left: 6px; color: #657080; }
.table-delete .lucide, .table-rename .lucide { width: 17px; height: 17px; }
.settings-grid { align-content: start; grid-template-columns: minmax(0,1fr); padding: 24px; background: white; }
.settings-grid .form { max-width: 560px; width: 100%; }
.soft-card { border-radius: 0; padding: 0; box-shadow: none; }
.catalog-empty {
  min-height: 280px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 32px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #d9e0e7;
  background: white;
}
.catalog-empty > .lucide { width: 36px; height: 36px; color: #7f8b97; }
.catalog-empty h3, .catalog-empty p { margin: 0; }
.catalog-empty h3 { color: #263445; font-size: 18px; }
.catalog-empty p { max-width: 460px; line-height: 1.5; }
.catalog-empty button { display: flex; align-items: center; gap: 8px; padding: 0 18px; }
.product-photo-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: #9aa5ae; }
.product-photo-fallback[hidden] { display: none; }
.product-photo-fallback .lucide { width: 28px; height: 28px; }
.product-admin-page { min-height: 0; overflow: auto; padding: 24px; background: #f8f9fb; }
.product-admin-head p { margin: 5px 0 0; color: var(--muted); }
.product-admin-grid { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 24px; align-items: start; }
.product-editor { padding: 22px; background: white; border: 1px solid var(--line); }
.product-editor h3 { margin-bottom: 4px; }
.product-editor button { display: flex; align-items: center; justify-content: center; gap: 8px; }
.product-admin-list { display: grid; gap: 10px; min-width: 0; }
.product-admin-list article { display: grid; grid-template-columns: 72px minmax(0,1fr) 44px 44px; align-items: center; gap: 12px; min-height: 92px; padding: 10px; background: white; border: 1px solid var(--line); }
.admin-product-image { width: 72px; height: 70px; padding: 4px; overflow: hidden; background: #f5f6f8; }
.admin-product-image img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.admin-product-copy { min-width: 0; }
.admin-product-copy strong, .admin-product-copy span { display: block; overflow-wrap: anywhere; }
.admin-product-copy span { margin-top: 6px; color: var(--muted); font-size: 13px; }
.icon-action { width: 44px; min-width: 44px; min-height: 44px; padding: 0; display: grid; place-items: center; color: #536170; background: #f3f5f7; }
.danger-action { color: #b42a3a; background: #fff0f2; }
.catalog-empty.compact { min-height: 220px; }
.history-summary { gap: 0; border-block: 1px solid var(--line); }
.history-summary article { border-radius: 0; box-shadow: none; padding: 20px; }
.history-summary strong { font-size: 26px; }
.history-panel { grid-template-columns: minmax(220px, .8fr) minmax(0,1.6fr); gap: 24px; }
.day-list button { box-shadow: none; border: 1px solid var(--line); border-radius: 8px; }
.timeline-list article { border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--line); grid-template-columns: 54px minmax(0,1fr) auto; }
.timeline-list p { overflow-wrap: anywhere; }
.timeline-list time { border-radius: 6px; font-size: 13px; }
#historyMonth { max-width: 190px; margin-left: auto; }
.download-btn { border-radius: 8px; gap: 8px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; max-width: min(520px,calc(100% - 32px)); background: #172c40; color: white; padding: 14px 20px; border-radius: 8px; box-shadow: 0 8px 32px #0002; font-size: 14px; }
.toast[hidden] { display: none; }
dialog { width: min(440px,calc(100% - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); max-height: calc(100dvh - 32px); overflow: auto; }
dialog::backdrop { background: #10203070; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-heading h2 { font-size: 21px; margin: 0; }
.dialog-heading button { min-width: 44px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.dialog-actions button { padding: 0 18px; }
.confirmation-word { color: #c6283a; font-weight: 850; }
.confirmation-input { border-color: #efb2ba !important; background: #fff6f7 !important; color: #b42334; font-weight: 800; }
.confirmation-input.has-value:not(.is-ready) { border-color: #d73748 !important; box-shadow: 0 0 0 3px rgba(215,55,72,.11); }
.confirmation-input.is-ready { border-color: #c6283a !important; background: #fff0f2 !important; box-shadow: 0 0 0 3px rgba(198,40,58,.12); }
.dialog-actions .danger:disabled { background: #e9cbd0; color: white; cursor: not-allowed; }
.business-profile-editor { display: flex; align-items: center; gap: 14px; padding: 12px; background: #f6f8fa; border: 1px solid var(--line); }
.business-profile-editor img { width: 64px; height: 64px; object-fit: contain; border-radius: 50%; padding: 4px; background: white; border: 1px solid var(--line); }
.business-profile-editor span { display: block; margin-top: 4px; color: var(--muted); }
.profile-upload-field { display: grid; gap: 9px; }
.profile-upload-field > strong { font-size: 14px; }
.profile-drop-zone { min-height: 126px; display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 16px; border: 2px dashed #cbd6e2; border-radius: 10px; background: #f8fafc; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.profile-drop-zone:hover, .profile-drop-zone.is-dragging { border-color: var(--blue); background: var(--blue-soft); }
.profile-drop-zone > .lucide { width: 30px; height: 30px; color: var(--blue); }
.profile-drop-zone span, .profile-drop-zone small { display: block; }
.profile-drop-zone b { font-size: 14px; }
.profile-drop-zone small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.profile-drop-zone em { min-height: 38px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 8px; color: white; background: var(--blue); font-size: 12px; font-style: normal; font-weight: 800; white-space: nowrap; }
.profile-upload-actions { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.profile-upload-actions span { min-width: 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.profile-upload-actions button { min-height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; color: var(--red); background: #fff0f2; font-size: 12px; }
.profile-upload-actions button[hidden] { display: none; }
.payment-options { margin: 0; padding: 0; border: 0; }
.payment-options legend { margin-bottom: 10px; font-weight: 800; }
.payment-options label { display: flex; flex-direction: row; align-items: center; gap: 10px; min-height: 50px; padding: 0 14px; border: 1px solid var(--line); background: #f7f9fb; }
.payment-options input { width: 20px; height: 20px; min-height: 0; margin: 0; }
.payment-options .lucide { width: 19px; height: 19px; color: var(--blue); }
.single-payment { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: #f7f9fb; font-weight: 800; }
.single-payment .lucide { width: 19px; height: 19px; color: var(--blue); }
.payment-confirm-name { margin: 0; overflow-wrap: anywhere; }
.payment-confirm-total { font-size: 34px; }
.mobile-nav, .menu-backdrop { display: none; }
.login { height: 100dvh; background: #f3f5f8; }
.login-shell { height: min(720px,calc(100dvh - 48px)); border-radius: 16px; box-shadow: 0 18px 70px #162c4012; }
.showcase-copy { background: none; border: none; border-radius: 0; box-shadow: none; backdrop-filter: none; padding: 0; }
.showcase-copy h1 { font-size: 46px; letter-spacing: 0; }
.login-card { border-radius: 0; box-shadow: none; padding: 28px; background: white; }
.login-card-top img { object-fit: contain; }
.login-panel { padding: 20px; }
.login-panel h2 { font-size: 28px; }
.login-showcase { background-position: 62% center; }
.showcase-strip, .panel-kicker, .showcase-copy p, .showcase-copy .eyebrow { display: none; }

@media (max-width: 1120px) {
  .pos-window { grid-template-columns: minmax(0,1fr); }
  .activity-sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px,85vw); z-index: 40; border-radius: 0; }
  .menu-backdrop { display: block; position: fixed; inset: 0; width: 100%; height: 100%; background: #14253770; z-index: 39; border-radius: 0; }
  .sales-grid { grid-template-columns: minmax(0,1fr) 320px; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .category-row { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .date-pill { display: none; }
}
@media (max-width: 720px) {
  .app-bg { padding: 0; }
  .pos-window { height: 100dvh; border-radius: 0; border: 0; }
  .workspace { grid-template-rows: auto minmax(0,1fr) auto; }
  .pos-topbar { padding: 8px 12px; min-height: 62px; gap: 6px; overflow: hidden; }
  .profile-drop-zone { grid-template-columns: 34px minmax(0,1fr); }
  .profile-drop-zone em { grid-column: 1 / -1; justify-content: center; }
  .status-pill { display: none; }
  #saveStatus { font-size: 11px; }
  #businessSwitch { min-width: 0; max-width: 125px; font-size: 12px; padding: 8px; }
  .day-toggle { padding: 0 10px; font-size: 12px; }
  .day-toggle .lucide { width: 16px; }
  .mobile-nav { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 6px 12px max(6px,env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: white; gap: 8px; }
  .mobile-nav button { display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 52px; font-size: 12px; background: transparent; color: #6b7480; }
  .mobile-nav button.active { background: var(--blue-soft); color: var(--blue); }
  .sales-grid { display: flex; flex-direction: column; min-height: 0; overflow-x: hidden; overflow-y: auto; background: #f8f9fb; }
  .order-panel { position: static; flex: none; height: auto; max-height: none; min-height: 0; border: 0; border-top: 10px solid #eef1f5; border-radius: 0; box-shadow: none; grid-template-rows: auto auto auto auto auto auto; }
  .catalog-area { flex: none; padding: 16px; height: auto; min-height: 0; overflow: visible; }
  .track-dock { display: none; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .product-card { grid-template-rows: 120px auto auto; min-height: 214px; }
  .product-image { height: 120px; padding: 4px; }
  .product-card strong { min-height: 0; }
  .receipt-list { overflow: visible; }
  .receipt-line { grid-template-columns: 54px minmax(0,1fr) auto; }
  .qty { grid-column: auto; }
  .qty button { width: 40px; min-height: 44px; }
  .activity-content, .settings-grid { padding: 16px; overflow: auto; height: auto; min-height: 0; }
  .product-admin-page { padding: 16px; }
  .product-admin-grid { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .product-admin-list article { grid-template-columns: 62px minmax(0,1fr) 42px 42px; gap: 8px; }
  .admin-product-image { width: 62px; height: 62px; }
  .table-add-bar { grid-template-columns: 90px minmax(0,1fr); gap: 10px; }
  .table-add-bar > strong, .table-add-bar > button { grid-column: 1/-1; }
  input, select, textarea, .search-pill input { font-size: 16px; }
  .table-add-bar input { padding: 0 12px; font-size: 16px; }
  .table-board { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .table-tile { min-height: 150px; }
  .section-head { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px; }
  .section-head h2 { font-size: 22px; }
  .section-head .queue-pill { min-height: 38px; border-radius: 8px; font-size: 12px; }
  .history-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .history-summary article { padding: 14px 10px; }
  .history-summary article:last-child { display: none; }
  .history-summary strong { font-size: 24px; }
  .history-panel { grid-template-columns: minmax(0,1fr); }
  .timeline-list article { grid-template-columns: 48px minmax(0,1fr) auto; gap: 10px; padding: 12px 0; }
  .timeline-list b { grid-column: auto; font-size: 14px; }
  #historyMonth { max-width: 165px; }
  .toast { bottom: 84px; width: max-content; }
  .login { padding: 0; display: block; }
  .login-shell { height: 100dvh; width: 100%; grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(150px,28dvh) minmax(0,1fr); border: 0; border-radius: 0; }
  .login-showcase { padding: 18px 24px; min-height: 0; grid-template-rows: auto; background-position: 65% 50%; }
  .login-brand { align-self: end; }
  .login-brand strong { font-size: 26px; }
  .login-logo-circle { width: 56px; height: 56px; }
  .showcase-copy { display: none; }
  .login-panel { padding: 8px 16px; min-height: 0; overflow: auto; background: white; }
  .login-card { padding: 14px 10px; width: 100%; max-width: 420px; }
  .login-card-top { margin-bottom: 12px; }
  .login-card-top img { width: 48px; height: 48px; }
  .login-panel h2 { font-size: 25px; margin-bottom: 18px; }
}
