:root {
  --v161-ink: #153f31;
  --v161-green: #1f6b4f;
  --v161-mint: #e9f8ef;
  --v161-lime: #8fff33;
  --v161-line: #cfe3d7;
}

.cabinet-value-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: min(1160px, calc(100% - 32px));
  margin: 18px auto;
  padding: 18px 20px;
  border: 1px solid rgba(67, 142, 100, .28);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 0, rgba(143, 255, 51, .32), transparent 32%),
    linear-gradient(125deg, #143f31 0, #277655 62%, #4ea864 100%);
  color: #fff;
  box-shadow: 0 16px 42px rgba(20, 72, 52, .16);
}

.workspace-main > .cabinet-value-banner,
.admin-shell > .cabinet-value-banner { width: 100%; margin: 0 0 18px; }

.cabinet-value-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .14);
}

.cabinet-value-icon .conflua-ui-icon { width: 27px; height: 27px; }
.cabinet-value-banner small { display: block; margin-bottom: 3px; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.cabinet-value-banner strong { display: block; font-size: clamp(18px, 2.3vw, 28px); line-height: 1.1; }
.cabinet-value-banner p { margin: 6px 0 0; color: rgba(255, 255, 255, .78); font-size: 13px; line-height: 1.4; }
.cabinet-value-banner .mini-action { border-color: rgba(255, 255, 255, .35); background: #fff; color: var(--v161-ink); white-space: nowrap; }

.network-section-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--v161-line);
  border-radius: 24px;
  background: linear-gradient(135deg, #f7fffa, #e5f7ec);
}

.network-section-hero h2 { margin: 2px 0 8px; font-size: clamp(26px, 4vw, 38px); }
.network-section-hero p:last-child { max-width: 720px; margin: 0; color: #5c7468; line-height: 1.5; }
.zero-commission-chip { flex: 0 0 auto; padding: 9px 12px; border-radius: 999px; background: #173f31; color: #fff; font-size: 12px; font-weight: 950; }
.network-access-note { margin: 14px 0; padding: 13px 15px; border: 1px solid #b9dfc8; border-radius: 14px; background: #edf9f1; color: #245b45; font-weight: 800; }
.branch-access-manager { display: grid; gap: 14px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--v161-line); }
.branch-access-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.branch-access-heading h3 { margin: 0 0 6px; font-size: 23px; }
.branch-access-heading p { margin: 0; }
.branch-access-form { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--v161-line); border-radius: 18px; background: #f8fcf9; }
.branch-permission-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.branch-permission-grid .check-row { min-height: 44px; padding: 8px 10px; border: 1px solid #d5e7dc; border-radius: 12px; background: #fff; }
.branch-invite-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.branch-invite-result input { min-width: 0; }
.branch-team-list { display: grid; gap: 10px; }
.branch-team-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 15px; border: 1px solid var(--v161-line); border-radius: 16px; background: #fff; }
.branch-team-card strong, .branch-team-card span { display: block; }
.branch-team-card span { margin-top: 4px; color: #698076; font-size: 13px; }
.branch-team-card .pill { display: inline-flex; margin: 0 0 0 5px; color: inherit; }
.branch-access-activation-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 20px; }
.branch-access-activation-details div { padding: 12px; border: 1px solid var(--v161-line); border-radius: 13px; background: #f6fbf8; }
.branch-access-activation-details dt { color: #6b8075; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.branch-access-activation-details dd { margin: 5px 0 0; color: var(--v161-ink); font-weight: 900; overflow-wrap: anywhere; }
.branch-legal-check { display: flex !important; grid-template-columns: none !important; align-items: flex-start; gap: 9px !important; padding: 11px 12px; border: 1px solid var(--v161-line); border-radius: 12px; background: #f7fbf8; }
.branch-legal-check input { flex: 0 0 auto; width: 20px; min-height: 20px; margin: 1px 0 0; }

.product-media-swiper { width: 100%; outline: none; }
.product-media-swiper:focus-visible { border-radius: 18px; box-shadow: 0 0 0 4px rgba(72, 164, 108, .2); }
.product-media-viewport { position: relative; overflow: hidden; border: 1px solid #d2e4da; border-radius: 20px; background: #f2f7f4; }
.product-media-track {
  display: flex;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
  touch-action: pan-x pan-y pinch-zoom;
}
.product-media-track::-webkit-scrollbar { display: none; }
.product-media-slide { position: relative; flex: 0 0 100%; aspect-ratio: 1 / 1; margin: 0; scroll-snap-align: start; scroll-snap-stop: always; background: #edf3ef; }
.product-media-slide img, .product-media-slide video { display: block; width: 100%; height: 100%; object-fit: contain; background: #edf3ef; }
.product-video-label { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 999px; background: rgba(17, 52, 40, .84); color: #fff; font-size: 12px; font-weight: 900; backdrop-filter: blur(8px); }
.product-video-label .conflua-ui-icon { width: 17px; height: 17px; }
.product-media-arrow { position: absolute; z-index: 3; top: 50%; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(30, 92, 68, .18); border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--v161-ink); box-shadow: 0 8px 22px rgba(15, 57, 41, .18); transform: translateY(-50%); cursor: pointer; }
.product-media-arrow.is-prev { left: 12px; }
.product-media-arrow.is-next { right: 12px; }
.product-media-arrow .conflua-ui-icon { width: 21px; height: 21px; }
.product-media-counter { position: absolute; z-index: 2; right: 12px; bottom: 12px; padding: 6px 9px; border-radius: 999px; background: rgba(17, 52, 40, .82); color: #fff; font-size: 12px; font-weight: 900; }
.product-media-thumbs { display: flex; gap: 8px; margin-top: 10px; padding: 2px; overflow-x: auto; scrollbar-width: thin; }
.product-media-thumb-button { flex: 0 0 72px; width: 72px; height: 72px; padding: 3px; overflow: hidden; border: 2px solid transparent; border-radius: 14px; background: #eef5f1; cursor: pointer; }
.product-media-thumb-button.is-active { border-color: #3a9b68; box-shadow: 0 0 0 2px rgba(58, 155, 104, .14); }
.product-media-thumb-button img { width: 100%; height: 100%; border-radius: 9px; object-fit: cover; }
.product-media-video-thumb { display: grid; place-items: center; align-content: center; gap: 2px; width: 100%; height: 100%; border-radius: 9px; background: #173f31; color: #fff; font-size: 10px; }
.product-media-video-thumb .conflua-ui-icon { width: 22px; height: 22px; }

#shop .workspace-main,
#supplier .workspace-main,
.admin-shell { background-image: radial-gradient(circle at 95% 0, rgba(143, 255, 51, .08), transparent 24%); }
#shop .profile-form,
#supplier .profile-form,
.admin-panel { box-shadow: 0 12px 34px rgba(21, 72, 53, .07); }
#shop .metric,
#supplier .metric,
.admin-summary-metrics .metric { border-color: #d2e6da; background: linear-gradient(145deg, #fff, #f4faf6); }

@media (max-width: 760px) {
  .cabinet-value-banner { grid-template-columns: auto minmax(0, 1fr); width: calc(100% - 20px); padding: 15px; border-radius: 18px; }
  .cabinet-value-banner .mini-action { grid-column: 1 / -1; width: 100%; }
  .network-section-hero { display: grid; padding: 20px; }
  .zero-commission-chip { width: fit-content; }
  .branch-permission-grid { grid-template-columns: 1fr 1fr; }
  .branch-team-card { grid-template-columns: 1fr; }
  .branch-access-activation-details { grid-template-columns: 1fr; }
  .product-media-arrow { width: 38px; height: 38px; }
  .product-media-thumb-button { flex-basis: 62px; width: 62px; height: 62px; }
}

@media (max-width: 430px) {
  .cabinet-value-icon { width: 42px; height: 42px; }
  .branch-permission-grid { grid-template-columns: 1fr; }
  .product-media-arrow { display: none; }
  .product-media-slide { aspect-ratio: 4 / 5; }
}

/* CONFLUA v162: on-site network guide */
.network-guide {
  margin: 18px 0 20px;
  overflow: hidden;
  border: 1px solid #c9e1d4;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(21, 72, 53, .06);
}
.network-guide > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 18px;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(135deg, #f6fff9, #eaf8ef);
}
.network-guide > summary::-webkit-details-marker { display: none; }
.network-guide > summary span:first-child { display: grid; gap: 3px; }
.network-guide > summary b { color: var(--v161-ink); font-size: 18px; }
.network-guide > summary small { color: #657f72; font-weight: 700; }
.network-guide-count,
.network-guide-done,
.network-guide-hint {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: #e7f6ec;
  color: #246144;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.network-guide-body { display: grid; gap: 14px; padding: 18px; }
.network-guide-intro {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #d8eadf;
  border-radius: 15px;
  background: #f9fcfa;
}
.network-guide-intro strong { color: var(--v161-ink); }
.network-guide-intro span { color: #657b70; line-height: 1.45; }
.network-guide-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.network-guide-steps li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border: 1px solid #ddebe3;
  border-radius: 16px;
  background: #fff;
}
.network-guide-steps li.is-complete { border-color: #bde0c9; background: #f7fcf8; }
.network-guide-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #173f31;
  color: #fff;
  font-size: 14px;
  font-weight: 950;
}
.network-guide-steps li.is-complete .network-guide-number { background: #2f8b5d; }
.network-guide-steps strong { display: block; margin-bottom: 3px; color: var(--v161-ink); }
.network-guide-steps p { margin: 0; color: #647d70; font-size: 13px; line-height: 1.45; }
.network-guide-steps button:disabled { opacity: .48; cursor: not-allowed; }

/* CONFLUA v162: product video is the first media item */
.product-video-player { position: relative; width: 100%; height: 100%; background: #0f1f18; }
.product-video-player video { width: 100%; height: 100%; object-fit: contain; background: #0f1f18; }
.product-video-player .product-video-label { top: 12px; bottom: auto; left: 12px; z-index: 3; }
.product-video-center-play {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 50%;
  background: rgba(18, 61, 45, .86);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .24);
  transform: translate(-50%, -50%);
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.product-video-center-play:hover,
.product-video-center-play:focus-visible { background: rgba(26, 93, 65, .94); outline: 3px solid rgba(143, 255, 51, .45); outline-offset: 3px; }
.product-video-center-play[hidden] { display: none; }
.product-video-center-play span {
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 17px solid #fff;
}

@media (max-width: 760px) {
  .network-guide > summary { align-items: flex-start; }
  .network-guide-steps li { grid-template-columns: auto minmax(0, 1fr); }
  .network-guide-steps li > button,
  .network-guide-steps li > .network-guide-done,
  .network-guide-steps li > .network-guide-hint { grid-column: 2; justify-self: start; }
  .product-video-center-play { width: 60px; height: 60px; }
}

@media (max-width: 430px) {
  .network-guide > summary { padding: 15px; }
  .network-guide-count { display: none; }
  .network-guide-body { padding: 14px; }
  .network-guide-steps li { padding: 12px; }
  .product-video-center-play { width: 56px; height: 56px; }
}
