:root {
  --ink: #111827;
  --muted: #61707d;
  --line: #d8dde3;
  --paper: #eaeded;
  --panel: #ffffff;
  --deep: #131921;
  --nav: #232f3e;
  --mint: #0f8f7a;
  --gold: #febd69;
  --yellow: #ffd814;
  --coral: #d96a4b;
  --blue: #356ac3;
  --shadow: 0 6px 20px rgba(17, 24, 39, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

button, input, select { font: inherit; }

button, .role-nav a, .cart-link {
  min-height: 40px;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

button {
  padding: 0 16px;
  color: #111827;
  background: var(--gold);
  font-weight: 750;
}

button:hover, .role-nav a:hover { transform: translateY(-1px); }

input, select {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  color: var(--ink);
  padding: 0 12px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px clamp(12px, 3vw, 28px);
  background: var(--deep);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: white;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.brand-mark rect { fill: var(--gold); }
.brand-n { fill: var(--deep); }
.brand-line {
  fill: none;
  stroke: var(--coral);
  stroke-width: 4;
  stroke-linecap: round;
}

.brand strong, .brand small { display: block; }
.brand strong {
  font-size: 23px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.brand strong em {
  color: var(--gold);
  font-style: normal;
}

.brand small { color: #cbd5e1; font-size: 11px; }

.global-search {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 92px;
}

.global-search select {
  border-radius: 4px 0 0 4px;
  background: #f3f4f6;
}

.global-search input {
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

.global-search button { border-radius: 0 4px 4px 0; }

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

.ghost-button,
.cart-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  color: white;
  background: transparent;
  text-decoration: none;
  font-weight: 750;
  white-space: nowrap;
}

.ghost-button:hover,
.cart-link:hover {
  border-color: white;
}

.role-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.role-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid transparent;
  color: #e5e7eb;
  text-decoration: none;
  font-weight: 750;
  white-space: nowrap;
}

.role-nav a.active { border-color: white; color: white; }

.category-strip {
  position: sticky;
  top: 62px;
  z-index: 19;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 8px clamp(12px, 3vw, 28px);
  color: white;
  background: var(--nav);
}

.category-strip .filter {
  min-height: 30px;
  border: 1px solid transparent;
  color: white;
  background: transparent;
  white-space: nowrap;
}

.category-strip .filter.active {
  color: #111827;
  background: var(--gold);
}

.strip-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.strip-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.category-strip span {
  margin-left: auto;
  color: #dbeafe;
  font-size: 13px;
  white-space: nowrap;
}

main {
  width: min(1320px, calc(100% - 28px));
  margin: 18px auto 56px;
}

.view { display: none; }
.active-view { display: block; }

.shop-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: clamp(18px, 4vw, 30px);
  border-radius: 4px;
  background: linear-gradient(100deg, #ffffff 0%, #e7f4f2 58%, #ffe8bd 100%);
  box-shadow: var(--shadow);
}

.shop-hero h1 { max-width: 780px; }
.shop-hero p { margin-bottom: 0; }

.hero-deal {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 18px;
  border-radius: 4px;
  background: white;
}

.hero-deal span, .hero-deal small { color: var(--muted); }
.hero-deal strong { font-size: 26px; }

.shopper-callout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #cfe7df;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.callout-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 4px;
  color: white;
  background: linear-gradient(135deg, var(--deep), var(--mint));
  font-weight: 900;
}

.shopper-callout h2 {
  margin-bottom: 4px;
}

.shopper-callout p {
  margin-bottom: 0;
}

.callout-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 4px;
  color: white;
  background: var(--deep);
  text-decoration: none;
  font-weight: 850;
  white-space: nowrap;
}

.store-banners {
  margin-bottom: 18px;
}

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

.store-banner-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.store-banner {
  display: grid;
  align-content: space-between;
  min-height: 168px;
  padding: 16px;
  border: 0;
  border-radius: 4px;
  color: white;
  text-align: left;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.store-banner::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -44px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.store-banner .store-logo-wrap,
.store-banner strong,
.store-banner small {
  position: relative;
  z-index: 1;
}

.store-logo-wrap {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 86px;
  padding: 0;
  border-radius: 4px;
  background: transparent;
  overflow: visible;
}

.store-logo-wrap img {
  display: block;
  width: min(100%, 210px);
  max-height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.16));
}

.store-banner.amazon .store-logo-wrap img {
  transform: scale(1.18);
}

.store-banner.walmart .store-logo-wrap img {
  transform: scale(1.18);
}

.store-banner.target .store-logo-wrap img {
  transform: scale(1.18);
}

.store-banner.ebay .store-logo-wrap img {
  transform: scale(1.1);
}

.store-banner.bestbuy .store-logo-wrap img {
  transform: scale(1.22);
}

.store-banner strong {
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.25;
}

.store-banner small {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.35;
}

.store-banner.amazon {
  background: linear-gradient(145deg, #f8fafc, #cbd5e1);
  color: #111827;
}

.store-banner.walmart {
  background: linear-gradient(145deg, #dff3ff, #77c8f2);
  color: #12324a;
}

.store-banner.target {
  background: linear-gradient(145deg, #fff1f2, #fca5a5);
  color: #3b0a0a;
}

.store-banner.ebay {
  background: linear-gradient(145deg, #f8fafc, #dbeafe);
  color: #111827;
}

.store-banner.bestbuy {
  color: #111827;
  background: linear-gradient(145deg, #fff7cc, #facc15);
}

.store-banner.amazon small,
.store-banner.walmart small,
.store-banner.target small,
.store-banner.ebay small,
.store-banner.bestbuy small {
  color: rgba(17, 24, 39, 0.76);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

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

.account-panel {
  position: sticky;
  top: 112px;
  padding: 18px;
}

.eyebrow {
  display: block;
  color: var(--mint);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 8px;
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.05;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(21px, 3vw, 28px);
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.35;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.locker-card {
  display: grid;
  gap: 6px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: #f7fafc;
}

.locker-card span, .locker-card small { color: var(--muted); }
.locker-card strong { font-size: 29px; }

.guest-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 16px;
}

.secondary-button {
  border: 1px solid var(--line);
  background: white;
}

.account-only {
  display: none;
}

.account-only.visible {
  display: grid;
}

form.account-only.visible {
  display: block;
}

.cart-summary {
  display: grid;
  gap: 5px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #f3d27b;
  border-radius: 4px;
  background: #fff8e1;
}

.cart-summary.account-only {
  display: none;
}

.cart-summary.account-only.visible {
  display: grid;
}

.cart-summary span, .cart-summary small {
  color: var(--muted);
}

.cart-summary strong {
  font-size: 20px;
}

.compact-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
}

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

.panel { padding: 18px; }

.panel-header, .split-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.split-header { margin-bottom: 22px; }
.split-header p { margin-bottom: 0; }

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.filter {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: white;
}

.filter.active {
  border-color: var(--deep);
  color: white;
  background: var(--deep);
}

.search-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 10px;
  margin-bottom: 16px;
}

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

.product-card {
  display: grid;
  gap: 10px;
  min-height: 338px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
}

.product-card:hover { outline: 2px solid #f3d27b; }

.product-art {
  display: grid;
  place-items: center;
  min-height: 142px;
  border-radius: 4px;
  color: var(--deep);
  background: #f6f7f7;
  font-size: 54px;
  font-weight: 900;
}

.product-meta, .package-meta, .sync-note {
  color: var(--muted);
  font-size: 13px;
}

.rating-line {
  color: #b45309;
  font-size: 14px;
  font-weight: 800;
}

.delivery-note {
  color: #007185;
  font-size: 13px;
  line-height: 1.35;
}

.price-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.price-line strong { font-size: 24px; }

.cart-button {
  width: 100%;
  margin-top: 8px;
  background: var(--yellow);
}

.product-card:has(.price-line span:nth-child(2)) .cart-button {
  border: 1px solid rgba(17, 24, 39, 0.12);
}

.tracking-panel { margin-top: 14px; }

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

.package-card, .tenant-card, .route-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  padding: 16px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--deep);
  background: #e8f4ef;
  font-size: 13px;
  font-weight: 800;
}

.status.transit { background: #e7eefc; color: var(--blue); }
.status.delivery { background: #fff2e9; color: var(--coral); }

.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  margin-top: 14px;
}

.step {
  height: 7px;
  border-radius: 999px;
  background: #e5ece9;
}

.step.done { background: var(--mint); }

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.metric-row article {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
}

.metric-row strong { font-size: 32px; }
.metric-row span { color: var(--muted); }

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

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th, td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 13px;
}

td button {
  min-height: 34px;
  padding: 0 12px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.tenant-list, .affiliate-bars, .route-board {
  display: grid;
  gap: 12px;
}

.tenant-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.tenant-logo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: var(--deep);
  color: var(--gold);
  font-weight: 900;
}

.bar-row { display: grid; gap: 8px; }

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 800;
}

.bar-track {
  height: 12px;
  border-radius: 999px;
  background: #e5ece9;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), var(--gold));
}

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

.route-card strong {
  display: block;
  margin-bottom: 4px;
}

.shopper-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: clamp(24px, 5vw, 42px);
  border-radius: 4px;
  color: white;
  background: linear-gradient(135deg, #111827, #243244);
}

.shopper-hero p { color: #d7dee8; }

.shopper-plan {
  display: grid;
  gap: 10px;
  align-content: center;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.shopper-plan span,
.shopper-plan small {
  color: #d7dee8;
}

.shopper-plan strong {
  color: var(--gold);
  font-size: 36px;
  line-height: 1;
}

.brand-marquee {
  overflow: hidden;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 12px;
  padding: 14px 0;
  animation: marquee-left 28s linear infinite;
}

.marquee-track span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid #e3e7ec;
  border-radius: 999px;
  color: var(--deep);
  background: #f8fafc;
  font-weight: 900;
  white-space: nowrap;
}

@keyframes marquee-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.shopper-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  margin-bottom: 18px;
}

.shopper-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  box-shadow: var(--shadow);
}

.shopper-photo {
  display: grid;
  place-items: end center;
  min-height: 240px;
  border-radius: 4px;
  background:
    radial-gradient(circle at 50% 28%, #f1c7a8 0 17%, transparent 18%),
    radial-gradient(circle at 50% 34%, #273142 0 24%, transparent 25%),
    linear-gradient(180deg, #e8eef5 0 47%, #131921 48% 100%);
  overflow: hidden;
}

.shopper-photo span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  color: var(--gold);
  background: rgba(19, 25, 33, 0.92);
  font-weight: 900;
  letter-spacing: 0;
}

.shopper-info {
  display: grid;
  align-content: center;
}

.stars {
  margin: 8px 0 12px;
  color: #f59e0b;
  font-size: 18px;
  font-weight: 900;
}

.stars span {
  color: var(--ink);
  font-size: 14px;
}

.shopper-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.shopper-facts span,
.shopper-tools article {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
  color: var(--muted);
}

.shopper-facts strong,
.shopper-tools strong {
  color: var(--deep);
  font-size: 24px;
}

.shopper-rates {
  padding: 18px;
}

.rate-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.rate-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rate-list div:last-child { border-bottom: 0; }
.rate-list span { color: var(--muted); }
.rate-list strong { color: var(--deep); }

.shopper-dashboard {
  padding: 18px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.shopper-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 4px;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.shopper-command h3 {
  margin: 4px 0 6px;
  color: var(--deep);
}

.shopper-command p {
  max-width: 680px;
  margin: 0;
}

.shopper-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 16px 0 4px;
  padding-bottom: 4px;
}

.shopper-tabs button {
  min-height: 36px;
  color: var(--deep);
  background: #eef2f7;
  white-space: nowrap;
}

.shopper-tabs button.active {
  color: white;
  background: var(--deep);
}

.shopper-tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.shopper-tools small {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.shopper-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.8fr) minmax(260px, 0.8fr);
  gap: 14px;
}

.work-card,
.client-profile,
.quote-summary,
.profile-preview {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
}

.panel-header.compact {
  align-items: center;
  margin-bottom: 12px;
}

.panel-header.compact h3 {
  margin: 0;
  color: var(--deep);
}

.request-list {
  display: grid;
  gap: 10px;
}

.request-list article {
  display: grid;
  grid-template-columns: minmax(90px, 0.75fr) minmax(0, 1.4fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
}

.request-list span,
.request-list em {
  color: var(--muted);
  font-size: 13px;
}

.request-list em {
  color: #b45309;
  font-style: normal;
  font-weight: 900;
}

.pipeline {
  display: grid;
  gap: 8px;
}

.pipeline div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.pipeline div:last-child {
  border-bottom: 0;
}

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

.pipeline strong {
  color: var(--deep);
  font-size: 22px;
}

.mini-bars {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.mini-bars span {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: var(--blue);
}

.alert-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.shopper-tab-view {
  display: none;
}

.shopper-tab-view.active {
  display: block;
}

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

.shopper-crm div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
}

.shopper-crm h3 {
  margin-bottom: 6px;
}

.shopper-crm p {
  margin-bottom: 0;
  font-size: 14px;
}

.activity-list,
.invoice-list,
.quote-board {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.activity-list article,
.quote-board article,
.invoice-list article {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
}

.activity-list article {
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: center;
}

.activity-list span,
.quote-board span,
.invoice-list span {
  color: var(--muted);
  font-size: 13px;
}

.shopper-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.shopper-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.shopper-form .wide,
.shopper-form button {
  grid-column: 1 / -1;
}

.shopper-form textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  font: inherit;
}

.settings-layout,
.crm-layout,
.quote-studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  margin-top: 16px;
}

.profile-preview {
  align-self: start;
  display: grid;
  gap: 10px;
}

.profile-preview h3,
.quote-summary h3 {
  margin: 0;
  color: var(--deep);
}

.profile-preview p,
.quote-summary p {
  margin: 0;
  color: var(--muted);
}

.crm-layout {
  grid-template-columns: 280px minmax(0, 1fr);
}

.client-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.client-list button {
  display: grid;
  justify-items: start;
  gap: 4px;
  min-height: 64px;
  color: var(--deep);
  background: #f8fafc;
  border: 1px solid var(--line);
}

.client-list button.active {
  color: white;
  background: var(--deep);
  border-color: var(--deep);
}

.client-list span {
  color: inherit;
  opacity: 0.72;
  font-size: 13px;
}

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

.client-grid article {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
}

.client-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-grid strong {
  color: var(--deep);
}

.client-notes {
  margin-top: 14px;
  padding: 14px;
  border-left: 4px solid var(--blue);
  background: #eff6ff;
}

.client-notes h4,
.client-notes p {
  margin: 0;
}

.client-notes p {
  margin-top: 6px;
  color: var(--muted);
}

.quote-studio {
  grid-template-columns: minmax(0, 1fr) 310px;
}

.quote-summary {
  align-self: start;
  display: grid;
  gap: 12px;
}

.quote-summary strong {
  color: var(--deep);
  font-size: 34px;
}

.quote-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quote-board h3 {
  margin-bottom: 0;
}

.invoice-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
}

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

.finance-strip article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
}

.finance-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.finance-strip strong {
  color: var(--deep);
  font-size: 24px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100% - 36px));
  padding: 14px 16px;
  border-radius: 4px;
  color: white;
  background: var(--deep);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 180ms ease;
}

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

.site-footer {
  background: var(--deep);
  color: white;
  margin-top: 48px;
}

.back-to-top {
  width: 100%;
  min-height: 44px;
  border-radius: 0;
  color: white;
  background: #37475a;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
}

.footer-grid h2 {
  margin-bottom: 12px;
  font-size: 16px;
}

.footer-grid a {
  display: block;
  color: #d5dce6;
  font-size: 14px;
  line-height: 1.9;
  text-decoration: none;
}

.footer-grid a:hover {
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 13px;
}

.footer-brand {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 32px;
  border-radius: 4px;
  color: var(--deep);
  background: var(--gold);
  font-weight: 900;
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(17, 24, 39, 0.58);
}

.login-modal.open {
  display: flex;
}

.login-card {
  position: relative;
  width: min(440px, 100%);
  padding: 26px;
  border-radius: 6px;
  background: white;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.login-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  color: var(--ink);
  background: #eef2f7;
  font-size: 24px;
  line-height: 1;
}

.login-card p {
  margin-bottom: 18px;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form label {
  font-weight: 800;
}

.login-form button {
  margin-top: 8px;
  background: var(--yellow);
}

.login-note {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 1060px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .workspace-grid, .admin-grid, .shopper-hero, .shopper-profile-grid {
    grid-template-columns: 1fr;
  }

  .account-panel { position: static; }

  .store-banner-grid,
  .shop-hero, .product-grid, .package-list, .metric-row, .shopper-tools, .shopper-crm, .quote-board, .invoice-grid, .shopper-workspace, .client-grid, .finance-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-layout,
  .crm-layout,
  .quote-studio {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  main {
    width: min(100% - 20px, 1320px);
    margin-top: 14px;
  }

  .category-strip { top: 154px; }
  .brand small { display: none; }

  .panel, .account-panel { padding: 14px; }

  .panel-header, .split-header, .price-line, .route-card {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }

  .footer-grid,
  .global-search, .search-line, .store-banner-grid, .shop-hero, .shopper-callout, .input-row, .product-grid, .package-list, .metric-row, .tenant-card, .shopper-card, .shopper-facts, .shopper-tools, .shopper-crm, .shopper-form, .quote-board, .invoice-grid, .activity-list article, .shopper-workspace, .request-list article, .client-grid, .finance-strip {
    grid-template-columns: 1fr;
  }

  .header-actions,
  .callout-actions,
  .shopper-command,
  .panel-actions,
  .footer-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .category-strip span { display: none; }
  .locker-card strong { font-size: 26px; }
}
