:root {
  --bg: #f4f6f7;
  --paper: #ffffff;
  --ink: #161d23;
  --muted: #66727d;
  --line: #9aa5ac;
  --line-soft: #d9e1e5;
  --red: #e51f24;
  --orange: #ff7438;
  --teal: #176a64;
  --shadow: 0 16px 40px rgba(22, 29, 35, 0.08);
}

* { box-sizing: border-box; }

[hidden] {
  display: none !important;
}

.seo-index {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button, input, select { font: inherit; }
textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(620px, 1.5fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: 18px;
  padding: 12px clamp(16px, 4vw, 42px);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.brand span {
  display: grid;
  place-items: center;
  width: 57px;
  height: 57px;
  border-radius: 8px;
  background: var(--orange);
  color: white;
  font-weight: 900;
  overflow: hidden;
}

.brand span img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand span.has-logo-image {
  background: white;
  border: 1px solid var(--line-soft);
  color: transparent;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.tools {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 140px;
  gap: 10px;
  justify-content: end;
}

.official-site {
  color: var(--teal);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
  text-align: center;
  white-space: nowrap;
}

.top-links {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: nowrap;
}

.language-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(22, 120, 110, 0.28);
  border-radius: 6px;
  color: #fff;
  background: var(--teal);
  font-size: 13px;
  font-weight: 900;
}

.top-center {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
  justify-self: stretch;
}

.top-center h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 900;
  letter-spacing: 0;
  text-align: left;
  white-space: nowrap;
}

.tools input,
.tools select,
.admin-toggle,
.console-card input,
.console-card select,
.console-card textarea,
.login-card input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 0 11px;
  background: white;
}

.console-card textarea {
  min-height: 92px;
  padding: 10px 11px;
  resize: vertical;
}

.admin-toggle,
.console-card button,
.login-card button {
  border: 0;
  color: white;
  background: var(--teal);
  font-weight: 900;
}

.admin-toggle.active { background: var(--orange); }

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px clamp(10px, 2vw, 22px) 40px;
}

.admin-console h2 {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: 0;
}

.manage-tip {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto 12px;
  padding: 8px 12px;
  border: 1px solid #f3c9a9;
  border-radius: 8px;
  background: #fff7f1;
  color: #6c3b16;
}

.mindmap {
  display: grid;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}

.company-intro {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(620px, 1.22fr);
  align-items: center;
  gap: 28px;
  width: min(1180px, 100%);
  margin: 0 auto 18px;
  min-height: 330px;
  padding: 24px 28px;
  border: 1px solid #d8e0e5;
  border-radius: 8px;
  background: white;
  box-shadow: 0 14px 34px rgba(22, 29, 35, 0.08);
  box-sizing: border-box;
}

.intro-copy {
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
  border: 1px solid #dfe9e7;
  border-radius: 8px;
  background: #fbfdfc;
}

.intro-eyebrow {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
}

.intro-copy h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: clamp(24px, 2vw, 28px);
  line-height: 1.22;
  letter-spacing: 0;
}

.intro-copy p {
  margin: 0;
  max-width: 520px;
  color: #4d5a64;
  font-size: 16px;
  line-height: 1.58;
}

.intro-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.intro-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #d8e5e2;
  border-radius: 999px;
  background: #f7fbfa;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.intro-values {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #edf2f3;
}

.intro-values p {
  display: grid;
  grid-template-columns: 4.25em minmax(0, 1fr);
  column-gap: 8px;
  align-items: baseline;
  margin: 0;
  max-width: none;
  color: #4d5a64;
  font-size: 17px;
  line-height: 1.45;
  font-weight: 400;
}

.intro-values p span {
  font-weight: 400;
}

.intro-value-label {
  white-space: nowrap;
}

.intro-values span {
  min-width: 0;
}

.intro-language-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 16px;
  padding: 0 14px;
  border: 1px solid rgba(22, 120, 110, 0.22);
  border-radius: 7px;
  background: var(--teal);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(22, 120, 110, 0.16);
}

.promo-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "customers customers"
    "photos apps";
  align-items: stretch;
  gap: 10px 12px;
  min-width: 0;
  align-self: stretch;
}

.promo-group {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e1eaed;
  border-radius: 8px;
  background: #fbfcfc;
}

.promo-group-customers { grid-area: customers; }
.promo-group-companyPhotos { grid-area: photos; }
.promo-group-applications { grid-area: apps; }

.promo-group-customers,
.promo-group-companyPhotos,
.promo-group-applications {
  align-content: start;
}

.promo-group h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 900;
}

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

.promo-group-customers .promo-image-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.promo-group-companyPhotos .promo-image-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.promo-group-applications .promo-image-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.promo-image-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: linear-gradient(100deg, #f7f9fa 20%, #eef3f5 40%, #f7f9fa 60%);
  background-size: 220% 100%;
  object-fit: contain;
  padding: 6px;
}

.mobile-promo-image {
  display: none !important;
}

.promo-group-customers .promo-image-grid img {
  aspect-ratio: 8 / 1;
  height: auto;
  object-fit: contain;
}

.promo-group-companyPhotos .promo-image-grid img {
  aspect-ratio: 4 / 3;
  height: auto;
}

.promo-group-companyPhotos .promo-image-grid img:first-child {
  grid-column: auto;
  height: auto;
}

.promo-group-applications .promo-image-grid img {
  aspect-ratio: 4 / 3;
  height: auto;
}

.promo-group.single-image .promo-image-grid {
  display: block;
}

.promo-group.single-image .promo-image-grid img {
  height: auto;
  object-fit: contain;
  padding: 6px;
}

.promo-group-customers.single-image .promo-image-grid img {
  aspect-ratio: 8 / 1;
  height: auto;
}

.promo-group-companyPhotos.single-image .promo-image-grid img {
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: contain;
  padding: 6px;
}

.promo-group-applications.single-image .promo-image-grid img {
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: contain;
  padding: 6px;
}

.knowledge-section {
  width: min(1180px, 100%);
  margin: 0 auto 18px;
  padding: 16px 20px 18px;
  border: 1px solid #d8e0e5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(22, 29, 35, 0.08);
}

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

.knowledge-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 1.9vw, 26px);
  line-height: 1.2;
  letter-spacing: 0;
}

.knowledge-eyebrow {
  margin: 0 0 4px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
}

.knowledge-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(22, 120, 110, 0.28);
  border-radius: 7px;
  color: var(--teal);
  background: #fff;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

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

.knowledge-card {
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  row-gap: 5px;
  min-height: 98px;
  padding: 13px 16px;
  border: 1px solid #dce7e5;
  border-radius: 8px;
  background: #fbfdfc;
  box-shadow: none;
}

.knowledge-card:nth-child(n + 7) {
  display: none;
}

.knowledge-card:hover,
.knowledge-card:focus-visible {
  border-color: rgba(22, 120, 110, 0.42);
  box-shadow: 0 14px 30px rgba(22, 29, 35, 0.09);
  outline: none;
}

.knowledge-tag {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--teal);
  background: #edf8f6;
  font-size: 12px;
  font-weight: 900;
}

.knowledge-card strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.32;
  font-weight: 900;
}

.knowledge-card span:not(.knowledge-tag) {
  color: #5f6d76;
  font-size: 13px;
  line-height: 1.38;
}

.knowledge-page-body {
  min-height: 100vh;
  background: #f4f6f7;
}

.knowledge-page-top {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.96);
}

.knowledge-page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
}

.knowledge-page-brand {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.knowledge-page-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.knowledge-page-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(22, 120, 110, 0.24);
  border-radius: 7px;
  color: var(--teal);
  background: #fff;
  font-size: 13px;
  font-weight: 900;
}

.knowledge-page-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 46px;
}

.knowledge-hero {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.knowledge-hero p {
  margin: 0;
  max-width: 760px;
  color: #53626b;
  font-size: 16px;
  line-height: 1.7;
}

.knowledge-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.2;
  letter-spacing: 0;
}

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

.knowledge-library-card {
  display: grid;
  gap: 9px;
  padding: 18px;
  border: 1px solid #dce7e5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(22, 29, 35, 0.05);
}

.knowledge-library-card:hover,
.knowledge-library-card:focus-visible {
  border-color: rgba(22, 120, 110, 0.42);
  outline: none;
}

.knowledge-library-card strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.35;
}

.knowledge-library-card span:not(.knowledge-tag) {
  color: #5f6d76;
  font-size: 14px;
  line-height: 1.55;
}

.promo-empty {
  display: block;
  min-height: 58px;
  border: 1px solid #e4ebee;
  border-radius: 7px;
  background: linear-gradient(100deg, #f7f9fa 20%, #eef3f5 40%, #f7f9fa 60%);
  background-size: 220% 100%;
  animation: soft-loading 1.35s ease-in-out infinite;
}

@keyframes soft-loading {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

.promo-group-companyPhotos .promo-empty {
  min-height: 180px;
}

.promo-group-applications .promo-empty {
  min-height: 180px;
}

.category-block {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  min-height: 120px;
  position: relative;
  padding: 14px 0;
  border: 1px solid #e4ebee;
  border-radius: 12px;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: visible;
}

.category-label-wrap {
  position: relative;
  padding: 0 20px;
}

.category-label-wrap::after {
  content: "";
  position: absolute;
  right: 0;
  top: var(--category-line-top, 50%);
  width: 20px;
  border-top: 2px solid var(--line);
}

.category-label {
  position: absolute;
  top: var(--category-label-top, 50%);
  left: 50%;
  transform: translate(-50%, 0);
  display: grid;
  place-items: center;
  width: 118px;
  min-height: 60px;
  padding: 9px;
  border: 2px solid #2a353c;
  border-radius: 9px;
  background: white;
  text-align: center;
}

.category-label strong {
  display: block;
  font-size: 19px;
}

.category-label small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.branch-list {
  position: relative;
  display: grid;
  gap: 14px;
  padding-left: 32px;
}

.branch-list::before {
  content: "";
  position: absolute;
  left: 0;
  top: var(--branch-line-top, 30px);
  height: var(--branch-line-height, calc(100% - 60px));
  border-left: 2px solid var(--line);
}

.branch-row {
  position: relative;
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.branch-row::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 23px;
  width: 32px;
  border-top: 2px solid var(--line);
}

.branch-label {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 46px;
  padding: 6px 9px;
  border: 2px solid #2a353c;
  border-radius: 8px;
  background: white;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
}

.product-list {
  position: relative;
  display: grid;
  border-left: 2px solid var(--line);
}

.product-row {
  position: relative;
  display: grid;
  grid-template-columns: 64px 118px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 60px;
  padding: 7px 0 7px 20px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.product-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 18px;
  border-top: 2px solid var(--line);
}

.product-image {
  position: relative;
  width: 58px;
  height: 40px;
  overflow: visible;
  border: 1px solid #cfd9df;
  border-radius: 7px;
  background: linear-gradient(100deg, #f7f9fa 20%, #edf3f5 40%, #f7f9fa 60%);
  background-size: 220% 100%;
  animation: soft-loading 1.35s ease-in-out infinite;
  z-index: 1;
}

.product-image:has(.thumb-img[data-loaded="1"]),
.product-image:has(.empty-thumb) {
  background: #f7f8f9;
  animation: none;
}

.empty-thumb {
  display: block;
  width: 100%;
  height: 100%;
}

.product-image .thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 7px;
}

.product-image:hover {
  z-index: 45;
}

.thumb-preview-layer {
  position: fixed;
  left: 12px;
  top: 12px;
  width: 495px;
  height: 345px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: white;
  box-shadow: 0 18px 48px rgba(22, 29, 35, 0.22);
  pointer-events: none;
  z-index: 80;
}

.thumb-preview-layer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.is-scrolling .thumb-preview-layer {
  display: none !important;
}

.product-name {
  display: grid;
  gap: 3px;
}

.product-name strong {
  font-size: 15px;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 900;
}

.summary {
  display: block;
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.product-row.hot .summary {
  color: var(--red);
  font-weight: 900;
}

.product-link:hover,
.name-link:hover {
  color: var(--teal);
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 6px;
  padding-right: 8px;
}

.file-toggle {
  min-height: 28px;
  border: 1px solid #cfd9df;
  border-radius: 8px;
  background: #f7faf9;
  color: var(--teal);
  font-weight: 900;
  font-size: 12px;
  white-space: nowrap;
}

.file-toggle:disabled {
  color: var(--muted);
  background: #f2f4f5;
  cursor: default;
}

.files {
  grid-column: 3 / 5;
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 7px;
  padding: 0 8px 7px 0;
}

.product-row.open .files { display: grid; }

.file-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-height: 30px;
  padding: 7px 9px;
  border: 1px solid #cfd9df;
  border-radius: 8px;
  background: #fbfcfc;
  font-size: 12px;
  font-weight: 800;
}

.file-item:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.no-files {
  color: var(--muted);
  font-size: 13px;
}

.admin-controls,
.branch-admin-controls,
.product-admin-controls {
  display: none;
  gap: 5px;
}

.admin-mode .admin-controls,
.admin-mode .branch-admin-controls,
.admin-mode .product-admin-controls {
  display: flex;
}

.admin-controls { margin-top: 8px; justify-content: center; }
.product-admin-controls { justify-content: end; }
.admin-controls .move-btn {
  min-width: 42px;
  padding: 0 8px;
}

.move-btn,
.mini-edit-btn {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.move-btn:hover,
.mini-edit-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.move-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.empty {
  padding: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  text-align: center;
}

.admin-console {
  max-width: 1180px;
  margin: 24px auto 0;
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: white;
  box-shadow: var(--shadow);
}

.console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--orange);
  font-weight: 900;
}

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

.console-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #f8fafb;
}

.console-card h3 {
  margin: 0 0 4px;
}

.console-card[data-site-form] {
  grid-column: 1 / -1;
  background: white;
}

.site-settings-layout {
  display: grid;
  grid-template-columns: 0.9fr 1fr 1.2fr;
  gap: 12px;
  align-items: start;
}

.site-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #f8fafb;
}

.site-panel h4 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.console-card label,
.login-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.login-card .button-row {
  grid-template-columns: 1fr 1fr;
}

.console-card button,
.login-card button,
.ghost-btn,
.danger-btn {
  min-height: 36px;
  border-radius: 8px;
  padding: 0 12px;
}

.danger-btn {
  border: 1px solid #f0b9b9 !important;
  color: #b42318 !important;
  background: #fff3f3 !important;
}

.ghost-btn {
  border: 1px solid var(--line-soft) !important;
  color: var(--ink) !important;
  background: white !important;
  font-weight: 900;
}

.attachment-list,
.backup-list {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
}

.backup-tip {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.field-help {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.backup-subtitle {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.analytics-card {
  grid-column: 1 / -1;
}

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

.analytics-summary div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: white;
}

.analytics-summary span,
.analytics-total {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.analytics-summary strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

.analytics-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.analytics-chart {
  min-height: 250px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: white;
  overflow-x: auto;
}

.analytics-total {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 8px;
}

.analytics-total strong {
  color: var(--ink);
}

.analytics-chart svg {
  display: block;
  min-width: 560px;
  width: 100%;
  height: auto;
  fill: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.thumb-preview {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 8px;
  border: 1px dashed var(--line-soft);
  border-radius: 8px;
  color: var(--muted);
  background: white;
  font-size: 12px;
}

.logo-preview {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 8px;
  border: 1px dashed var(--line-soft);
  border-radius: 8px;
  color: var(--muted);
  background: white;
  font-size: 12px;
}

.logo-preview img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.promo-admin-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-height: 50px;
  padding: 8px;
  border: 1px dashed var(--line-soft);
  border-radius: 8px;
  background: white;
}

.promo-admin-item {
  display: grid;
  gap: 6px;
}

.promo-admin-item img {
  width: 100%;
  height: 54px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  object-fit: cover;
}

.promo-admin-item button {
  min-height: 28px;
  font-size: 12px;
}

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

.thumb-preview img {
  width: 64px;
  height: 42px;
  object-fit: cover;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}

.attachment-admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: white;
  font-size: 12px;
}

.attachment-admin-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.attachment-admin-main strong {
  color: var(--ink);
  line-height: 1.35;
}

.attachment-usage {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.attachment-url {
  min-height: 30px !important;
  padding: 0 8px !important;
  border-radius: 6px !important;
  color: var(--muted);
  font-size: 12px !important;
  background: #f7fafb !important;
}

.attachment-admin-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.attachment-admin-actions button {
  min-height: 30px;
  padding: 0 6px;
  font-size: 12px;
}

.site-footer {
  max-width: 1180px;
  margin: 22px auto 0;
  padding: 14px 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13px;
}

.footer-info {
  display: grid;
  gap: 4px;
}

.footer-info strong {
  color: var(--ink);
  font-size: 14px;
}

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

.footer-info a {
  color: var(--muted);
  text-decoration: none;
}

.footer-info a:hover {
  color: var(--brand);
}

.footer-admin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid #d6e0e5;
  border-radius: 8px;
  background: white;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.footer-admin.active {
  color: white;
  background: var(--orange);
}

.login-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 29, 0.42);
}

.wechat-float {
  position: fixed;
  right: 16px;
  top: 50%;
  z-index: 30;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 10px;
  transform: translateY(-50%);
}

.wechat-toggle {
  display: none;
  place-items: center;
  width: 58px;
  min-height: 58px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: white;
  color: var(--teal);
  box-shadow: 0 12px 34px rgba(22, 29, 35, 0.16);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
}

.wechat-toggle:hover {
  border-color: var(--teal);
}

.wechat-popover {
  display: block;
  width: 168px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: white;
  box-shadow: 0 14px 38px rgba(22, 29, 35, 0.16);
  text-align: center;
}

.wechat-float.open .wechat-popover {
  display: block;
}

.wechat-popover img {
  width: 138px;
  height: 138px;
  object-fit: cover;
  border-radius: 8px;
}

.wechat-popover span {
  display: grid;
  place-items: center;
  width: 138px;
  height: 138px;
  margin: 0 auto;
  border: 1px dashed var(--line-soft);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.wechat-popover strong {
  display: block;
  margin-top: 8px;
  font-size: 13px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  min-width: 180px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: 999px;
  color: white;
  background: var(--teal);
  box-shadow: 0 16px 44px rgba(22, 29, 35, 0.2);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  transform: translateX(-50%);
}

.toast.error {
  background: var(--red);
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 12px;
  padding: 22px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

.login-card h2,
.login-card p {
  margin: 0;
}

.login-card p,
.login-error,
.form-message {
  color: var(--muted);
  font-size: 13px;
}

.login-error {
  min-height: 18px;
  color: var(--red);
  font-weight: 800;
}

.form-message {
  min-height: 18px;
  font-weight: 800;
  color: var(--teal);
}

@media (max-width: 1100px) {
  .category-block,
  .branch-row {
    grid-template-columns: 1fr;
  }

  .category-label-wrap,
  .branch-list {
    padding: 0;
  }

  .category-label-wrap {
    display: grid;
    justify-items: center;
  }

  .category-label {
    position: static;
    transform: none;
  }

  .category-label-wrap::after,
  .branch-list::before,
  .branch-row::before {
    display: none;
  }

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

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

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

@media (max-width: 720px) {
  .company-intro {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 16px;
    min-height: 0;
    padding: 16px;
    overflow: hidden;
  }

  .intro-copy h2 {
    font-size: 21px;
    line-height: 1.24;
  }

  .intro-copy {
    padding: 16px;
  }

  .intro-copy p {
    font-size: 15px;
    line-height: 1.58;
  }

  .intro-tags {
    gap: 5px;
    flex-wrap: nowrap;
  }

  .intro-tags span {
    min-height: 26px;
    padding: 0 7px;
    font-size: 11px;
    white-space: nowrap;
  }

  .intro-values {
    gap: 6px;
    margin-top: 18px;
    padding-top: 14px;
  }

  .intro-values p {
    grid-template-columns: 4.25em minmax(0, 1fr);
    column-gap: 6px;
    font-size: 16px;
    line-height: 1.42;
  }

  .promo-gallery {
    grid-template-columns: 1fr;
    grid-template-areas:
      "customers"
      "photos"
      "apps";
    gap: 12px;
  }

  .promo-group {
    padding: 10px;
    overflow: hidden;
    max-width: 100%;
  }

  .promo-image-grid,
  .promo-group-customers .promo-image-grid,
  .promo-group-companyPhotos .promo-image-grid,
  .promo-group-applications .promo-image-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    scroll-snap-type: none;
  }

  .promo-group-customers .promo-image-grid {
    grid-template-columns: 1fr;
  }

  .promo-image-grid img,
  .promo-group-companyPhotos .promo-image-grid img,
  .promo-group-companyPhotos .promo-image-grid img:first-child,
  .promo-group-applications .promo-image-grid img {
    width: 68%;
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    grid-row: auto;
    object-fit: contain;
    scroll-snap-align: none;
  }

  .promo-group-customers .promo-image-grid img {
    width: 100%;
    aspect-ratio: auto;
    height: auto;
  }

  .promo-group-applications .promo-image-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
  }

  .promo-group.single-image .promo-image-grid {
    display: block;
    overflow: visible;
    padding: 0;
  }

  .promo-group-customers .desktop-promo-image,
  .promo-group-customers img:not(.mobile-promo-image) {
    display: block !important;
  }

  .promo-group-customers .mobile-promo-image {
    display: none !important;
  }

  .promo-group.single-image .promo-image-grid img,
  .promo-group-customers.single-image .promo-image-grid img,
  .promo-group-companyPhotos.single-image .promo-image-grid img,
  .promo-group-applications.single-image .promo-image-grid img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
  }

  .promo-group-customers.single-image .promo-image-grid img {
    aspect-ratio: auto;
    max-height: none;
  }

  .promo-empty,
  .promo-group-companyPhotos .promo-empty {
    width: 100%;
    min-height: 64px;
  }

  .knowledge-head {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
    padding: 0;
  }

  .knowledge-head h2 {
    font-size: 20px;
  }

  .knowledge-more {
    align-self: flex-start;
  }

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

  .knowledge-card {
    align-items: start;
    min-height: 0;
    padding: 12px;
  }

  .knowledge-card strong {
    font-size: 16px;
  }

  .knowledge-section {
    padding: 14px;
  }

  .knowledge-page-nav {
    align-items: flex-start;
    flex-direction: column;
    width: calc(100% - 28px);
    padding: 12px 0;
  }

  .knowledge-page-main {
    width: calc(100% - 28px);
    padding: 22px 0 36px;
  }

  .knowledge-library-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .console-head {
    align-items: stretch;
    display: flex;
    flex-direction: column;
  }

  .top-center {
    grid-template-columns: 1fr;
    gap: 6px;
    justify-items: start;
  }

  .top-center h1 {
    text-align: left;
  }

  .top-links {
    justify-content: flex-start;
  }

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

  .analytics-range {
    grid-template-columns: 1fr;
  }

  .analytics-chart {
    min-height: 220px;
  }

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

  .product-list {
    border-left: 0;
    gap: 10px;
  }

  .product-row {
    grid-template-columns: 70px minmax(0, 1fr);
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
  }

  .product-row::before { display: none; }
  .summary, .row-actions, .files { grid-column: 1 / -1; }
  .summary { font-size: 13px; }

  .wechat-float {
    right: 8px;
    transform: translateY(-50%) scale(0.86);
    transform-origin: right center;
  }

  .wechat-toggle {
    display: grid;
  }

  .wechat-popover {
    display: none;
  }

  .wechat-float.open .wechat-popover {
    display: block;
  }

  .thumb-preview-layer.mobile {
    position: fixed;
    left: 50%;
    top: 50%;
    width: calc(100vw - 32px);
    height: min(70vh, 360px);
    transform: translate(-50%, -50%);
    z-index: 120;
  }
}
