@layer mc-override, mc-base, mc-legacy;
@layer mc-legacy {
/* TikTok Shop-inspired commerce visual system */
:root {
  color-scheme: light;
  --bg: #f6f7f8;
  --panel: #ffffff;
  --panel-solid: #ffffff;
  --line: #e9eaed;
  --line-strong: #d7d9de;
  --text: #111116;
  --muted: #73757d;
  --muted-2: #9a9ca3;
  --cyan: #25f4ee;
  --blue: #3d7eff;
  --lime: #39d98a;
  --amber: #ffb020;
  --coral: #fe2c55;
  --shadow: 0 18px 55px rgba(17, 17, 22, .09);
  --sans: "Arial", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "Roboto Mono", monospace;
}

html, body { background: #f6f7f8; color: var(--text); }
body { font-family: var(--sans); }
.eyebrow { color: #70737a; font: 700 10px/1.4 var(--sans); letter-spacing: .13em; }
.tech-grid { opacity: .55; background-image: linear-gradient(rgba(17, 17, 22, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(17, 17, 22, .035) 1px, transparent 1px); background-size: 64px 64px; }
.glow-a { background: #25f4ee; opacity: .07; }
.glow-b { background: #fe2c55; opacity: .055; }
.live-dot { background: #fe2c55; box-shadow: 0 0 0 5px rgba(254, 44, 85, .1); }
.brand { color: #111116; }
.brand strong { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.brand small { color: #8c8e95; font: 700 7px var(--sans); letter-spacing: .15em; }
.brand-mark { width: 38px; height: 38px; border: 0; border-radius: 11px; background: #111116; overflow: hidden; box-shadow: 6px 0 0 -2px rgba(37, 244, 238, .8), -6px 0 0 -2px rgba(254, 44, 85, .75); }
.brand-mark::before { inset: 8px; border: 2px solid #fff; border-radius: 5px 9px 5px 9px; }
.brand-mark i { background: #fff; box-shadow: none; }
.brand-mark i:nth-child(1) { left: 9px; top: 17px; }
.brand-mark i:nth-child(2) { left: 22px; top: 9px; background: #25f4ee; }
.brand-mark i:nth-child(3) { left: 23px; bottom: 8px; background: #fe2c55; }
.primary { border-color: #111116; background: #111116; color: #fff; box-shadow: none; border-radius: 999px; font-weight: 750; }
.primary:hover { border-color: #fe2c55; background: #fe2c55; transform: translateY(-1px); }
.secondary { border-color: #d9dae0; background: #fff; color: #111116; border-radius: 999px; }
.secondary:hover { border-color: #111116; }
.form-error { color: #fe2c55; }

/* Brand home */
.brand-page { background: #f7f7f5; }
.landing { background: #f7f7f5; }
.landing-header { min-height: 76px; border-bottom: 1px solid #e7e7e3; background: rgba(255, 255, 255, .92); box-shadow: 0 8px 28px rgba(17, 17, 22, .04); }
.landing-nav a { color: #5d5f66; font-weight: 650; }
.landing-nav a:hover { color: #111116; }
.login-trigger { color: #111116; }
.header-login { min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: #111116; color: #fff; font: 700 11px var(--sans); letter-spacing: 0; }
.header-login:hover { background: #fe2c55; border-color: #fe2c55; }
.header-login span { color: #25f4ee; }
.landing-hero { min-height: calc(100vh - 76px); grid-template-columns: minmax(0, 1.03fr) minmax(420px, .97fr); background: radial-gradient(circle at 84% 24%, rgba(37, 244, 238, .17), transparent 25rem), radial-gradient(circle at 14% 74%, rgba(254, 44, 85, .06), transparent 27rem); }
.hero-kicker { color: #6e7077; font: 700 9px var(--sans); }
.landing-copy h1 { color: #111116; font-size: clamp(54px, 7.3vw, 108px); font-weight: 850; line-height: .93; letter-spacing: -.075em; }
.landing-copy h1 em { position: relative; color: #111116; display: inline-block; z-index: 0; }
.landing-copy h1 em::after { content: ""; position: absolute; z-index: -1; left: -.02em; right: -.04em; bottom: .05em; height: .28em; border-radius: 999px; background: linear-gradient(90deg, #25f4ee, #7ff8f4); transform: rotate(-1deg); }
.landing-copy > p { color: #676a71; line-height: 1.75; }
.hero-primary { min-height: 52px; padding: 0 28px; background: #fe2c55; border-color: #fe2c55; font-size: 13px; }
.hero-primary:hover { background: #111116; border-color: #111116; }
.hero-secondary { border-color: #d9dae0; background: #fff; border-radius: 999px; color: #111116; }
.hero-facts { padding-top: 30px; border-top: 1px solid #dedfdb; }
.hero-facts strong { color: #111116; font: 800 12px var(--sans); }
.hero-facts span { color: #85878e; }
.landing-visual { min-height: 580px; }
.visual-shell { aspect-ratio: .94; border: 1px solid #dedfdb; border-radius: 32px; background: linear-gradient(145deg, #ffffff, #f1f2f0); box-shadow: 0 35px 85px rgba(17, 17, 22, .12); transform: rotate(1.5deg); }
.visual-shell::before { inset: 7%; border: 1px dashed rgba(17, 17, 22, .12); }
.visual-shell-head { color: #85878e; font-family: var(--sans); font-weight: 700; }
.core-node { width: 180px; background: #111116; box-shadow: 7px 0 0 -3px #25f4ee, -7px 0 0 -3px #fe2c55, 0 22px 60px rgba(17, 17, 22, .2); }
.core-node small, .core-node em { color: rgba(255, 255, 255, .58); font-family: var(--sans); font-weight: 700; }
.core-node strong { color: #fff; font-size: 22px; font-weight: 800; }
.core-ring { border-color: rgba(254, 44, 85, .2); }
.core-ring.inner { border-color: rgba(37, 244, 238, .3); }
.node { border: 1px solid #e2e3df; background: rgba(255, 255, 255, .94); box-shadow: 0 12px 36px rgba(17, 17, 22, .08); transform: none; }
.node b { color: #fe2c55; font-family: var(--sans); }
.node strong { color: #111116; font-weight: 800; }
.node small { color: #96989e; font-family: var(--sans); font-weight: 700; }
.node-orders { transform: rotate(-2deg); }
.node-products { transform: rotate(2deg); }
.node-inventory { transform: rotate(1deg); }
.node-tasks { transform: rotate(-1.5deg); }
.visual-foot { color: #85878e; font-family: var(--sans); font-weight: 700; }
.visual-foot i { background: #25f4ee; box-shadow: 0 0 0 4px rgba(37, 244, 238, .18); }
.landing-band { border-color: #e4e5e1; background: #fff; }
.landing-band > span { color: #fe2c55; font-family: var(--sans); font-weight: 800; }
.landing-band > div { color: #35373d; font-weight: 750; }
.landing-band i { background: linear-gradient(90deg, transparent, #d9dadf, transparent); }
.landing-section { background: #f7f7f5; }
.landing-section-head h2, .security-section h2 { color: #111116; font-weight: 850; }
.landing-section-head > p:last-child { color: #73757d; }
.capability-grid { border-color: #e1e2df; background: #e1e2df; gap: 1px; }
.capability-card { border: 0; background: #fff; transition: transform .22s ease, box-shadow .22s ease; }
.capability-card:hover { z-index: 2; transform: translateY(-5px); box-shadow: 0 22px 50px rgba(17, 17, 22, .1); }
.capability-card.featured { background: #111116; }
.capability-card.featured h3 { color: #fff; }
.capability-card.featured p { color: #a5a6ad; }
.capability-card.featured small, .capability-card.featured .capability-no { color: #6d6f76; }
.capability-card.featured .capability-icon { border-color: rgba(37, 244, 238, .4); color: #25f4ee; }
.capability-no { color: #b3b4b9; font-family: var(--sans); }
.capability-icon { border: 1px solid #dfe0e3; background: #f7f7f8; color: #111116; }
.capability-card h3 { color: #111116; font-weight: 800; }
.capability-card p { color: #73757d; }
.capability-card small { color: #a1a3a9; font-family: var(--sans); font-weight: 700; }
.workflow-section { border: 0; background: #111116; }
.workflow-section .eyebrow { color: #25f4ee; }
.workflow-section h2 { color: #fff; }
.workflow-track { border-color: #393940; }
.workflow-track article::before { background: #25f4ee; box-shadow: 0 0 0 5px rgba(37, 244, 238, .13); }
.workflow-track article > span { color: #777980; font-family: var(--sans); font-weight: 800; }
.workflow-track strong { color: #fff; font-weight: 800; }
.workflow-track p { color: #9a9ba3; }
.security-section { border-color: #e3e4e0; background: #fff; }
.security-list article { border-color: #e9e9e6; }
.security-list article > span { color: #fe2c55; font-family: var(--sans); font-weight: 800; }
.security-list strong { color: #111116; font-weight: 800; }
.security-list p { color: #73757d; }
.landing-cta { border: 0; border-radius: 26px; background: linear-gradient(115deg, #111116 0%, #1a1b20 55%, #30121c 100%); box-shadow: 0 35px 70px rgba(17, 17, 22, .16); }
.landing-cta .eyebrow { color: #25f4ee; }
.landing-cta h2 { color: #fff; font-weight: 850; }
.landing-cta .primary { background: #fe2c55; border-color: #fe2c55; box-shadow: 7px 0 0 -3px #25f4ee; }
.landing-footer { border-color: #dfe0dc; background: #fff; color: #777980; }
.landing-footer > button { color: #111116; font-weight: 750; }

/* Login */
dialog { border-color: #e5e6e8; background: #fff; color: #111116; box-shadow: 0 30px 120px rgba(17, 17, 22, .22); }
dialog::backdrop { background: rgba(17, 17, 22, .36); backdrop-filter: blur(8px); }
.login-dialog { border-radius: 24px; }
.login-dialog-brand h2 { color: #111116; font-weight: 850; }
.login-dialog-brand > p:last-child, .login-security { color: #73757d; }
.login-form label { color: #55585f; font-weight: 650; }
.login-form input, .search, select, textarea, .dialog-body input, .dialog-body select, .dialog-body textarea { border-color: #dedfe3; background: #f8f8f9; color: #111116; }
.login-form input:focus, .search:focus, select:focus, textarea:focus, .dialog-body input:focus, .dialog-body select:focus, .dialog-body textarea:focus { border-color: #111116; box-shadow: 0 0 0 3px rgba(17, 17, 22, .06); }
.login-dialog .primary { width: 100%; min-height: 48px; }

/* ERP application */
.erp-shell { background: #f5f6f7; }
.sidebar { border-right: 1px solid #22232a; background: #0c0d10; color: #fff; }
.sidebar::after { background: linear-gradient(transparent, #fe2c55, transparent); opacity: .8; }
.sidebar .brand { color: #fff; }
.sidebar .brand small { color: #7d7f87; }
.side-nav { gap: 6px; }
.nav-item { color: #8e9099; border-radius: 12px; font-weight: 650; }
.nav-item > span:first-child { color: #25f4ee; }
.nav-item:hover { color: #fff; background: #1b1c21; }
.nav-item.active { color: #fff; border-color: #2a2b32; background: #1b1c21; box-shadow: inset 3px 0 #fe2c55; }
.nav-badge { border: 0; background: #fe2c55; color: #fff; font-weight: 750; }
.side-status { border-color: #2a2b31; background: #16171c; }
.side-status button { color: #92949c; }
.main { background: #f5f6f7; }
.topbar h1 { color: #111116; font-weight: 850; }
.topbar .eyebrow { color: #8b8d94; }
.select-wrap { color: #777a82; font: 700 9px var(--sans); }
.shop-selector {
  position: relative;
  min-width: 248px;
  max-width: 292px;
  flex: 0 1 auto;
}
.shop-switcher {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 36px minmax(82px, 1fr) auto 18px;
  align-items: center;
  gap: 10px;
  padding: 7px 12px 7px 8px;
  color: #111116;
  font: inherit;
  text-align: left;
  border: 1px solid #d9dce2;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #f9fafb 100%);
  box-shadow: 0 3px 10px rgba(17, 17, 22, .045);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.shop-switcher:hover {
  border-color: #c6cad1;
  box-shadow: 0 7px 18px rgba(17, 17, 22, .08);
}

.shop-switcher:focus-visible {
  outline: none;
  border-color: #111116;
  box-shadow: 0 0 0 3px rgba(17, 17, 22, .08);
}

.shop-switcher-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #111116;
  color: #fff;
}

.shop-switcher-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shop-switcher-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.shop-switcher-copy small {
  color: #8a8e96;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
}

.shop-switcher-copy strong {
  overflow: hidden;
  color: #111116;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-switcher-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border: 1px solid #e2e5e8;
  border-radius: 999px;
  background: #f4f5f7;
  color: #686c74;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.shop-switcher-meta::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #24b47e;
}

.shop-switcher-chevron {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #777b83;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}

.shop-switcher[aria-expanded="true"] .shop-switcher-chevron {
  transform: rotate(180deg);
}

.shop-options {
  position: absolute;
  z-index: 45;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: min(340px, 58vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #d9dce2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(17, 17, 22, .12);
  scrollbar-width: thin;
}

.shop-option {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #111116;
  text-align: left;
  cursor: pointer;
}

.shop-option:hover,
.shop-option:focus-visible {
  outline: none;
  background: #f3f4f6;
}

.shop-option[aria-selected="true"] {
  background: #111116;
  color: #fff;
}

.shop-option span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.shop-option strong {
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-option small {
  overflow: hidden;
  color: #8a8e96;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-option[aria-selected="true"] small {
  color: rgba(255, 255, 255, .62);
}

.shop-option svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

.shop-option[aria-selected="true"] svg {
  opacity: 1;
}

select { border-color: #dddfe4; background: #fff; color: #111116; }
.segmented { border-color: #dedfe3; background: #e9eaed; }
.segmented button { color: #6f7178; font-weight: 650; }
.segmented button.active { background: #111116; color: #fff; box-shadow: none; }
.icon-button { border-color: #dedfe3; background: #fff; color: #111116; }

.refresh-control {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #d9dce1;
  border-radius: 10px;
  background: #fff;
  color: #30333a;
  font-size: 13px;
  font-weight: 750;
  box-shadow: 0 1px 2px rgba(17, 17, 22, .04);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .12s ease;
}

.refresh-control:hover {
  border-color: #c8ccd2;
  background: #f7f8f9;
  box-shadow: 0 4px 12px rgba(17, 17, 22, .07);
}

.refresh-control:active {
  transform: translateY(1px);
}

.refresh-control:focus-visible {
  outline: 3px solid rgba(17, 17, 22, .12);
  outline-offset: 2px;
}

.refresh-control:disabled {
  cursor: wait;
  opacity: .78;
}

.refresh-control .refresh-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.refresh-control.loading .refresh-icon {
  animation: spin .8s linear infinite;
}
.notice { border-color: rgba(255, 176, 32, .3); background: #fff8e8; color: #8a5a00; }
.loading > div { border-color: #e5e6e9; background: linear-gradient(100deg, #eceef0 20%, #f7f8f9 50%, #eceef0 80%); background-size: 220% 100%; }
.hero { border: 0; border-radius: 22px; background: radial-gradient(circle at 82% 15%, rgba(37, 244, 238, .22), transparent 25%), radial-gradient(circle at 64% 80%, rgba(254, 44, 85, .22), transparent 30%), #111116; box-shadow: 0 22px 55px rgba(17, 17, 22, .14); }
.hero::before { opacity: .18; background-image: linear-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .1) 1px, transparent 1px); }
.hero .eyebrow { color: #25f4ee; }
.hero-value-row > strong { color: #fff; font-weight: 850; }
.hero-value-row > span, .hero-stats span { color: #989aa2; }
.hero-stats strong { color: #fff; font-family: var(--sans); font-weight: 800; }
.hero-orbit { border-color: rgba(255, 255, 255, .14); }
.hero-orbit::before { border-color: rgba(37, 244, 238, .24); }
.hero-orbit::after { background: #111116; box-shadow: 7px 0 0 -2px #fe2c55, -7px 0 0 -2px #25f4ee, 0 0 55px rgba(37, 244, 238, .2); }
.metric, .panel, .task-card, .shop-card { border-color: #e4e5e8; background: #fff; box-shadow: 0 8px 28px rgba(17, 17, 22, .045); }
.metric { border-radius: 16px; }
.metric-label, .metric small { color: #7b7e85; }
.metric strong { color: #111116; font-family: var(--sans); font-weight: 850; }
.panel { border-radius: 16px; }
.panel-head h2, .section-head h2 { color: #111116; font-weight: 850; }
.panel-note { color: #999ba2; font-family: var(--sans); font-weight: 650; }
.link-button { color: #fe2c55; font-weight: 700; }
.task-row { border-color: #ececef; background: #fafafb; }
.task-row::before { background: #111116; }
.task-row.priority-urgent::before { background: #fe2c55; }
.task-row.priority-high::before { background: #ffb020; }
.task-row strong { color: #111116; }
.task-row small, .task-state, .empty { color: #85878e; }
.table-wrap { scrollbar-color: #c5c7cc transparent; }
table { color: #111116; }
th { border-color: #e8e9eb; color: #989aa1; font-family: var(--sans); font-weight: 750; }
td { border-color: #ededf0; color: #3e4046; }
td strong { color: #111116; font-weight: 700; }
td small { color: #8c8e95; }
.status { border-color: #e4e5e8; background: #f6f6f7; color: #4b4e54; font-family: var(--sans); font-weight: 700; }
.status.live { border-color: #bcebd4; background: #eefbf5; color: #138a55; }
.status.warn { border-color: #ffe1a6; background: #fff8e8; color: #9a6500; }
.status.danger { border-color: #ffd0d9; background: #fff1f4; color: #d51d43; }
.row-action { border-color: #dedfe3; background: #fff; color: #111116; font-weight: 700; }
.row-action:hover { border-color: #fe2c55; color: #fe2c55; }
.section-head p:last-child { color: #74777e; }
.search { background: #fff; }
.task-card h3, .shop-card h3 { color: #111116; font-weight: 800; }
.task-card p, .shop-card p { color: #777a82; }
.task-card footer { border-top: 1px solid #eeeeF1; padding-top: 12px; }
.badge { border-color: #e2e3e6; background: #f7f7f8; color: #55585f; font-family: var(--sans); font-weight: 700; }
.badge.live { border-color: #bfe9d4; background: #effbf5; color: #138a55; }
.sync-detail { color: #8a8c93 !important; font-family: var(--sans) !important; }
.head-actions .secondary { background: #fff; }
.product-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.product-actions .search { width: min(270px, 38vw); }
.product-summary { margin-top: 16px; }
.product-auth-notice { display: flex; align-items: center; gap: 10px; border-color: #ffdca1; background: #fffaf0; color: #815600; }
.product-auth-notice span { flex: 1; }
.product-panel { border-top: 4px solid #25c9c4; }
.sku-chip-list { display: flex; flex-wrap: wrap; gap: 5px; max-width: 310px; }
.sku-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 1px solid #e2e3e6; border-radius: 6px; background: #f8f8f9; color: #4e5158; font: 8px var(--mono); }
.sku-chip.pending { border-color: #ffd0d9; background: #fff3f5; color: #c71d42; }
.sku-chip b { color: #17171c; font-weight: 800; }
.product-last-sync { white-space: nowrap; color: #85878e; font: 8px var(--mono); }
.product-price-range { white-space: nowrap; font-weight: 750; }
.product-catalog-product,
.selection-ranking-product {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.product-catalog-image,
.selection-ranking-image {
  width: 54px;
  height: 54px;
  display: grid;
  flex: 0 0 auto;
  overflow: hidden;
  place-items: center;
  border: 1px solid #e6e7eb;
  border-radius: 10px;
  background: #f2f3f5;
  color: #999ca4;
  font-size: 18px;
}

.product-catalog-image img,
.selection-ranking-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-catalog-product > div:last-child,
.selection-ranking-product > div:last-child {
  min-width: 0;
}
.order-lock-panel {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  border-top: 4px solid #111116;
}

.order-lock-panel::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 28%;
  height: 5px;
  background: linear-gradient(90deg, transparent, #25f4ee 48%, #fe2c55);
}

.order-lock-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.order-lock-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.order-lock-title-row h2 {
  margin: 0;
  color: #111116;
  font-size: 23px;
  font-weight: 850;
}

.order-lock-title-row .eyebrow {
  margin: 0 0 2px;
}

.order-lock-icon {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: #111116;
  color: #25f4ee;
  box-shadow: 5px 0 0 -2px #fe2c55;
  font-size: 24px;
}

.order-lock-description {
  max-width: 800px;
  margin: 12px 0 0;
  color: #6d7077;
  font-size: 14px;
  line-height: 1.7;
}

.order-lock-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.lock-switch {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid #dedfe3;
  border-radius: 999px;
  background: #fff;
  color: #33363c;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  user-select: none;
}

.lock-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.lock-switch-track {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #d7d9de;
  transition: background .2s ease;
}

.lock-switch-track i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(17, 17, 22, .22);
  transition: transform .2s ease;
}

.lock-switch input:checked + .lock-switch-track {
  background: #111116;
  box-shadow: inset 4px 0 0 #25f4ee;
}

.lock-switch input:checked + .lock-switch-track i {
  transform: translateX(16px);
}

.lock-switch:has(input:focus-visible) {
  outline: 3px solid rgba(254, 44, 85, .24);
  outline-offset: 2px;
}

.lock-switch:has(input:disabled) {
  cursor: wait;
  opacity: .58;
}

.order-lock-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.order-lock-metrics article {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  padding: 15px 16px;
  border: 1px solid #e7e8eb;
  border-radius: 13px;
  background: linear-gradient(145deg, #fafafb, #fff);
}

.order-lock-metrics span {
  color: #73767d;
  font-size: 13px;
}

.order-lock-metrics strong {
  margin-top: auto;
  color: #111116;
  font-size: 27px;
  font-weight: 850;
  line-height: 1.1;
}

.order-lock-metrics small {
  margin-top: 5px;
  color: #898b92;
  font-size: 12px;
  line-height: 1.4;
}

.order-lock-notice {
  margin: 14px 0 0;
}

.order-lock-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 14px;
  color: #777a82;
  font-size: 12px;
}

.order-lock-panel td:nth-child(7) {
  min-width: 240px;
  max-width: 360px;
  color: #74777e;
}

.order-lock-panel .lock-ready {
  border-color: #bcebd4;
  background: #eefbf5;
  color: #138a55;
}

.order-lock-panel .lock-failed {
  border-color: #ffd0d9;
  background: #fff1f4;
  color: #d51d43;
}

.order-lock-panel .lock-attention {
  border-color: #ffe1a6;
  background: #fff8e8;
  color: #9a6500;
}

.finance-section-head {
  align-items: flex-start;
}

.finance-period-actions {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.finance-period-actions label {
  display: grid;
  gap: 6px;
  color: #686b72;
  font-size: 12px;
  font-weight: 700;
}

.finance-period-actions input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #dedfe3;
  border-radius: 10px;
  background: #fff;
  color: #111116;
}

.finance-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.inventory-write-panel {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  border-top: 4px solid #25c9c4;
}

.inventory-write-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.inventory-write-notice {
  margin-top: 14px;
}

.finance-summary article {
  min-height: 124px;
  display: flex;
  flex-direction: column;
  padding: 19px;
  border: 1px solid #e4e5e8;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(17, 17, 22, .045);
}

.finance-summary article:last-child {
  border-color: #cfd2d8;
  background: linear-gradient(140deg, #fff, #f5f6f7);
}

.finance-summary span {
  color: #777a82;
  font-size: 13px;
}

.finance-summary strong {
  margin-top: auto;
  color: #111116;
  font-size: 28px;
  font-weight: 850;
  letter-spacing: -.04em;
}

.finance-summary small {
  margin-top: 5px;
  color: #7d8087;
  font-size: 12px;
  line-height: 1.45;
}

.finance-notice {
  margin-bottom: 14px;
}

.finance-tabs {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid #e1e2e5;
  border-radius: 12px;
  background: #eceef0;
}

.finance-tabs button {
  min-height: 40px;
  padding: 0 20px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #62656c;
  font-size: 13px;
  font-weight: 750;
}

.finance-tabs button.active {
  background: #111116;
  color: #fff;
  box-shadow: inset 3px 0 #25f4ee;
}

.finance-panel {
  border-top: 4px solid #25c9c4;
}

.finance-panel[hidden] {
  display: none;
}

.finance-product-head {
  align-items: center;
}

.finance-product-head .search {
  width: min(320px, 42vw);
}

.finance-net {
  color: #128252 !important;
  font-weight: 850;
}

.formula-note {
  padding: 11px 13px;
  border: 1px solid #e4e5e8;
  border-radius: 9px;
  background: #f7f7f8;
  color: #5d6067;
  font-size: 12px;
  line-height: 1.65;
}

.inventory-section-head {
  align-items: flex-end;
}

.inventory-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.inventory-search-box {
  position: relative;
  display: block;
  width: min(270px, 34vw);
}

.inventory-search-box > span {
  position: absolute;
  top: 50%;
  left: 13px;
  z-index: 1;
  color: #8b8d94;
  font-size: 18px;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.inventory-search-box .search {
  width: 100%;
  padding-left: 38px;
}

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

.inventory-actions button > span {
  color: #fe2c55;
  font-size: 16px;
  font-weight: 850;
  line-height: 1;
}

.inventory-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.inventory-summary-card {
  position: relative;
  min-height: 126px;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  padding: 19px 19px 17px;
  border: 1px solid #e4e5e8;
  border-radius: 16px;
  background: linear-gradient(150deg, #fff 55%, #fafbfc);
  box-shadow: 0 8px 28px rgba(17, 17, 22, .045);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.inventory-summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #111116;
}

.inventory-summary-card::after {
  content: "";
  position: absolute;
  top: -32px;
  right: -24px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(17, 17, 22, .035);
}

.inventory-summary-card:hover {
  border-color: #d6d8dd;
  box-shadow: 0 14px 34px rgba(17, 17, 22, .075);
  transform: translateY(-2px);
}

.inventory-summary-card.accent-seller::before { background: #fe2c55; }
.inventory-summary-card.accent-owned::before { background: #25c9c4; }
.inventory-summary-card.accent-shared::before { background: #ffb020; }
.inventory-summary-card.accent-coverage::before { background: #111116; }

.inventory-summary-card span {
  position: relative;
  z-index: 1;
  color: #666970;
  font-size: 13px;
  font-weight: 650;
}

.inventory-summary-card strong {
  position: relative;
  z-index: 1;
  margin-top: auto;
  color: #111116;
  font-family: var(--sans);
  font-size: 30px;
  font-weight: 850;
  letter-spacing: -.04em;
  line-height: 1.05;
}

.inventory-summary-card small {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  color: #7d8087;
  font-size: 12px;
  line-height: 1.45;
}

.inventory-write-panel {
  background:
    radial-gradient(circle at 100% 0, rgba(37, 244, 238, .08), transparent 28%),
    #fff;
}

.inventory-write-panel::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 36%;
  height: 4px;
  background: linear-gradient(90deg, transparent, #25f4ee 50%, #fe2c55);
}

.inventory-write-metrics article {
  border-color: #e8e9ec;
  background: rgba(247, 248, 249, .9);
  transition: background .2s ease, border-color .2s ease;
}

.inventory-write-metrics article:hover {
  border-color: #d9dbe0;
  background: #fff;
}

.giga-inventory-panel {
  overflow: hidden;
  margin-bottom: 14px;
  border-top: 4px solid #111116;
}

.inventory-panel-head {
  align-items: center;
}

.live-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid #e2e4e7;
  border-radius: 999px;
  background: #f7f8f9;
  color: #55585f;
  font-size: 12px;
  white-space: nowrap;
}

.live-note::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #20c77a;
  box-shadow: 0 0 0 4px rgba(32, 199, 122, .1);
}

.giga-inventory-scroll {
  max-height: min(62vh, 680px);
  overflow: auto;
  border: 1px solid #eceef1;
  border-radius: 12px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.giga-inventory-scroll table {
  min-width: 900px;
}

.giga-inventory-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding-block: 11px;
  border-bottom: 1px solid #dfe1e5;
  background: rgba(248, 249, 250, .97);
  backdrop-filter: blur(10px);
}

.giga-inventory-scroll tbody tr {
  transition: background .18s ease;
}

.giga-inventory-scroll tbody tr:hover {
  background: #f8fafb;
}

#giga-inventory-table td:first-child {
  min-width: 270px;
}

#giga-inventory-table td:first-child strong {
  display: block;
  max-width: 380px;
  overflow: hidden;
  color: #111116;
  font-family: var(--mono);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#giga-inventory-table td:first-child small {
  display: -webkit-box;
  max-width: 420px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#giga-inventory-table td:nth-child(2),
#giga-inventory-table td:nth-child(3),
#giga-inventory-table td:nth-child(4) {
  white-space: nowrap;
}

#giga-inventory-table td:nth-child(5),
#giga-inventory-table td:nth-child(6) {
  color: #686b72;
  font-size: 12px;
}

.inventory-row-actions {
  text-align: right;
}

.manual-inventory-panel {
  border-top: 4px solid #8b8d94;
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.pagination-row span {
  min-width: 150px;
  color: #777a82;
  font: 12px var(--mono);
  text-align: center;
}
.stock-number { font: 800 15px var(--sans); }
.stock-low { color: #fe2c55; }
.dialog-head h2 { color: #111116; }
.dialog-close { color: #777a82; }
.dialog-actions { border-top: 1px solid #ededf0; }
.dialog-body label { color: #565960; font-weight: 650; }
.toast { border-color: #282930; background: #111116; color: #fff; }
.head-actions .primary { background: #fe2c55; border-color: #fe2c55; }

@media (max-width: 760px) {
  .landing-header { background: rgba(255, 255, 255, .96); }
  .landing-hero { grid-template-columns: minmax(0, 1fr); }
  .landing-hero, .landing-copy, .landing-visual { min-width: 0; max-width: 100%; }
  .landing-copy h1 { font-size: 52px; }
  .landing-visual { width: 100%; overflow: hidden; }
  .visual-shell { width: 100%; max-width: 360px; transform: none; }
  .capability-card { border: 0; }
  .landing-cta { border-radius: 20px; }
  .sidebar { border-bottom-color: #26272d; }
  .nav-item { color: #91939b; }
  .nav-item.active { background: #1b1c21; }
  .hero { border-radius: 18px; }
  .inventory-summary { grid-template-columns: repeat(2, 1fr); }
  .inventory-actions { width: 100%; }
  .inventory-actions .search { width: 100%; }
  .product-actions { width: 100%; }
  .product-actions .search { width: 100%; }
  .product-auth-notice { align-items: flex-start; flex-direction: column; }
  .sku-chip-list { max-width: 210px; }
}

/* 2026-11-17 readability and responsive interaction pass */
:root {
  --font-caption: 12px;
  --font-small: 13px;
  --font-body: 15px;
  --font-title: 16px;
}

body {
  font-size: var(--font-body);
  line-height: 1.65;
}

button,
input,
select,
textarea {
  font-size: var(--font-small);
}

.primary,
.secondary {
  min-height: 42px;
  padding-inline: 18px;
  font-size: 13px;
}

.small {
  min-height: 38px;
  padding-inline: 15px;
  font-size: 13px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(254, 44, 85, .24);
  outline-offset: 2px;
}

.eyebrow {
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .11em;
}

.brand small {
  font-size: 12px;
  line-height: 1.35;
}

.login-trigger,
.header-login {
  min-height: 42px;
  font-size: 13px;
}

.landing-nav {
  gap: 30px;
}

.landing-nav a {
  font-size: 14px;
}

.hero-kicker {
  font-size: 12px;
  line-height: 1.5;
}

.landing-copy > p {
  font-size: 16px;
  line-height: 1.8;
}

.hero-primary,
.hero-secondary {
  min-height: 46px;
  font-size: 14px;
}

.hero-facts strong {
  font-size: 14px;
}

.hero-facts span {
  font-size: 12px;
  line-height: 1.45;
}

.visual-shell-head,
.visual-foot,
.node b,
.node small,
.core-node small,
.core-node em {
  font-size: 12px;
  line-height: 1.4;
}

.node strong {
  font-size: 17px;
}

.landing-band > span {
  font-size: 12px;
}

.landing-band > div {
  font-size: 13px;
}

.landing-section-head > p:last-child {
  max-width: 380px;
  font-size: 15px;
  line-height: 1.75;
}

.capability-no,
.workflow-track article > span,
.security-list article > span {
  font-size: 12px;
}

.capability-card p,
.workflow-track p,
.security-list p {
  font-size: 14px;
  line-height: 1.75;
}

.capability-card small {
  font-size: 12px;
}

.security-list strong {
  font-size: 16px;
}

.landing-footer p,
.landing-footer > button {
  font-size: 13px;
}

.landing-footer > button {
  min-height: 40px;
  padding: 0 8px;
}

.login-form label,
.dialog-body label {
  font-size: 13px;
}

.login-form input,
.dialog-body input,
.dialog-body select,
.dialog-body textarea {
  min-height: 46px;
  font-size: 15px;
}

.login-dialog-brand > p:last-child,
.login-security {
  font-size: 12px;
}

.erp-shell {
  grid-template-columns: 232px minmax(0, 1fr);
}

.nav-item {
  position: relative;
  min-height: 48px;
  font-size: 14px;
  line-height: 1.3;
}

.nav-badge {
  font-size: 12px;
}

.side-status > div {
  font-size: 13px;
}

.side-status small {
  font-size: 12px;
  line-height: 1.5;
}

.side-status button {
  min-height: 40px;
  font-size: 12px;
}

.select-wrap {
  font-size: 12px;
}

select {
  min-height: 42px;
  font-size: 13px;
}

.segmented button {
  min-height: 40px;
  font-size: 12px;
}

.icon-button {
  width: 42px;
  height: 42px;
  font-size: 19px;
}

.notice {
  padding: 13px 16px;
  font-size: 13px;
  line-height: 1.65;
}

.hero-value-row > span,
.hero-stats span {
  font-size: 13px;
}

.hero-stats strong {
  font-size: 21px;
}

.metric-label {
  font-size: 13px;
}

.metric small {
  color: #65686f;
  font-size: 12px;
  line-height: 1.5;
}

.panel-note {
  color: #686b72;
  font-size: 12px;
  line-height: 1.5;
}

.link-button {
  min-height: 38px;
  font-size: 12px;
}

.task-row strong {
  font-size: 13px;
}

.task-row small {
  font-size: 12px;
  line-height: 1.5;
}

.task-state {
  font-size: 12px;
}

.table-wrap {
  overscroll-behavior-inline: contain;
}

table {
  min-width: 900px;
}

th {
  padding: 12px 11px;
  font-size: 12px;
  line-height: 1.4;
}

td {
  padding: 14px 11px;
  font-size: 13px;
  line-height: 1.55;
}

td strong {
  max-width: 340px;
}

td small {
  margin-top: 4px;
  color: #686b72;
  font-size: 12px;
  line-height: 1.45;
}

#product-table td:first-child strong {
  display: -webkit-box;
  max-width: 360px;
  overflow: hidden;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.45;
}

#overview-orders td:nth-child(3) strong,
#orders-table td:nth-child(3) strong,
#economics-table td:first-child strong,
#inventory-table td:first-child strong {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.45;
}

.status {
  padding: 5px 9px;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
}

.row-action {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
}

.section-head p:last-child {
  font-size: 14px;
  line-height: 1.7;
}

.search {
  min-height: 42px;
  font-size: 14px;
}

.task-card h3,
.shop-card h3 {
  font-size: 16px;
}

.task-card p,
.shop-card p {
  font-size: 13px;
}

.shop-card p,
.sync-detail {
  line-height: 1.55;
}

.task-card p,
.shop-card p {
  line-height: 1.65;
}

.sync-detail {
  color: #686b72 !important;
  font-size: 12px !important;
}

.badge {
  padding: 5px 8px;
  font-size: 12px;
}

.product-summary .inventory-summary-card span,
.inventory-summary-card span {
  font-size: 13px;
}

.inventory-summary-card small {
  color: #686b72;
  font-size: 12px;
  line-height: 1.45;
}

.sku-chip {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 12px;
}

.product-last-sync {
  font-size: 12px;
}

.pagination-row span {
  font-size: 12px;
}

.dialog-body label {
  gap: 8px;
}

.dialog-head h2 {
  font-size: 24px;
}

.toast {
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px 18px;
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 1100px) {
  .erp-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 12px;
  }

  .sidebar-brand > div,
  .nav-item:not(.active) {
    font-size: 14px;
  }

  .nav-item {
    justify-content: flex-start;
    padding: 0 12px;
  }

  .side-status {
    display: block;
  }
}

@media (max-width: 900px) {
  .landing-hero {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .order-lock-head {
    flex-direction: column;
  }

  .inventory-write-head {
    flex-direction: column;
  }

  .order-lock-actions {
    width: 100%;
    justify-content: flex-start;
  }

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

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

@media (max-width: 760px) {
  .landing-copy h1 {
    font-size: clamp(42px, 13vw, 52px);
  }

  .landing-copy > p {
    font-size: 15px;
  }

  .hero-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
  }

  .hero-facts strong {
    font-size: 13px;
  }

  .hero-facts span {
    font-size: 12px;
  }

  .landing-section-head h2 {
    font-size: clamp(34px, 10vw, 42px);
  }

  .landing-section-head > p:last-child {
    font-size: 14px;
  }

  .erp-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    padding: 8px 10px 10px;
    overflow: hidden;
  }

  .sidebar-brand {
    display: none;
  }

  .side-nav {
    grid-template-columns: repeat(7, minmax(70px, 1fr));
    grid-auto-flow: row;
    gap: 5px;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }

  .nav-item {
    min-height: 58px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 5px 6px;
    font-size: 12px !important;
    line-height: 1.25;
    white-space: nowrap;
  }

  .nav-item > span:first-child {
    font-size: 19px;
  }

  .nav-badge {
    top: 4px;
    right: 5px;
    min-width: 17px;
    padding: 1px 4px;
    font-size: 12px;
  }

  .main {
    padding: 22px 12px 80px;
  }

  .topbar {
    gap: 16px;
  }

  .topbar h1 {
    font-size: 34px;
  }

  .topbar-actions {
    gap: 8px;
  }

  .refresh-control {
    min-height: 44px;
    padding-inline: 12px;
  }

  .select-wrap {
    font-size: 12px;
  }

  .shop-selector {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: 1 1 100%;
  }

  .shop-switcher {
    width: 100%;
    min-height: 60px;
  }

  .segmented {
    flex: 1 1 auto;
  }

  .segmented button {
    flex: 1;
    min-width: 64px;
    min-height: 44px;
    padding: 0 8px;
    font-size: 12px;
  }

  .hero {
    min-height: 300px;
  }

  .hero-value-row > strong {
    font-size: clamp(48px, 16vw, 58px);
  }

  .hero-stats span {
    font-size: 12px;
  }

  .hero-stats strong {
    font-size: 20px;
  }

  .metric {
    min-height: 126px;
  }

  .section-head {
    gap: 14px;
  }

  .section-head .product-actions,
  .section-head .inventory-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-actions .search,
  .inventory-actions .search {
    grid-column: 1 / -1;
  }

  .product-actions button,
  .inventory-actions button,
  .head-actions button,
  .section-head > button,
  .pagination-row button {
    min-height: 44px;
    white-space: nowrap;
  }

  .side-status button,
  .link-button {
    min-height: 44px;
  }

  .inventory-summary {
    gap: 10px;
  }

  .order-lock-panel {
    padding: 17px 14px;
  }

  .inventory-write-panel {
    padding: 17px 14px;
  }

  .order-lock-title-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .order-lock-title-row .status {
    margin-left: 54px;
  }

  .order-lock-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .order-lock-actions .secondary,
  .lock-switch {
    width: 100%;
    min-height: 46px;
    justify-content: center;
  }

  .order-lock-metrics {
    gap: 9px;
  }

  .order-lock-metrics article {
    min-height: 112px;
    padding: 14px;
  }

  .order-lock-metrics strong {
    font-size: 26px;
  }

  .order-lock-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .finance-period-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .finance-period-actions label,
  .finance-period-actions input {
    width: 100%;
  }

  .finance-period-actions button {
    min-height: 44px;
  }

  .finance-summary {
    gap: 9px;
  }

  .finance-summary article {
    min-height: 112px;
    padding: 15px;
  }

  .finance-summary strong {
    font-size: 25px;
  }

  .finance-tabs {
    width: 100%;
  }

  .finance-tabs button {
    flex: 1;
    min-height: 44px;
    padding-inline: 10px;
  }

  .finance-product-head {
    align-items: stretch;
  }

  .finance-product-head .search {
    width: 100%;
  }

  .inventory-summary-card {
    min-height: 126px;
    padding: 16px;
  }

  .inventory-summary-card strong {
    font-size: 26px;
  }

  .inventory-summary-card span {
    font-size: 13px;
  }

  .inventory-summary-card small {
    font-size: 12px;
  }

  .panel {
    padding: 17px 14px;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .panel-head h2,
  .section-head h2 {
    font-size: 23px;
  }

  .table-wrap {
    margin-top: 13px;
    border-radius: 8px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 860px;
  }

  th {
    font-size: 12px;
  }

  th:first-child,
  td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
    box-shadow: 2px 0 8px rgba(17, 17, 22, .05);
  }

  td,
  .row-action {
    font-size: 13px;
  }

  td small {
    font-size: 12px;
  }

  .row-action {
    min-height: 44px;
    padding-inline: 12px;
  }

  #product-table td:first-child strong {
    max-width: 280px;
  }

  .sku-chip-list {
    max-width: 260px;
  }

  .pagination-row {
    justify-content: space-between;
    gap: 8px;
  }

  .pagination-row span {
    text-align: center;
  }

  .dialog-body {
    grid-template-columns: 1fr;
  }

  .landing-footer > button {
    min-height: 44px;
    justify-self: start;
  }
}

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

@media (max-width: 760px) {
  .inventory-section-head {
    align-items: stretch;
  }

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

  .inventory-search-box {
    grid-column: 1 / -1;
    width: 100%;
  }

  .inventory-actions button {
    width: 100%;
    padding-inline: 8px;
    font-size: 12px;
  }

  #sync-giga-button {
    grid-column: 1 / -1;
  }

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

  .inventory-summary-card {
    min-height: 120px;
    padding: 16px 15px 15px;
  }

  .inventory-summary-card strong {
    font-size: 26px;
  }

  .inventory-write-head {
    gap: 16px;
  }

  .inventory-write-panel .order-lock-description {
    margin-top: 9px;
    font-size: 13px;
    line-height: 1.6;
  }

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

  .inventory-panel-head {
    align-items: flex-start;
  }

  .live-note {
    max-width: 100%;
    white-space: normal;
  }

  .giga-inventory-scroll {
    max-height: 66vh;
    overflow: auto;
    border: 1px solid #eceef1;
    border-radius: 14px;
    scrollbar-gutter: stable;
  }

  .giga-inventory-scroll table,
  #giga-inventory-table,
  #giga-inventory-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .giga-inventory-scroll thead {
    display: none;
  }

  #giga-inventory-table tbody {
    display: grid;
    gap: 10px;
  }

  #giga-inventory-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid #e6e8eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(17, 17, 22, .035);
  }

  #giga-inventory-table tr:hover {
    background: #fff;
  }

  #giga-inventory-table td,
  #giga-inventory-table td:first-child {
    position: static;
    display: block;
    min-width: 0;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid #f0f1f3;
    background: transparent;
    box-shadow: none;
    text-align: left;
  }

  #giga-inventory-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: #85878e;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
  }

  #giga-inventory-table td:first-child {
    grid-column: 1 / -1;
    padding-block: 15px 13px;
    background: linear-gradient(120deg, #fafbfc, #fff);
  }

  #giga-inventory-table td:first-child::before {
    display: none;
  }

  #giga-inventory-table td:first-child strong {
    max-width: 100%;
    font-size: 13px;
  }

  #giga-inventory-table td:first-child small {
    max-width: 100%;
    line-height: 1.5;
  }

  #giga-inventory-table td:nth-child(4),
  #giga-inventory-table td:nth-child(5),
  #giga-inventory-table td:nth-child(6) {
    grid-column: 1 / -1;
  }

  #giga-inventory-table .inventory-row-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    padding-block: 10px;
    border-bottom: 0;
  }

  #giga-inventory-table .inventory-row-actions .row-action {
    min-width: 76px;
  }

  .giga-inventory-panel {
    padding-inline: 14px;
  }

  .pagination-row {
    position: sticky;
    bottom: 8px;
    z-index: 4;
    padding: 8px;
    border: 1px solid #e2e4e7;
    border-radius: 12px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 22px rgba(17, 17, 22, .08);
    backdrop-filter: blur(12px);
  }

  .pagination-row span {
    min-width: 0;
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .inventory-summary-card,
  .giga-inventory-scroll tbody tr,
  .inventory-write-metrics article {
    transition: none;
  }
}

/* 2026-11-17 妙创ERP AI brand home */
.mc-home {
  --mc-ink: #101115;
  --mc-paper: #f6f6f3;
  --mc-soft: #eceee9;
  --mc-line: #dde0da;
  --mc-cyan: #25f4ee;
  --mc-coral: #fe2c55;
  --mc-lime: #b8f63d;
  min-height: 100vh;
  overflow: hidden;
  background: var(--mc-paper);
  color: var(--mc-ink);
}

.mc-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 4vw, 70px);
  min-height: 78px;
  padding: 10px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid rgba(16, 17, 21, .09);
  background: rgba(249, 250, 247, .92);
  box-shadow: 0 12px 34px rgba(16, 17, 21, .04);
  backdrop-filter: blur(22px);
}

.mc-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--mc-ink);
  text-decoration: none;
}

.mc-brand .brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.mc-brand-copy {
  display: grid;
  gap: 2px;
}

.mc-brand-copy strong {
  color: var(--mc-ink);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.mc-brand-copy small {
  color: #8b8e94;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .15em;
}

.mc-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.4vw, 36px);
  min-width: 0;
}

.mc-nav a {
  position: relative;
  padding: 9px 0;
  color: #62656d;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease;
}

.mc-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--mc-coral), var(--mc-cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}

.mc-nav a:hover,
.mc-nav a.active {
  color: var(--mc-ink);
}

.mc-nav a:hover::after,
.mc-nav a.active::after {
  transform: scaleX(1);
}

.mc-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.mc-internal {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #73767d;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.mc-internal i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #20c77a;
  box-shadow: 0 0 0 4px rgba(32, 199, 122, .1);
}

.mc-login,
.mc-preview,
.mc-primary,
.mc-secondary {
  min-height: 46px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.mc-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 18px;
  border: 1px solid #111116;
  background: #d9fff8;
  color: #111116;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.mc-preview:hover {
  background: #25f4ee;
  box-shadow: 5px 5px 0 #111116;
  transform: translate(-1px, -1px);
}

.mc-preview:disabled {
  cursor: wait;
  opacity: .72;
  transform: none;
}

.mc-preview span {
  color: #e0244b;
  font-weight: 900;
}

.mc-login {
  padding: 0 18px;
  border: 0;
  background: var(--mc-ink);
  color: #fff;
  transition: transform .18s ease, background .18s ease;
}

.mc-login span {
  margin-left: 6px;
  color: var(--mc-cyan);
}

.mc-login:hover {
  background: var(--mc-coral);
  transform: translateY(-1px);
}

.mc-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(480px, .98fr);
  align-items: center;
  gap: clamp(36px, 5.5vw, 92px);
  min-height: calc(100svh - 78px);
  padding: clamp(70px, 7vw, 112px) clamp(18px, 5vw, 82px) clamp(66px, 7vw, 104px);
}

.mc-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 78% 23%, rgba(37, 244, 238, .17), transparent 28rem),
    radial-gradient(circle at 8% 78%, rgba(254, 44, 85, .08), transparent 28rem),
    linear-gradient(rgba(16, 17, 21, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 17, 21, .035) 1px, transparent 1px);
  background-size: auto, auto, 68px 68px, 68px 68px;
  mask-image: linear-gradient(to bottom, #000 65%, transparent 100%);
}

.mc-hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  max-width: 790px;
}

.mc-kicker,
.mc-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: #777a81;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
}

.mc-kicker .live-dot {
  flex: 0 0 auto;
}

.mc-hero h1 {
  max-width: 840px;
  margin: 0;
  color: var(--mc-ink);
  font-size: clamp(58px, 7.4vw, 110px);
  font-weight: 900;
  letter-spacing: -.075em;
  line-height: .92;
}

.mc-hero h1 span {
  position: relative;
  display: inline-block;
  z-index: 0;
  color: var(--mc-coral);
}

.mc-hero h1 span::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -.02em;
  right: -.03em;
  bottom: .06em;
  height: .22em;
  border-radius: 999px;
  background: var(--mc-cyan);
  transform: rotate(-1.2deg);
}

.mc-hero-copy > p {
  max-width: 690px;
  margin: 28px 0 0;
  color: #666970;
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.8;
}

.mc-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.mc-primary,
.mc-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 26px;
  border: 1px solid transparent;
  text-decoration: none;
}

.mc-primary {
  background: var(--mc-coral);
  color: #fff;
  box-shadow: 8px 0 0 -4px var(--mc-cyan);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.mc-primary:hover {
  background: var(--mc-ink);
  box-shadow: -8px 0 0 -4px var(--mc-cyan);
  transform: translateY(-2px);
}

.mc-primary span {
  color: var(--mc-cyan);
}

.mc-secondary {
  border-color: #d8dad6;
  background: #fff;
  color: var(--mc-ink);
  transition: border-color .2s ease, transform .2s ease;
}

.mc-secondary:hover {
  border-color: var(--mc-ink);
  transform: translateY(-2px);
}

.mc-hero-trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 690px;
  margin-top: 46px;
  padding-top: 24px;
  border-top: 1px solid #d9dbd6;
}

.mc-hero-trust div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mc-hero-trust strong {
  color: var(--mc-ink);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .04em;
}

.mc-hero-trust span {
  color: #7d8087;
  font-size: 12px;
  line-height: 1.45;
}

.mc-console-wrap {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.mc-console-wrap::before {
  content: "";
  position: absolute;
  inset: 8% -7% -7% 9%;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(37, 244, 238, .25), rgba(254, 44, 85, .12));
  filter: blur(24px);
}

.mc-console {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 28px;
  background: #101116;
  box-shadow: 0 32px 80px rgba(16, 17, 21, .23);
  color: #fff;
  transform: perspective(1400px) rotateY(-2.4deg) rotateX(1deg);
  transform-origin: center;
}

.mc-console::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 85% 0, rgba(37, 244, 238, .17), transparent 30%),
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: auto, 36px 36px, 36px 36px;
  mask-image: linear-gradient(to bottom, #000, transparent 86%);
}

.mc-console-head,
.mc-console-grid,
.mc-console-foot {
  position: relative;
  z-index: 2;
}

.mc-console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 4px 16px;
}

.mc-console-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mc-mini-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fff;
  color: var(--mc-ink);
  box-shadow: 5px 0 0 -2px var(--mc-cyan), -5px 0 0 -2px var(--mc-coral);
  font-size: 15px;
  font-weight: 900;
}

.mc-console-brand div {
  display: grid;
}

.mc-console-brand strong {
  font-size: 14px;
  font-weight: 850;
}

.mc-console-brand small {
  color: #747780;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .12em;
}

.mc-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(37, 244, 238, .19);
  border-radius: 999px;
  background: rgba(37, 244, 238, .07);
  color: #9bf8f4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
}

.mc-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mc-cyan);
  box-shadow: 0 0 14px var(--mc-cyan);
  animation: breathe 2s ease-in-out infinite;
}

.mc-console-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(180px, .7fr);
  gap: 11px;
}

.mc-ai-brief {
  min-width: 0;
  padding: 22px;
  border-radius: 20px;
  background: #f7f8f5;
  color: var(--mc-ink);
}

.mc-card-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #757880;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.mc-card-label b {
  color: #9a9ca2;
  font-size: 11px;
  letter-spacing: .12em;
}

.mc-card-label em {
  color: #757880;
  font-size: 11px;
  font-style: normal;
}

.mc-ai-brief h2 {
  max-width: 420px;
  margin: 16px 0 18px;
  color: var(--mc-ink);
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1.08;
}

.mc-signal-list {
  display: grid;
  gap: 8px;
}

.mc-signal-list > div {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border: 1px solid #e4e6e1;
  border-radius: 12px;
  background: #fff;
}

.mc-signal-list .signal {
  width: 8px;
  height: 28px;
  border-radius: 99px;
}

.signal.coral { background: var(--mc-coral); }
.signal.cyan { background: #21cfc9; }
.signal.amber { background: #ffb020; }

.mc-signal-list span {
  display: grid;
  min-width: 0;
}

.mc-signal-list strong {
  color: var(--mc-ink);
  font-size: 12px;
  font-weight: 800;
}

.mc-signal-list small {
  overflow: hidden;
  color: #7b7e85;
  font-size: 11px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-signal-list b {
  color: #a1a3a9;
  font-size: 11px;
  letter-spacing: .08em;
}

.mc-ai-prompt {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--mc-ink);
  color: #fff;
}

.mc-ai-prompt > span {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--mc-cyan);
  color: var(--mc-ink);
  font-size: 11px;
  font-weight: 900;
}

.mc-ai-prompt p {
  overflow: hidden;
  margin: 0;
  color: #b8bac0;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-ai-prompt kbd {
  color: #777a82;
  font: 11px var(--mono);
}

.mc-console-side {
  display: grid;
  gap: 11px;
  min-width: 0;
}

.mc-mini-card {
  position: relative;
  overflow: hidden;
  min-height: 134px;
  padding: 16px;
  border: 1px solid #25272e;
  border-radius: 17px;
  background: #181a20;
}

.mc-mini-card.dark {
  background: #090a0d;
}

.mc-mini-card > span {
  color: #858891;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .05em;
}

.mc-mini-card > strong {
  display: block;
  margin-top: 7px;
  color: #fff;
  font-size: 17px;
  font-weight: 850;
}

.mc-mini-card > p {
  max-width: 170px;
  margin: 5px 0 0;
  color: #73767e;
  font-size: 11px;
  line-height: 1.5;
}

.mc-wave {
  position: absolute;
  right: 13px;
  bottom: 13px;
  display: flex;
  align-items: end;
  gap: 3px;
  height: 34px;
}

.mc-wave i {
  width: 4px;
  border-radius: 99px;
  background: linear-gradient(to top, #1a9d99, var(--mc-cyan));
}

.mc-wave i:nth-child(1) { height: 12px; }
.mc-wave i:nth-child(2) { height: 22px; }
.mc-wave i:nth-child(3) { height: 16px; }
.mc-wave i:nth-child(4) { height: 30px; }
.mc-wave i:nth-child(5) { height: 20px; }
.mc-wave i:nth-child(6) { height: 34px; }
.mc-wave i:nth-child(7) { height: 24px; }

.mc-orbit-mini {
  position: absolute;
  right: 15px;
  bottom: 12px;
  width: 55px;
  height: 55px;
  border: 1px solid rgba(254, 44, 85, .35);
  border-radius: 50%;
}

.mc-orbit-mini::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(37, 244, 238, .3);
  border-radius: 50%;
}

.mc-orbit-mini i,
.mc-orbit-mini b {
  position: absolute;
  border-radius: 50%;
}

.mc-orbit-mini i {
  width: 7px;
  height: 7px;
  left: 6px;
  top: 15px;
  background: var(--mc-coral);
}

.mc-orbit-mini b {
  width: 6px;
  height: 6px;
  right: 8px;
  bottom: 13px;
  background: var(--mc-cyan);
}

.mc-command-feed {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
  border: 1px solid #272930;
  border-radius: 17px;
  background: #17181e;
}

.mc-command-feed > .mc-card-label {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.mc-feed-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 8px;
  padding: 10px;
  border-radius: 12px;
  background: #202127;
}

.mc-feed-row > span {
  grid-row: 1 / span 2;
  color: var(--mc-cyan);
  font: 11px var(--mono);
}

.mc-feed-row strong {
  color: #fff;
  font-size: 11px;
}

.mc-feed-row small {
  overflow: hidden;
  color: #81848c;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-feed-row i {
  display: none;
}

.mc-console-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 4px 1px;
  color: #696c74;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .08em;
}

.mc-console-foot span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mc-console-foot i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mc-cyan);
}

.mc-marquee {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: clamp(18px, 4vw, 60px);
  padding: 19px clamp(18px, 5vw, 82px);
  border-top: 1px solid var(--mc-line);
  border-bottom: 1px solid var(--mc-line);
  background: #fff;
}

.mc-marquee > span {
  color: var(--mc-coral);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .1em;
  white-space: nowrap;
}

.mc-marquee > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-width: 0;
  color: #363940;
  font-size: 13px;
}

.mc-marquee b {
  white-space: nowrap;
}

.mc-marquee i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d9dbd6, transparent);
}

.mc-section {
  padding: clamp(76px, 10vw, 142px) clamp(18px, 6vw, 98px);
}

.mc-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr);
  align-items: end;
  gap: clamp(30px, 7vw, 110px);
  max-width: 1440px;
  margin: 0 auto clamp(38px, 5vw, 64px);
}

.mc-section-head h2 {
  margin: 0;
  color: var(--mc-ink);
  font-size: clamp(42px, 5.5vw, 78px);
  font-weight: 900;
  letter-spacing: -.065em;
  line-height: .98;
}

.mc-section-head > p:last-child {
  max-width: 540px;
  margin: 0 0 5px;
  color: #6d7077;
  font-size: 16px;
  line-height: 1.8;
}

.mc-ai-section {
  background: #f1f2ee;
}

.mc-ai-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 18px;
  max-width: 1440px;
  margin: 0 auto;
}

.mc-ai-feature {
  position: relative;
  overflow: hidden;
  min-height: 480px;
  padding: clamp(26px, 4vw, 46px);
  border-radius: 26px;
  background:
    radial-gradient(circle at 88% 12%, rgba(37, 244, 238, .2), transparent 25%),
    radial-gradient(circle at 10% 100%, rgba(254, 44, 85, .16), transparent 28%),
    var(--mc-ink);
  color: #fff;
}

.mc-ai-feature::after {
  content: "AI";
  position: absolute;
  right: -8px;
  bottom: -45px;
  color: rgba(255, 255, 255, .035);
  font-size: 230px;
  font-weight: 900;
  letter-spacing: -.12em;
  line-height: 1;
}

.mc-feature-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #83868e;
  font-size: 11px;
  font-weight: 750;
}

.mc-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid #dfe1dd;
  border-radius: 999px;
  background: #f5f6f3;
  color: #55585f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  white-space: nowrap;
}

.mc-tag.cyan {
  border-color: rgba(37, 244, 238, .24);
  background: rgba(37, 244, 238, .09);
  color: #25d8d2;
}

.mc-tag.coral {
  border-color: rgba(254, 44, 85, .2);
  background: rgba(254, 44, 85, .08);
  color: #e7274b;
}

.mc-ai-feature h3 {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 38px 0 18px;
  color: #fff;
  font-size: clamp(34px, 4.2vw, 60px);
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: 1.03;
}

.mc-ai-feature > p {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0;
  color: #989ba3;
  font-size: 15px;
  line-height: 1.8;
}

.mc-context-line {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 34px;
  color: #cfd1d5;
  font-size: 12px;
}

.mc-context-line span {
  padding: 7px 9px;
  border: 1px solid #35373e;
  border-radius: 8px;
  background: #1a1b21;
  white-space: nowrap;
}

.mc-context-line i {
  width: 10px;
  height: 1px;
  background: #4d5058;
}

.mc-ai-note {
  position: absolute;
  z-index: 1;
  left: clamp(26px, 4vw, 46px);
  right: clamp(26px, 4vw, 46px);
  bottom: clamp(24px, 4vw, 40px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(37, 244, 238, .16);
  border-radius: 14px;
  background: rgba(37, 244, 238, .055);
}

.mc-ai-note span {
  padding: 4px 7px;
  border-radius: 99px;
  background: var(--mc-cyan);
  color: var(--mc-ink);
  font-size: 11px;
  font-weight: 850;
}

.mc-ai-note p {
  margin: 0;
  color: #a8aab0;
  font-size: 12px;
  line-height: 1.65;
}

.mc-ai-capabilities {
  display: grid;
  gap: 12px;
}

.mc-ai-capabilities article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 145px;
  padding: 24px;
  border: 1px solid #dcdfda;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(16, 17, 21, .035);
  transition: transform .2s ease, box-shadow .2s ease;
}

.mc-ai-capabilities article:hover {
  box-shadow: 0 20px 42px rgba(16, 17, 21, .075);
  transform: translateY(-3px);
}

.mc-ai-capabilities article > span {
  align-self: start;
  color: var(--mc-coral);
  font: 12px var(--mono);
}

.mc-ai-capabilities b {
  display: block;
  margin-bottom: 7px;
  color: var(--mc-ink);
  font-size: 20px;
  font-weight: 900;
}

.mc-ai-capabilities p {
  margin: 0;
  color: #73767d;
  font-size: 13px;
  line-height: 1.65;
}

.mc-ai-capabilities em {
  align-self: start;
  color: #a0a2a8;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .1em;
}

.mc-roadmap-note {
  max-width: 1100px;
  margin: 22px auto 0;
  color: #7d8087;
  font-size: 12px;
  line-height: 1.65;
  text-align: center;
}

.mc-roadmap-note span {
  display: inline-flex;
  margin-right: 7px;
  padding: 3px 7px;
  border-radius: 99px;
  background: var(--mc-ink);
  color: var(--mc-cyan);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .06em;
}

.mc-modules-section {
  background: #fff;
}

.mc-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  max-width: 1440px;
  margin: 0 auto;
}

.mc-module {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  padding: 25px;
  border: 1px solid #e0e2de;
  border-radius: 21px;
  background: #f8f9f6;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.mc-module:hover {
  border-color: #cfd2cc;
  box-shadow: 0 20px 44px rgba(16, 17, 21, .07);
  transform: translateY(-4px);
}

.mc-module.featured {
  grid-column: span 2;
  background:
    radial-gradient(circle at 91% 15%, rgba(254, 44, 85, .16), transparent 27%),
    radial-gradient(circle at 75% 90%, rgba(37, 244, 238, .16), transparent 30%),
    var(--mc-ink);
  color: #fff;
}

.mc-module.module-dark {
  background: linear-gradient(145deg, #181a20, #0c0d11);
  color: #fff;
}

.mc-module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mc-module-head > span {
  color: #8e9197;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.mc-module-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-top: 30px;
  border: 1px solid #d9dcd6;
  border-radius: 14px;
  background: #fff;
  color: var(--mc-coral);
  font-size: 22px;
  font-weight: 800;
}

.mc-module.featured .mc-module-icon,
.module-dark .mc-module-icon {
  border-color: #373941;
  background: #1e2026;
  color: var(--mc-cyan);
}

.mc-module h3 {
  margin: 23px 0 11px;
  color: var(--mc-ink);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -.035em;
}

.mc-module.featured h3,
.mc-module.module-dark h3 {
  color: #fff;
}

.mc-module p {
  max-width: 520px;
  margin: 0;
  color: #70737a;
  font-size: 14px;
  line-height: 1.75;
}

.mc-module.featured p,
.mc-module.module-dark p {
  color: #9a9da5;
}

.mc-module-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 25px;
}

.mc-module-meta span {
  padding: 5px 8px;
  border: 1px solid #e1e3df;
  border-radius: 6px;
  background: #fff;
  color: #777a81;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
}

.mc-module.featured .mc-module-meta span,
.mc-module.module-dark .mc-module-meta span {
  border-color: #35373e;
  background: #1b1c22;
  color: #858890;
}

.mc-workflow-section {
  background: var(--mc-ink);
  color: #fff;
}

.mc-workflow-section .mc-eyebrow {
  color: var(--mc-cyan);
}

.mc-workflow-section .mc-section-head h2 {
  color: #fff;
}

.mc-workflow-section .mc-section-head > p:last-child {
  color: #8e9199;
}

.mc-workflow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1440px;
  margin: 0 auto;
  border-top: 1px solid #35373e;
}

.mc-workflow article {
  position: relative;
  min-height: 250px;
  padding: 28px 28px 20px 0;
  border-right: 1px solid #292b31;
}

.mc-workflow article:last-child {
  border-right: 0;
}

.mc-workflow article::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mc-cyan);
  box-shadow: 0 0 16px var(--mc-cyan);
}

.mc-workflow article > span {
  color: #6f727a;
  font: 11px var(--mono);
}

.mc-step-icon {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  margin-top: 28px;
  border: 1px solid #36383f;
  border-radius: 13px;
  background: #1a1b21;
  color: var(--mc-cyan);
  font-size: 20px;
}

.mc-workflow strong {
  display: block;
  margin-top: 20px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.mc-workflow p {
  max-width: 260px;
  margin: 9px 0 0;
  color: #8b8e96;
  font-size: 13px;
  line-height: 1.7;
}

.mc-workflow small {
  display: block;
  margin-top: 18px;
  color: #555860;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.mc-security-section {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(340px, 1.05fr);
  gap: clamp(40px, 8vw, 130px);
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(76px, 10vw, 140px) clamp(18px, 6vw, 98px);
  background: #f2f3ef;
}

.mc-security-copy h2 {
  margin: 0;
  color: var(--mc-ink);
  font-size: clamp(44px, 5.3vw, 76px);
  font-weight: 900;
  letter-spacing: -.06em;
  line-height: .98;
}

.mc-security-copy > p:not(.mc-eyebrow) {
  max-width: 540px;
  margin: 24px 0 0;
  color: #6f7279;
  font-size: 16px;
  line-height: 1.8;
}

.mc-security-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 30px;
  padding: 9px 12px;
  border: 1px solid #d8dbd5;
  border-radius: 999px;
  background: #fff;
  color: #64676e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.mc-security-list {
  display: grid;
  align-content: center;
}

.mc-security-list article {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid #d9dbd6;
}

.mc-security-list article:first-child {
  border-top: 1px solid #d9dbd6;
}

.mc-security-list article > span {
  color: var(--mc-coral);
  font: 11px var(--mono);
}

.mc-security-list strong {
  color: var(--mc-ink);
  font-size: 18px;
  font-weight: 850;
}

.mc-security-list p {
  margin: 6px 0 0;
  color: #74777e;
  font-size: 13px;
  line-height: 1.65;
}

.mc-final-cta {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  max-width: 1300px;
  margin: clamp(50px, 7vw, 92px) auto;
  padding: clamp(34px, 5vw, 64px);
  border-radius: 28px;
  background:
    radial-gradient(circle at 80% 15%, rgba(37, 244, 238, .2), transparent 28%),
    radial-gradient(circle at 22% 100%, rgba(254, 44, 85, .22), transparent 32%),
    var(--mc-ink);
  color: #fff;
}

.mc-final-cta > div:not(.mc-cta-orbit) {
  position: relative;
  z-index: 2;
}

.mc-final-cta .mc-eyebrow {
  color: var(--mc-cyan);
}

.mc-final-cta h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(38px, 4.8vw, 70px);
  font-weight: 900;
  letter-spacing: -.06em;
  line-height: 1;
}

.mc-final-cta p:last-child {
  margin: 18px 0 0;
  color: #9a9da4;
  font-size: 15px;
}

.mc-primary.light {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  background: #fff;
  color: var(--mc-ink);
  box-shadow: 8px 0 0 -4px var(--mc-coral);
}

.mc-primary.light:hover {
  background: var(--mc-cyan);
  color: var(--mc-ink);
}

.mc-cta-orbit {
  position: absolute;
  right: -90px;
  top: -100px;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(37, 244, 238, .16);
  border-radius: 50%;
}

.mc-cta-orbit::before {
  content: "";
  position: absolute;
  inset: 54px;
  border: 1px solid rgba(254, 44, 85, .18);
  border-radius: 50%;
}

.mc-cta-orbit i,
.mc-cta-orbit b {
  position: absolute;
  border-radius: 50%;
}

.mc-cta-orbit i {
  width: 8px;
  height: 8px;
  left: 48px;
  top: 62px;
  background: var(--mc-cyan);
  box-shadow: 0 0 18px var(--mc-cyan);
}

.mc-cta-orbit b {
  width: 9px;
  height: 9px;
  right: 43px;
  bottom: 68px;
  background: var(--mc-coral);
  box-shadow: 0 0 18px var(--mc-coral);
}

.mc-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 24px;
  padding: 26px clamp(18px, 5vw, 82px);
  border-top: 1px solid #dcded9;
  background: #fff;
}

.footer-brand .brand-mark {
  width: 34px;
  height: 34px;
}

.footer-brand .mc-brand-copy strong {
  font-size: 17px;
}

.mc-footer p {
  margin: 0;
  color: #777a81;
  font-size: 12px;
  text-align: center;
}

.mc-footer > button {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--mc-ink);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 1180px) {
  .mc-header {
    gap: 22px;
  }

  .mc-nav {
    gap: 18px;
  }

  .mc-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 48px;
  }

  .mc-hero-copy {
    max-width: 920px;
  }

  .mc-console-wrap {
    width: 100%;
    max-width: 850px;
    margin-inline: auto;
  }

  .mc-console {
    transform: none;
  }

  .mc-ai-grid {
    grid-template-columns: 1fr;
  }

  .mc-ai-feature {
    min-height: 520px;
  }

  .mc-ai-capabilities {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mc-ai-capabilities article {
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: start;
    min-height: 190px;
  }

  .mc-ai-capabilities em {
    display: none;
  }

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

  .mc-module.featured {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .mc-header {
    grid-template-columns: 1fr auto;
    padding-block: 10px;
  }

  .mc-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .mc-nav::-webkit-scrollbar {
    display: none;
  }

  .mc-nav a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid #dadcd7;
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
  }

  .mc-nav a::after {
    display: none;
  }

  .mc-nav a.active {
    border-color: var(--mc-ink);
    background: var(--mc-ink);
    color: #fff;
  }

  .mc-marquee {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .mc-marquee > div {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .mc-marquee i {
    display: none;
  }

  .mc-section-head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 22px;
  }

  .mc-section-head > p:last-child {
    max-width: 680px;
  }

  .mc-ai-capabilities {
    grid-template-columns: 1fr;
  }

  .mc-ai-capabilities article {
    min-height: 130px;
  }

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

  .mc-workflow article:nth-child(2) {
    border-right: 0;
  }

  .mc-security-section {
    grid-template-columns: 1fr;
  }

  .mc-final-cta {
    margin-inline: 18px;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .mc-header {
    min-height: 70px;
    padding-inline: 14px;
  }

  .mc-brand .brand-mark {
    width: 36px;
    height: 36px;
  }

  .mc-brand-copy strong {
    font-size: 18px;
  }

  .mc-brand-copy small {
    font-size: 11px;
  }

  .mc-internal {
    display: none;
  }

  .mc-login {
    min-height: 42px;
    padding-inline: 13px;
    font-size: 12px;
  }

  .header-preview {
    display: none;
  }

  .mc-hero {
    gap: 38px;
    padding: 50px 14px 62px;
  }

  .mc-kicker {
    margin-bottom: 16px;
    font-size: 11px;
  }

  .mc-hero h1 {
    max-width: 560px;
    font-size: clamp(48px, 14vw, 70px);
    line-height: .95;
  }

  .mc-hero-copy > p {
    margin-top: 22px;
    font-size: 15px;
    line-height: 1.75;
  }

  .mc-hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 26px;
  }

  .mc-primary,
  .mc-preview,
  .mc-secondary {
    width: 100%;
    min-height: 48px;
  }

  .mc-hero-trust {
    gap: 10px;
    margin-top: 34px;
    padding-top: 18px;
  }

  .mc-hero-trust strong {
    font-size: 11px;
  }

  .mc-hero-trust span {
    font-size: 11px;
  }

  .mc-console {
    padding: 13px;
    border-radius: 21px;
  }

  .mc-console-head {
    padding-bottom: 12px;
  }

  .mc-live {
    padding: 6px 8px;
    font-size: 11px;
  }

  .mc-console-grid {
    grid-template-columns: 1fr;
  }

  .mc-ai-brief {
    padding: 17px;
  }

  .mc-ai-brief h2 {
    font-size: 26px;
  }

  .mc-signal-list small {
    white-space: normal;
  }

  .mc-signal-list > div {
    align-items: start;
  }

  .mc-signal-list b {
    padding-top: 2px;
  }

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

  .mc-mini-card {
    min-height: 132px;
    padding: 14px;
  }

  .mc-mini-card > p {
    max-width: 130px;
    font-size: 11px;
  }

  .mc-command-feed {
    grid-template-columns: 1fr;
  }

  .mc-console-foot {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px 15px;
  }

  .mc-marquee {
    padding-inline: 14px;
  }

  .mc-marquee > div {
    gap: 7px;
  }

  .mc-marquee b {
    padding: 5px 8px;
    border: 1px solid #e1e3de;
    border-radius: 999px;
    background: #f8f9f6;
    font-size: 11px;
  }

  .mc-section {
    padding: 72px 14px;
  }

  .mc-section-head {
    margin-bottom: 32px;
  }

  .mc-section-head h2,
  .mc-security-copy h2 {
    font-size: clamp(39px, 12vw, 54px);
    line-height: 1;
  }

  .mc-section-head > p:last-child,
  .mc-security-copy > p:not(.mc-eyebrow) {
    font-size: 14px;
    line-height: 1.75;
  }

  .mc-ai-feature {
    min-height: 580px;
    padding: 24px 19px;
    border-radius: 21px;
  }

  .mc-ai-feature h3 {
    margin-top: 30px;
    font-size: 38px;
  }

  .mc-ai-feature > p {
    font-size: 13px;
  }

  .mc-context-line {
    flex-wrap: wrap;
    margin-top: 24px;
  }

  .mc-context-line i {
    display: none;
  }

  .mc-context-line span {
    font-size: 11px;
  }

  .mc-ai-note {
    left: 19px;
    right: 19px;
    bottom: 20px;
    grid-template-columns: 1fr;
  }

  .mc-ai-capabilities article {
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: 0;
    padding: 20px 17px;
    border-radius: 17px;
  }

  .mc-ai-capabilities b {
    font-size: 18px;
  }

  .mc-module-grid {
    grid-template-columns: 1fr;
  }

  .mc-module,
  .mc-module.featured {
    grid-column: auto;
    min-height: 280px;
    padding: 21px;
  }

  .mc-module h3 {
    font-size: 22px;
  }

  .mc-workflow {
    grid-template-columns: 1fr;
    border-top: 0;
  }

  .mc-workflow article {
    min-height: 0;
    padding: 24px 0 25px 34px;
    border-top: 1px solid #303238;
    border-right: 0;
  }

  .mc-workflow article::before {
    top: 28px;
  }

  .mc-step-icon {
    float: left;
    margin: 0 16px 0 0;
  }

  .mc-workflow strong {
    margin-top: 9px;
    font-size: 19px;
  }

  .mc-workflow p {
    clear: both;
    max-width: none;
  }

  .mc-security-section {
    gap: 34px;
    padding: 72px 14px;
  }

  .mc-security-list article {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 12px;
    padding: 18px 0;
  }

  .mc-final-cta {
    gap: 26px;
    margin: 54px 14px;
    padding: 28px 20px 24px;
    border-radius: 22px;
  }

  .mc-final-cta h2 {
    font-size: 39px;
  }

  .mc-final-cta .mc-primary {
    width: 100%;
  }

  .mc-footer {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 24px 14px;
  }

  .mc-footer p {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mc-nav a,
  .mc-nav a::after,
  .mc-login,
  .mc-preview,
  .mc-primary,
  .mc-secondary,
  .mc-ai-capabilities article,
  .mc-module {
    transition: none;
  }

  .mc-live i {
    animation: none;
  }
}

/* Procurement center */
.procurement-view {
  --procurement-giga: #fe2c55;
  --procurement-self: #25b9b3;
}

.procurement-head {
  align-items: flex-end;
}

.procurement-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.procurement-search {
  position: relative;
  display: block;
  width: min(350px, 36vw);
}

.procurement-search > span {
  position: absolute;
  left: 13px;
  top: 50%;
  z-index: 1;
  color: #8b8d94;
  font-size: 18px;
  transform: translateY(-50%);
  pointer-events: none;
}

.procurement-search .search {
  width: 100%;
  padding-left: 38px;
}

.procurement-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.procurement-summary article {
  position: relative;
  min-height: 124px;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  padding: 18px 19px;
  border: 1px solid #e2e4e7;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(17, 17, 22, .045);
}

.procurement-summary article::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--procurement-giga);
}

.procurement-summary article:nth-child(2)::before {
  background: #ffb020;
}

.procurement-summary article:nth-child(3)::before {
  background: #111116;
}

.procurement-summary article:nth-child(4)::before {
  background: var(--procurement-self);
}

.procurement-summary span {
  color: #686b72;
  font-size: 13px;
  font-weight: 650;
}

.procurement-summary strong {
  margin-top: auto;
  color: #111116;
  font-family: var(--sans);
  font-size: 30px;
  font-weight: 850;
  letter-spacing: -.04em;
  line-height: 1.05;
}

.procurement-summary small {
  margin-top: 5px;
  color: #7c7f86;
  font-size: 12px;
}

.procurement-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 13px;
  padding: 5px;
  border: 1px solid #e0e2e5;
  border-radius: 14px;
  background: #eceef0;
}

.procurement-tabs button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 17px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #62656c;
  font-size: 13px;
  font-weight: 780;
}

.procurement-tabs button > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #dde0e3;
  color: #55585f;
  font-size: 11px;
  font-weight: 900;
}

.procurement-tabs button.active {
  background: #111116;
  color: #fff;
  box-shadow: inset 3px 0 var(--procurement-giga);
}

.procurement-tabs button.active > span {
  background: var(--procurement-giga);
  color: #fff;
}

.procurement-tabs button[data-procurement-tab="selfship"].active {
  box-shadow: inset 3px 0 var(--procurement-self);
}

.procurement-tabs button[data-procurement-tab="selfship"].active > span {
  background: var(--procurement-self);
}

.procurement-tabs em {
  margin-left: auto;
  padding-right: 10px;
  color: #7d8087;
  font-size: 12px;
  font-style: normal;
}

.procurement-panel {
  border-top: 4px solid #111116;
}

.procurement-panel[data-procurement-panel="giga"] {
  border-top-color: var(--procurement-giga);
}

.procurement-panel[data-procurement-panel="selfship"] {
  border-top-color: var(--procurement-self);
}

.procurement-panel[hidden] {
  display: none;
}

.procurement-panel-head {
  align-items: center;
}

.procurement-scroll {
  max-height: min(62vh, 700px);
  overflow: auto;
  border: 1px solid #eceef1;
  border-radius: 12px;
  scrollbar-gutter: stable;
}

.procurement-table {
  width: 100%;
  min-width: 1280px;
}

.selfship-procurement-table {
  min-width: 1980px;
}

.procurement-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: rgba(248, 249, 250, .98);
  backdrop-filter: blur(10px);
}

.procurement-table thead th.procurement-sticky-actions {
  left: 0;
  z-index: 6;
  min-width: 218px;
  background: #eceef0;
  box-shadow: 8px 0 14px rgba(17, 17, 22, .08);
}

.procurement-table tbody tr {
  transition: background .18s ease;
}

.procurement-table tbody tr:hover {
  background: #fafbfc;
}

.procurement-table tbody tr.procurement-urgent {
  box-shadow: inset 4px 0 #fe2c55;
  background: #fff8f9;
}

.procurement-table td {
  vertical-align: middle;
}

.procurement-table td small {
  display: block;
  max-width: 330px;
}

.procurement-sku {
  display: inline-block;
  max-width: 165px;
  overflow: hidden;
  padding: 3px 6px;
  border-radius: 5px;
  background: #f1f3f5;
  color: #44474e;
  font: 11px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.procurement-muted,
.procurement-missing {
  color: #92949b;
  font-size: 12px;
}

.procurement-missing {
  display: inline-flex;
  padding: 4px 7px;
  border: 1px dashed #d7d9de;
  border-radius: 6px;
  background: #fafafa;
  color: #9a6500;
}

.procurement-thumb {
  width: 44px;
  height: 44px;
  display: block;
  border: 1px solid #e2e4e7;
  border-radius: 8px;
  object-fit: cover;
  background: #f4f5f6;
}

.procurement-address strong {
  max-width: 250px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.selfship-procurement-table a {
  color: #d51d43;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.selfship-procurement-table .row-action {
  white-space: nowrap;
}

.selfship-procurement-table td[data-label="订单编号"] {
  min-width: 220px;
}

.selfship-procurement-table td[data-label="订单编号"] small,
.selfship-procurement-table td[data-label="联系电话"],
.selfship-procurement-table td[data-label="邮编"],
.selfship-procurement-table td[data-label="运单号"] {
  white-space: nowrap;
}

.procurement-order-number {
  display: block;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  white-space: nowrap;
}

.selfship-procurement-table td.procurement-sticky-actions {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 218px;
  background: #fff;
  box-shadow: 8px 0 14px rgba(17, 17, 22, .07);
}

.selfship-procurement-table tr.procurement-urgent td.procurement-sticky-actions {
  background: #fff8f9;
}

.selfship-procurement-table tbody tr:hover td.procurement-sticky-actions {
  background: #f7fbfb;
}

@media (max-width: 900px) {
  .procurement-head {
    align-items: stretch;
  }

  .procurement-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .procurement-search {
    width: 100%;
  }

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

@media (max-width: 680px) {
  .procurement-actions {
    grid-template-columns: 1fr;
  }

  .procurement-actions button,
  .procurement-tabs button {
    min-height: 44px;
  }

  .procurement-summary article {
    min-height: 118px;
    padding: 15px;
  }

  .procurement-summary strong {
    font-size: 26px;
  }

  .procurement-tabs {
    overflow-x: auto;
    align-items: center;
    scrollbar-width: none;
  }

  .procurement-tabs::-webkit-scrollbar {
    display: none;
  }

  .procurement-tabs button {
    flex: 0 0 auto;
    padding-inline: 12px;
  }

  .procurement-tabs em {
    flex: 0 0 auto;
    margin: 0;
    padding: 0 7px;
    white-space: nowrap;
  }

  .procurement-scroll {
    max-height: 68vh;
    border: 0;
    border-radius: 0;
  }

  .procurement-table,
  .procurement-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .procurement-table thead {
    display: none;
  }

  .procurement-table tbody {
    display: grid;
    gap: 10px;
  }

  .procurement-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #e4e6e9;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(17, 17, 22, .035);
  }

  .procurement-table td,
  .procurement-table td:first-child {
    position: static;
    display: block;
    min-width: 0;
    padding: 11px 13px;
    border: 0;
    border-bottom: 1px solid #eff1f3;
    background: transparent;
    box-shadow: none;
    text-align: left;
  }

  .procurement-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: #85878e;
    font-size: 11px;
    font-weight: 750;
  }

  .procurement-table td[data-label="订单编号"],
  .procurement-table td[data-label="产品颜色"],
  .procurement-table td[data-label="详细地址"],
  .procurement-table td[data-label="备注"],
  .procurement-table td[data-label="快速操作"] {
    grid-column: 1 / -1;
  }

  .procurement-table td[data-label="快速操作"] {
    position: static;
    display: flex;
    justify-content: flex-start;
    min-width: 0;
    padding: 10px 12px;
    background: #f7f9fa;
    box-shadow: none;
  }

  .procurement-table td[data-label="快速操作"]::before {
    display: none;
  }

  .procurement-table td[data-label="SKU图"] {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .procurement-table td[data-label="SKU图"]::before {
    margin: 0;
  }

  .procurement-thumb {
    width: 52px;
    height: 52px;
  }

  .procurement-sku {
    max-width: 100%;
  }
}

/* Self-ship purchase inside order center */
.order-center-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 5px;
  border: 1px solid #e0e2e5;
  border-radius: 14px;
  background: #eceef0;
}

.order-center-tabs button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 17px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #62656c;
  font-size: 13px;
  font-weight: 780;
}

.order-center-tabs button > span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #dde0e3;
  color: #55585f;
  font-size: 11px;
  font-weight: 900;
}

.order-center-tabs button.active {
  background: #111116;
  color: #fff;
  box-shadow: inset 3px 0 #fe2c55;
}

.order-center-tabs button.active > span {
  background: #fe2c55;
  color: #fff;
}

.order-center-tabs button[data-order-center-tab="selfship"].active {
  box-shadow: inset 3px 0 #25b9b3;
}

.order-center-tabs button[data-order-center-tab="selfship"].active > span {
  background: #25b9b3;
}

.order-center-tabs em {
  margin-left: auto;
  padding-right: 10px;
  color: #7d8087;
  font-size: 12px;
  font-style: normal;
}

[data-order-center-panel][hidden] {
  display: none;
}

.order-list-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.selfship-in-order-center {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 13px;
  min-width: 0;
  max-width: 100%;
}

.selfship-in-order-center > *,
.selfship-in-order-center .procurement-panel,
.selfship-in-order-center .procurement-scroll {
  min-width: 0;
  max-width: 100%;
}

.selfship-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e3e5e8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(17, 17, 22, .04);
}

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

.selfship-toolbar-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.copy-hint {
  padding: 11px 14px;
  border: 1px solid #cde8f5;
  border-radius: 11px;
  background: #f3fbff;
  color: #5c707d;
  font-size: 12px;
  line-height: 1.65;
}

.copy-hint strong {
  margin-right: 6px;
  color: #147aa3;
}

.procurement-row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.procurement-row-actions .row-action:first-child {
  border-color: #c6e7e4;
  color: #147f79;
}

.procurement-row-actions .copy-row-action {
  grid-column: 1 / -1;
  min-height: 42px;
  min-width: 96px;
  padding-inline: 14px;
  border-color: #111116;
  background: #111116;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .02em;
  box-shadow: 0 6px 16px rgba(17, 17, 22, .16);
}

.procurement-row-actions .cell-image-row-action {
  min-height: 36px;
  border-color: #b9dff7;
  background: #edf8ff;
  color: #0c6f9d;
  font-weight: 800;
}

.procurement-row-actions .cell-image-row-action:hover {
  border-color: #33a9df;
  background: #ddf3ff;
  color: #075c82;
}

.procurement-row-actions .copy-row-action:hover {
  border-color: #fe2c55;
  background: #fe2c55;
  color: #fff;
}

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

  .selfship-toolbar-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .procurement-row-actions .row-action {
    min-height: 44px;
  }

  .pagination-row button {
    min-height: 44px;
  }
}

@media (max-width: 680px) {
  .order-center-tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .order-center-tabs::-webkit-scrollbar {
    display: none;
  }

  .order-center-tabs button {
    flex: 0 0 auto;
    min-height: 44px;
  }

  .order-center-tabs em {
    flex: 0 0 auto;
    margin: 0;
    padding-inline: 8px;
    white-space: nowrap;
  }

  .order-list-toolbar {
    justify-content: stretch;
  }

  .order-list-toolbar .procurement-search {
    width: 100%;
  }

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

  .selfship-toolbar-actions .primary {
    grid-column: 1 / -1;
  }

  .procurement-row-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .procurement-row-actions .row-action {
    min-height: 44px;
  }
}

/* Internal account and permission management */
.nav-item[hidden] {
  display: none;
}

.side-account {
  position: relative;
  margin-top: 10px;
}

.side-account-trigger {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid #2c2e35;
  border-radius: 14px;
  background: #17181d;
  color: #fff;
  text-align: left;
}

.side-account-trigger:hover,
.side-account-trigger[aria-expanded="true"] {
  border-color: #3b3e46;
  background: #202127;
}

.side-account-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #25f4ee;
  color: #0c0d10;
  font-size: 17px;
  font-weight: 900;
}

.side-account-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.side-account-copy small,
.side-account-copy em {
  overflow: hidden;
  color: #8f929b;
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-account-copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-account-chevron {
  color: #838790;
  font-size: 14px;
  text-align: center;
  transition: transform .2s ease;
}

.side-account-trigger[aria-expanded="true"] .side-account-chevron {
  transform: rotate(180deg);
}

.side-account-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 9px);
  left: 0;
  z-index: 40;
  display: grid;
  gap: 6px;
  padding: 9px;
  border: 1px solid #30323a;
  border-radius: 15px;
  background: #15161b;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .42);
}

.side-account-menu[hidden],
.sidebar-menu-action[hidden] {
  display: none;
}

.side-account-detail {
  display: grid;
  gap: 4px;
  padding: 10px 10px 11px;
  border-bottom: 1px solid #2a2c33;
}

.side-account-detail span {
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.side-account-detail small {
  color: #858891;
  font-size: 11px;
  line-height: 1.55;
}

.sidebar-menu-action {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #fff;
  text-align: left;
}

.sidebar-menu-action:hover,
.sidebar-menu-action.active {
  border-color: #34363e;
  background: #202127;
}

.sidebar-menu-action > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #24262d;
  color: #25f4ee;
  font-size: 14px;
}

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

.sidebar-menu-action strong {
  color: #f6f7f9;
  font-size: 12px;
}

.sidebar-menu-action small {
  overflow: hidden;
  color: #858891;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-menu-action.sidebar-logout {
  border-top-color: #2a2c33;
  color: #ff8fa4;
}

.sidebar-menu-action.sidebar-logout > span {
  background: rgba(254, 44, 85, .12);
  color: #ff8fa4;
}

.user-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.user-summary article {
  display: grid;
  gap: 6px;
  min-height: 122px;
  align-content: center;
  padding: 20px;
  border: 1px solid #e2e4e8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(17, 17, 22, .045);
}

.user-summary span,
.user-summary small {
  color: #777b84;
  font-size: 12px;
}

.user-summary strong {
  color: #111116;
  font-size: 34px;
  line-height: 1;
}

.user-panel {
  overflow: hidden;
}

.user-panel td {
  vertical-align: middle;
}

.user-account {
  display: grid;
  gap: 4px;
}

.user-account strong {
  color: #111116;
  font: 700 13px var(--mono);
}

.user-account small,
.user-permissions {
  color: #737881;
  font-size: 12px;
  line-height: 1.6;
}

.user-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.user-actions button {
  min-height: 44px;
  white-space: nowrap;
}

#create-user-button {
  min-height: 44px;
}

.user-notice {
  margin-bottom: 14px;
}

.permission-groups {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
}

.permission-group {
  padding: 15px;
  border: 1px solid #e2e5e9;
  border-radius: 14px;
  background: #f8f9fa;
}

.permission-group > strong {
  display: block;
  margin-bottom: 11px;
  color: #111116;
  font-size: 13px;
}

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

.permission-checks label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #e1e4e8;
  border-radius: 10px;
  background: #fff;
  color: #333740;
  cursor: pointer;
  font-size: 12px;
}

.permission-checks input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: #111116;
}

.permission-note {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  color: #777b84;
  font-size: 12px;
  line-height: 1.65;
}

@media (max-width: 900px) {
  .user-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .sidebar {
    overflow: hidden;
    backdrop-filter: none;
  }

  .side-status {
    display: none;
  }

  .side-account {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 60;
    margin: 0;
  }

  .side-account-trigger {
    width: min(100%, 320px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, .35);
  }

  .side-account-menu {
    width: min(320px, calc(100vw - 24px));
    bottom: calc(100% + 9px);
  }

  .user-summary {
    grid-template-columns: 1fr;
  }

  .user-summary article {
    min-height: 96px;
  }

  .user-panel .table-wrap {
    overflow: visible;
  }

  .user-panel table,
  .user-panel tbody {
    display: block;
    min-width: 0;
  }

  .user-panel thead {
    display: none;
  }

  .user-panel tbody {
    display: grid;
    gap: 11px;
  }

  .user-panel tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #e2e5e9;
    border-radius: 14px;
    background: #fff;
  }

  .user-panel td {
    min-width: 0;
    border-bottom: 1px solid #eff1f3;
  }

  .user-panel td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: #858992;
    font-size: 11px;
    font-weight: 800;
  }

  .user-panel td[data-label="已开放功能"],
  .user-panel td[data-label="操作"] {
    grid-column: 1 / -1;
  }

  .user-panel td[data-label="操作"] {
    border-bottom: 0;
  }

  .permission-checks {
    grid-template-columns: 1fr;
  }
}

/* Auth boot screen prevents landing/ERP flicker on refresh */
.auth-boot {
  display: none;
}

.auth-resolving .auth-boot {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f5f6f7;
}

.auth-resolving .landing,
.auth-resolving .erp-shell {
  visibility: hidden;
}

.auth-boot-card {
  width: min(420px, 100%);
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border: 1px solid #e0e3e7;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(17, 17, 22, .12);
}

.auth-boot-card .brand-mark {
  width: 46px;
  height: 46px;
}

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

.auth-boot-card strong {
  color: #111116;
  font-size: 15px;
}

.auth-boot-card small {
  color: #777b84;
  font-size: 12px;
}

.auth-boot-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid #dfe2e6;
  border-top-color: #fe2c55;
  border-radius: 50%;
  animation: auth-boot-spin .75s linear infinite;
}

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

@media (max-width: 420px) {
  .auth-boot-card {
    grid-template-columns: 40px minmax(0, 1fr) 22px;
    padding: 17px;
  }

  .auth-boot-card strong {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-boot-spinner {
    animation-duration: 1.8s;
  }
}

/* Read-only preview mode */
.preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid #25262d;
  border-left: 4px solid #25f4ee;
  border-radius: 15px;
  background: linear-gradient(100deg, #111116 0%, #1b1d23 70%, #15171c 100%);
  color: #fff;
  box-shadow: 0 12px 30px rgba(17, 17, 22, .12);
}

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

.preview-banner > div {
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px 13px;
}

.preview-banner span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #25f4ee;
  color: #111116;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}

.preview-banner strong {
  font-size: 14px;
}

.preview-banner p {
  grid-column: 1 / -1;
  margin: 0;
  color: #a7abb3;
  font-size: 12px;
  line-height: 1.65;
}

.preview-banner button {
  min-height: 40px;
  flex: 0 0 auto;
  border-color: #3a3d45;
  background: #24262d;
  color: #fff;
}

@media (max-width: 680px) {
  .preview-banner {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .preview-banner > div {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .preview-banner button {
    min-height: 44px;
    justify-content: center;
  }
}

/* Profit-focused finance workspace */
.finance-command {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid #24262d;
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 12%, rgba(37, 244, 238, .18), transparent 28%),
    radial-gradient(circle at 20% 110%, rgba(254, 44, 85, .16), transparent 34%),
    #111116;
  color: #fff;
  box-shadow: 0 22px 54px rgba(17, 17, 22, .16);
}

.finance-command::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .13;
  background-image:
    linear-gradient(rgba(255,255,255,.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.13) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, transparent, #000 40%, #000);
  pointer-events: none;
}

.finance-command-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.finance-command .eyebrow {
  color: #25f4ee;
}

.finance-command h2 {
  margin: 7px 0 10px;
  color: #fff;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1;
  letter-spacing: -.04em;
}

.finance-command-head > div:first-child > p:last-child {
  max-width: 680px;
  margin: 0;
  color: #9da1aa;
  font-size: 13px;
  line-height: 1.7;
}

.finance-command .finance-period-actions {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
}

.finance-command .finance-period-actions label {
  color: #aeb2ba;
}

.finance-command .finance-period-actions input {
  border-color: #373941;
  background: #202228;
  color: #fff;
  color-scheme: dark;
}

.finance-equation {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.08fr);
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.finance-equation-scope {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
}

.finance-equation-scope span {
  color: #777c86;
  font-size: 11px;
}

.finance-equation-scope strong {
  color: #d7dae0;
  font-size: 11px;
}

.finance-equation > b {
  color: #656a74;
  font-size: 26px;
  font-weight: 400;
}

.finance-equation-node {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 17px 18px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 15px;
  background: rgba(255, 255, 255, .055);
  backdrop-filter: blur(8px);
}

.finance-equation-node.incoming {
  border-left: 3px solid #25f4ee;
}

.finance-equation-node.giga {
  border-left: 3px solid #ffb020;
}

.finance-equation-node.profit {
  border-color: rgba(37, 244, 238, .28);
  background: rgba(37, 244, 238, .09);
}

.finance-equation-node span {
  color: #9da1aa;
  font-size: 12px;
}

.finance-equation-node strong {
  overflow: hidden;
  color: #fff;
  font-size: clamp(21px, 2.4vw, 31px);
  font-weight: 850;
  letter-spacing: -.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-equation-node.profit strong {
  color: #25f4ee;
}

.finance-equation-node strong.negative {
  color: #ff718a;
}

.finance-equation-node small {
  color: #7e838d;
  font-size: 11px;
}

.finance-summary article {
  position: relative;
  overflow: hidden;
}

.finance-summary article::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -34px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: .1;
}

.finance-summary-payout::after {
  background: #25c9c4;
}

.finance-summary-giga::after {
  background: #ffb020;
}

.finance-summary-profit {
  border-color: #22242a !important;
  background:
    radial-gradient(circle at 100% 0%, rgba(37, 244, 238, .2), transparent 40%),
    #111116 !important;
}

.finance-summary-profit span,
.finance-summary-profit small {
  color: #999da7 !important;
}

.finance-summary-profit strong {
  color: #fff !important;
}

.finance-summary-profit::after {
  background: #25f4ee;
}

.finance-summary-margin::after {
  background: #24b47e;
}

.finance-summary strong.negative,
.finance-net.negative {
  color: #d61d44 !important;
}

.finance-tabs {
  padding: 5px;
  border-radius: 14px;
}

.finance-tabs button {
  min-height: 44px;
}

.finance-product-panel {
  padding: 24px;
  border-top-color: #111116;
  border-radius: 20px;
}

.finance-product-head {
  align-items: flex-end;
}

.finance-product-head p:last-child {
  margin: 7px 0 0;
  color: #777b83;
  font-size: 12px;
}

.finance-product-table {
  min-width: 1060px;
}

.finance-product-table thead th {
  padding-block: 13px;
  background: #f3f5f6;
  color: #666a72;
  font-size: 11px;
  text-transform: none;
}

.finance-product-table tbody tr {
  transition: background .16s ease, box-shadow .16s ease;
}

.finance-product-table tbody tr:hover {
  background: #fafcfc;
  box-shadow: inset 3px 0 #25c9c4;
}

.finance-product-table td {
  vertical-align: middle;
}

.finance-product-table td strong {
  color: #111116;
  font-size: 13px;
}

.finance-product-table td small {
  max-width: 260px;
  color: #7e828a;
  font-size: 11px;
  line-height: 1.5;
}

.finance-payout-value strong,
.finance-payout-value {
  font-variant-numeric: tabular-nums;
}

.finance-net {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.finance-store-table {
  min-width: 1120px;
}

@media (max-width: 900px) {
  .finance-command-head {
    flex-direction: column;
  }

  .finance-command .finance-period-actions {
    width: 100%;
  }

  .finance-equation {
    grid-template-columns: 1fr auto 1fr;
  }

  .finance-equation > b:nth-of-type(2) {
    display: none;
  }

  .finance-equation-node.profit {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .finance-command {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .finance-command h2 {
    font-size: 34px;
  }

  .finance-command .finance-period-actions {
    grid-template-columns: 1fr;
  }

  .finance-equation {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .finance-equation > b {
    justify-self: center;
    line-height: .7;
  }

  .finance-equation-node.profit {
    grid-column: auto;
  }

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

  .finance-summary article {
    min-height: 122px;
  }

  .finance-product-panel {
    padding: 17px 13px;
  }

  .finance-product-head {
    align-items: stretch;
  }

  .finance-product-head .search {
    width: 100%;
    min-height: 44px;
  }

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

  .finance-product-table thead {
    display: none;
  }

  .finance-product-table tbody {
    display: grid;
    gap: 11px;
  }

  .finance-product-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #e2e5e9;
    border-radius: 15px;
    background: #fff;
  }

  .finance-product-table td {
    display: block;
    min-width: 0;
    padding: 11px 13px;
    border-bottom: 1px solid #eff1f3;
    text-align: left;
  }

  .finance-product-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: #858991;
    font-size: 11px;
    font-weight: 800;
  }

  .finance-product-table td[data-label="商品 / SKU"],
  .finance-product-table td[data-label="TikTok 预估回款"],
  .finance-product-table td[data-label="Giga 支付金额"],
  .finance-product-table td[data-label="核算状态"] {
    grid-column: 1 / -1;
  }

  .finance-product-table td[data-label="核算状态"] {
    border-bottom: 0;
  }
}

/* Executive overview command deck */
.overview-command {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 28px;
  background:
    radial-gradient(circle at 84% 12%, rgba(37, 244, 238, .2), transparent 26rem),
    radial-gradient(circle at 8% 100%, rgba(254, 44, 85, .17), transparent 24rem),
    linear-gradient(135deg, #0a0b0e 0%, #111217 54%, #15161c 100%);
  box-shadow: 0 28px 70px rgba(17, 17, 22, .16);
}

.overview-command::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .32;
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(105deg, #000 0%, rgba(0, 0, 0, .55) 58%, transparent 100%);
}

.overview-command::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  width: 44%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #25f4ee 55%, #fe2c55);
}

.overview-command-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(380px, .82fr);
  gap: clamp(28px, 4vw, 66px);
  padding: clamp(28px, 3.5vw, 46px);
}

.overview-primary {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.overview-kicker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.overview-kicker-row .eyebrow {
  margin: 0;
  color: #8cfaf4;
  font-size: 12px;
  letter-spacing: .12em;
}

.overview-signal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(37, 244, 238, .22);
  border-radius: 999px;
  background: rgba(37, 244, 238, .065);
  color: #aafbf7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  white-space: nowrap;
}

.overview-signal i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #25f4ee;
  box-shadow: 0 0 0 4px rgba(37, 244, 238, .1), 0 0 16px rgba(37, 244, 238, .8);
}

.overview-signal.has-attention {
  border-color: rgba(255, 176, 32, .34);
  background: rgba(255, 176, 32, .08);
  color: #ffd893;
}

.overview-signal.has-attention i {
  background: #ffb020;
  box-shadow: 0 0 0 4px rgba(255, 176, 32, .1), 0 0 16px rgba(255, 176, 32, .65);
}

.overview-value-label {
  color: #989aa2;
  font-size: 13px;
  font-weight: 700;
}

.overview-value-row {
  display: flex;
  align-items: flex-end;
  gap: 13px;
  margin-top: 5px;
}

.overview-value-row strong {
  min-width: 0;
  color: #fff;
  font-size: clamp(62px, 7.2vw, 105px);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.075em;
  overflow-wrap: anywhere;
}

.overview-value-row span {
  margin-bottom: 12px;
  color: #666872;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
}

.overview-order-note {
  margin: 13px 0 0;
  color: #a1a3ab;
  font-size: 13px;
}

.overview-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 32px;
  padding-top: 23px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.overview-stats > div {
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 0 18px;
  border-left: 1px solid rgba(255, 255, 255, .085);
}

.overview-stats > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.overview-stats span {
  color: #858791;
  font-size: 12px;
  line-height: 1.35;
}

.overview-stats strong {
  color: #fff;
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 850;
  line-height: 1.2;
}

.overview-scope {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-top: 24px;
  color: #777984;
  font-size: 11px;
  font-weight: 700;
}

.overview-scope span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.overview-scope span + span::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #484a52;
}

.overview-scope i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fe2c55;
}

.overview-rail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.overview-rail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 13px;
}

.overview-rail-head > div {
  display: grid;
  gap: 3px;
}

.overview-rail-head > div > span {
  color: #666872;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.overview-rail-head strong {
  color: #f5f5f7;
  font-size: 17px;
  font-weight: 800;
}

.overview-rail-head > span {
  color: #888a94;
  font-size: 11px;
  white-space: nowrap;
}

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

.overview-metric {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .025));
  backdrop-filter: blur(14px);
}

.overview-metric::before {
  content: "";
  position: absolute;
  top: 0;
  left: 17px;
  right: 17px;
  height: 1px;
  background: linear-gradient(90deg, #25f4ee, transparent 65%);
}

.overview-metric.has-signal::before {
  background: linear-gradient(90deg, #ffb020, #fe2c55 45%, transparent 82%);
}

.overview-metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.overview-metric-head span {
  color: #9799a2;
  font-size: 12px;
  font-weight: 750;
}

.overview-metric-head b {
  color: #54565f;
  font-size: 11px;
  font-weight: 800;
}

.overview-metric > strong {
  margin-top: auto;
  color: #fff;
  font-size: clamp(25px, 2.3vw, 34px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.04em;
}

.overview-metric small {
  margin-top: 7px;
  color: #7e808a;
  font-size: 11px;
  line-height: 1.4;
}

.overview-progress {
  height: 4px;
  overflow: hidden;
  margin-top: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
}

.overview-progress span {
  width: var(--progress, 0%);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #fe2c55, #25f4ee);
  transition: width .35s ease;
}

.overview-brief {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 18px clamp(28px, 3.5vw, 46px);
  border-top: 1px solid rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .035);
}

.overview-brief-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 18px;
}

.overview-brief-label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #25f4ee;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
}

.overview-brief-label i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #fe2c55;
  box-shadow: 5px 0 0 -2px #25f4ee;
}

.overview-brief-copy strong {
  color: #c9cad0;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
}

.overview-brief-actions {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
}

.overview-brief-action {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: #dfe0e5;
  font-size: 12px;
  font-weight: 750;
}

.overview-brief-action span {
  margin-left: 6px;
  color: #25f4ee;
}

.overview-brief-action:hover {
  border-color: rgba(37, 244, 238, .42);
  background: rgba(37, 244, 238, .08);
  color: #fff;
}

.overview-command + .content-grid {
  grid-template-columns: minmax(0, 1.82fr) minmax(300px, .78fr);
  gap: 16px;
  margin-top: 18px;
}

.overview-trend-panel,
.overview-priority-panel,
.overview-orders-panel {
  border-color: #e2e4e8;
  box-shadow: 0 12px 34px rgba(17, 17, 22, .05);
}

.overview-trend-panel {
  min-height: 350px;
  padding: 24px;
  border-top: 3px solid #111116;
}

.overview-priority-panel {
  padding: 24px;
}

.overview-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.overview-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #85878e;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.overview-legend i {
  width: 18px;
  height: 3px;
  display: block;
  border-radius: 999px;
}

.legend-amount {
  background: linear-gradient(90deg, #fe2c55, #25c9c4);
}

.legend-orders {
  height: 8px !important;
  background: rgba(37, 201, 196, .18);
}

.trend-scroll {
  width: 100%;
  margin-top: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-color: #b9bdc5 #f1f2f4;
  scrollbar-width: thin;
  touch-action: pan-x;
}

.trend-scroll::-webkit-scrollbar {
  height: 9px;
}

.trend-scroll::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #f1f2f4;
}

.trend-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #f1f2f4;
  border-radius: 999px;
  background: #b9bdc5;
}

.trend-scroll:focus-visible {
  border-radius: 10px;
  outline: 3px solid rgba(17, 17, 22, .1);
  outline-offset: 3px;
}

.trend-chart-stage {
  position: relative;
  min-width: 100%;
}

#trend-chart {
  height: 252px;
  display: block;
  cursor: crosshair;
  touch-action: pan-x;
}

.trend-tooltip {
  position: absolute;
  z-index: 4;
  width: 184px;
  display: grid;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid #d9dce1;
  border-radius: 12px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 14px 34px rgba(17, 17, 22, .14);
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
  backdrop-filter: blur(10px);
}

.trend-tooltip.below {
  transform: translate(-50%, 14px);
}

.trend-tooltip[hidden] {
  display: none;
}

.trend-tooltip strong {
  color: #111116;
  font-size: 12px;
  font-weight: 850;
}

.trend-tooltip span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.trend-tooltip b {
  color: #111116;
  font-size: 13px;
}

.trend-tooltip small {
  color: #858991;
  font-size: 11px;
}

.overview-trend-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid #eef0f2;
  color: #8d8f96;
  font-size: 11px;
  font-weight: 650;
}

.overview-trend-foot span:first-child {
  color: #44474e;
}

.overview-orders-panel {
  margin-top: 16px;
  padding: 24px;
  border-top: 3px solid #25c9c4;
}

.overview-orders-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.overview-priority-panel .task-list {
  margin-top: 15px;
}

.overview-priority-panel .task-row {
  min-height: 54px;
}

.overview-orders-panel tbody tr {
  transition: background .18s ease;
}

.overview-orders-panel tbody tr:hover {
  background: #fafafb;
}

@media (max-width: 1180px) {
  .overview-command-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .overview-rail {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .09);
  }

  .overview-metric {
    min-height: 115px;
  }

  .overview-command + .content-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr);
  }
}

@media (max-width: 920px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .topbar > div:nth-child(2) {
    width: 100%;
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .topbar-actions .shop-selector {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: 1 1 100%;
  }

  .topbar-actions .segmented {
    flex: 1 1 auto;
  }

  .overview-command + .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .overview-priority-panel .task-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .overview-command {
    border-radius: 21px;
  }

  .overview-command-grid {
    gap: 25px;
    padding: 22px 18px;
  }

  .overview-kicker-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
  }

  .overview-signal {
    min-height: 32px;
  }

  .overview-value-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .overview-value-row strong {
    width: 100%;
    font-size: clamp(48px, 15vw, 62px);
    letter-spacing: -.06em;
  }

  .overview-value-row span {
    margin: 0;
  }

  .overview-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 18px;
    margin-top: 24px;
  }

  .overview-stats > div:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .overview-stats > div:nth-child(n + 3) {
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .08);
  }

  .overview-scope {
    gap: 8px 13px;
  }

  .overview-rail {
    padding-top: 21px;
  }

  .overview-rail-head {
    align-items: flex-start;
  }

  .overview-metric {
    min-height: 122px;
    padding: 15px;
  }

  .overview-metric > strong {
    font-size: 27px;
  }

  .overview-brief {
    align-items: stretch;
    flex-direction: column;
    gap: 15px;
    padding: 18px;
  }

  .overview-brief-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .overview-brief-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-brief-action {
    min-height: 44px;
  }

  .overview-trend-panel,
  .overview-priority-panel,
  .overview-orders-panel {
    padding: 18px;
  }

  .overview-trend-panel .panel-head,
  .overview-orders-panel .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .overview-trend-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .overview-priority-panel .task-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .overview-orders-actions {
    width: 100%;
    justify-content: space-between;
  }

  .overview-orders-panel .link-button {
    min-height: 44px;
  }
}

@media (max-width: 420px) {
  .overview-command-grid {
    padding: 20px 15px;
  }

  .overview-value-row strong {
    font-size: clamp(43px, 14.5vw, 56px);
  }

  .overview-metric-grid {
    gap: 8px;
  }

  .overview-metric {
    min-height: 118px;
    padding: 13px;
  }

  .overview-metric-head span {
    font-size: 11px;
  }

  .overview-metric > strong {
    font-size: 24px;
  }

  .overview-brief {
    padding: 16px 15px;
  }
}

/* Brand mark and top-left lockup */
:root {
  --brand-purple: #8b5cf6;
  --brand-purple-deep: #5b21b6;
  --brand-purple-soft: #d8c9ff;
}

.brand-mark {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: block;
  overflow: visible;
  border: 0;
  border-radius: 14px;
  background: url("/erp/brand-mark.svg?v=2") center / contain no-repeat;
  box-shadow: none;
  filter: drop-shadow(0 9px 18px rgba(74, 35, 145, .2));
  transition: transform .22s ease, filter .22s ease;
}

.brand-mark::before,
.brand-mark::after {
  display: none;
}

.brand-mark i {
  display: none;
}

.sidebar-brand {
  position: relative;
  align-items: center;
  gap: 13px;
  margin: -5px -7px 18px;
  padding: 10px 8px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .075);
  border-radius: 14px;
  background: linear-gradient(115deg, rgba(139, 92, 246, .095), transparent 62%);
}

.sidebar-brand::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 0;
  width: 2px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(180deg, #a78bfa, #5b21b6 70%, transparent);
  box-shadow: 0 0 16px rgba(139, 92, 246, .55);
}

.sidebar-brand::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: -1px;
  left: 8px;
  height: 1px;
  background: linear-gradient(90deg, rgba(139, 92, 246, .85), rgba(255, 255, 255, .13) 55%, transparent);
}

.sidebar-brand .brand-mark {
  width: 54px;
  height: 54px;
}

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

.sidebar-brand strong {
  overflow: hidden;
  color: transparent;
  background: linear-gradient(100deg, #ffffff 0%, #ffffff 64%, #bca6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-brand small {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 7px;
  border: 1px solid rgba(167, 139, 250, .22);
  border-radius: 999px;
  background: rgba(139, 92, 246, .09);
  color: #bfb0e9 !important;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .09em;
  line-height: 1.3;
  white-space: nowrap;
}

.sidebar-brand small::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--brand-purple);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .09), 0 0 12px rgba(139, 92, 246, .45);
}

.mc-brand,
.landing-brand {
  min-width: 0;
  gap: 13px;
  padding: 6px 12px 6px 6px;
  border: 1px solid transparent;
  border-radius: 16px;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.mc-brand:hover,
.landing-brand:hover {
  border-color: rgba(91, 33, 182, .1);
  background: rgba(139, 92, 246, .05);
}

.mc-brand:hover .brand-mark,
.landing-brand:hover .brand-mark {
  transform: rotate(-3deg) scale(1.035);
  filter: drop-shadow(0 11px 22px rgba(91, 33, 182, .28));
}

.mc-brand .brand-mark,
.landing-brand .brand-mark {
  width: 48px;
  height: 48px;
}

.mc-brand-copy,
.landing-brand > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.mc-brand-copy strong,
.landing-brand strong {
  overflow: hidden;
  color: transparent;
  background: linear-gradient(100deg, #111116 0%, #111116 70%, var(--brand-purple-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mc-brand-copy small,
.landing-brand small {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 7px;
  border: 1px solid rgba(91, 33, 182, .12);
  border-radius: 999px;
  background: rgba(139, 92, 246, .06);
  color: #6e627f;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  line-height: 1.3;
  white-space: nowrap;
}

.mc-brand-copy small::before,
.landing-brand small::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--brand-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .08);
}

.login-dialog-brand .brand-mark {
  width: 62px;
  height: 62px;
  margin-bottom: 24px;
  filter: drop-shadow(0 14px 28px rgba(74, 35, 145, .24));
}

.auth-boot-card .brand-mark {
  width: 50px;
  height: 50px;
}

.footer-brand {
  padding: 3px 7px 3px 3px;
}

.footer-brand .brand-mark {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 6px 12px rgba(74, 35, 145, .16));
}

.footer-brand .mc-brand-copy strong {
  font-size: 17px;
}

.footer-brand .mc-brand-copy small {
  font-size: 11px;
}

@media (max-width: 1100px) {
  .sidebar-brand {
    gap: 11px;
  }

  .sidebar-brand .brand-mark {
    width: 50px;
    height: 50px;
  }

  .sidebar-brand strong {
    font-size: 18px;
  }
}

@media (max-width: 680px) {
  .mc-brand,
  .landing-brand {
    gap: 10px;
    padding: 4px 8px 4px 4px;
  }

  .mc-brand .brand-mark,
  .landing-brand .brand-mark {
    width: 42px;
    height: 42px;
  }

  .mc-brand-copy strong,
  .landing-brand strong {
    font-size: 18px;
  }

  .mc-brand-copy small,
  .landing-brand small {
    font-size: 11px;
    letter-spacing: .12em;
  }
}

/* Integrated planet and galaxy atmosphere */
:root {
  --cosmos-violet: #7657ff;
  --cosmos-indigo: #30256f;
  --cosmos-cyan: #64f4ef;
  --cosmos-rose: #fe4f88;
  --cosmos-ink: #090812;
}

body,
.brand-page {
  background:
    radial-gradient(ellipse at 12% 9%, rgba(118, 87, 255, .14), transparent 36rem),
    radial-gradient(ellipse at 88% 24%, rgba(100, 244, 239, .1), transparent 34rem),
    radial-gradient(ellipse at 54% 88%, rgba(254, 79, 136, .055), transparent 38rem),
    linear-gradient(180deg, #f2f0f8 0%, #f8f8f5 43%, #efeff7 100%);
}

.landing,
.erp-shell {
  background: transparent;
}

.tech-grid {
  z-index: 0;
  overflow: hidden;
  opacity: .82;
  background-color: transparent;
  background-image:
    radial-gradient(circle, rgba(64, 42, 130, .42) 0 .75px, transparent 1.25px),
    radial-gradient(circle, rgba(45, 125, 139, .34) 0 .9px, transparent 1.45px),
    radial-gradient(circle, rgba(155, 94, 255, .28) 0 .65px, transparent 1.2px),
    linear-gradient(rgba(45, 34, 91, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 34, 91, .035) 1px, transparent 1px);
  background-size: 83px 83px, 139px 139px, 197px 197px, 64px 64px, 64px 64px;
  background-position: 0 0, 42px 24px, 96px 67px, 0 0, 0 0;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, .8) 68%, transparent 100%);
  animation: cosmicStarDrift 150s linear infinite;
}

.glow {
  pointer-events: none;
  will-change: transform, opacity;
}

.glow-a {
  top: 7vh;
  right: -8vw;
  bottom: auto;
  left: auto;
  width: min(38vw, 560px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: .15;
  filter: none;
  mix-blend-mode: multiply;
  background:
    radial-gradient(circle at 29% 24%, rgba(255, 255, 255, .86) 0 1.5%, rgba(255, 255, 255, .12) 7%, transparent 18%),
    radial-gradient(circle at 65% 73%, #170f31 0 23%, #34235f 35%, #7960bb 47%, #c6b5f5 51%, #392868 64%, #171127 83%);
  box-shadow:
    inset -70px -50px 110px rgba(3, 2, 8, .72),
    inset 22px 18px 48px rgba(255, 255, 255, .12),
    0 0 100px rgba(118, 87, 255, .2);
  animation: cosmicPlanetFloat 19s ease-in-out infinite;
}

.glow-a::before {
  content: "";
  position: absolute;
  inset: -16%;
  border-radius: 50%;
  border: 1px solid rgba(118, 87, 255, .18);
  box-shadow: 0 0 80px rgba(118, 87, 255, .1);
}

.glow-a::after {
  content: "";
  position: absolute;
  top: 44%;
  right: -22%;
  left: -22%;
  height: 25%;
  border: 1px solid rgba(166, 139, 250, .42);
  border-bottom-color: rgba(100, 244, 239, .22);
  border-radius: 50%;
  transform: rotate(-17deg);
  box-shadow: 0 0 22px rgba(118, 87, 255, .12);
  animation: cosmicRingTurn 25s linear infinite;
}

.glow-b {
  bottom: -18%;
  left: -14%;
  width: 58vw;
  height: 36vw;
  min-height: 320px;
  opacity: .095;
  background:
    radial-gradient(ellipse at 38% 44%, rgba(100, 244, 239, .72), transparent 28%),
    radial-gradient(ellipse at 62% 56%, rgba(118, 87, 255, .95), transparent 34%),
    radial-gradient(ellipse at 52% 48%, rgba(254, 79, 136, .35), transparent 24%);
  filter: blur(42px);
  animation: cosmicNebulaFlow 24s ease-in-out infinite alternate;
}

.mc-hero::before {
  background:
    radial-gradient(circle at 77% 22%, rgba(118, 87, 255, .23), transparent 28rem),
    radial-gradient(circle at 10% 78%, rgba(254, 44, 85, .07), transparent 26rem),
    radial-gradient(ellipse at 50% 46%, rgba(100, 244, 239, .09), transparent 38%),
    radial-gradient(circle, rgba(70, 50, 135, .4) 0 .75px, transparent 1.2px),
    linear-gradient(rgba(16, 17, 21, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 17, 21, .028) 1px, transparent 1px);
  background-size: auto, auto, auto, 89px 89px, 68px 68px, 68px 68px;
  background-position: center, center, center, 0 0, 0 0, 0 0;
  mask-image: linear-gradient(to bottom, #000 68%, transparent 100%);
  animation: cosmicAurora 22s ease-in-out infinite alternate;
}

.mc-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 14%;
  left: -18%;
  width: 150px;
  height: 1px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), rgba(118, 87, 255, .25), transparent);
  filter: drop-shadow(0 0 5px rgba(118, 87, 255, .7));
  animation: cosmicShootingStar 18s ease-in infinite;
}

.mc-console-wrap::before {
  animation: cosmicConsoleAura 9s ease-in-out infinite alternate;
}

.mc-console {
  background:
    radial-gradient(circle at 84% 4%, rgba(118, 87, 255, .2), transparent 28%),
    radial-gradient(circle at 15% 100%, rgba(100, 244, 239, .1), transparent 32%),
    #0d0c15;
  animation: cosmicConsoleFloat 10s ease-in-out infinite;
}

.mc-console::before {
  background:
    radial-gradient(circle, rgba(236, 231, 255, .42) 0 .6px, transparent 1px),
    radial-gradient(circle at 85% 0, rgba(100, 244, 239, .13), transparent 30%),
    linear-gradient(rgba(255, 255, 255, .032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .032) 1px, transparent 1px);
  background-size: 71px 71px, auto, 36px 36px, 36px 36px;
  animation: cosmicPanelStars 46s linear infinite;
}

.mc-console::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: -108px;
  right: -86px;
  width: 258px;
  height: 258px;
  border: 1px solid rgba(118, 87, 255, .2);
  border-radius: 50%;
  box-shadow:
    0 0 0 20px rgba(118, 87, 255, .025),
    0 0 0 48px rgba(100, 244, 239, .018);
  pointer-events: none;
  animation: cosmicOrbit 22s linear infinite;
}

.mc-marquee,
.mc-modules-section {
  background: rgba(255, 255, 255, .76);
  backdrop-filter: blur(8px);
}

.mc-ai-section {
  background: rgba(241, 242, 238, .84);
  backdrop-filter: blur(8px);
}

.mc-ai-feature {
  background:
    radial-gradient(circle at 90% 12%, rgba(118, 87, 255, .24), transparent 34%),
    radial-gradient(circle at 12% 94%, rgba(100, 244, 239, .1), transparent 28%),
    #0f0d17;
}

.mc-module {
  background: rgba(248, 249, 246, .84);
  backdrop-filter: blur(8px);
  transition: transform .28s cubic-bezier(.2, .75, .25, 1), box-shadow .28s ease, border-color .28s ease;
}

.mc-module:hover {
  border-color: rgba(118, 87, 255, .26);
  box-shadow:
    0 24px 55px rgba(39, 25, 85, .1),
    0 0 0 1px rgba(118, 87, 255, .04);
  transform: translateY(-6px);
}

.mc-workflow-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 84% 12%, rgba(118, 87, 255, .18), transparent 33%),
    radial-gradient(circle at 8% 94%, rgba(100, 244, 239, .07), transparent 28%),
    #0b0912;
}

.mc-workflow-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, .4) 0 .65px, transparent 1.1px),
    radial-gradient(circle, rgba(167, 139, 250, .36) 0 .75px, transparent 1.2px);
  background-size: 97px 97px, 163px 163px;
  background-position: 0 0, 38px 51px;
  opacity: .38;
  animation: cosmicStarDrift 115s linear infinite;
}

.mc-workflow-section > * {
  position: relative;
  z-index: 1;
}

.mc-security-section {
  background: rgba(242, 243, 239, .84);
  backdrop-filter: blur(8px);
}

.sidebar {
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 9%, rgba(118, 87, 255, .15), transparent 26%),
    #09080e;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, .3) 0 .55px, transparent 1px),
    radial-gradient(circle, rgba(167, 139, 250, .3) 0 .7px, transparent 1.15px);
  background-size: 77px 77px, 131px 131px;
  background-position: 0 0, 29px 17px;
  opacity: .32;
  animation: cosmicStarDrift 125s linear infinite;
}

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

.main {
  background: rgba(245, 246, 248, .86);
  backdrop-filter: blur(3px);
}

.nav-item {
  position: relative;
  overflow: hidden;
}

.nav-item::after {
  content: "";
  position: absolute;
  top: -80%;
  right: -36px;
  width: 24px;
  height: 260%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent);
  opacity: 0;
  transform: rotate(18deg) translateX(0);
  transition: opacity .2s ease, transform .45s ease;
}

.nav-item:hover::after {
  opacity: .55;
  transform: rotate(18deg) translateX(-180px);
}

.overview-command {
  background:
    radial-gradient(circle at 84% 12%, rgba(118, 87, 255, .27), transparent 26rem),
    radial-gradient(circle at 8% 100%, rgba(254, 44, 85, .15), transparent 24rem),
    radial-gradient(circle at 52% 45%, rgba(100, 244, 239, .055), transparent 30rem),
    linear-gradient(135deg, #080710 0%, #101018 54%, #171421 100%);
  background-size: 138% 138%, 140% 140%, 100% 100%, 100% 100%;
  animation: cosmicCommandDrift 20s ease-in-out infinite alternate;
}

.overview-command::before {
  opacity: .46;
  background-image:
    radial-gradient(circle, rgba(236, 231, 255, .36) 0 .55px, transparent 1px),
    radial-gradient(circle, rgba(167, 139, 250, .32) 0 .7px, transparent 1.15px),
    linear-gradient(rgba(255, 255, 255, .043) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .043) 1px, transparent 1px);
  background-size: 91px 91px, 157px 157px, 42px 42px, 42px 42px;
  background-position: 0 0, 31px 47px, 0 0, 0 0;
  animation: cosmicPanelStars 48s linear infinite;
}

.overview-primary {
  position: relative;
}

.overview-primary::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: 1%;
  bottom: -38%;
  width: clamp(170px, 22vw, 310px);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  opacity: .13;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .9), transparent 7%),
    radial-gradient(circle at 65% 70%, #09070d 0 28%, #5635a8 45%, #a78bfa 50%, #241741 69%);
  box-shadow: inset -30px -24px 50px rgba(0, 0, 0, .7), 0 0 55px rgba(118, 87, 255, .18);
  animation: cosmicPlanetFloat 16s ease-in-out infinite;
}

.overview-metric {
  transition: transform .26s ease, border-color .26s ease, background .26s ease;
}

.overview-metric:hover {
  border-color: rgba(167, 139, 250, .28);
  background: linear-gradient(145deg, rgba(255, 255, 255, .095), rgba(255, 255, 255, .035));
  transform: translateY(-3px);
}

.panel {
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.panel:hover {
  border-color: rgba(118, 87, 255, .2);
  box-shadow: 0 18px 42px rgba(42, 30, 84, .075);
}

.overview-trend-panel {
  position: relative;
  overflow: hidden;
}

.overview-trend-panel::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -70px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(118, 87, 255, .08);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(100, 244, 239, .015);
  pointer-events: none;
}

#trend-chart {
  filter: drop-shadow(0 10px 18px rgba(118, 87, 255, .08));
}

.view-panel.active {
  animation: cosmicViewReveal .48s cubic-bezier(.2, .72, .22, 1) backwards;
}

.overview-command {
  animation:
    cosmicCommandDrift 20s ease-in-out infinite alternate,
    cosmicRise .58s cubic-bezier(.2, .72, .22, 1) backwards;
}

.overview-command .overview-metric {
  animation: cosmicRise .52s cubic-bezier(.2, .72, .22, 1) backwards;
}

.overview-command .overview-metric:nth-child(2) {
  animation-delay: .05s;
}

.overview-command .overview-metric:nth-child(3) {
  animation-delay: .1s;
}

.overview-command .overview-metric:nth-child(4) {
  animation-delay: .15s;
}

.overview-command + .content-grid > .panel,
.overview-orders-panel {
  animation: cosmicRise .55s .12s cubic-bezier(.2, .72, .22, 1) backwards;
}

.overview-command + .content-grid > .panel:nth-child(2) {
  animation-delay: .18s;
}

.overview-orders-panel {
  animation-delay: .24s;
}

.login-dialog[open] {
  animation: cosmicDialogIn .3s cubic-bezier(.2, .72, .22, 1);
}

/* Product editor: inner ERP draft with the synchronized catalog kept read-only. */
.product-edit-actions {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 116px;
  background: #fff;
  text-align: right;
  box-shadow: -10px 0 18px rgba(17, 17, 22, .035);
}

tr:hover .product-edit-actions {
  background: #fafafb;
}

.product-edit-button {
  min-height: 40px;
  border: 1px solid #111116;
  border-radius: 10px;
  background: #111116;
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.product-edit-button:hover {
  transform: translateY(-1px);
  background: #25252b;
  box-shadow: 0 8px 20px rgba(17, 17, 22, .16);
}

.product-edit-button:focus-visible {
  outline: 3px solid rgba(139, 92, 246, .28);
  outline-offset: 2px;
}

.product-edit-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-top: 7px;
  padding: 2px 8px;
  border: 1px solid rgba(139, 92, 246, .22);
  border-radius: 999px;
  background: rgba(139, 92, 246, .08);
  color: #6d42d9;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.product-editor-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: min(94vh, 980px);
  overflow: hidden;
  border-radius: 22px;
}

.product-editor-dialog form {
  display: flex;
  max-height: inherit;
  flex-direction: column;
}

.product-editor-dialog .dialog-head {
  flex: 0 0 auto;
  padding: 24px 28px 18px;
  border-bottom: 1px solid #ededf0;
}

.product-editor-dialog .dialog-head h2 {
  font-size: 27px;
  letter-spacing: -.025em;
}

.product-editor-dialog .dialog-body {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 22px 28px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 92% 0%, rgba(139, 92, 246, .07), transparent 26%),
    #f7f7f9;
}

.product-editor-source {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border: 1px solid #dedfe3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(17, 17, 22, .055);
}

.product-editor-image {
  width: 150px;
  height: 150px;
  display: grid;
  overflow: hidden;
  place-items: center;
  border-radius: 14px;
  background: #f1f1f4;
  color: #8a8c94;
  font: 800 12px var(--mono);
}

.product-editor-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-editor-image-empty {
  letter-spacing: .08em;
}

.product-editor-source-copy {
  min-width: 0;
}

.product-editor-source-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.product-editor-kicker {
  color: #70727b;
  font: 800 12px var(--mono);
  letter-spacing: .05em;
}

.product-editor-source-head h3 {
  max-width: 720px;
  margin: 7px 0 0;
  color: #111116;
  font-size: 21px;
  line-height: 1.35;
}

.product-editor-source-head button {
  min-height: 44px;
  flex: 0 0 auto;
}

.product-editor-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 17px;
}

.product-editor-meta span {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #ededf0;
  border-radius: 11px;
  background: #fafafb;
}

.product-editor-meta small,
.product-editor-meta strong {
  display: block;
  overflow-wrap: anywhere;
}

.product-editor-meta small {
  color: #777a82;
  font-size: 12px;
}

.product-editor-meta strong {
  margin-top: 2px;
  color: #222329;
  font-size: 13px;
}

.product-editor-boundary {
  margin: 13px 0 0;
  color: #6a6d74;
  font-size: 13px;
  line-height: 1.6;
}

.product-editor-section {
  padding: 20px;
  border: 1px solid #e3e4e8;
  border-radius: 18px;
  background: #fff;
}

.product-editor-section-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.product-editor-section-head > span {
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #111116;
  color: #25f4ee;
  font: 800 12px var(--mono);
  box-shadow: 4px 0 0 -1px #fe2c55;
}

.product-editor-section-head h3 {
  margin: 0;
  color: #17171c;
  font-size: 17px;
}

.product-editor-section-head p {
  margin: 3px 0 0;
  color: #777a82;
  font-size: 13px;
}

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

.product-editor-fields label {
  display: grid;
  gap: 7px;
  color: #4e5158;
  font-size: 13px;
  font-weight: 750;
}

.product-editor-fields label.full {
  grid-column: 1 / -1;
}

.product-editor-dialog .product-editor-fields input,
.product-editor-dialog .product-editor-fields select,
.product-editor-dialog .product-editor-fields textarea {
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid #dedfe3;
  border-radius: 10px;
  background: #fafafb;
  color: #111116;
  font: 400 14px/1.65 var(--sans);
}

.product-editor-dialog .product-editor-fields textarea {
  min-height: 96px;
  resize: vertical;
}

.product-editor-dialog .product-editor-fields input:focus,
.product-editor-dialog .product-editor-fields select:focus,
.product-editor-dialog .product-editor-fields textarea:focus {
  border-color: #6d42d9;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .13);
}

.product-editor-sku-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #ededf0;
  border-radius: 12px;
}

.product-editor-sku-table {
  min-width: 660px;
  margin: 0;
}

.product-editor-sku-table th {
  background: #f6f6f8;
}

.product-editor-sku-table td strong {
  overflow-wrap: anywhere;
}

.product-editor-footnote {
  margin: 10px 0 0;
  color: #777a82;
  font-size: 12px;
}

.product-editor-dialog .form-error {
  flex: 0 0 auto;
  padding: 0 28px;
}

.product-editor-dialog .dialog-actions {
  flex: 0 0 auto;
  padding: 16px 28px 20px;
  background: #fff;
}

.product-editor-dialog .dialog-actions .primary {
  min-width: 142px;
  min-height: 46px;
}

@media (max-width: 760px) {
  .product-editor-dialog {
    width: calc(100vw - 16px);
    max-height: 96vh;
    border-radius: 18px;
  }

  .product-editor-dialog .dialog-head {
    padding: 19px 18px 15px;
  }

  .product-editor-dialog .dialog-head h2 {
    font-size: 23px;
  }

  .product-editor-dialog .dialog-body {
    padding: 16px;
  }

  .product-editor-source {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 15px;
  }

  .product-editor-image {
    width: 100%;
    height: 190px;
  }

  .product-editor-source-head {
    align-items: stretch;
    flex-direction: column;
  }

  .product-editor-source-head button {
    width: 100%;
    min-height: 44px;
  }

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

  .product-editor-section {
    padding: 16px;
  }

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

  .product-editor-fields label.full {
    grid-column: auto;
  }

  .product-editor-dialog .form-error {
    padding: 0 16px;
  }

  .product-editor-dialog .dialog-actions {
    padding: 12px 16px 16px;
  }

  .product-editor-dialog .dialog-actions .primary,
  .product-editor-dialog .dialog-actions .secondary {
    min-height: 44px;
  }
}

@keyframes cosmicStarDrift {
  to { background-position: 830px 415px, -418px 557px, 394px -394px, 128px 128px, 128px 128px; }
}

@keyframes cosmicNebulaFlow {
  0% { transform: translate3d(-2%, 2%, 0) scale(.96); opacity: .07; }
  55% { opacity: .12; }
  100% { transform: translate3d(5%, -4%, 0) scale(1.08); opacity: .085; }
}

@keyframes cosmicPlanetFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-1deg); }
  50% { transform: translate3d(-10px, 12px, 0) rotate(1deg); }
}

@keyframes cosmicRingTurn {
  from { transform: rotate(-17deg); }
  to { transform: rotate(343deg); }
}

@keyframes cosmicAurora {
  0% { background-position: 47% 38%, 10% 80%, 44% 50%, 0 0, 0 0; }
  100% { background-position: 53% 45%, 16% 72%, 56% 54%, 28px 18px, 18px 28px; }
}

@keyframes cosmicShootingStar {
  0%, 76%, 100% { opacity: 0; transform: translate3d(0, 0, 0) rotate(-14deg); }
  79% { opacity: .85; }
  87% { opacity: 0; transform: translate3d(78vw, 38vh, 0) rotate(-14deg); }
}

@keyframes cosmicConsoleFloat {
  0%, 100% {
    transform: perspective(1400px) rotateY(-2.4deg) rotateX(1deg) translateY(0);
  }
  50% {
    transform: perspective(1400px) rotateY(-1.4deg) rotateX(.4deg) translateY(-7px);
  }
}

@keyframes cosmicConsoleAura {
  from { transform: translate3d(-2%, 2%, 0) scale(.97); opacity: .72; }
  to { transform: translate3d(3%, -1%, 0) scale(1.04); opacity: 1; }
}

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

@keyframes cosmicPanelStars {
  to { background-position: 455px 273px, 0 0, 84px 84px, 84px 84px; }
}

@keyframes cosmicCommandDrift {
  0% { background-position: 0% 0%, 100% 100%, 50% 50%, center; }
  100% { background-position: 13% 9%, 84% 88%, 45% 56%, center; }
}

@keyframes cosmicViewReveal {
  from {
    opacity: 0;
    transform: translateY(9px) scale(.995);
    filter: saturate(.9);
  }
}

@keyframes cosmicRise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes cosmicDialogIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.98);
  }
}

@media (max-width: 760px) {
  .glow-a {
    top: 5vh;
    right: -170px;
    width: 360px;
    opacity: .11;
  }

  .glow-b {
    left: -45%;
    width: 110vw;
    height: 64vw;
    opacity: .07;
  }

  .mc-hero::after {
    animation-duration: 22s;
  }

  .mc-console {
    animation-duration: 12s;
  }

  .overview-primary::after {
    right: -20%;
    bottom: -12%;
    width: 190px;
    opacity: .09;
  }

  .overview-metric:hover,
  .mc-module:hover,
  .panel:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tech-grid,
  .glow-a,
  .glow-b,
  .glow-a::after,
  .mc-hero::before,
  .mc-hero::after,
  .mc-console-wrap::before,
  .mc-console,
  .mc-console::before,
  .mc-console::after,
  .mc-workflow-section::before,
  .sidebar::before,
  .overview-primary::after,
  .overview-command,
  .overview-command::before,
  .overview-command .overview-metric,
  .overview-command + .content-grid > .panel,
  .overview-orders-panel,
  .view-panel.active,
  .login-dialog[open] {
    animation: none !important;
  }

  .mc-console {
    transform: none;
  }

  .mc-hero::after {
    display: none;
  }
}

/* Store authorization command center */
.store-auth-view {
  position: relative;
}

.store-auth-hero {
  position: relative;
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, .55fr);
  gap: 34px;
  padding: 42px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 26px;
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 244, 238, .17), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(254, 44, 85, .2), transparent 28%),
    linear-gradient(135deg, #090a10 0%, #161423 52%, #100d18 100%);
  box-shadow: 0 30px 80px rgba(17, 17, 22, .18);
}

.store-auth-hero::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, .032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .032) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  mask-image: linear-gradient(100deg, #000, transparent 72%);
  pointer-events: none;
}

.store-auth-copy,
.store-auth-console {
  position: relative;
  z-index: 1;
}

.store-auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #b7b9c5;
  font: 800 12px var(--mono);
  letter-spacing: .08em;
}

.store-auth-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #25f4ee;
  box-shadow: 0 0 0 5px rgba(37, 244, 238, .12), 0 0 18px rgba(37, 244, 238, .72);
}

.store-auth-copy h2 {
  max-width: 700px;
  margin: 18px 0 0;
  color: #fff;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: 1.08;
}

.store-auth-copy > p {
  max-width: 740px;
  margin: 18px 0 0;
  color: #b8bac5;
  font-size: 15px;
  line-height: 1.75;
}

.store-auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}

.store-auth-primary,
.store-auth-secondary,
.store-auth-ghost {
  min-height: 48px;
  padding: 0 19px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 850;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.store-auth-primary {
  border: 1px solid #fff;
  background: #fff;
  color: #101116;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}

.store-auth-primary span {
  margin-left: 6px;
  color: #fe2c55;
}

.store-auth-secondary {
  border: 1px solid rgba(37, 244, 238, .48);
  background: rgba(37, 244, 238, .1);
  color: #9bfcf8;
}

.store-auth-ghost {
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
  color: #e8e8ed;
}

.store-auth-primary:hover,
.store-auth-secondary:hover,
.store-auth-ghost:hover {
  transform: translateY(-2px);
}

.store-auth-primary:hover {
  box-shadow: 0 16px 34px rgba(0, 0, 0, .26);
}

.store-auth-secondary:hover {
  border-color: #25f4ee;
  background: rgba(37, 244, 238, .16);
}

.store-auth-ghost:hover {
  border-color: rgba(255, 255, 255, .38);
  background: rgba(255, 255, 255, .1);
}

.store-auth-primary:disabled,
.store-auth-secondary:disabled,
.store-auth-ghost:disabled {
  cursor: not-allowed;
  opacity: .48;
  transform: none;
}

.store-auth-link-note {
  margin-top: 16px !important;
  color: #858997 !important;
  font-size: 12px !important;
}

.store-auth-console {
  align-self: stretch;
  min-width: 0;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 20px;
  background: rgba(7, 8, 13, .66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
  backdrop-filter: blur(18px);
}

.store-auth-console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #888c99;
  font: 800 12px var(--mono);
  letter-spacing: .06em;
}

.store-auth-status {
  padding: 5px 8px;
  border-radius: 999px;
  font: 800 12px var(--sans);
  font-style: normal;
  letter-spacing: 0;
}

.store-auth-status.ready {
  background: rgba(37, 244, 238, .12);
  color: #72f7f1;
}

.store-auth-status.waiting {
  background: rgba(255, 190, 70, .12);
  color: #ffd078;
}

.store-auth-status.error {
  background: rgba(254, 44, 85, .14);
  color: #ff819c;
}

.store-auth-monogram {
  position: relative;
  height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 16px 0 10px;
}

.store-auth-monogram span,
.store-auth-monogram b {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  font-size: 24px;
  font-weight: 900;
}

.store-auth-monogram span {
  border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(145deg, #252631, #0d0e14);
  color: #fff;
  box-shadow: 10px 0 30px rgba(37, 244, 238, .12);
}

.store-auth-monogram b {
  border: 1px solid rgba(254, 44, 85, .3);
  background: linear-gradient(145deg, #3b1a27, #171018);
  color: #fff;
  box-shadow: -10px 0 30px rgba(254, 44, 85, .18);
}

.store-auth-monogram i {
  width: 35px;
  height: 2px;
  background: linear-gradient(90deg, #25f4ee, #fe2c55);
  box-shadow: 0 0 16px rgba(37, 244, 238, .7);
}

.store-auth-console > strong {
  display: block;
  color: #fff;
  font-size: 19px;
}

.store-auth-console > p {
  margin: 7px 0 0;
  color: #9497a4;
  font-size: 13px;
  line-height: 1.6;
}

.store-auth-console-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 18px;
}

.store-auth-console-foot span {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 11px;
  background: rgba(255, 255, 255, .035);
  color: #777b88;
  font-size: 12px;
}

.store-auth-console-foot strong {
  display: block;
  margin-top: 3px;
  color: #ececf1;
  font-size: 13px;
}

.store-auth-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.store-auth-summary article {
  min-height: 128px;
  padding: 20px;
  border: 1px solid #e3e4e8;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 17, 22, .045);
}

.store-auth-summary span,
.store-auth-summary small,
.store-auth-summary strong {
  display: block;
}

.store-auth-summary span {
  color: #747780;
  font-size: 13px;
}

.store-auth-summary strong {
  margin-top: 8px;
  color: #111116;
  font-size: 32px;
  line-height: 1;
}

.store-auth-summary small {
  margin-top: 10px;
  color: #777a82;
  font-size: 12px;
}

.store-auth-summary article:nth-child(1) {
  border-top: 4px solid #111116;
}

.store-auth-summary article:nth-child(2) {
  border-top: 4px solid #25c9c4;
}

.store-auth-summary article:nth-child(3) {
  border-top: 4px solid #fe2c55;
}

.store-auth-summary article:nth-child(4) {
  border-top: 4px solid #8b5cf6;
}

.store-auth-workflow {
  margin-top: 16px;
  padding: 25px;
  border: 1px solid #e3e4e8;
  border-radius: 20px;
  background:
    radial-gradient(circle at 95% 0%, rgba(139, 92, 246, .08), transparent 32%),
    #fff;
  box-shadow: 0 12px 34px rgba(17, 17, 22, .045);
}

.store-auth-workflow-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.store-auth-workflow-head h2 {
  margin: 5px 0 0;
  color: #111116;
  font-size: 25px;
}

.store-auth-workflow-head > span {
  color: #777a82;
  font-size: 13px;
}

.store-auth-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.store-auth-steps article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  padding: 17px;
  border: 1px solid #ececf0;
  border-radius: 14px;
  background: #fafafb;
}

.store-auth-steps article > b {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #111116;
  color: #25f4ee;
  font: 800 12px var(--mono);
  box-shadow: 5px 0 0 -2px #fe2c55;
}

.store-auth-steps strong {
  color: #222329;
  font-size: 15px;
}

.store-auth-steps p {
  margin: 5px 0 0;
  color: #71747c;
  font-size: 13px;
  line-height: 1.6;
}

.store-auth-callback {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
  padding: 12px 13px;
  border: 1px dashed #d9dae0;
  border-radius: 13px;
  background: #fff;
}

.store-auth-callback > span {
  color: #60636b;
  font-size: 13px;
  font-weight: 750;
}

.store-auth-callback code {
  overflow-x: auto;
  color: #4f5260;
  font: 12px var(--mono);
  white-space: nowrap;
}

.store-auth-callback .row-action {
  min-height: 44px;
}

.store-auth-notice {
  margin-top: 14px;
}

.store-connected-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  margin-bottom: 13px;
}

.store-connected-head h2 {
  margin: 5px 0 0;
  color: #111116;
  font-size: 28px;
}

.store-connected-head p:last-child {
  margin: 8px 0 0;
  color: #747780;
  font-size: 13px;
}

.store-connected-count {
  padding: 7px 11px;
  border: 1px solid #dedfe3;
  border-radius: 999px;
  background: #fff;
  color: #555861;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

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

.shop-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 1px solid #e3e4e8;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(17, 17, 22, .045);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.shop-card::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 84px;
  height: 84px;
  border-radius: 0 0 0 84px;
  background: linear-gradient(135deg, rgba(37, 244, 238, .1), rgba(254, 44, 85, .06));
  content: "";
  pointer-events: none;
}

.shop-card:hover {
  transform: translateY(-3px);
  border-color: #cfd1d8;
  box-shadow: 0 20px 44px rgba(17, 17, 22, .08);
}

.shop-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.shop-card-index {
  color: #8b8e97;
  font: 800 12px var(--mono);
  letter-spacing: .05em;
}

.shop-identity {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 18px;
}

.shop-avatar {
  width: 48px;
  height: 48px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: #111116;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 5px 0 0 -2px #25f4ee;
}

.shop-identity h3 {
  margin: 0;
  color: #111116;
  font-size: 18px;
  line-height: 1.35;
}

.shop-identity p {
  margin: 4px 0 0;
  color: #777a82;
  font-size: 12px;
}

.shop-card .shop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 15px;
}

.shop-card-stats {
  display: grid;
  gap: 9px;
  margin: 17px 0 0;
  padding: 14px;
  border-radius: 12px;
  background: #f8f8fa;
}

.shop-card-stats div {
  min-width: 0;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
}

.shop-card-stats dt {
  color: #858891;
  font-size: 12px;
}

.shop-card-stats dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #3f424a;
  font-size: 12px;
  font-weight: 700;
}

.shop-card .sync-detail {
  margin-top: 13px;
}

.store-empty-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 17px;
  padding: 28px;
  border: 1px dashed #cfd1d8;
  border-radius: 18px;
  background: #fff;
}

.store-empty-card > span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #111116;
  color: #25f4ee;
  font-size: 25px;
}

.store-empty-card h3 {
  margin: 0;
  color: #111116;
  font-size: 20px;
}

.store-empty-card p {
  margin: 6px 0 0;
  color: #747780;
  font-size: 13px;
  line-height: 1.65;
}

@media (max-width: 1100px) {
  .store-auth-hero {
    grid-template-columns: minmax(0, 1fr) minmax(275px, .5fr);
    gap: 24px;
    padding: 32px;
  }

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

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

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

@media (max-width: 760px) {
  .store-auth-hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 18px;
    border-radius: 20px;
  }

  .store-auth-copy h2 {
    margin-top: 14px;
    font-size: 34px;
  }

  .store-auth-copy > p {
    font-size: 14px;
  }

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

  .store-auth-primary,
  .store-auth-secondary,
  .store-auth-ghost {
    width: 100%;
    min-height: 48px;
  }

  .store-auth-console {
    padding: 18px;
  }

  .store-auth-monogram {
    height: 110px;
  }

  .store-auth-monogram span,
  .store-auth-monogram b {
    width: 62px;
    height: 62px;
    border-radius: 18px;
  }

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

  .store-auth-summary article {
    min-height: 118px;
    padding: 16px;
  }

  .store-auth-summary strong {
    font-size: 28px;
  }

  .store-auth-workflow {
    padding: 19px 16px;
    border-radius: 18px;
  }

  .store-auth-workflow-head,
  .store-connected-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .store-auth-workflow-head h2 {
    font-size: 22px;
  }

  .store-auth-steps article {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 11px;
    padding: 14px;
  }

  .store-auth-steps article > b {
    width: 38px;
    height: 38px;
  }

  .store-auth-callback {
    grid-template-columns: 1fr auto;
    gap: 9px;
  }

  .store-auth-callback > span {
    grid-column: 1 / -1;
  }

  .store-auth-callback code {
    font-size: 12px;
  }

  .store-connected-head {
    margin-top: 23px;
  }

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

  .shop-card {
    padding: 17px;
  }

  .shop-card-stats div {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .store-empty-card {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 13px;
    padding: 20px 16px;
  }

  .store-empty-card > span {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }
}

/* Tablet and mobile category navigation */
@media (max-width: 1024px) {
  .erp-shell {
    display: block;
    min-height: 100vh;
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
  }

  .sidebar {
    position: fixed;
    z-index: 80;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(74px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: minmax(0, 1fr) 62px;
    align-items: stretch;
    gap: 5px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    overflow: visible;
    border-top: 1px solid rgba(255, 255, 255, .09);
    border-right: 0;
    background: #0b0912;
    box-shadow: 0 -14px 34px rgba(28, 20, 52, .16);
  }

  .sidebar::after {
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    width: auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(167, 139, 250, .72), rgba(37, 244, 238, .36), transparent);
    opacity: 1;
  }

  .sidebar-brand,
  .side-status {
    display: none;
  }

  .side-nav {
    width: 100%;
    max-width: none;
    height: 100%;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    gap: 2px;
    overflow: visible;
    padding: 0;
  }

  .nav-item {
    position: relative;
    min-width: 0;
    min-height: 60px;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 1px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: #8f919a;
    font-size: 11px !important;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
  }

  .nav-item > span:first-child {
    width: auto;
    color: #8f919a;
    font-size: 19px;
    line-height: 1;
  }

  .nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, .055);
  }

  .nav-item.active {
    border-color: rgba(255, 255, 255, .07);
    background: rgba(255, 255, 255, .08);
    box-shadow: none;
    color: #fff;
  }

  .nav-item.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 24px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #a78bfa, #25f4ee);
    box-shadow: 0 0 12px rgba(167, 139, 250, .55);
    transform: translateX(-50%);
  }

  .nav-item.active > span:first-child {
    color: #cbb8ff;
  }

  .nav-badge {
    position: absolute;
    top: 5px;
    right: max(5px, calc(50% - 28px));
    min-width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 0 4px;
    font-size: 10px;
    line-height: 1;
  }

  .side-account {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    z-index: 82;
    width: 58px;
    height: 60px;
    align-self: center;
    margin: 0;
  }

  .side-account-trigger {
    width: 58px;
    min-height: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-color: rgba(255, 255, 255, .08);
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    box-shadow: none;
  }

  .side-account-trigger:hover,
  .side-account-trigger[aria-expanded="true"] {
    border-color: rgba(167, 139, 250, .34);
    background: rgba(167, 139, 250, .12);
  }

  .side-account-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 18px;
    box-shadow: 5px 0 0 -2px rgba(124, 58, 237, .65);
  }

  .side-account-copy,
  .side-account-chevron {
    display: none;
  }

  .side-account-menu {
    right: 0;
    bottom: calc(100% + 9px);
    left: auto;
    width: min(310px, calc(100vw - 16px));
  }

  .main {
    min-height: 100vh;
    padding-bottom: calc(106px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 480px) {
  .sidebar {
    grid-template-columns: minmax(0, 1fr) 54px;
    padding-inline: 6px;
  }

  .side-nav {
    gap: 1px;
  }

  .nav-item {
    min-height: 58px;
    font-size: 11px !important;
    letter-spacing: -.02em;
  }

  .nav-item > span:first-child {
    font-size: 18px;
  }

  .side-account,
  .side-account-trigger {
    width: 52px;
  }
}

body.brand-page .landing {
  visibility: visible !important;
  opacity: 1 !important;
}

@media (max-width: 1024px) {
  .view-panel.active {
    animation: none !important;
  }

  .overview-command {
    animation: cosmicCommandDrift 22s ease-in-out infinite alternate !important;
  }

  .overview-command .overview-metric,
  .overview-command + .content-grid > .panel,
  .overview-orders-panel,
  .login-dialog[open] {
    animation: none !important;
  }
}

/* TikTok Shop-inspired tablet and mobile workspace */
@media (max-width: 1024px) {
  body:not(.brand-page) {
    background: #f5f5f7;
  }

  .main {
    width: 100%;
    padding: 0 14px calc(108px + env(safe-area-inset-bottom));
    background: #f5f5f7;
  }

  .topbar {
    position: sticky;
    z-index: 55;
    top: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin: 0 -14px 16px;
    padding: 12px 14px 13px;
    border-bottom: 1px solid #ebebee;
    background: #fff;
    box-shadow: 0 6px 20px rgba(17, 17, 22, .035);
  }

  .topbar > div:nth-child(2) {
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
  }

  .topbar .eyebrow {
    max-width: 100%;
    margin-bottom: 5px;
    overflow: hidden;
    color: #8d8f96;
    font-size: 11px;
    letter-spacing: .09em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar h1 {
    font-size: clamp(28px, 4vw, 34px);
    line-height: 1;
    letter-spacing: -.05em;
  }

  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 8px;
  }

  .topbar-actions .shop-selector {
    width: 100%;
    max-width: none;
    grid-column: 1 / -1;
  }

  .shop-switcher {
    min-height: 56px;
    border-color: #e1e2e6;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(17, 17, 22, .045);
  }

  .shop-switcher-copy small,
  .shop-switcher-meta,
  .shop-option small {
    font-size: 11px;
  }

  .topbar-actions .segmented {
    min-width: 0;
    min-height: 46px;
    padding: 3px;
    border-color: #e3e4e8;
    border-radius: 14px;
    background: #f1f1f3;
  }

  .segmented button {
    min-height: 40px;
    border-radius: 11px;
    font-size: 12px;
  }

  .segmented button.active {
    background: #111116;
    color: #fff;
  }

  .refresh-control {
    width: 46px;
    min-height: 46px;
    padding: 0;
    border-color: #e1e2e6;
    border-radius: 14px;
  }

  .refresh-control #refresh-label {
    display: none;
  }

  .notice,
  .preview-banner {
    margin-bottom: 12px;
    border-radius: 15px;
  }

  .view-panel {
    width: 100%;
  }

  .section-head {
    align-items: flex-start;
    gap: 14px;
    margin: 22px 0 14px;
  }

  .section-head h2 {
    font-size: clamp(30px, 4.2vw, 38px);
    line-height: 1.05;
    letter-spacing: -.05em;
  }

  .section-head p:last-child {
    margin-top: 7px;
    font-size: 13px;
    line-height: 1.65;
  }

  .panel {
    padding: 17px;
    border-color: #e8e9ec;
    border-radius: 20px;
    box-shadow: 0 8px 26px rgba(17, 17, 22, .045);
  }

  .overview-command {
    border-radius: 22px;
    box-shadow: 0 18px 42px rgba(19, 14, 34, .17);
  }

  .overview-command-grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr);
    gap: 24px;
    padding: 26px 22px 22px;
  }

  .overview-value-row strong {
    font-size: clamp(50px, 7.2vw, 72px);
  }

  .overview-stats {
    margin-top: 24px;
  }

  .overview-rail {
    padding-top: 0;
    border-top: 0;
  }

  .overview-brief {
    padding: 16px 22px;
  }

  .overview-command + .content-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(250px, .7fr);
    gap: 12px;
    margin-top: 12px;
  }

  .overview-priority-panel .task-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .inventory-summary,
  .product-summary,
  .finance-summary,
  .procurement-summary {
    gap: 10px;
  }

  .inventory-summary-card,
  .finance-summary article,
  .procurement-summary article {
    border-color: #e8e9ec;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(17, 17, 22, .04);
  }

  .inventory-summary-card span,
  .finance-summary article span,
  .procurement-summary article span {
    color: #74777e;
    font-size: 12px;
  }

  .inventory-summary-card strong,
  .finance-summary article strong,
  .procurement-summary article strong {
    font-size: clamp(28px, 4vw, 36px);
    letter-spacing: -.045em;
  }

  .primary,
  .secondary,
  .search,
  .row-action,
  .link-button,
  .pagination-row button {
    border-radius: 999px;
  }

  .primary {
    box-shadow: 5px 0 0 -3px #fe2c55;
  }

  .search {
    border-color: #e1e2e6;
    border-radius: 14px;
    background: #fff;
  }

  .product-actions,
  .inventory-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .product-actions .search,
  .inventory-actions .inventory-search-box {
    grid-column: 1 / -1;
  }

  .product-actions button,
  .inventory-actions button {
    min-height: 44px;
  }

  .product-panel,
  .order-lock-panel,
  .finance-product-panel,
  .giga-inventory-panel {
    border-top-width: 0;
  }

  .product-catalog-table,
  .product-catalog-table tbody,
  .orders-list-table,
  .orders-list-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .product-catalog-table thead,
  .orders-list-table thead {
    display: none;
  }

  .product-catalog-table tbody,
  .orders-list-table tbody {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .product-catalog-table tr,
  .orders-list-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #e7e8eb;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(17, 17, 22, .045);
  }

  .product-catalog-table td,
  .orders-list-table td {
    position: static;
    display: block;
    min-width: 0;
    padding: 12px 14px;
    border-bottom: 1px solid #f0f1f3;
    text-align: left;
  }

  .product-catalog-table td::before,
  .orders-list-table td::before {
    display: block;
    margin-bottom: 5px;
    color: #8a8c93;
    font-size: 11px;
    font-weight: 750;
  }

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

  .product-catalog-table td:nth-child(1) {
    padding-block: 16px 14px;
    background: linear-gradient(120deg, #fff, #f8f8fa);
  }

  .product-catalog-table td:nth-child(1)::before {
    display: none;
  }

  .product-catalog-table td:nth-child(1) strong {
    max-width: 100%;
    font-size: 15px;
    line-height: 1.45;
  }

  .product-catalog-table td:nth-child(3)::before { content: "价格"; }
  .product-catalog-table td:nth-child(4)::before { content: "库存"; }
  .product-catalog-table td:nth-child(5)::before { content: "Giga 状态"; }
  .product-catalog-table td:nth-child(6)::before { content: "同步时间"; }
  .product-catalog-table td:nth-child(7)::before { display: none; }

  .product-catalog-table .sku-chip-list {
    max-width: none;
  }

  .product-catalog-table td:nth-child(7) {
    padding-block: 10px 12px;
    border-bottom: 0;
  }

  .product-catalog-table .product-edit-button {
    width: 100%;
    min-height: 42px;
  }

  .orders-list-table td:nth-child(1),
  .orders-list-table td:nth-child(2),
  .orders-list-table td:nth-child(3) {
    grid-column: 1 / -1;
  }

  .orders-list-table td:nth-child(1) {
    padding-block: 15px 11px;
    background: linear-gradient(120deg, #fff, #f8f8fa);
  }

  .orders-list-table td:nth-child(1)::before,
  .orders-list-table td:nth-child(2)::before,
  .orders-list-table td:nth-child(3)::before {
    display: none;
  }

  .orders-list-table td:nth-child(1) strong {
    max-width: 100%;
    font-size: 14px;
  }

  .orders-list-table td:nth-child(3) strong {
    max-width: 100%;
    font-size: 14px;
    line-height: 1.45;
    white-space: normal;
  }

  .orders-list-table td:nth-child(4)::before { content: "件数"; }
  .orders-list-table td:nth-child(5)::before { content: "状态"; }
  .orders-list-table td:nth-child(6)::before { content: "金额"; }
  .orders-list-table td:nth-child(7)::before { content: "下单时间"; }
  .orders-list-table td:nth-child(7) { grid-column: 1 / -1; border-bottom: 0; }
  .orders-list-table tr:has(td.empty) {
    display: block;
    grid-column: 1 / -1;
  }

  .finance-product-table,
  .finance-product-table tbody,
  .finance-store-table,
  .finance-store-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .finance-product-table thead,
  .finance-store-table thead {
    display: none;
  }

  .finance-product-table tbody,
  .finance-store-table tbody {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .finance-product-table tr,
  .finance-store-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #e7e8eb;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(17, 17, 22, .04);
  }

  .finance-product-table td,
  .finance-store-table td {
    position: static;
    display: block;
    min-width: 0;
    padding: 12px 14px;
    border-bottom: 1px solid #f0f1f3;
    text-align: left;
  }

  .finance-product-table td[data-label]::before,
  .finance-store-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: #8a8c93;
    font-size: 11px;
    font-weight: 750;
  }

  .finance-product-table td:first-child,
  .finance-store-table td:first-child,
  .finance-product-table td[data-label="TikTok 预估回款"],
  .finance-product-table td[data-label="Giga 支付金额"],
  .finance-product-table td[data-label="核算状态"],
  .finance-store-table td[data-label="TikTok 预估回款"],
  .finance-store-table td[data-label="Giga 支付合计"],
  .finance-store-table td[data-label="核算状态"] {
    grid-column: 1 / -1;
  }

  .finance-product-table td:first-child,
  .finance-store-table td:first-child {
    padding-block: 15px 13px;
    background: linear-gradient(120deg, #fff, #f8f8fa);
  }

  .finance-product-table td:first-child::before,
  .finance-store-table td:first-child::before {
    display: none;
  }

  .finance-product-table td[data-label="核算状态"],
  .finance-store-table td[data-label="核算状态"] {
    border-bottom: 0;
  }

  .finance-command {
    border-radius: 22px;
  }

  .finance-tabs {
    position: sticky;
    z-index: 12;
    top: 148px;
    padding: 4px;
    border: 1px solid #e4e5e8;
    border-radius: 14px;
    background: #fff;
  }

  .finance-tabs button {
    border-radius: 11px;
  }

  .task-board {
    gap: 12px;
  }

  .task-card {
    padding: 18px;
    border-radius: 18px;
  }

  .dialog {
    border-radius: 22px;
  }
}

@media (max-width: 760px) {
  .main {
    padding-inline: 10px;
  }

  .topbar {
    margin-inline: -10px;
    padding-inline: 10px;
  }

  .topbar h1 {
    font-size: 29px;
  }

  .overview-command-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 20px 16px 18px;
  }

  .overview-rail {
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .09);
  }

  .overview-value-row strong {
    font-size: clamp(47px, 14vw, 60px);
  }

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

  .overview-metric {
    min-height: 112px;
    padding: 14px;
  }

  .overview-brief {
    padding: 16px;
  }

  .overview-command + .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .overview-trend-panel,
  .overview-priority-panel,
  .overview-orders-panel {
    padding: 17px 14px;
    border-radius: 18px;
  }

  .product-catalog-table tbody,
  .orders-list-table tbody {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-catalog-table tr,
  .orders-list-table tr {
    border-radius: 17px;
  }

  .finance-product-table tr,
  .finance-store-table tr {
    border-radius: 17px;
  }

  .finance-product-table tbody,
  .finance-store-table tbody {
    grid-template-columns: minmax(0, 1fr);
  }

  .finance-tabs {
    top: 142px;
  }

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

  .inventory-summary-card,
  .finance-summary article,
  .procurement-summary article {
    min-height: 110px;
    padding: 15px 13px;
  }

  .task-board {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Keep the brand visible after refresh on tablet and mobile layouts. */
.mobile-erp-brand {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-erp-brand {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1px 0 3px;
  }

  .mobile-erp-brand .brand-mark {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 6px 12px rgba(74, 35, 145, .16));
  }

  .mobile-erp-brand > div {
    min-width: 0;
    display: grid;
    gap: 1px;
  }

  .mobile-erp-brand strong {
    color: #111116;
    font-size: 17px;
    line-height: 1.15;
    letter-spacing: -.025em;
  }

  .mobile-erp-brand small {
    color: #777b84;
    font-size: 12px;
    line-height: 1.2;
  }
}

/* After-sales workflow inside task coordination */
.aftersale-view {
  position: relative;
}

.aftersale-command {
  position: relative;
  display: flex;
  overflow: hidden;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 1%, rgba(254, 44, 85, .18), transparent 30%),
    radial-gradient(circle at 8% 100%, rgba(37, 244, 238, .13), transparent 28%),
    linear-gradient(135deg, #0c0d13, #1b1526);
  box-shadow: 0 22px 54px rgba(17, 17, 22, .16);
}

.aftersale-command::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 38px 38px;
  content: "";
  mask-image: linear-gradient(90deg, #000, transparent 78%);
  pointer-events: none;
}

.aftersale-command > div {
  position: relative;
  z-index: 1;
}

.aftersale-command h2 {
  margin: 8px 0 0;
  color: #fff;
  font-size: 34px;
  letter-spacing: -.035em;
}

.aftersale-command p:last-child {
  max-width: 760px;
  margin: 10px 0 0;
  color: #b4b6c2;
  font-size: 14px;
  line-height: 1.7;
}

.aftersale-command .eyebrow {
  color: #8f93a0;
}

.aftersale-command-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 9px;
}

.aftersale-command-actions button {
  min-height: 46px;
  border-radius: 999px;
}

.aftersale-command-actions .secondary {
  border-color: rgba(37, 244, 238, .36);
  background: rgba(37, 244, 238, .09);
  color: #9bfcf8;
}

.aftersale-command-actions .primary {
  border-color: #fff;
  background: #fff;
  color: #111116;
}

.aftersale-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 11px;
  margin-top: 14px;
}

.aftersale-summary article {
  min-height: 116px;
  padding: 17px;
  border: 1px solid #e3e4e8;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(17, 17, 22, .04);
}

.aftersale-summary span,
.aftersale-summary strong,
.aftersale-summary small {
  display: block;
}

.aftersale-summary span {
  color: #777a82;
  font-size: 13px;
}

.aftersale-summary strong {
  margin-top: 7px;
  color: #111116;
  font-size: 28px;
  line-height: 1;
}

.aftersale-summary small {
  margin-top: 9px;
  color: #858891;
  font-size: 12px;
}

.aftersale-summary article:nth-child(1) { border-top: 4px solid #111116; }
.aftersale-summary article:nth-child(2) { border-top: 4px solid #fe2c55; }
.aftersale-summary article:nth-child(3) { border-top: 4px solid #8b5cf6; }
.aftersale-summary article:nth-child(4) { border-top: 4px solid #25c9c4; }
.aftersale-summary article:nth-child(5) { border-top: 4px solid #f59e0b; }
.aftersale-summary article:nth-child(6) { border-top: 4px solid #10b981; }

.aftersale-notice {
  margin-top: 13px;
}

.aftersale-panel {
  margin-top: 14px;
}

.aftersale-panel-head {
  align-items: flex-start;
}

.aftersale-panel-head p:last-child {
  max-width: 720px;
  margin: 7px 0 0;
  color: #777a82;
  font-size: 13px;
  line-height: 1.6;
}

.aftersale-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

.aftersale-filters .search {
  width: min(290px, 32vw);
  min-height: 46px;
}

.aftersale-filters select {
  min-width: 130px;
  min-height: 46px;
}

.aftersale-filters select.filter-active {
  border-color: #8b5cf6;
  background-color: #f7f4ff;
  color: #5b21b6;
  box-shadow: inset 3px 0 #8b5cf6;
}

.aftersale-sync-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid #eff0f2;
  border-bottom: 1px solid #eff0f2;
  background: #fafafb;
  color: #747780;
  font-size: 12px;
}

.aftersale-filter-result {
  margin-left: auto;
  padding: 6px 10px;
  border: 1px solid #e4e6eb;
  border-radius: 999px;
  background: #fff;
  color: #555962;
  font-weight: 700;
}

.aftersale-clear-filter {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid #d7d9df;
  border-radius: 10px;
  background: #fff;
  color: #4f535b;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.aftersale-clear-filter:hover,
.aftersale-clear-filter:focus-visible {
  outline: 0;
  border-color: #8b5cf6;
  color: #5b21b6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .1);
}

.aftersale-table td strong {
  max-width: 280px;
}

.aftersale-table .money {
  white-space: nowrap;
  font-weight: 800;
}

.aftersale-progress {
  width: 100%;
  max-width: 180px;
  height: 6px;
  overflow: hidden;
  margin-top: 8px;
  border-radius: 999px;
  background: #eceef2;
}

.aftersale-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #25c9c4, #8b5cf6, #fe2c55);
  transition: width .35s ease;
}

.aftersale-row-actions {
  display: flex;
  justify-content: flex-end;
}

.aftersale-task-button {
  border-color: #111116;
  background: #111116;
  color: #fff;
  font-weight: 800;
}

.aftersale-dialog-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.aftersale-dialog-summary span {
  padding: 10px;
  border: 1px solid #ececf0;
  border-radius: 10px;
  background: #fafafb;
  color: #777a82;
  font-size: 12px;
}

.aftersale-dialog-summary strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: #222329;
  font-size: 13px;
}

.task-section-head {
  margin-top: 28px;
}

#new-task-button {
  min-height: 44px;
}

@media (max-width: 1024px) {
  .aftersale-command {
    align-items: stretch;
    flex-direction: column;
    padding: 23px 20px;
  }

  .aftersale-command-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .aftersale-panel-head {
    gap: 14px;
  }

  .aftersale-filters {
    width: 100%;
  }

  .aftersale-filters .search {
    width: auto;
    flex: 1 1 auto;
  }
}

@media (max-width: 760px) {
  .aftersale-command {
    border-radius: 18px;
  }

  .aftersale-command h2 {
    font-size: 28px;
  }

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

  .aftersale-command-actions button {
    width: 100%;
  }

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

  .aftersale-summary article {
    min-height: 108px;
    padding: 14px;
  }

  .aftersale-summary strong {
    font-size: 25px;
  }

  .aftersale-filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .aftersale-filters .search,
  .aftersale-filters select {
    width: 100%;
  }

  .aftersale-sync-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .aftersale-filter-result {
    margin-left: 0;
  }

  .aftersale-table,
  .aftersale-table tbody {
    display: block;
    min-width: 0;
  }

  .aftersale-table thead {
    display: none;
  }

  .aftersale-table tbody {
    display: grid;
    gap: 11px;
    padding: 12px;
  }

  .aftersale-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border: 1px solid #e4e5e8;
    border-radius: 16px;
    background: #fff;
  }

  .aftersale-table td {
    min-width: 0;
    display: block;
    padding: 11px 12px;
    border-bottom: 1px solid #f0f1f3;
  }

  .aftersale-table td:nth-child(1),
  .aftersale-table td:nth-child(2),
  .aftersale-table td:nth-child(3),
  .aftersale-table td:nth-child(4) {
    grid-column: 1 / -1;
  }

  .aftersale-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: #8a8d95;
    font-size: 12px;
  }

  .aftersale-table td:nth-last-child(2) {
    border-bottom: 0;
  }

  .aftersale-table td:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .aftersale-row-actions button {
    width: 100%;
    min-height: 44px;
  }

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

/* Unified ERP dropdown and disclosure controls */
:root {
  --erp-control-border: #d8dbe1;
  --erp-control-border-hover: #bfc3cc;
  --erp-control-shadow: 0 10px 30px rgba(20, 21, 28, .09);
  --erp-control-shadow-open: 0 18px 44px rgba(20, 21, 28, .15);
  --erp-control-radius: 14px;
  --erp-control-focus: 0 0 0 4px rgba(139, 92, 246, .13);
}

select,
.login-form select,
.dialog-body select,
.aftersale-filters select,
.product-editor-dialog .product-editor-fields select {
  min-height: 46px;
  padding: 0 42px 0 14px;
  appearance: none;
  border: 1px solid var(--erp-control-border);
  border-radius: 12px;
  background-color: #f8f9fb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b707a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 16px 16px;
  color: #191a1f;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

select:hover,
.login-form select:hover,
.dialog-body select:hover,
.aftersale-filters select:hover,
.product-editor-dialog .product-editor-fields select:hover {
  border-color: var(--erp-control-border-hover);
  background-color: #fff;
}

select:focus-visible,
.login-form select:focus-visible,
.dialog-body select:focus-visible,
.aftersale-filters select:focus-visible,
.product-editor-dialog .product-editor-fields select:focus-visible {
  outline: 0;
  border-color: #8b5cf6;
  background-color: #fff;
  box-shadow: var(--erp-control-focus);
}

select:disabled,
.dialog-body select:disabled,
.aftersale-filters select:disabled {
  cursor: not-allowed;
  opacity: .58;
}

select option {
  padding: 10px 12px;
  background: #fff;
  color: #191a1f;
}

.shop-switcher {
  min-height: 56px;
  grid-template-columns: 38px minmax(86px, 1fr) auto 20px;
  gap: 11px;
  padding: 8px 13px 8px 9px;
  border-color: var(--erp-control-border);
  border-radius: var(--erp-control-radius);
  background: linear-gradient(180deg, #fff, #fbfbfc);
  box-shadow: 0 4px 14px rgba(20, 21, 28, .05);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.shop-switcher:hover {
  border-color: var(--erp-control-border-hover);
  background: #fff;
  box-shadow: 0 9px 24px rgba(20, 21, 28, .09);
  transform: translateY(-1px);
}

.shop-switcher:focus-visible,
.shop-switcher[aria-expanded="true"] {
  outline: 0;
  border-color: #8b5cf6;
  background: #fff;
  box-shadow: var(--erp-control-focus), var(--erp-control-shadow-open);
}

.shop-switcher-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(37, 244, 238, .18), transparent 48%),
    #111116;
  box-shadow: inset -3px 0 0 rgba(254, 44, 85, .62);
}

.shop-switcher-copy small {
  color: #858992;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .04em;
}

.shop-switcher-copy strong {
  font-size: 14px;
  letter-spacing: -.01em;
}

.shop-switcher-meta {
  min-height: 27px;
  border-color: #e1e4e8;
  background: #f5f6f8;
  color: #60646d;
  font-size: 11px;
}

.shop-switcher-chevron {
  width: 18px;
  height: 18px;
  stroke: #5f646e;
  transition: transform .2s ease, stroke .2s ease;
}

.shop-switcher[aria-expanded="true"] .shop-switcher-chevron {
  stroke: #6d42d9;
  transform: rotate(180deg);
}

.shop-options {
  top: calc(100% + 8px);
  padding: 7px;
  border-color: #d6d9e0;
  border-radius: var(--erp-control-radius);
  background: rgba(255, 255, 255, .98);
  box-shadow: var(--erp-control-shadow-open);
  backdrop-filter: blur(18px);
  animation: erpDropdownIn .18s ease-out;
}

.shop-option {
  position: relative;
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.shop-option:hover,
.shop-option:focus-visible {
  border-color: #e4e6eb;
  background: #f5f6f8;
  transform: translateX(2px);
}

.shop-option[aria-selected="true"] {
  border-color: #111116;
  background:
    linear-gradient(90deg, rgba(37, 244, 238, .08), transparent 55%),
    #111116;
  box-shadow: inset 3px 0 #25f4ee;
}

.shop-option strong {
  font-size: 14px;
}

.shop-option small {
  font-size: 12px;
}

.side-account-trigger {
  min-height: 60px;
  padding: 10px 12px;
  border-color: #30323a;
  border-radius: var(--erp-control-radius);
  background: linear-gradient(145deg, #1a1b21, #14151a);
  box-shadow: inset 0 1px rgba(255, 255, 255, .035);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.side-account-trigger:hover {
  border-color: #454852;
  background: linear-gradient(145deg, #22232a, #191a20);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
  transform: translateY(-1px);
}

.side-account-trigger:focus-visible,
.side-account-trigger[aria-expanded="true"] {
  outline: 0;
  border-color: rgba(167, 139, 250, .66);
  background: linear-gradient(145deg, #24212f, #18171f);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .12), 0 14px 30px rgba(0, 0, 0, .26);
}

.side-account-avatar {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .3), transparent 48%),
    #25f4ee;
  box-shadow: 4px 0 0 -1px rgba(254, 44, 85, .58);
}

.side-account-chevron {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}

.side-account-chevron::before {
  width: 8px;
  height: 8px;
  border-right: 2px solid #858a96;
  border-bottom: 2px solid #858a96;
  content: "";
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease, border-color .2s ease;
}

.side-account-trigger[aria-expanded="true"] .side-account-chevron {
  transform: none;
}

.side-account-trigger[aria-expanded="true"] .side-account-chevron::before {
  border-color: #b9a5ff;
  transform: translateY(2px) rotate(-135deg);
}

.side-account-menu {
  bottom: calc(100% + 10px);
  padding: 10px;
  border-color: #393b45;
  border-radius: var(--erp-control-radius);
  background: rgba(18, 19, 24, .99);
  box-shadow: 0 22px 56px rgba(0, 0, 0, .46);
  backdrop-filter: blur(20px);
  animation: erpDropdownIn .18s ease-out;
}

.side-account-detail {
  padding: 11px 11px 12px;
}

.side-account-detail span {
  font-size: 13px;
}

.side-account-detail small {
  font-size: 12px;
}

.sidebar-menu-action {
  min-height: 56px;
  border-radius: 11px;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.sidebar-menu-action:hover,
.sidebar-menu-action:focus-visible,
.sidebar-menu-action.active {
  outline: 0;
  border-color: #444751;
  background: #252730;
  transform: translateX(2px);
}

.sidebar-menu-action > span {
  color: #73faf5;
}

.sidebar-menu-action.sidebar-logout > span {
  color: #ff91a5;
}

@keyframes erpDropdownIn {
  from {
    opacity: 0;
    transform: translateY(5px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1024px) {
  .shop-switcher {
    min-height: 58px;
  }

  .topbar-actions .shop-selector {
    width: 100%;
  }

  .side-account-trigger {
    border-radius: 13px;
  }

  .side-account-trigger:hover {
    transform: none;
  }

  .side-account-chevron {
    display: none;
  }

  .side-account-menu {
    width: min(320px, calc(100vw - 16px));
    border-radius: 16px;
  }
}

@media (max-width: 760px) {
  select {
    min-height: 48px;
    border-radius: 12px;
    font-size: 14px;
  }

  .shop-switcher {
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    gap: 10px;
    min-height: 58px;
  }

  .shop-switcher-meta {
    display: none;
  }

  .shop-options {
    max-height: min(52vh, 360px);
  }

  .shop-option {
    min-height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shop-options,
  .side-account-menu {
    animation: none;
  }
}

/* Fully opaque custom select menus for every ERP form control. */
.erp-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.erp-select > select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.erp-select-trigger {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 13px 0 14px;
  border: 1px solid #d8dbe1;
  border-radius: 12px;
  background: #f8f9fb;
  color: #191a1f;
  text-align: left;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.erp-select-trigger:hover {
  border-color: #bfc3cc;
  background: #fff;
}

.erp-select.open .erp-select-trigger,
.erp-select-trigger:focus-visible {
  outline: 0;
  border-color: #8b5cf6;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .13);
}

.erp-select-trigger:disabled {
  cursor: not-allowed;
  opacity: .56;
}

.erp-select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.erp-select-arrow {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-right: 2px solid #656a74;
  border-bottom: 2px solid #656a74;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease, border-color .2s ease;
}

.erp-select.open .erp-select-arrow {
  border-color: #6d42d9;
  transform: translateY(2px) rotate(-135deg);
}

.erp-select-menu {
  position: absolute;
  z-index: 90;
  top: calc(100% + 7px);
  left: 0;
  width: max(100%, 170px);
  max-height: min(310px, 52vh);
  overflow-y: auto;
  padding: 7px;
  border: 1px solid #d6d9e0;
  border-radius: 13px;
  background: #fff !important;
  box-shadow: 0 18px 44px rgba(20, 21, 28, .16);
  opacity: 1 !important;
  isolation: isolate;
  scrollbar-width: thin;
  animation: erpSelectMenuIn .16s ease-out;
}

.erp-select-menu[hidden] {
  display: none !important;
}

.erp-select-option {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #fff;
  color: #2f3239;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.erp-select-option:hover,
.erp-select-option:focus-visible {
  outline: 0;
  border-color: #e4e6eb;
  background: #f5f6f8;
}

.erp-select-option[aria-selected="true"] {
  border-color: #111116;
  background: #111116;
  color: #fff;
  box-shadow: inset 3px 0 #25f4ee;
}

.erp-select-option:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.erp-select-check::before {
  content: "✓";
  display: block;
  color: #25f4ee;
  font-size: 14px;
  font-weight: 900;
  opacity: 0;
}

.erp-select-option[aria-selected="true"] .erp-select-check::before {
  opacity: 1;
}

.aftersale-filters .erp-select {
  width: auto;
  min-width: 140px;
  flex: 0 1 auto;
}

.aftersale-filters .erp-select-menu {
  width: 100%;
  min-width: 170px;
}

.erp-select:has(select.filter-active) .erp-select-trigger {
  border-color: #8b5cf6;
  background: #f7f4ff;
  color: #5b21b6;
  box-shadow: inset 3px 0 #8b5cf6;
}

@keyframes erpSelectMenuIn {
  from {
    opacity: 0;
    transform: translateY(4px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 760px) {
  .erp-select-trigger {
    min-height: 48px;
    font-size: 14px;
  }

  .erp-select-option {
    min-height: 48px;
    font-size: 14px;
  }

  .aftersale-filters .erp-select {
    width: 100%;
  }

  .erp-select-menu {
    width: 100%;
    max-height: min(44vh, 300px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .erp-select-menu {
    animation: none;
  }
}

/* Product center secondary navigation and selection intelligence */
.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group > .nav-item {
  width: 100%;
}

.nav-group.child-active .nav-item {
  border-color: #30323a;
  background: #1b1c21;
  color: #fff;
  box-shadow: inset 3px 0 #8b5cf6;
}

.nav-submenu {
  display: grid;
  gap: 3px;
  margin: 0 4px 4px 18px;
  padding-left: 12px;
  border-left: 1px solid #2c2e36;
  animation: product-submenu-reveal .18s ease both;
}

.nav-submenu[hidden] {
  display: none !important;
}

@keyframes product-submenu-reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-subitem {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #8e929b;
  text-align: left;
  font-size: 12px;
  cursor: pointer;
  transition: color .16s ease, border-color .16s ease, background .16s ease, transform .16s ease;
}

.nav-subitem > span {
  color: #8b5cf6;
  font-size: 12px;
}

.nav-subitem b {
  font-weight: 750;
}

.nav-subitem:hover,
.nav-subitem:focus-visible,
.nav-subitem.active {
  outline: 0;
  border-color: #34363e;
  background: #202127;
  color: #fff;
  transform: translateX(2px);
}

.nav-subitem.active {
  box-shadow: inset 3px 0 #25f4ee;
}

.product-section-tabs {
  display: inline-flex;
  gap: 5px;
  margin-bottom: 18px;
  padding: 5px;
  border: 1px solid #dfe2e7;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(17, 17, 22, .035);
}

.product-section-tabs button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #6e727b;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.product-section-tabs button:hover,
.product-section-tabs button:focus-visible {
  outline: 0;
  background: #f3f4f6;
  color: #1c1d22;
}

.product-section-tabs button.active {
  background: #111116;
  color: #fff;
  box-shadow: inset 3px 0 #25f4ee;
}

.selection-view {
  position: relative;
}

.selection-hero {
  position: relative;
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, .55fr);
  gap: 28px;
  padding: 34px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 7% 0%, rgba(37, 244, 238, .14), transparent 30%),
    radial-gradient(circle at 92% 10%, rgba(139, 92, 246, .26), transparent 34%),
    linear-gradient(135deg, #0b0c12, #1d1529);
  box-shadow: 0 24px 66px rgba(17, 17, 22, .16);
}

.selection-hero::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(90deg, #000, transparent 76%);
  pointer-events: none;
}

.selection-hero > div,
.selection-signal-card {
  position: relative;
  z-index: 1;
}

.selection-hero h2 {
  max-width: 720px;
  margin: 9px 0 0;
  color: #fff;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.selection-hero p:last-of-type {
  max-width: 760px;
  margin: 14px 0 0;
  color: #b5b7c3;
  font-size: 14px;
  line-height: 1.72;
}

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

.selection-primary,
.selection-secondary {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
}

.selection-primary {
  border: 1px solid #fff;
  background: #fff;
  color: #111116;
}

.selection-primary:hover {
  background: #f5f5f7;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .22);
}

.selection-secondary {
  border: 1px solid rgba(37, 244, 238, .38);
  background: rgba(37, 244, 238, .09);
  color: #9bfcf8;
}

.selection-secondary:hover {
  border-color: #25f4ee;
  background: rgba(37, 244, 238, .15);
}

.selection-signal-card {
  align-self: stretch;
  min-width: 0;
  padding: 21px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 18px;
  background: rgba(7, 8, 13, .58);
  backdrop-filter: blur(16px);
}

.selection-signal-card > span {
  color: #8d919d;
  font: 800 12px var(--mono);
  letter-spacing: .06em;
}

.selection-signal-card > strong {
  display: block;
  margin-top: 20px;
  color: #fff;
  font-size: 52px;
  line-height: 1;
}

.selection-signal-card > small {
  display: block;
  margin-top: 7px;
  color: #9da0ac;
  font-size: 12px;
}

.selection-signal-card > div {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: #d9dae0;
  font-size: 12px;
}

.selection-signal-card i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25f4ee;
  box-shadow: 0 0 14px rgba(37, 244, 238, .72);
}

.selection-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin-top: 14px;
}

.selection-summary article {
  min-height: 116px;
  padding: 18px;
  border: 1px solid #e3e4e8;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(17, 17, 22, .04);
}

.selection-summary span,
.selection-summary strong,
.selection-summary small {
  display: block;
}

.selection-summary span {
  color: #777a82;
  font-size: 13px;
}

.selection-summary strong {
  margin-top: 7px;
  color: #111116;
  font-size: 28px;
  line-height: 1;
}

.selection-summary small {
  margin-top: 9px;
  color: #858891;
  font-size: 12px;
}

.selection-summary article:nth-child(1) { border-top: 4px solid #111116; }
.selection-summary article:nth-child(2) { border-top: 4px solid #25c9c4; }
.selection-summary article:nth-child(3) { border-top: 4px solid #8b5cf6; }
.selection-summary article:nth-child(4) { border-top: 4px solid #fe2c55; }

.selection-notice {
  margin-top: 13px;
}

.selection-ranking-panel,
.selection-opportunity-panel {
  margin-top: 14px;
}

.selection-ranking-table .selection-rank {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f1f2f4;
  color: #555962;
  font: 800 12px var(--mono);
}

.selection-ranking-table .selection-rank.top {
  background: #111116;
  color: #25f4ee;
  box-shadow: 4px 0 0 -1px #fe2c55;
}

.selection-ranking-table td strong {
  max-width: 300px;
}

.selection-category {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(139, 92, 246, .22);
  border-radius: 999px;
  background: rgba(139, 92, 246, .08);
  color: #6840cd;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.selection-opportunity-head {
  align-items: flex-start;
}

.selection-opportunity-head p:last-child {
  max-width: 760px;
  margin: 7px 0 0;
  color: #777a82;
  font-size: 13px;
  line-height: 1.6;
}

.selection-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

.selection-filters .search {
  width: min(290px, 34vw);
  min-height: 46px;
}

.selection-filters .erp-select {
  width: auto;
  min-width: 150px;
}

.selection-opportunity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  padding: 16px;
}

.selection-opportunity-card {
  min-width: 0;
  display: grid;
  gap: 13px;
  padding: 18px;
  border: 1px solid #e3e5e9;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 17, 22, .045);
}

.selection-opportunity-top,
.selection-product-head,
.selection-product-stats,
.selection-giga-detail,
.selection-reasons,
.selection-opportunity-card footer {
  min-width: 0;
}

.selection-opportunity-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.selection-score {
  color: #858891;
  font: 800 12px var(--mono);
}

.selection-product-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.selection-product-image {
  width: 72px;
  height: 72px;
  display: grid;
  flex: 0 0 auto;
  overflow: hidden;
  place-items: center;
  border-radius: 13px;
  background: #f0f1f4;
}

.selection-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.selection-product-image-empty {
  color: #8b8e97;
  font: 800 12px var(--mono);
}

.selection-product-head h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #17181d;
  font-size: 16px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.selection-product-head p {
  margin: 5px 0 0;
  color: #7b7e87;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.selection-product-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.selection-product-stats span {
  padding: 9px;
  border-radius: 10px;
  background: #f7f8fa;
}

.selection-product-stats small,
.selection-product-stats strong {
  display: block;
}

.selection-product-stats small {
  color: #888b93;
  font-size: 12px;
}

.selection-product-stats strong {
  margin-top: 3px;
  color: #222329;
  font-size: 13px;
}

.selection-match-box {
  padding: 13px;
  border: 1px solid #e8e2f8;
  border-radius: 12px;
  background: linear-gradient(135deg, #faf8ff, #fff);
}

.selection-match-box > div:first-child span,
.selection-match-box > div:first-child strong,
.selection-match-box > div:first-child small {
  display: block;
}

.selection-match-box > div:first-child span {
  color: #7a6b9f;
  font-size: 12px;
  font-weight: 800;
}

.selection-match-box > div:first-child strong {
  margin-top: 4px;
  color: #2d263c;
  font-size: 14px;
  line-height: 1.45;
}

.selection-match-box > div:first-child small {
  margin-top: 3px;
  color: #7a7585;
  font-size: 12px;
}

.selection-giga-detail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid #e8e2f8;
}

.selection-giga-detail span,
.selection-giga-detail strong {
  display: block;
}

.selection-giga-detail span {
  color: #817b8c;
  font-size: 12px;
}

.selection-giga-detail strong {
  margin-top: 2px;
  overflow-wrap: anywhere;
  color: #25212e;
  font-size: 12px;
}

.selection-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.selection-reasons span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #62666f;
  font-size: 12px;
}

.selection-opportunity-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 11px;
  border-top: 1px solid #f0f1f3;
}

.selection-opportunity-card footer small {
  min-width: 0;
  color: #858891;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.selection-opportunity-card footer button {
  flex: 0 0 auto;
  min-height: 44px;
}

.selection-method-note {
  margin: 0;
  padding: 13px 16px;
  border-top: 1px solid #eceef1;
  background: #fafafb;
  color: #777a82;
  font-size: 12px;
  line-height: 1.65;
}

@media (max-width: 1100px) {
  .nav-group {
    display: contents;
  }

  .nav-submenu {
    display: none !important;
  }

  .selection-hero {
    grid-template-columns: minmax(0, 1fr) minmax(220px, .45fr);
    gap: 20px;
    padding: 27px;
  }

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

  .selection-opportunity-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .nav-group {
    display: contents;
  }

  .nav-submenu {
    display: none !important;
  }

  .product-section-tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-section-tabs button {
    min-height: 44px;
  }

  .selection-hero {
    grid-template-columns: 1fr;
  }

  .selection-signal-card {
    min-height: 160px;
  }

  .selection-filters {
    width: 100%;
  }

  .selection-filters .search {
    width: auto;
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-submenu {
    animation: none;
  }
}

@media (max-width: 760px) {
  .selection-hero {
    padding: 22px 18px;
    border-radius: 19px;
  }

  .selection-hero h2 {
    font-size: 31px;
  }

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

  .selection-primary,
  .selection-secondary {
    width: 100%;
    min-height: 48px;
  }

  .selection-summary {
    gap: 8px;
  }

  .selection-summary article {
    min-height: 108px;
    padding: 14px;
  }

  .selection-summary strong {
    font-size: 25px;
  }

  .selection-opportunity-head {
    gap: 13px;
  }

  .selection-filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .selection-filters .search {
    width: 100%;
  }

  .selection-filters .erp-select {
    width: 100%;
  }

  .selection-opportunity-grid {
    padding: 12px;
  }

  .selection-opportunity-card {
    padding: 15px;
  }

  .selection-product-image {
    width: 64px;
    height: 64px;
  }

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

  .selection-opportunity-card footer {
    align-items: stretch;
    flex-direction: column;
  }

  .selection-opportunity-card footer button {
    width: 100%;
    min-height: 44px;
  }

  .selection-ranking-table,
  .selection-ranking-table tbody {
    display: block;
    min-width: 0;
  }

  .selection-ranking-table thead {
    display: none;
  }

  .selection-ranking-table tbody {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  .selection-ranking-table tr {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid #e4e5e8;
    border-radius: 15px;
  }

  .selection-ranking-table td {
    grid-column: 2;
    display: block;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f1f3;
  }

  .selection-ranking-table td:first-child {
    grid-column: 1;
    grid-row: 1 / span 5;
    display: grid;
    align-items: start;
    padding: 14px 8px;
    border-right: 1px solid #f0f1f3;
  }

  .selection-ranking-table td:last-child {
    border-bottom: 0;
  }

  .selection-ranking-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: #8a8d95;
    font-size: 12px;
  }
}

/* Customer service command center */
.service-view {
  position: relative;
}

.service-hero {
  position: relative;
  display: flex;
  overflow: hidden;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 30px 32px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 26px;
  background:
    radial-gradient(circle at 84% 12%, rgba(139, 92, 246, .42), transparent 30%),
    radial-gradient(circle at 4% 100%, rgba(37, 244, 238, .16), transparent 28%),
    linear-gradient(135deg, #09080d 0%, #151020 52%, #21122e 100%);
  box-shadow: 0 26px 64px rgba(21, 14, 36, .18);
}

.service-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .36;
  background-image:
    radial-gradient(circle at 18% 34%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 65% 22%, #d9c8ff 0 1px, transparent 1.6px),
    radial-gradient(circle at 78% 72%, #25f4ee 0 1px, transparent 1.5px),
    radial-gradient(circle at 42% 86%, #fff 0 1px, transparent 1.4px);
  background-size: 87px 83px, 121px 117px, 139px 127px, 181px 163px;
}

.service-hero::after {
  content: "";
  position: absolute;
  top: -82px;
  right: 7%;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 50%;
  box-shadow:
    0 0 0 28px rgba(255, 255, 255, .025),
    0 0 0 64px rgba(139, 92, 246, .04);
}

.service-hero-copy,
.service-hero-actions {
  position: relative;
  z-index: 2;
}

.service-hero-copy {
  max-width: 720px;
}

.service-live-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: #cbb8ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.service-live-line > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25f4ee;
  box-shadow: 0 0 0 5px rgba(37, 244, 238, .12), 0 0 18px rgba(37, 244, 238, .8);
  animation: servicePulse 2.4s ease-in-out infinite;
}

.service-hero .eyebrow {
  color: #8d849e;
}

.service-hero h2 {
  margin: 7px 0 11px;
  color: #fff;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
  letter-spacing: -.045em;
}

.service-hero-copy > p:not(.eyebrow) {
  max-width: 660px;
  color: #aaa3b6;
  font-size: 14px;
  line-height: 1.75;
}

.service-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.service-hero-tags span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 999px;
  color: #d6d0df;
  background: rgba(255, 255, 255, .055);
  font-size: 12px;
  font-weight: 700;
}

.service-hero-tags span.ready {
  border-color: rgba(37, 244, 238, .25);
  color: #b7fffc;
  background: rgba(37, 244, 238, .08);
}

.service-hero-tags span.warn {
  border-color: rgba(251, 191, 36, .25);
  color: #ffe7a0;
  background: rgba(251, 191, 36, .08);
}

.service-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.service-hero .secondary {
  border-color: rgba(255, 255, 255, .12);
  color: #fff;
  background: rgba(255, 255, 255, .07);
}

.service-hero .primary {
  color: #100c17;
  background: #fff;
}

.service-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.service-summary article {
  min-height: 108px;
  display: grid;
  align-content: space-between;
  padding: 16px;
  border: 1px solid #e5e2e9;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, #fbfafd);
  box-shadow: 0 8px 22px rgba(29, 20, 44, .035);
}

.service-summary article:nth-child(5) {
  border-color: #f4d5d9;
  background: linear-gradient(145deg, #fff, #fff7f8);
}

.service-summary span {
  color: #6f6977;
  font-size: 12px;
  font-weight: 700;
}

.service-summary strong {
  color: #121016;
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.04em;
}

.service-summary small {
  color: #8b8590;
  font-size: 11px;
}

.service-notice {
  margin-top: 14px;
}

.service-permission-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid #f0d8ab;
  border-radius: 16px;
  background: linear-gradient(120deg, #fffaf0, #fffdf8);
}

.service-permission-banner strong {
  display: block;
  color: #4b3712;
  font-size: 14px;
}

.service-permission-banner p {
  margin-top: 4px;
  color: #866b3b;
  font-size: 12px;
  line-height: 1.6;
}

.service-permission-banner code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #f5e8ce;
  font-size: 11px;
}

.service-workspace {
  display: grid;
  grid-template-columns: 300px minmax(420px, 1fr) 306px;
  gap: 12px;
  min-height: 720px;
  margin-top: 14px;
}

.service-inbox-panel,
.service-chat-panel,
.service-context-panel {
  min-width: 0;
  border: 1px solid #e5e2e9;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(24, 16, 38, .045);
}

.service-inbox-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.service-panel-head {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 12px;
}

.service-panel-head h3,
.service-context-head h3,
.service-ai-policy h3 {
  margin-top: 3px;
  color: #17131c;
  font-size: 17px;
  letter-spacing: -.025em;
}

.service-panel-head > span,
.service-context-head > span {
  display: grid;
  min-width: 32px;
  height: 28px;
  place-items: center;
  padding-inline: 8px;
  border-radius: 999px;
  color: #6b6078;
  background: #f3f0f6;
  font-size: 11px;
  font-weight: 800;
}

.service-inbox-tools {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.service-search {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid #e8e5ec;
  border-radius: 12px;
  background: #faf9fb;
}

.service-search > span {
  color: #8a8294;
  font-size: 18px;
}

.service-search input {
  min-width: 0;
  min-height: 44px;
  border: 0;
  outline: 0;
  color: #1c1722;
  background: transparent;
  font: inherit;
  font-size: 13px;
}

.service-inbox-tools select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #e8e5ec;
  border-radius: 12px;
  color: #443d4d;
  background: #fff;
  font: inherit;
  font-size: 12px;
}

.service-conversation-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 0 8px 10px;
  scrollbar-width: thin;
}

.service-conversation {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 13px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.service-conversation:hover {
  border-color: #ede9f2;
  background: #faf8fc;
}

.service-conversation.active {
  border-color: #ded4ef;
  background:
    radial-gradient(circle at 8% 20%, rgba(139, 92, 246, .1), transparent 35%),
    linear-gradient(135deg, #fbf9ff, #f5f1fb);
}

.service-conversation.active::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: -1px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(#8b5cf6, #25f4ee);
}

.service-conversation-avatar,
.service-buyer-avatar {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .35), transparent 30%),
    linear-gradient(135deg, #241a32, #6d3fd3);
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
}

.service-conversation-avatar {
  width: 44px;
  height: 44px;
  font-size: 13px;
}

.service-conversation-avatar img,
.service-buyer-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.service-conversation-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.service-conversation-copy strong {
  overflow: hidden;
  color: #201a27;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-conversation-copy small {
  overflow: hidden;
  color: #81798a;
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-conversation-copy em {
  display: inline-flex;
  width: fit-content;
  margin-top: 2px;
  padding: 3px 6px;
  border-radius: 6px;
  color: #6f5a93;
  background: #f0ebf8;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.service-conversation-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
  color: #9a939f;
  font-size: 11px;
  white-space: nowrap;
}

.service-unread-dot {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding-inline: 5px;
  border-radius: 999px;
  color: #fff;
  background: #fe2c55;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(254, 44, 85, .25);
}

.service-risk-mark {
  color: #c22c42;
  font-weight: 800;
}

.service-inbox-empty,
.service-chat-empty {
  padding: 26px 18px;
  color: #81798a;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.service-chat-panel {
  display: flex;
  min-height: 720px;
  flex-direction: column;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 4%, rgba(139, 92, 246, .055), transparent 27%),
    #f8f7fa;
}

.service-chat-head {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid #e9e5ed;
  background: rgba(255, 255, 255, .94);
}

.service-buyer {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.service-buyer-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  font-size: 14px;
}

.service-buyer > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.service-buyer strong {
  overflow: hidden;
  color: #17121c;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-buyer small {
  overflow: hidden;
  color: #857d8d;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-chat-modes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.service-chat-modes .row-action {
  min-height: 36px;
}

.service-chat-safety {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 10px 14px 0;
  padding: 10px 12px;
  border: 1px solid #e6ddf4;
  border-radius: 12px;
  color: #5f4f78;
  background: rgba(249, 246, 255, .9);
  font-size: 11px;
}

.service-chat-safety > span {
  color: #8b5cf6;
  font-size: 17px;
}

.service-chat-safety.risk {
  border-color: #f0ccd2;
  color: #8a2939;
  background: #fff7f8;
}

.service-chat-safety.risk > span {
  color: #e83452;
}

.service-message-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px;
  scrollbar-width: thin;
}

.service-message {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 14px;
}

.service-message.outbound {
  flex-direction: row-reverse;
}

.service-message-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  color: #fff;
  background: #1f1829;
  font-size: 11px;
  font-weight: 800;
}

.service-message.outbound .service-message-avatar {
  background: linear-gradient(135deg, #8b5cf6, #5b21b6);
}

.service-message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-message-body {
  max-width: min(76%, 640px);
}

.service-message.outbound .service-message-body {
  display: grid;
  justify-items: end;
}

.service-message-bubble {
  padding: 11px 13px;
  border: 1px solid #e8e3ee;
  border-radius: 4px 14px 14px 14px;
  color: #332c3b;
  background: #fff;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 5px 16px rgba(35, 25, 52, .035);
}

.service-message.outbound .service-message-bubble {
  border-color: #2c2437;
  border-radius: 14px 4px 14px 14px;
  color: #fff;
  background: linear-gradient(135deg, #19131f, #2b1c3d);
}

.service-message.system .service-message-bubble {
  border-color: #eee9f3;
  color: #756d7e;
  background: #f7f4fa;
  font-size: 12px;
}

.service-message-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 5px;
  color: #99929e;
  font-size: 11px;
}

.service-message-meta strong {
  color: #756b80;
  font-weight: 800;
}

.service-composer {
  padding: 12px 14px 14px;
  border-top: 1px solid #e9e5ed;
  background: #fff;
}

.service-composer textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  padding: 12px 13px;
  border: 1px solid #ded8e5;
  border-radius: 14px;
  outline: none;
  color: #251e2c;
  background: #fbfafc;
  font: inherit;
  font-size: 13px;
  line-height: 1.55;
}

.service-composer textarea:focus {
  border-color: #9d78dd;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, .09);
  background: #fff;
}

.service-composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
}

.service-composer-foot > span {
  color: #8b8491;
  font-size: 11px;
}

.service-composer-foot > div {
  display: flex;
  gap: 7px;
}

.service-composer-foot button {
  min-height: 44px;
}

.service-context-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
  background: #fbfafc;
}

.service-context-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e8e3ec;
  border-radius: 16px;
  background: #fff;
}

.service-context-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.service-context-list {
  display: grid;
  gap: 8px;
}

.service-context-order,
.service-context-case {
  display: grid;
  gap: 5px;
  padding: 11px;
  border: 1px solid #eee9f2;
  border-radius: 12px;
  background: #fcfbfd;
}

.service-context-order strong,
.service-context-case strong {
  overflow: hidden;
  color: #282130;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-context-order small,
.service-context-case small {
  color: #827988;
  font-size: 11px;
  line-height: 1.45;
}

.service-context-order footer,
.service-context-case footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: 3px;
}

.service-context-empty {
  padding: 15px 10px;
  color: #918997;
  background: #faf8fb;
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.service-ai-policy {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
  padding: 16px;
  border-radius: 17px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 6%, rgba(37, 244, 238, .18), transparent 30%),
    linear-gradient(145deg, #100d16, #24172f);
}

.service-ai-policy .eyebrow {
  color: #8e819e;
}

.service-ai-policy h3 {
  color: #fff;
}

.service-ai-policy p:not(.eyebrow) {
  margin-top: 6px;
  color: #a89eb3;
  font-size: 11px;
  line-height: 1.6;
}

.service-ai-policy > div:last-child > span {
  display: block;
  margin-top: 9px;
  color: #c8bbd7;
  font-size: 11px;
  line-height: 1.5;
}

.service-ai-orb {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #fff, #8b5cf6 28%, #1e1530 70%);
  box-shadow: 0 0 24px rgba(139, 92, 246, .36);
}

.service-ai-orb i {
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(37, 244, 238, .25);
  border-radius: 50%;
  transform: rotate(-24deg) scaleY(.45);
}

.service-ai-orb b {
  position: relative;
  font-size: 11px;
}

.service-knowledge-list {
  display: grid;
  gap: 8px;
}

.service-knowledge-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-left: 2px solid #8b5cf6;
  border-radius: 2px 10px 10px 2px;
  background: #faf8fc;
}

.service-knowledge-item strong {
  color: #2b2432;
  font-size: 11px;
}

.service-knowledge-item small {
  overflow: hidden;
  color: #827a88;
  font-size: 11px;
  line-height: 1.5;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.service-settings-note {
  padding: 15px 16px;
  border: 1px solid #e7ddf5;
  border-radius: 14px;
  background: linear-gradient(135deg, #faf7ff, #f4effb);
}

.service-settings-note strong {
  color: #392950;
  font-size: 13px;
}

.service-settings-note p {
  margin-top: 5px;
  color: #736584;
  font-size: 11px;
  line-height: 1.65;
}

.service-ai-test-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e8e3ed;
  border-radius: 13px;
  background: #fbfafc;
}

.service-ai-test-row span {
  min-width: 0;
  overflow: hidden;
  color: #6d6476;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-knowledge-manager {
  max-height: 260px;
  display: grid;
  gap: 8px;
  overflow-y: auto;
  padding: 3px;
}

.service-knowledge-manager article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid #ebe6f0;
  border-radius: 12px;
  background: #fcfbfd;
}

.service-knowledge-manager article > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.service-knowledge-manager strong {
  color: #29232f;
  font-size: 12px;
}

.service-knowledge-manager small {
  color: #8c8393;
  font-size: 11px;
}

.service-knowledge-manager p {
  color: #6f6876;
  font-size: 11px;
  line-height: 1.55;
}

@keyframes servicePulse {
  0%, 100% { opacity: .65; transform: scale(.85); }
  50% { opacity: 1; transform: scale(1); }
}

@media (max-width: 1320px) {
  .service-workspace {
    grid-template-columns: 280px minmax(380px, 1fr) 280px;
  }
}

@media (max-width: 1180px) {
  .service-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .service-workspace {
    grid-template-columns: 270px minmax(0, 1fr);
  }

  .service-context-panel {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-ai-policy,
  .service-knowledge-card {
    min-height: 180px;
  }
}

@media (max-width: 1024px) {
  .service-hero {
    align-items: flex-start;
    padding: 26px 24px;
  }

  .service-workspace {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .service-inbox-panel {
    min-height: 0;
  }

  .service-conversation-list {
    display: grid;
    grid-auto-columns: minmax(255px, 36%);
    grid-auto-flow: column;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 12px;
    scroll-snap-type: x proximity;
  }

  .service-conversation {
    scroll-snap-align: start;
  }

  .service-conversation-copy small {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .service-chat-panel {
    min-height: 650px;
  }

  .service-context-panel {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .service-hero {
    display: grid;
    gap: 22px;
    padding: 23px 18px;
    border-radius: 22px;
  }

  .service-hero h2 {
    font-size: 38px;
  }

  .service-hero-copy > p:not(.eyebrow) {
    font-size: 13px;
  }

  .service-hero-actions {
    width: 100%;
    justify-content: stretch;
  }

  .service-hero-actions button {
    flex: 1 1 140px;
  }

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

  .service-summary article {
    min-height: 98px;
    padding: 13px;
  }

  .service-summary strong {
    font-size: 26px;
  }

  .service-permission-banner {
    display: grid;
    gap: 12px;
  }

  .service-workspace {
    gap: 10px;
  }

  .service-inbox-panel,
  .service-chat-panel,
  .service-context-panel {
    border-radius: 18px;
  }

  .service-conversation-list {
    grid-auto-columns: minmax(248px, 84%);
  }

  .service-chat-head {
    align-items: flex-start;
    padding: 13px 12px;
  }

  .service-chat-modes {
    gap: 5px;
  }

  .service-chat-modes .row-action {
    min-height: 40px;
    padding-inline: 9px;
    font-size: 11px;
  }

  .service-chat-panel {
    min-height: 620px;
  }

  .service-message-list {
    padding: 15px 11px;
  }

  .service-message-body {
    max-width: 84%;
  }

  .service-message-bubble {
    font-size: 13px;
  }

  .service-composer {
    padding: 10px;
  }

  .service-composer textarea {
    min-height: 92px;
    font-size: 14px;
  }

  .service-composer-foot {
    display: grid;
  }

  .service-composer-foot > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .service-context-panel {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .nav-item {
    font-size: 11px !important;
  }

  .service-hero-tags span {
    font-size: 11px;
  }

  .service-chat-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .service-chat-modes {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr 1fr;
  }

  .service-chat-modes .row-action {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-live-line > span {
    animation: none;
  }
}

/* Compact service workspace: keep the page shell short and scroll inside chat */
.service-live-line {
  display: none;
}

.service-hero {
  align-items: center;
  padding: 18px 24px;
  border-radius: 21px;
  box-shadow: 0 18px 46px rgba(21, 14, 36, .14);
}

.service-hero-copy {
  max-width: 780px;
}

.service-hero h2 {
  margin: 3px 0 5px;
  font-size: clamp(31px, 3.2vw, 42px);
}

.service-hero-copy > p:not(.eyebrow) {
  display: -webkit-box;
  overflow: hidden;
  max-width: 720px;
  font-size: 12px;
  line-height: 1.5;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.service-hero-tags {
  gap: 7px;
  margin-top: 9px;
}

.service-hero-tags span {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 11px;
}

.service-hero-actions {
  flex-wrap: nowrap;
}

.service-hero-actions button {
  min-height: 44px;
}

.service-summary {
  gap: 8px;
  margin-top: 10px;
}

.service-summary article {
  min-height: 76px;
  padding: 11px 13px;
  border-radius: 15px;
}

.service-summary strong {
  font-size: 25px;
}

.service-summary small {
  font-size: 11px;
}

.service-workspace {
  height: clamp(540px, calc(100dvh - 390px), 680px);
  min-height: 0;
  margin-top: 10px;
}

.service-inbox-panel,
.service-chat-panel,
.service-context-panel {
  height: 100%;
  min-height: 0;
}

.service-chat-panel {
  min-height: 0;
}

.service-context-panel {
  overflow-y: auto;
  scrollbar-width: thin;
}

.service-panel-head {
  min-height: 62px;
  padding: 12px 14px 9px;
}

.service-inbox-tools {
  gap: 6px;
  padding: 0 10px 9px;
}

.service-chat-head {
  min-height: 64px;
  padding: 10px 14px;
}

.service-buyer-avatar {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
}

.service-chat-modes .row-action {
  min-height: 38px;
}

.service-chat-safety {
  min-height: 36px;
  margin: 8px 12px 0;
  padding: 7px 10px;
}

.service-message-list {
  padding: 14px;
}

.service-composer {
  padding: 9px 12px 11px;
}

.service-composer textarea {
  min-height: 62px;
  max-height: 110px;
  resize: none;
  padding: 10px 12px;
}

.service-composer-foot {
  margin-top: 7px;
}

.service-context-panel {
  gap: 8px;
  padding: 8px;
}

.service-context-card {
  padding: 12px;
  border-radius: 14px;
}

.service-context-head {
  margin-bottom: 8px;
}

.service-context-mobile-head,
.service-context-backdrop {
  display: none;
}

.service-context-toggle {
  display: none;
}

@media (max-width: 1180px) {
  .service-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .service-workspace {
    height: clamp(540px, calc(100dvh - 390px), 660px);
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .service-context-panel {
    grid-column: auto;
  }
}

@media (max-width: 1024px) {
  .service-view {
    min-height: 0;
  }

  .service-hero {
    display: flex;
    align-items: center;
    padding: 16px 20px;
  }

  .service-hero h2 {
    font-size: 32px;
  }

  .service-hero-actions {
    flex: 0 0 auto;
  }

  .service-summary {
    display: flex;
    grid-template-columns: none;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 3px;
    scroll-snap-type: x proximity;
  }

  .service-summary article {
    width: 146px;
    min-width: 146px;
    min-height: 72px;
    scroll-snap-align: start;
  }

  .service-workspace {
    display: block;
    height: auto;
  }

  .service-inbox-panel {
    height: 194px;
  }

  .service-panel-head {
    min-height: 50px;
    padding: 9px 12px 7px;
  }

  .service-inbox-tools {
    grid-template-columns: minmax(0, 1fr) 150px;
    padding: 0 9px 8px;
  }

  .service-conversation-list {
    grid-auto-columns: 246px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 8px 8px;
  }

  .service-conversation {
    min-height: 92px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px 8px;
  }

  .service-conversation-avatar {
    width: 38px;
    height: 38px;
  }

  .service-conversation-copy em {
    display: none;
  }

  .service-chat-panel {
    height: clamp(520px, 67dvh, 610px);
    min-height: 520px;
    margin-top: 10px;
  }

  .service-context-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .service-context-backdrop {
    position: fixed;
    z-index: 73;
    inset: 0;
    display: none;
    background: rgba(12, 9, 18, .32);
    backdrop-filter: blur(2px);
  }

  body.service-context-open .service-context-backdrop {
    display: block;
  }

  .service-context-panel {
    position: fixed;
    z-index: 76;
    right: 12px;
    bottom: calc(88px + env(safe-area-inset-bottom));
    left: auto;
    width: min(410px, calc(100vw - 24px));
    height: auto;
    max-height: min(72dvh, 660px);
    display: none;
    overflow-y: auto;
    border-radius: 20px;
    box-shadow: 0 26px 80px rgba(18, 12, 28, .28);
  }

  body.service-context-open .service-context-panel {
    display: grid;
    animation: serviceContextIn .22s ease-out;
  }

  .service-context-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 2px 5px;
  }

  .service-context-mobile-head strong {
    display: block;
    margin-top: 2px;
    color: #1b1521;
    font-size: 14px;
  }

  .service-context-mobile-head .row-action {
    min-height: 40px;
  }
}

@media (max-width: 760px) {
  .service-hero {
    display: grid;
    gap: 10px;
    padding: 14px 15px;
  }

  .service-hero .eyebrow,
  .service-hero-copy > p:not(.eyebrow) {
    display: none;
  }

  .service-hero h2 {
    margin: 0;
    font-size: 30px;
  }

  .service-hero-tags {
    margin-top: 0;
  }

  .service-hero-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .service-hero-actions button {
    min-width: 0;
  }

  .service-summary {
    margin-top: 8px;
  }

  .service-summary article {
    width: 132px;
    min-width: 132px;
    min-height: 68px;
  }

  .service-inbox-panel {
    height: 178px;
  }

  .service-inbox-tools {
    grid-template-columns: minmax(0, 1fr) 132px;
  }

  .service-conversation-list {
    grid-auto-columns: minmax(236px, 84%);
  }

  .service-chat-panel {
    height: min(64dvh, 560px);
    min-height: 500px;
  }

  .service-chat-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 9px 10px;
  }

  .service-chat-modes {
    width: 100%;
    display: grid;
    grid-template-columns: auto auto 1fr 1fr;
  }

  .service-chat-modes .row-action {
    min-height: 40px;
    padding-inline: 7px;
  }

  .service-chat-safety {
    margin: 7px 9px 0;
    padding: 6px 8px;
  }

  .service-message-list {
    padding: 11px 9px;
  }

  .service-composer {
    padding: 8px 9px 9px;
  }

  .service-composer textarea {
    min-height: 58px;
    max-height: 92px;
    font-size: 14px;
  }

  .service-composer-foot > span {
    display: none;
  }

  .service-context-panel {
    right: 8px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: calc(100vw - 16px);
    max-height: min(76dvh, 680px);
  }
}

@media (max-width: 420px) {
  .service-chat-modes {
    grid-template-columns: auto 1fr 1fr;
  }

  .service-chat-modes #service-chat-status {
    display: none;
  }

  .service-hero h2 {
    font-size: 27px;
  }
}

@keyframes serviceContextIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 1025px) {
  .service-view.active {
    height: calc(100dvh - 126px);
    min-height: 720px;
    display: flex;
    flex-direction: column;
  }

  .service-view > .service-hero,
  .service-view > .service-summary,
  .service-view > .service-notice,
  .service-view > .service-permission-banner {
    flex: 0 0 auto;
  }

  .service-view > .service-workspace {
    min-height: 0;
    height: auto;
    flex: 1 1 auto;
  }
}

@media (max-width: 1024px) {
  .service-context-panel {
    top: 86px;
    right: 12px;
    bottom: auto;
    max-height: calc(100dvh - 180px);
  }

  .service-inbox-panel {
    height: 174px;
  }

  .service-chat-panel {
    height: clamp(490px, 61dvh, 570px);
    min-height: 490px;
  }

  .service-context-toggle {
    min-height: 44px;
  }
}

@media (max-width: 760px) {
  .service-context-panel {
    top: 74px;
    right: 8px;
    max-height: calc(100dvh - 164px);
  }

  .service-inbox-panel {
    height: 160px;
  }

  .service-chat-panel {
    height: clamp(470px, 59dvh, 530px);
    min-height: 470px;
  }

  .service-chat-modes .row-action {
    min-height: 44px;
  }
}

/* Service command workspace: one stable viewport, scrolling only inside work panes */
@media (min-width: 1025px) {
  body.view-service {
    overflow: hidden;
  }

  body.view-service .main {
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 20px;
    backdrop-filter: none;
  }

  body.view-service .topbar,
  body.view-service #preview-banner,
  body.view-service #notice {
    flex: 0 0 auto;
  }

  body.view-service #workspace:not([hidden]) {
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    overflow: hidden;
  }

  body.view-service .service-view.active {
    width: 100%;
    height: auto;
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
    animation: none;
  }

  body.view-service .service-hero {
    min-height: 0;
    flex: 0 0 auto;
    align-items: center;
    gap: 18px;
    padding: 14px 20px;
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(21, 14, 36, .12);
  }

  body.view-service .service-hero-copy {
    min-width: 0;
    max-width: none;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 14px;
  }

  body.view-service .service-hero .eyebrow,
  body.view-service .service-hero-copy > p:not(.eyebrow),
  body.view-service .service-live-line {
    display: none;
  }

  body.view-service .service-hero h2 {
    flex: 0 0 auto;
    margin: 0;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, .12);
    font-size: 30px;
    line-height: 1;
    white-space: nowrap;
  }

  body.view-service .service-hero-tags {
    min-width: 0;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    gap: 6px;
    margin: 0;
    overflow: hidden;
  }

  body.view-service .service-hero-tags span {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 11px;
    white-space: nowrap;
  }

  body.view-service .service-hero-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 7px;
  }

  body.view-service .service-hero-actions button {
    min-height: 44px;
    padding-inline: 15px;
  }

  body.view-service .service-summary {
    flex: 0 0 auto;
    gap: 7px;
    margin-top: 8px;
  }

  body.view-service .service-summary article {
    min-height: 56px;
    align-content: center;
    gap: 4px;
    padding: 7px 11px;
    border-radius: 13px;
  }

  body.view-service .service-summary strong {
    font-size: 22px;
  }

  body.view-service .service-summary small {
    display: none;
  }

  body.view-service .service-workspace {
    min-height: 0;
    flex: 1 1 auto;
    gap: 8px;
    margin-top: 8px;
  }

  body.view-service .service-inbox-panel,
  body.view-service .service-chat-panel,
  body.view-service .service-context-panel {
    height: 100%;
    min-height: 0;
  }

  body.view-service .service-context-panel {
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body.view-service .service-conversation-list,
  body.view-service .service-message-list {
    overscroll-behavior: contain;
  }

  body.view-service .service-composer textarea {
    min-height: 52px;
    max-height: 78px;
  }
}

@media (max-width: 1024px) {
  body.view-service .erp-shell {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 0;
  }

  body.view-service {
    overflow: hidden;
  }

  body.view-service .main {
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0 12px calc(82px + env(safe-area-inset-bottom));
    backdrop-filter: none;
  }

  body.view-service .topbar {
    min-height: 0;
    flex: 0 0 auto;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px;
    margin: 0 -12px 8px;
    padding: 8px 12px;
  }

  body.view-service .mobile-erp-brand {
    width: 42px;
    min-width: 42px;
  }

  body.view-service .mobile-erp-brand .brand-mark {
    width: 40px;
    height: 40px;
  }

  body.view-service .mobile-erp-brand > div,
  body.view-service .topbar > div:nth-child(2) {
    display: none;
  }

  body.view-service .topbar-actions {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 8px;
  }

  body.view-service .topbar-actions .shop-selector {
    min-width: 0;
    grid-column: 1 / 2;
  }

  body.view-service .topbar-actions .segmented {
    display: none;
  }

  body.view-service .shop-switcher {
    min-height: 46px;
    grid-template-columns: 30px minmax(0, 1fr) 18px;
    gap: 7px;
    padding: 5px 9px;
    border-radius: 13px;
    box-shadow: none;
  }

  body.view-service .shop-switcher-icon {
    width: 30px;
  }

  body.view-service .shop-switcher-meta {
    display: none;
  }

  body.view-service .refresh-control {
    width: 46px;
    min-height: 46px;
  }

  body.view-service #preview-banner {
    min-height: 54px;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 5px 8px 5px 12px;
  }

  body.view-service #preview-banner > div {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
  }

  body.view-service #preview-banner p {
    display: none;
  }

  body.view-service #preview-banner span {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 2px 7px;
    font-size: 11px;
  }

  body.view-service #preview-banner strong {
    font-size: 12px;
    white-space: nowrap;
  }

  body.view-service #preview-banner button {
    min-height: 44px;
    padding-inline: 12px;
  }

  body.view-service #notice {
    flex: 0 0 auto;
  }

  body.view-service #workspace:not([hidden]) {
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    overflow: hidden;
  }

  body.view-service .service-view.active {
    width: 100%;
    height: auto;
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
    animation: none;
  }

  body.view-service .service-hero {
    min-height: 0;
    flex: 0 0 auto;
    display: block;
    padding: 6px;
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(21, 14, 36, .1);
  }

  body.view-service .service-hero:not(:has(.service-hero-actions button:not([hidden]))) {
    display: none;
  }

  body.view-service .service-hero-copy {
    display: none;
  }

  body.view-service .service-hero-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  body.view-service .service-hero-actions button {
    min-width: 0;
    min-height: 44px;
  }

  body.view-service .service-summary {
    min-height: 54px;
    flex: 0 0 auto;
    gap: 6px;
    margin-top: 6px;
    padding-bottom: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }

  body.view-service .service-summary article {
    width: 116px;
    min-width: 116px;
    min-height: 54px;
    align-content: center;
    gap: 3px;
    padding: 6px 10px;
    border-radius: 12px;
  }

  body.view-service .service-summary span {
    font-size: 11px;
  }

  body.view-service .service-summary strong {
    font-size: 20px;
  }

  body.view-service .service-summary small {
    display: none;
  }

  body.view-service .service-workspace {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
    overflow: hidden;
  }

  body.view-service .service-inbox-panel {
    height: 128px;
    min-height: 128px;
    flex: 0 0 128px;
    border-radius: 15px;
  }

  body.view-service .service-panel-head {
    display: none;
  }

  body.view-service .service-inbox-tools {
    min-height: 50px;
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 6px;
    padding: 3px 6px;
  }

  body.view-service .service-search {
    grid-template-columns: 22px minmax(0, 1fr);
    min-height: 44px;
    padding-inline: 7px;
    border-radius: 10px;
  }

  body.view-service .service-search input,
  body.view-service .service-inbox-tools select {
    min-height: 44px;
  }

  body.view-service .service-conversation-list {
    grid-auto-columns: minmax(226px, 74%);
    gap: 6px;
    padding: 0 6px 4px;
  }

  body.view-service .service-conversation {
    min-height: 68px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 7px;
    padding: 6px 7px;
    border-radius: 11px;
  }

  body.view-service .service-conversation-avatar {
    width: 34px;
    height: 34px;
  }

  body.view-service .service-conversation-copy small {
    -webkit-line-clamp: 1;
  }

  body.view-service .service-chat-panel {
    height: auto;
    min-height: 0;
    flex: 1 1 auto;
    margin-top: 0;
    overflow: hidden;
    border-radius: 15px;
  }

  body.view-service .service-chat-head {
    min-height: 0;
    flex: 0 0 auto;
    gap: 6px;
    padding: 7px 9px;
  }

  body.view-service .service-buyer {
    min-height: 38px;
  }

  body.view-service .service-buyer-avatar {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  body.view-service .service-buyer small {
    display: none;
  }

  body.view-service .service-chat-modes {
    gap: 5px;
  }

  body.view-service .service-chat-modes .row-action {
    min-height: 44px;
    padding-inline: 8px;
  }

  body.view-service .service-chat-safety {
    min-height: 30px;
    flex: 0 0 auto;
    margin: 5px 7px 0;
    padding: 4px 7px;
    font-size: 11px;
    line-height: 1.35;
  }

  body.view-service .nav-badge {
    font-size: 11px;
  }

  body.view-service .service-chat-safety > span {
    font-size: 14px;
  }

  body.view-service .service-message-list {
    min-height: 0;
    padding: 9px 8px;
  }

  body.view-service .service-composer {
    flex: 0 0 auto;
    padding: 6px 7px 7px;
  }

  body.view-service .service-composer textarea {
    min-height: 48px;
    max-height: 64px;
    padding: 8px 9px;
    border-radius: 11px;
  }

  body.view-service .service-composer-foot {
    margin-top: 5px;
  }

  body.view-service .service-composer-foot button {
    min-height: 44px;
  }

  body.view-service .service-context-backdrop {
    z-index: 90;
  }

  body.view-service .service-context-panel {
    z-index: 91;
    top: max(10px, env(safe-area-inset-top));
    right: 10px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    left: auto;
    width: min(440px, calc(100vw - 20px));
    height: auto;
    max-height: none;
    overflow-y: auto;
    border-radius: 18px;
    overscroll-behavior: contain;
  }
}

@media (max-width: 760px) {
  body.view-service .main {
    padding-inline: 8px;
  }

  body.view-service .topbar {
    margin-inline: -8px;
    padding-inline: 8px;
  }

  body.view-service .service-inbox-panel {
    height: 122px;
    min-height: 122px;
    flex-basis: 122px;
  }

  body.view-service .service-inbox-tools {
    grid-template-columns: minmax(0, 1fr) 106px;
  }

  body.view-service .service-conversation-list {
    grid-auto-columns: minmax(214px, 82%);
  }

  body.view-service .service-chat-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  body.view-service .service-chat-modes {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr 1fr;
  }

  body.view-service .service-chat-modes #service-chat-status {
    display: none;
  }

  body.view-service .service-chat-modes .row-action {
    width: 100%;
    min-height: 44px;
  }

  body.view-service .service-composer textarea {
    min-height: 44px;
  }
}

@media (max-width: 760px) {
  body.view-service .service-chat-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 6px 7px;
  }

  body.view-service .service-buyer {
    min-width: 0;
    gap: 0;
  }

  body.view-service .service-buyer-avatar {
    display: none;
  }

  body.view-service .service-buyer strong {
    font-size: 13px;
  }

  body.view-service .service-chat-modes {
    width: auto;
    grid-template-columns: 68px 58px 64px;
    gap: 4px;
  }

  body.view-service .service-chat-modes .row-action {
    min-height: 44px;
    padding-inline: 2px;
    font-size: 11px;
  }

  body.view-service .service-composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 108px;
    align-items: stretch;
    gap: 6px;
  }

  body.view-service .service-composer textarea {
    min-height: 92px;
    max-height: 92px;
  }

  body.view-service .service-composer-foot {
    min-width: 0;
    display: block;
    margin: 0;
  }

  body.view-service .service-composer-foot > div {
    height: 100%;
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
  }

  body.view-service .service-composer-foot button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding-inline: 5px;
    font-size: 11px;
  }
}

/* v0.56 visual rollback: keep the approved look, only remove undersized text. */
#workspace :is(small, th, .eyebrow, .sync-detail, .panel-note, .status, .badge, .task-state, time, .sku-chip) {
  font-size: 12px !important;
}

#workspace :is(
  .overview-signal,
  .overview-scope span,
  #overview-status-count,
  .overview-rail-head span,
  .overview-metric-head span,
  .overview-metric-head b,
  .overview-brief-label,
  .overview-legend span,
  .overview-trend-foot span,
  .overview-stats span,
  .order-center-tabs button > span,
  .service-hero-tags span,
  .service-summary span,
  .service-context-head span,
  .service-message-meta span,
  .service-message-meta strong,
  .finance-equation-scope span,
  .finance-equation-scope strong,
  .finance-equation-node span
) {
  font-size: 12px !important;
}

#workspace .service-conversation-copy small,
#workspace .service-conversation-meta em,
#workspace .service-conversation-meta time,
#workspace .service-unread-dot {
  font-size: 12px !important;
}

.login-dialog-close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.mc-home :is(small, .mc-kicker, .mc-card-label, .mc-console-foot, .mc-module-meta, .mc-tag) {
  font-size: 12px !important;
}

}

/* Readability-only fixes for the approved v0.56 visual layout. */
#workspace :is(small, th, .eyebrow, .sync-detail, .panel-note, .status, .badge, .task-state, time, .sku-chip) {
  font-size: 12px !important;
}

#workspace :is(
  .overview-signal,
  .overview-scope span,
  #overview-status-count,
  .overview-rail-head span,
  .overview-metric-head span,
  .overview-metric-head b,
  .overview-brief-label,
  .overview-legend span,
  .overview-trend-foot span,
  .overview-stats span,
  .order-center-tabs button > span,
  .service-hero-tags span,
  .service-summary span,
  .service-context-head span,
  .service-message-meta span,
  .service-message-meta strong,
  .finance-equation-scope span,
  .finance-equation-scope strong,
  .finance-equation-node span
) {
  font-size: 12px !important;
}

#workspace .service-conversation-copy small,
#workspace .service-conversation-meta em,
#workspace .service-conversation-meta time,
#workspace .service-unread-dot,
#workspace .service-chat-safety p,
#workspace .service-message-meta *,
#workspace .service-composer-foot,
#workspace .service-composer-foot *,
#workspace .service-buyer small {
  font-size: 12px !important;
}

.login-dialog-close {
  width: 44px !important;
  height: 44px !important;
  display: grid !important;
  place-items: center;
  border-radius: 50%;
}

.mc-home :is(small, .mc-kicker, .mc-card-label, .mc-console-foot, .mc-module-meta, .mc-tag) {
  font-size: 12px !important;
}
