:root {
  --bg: #f5f7fb;
  --surface: #fff;
  --surface-2: #f8fafc;
  --text: #172033;
  --muted: #718096;
  --line: #e6eaf0;
  --primary: #bb6b36;
  --primary-dark: #914b20;
  --navy: #101827;
  --green: #2e9b68;
  --red: #d95050;
  --blue: #4277e7;
  --purple: #8a63d2;
  --shadow: 0 18px 50px rgba(17,24,39,.07);
  --radius: 24px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background: radial-gradient(circle at 70% 0%,rgba(187,107,54,.08),transparent 24%),var(--bg);
  color: var(--text);
  overflow-x: hidden;
}
.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
}
.ambient-a {
  width: 300px;
  height: 300px;
  background: rgba(187,107,54,.09);
  top:-90px;
  right: 15%;
}
.ambient-b {
  width: 340px;
  height: 340px;
  background: rgba(66,119,231,.07);
  bottom: -110px;
  left: -100px;
}
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  left: 0;
  top:0;
  bottom: 0;
  width: 260px;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  background: rgba(15,23,42,.97);
  color: #fff;
  z-index: 30;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px 32px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg,#d58b58,#9d4f22);
  box-shadow: 0 12px 24px rgba(157,79,34,.28);
}
.brand-mark svg {
  width: 21px;
}
.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.brand-sub {
  font-size: 11px;
  color: #9ca9bc;
  margin-top: 2px;
}
.nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nav-item {
  border: 0;
  background: transparent;
  color: #95a2b6;
  padding: 13px 14px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 11px;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: transform .28s cubic-bezier(.22,1,.36,1), box-shadow .28s cubic-bezier(.22,1,.36,1), background-color .28s ease, border-color .28s ease, color .28s ease;
  position: relative;
}
.nav-item:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
  transform: translateX(2px);
}
.nav-item.active {
  background: rgba(255,255,255,.11);
  color: #fff;
  box-shadow: inset 3px 0 0 #d48a57;
}
.nav-item svg {
  width: 18px;
}
.nav-item span:nth-child(2) {
  flex: 1;
}
.nav-count {
  min-width: 23px;
  height: 23px;
  padding: 0 7px;
  border-radius: 999px;
  background: #d98a58;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}
.sidebar-bottom {
  margin-top: auto;
}
.mini-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  background: rgba(255,255,255,.04);
  margin-bottom: 10px;
}
.mini-card>div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mini-card strong {
  font-size: 12px;
}
.mini-card span {
  font-size: 10px;
  color: #96a2b5;
}
.mini-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  display: grid;
  place-items: center;
}
.mini-icon svg {
  width: 17px;
}
.reset-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #8996aa;
  padding: 10px 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}
.main-area {
  margin-left: 260px;
  width: calc(100% - 260px);
  min-height: 100vh;
  padding: 0 28px;
}
.topbar {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  top:0;
  z-index: 20;
  background: linear-gradient(180deg,rgba(245,247,251,.96),rgba(245,247,251,.88),rgba(245,247,251,0));
  backdrop-filter: blur(10px);
}
.breadcrumb {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.breadcrumb span,.eyebrow {
  font-size: 10px;
  letter-spacing: .16em;
  font-weight: 800;
  color: #9aa4b3;
}
.breadcrumb strong {
  font-size: 21px;
  letter-spacing: -.02em;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  transition: transform .24s cubic-bezier(.22,1,.36,1), background-color .24s ease, border-color .24s ease, color .24s ease;
}
.role-chip svg { width: 14px; height: 14px; }
body.is-admin .role-chip {
  color: var(--primary);
  border-color: rgba(187,107,54,.25);
  background: rgba(187,107,54,.08);
}
body.is-user .sidebar-bottom {
  opacity: .72;
}
.admin-tools-visible {
  opacity: 1 !important;
}
.user-cart-note {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: left;
  color: var(--muted);
}
.user-cart-note > i {
  width: 44px;
  height: 44px;
  padding: 12px;
  border-radius: 15px;
  background: rgba(187,107,54,.09);
  color: var(--primary);
}
.user-cart-note strong { display: block; color: var(--text); font-size: 14px; }
.user-cart-note span { display: block; max-width: 300px; margin-top: 5px; font-size: 11px; line-height: 1.6; }
.login-modal { width: min(480px, calc(100vw - 32px)); }
.modal-description { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 7px 0 0; }
.login-grid { grid-template-columns: 1fr; }
.login-status {
  min-height: 18px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
}
#authNavButton {
  margin-top: 8px;
  border-top: 1px solid rgba(128,128,128,.14);
}
#authNavButton[data-auth-state="logout"] {
  color: #cf6969;
}
.clock-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.8);
  border-radius: 14px;
  color: #6e7888;
  font-size: 12px;
  box-shadow: 0 8px 20px rgba(22,28,38,.03);
}
.clock-chip svg {
  width: 15px;
}
.profile-chip {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.85);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 11px 6px 6px;
  border-radius: 17px;
  cursor: pointer;
  transition: transform .28s cubic-bezier(.22,1,.36,1), box-shadow .28s cubic-bezier(.22,1,.36,1), background-color .28s ease, border-color .28s ease, color .28s ease;
}
.profile-chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.profile-chip img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}
.profile-chip span {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.profile-chip strong {
  font-size: 12px;
}
.profile-chip small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.view {
  display: none;
  animation: viewIn .5s ease both;
}
.view.active {
  display: block;
}
.panel {
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(230,234,240,.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero {
  display: grid;
  grid-template-columns: 1.35fr .75fr;
  min-height: 360px;
  overflow: hidden;
  position: relative;
}
.hero-copy {
  padding: 52px;
}
.hero h1 {
  font-family: "Playfair Display",serif;
  font-size: 58px;
  line-height: .98;
  letter-spacing: -.05em;
  margin: 12px 0 20px;
  max-width: 600px;
}
.hero h1 em {
  font-style: normal;
  color: var(--primary);
}
.hero p {
  max-width: 580px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}
.hero-actions {
  display: flex;
  gap: 11px;
  margin-top: 26px;
}
.primary-button,.secondary-button {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .28s cubic-bezier(.22,1,.36,1), box-shadow .28s cubic-bezier(.22,1,.36,1), background-color .28s ease, border-color .28s ease, color .28s ease;
  text-decoration: none;
}
.primary-button {
  background: linear-gradient(135deg,#c97d49,#a65326);
  color: #fff;
  box-shadow: 0 10px 24px rgba(166,83,38,.2);
}
.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(166,83,38,.25);
}
.secondary-button {
  background: #f1f4f8;
  color: #394557;
}
.secondary-button:hover {
  transform: translateY(-2px);
  background: #e8edf3;
}
.primary-button svg,.secondary-button svg {
  width: 16px;
}
.hero-art {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 60% 45%,rgba(201,125,73,.23),transparent 20%),linear-gradient(135deg,#fbf3ec,#f1e6db);
}
.hero-orbit {
  position: absolute;
  border: 1px dashed rgba(158,89,40,.25);
  border-radius: 50%;
  left: 50%;
  top:50%;
  transform: translate(-50%,-50%);
}
.orbit-1 {
  width: 300px;
  height: 300px;
}
.orbit-2 {
  width: 210px;
  height: 210px;
}
.hero-cup {
  position: absolute;
  left: 50%;
  top:50%;
  width: 120px;
  height: 120px;
  transform: translate(-50%,-50%);
  display: grid;
  place-items: center;
  border-radius: 38%;
  background: linear-gradient(145deg,#b76435,#8f4822);
  color: #fff;
  box-shadow: 0 25px 50px rgba(112,54,21,.3);
  animation: float 5s ease-in-out infinite;
}
.hero-cup svg {
  width: 46px;
  height: 46px;
}
.floating-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 15px 30px rgba(75,52,37,.1);
  font-size: 10px;
  font-weight: 700;
}
.floating-badge svg {
  width: 15px;
}
.badge-top {
  top:44px;
  right: 45px;
}
.badge-bottom {
  bottom: 46px;
  left: 45px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 14px;
  margin-top: 16px;
}
.stat-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.stat-card>div:last-child {
  display: flex;
  flex-direction: column;
}
.stat-card span {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 5px;
}
.stat-card strong {
  font-size: 25px;
  letter-spacing: -.03em;
}
.stat-card small {
  font-size: 10px;
  color: #a5adba;
  margin-top: 3px;
}
.stat-icon {
  width: 45px;
  height: 45px;
  border-radius: 15px;
  display: grid;
  place-items: center;
}
.stat-icon svg {
  width: 19px;
}
.icon-amber {
  background: #fff3e8;
  color: #c67a44;
}
.icon-green {
  background: #eaf8f0;
  color: #3f9c70;
}
.icon-blue {
  background: #edf3ff;
  color: #4a79e3;
}
.icon-purple {
  background: #f2edff;
  color: #8862d4;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
  margin-top: 16px;
}
.quick-panel,.recent-panel {
  padding: 24px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}
.section-head h2 {
  margin: 5px 0 0;
  font-size: 20px;
  letter-spacing: -.03em;
}
.section-head p {
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 0;
}
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}
.quick-card {
  position: relative;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 20px;
  text-align: left;
  padding: 18px;
  cursor: pointer;
  transition: transform .32s cubic-bezier(.22,1,.36,1), box-shadow .32s cubic-bezier(.22,1,.36,1), background-color .28s ease, border-color .28s ease;
  overflow: hidden;
}
.quick-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 26px rgba(18,30,48,.06);
}
.quick-icon {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.quick-icon svg {
  width: 17px;
}
.q-one .quick-icon {
  background: #f7eee8;
  color: #a95829;
}
.q-two .quick-icon {
  background: #edf7ef;
  color: #3e9d69;
}
.q-three .quick-icon {
  background: #eef3ff;
  color: #5c7ed8;
}
.q-four .quick-icon {
  background: #f3edff;
  color: #8865ce;
}
.quick-card strong {
  display: block;
  font-size: 13px;
}
.quick-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}
.quick-card .arrow {
  position: absolute;
  right: 16px;
  top:16px;
  width: 15px;
  color: #a2aabb;
}
.compact-list {
  margin-top: 14px;
}
.sale-mini {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f2f5;
}
.sale-mini:last-child {
  border-bottom: 0;
}
.sale-mini img {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  object-fit: cover;
}
.sale-mini span {
  display: block;
}
.sale-mini .name {
  font-size: 11px;
  font-weight: 700;
}
.sale-mini .time {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.sale-mini strong {
  font-size: 11px;
}
.text-button {
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.text-button svg {
  width: 14px;
}
.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 8px 0 20px;
}
.page-head h1 {
  font-size: 32px;
  letter-spacing: -.04em;
  margin: 7px 0 6px;
}
.page-head p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.table-panel {
  padding: 20px;
}
.table-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.search-box {
  width: min(420px,100%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f6f8fb;
  border: 1px solid #ecf0f4;
  border-radius: 13px;
  padding: 0 12px;
}
.search-box.small {
  width: 250px;
}
.search-box svg {
  width: 15px;
  color: #99a3b2;
}
.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 11px 0;
  font: inherit;
  font-size: 12px;
}
.filter-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f6f8fb;
  border: 1px solid #edf0f4;
  color: #748093;
  font-size: 11px;
}
.filter-chip svg {
  width: 14px;
}
.table-wrap {
  overflow: auto;
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 740px;
}
.table-wrap th,.table-wrap td {
  text-align: left;
  padding: 13px 10px;
  border-bottom: 1px solid #f0f2f6;
  font-size: 11px;
}
.table-wrap th {
  color: #9ba4b1;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}
.product-cell img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
}
.product-cell strong {
  font-size: 11px;
}
.product-cell span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.status {
  display: inline-flex;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}
.status-good {
  background: #eaf8f0;
  color: #2b8f60;
}
.status-low {
  background: #fff3df;
  color: #b7771b;
}
.status-empty {
  background: #ffe9e9;
  color: #c74f4f;
}
.action-row {
  display: flex;
  gap: 6px;
}
.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .24s cubic-bezier(.22,1,.36,1), box-shadow .24s cubic-bezier(.22,1,.36,1), background-color .24s ease, border-color .24s ease, color .24s ease;
  color: #697487;
}
.icon-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(20,30,45,.08);
}
.icon-button svg {
  width: 16px;
}
.danger-soft {
  background: #fff2f2;
  color: #c95b5b;
  border-color: #ffe1e1;
}
.sales-shortcut {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #a1a9b7;
  font-size: 10px;
}
.sales-shortcut kbd {
  padding: 4px 6px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 10px;
}
.sales-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 360px;
  gap: 16px;
}
.product-browser,.cart-panel {
  padding: 20px;
}
.category-row {
  display: grid;
  grid-template-columns: minmax(170px, .9fr) minmax(0, 2.1fr);
  gap: 10px;
  margin: 18px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55);
}
.category-filter-all,
.category-filter-chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition: transform .24s cubic-bezier(.22,1,.36,1), box-shadow .24s cubic-bezier(.22,1,.36,1), background-color .24s ease, border-color .24s ease, color .24s ease;
}
.category-filter-all {
  min-height: 64px;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 15px;
  text-align: left;
}
.category-filter-icon,
.category-filter-chip-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: rgba(187,107,54,.09);
  color: var(--primary);
}
.category-filter-icon {
  width: 38px;
  height: 38px;
}
.category-filter-icon svg {
  width: 17px;
}
.category-filter-copy {
  min-width: 0;
}
.category-filter-copy small {
  display: block;
  margin-bottom: 3px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--muted);
}
.category-filter-copy strong {
  display: block;
  font-size: 11px;
  color: var(--text);
  overflow-wrap: anywhere;
}
.category-filter-count,
.category-filter-chip b {
  min-width: 28px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.category-filter-list {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 8px;
}
.category-filter-chip {
  min-height: 64px;
  display: grid;
  grid-template-columns: 30px minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 15px;
  text-align: left;
}
.category-filter-chip-icon {
  width: 30px;
  height: 30px;
}
.category-filter-chip-icon svg {
  width: 14px;
}
.category-filter-chip > span:nth-child(2) {
  min-width: 0;
  font-size: 10px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.category-filter-all:hover,
.category-filter-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(187,107,54,.28);
  box-shadow: 0 10px 22px rgba(17,24,39,.06);
}
.category-filter-all.active,
.category-filter-chip.active {
  background: #1b2638;
  color: #fff;
  border-color: #1b2638;
  box-shadow: 0 10px 20px rgba(16,24,39,.12);
}
.category-filter-all.active .category-filter-copy strong,
.category-filter-chip.active > span:nth-child(2) {
  color: #fff;
}
.category-filter-all.active .category-filter-copy small,
.category-filter-all.active .category-filter-count,
.category-filter-chip.active b {
  color: rgba(255,255,255,.72);
}
.category-filter-all.active .category-filter-count,
.category-filter-chip.active b {
  background: rgba(255,255,255,.12);
}
.category-filter-chip.active .category-filter-chip-icon,
.category-filter-all.active .category-filter-icon {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px;
}
.product-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .32s cubic-bezier(.22,1,.36,1), box-shadow .32s cubic-bezier(.22,1,.36,1), background-color .28s ease, border-color .28s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(17,24,39,.07);
}
.product-card.disabled {
  opacity: .55;
  cursor: not-allowed;
}
.product-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}
.product-card-body {
  padding: 13px;
}
.product-card .cat {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
}
.product-card strong {
  display: block;
  font-size: 12px;
  margin-top: 5px;
}
.product-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 13px;
}
.product-bottom b {
  font-size: 12px;
}
.product-bottom span {
  font-size: 9px;
  color: var(--muted);
}
.cart-items {
  min-height: 210px;
  max-height: 450px;
  overflow: auto;
  margin: 14px 0;
}
.cart-empty {
  height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #a3acb9;
}
.cart-empty svg {
  width: 32px;
  margin-bottom: 9px;
}
.cart-empty strong {
  display: block;
  color: #647084;
  font-size: 12px;
}
.cart-empty span {
  font-size: 10px;
}
.cart-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f2f6;
  align-items: center;
}
.cart-item img {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  object-fit: cover;
}
.cart-item strong {
  font-size: 11px;
}
.cart-item small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-top: 4px;
}
.qty-control {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.qty-control button {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  background: #f7f8fa;
  border-radius: 7px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.qty-control svg {
  width: 12px;
}
.qty-control span {
  font-size: 10px;
  font-weight: 700;
}
.cart-item .price {
  font-size: 10px;
  font-weight: 800;
}
.cart-summary {
  padding-top: 12px;
  border-top: 1px dashed #e6e9ee;
}
.cart-summary>div:not(.grand):not(.cash-row) {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #7c8796;
  padding: 5px 0;
}
.cart-summary strong {
  color: var(--text);
}
.cart-summary .grand {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0 14px;
}
.cart-summary .grand span {
  font-weight: 700;
}
.cart-summary .grand strong {
  font-size: 20px;
  letter-spacing: -.03em;
}
.cash-row {
  padding: 12px;
  border-radius: 15px;
  background: #f6f8fa;
  margin-bottom: 12px;
}
.cash-row label {
  display: block;
  font-size: 10px;
  color: #7a8493;
  margin-bottom: 7px;
}
.cash-row input {
  width: 100%;
  border: 1px solid #e4e8ee;
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  font-size: 12px;
  outline: none;
}
.change {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  font-size: 10px;
  color: #7b8594;
}
.change strong {
  font-size: 12px;
}
.checkout-button {
  width: 100%;
  padding: 14px;
}
.developer-hero {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 34px;
}
.developer-avatar-wrap {
  position: relative;
}
.developer-avatar {
  width: 136px;
  height: 136px;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid #fff;
  box-shadow: 0 22px 40px rgba(18,29,44,.12);
  position: relative;
  z-index: 2;
  transition: .35s;
}
.developer-avatar-wrap:hover .developer-avatar,.developer-avatar-wrap:focus-within .developer-avatar {
  transform: rotate(-3deg) scale(1.04);
}
.avatar-glow {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: radial-gradient(circle,#dda57f,transparent 70%);
  filter: blur(14px);
  opacity: .55;
}
.developer-copy h1 {
  font-size: 38px;
  letter-spacing: -.04em;
  margin: 6px 0 10px;
}
.developer-copy p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 690px;
}
.developer-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.developer-meta {
  min-width: 190px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.developer-meta>div {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfd;
}
.developer-meta span,.developer-meta strong {
  display: block;
}
.developer-meta span {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #a3adba;
}
.developer-meta strong {
  font-size: 11px;
  margin-top: 4px;
}
.developer-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
  margin-top: 16px;
}
.contributor-panel,.stack-panel {
  padding: 22px;
}
.api-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff7e8;
  color: #a46f16;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 10px;
}
.api-status svg {
  width: 13px;
}

#refreshContributors {
  position: relative;
}

#refreshContributors.is-loading {
  cursor: wait;
  pointer-events: none;
}

#refreshContributors.is-loading svg {
  animation: contributor-refresh-spin 0.8s linear infinite;
  transform-origin: center;
}

@keyframes contributor-refresh-spin {
  to {
    transform: rotate(360deg);
  }
}
.contributor-list {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.contributor-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.contributor-item img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.contributor-item>div {
  min-width: 0;
  flex: 1;
}
.contributor-item strong {
  display: block;
  font-size: 11px;
}
.contributor-item span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}
.contributor-count {
  padding: 6px 8px;
  border-radius: 999px;
  background: #f0f3f6;
  color: #596577;
  font-size: 9px;
  font-weight: 800;
}
.stack-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #f0f2f6;
}
.stack-item:last-child {
  border-bottom: 0;
}
.stack-item>svg {
  width: 18px;
  color: var(--primary);
}
.stack-item strong {
  display: block;
  font-size: 11px;
}
.stack-item span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.footer {
  display: flex;
  justify-content: space-between;
  padding: 24px 4px 30px;
  color: #a0a8b6;
  font-size: 10px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10,15,24,.42);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-backdrop.open {
  display: flex;
}
.modal {
  width: min(620px,100%);
  background: var(--surface);
  border-radius: 25px;
  box-shadow: 0 30px 70px rgba(15,23,42,.2);
  padding: 24px;
  animation: modalIn .35s ease;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.modal-head h2 {
  margin: 6px 0 0;
  font-size: 22px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 10px;
  color: #6f7b8d;
  font-weight: 700;
}
.form-grid input,.form-grid select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  background: #fbfcfd;
  outline: none;
  font: inherit;
  font-size: 12px;
  color: var(--text);
}
.form-grid input:focus,.form-grid select:focus {
  border-color: #d39a74;
  box-shadow: 0 0 0 4px rgba(211,154,116,.12);
}
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-input-wrap input {
  width: 100%;
  padding-right: 50px;
}
.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.password-toggle:hover {
  transform: translateY(-50%);
  background: var(--surface-2);
  box-shadow: none;
}
.password-toggle svg {
  width: 16px;
  height: 16px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}
.toast-container {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 150;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #141e2e;
  color: #fff;
  box-shadow: 0 18px 35px rgba(15,23,42,.2);
  font-size: 11px;
  animation: toastIn .3s ease;
}
.toast svg {
  width: 15px;
}
.mobile-only {
  display: none;
}
@keyframes viewIn {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  60% {
    opacity: 1;
    transform: translate3d(0, 2px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
@keyframes float {
  0%,100% {
    transform: translate(-50%,-50%) translateY(0);
  }
  50% {
    transform: translate(-50%,-50%) translateY(-10px);
  }
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(15px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width:1100px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-grid,.developer-grid {
    grid-template-columns: 1fr;
  }
  .sales-layout {
    grid-template-columns: 1fr;
  }
  .cart-panel {
    position: relative;
  }
  .developer-hero {
    grid-template-columns: auto 1fr;
  }
  .developer-meta {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: repeat(3,1fr);
  }
}
@media (max-width:860px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .38s cubic-bezier(.22,1,.36,1), opacity .38s ease, box-shadow .38s ease;
    box-shadow: 20px 0 40px rgba(16,24,39,.16);
  }
  .sidebar.open {
    transform: none;
  }
  .main-area {
    margin-left: 0;
    width: 100%;
    padding: 0 16px;
  }
  .topbar {
    height: 76px;
  }
  .mobile-only {
    display: grid;
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-art {
    min-height: 230px;
  }
  .hero-copy {
    padding: 34px;
  }
  .hero h1 {
    font-size: 46px;
  }
  .product-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .contributor-list {
    grid-template-columns: 1fr;
  }
}
@media (max-width:620px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .table-tools {
    align-items: stretch;
    flex-direction: column;
  }
  .search-box,.search-box.small {
    width: 100%;
  }
  .quick-grid {
    grid-template-columns: 1fr;
  }
  .developer-hero {
    grid-template-columns: 1fr;
  }
  .developer-meta {
    grid-template-columns: 1fr;
  }
  .developer-avatar {
    width: 112px;
    height: 112px;
  }
  .hero h1 {
    font-size: 39px;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions button {
    width: 100%;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
  .profile-chip {
    padding-right: 7px;
  }
  .profile-chip span {
    display: none;
  }
  .footer {
    flex-direction: column;
    gap: 5px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: auto;
  }
  .topbar {
    gap: 9px;
  }
  .breadcrumb strong {
    font-size: 18px;
  }
  .developer-actions {
    flex-direction: column;
  }
  .developer-actions a,.developer-actions button {
    width: 100%;
  }
}

body.modal-open { overflow: hidden; }

.receipt-preview-modal { z-index: 170; }

.receipt-preview-shell {
  width: min(560px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  background: var(--surface);
  border-radius: 25px;
  box-shadow: 0 30px 80px rgba(15,23,42,.22);
  padding: 24px;
  animation: modalIn .42s cubic-bezier(.22,1,.36,1);
}

.receipt-preview-head { margin-bottom: 14px; }

.receipt-preview-content {
  display: grid;
  place-items: center;
  padding: 5px 0;
}

.receipt-paper {
  width: min(100%, 380px);
  padding: 24px;
  background: #fbfcfe;
  color: #172033;
  border: 1px solid #e8ebf2;
  border-radius: 20px;
  box-shadow: 0 12px 35px rgba(20,31,56,.07);
}

.receipt-brand {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.04em;
}

.receipt-subtitle,
.receipt-meta,
.receipt-footer {
  text-align: center;
  color: #748099;
  font-size: 11px;
  line-height: 1.6;
}

.receipt-meta { margin-top: 5px; }

.receipt-line {
  margin: 15px 0;
  border-top: 1px dashed #ccd2dc;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin: 9px 0;
  font-size: 12px;
}

.receipt-total {
  font-size: 17px;
  font-weight: 800;
}

.receipt-empty {
  text-align: center;
  color: #748099;
  font-size: 12px;
}

.receipt-preview-actions {
  position: sticky;
  bottom: 0;
  padding-top: 15px;
  background: linear-gradient(180deg,rgba(255,255,255,0),#fff 28%);
}

@media (max-width:620px) {
  .receipt-preview-shell { padding: 18px; border-radius: 20px; }
  .receipt-preview-actions { flex-direction: column-reverse; }
  .receipt-preview-actions button { width: 100%; }
}

@media (prefers-reduced-motion:reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto!important;
    animation-duration: .01ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .01ms!important;
  }
}
body.preview-open {
  overflow: hidden;
}
.image-preview-button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.75);
  background: rgba(17,24,39,.72);
  color: #fff;
  border-radius: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 4;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 24px rgba(0,0,0,.16);
  transition: transform .28s cubic-bezier(.22,1,.36,1), box-shadow .28s cubic-bezier(.22,1,.36,1), background-color .28s ease, border-color .28s ease, color .28s ease;
}
.image-preview-button:hover {
  transform: translateY(-2px) scale(1.03);
  background: rgba(17,24,39,.86);
}
.image-preview-button svg {
  width: 17px;
}
.avatar-preview {
  right: 10px;
  bottom: 10px;
}
.image-preview-modal {
  z-index: 180;
}
.image-preview-shell {
  width: min(980px,100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: #101827;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  box-shadow: 0 35px 90px rgba(0,0,0,.35);
  overflow: hidden;
  animation: modalIn .3s ease;
}
.image-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  background: rgba(255,255,255,.04);
  color: #fff;
}
.image-preview-head .eyebrow {
  color: #95a2b6;
}
.image-preview-stage {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 22px;
  background: radial-gradient(circle at center,rgba(255,255,255,.05),transparent 58%);
}
.image-preview-stage img {
  display: block;
  max-width: 100%;
  max-height: 68vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
}
.image-preview-caption {
  padding: 0 18px 18px;
  color: #aab5c6;
  font-size: 11px;
  text-align: center;
}
.developer-avatar-wrap {
  isolation: isolate;
}
.developer-avatar-wrap:hover .avatar-preview,.developer-avatar-wrap:focus-within .avatar-preview {
  opacity: 1;
  transform: translateY(-2px);
}
.avatar-preview {
  opacity: 0;
}
.product-card {
  position: relative;
}
.product-card .image-preview-button {
  opacity: 0;
}
.product-card:hover .image-preview-button,.product-card:focus-within .image-preview-button {
  opacity: 1;
}
.product-card > img {
  cursor: zoom-in;
}
.developer-avatar {
  cursor: zoom-in;
}
.sale-mini {
  position: relative;
}
.sale-mini img {
  cursor: zoom-in;
}
.cart-item img {
  cursor: zoom-in;
}
.product-cell {
  position: relative;
}
.product-cell img {
  cursor: zoom-in;
}
@media (max-width:620px) {
  .image-preview-shell {
    border-radius: 20px;
  }
  .image-preview-stage {
    padding: 14px;
  }
  .image-preview-button {
    opacity: 1!important;
  }
  .image-preview-stage img {
    max-height: 62vh;
  }
}
:root {
  --content-max: 1680px;
}
body {
  min-width: 0;
  width: 100%;
  overflow-x: hidden;
}
.app-shell,.main-area,.view,.panel,.hero,.sales-layout,.dashboard-grid,.developer-grid,.developer-hero {
  min-width: 0;
}
.main-area {
  max-width: none;
}
.view {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
}
img,svg,video,canvas {
  max-width: 100%;
}
button,a,input,select {
  max-width: 100%;
}
.page-head>*,.table-tools>*,.section-head>*,.developer-copy,.developer-meta {
  min-width: 0;
}
.table-wrap {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.table-wrap table {
  min-width: 680px;
}
.product-browser,.cart-panel,.quick-panel,.recent-panel,.table-panel,.contributor-panel,.stack-panel {
  min-width: 0;
}
.product-grid {
  grid-auto-rows: auto;
}
.product-card-body,.cart-item>div,.sale-mini>div,.contributor-item>div {
  min-width: 0;
}
.product-card strong,.sale-mini .name,.cart-item strong,.contributor-item strong {
  overflow-wrap: anywhere;
}
.modal-backdrop {
  overflow: auto;
}
.modal {
  max-height: calc(100dvh - 40px);
  overflow: auto;
}
.image-preview-modal {
  overflow: hidden;
}
.image-preview-shell {
  width: min(960px,calc(100vw - 32px));
  max-width: 960px;
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.image-preview-stage {
  min-height: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}
.image-preview-stage img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100dvh - 150px);
  object-fit: contain;
}
@media (min-width:1440px) {
  .main-area {
    padding-inline: 36px;
  }
  .hero-copy {
    padding: 64px;
  }
  .hero h1 {
    font-size: clamp(52px,4vw,70px);
  }
  .stats-grid {
    gap: 18px;
  }
  .product-grid {
    grid-template-columns: repeat(4,minmax(0,1fr));
  }
}
@media (max-width:1100px) {
  .hero {
    grid-template-columns: 1fr 0.72fr;
  }
  .hero-copy {
    padding: 38px;
  }
  .hero h1 {
    font-size: clamp(42px,5vw,56px);
  }
  .quick-grid {
    grid-template-columns: 1fr 1fr;
  }
  .product-grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .developer-hero {
    gap: 20px;
  }
}
@media (max-width:860px) {
  .main-area {
    padding-inline: 14px;
  }
  .topbar {
    padding-inline: 2px;
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-art {
    min-height: 280px;
  }
  .hero-copy {
    padding: 34px 30px;
  }
  .dashboard-grid,.developer-grid,.sales-layout {
    grid-template-columns: minmax(0,1fr);
  }
  .stats-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .product-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .developer-hero {
    grid-template-columns: auto minmax(0,1fr);
  }
  .developer-meta {
    grid-column: 1/-1;
  }
  .footer {
    padding-inline: 2px;
  }
}
@media (max-width:640px) {
  .main-area {
    padding-inline: 10px;
  }
  .topbar {
    height: 70px;
    gap: 8px;
  }
  .breadcrumb span,.eyebrow {
    font-size: 9px;
  }
  .breadcrumb strong {
    font-size: 17px;
  }
  .profile-chip img {
    width: 32px;
    height: 32px;
  }
  .hero {
    border-radius: 20px;
  }
  .hero-copy {
    padding: 28px 22px;
  }
  .hero h1 {
    font-size: clamp(34px,10vw,43px);
    max-width: 100%;
  }
  .hero p {
    font-size: 13px;
  }
  .hero-art {
    min-height: 230px;
  }
  .orbit-1 {
    width: min(280px,74vw);
    height: min(280px,74vw);
  }
  .orbit-2 {
    width: min(200px,54vw);
    height: min(200px,54vw);
  }
  .hero-cup {
    width: 100px;
    height: 100px;
  }
  .floating-badge {
    font-size: 9px;
    padding: 8px 10px;
  }
  .badge-top {
    top:26px;
    right: 20px;
  }
  .badge-bottom {
    bottom: 26px;
    left: 20px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .stat-card {
    padding: 16px;
  }
  .stat-card strong {
    font-size: 22px;
  }
  .quick-panel,.recent-panel,.product-browser,.cart-panel,.contributor-panel,.stack-panel,.table-panel {
    padding: 15px;
  }
  .quick-grid {
    grid-template-columns: 1fr;
  }
  .quick-card {
    padding: 16px;
  }
  .page-head {
    margin-top: 2px;
  }
  .page-head h1 {
    font-size: 27px;
  }
  .table-tools,.developer-actions {
    width: 100%;
  }
  .table-tools>* {
    width: 100%;
  }
  .filter-chip {
    width: 100%;
    justify-content: center;
  }
  .product-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 9px;
  }
  .product-card {
    border-radius: 16px;
  }
  .product-card img {
    height: 120px;
  }
  .product-card-body {
    padding: 11px;
  }
  .developer-hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .developer-avatar-wrap {
    justify-self: center;
  }
  .developer-copy {
    text-align: center;
  }
  .developer-copy h1 {
    font-size: 32px;
  }
  .developer-copy p {
    font-size: 12px;
  }
  .developer-actions {
    flex-direction: column;
  }
  .developer-actions a,.developer-actions button {
    width: 100%;
  }
  .developer-meta {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .contributor-list {
    grid-template-columns: 1fr;
  }
  .footer {
    padding: 20px 2px 24px;
    text-align: center;
    align-items: center;
  }
  .modal-backdrop {
    padding: 10px;
  }
  .modal {
    width: 100%;
    max-height: calc(100dvh - 20px);
    border-radius: 20px;
    padding: 18px;
  }
  .modal-actions {
    flex-direction: column-reverse;
  }
  .modal-actions>* {
    width: 100%;
  }
  .image-preview-shell {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 20px;
  }
  .image-preview-stage img {
    max-height: calc(100dvh - 130px);
  }
  .toast-container {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }
  .toast {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}
@media (max-width:420px) {
  .main-area {
    padding-inline: 8px;
  }
  .top-actions {
    gap: 6px;
  }
  .top-actions .profile-chip {
    padding: 5px;
  }
  .hero-actions {
    gap: 8px;
  }
  .stats-grid {
    gap: 8px;
  }
  .stat-card {
    gap: 11px;
  }
  .stat-icon {
    width: 40px;
    height: 40px;
  }
  .product-grid {
    grid-template-columns: 1fr 1fr;
  }
  .product-card img {
    height: 106px;
  }
  .category-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .category-filter-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cart-items {
    max-height: 360px;
  }
  .cash-row {
    padding: 10px;
  }
}
@media (max-width:340px) {
  .category-filter-list {
    grid-template-columns: 1fr;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 32px;
  }
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 860px) {
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    display: block;
    border: 0;
    padding: 0;
    background: rgba(8, 15, 28, 0.48);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 25;
    transition: opacity .25s ease, visibility .25s ease;
  }

  .sidebar-backdrop.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.nav-open {
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
  }

  body.nav-open .main-area {
    pointer-events: none;
    user-select: none;
  }

  .sidebar {
    z-index: 30;
  }
}

.contributor-item.main-developer {
  border-color: rgba(187, 107, 54, .28);
  background: linear-gradient(135deg, #fff, #fffaf6);
}


html {
  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000;
  --surface: #070707;
  --surface-2: #0c0c0c;
  --text: #f5f7fb;
  --muted: #9aa4b3;
  --line: #1d1d1d;
  --primary: #d58b58;
  --primary-dark: #bb6b36;
  --navy: #000;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
}

html[data-theme="dark"] {
  background: #000;
}

[data-theme="dark"] body {
  background: radial-gradient(circle at 70% 0%, rgba(187,107,54,.10), transparent 24%), #000;
  color: var(--text);
}

[data-theme="dark"] .ambient-a {
  background: rgba(187,107,54,.06);
}

[data-theme="dark"] .ambient-b {
  background: rgba(66,119,231,.045);
}

[data-theme="dark"] .topbar {
  background: linear-gradient(180deg, rgba(0,0,0,.97), rgba(0,0,0,.90), rgba(0,0,0,0));
}

[data-theme="dark"] .panel,
[data-theme="dark"] .clock-chip,
[data-theme="dark"] .profile-chip,
[data-theme="dark"] .quick-card,
[data-theme="dark"] .product-card,
[data-theme="dark"] .contributor-item,
[data-theme="dark"] .icon-button,
[data-theme="dark"] .sales-shortcut kbd {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

[data-theme="dark"] .hero-art {
  background: radial-gradient(circle at 60% 45%, rgba(201,125,73,.18), transparent 20%), linear-gradient(135deg, #080808, #020202);
}

[data-theme="dark"] .floating-badge {
  background: rgba(10,10,10,.84);
  border-color: rgba(255,255,255,.08);
  color: #f5f7fb;
}

[data-theme="dark"] .secondary-button,
[data-theme="dark"] .search-box,
[data-theme="dark"] .filter-chip,
[data-theme="dark"] .cash-row,
[data-theme="dark"] .developer-meta>div,
[data-theme="dark"] .qty-control button,
[data-theme="dark"] .contributor-count,
[data-theme="dark"] .form-grid input,
[data-theme="dark"] .form-grid select {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text);
}

[data-theme="dark"] .secondary-button:hover {
  background: #141414;
}

[data-theme="dark"] .icon-button:hover {
  background: #141414;
}

[data-theme="dark"] .danger-soft {
  background: #160b0b;
  color: #ef8a8a;
  border-color: #321515;
}

[data-theme="dark"] .product-card:hover,
[data-theme="dark"] .quick-card:hover,
[data-theme="dark"] .profile-chip:hover {
  box-shadow: 0 18px 38px rgba(0,0,0,.48);
}

[data-theme="dark"] .cart-item,
[data-theme="dark"] .sale-mini,
[data-theme="dark"] .stack-item,
[data-theme="dark"] .table-wrap th,
[data-theme="dark"] .table-wrap td {
  border-color: #171717;
}

[data-theme="dark"] .cart-empty strong,
[data-theme="dark"] .clock-chip,
[data-theme="dark"] .filter-chip {
  color: #b4bdca;
}

[data-theme="dark"] .cash-row input {
  background: #000;
  border-color: #242424;
  color: var(--text);
}

[data-theme="dark"] .modal-backdrop {
  background: rgba(0,0,0,.72);
}

[data-theme="dark"] .modal {
  background: #070707;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}

[data-theme="dark"] .api-status {
  background: #181205;
  color: #e6b75a;
}

[data-theme="dark"] .contributor-item.main-developer {
  border-color: rgba(213,139,88,.32);
  background: linear-gradient(135deg, #0d0906, #080808);
}

[data-theme="dark"] .theme-toggle {
  color: #f0c17d;
  background: #0a0a0a;
}

.theme-toggle {
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--text);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.top-actions {
  flex: 0 0 auto;
  min-width: 0;
}

.breadcrumb {
  min-width: 0;
}

.breadcrumb strong {
  overflow-wrap: anywhere;
}


html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #000000;
  --muted: #2f343b;
  --line: #e2e6ec;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #070707;
  --surface-2: #0d0d0d;
  --text: #ffffff;
  --muted: #d1d5db;
  --line: #202020;
}

html[data-theme="light"] body {
  color: #000000;
}

html[data-theme="dark"] body {
  color: #ffffff;
}

html[data-theme="light"] .sidebar {
  background: rgba(255,255,255,.96);
  color: #000000;
  border-right: 1px solid var(--line);
  box-shadow: 12px 0 35px rgba(0,0,0,.04);
}

html[data-theme="light"] .brand-sub,
html[data-theme="light"] .nav-item,
html[data-theme="light"] .reset-button,
html[data-theme="light"] .mini-card span {
  color: #222222;
}

html[data-theme="light"] .nav-item:hover {
  background: #f1f3f6;
  color: #000000;
}

html[data-theme="light"] .nav-item.active {
  background: #eceff3;
  color: #000000;
}

html[data-theme="light"] .mini-card {
  border-color: var(--line);
  background: #f7f8fa;
}

html[data-theme="light"] .mini-icon {
  background: #eceff3;
}

html[data-theme="light"] .clock-chip,
html[data-theme="light"] .profile-chip,
html[data-theme="light"] .icon-button,
html[data-theme="light"] .secondary-button,
html[data-theme="light"] .search-box,
html[data-theme="light"] .filter-chip,
html[data-theme="light"] .cash-row,
html[data-theme="light"] .qty-control button,
html[data-theme="light"] .form-grid input,
html[data-theme="light"] .form-grid select {
  color: #000000;
}

html[data-theme="dark"] .sidebar {
  background: #000000;
  color: #ffffff;
  border-right: 1px solid #151515;
}

html[data-theme="dark"] .brand-sub,
html[data-theme="dark"] .nav-item,
html[data-theme="dark"] .reset-button,
html[data-theme="dark"] .mini-card span {
  color: #ffffff;
}

html[data-theme="dark"] .nav-item:hover,
html[data-theme="dark"] .nav-item.active {
  color: #ffffff;
}

html[data-theme="dark"] .theme-toggle {
  color: #ffffff;
  background: #080808;
  border-color: #202020;
}

html[data-theme="light"] .theme-toggle {
  color: #000000;
  background: #ffffff;
}

@media (max-width: 860px) {
  .topbar {
    width: 100%;
    min-width: 0;
  }

  .top-actions {
    margin-left: auto;
    gap: 8px;
  }

  .theme-toggle {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
  }

  .profile-chip {
    flex: 0 0 auto;
  }
}

@media (max-width: 420px) {
  .theme-toggle {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  .theme-toggle svg {
    width: 16px;
    height: 16px;
  }
}

img {
  content-visibility: auto;
}


@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .theme-toggle,
  .profile-chip,
  .quick-card,
  .product-card,
  .primary-button,
  .secondary-button,
  .icon-button {
    transition: none;
  }
}

html[data-theme="light"] .breadcrumb span,
html[data-theme="light"] .eyebrow,
html[data-theme="light"] .clock-chip,
html[data-theme="light"] .profile-chip small,
html[data-theme="light"] .stat-card span,
html[data-theme="light"] .stat-card small,
html[data-theme="light"] .hero p,
html[data-theme="light"] .section-head p,
html[data-theme="light"] .sales-shortcut,
html[data-theme="light"] .table-wrap th,
html[data-theme="light"] .stack-item span,
html[data-theme="light"] .developer-meta > div span,
html[data-theme="light"] .cart-summary span,
html[data-theme="light"] .cash-row label,
html[data-theme="light"] .cash-row .change span {
  color: #000000;
}

html[data-theme="dark"] .breadcrumb span,
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .clock-chip,
html[data-theme="dark"] .profile-chip small,
html[data-theme="dark"] .stat-card span,
html[data-theme="dark"] .stat-card small,
html[data-theme="dark"] .hero p,
html[data-theme="dark"] .section-head p,
html[data-theme="dark"] .sales-shortcut,
html[data-theme="dark"] .table-wrap th,
html[data-theme="dark"] .stack-item span,
html[data-theme="dark"] .developer-meta > div span,
html[data-theme="dark"] .cart-summary span,
html[data-theme="dark"] .cash-row label,
html[data-theme="dark"] .cash-row .change span {
  color: #ffffff;
}


#themeToggle {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  pointer-events: auto;
}
#themeToggle #themeIcon {
  display: inline-block;
  pointer-events: none;
}

.view.active {
  animation: viewIn .46s cubic-bezier(.22,1,.36,1) both;
}
.panel,
.primary-button,
.secondary-button,
.icon-button,
.quick-card,
.product-card,
.profile-chip {
  will-change: transform;
}
.primary-button:active,
.secondary-button:active,
.icon-button:active,
.quick-card:active,
.product-card:active,
.profile-chip:active,
.category-filter-all:active,
.category-filter-chip:active {
  transform: translateY(0) scale(.985);
}
.modal-backdrop {
  transition: opacity .32s ease, visibility .32s ease;
}
.modal {
  animation: modalIn .38s cubic-bezier(.22,1,.36,1);
}

html[data-theme="dark"] .receipt-preview-shell {
  background: #070707;
  border: 1px solid #202020;
  color: var(--text);
}
html[data-theme="dark"] .receipt-preview-actions {
  background: linear-gradient(180deg, rgba(7,7,7,0), #070707 28%);
}
html[data-theme="dark"] .form-grid label {
  color: #ffffff;
}
html[data-theme="dark"] .password-toggle {
  color: #ffffff;
  background: transparent;
  border-color: transparent;
}
html[data-theme="dark"] .password-toggle:hover {
  background: #141414;
}
html[data-theme="dark"] .table-wrap th,
html[data-theme="dark"] .table-wrap td {
  color: var(--text);
}
html[data-theme="dark"] .footer {
  color: #b8bec8;
}
html[data-theme="light"] .footer {
  color: #586274;
}
button:disabled {
  cursor: not-allowed;
  opacity: .6;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

body.is-user [data-view="inventory"],
body.is-user #resetData,
body.is-user #adminDashboard {
  display: none !important;
}
body.is-admin #userDashboard {
  display: none !important;
}
body.is-admin [data-view="inventory"] {
  display: flex !important;
}
body.is-admin #adminDashboard {
  display: block !important;
}
body.is-admin #resetData {
  display: flex !important;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: stretch;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  left: auto;
  bottom: auto;
  width: auto;
  height: 100vh;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 30;
}

.main-area {
  margin-left: 0;
  width: auto;
  min-width: 0;
  padding-inline: clamp(16px, 2.6vw, 40px);
}

.topbar {
  width: 100%;
  min-width: 0;
  padding-inline: 0;
}

.view {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0;
  scroll-margin-top: 100px;
}

.view.active {
  transform: none;
}

.page-head {
  margin-top: 4px;
  padding-top: 0;
}

#view-dashboard,
#view-inventory,
#view-sales,
#view-history,
#view-developer {
  min-height: 0;
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(82vw, 300px);
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateX(-105%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-area {
    width: 100%;
    margin-left: 0;
    padding-inline: clamp(16px, 4vw, 24px);
  }

  .topbar {
    padding-inline: 0;
  }

  body.nav-open .sidebar {
    pointer-events: auto;
  }
}

@media (max-width: 640px) {
  .main-area {
    padding-inline: 16px;
  }

  .topbar {
    min-height: 70px;
  }

  .page-head {
    margin-top: 0;
    margin-bottom: 18px;
  }

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

@media (max-width: 420px) {
  .main-area {
    padding-inline: 14px;
  }
}

@media (min-width: 861px) {
  .sidebar-backdrop,
  #menuToggle {
    display: none !important;
  }

  .sidebar {
    transform: none !important;
    pointer-events: auto;
  }

  body.nav-open {
    overflow: auto;
  }
}


.quick-card {
  display: block;
  width: 100%;
}
.quick-card > .quick-icon {
  display: grid;
}
.quick-card > strong,
.quick-card > span {
  display: block;
  width: 100%;
  clear: both;
}
.quick-card > strong {
  line-height: 1.35;
}
.quick-card > span {
  line-height: 1.5;
  margin-top: 6px;
}

.main-area {
  display: block;
}
.view {
  position: relative;
  margin-top: 0;
  padding-top: 0;
}


.product-card > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 900 / 650;
  object-fit: cover;
}

body.is-user .admin-only { display:none !important; }
body.is-user #cartCount { display:none !important; }
body.is-admin .user-only { display:none !important; }

.role-chip { white-space:normal; flex-wrap:wrap; overflow-wrap:anywhere; }

.role-info { cursor:default; }
.role-info:hover { transform:none; box-shadow:none; }

.flow-list {
  display:grid;
  gap:10px;
  margin-top:18px;
}
.flow-step {
  display:grid;
  grid-template-columns:38px 1fr;
  gap:12px;
  align-items:center;
  padding:12px 0;
  border-bottom:1px solid #f0f2f6;
}
.flow-step:last-child { border-bottom:0; }
.flow-step > span {
  width:32px;
  height:32px;
  border-radius:11px;
  display:grid;
  place-items:center;
  background:#f4f6f9;
  color:#7a8493;
  font-size:10px;
  font-weight:800;
}
.flow-step strong { display:block; font-size:11px; }
.flow-step small { display:block; margin-top:4px; color:var(--muted); font-size:10px; line-height:1.45; }

.catalog-panel { padding:20px; }
.catalog-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:13px;
}
.catalog-card {
  border:1px solid var(--line);
  background:#fff;
  border-radius:20px;
  overflow:hidden;
  transition:transform .28s cubic-bezier(.22,1,.36,1), box-shadow .28s cubic-bezier(.22,1,.36,1);
}
.catalog-card:hover {
  transform:translateY(-3px);
  box-shadow:0 14px 28px rgba(17,24,39,.07);
}
.catalog-card.sold-out { opacity:.62; }
.catalog-card img {
  display:block;
  width:100%;
  height:155px;
  object-fit:cover;
}
.catalog-card-body { padding:14px; }
.catalog-card .cat {
  display:block;
  color:#9ba4b1;
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.12em;
}
.catalog-card strong {
  display:block;
  margin-top:6px;
  font-size:13px;
}
.catalog-card-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:14px;
}
.catalog-card-footer b { font-size:12px; }
.catalog-card-footer span {
  color:#7f8998;
  font-size:10px;
}
.catalog-empty {
  grid-column:1/-1;
  min-height:250px;
  display:grid;
  place-items:center;
  text-align:center;
  color:#a3acb9;
}
.catalog-empty svg { width:34px; margin-bottom:10px; }
.catalog-empty strong { display:block; color:#647084; font-size:12px; }
.catalog-empty span { display:block; margin-top:5px; font-size:10px; }

.confirm-modal { max-width:520px; }
.confirm-head { align-items:flex-start; margin-top:0; }
.confirm-icon {
  width:44px;
  height:44px;
  border-radius:15px;
  background:#fff3e8;
  color:#b76435;
  display:grid;
  place-items:center;
  margin-bottom:14px;
}
.confirm-icon svg { width:20px; }
.danger-button {
  background:#c75454 !important;
  color:#fff !important;
  box-shadow:0 10px 24px rgba(199,84,84,.18) !important;
}
.danger-button:hover {
  background:#b74444 !important;
}

@media (max-width:1100px) {
  .catalog-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:760px) {
  .catalog-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:520px) {
  .catalog-grid { grid-template-columns:1fr; }
}

.customer-order-panel {
  margin-top: 18px;
  padding: 20px;
}
.customer-order-panel .checkout-button { margin-top: 10px; width: 100%; }
.pending-orders-panel { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.pending-orders-list { display: grid; gap: 12px; }
.pending-order { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--panel-soft, transparent); }
.pending-order-head, .pending-order-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.pending-order-head strong { display:block; font-size:13px; }
.pending-order-head small { display:block; margin-top:3px; color:var(--muted); font-size:11px; }
.pending-order-items { display:flex; flex-wrap:wrap; gap:7px; margin:12px 0; }
.pending-order-items span { border:1px solid var(--line); border-radius:999px; padding:6px 9px; font-size:11px; color:var(--muted-strong, var(--text)); }
.pending-order-foot > strong { font-size:14px; }
.product-card[data-action], .catalog-card[data-action] { cursor:pointer; -webkit-user-select:none; user-select:none; touch-action:manipulation; }
.product-card[data-action]:active, .catalog-card[data-action]:active { transform: translateY(1px); }
@media (max-width: 620px) {
  .customer-order-panel { padding: 15px; }
  .pending-order-head, .pending-order-foot { align-items:flex-start; flex-direction:column; }
  .pending-order-foot .secondary-button { width:100%; }
}

html[data-theme="light"] .product-card,
html[data-theme="light"] .catalog-card,
html[data-theme="light"] .product-card-body,
html[data-theme="light"] .catalog-card-body {
  background: #ffffff;
  color: #000000;
}

html[data-theme="dark"] .product-card,
html[data-theme="dark"] .catalog-card,
html[data-theme="dark"] .product-card-body,
html[data-theme="dark"] .catalog-card-body {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

html[data-theme="dark"] .product-card strong,
html[data-theme="dark"] .catalog-card strong,
html[data-theme="dark"] .product-bottom b,
html[data-theme="dark"] .catalog-card-footer b {
  color: var(--text);
}

html[data-theme="dark"] .product-card .cat,
html[data-theme="dark"] .catalog-card .cat,
html[data-theme="dark"] .product-bottom span,
html[data-theme="dark"] .catalog-card-footer span {
  color: var(--muted);
}

html[data-theme="dark"] .catalog-empty {
  color: var(--muted);
}

html[data-theme="dark"] .catalog-empty strong {
  color: var(--text);
}

html[data-theme="dark"] .catalog-empty span {
  color: var(--muted);
}

html[data-theme="dark"] .main-developer {
  background: linear-gradient(135deg, #0d0906, #080808);
}

html[data-theme="dark"] .flow-step {
  border-color: var(--line);
}

html[data-theme="dark"] .flow-step > span {
  background: var(--surface-2);
  color: var(--muted);
}

html[data-theme="dark"] .receipt-preview-shell {
  background: var(--surface);
  color: var(--text);
}

html[data-theme="dark"] .receipt-paper {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line);
}

html[data-theme="dark"] .receipt-subtitle,
html[data-theme="dark"] .receipt-meta,
html[data-theme="dark"] .receipt-footer {
  color: var(--muted);
}

html[data-theme="dark"] .receipt-line {
  border-color: var(--line);
}

html[data-theme="dark"] .receipt-preview-actions {
  background: linear-gradient(180deg, rgba(7,7,7,0), var(--surface) 28%);
}

html[data-theme="dark"] a {
  color: inherit;
}

html[data-theme="dark"] .secondary-button {
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

html[data-theme="dark"] .cash-row {
  color: var(--text);
  background: var(--surface-2);
}

html[data-theme="dark"] .cash-row input {
  background: #000;
  color: var(--text);
}

html[data-theme="dark"] .customer-cart,
html[data-theme="dark"] .cashier-cart,
html[data-theme="dark"] .cart-panel {
  color: var(--text);
}

html[data-theme="dark"] .cart-item strong,
html[data-theme="dark"] .cart-item b,
html[data-theme="dark"] .cart-summary strong {
  color: var(--text);
}

html[data-theme="dark"] .cart-item span,
html[data-theme="dark"] .cart-summary span {
  color: var(--muted);
}



.customer-developer-card {
  display: grid;
  grid-template-columns: 48px minmax(0,1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 20px;
  cursor: default;
  user-select: none;
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,249,243,.92));
}
.customer-developer-card:hover { transform: none !important; }
.customer-developer-avatar { width: 48px; height: 48px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); flex: none; }
.customer-developer-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.customer-developer-copy { min-width:0; display:flex; flex-direction:column; gap:3px; }
.customer-developer-copy strong { font-size:14px; }
.customer-developer-copy > span:last-child { font-size:11px; color:var(--muted); }
.customer-developer-badge { display:inline-flex; align-items:center; gap:7px; padding:9px 11px; border-radius:12px; background:var(--surface-2); color:var(--muted); font-size:10px; font-weight:700; white-space:normal; flex-wrap:wrap; overflow-wrap:anywhere; }
.customer-developer-badge svg { width:15px; }
.customer-history-panel { margin-top:16px; padding:20px; }
.customer-history-list { display:grid; gap:12px; }
.customer-history-item { border:1px solid var(--line); border-radius:18px; padding:15px; background:var(--surface); transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.customer-history-item:hover { transform:translateY(-2px); box-shadow:0 12px 28px rgba(17,24,39,.06); border-color:rgba(187,107,54,.22); }
.customer-history-head,.customer-history-foot { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.customer-history-head strong { display:block; font-size:13px; }
.customer-history-head small,.customer-history-foot small { display:block; margin-top:3px; color:var(--muted); font-size:10px; }
.customer-history-items { margin:12px 0; padding:10px 12px; border-radius:12px; background:var(--surface-2); color:var(--muted); font-size:11px; line-height:1.6; }
.customer-history-foot > div:first-child strong { font-size:14px; }
.history-edit-area { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.history-countdown,.history-locked { display:inline-flex; align-items:center; gap:6px; color:var(--muted); font-size:10px; font-weight:700; }
.history-countdown svg,.history-locked svg { width:14px; }
.checkout-edit-modal { width:min(620px, calc(100vw - 28px)); }
.checkout-edit-banner { display:flex; align-items:center; gap:12px; padding:13px 14px; margin-bottom:14px; border-radius:16px; background:rgba(187,107,54,.08); color:var(--primary); }
.checkout-edit-banner svg { width:19px; }
.checkout-edit-banner strong { display:block; font-size:22px; font-variant-numeric:tabular-nums; letter-spacing:.02em; }
.checkout-edit-banner span { display:block; font-size:10px; color:var(--muted); margin-top:2px; }
.checkout-edit-list { display:grid; gap:10px; max-height:min(48vh, 420px); overflow:auto; padding-right:4px; }
.checkout-edit-item { display:grid; grid-template-columns:52px minmax(0,1fr) auto; gap:12px; align-items:center; padding:10px; border:1px solid var(--line); border-radius:16px; background:var(--surface-2); }
.checkout-edit-item img { width:52px; height:52px; object-fit:cover; border-radius:13px; display:block; }
.checkout-edit-main { min-width:0; }
.checkout-edit-main strong { display:block; font-size:12px; overflow-wrap:anywhere; }
.checkout-edit-main small { display:block; margin-top:4px; color:var(--muted); font-size:10px; }
.checkout-edit-qty { flex:none; }
.customer-mode .sidebar { display:none !important; }
.customer-mode .app-shell { display:block; }
.customer-mode .main-area { margin:0; width:100%; max-width:none; }
.customer-mode .topbar { max-width:var(--content-max); margin-inline:auto; }
.customer-mode #view-dashboard,
.customer-mode #view-inventory,
.customer-mode #view-sales,
.customer-mode #view-history,
.customer-mode #view-developer { display:none !important; }
.customer-mode #view-catalog { display:block !important; }
.customer-mode .breadcrumb strong { font-size:20px; }
.customer-mode .breadcrumb span { display:none; }
.customer-mode .top-actions .role-chip { display:inline-flex; }
.customer-mode .top-actions .profile-chip { display:none; }
.customer-mode .top-actions .theme-toggle { display:inline-flex; }
.customer-mode .mobile-only { display:none !important; }
.customer-mode .main-area { padding-inline:clamp(14px, 3vw, 40px); }
.customer-mode .footer { max-width:var(--content-max); margin-inline:auto; }
body.is-user [data-view], body.is-user #authNavButton { pointer-events:none; }
body.is-user #customerCheckoutButton { pointer-events:auto; }
body.is-user .customer-history-panel { display:block; }
body.is-admin .customer-history-panel, body.is-admin .customer-developer-card { display:none !important; }

.view { animation:none !important; }
.view.active > .page-head,
.view.active > .customer-developer-card,
.view.active > .panel,
.view.active > .sales-layout,
.view.active > .developer-hero,
.view.active > .developer-grid { animation:pageEnter .36s cubic-bezier(.22,1,.36,1) both; }
.view.active > :nth-child(2) { animation-delay:.04s; }
.view.active > :nth-child(3) { animation-delay:.08s; }
.view.active > :nth-child(4) { animation-delay:.12s; }
@keyframes pageEnter { from { opacity:0; transform:translate3d(0,8px,0); } to { opacity:1; transform:translate3d(0,0,0); } }
.panel, .quick-card, .product-card, .catalog-card, .primary-button, .secondary-button, .icon-button, .profile-chip, .category-filter-all, .category-filter-chip { will-change:auto; }

@media (max-width: 700px) {
  .customer-developer-card { grid-template-columns:46px minmax(0,1fr); }
  .customer-developer-badge { grid-column:2; justify-self:start; }
  .customer-history-head,.customer-history-foot { align-items:flex-start; flex-direction:column; }
  .history-edit-area { justify-content:flex-start; width:100%; }
  .history-edit-area .secondary-button { flex:1; }
  .checkout-edit-item { grid-template-columns:44px minmax(0,1fr); }
  .checkout-edit-item img { width:44px; height:44px; }
  .checkout-edit-qty { grid-column:2; justify-self:start; }
}
@media (prefers-reduced-motion: reduce) {
  .view.active > *, .customer-history-item { animation:none !important; transition:none !important; }
}

.customer-developer-card img { pointer-events:none; }

.theme-toggle {
  box-sizing: border-box;
  display: inline-grid !important;
  place-items: center !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden;
  line-height: 0;
  vertical-align: middle;
}
.theme-toggle svg,
.theme-toggle i {
  display: block;
  width: 17px;
  height: 17px;
  margin: 0 !important;
  flex: 0 0 auto;
  transform: translate(0, 0) !important;
}

.customer-history-panel {
  max-height: min(420px, 58vh);
  overflow: hidden;
}
.customer-history-list {
  max-height: min(330px, 48vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-right: 4px;
}
.customer-history-item {
  min-width: 0;
}
.customer-history-items {
  overflow-wrap: anywhere;
}
.history-edit-area {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.history-countdown,
.history-locked {
  min-height: 36px;
  box-sizing: border-box;
  padding: 0 10px;
  justify-content: center;
  white-space: normal;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 11px;
  font-variant-numeric: tabular-nums;
}
.history-countdown svg,
.history-locked svg {
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
}
.history-edit-area .secondary-button {
  min-height: 36px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.compact-history-empty {
  min-height: 160px;
  height: 160px;
}

.checkout-edit-banner {
  min-height: 62px;
  box-sizing: border-box;
}
.checkout-edit-banner strong {
  min-width: 5ch;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 700px) {
  .customer-history-panel {
    max-height: 360px;
  }
  .customer-history-list {
    max-height: 270px;
  }
  .history-edit-area {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(78px, auto) minmax(0, 1fr);
    justify-content: stretch;
  }
  .history-countdown,
  .history-locked,
  .history-edit-area .secondary-button {
    width: 100%;
  }
}

.quick-card {
  isolation: isolate;
  min-height: 158px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  transform-origin: center;
}
.quick-card::before {
  content: '';
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle at var(--pointer-x, 18%) var(--pointer-y, 18%), rgba(187,107,54,.13), transparent 28%);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
  z-index: -1;
}
.quick-card:hover::before,
.quick-card:focus-visible::before {
  opacity: 1;
}
.quick-card:active {
  transform: translateY(-1px) scale(.985);
}
.quick-card.is-pressed {
  animation: quickCardPress .34s cubic-bezier(.22,1,.36,1);
}
.quick-card .quick-icon {
  flex: none;
  margin-bottom: 16px;
}
.quick-card > strong {
  margin-top: auto;
}
.quick-card > span {
  padding-right: 18px;
}
.quick-card .arrow {
  transition: transform .28s cubic-bezier(.22,1,.36,1), color .28s ease;
}
.quick-card:hover .arrow,
.quick-card:focus-visible .arrow {
  transform: translate(2px,-2px);
  color: var(--primary);
}
@keyframes quickCardPress {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-2px) scale(.975); }
  100% { transform: translateY(0) scale(1); }
}
.product-image-check {
  display: grid;
  grid-template-columns: 72px minmax(0,1fr);
  gap: 12px;
  align-items: center;
  grid-column: 1 / -1;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}
.product-image-check[hidden] {
  display: none;
}
.product-image-check-media {
  width: 72px;
  height: 56px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface);
  display: grid;
  place-items: center;
}
.product-image-check-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-image-check-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.product-image-check-copy strong {
  font-size: 12px;
}
.product-image-check-copy span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.product-image-check[data-state="loading"] {
  border-color: rgba(92,126,216,.35);
}
.product-image-check[data-state="success"] {
  border-color: rgba(62,157,105,.35);
}
.product-image-check[data-state="error"] {
  border-color: rgba(203,78,78,.35);
}
.checkout-edit-pricing {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.checkout-edit-price-card {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-2);
}
.checkout-edit-price-card span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.checkout-edit-price-card strong {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.checkout-edit-diff.increase { color: #b2532a; }
.checkout-edit-diff.decrease { color: #2f8f5b; }
.checkout-edit-diff.neutral { color: var(--muted); }
@media (max-width: 520px) {
  .checkout-edit-pricing {
    grid-template-columns: 1fr;
  }
}
html[data-theme="dark"] .product-image-check,
html[data-theme="dark"] .checkout-edit-price-card {
  background: #111318;
}

html,
body {
  min-width: 0;
  overflow-wrap: anywhere;
}

button,
a,
label,
strong,
b,
small,
span,
p,
h1,
h2,
h3,
h4,
h5,
h6,
th,
td {
  overflow-wrap: anywhere;
  word-break: normal;
}

button,
a {
  white-space: normal;
}

.topbar,
.top-actions,
.page-head,
.section-head,
.table-tools,
.hero-actions,
.developer-actions,
.modal-actions,
.product-bottom,
.history-edit-area {
  min-width: 0;
  flex-wrap: wrap;
}

.topbar > *,
.top-actions > *,
.page-head > *,
.section-head > *,
.table-tools > *,
.hero-actions > *,
.developer-actions > *,
.modal-actions > *,
.product-bottom > *,
.history-edit-area > * {
  min-width: 0;
}

.product-card strong,
.cart-item strong,
.sale-mini .name,
.contributor-item strong,
.checkout-edit-main strong,
.quick-card > strong,
.quick-card > span,
.user-cart-note span,
.profile-chip strong,
.profile-chip small {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.table-wrap th,
.table-wrap td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  vertical-align: top;
}

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

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

.category-filter-all,
.category-filter-chip {
  min-width: 0;
  white-space: normal;
}

.category-filter-copy,
.category-filter-chip > span:nth-child(2) {
  min-width: 0;
  overflow-wrap: anywhere;
}

.customer-history-items {
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  .topbar {
    height: auto;
    min-height: 70px;
    align-items: flex-start;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .breadcrumb {
    min-width: 0;
    flex: 1 1 180px;
  }
  .top-actions {
    flex: 0 1 auto;
    justify-content: flex-end;
  }
  .clock-chip {
    min-width: 0;
    white-space: normal;
    text-align: center;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .product-bottom {
    align-items: flex-start;
  }
  .product-bottom > * {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .topbar {
    gap: 10px;
  }
  .breadcrumb strong {
    font-size: clamp(15px, 5vw, 18px);
    line-height: 1.25;
  }
  .top-actions {
    max-width: 46%;
  }
  .role-chip,
  .clock-chip {
    max-width: 100%;
  }
  .category-filter-all {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 8px;
  }
  .category-filter-chip {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 7px;
    padding-inline: 8px;
  }
  .category-filter-copy strong,
  .category-filter-chip > span:nth-child(2) {
    line-height: 1.35;
  }
}

@media (max-width: 360px) {
  .main-area {
    padding-inline: 7px;
  }
  .product-grid {
    grid-template-columns: 1fr;
  }
  .category-filter-list {
    grid-template-columns: 1fr;
  }
  .category-filter-all,
  .category-filter-chip {
    min-height: 58px;
  }
  .top-actions {
    max-width: 44%;
  }
}
