:root {
  --ink: #20251d;
  --muted: #6f7868;
  --line: #dce8cf;
  --paper: #f5f8f1;
  --panel: #fff;
  --brand: #6fb334;
  --brand-dark: #4f8f1f;
  --brand-soft: #edf8e5;
  --green: #6fb334;
  --green-dark: #4f8f1f;
  --gold: #6fb334;
  --warn: #ef4444;
  --shadow: 0 16px 42px rgba(57, 83, 38, 0.1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

body.is-logged-out main,
body.is-logged-out .topbar,
body.is-logged-out .quick-product-navigation {
  filter: blur(2px);
  pointer-events: none;
  user-select: none;
}

.front-login-panel,
.quote-export-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(244, 250, 236, .88);
  backdrop-filter: blur(10px);
}

.quote-export-modal[hidden] {
  display: none;
}

.account-center-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(238, 247, 230, .9);
  backdrop-filter: blur(12px);
}

.account-center-modal[hidden] {
  display: none;
}

.account-center-card {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(38, 70, 20, .2);
}

.account-profile-heading {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.account-profile-heading h2,
.account-profile-heading p {
  margin: 0;
}

.account-profile-heading p {
  color: var(--muted);
  font-size: 13px;
}

.account-avatar {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: 15px;
  font-size: 21px;
  font-weight: 900;
}

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

.account-profile-grid label {
  display: grid;
  gap: 7px;
  color: #596451;
  font-size: 13px;
  font-weight: 700;
}

.account-profile-grid input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cedfc0;
  border-radius: 9px;
  font: inherit;
  font-size: 14px;
}

.account-profile-grid input:focus {
  outline: 2px solid rgba(111, 179, 52, .22);
  border-color: var(--brand);
}

.account-profile-grid input[readonly] {
  color: #697363;
  background: #f3f7ef;
}

.required-mark {
  color: #d92d20;
}

.account-field-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.account-security-section {
  margin-top: 20px;
  padding: 18px;
  background: #f7faF4;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.account-security-section h3,
.account-security-section p {
  margin: 0 0 8px;
}

.account-security-section p {
  color: var(--muted);
  font-size: 13px;
}

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

.account-center-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.account-center-button {
  min-height: 36px;
  padding: 7px 13px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid #cfe3bd;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.account-center-button:hover {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.front-login-card,
.quote-export-card {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.export-quantity-box {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--brand-soft);
}

.export-quantity-box p {
  margin: 0;
}

.export-quantity-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.export-quantity-pill {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 6px !important;
  margin: 0 !important;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
}

.front-login-card h1 {
  margin: 14px 0 6px;
  font-size: 28px;
}

.front-login-card p,
.front-login-card small {
  color: var(--muted);
}

.front-login-card label,
.quote-export-card label {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  font-size: 14px;
  color: var(--muted);
}

body.is-logged-in .front-login-panel {
  display: none;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
  padding: 0 clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, .95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: 9px;
}

.nav {
  display: flex;
  flex: 1;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
}

.nav a.is-active {
  color: var(--brand-dark);
  font-weight: 800;
}

.brand-logo {
  display: block;
  width: 156px;
  height: auto;
  object-fit: contain;
}

.brand-system-name {
  padding-left: 12px;
  border-left: 1px solid #dce8d2;
  color: #273321;
  font-size: 15px;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  white-space: nowrap;
}

.nav {
  align-self: stretch;
  align-items: stretch;
  gap: 2px;
}

.nav-home,
.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 14px;
  color: #586350;
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  font-size: 14px;
  white-space: nowrap;
}

.nav-home:hover,
.nav-dropdown:hover > .nav-dropdown-toggle,
.nav-dropdown.is-open > .nav-dropdown-toggle,
.nav-dropdown-toggle.is-active {
  color: var(--brand-dark);
  border-bottom-color: var(--brand);
  font-weight: 800;
}

.nav-dropdown {
  position: relative;
  display: flex;
  align-items: stretch;
}

.nav-dropdown-toggle > span {
  color: #829078;
  font-size: 14px;
  transition: transform .18s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle > span,
.nav-dropdown.is-open .nav-dropdown-toggle > span {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 80;
  display: grid;
  min-width: 250px;
  padding: 8px;
  background: #fff;
  border: 1px solid #dce8d2;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 16px 34px rgba(39, 65, 24, .15);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .16s ease, transform .16s ease;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown-menu a,
.nav-product-option {
  display: grid;
  width: 100%;
  padding: 10px 12px;
  color: #35422e;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus,
.nav-product-option:hover,
.nav-product-option:focus,
.nav-product-option.is-active {
  color: var(--brand-dark);
  background: var(--brand-soft);
  outline: none;
}

.nav-dropdown-menu strong,
.nav-product-option strong {
  font-size: 14px;
  line-height: 1.45;
}

.nav-dropdown-menu small,
.nav-product-option small {
  margin-top: 2px;
  color: #7a8672;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
}

.mode-badge {
  padding: 6px 12px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid #cfe8bc;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.quick-product-navigation {
  position: sticky;
  top: 64px;
  z-index: 24;
  background: rgba(255, 255, 255, .98);
  border-bottom: 1px solid #e3eadc;
  box-shadow: 0 5px 14px rgba(52, 75, 36, .035);
}

.quick-product-nav-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 2px;
  width: 100%;
  max-width: 1800px;
  min-height: 46px;
  margin: 0 auto;
  padding: 0 clamp(18px, 3vw, 50px);
}

.quick-product-category {
  position: relative;
  display: flex;
  flex: 0 1 auto;
  align-items: stretch;
}

.quick-product-category-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  height: 46px;
  padding: 0 clamp(7px, .9vw, 15px);
  color: #465043;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  white-space: nowrap;
}

.quick-product-category-trigger .quick-product-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #263126;
  font-family: Arial, sans-serif;
  font-size: 17px;
  line-height: 1;
}

.quick-product-category:hover .quick-product-category-trigger,
.quick-product-category:focus-within .quick-product-category-trigger,
.quick-product-category-trigger.is-active {
  color: var(--brand-dark);
  border-bottom-color: var(--brand);
  font-weight: 800;
}

.quick-product-category-menu {
  position: absolute;
  top: calc(100% - 1px);
  left: 50%;
  z-index: 90;
  display: grid;
  width: max-content;
  min-width: 248px;
  max-width: 340px;
  padding: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 16px 34px rgba(39, 65, 24, .16);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -7px);
  transition: opacity .15s ease, transform .15s ease;
}

.quick-product-category:first-child .quick-product-category-menu {
  left: 0;
  transform: translate(0, -7px);
}

.quick-product-category:last-child .quick-product-category-menu {
  right: 0;
  left: auto;
  transform: translate(0, -7px);
}

.quick-product-category:hover .quick-product-category-menu,
.quick-product-category:focus-within .quick-product-category-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.quick-product-category:first-child:hover .quick-product-category-menu,
.quick-product-category:first-child:focus-within .quick-product-category-menu,
.quick-product-category:last-child:hover .quick-product-category-menu,
.quick-product-category:last-child:focus-within .quick-product-category-menu {
  transform: translate(0, 0);
}

.quick-product-option {
  display: grid;
  width: 100%;
  gap: 2px;
  padding: 9px 11px;
  color: #35422e;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.quick-product-option:hover,
.quick-product-option:focus,
.quick-product-option.is-active {
  color: var(--brand-dark);
  background: var(--brand-soft);
  outline: none;
}

.quick-product-option strong {
  font-size: 13px;
}

.quick-product-option small,
.quick-product-empty {
  color: #7a8672;
  font-size: 12px;
  font-weight: 400;
}

.quick-product-empty {
  margin: 0;
  padding: 10px 12px;
}

main { padding: 16px 18px 48px; }

body:has(.admin-main) main,
.admin-main {
  padding-left: 6px;
  padding-right: 6px;
}

body:has(.admin-main) .topbar {
  padding-left: 12px;
  padding-right: 12px;
}

.product-tabs {
  display: none;
  gap: 14px;
  max-width: 1520px;
  margin: 0 auto 16px;
  padding: 16px 24px;
  overflow-x: auto;
  background: #fff;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 8px 24px rgba(57, 83, 38, .05);
}

.dynamic-product-tabs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.dynamic-template-form {
  display: grid;
  gap: 16px;
}

.dynamic-product-panel {
  min-height: 520px;
}

.product-tabs button {
  min-width: 112px;
  padding: 9px 18px;
  color: #506047;
  background: #f7faf4;
  border: 1px solid transparent;
  border-radius: 8px;
}

.product-tabs .is-active {
  color: var(--brand-dark);
  background: #fff;
  border-color: #cfe8bc;
  font-weight: 800;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  max-width: 1520px;
  margin: 0 auto 20px;
  padding: 24px 26px;
  background:
    radial-gradient(circle at 92% 14%, rgba(111, 179, 52, .18), transparent 28%),
    linear-gradient(180deg, #effadc 0%, #fffaf2 100%);
  border: 1px solid #e4edcf;
  border-radius: 16px;
}

.breadcrumb {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.18;
}

.subtitle {
  max-width: 860px;
  margin-bottom: 12px;
  color: var(--muted);
}

.manager-line { margin: 0; }
.manager-line strong { color: #e11d48; margin-left: 8px; }

.hero-price, .price-box {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border-radius: 14px;
  box-shadow: 0 16px 30px rgba(79, 143, 31, .2);
}

.hero-price strong, .price-box strong {
  font-size: 34px;
  line-height: 1;
}

.hero-price small, .price-box small { opacity: .9; }

.layout {
  display: grid;
  grid-template-columns: 110px minmax(680px, 1fr) 360px;
  gap: 18px;
  align-items: start;
  max-width: 1520px;
  margin: 0 auto 20px;
}

.main-stack {
  display: grid;
  gap: 18px;
}

.side-nav {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.side-nav a {
  display: grid;
  min-height: 42px;
  place-items: center;
  color: #5d6757;
  background: #f4f7f0;
  border-radius: 8px;
  font-size: 14px;
}

.side-nav .is-active {
  color: #fff;
  background: #2f3a2b;
  font-weight: 800;
}

.config-panel, .assistant-panel, .result-panel, .records {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(57, 83, 38, .06);
}

.config-panel { padding: 22px 26px; }

.product-detail-panel {
  margin-top: 10px;
}

.product-detail-text {
  color: var(--muted);
  font-size: 14px;
}

.product-detail-text h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 20px;
}

.product-detail-text p {
  margin: 6px 0 0;
}

.product-detail-images {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.product-detail-images img {
  display: block;
  width: 100%;
  max-width: 860px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(57, 83, 38, 0.08);
  cursor: zoom-in;
}

.product-content-editor textarea,
.product-content-editor input,
.product-content-editor select {
  width: 100%;
}

.upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.upload-button {
  cursor: pointer;
}

.content-preview {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--brand-soft);
}

.content-preview h3 {
  margin: 0 0 8px;
}

.content-preview-images {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.content-preview-images img {
  max-width: 260px;
  max-height: 360px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.content-image-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dce9d0;
  border-radius: 14px;
  background: #fbfdf9;
}

.content-image-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.content-image-editor-heading > div {
  display: grid;
  gap: 3px;
}

.content-image-editor-heading strong {
  color: #273323;
  font-size: 15px;
}

.content-image-editor-heading small,
.content-image-info small {
  color: var(--muted);
  font-size: 12px;
}

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

.content-image-empty {
  padding: 18px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: center;
}

.content-image-card {
  display: grid;
  grid-template-columns: 112px minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid #dce9d0;
  border-radius: 10px;
  background: #fff;
}

.content-image-card img {
  width: 112px;
  height: 78px;
  border: 1px solid #e1ead9;
  border-radius: 8px;
  background: #f7faf4;
  object-fit: contain;
}

.content-image-info {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.content-image-info strong {
  overflow: hidden;
  color: #2f3a2b;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.content-image-advanced {
  color: var(--muted);
  font-size: 12px;
}

.content-image-advanced summary {
  width: fit-content;
  cursor: pointer;
}

.content-image-advanced textarea {
  min-height: 74px;
  margin-top: 8px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}

@media (max-width: 860px) {
  .content-image-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .content-image-card img {
    width: 92px;
    height: 68px;
  }

  .content-image-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

.delivery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.leaflet-form .option-row { flex-wrap: wrap; gap: 12px; }
.leaflet-form input[type="number"] { width: 110px; }
.leaflet-form .leaf-crafts { display: flex; flex-wrap: wrap; gap: 12px 18px; flex: 1; }
.leaflet-form .option-row label { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; white-space: nowrap; }
.leaflet-form .option-row input[type="checkbox"] { width: 14px; height: 14px; min-height: 0; margin: 0; flex: 0 0 14px; }
.leaflet-form .leaf-craft-item, .leaflet-form .leaf-inline-options { display: inline-flex; align-items: center; gap: 6px; }
.leaflet-form .leaf-craft-item select { width: 76px; min-width: 76px; }
.leaflet-form .option-row input[type="radio"] { width: 14px; height: 14px; min-height: 0; margin: 0; flex: 0 0 14px; }
.leaflet-form .leaf-disabled { color: #a0a9b2; cursor: not-allowed; }
.leaflet-form .leaf-premium-options select { width: auto; min-width: 100px; max-width: 220px; }
.leaflet-form input { accent-color: var(--brand); }
.leaflet-form .leaf-fold-options select, .leaflet-form .leaf-crease-options select { width: auto; min-width: 90px; max-width: 220px; }
.leaflet-form .leaf-extra-options select { width: auto; min-width: 95px; max-width: 230px; }
.leaflet-form .leaf-extra-options { flex-wrap: wrap; }
.leaflet-form .leaf-help-button { display: inline-flex; align-items: center; justify-content: center; width: 13px; height: 13px; min-width: 13px; min-height: 13px; padding: 0; flex: 0 0 13px; border: 1px solid #98a6b2; border-radius: 50%; color: #8293a1; background: white; font-size: 10px; font-weight: normal; line-height: 1; cursor: help; }
.leaflet-form .leaf-help-button[aria-pressed="true"] { color: white; background: var(--brand); border-color: var(--brand); }
.leaflet-form .leaf-craft-item:has(.leaf-area-options) > .leaf-help-button { margin-top: 12.5px; }
.leaf-help-unpin { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--brand); background: white; }
.leaf-help-unpin[hidden] { display: none; }
.leaf-help-dialog { width: min(440px,90vw); max-height: 85vh; overflow: auto; padding: 20px; border: 1px solid var(--line); border-radius: 12px; }
.leaf-help-dialog::backdrop { background: rgb(0 0 0 / .35); }
.leaf-help-dialog img { display: block; width: 100%; max-height: 280px; object-fit: contain; }
.leaf-help-dialog p, #sizeIntro { white-space: pre-line; }
.leaf-help-dialog [data-help-close] { display: block; margin-left: auto; padding: 6px 12px; background: var(--brand); color: white; border: 0; border-radius: 6px; }
.leaflet-form .leaf-craft-item:has(.leaf-area-options) { align-items: flex-start; max-width: 100%; }
.leaflet-form .leaf-craft-item:has(.leaf-area-options) > label { min-height: 38px; }
.leaflet-form .leaf-area-options { display: inline-flex; flex-direction: column; gap: 6px; min-width: 0; }
.leaflet-form .leaf-area-options .album-process-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: auto; margin: 0; padding: 0; }
.leaflet-form .leaf-area-options .album-process-row input { width: 104px; min-width: 0; min-height: 38px; }
.leaflet-form .leaf-area-options .album-process-row select { min-height: 38px; width: 104px; }
.leaflet-form .leaf-area-options .album-process-row .icon-button { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 16px; width: 16px; height: 16px; min-width: 16px; min-height: 16px; padding: 0; margin: 0; border-radius: 50%; font-size: 12px; line-height: 1; }
.leaflet-form select option:disabled { color: #a0a9b2; }
.leaflet-form select option:checked { background: var(--brand); color: white; }
.leaflet-form select option:disabled:checked { background: white; color: #a0a9b2; }
.leaflet-form select option:disabled::checkmark { visibility: hidden; }
@supports (appearance: base-select) {
  .leaflet-form select, .leaflet-form select::picker(select) { appearance: base-select; }
  .leaflet-form select { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; line-height: 1.4; }
  .leaflet-form select::picker(select) { border: 1px solid var(--line); border-radius: 8px; max-height: 300px; overflow: auto; background: white; }
  .leaflet-form select option { padding: 6px 10px; }
  .leaflet-form select option:enabled:hover, .leaflet-form select option:enabled:focus { background: var(--brand); color: white; }
}
.leaflet-form [hidden] { display: none !important; }

.delivery-grid label:has(#freightCny),
.delivery-grid label:has(#freightUsd) {
  display: none;
}

.delivery-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.delivery-grid select,
.delivery-grid input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
}

.delivery-summary {
  margin-top: 12px;
  padding: 10px 12px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px dashed var(--line);
  border-radius: 10px;
  font-weight: 700;
}
.assistant-panel {
  position: sticky;
  top: 84px;
  padding: 0 0 16px;
  overflow: hidden;
}

.assistant-panel > h2 {
  margin: 0;
  padding: 14px;
  text-align: center;
  font-size: 20px;
  background: #fbf8cf;
}

.assistant-card {
  padding: 16px;
  border-bottom: 1px dashed var(--line);
}

.assistant-title {
  position: relative;
  margin-bottom: 12px;
  padding-left: 12px;
  font-weight: 800;
}

.assistant-title::before,
.form-section h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: .35em;
  width: 4px;
  height: 1.15em;
  background: var(--gold);
  border-radius: 999px;
}

.product-carousel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 8px;
  min-height: 230px;
  margin-bottom: 12px;
  overflow: visible;
  background: transparent;
  cursor: zoom-in;
}

.product-carousel:not(.has-thumbs) {
  grid-template-columns: minmax(0, 1fr);
}

.product-carousel-main {
  position: absolute;
  inset: auto;
  position: relative;
  min-height: 230px;
  overflow: hidden;
  background: linear-gradient(145deg, #efe1c4, #faf7ed);
  border-radius: 10px;
}

.product-carousel-track {
  position: absolute;
  inset: 0;
}

.product-carousel-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity .35s ease, transform .5s ease;
}

.product-carousel-image.is-active {
  opacity: 1;
  transform: scale(1);
}

.carousel-button {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: #fff;
  background: rgba(32, 37, 29, .42);
  border: 0;
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.carousel-button:hover {
  background: rgba(79, 143, 31, .82);
}

.carousel-button.prev { left: 10px; }
.carousel-button.next { right: 10px; }

.carousel-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.carousel-dots button {
  width: 8px;
  height: 8px;
  min-height: 0;
  padding: 0;
  background: rgba(255,255,255,.68);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.carousel-dots button.is-active {
  width: 20px;
  background: var(--brand);
}

.carousel-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 230px;
  overflow-y: auto;
  padding-right: 2px;
}

.carousel-thumbs[hidden] {
  display: none;
}

.carousel-thumb {
  width: 48px;
  height: 48px;
  min-height: 0;
  padding: 3px;
  overflow: hidden;
  background: #f5f8f0;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.carousel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}

.carousel-thumb.is-active {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px rgba(38, 54, 35, .18);
}

.carousel-thumb:hover {
  border-color: var(--brand);
}

.accessory-preview {
  position: absolute;
  right: 12px;
  display: none;
  padding: 6px 10px;
  color: #fff;
  background: rgba(79, 143, 31, .92);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(0,0,0,.16);
}

.accessory-preview.elastic { top: 14px; }
.accessory-preview.pen-loop { top: 52px; }
.accessory-preview.is-active { display: inline-flex; }

.assistant-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.option-intro-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  margin: 8px 0 12px;
  object-fit: contain;
  aspect-ratio: auto;
  background: #f4f8ef;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: zoom-in;
  transition: transform .18s ease, box-shadow .18s ease;
}

.option-intro-image:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(57, 83, 38, .18);
}

.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 42px;
  background: rgba(16, 22, 12, .78);
  backdrop-filter: blur(8px);
}

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

.image-preview-modal img {
  max-width: min(1120px, 94vw);
  max-height: 88vh;
  object-fit: contain;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .38);
}

.image-preview-close {
  position: fixed;
  top: 22px;
  right: 26px;
  z-index: 221;
  width: 42px;
  height: 42px;
  padding: 0;
  color: #fff;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 999px;
  font-size: 32px;
  line-height: 1;
}

.image-preview-close:hover {
  background: rgba(111, 179, 52, .9);
}

body.image-preview-open {
  overflow: hidden;
}

.template-process-rule {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdf7;
}

.template-process-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.template-process-select,
.template-process-actions,
.engine-process-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-process-select span {
  color: var(--muted);
  font-size: 12px;
}

.template-process-rule.not-selected {
  opacity: .72;
  background: #f7f8f5;
}

.template-process-rule.not-selected .template-process-options {
  display: none;
}

.template-process-picker {
  display: flex;
  align-items: end;
  gap: 10px;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #f7fbed;
}

.template-process-picker[hidden] {
  display: none;
}

.template-process-picker label {
  display: grid;
  flex: 1;
  gap: 6px;
  color: var(--muted);
}

.template-process-picker select {
  width: 100%;
  min-height: 40px;
}

.template-process-empty {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
  background: #fbfdf7;
}

.template-process-main span {
  color: var(--muted);
  font-size: 12px;
}

.template-process-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding-left: 24px;
  color: var(--muted);
  font-size: 13px;
}

.template-process-options select {
  min-width: 86px;
  padding: 6px 8px;
}

.result-panel {
  margin: 16px;
  padding: 18px;
  box-shadow: none;
}

.panel-title, .sub-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-title h2, .sub-panel-title h3 { margin: 0; }
.panel-title span { color: var(--brand-dark); font-size: 13px; font-weight: 800; }

.form-section, .sub-panel {
  margin: 0 0 18px;
  padding: 20px 16px 14px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: #fff;
}

.form-section {
  border-color: #edf2e7;
}

.form-section h3 {
  position: relative;
  margin: 0 0 16px;
  padding-left: 14px;
  font-size: 18px;
}

.sub-panel {
  border-color: var(--line);
}

.option-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.row-label {
  flex: 0 0 120px;
  display: inline-grid;
  min-height: 32px;
  place-items: center;
  color: #3f4939;
  background: #f1f4ee;
  border-radius: 6px;
  font-size: 14px;
}

.priced-input {
  display: grid;
  gap: 6px;
  min-width: 170px;
  color: #52604b;
  font-size: 12px;
}

.priced-input input,
.priced-input select {
  width: 100%;
}

.formula-note {
  color: #5f6d58;
  font-size: 12px;
  line-height: 1.6;
}

label {
  color: var(--muted);
  font-size: 14px;
}

input, select {
  min-height: 40px;
  padding: 0 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d7e1ce;
  border-radius: 7px;
  outline: none;
  font-size: 14px;
}

input:focus, select:focus {
  border-color: rgba(111, 179, 52, .75);
  box-shadow: 0 0 0 3px rgba(111, 179, 52, .13);
}

input:disabled, select:disabled {
  color: #9aa194;
  background: #f3f6f0;
}

.radio-pill, .check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
}

.radio-pill input, .check-row input {
  width: auto;
  min-height: auto;
  accent-color: var(--brand);
}

.radio-pill:has(input:disabled), .check-row:has(input:disabled) {
  color: #9aa194;
  cursor: not-allowed;
}

.radio-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.radio-group input:disabled + span {
  color: #9aa194;
}

.spot-input[hidden] {
  display: none;
}

.quantity-bar {
  display: grid;
  grid-template-columns: 120px repeat(5, minmax(78px, 1fr)) minmax(170px, 1.2fr) 92px;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  padding: 10px;
  background: #fbfdf8;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.quantity-choice, .quote-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

.quantity-choice.is-active {
  color: #fff;
  background: var(--brand);
  box-shadow: inset 0 0 0 2px var(--brand);
}

.custom-quantity {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 42px;
  padding: 0 10px;
  background: #fff;
  border-radius: 8px;
  white-space: nowrap;
}

.custom-quantity input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 0;
  padding: 0;
  font-weight: 800;
}

.quote-button {
  color: #fff;
  background: var(--brand);
}

.quote-output {
  margin: 8px 0 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.quote-output-row {
  display: grid;
  grid-template-columns: 90px minmax(125px, .9fr) minmax(135px, 1fr) minmax(105px, .72fr) minmax(145px, .95fr) minmax(145px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #f3faed;
  text-align: left;
  cursor: pointer;
}

.quote-output-head {
  color: #526049;
  background: #edf6e7;
  font-size: 12px;
  font-weight: 800;
  cursor: default;
}

.quote-price-cell,
.quote-weight-cell,
.quote-freight-disabled,
.quote-grand-total-cell,
.quote-freight-input {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.quote-output-row .quote-price-cell strong,
.quote-output-row .quote-weight-cell strong,
.quote-output-row .quote-freight-disabled strong,
.quote-output-row .quote-grand-total-cell strong {
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.quote-output-row small {
  color: #6d7767;
  font-size: 11px;
  line-height: 1.35;
}

.quote-freight-input input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-size: 13px;
}

.quote-freight-input.is-disabled input {
  color: #7a8474;
  background: #eef2eb;
  border-style: dashed;
  cursor: not-allowed;
}

.quote-grand-total-cell strong { color: var(--brand-dark); }

.quote-output-row.is-main {
  color: var(--brand-dark);
  font-size: 16px;
  background: #eef8e7;
}

.quote-selected-detail {
  border-top: 1px solid var(--line);
  background: #fbfdf8;
}

.quote-selected-detail h4 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 15px;
}

.quote-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.quote-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.quote-selected-summary {
  margin: 0 12px 12px;
  padding: 9px 11px;
  color: #3c4b34;
  background: #f7fbf2;
  border: 1px dashed var(--line);
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.65;
  word-break: break-word;
}

.quote-structured-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 0 12px 12px;
  padding: 12px;
  color: #334128;
  background: #f7fbf2;
  border: 1px dashed var(--line);
  border-radius: 9px;
}

.quote-structured-summary h5 {
  grid-column: 1 / -1;
  margin: 0 0 4px;
  color: var(--brand-dark);
  font-size: 16px;
}

.quote-structured-summary div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 4px;
  align-items: start;
  line-height: 1.55;
}

.quote-structured-summary span {
  color: var(--muted);
  white-space: nowrap;
}

.quote-structured-summary strong {
  color: var(--ink);
  font-weight: 700;
  word-break: break-word;
}

.quote-output-row strong {
  font-size: 15px;
  color: var(--brand-dark);
}

.quote-row-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
}

.quote-row-select input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
}

@media (max-width: 1120px) {
  .quote-output-head { display: none; }

  .quote-output-row:not(.quote-output-head) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-output-row:not(.quote-output-head) .quote-row-select {
    grid-column: 1 / -1;
  }
}

.quote-output-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

body.hide-cost-details .quote-output-grid,
body.hide-cost-details .quote-line-breakdown,
body:not(.can-view-cost-details) .quote-output-grid,
body:not(.can-view-cost-details) .quote-line-breakdown {
  display: none !important;
}

.quote-output-grid span {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fff;
  color: var(--muted);
}

.quote-output-grid strong {
  color: var(--ink);
}

.quote-line-breakdown {
  padding: 12px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.quote-line-breakdown h5 {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-size: 15px;
}

.quote-line-breakdown-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
}

.quote-line-breakdown-head h5 { margin: 0; }

.quote-line-breakdown-head > span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.quote-line-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 11px 0;
  border-top: 1px dashed var(--line);
}

.quote-line-item span {
  display: grid;
  gap: 4px;
  color: var(--ink);
  font-weight: 700;
}

.quote-line-item small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
}

.quote-line-item strong {
  white-space: nowrap;
  color: var(--ink);
}

.quote-output-table {
  display: grid;
  gap: 0;
}

.quote-description,
.record-description {
  margin: 0 0 10px;
  padding: 10px 12px;
  color: #3c4b34;
  background: #f7fbf2;
  border: 1px dashed var(--line);
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.7;
  word-break: break-word;
}

.spot-color-list {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.spot-color-list[hidden] { display: none; }

.spot-color-row {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.spot-color-row input {
  width: 132px;
  min-height: 34px;
}

.inner-section-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #fbfdf8;
  border: 1px dashed #cfe0c2;
  border-radius: 10px;
}

.album-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.album-section-heading h3 {
  margin-bottom: 0;
}

.album-inner-sections {
  display: grid;
  gap: 14px;
}

.album-inner-card .option-row:last-child {
  margin-bottom: 0;
}

.size-row {
  align-items: center;
  padding: 4px 0;
}

.size-select { width: 280px; }
.orientation-badge {
  display: inline-grid;
  min-height: 40px;
  place-items: center;
  padding: 0 12px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid #cfe8bc;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.dimension-input { width: 145px; }

.process-input-row {
  align-items: center;
}

.dynamic-template-form select,
.dynamic-template-form input,
.dynamic-template-form .radio-pill,
.dynamic-template-form .check-row {
  font-size: 14px;
}

.process-input-row select {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.conditional-fields {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.conditional-fields[hidden] {
  display: none;
}

.album-repeat-fields { align-items: center; }

.album-repeat-list {
  display: grid;
  gap: 6px;
}

.album-process-row {
  display: grid;
  grid-template-columns: 82px minmax(98px, 130px) minmax(110px, 1fr) minmax(110px, 1fr) 22px 22px;
  align-items: center;
  gap: 6px;
  width: min(100%, 640px);
}

.album-process-row:not(:has(select)) {
  grid-template-columns: 82px minmax(110px, 1fr) minmax(110px, 1fr) 22px 22px;
}

.album-process-label {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.album-process-row select,
.album-process-row .dimension-input {
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
}

.album-process-row .icon-button {
  width: 21px;
  height: 21px;
  min-height: 21px;
  align-self: center;
  justify-self: center;
}

.option-row.is-disabled-soft {
  opacity: .72;
}

.option-row.is-disabled-soft::after {
  content: "精品纸不选择覆膜";
  color: var(--muted);
  font-size: 13px;
}

.album-spot-inputs {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.album-spot-inputs[hidden] {
  display: none;
}

.spot-code-input {
  width: 138px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.multiply { color: var(--muted); font-weight: 800; }

.custom-toggle {
  margin-left: 4px;
}

.custom-size-fields {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: #fbfdf8;
  border: 1px dashed #cfe0c2;
  border-radius: 9px;
}

.custom-size-fields[hidden] {
  display: none;
}

.size-row.is-custom .dimension-input {
  border-color: #f87171;
}

.process-row { align-items: flex-start; }

.inline-process-panel {
  flex: 1 1 620px;
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.inline-process-panel > label:has(#foilEnabled:checked),
.inline-process-panel > label:has(#embossEnabled:checked) {
  display: none;
}

.inline-process-list {
  display: grid;
  flex: 1 1 100%;
  gap: 8px;
}

.inline-process-list[hidden] {
  display: none;
}

.inline-process-card {
  display: grid;
  width: min(100%, 640px);
  grid-template-columns: 64px 100px minmax(120px, 1fr) minmax(120px, 1fr) 22px 22px;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
}

.inline-process-card[data-type="emboss"] {
  width: min(100%, 440px);
  grid-template-columns: 64px minmax(120px, 1fr) minmax(120px, 1fr) 22px 22px;
}

.inline-process-card .process-row-check {
  min-width: 64px;
  min-height: 34px;
  gap: 5px;
  font-size: 14px;
  white-space: nowrap;
}

.inline-process-card .process-row-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-width: 15px;
  min-height: 15px;
  margin: 0;
  border: 1px solid var(--line);
}

.inline-process-card input:not([type="checkbox"]),
.inline-process-card select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.inline-process-card .icon-button {
  width: 21px;
  height: 21px;
  min-height: 21px;
  font-size: 15px;
  align-self: center;
  justify-self: center;
}

.cover-process-grid {
  flex: 1 1 620px;
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}

.process-group {
  padding: 8px 10px;
  background: #fbfdf8;
  border: 1px dashed #cfe0c2;
  border-radius: 10px;
}

.process-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  margin-bottom: 6px;
  color: #3f4939;
  font-weight: 800;
}

.compact-process-list {
  display: grid;
  gap: 6px;
}

.icon-button {
  display: inline-grid;
  width: 22px;
  height: 22px;
  min-height: 22px;
  place-items: center;
  padding: 0;
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.icon-button.add { background: var(--brand); }
.icon-button.remove { background: #ef4444; }

.ghost-button, .primary-button, .small-button, .link-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #cfe0c2;
  border-radius: 8px;
  background: #fff;
}

.primary-button {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  font-weight: 800;
}

.ghost-button, .small-button, .link-button { color: var(--brand-dark); }
.small-button { min-height: 34px; }
.link-button { min-height: auto; padding: 0; border: 0; background: transparent; }
.link-button:disabled { color: #bbb; cursor: not-allowed; }

.repeat-list { display: grid; gap: 12px; }

.repeat-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  background: #fbfdf8;
  border: 1px dashed #cfe0c2;
  border-radius: 10px;
}

.process-card {
  display: grid;
  grid-template-columns: 54px 96px 1fr 1fr 24px;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.process-card input,
.process-card select {
  width: 100%;
  min-height: 32px;
  padding: 0 8px;
}

.process-card .process-color { width: 100%; }
.process-name {
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  color: #3f4939;
  font-size: 13px;
}
.process-placeholder {
  display: inline-grid;
  min-height: 32px;
  place-items: center;
  padding: 0 8px;
  color: var(--muted);
  background: #f3f6f0;
  border: 1px solid #d7e1ce;
  border-radius: 7px;
  font-size: 12px;
}

.process-card.inline-process-card {
  grid-template-columns: 58px 92px minmax(112px, 1fr) minmax(112px, 1fr) 22px 22px;
  width: min(100%, 620px);
  gap: 6px;
  padding: 0;
}

.process-card.inline-process-card[data-type="emboss"] {
  grid-template-columns: 58px minmax(112px, 1fr) minmax(112px, 1fr) 22px 22px;
  width: min(100%, 440px);
}

.process-card.inline-process-card .process-row-check {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 58px;
  min-height: 34px;
  gap: 5px;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.process-card.inline-process-card .process-row-check input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  padding: 0;
  margin: 0;
  flex: 0 0 14px;
}

.process-card.inline-process-card input:not([type="checkbox"]),
.process-card.inline-process-card select {
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
}

.process-card.inline-process-card .icon-button {
  width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  align-self: center;
  justify-self: center;
  font-size: 14px;
}

.repeat-card-title {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.repeat-card label {
  display: grid;
  gap: 6px;
}

.repeat-card input,
.repeat-card select {
  width: 100%;
}

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

.summary-grid div {
  padding: 12px;
  background: #f8fbf5;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.summary-grid span, .breakdown-item span small, .muted {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.summary-grid strong {
  display: block;
  margin-top: 4px;
}

.breakdown-list {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.breakdown-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.breakdown-item strong { text-align: right; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.records {
  max-width: 1520px;
  margin: 0 auto;
  padding: 20px;
}

.records.is-standalone {
  margin-top: 0;
}

.record-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin: 12px 0 16px;
  padding: 12px;
  background: #f8fbf5;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.record-filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
}

.record-filters input {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

body.front-records-view .product-tabs,
body.front-records-view .hero,
body.front-records-view #quote {
  display: none;
}

body:not(.front-records-view) .records#records {
  display: none;
}

.record-list {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.record-table {
  overflow: hidden !important;
  max-width: 100%;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.record-table-head,
.record-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .95fr) minmax(0, .65fr) minmax(0, .7fr) minmax(0, .82fr) minmax(0, 1.08fr) minmax(0, .42fr) minmax(0, .92fr) minmax(0, 1.12fr);
  min-width: 0;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.record-table-head {
  color: #162319;
  background: #edf5e9;
  font-weight: 800;
}

.record-table-head > span,
.record-table-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.record-table-row:nth-child(4n + 3) {
  background: #fbfdf8;
}

.record-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  align-items: center;
  min-width: 0;
  width: 100%;
}

.record-actions .small-inline {
  width: 100%;
  min-width: 0;
  padding-inline: 4px;
  font-size: 12px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.record-detail-row {
  min-width: 0;
  width: 100%;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #f7fbf2;
}

.record-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #fbfdf8;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.record-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.admin-record-detail-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbf5;
}

.admin-record-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.admin-record-summary-grid span {
  padding: 10px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-record-summary-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
}

.admin-cost-breakdown {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 2px solid #78b943;
}

.admin-cost-breakdown-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-cost-breakdown-title h4 { margin: 0; }

.admin-cost-breakdown-title span {
  color: #8a5a18;
  font-size: 12px;
}

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

.admin-cost-summary > div {
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-cost-summary span,
.admin-cost-summary strong { display: block; }

.admin-cost-summary span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

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

.admin-cost-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 13px;
}

.admin-cost-table th,
.admin-cost-table td {
  padding: 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-cost-table th { background: #edf6e6; }

.admin-cost-table th:nth-child(1) { width: 18%; }
.admin-cost-table th:nth-child(2) { width: 18%; }

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

.quote-print-body {
  margin: 0;
  padding: 32px;
  color: #172016;
  background: #fff;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

.quote-print-actions {
  max-width: 1120px;
  margin: 0 auto 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #52604b;
  background: #f3f8ed;
  border: 1px solid #dce8cf;
  border-radius: 10px;
}

.quote-print-actions button {
  padding: 10px 18px;
  color: #fff;
  background: #63ad2b;
  border: 0;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

@media print {
  .quote-print-body { padding: 0; }
  .quote-print-actions { display: none !important; }
  .quote-print-sheet { max-width: none; }
  .quote-company-intro { margin-top: 0; }
}

.quote-print-sheet {
  max-width: 1120px;
  margin: 0 auto;
}

.quote-company-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quote-company-logo {
  display: grid;
  width: 78px;
  flex: 0 0 78px;
  justify-items: center;
  color: #4c9220;
}

.quote-company-logo > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 2px solid #69aa31;
  border-radius: 15px;
  font-size: 25px;
  font-weight: 900;
}

.quote-company-logo > small {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.quote-company-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  background: #5daa28;
  border-radius: 10px;
  font-size: 22px;
  font-weight: 900;
}

.quote-company-contact {
  display: block;
  margin-top: 4px;
  color: #6b7565;
  font-size: 11px;
  font-weight: 400;
}

.quote-service-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 16px 0 10px;
  padding-top: 14px;
  border-top: 4px solid #63ad2b;
}

.quote-service-badges span {
  padding: 5px 11px;
  color: #315e1a;
  background: #edf8dd;
  border-radius: 999px;
  font-size: 11px;
  white-space: nowrap;
}

.quote-print-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 3px solid #6fb334;
}

.quote-print-header h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.quote-print-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 24px;
  margin: 10px 0 18px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.quote-print-meta > div {
  min-height: 50px;
  padding: 10px;
  border: 1px solid #d6dfd0;
  border-radius: 5px;
}

.quote-meta-lines {
  display: grid;
  gap: 3px;
  margin-top: 4px;
  line-height: 1.35;
}

.quote-meta-lines span {
  overflow-wrap: anywhere;
}

.quote-print-price {
  margin: 18px 0;
  padding: 18px;
  color: #fff;
  background: #4f8f1f;
  border-radius: 14px;
}

.quote-print-price strong {
  display: block;
  margin-top: 6px;
  font-size: 30px;
}

.quote-print-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 13px;
}

.quote-print-table th,
.quote-print-table td {
  padding: 10px;
  border: 1px solid #ccdabc;
  text-align: left;
  vertical-align: top;
}

.quote-price-table {
  margin: 10px 0 22px;
  border: 1px solid #dce8cf;
}

.quote-price-table th {
  background: #edf8e5;
}

.quote-price-table td:nth-child(2),
.quote-price-table td:nth-child(3) {
  font-weight: 800;
  color: #4f8f1f;
}

.quote-product-table {
  margin: 18px 0;
  border: 1px solid #ccdabc;
}

.quote-product-table thead th {
  color: #29451d;
  background: #edf8e5;
}

.quote-product-table tbody tr {
  break-inside: avoid;
  page-break-inside: avoid;
}

.quote-product-image-cell { width: 126px; }

.quote-product-image {
  display: block;
  width: 112px;
  height: 112px;
  object-fit: cover;
  border: 1px solid #dce8cf;
  border-radius: 8px;
}

.quote-product-spec-cell { width: 44%; }

.quote-price-shipping-table {
  table-layout: fixed;
  font-size: 11px;
}

.quote-price-shipping-table th,
.quote-price-shipping-table td {
  padding: 8px 6px;
  overflow-wrap: anywhere;
}

.quote-price-shipping-table th:nth-child(1) { width: 12%; }
.quote-price-shipping-table th:nth-child(2) { width: 31%; }
.quote-price-shipping-table th:nth-child(3) { width: 6%; }
.quote-price-shipping-table th:nth-child(4) { width: 9%; }
.quote-price-shipping-table th:nth-child(5) { width: 10%; }
.quote-price-shipping-table th:nth-child(6) { width: 11%; }
.quote-price-shipping-table th:nth-child(7) { width: 9%; }
.quote-price-shipping-table th:nth-child(8) { width: 12%; }

.quote-price-shipping-table td:nth-child(n + 3) {
  white-space: nowrap;
}

.quote-price-shipping-table .quote-product-image-cell { width: auto; }

.quote-price-shipping-table .quote-product-image {
  width: 100%;
  max-width: 106px;
  height: 118px;
  object-fit: contain;
  box-sizing: border-box;
}

.quote-price-shipping-table .quote-product-spec-cell { width: auto; }

.quote-price-shipping-table td > small {
  display: block;
  margin-top: 3px;
  color: #6b7565;
  font-size: 10px;
}

.quote-product-name {
  display: block;
  margin-bottom: 8px;
  color: #3f7f1d;
  font-size: 16px;
}

.quote-spec-list { margin: 0; }

.quote-spec-list > div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px;
  margin: 5px 0;
}

.quote-spec-list dt { color: #6b7565; }

.quote-spec-list dd {
  margin: 0;
  font-weight: 700;
}

.quote-logistics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0;
  border-top: 1px solid #ccdabc;
  border-left: 1px solid #ccdabc;
}

.quote-logistics-grid > div {
  min-height: 58px;
  padding: 12px;
  border-right: 1px solid #ccdabc;
  border-bottom: 1px solid #ccdabc;
}

.quote-logistics-grid span,
.quote-logistics-grid strong { display: block; }

.quote-logistics-grid span {
  margin-bottom: 6px;
  color: #6b7565;
  font-size: 12px;
}

.quote-logistics-grid .quote-grand-total {
  grid-column: span 3;
  color: #fff;
  background: #4f8f1f;
  font-size: 18px;
}

.quote-logistics-grid .quote-grand-total span { color: #eaf5e2; }

.quote-logistics-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 8px;
}

.quote-transport-section {
  margin-top: 16px;
  break-inside: avoid;
  page-break-inside: avoid;
}

.quote-transport-section h2 {
  margin: 0;
  color: #3f7f1d;
  font-size: 16px;
}

.quote-company-intro {
  margin-top: 36px;
  padding-top: 10px;
  break-before: page;
  page-break-before: always;
}

.quote-company-intro h2 {
  margin: 0 0 6px;
  color: #3f7f1d;
  font-size: 24px;
}

.quote-company-intro > p {
  margin: 0 0 18px;
  color: #66715f;
}

.quote-company-intro img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 18px;
  border-radius: 8px;
}

.quote-content-module {
  display: flex;
  min-height: 0;
  flex-direction: column;
  break-inside: avoid;
  page-break-inside: avoid;
}

/* Fixed promotional appendix: independent of the preceding quotation length. */
.quote-unified-page { position:relative; width:1040px; height:717px; margin:12px auto; background:white; break-inside:avoid; page-break-inside:avoid; }
.quote-unified-page ~ .quote-unified-page { break-before:page; page-break-before:always; }
.quote-unified-grid { width:1040px; table-layout:fixed; border-collapse:collapse; font-family:Arial,sans-serif; line-height:1.08; }
.quote-unified-grid td { box-sizing:border-box; padding:2px 4px; overflow-wrap:anywhere; }
.quote-promo-page { box-sizing:border-box; width:1040px; height:717px; margin:12px auto; background:white; break-before:page; page-break-before:always; break-inside:avoid; page-break-inside:avoid; }
.quote-promo-page > img { display:block; width:100%; height:100%; object-fit:contain; margin:0; }
@media print {
  .quote-unified-page,.quote-promo-page { margin:0 auto; width:1040px; height:717px; break-inside:avoid; page-break-inside:avoid; print-color-adjust:exact; -webkit-print-color-adjust:exact; }
}

.quote-content-module-media {
  display: flex;
  min-height: 0;
  flex: 1;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}

.quote-content-module .quote-content-module-media img {
  width: 100%;
  max-width: 800px;
  max-height: 1040px;
  margin: 0 auto;
  object-fit: contain;
  object-position: top center;
}

.quote-content-uniform-image,
.quote-content-image-slice {
  display: block;
  width: 160mm;
  max-width: 100%;
  margin: 0 auto;
}

.quote-content-uniform-image {
  height: auto;
  object-fit: contain;
  object-position: top center;
}

.quote-content-image-slice {
  flex: 0 0 auto;
  background-repeat: no-repeat;
  background-size: 160mm auto;
}

.quote-content-layout-square .quote-content-module-media img {
  max-width: 800px;
  aspect-ratio: 1;
}

.quote-module-guidance {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
  color: #40503a;
  background: #f2f8ea;
  border: 1px solid #d4e5c5;
  border-radius: 12px;
}

.quote-module-guidance strong { flex-basis: 100%; }
.quote-module-guidance span {
  padding: 5px 10px;
  background: #fff;
  border: 1px solid #dce9d2;
  border-radius: 999px;
}
.quote-module-guidance small { flex-basis: 100%; color: #6a7664; }

.quote-module-admin-list {
  display: grid;
  gap: 14px;
}

.quote-module-admin-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) auto;
  gap: 16px;
  padding: 14px;
  background: #fbfdf8;
  border: 1px solid #d9e7ce;
  border-radius: 12px;
}

.quote-module-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quote-module-preview img,
.quote-module-empty {
  width: 100%;
  height: 150px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #dce8d3;
  border-radius: 8px;
}

.quote-module-empty {
  display: grid;
  place-items: center;
  color: #899383;
}

.quote-module-fields { min-width: 0; }
.quote-module-field-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
.quote-module-fields > label { display: grid; gap: 6px; margin-top: 10px; }
.quote-module-file-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px;
  color: #677360;
  font-size: 13px;
}
.quote-module-file-meta .is-warning { color: #b36a12; }
.quote-module-actions { display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 980px) {
  .quote-module-admin-card { grid-template-columns: 150px minmax(0, 1fr); }
  .quote-module-actions { grid-column: 1 / -1; flex-direction: row; }
  .quote-module-field-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
}

@media (max-width: 720px) {
  .quote-print-meta,
  .quote-logistics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-logistics-grid .quote-grand-total { grid-column: span 2; }
  .quote-product-image-cell { width: 92px; }
  .quote-product-image { width: 78px; height: 78px; }
}

.quote-print-footer {
  margin-top: 28px;
  color: #6f7868;
  font-size: 12px;
}

/* Official quotation header: shared by direct exports and saved quotation previews. */
.quote-official-header {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 100px;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: linear-gradient(102deg, #fff8e9 0%, #f7fae8 55%, #dff3c8 100%);
  border: 1px solid #e0e9d7;
  border-radius: 12px;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.quote-official-header::after {
  content: "";
  grid-column: 3;
}

.quote-official-logo {
  display: block;
  grid-column: 1;
  width: 88px;
  max-height: 82px;
  object-fit: contain;
}

.quote-title-stack {
  grid-column: 2;
  min-width: 0;
  text-align: center;
}

.quote-title-stack h1 {
  margin: 0 0 4px;
  color: #151b14;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1.35px;
  line-height: 1.08;
  white-space: nowrap;
}

.quote-title-stack strong,
.quote-title-stack small {
  display: block;
}

.quote-title-stack strong {
  color: #1c2b1a;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .55px;
}

.quote-title-stack small {
  margin-top: 5px;
  color: #5f6b59;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .05px;
}

.quote-header-details {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 6px;
  padding: 0 2px 6px;
  color: #293126;
  border-bottom: 1px solid #5ca52a;
  font-size: 11px;
}

.quote-header-details span { white-space: nowrap; }

.quote-header-details b { font-weight: 700; }

.legacy-quote-header,
.legacy-quote-header + .quote-service-badges { display: none !important; }

.quote-service-badges {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin: 8px 0 10px;
  padding: 0;
  border-top: 0;
}

.quote-service-badges span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 25px;
  padding: 3px 8px;
  color: #365b1e;
  background: #eef7e7;
  border: 1px solid #d8e9ca;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1.15;
  white-space: nowrap;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.quote-service-badges i {
  display: inline-flex;
  width: 17px;
  height: 17px;
  align-items: center;
  justify-content: center;
  color: #5ca42d;
  font-style: normal;
  line-height: 1;
}

.quote-service-badges svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media print {
  @page {
    size: A4 landscape;
    margin: 9mm 10mm 10mm;
  }

  html,
  body,
  .quote-official-header,
  .quote-service-badges span {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .quote-print-body {
    margin: 0 !important;
    padding: 0 !important;
  }

  .quote-print-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .quote-content-module {
    box-sizing: border-box;
    height: 191mm;
    max-height: 191mm;
    overflow: hidden;
    break-before: page;
    page-break-before: always;
    page-break-inside: avoid;
  }

  .quote-content-module .quote-content-module-media img {
    width: 160mm;
    max-width: 100%;
    max-height: none;
    object-fit: contain;
  }

  .quote-content-uniform-image,
  .quote-content-image-slice {
    width: 160mm;
    max-width: 100%;
  }
}

@media (max-width: 720px) {
  .quote-official-header { grid-template-columns: 62px minmax(0, 1fr); }
  .quote-official-header::after { display: none; }
  .quote-official-logo { width: 58px; }
  .quote-title-stack h1 { font-size: 17px; }
  .quote-title-stack strong { font-size: 9px; }
  .quote-header-details { flex-wrap: wrap; gap: 5px 12px; }
  .quote-service-badges { flex-wrap: wrap; justify-content: flex-start; }
}

.error-box {
  padding: 12px;
  color: #9f1239;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 10px;
}

.admin-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: 6px;
}

.login-panel {
  width: min(520px, calc(100% - 48px));
  margin: 64px auto;
}

.login-card {
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.login-card input {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0 12px;
  font-size: 15px;
}

body.is-logged-out .admin-main {
  display: none;
}

body.is-logged-in .login-panel {
  display: none;
}

body.role-sales #policy,
body.role-sales #materials,
body.role-sales #processes,
body.role-sales #engines,
body.role-sales #products,
body.role-sales #operations,
body.role-sales #accounts,
body.role-sales #productContent,
body.role-sales #quoteContentModules,
body.role-sales .admin-menu a[href="#policy"],
body.role-sales .admin-menu a[href="#materials"],
body.role-sales .admin-menu a[href="#processes"],
body.role-sales .admin-menu a[href="#engines"],
body.role-sales .admin-menu a[href="#products"],
body.role-sales .admin-menu a[href="#operations"],
body.role-sales .admin-menu a[href="#accounts"],
body.role-sales .admin-menu a[href="#productContent"],
body.role-sales .admin-menu a[href="#quoteContentModules"],
body.role-sales .admin-menu-group {
  display: none;
}

body.role-sales .admin-menu-group:has(a[href="#records"]) {
  display: block;
}

.admin-hero {
  margin: 0 0 18px;
  padding: 24px 26px;
  background:
    radial-gradient(circle at 88% 20%, rgba(111, 179, 52, .16), transparent 28%),
    linear-gradient(180deg, #effadc 0%, #fffaf2 100%);
  border: 1px solid #e4edcf;
  border-radius: 16px;
}

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

.admin-menu {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.admin-menu-group {
  overflow: hidden;
  border-radius: 10px;
  background: #f6f9f1;
}

.admin-menu-group summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  color: #2f3a2b;
  background: #eef5e5;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.admin-menu-group summary::-webkit-details-marker {
  display: none;
}

.admin-menu-group summary::after {
  content: "⌄";
  color: var(--green-dark);
  font-size: 14px;
}

.admin-menu-group:not([open]) summary::after {
  content: "›";
}

.admin-menu a {
  min-height: 42px;
  margin: 6px 8px;
  padding: 0 12px 0 22px;
  display: grid;
  align-items: center;
  color: #5d6757;
  background: #fff;
  border-radius: 8px;
  font-size: 14px;
}

.admin-menu .is-active {
  color: #fff;
  background: #2f3a2b;
  font-weight: 800;
}

.admin-stack { display: grid; gap: 18px; }

.admin-card {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(57, 83, 38, .06);
}

.admin-card[hidden] {
  display: none;
}

body.admin-section-mode .admin-stack > .admin-card {
  display: none;
}

body.admin-section-mode .admin-stack > .admin-card.is-current-admin-section {
  display: block;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 12px;
}

.admin-form-grid.one-column { grid-template-columns: 1fr; }

.admin-form-grid label {
  display: grid;
  gap: 6px;
  color: #52604b;
  font-size: 13px;
}

.toggle-line {
  display: flex !important;
  align-items: center;
  gap: 8px !important;
  padding-top: 24px;
}

.table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf3e6;
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}

.quote-record-table-scroll {
  overflow: hidden;
}

#adminRecordTable {
  min-width: 0;
  table-layout: fixed;
}

#adminRecordTable th,
#adminRecordTable td {
  padding: 9px 7px;
  overflow-wrap: anywhere;
}

#adminRecordTable th:nth-child(1) { width: 12%; }
#adminRecordTable th:nth-child(2) { width: 11%; }
#adminRecordTable th:nth-child(3) { width: 8%; }
#adminRecordTable th:nth-child(4) { width: 10%; }
#adminRecordTable th:nth-child(5) { width: 10%; }
#adminRecordTable th:nth-child(6) { width: 13%; }
#adminRecordTable th:nth-child(7) { width: 6%; }
#adminRecordTable th:nth-child(8) { width: 12%; }
#adminRecordTable th:nth-child(9) { width: 18%; }

#adminRecordTable .record-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.record-delete-button {
  color: #c43f3f !important;
  border-color: #efb5b5 !important;
  background: #fff7f7 !important;
}

.table-input {
  width: 150px;
  min-height: 30px;
  margin: 2px 4px 2px 0;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}

.table-input.small-input {
  width: 82px;
}

.inline-price-field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 2px 10px 2px 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.template-editor {
  margin-top: 18px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #fbfdf8;
}

.admin-list > .template-editor {
  width: 100%;
  margin: 0 0 6px;
}

.template-editor-heading {
  position: sticky;
  top: 68px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -8px -8px 16px;
  padding: 10px 8px;
  background: rgba(251, 253, 248, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.template-editor-heading h3 { margin: 0; }

.template-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 16px 0;
}

.template-groups fieldset {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.template-groups legend { padding: 0 6px; color: var(--green-dark); font-weight: 700; }
.template-groups label { display: block; margin: 0; font-size: 14px; }
.template-field-with-config {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  margin: 0;
}

.template-field-with-config > label {
  margin: 0 !important;
}

.material-builder {
  margin: 0 0 8px;
  padding: 10px;
  border: 1px dashed #c8dfad;
  border-radius: 10px;
  background: #fff;
  overflow: visible;
}

.material-builder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--green-dark);
  font-weight: 800;
}

.material-builder-rows {
  display: grid;
  gap: 8px;
}

.material-rule-row {
  display: grid;
  grid-template-columns: 210px minmax(360px, 1fr) 108px;
  gap: 8px;
  align-items: start;
  padding: 8px;
  border-radius: 9px;
  background: #f7faf3;
}

.material-rule-row select {
  width: 100%;
  min-height: 32px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.material-weight-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.material-weight-options label {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  margin: 0 !important;
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e3ecd6;
  font-size: 12px !important;
  white-space: nowrap;
}

.round-icon {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

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

.add-material-button {
  min-width: 70px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #55ad28;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(85, 173, 40, .22);
}

.add-material-button:hover {
  background: #428f1e;
}

.add-material-button:disabled {
  cursor: not-allowed;
  opacity: .45;
  background: #9bb98b;
  box-shadow: none;
}

.round-icon.danger {
  background: #f05c5c;
}
.template-selectors {
  display: grid;
  gap: 14px;
  margin: 14px 0;
}

.template-selectors section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.template-selectors h4 {
  margin: 0 0 10px;
  color: var(--green-dark);
}

.selector-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.process-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 10px;
  background: #f7faf3;
}

.process-toolbar label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.process-toolbar input,
.process-toolbar select {
  min-width: 180px;
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.tiny-input {
  max-width: 72px;
}

.micro-input {
  width: 72px !important;
  min-width: 0 !important;
}

.process-workbench {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 12px 0;
}

.process-category-panel {
  position: sticky;
  top: 84px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbf4;
}

.process-category-title {
  padding: 12px 14px;
  color: #fff;
  background: var(--green);
  font-weight: 800;
}

.process-category-nav {
  display: grid;
  padding: 8px;
  gap: 4px;
}

.process-category-nav button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  color: #30402b;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.process-category-nav button.active,
.process-category-nav button:hover {
  color: var(--green-dark);
  background: #eaf5df;
  font-weight: 800;
}

.process-category-nav em {
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--green-dark);
  background: #fff;
  font-size: 12px;
  font-style: normal;
  text-align: center;
}

.process-main-panel {
  min-width: 0;
}

.compact-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.process-library-table {
  min-width: 1220px;
  table-layout: fixed;
}

.process-library-table th:nth-child(1),
.process-library-table td:nth-child(1) { width: 56px; }
.process-library-table th:nth-child(2),
.process-library-table td:nth-child(2) { width: 170px; }
.process-library-table th:nth-child(3),
.process-library-table td:nth-child(3) { width: 112px; }
.process-library-table th:nth-child(4),
.process-library-table td:nth-child(4) { width: 255px; }
.process-library-table th:nth-child(5),
.process-library-table td:nth-child(5) { width: 128px; }
.process-library-table th:nth-child(6),
.process-library-table td:nth-child(6) { width: 92px; }
.process-library-table th:nth-child(7),
.process-library-table td:nth-child(7) { width: 180px; }
.process-library-table th:nth-child(8),
.process-library-table td:nth-child(8) { width: 190px; }
.process-library-table th:nth-child(9),
.process-library-table td:nth-child(9) { width: 82px; }

.process-library-table .table-input {
  width: 100%;
  min-width: 0;
}

.process-name-cell,
.process-price-cell {
  display: grid;
  gap: 6px;
}

.process-name-cell small {
  display: block;
}

.process-price-cell {
  grid-template-columns: 1fr 1fr;
}

.process-price-cell select {
  grid-column: 1 / -1;
}

.process-tier-editor {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.tier-editor-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
}

.tier-editor-title small {
  color: var(--muted);
  font-weight: 400;
}

.price-tier-row {
  display: grid;
  grid-template-columns: 0.9fr 1fr 0.8fr 0.8fr 0.8fr 28px 28px;
  gap: 6px;
  align-items: center;
  padding: 6px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
}

.price-tier-row .table-input {
  min-width: 0;
  font-size: 13px;
}

.template-tier-editor {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.template-price-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 700;
}

.template-tier-editor .tier-editor-title {
  justify-content: space-between;
  align-items: center;
}

.compact-tier-add {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.template-tier-editor[hidden] {
  display: none !important;
}

.engine-process-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.engine-pricing-guide {
  display: grid;
  gap: 5px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #d8e8c9;
  border-radius: 10px;
  background: #f6faef;
  color: var(--muted);
  font-size: 13px;
}

.engine-pricing-guide strong,
.engine-pricing-guide b {
  color: var(--green-dark);
}

.process-price-cell span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.process-help-textarea {
  min-height: 78px;
  resize: vertical;
}

.process-image-cell {
  display: grid;
  gap: 6px;
}

.process-upload-button {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 0 10px;
  cursor: pointer;
}

.process-usage-guide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 12px 0 16px;
  padding: 12px 14px;
  border: 1px solid #d9e9cb;
  border-radius: 12px;
  color: #52604b;
  background: #f7fbf2;
  font-size: 13px;
}

.process-usage-guide strong {
  color: var(--green-dark);
  font-size: 14px;
}

.process-card-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.process-editor-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(64, 91, 45, .05);
}

.process-editor-card[open] {
  border-color: #b9d99e;
  box-shadow: 0 8px 24px rgba(64, 91, 45, .09);
}

.process-card-summary {
  display: grid;
  grid-template-columns: 64px minmax(170px, 1.4fr) minmax(100px, .8fr) minmax(120px, 1fr) 74px 78px;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 10px 16px;
  cursor: pointer;
  list-style: none;
  background: #fbfdf8;
}

.process-card-summary::-webkit-details-marker { display: none; }

.process-editor-card[open] .process-card-summary {
  border-bottom: 1px solid var(--line);
  background: #f2f8ea;
}

.process-sort-badge,
.process-category-badge,
.process-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 12px;
}

.process-sort-badge {
  min-width: 44px;
  color: var(--green-dark);
  border: 1px solid #d7e7c8;
  background: #fff;
  font-weight: 800;
}

.process-summary-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.process-summary-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1f2b1a;
  font-size: 15px;
}

.process-summary-name small,
.process-mode-summary,
.process-expand-hint {
  color: var(--muted);
  font-size: 12px;
}

.process-category-badge { background: #eef4e8; }
.process-status-badge.enabled { color: #3f8f1d; background: #e8f7dd; }
.process-status-badge.disabled { color: #8b8f86; background: #f0f1ef; }

.process-expand-hint {
  position: relative;
  padding-right: 18px;
  text-align: right;
  white-space: nowrap;
}

.process-expand-hint::after {
  content: "⌄";
  position: absolute;
  right: 0;
  color: var(--green);
  font-size: 16px;
  transition: transform .2s ease;
}

.process-editor-card[open] .process-expand-hint::after { transform: rotate(180deg); }

.process-card-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.process-card-section {
  padding: 14px;
  border: 1px solid #e5eddc;
  border-radius: 12px;
  background: #fcfdfb;
}

.process-section-heading,
.card-tier-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.process-section-heading h3,
.card-tier-title strong {
  margin: 0;
  color: var(--green-dark);
  font-size: 15px;
}

.process-section-heading span,
.card-tier-title small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.process-field-grid {
  display: grid;
  grid-template-columns: 110px repeat(3, minmax(150px, 1fr));
  gap: 12px;
}

.process-field-grid label,
.process-content-grid > label,
.process-image-editor {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  color: #52604b;
  font-size: 12px;
}

.process-field-grid .table-input,
.process-content-grid .table-input,
.card-tier-editor .table-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 7px 10px;
  font-size: 13px;
}

.process-sort-input {
  min-width: 88px !important;
  font-weight: 800;
}

.pricing-grid {
  grid-template-columns: minmax(180px, 1.4fr) repeat(5, minmax(105px, 1fr));
}

.process-toggle-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin-top: 12px;
}

.process-toggle-row .mini-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  margin: 0;
}

.card-tier-editor {
  display: grid;
  grid-column: auto;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #dce9d0;
  border-radius: 12px;
  background: #f7fbf3;
}

.card-tier-title {
  margin-bottom: 0;
}

.card-tier-title > div {
  display: grid;
  gap: 2px;
}

.add-tier-button {
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
  border: 1px solid var(--brand-dark);
  font-weight: 800;
  cursor: pointer;
}

.tier-column-heads,
.card-tier-editor .price-tier-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.1fr) minmax(130px, 1.2fr) minmax(95px, .8fr) minmax(95px, .8fr) minmax(95px, .8fr) 44px;
  gap: 9px;
  align-items: center;
}

.tier-column-heads {
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.card-tier-editor .price-tier-row {
  padding: 8px;
  border-style: solid;
  background: #fff;
}

.card-tier-editor .round-icon {
  justify-self: center;
}

.process-content-grid {
  display: grid;
  grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.4fr) minmax(220px, 1fr);
  gap: 14px;
  align-items: start;
}

.process-content-grid .process-color-options-label {
  min-width: 0;
  margin-top: 0;
}

.process-content-grid .process-help-textarea {
  min-height: 104px;
}

.process-image-editor .process-image-cell {
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 10px 12px;
  padding: 10px;
  border: 1px solid #dce9d0;
  border-radius: 10px;
  background: #fbfdf9;
}

.process-image-editor .process-image-cell img,
.process-image-placeholder {
  grid-row: 1 / span 2;
  width: 112px;
  height: 76px;
  border-radius: 8px;
  object-fit: cover;
}

.process-image-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  background: #fff;
  font-size: 12px;
}

.process-image-info {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.process-image-info strong {
  overflow: hidden;
  color: #2f3a2b;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.process-image-info small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

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

.process-image-advanced {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}

.process-image-advanced summary {
  width: fit-content;
  cursor: pointer;
}

.process-image-advanced .table-input {
  margin-top: 6px;
}

.process-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.danger-text-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #f2b7b7;
  border-radius: 8px;
  color: #d33;
  background: #fff;
  cursor: pointer;
}

.process-empty-state {
  padding: 32px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: #fff;
  text-align: center;
}

@media (max-width: 1180px) {
  .process-card-summary {
    grid-template-columns: 56px minmax(160px, 1.4fr) minmax(100px, .8fr) 74px 70px;
  }
  .process-mode-summary { display: none; }
  .process-field-grid,
  .pricing-grid { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
  .process-content-grid { grid-template-columns: 1fr 1fr; }
  .process-image-editor { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .process-card-summary { grid-template-columns: 48px 1fr auto; }
  .process-category-badge,
  .process-mode-summary,
  .process-status-badge { display: none; }
  .process-field-grid,
  .pricing-grid,
  .process-content-grid { grid-template-columns: 1fr; }
  .tier-column-heads { display: none; }
  .card-tier-editor .price-tier-row { grid-template-columns: 1fr 1fr; }
  .card-tier-editor .round-icon { justify-self: start; }
}

.process-image-cell img {
  width: 96px;
  height: 58px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.process-color-options-label {
  display: grid;
  gap: 4px;
  min-width: 150px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.process-color-options-label .table-input {
  min-width: 150px;
}

.leather-color-editor {
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(244, 250, 238, 0.75);
}

.leather-color-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.leather-color-list {
  display: grid;
  gap: 8px;
}

.leather-color-row {
  display: grid;
  grid-template-columns: 90px 110px minmax(180px, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
}

.leather-image-input {
  min-width: 180px;
}

.leather-color-thumb {
  width: 58px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.mini-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 2px 8px 2px 0;
  white-space: nowrap;
  font-size: 12px;
}

@media (max-width: 1000px) {
  .process-workbench {
    grid-template-columns: 1fr;
  }
  .process-category-panel {
    position: static;
  }
  .process-category-nav {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }
}

.paper-picker-group {
  margin: 8px 0;
  border: 1px solid #e4edcf;
  border-radius: 10px;
  background: #fbfdf8;
}

.paper-picker-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}

.paper-picker-group summary::-webkit-details-marker { display: none; }
.paper-picker-group summary::after {
  content: "展开";
  color: var(--green-dark);
  font-size: 12px;
}
.paper-picker-group[open] summary::after { content: "收起"; }

.paper-name-check {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  font-weight: 700;
}

.paper-picker-group em {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.paper-weight-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 8px 12px;
  padding: 0 12px 12px;
}

.paper-weight-list label {
  margin: 0 !important;
  padding: 7px 8px;
  border-radius: 8px;
  background: #f3f8ed;
}

.checkbox-grid.compact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.checkbox-grid.compact label {
  margin: 0;
}
.compact-title { margin: 8px 0; }
.compact-title h3 { margin: 0; font-size: 15px; }
.action-row { display: flex; gap: 10px; margin-top: 16px; }

.category-bar { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:12px; margin-bottom:14px; border-radius:10px; background:#f7faf3; }
.category-bar input { width:210px; min-height:34px; padding:5px 9px; border:1px solid var(--line); border-radius:7px; }
.management-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px; }
.management-grid article { border:1px solid var(--line); border-radius:10px; padding:15px; background:#fbfdf8; }
.migration-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:10px; margin:12px 0 18px; }
.migration-summary-item { border:1px solid var(--line); border-radius:12px; background:#f8fbf5; padding:12px 14px; }
.migration-summary-item strong,.migration-summary-item span { display:block; }
.migration-summary-item span { margin-top:4px; color:#687063; font-size:13px; }
.migration-actions article { display:flex; flex-direction:column; align-items:flex-start; gap:10px; }
.migration-actions article p { flex:1; }
.management-grid h3 { margin:0 0 8px; font-size:16px; }
.management-grid p { min-height:42px; margin:0 0 10px; color:var(--muted); font-size:13px; line-height:1.6; }
.management-grid span { color:var(--green-dark); font-size:12px; font-weight:700; }

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

.analytics-kpi {
  padding: 14px;
  background: #f4faef;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.analytics-kpi span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.analytics-kpi strong {
  display: block;
  margin-top: 6px;
  color: var(--brand-dark);
  font-size: 22px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.analytics-grid section {
  padding: 14px;
  background: #fbfdf8;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.analytics-grid h3 {
  margin: 0 0 12px;
}

.analytics-bars {
  display: grid;
  gap: 10px;
}

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

.analytics-bar-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #25301f;
  font-size: 13px;
}

.analytics-bar-track {
  height: 10px;
  overflow: hidden;
  background: #eaf3df;
  border-radius: 999px;
}

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

@media (max-width: 800px) { .template-groups, .management-grid { grid-template-columns: 1fr; } }

.admin-table th {
  color: #394432;
  background: #f3f8ed;
  font-weight: 800;
}

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

.admin-list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #f8fbf5;
  border: 1px solid #e4edcf;
  border-radius: 10px;
}

.product-template-row {
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.product-template-row:hover,
.product-template-row:focus-visible {
  border-color: #9dcc72;
  background: #f3faec;
  box-shadow: 0 5px 16px rgba(75, 112, 40, .08);
  outline: none;
}

.product-template-row.is-expanded {
  border-color: var(--brand);
  background: #eef8e5;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

.product-row-chevron {
  color: var(--brand-dark);
  font-size: 20px;
  line-height: 1;
  transition: transform .18s ease;
}

.product-template-row.is-expanded .product-row-chevron { transform: rotate(180deg); }
.new-product-row { border-style: dashed; }

.admin-list-item strong,
.admin-list-item span { display: block; }

.admin-list-item.account-editor {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
}

.account-editor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
}

.account-editor-grid label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.account-editor-grid .table-input {
  width: 100%;
  margin: 0;
  text-align: left;
}

.account-permission-check {
  align-content: center;
  grid-template-columns: auto 1fr !important;
  padding-top: 20px;
  color: var(--ink) !important;
}

.account-view-grid {
  display: grid;
  grid-template-columns: .7fr 1.1fr .85fr 1.25fr .9fr .7fr 1.15fr;
  gap: 12px;
  min-width: 0;
}

.account-view-grid > span {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
}

.account-view-grid small {
  color: var(--muted);
  font-size: 12px;
}

.account-view-grid strong,
.account-view-grid em {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.account-view-grid em {
  color: var(--muted);
}

.account-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(58px, 1fr));
  gap: 6px;
  min-width: 196px;
}

.account-editor-grid + .account-actions {
  grid-template-columns: repeat(2, minmax(64px, 1fr));
  min-width: 136px;
}

.account-status {
  display: inline-flex !important;
  width: max-content;
  padding: 2px 8px;
  border-radius: 999px;
}

.account-status.is-on {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.account-status.is-off {
  color: #a33;
  background: #fff0f0;
}

.is-disabled-account {
  background: #fafafa;
}

.is-disabled-account .account-view-grid {
  opacity: .7;
}

@media (max-width: 1250px) {
  .account-view-grid { grid-template-columns: repeat(4, minmax(130px, 1fr)); }
  .account-editor-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}

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

.mini-tag {
  padding: 4px 8px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 999px;
  font-size: 12px;
}

.small-inline {
  min-height: 28px;
  padding: 3px 8px;
}

.save-status {
  min-height: 24px;
  margin-top: 10px;
  padding: 8px 12px;
  color: var(--brand-dark);
  border-radius: 8px;
  background: #f1f8e9;
  font-size: 13px;
  font-weight: 700;
}

.save-status:empty {
  display: none;
}

.save-status.is-success { color: #2f6f16; background: #edf8e6; }
.save-status.is-loading { color: #7a5a00; background: #fff7dc; }
.save-status.is-error { color: #b42318; background: #fff0ee; }

.admin-global-notice {
  position: fixed;
  z-index: 9999;
  top: 78px;
  left: 50%;
  max-width: min(560px, calc(100vw - 32px));
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(32, 58, 20, .18);
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -16px);
  transition: opacity .2s ease, transform .2s ease;
}

.admin-global-notice.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.admin-global-notice.is-success { color: #245c11; border-color: #bdddab; background: #f0faea; }
.admin-global-notice.is-error { color: #a31b12; border-color: #f2beb8; background: #fff1ef; }

@media (max-width: 1280px) {
  .topbar { gap: 14px; padding-left: 18px; padding-right: 18px; }
  .brand-logo { width: 138px; }
  .brand-system-name, .mode-badge { display: none; }
  .nav-home, .nav-dropdown-toggle { padding-left: 10px; padding-right: 10px; }
  .layout {
    grid-template-columns: 96px minmax(0, 1fr);
  }
  .assistant-panel {
    grid-column: 2;
    position: static;
  }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-menu {
    position: static;
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 860px) {
  main { padding: 10px; }
  .hero, .layout { grid-template-columns: 1fr; }
  .side-nav {
    position: static;
    grid-template-columns: repeat(5, minmax(80px, 1fr));
    overflow-x: auto;
  }
  .assistant-panel { grid-column: auto; }
  .option-row { align-items: stretch; }
  .row-label { flex-basis: 100%; justify-content: start; padding-left: 12px; place-items: center start; }
  .repeat-card, .summary-grid, .button-row { grid-template-columns: 1fr; }
  .hero-price strong, .price-box strong { font-size: 28px; }
  .admin-form-grid { grid-template-columns: 1fr; }
  .admin-menu { grid-template-columns: 1fr; }
  .admin-list-item { display: grid; }
}

@media (max-width: 640px) {
  .account-profile-grid,
  .account-password-grid { grid-template-columns: 1fr; }
  .account-center-card { padding: 20px 16px; }
  .account-profile-heading { grid-template-columns: auto 1fr; }
  .account-profile-heading > button { grid-column: 1 / -1; justify-self: end; }
  .nav { display: none; }
  .topbar { padding: 0 12px; }
  .product-tabs { padding: 12px; }
  .config-panel { padding: 16px 12px; }
  .size-select, .dimension-input { width: 100%; }
}
.cal-reference { color:#263238;font-size:13px; }
.cal-reference .cal-section { background:white;border-radius:14px;padding:14px 12px 22px;margin-bottom:12px; }
.cal-reference h3 { font-size:18px;font-weight:700;margin:0 0 20px;border-left:4px solid var(--brand,#73b52d);padding-left:10px;color:#293226; }
.cal-reference .cal-row { display:flex;align-items:center;gap:10px;min-height:40px;margin-bottom:8px; }
.cal-reference .cal-label { flex:0 0 108px;background:#f3f3f3;padding:8px 5px;text-align:center;border-radius:3px; }
.cal-reference .cal-control { display:flex;align-items:center;flex-wrap:wrap;gap:12px; }
.cal-reference label { display:inline-flex;align-items:center;gap:5px;margin:0;font-size:13px;font-weight:400; }
.cal-reference input[type=checkbox],.cal-reference input[type=radio] { width:13px;height:13px;margin:0;accent-color:#363636; }
.cal-reference input:not([type=checkbox]):not([type=radio]),.cal-reference select { width:165px;min-height:30px;padding:5px 8px;border:1px solid #dce2ed;border-radius:3px;background:white;color:#42536b;font-size:13px; }
.cal-reference small { color:#96a1af;font-size:11px; }
.cal-reference button { padding:7px 13px;border:1px solid #e4e7eb;border-radius:3px;background:white;color:#263238; }
.cal-reference [data-add],.cal-reference [data-calculate] { background:#333;color:white; }
.cal-reference .is-active { border-color:var(--brand);background:var(--brand);color:white; }
.cal-reference [data-cover-remove] { background:none;border:0;color:#e65252;font-size:12px;font-weight:400;margin-left:18px;padding:0; }
.cal-reference label:has(input:disabled) { color:#9da7b1; }
.cal-reference .cal-price .cal-row { padding:8px;border:1px solid #d7e7c7;border-radius:12px;background:#fafcf7; }
.cal-reference .cal-price .cal-control { flex:1;gap:8px; }
.cal-reference .cal-price [data-qty],.cal-reference .cal-price [data-calculate] { min-width:72px;flex:1;min-height:44px;font-size:18px;font-weight:700;border:0;border-radius:8px; }
.cal-reference .cal-price [data-calculate] { background:var(--brand,#73b52d);color:white; }
.cal-reference .cal-price .cal-custom-quantity { background:white;border-radius:8px;padding:0 10px;color:#75816c;min-height:44px; }
.cal-reference .cal-price [data-cal="quantity"] { width:75px;border:0;font-size:16px;font-weight:700;color:#172213; }
.cal-reference .cal-review { color:#718064;font-size:12px;padding:10px; }
.cal-reference textarea { width:100%; }
.cal-reference [hidden] { display:none!important; }
@media(max-width:600px){.cal-reference .cal-label{flex-basis:85px}.cal-reference .cal-control{gap:7px}.cal-reference input:not([type=checkbox]):not([type=radio]),.cal-reference select{width:135px}}
.cal-reference [data-dim] { display:inline-flex;align-items:center;gap:10px;flex-wrap:wrap; }
.cal-reference { font-size:14px; }
.cal-reference .cal-row { min-height:48px;margin-bottom:10px;gap:12px;flex-wrap:wrap; }
.cal-reference .cal-label { flex-basis:120px;min-height:32px;display:inline-grid;place-items:center;background:#f1f4ee;color:#3f4939;border-radius:6px;font-size:14px; }
.cal-reference .cal-control { flex:1;gap:12px 18px; }
.cal-reference label { gap:6px;font-size:14px; }
.cal-reference input[type=checkbox],.cal-reference input[type=radio] { width:14px;height:14px;min-height:0;accent-color:var(--brand); }
.cal-reference input:not([type=checkbox]):not([type=radio]),.cal-reference select { min-height:38px;border-color:var(--line);border-radius:6px;font-size:14px; }
.cal-reference .cal-craft-item { display:inline-flex;align-items:center;gap:6px; }
.cal-reference .cal-help-button { display:inline-flex;align-items:center;justify-content:center;width:13px;height:13px;min-width:13px;min-height:13px;padding:0;flex:0 0 13px;border:1px solid #98a6b2;border-radius:50%;color:#8293a1;background:white;font-size:10px;font-weight:normal;line-height:1;cursor:help; }
.cal-reference .cal-help-button:focus-visible { outline:2px solid var(--brand);outline-offset:3px; }
.cal-reference .cal-help-button[aria-pressed="true"] { background:var(--brand);color:white;border-color:var(--brand); }
.cal-reference [data-cal-areas] { max-width:100%; }
.cal-reference .album-process-row .dimension-input,.cal-reference .album-process-row select { width:100%;min-width:0;min-height:34px;padding:0 8px;border-radius:8px; }
.cal-reference .album-process-row .icon-button { width:21px;height:21px;min-width:21px;min-height:21px;padding:0;border:0;border-radius:50%;color:white;display:inline-flex;align-items:center;justify-content:center; }
.cal-reference .album-process-row .icon-button.add { background:var(--brand); }
.cal-reference .album-process-row .icon-button.remove { background:#ef4444; }
@media(max-width:600px){.cal-reference .album-process-row,.cal-reference .album-process-row:not(:has(select)){display:flex;flex-wrap:wrap}.cal-reference .album-process-row .dimension-input,.cal-reference .album-process-row select{width:110px}}
.cal-reference [data-stand-paper-help] { margin:0 0 12px 132px;color:#718064;font-size:12px; }
@media(max-width:600px){.cal-reference .cal-label{flex-basis:100%}.cal-reference [data-stand-paper-help]{margin-left:0}.cal-reference .cal-control{min-width:0}}
