/* Dense sales workspace */
body:not(:has(#login-section:not(.hidden))) {
  padding-top: 16px;
  padding-bottom: 0;
}

body:not(:has(#login-section:not(.hidden))) .page-header h1 {
  font-size: 30px;
  line-height: 1.18;
  margin-bottom: 8px;
}

body:not(:has(#login-section:not(.hidden))) .notice {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.45;
}

#main-section.card {
  padding-top: 14px;
  padding-bottom: 14px;
}

.form-heading-row {
  margin-bottom: 8px;
}

.operator-inline-field {
  display: flex;
  flex: 0 1 360px;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.operator-inline-field input {
  flex: 1 1 auto;
}

.task-switch {
  gap: 8px;
  margin-bottom: 10px;
}

.task-card {
  min-height: 46px;
  gap: 2px;
  padding: 8px 12px;
}

.task-card strong {
  font-size: 14px;
}

.task-card span {
  font-size: 12px;
  line-height: 1.35;
}

.workspace-details {
  margin-bottom: 10px;
}

.task-product-info-host {
  margin-bottom: 10px;
}

.packaging-product-info-host:empty,
.sales-product-info-host:empty {
  display: none;
}

body.packaging-task-active .workspace-preview-drawer,
body.packaging-task-active .workspace-history-drawer,
body.packaging-task-active .side-drawer-toggle-left,
body.packaging-task-active .side-drawer-toggle-right {
  display: none !important;
}

/* 包装设计辅助的产品基础资料只需要露出较低的初始高度，保留手动拖拽放大的能力。 */
body.packaging-task-active .packaging-product-info-host .product-context-label textarea {
  height: 56px;
  min-height: 56px;
}

.workspace-details > summary,
.compact-details > summary {
  padding: 9px 12px;
}

.fixed-compact-panel-head {
  padding: 9px 12px;
  font-weight: 800;
  color: #102447;
}

.fixed-compact-panel-head span {
  display: block;
}

.compact-details > summary::after {
  width: 20px;
  height: 20px;
}

.compact-details-content {
  padding: 0 12px 10px;
}

.image-type-module-field-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.image-type-review-card textarea {
  min-height: 38px;
}

.image-type-count-field .field-note {
  display: none;
}

.ingredient-direction-field,
.grid-product-mode-field {
  display: grid;
  grid-column: 1 / span 2;
  gap: 3px;
  align-self: start;
  margin: 0;
  margin-top: -2px;
  padding: 6px;
  border: 1px solid #d8c7ff;
  border-radius: 8px;
  background: #f5f0ff;
  color: #253047;
  font-weight: 700;
}

.ingredient-direction-field select,
.grid-product-mode-field select {
  min-height: 30px;
  margin-top: 0;
  padding: 5px 8px;
  background: #fff;
  font-weight: 400;
}

.image-type-description-fields textarea {
  min-height: 70px;
}

.image-type-active-settings .advanced-settings textarea {
  min-height: 52px;
}

.image-type-active-settings .advanced-settings summary {
  padding-top: 7px;
  padding-bottom: 7px;
}

.job-progress {
  align-items: stretch;
}

#job-progress-text {
  display: grid;
  gap: 8px;
}

.job-progress-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px;
  border: 1px solid #d8e3f2;
  border-radius: 8px;
  background: #f7fbff;
}

.job-cancel-btn {
  border-color: #ffd0d0;
  background: #fff5f5;
  color: #c53030;
}

@media (max-width: 760px) {
  body {
    padding-left: 14px;
    padding-right: 14px;
  }

  #main-section.card {
    padding-left: 12px;
    padding-right: 12px;
  }

  .workspace-shell {
    grid-template-columns: 1fr;
  }

  .workspace-history-drawer,
  .workspace-preview-drawer {
    width: calc(100vw - 48px);
  }

  .workspace-history-drawer {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .history-drawer-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .reference-file-list li {
    grid-template-columns: 1fr;
  }

  .vision-panel > summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Compact generation workspace controls */
.image-type-picker {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(320px, 460px);
  gap: 8px;
  align-items: stretch;
}

.image-type-head {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.image-type-options {
  grid-template-columns: repeat(7, minmax(88px, 1fr)) minmax(58px, 72px);
  justify-content: start;
}

.image-type-option {
  min-height: 38px;
  padding: 7px 22px 7px 8px;
}

.image-type-select-all {
  min-height: 38px;
  padding: 7px 10px;
}

.image-type-option strong {
  font-size: 12px;
}

.image-type-option span {
  display: none;
}

.image-type-action-slot {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  min-width: 0;
}

.image-type-action-slot .fixed-generate-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  width: min(100%, 620px);
  gap: 8px;
}

.image-type-action-slot .fixed-generate-actions button,
.image-type-action-slot .fixed-generate-actions .ps-package-download {
  min-width: 0;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  white-space: nowrap;
}

body.packaging-task-active .image-type-picker {
  display: flex;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.packaging-task-active .image-type-head,
body.packaging-task-active .image-type-options {
  display: none !important;
}

body.packaging-task-active .image-type-action-slot {
  width: 100%;
  justify-content: flex-end;
}

body.packaging-task-active .image-type-picker {
  display: none !important;
}

.fixed-generate-bar.actions-detached {
  position: static;
  transform: none;
  width: 100%;
  height: 64px;
  min-height: 64px;
  margin: 0;
  justify-content: flex-start;
  padding: 10px 16px;
  border-radius: 16px;
  overflow: visible;
  align-items: center;
}

.fixed-generate-bar.actions-detached .fixed-generate-actions {
  display: none;
}

.fixed-generate-bar.actions-detached > div:first-child {
  min-width: 170px;
}

.fixed-generate-shell {
  position: relative;
  width: min(980px, calc(100% - 48px));
  margin: 10px auto 0;
}

.fixed-generate-copy {
  flex: 0 0 180px;
  align-self: center;
}

.fixed-generate-task-area {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  display: flex;
  align-items: center;
  padding-right: 104px;
}

.fixed-task-list-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 35;
  flex: 0 0 auto;
  min-width: 90px !important;
  min-height: 34px !important;
  margin-left: 0;
  padding: 0 12px !important;
  border: 1px solid #cfe0f7 !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #1f5fc8 !important;
  font-size: 12px;
  font-weight: 900;
}

.fixed-task-list-toggle[hidden] {
  display: none !important;
}

.fixed-generate-progress {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  left: 0;
  right: 0;
  z-index: 20;
  width: 100%;
  max-height: 44px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid #dbe7fb;
  border-radius: 12px;
  background: rgba(246, 250, 255, .94);
  box-shadow: none;
  overflow: hidden;
  transition: max-height .18s ease, box-shadow .18s ease, background .18s ease;
}

.fixed-generate-progress > strong {
  flex: 0 0 auto;
  padding-left: 12px;
  color: #172238;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.fixed-generate-progress.hidden {
  display: none;
}

.fixed-generate-progress.expanded {
  position: absolute;
  display: block;
  bottom: calc(100% + 8px);
  right: 0;
  max-height: 220px;
  overflow: auto;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 38px rgba(31, 42, 68, .16);
}

.fixed-generate-progress.expanded > strong {
  display: block;
  padding: 10px 12px 4px;
  line-height: 1.2;
}

.fixed-generate-progress:not(.expanded) .job-progress-item:nth-child(n+2) {
  display: none;
}

.fixed-generate-progress #job-progress-text {
  flex: 1 1 auto;
  min-width: 0;
  gap: 0;
}

.fixed-generate-progress .job-progress-item {
  height: 42px;
  min-height: 42px;
  border: 0;
  border-bottom: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 10px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fixed-generate-progress.expanded .job-progress-item {
  border-bottom: 1px solid #e2eaf6;
  padding: 6px 10px;
}

.fixed-generate-progress .job-progress-item:last-child {
  border-bottom: 0;
}

.fixed-generate-progress .job-progress-main {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.fixed-generate-progress .job-progress-title {
  min-width: 0;
  color: #172238;
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fixed-generate-progress .job-progress-elapsed {
  flex: 0 0 auto;
  color: #1f65d6;
  font-size: 12px;
  font-weight: 800;
}

.fixed-generate-progress .job-cancel-btn {
  flex: 0 0 auto;
  min-width: 54px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
}

@media (max-width: 760px) {
  .fixed-generate-bar.actions-detached {
    height: auto;
    min-height: 92px;
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .fixed-generate-copy {
    flex-basis: auto;
  }

  .fixed-generate-task-area {
    padding-right: 0;
  }

  .fixed-task-list-toggle {
    position: static;
    transform: none;
    justify-self: end;
    min-height: 30px !important;
  }
}

.image-type-active-layout {
  grid-template-columns: minmax(360px, .9fr) minmax(420px, 1.08fr) minmax(260px, .62fr);
}

.image-type-active-layout:has(.image-type-module-fields:not([open])) {
  grid-template-columns: 42px minmax(480px, 1.16fr) minmax(260px, .62fr);
}

.image-type-module-fields {
  min-width: 0;
  transition: width .18s ease, padding .18s ease, background .18s ease;
}

.image-type-module-fields:not([open]) {
  display: grid;
  place-items: stretch;
  min-width: 42px;
  padding: 0;
}

.image-type-module-fields:not([open]) summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 210px;
  padding: 8px 4px;
  writing-mode: vertical-rl;
  letter-spacing: 0;
  border-radius: 7px;
  background: #eef5ff;
}

.workspace-shell {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
}

.image-type-review-card-head span {
  display: none;
}

.image-type-description-fields label:has([data-prompt-field="finalDescription"]) {
  padding: 8px;
  border: 1px solid #efd28c;
  border-radius: 10px;
  background: #fff9e8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .72);
}

.image-type-description-fields textarea[data-prompt-field="finalDescription"] {
  min-height: 86px;
  background: #fffef7;
  border-color: #dfb85b;
}

.image-type-description-fields label:has([data-prompt-field="finalPromptOverride"]) {
  padding: 8px;
  border: 1px solid #9fd8b2;
  border-radius: 10px;
  background: #f0fdf4;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .72);
}

.image-type-description-fields textarea[data-prompt-field="finalPromptOverride"] {
  min-height: 86px;
  background: #fbfffc;
  border-color: #81c995;
}

.workspace-history-drawer .history-drawer-card {
  grid-template-columns: 76px minmax(0, 1fr);
}

.workspace-history-drawer .recent-image-card {
  grid-template-columns: 142px minmax(0, 1fr);
}

.workspace-history-drawer .recent-image-card .image-preview,
.workspace-history-drawer .recent-image-card .image-preview-wrap,
.workspace-history-drawer .recent-image-card img {
  width: 142px;
}

.workspace-history-drawer .recent-image-card img {
  height: 142px;
}

.image-preview-wrap {
  position: relative;
  display: block;
}

.image-preview-wrap .image-preview {
  display: block;
  width: 100%;
}

.image-download-overlay {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  min-width: 72px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(31, 100, 209, .94);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(22, 52, 98, .22);
}

.image-download-overlay:hover,
.image-download-overlay:focus-visible {
  background: #164fb4;
}

.drag-upload-active::after {
  content: "松开鼠标上传图片";
  position: fixed;
  inset: 18px;
  z-index: 1200;
  display: grid;
  place-items: center;
  border: 3px dashed rgba(31, 100, 209, .72);
  border-radius: 18px;
  background: rgba(239, 246, 255, .76);
  color: #0f4fb6;
  font-size: 24px;
  font-weight: 900;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

@media (max-width: 1320px) {
  .image-type-picker {
    grid-template-columns: 1fr;
  }

  .image-type-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .image-type-action-slot {
    justify-content: stretch;
  }

  .image-type-action-slot .fixed-generate-actions {
    width: 100%;
  }

  .fixed-generate-shell {
    width: 100%;
  }

  .image-type-active-layout,
  .image-type-active-layout:has(.image-type-module-fields:not([open])) {
    grid-template-columns: 1fr;
  }

  .image-type-module-fields:not([open]) summary {
    min-height: 40px;
    writing-mode: horizontal-tb;
  }
}

/* Login-only visual skin */
body:has(#login-section:not(.hidden)),
body:has(#admin-login-section:not(.hidden)) {
  min-height: 100vh;
  overflow-x: hidden;
  padding: clamp(18px, 4vw, 48px);
  padding-bottom: clamp(18px, 4vw, 48px);
  position: relative;
  background:
    radial-gradient(circle at 22% 18%, rgba(104, 214, 255, 0.42), transparent 28%),
    radial-gradient(circle at 82% 22%, rgba(191, 132, 255, 0.38), transparent 30%),
    radial-gradient(circle at 52% 86%, rgba(73, 230, 190, 0.34), transparent 34%),
    linear-gradient(135deg, #071a32 0%, #0e3b5d 44%, #102044 100%);
  background-size: 140% 140%, 150% 150%, 160% 160%, 100% 100%;
  color: #eef7ff;
  animation: login-background-flow 18s ease-in-out infinite alternate;
}

body:has(#login-section:not(.hidden))::before,
body:has(#admin-login-section:not(.hidden))::before,
body:has(#login-section:not(.hidden))::after,
body:has(#admin-login-section:not(.hidden))::after {
  content: "";
  inset: -12%;
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

body:has(#login-section:not(.hidden))::before,
body:has(#admin-login-section:not(.hidden))::before {
  background-image:
    radial-gradient(circle, rgba(119, 233, 255, 0.72) 0 1.8px, transparent 2.8px),
    radial-gradient(circle, rgba(255, 154, 225, 0.62) 0 1.4px, transparent 2.6px),
    radial-gradient(circle, rgba(159, 255, 199, 0.58) 0 1.2px, transparent 2.4px),
    radial-gradient(circle, rgba(255, 220, 126, 0.46) 0 1.1px, transparent 2.2px);
  background-position: 0 0, 42px 66px, 86px 16px, 120px 96px;
  background-size: 118px 118px, 164px 164px, 206px 206px, 260px 260px;
  filter: hue-rotate(0deg) saturate(1.25);
  opacity: 0.82;
  transform: translate3d(0, 0, 0);
  animation: login-particles-drift 12s linear infinite, login-hue-flow 12s linear infinite;
}

body:has(#login-section:not(.hidden))::after,
body:has(#admin-login-section:not(.hidden))::after {
  background:
    radial-gradient(ellipse at 18% 72%, rgba(83, 240, 214, 0.38), transparent 34%),
    radial-gradient(ellipse at 74% 28%, rgba(202, 129, 255, 0.34), transparent 36%),
    repeating-linear-gradient(118deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 18px);
  filter: blur(16px) hue-rotate(0deg);
  mix-blend-mode: screen;
  opacity: 0.9;
  animation: login-water-shimmer 20s ease-in-out infinite alternate, login-hue-flow-blur 22s linear infinite;
}

body:has(#login-section:not(.hidden)) .page,
body:has(#admin-login-section:not(.hidden)) .page {
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - clamp(36px, 8vw, 96px));
  max-width: 760px;
  position: relative;
  z-index: 1;
}

body:has(#login-section:not(.hidden)) .page > h1,
body:has(#admin-login-section:not(.hidden)) .page > h1 {
  color: #ffffff;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-align: center;
  text-shadow: 0 10px 30px rgba(0, 28, 54, 0.45);
}

body:has(#login-section:not(.hidden)) .notice {
  color: rgba(238, 247, 255, 0.82);
  line-height: 1.7;
  margin: 0 0 18px;
  max-width: 680px;
  text-align: center;
  text-shadow: 0 8px 24px rgba(0, 26, 46, 0.32);
}

body:has(#login-section:not(.hidden)) .fixed-generate-bar {
  display: none;
}

#login-section.card:not(.hidden),
#admin-login-section.card:not(.hidden) {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 22px;
  box-shadow:
    0 26px 80px rgba(0, 20, 45, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  color: #f8fbff;
  isolation: isolate;
  margin: 0;
  overflow: hidden;
  padding: clamp(22px, 4vw, 34px);
  position: relative;
  width: min(100%, 460px);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
}

#login-section.card:not(.hidden)::before,
#admin-login-section.card:not(.hidden)::before {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.52), transparent 34%, rgba(112, 235, 255, 0.22) 68%, transparent),
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.32), transparent 28%);
  content: "";
  inset: 0;
  opacity: 0.82;
  pointer-events: none;
  position: absolute;
  z-index: -1;
}

#login-section.card:not(.hidden) h2,
#admin-login-section.card:not(.hidden) h2 {
  color: #ffffff;
  font-size: 24px;
  margin-bottom: 18px;
  text-align: center;
  text-shadow: 0 8px 20px rgba(0, 31, 58, 0.35);
}

#login-section:not(.hidden) .auth-tabs {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.34);
  display: flex;
  margin: 0 auto 18px;
  width: fit-content;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#login-section:not(.hidden) .auth-tab {
  color: rgba(255, 255, 255, 0.78);
}

#login-section:not(.hidden) .auth-tab.active {
  background: linear-gradient(135deg, rgba(91, 219, 255, 0.92), rgba(129, 109, 255, 0.86));
  box-shadow: 0 10px 26px rgba(35, 95, 192, 0.28);
  color: #ffffff;
}

#login-section:not(.hidden) .auth-form,
#admin-login-section:not(.hidden) .auth-form {
  max-width: none;
}

#login-section:not(.hidden) label,
#admin-login-section:not(.hidden) label {
  color: rgba(248, 251, 255, 0.9);
  font-weight: 700;
}

#login-section:not(.hidden) input,
#admin-login-section:not(.hidden) input {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: #111827;
  caret-color: #111827;
  min-height: 44px;
  outline: none;
}

#login-section:not(.hidden) input::placeholder,
#admin-login-section:not(.hidden) input::placeholder {
  color: #64748b;
}

#login-section:not(.hidden) input:focus,
#admin-login-section:not(.hidden) input:focus {
  border-color: rgba(126, 238, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(126, 238, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#login-section:not(.hidden) input:-webkit-autofill,
#admin-login-section:not(.hidden) input:-webkit-autofill {
  -webkit-text-fill-color: #111827;
  box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.82) inset;
}

#login-section:not(.hidden) button[type="submit"],
#admin-login-section:not(.hidden) button[type="submit"] {
  background: linear-gradient(135deg, #35d5ff 0%, #7768ff 52%, #e46dff 100%);
  border-radius: 999px;
  box-shadow: 0 16px 34px rgba(40, 90, 205, 0.34);
  font-weight: 900;
  min-height: 46px;
  width: 100%;
}

#login-section:not(.hidden) .error,
#admin-login-section:not(.hidden) .error {
  color: #ffe0e5;
  min-height: 20px;
  text-align: center;
}

@keyframes login-background-flow {
  0% {
    background-position: 0% 10%, 100% 18%, 48% 100%, 0 0;
  }

  100% {
    background-position: 28% 0%, 72% 42%, 58% 76%, 0 0;
  }
}

@keyframes login-particles-drift {
  0% {
    background-position: 0 0, 42px 66px, 86px 16px, 120px 96px;
    transform: translate3d(-18px, 12px, 0) scale(1);
  }

  50% {
    background-position: 118px 72px, 80px 0, 0 126px, 210px 52px;
    transform: translate3d(14px, -18px, 0) scale(1.04);
  }

  100% {
    background-position: 236px 144px, 0 164px, 206px 0, 0 260px;
    transform: translate3d(28px, -24px, 0) scale(1.08);
  }
}

@keyframes login-water-shimmer {
  0% {
    transform: translate3d(-18px, 14px, 0) rotate(-1deg);
  }

  100% {
    transform: translate3d(18px, -14px, 0) rotate(1deg);
  }
}

@keyframes login-hue-flow {
  0% {
    filter: hue-rotate(0deg) saturate(1.2);
  }

  50% {
    filter: hue-rotate(72deg) saturate(1.35);
  }

  100% {
    filter: hue-rotate(144deg) saturate(1.2);
  }
}

@keyframes login-hue-flow-blur {
  0% {
    filter: blur(16px) hue-rotate(0deg) saturate(1.15);
  }

  50% {
    filter: blur(18px) hue-rotate(72deg) saturate(1.3);
  }

  100% {
    filter: blur(16px) hue-rotate(144deg) saturate(1.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  body:has(#login-section:not(.hidden)),
  body:has(#admin-login-section:not(.hidden)),
  body:has(#login-section:not(.hidden))::before,
  body:has(#admin-login-section:not(.hidden))::before,
  body:has(#login-section:not(.hidden))::after,
  body:has(#admin-login-section:not(.hidden))::after {
    animation: none;
  }
}



/* sales-layout-responsive-20260702 */
body.sales-task-active .workspace-left {
  container-type: inline-size;
  min-width: 0;
}

body.sales-task-active .workspace-shell {
  grid-template-columns: minmax(0, 1fr) clamp(260px, 24vw, 340px);
}

body.sales-task-active .task-product-info-host,
body.sales-task-active .task-product-info-host .compact-details-content,
body.sales-task-active .product-context-label,
body.sales-task-active .image-type-picker,
body.sales-task-active .image-type-review-panel,
body.sales-task-active .image-type-active-layout {
  min-width: 0;
  max-width: 100%;
}

body.sales-task-active .lookup-tools-with-vision {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

body.sales-task-active .lookup-tools-with-vision > * {
  min-width: 0;
}

body.sales-task-active .vision-chat-panel.product-inline-vision {
  flex: 1 1 460px;
  display: grid;
  grid-template-columns: minmax(118px, .6fr) minmax(140px, .75fr) minmax(220px, 1.25fr) minmax(60px, auto);
  gap: 8px;
  min-width: 280px;
}

body.sales-task-active .product-inline-vision .chat-input-shell,
body.sales-task-active .product-inline-vision .reference-file-list,
body.sales-task-active .product-inline-vision .reference-preview-strip-empty {
  min-width: 0;
}

body.sales-task-active .image-type-picker {
  grid-template-columns: minmax(0, 1fr) minmax(240px, clamp(260px, 32%, 420px));
  align-items: stretch;
}

body.sales-task-active .image-type-options {
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  min-width: 0;
}

body.sales-task-active .image-type-option,
body.sales-task-active .image-type-select-all {
  min-width: 0;
}

body.sales-task-active .image-type-option strong {
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.sales-task-active .image-type-action-slot .fixed-generate-actions {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  width: 100%;
}

body.sales-task-active .image-type-active-layout,
body.sales-task-active .image-type-active-layout:has(.image-type-module-fields:not([open])) {
  grid-template-columns: minmax(260px, .86fr) minmax(320px, 1fr) minmax(220px, .58fr);
}

body.sales-task-active .image-type-module-field-grid {
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
}

body.sales-task-active .ingredient-direction-field,
body.sales-task-active .grid-product-mode-field {
  grid-column: 1 / -1;
}

body.sales-task-active .image-type-active-settings .row {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

body.sales-task-active .image-type-active-settings input,
body.sales-task-active .image-type-active-settings select,
body.sales-task-active .image-type-description-fields textarea,
body.sales-task-active .image-type-module-fields input,
body.sales-task-active .image-type-module-fields select,
body.sales-task-active .image-type-module-fields textarea {
  min-width: 0;
}

@container (max-width: 1080px) {
  body.sales-task-active .image-type-active-layout,
  body.sales-task-active .image-type-active-layout:has(.image-type-module-fields:not([open])) {
    grid-template-columns: minmax(260px, .9fr) minmax(0, 1fr);
  }

  body.sales-task-active .image-type-active-settings {
    grid-column: 1 / -1;
  }
}

@container (max-width: 880px) {
  body.sales-task-active .image-type-picker {
    grid-template-columns: 1fr;
  }

  body.sales-task-active .image-type-action-slot {
    justify-content: stretch;
  }

  body.sales-task-active .vision-chat-panel.product-inline-vision {
    flex-basis: 100%;
    grid-template-columns: minmax(120px, 1fr) minmax(140px, 1fr);
  }

  body.sales-task-active .product-inline-vision .chat-input-shell,
  body.sales-task-active .product-inline-vision .reference-file-list {
    grid-column: 1 / -1;
  }
}

@container (max-width: 720px) {
  body.sales-task-active .image-type-active-layout,
  body.sales-task-active .image-type-active-layout:has(.image-type-module-fields:not([open])) {
    grid-template-columns: 1fr;
  }

  body.sales-task-active .image-type-active-settings {
    grid-column: auto;
  }

  body.sales-task-active .image-type-module-field-grid,
  body.sales-task-active .image-type-active-settings .row {
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  }
}

@media (max-width: 1180px) {
  body.sales-task-active .workspace-shell {
    grid-template-columns: 1fr;
  }

  body.sales-task-active .workspace-history-drawer {
    position: static;
    width: auto;
    max-height: none;
    overflow: visible;
  }
}
