.commerce-module {
  --commerce-ink: #0e2740;
  --commerce-blue: #0b648f;
  --commerce-orange: #f47721;
  --commerce-line: #d7e2e9;
  --commerce-soft: #eef4f7;
  color: var(--commerce-ink);
}

.commerce-hero {
  align-items: end;
  background: linear-gradient(130deg, #0d2941 0%, #174f71 72%, #0d678c 100%);
  border-radius: 22px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  min-height: 180px;
  padding: clamp(28px, 5vw, 56px);
}

.commerce-hero small,
.commerce-card small,
.commerce-section-heading small,
.commerce-product-card small,
.commerce-client-card small,
.commerce-dialog small,
.commerce-integration-card small {
  color: #4e7d96;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .17em;
}

.commerce-hero small { color: #88d5f3; }
.commerce-hero h1 { color: #fff; font-size: clamp(2.65rem, 6vw, 5rem); margin: 5px 0 8px; }
.commerce-hero p { color: #dbeaf1; margin: 0; max-width: 710px; }
.commerce-module button { cursor: pointer; }
.commerce-module button.primary,
.commerce-action-grid button,
.commerce-dialog button.primary {
  background: var(--commerce-ink);
  border: 1px solid var(--commerce-ink);
  border-radius: 8px;
  color: #fff;
  font-weight: 750;
  padding: 11px 16px;
}
.commerce-hero button.primary { background: var(--commerce-orange); border-color: var(--commerce-orange); }
.commerce-module button:disabled { cursor: wait; opacity: .6; }

.commerce-scope-context {
  align-items: center;
  background: #f7fafc;
  border: 1px solid var(--commerce-line);
  border-radius: 14px;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 18px 20px;
}
.commerce-scope-context small,
.commerce-storefront-directory small { color: var(--commerce-blue); font-size: .68rem; font-weight: 800; letter-spacing: .17em; }
.commerce-scope-context h2 { font-size: 1.35rem; margin: 3px 0 4px; }
.commerce-scope-context p { color: #5d7282; margin: 0; max-width: 760px; }
.commerce-scope-context > span { background: #e3eef4; border-radius: 999px; color: #36596e; flex: 0 0 auto; font-size: .75rem; font-weight: 800; padding: 8px 11px; }

.commerce-storefront-directory { background: #fff; border: 1px solid var(--commerce-line); border-radius: 18px; padding: clamp(20px, 4vw, 36px); }
.commerce-storefront-directory > header { align-items: end; display: flex; gap: 20px; justify-content: space-between; margin-bottom: 22px; }
.commerce-storefront-directory > header h2 { margin: 5px 0 0; }
.commerce-storefront-directory > header p { color: #607587; margin: 0; }
.commerce-storefront-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.commerce-storefront-card { background: var(--commerce-soft); border: 1px solid #d5e2e8; border-radius: 14px; display: grid; gap: 16px; padding: 20px; }
.commerce-storefront-card .commerce-status { justify-self: start; }
.commerce-storefront-card h3 { font-size: 1.3rem; margin: 5px 0 0; }
.commerce-storefront-card dl { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); margin: 0; }
.commerce-storefront-card dl div { background: #fff; border-radius: 9px; padding: 10px; }
.commerce-storefront-card dt { color: #698092; font-size: .68rem; text-transform: uppercase; }
.commerce-storefront-card dd { font-weight: 800; margin: 4px 0 0; }

.commerce-tabs {
  background: #fff;
  border: 1px solid var(--commerce-line);
  border-radius: 14px;
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding: 6px;
  position: sticky;
  scrollbar-width: none;
  top: 0;
  z-index: 4;
}
.commerce-tabs::-webkit-scrollbar { display: none; }
.commerce-tab {
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: #536b7d;
  flex: 0 0 auto;
  font-weight: 750;
  padding: 11px 14px;
}
.commerce-tab.active { background: var(--commerce-ink); color: #fff; }
.commerce-panel[hidden] { display: none !important; }

.commerce-portal-preview { overflow: hidden; padding: 0; }
.commerce-portal-preview-toolbar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--commerce-line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 16px 20px;
}
.commerce-portal-preview-toolbar > div { align-items: center; display: flex; flex-wrap: wrap; gap: 10px; }
.commerce-portal-preview-toolbar > div:first-child { align-items: flex-start; flex-direction: column; gap: 3px; }
.commerce-portal-preview-toolbar small { color: var(--commerce-blue); font-size: .67rem; font-weight: 850; letter-spacing: .18em; }
.commerce-portal-preview-toolbar strong { font-size: .86rem; }

.commerce-portal-panel {
  --portal-ivory: #fbf8f1;
  background: var(--portal-ivory);
  border: 1px solid #e4ded1;
  border-radius: 18px;
  box-shadow: 0 18px 48px #172b3d12;
  overflow: hidden;
}
.commerce-portal-masthead {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #e4ded1;
  display: grid;
  gap: 16px;
  grid-template-columns: auto 1fr auto;
  padding: 24px clamp(22px, 4vw, 48px);
}
.commerce-portal-mark {
  align-items: center;
  border: 1px solid var(--commerce-portal-accent);
  border-radius: 50%;
  color: var(--commerce-portal-accent);
  display: flex;
  font-family: Georgia, serif;
  font-size: 1.25rem;
  height: 52px;
  justify-content: center;
  letter-spacing: .08em;
  width: 52px;
}
.commerce-portal-mark-image { background: #fff; overflow: hidden; padding: 5px; }
.commerce-portal-mark-image img { border-radius: inherit; display: block; height: 100%; object-fit: contain; width: 100%; }
.commerce-portal-masthead small,
.commerce-portal-welcome small,
.commerce-portal-card small,
.commerce-portal-orders small,
.commerce-handoff-strip small {
  color: var(--commerce-portal-accent, #a9864d);
  font-size: .67rem;
  font-weight: 850;
  letter-spacing: .2em;
}
.commerce-portal-masthead h2 { font-family: Georgia, serif; font-size: 1.65rem; margin: 3px 0 0; }
.commerce-portal-tools { align-items: center; display: flex; gap: 10px; }
.commerce-portal-nav {
  background: #fff;
  display: flex;
  gap: clamp(16px, 4vw, 44px);
  justify-content: center;
  overflow-x: auto;
  padding: 13px 22px;
  scrollbar-width: none;
}
.commerce-portal-nav::-webkit-scrollbar { display: none; }
.commerce-portal-nav a { color: #536474; font-size: .78rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.commerce-portal-nav a:hover { color: var(--commerce-portal-accent); }
.commerce-portal-welcome {
  background: linear-gradient(110deg, #f5efe2, #fff 78%);
  padding: clamp(42px, 8vw, 92px) clamp(24px, 8vw, 110px);
}
.commerce-portal-welcome.has-media { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr); overflow: hidden; padding: 0; }
.commerce-portal-welcome-copy { min-width: 0; }
.commerce-portal-welcome.has-media .commerce-portal-welcome-copy { padding: clamp(42px, 7vw, 88px) clamp(24px, 7vw, 96px); }
.commerce-portal-welcome-media { background: #e8e3d8; min-height: 420px; overflow: hidden; }
.commerce-portal-welcome-media img,
.commerce-portal-welcome-media video { display: block; height: 100%; min-height: inherit; object-fit: cover; width: 100%; }
.commerce-portal-welcome-media.commerce-media-fit-contain img,
.commerce-portal-welcome-media.commerce-media-fit-contain video { object-fit: contain; }
.commerce-portal-welcome h3 { font-family: Georgia, serif; font-size: clamp(2.2rem, 5vw, 4.5rem); margin: 10px 0 12px; }
.commerce-portal-welcome p { color: #596b79; font-size: 1.05rem; line-height: 1.7; max-width: 660px; }
.commerce-portal-welcome-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 25px; }
.commerce-portal-welcome-actions a,
.commerce-portal-card-action {
  border: 1px solid var(--commerce-portal-accent);
  border-radius: 4px;
  color: #172c3d;
  display: inline-flex;
  font-size: .76rem;
  font-weight: 800;
  padding: 11px 15px;
  text-decoration: none;
}
.commerce-portal-welcome-actions a:first-child { background: var(--commerce-portal-accent); color: #fff; }
.commerce-portal-grid { display: grid; gap: 1px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.commerce-portal-card { background: #fff; min-width: 0; padding: 28px; }
.commerce-portal-card h3,
.commerce-portal-orders h3 { font-family: Georgia, serif; font-size: 1.55rem; margin: 7px 0 16px; }
.commerce-portal-card > strong { display: block; font-family: Georgia, serif; font-size: 2.15rem; margin-bottom: 9px; }
.commerce-portal-card > p { color: #667785; line-height: 1.55; min-height: 3.1em; }
.commerce-portal-card-date { font-size: 1.2rem !important; }
.commerce-portal-card button,
.commerce-portal-card-action { margin-top: 10px; }
.commerce-portal-orders { background: #fff; border-top: 1px solid #e4ded1; display: grid; gap: 28px; grid-template-columns: minmax(190px, .4fr) 1fr; padding: 34px clamp(24px, 5vw, 60px); }
.commerce-portal-shop { background: #f7f2e8; border-top: 1px solid #e4ded1; padding: 38px clamp(24px, 5vw, 60px); }
.commerce-portal-shop > header { align-items: end; display: flex; gap: 16px; justify-content: space-between; margin-bottom: 20px; }
.commerce-portal-shop h3 { font-family: Georgia, serif; font-size: clamp(1.9rem, 4vw, 3rem); margin: 5px 0 0; }
.commerce-portal-shop > header > span { color: #6f7d86; font-size: .78rem; font-weight: 750; }
.commerce-portal-product-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.commerce-portal-product { background: #fff; border: 1px solid #e5ded0; border-radius: 12px; box-shadow: 0 9px 24px #253b4c0c; min-width: 0; overflow: hidden; }
.commerce-portal-product-media { aspect-ratio: 16 / 10; background: linear-gradient(145deg, #edf2ed, #e3eadf); overflow: hidden; }
.commerce-portal-product-media img,
.commerce-portal-product-media video { height: 100%; object-fit: cover; width: 100%; }
.commerce-portal-product-copy { padding: 18px; }
.commerce-portal-product-copy h4 { font-family: Georgia, serif; font-size: 1.25rem; margin: 6px 0 9px; }
.commerce-portal-product-copy > p { color: #667785; line-height: 1.5; min-height: 4.5em; }
.commerce-portal-product-copy > footer,
.commerce-portal-product-actions { align-items: center; display: flex; gap: 10px; justify-content: space-between; }
.commerce-portal-product-copy > footer > strong { font-family: Georgia, serif; font-size: 1.25rem; }
.commerce-portal-product-actions { border-top: 1px solid #ece7dd; margin-top: 13px; padding-top: 13px; }
.commerce-portal-product-actions a { color: #526d7e; font-size: .72rem; font-weight: 750; text-decoration: none; }
.commerce-portal-order-list article { align-items: center; border-bottom: 1px solid #ece6db; display: flex; gap: 18px; justify-content: space-between; padding: 11px 0; }
.commerce-portal-order-list article:first-child { padding-top: 0; }
.commerce-portal-order-list span { color: #6b7b87; display: block; font-size: .78rem; margin-top: 3px; }
.commerce-portal-note { color: #7a8790; font-size: .75rem; margin: 0; padding: 16px 24px 24px; text-align: center; }
.commerce-category-custom-clothier { --commerce-portal-accent: #ad8750; background: #f7f5f1; color: #47423c; }
.commerce-category-custom-clothier .commerce-portal-masthead { background: rgba(250,249,246,.96); border-color: #ece8e0; }
.commerce-category-custom-clothier .commerce-portal-masthead h2,
.commerce-category-custom-clothier .commerce-portal-welcome h3,
.commerce-category-custom-clothier .commerce-portal-card h3,
.commerce-category-custom-clothier .commerce-portal-orders h3 { color: #4b4741; font-family: Georgia, "Times New Roman", serif; font-weight: 400; letter-spacing: -.02em; }
.commerce-category-custom-clothier .commerce-portal-welcome { background: linear-gradient(135deg,#faf9f6 0%,#f4f0e8 100%); min-height: 500px; overflow: hidden; position: relative; }
.commerce-category-custom-clothier .commerce-portal-welcome::before { background: radial-gradient(ellipse at 8% 115%,#d9d8ca 0 34%,transparent 34.5%),radial-gradient(ellipse at 48% 120%,#e2dfd2 0 42%,transparent 42.5%),radial-gradient(ellipse at 92% 112%,#d6d7c8 0 35%,transparent 35.5%); bottom: 0; content: ""; height: 43%; left: 0; opacity: .78; position: absolute; right: 0; z-index: 0; }
.commerce-category-custom-clothier .commerce-portal-welcome::after { background: radial-gradient(ellipse at 22% 138%,#c9cbb9 0 48%,transparent 48.5%),radial-gradient(ellipse at 76% 142%,#ced0bf 0 52%,transparent 52.5%); bottom: -2px; content: ""; height: 31%; left: -6%; opacity: .76; position: absolute; right: -6%; z-index: 0; }
.commerce-category-custom-clothier .commerce-portal-welcome-copy { position: relative; z-index: 2; }
.commerce-category-custom-clothier .commerce-portal-card { background: #fbfaf8; }
.commerce-category-custom-clothier .commerce-portal-welcome-actions a { border-radius: 999px; box-shadow: 0 4px 12px rgba(109,87,56,.14); }
.commerce-sheep { animation: commerce-sheep-stroll 16s linear infinite; bottom: 10px; height: 112px; opacity: .9; pointer-events: none; position: absolute; right: 24px; transform-origin: 50% 100%; width: 164px; z-index: 1; }
.commerce-sheep > img { display: none !important; }
.commerce-sheep::before { animation: commerce-sheep-legs .64s steps(1,end) infinite; background-image: url("/assets/wool-and-linen-sheep-walk.png"); background-position: 0 0; background-repeat: no-repeat; background-size: 400% 100%; content: ""; filter: drop-shadow(0 5px 5px rgba(78,66,48,.12)); inset: 0; position: absolute; }
.commerce-sheep::after { background: radial-gradient(ellipse,rgba(77,67,53,.2),transparent 70%); bottom: 1px; content: ""; height: 13px; left: 16%; position: absolute; width: 72%; z-index: -1; }
@keyframes commerce-sheep-stroll { 0% { transform: translateX(28px) scaleX(1); } 44% { transform: translateX(-145px) scaleX(1); } 49% { transform: translateX(-145px) scaleX(1); } 51% { transform: translateX(-145px) scaleX(-1); } 94% { transform: translateX(28px) scaleX(-1); } 99% { transform: translateX(28px) scaleX(-1); } 100% { transform: translateX(28px) scaleX(1); } }
@keyframes commerce-sheep-legs { 0%,49.99%,100% { background-position: 0 0; } 50%,99.99% { background-position: 100% 0; } }
@media (max-width: 700px) { .commerce-sheep { height: 82px; opacity: .86; right: 8px; width: 120px; } }
@media (prefers-reduced-motion: reduce) { .commerce-sheep,.commerce-sheep::before { animation: none; } }
.commerce-portal-popout-body { background: #edf2f5; color: #10263c; margin: 0; min-width: 320px; }
.commerce-portal-popout-shell { margin: 0 auto; max-width: 1600px; padding: 24px; }
.commerce-portal-popout-shell .commerce-portal-panel { min-height: calc(100vh - 48px); }
.commerce-handoff-strip { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 18px; }
.commerce-handoff-strip article { background: #fff; border: 1px solid var(--commerce-line); border-radius: 14px; display: flex; flex-direction: column; gap: 7px; padding: 18px; }
.commerce-handoff-strip strong { font-family: Georgia, serif; font-size: 1.2rem; }
.commerce-handoff-strip span { color: #647887; font-size: .78rem; }

.commerce-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}
.commerce-metrics article,
.commerce-card,
.commerce-product-card,
.commerce-client-card,
.commerce-integration-card,
.commerce-empty-state,
.commerce-table-wrap {
  background: #fff;
  border: 1px solid var(--commerce-line);
  border-radius: 14px;
}
.commerce-metrics article { padding: 18px; }
.commerce-metrics span { color: #617586; display: block; font-size: .78rem; margin-bottom: 8px; }
.commerce-metrics strong { font-family: Georgia, serif; font-size: clamp(1.35rem, 2.5vw, 2rem); }
.commerce-overview-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.commerce-card { padding: 22px; }
.commerce-card header,
.commerce-product-card header,
.commerce-client-card header,
.commerce-integration-card header,
.commerce-section-heading,
.commerce-dialog header,
.commerce-dialog footer {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}
.commerce-card h2,
.commerce-card h3,
.commerce-section-heading h2,
.commerce-product-card h3,
.commerce-client-card h3,
.commerce-integration-card h3,
.commerce-dialog h2 { margin: 4px 0 0; }
.commerce-span-two { grid-column: 1 / -1; }
.commerce-action-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 22px; }
.commerce-action-grid button { text-align: left; }
.commerce-plain-list,
.commerce-chip-list,
.commerce-program-list { list-style: none; margin: 16px 0 0; padding: 0; }
.commerce-plain-list li,
.commerce-mini-orders > div { align-items: center; border-top: 1px solid #e8eef1; display: grid; gap: 10px; grid-template-columns: 110px 1fr; padding: 11px 0; }
.commerce-mini-orders > div { grid-template-columns: 1fr 130px 130px; }
.commerce-mini-orders b { text-align: right; }
.commerce-empty,
.commerce-empty-state span { color: #657a8b; }

.commerce-section-heading { margin: 10px 0 18px; }
.commerce-section-heading p { color: #607587; margin: 5px 0 0; max-width: 770px; }
.commerce-publishing-grid { display: grid; gap: 16px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.commerce-publish-status > p { color: #607587; line-height: 1.55; }
.commerce-publish-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.commerce-publish-actions a.primary { background: var(--commerce-ink); border-radius: 8px; color: #fff; font-size: .78rem; font-weight: 800; padding: 11px 16px; text-decoration: none; }
.commerce-publish-actions a.is-disabled { opacity: .52; pointer-events: none; }
.commerce-publish-actions code,
.commerce-configuration-details code { background: #eef4f7; border-radius: 5px; color: #25465c; overflow-wrap: anywhere; padding: 3px 6px; }
.commerce-readiness { display: grid; gap: 8px; list-style: none; margin: 20px 0 0; padding: 0; }
.commerce-readiness li { align-items: center; color: #607587; display: flex; font-size: .82rem; gap: 9px; }
.commerce-readiness li span { align-items: center; border: 1px solid #c8d7df; border-radius: 50%; display: inline-flex; height: 22px; justify-content: center; width: 22px; }
.commerce-readiness li.ready { color: #246845; }
.commerce-readiness li.ready span { background: #e3f4ea; border-color: #a9d4bb; }
.commerce-domain-list { display: grid !important; grid-template-columns: 1fr !important; }
.commerce-domain-list > div { border-top: 1px solid #e5ecef; display: grid; gap: 10px; grid-template-columns: 120px 1fr; padding: 12px 0; }
.commerce-domain-list dt { color: #667988; }
.commerce-domain-list dd { font-weight: 750; margin: 0; overflow-wrap: anywhere; }
.commerce-configuration-details { background: #fff; border: 1px solid var(--commerce-line); border-radius: 14px; margin-top: 16px; overflow: hidden; }
.commerce-configuration-details summary { align-items: center; cursor: pointer; display: flex; justify-content: space-between; list-style: none; padding: 20px 22px; }
.commerce-configuration-details summary::-webkit-details-marker { display: none; }
.commerce-configuration-details summary > span:first-child { display: flex; flex-direction: column; gap: 5px; }
.commerce-configuration-details summary small { color: var(--commerce-blue); font-size: .67rem; font-weight: 850; letter-spacing: .17em; }
.commerce-configuration-details summary > span:last-child { color: #68808f; font-size: .75rem; }
.commerce-configuration-body { border-top: 1px solid var(--commerce-line); display: grid; gap: 28px; grid-template-columns: minmax(0,1.35fr) minmax(280px,.65fr); padding: 24px; }
.commerce-configuration-body ol { margin: 0; padding-left: 22px; }
.commerce-configuration-body li { color: #5d7181; line-height: 1.55; margin-bottom: 15px; padding-left: 5px; }
.commerce-configuration-body li strong { color: var(--commerce-ink); }
.commerce-configuration-body aside { background: #fff7e5; border-left: 4px solid var(--commerce-orange); border-radius: 8px; padding: 20px; }
.commerce-configuration-body aside p { color: #685d46; line-height: 1.55; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; }
.commerce-starter-card { align-items: center; background: linear-gradient(130deg, #102f25, #174d3b); border: 1px solid #b78b24; border-radius: 14px; color: #fff; display: flex; gap: 24px; justify-content: space-between; margin-bottom: 18px; padding: 24px; }
.commerce-starter-card small { color: #e1bd57; font-size: .68rem; font-weight: 850; letter-spacing: .17em; }
.commerce-starter-card h3 { color: #fff; font-family: Georgia, serif; font-size: 1.55rem; margin: 6px 0; }
.commerce-starter-card p { color: #ceddd5; line-height: 1.55; margin: 0; max-width: 760px; }
.commerce-starter-card button.primary { background: #d3a329; border-color: #d3a329; color: #17231c; flex: 0 0 auto; }
.commerce-module button:not(.primary):not(.commerce-tab):not(.delete):not(.link-button) {
  background: #f7fafb;
  border: 1px solid #bed0db;
  border-radius: 8px;
  color: var(--commerce-ink);
  font-weight: 700;
  padding: 9px 12px;
}
.commerce-module button.delete { background: none; border: 0; color: #9e2f25; padding: 7px; }
.commerce-module button.link-button { background: none; border: 0; color: var(--commerce-blue); font-weight: 750; }

.commerce-product-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.commerce-product-card { min-width: 0; overflow: hidden; }
.commerce-product-media { aspect-ratio: 16 / 10; background: #eaf1f4; overflow: hidden; }
.commerce-product-media img,
.commerce-product-media video { height: 100%; object-fit: cover; width: 100%; }
.commerce-product-placeholder { align-items: center; color: #7992a2; display: flex; font-size: 2rem; height: 100%; justify-content: center; }
.commerce-product-body { padding: 18px; }
.commerce-product-body > p { color: #617687; min-height: 2.7em; }
.commerce-product-body > p.commerce-product-note { background: #fff6dc; border-left: 3px solid #d3a329; color: #6d5b2f; font-size: .76rem; min-height: 0; padding: 9px 10px; }
.commerce-source-link { color: var(--commerce-blue); display: inline-flex; font-size: .75rem; font-weight: 750; margin-top: 12px; text-decoration: none; }
.commerce-product-body dl,
.commerce-card dl { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
.commerce-product-body dl div,
.commerce-card dl div { background: var(--commerce-soft); border-radius: 8px; padding: 9px; }
.commerce-product-body dt,
.commerce-card dt { color: #698092; font-size: .7rem; text-transform: uppercase; }
.commerce-product-body dd,
.commerce-card dd { font-weight: 800; margin: 4px 0 0; }
.commerce-product-body footer,
.commerce-client-card footer,
.commerce-card footer { align-items: center; display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.commerce-empty-state { display: flex; flex-direction: column; gap: 10px; grid-column: 1 / -1; padding: 38px; }
.commerce-empty-state button { align-self: start; }

.commerce-client-grid,
.commerce-supplier-grid,
.commerce-growth-grid,
.commerce-integration-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.commerce-client-card,
.commerce-integration-card { padding: 20px; }
.commerce-client-card header p { color: #62798a; margin: 5px 0 0; }
.commerce-client-details { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-top: 16px; }
.commerce-client-details > div { background: var(--commerce-soft); border-radius: 9px; padding: 12px; }
.commerce-client-details span { color: #698092; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.commerce-client-details p { margin: 5px 0 0; white-space: pre-line; }
.commerce-chip-list { display: flex; flex-wrap: wrap; gap: 7px; }
.commerce-chip-list li { background: #eaf3f7; border-radius: 999px; padding: 7px 10px; }
.commerce-chip-list small { letter-spacing: 0; margin-left: 4px; }

.commerce-table-wrap { overflow-x: auto; }
.commerce-table { border-collapse: collapse; min-width: 1020px; width: 100%; }
.commerce-table th { background: #eef4f7; color: #557082; font-size: .72rem; letter-spacing: .08em; padding: 12px; text-align: left; text-transform: uppercase; }
.commerce-table td { border-top: 1px solid #e2e9ed; padding: 13px 12px; vertical-align: top; }
.commerce-table td small { color: #708494; display: block; margin-top: 4px; }
.empty-cell { color: #708494; padding: 32px !important; text-align: center; }
.commerce-status { background: #eaf0f3; border-radius: 999px; color: #4b6575; display: inline-flex; font-size: .68rem; font-weight: 800; padding: 5px 8px; text-transform: uppercase; }
.commerce-status-active,
.commerce-status-configured,
.commerce-status-delivered { background: #dff4e9; color: #176544; }
.commerce-status-draft,
.commerce-status-planned,
.commerce-status-available { background: #fff0c8; color: #75570c; }
.commerce-status-cancelled,
.commerce-status-disabled { background: #fae4e1; color: #8b2f27; }
.commerce-program-list li { align-items: center; border-top: 1px solid #e1e8ec; display: grid; gap: 10px; grid-template-columns: 1fr auto auto auto; padding: 12px 0; }
.commerce-program-list span { color: #6e8290; display: block; font-size: .78rem; }
.commerce-integration-card footer { margin-top: 20px; }
.commerce-square-sync { background: #fff; border: 1px solid var(--commerce-line); border-radius: 14px; margin-bottom: 18px; padding: 22px; }
.commerce-square-sync.is-synced { border-color: #91cbb1; box-shadow: inset 4px 0 #1d8058; }
.commerce-square-sync > header { align-items: flex-start; display: flex; gap: 16px; justify-content: space-between; }
.commerce-square-sync > header h3 { margin: 4px 0; }
.commerce-square-sync > header p { color: #607587; margin: 0; }
.commerce-square-metrics { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; }
.commerce-square-metrics > div { background: var(--commerce-soft); border-radius: 10px; padding: 14px; }
.commerce-square-metrics span,
.commerce-square-metrics small { color: #667c8d; display: block; font-size: .72rem; }
.commerce-square-metrics strong { display: block; font-size: 1.15rem; margin: 6px 0; }
.commerce-square-activity { border-top: 1px solid var(--commerce-line); margin-top: 18px; padding-top: 12px; }
.commerce-square-activity h4 { margin: 0 0 6px; }
.commerce-square-activity > div { align-items: center; border-top: 1px solid #edf1f3; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) auto auto; padding: 10px 0; }
.commerce-square-activity > div span > small { color: #708494; display: block; margin-top: 3px; }
.commerce-square-forecast-note { color: #526c7e; line-height: 1.55; margin: 16px 0 0; }
.commerce-square-forecast-note a { color: var(--commerce-blue); font-weight: 800; }
.commerce-square-performance-summary { border-color: #91cbb1; box-shadow: inset 4px 0 #1d8058; margin-bottom: 18px; }
.commerce-status-synced,
.commerce-status-completed,
.commerce-status-paid { background: #dff4e9; color: #176544; }

.commerce-dialog { border: 0; border-radius: 18px; box-shadow: 0 28px 85px #0d273f55; max-height: min(820px, 90vh); max-width: 850px; padding: 0; width: calc(100% - 30px); }
.commerce-dialog::backdrop { background: #071725a8; }
.commerce-dialog form > header,
.commerce-dialog form > footer { background: #fff; padding: 22px 26px; }
.commerce-dialog form > header { border-bottom: 1px solid var(--commerce-line); }
.commerce-dialog form > header button { background: transparent !important; border: 0 !important; font-size: 1.8rem; padding: 0 !important; }
.commerce-dialog form > footer { border-top: 1px solid var(--commerce-line); justify-content: flex-end; }
.commerce-form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 60vh; overflow-y: auto; padding: 24px 26px; }
.commerce-form-grid label { color: #516a7a; display: flex; flex-direction: column; font-size: .78rem; font-weight: 750; gap: 6px; }
.commerce-form-grid .span-two { grid-column: 1 / -1; }
.commerce-form-grid input,
.commerce-form-grid select,
.commerce-form-grid textarea { border: 1px solid #bfcfd8; border-radius: 8px; color: var(--commerce-ink); font: inherit; padding: 10px; width: 100%; }
.commerce-form-grid small { color: #718695; font-weight: 500; letter-spacing: 0; }

@media (max-width: 1050px) {
  .commerce-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .commerce-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commerce-portal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commerce-portal-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commerce-storefront-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .commerce-hero { align-items: flex-start; flex-direction: column; gap: 22px; min-height: 0; padding: 28px 22px; }
  .commerce-hero button { width: 100%; }
  .commerce-scope-context,
  .commerce-storefront-directory > header { align-items: flex-start; flex-direction: column; padding: 16px; }
  .commerce-storefront-grid { grid-template-columns: 1fr; }
  .commerce-tabs { border-left: 0; border-radius: 0; border-right: 0; margin-left: -14px; margin-right: -14px; top: 0; }
  .commerce-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commerce-overview-grid,
  .commerce-publishing-grid,
  .commerce-product-grid,
  .commerce-client-grid,
  .commerce-supplier-grid,
  .commerce-growth-grid,
  .commerce-integration-grid { grid-template-columns: 1fr; }
  .commerce-square-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commerce-configuration-body { grid-template-columns: 1fr; }
  .commerce-section-heading { align-items: stretch; flex-direction: column; }
  .commerce-starter-card { align-items: stretch; flex-direction: column; }
  .commerce-section-heading button,
  .button-row { width: 100%; }
  .button-row button { flex: 1; }
  .commerce-action-grid { grid-template-columns: 1fr; }
  .commerce-mini-orders > div { grid-template-columns: 1fr auto; }
  .commerce-mini-orders > div span { grid-column: 1; grid-row: 2; }
  .commerce-client-details,
  .commerce-form-grid { grid-template-columns: 1fr; }
  .commerce-form-grid .span-two { grid-column: auto; }
  .commerce-client-card footer { align-items: stretch; flex-direction: column; }
  .commerce-program-list li { grid-template-columns: 1fr auto; }
  .commerce-program-list li .commerce-status { grid-column: 1; }
  .commerce-portal-preview-toolbar { align-items: stretch; flex-direction: column; }
  .commerce-portal-preview-toolbar > div:last-child { justify-content: flex-start; }
  .commerce-portal-masthead { grid-template-columns: auto 1fr; padding: 20px; }
  .commerce-portal-tools { grid-column: 1 / -1; justify-content: space-between; }
  .commerce-portal-nav { justify-content: flex-start; }
  .commerce-portal-welcome { padding: 42px 24px; }
  .commerce-portal-welcome.has-media { grid-template-columns: 1fr; padding: 0; }
  .commerce-portal-welcome.has-media .commerce-portal-welcome-copy { padding: 42px 24px; }
  .commerce-portal-welcome-media { min-height: 240px; }
  .commerce-portal-grid,
  .commerce-portal-product-grid,
  .commerce-handoff-strip,
  .commerce-portal-orders { grid-template-columns: 1fr; }
  .commerce-portal-card { padding: 24px; }
  .commerce-portal-orders { padding: 28px 24px; }
  .commerce-portal-shop { padding: 30px 18px; }
  .commerce-portal-shop > header { align-items: flex-start; flex-direction: column; }
  .commerce-portal-popout-shell { padding: 0; }
  .commerce-portal-popout-shell .commerce-portal-panel { border: 0; border-radius: 0; min-height: 100vh; }
}
