:root {
  --bg-canvas: #ccb4c2;
  --bg-canvas-2: #ddd1d5;
  --ink: #1f2430;
  --ink-soft: #64748a;
  --line: rgba(255, 255, 255, 0.64);
  --line-soft: rgba(31, 36, 48, 0.12);
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-tint: rgba(255, 145, 108, 0.1);
  --glass-glow: rgba(73, 200, 167, 0.12);
  --glass-accent-soft: rgba(162, 177, 255, 0.1);
  --primary: #be3436;
  --primary-strong: #a22c2e;
  --accent: #d26f71;
  --accent-2: #be7895;
  --ok: #147d58;
  --warn: #9d6a14;
  --danger: #b6434f;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 11px;
  --shadow-xl: 0 20px 44px rgba(32, 34, 44, 0.1);
  --shadow-lg: 0 10px 24px rgba(32, 34, 44, 0.08);
  --shadow-md: 0 6px 16px rgba(32, 34, 44, 0.06);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Outfit", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(980px 580px at -8% -14%, var(--glass-tint), transparent 68%),
    radial-gradient(840px 500px at 108% -8%, var(--glass-glow), transparent 70%),
    radial-gradient(800px 500px at 54% 116%, var(--glass-accent-soft), transparent 74%),
    linear-gradient(165deg, var(--bg-canvas), var(--bg-canvas-2));
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-x: none;
}

body[data-theme="dark"] {
  --bg-canvas: #0e141d;
  --bg-canvas-2: #17202f;
  --ink: #eef3fb;
  --ink-soft: #9faec4;
  --line: rgba(141, 163, 193, 0.26);
  --line-soft: rgba(141, 163, 193, 0.2);
  --glass: rgba(21, 30, 43, 0.8);
  --glass-strong: rgba(27, 37, 52, 0.93);
  --glass-tint: rgba(255, 141, 102, 0.14);
  --glass-glow: rgba(80, 214, 186, 0.12);
  --glass-accent-soft: rgba(154, 168, 255, 0.12);
  --primary: #ff9b74;
  --primary-strong: #ff7f4d;
  --accent: #50d6ba;
  --accent-2: #9aa8ff;
  --ok: #5fe2b7;
  --warn: #ffd07a;
  --danger: #ff8fa0;
  --shadow-xl: 0 20px 44px rgba(1, 4, 10, 0.54);
  --shadow-lg: 0 10px 24px rgba(1, 4, 10, 0.42);
  --shadow-md: 0 6px 16px rgba(1, 4, 10, 0.34);
  background:
    radial-gradient(860px 460px at -9% -12%, var(--glass-tint), transparent 64%),
    radial-gradient(720px 420px at 110% -6%, var(--glass-glow), transparent 68%),
    radial-gradient(700px 420px at 52% 118%, var(--glass-accent-soft), transparent 74%),
    linear-gradient(165deg, var(--bg-canvas), var(--bg-canvas-2));
}

body,
.glass,
.panel,
.kpi-card,
.product-card,
input,
textarea,
select,
.table-wrap,
.link-box,
.credential-item,
.chip,
.footer-social-icon,
.theme-switch,
.public-dock-btn,
.public-sheet-option {
  transition: background 0.28s ease, color 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-family: "Sora", sans-serif;
  font-weight: 700;
}

p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.66;
}

a {
  color: inherit;
}

.bg-shape {
  position: fixed;
  border-radius: 999px;
  filter: blur(56px);
  pointer-events: none;
  z-index: -3;
  animation: drift 18s ease-in-out infinite alternate;
}

.bg-shape-a {
  width: 440px;
  height: 440px;
  background: rgba(255, 152, 106, 0.18);
  top: -180px;
  left: -140px;
}

.bg-shape-b {
  width: 420px;
  height: 420px;
  background: rgba(53, 200, 189, 0.16);
  top: 18%;
  right: -160px;
  animation-delay: 1.8s;
}

.bg-shape-c {
  width: 340px;
  height: 340px;
  background: rgba(255, 190, 138, 0.14);
  bottom: -150px;
  left: 20%;
  animation-delay: 3.2s;
}

.noise-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
  background-image: radial-gradient(rgba(255, 255, 255, 0.24) 0.7px, transparent 0);
  background-size: 2px 2px;
  opacity: 0.1;
}

.app-shell {
  width: min(1320px, calc(100% - 24px));
  margin: 14px auto 26px;
  position: relative;
  max-width: 100%;
}

.glass {
  background:
    radial-gradient(132% 112% at 0% 0%, rgba(255, 255, 255, 0.66), transparent 56%),
    radial-gradient(120% 120% at 100% 100%, var(--glass-glow), transparent 70%),
    linear-gradient(158deg, var(--glass-strong), var(--glass));
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.66), inset 0 -1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(44px) saturate(185%) contrast(104%);
  -webkit-backdrop-filter: blur(44px) saturate(185%) contrast(104%);
}

.topbar {
  position: sticky;
  top: 10px;
  z-index: 20;
  border-radius: var(--radius-xl);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  isolation: isolate;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.5)),
    radial-gradient(120% 140% at 100% 0%, var(--glass-tint), transparent 68%),
    radial-gradient(130% 160% at -5% 100%, var(--glass-glow), transparent 74%);
  box-shadow: 0 16px 34px rgba(46, 24, 33, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.64);
  animation: reveal-up 0.5s ease both;
}

.topbar,
.app-footer {
  backdrop-filter: blur(46px) saturate(190%) contrast(104%);
  -webkit-backdrop-filter: blur(46px) saturate(190%) contrast(104%);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.88), var(--glass-tint), var(--glass-glow));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

.topbar::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.3), transparent 44%, rgba(255, 255, 255, 0.2) 67%, transparent 86%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 16px);
  opacity: 0.6;
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: 0;
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 1 1 auto;
  max-width: min(54%, 640px);
  min-width: 0;
}

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

.brand-badge {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(255, 144, 98, 0.24);
}

.brand-badge.has-logo {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0;
  padding: 0;
}

.brand-logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}

.brand-wrap h1 {
  font-size: clamp(1.1rem, 2.2vw, 1.48rem);
  letter-spacing: -0.035em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.52);
}

.brand-wrap p {
  font-size: 0.8rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.top-actions {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  flex: 0 1 auto;
  max-width: min(58%, 860px);
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}

.top-actions::-webkit-scrollbar {
  height: 4px;
}

.top-actions::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px;
}

.top-actions .btn,
.top-actions .role-pill {
  flex: 0 0 auto;
}

.mobile-menu-btn,
.mobile-menu-backdrop {
  display: none;
}

.page-content {
  margin-top: 14px;
}

.app-footer {
  margin-top: 14px;
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  animation: reveal-up 0.7s ease both;
}

.app-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.84), var(--glass-tint), var(--glass-glow));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 0;
}

.app-footer::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, 0.22), transparent 44%, rgba(255, 255, 255, 0.16) 67%, transparent 86%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 18px);
  opacity: 0.58;
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: 0;
}

.app-footer > * {
  position: relative;
  z-index: 1;
}

body.route-storefront .app-shell {
  padding-bottom: 108px;
}

body.route-storefront .page-content {
  padding-bottom: 26px;
}

body.route-shop .app-shell {
  padding-bottom: 0;
}

body.route-shop .page-content {
  padding-bottom: 152px;
}

body.route-storefront .app-footer {
  position: fixed;
  left: 0;
  right: 0;
  transform: none;
  bottom: calc(8px + env(safe-area-inset-bottom));
  width: min(1320px, calc(100% - 24px));
  margin: 0 auto;
  z-index: 90;
}

body.route-auth #mobile-menu-backdrop,
body[data-default-route="login"] #mobile-menu-backdrop,
body[data-default-route="signup"] #mobile-menu-backdrop {
  display: none !important;
}

body.route-auth .app-shell,
body[data-default-route="login"] .app-shell,
body[data-default-route="signup"] .app-shell {
  width: min(760px, calc(100% - 16px));
  margin: 8px auto 12px;
  padding-bottom: 114px;
  min-height: 0;
}

body.route-auth .page-content,
body[data-default-route="login"] .page-content,
body[data-default-route="signup"] .page-content {
  margin-top: 6px;
  min-height: calc(100dvh - 212px);
  display: grid;
  align-items: center;
  padding-top: 0;
}

body.route-auth .app-footer,
body[data-default-route="login"] .app-footer,
body[data-default-route="signup"] .app-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(8px + env(safe-area-inset-bottom));
  width: min(760px, calc(100% - 16px));
  margin: 0 auto;
  z-index: 130;
}

body.route-auth .footer-actions,
body[data-default-route="login"] .footer-actions,
body[data-default-route="signup"] .footer-actions {
  justify-content: flex-end;
}

.footer-branding {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.footer-brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

.footer-branding.has-logo {
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "logo name"
    "logo tag";
  column-gap: 8px;
  row-gap: 1px;
  align-items: center;
}

.footer-branding.has-logo .footer-brand-logo {
  grid-area: logo;
}

.footer-branding strong {
  font-family: "Sora", sans-serif;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.footer-branding.has-logo strong {
  grid-area: name;
}

.footer-branding p {
  font-size: 0.76rem;
  color: var(--ink-soft);
}

.footer-branding.has-logo p {
  grid-area: tag;
}

.footer-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}

.footer-catalog-controls {
  display: none;
}

body.route-shop .footer-actions {
  grid-area: actions;
  flex: 0 1 auto;
  min-width: 0;
  justify-content: flex-end;
  align-self: end;
  margin-top: 4px;
  gap: 8px;
}

body.route-shop .footer-catalog-controls {
  grid-area: controls;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  min-width: 0;
  align-self: center;
  margin-bottom: 0;
}

body.route-shop .footer-branding {
  grid-area: branding;
  align-self: end;
  justify-self: start;
  margin-top: 6px;
}

body.route-shop .app-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "controls controls"
    "branding actions";
  row-gap: 8px;
  align-items: center;
  padding-top: 10px;
  padding-bottom: 9px;
}

body.route-shop .footer-dock-btn {
  padding: 7px 8px;
  border-radius: 10px;
}

body.route-shop .footer-dock-btn span {
  font-size: 0.58rem;
}

body.route-shop .footer-dock-btn strong {
  font-size: 0.72rem;
}

.footer-social-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.footer-social-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(18, 32, 51, 0.16);
  background: rgba(255, 255, 255, 0.88);
  color: #2b3f56;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.footer-social-icon img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.footer-social-icon:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(244, 122, 77, 0.34);
}

.theme-switch {
  display: none !important;
  border: 1px solid rgba(18, 32, 51, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: #2b3f56;
  padding: 5px 10px 5px 9px;
  display: none !important;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: "Sora", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
}

.theme-switch-icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.theme-switch-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.theme-switch-icon-sun {
  color: #f59e0b;
  opacity: 1;
}

.theme-switch-icon-moon {
  color: #7a8596;
  opacity: 0.5;
}

.theme-switch-track {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(18, 32, 51, 0.18);
  background: linear-gradient(135deg, rgba(255, 122, 69, 0.28), rgba(20, 184, 166, 0.24));
  position: relative;
}

.theme-switch-thumb {
  position: absolute;
  top: 50%;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: #fff;
  box-shadow: 0 3px 8px rgba(9, 19, 34, 0.22);
  transition: left 0.22s ease, background 0.22s ease;
}

.theme-switch[data-theme-mode="dark"] .theme-switch-thumb {
  left: calc(100% - 18px);
  background: #fde8d5;
}

.theme-switch[data-theme-mode="dark"] .theme-switch-icon-sun {
  opacity: 0.45;
}

.theme-switch[data-theme-mode="dark"] .theme-switch-icon-moon {
  color: #e2e8f0;
  opacity: 1;
}

.theme-switch-text {
  line-height: 1;
}

.layout-stack {
  display: grid;
  gap: 12px;
}

.layout-two {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 12px;
}

.panel {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-lg);
  animation: reveal-up 0.45s ease both;
  overflow: hidden;
}

.panel::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title h2,
.section-title h3 {
  font-size: clamp(1.05rem, 2vw, 1.24rem);
}

.section-title h2 {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-title p {
  font-size: 0.86rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.kpi-grid.kpi-slider {
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
  touch-action: pan-x;
}

.kpi-card {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  border: 1px solid rgba(18, 32, 51, 0.1);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.9), rgba(243, 247, 255, 0.76));
  box-shadow: var(--shadow-md);
  padding: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.kpi-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.kpi-card span {
  color: var(--ink-soft);
  font-size: 0.76rem;
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}

.kpi-card strong {
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

.kpi-card small {
  color: var(--ink-soft);
  font-size: 0.74rem;
  display: block;
  margin-top: 2px;
}

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

.role-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(244, 122, 77, 0.3);
  color: #a25f35;
  background: rgba(244, 122, 77, 0.12);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn {
  border: 1px solid rgba(244, 122, 77, 0.22);
  border-radius: var(--radius-sm);
  background: linear-gradient(145deg, var(--primary), var(--primary-strong));
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  padding: 10px 14px;
  box-shadow: 0 6px 14px rgba(244, 122, 77, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn.secondary {
  background: linear-gradient(145deg, var(--accent), #1eaea2);
  box-shadow: 0 6px 14px rgba(53, 200, 189, 0.26);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.78);
  color: #24415c;
  border: 1px solid rgba(14, 29, 49, 0.16);
  box-shadow: none;
}

.btn.ghost:hover {
  border-color: rgba(244, 122, 77, 0.34);
  background: rgba(255, 255, 255, 0.94);
}

.btn.danger {
  background: linear-gradient(145deg, #d86b6b, var(--danger));
  box-shadow: 0 6px 14px rgba(159, 48, 48, 0.22);
}

.btn.small {
  font-size: 0.74rem;
  padding: 8px 11px;
  border-radius: 9px;
}

.access-pill {
  display: grid;
  gap: 2px;
  border: 1px solid rgba(244, 122, 77, 0.24);
  border-radius: 14px;
  padding: 11px 12px;
  background: linear-gradient(135deg, rgba(244, 122, 77, 0.14), rgba(53, 200, 189, 0.09));
}

.access-pill span {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #406089;
}

.access-pill strong {
  font-size: 1.1rem;
}

.access-pill small {
  font-size: 0.74rem;
  color: #60768f;
}

button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

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

.field {
  display: grid;
  gap: 6px;
}

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

label {
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-weight: 700;
  letter-spacing: 0.01em;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(18, 32, 51, 0.16);
  border-radius: 10px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  outline: none;
  font: inherit;
  font-size: 0.86rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.password-field {
  position: relative;
  display: flex;
  align-items: center;
}

.password-field input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 9px;
  border: 1px solid rgba(18, 32, 51, 0.16);
  background: rgba(255, 255, 255, 0.82);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 0;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.password-toggle-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #425d7a;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle[data-visible="true"] .icon-eye {
  display: none;
}

.password-toggle[data-visible="true"] .icon-eye-off {
  display: block;
}

.password-toggle:hover {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(244, 122, 77, 0.34);
}

.password-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(244, 122, 77, 0.2);
  border-color: rgba(244, 122, 77, 0.48);
}

textarea {
  min-height: 94px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(244, 122, 77, 0.55);
  box-shadow: 0 0 0 3px rgba(244, 122, 77, 0.22);
  background: rgba(255, 255, 255, 0.98);
}

.helper-text {
  font-size: 0.72rem;
  color: #6a8094;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.inline-check input {
  width: 15px;
  height: 15px;
  margin: 0;
}

.theme-color-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.color-field input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  height: 44px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(18, 32, 51, 0.16);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
}

.color-field input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-field input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 7px;
}

.color-field input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: 7px;
}

.theme-preview-strip {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(18, 32, 51, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.footer-social-head {
  justify-content: space-between;
  align-items: center;
}

.footer-social-admin-list {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.footer-social-row {
  border: 1px solid rgba(18, 32, 51, 0.12);
  border-radius: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.66);
  display: grid;
  grid-template-columns: minmax(112px, 0.9fr) minmax(170px, 1.45fr) minmax(130px, 1fr) minmax(88px, 0.62fr) auto;
  gap: 8px;
  align-items: center;
}

.footer-social-row > * {
  min-width: 0;
}

.footer-social-row .btn {
  white-space: nowrap;
}

.upload-status {
  font-size: 0.74rem;
  color: #60788f;
  line-height: 1.35;
}

.upload-status.ready {
  color: var(--ok);
  font-weight: 700;
}

.shop-logo-preview {
  min-height: 126px;
  border-radius: 14px;
  border: 1px dashed rgba(18, 32, 51, 0.2);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.66)),
    radial-gradient(110% 130% at 100% 100%, rgba(255, 255, 255, 0.44), transparent 72%);
  display: grid;
  place-items: center;
  padding: 10px;
}

.shop-logo-preview.has-logo {
  border-style: solid;
  border-color: rgba(18, 32, 51, 0.16);
}

.shop-logo-preview img {
  width: 100%;
  max-height: 106px;
  object-fit: contain;
  display: block;
  background: transparent;
}

.shop-logo-preview-empty {
  font-size: 0.75rem;
  font-weight: 700;
  color: #637b90;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid rgba(14, 29, 49, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.category-table-wrap {
  overflow-x: hidden;
}

.category-table {
  min-width: 0;
  table-layout: fixed;
}

.category-table th,
.category-table td {
  white-space: normal;
  word-break: break-word;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

table.category-table {
  min-width: 0;
}

th,
td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid rgba(14, 29, 49, 0.08);
  vertical-align: top;
  font-size: 0.84rem;
}

th {
  font-size: 0.7rem;
  color: #627b90;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

tbody tr:hover {
  background: rgba(244, 122, 77, 0.09);
}

.status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 5px 10px;
}

.status.ok {
  background: rgba(7, 135, 95, 0.16);
  color: var(--ok);
}

.status.warn {
  background: rgba(168, 117, 25, 0.18);
  color: var(--warn);
}

.status.danger {
  background: rgba(191, 78, 78, 0.18);
  color: var(--danger);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid rgba(14, 29, 49, 0.15);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #27435c;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.chip.active {
  background: rgba(244, 122, 77, 0.14);
  border-color: rgba(244, 122, 77, 0.42);
  color: #9a5a34;
}

.admin-switch .chip {
  min-width: 112px;
  text-align: center;
}

.filter-grid {
  align-items: end;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
}

.public-toolbar .field {
  min-width: 0;
  display: grid;
  align-content: start;
  grid-template-rows: auto auto auto;
  gap: 8px;
}

.public-toolbar .field .row {
  margin-top: 0;
  align-items: center;
}

.public-toolbar .field:last-child {
  align-content: start;
}

.public-toolbar .field:last-child .row {
  justify-content: flex-end;
}

.qr-card {
  padding: 12px;
}

.shop-detail-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.detail-card {
  border: 1px solid rgba(14, 29, 49, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px;
  display: grid;
  gap: 3px;
}

.detail-card span {
  font-size: 0.72rem;
  font-weight: 700;
  color: #5e7892;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-card strong {
  font-size: 0.86rem;
  line-height: 1.5;
  color: #1f3c57;
}

.social-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social-btn {
  text-decoration: none;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.swipe-row {
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
  touch-action: pan-x;
}

.product-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.62));
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(12, 27, 50, 0.14);
}

.product-image {
  width: 100%;
  height: 164px;
  object-fit: cover;
  background: linear-gradient(140deg, rgba(244, 122, 77, 0.24), rgba(53, 200, 189, 0.22));
}

.product-image.placeholder {
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.95rem;
  color: rgba(28, 56, 84, 0.75);
}

.product-body {
  padding: 12px;
  display: grid;
  gap: 8px;
  height: 100%;
}

.product-title {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: flex-start;
}

.public-shop-shell {
  position: relative;
  overflow-x: clip;
}

.public-hero-actions {
  justify-content: flex-end;
}

.public-count-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(14, 29, 49, 0.16);
  background: rgba(255, 255, 255, 0.78);
  color: #27445d;
  font-size: 0.73rem;
  font-weight: 800;
  padding: 6px 10px;
  white-space: nowrap;
}

.public-product-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  align-items: start;
}

.public-product-card {
  cursor: pointer;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  display: grid;
  grid-template-rows: auto auto;
  gap: 6px;
  align-content: start;
}

.public-product-card:hover {
  transform: none;
  box-shadow: none;
}

.public-image-frame {
  position: relative;
  display: grid;
  place-items: stretch;
  width: 100%;
  aspect-ratio: 2 / 3;
  line-height: 0;
  border-radius: 10px;
  border: 0;
  overflow: hidden;
  background: #eef2f8;
}

.public-product-image {
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  border: 0;
  background: transparent;
  padding: 0;
  display: block;
}

.public-product-image.placeholder {
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  color: rgba(34, 58, 80, 0.55);
}

.public-product-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 3px;
  padding: 4px 1px 0;
  height: auto;
  min-height: 0;
  align-content: start;
}

.public-product-brand {
  font-size: 0.74rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #5a7086;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.public-product-name {
  font-size: 0.84rem;
  line-height: 1.28;
  font-weight: 500;
  color: #334e66;
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow: visible;
  text-overflow: unset;
  min-height: 0;
}

.public-product-price {
  font-size: 0.96rem;
  line-height: 1.15;
  font-weight: 800;
  color: #0f1e33;
}

.public-product-brand,
.public-product-name,
.public-product-price {
  margin: 0;
}

.public-modal-image {
  height: 220px;
  border-radius: 12px;
  object-fit: cover;
  padding: 0;
}

.public-modal-meta {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.public-mobile-dock,
.public-mobile-sheet,
.public-mobile-sheet-backdrop {
  display: none;
}

body.route-shop .public-toolbar {
  display: none;
}

body.route-shop .public-mobile-dock {
  display: none !important;
}

.public-mobile-sheet-backdrop.is-open {
  display: block;
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(5, 12, 22, 0.42);
  z-index: 120;
}

.public-mobile-sheet {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(118px + env(safe-area-inset-bottom));
  width: min(520px, calc(100% - 24px));
  max-height: min(70vh, 620px);
  overflow-y: auto;
  border-radius: 16px;
  padding: 12px;
  z-index: 121;
}

.public-mobile-sheet.is-open {
  display: grid;
}

.public-dock-btn {
  border: 1px solid rgba(14, 29, 49, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: #203d58;
  padding: 8px 7px;
  display: grid;
  gap: 2px;
  min-width: 0;
  cursor: pointer;
  text-align: left;
}

.public-dock-btn span {
  font-size: 0.63rem;
  font-weight: 700;
  color: #5a7288;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.public-dock-btn strong {
  font-size: 0.76rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.public-mobile-sheet {
  border-radius: 18px 18px 0 0;
  padding: 12px;
}

.public-mobile-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.public-mobile-sheet-body {
  display: grid;
  gap: 9px;
}

.public-sheet-options {
  display: grid;
  gap: 8px;
}

.public-sheet-option {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(14, 29, 49, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: #27445d;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 10px;
  cursor: pointer;
}

.public-sheet-option.active {
  border-color: rgba(244, 122, 77, 0.38);
  background: rgba(244, 122, 77, 0.14);
  color: #9a5a34;
}

.public-sheet-filter {
  display: grid;
  gap: 8px;
}

.stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stock-steps {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stock-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.stock-pill.live {
  background: rgba(7, 135, 95, 0.18);
  color: var(--ok);
}

.stock-pill.out {
  background: rgba(191, 78, 78, 0.18);
  color: var(--danger);
}

.empty-state {
  text-align: center;
  border-radius: 14px;
  border: 1px dashed rgba(14, 29, 49, 0.2);
  padding: 30px 14px;
  background: rgba(255, 255, 255, 0.54);
}

.empty-state h2 {
  margin-bottom: 6px;
}

.insight-list {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  gap: 5px;
}

.bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
}

.bar-track {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(14, 29, 49, 0.14);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.auth-shell {
  width: min(560px, 100%);
  margin: max(18px, 6vh) auto 0;
}

.auth-card {
  border-radius: var(--radius-xl);
  padding: 20px;
  display: grid;
  gap: 14px;
}

.auth-shell-premium {
  width: min(980px, 100%);
  margin: 0 auto;
  align-self: start;
}

.auth-card-premium {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  align-content: flex-start;
  height: auto;
  min-height: 0;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 24px;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background:
    radial-gradient(150% 120% at 0% 0%, rgba(255, 255, 255, 0.72), transparent 52%),
    radial-gradient(130% 120% at 100% 100%, var(--glass-glow), transparent 66%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.48));
  box-shadow:
    0 24px 44px rgba(32, 20, 32, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -1px 0 rgba(255, 255, 255, 0.2);
}

body.route-login .auth-card-premium,
body[data-default-route="login"] .auth-card-premium {
  min-height: 0;
}

.auth-ambient {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(0.4px);
}

.auth-ambient-a {
  width: 220px;
  height: 220px;
  top: -120px;
  right: -70px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.8), var(--glass-tint) 46%, transparent 74%);
  opacity: 0.7;
}

.auth-ambient-b {
  width: 180px;
  height: 180px;
  bottom: -92px;
  left: -56px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.72), var(--glass-glow) 48%, transparent 74%);
  opacity: 0.62;
}

.auth-card-premium > *:not(.auth-ambient) {
  position: relative;
  z-index: 1;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
  margin-top: 0;
  height: auto;
  min-height: 0;
}

.auth-side {
  border-radius: 20px;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid rgba(18, 32, 51, 0.1);
  background:
    radial-gradient(130% 130% at 0% 0%, rgba(255, 255, 255, 0.72), transparent 58%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.58));
  height: fit-content;
}

.auth-side h2 {
  font-size: clamp(1.28rem, 2.2vw, 1.78rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  background: linear-gradient(94deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-side p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: #4d647a;
}

.auth-side-points {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}

.auth-side-points span {
  font-size: 0.74rem;
  font-weight: 700;
  color: #445b73;
  border: 1px solid rgba(18, 32, 51, 0.12);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.74);
  width: fit-content;
  max-width: 100%;
}

.auth-form-wrap {
  border-radius: 20px;
  border: 1px solid rgba(18, 32, 51, 0.1);
  background: rgba(255, 255, 255, 0.7);
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 8px;
  height: fit-content;
}

body.route-login .auth-form-wrap,
body[data-default-route="login"] .auth-form-wrap {
  margin-top: clamp(26px, 4vh, 52px);
}

.login-form-wrap {
  background:
    radial-gradient(132% 120% at 0% 0%, rgba(255, 255, 255, 0.86), transparent 58%),
    linear-gradient(152deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.68));
  box-shadow:
    0 16px 30px rgba(28, 22, 30, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.76);
  border-color: rgba(18, 32, 51, 0.14);
}

.auth-top-premium {
  display: grid;
  gap: 4px;
}

.auth-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(18, 32, 51, 0.12);
  background: rgba(255, 255, 255, 0.76);
  color: #5a6e83;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-form-premium .field input,
.auth-form-premium .field select,
.auth-form-premium .field textarea {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(18, 32, 51, 0.14);
}

.auth-form-premium .field input:focus,
.auth-form-premium .field select:focus,
.auth-form-premium .field textarea:focus {
  background: rgba(255, 255, 255, 0.86);
}

.auth-form-premium .auth-actions {
  margin-top: 2px;
}

.auth-utility-row {
  display: flex;
  justify-content: flex-end;
}

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

.auth-actions-grid .btn {
  width: 100%;
  justify-content: center;
}

.forgot-password-card {
  width: min(440px, 100%);
  display: grid;
  gap: 8px;
}

.forgot-password-note {
  font-size: 0.78rem;
  color: #536b82;
  line-height: 1.45;
}

.forgot-password-code {
  font-family: "Sora", sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: var(--primary-strong);
}

.auth-top {
  display: grid;
  gap: 4px;
}

.auth-top h2 {
  font-size: clamp(1.22rem, 2.4vw, 1.56rem);
  background: linear-gradient(92deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-top p {
  font-size: 0.86rem;
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.company-about-shell {
  width: min(920px, 100%);
  margin: 0 auto;
}

.company-about-body {
  display: grid;
  gap: 10px;
}

.company-about-logo {
  width: min(160px, 48vw);
  height: auto;
  object-fit: contain;
  display: block;
}

.login-layout {
  display: grid;
  gap: 12px;
  grid-template-columns: 1.15fr 0.85fr;
}

.login-showcase,
.login-card {
  border-radius: var(--radius-lg);
  padding: 18px;
}

.login-showcase {
  display: grid;
  align-content: start;
  gap: 8px;
}

.login-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.login-showcase ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #4f667b;
  line-height: 1.78;
}

.login-mini-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.login-mini-card {
  border: 1px solid rgba(14, 29, 49, 0.14);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 4px;
}

.login-mini-card strong {
  font-size: 0.8rem;
}

.login-mini-card span {
  color: #5e768c;
  font-size: 0.75rem;
  line-height: 1.45;
}

.scan-lock-grid {
  width: min(760px, 100%);
  margin: 14px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.scan-step {
  border: 1px solid rgba(14, 29, 49, 0.15);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.74);
  display: grid;
  gap: 4px;
  text-align: left;
}

.scan-step strong {
  font-size: 0.83rem;
}

.scan-step span {
  font-size: 0.77rem;
  color: #587089;
  line-height: 1.45;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: rgba(194, 206, 224, 0.3);
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(244, 122, 77, 0.56), rgba(53, 200, 189, 0.44));
  border-radius: 999px;
}

.credential-grid {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.credential-item {
  border: 1px solid rgba(14, 29, 49, 0.14);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.7);
}

.credential-item strong {
  font-size: 0.82rem;
}

.credential-item code {
  display: block;
  margin-top: 3px;
  color: #a8643a;
  font-size: 0.78rem;
  font-weight: 700;
}

.link-box {
  border-radius: 12px;
  border: 1px solid rgba(14, 29, 49, 0.15);
  background: rgba(255, 255, 255, 0.72);
  padding: 10px;
  word-break: break-all;
  font-size: 0.79rem;
  color: #304a60;
}

.qr-wrap {
  width: 180px;
  height: 180px;
  border-radius: 14px;
  border: 1px solid rgba(14, 29, 49, 0.16);
  background: rgba(255, 255, 255, 0.78);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.qr-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(7, 17, 29, 0.5);
  display: grid;
  place-items: center;
  padding: 14px;
  z-index: 130;
}

.modal-card {
  width: min(520px, 100%);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 20px 44px rgba(7, 17, 29, 0.34);
}

.image-crop-modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  align-content: flex-start;
  padding: 12px;
  background: rgba(5, 12, 22, 0.56);
  z-index: 150;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.image-crop-modal.is-open {
  display: grid;
}

.image-crop-card {
  width: min(450px, 100%);
  border-radius: 20px;
  padding: 14px;
  display: grid;
  gap: 10px;
  max-height: min(92vh, 860px);
  overflow-y: auto;
}

.image-crop-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.image-crop-head h3 {
  font-size: 1rem;
}

.image-crop-head p {
  font-size: 0.76rem;
  margin-top: 2px;
}

.image-crop-canvas-wrap {
  border: 1px solid rgba(14, 29, 49, 0.14);
  border-radius: 14px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.78);
}

#image-crop-canvas {
  width: min(100%, 300px);
  aspect-ratio: 2 / 3;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
  background: #f0f3f8;
}

.image-crop-controls {
  display: grid;
  gap: 8px;
}

.image-crop-controls label span {
  margin-left: 6px;
  color: #a8643a;
  font-weight: 800;
}

.image-crop-actions {
  position: sticky;
  bottom: 0;
  padding-top: 8px;
  z-index: 2;
}

body.image-cropper-open {
  overflow: hidden;
}

.muted {
  color: #60798f;
  font-size: 0.8rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 16px);
  background: rgba(12, 22, 38, 0.95);
  color: #fff;
  padding: 10px 14px;
  border-radius: 11px;
  font-size: 0.82rem;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 170;
  box-shadow: 0 12px 24px rgba(7, 17, 29, 0.32);
}

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

body[data-theme="dark"] .noise-layer {
  opacity: 0.11;
}

body[data-theme="dark"] .topbar::before {
  background: linear-gradient(120deg, rgba(170, 198, 230, 0.24), var(--glass-tint), var(--glass-glow));
}

body[data-theme="dark"] .glass {
  background:
    radial-gradient(130% 110% at 0% 0%, rgba(170, 198, 230, 0.16), transparent 60%),
    radial-gradient(120% 120% at 100% 100%, var(--glass-glow), transparent 72%),
    linear-gradient(158deg, var(--glass-strong), var(--glass));
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(156, 181, 212, 0.18);
}

body[data-theme="dark"] .brand-wrap p {
  color: #9eb3cc;
}

body[data-theme="dark"] .panel::after {
  background: linear-gradient(90deg, transparent, rgba(169, 197, 236, 0.42), transparent);
}

body[data-theme="dark"] .footer-branding strong {
  color: #dfecff;
}

body[data-theme="dark"] .footer-branding p {
  color: #9ab1cb;
}

body[data-theme="dark"] .footer-social-icon {
  color: #d8e7fb;
  background: rgba(14, 24, 41, 0.74);
  border-color: rgba(152, 181, 214, 0.34);
}

body[data-theme="dark"] .footer-social-icon:hover {
  background: rgba(23, 38, 62, 0.9);
  border-color: rgba(95, 155, 255, 0.52);
}

body[data-theme="dark"] .kpi-card {
  background: linear-gradient(160deg, rgba(16, 30, 49, 0.86), rgba(11, 20, 34, 0.72));
  border-color: rgba(152, 181, 214, 0.26);
}

body[data-theme="dark"] .kpi-card span {
  color: #b2c5dd;
}

body[data-theme="dark"] .kpi-card small {
  color: #97aec9;
}

body[data-theme="dark"] .role-pill {
  color: #d9e8ff;
  background: rgba(95, 155, 255, 0.16);
  border-color: rgba(95, 155, 255, 0.42);
}

body[data-theme="dark"] .btn.ghost {
  color: #dbe8fb;
  background: rgba(26, 33, 45, 0.92);
  border-color: rgba(152, 181, 214, 0.36);
}

body[data-theme="dark"] .btn.ghost:hover {
  background: rgba(31, 41, 55, 0.98);
  border-color: rgba(95, 155, 255, 0.54);
}

body[data-theme="dark"] .mobile-menu-backdrop {
  background: rgba(1, 7, 14, 0.66);
}

body[data-theme="dark"] .access-pill {
  background: linear-gradient(135deg, rgba(95, 155, 255, 0.18), rgba(44, 199, 181, 0.11));
  border-color: rgba(152, 181, 214, 0.3);
}

body[data-theme="dark"] .access-pill span {
  color: #a8c1df;
}

body[data-theme="dark"] .access-pill small {
  color: #9cb4d0;
}

body[data-theme="dark"] label {
  color: #afc2da;
}

body[data-theme="dark"] input,
body[data-theme="dark"] textarea,
body[data-theme="dark"] select {
  background: rgba(12, 22, 38, 0.86);
  border-color: rgba(152, 181, 214, 0.3);
  color: #e9f2ff;
}

body[data-theme="dark"] .color-field input[type="color"] {
  background: rgba(18, 29, 42, 0.92);
  border-color: rgba(152, 181, 214, 0.34);
}

body[data-theme="dark"] input:focus,
body[data-theme="dark"] textarea:focus,
body[data-theme="dark"] select:focus {
  border-color: rgba(95, 155, 255, 0.64);
  box-shadow: 0 0 0 3px rgba(95, 155, 255, 0.2);
  background: rgba(14, 26, 44, 0.95);
}

body[data-theme="dark"] .helper-text,
body[data-theme="dark"] .muted,
body[data-theme="dark"] .login-showcase ul {
  color: #9fb2c9;
}

body[data-theme="dark"] .upload-status {
  color: #9fb2c9;
}

body[data-theme="dark"] .upload-status.ready {
  color: var(--ok);
}

body[data-theme="dark"] .login-mini-card {
  background: rgba(14, 25, 42, 0.78);
  border-color: rgba(152, 181, 214, 0.24);
}

body[data-theme="dark"] .login-mini-card span {
  color: #9eb3cc;
}

body[data-theme="dark"] .scan-step {
  background: rgba(14, 25, 42, 0.78);
  border-color: rgba(152, 181, 214, 0.24);
}

body[data-theme="dark"] .scan-step span {
  color: #9eb3cc;
}

body[data-theme="dark"] .table-wrap {
  background: rgba(11, 21, 36, 0.74);
  border-color: rgba(152, 181, 214, 0.24);
}

body[data-theme="dark"] th {
  color: #a4bad4;
}

body[data-theme="dark"] td {
  border-bottom-color: rgba(152, 181, 214, 0.16);
}

body[data-theme="dark"] tbody tr:hover {
  background: rgba(95, 155, 255, 0.1);
}

body[data-theme="dark"] .chip {
  background: rgba(14, 25, 42, 0.72);
  border-color: rgba(152, 181, 214, 0.24);
  color: #cfe0f3;
}

body[data-theme="dark"] .chip.active {
  background: rgba(95, 155, 255, 0.18);
  border-color: rgba(95, 155, 255, 0.44);
  color: #e2efff;
}

body[data-theme="dark"] .detail-card {
  background: rgba(14, 25, 42, 0.76);
  border-color: rgba(152, 181, 214, 0.24);
}

body[data-theme="dark"] .detail-card span {
  color: #9fb6d1;
}

body[data-theme="dark"] .detail-card strong {
  color: #deebff;
}

body[data-theme="dark"] .product-card {
  background: linear-gradient(160deg, rgba(16, 30, 49, 0.84), rgba(10, 20, 34, 0.74));
  border-color: rgba(152, 181, 214, 0.24);
}

body[data-theme="dark"] .product-image.placeholder {
  color: rgba(200, 220, 244, 0.78);
}

body[data-theme="dark"] .public-count-pill {
  background: rgba(14, 25, 42, 0.76);
  border-color: rgba(152, 181, 214, 0.3);
  color: #d8e8ff;
}

body[data-theme="dark"] .public-product-brand {
  color: #9fb2c7;
}

body[data-theme="dark"] .public-product-name {
  color: #d6e4f6;
}

body[data-theme="dark"] .public-product-price {
  color: #e8f1ff;
}

body[data-theme="dark"] .public-product-image,
body[data-theme="dark"] .public-modal-image {
  background: #101a2b;
  border-color: rgba(152, 181, 214, 0.25);
}

body[data-theme="dark"] .public-image-frame {
  background: #101a2b;
}

body[data-theme="dark"] .public-dock-btn,
body[data-theme="dark"] .public-sheet-option {
  background: rgba(14, 25, 42, 0.78);
  border-color: rgba(152, 181, 214, 0.28);
  color: #d7e7fb;
}

body[data-theme="dark"] .public-dock-btn span {
  color: #9fb6d1;
}

body[data-theme="dark"] .public-sheet-option.active {
  background: rgba(95, 155, 255, 0.2);
  border-color: rgba(95, 155, 255, 0.48);
  color: #e7f1ff;
}

body[data-theme="dark"] .empty-state {
  background: rgba(12, 22, 37, 0.7);
  border-color: rgba(152, 181, 214, 0.28);
}

body[data-theme="dark"] .bar-track {
  background: rgba(152, 181, 214, 0.2);
}

body[data-theme="dark"] .credential-item {
  background: rgba(14, 25, 42, 0.76);
  border-color: rgba(152, 181, 214, 0.24);
}

body[data-theme="dark"] .credential-item code {
  color: #8cb7ff;
}

body[data-theme="dark"] .link-box {
  background: rgba(12, 23, 39, 0.78);
  border-color: rgba(152, 181, 214, 0.24);
  color: #d7e8ff;
}

body[data-theme="dark"] .modal-backdrop {
  background: rgba(2, 7, 14, 0.72);
}

body[data-theme="dark"] .image-crop-modal {
  background: rgba(1, 7, 14, 0.74);
}

body[data-theme="dark"] .image-crop-canvas-wrap {
  background: rgba(12, 22, 38, 0.86);
  border-color: rgba(152, 181, 214, 0.28);
}

body[data-theme="dark"] #image-crop-canvas {
  background: #0d1627;
}

body[data-theme="dark"] .image-crop-controls label span {
  color: #8dbaff;
}

body[data-theme="dark"] .toast {
  background: rgba(11, 20, 34, 0.96);
  color: #eaf3ff;
}

body[data-theme="dark"] *::-webkit-scrollbar-track {
  background: rgba(13, 22, 37, 0.68);
}

body[data-theme="dark"] *::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(98, 160, 255, 0.6), rgba(52, 201, 183, 0.54));
}

button,
[data-action],
[data-go] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.modal-card,
.image-crop-card,
.public-mobile-sheet,
.public-mobile-dock {
  pointer-events: auto;
}

body[data-theme="dark"] .topbar::before {
  background: linear-gradient(120deg, rgba(170, 198, 230, 0.22), var(--glass-tint), var(--glass-glow));
}

body[data-theme="dark"] .panel::after {
  display: none;
}

body[data-theme="dark"] .topbar,
body[data-theme="dark"] .panel,
body[data-theme="dark"] .app-footer,
body[data-theme="dark"] .table-wrap,
body[data-theme="dark"] .detail-card,
body[data-theme="dark"] .credential-item,
body[data-theme="dark"] .link-box {
  border-color: rgba(148, 163, 184, 0.24);
}

body[data-theme="dark"] .kpi-card {
  background: linear-gradient(160deg, rgba(31, 41, 55, 0.94), rgba(22, 27, 36, 0.9));
  border-color: rgba(148, 163, 184, 0.24);
}

body[data-theme="dark"] .btn {
  border-color: rgba(138, 180, 255, 0.26);
  box-shadow: 0 6px 14px rgba(1, 4, 10, 0.44);
}

body[data-theme="dark"] .btn.secondary {
  box-shadow: 0 6px 14px rgba(2, 20, 35, 0.42);
}

body[data-theme="dark"] .footer-social-icon {
  background: rgba(31, 41, 55, 0.9);
  border-color: rgba(148, 163, 184, 0.3);
}

body[data-theme="dark"] .chip {
  background: rgba(31, 41, 55, 0.88);
  border-color: rgba(148, 163, 184, 0.24);
  color: #d8e2f2;
}

body[data-theme="dark"] .chip.active {
  background: rgba(245, 158, 11, 0.24);
  border-color: rgba(250, 219, 184, 0.42);
  color: #fff5df;
}

body[data-theme="dark"] *::-webkit-scrollbar-track {
  background: rgba(30, 38, 52, 0.66);
}

body[data-theme="dark"] *::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.54), rgba(45, 212, 191, 0.42));
}

body[data-theme="dark"] .brand-wrap p,
body[data-theme="dark"] .footer-branding p,
body[data-theme="dark"] .helper-text,
body[data-theme="dark"] .muted,
body[data-theme="dark"] .login-showcase ul {
  color: #a7b8ce;
}

body[data-theme="dark"] .footer-branding strong {
  color: #edf4ff;
}

body[data-theme="dark"] .theme-switch {
  color: #e7f0ff;
  background: rgba(24, 34, 48, 0.94);
  border-color: rgba(141, 163, 193, 0.34);
}

body[data-theme="dark"] .theme-switch-track {
  border-color: rgba(141, 163, 193, 0.42);
  background: linear-gradient(135deg, rgba(255, 155, 116, 0.34), rgba(80, 214, 186, 0.26));
}

body[data-theme="dark"] .role-pill {
  color: #eaf3ff;
  background: rgba(255, 155, 116, 0.2);
  border-color: rgba(255, 155, 116, 0.44);
}

body[data-theme="dark"] .btn.ghost {
  color: #e8f1ff;
  background: rgba(24, 34, 48, 0.92);
  border-color: rgba(141, 163, 193, 0.32);
}

body[data-theme="dark"] .btn.ghost:hover {
  background: rgba(33, 45, 62, 0.98);
  border-color: rgba(80, 214, 186, 0.44);
}

body[data-theme="dark"] .chip.active,
body[data-theme="dark"] .public-sheet-option.active {
  background: rgba(80, 214, 186, 0.2);
  border-color: rgba(80, 214, 186, 0.46);
  color: #e8fbf5;
}

body[data-theme="dark"] .public-product-card {
  background: transparent;
  border: 0;
  box-shadow: none;
}

body[data-theme="dark"] .public-image-frame {
  background: rgba(18, 28, 40, 0.95);
}

body[data-theme="dark"] .public-product-image,
body[data-theme="dark"] .public-modal-image {
  background: #111d2c;
  border-color: rgba(141, 163, 193, 0.24);
}

body[data-theme="dark"] .public-product-brand {
  color: #abc0d8;
}

body[data-theme="dark"] .public-product-name {
  color: #edf3ff;
}

body[data-theme="dark"] .public-product-price {
  color: #ffd9b7;
}

body[data-theme="dark"] .footer-social-icon {
  color: #e7f0ff;
  background: rgba(23, 34, 48, 0.92);
  border-color: rgba(141, 163, 193, 0.3);
}

body[data-theme="dark"] .footer-social-icon:hover {
  background: rgba(29, 43, 60, 0.96);
  border-color: rgba(80, 214, 186, 0.46);
}

body[data-theme="dark"] .topbar::before {
  background: linear-gradient(120deg, rgba(170, 198, 230, 0.22), var(--glass-tint), var(--glass-glow));
}

body[data-theme="dark"] .btn,
body[data-theme="dark"] .btn.secondary {
  box-shadow: 0 8px 18px rgba(1, 5, 12, 0.42);
}

body[data-theme="dark"] input:focus,
body[data-theme="dark"] textarea:focus,
body[data-theme="dark"] select:focus {
  border-color: rgba(80, 214, 186, 0.62);
  box-shadow: 0 0 0 3px rgba(80, 214, 186, 0.2);
}

body[data-theme="dark"] tbody tr:hover {
  background: rgba(80, 214, 186, 0.1);
}

body[data-theme="dark"] .access-pill {
  background: linear-gradient(135deg, rgba(255, 155, 116, 0.2), rgba(80, 214, 186, 0.14));
  border-color: rgba(141, 163, 193, 0.3);
}

body[data-theme="dark"] .public-count-pill {
  background: rgba(22, 33, 48, 0.84);
  border-color: rgba(141, 163, 193, 0.38);
  color: #ebf4ff;
}

body[data-theme="dark"] .public-dock-btn span {
  color: #abc0d8;
}

body[data-theme="dark"] .credential-item code,
body[data-theme="dark"] .image-crop-controls label span {
  color: #f59e0b;
}

body[data-theme="dark"] .inline-check {
  color: #a7b8ce;
}

body[data-theme="dark"] .footer-social-row {
  background: rgba(24, 34, 48, 0.84);
  border-color: rgba(141, 163, 193, 0.24);
}

@keyframes drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  100% {
    transform: translate3d(16px, -10px, 0) scale(1.08);
  }
}

@keyframes reveal-up {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1140px) {
  .layout-two {
    grid-template-columns: 1fr;
  }

  .brand-wrap {
    max-width: min(48%, 520px);
  }

  .top-actions {
    max-width: min(52%, 640px);
    gap: 6px;
  }
}

@media (max-width: 980px) {
  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scan-lock-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: sticky;
    top: calc(6px + env(safe-area-inset-top));
    z-index: 140;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: calc(100% - 10px);
    margin: 6px auto 14px;
  }

  .auth-shell {
    width: 100%;
    margin: 0;
  }

  .auth-card {
    padding: 14px;
  }

  body.route-auth .app-shell,
  body[data-default-route="login"] .app-shell,
  body[data-default-route="signup"] .app-shell {
    width: calc(100% - 10px);
    margin: 6px auto 10px;
    padding-bottom: 96px;
  }

  body.route-auth .page-content,
  body[data-default-route="login"] .page-content,
  body[data-default-route="signup"] .page-content {
    min-height: calc(100dvh - 168px);
    margin-top: 6px;
    padding-top: 0;
    align-items: center;
  }

  body.route-auth .app-footer,
  body[data-default-route="login"] .app-footer,
  body[data-default-route="signup"] .app-footer {
    left: 6px;
    right: 6px;
    width: auto;
    padding: 8px 9px;
  }

  body.route-auth .footer-branding strong,
  body[data-default-route="login"] .footer-branding strong,
  body[data-default-route="signup"] .footer-branding strong {
    max-width: 44vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .auth-card-premium {
    border-radius: 16px;
    padding: 14px;
    gap: 10px;
  }

  body.route-login .auth-card-premium,
  body[data-default-route="login"] .auth-card-premium {
    min-height: 0;
  }

  .auth-layout,
  .auth-layout-signup {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .auth-side {
    border-radius: 14px;
    padding: 12px;
    gap: 6px;
  }

  .auth-side h2 {
    font-size: 1.22rem;
  }

  .auth-side-points {
    display: none;
  }

  .auth-form-wrap {
    border-radius: 14px;
    padding: 12px;
  }

  .password-toggle {
    width: 30px;
    height: 30px;
    min-width: 30px;
  }

  .password-toggle-icon {
    width: 15px;
    height: 15px;
  }

  body.route-login .auth-form-wrap,
  body[data-default-route="login"] .auth-form-wrap {
    margin-top: 16px;
  }

  .login-form-wrap {
    box-shadow:
      0 12px 22px rgba(26, 20, 30, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.8);
  }

  .auth-kicker {
    font-size: 0.59rem;
    letter-spacing: 0.06em;
    padding: 4px 8px;
  }

  .auth-actions-grid {
    grid-template-columns: 1fr;
  }

  .auth-utility-row {
    justify-content: stretch;
  }

  .auth-utility-row .btn {
    width: 100%;
    justify-content: center;
  }

  .auth-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .topbar {
    position: sticky;
    top: calc(6px + env(safe-area-inset-top));
    z-index: 145;
    padding: 10px 12px;
    border-radius: 14px;
    min-height: 52px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .panel {
    padding: 10px;
    border-radius: 14px;
  }

  .section-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .brand-badge {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 0.8rem;
  }

  .brand-wrap {
    gap: 10px;
    max-width: calc(100% - 76px);
  }

  .brand-wrap h1 {
    font-size: 0.92rem;
    line-height: 1.15;
    max-width: min(56vw, 220px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-wrap p {
    display: none;
  }

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(14, 29, 49, 0.16);
    background: rgba(255, 255, 255, 0.75);
    color: #4a3524;
    border-radius: 10px;
    height: 32px;
    min-width: 62px;
    padding: 0 12px;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(13, 27, 48, 0.12);
    z-index: 62;
  }

  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    border: 0;
    background: rgba(5, 12, 22, 0.44);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 100;
  }

  .top-actions {
    position: fixed;
    left: 8px;
    right: 8px;
    top: calc(58px + env(safe-area-inset-top));
    bottom: auto;
    max-height: min(72vh, 520px);
    width: auto;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
    gap: 10px;
    padding: 14px 12px 16px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background:
      radial-gradient(130% 110% at 0% 0%, rgba(255, 255, 255, 0.58), transparent 60%),
      radial-gradient(130% 120% at 100% 100%, var(--glass-glow), transparent 68%),
      linear-gradient(160deg, var(--glass-strong), var(--glass));
    box-shadow: 0 22px 44px rgba(6, 14, 24, 0.3);
    backdrop-filter: blur(20px) saturate(155%);
    -webkit-backdrop-filter: blur(20px) saturate(155%);
    overflow-y: auto;
    transform: translate3d(0, -22px, 0) scale(0.98);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: transform 0.28s ease, opacity 0.22s ease;
    max-width: calc(100vw - 16px);
    will-change: transform, opacity;
    z-index: 110;
  }

  .top-actions .btn,
  .top-actions .role-pill {
    width: 100%;
    justify-content: center;
    white-space: normal;
    text-align: center;
    line-height: 1.35;
  }

  .mobile-menu-open .top-actions {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .top-actions.is-open {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  .mobile-menu-open .mobile-menu-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  body[data-theme="dark"] .mobile-menu-btn {
    color: #ffe7cc;
    background: rgba(44, 30, 22, 0.9);
    border-color: rgba(250, 219, 184, 0.34);
    box-shadow: 0 6px 16px rgba(3, 8, 16, 0.3);
  }

  body[data-theme="dark"] .top-actions {
    border-color: rgba(250, 219, 184, 0.3);
    background:
      radial-gradient(130% 110% at 0% 0%, rgba(250, 219, 184, 0.2), transparent 64%),
      radial-gradient(130% 120% at 100% 100%, rgba(45, 212, 191, 0.12), transparent 68%),
      linear-gradient(160deg, rgba(33, 24, 18, 0.94), rgba(21, 16, 13, 0.9));
  }

  .public-toolbar,
  .public-hero-actions {
    display: none;
  }

  .public-stock-panel .section-title {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
  }

  .public-stock-panel .section-title p {
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .public-count-pill {
    font-size: 0.65rem;
    padding: 5px 8px;
  }

  .public-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .public-product-card {
    border-radius: 0;
    gap: 5px;
  }

  .public-image-frame {
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    width: 100%;
    overflow: hidden;
  }

  .public-image-frame .public-product-image {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
  }

  .public-product-body {
    padding: 4px 0 0;
    gap: 2px;
  }

  .public-product-brand {
    font-size: 0.68rem;
    line-height: 1.15;
  }

  .public-product-name {
    font-size: 0.79rem;
    line-height: 1.24;
    min-height: 0;
  }

  .public-product-price {
    font-size: 0.88rem;
    line-height: 1.18;
  }

  .public-modal-image {
    height: 200px;
  }

  .public-modal-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  body.route-shop .page-content {
    padding-bottom: 172px;
    overflow-x: clip;
  }

  body.route-about .page-content,
  body.route-policy .page-content {
    padding-bottom: 96px;
    overflow-x: clip;
  }

  body.route-shop .public-shop-shell {
    overflow-x: clip;
  }

  body.route-shop .app-shell,
  body.route-shop .panel,
  body.route-shop .public-stock-panel,
  body.route-shop .public-product-grid {
    overflow-x: clip;
  }

  body.route-shop .app-footer {
    position: fixed;
    left: 6px;
    right: 6px;
    width: auto;
    transform: none;
    bottom: calc(6px + env(safe-area-inset-bottom));
    margin: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "controls controls"
      "branding actions";
    align-items: center;
    border-radius: 12px;
    padding: 7px 8px;
    gap: 6px;
    row-gap: 5px;
  }

  body.route-shop .footer-branding strong {
    font-size: 0.64rem;
    max-width: 42vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.route-shop .footer-branding p {
    display: block;
    font-size: 0.53rem;
    line-height: 1.2;
    max-width: 46vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.route-shop .footer-brand-logo {
    width: 20px;
    height: 20px;
  }

  body.route-shop .footer-actions {
    width: auto;
    grid-area: actions;
    gap: 4px;
    min-width: 0;
    align-self: end;
    margin-top: 3px;
  }

  body.route-shop .footer-social-icons {
    gap: 4px;
    flex-shrink: 0;
  }

  body.route-shop .footer-social-icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
  }

  body.route-shop .footer-social-icon img {
    width: 10px;
    height: 10px;
  }

  body.route-shop .footer-catalog-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-area: controls;
    min-width: 0;
    width: 100%;
    gap: 4px;
    flex: 0 1 auto;
    align-self: center;
    margin-bottom: 0;
  }

  body.route-shop .footer-branding {
    grid-area: branding;
    align-self: end;
    justify-self: start;
    margin-top: 4px;
  }

  body.route-shop .footer-dock-btn {
    padding: 6px 5px;
    border-radius: 8px;
  }

  body.route-shop .footer-dock-btn span {
    font-size: 0.52rem;
  }

  body.route-shop .footer-dock-btn strong {
    font-size: 0.64rem;
  }

  .public-mobile-sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
    background: rgba(5, 12, 22, 0.42);
    transition: opacity 0.22s ease;
    z-index: 120;
  }

  .public-mobile-sheet-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .public-mobile-sheet {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    max-height: min(64vh, 460px);
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
    overflow-y: auto;
    border-radius: 18px 18px 0 0;
    transform: translate3d(0, 104%, 0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.24s ease, opacity 0.2s ease;
    z-index: 121;
  }

  .public-mobile-sheet.is-open {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    pointer-events: auto;
  }

  body[data-theme="dark"] .public-mobile-sheet-backdrop {
    background: rgba(1, 7, 14, 0.66);
  }

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

  .login-mini-grid {
    grid-template-columns: 1fr;
  }

  .admin-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .admin-switch .chip {
    min-width: 0;
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .kpi-grid.kpi-slider,
  .product-grid.swipe-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: row;
    grid-auto-columns: unset;
    max-width: 100%;
    overflow: visible;
    scroll-snap-type: none;
    padding: 0;
  }

  .kpi-grid.kpi-slider > *,
  .product-grid.swipe-row > * {
    min-width: 0;
    scroll-snap-align: none;
  }

  .kpi-grid.kpi-slider::-webkit-scrollbar,
  .product-grid.swipe-row::-webkit-scrollbar {
    display: none;
  }

  .kpi-card {
    padding: 10px;
  }

  .kpi-card strong {
    font-size: 1.08rem;
  }

  .product-card {
    min-height: 0;
  }

  .product-image:not(.public-product-image) {
    height: 122px;
  }

  .public-image-frame .public-product-image {
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
  }

  .product-body {
    padding: 10px;
    gap: 6px;
  }

  .stock-row {
    align-items: flex-start;
  }

  .shop-detail-grid {
    grid-template-columns: 1fr;
  }

  .social-link-row .btn,
  .social-link-row .social-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .btn {
    padding: 9px 12px;
  }

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

  .qr-wrap {
    width: 140px;
    height: 140px;
  }

  .image-crop-modal {
    padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
  }

  .image-crop-card {
    width: min(420px, 100%);
    border-radius: 16px;
    padding: 10px;
    max-height: calc(100vh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }

  #image-crop-canvas {
    width: min(100%, 260px);
  }

  .app-footer {
    left: auto;
    right: auto;
    width: 100%;
    transform: none;
    bottom: auto;
    margin-top: 10px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-radius: 12px;
    padding: 7px 9px;
    gap: 8px;
  }

  body.route-storefront .app-footer {
    position: fixed;
    left: 6px;
    right: 6px;
    width: auto;
    transform: none;
    bottom: calc(6px + env(safe-area-inset-bottom));
    margin: 0;
    z-index: 90;
  }

  .footer-branding strong {
    font-size: 0.64rem;
    max-width: 32vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .footer-branding p {
    display: block;
    font-size: 0.56rem;
    line-height: 1.2;
    max-width: 44vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.route-auth .footer-branding p,
  body[data-default-route="login"] .footer-branding p,
  body[data-default-route="signup"] .footer-branding p {
    display: block;
    font-size: 0.56rem;
    line-height: 1.2;
    max-width: 44vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .footer-actions {
    width: auto;
    gap: 6px;
  }

  .footer-social-icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
  }

  .footer-social-icon img {
    width: 10px;
    height: 10px;
  }

  .theme-switch {
    padding: 4px 8px 4px 6px;
    gap: 6px;
  }

  .theme-switch-track {
    width: 32px;
    height: 18px;
  }

  .theme-switch-thumb {
    width: 12px;
    height: 12px;
  }

  .theme-switch[data-theme-mode="dark"] .theme-switch-thumb {
    left: calc(100% - 14px);
  }

  .theme-switch-text {
    font-size: 0.62rem;
  }

  .footer-social-row {
    grid-template-columns: 1fr;
  }

  .footer-social-row .btn {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .kpi-grid.kpi-slider,
  .product-grid.swipe-row {
    grid-template-columns: 1fr;
  }

  .theme-switch-text {
    display: none;
  }
}
