:root {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--background);
  font-synthesis: none;
  --blue: #2256cf;
  --accent-hover: #1e49b5;
  --accent-soft: #edf2ff;
  --accent-border: #b4c9f5;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --surface: #fff;
  --background: #f8fafc;
  --soft: #f8fafc;
  --sidebar-width: 262px;
  --sidebar: #1e293b;
  --sidebar-muted: #cbd5e1;
  --card-shadow: 0 2px 8px rgba(15, 23, 42, .045);
  --welcome-bg: #1e3a8a;
  --tone-blue-ink: #1d4ed8;
  --tone-blue-wash: #eff6ff;
  --tone-blue-line: #bfdbfe;
  --tone-blue-chip: #dbeafe;
  --tone-teal-ink: #0f766e;
  --tone-teal-wash: #f0fdfa;
  --tone-teal-line: #99f6e4;
  --tone-teal-chip: #ccfbf1;
  --tone-violet-ink: #6d28d9;
  --tone-violet-wash: #f5f3ff;
  --tone-violet-line: #ddd6fe;
  --tone-violet-chip: #ede9fe;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 340px;
  color: var(--text);
  background: var(--background);
  font-family: 'Inter', system-ui, sans-serif;
}

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

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
  transition: background .16s, color .16s, border-color .16s;
}

button,
a {
  touch-action: manipulation;
}

button {
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 8px;
}

button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

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

button svg,
a svg {
  pointer-events: none;
}

.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

/* Navigation */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 25px 15px 24px;
  overflow-y: auto;
  color: #f8fafc;
  background: var(--sidebar);
  border-right: 1px solid #334155;
  z-index: 50;
  scrollbar-width: thin;
  transition: transform .22s ease;
}

.sidebar > * {
  flex-shrink: 0;
}

.brand-card {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  min-height: 126px;
  margin: 0 8px 22px;
  padding: 18px 12px;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.brand-symbol {
  display: grid;
  place-items: center;
  width: 40px;
  height: 36px;
  margin-bottom: 6px;
  color: var(--blue);
}

.brand-symbol .icon {
  width: 34px;
  height: 34px;
}

.brand-name {
  display: flex;
  align-items: center;
  color: #0f172a;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.brand-name > span {
  color: var(--blue);
}

.brand-caption {
  margin-top: 7px;
  color: #64748b;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .8px;
}

.tiny-chevron {
  margin-left: 3px;
  font-size: 17px;
  line-height: 12px;
  font-weight: 400;
}

.sidebar-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 10px 16px;
  padding: 17px 5px;
  color: var(--sidebar-muted);
  border-top: 1px solid #475569;
  border-bottom: 1px solid #475569;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .5px;
}

.sidebar-balance strong {
  margin-left: 7px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.nav-list {
  display: grid;
  gap: 5px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 45px;
  padding: 0 14px;
  color: #f8fafc;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
}

.nav-item > .icon {
  width: 19px;
  height: 19px;
  color: var(--sidebar-muted);
}

.nav-item:hover {
  color: #fff;
  background: #334155;
}

.nav-item.active {
  color: #fff;
  background: #263e67;
  border-color: #4064a3;
}

.nav-item.active::before {
  position: absolute;
  left: -1px;
  width: 3px;
  height: 21px;
  background: var(--blue);
  content: '';
}

.nav-item.active > .icon {
  color: #7dd3fc;
}

.nav-item .nav-chevron {
  width: 13px;
  height: 13px;
  margin-left: auto;
  color: var(--sidebar-muted);
}

.nav-label {
  margin: 22px 15px 8px;
  color: var(--sidebar-muted);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1px;
}

.nav-count {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 19px;
  margin-left: auto;
  padding: 0 4px;
  color: #f8fafc;
  background: #475569;
  border-radius: 8px;
  font-size: 10px;
}

.sidebar-bottom {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: auto 10px 0;
  padding-top: 30px;
  color: var(--sidebar-muted);
  font-size: 9px;
  line-height: 1.7;
}

.sidebar-bottom .online-dot {
  display: inline-block;
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  background: var(--blue);
  border-radius: 3px;
}

.workspace {
  margin-left: var(--sidebar-width);
  transition: margin-left .22s;
}

/* Header and page frame */
.topbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  height: 80px;
  padding: 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 30;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .025);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-right {
  gap: 15px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border-radius: 8px;
}

.icon-button:hover {
  color: var(--blue);
  background: var(--soft);
}

.menu-toggle .icon {
  width: 24px;
  height: 24px;
}

.wallet-button {
  display: flex;
  align-items: center;
  gap: 8px;

  height: 40px;
  padding: 0 12px;
  color: var(--blue);
  background: var(--surface);
  border: 1px solid var(--accent-border);
  border-radius: 8px;

  font-size: 12px;
}

.wallet-button .icon {
  width: 17px;
  height: 17px;
}

.wallet-button:hover {
  background: var(--accent-soft);
}

.wallet-button strong {
  font-weight: 600;
}

.wallet-plus {
  display: inline-grid;
  place-items: center;
  margin-left: 5px;
  padding-left: 12px;
  border-left: 1px solid var(--accent-border);
  font-size: 16px;
}

.theme-toggle {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
}

.theme-toggle .icon {
  width: 18px;
  height: 18px;
}

.preview-pill {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.notification-button .icon {
  width: 22px;
  height: 22px;
}

.header-divider {
  width: 1px;
  height: 27px;
  margin: 0 1px;
  background: var(--border);
}

.profile-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
}

.avatar {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;

  color: #1d4ed8;

  background: #dbeafe;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 600;
  border-color: #dbeafe;
}

.profile-name {
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  min-width: 0;
  max-width: 180px;
}

.profile-name > b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: inherit;
}

.avatar > .icon {
  width: 18px;
  height: 18px;
}

.profile-name small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
}

.profile-button > .tiny-chevron {
  color: var(--muted);
}

main {
  max-width: 1600px;
  margin: 0 auto;

  padding: 32px 32px 0;
}

.page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 10px;
}

.breadcrumb b {
  color: var(--text);
  font-weight: 400;
}

.breadcrumb > span {
  color: var(--muted);
}

h1 {
  color: var(--text);

  font-size: 24px;

  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -.5px;
}

.page-status {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

/* Welcome and store notices */
.home-announcement {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.home-announcement-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 26px 28px 24px;
  background: var(--welcome-bg);
}

.home-announcement-header::after {
  position: absolute;
  z-index: -1;
  top: -125px;
  right: -40px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(165, 243, 252, .25);
  border-radius: 50%;
  box-shadow: 0 0 0 35px rgba(165, 243, 252, .04);
  content: '';
  pointer-events: none;
}

.home-announcement-intro { min-width: 0; }

.home-announcement-eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  color: #a5f3fc;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .8px;
  line-height: 1.5;
}

.home-announcement-eyebrow .icon { width: 15px; height: 15px; }

.home-announcement h2 {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.5px;
}

.home-announcement-description {
  max-width: 690px;
  margin-top: 10px;
  color: #dbeafe;
  font-size: 13px;
  line-height: 1.75;
}

.home-announcement .home-announcement-cta {
  flex-shrink: 0;
  color: #1d4ed8;
  background: #fff;
  border-color: #fff;
}

.home-announcement .home-announcement-cta:hover {
  color: #1e40af;
  background: #e0f2fe;
  border-color: #bae6fd;
}

.home-announcement-cta:focus-visible { outline-color: #67e8f9; }

.home-announcement-notes {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 20px 28px;
  list-style: none;
}

.home-announcement-notes li {
  --notice-ink: var(--tone-blue-ink);
  --notice-wash: var(--tone-blue-wash);
  --notice-line: var(--tone-blue-line);
  --notice-chip: var(--tone-blue-chip);
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 16px;
  background: var(--notice-wash);
  border: 1px solid var(--notice-line);
  border-left: 3px solid var(--notice-ink);
  border-radius: 8px;
}

.home-announcement-notes li:nth-child(2) {
  --notice-ink: var(--tone-teal-ink);
  --notice-wash: var(--tone-teal-wash);
  --notice-line: var(--tone-teal-line);
  --notice-chip: var(--tone-teal-chip);
}

.home-announcement-notes li:nth-child(3) {
  --notice-ink: var(--tone-violet-ink);
  --notice-wash: var(--tone-violet-wash);
  --notice-line: var(--tone-violet-line);
  --notice-chip: var(--tone-violet-chip);
}

.home-announcement-notes > li > .icon {
  width: 36px;
  height: 36px;
  padding: 8px;
  margin-top: 2px;
  color: var(--notice-ink);
  background: var(--notice-chip);
  border-radius: 8px;
}

.home-announcement-notes h3 {
  color: var(--notice-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.home-announcement-notes p {
  margin-top: 4px;
  color: #475569;
  font-size: 13px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.home-announcement-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 15px 28px;
  background: var(--background);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.home-announcement-footer > div { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.home-announcement-footer .text-link { display: inline-flex; align-items: center; gap: 6px; }
.home-announcement-footer .icon { width: 14px; height: 14px; }

.text-link {
  padding: 0;
  color: var(--blue);
  background: transparent;
  font-size: inherit;
  font-weight: 500;
  line-height: inherit;
}

.text-link > span {
  margin-left: 2px;
  font-size: 12px;
}

.text-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Product catalog */
.catalog {
  margin-top: 26px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);

  border-radius: 12px;
  scroll-margin-top: 98px;
  box-shadow: var(--card-shadow);
}

.catalog-heading { padding: 24px 28px 20px; }

.catalog-heading h2 {
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -.3px;
}

.catalog-heading p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  padding: 28px 28px 22px;
}

.section-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);

  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.1px;
}

.section-heading h2 {
  color: var(--text);

  font-size: 21px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -.3px;
}

.section-heading p {
  margin-top: 8px;
  color: var(--muted);

  font-size: 12px;
  line-height: 1.8;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  padding: 0 28px 22px;
}

.category-tabs {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.category-tab {
  display: flex;
  align-items: center;
  gap: 6px;

  height: 34px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border-radius: 8px;

  font-size: 11px;
  white-space: nowrap;
}

.category-tab.active {
  color: var(--blue);
  background: var(--surface);
  border-color: var(--accent-border);
  font-weight: 500;
}

.category-tab .category-count {
  padding: 2px 5px;
  color: var(--blue);
  background: var(--accent-soft);
  border-radius: 8px;
  font-size: 8px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;

  width: 250px;

  height: 40px;
  padding: 0 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.search-box .icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

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

  font-size: 12px;
}

.search-box:focus-within {
  border-color: var(--blue);
}

.search-box input::placeholder {
  color: var(--muted);
}

.product-table-wrap {
  overflow-x: auto;
}

.product-table {
  width: 100%;
  min-width: 700px;
  table-layout: fixed;
  border-collapse: collapse;
  text-align: left;
}

.product-table thead {
  background: var(--tone-blue-wash);
}

.product-table th {
  height: 44px;
  padding: 0 16px;
  color: var(--tone-blue-ink);
  border-top: 1px solid var(--tone-blue-line);
  border-bottom: 1px solid var(--tone-blue-line);

  font-size: 10px;
  font-weight: 500;
  letter-spacing: .6px;
  white-space: nowrap;
}

.product-table th:first-child,
.product-table td:first-child {
  padding-left: 25px;
}

.product-table th:last-child,
.product-table td:last-child {
  padding-right: 25px;
  text-align: right;
}

.product-table th:nth-child(1) {
  width: 42%;
}

.product-table th:nth-child(2) {
  width: 10%;
}

.product-table th:nth-child(3),
.product-table th:nth-child(4),
.product-table th:nth-child(5) {
  width: 16%;
}

.product-table td {
  padding: 22px 16px;
  border-bottom: 1px solid var(--border);

  font-size: 12px;
  white-space: nowrap;
}

.product-table th:nth-child(2),
.product-table .country-cell {
  padding-right: 8px;
  padding-left: 8px;
  text-align: center;
}

.product-table th:nth-child(3),
.product-table th:nth-child(4),
.product-table td:nth-child(3),
.product-table td:nth-child(4) {
  text-align: center;
  vertical-align: middle;
}

.country-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.country-flag {
  display: block;
  flex: 0 0 40px;
  width: 40px;
  height: 30px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px var(--border);
}

.country-empty {
  display: inline-block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  white-space: normal;
}

.product-table tbody tr:last-child td {
  border-bottom: 0;
}

.product-table tbody tr:hover {
  background: var(--soft);
}

.product-info {
  display: flex;
  align-items: center;
  gap: 13px;
}

.product-info > div {
  flex: 1;
  min-width: 0;
}

.product-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;

  width: 42px;

  height: 42px;
  color: var(--blue);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 10px;
}

.product-icon .icon {
  width: 20px;
  height: 20px;
}

.product-name {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--text);

  font-size: 14px;

  font-weight: 600;
}

.product-title {
  display: -webkit-box;
  flex: 1;
  min-width: 0;
  max-height: 3.2em;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.product-description {
  margin-top: 6px;
  color: var(--muted);

  font-size: 11px;
  font-weight: 400;
  line-height: 1.7;
}

.product-badge {
  padding: 4px 6px;

  color: #0f172a;

  background: #fef08a;
  border: 1px solid var(--accent-border);
  border-radius: 8px;

  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
  border-color: #fef08a;
}

.stock {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 104px;
  max-width: 100%;
  min-height: 66px;
  padding: 8px 10px;
  color: var(--text);
  background: transparent;
  border: 1px solid #06b6b6;
  border-radius: 8px;
  text-align: center;
  white-space: nowrap;
}

.stock-count {
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
}

.stock-label {
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
}

.stock.is-sold-out {
  color: #b91c1c;
  background: transparent;
  border-color: #ef4444;
}

.dark .stock {
  color: var(--text);
  background: transparent;
  border-color: #22d3ee;
}

.dark .stock.is-sold-out {
  color: #fca5a5;
  background: transparent;
  border-color: #f87171;
}

.price {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 104px;
  max-width: 100%;
  min-width: 0;
  min-height: 66px;
  padding: 8px 10px;
  color: var(--text);
  background: transparent;
  border: 1px solid #ef4444;
  border-radius: 8px;
  font-weight: 500;
  text-align: center;
}

.price > .icon {
  width: 22px;
  height: 18px;
  stroke-width: 1.8;
}

.price-amount {
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.price small {
  margin-left: 2px;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.dark .price {
  border-color: #f87171;
}

.buy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  height: 38px;

  padding: 0 14px;
  color: #fff;
  background: var(--blue);
  border-radius: 8px;

  font-size: 12px;

  font-weight: 600;
  white-space: nowrap;
}

.buy-button:hover {
  background: var(--accent-hover);
}

.buy-button .icon {
  width: 13px;
  height: 13px;
}

.catalog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 39px;
  padding: 9px 25px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 9px;
  line-height: 1.7;
}

.catalog-foot > span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.catalog-foot .icon {
  width: 11px;
  height: 11px;
}

/* Shared controls */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  height: 40px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 8px;

  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.button .icon {
  width: 15px;
  height: 15px;
}

.button-secondary {
  color: var(--blue);
  background: var(--surface);
  border-color: var(--border);
}

.button-secondary:hover {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.button-primary {
  color: #fff;
  background: var(--blue);
}

.button-primary:hover {
  background: var(--accent-hover);
}

.bottom-help {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 21px;
  padding: 17px 20px;
  background: var(--tone-teal-wash);
  border: 1px solid var(--tone-teal-line);

  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.help-bubble {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 35px;
  height: 35px;
  color: var(--tone-teal-ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.help-bubble .icon {
  width: 19px;
  height: 19px;
}

.bottom-help b {
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
}

.bottom-help p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.bottom-help > .button {
  margin-left: auto;
}

.footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 25px 0 28px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.9;
}

.footer > span,
.footer > div {
  max-width: 760px;
}

.footer b {
  margin-left: 2px;
  color: var(--text);
  font-size: inherit;
  font-weight: 500;
  letter-spacing: .4px;
}

.footer p {
  margin-top: 5px;
}

.footer-separator {
  margin: 0 8px;
}

.footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.footer a:hover {
  color: var(--blue);
}

.footer .icon {
  width: 11px;
  height: 11px;
}

.floating-support {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 12px;
  z-index: 35;
}

.floating-support:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.floating-support .icon {
  width: 20px;
  height: 20px;
}

.scrim {
  display: none;
}

/* Orders, wallet and guide */
.secondary-view {
  min-height: 420px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);

  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.secondary-view .section-heading {
  padding: 25px;
  border-bottom: 1px solid var(--border);
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
}

.empty-state > .icon {
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  color: var(--muted);
  stroke-width: 1.2;
}

.empty-state h3 {
  font-size: 17px;
  font-weight: 500;
}

.empty-state p {
  max-width: 350px;
  margin: 12px auto 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.85;
}

.history-table-wrap {
  overflow-x: auto;
}

.history-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  text-align: left;
}

.history-table th {
  padding: 15px 22px;
  color: var(--muted);
  background: var(--soft);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.history-table td {
  padding: 20px 22px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  line-height: 1.7;
}

.history-table td b {
  font-weight: 500;
}

.history-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  color: var(--blue);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  font-size: 9px;
  white-space: nowrap;
}

.transaction-balance {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 25px;
  padding: 22px;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.transaction-balance > span {
  color: var(--muted);
  font-size: 11px;
}

.transaction-balance b {
  color: var(--blue);
  font-size: 25px;
  font-weight: 600;
}

.transaction-balance small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.money-in,
.money-out {
  color: var(--blue);
  font-weight: 600;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 25px;
}

.guide-grid article {
  position: relative;
  padding: 23px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.guide-grid article > span {
  position: absolute;
  top: 20px;
  right: 18px;
  color: var(--muted);
  font-size: 20px;
  font-weight: 400;
}

.guide-grid article > .icon {
  width: 26px;
  height: 26px;
  margin-bottom: 20px;
  color: var(--blue);
}

.guide-grid h3 {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

.guide-grid p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
}

.guide-grid .text-link {
  font-size: 11px;
}

.deposit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .85fr);
  align-items: start;
  gap: 24px;
  padding: 25px;
}

.deposit-form {
  min-width: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);

  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.deposit-form h3 {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
}

.deposit-form-description {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.85;
}

.deposit-form .modal-label {
  margin-top: 23px;
}

.deposit-form .amount-option {
  height: 40px;
}

.deposit-form .modal-input {
  height: 43px;
}

.deposit-form .full-width {
  margin-top: 20px;
}

.deposit-range {
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.8;
}

.deposit-summary {
  display: grid;
  gap: 19px;
  min-width: 0;
}

.deposit-summary-card {
  padding: 24px;
  background: var(--soft);
  border: 1px solid var(--border);

  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

.deposit-wallet-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  margin-bottom: 21px;
  color: var(--blue);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 8px;
}

.deposit-wallet-icon > .icon {
  width: 20px;
  height: 20px;
}

.deposit-balance-label {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.deposit-balance {
  display: block;
  margin-top: 9px;
  color: var(--blue);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -.5px;
}

.deposit-summary-description {
  margin-top: 15px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
}

.deposit-history-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.7;
}

.deposit-history-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.deposit-history-link > .icon {
  width: 13px;
  height: 13px;
}

.empty-search {
  padding: 43px 20px 47px;
  color: var(--muted);
  text-align: center;
}

.empty-search > .icon {
  display: block;
  width: 33px;
  height: 33px;
  margin: 0 auto 15px;
  color: var(--muted);
  stroke-width: 1.4;
}

.empty-search > b {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.empty-search > p {
  margin-top: 9px;
  font-size: 11px;
  line-height: 1.8;
}

.order-detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  color: var(--blue);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.order-detail-button:hover {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.order-detail-button > .icon {
  width: 13px;
  height: 13px;
}

/* Dialogs */
dialog {
  width: 440px;
  max-width: calc(100vw - 30px);
  max-height: 90vh;
  padding: 0;
  overflow-y: auto;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);

  border-radius: 12px;
  box-shadow: var(--card-shadow);
}

dialog::backdrop {
  background: #0f172a66;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 21px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -.3px;
}

.modal-kicker {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .8px;
  line-height: 1.7;
}

#modal-content {
  padding: 24px;
}

.modal-muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.85;
}

.modal-label {
  display: block;
  margin: 22px 0 10px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.7;
}

.amount-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.amount-option {
  height: 44px;
  padding: 0 5px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;

  font-size: 12px;
}

.amount-option.selected {
  color: var(--blue);
  background: var(--accent-soft);
  border-color: var(--blue);
  font-weight: 500;
}

.modal-input-wrap {
  position: relative;
}

.modal-input {
  width: 100%;
  padding: 12px 54px 12px 12px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  appearance: textfield;
}

.modal-input[aria-invalid='true'] {
  border-color: var(--blue);
}

#page-deposit-amount[aria-invalid='true'],
#deposit-amount[aria-invalid='true'] {
  border-color: #ef4444;
}

.dark #page-deposit-amount[aria-invalid='true'],
.dark #deposit-amount[aria-invalid='true'] {
  border-color: #f87171;
}

.modal-input-wrap > span {
  position: absolute;
  top: 13px;
  right: 13px;
  color: var(--muted);
  font-size: 11px;
  pointer-events: none;
}

.full-width {
  width: 100%;
  height: 43px;
}

#modal-content > .full-width {
  margin-top: 20px;
}

.purchase-product {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 21px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.purchase-product b {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

.purchase-product p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

#purchase-form {
  min-width: 0;
}

.purchase-quantity {
  margin: 16px 0;
}

.purchase-quantity .modal-label {
  margin: 0 0 8px;
  font-size: 12px;
}

#purchase-quantity {
  min-width: 0;
  padding-right: 112px;
  font-size: 16px;
  line-height: 24px;
  font-variant-numeric: tabular-nums;
}

.purchase-quantity .modal-input-wrap > span {
  top: 50%;
  transform: translateY(-50%);
}

#purchase-quantity:focus-visible {
  border-color: var(--blue);
}

#purchase-quantity[aria-invalid='true'] {
  border-color: #ef4444;
}

.dark #purchase-quantity[aria-invalid='true'] {
  border-color: #f87171;
}

.purchase-stock {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.purchase-deposit {
  margin-top: 12px;
}

.purchase-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
  padding: 11px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.purchase-line b {
  color: var(--text);
  font-weight: 500;
  text-align: right;
}

.purchase-line.total {
  align-items: center;
  margin-top: 10px;
  padding-top: 20px;
  color: var(--text);
  border-top: 1px solid var(--border);
}

.purchase-line.total b {
  color: var(--blue);
  font-size: 23px;
  font-weight: 600;
}

.purchase-line.remaining {
  padding-top: 3px;
  font-size: 10px;
}

.purchase-line.remaining b {
  color: var(--muted);
  font-size: 10px;
}

.modal-actions {
  display: flex;
  gap: 9px;
  margin-top: 22px;
}

.modal-actions .button {
  flex: 1;
  height: 42px;
  padding-right: 10px;
  padding-left: 10px;
}

.modal-error {
  margin: 15px 0 0;

  color: #ef4444;
  font-size: 11px;
  line-height: 1.8;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 20px;
  color: var(--blue);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 12px;
}

.success-mark .icon {
  width: 27px;
  height: 27px;
}

.success-title {
  margin-bottom: 11px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
}

.success-description {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.85;
  text-align: center;
}

.success-id {
  margin: 20px 0;
  padding: 14px;
  color: var(--text);
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  letter-spacing: .8px;
  overflow-wrap: anywhere;
  text-align: center;
}

.support-list {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
}

#support-channels {
  display: contents;
}

.support-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: left;
}

button.support-option:hover,
a.support-option:hover {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.support-option > .icon {
  color: var(--blue);
}

.support-option b {
  display: block;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
}

.support-option p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.support-option > .icon:last-child {
  width: 15px;
  height: 15px;
  margin-left: auto;
}

.toast {
  position: fixed;
  left: 24px;
  bottom: 24px;
  max-width: calc(100vw - 48px);
  padding: 13px 18px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.7;
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 100;
  box-shadow: var(--card-shadow);
}

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

body.sidebar-collapsed {
  --sidebar-width: 0px;
}

body.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
}

/* Navy surfaces keep dark mode consistent with the light dashboard. */
body.dark {
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: #334155;
  --surface: #1e293b;
  --background: #0f172a;
  --soft: #334155;
  --accent-soft: #1e3a5f;
  --accent-border: #3b82f6;
  --welcome-bg: #19346b;
  --tone-blue-ink: #93c5fd;
  --tone-blue-wash: #172b48;
  --tone-blue-line: #35547b;
  --tone-blue-chip: #223f65;
  --tone-teal-ink: #5eead4;
  --tone-teal-wash: #123335;
  --tone-teal-line: #285756;
  --tone-teal-chip: #1b4848;
  --tone-violet-ink: #c4b5fd;
  --tone-violet-wash: #2d2547;
  --tone-violet-line: #51436e;
  --tone-violet-chip: #43335e;
}

.dark .text-link,
.dark .wallet-button,
.dark .category-tab.active,
.dark .category-tab .category-count,
.dark .product-icon,
.dark .product-badge,
.dark .button-secondary,
.dark .status-chip,
.dark .transaction-balance b,
.dark .money-in,
.dark .money-out,
.dark .guide-grid article > .icon,
.dark .deposit-wallet-icon,
.dark .deposit-balance,
.dark .deposit-history-link,
.dark .order-detail-button,
.dark .amount-option.selected,
.dark .purchase-line.total b,
.dark .modal-error,
.dark .success-mark,
.dark .support-option > .icon {
  color: #93c5fd;
}

.dark .text-link:hover,
.dark .icon-button:hover,
.dark .footer a:hover {
  color: #bfdbfe;
}

.dark .home-announcement-notes p { color: #cbd5e1; }

/* Semantic status colors and dashboard details. */
.sidebar-bottom .online-dot { background: #22c55e; }
.money-in { color: var(--blue); }
.money-out { color: #ef4444; }
.dark .product-badge { color: #0f172a; }
.dark .avatar { color: #bfdbfe; background: #1e3a5f; border-color: #334155; }
.dark .modal-error,
.dark .money-out { color: #f87171; }

/* Forms and server-backed account states. */
.connection-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 24px;
  padding: 16px 18px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--accent-border);
  border-radius: 10px;
}

.connection-banner p {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.connection-banner .button {
  flex: 0 0 auto;
}

.catalog-loading td {
  padding: 34px 24px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.record-id {
  display: block;
  max-width: 24ch;
  overflow-wrap: anywhere;
}

.account-email {
  min-width: 0;
  overflow-wrap: anywhere;
}

.deposit-empty {
  padding: 8px 25px 25px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

#modal-deposit-form > .full-width {
  margin-top: 20px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form .modal-label {
  margin: 0 0 8px;
  font-size: 12px;
}

.auth-form .modal-input {
  width: 100%;
  padding: 12px;
  font-size: 16px;
}

.auth-form .modal-input[aria-invalid='true'] {
  border-color: #ef4444;
}

.auth-form .full-width {
  min-height: 44px;
}

.auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.auth-switch .text-link {
  min-height: 32px;
}

.auth-error,
.form-help {
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.auth-error {
  color: #dc2626;
}

.form-help {
  color: var(--muted);
}

.status-chip.pending {
  color: #854d0e;
  background: #fefce8;
  border-color: #fde68a;
}

.deposits-history {
  border-top: 1px solid var(--border);
}

.deposits-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 25px;
}

.deposits-history-heading h3 {
  font-size: 14px;
  font-weight: 600;
}

.deposits-history-heading .text-link {
  font-size: 11px;
}

.history-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 22px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}

.history-pagination .button {
  min-height: 36px;
}

.modal-button-busy {
  cursor: wait;
}

.dark .auth-error {
  color: #f87171;
}

.dark .status-chip.pending {
  color: #fde68a;
  background: #422d12;
  border-color: #854d0e;
}

@media (max-width: 620px) {
  .connection-banner {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .connection-banner .button {
    width: 100%;
  }

  .deposits-history-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 18px;
  }

  .history-pagination {
    justify-content: center;
    padding: 15px 18px;
  }

  .catalog-loading td {
    grid-column: 1 / -1;
    padding: 12px !important;
  }
}

/* Responsive layout */
@media (min-width: 1600px) {
  :root {
    --sidebar-width: 285px;
  }

  .sidebar {
    padding-right: 20px;
    padding-left: 20px;
  }

  .topbar {
    height: 84px;
    padding-right: 38px;
    padding-left: 38px;
  }

  main {
    padding: 32px 38px 0;
  }

  h1 {
    font-size: 23px;
  }

  .product-table td {
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .product-name {
    font-size: 13px;
  }

  .product-description {
    font-size: 10px;
  }

  .buy-button {
    height: 34px;
    font-size: 10px;
  }

  .nav-item {
    min-height: 48px;
    font-size: 13px;
  }
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 228px;
  }

  .sidebar {
    padding-right: 12px;
    padding-left: 12px;
  }

  .brand-card {
    margin-right: 5px;
    margin-left: 5px;
  }

  .brand-name {
    font-size: 20px;
  }

  .brand-caption {
    font-size: 7px;
  }

  .nav-item {
    gap: 10px;
    padding-left: 12px;
    font-size: 11px;
  }

  .topbar {
    gap: 12px;
    padding-right: 23px;
    padding-left: 23px;
  }

  .topbar-left {
    gap: 14px;
  }

  .topbar-right {
    gap: 11px;
  }

  main {
    padding: 24px 23px 0;
  }

  .product-table {
    min-width: 680px;
  }

  .product-table th:first-child,
  .product-table td:first-child {
    padding-left: 20px;
  }

  .product-table th:last-child,
  .product-table td:last-child {
    padding-right: 20px;
  }

  .product-table td,
  .product-table th {
    padding-right: 11px;
    padding-left: 11px;
  }

  .product-name {
    font-size: 11px;
  }

  .product-description {
    font-size: 8px;
  }

  .catalog-toolbar {
    gap: 10px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .category-tab {
    padding-right: 9px;
    padding-left: 9px;
  }

  .search-box {
    width: 180px;
  }

  .catalog-foot {
    padding-right: 20px;
    padding-left: 20px;
  }

  .guide-grid {
    gap: 12px;
    padding: 20px;
  }

  .guide-grid article {
    padding: 18px 15px;
  }

  .guide-grid h3 {
    font-size: 12px;
  }

  .guide-grid p {
    font-size: 10px;
  }
}

@media (max-width: 1000px) {
  .catalog-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }

  .category-tabs {
    align-self: flex-start;
  }

  .page-status {
    display: none;
  }

  h1 {
    font-size: 19px;
  }

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

  .guide-grid h3 {
    font-size: 14px;
  }

  .guide-grid p {
    font-size: 11px;
  }

  .guide-grid article > .icon {
    margin-bottom: 15px;
  }

  .deposit-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media (max-width: 800px) {
  :root {
    --sidebar-width: 0px;
  }

  .sidebar {
    width: 258px;
    padding: 23px 15px 24px;
    transform: translateX(-100%);
  }

  .brand-card {
    margin-right: 8px;
    margin-left: 8px;
  }

  .brand-name {
    font-size: 22px;
  }

  .brand-caption {
    font-size: 8px;
  }

  .nav-item {
    gap: 13px;
    min-height: 45px;
    font-size: 12px;
  }

  .topbar {
    height: 71px;
    padding-right: 21px;
    padding-left: 21px;
  }

  .topbar-right {
    gap: 12px;
  }

  main {
    padding: 23px 21px 0;
  }

  .page-top {
    margin-bottom: 21px;
  }

  .catalog-toolbar {
    align-items: center;
    flex-direction: row;
  }

  .search-box {
    width: 190px;
  }

  .scrim {
    position: fixed;
    inset: 0;
    background: #0f172a66;
    z-index: 45;
  }

  .sidebar-open .scrim {
    display: block;
  }

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

  body.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
  }

  .sidebar-open {
    overflow: hidden;
  }

  .floating-support {
    right: 20px;
    bottom: 20px;
  }

  .guide-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .guide-grid h3 {
    font-size: 12px;
  }

  .guide-grid p {
    font-size: 10px;
  }
}

@media (max-width: 620px) {
  .topbar {
    height: 66px;
    padding-right: 15px;
    padding-left: 15px;
  }

  .topbar-left {
    gap: 8px;
  }

  .topbar-right {
    gap: 7px;
  }

  .profile-name,
  .header-divider,
  .profile-button > .tiny-chevron {
    display: none;
  }

  .profile-button {
    margin-left: 3px;
  }

  .avatar {
    width: 32px;
    height: 32px;
    font-size: 10px;
  }

  .wallet-button {
    gap: 5px;
    height: 35px;
    padding: 0 8px;
    font-size: 10px;
  }

  .wallet-button .icon {
    width: 15px;
    height: 15px;
  }

  .wallet-plus {
    margin-left: 3px;
    padding-left: 7px;
    font-size: 14px;
  }

  .theme-toggle,
  .notification-button {
    width: 29px;
    height: 29px;
  }

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

  .notification-button .icon {
    width: 20px;
    height: 20px;
  }

  .menu-toggle {
    width: 30px;
    height: 30px;
  }

  .menu-toggle .icon {
    width: 23px;
    height: 23px;
  }

  main {
    padding: 22px 15px 0;
  }

  .breadcrumb {
    margin-bottom: 10px;
    font-size: 9px;
  }

  h1 {
    font-size: 18px;
    letter-spacing: -.4px;
  }

  .section-heading {
    align-items: flex-start;
    gap: 10px;
    padding: 22px 18px 18px;
  }

  .section-eyebrow {
    font-size: 7px;
  }

  .section-heading h2 {
    font-size: 18px;
  }

  .section-heading p {
    margin-top: 7px;
    font-size: 10px;
  }

  .home-announcement-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
    padding: 22px 18px;
  }

  .home-announcement h2 { font-size: 22px; }
  .home-announcement-eyebrow { font-size: 9px; }
  .home-announcement-notes { padding: 16px 14px; }
  .home-announcement-notes li { gap: 10px; padding: 13px 12px; }
  .home-announcement-footer { align-items: flex-start; flex-direction: column; padding: 15px 18px; }
  .home-announcement-footer > div { gap: 12px 20px; }
  .catalog-heading { padding: 22px 18px 18px; }
  .catalog-heading h2 { font-size: 18px; }

  .catalog-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 11px;
    padding: 0 18px 17px;
  }

  .category-tabs {
    justify-content: space-between;
    width: 100%;
  }

  .category-tab {
    height: 30px;
    padding: 0 8px;
    font-size: 9px;
  }

  .search-box {
    width: 100%;
    height: 35px;
  }

  .catalog {
    margin-top: 24px;
    scroll-margin-top: 82px;
  }

  .product-table {
    display: block;
    min-width: 0;
  }

  .product-table thead {
    display: none;
  }

  .product-table tbody {
    display: grid;
    grid-template-columns: 1fr;
  }

  .product-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 12px;
    padding: 20px 18px;
    border-top: 1px solid var(--border);
  }

  .product-table td {
    padding: 0 !important;
    border: 0;
    white-space: normal;
  }

  .product-table td:first-child {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .product-table td:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .product-table td:nth-child(3) {
    grid-column: 1;
    grid-row: 3;
  }

  .product-table td:nth-child(4) {
    grid-column: 2;
    grid-row: 3;
  }

  .product-table td:nth-child(5) {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  .product-table .country-cell {
    text-align: left;
  }

  .country-info {
    justify-content: flex-start;
  }

  .country-name {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    color: var(--muted);
    font-size: 12px;
  }

  .product-icon {
    width: 37px;
    height: 37px;
  }

  .product-info {
    align-items: flex-start;
    gap: 12px;
  }

  .product-name {
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    line-height: 1.7;
  }

  .product-description {
    margin-top: 4px;
    font-size: 9px;
    line-height: 1.8;
  }

  .product-badge {
    padding: 2px 3px;
    font-size: 6px;
  }

  .buy-button {
    width: 100%;
    height: 36px;
    padding: 0 8px;
    font-size: 11px;
  }

  .catalog-foot {
    padding: 10px 18px;
    font-size: 8px;
  }

  .catalog-foot > span:last-child {
    display: none;
  }

  .bottom-help {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 20px;
    padding: 15px;
  }

  .help-bubble {
    width: 32px;
    height: 32px;
  }

  .bottom-help b {
    font-size: 10px;
  }

  .bottom-help p {
    max-width: 220px;
    font-size: 9px;
    line-height: 1.8;
  }

  .bottom-help > .button {
    height: 33px;
    margin-left: 43px;
    padding: 0 12px;
    font-size: 9px;
  }

  .footer {
    flex-direction: column;
    gap: 12px;
    padding: 24px 0 80px;
    font-size: 9px;
  }

  .footer-separator {
    margin: 0 5px;
  }

  .floating-support {
    right: 16px;
    bottom: 18px;
  }

  .secondary-view .section-heading {
    padding: 22px 18px;
  }

  .secondary-view .section-heading > .button {
    height: 32px;
    margin-top: 17px;
    padding: 0 10px;
    font-size: 9px;
  }

  .transaction-balance {
    margin: 18px;
    padding: 18px;
  }

  .guide-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px;
  }

  .guide-grid article {
    padding: 20px;
  }

  .guide-grid h3 {
    font-size: 14px;
  }

  .guide-grid p {
    font-size: 11px;
  }

  .deposit-layout {
    gap: 19px;
    padding: 18px;
  }

  .deposit-form,
  .deposit-summary-card {
    padding: 20px;
  }

  .deposit-form h3 {
    font-size: 13px;
  }

  .deposit-form-description {
    font-size: 10px;
  }

  .deposit-wallet-icon {
    margin-bottom: 17px;
  }

  .deposit-balance {
    font-size: 26px;
  }

  .deposit-summary-description {
    font-size: 10px;
  }

  .deposit-history-link {
    margin-top: 18px;
  }

  .empty-search {
    padding: 35px 18px;
  }

  .empty-search > b {
    font-size: 12px;
  }

  .empty-search > p {
    font-size: 10px;
  }

  .order-detail-button {
    min-height: 32px;
  }

  .toast {
    bottom: 76px;
    font-size: 11px;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-header h2 {
    font-size: 17px;
  }

  #modal-content {
    padding: 20px;
  }

  .modal-muted {
    font-size: 11px;
  }

  .purchase-product b {
    font-size: 12px;
  }

  .success-title {
    font-size: 18px;
  }
}

@media (max-width: 620px) {
  .preview-pill {
    display: none;
  }
}

@media (max-width: 620px) {
  .product-name { font-size: 13px; }
  .product-description { font-size: 11px; }
  .product-badge { padding: 3px 5px; font-size: 8px; }
  .stock,
  .price { width: 100%; max-width: none; min-height: 66px; padding: 6px; }
  .section-heading p,
  .search-box input { font-size: 11px; }
  .category-tab { font-size: 10px; }
}

/* A single quiet header keeps catalog navigation separate from product rows. */
#catalog {
  --catalog-filter-background: #f1f5f9;
}

.dark #catalog {
  --catalog-filter-background: #182436;
}

#catalog .catalog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 22px 10px;
  background: var(--catalog-filter-background);
}

#catalog .catalog-heading-copy { min-width: 0; }
#catalog .catalog-heading h2 { font-size: 18px; }
#catalog .catalog-heading p { margin-top: 3px; font-size: 12px; }

#catalog .product-table-wrap {
  position: relative;
  overflow-x: auto;
}

#catalog .catalog-toolbar {
  align-items: stretch;
  flex-direction: column;
  gap: 0;
  padding: 0 22px 10px;
  background: var(--catalog-filter-background);
}

#catalog .category-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  align-self: stretch;
  gap: 0 14px;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

#catalog .category-tab {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  height: auto;
  min-height: 44px;
  padding: 10px 2px;
  gap: 7px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 500;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

#catalog .category-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
  content: '';
}

#catalog .category-tab:hover {
  color: var(--text);
  background: transparent;
}

#catalog .category-tab.active,
.dark #catalog .category-tab.active {
  color: var(--tone-blue-ink);
  background: transparent;
  border: 0;
  font-weight: 600;
  box-shadow: none;
}

#catalog .category-tab.active::after {
  background: var(--blue);
}

#catalog .category-tab:focus-visible {
  outline-offset: -2px;
}

#catalog .category-tab .category-count,
.dark #catalog .category-tab.active .category-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 0;
  height: auto;
  padding: 0;
  color: inherit;
  background: transparent;
  border-radius: 0;
  font-size: 11px;
  font-weight: 500;
  line-height: inherit;
  font-variant-numeric: tabular-nums;
  opacity: .75;
}

#catalog .search-box {
  align-self: center;
  flex: 0 0 270px;
  width: 270px;
  max-width: 100%;
  height: 38px;
}

#catalog .search-box input { font-size: 12px; }
#catalog .category-tab .tiktok-mark { width: 18px; height: 18px; }

@media (max-width: 620px) {
  #catalog .catalog-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 16px 16px 8px;
  }

  #catalog .catalog-toolbar { padding: 0 16px 8px; }
  #catalog .category-tabs { flex-direction: column; gap: 0; }

  #catalog .category-tab {
    justify-content: flex-start;
    width: 100%;
    min-height: 44px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
  }

  #catalog .category-tab:last-child { border-bottom-color: transparent; }
  #catalog .category-tab.active { border-bottom: 1px solid var(--border); }
  #catalog .category-tab::after { top: 10px; bottom: 10px; left: -8px; width: 2px; height: auto; }

  #catalog .search-box {
    align-self: stretch;
    flex-basis: auto;
    width: 100%;
    height: 44px;
  }
}


/* Local brand mark stays legible in both themes without image requests. */
.tiktok-mark {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  fill: none;
  stroke: none;
}

.product-icon.product-icon-tiktok {
  padding: 0;
  overflow: hidden;
  background: #111111;
  border-color: #111111;
  border-radius: 8px;
}

.product-icon-tiktok .tiktok-mark {
  width: 100%;
  height: 100%;
}

#catalog .category-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: inherit;
  background: transparent;
  border-radius: 0;
}

#catalog .category-icon .icon {
  width: 18px;
  height: 18px;
}

#catalog .category-label {
  flex: 0 1 auto;
  min-width: 0;
}

#catalog .category-count {
  margin-left: 0;
}

.dark #catalog .category-icon {
  color: inherit;
}

/* Lite storefront puts the catalog first while keeping store notices accessible. */
.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  color: #fff;
  background: #1d4ed8;
  border-radius: 8px;
  font-size: 14px;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }
.noscript-message {
  position: fixed;
  z-index: 999;
  top: 16px;
  right: 16px;
  left: 16px;
  padding: 16px 20px;
  color: #1e3a8a;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
}
.home-announcement-compact .home-announcement-header {
  gap: 14px;
  min-height: 88px;
  padding: 16px 20px;
}
.home-announcement-compact .home-announcement-header::after { display: none; }
.home-announcement-compact .home-announcement-intro { flex: 1; }
.home-announcement-compact h2 { font-size: 18px; line-height: 1.4; letter-spacing: -.25px; }
.home-announcement-compact .home-announcement-description { margin-top: 4px; font-size: 12px; line-height: 1.5; }
.store-intro-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  color: #a5f3fc;
  background: #ffffff12;
  border: 1px solid #ffffff24;
  border-radius: 9px;
}
.store-intro-icon .icon { width: 22px; height: 22px; }
.home-announcement-compact .store-notice-button {
  flex-shrink: 0;
  min-height: 40px;
  padding: 0 12px;
  color: #fff;
  background: #ffffff12;
  border: 1px solid #ffffff45;
  font-size: 12px;
}
.home-announcement-compact .store-notice-button:hover { background: #ffffff24; border-color: #a5f3fc; }
.home-announcement-compact .store-notice-button:focus-visible { outline-color: #a5f3fc; }
.home-announcement-compact + .catalog { margin-top: 20px; }

#catalog .catalog-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.stock-filter { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; cursor: pointer; }
.stock-filter input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.stock-filter input:focus-visible { outline-offset: 3px; }
.catalog-status { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; }
.catalog-results { font-variant-numeric: tabular-nums; }
.catalog-reset { min-height: 36px; font-size: 12px; }
.empty-search > .button { margin-top: 16px; }
.product-description {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.secondary-view .section-eyebrow { font-size: 10px; }
.secondary-view .section-heading p,
.secondary-view .deposit-form-description,
.secondary-view .deposit-summary-description,
.secondary-view .deposit-range,
.secondary-view .guide-grid p { font-size: 12px; line-height: 1.75; }
.secondary-view .guide-grid h3 { font-size: 14px; }
.secondary-view .guide-grid .text-link { font-size: 12px; }
.secondary-view .history-table th { font-size: 11px; }
.secondary-view .history-table td { min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
.secondary-view .history-table td small { font-size: 11px; }
.secondary-view .status-chip { font-size: 11px; }
.secondary-view .deposit-history-link,
.secondary-view .history-pagination,
.secondary-view .deposits-history-heading .text-link { font-size: 12px; }
.history-table .record-id { max-width: 100%; overflow-wrap: anywhere; }
#modal .purchase-line { min-width: 0; }
#modal .purchase-line > b { min-width: 0; overflow-wrap: anywhere; }
#modal .purchase-product-copy p { overflow-wrap: anywhere; white-space: normal; }

@media (max-width: 620px) {
  .topbar { gap: 8px; padding-right: 12px; padding-left: 12px; }
  .topbar-left { flex: 1; min-width: 0; gap: 4px; }
  .topbar-right { flex-shrink: 0; gap: 2px; }
  .topbar .menu-toggle,
  .topbar .theme-toggle,
  .topbar .notification-button { flex-shrink: 0; width: 44px; height: 44px; }
  .topbar .profile-button { display: grid; place-items: center; width: 44px; min-width: 44px; height: 44px; margin-left: 0; }
  .topbar .wallet-button { min-width: 0; max-width: 150px; height: 44px; padding: 0 8px; font-size: 11px; }
  .topbar .wallet-button > span:not(.wallet-plus) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .wallet-plus { display: none; }
  .home-announcement-compact .home-announcement-header { flex-direction: row; align-items: center; gap: 12px; min-height: 88px; padding: 14px 16px; }
  .home-announcement-compact .store-intro-icon { display: none; }
  .home-announcement-compact h2 { font-size: 16px; }
  .home-announcement-compact .home-announcement-description { font-size: 12px; }
  .home-announcement-compact .store-notice-button { width: 44px; height: 44px; min-height: 44px; padding: 0; }
  .store-notice-button > span { display: none; }
  #catalog .catalog-options { align-items: stretch; flex-direction: column; gap: 2px; }
  .stock-filter { min-height: 44px; }
  .catalog-status { justify-content: space-between; gap: 4px 12px; }
  .catalog-reset { min-height: 40px; }
  .buy-button { min-height: 44px; font-size: 12px; }
  .catalog-foot { font-size: 11px; line-height: 1.6; }
  .bottom-help b { font-size: 12px; }
  .bottom-help p { max-width: 250px; font-size: 11px; }
  .bottom-help > .button { min-height: 44px; font-size: 12px; }
  .footer { font-size: 11px; }
  .secondary-view .section-heading { flex-wrap: wrap; }
  .secondary-view .section-heading > .button { min-height: 44px; height: auto; margin-top: 0; padding: 10px 12px; font-size: 12px; }
  .secondary-view .section-heading p { font-size: 12px; }
  .secondary-view .guide-grid .text-link,
  .secondary-view .deposits-history-heading .text-link { min-height: 44px; }
  .secondary-view .deposit-form h3 { font-size: 15px; }
  .secondary-view .order-detail-button { min-height: 44px; font-size: 12px; }
  .secondary-view .history-pagination .button { min-height: 44px; }
  .secondary-view .modal-input,
  #modal:not(.purchase-dialog) .modal-input { min-height: 44px; font-size: 16px; }
  #modal:not(.purchase-dialog) .button,
  #modal:not(.purchase-dialog) .amount-option,
  #modal:not(.purchase-dialog) .modal-header .icon-button { min-height: 44px; }
  #modal:not(.purchase-dialog) .support-option p { font-size: 12px; }
  #modal:not(.purchase-dialog) .modal-muted { font-size: 12px; }

  .secondary-view .history-table-wrap { position: relative; overflow: visible; }
  .secondary-view .history-table { display: block; min-width: 0; width: 100%; }
  .secondary-view .history-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .secondary-view .history-table tbody { display: grid; gap: 12px; padding: 16px; }
  .secondary-view .history-table tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 16px; min-width: 0; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
  .secondary-view .history-table td { display: block; min-width: 0; padding: 0; border: 0; font-size: 12px; line-height: 1.6; white-space: normal; }
  .secondary-view .history-table td[data-label]::before { display: block; margin-bottom: 4px; color: var(--muted); content: attr(data-label); font-size: 10px; font-weight: 400; line-height: 1.5; }
  .secondary-view .history-table td small { font-size: 11px; }
  .secondary-view .history-table td:first-child { grid-column: 1/-1; }
  .secondary-view .orders-history td:nth-child(2),
  .secondary-view .orders-history td:last-child,
  .secondary-view .deposits-history-table td:last-child { grid-column: 1/-1; }
  .secondary-view .orders-history .order-detail-button { width: 100%; }
}

/* Purchase uses a compact layout; other dialogs keep their existing spacing. */
#modal.purchase-dialog {
  width: 480px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
}

.purchase-dialog .modal-header {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 12px 16px;
  background: var(--surface);
}

.purchase-dialog .modal-header h2 { font-size: 17px; line-height: 1.4; }
.purchase-dialog .modal-kicker { margin-bottom: 2px; font-size: 9px; line-height: 1.4; }
.purchase-dialog #modal-content { padding: 16px; }

.purchase-dialog .purchase-product {
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

.purchase-dialog .purchase-product .product-icon { width: 36px; height: 36px; }
.purchase-dialog .purchase-product-copy { flex: 1; min-width: 0; }
.purchase-dialog .purchase-product-copy summary { cursor: pointer; list-style: none; border-radius: 3px; }
.purchase-dialog .purchase-product-copy summary::-webkit-details-marker { display: none; }
.purchase-dialog .purchase-product-copy summary::marker { content: ''; }
.purchase-dialog .purchase-product-copy summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.purchase-dialog .purchase-product-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.purchase-dialog .purchase-product-copy[open] .purchase-product-name {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.purchase-dialog .purchase-product-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.purchase-dialog .purchase-product-toggle .icon { width: 11px; height: 11px; transform: rotate(90deg); }
.purchase-dialog .purchase-product-copy[open] .purchase-product-toggle .icon { transform: rotate(-90deg); }
.purchase-dialog .purchase-product-copy p { margin-top: 5px; font-size: 11px; line-height: 1.5; }

.purchase-dialog .purchase-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 170px);
  align-items: start;
  gap: 14px;
  margin-bottom: 12px;
}

.purchase-dialog .purchase-unit-price { min-width: 0; }
.purchase-dialog .purchase-unit-price > span { display: block; color: var(--muted); font-size: 11px; line-height: 1.5; }
.purchase-dialog .purchase-unit-price > b { display: block; margin-top: 10px; color: var(--text); font-size: 16px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.purchase-dialog .purchase-quantity { min-width: 0; margin: 0; }
.purchase-dialog .purchase-quantity .modal-label { margin: 0 0 5px; font-size: 11px; line-height: 1.5; }

.purchase-dialog #purchase-quantity {
  height: 40px;
  padding: 7px 75px 7px 10px;
  font-size: 16px;
  line-height: 24px;
}

.purchase-dialog #purchase-quantity::-webkit-inner-spin-button,
.purchase-dialog #purchase-quantity::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.purchase-dialog #purchase-quantity:focus-visible { outline: 2px solid var(--accent-border); outline-offset: 1px; }
.purchase-dialog .purchase-quantity .modal-input-wrap > span { right: 10px; font-size: 10px; }
.purchase-dialog .purchase-stock { margin-top: 4px; font-size: 10px; line-height: 1.5; }

.purchase-dialog .purchase-summary {
  padding: 8px 12px;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.purchase-dialog .purchase-summary .purchase-line { gap: 12px; padding: 3px 0; font-size: 11px; line-height: 1.5; }
.purchase-dialog .purchase-summary .purchase-line:first-child > span { color: var(--text); font-weight: 600; }
.purchase-dialog #purchase-wallet { color: var(--text); font-weight: 700; }
.purchase-dialog .purchase-summary .purchase-line.total { margin-top: 4px; padding-top: 7px; }
.purchase-dialog .purchase-summary .purchase-line.total > span { color: var(--text); font-size: 12px; font-weight: 500; }
.purchase-dialog .purchase-summary .purchase-line.total b { font-size: 21px; line-height: 1.3; }
.purchase-dialog .purchase-summary .purchase-line.remaining,
.purchase-dialog .purchase-summary .purchase-line.remaining b { font-size: 10px; }

.purchase-dialog .purchase-feedback {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.purchase-dialog .purchase-feedback .modal-error { flex: 1; min-width: 0; margin: 9px 0 0; font-size: 11px; line-height: 1.5; }
.purchase-dialog .purchase-feedback .purchase-deposit { flex-shrink: 0; margin-top: 9px; font-size: 11px; line-height: 1.5; }

/* Bank transfer checkout: keep the amount, payee and status easy to compare. */
.recharge-steps { display:flex; gap:28px; padding:0 0 22px; margin:0 0 24px; border-bottom:1px solid var(--border); list-style:none; }
.recharge-steps li { display:flex; align-items:center; gap:9px; color:var(--muted); font-size:12px; }
.recharge-steps li>span { display:grid; place-items:center; width:26px; height:26px; border:1px solid var(--border); border-radius:8px; background:var(--soft); font-size:11px; font-weight:600; }
.recharge-steps .current { color:var(--blue); font-weight:600; }
.recharge-steps .current>span { color:var(--blue); background:var(--accent-soft); border-color:var(--accent-border); }
.recharge-bank-area { margin:10px 0 24px; }
.recharge-mode-note { padding:12px 15px; margin-bottom:22px; border:1px solid var(--accent-border); border-radius:8px; background:var(--accent-soft); color:var(--blue); font-size:12px; line-height:1.8; }
.recharge-bank { display:flex; align-items:center; gap:12px; min-width:0; padding:15px; border:1px solid var(--accent-border); border-radius:10px; background:var(--accent-soft); }
label.recharge-bank { cursor:pointer; }
.recharge-bank>input { width:16px; height:16px; margin:0; accent-color:var(--blue); flex-shrink:0; }
.recharge-bank>span:not(.recharge-bank-icon):not(.recharge-bank-check) { flex:1; min-width:0; }
.recharge-bank b { display:block; font-size:14px; font-weight:600; }
.recharge-bank small { display:block; margin-top:5px; color:var(--muted); font-size:11px; line-height:1.5; overflow-wrap:anywhere; }
.recharge-bank-icon { display:grid; place-items:center; width:38px; height:38px; flex-shrink:0; border:1px solid var(--border); border-radius:9px; color:var(--blue); background:var(--surface); }
.recharge-bank-icon>.icon { width:21px; height:21px; }
.recharge-bank-check { color:var(--blue); margin-left:auto; }
.recharge-bank-check>.icon { width:18px; height:18px; }
.recharge-bank-unconfigured { border-color:var(--border); background:var(--soft); }
.recharge-bank-summary { margin-bottom:18px; }

/* Deposit uses one outer gutter instead of stacking padding across panels. */
#deposit-view { padding: 18px 22px 20px; }
#deposit-view > .section-heading { padding: 0 0 14px; border-bottom: 0; }
#deposit-view .section-eyebrow { margin-bottom: 4px; }
#deposit-view .section-heading h2 { font-size: 20px; }
#deposit-view .section-heading p { margin-top: 4px; }
#deposit-view .recharge-steps { gap: 22px; margin: 0 0 12px; padding: 0 0 12px; }
#deposit-view .recharge-mode-note { margin: 0 0 16px; padding: 10px 12px; line-height: 1.6; }
#deposit-view .deposit-layout { grid-template-columns: minmax(0, 1fr) minmax(240px, .6fr); gap: 20px; padding: 0; }
#deposit-view .deposit-form { padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
#deposit-view .deposit-form h3 { font-size: 14px; font-weight: 600; }
#deposit-view .deposit-form-description { margin-top: 4px; line-height: 1.6; }
#deposit-view .deposit-form .modal-label { margin: 16px 0 6px; }
#deposit-view .recharge-bank-area { margin: 6px 0 0; }
#deposit-view .recharge-bank { padding: 12px; }
#deposit-view .deposit-form .modal-input { height: 44px; }
#deposit-view .deposit-form .full-width { min-height: 44px; margin-top: 14px; }
#deposit-view .deposit-range { margin-top: 6px; line-height: 1.6; }
#deposit-view .deposit-summary-card { padding: 18px; box-shadow: none; }
#deposit-view .deposit-wallet-icon { width: 34px; height: 34px; margin-bottom: 12px; }
#deposit-view .deposit-balance-label { color: var(--text); font-weight: 500; }
#deposit-view .deposit-balance { margin-top: 4px; }
#deposit-view .deposit-summary-description { margin-top: 10px; }
#deposit-view .deposit-history-link { margin-top: 12px; }
#deposit-view .deposits-history { margin-top: 20px; }
#deposit-view .deposits-history-heading { padding: 14px 0; }
#deposit-view .empty-state { padding: 24px 12px; }
.dark #deposit-view .recharge-mode-note,
.dark #deposit-view .recharge-steps .current,
.dark #deposit-view .recharge-steps .current > span,
.dark #deposit-view .recharge-bank-icon,
.dark #deposit-view .recharge-bank-check { color: var(--tone-blue-ink); }

@media (max-width: 1000px) {
  #deposit-view .deposit-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

@media (max-width: 620px) {
  #deposit-view { padding: 16px; }
  #deposit-view > .section-heading { padding-bottom: 12px; }
  #deposit-view .recharge-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; padding-bottom: 12px; }
  #deposit-view .recharge-steps li { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 11px; line-height: 1.5; }
  #deposit-view .recharge-mode-note { margin-bottom: 14px; }
  #deposit-view .deposit-form .amount-option { height: 44px; }
  #deposit-view .deposit-form .modal-input { font-size: 16px; }
  #deposit-view .deposit-summary-card { padding: 16px; }
}

.payment-view { max-width:1040px; margin:0 auto; }
.payment-back { display:inline-flex; align-items:center; min-height:40px; margin-bottom:12px; color:var(--muted); font-size:12px; }
.payment-back:hover { color:var(--blue); }
.payment-heading { margin-bottom:24px; }
.payment-heading h2 { font-size:24px; line-height:1.35; letter-spacing:-.6px; }
.payment-heading p { margin-top:8px; font-size:13px; line-height:1.6; color:var(--muted); }
.payment-card { border:1px solid var(--border); border-radius:12px; background:var(--surface); box-shadow:var(--card-shadow); overflow:hidden; }
.payment-card-header { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:20px 28px; border-bottom:1px solid var(--border); }
.payment-card-header>div { display:flex; align-items:center; gap:12px; flex-wrap:wrap; min-width:0; }
.payment-order-label { color:var(--muted); font-size:12px; }
.payment-card-header b { font-size:12px; font-weight:600; letter-spacing:.4px; overflow-wrap:anywhere; }
.payment-status { display:inline-flex; align-items:center; width:max-content; max-width:100%; padding:6px 10px; border-radius:6px; background:var(--soft); color:var(--muted); font-size:11px; font-weight:600; line-height:1.4; white-space:nowrap; }
.payment-status-waiting { color:#1d4ed8; background:#eff6ff; }
.payment-status-paid { color:#047857; background:#ecfdf5; }
.payment-status-review { color:#b91c1c; background:#fef2f2; }
.payment-status-preview { color:#6d28d9; background:#f5f3ff; }
.payment-card-body { display:grid; grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr); }
.payment-information { min-width:0; padding:30px 28px; border-right:1px solid var(--border); background:var(--soft); }
.payment-total { display:flex; flex-direction:column; align-items:flex-start; padding-bottom:24px; margin-bottom:22px; border-bottom:1px solid var(--border); }
.payment-total>span { font-size:12px; color:var(--muted); }
.payment-total strong { margin-top:8px; font-size:32px; font-weight:700; line-height:1.4; letter-spacing:-1px; font-variant-numeric:tabular-nums; color:var(--blue); }
.payment-total small { margin-top:6px; font-size:11px; color:var(--muted); }
.payment-bank-name { display:flex; align-items:center; gap:12px; margin-bottom:22px; }
.payment-bank-name span:not(.recharge-bank-icon) { display:block; font-size:11px; color:var(--muted); }
.payment-bank-name b { display:block; margin-top:5px; font-size:14px; font-weight:600; }
.payment-detail { display:block; margin:18px 0; }
.payment-detail>label,.payment-detail>span { display:block; margin:0 0 8px; font-size:11px; font-weight:400; color:var(--muted); }
.payment-detail>b { display:block; font-size:13px; font-weight:600; line-height:1.6; overflow-wrap:anywhere; }
.payment-copy-row { display:flex; align-items:center; gap:6px; min-width:0; background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:4px; }
.payment-copy-row>input { min-width:0; width:100%; flex:1; padding:8px 6px; border:0; background:transparent; border-radius:5px; color:var(--text); font-size:14px; font-weight:600; font-variant-numeric:tabular-nums; }
.payment-copy-row .payment-copy { flex-shrink:0; min-height:34px; padding:7px 9px; border:1px solid var(--border); background:var(--soft); color:var(--muted); font-size:10px; font-weight:500; }
.payment-copy:hover { color:var(--blue); background:var(--accent-soft); }
.payment-memo .payment-copy-row { border-color:var(--accent-border); }
.payment-memo input { font-family:ui-monospace,monospace; font-size:12px; color:var(--blue); }
.payment-timestamps { display:grid; gap:9px; margin-top:24px; padding-top:20px; border-top:1px solid var(--border); }
.payment-timestamps>span { display:flex; justify-content:space-between; gap:12px; font-size:10px; line-height:1.6; color:var(--muted); }
.payment-timestamps b { font-weight:400; color:var(--text); text-align:right; }
.payment-qr-panel { display:flex; flex-direction:column; align-items:center; min-width:0; padding:30px 28px; text-align:center; }
.payment-qr-panel>h3 { font-size:20px; letter-spacing:-.4px; line-height:1.45; }
.payment-mobile-amount { display:none; }
.payment-qr-panel>p { max-width:350px; margin:10px 0 0; font-size:12px; line-height:1.8; color:var(--muted); }
.payment-qr { width:100%; max-width:306px; margin:24px 0 0; padding:10px; background:#fff; border:1px solid #e2e8f0; border-radius:10px; }
.payment-qr img { display:block; width:100%; height:auto; aspect-ratio:1; }
.payment-qr figcaption { padding:8px 0 6px; color:#475569; font-size:10px; line-height:1.5; }
.payment-download { display:inline-flex; align-items:center; min-height:40px; margin-top:8px; color:var(--blue); font-size:12px; font-weight:500; }
.payment-qr-placeholder { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; width:100%; max-width:306px; min-height:262px; margin:24px 0 12px; padding:28px 18px; border:1px dashed var(--border); border-radius:10px; background:var(--soft); }
.payment-qr-placeholder>span { display:grid; place-items:center; width:54px; height:54px; border:1px solid var(--border); border-radius:12px; color:var(--muted); background:var(--surface); }
.payment-qr-placeholder .icon { width:27px; height:27px; }
.payment-qr-placeholder>b { font-size:14px; line-height:1.5; font-weight:600; }
.payment-qr-placeholder>small { font-size:11px; line-height:1.8; color:var(--muted); }
.payment-completed { border-color:#a7f3d0; background:#f0fdf4; }
.payment-completed>span { background:#dcfce7; color:#047857; border-color:#a7f3d0; }
.payment-card-footer { display:flex; align-items:center; justify-content:space-between; gap:22px; padding:20px 28px; border-top:1px solid var(--border); }
.payment-card-footer>p { display:flex; align-items:flex-start; gap:8px; max-width:320px; color:var(--muted); font-size:10px; line-height:1.8; }
.payment-card-footer>p>.icon { flex-shrink:0; width:16px; height:16px; }
.payment-card-footer>div { display:flex; gap:10px; flex-shrink:0; }
.payment-card-footer .button { min-height:42px; padding:9px 14px; font-size:11px; }
.payment-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; min-height:320px; padding:32px 24px; text-align:center; border:1px solid var(--border); border-radius:12px; background:var(--surface); }
.payment-empty h3 { font-size:17px; }
.payment-empty p { font-size:12px; line-height:1.8; color:var(--muted); max-width:420px; }
.payment-empty-icon { color:var(--muted); }
.payment-empty-icon>.icon { width:30px; height:30px; }
.dark .payment-status-waiting { color:#93c5fd; background:#172f52; }
.dark .payment-status-paid { color:#6ee7b7; background:#173b35; }
.dark .payment-status-review { color:#fca5a5; background:#482c34; }
.dark .payment-status-preview { color:#c4b5fd; background:#352b50; }
.dark .payment-completed { background:#173b35; border-color:#295c4e; }
.dark .payment-completed>span { color:#6ee7b7; background:#1d473c; border-color:#295c4e; }
@media(max-width:1050px) {
  .payment-card-body { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .payment-information,.payment-qr-panel { padding:26px 20px; }
  .payment-card-header,.payment-card-footer { padding:18px 20px; }
  .payment-card-footer { align-items:flex-start; flex-direction:column; gap:14px; }
  .recharge-steps { gap:16px; }
}
@media(max-width:600px) {
  .recharge-steps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:20px; padding-bottom:18px; }
  .recharge-steps li { flex-direction:column; align-items:flex-start; gap:8px; font-size:10px; line-height:1.6; }
  .recharge-bank { padding:12px; gap:9px; }
  .recharge-bank b { font-size:13px; }
  .recharge-bank small { font-size:10px; }
  .payment-heading h2 { font-size:22px; }
  .payment-heading p { font-size:12px; }
  .payment-card-body { display:flex; flex-direction:column; }
  .payment-qr-panel { order:-1; padding:24px 18px; }
  .payment-mobile-amount { display:flex; flex-direction:column; gap:5px; margin-top:18px; }
  .payment-mobile-amount>span { font-size:10px; color:var(--muted); }
  .payment-mobile-amount>b { font-size:27px; letter-spacing:-.7px; color:var(--blue); font-variant-numeric:tabular-nums; }
  .payment-information { border-right:0; border-top:1px solid var(--border); padding:24px 18px; }
  .payment-card-header { padding:16px; gap:10px; }
  .payment-card-header>div { gap:5px; flex-direction:column; align-items:flex-start; }
  .payment-status { font-size:10px; padding:6px 8px; }
  .payment-total strong { font-size:29px; }
  .payment-copy-row>input { font-size:16px; }
  .payment-memo input { font-size:13px; }
  .payment-copy-row .payment-copy { min-height:40px; }
  .payment-card-footer { padding:18px; }
  .payment-card-footer>div { width:100%; flex-shrink:1; flex-wrap:wrap; }
  .payment-card-footer .button { flex:1; min-height:44px; font-size:11px; }
  .payment-card-footer>p { max-width:none; }
  .payment-qr-placeholder { min-height:230px; }
}

.purchase-dialog .purchase-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  gap: 8px;
  margin: 12px -16px -16px;
  padding: 12px 16px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.purchase-dialog .purchase-actions .button { min-width: 0; height: 40px; padding: 0 10px; font-size: 12px; }
.purchase-dialog .purchase-actions .button-secondary { flex: 0 0 28%; }
.purchase-dialog .purchase-actions .button-primary { flex: 1; }
.purchase-dialog .purchase-actions .icon { width: 15px; height: 15px; }

@media (max-width: 420px) {
  .purchase-dialog .purchase-entry { grid-template-columns: minmax(0, 1fr) 150px; gap: 10px; }
  .purchase-dialog #purchase-quantity { height: 42px; padding-top: 8px; padding-bottom: 8px; }
  .purchase-dialog .purchase-unit-price > b { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Order state remains explicit when a supplier response needs reconciliation. */
.status-chip.order-status {
  color: var(--muted);
  background: var(--soft);
  border-color: var(--border);
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.4;
}
.status-chip.order-status-pending,
.status-chip.order-status-processing {
  color: var(--tone-blue-ink);
  background: var(--tone-blue-wash);
  border-color: var(--tone-blue-line);
}
.status-chip.order-status-review {
  color: var(--tone-violet-ink);
  background: var(--tone-violet-wash);
  border-color: var(--tone-violet-line);
}
.status-chip.order-status-fulfilled {
  color: var(--tone-teal-ink);
  background: var(--tone-teal-wash);
  border-color: var(--tone-teal-line);
}
.status-chip.order-status-failed { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.dark .status-chip.order-status-failed { color: #fca5a5; background: #401e27; border-color: #7f3540; }
.order-result-status { margin: 0 0 12px; }
#modal .order-state-description { margin: 8px 0 14px; }
.order-delivery { margin: 18px 0; }
.order-delivery .modal-muted { margin: 5px 0 10px; font-size: 12px; line-height: 1.6; }
#modal .delivered-accounts {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 110px;
  max-height: 280px;
  margin-bottom: 10px;
  padding: 12px;
  overflow: auto;
  resize: vertical;
  color: var(--text);
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  font: 13px/1.65 ui-monospace, Menlo, Monaco, monospace;
  white-space: pre;
}
#modal .delivered-accounts:focus-visible { outline: 2px solid var(--accent-border); outline-offset: 2px; }
@media (max-width: 620px) {
  #modal .delivered-accounts { font-size: 16px; }
  .order-delivery > .button { min-height: 44px; }
}
