:root {
  color-scheme: dark;
  --product-image-ratio: 750 / 1000;
  --bg: #000;
  --ink: #ededed;
  --muted: #8f8f8f;
  --soft: #b5b5b5;
  --line: #242424;
  --line-strong: #333;
  --panel: #0a0a0a;
  --panel-2: #151515;
  --panel-3: #111;
  --green: #3dd68c;
  --blue: #3291ff;
  --amber: #f5a623;
  --red: #ff5c5c;
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist Sans", Geist, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

body.admin-pending .shell {
  visibility: hidden;
}

button {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: #000;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

button:hover {
  background: #eaeaea;
  transform: translateY(-1px);
}

button:disabled {
  cursor: progress;
  opacity: 0.72;
  transform: none;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 999px;
  border-color: var(--line-strong);
  background: #0a0a0a;
  color: var(--soft);
  font-size: 15px;
  line-height: 1;
}

.icon-button:hover {
  border-color: #4a4a4a;
  background: #111;
  color: var(--ink);
  transform: none;
}

.icon-button.loading {
  animation: spin 800ms linear infinite;
}

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

.shell {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.topbar,
.rate-strip,
.panel-heading,
.kpi-grid,
.dashboard-grid {
  display: grid;
  gap: 16px;
}

.topbar {
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px;
  margin-bottom: 30px;
}

.topbar-content {
  min-width: 0;
}

.topbar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 28px;
  margin-bottom: 14px;
}

.group-picker {
  position: relative;
  width: fit-content;
}

.group-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  background: #0a0a0a;
  color: var(--soft);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}

.group-button:hover {
  border-color: #4a4a4a;
  background: #111;
  color: var(--ink);
  transform: none;
}

.group-button[aria-expanded="true"] {
  border-color: #555;
  background: #111;
  color: var(--ink);
}

.chevron {
  color: var(--muted);
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.group-menu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #080808;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.group-option {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--soft);
  font-size: 12px;
  font-weight: 400;
  text-align: left;
}

.group-option:last-child {
  border-bottom: 0;
}

.group-option:hover,
.group-option.active {
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  transform: none;
}

.group-option strong {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(28px, 5vw, 56px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 520;
}

h2 {
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 520;
}

.updated-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.updated-meta strong {
  color: var(--soft);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.notice {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 0;
  padding: 0;
  margin: -12px 0 26px;
  font-size: 12px;
}

.order-shell .notice {
  position: fixed;
  top: auto;
  bottom: 40px;
  left: 50%;
  z-index: 120;
  width: min(420px, calc(100vw - 32px));
  transform: translateX(-50%);
  border: 1px solid var(--line-strong);
  background: rgba(10, 10, 10, 0.96);
  color: var(--ink);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 0;
  box-shadow: var(--shadow);
  text-align: center;
}

.order-shell .notice[data-tone="success"] {
  color: var(--ink);
}

.order-shell .notice[data-tone="error"] {
  color: var(--ink);
}

.eyebrow,
.small-meta,
.product-meta,
.form-message {
  color: var(--muted);
  font-size: 12px;
}

.text-link {
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.text-link:hover {
  color: var(--ink);
}

.order-shell {
  width: min(1320px, calc(100vw - 40px));
}

.catalog-back-button {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #0a0a0a;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.catalog-back-button:hover {
  border-color: #4a4a4a;
  background: #111;
  color: var(--ink);
}

.order-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 16px;
  margin-bottom: 38px;
}

.order-hero h1,
.login-card h1 {
  margin-top: 10px;
}

.order-hero h1 {
  letter-spacing: normal;
}

.order-subcopy,
.login-card p {
  max-width: 520px;
  margin-top: 14px;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.55;
}

.order-layout {
  display: block;
}

.promo-banner {
  margin: 0 0 28px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--soft);
  font-size: 13px;
  font-weight: 500;
}

.closed-group-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.closed-group-banner[hidden] {
  display: none;
}

.closed-group-banner strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.closed-group-banner p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.closed-group-banner .secondary-link-button {
  flex: 0 0 auto;
  width: auto;
  padding: 10px 14px;
  white-space: nowrap;
}

body.is-closed-group {
  min-height: 100vh;
}

body.is-closed-group .order-shell {
  min-height: 100vh;
  display: grid;
  align-content: center;
}

body.is-closed-group .order-hero,
body.is-closed-group #orderNotice,
body.is-closed-group #promoBanner,
body.is-closed-group #orderLayout,
body.is-closed-group #cartButton {
  display: none;
}

body.is-closed-group .closed-group-banner {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 24px;
}

body.is-closed-group .closed-group-banner strong {
  font-size: 24px;
  letter-spacing: 0;
}

body.is-closed-group .closed-group-banner p {
  margin-top: 8px;
  font-size: 15px;
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.7fr);
  align-items: start;
  gap: 28px;
}

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

.section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.catalog-footer {
  display: flex;
  justify-content: flex-start;
  padding: 28px 0 0;
}

.brand-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.brand-filter-button {
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--soft);
  font-size: 12px;
  cursor: pointer;
  transition: none;
}

.brand-filter-button:hover {
  border-color: #4a4a4a;
  background: #111;
  color: var(--ink);
}

.brand-filter-button.active {
  background: var(--ink);
  color: #000;
  border-color: var(--ink);
}

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

.product-card,
.order-panel,
.login-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px;
}

.product-media {
  position: relative;
  display: grid;
  place-items: center;
  align-self: center;
  width: 100%;
  aspect-ratio: var(--product-image-ratio);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #050505;
}

.product-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  background: #fff;
}

.product-placeholder {
  color: #444;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 28px;
  font-weight: 560;
}

.product-info {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px;
}

.product-info h3 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
  font-weight: 520;
}

.product-info strong,
.cart-total strong,
.cart-item em {
  color: var(--ink);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.option-group {
  display: grid;
  gap: 7px;
}

.option-group > span,
.cart-total span,
.order-form label span {
  color: var(--muted);
  font-size: 12px;
}

.option-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: 6px;
}

.option-button,
.secondary-button {
  min-height: 28px;
  border-color: var(--line);
  background: transparent;
  color: var(--soft);
  font-size: 12px;
}

.option-button {
  position: relative;
  height: 28px;
  min-height: 28px;
  overflow: hidden;
}

.product-card > .secondary-button {
  flex: 0 0 48px;
  height: 48px;
  min-height: 48px;
  margin-top: auto;
  padding: 0 16px;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.option-button:hover,
.secondary-button:hover {
  border-color: #4a4a4a;
  background: #111;
  color: var(--ink);
  transform: none;
}

.option-button.active {
  background: var(--ink);
  color: #000;
  border-color: var(--ink);
}

.option-button.unavailable {
  color: #666;
  border-color: #242424;
  background: transparent;
}

.option-button.unavailable::after {
  content: "";
  position: absolute;
  inset: 5px 8px;
  background: linear-gradient(
    to bottom right,
    transparent calc(50% - 0.5px),
    currentColor 50%,
    transparent calc(50% + 0.5px)
  );
  opacity: 0.85;
  pointer-events: none;
}

.option-button.unavailable:hover {
  color: #777;
  border-color: #303030;
  background: transparent;
}

.secondary-button:disabled {
  cursor: not-allowed;
  color: #666;
  border-color: #242424;
  background: transparent;
}

.order-panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 16px;
  padding: 16px;
}

.cart-items {
  display: grid;
  gap: 10px;
}

.cart-item,
.empty-cart,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.015);
}

.cart-item {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.cart-item div:first-child {
  display: grid;
  gap: 4px;
}

.cart-item strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 520;
}

.cart-item span,
.empty-cart,
.empty-state {
  color: var(--muted);
  font-size: 12px;
}

.empty-cart,
.empty-state {
  padding: 12px;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-control button {
  min-height: 26px;
  padding: 0 9px;
  border-color: var(--line);
  background: transparent;
  color: var(--soft);
  font-size: 12px;
}

.qty-control button:hover {
  background: #111;
  color: var(--ink);
  transform: none;
}

.cart-total,
.summary-lines div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.summary-lines {
  display: grid;
  gap: 9px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.summary-lines span {
  color: var(--muted);
  font-size: 12px;
}

.summary-lines strong {
  color: var(--soft);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 520;
}

.cart-total {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.order-form {
  display: grid;
  gap: 12px;
}

.order-form label {
  display: grid;
  gap: 7px;
}

.order-form input,
.order-form textarea,
.order-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #050505;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  padding: 9px 10px;
  outline: none;
}

.order-form input:focus,
.order-form textarea:focus,
.order-form select:focus {
  border-color: #555;
}

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

.discount-field .secondary-button {
  min-height: 38px;
  padding: 0 14px;
  border-color: var(--line);
  background: transparent;
  color: var(--soft);
}

.discount-field .secondary-button:hover {
  border-color: #4a4a4a;
  background: #111;
  color: var(--ink);
}

.checkbox-field {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.checkbox-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--ink);
}

.checkbox-field span {
  color: var(--soft);
  font-size: 13px;
}

.conditional-fields {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.015);
}

.conditional-fields[hidden] {
  display: none;
}

.primary-button {
  width: 100%;
}

.link-button {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: #000;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.link-button[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.5;
}

.checkout-summary {
  position: static;
}

.success-shell {
  width: min(680px, calc(100vw - 40px));
}

.success-panel {
  position: static;
  gap: 18px;
}

.success-panel .panel-heading p {
  margin-top: 8px;
  color: var(--ink);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 22px;
  font-weight: 560;
}

.success-details,
.success-lines {
  display: grid;
  gap: 12px;
}

.success-lines {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.success-lines div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.success-lines span {
  color: var(--muted);
  font-size: 12px;
}

.success-lines strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 520;
  text-align: right;
}

.success-items {
  margin-top: 2px;
}

.success-actions {
  display: grid;
  gap: 10px;
}

.secondary-link-button {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--soft);
  font-size: 13px;
  font-weight: 500;
  padding: 12px 14px;
  text-decoration: none;
}

.success-actions .link-button {
  padding-top: 12px;
  padding-bottom: 12px;
}

.secondary-link-button:hover {
  border-color: #4a4a4a;
  color: var(--ink);
}

.checkout-cart-item {
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
}

.checkout-cart-item img {
  width: 58px;
  height: 72px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #050505;
}

.checkout-cart-item > div:not(.qty-control) {
  display: grid;
  gap: 4px;
}

.checkout-cart-item .qty-control {
  grid-column: 2;
}

.empty-cart a {
  color: var(--ink);
}

.floating-cart-button {
  position: fixed;
  z-index: 20;
  top: 18px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px 14px;
  border-color: var(--line-strong);
  background: #0a0a0a;
  color: var(--ink);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.42);
}

.floating-cart-button:hover {
  border-color: #4a4a4a;
  background: #111;
  color: var(--ink);
  transform: none;
}

.floating-cart-button strong {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--ink);
  color: #000;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 560;
}

.modal-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  justify-items: end;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.58);
}

.modal-backdrop[hidden] {
  display: none;
}

.cart-modal {
  width: min(420px, calc(100vw - 24px));
  height: calc(100vh - 52px);
  height: calc(100dvh - 52px);
  max-height: calc(100dvh - 52px);
  margin: 12px 12px 40px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050505;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
}

.product-option-backdrop {
  place-items: center;
  justify-items: center;
  padding: 20px;
}

.product-option-modal {
  width: min(440px, 100%);
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050505;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
}

.option-modal-product {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.option-modal-media {
  position: relative;
  aspect-ratio: var(--product-image-ratio);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #050505;
}

.option-modal-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  background: #fff;
}

.option-modal-info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.option-modal-info strong {
  color: var(--ink);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 15px;
  font-weight: 560;
}

#productOptionContent {
  display: grid;
  gap: 16px;
}

.option-confirm-button {
  width: 100%;
  height: 48px;
  min-height: 48px;
  margin-top: 2px;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.cart-modal .cart-items {
  overflow: auto;
  align-content: start;
  padding-right: 2px;
}

.modal-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.modal-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 0;
}

.login-card {
  width: min(420px, 100%);
  padding: 22px;
}

.login-card .order-form {
  margin-top: 16px;
}

.form-message {
  min-height: 18px;
}

.skeleton-card {
  min-height: 420px;
  position: relative;
  overflow: hidden;
  background: #0b0b0b;
}

.skeleton-card::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: shimmer 1.2s infinite;
}

.rate-strip {
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  border-radius: 8px;
  padding: 0;
  margin-bottom: 28px;
  overflow: hidden;
}

.rate-strip div {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-left: 1px solid var(--line);
}

.rate-strip div:first-child {
  border-left: 0;
}

.rate-strip span,
.kpi span,
.panel-heading p {
  color: var(--muted);
  font-size: 12px;
}

.rate-strip strong {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.kpi-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 40px;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.kpi,
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.kpi {
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 10px 18px;
  align-content: center;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.006));
}

.kpi:first-child {
  border-left: 0;
}

.kpi strong {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(24px, 4vw, 36px);
  line-height: 1;
  font-weight: 520;
  letter-spacing: -0.04em;
}

.kpi.accent {
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.006));
}

.dashboard-grid {
  grid-template-columns: 1.25fr 0.75fr;
  align-items: start;
  gap: 46px 16px;
}

.panel {
  padding: 0;
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.chart-panel {
  background: transparent;
  background-size: 40px 40px;
}

.panel.wide {
  grid-column: 1 / -1;
}

.panel:last-child {
  grid-column: 1 / -1;
}

.panel-heading {
  gap: 4px;
  margin-bottom: 12px;
}

.split-heading {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.view-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  width: fit-content;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.view-tab {
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.view-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  transform: none;
}

.view-tab.active {
  background: var(--ink);
  color: #000;
}

.bar-chart {
  display: grid;
  gap: 18px;
}

.profit-story {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
}

.story-block {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.24);
  border-radius: 0;
  padding: 16px;
  box-shadow: none;
}

.story-block:first-child {
  border-radius: 8px 0 0 8px;
}

.story-block:last-child {
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.story-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.story-heading span,
.comparison-labels,
.legend-grid span {
  color: var(--muted);
  font-size: 12px;
}

.story-heading strong,
.legend-grid strong {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 520;
  font-variant-numeric: tabular-nums;
}

.stacked-meter,
.comparison-baseline {
  display: flex;
  height: 22px;
  border-radius: 5px;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.segment,
.comparison-baseline span {
  min-width: 2px;
  height: 100%;
  box-shadow: none;
}

.segment.cost,
.comparison-baseline .actual {
  background: var(--red);
}

.segment.shipping {
  background: var(--amber);
}

.segment.fee {
  background: var(--blue);
}

.segment.profit {
  background: var(--green);
}

.comparison-baseline .buffer {
  background: var(--amber);
}

.legend-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.legend-grid div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.legend-grid div span:last-of-type {
  flex: 1;
}

.legend-grid strong {
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.dot.cost {
  background: var(--red);
}

.dot.shipping {
  background: var(--amber);
}

.dot.fee {
  background: var(--blue);
}

.dot.profit {
  background: var(--green);
}

.comparison-meter {
  display: grid;
  gap: 10px;
}

.comparison-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.stack-list {
  display: grid;
  gap: 0;
}

.metric-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
  font-size: 12px;
}

.metric-head,
.metric-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.75fr) 44px minmax(128px, 1.25fr);
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-bottom: 1px solid var(--line);
}

.metric-head {
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 11px;
  font-weight: 520;
  text-transform: uppercase;
}

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

.metric-row {
  color: var(--soft);
}

.metric-table .number {
  text-align: right;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.metric-value {
  color: var(--ink);
  font-weight: 560;
}

.metric-table.revenue .metric-value {
  color: #7bb7ff;
}

.metric-table.profit .metric-value {
  color: var(--green);
}

.product-sales-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
  font-size: 12px;
}

.product-sales-group {
  border-bottom: 1px solid var(--line-strong);
}

.product-sales-group:last-child {
  border-bottom: 0;
}

.product-sales-summary,
.product-color-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  align-items: center;
  gap: 12px;
}

.product-sales-summary {
  min-height: 44px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.022);
  color: var(--ink);
  font-weight: 560;
}

.product-color-row {
  min-height: 34px;
  padding: 8px 12px 8px 28px;
  border-top: 1px solid var(--line);
  color: var(--soft);
}

.product-color-row span:first-child {
  color: var(--muted);
}

.product-sales-table .number {
  text-align: right;
  color: var(--ink);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 560;
}

.my-orders {
  display: grid;
  gap: 12px;
}

.personal-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
}

.personal-summary div {
  display: grid;
  gap: 5px;
  min-height: 74px;
  padding: 12px;
  align-content: center;
  border-left: 1px solid var(--line);
}

.personal-summary div:first-child {
  border-left: 0;
}

.personal-summary span {
  color: var(--muted);
  font-size: 12px;
}

.personal-summary strong {
  color: var(--ink);
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 20px;
  font-weight: 520;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.personal-table .metric-row,
.personal-table .metric-head {
  grid-template-columns: minmax(0, 1fr) 48px minmax(110px, 0.6fr);
}

.customer-row {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.customer-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.customer-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-weight: 520;
}

.mini-bars {
  display: grid;
  gap: 5px;
}

.mini-bars.single {
  gap: 0;
}

.mini-bar {
  height: 8px;
  background: var(--panel-2);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.mini-bar span {
  display: block;
  height: 100%;
  background: var(--green);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.015);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead {
  background: rgba(255, 255, 255, 0.025);
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 520;
  text-transform: uppercase;
}

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

td.number,
th.number {
  text-align: right;
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.order-summary-row td {
  border-top: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.018);
  color: var(--ink);
  font-weight: 560;
}

.order-summary-row:first-child td {
  border-top: 0;
}

.detail-row td {
  color: var(--muted);
  font-size: 12px;
  padding-top: 7px;
  padding-bottom: 7px;
  background: rgba(0, 0, 0, 0.16);
}

.detail-empty {
  color: #4a4a4a;
}

.detail-label {
  display: inline-flex;
  align-items: center;
  color: var(--soft);
  padding-left: 16px;
}

.detail-meta {
  display: block;
  padding-left: 16px;
  margin-top: 2px;
  color: #666;
  font-size: 11px;
}

.order-cell {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.count-pill {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 11px;
  font-weight: 500;
}

.skeleton-text,
.skeleton-line,
.skeleton-bar {
  display: inline-block;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: #171717;
  color: transparent;
}

.skeleton-text {
  width: 92px;
  height: 1em;
  vertical-align: -0.12em;
}

.skeleton-text.tiny {
  width: 24px;
}

.skeleton-text.amount {
  width: 72px;
}

.skeleton-text.row-name {
  width: 120px;
}

.skeleton-line {
  width: 100%;
  height: 14px;
  margin-bottom: 12px;
}

.skeleton-line.short {
  width: 34%;
}

.skeleton-line.medium {
  width: 58%;
}

.skeleton-bar {
  width: 100%;
  height: 34px;
  margin: 8px 0 18px;
}

.skeleton-text::after,
.skeleton-line::after,
.skeleton-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 820px) {
  .order-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .checkout-layout {
    grid-template-columns: 1fr;
  }

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

  .order-panel {
    position: static;
  }

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

  .topbar {
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 10px;
  }

  .updated-meta {
    margin-top: 0;
  }

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

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

  .kpi {
    min-height: 96px;
    padding: 10px 14px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .kpi:nth-child(1),
  .kpi:nth-child(2) {
    border-top: 0;
  }

  .kpi:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .profit-story {
    grid-template-columns: 1fr;
  }

  .legend-grid {
    gap: 8px;
  }

  .legend-grid strong {
    font-size: 13px;
  }

  .story-block:first-child {
    border-radius: 8px 8px 0 0;
  }

  .story-block:last-child {
    border-left: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 8px 8px;
  }

  .story-block {
    padding: 14px;
  }

  .stacked-meter,
  .comparison-baseline {
    height: 22px;
  }

  .rate-strip div {
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .rate-strip div:first-child {
    border-left: 0;
  }
}

@media (max-width: 560px) {
  .shell,
  .order-shell {
    width: min(100% - 28px, 1180px);
    padding-top: 24px;
  }

  .order-hero {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .section-heading {
    align-items: start;
  }

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

  .product-card {
    padding: 10px;
  }

  .catalog-footer {
    justify-content: center;
  }

  .closed-group-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .closed-group-banner .secondary-link-button {
    width: 100%;
  }
}
