:root {
  --navy: #061a3b;
  --navy-2: #0b2755;
  --navy-3: #12366e;
  --yellow: #f7cf3f;
  --yellow-soft: #fff6cf;
  --ink: #111827;
  --muted: #687386;
  --line: #e5e9f0;
  --surface: #ffffff;
  --page: #f5f7fb;
  --green: #15945f;
  --green-soft: #dcf8eb;
  --orange: #e97c27;
  --orange-soft: #fff0df;
  --red: #d9485f;
  --red-soft: #ffe8ec;
  --blue: #3778de;
  --blue-soft: #e7f0ff;
  --shadow: 0 14px 38px rgba(9, 28, 61, .10);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  background: #dfe4ec;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: .68;
}

input,
select,
textarea {
  min-width: 0;
}

textarea {
  resize: vertical;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.hidden {
  display: none !important;
}

.app-frame {
  position: relative;
  width: min(100%, 720px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--page);
  box-shadow: 0 0 60px rgba(8, 23, 48, .13);
}

.screen {
  display: none;
  width: 100%;
  min-height: 100dvh;
}

.screen.active {
  display: block;
}

.center-screen.active,
.app-screen.active {
  display: flex;
}

#app-screen {
  display: flex;
}

.center-screen {
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.loading-screen {
  gap: 12px;
  background: var(--navy);
  color: #fff;
}

.loading-screen h1 {
  margin: 8px 0 0;
  font-size: 22px;
}

.loading-screen p {
  margin: 0;
  color: rgba(255, 255, 255, .62);
  font-size: 13px;
}

.brand-mark {
  position: relative;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  transform: rotate(30deg);
  border-radius: 22px;
  background: var(--yellow);
  box-shadow: 0 16px 35px rgba(247, 207, 63, .25);
  color: var(--navy);
}

.brand-mark::after {
  position: absolute;
  inset: 7px;
  content: "";
  border: 2px solid rgba(6, 26, 59, .25);
  border-radius: 16px;
}

.brand-mark span {
  position: relative;
  z-index: 1;
  transform: rotate(-30deg);
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -1px;
}

.loader {
  width: 25px;
  height: 25px;
  margin: 12px 0 2px;
  border: 3px solid rgba(255, 255, 255, .2);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.eyebrow,
.section-head small,
.section-title small,
.sheet-header small,
.account-card small,
.header-brand small {
  margin: 0;
  color: #8190a4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
}

.eyebrow.gold {
  color: var(--yellow);
}

.onboarding-screen {
  min-height: 100dvh;
  overflow-y: auto;
  background: var(--page);
}

.plain-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(10px, env(safe-area-inset-top)) 18px 10px;
  border-bottom: 1px solid rgba(229, 233, 240, .9);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(15px);
}

.brand-inline,
.header-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mini {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--yellow);
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.brand-inline strong {
  color: var(--navy);
  font-size: 14px;
}

.text-button,
.link-button,
.section-link {
  padding: 6px;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  font-weight: 750;
}

.onboarding-content {
  width: min(100%, 620px);
  margin: 0 auto;
  padding: 28px 16px calc(32px + var(--safe-bottom));
}

.step-pill {
  width: fit-content;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--yellow-soft);
  color: #7a5d00;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .12em;
}

.onboarding-content > h1 {
  margin: 12px 0 6px;
  color: var(--navy);
  font-size: 30px;
  letter-spacing: -1px;
}

.onboarding-content > p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.form-stack {
  display: grid;
  gap: 14px;
}

.form-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: var(--surface);
  box-shadow: 0 7px 24px rgba(9, 30, 63, .04);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
}

.section-title h2,
.section-head h2,
.sheet-header h2 {
  margin: 3px 0 0;
  color: var(--navy);
  font-size: 16px;
  letter-spacing: -.3px;
}

.section-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--yellow-soft);
  color: #896600;
}

.section-icon svg {
  width: 21px;
  height: 21px;
}

.field {
  display: grid;
  gap: 7px;
  margin-top: 13px;
}

.field:first-of-type {
  margin-top: 0;
}

.field > span {
  color: #4f5a6c;
  font-size: 11px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea,
.phone-field {
  width: 100%;
  min-height: 48px;
  border: 1px solid #dfe4eb;
  outline: none;
  border-radius: 13px;
  background: #fafbfc;
  color: var(--ink);
  font-size: 13px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.field input,
.field select {
  padding: 0 13px;
}

.field textarea {
  padding: 12px 13px;
  line-height: 1.5;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.phone-field:focus-within {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(55, 120, 222, .11);
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.phone-field {
  display: flex;
  align-items: center;
}

.phone-field b {
  padding: 0 10px 0 13px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.phone-field input {
  min-height: 46px;
  border: 0;
  background: transparent;
  box-shadow: none !important;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 49px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
}

.primary-button {
  width: 100%;
  background: var(--yellow);
  box-shadow: 0 9px 20px rgba(208, 165, 12, .18);
  color: var(--navy);
}

.secondary-button {
  width: 100%;
  border: 1px solid #dce3ed;
  background: #fff;
  color: var(--navy);
}

.location-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.location-button svg {
  width: 19px;
  height: 19px;
  color: var(--blue);
}

.link-button {
  margin-top: 8px;
}

.field-help {
  margin: 8px 2px 0;
  color: #8791a1;
  font-size: 10px;
  line-height: 1.5;
}

.upload-box {
  position: relative;
  min-height: 150px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1.5px dashed #cbd4e1;
  border-radius: 16px;
  background: #fafbfd;
  cursor: pointer;
}

.upload-box input,
.upload-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-box img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  object-fit: cover;
}

.upload-box img.visible {
  display: block;
}

.upload-box img.visible + .upload-placeholder {
  opacity: 0;
}

.upload-placeholder {
  display: grid;
  place-items: center;
  gap: 5px;
  color: var(--navy);
  text-align: center;
}

.upload-placeholder svg {
  width: 25px;
  height: 25px;
  margin-bottom: 3px;
  color: var(--blue);
}

.upload-placeholder strong {
  font-size: 12px;
}

.upload-placeholder small {
  color: var(--muted);
  font-size: 9px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 2px 4px;
  color: #536072;
  font-size: 11px;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--navy);
}

.sticky-submit {
  margin-top: 2px;
}

.app-screen {
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  background: var(--page);
}

.app-header {
  position: relative;
  z-index: 30;
  min-height: 70px;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: max(11px, env(safe-area-inset-top)) 16px 10px;
  background: var(--navy);
  color: #fff;
}

.header-brand > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.header-brand small {
  color: rgba(255, 255, 255, .5);
  font-size: 8px;
}

.header-brand strong {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.status-toggle {
  min-width: 72px;
  min-height: 35px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.status-toggle::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-toggle.open {
  border-color: rgba(76, 224, 156, .25);
  background: rgba(34, 197, 116, .14);
  color: #75e6b2;
}

.status-toggle.closed {
  border-color: rgba(255, 111, 130, .25);
  background: rgba(217, 72, 95, .14);
  color: #ff94a5;
}

.status-toggle:disabled {
  cursor: not-allowed;
  opacity: .72;
}

.new-order-alert {
  z-index: 29;
  min-height: 45px;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  padding: 0 16px;
  background: var(--yellow);
  color: var(--navy);
  text-align: left;
  font-size: 11px;
}

.new-order-alert strong {
  flex: 1;
}

.new-order-alert > span:last-child {
  font-weight: 800;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(217,72,95,.5);
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(217,72,95,0); }
  100% { box-shadow: 0 0 0 0 rgba(217,72,95,0); }
}

.approval-banner {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 15px;
  border-bottom: 1px solid #f2df91;
  background: var(--yellow-soft);
  color: #5f4b06;
}

.approval-banner svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  margin-top: 1px;
}

.approval-banner strong {
  display: block;
  font-size: 11px;
}

.approval-banner p {
  margin: 3px 0 0;
  font-size: 9px;
  line-height: 1.45;
}

.main-content {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.view {
  display: none;
  min-height: 100%;
  padding-bottom: 24px;
}

.view.active {
  display: block;
}

.home-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 25px 17px 54px;
  border-radius: 0 0 30px 30px;
  background: linear-gradient(145deg, var(--navy), var(--navy-2));
  color: #fff;
}

.home-hero h1 {
  margin: 6px 0;
  font-size: 23px;
  letter-spacing: -.8px;
}

.home-hero p:not(.eyebrow) {
  margin: 0;
  color: rgba(255,255,255,.55);
  font-size: 10px;
}

.hero-sales {
  display: grid;
  gap: 3px;
  text-align: right;
}

.hero-sales small {
  color: rgba(255,255,255,.52);
  font-size: 9px;
}

.hero-sales strong {
  color: var(--yellow);
  font-size: 22px;
}

.stats-grid {
  margin: -34px 14px 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.stat-card {
  min-width: 0;
  min-height: 111px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  padding: 12px 9px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(8,30,63,.08);
  text-align: left;
}

.stat-card.accent {
  border-color: #f2d763;
}

.stat-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 9px;
  background: var(--yellow-soft);
  color: #856500;
}

.stat-icon.orange { background: var(--orange-soft); color: var(--orange); }
.stat-icon.blue { background: var(--blue-soft); color: var(--blue); }
.stat-icon.red { background: var(--red-soft); color: var(--red); }

.stat-icon svg {
  width: 16px;
  height: 16px;
}

.stat-card > strong {
  font-size: 19px;
  line-height: 1;
}

.stat-card > small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 650;
  line-height: 1.2;
}

.content-section {
  padding: 24px 15px 0;
}

.content-section.last-section {
  padding-bottom: 12px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.section-head h2 {
  font-size: 17px;
}

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

.quick-action {
  min-height: 71px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: left;
}

.quick-action.primary {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.quick-action > span {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--yellow-soft);
  color: #816200;
}

.quick-action.primary > span {
  background: var(--yellow);
  color: var(--navy);
}

.quick-action svg {
  width: 18px;
  height: 18px;
}

.quick-action div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.quick-action strong {
  font-size: 11px;
}

.quick-action small {
  color: var(--muted);
  font-size: 8px;
}

.quick-action.primary small {
  color: rgba(255,255,255,.55);
}

.stack-list {
  display: grid;
  gap: 9px;
}

.page-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 16px 14px;
  background: #fff;
}

.page-title h1 {
  margin: 5px 0 4px;
  color: var(--navy);
  font-size: 27px;
  letter-spacing: -1px;
}

.page-title p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.action-title {
  align-items: center;
}

.square-add {
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  border-radius: 14px;
  background: var(--yellow);
  color: var(--navy);
  font-size: 25px;
  font-weight: 500;
}

.chip-row {
  display: flex;
  gap: 7px;
  padding: 10px 15px 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: #fff;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  min-height: 33px;
  flex: 0 0 auto;
  padding: 0 13px;
  border: 1px solid #dfe4eb;
  border-radius: 999px;
  background: #fff;
  color: #647084;
  font-size: 10px;
  font-weight: 700;
}

.filter-chip.active {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
}

.page-list {
  padding: 13px 14px 20px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 14px 2px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.search-field svg {
  width: 18px;
  height: 18px;
  color: #8b95a5;
}

.search-field input {
  min-height: 46px;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

.order-card,
.product-card,
.inventory-card,
.low-stock-card {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(7, 28, 61, .04);
}

.order-card {
  padding: 13px;
  cursor: pointer;
}

.card-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-head > div {
  min-width: 0;
}

.card-head h4 {
  margin: 0;
  overflow: hidden;
  color: var(--navy);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.card-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.order-status,
.stock-chip {
  flex: 0 0 auto;
  padding: 5px 7px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 8px;
  font-weight: 800;
}

.order-status.pending_merchant { background: var(--yellow-soft); color: #806000; }
.order-status.merchant_accepted,
.order-status.preparing { background: var(--orange-soft); color: var(--orange); }
.order-status.ready_for_pickup { background: var(--green-soft); color: var(--green); }
.order-status.completed { background: var(--green-soft); color: var(--green); }
.order-status.cancelled,
.order-status.merchant_rejected { background: var(--red-soft); color: var(--red); }

.order-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid #edf0f4;
  color: var(--muted);
  font-size: 9px;
}

.order-meta strong {
  color: var(--navy);
  font-size: 12px;
}

.product-card-with-image,
.low-stock-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  overflow: hidden;
}

.catalog-thumb {
  width: 78px;
  height: 100%;
  min-height: 104px;
  object-fit: cover;
  background: #eef1f5;
}

.product-card-body {
  min-width: 0;
  padding: 12px;
}

.price {
  margin-bottom: 5px;
  color: var(--navy);
  text-align: right;
  font-size: 12px;
  font-weight: 850;
}

.stock-chip.ok { background: var(--green-soft); color: var(--green); }
.stock-chip.low { background: var(--orange-soft); color: var(--orange); }
.stock-chip.out { background: var(--red-soft); color: var(--red); }

.card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 10px;
}

.card-actions button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #dfe4eb;
  border-radius: 10px;
  background: #fff;
  color: #526074;
  font-size: 9px;
  font-weight: 750;
}

.card-actions button.primary-action {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--navy);
}

.card-actions button.danger {
  border-color: #f3cbd2;
  color: var(--red);
}

.inventory-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.inventory-controls button {
  width: 30px;
  height: 30px;
  border: 1px solid #dfe4eb;
  border-radius: 9px;
  background: #fff;
  color: var(--navy);
  font-size: 17px;
}

.inventory-controls strong {
  min-width: 25px;
  text-align: center;
  font-size: 12px;
}

.inventory-controls span {
  margin-left: auto;
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
}

.empty-state {
  min-height: 155px;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed #d5dce6;
  border-radius: 17px;
  background: rgba(255,255,255,.65);
  color: #8b95a5;
  text-align: center;
  font-size: 11px;
}

.empty-state.compact {
  min-height: 82px;
}

.store-cover-card {
  position: relative;
  height: 185px;
  margin: 0 14px 13px;
  overflow: hidden;
  border-radius: 22px;
  background: var(--navy);
  box-shadow: var(--shadow);
}

.store-cover-card > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2,15,38,.9), rgba(2,15,38,.05) 70%);
}

.store-cover-copy {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.profile-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255,255,255,.42);
  border-radius: 13px;
  background: var(--yellow);
  color: var(--navy);
  font-size: 16px;
  font-weight: 900;
}

.store-cover-copy h2 {
  margin: 0;
  font-size: 16px;
}

.store-cover-copy p {
  margin: 4px 0 0;
  color: rgba(255,255,255,.68);
  font-size: 9px;
}

.store-settings,
#store-view > .form-card,
.account-card {
  margin: 0 14px 13px;
}

.compact-title {
  margin-bottom: 12px;
}

.upload-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 12px;
  padding: 11px;
  border: 1px dashed #cfd7e3;
  border-radius: 14px;
  background: #fafbfd;
  cursor: pointer;
}

.upload-row > span {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
}

.upload-row svg {
  width: 19px;
  height: 19px;
}

.upload-row div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.upload-row strong {
  font-size: 11px;
}

.upload-row small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
}

.account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.account-card div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.account-card strong {
  overflow: hidden;
  color: var(--navy);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.danger-button {
  min-height: 38px;
  flex: 0 0 auto;
  padding: 0 13px;
  border: 1px solid #f1c8cf;
  background: #fff;
  color: var(--red);
  font-size: 10px;
}

.version-label {
  margin: 18px 0 8px;
  color: #98a2b1;
  text-align: center;
  font-size: 9px;
}

.bottom-nav {
  z-index: 35;
  min-height: calc(64px + var(--safe-bottom));
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 5px 4px var(--safe-bottom);
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.97);
  box-shadow: 0 -8px 26px rgba(10,30,60,.06);
  backdrop-filter: blur(14px);
}

.nav-btn {
  position: relative;
  min-width: 0;
  min-height: 54px;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  background: transparent;
  color: #7b8799;
  font-size: 8px;
  font-weight: 700;
}

.nav-btn svg,
.nav-icon-wrap > svg {
  width: 21px;
  height: 21px;
}

.nav-btn.active {
  color: var(--navy);
}

.nav-btn.active::before {
  position: absolute;
  top: -5px;
  width: 28px;
  height: 3px;
  border-radius: 0 0 5px 5px;
  background: var(--yellow);
  content: "";
}

.nav-icon-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.nav-badge {
  position: absolute;
  top: -5px;
  right: -10px;
  min-width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 7px;
  font-style: normal;
  font-weight: 850;
}

.modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 11, 30, .58);
  backdrop-filter: blur(3px);
}

.sheet-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  max-height: 91dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 25px 25px 0 0;
  background: #fff;
  box-shadow: 0 -18px 52px rgba(0,0,0,.18);
  animation: sheet-in .22s ease-out;
}

@keyframes sheet-in {
  from { transform: translateY(30px); opacity: .3; }
  to { transform: translateY(0); opacity: 1; }
}

.sheet-handle {
  width: 42px;
  height: 4px;
  margin: 9px auto 3px;
  border-radius: 999px;
  background: #d8dde5;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 17px 13px;
  border-bottom: 1px solid var(--line);
}

.sheet-header h2 {
  font-size: 18px;
}

.close-button {
  width: 37px;
  height: 37px;
  border-radius: 12px;
  background: #f1f3f6;
  color: #536074;
  font-size: 22px;
}

.sheet-content {
  min-height: 0;
  overflow-y: auto;
  padding: 15px 17px calc(22px + var(--safe-bottom));
}

.product-upload {
  min-height: 136px;
}

.order-customer {
  padding: 13px;
  border-radius: 15px;
  background: var(--page);
}

.order-customer strong {
  display: block;
  color: var(--navy);
  font-size: 13px;
}

.order-customer p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.order-items {
  display: grid;
  gap: 0;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
}

.order-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}

.order-item-row:last-child {
  border-bottom: 0;
}

.order-item-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-item-row strong {
  flex: 0 0 auto;
  color: var(--navy);
}

.order-sheet .card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.order-sheet .card-actions:has(button:only-child) {
  grid-template-columns: 1fr;
}

.order-sheet .card-actions button {
  min-height: 47px;
  font-size: 11px;
}

.toast {
  position: fixed;
  z-index: 200;
  right: 16px;
  bottom: calc(78px + var(--safe-bottom));
  left: 16px;
  max-width: 470px;
  margin: auto;
  padding: 12px 14px;
  transform: translateY(20px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 13px;
  background: var(--navy);
  box-shadow: 0 14px 35px rgba(3,17,39,.25);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  font-size: 10px;
  line-height: 1.45;
  transition: opacity .2s, transform .2s;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.error {
  background: #7e1e30;
}

@media (min-width: 600px) {
  .onboarding-content {
    padding-right: 30px;
    padding-left: 30px;
  }

  .stats-grid {
    margin-right: 24px;
    margin-left: 24px;
    gap: 12px;
  }

  .content-section,
  .page-title,
  .page-list {
    padding-right: 24px;
    padding-left: 24px;
  }

  .store-cover-card,
  .store-settings,
  #store-view > .form-card,
  .account-card {
    margin-right: 24px;
    margin-left: 24px;
  }

  .product-card-with-image,
  .low-stock-card {
    grid-template-columns: 95px minmax(0, 1fr);
  }

  .catalog-thumb {
    width: 95px;
  }
}

@media (max-width: 370px) {
  .stats-grid {
    margin-right: 9px;
    margin-left: 9px;
    gap: 6px;
  }

  .stat-card {
    min-height: 106px;
    padding: 10px 7px;
  }

  .stat-card > small {
    font-size: 7.8px;
  }

  .quick-action {
    padding: 9px;
  }

  .quick-action > span {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
