:root {
  --ui-bg: #f4f6f8;
  --ui-surface: #ffffff;
  --ui-muted: #667085;
  --ui-text: #151b26;
  --ui-line: #dfe4ea;
  --ui-line-strong: #cfd6df;
  --shop-accent: #087f5b;
  --shop-accent-soft: #e8f6f1;
  --women-accent: #d5544d;
  --women-accent-soft: #fff0ed;
}

html { scroll-behavior: smooth; }
body.app-project-shop,
body.app-project-womens {
  background: var(--ui-bg) !important;
  color: var(--ui-text) !important;
  letter-spacing: 0;
  overflow-x: hidden;
}

.app-project-shop .women-sidebar,
.app-project-womens .shop-sidebar { display: none !important; }

.product-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 45;
  width: 220px;
  padding: 18px 14px;
  background: #fbfcfd;
  border-right: 1px solid var(--ui-line);
  color: var(--ui-text);
  display: flex;
  flex-direction: column;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 22px;
  color: var(--ui-text);
  text-decoration: none;
}
.sidebar-brand img { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; box-shadow: none; }
.sidebar-brand span { min-width: 0; display: grid; gap: 2px; }
.sidebar-brand strong { font-size: 13px; line-height: 1.35; }
.sidebar-brand small { font-size: 10px; color: #98a2b3; }
.product-sidebar nav { display: grid; gap: 5px; }
.product-sidebar nav a {
  min-height: 40px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #5e6878;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}
.product-sidebar nav a:hover { background: #f1f4f7; color: var(--ui-text); }
.product-sidebar nav a.active { background: var(--shop-accent-soft); border-color: #bfe5d7; color: #066b4d; }
.app-project-womens .product-sidebar nav a.active { background: var(--women-accent-soft); border-color: #f1c9c4; color: #a43d37; }
.nav-glyph {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--ui-line-strong);
  color: inherit;
  font: 700 14px/1 system-ui, sans-serif;
}
.sidebar-foot {
  margin-top: auto;
  padding: 12px;
  border: 1px solid var(--ui-line);
  border-radius: 7px;
  background: #fff;
  display: grid;
  gap: 3px;
}
.sidebar-foot span { color: #98a2b3; font-size: 9px; text-transform: uppercase; }
.sidebar-foot strong { font-size: 11px; color: #475467; }

#app > header,
#app > main,
#app > footer { margin-left: 220px; width: calc(100% - 220px) !important; }
#app > header {
  background: rgba(255, 255, 255, .96) !important;
  border-color: var(--ui-line) !important;
  backdrop-filter: blur(14px);
}
#app > header .layout-shell { max-width: 1500px; padding-left: 26px; padding-right: 26px; }
#app > header h1 { color: var(--ui-text) !important; }
#app > header .bobo-header-icon { border-radius: 7px !important; box-shadow: none !important; --tw-ring-color: transparent !important; }
#app > header [class*="text-amber"] { color: #344054 !important; font-weight: 700; }
#app > header input {
  background: #fff !important;
  border-color: var(--ui-line-strong) !important;
  color: var(--ui-text) !important;
  border-radius: 6px !important;
}
#app > header button { border-radius: 6px !important; }
#app > main { max-width: none !important; padding: 24px 28px 52px !important; box-sizing: border-box; }
#app > main > .project-grid { max-width: 1500px; margin: 0 auto; }
#app > footer { background: #f8fafb !important; border-color: var(--ui-line) !important; }

.workspace-card {
  border: 1px solid var(--ui-line) !important;
  border-radius: 8px !important;
  background: var(--ui-surface) !important;
  box-shadow: 0 12px 35px rgba(26, 34, 48, .06) !important;
  overflow: visible !important;
}
.workspace-card > button:first-child {
  padding: 20px 22px !important;
  background: #fff !important;
  border-radius: 8px 8px 0 0;
}
.workspace-card > button:first-child:hover { background: #fafbfc !important; }
.workspace-card > button:first-child > div > div:first-child {
  width: 42px !important;
  height: 42px !important;
  border-radius: 7px !important;
  border: 0 !important;
  background: var(--shop-accent) !important;
  box-shadow: none !important;
  font-size: 0 !important;
}
.workspace-card > button:first-child > div > div:first-child::after { content: "▶"; color: #fff; font-size: 15px; }
#womens-wear-project > button:first-child > div > div:first-child { background: var(--women-accent) !important; }
#womens-wear-project > button:first-child > div > div:first-child::after { content: "◇"; }
.workspace-card > button:first-child h2 { color: var(--ui-text) !important; font-size: 20px !important; }
.workspace-card > button:first-child p { color: var(--ui-muted) !important; }
.workspace-card > button:first-child [class*="rounded-lg"] {
  color: #176b50 !important;
  background: var(--shop-accent-soft) !important;
  border-color: #c9e9dd !important;
  border-radius: 5px !important;
}
#womens-wear-project > button:first-child [class*="rounded-lg"] {
  color: #a43d37 !important;
  background: var(--women-accent-soft) !important;
  border-color: #f3d2ce !important;
}

.workspace-body,
.womens-workspace-body {
  background: #f7f9fb !important;
  border-color: var(--ui-line) !important;
}
.workspace-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  padding: 18px;
  align-items: start;
}
.workflow-steps {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--ui-line);
  border-radius: 7px;
  background: #fff;
}
.workflow-steps span {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-right: 1px solid #edf0f3;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 600;
}
.workflow-steps span:last-child { border-right: 0; }
.workflow-steps b {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef1f4;
  color: #7b8492;
  font-size: 10px;
}
.workflow-steps .done,
.workflow-steps .current { color: #176b50; }
.workflow-steps .done b,
.workflow-steps .current b { background: var(--shop-accent); color: #fff; }
.women-steps .done,
.women-steps .current { color: #a43d37; }
.women-steps .done b,
.women-steps .current b { background: var(--women-accent); }

.workspace-editor {
  grid-column: 1;
  min-width: 0;
  border: 1px solid var(--ui-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  overflow: visible !important;
}
.workspace-section-heading {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
}
.workspace-section-heading > span {
  flex: 0 0 auto;
  color: var(--shop-accent);
  font-size: 10px;
  font-weight: 800;
  line-height: 22px;
}
.app-project-womens .workspace-section-heading > span { color: var(--women-accent); }
.workspace-section-heading h3 { margin: 0; color: var(--ui-text); font-size: 13px; line-height: 1.5; }
.workspace-section-heading p { margin: 2px 0 0; color: #8993a2; font-size: 10px; line-height: 1.5; }
.workspace-section-heading-wide { flex-basis: 100%; margin: 8px 0 4px; }

.workspace-editor [class*="border-white"],
.womens-workspace-body [class*="border-white"] { border-color: var(--ui-line) !important; }
.workspace-editor [class*="bg-black"],
.womens-workspace-body [class*="bg-black"] { background-color: #f7f9fb !important; }
.workspace-editor [class*="bg-[#"],
.womens-workspace-body [class*="bg-[#"] { background-color: #fff !important; }
.workspace-card [class*="text-gray-"] { color: #667085 !important; }
.workspace-card [class*="text-white"] { color: var(--ui-text) !important; }
.workspace-card textarea,
.workspace-card input,
.workspace-card select {
  color: var(--ui-text) !important;
  background-color: #fff !important;
  border-color: var(--ui-line-strong) !important;
}
.workspace-editor textarea {
  min-height: 154px !important;
  margin-top: 3px;
  padding: 13px !important;
  border: 1px solid var(--ui-line) !important;
  border-radius: 7px !important;
  background: #fbfcfd !important;
  color: var(--ui-text) !important;
}
.workspace-card video { background: #0d1117 !important; }
.workspace-editor button,
.womens-workspace-body button,
.workspace-task-list button { border-radius: 6px !important; box-shadow: none !important; }
.workspace-editor button[class*="border-amber"] {
  color: #8a4b08 !important;
  background: #fff8e8 !important;
  border-color: #ecd4a5 !important;
}
.workspace-settings { padding: 16px !important; background: #fbfcfd; border-color: var(--ui-line) !important; }
.workspace-settings button.w-11 {
  background: var(--shop-accent) !important;
  color: #fff !important;
  border-radius: 50% !important;
}
.workspace-settings button.w-11:disabled { background: #d7dde4 !important; color: #87909e !important; }

.workspace-preview-rail {
  grid-column: 2;
  grid-row: 2;
  position: sticky;
  top: 92px;
  padding: 14px;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}
.preview-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.preview-title div { display: grid; gap: 3px; }
.preview-title strong { color: var(--ui-text); font-size: 12px; }
.preview-title small { color: #98a2b3; font-size: 9px; }
.preview-title > span {
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--shop-accent-soft);
  color: #087153;
  font-size: 9px;
  font-weight: 700;
}
.women-preview-rail .preview-title > span { background: var(--women-accent-soft); color: #a43d37; }
.shop-preview-frame,
.women-preview-frame {
  width: 100%;
  overflow: hidden;
  border-radius: 7px;
  background: #111820;
  border: 1px solid #26303b;
}
.shop-preview-frame { aspect-ratio: 16 / 10; }
.women-preview-frame { aspect-ratio: 9 / 14; }
.shop-preview-frame video,
.women-preview-frame video,
.women-preview-frame img { width: 100%; height: 100%; object-fit: contain; }
.preview-empty {
  width: 100%;
  height: 100%;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: #cbd3dc;
}
.preview-empty i { width: 38px; height: 38px; border: 1px solid #4f5b68; border-radius: 50%; display: grid; place-items: center; font-style: normal; margin-bottom: 9px; }
.preview-empty strong { color: #f4f6f8; font-size: 12px; }
.preview-empty span { margin-top: 5px; color: #7e8996; font-size: 9px; line-height: 1.5; }
.preview-status-list { margin-top: 12px; display: grid; gap: 0; border: 1px solid var(--ui-line); border-radius: 7px; overflow: hidden; }
.preview-status-list > div { min-height: 38px; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #edf0f3; font-size: 10px; }
.preview-status-list > div:last-child { border-bottom: 0; }
.preview-status-list span { color: #667085; }
.preview-status-list b { color: #98a2b3; font-weight: 600; }
.preview-status-list b.ready { color: #087153; }
.preview-status-list b.working { color: #b36a05; }
.workspace-task-list { grid-column: 1 / -1; min-width: 0; }
.workspace-task-list > div,
.workspace-task-list > section { background: #fff !important; border-color: var(--ui-line) !important; border-radius: 8px !important; }

.womens-workspace-body { padding: 18px !important; }
.women-workspace-grid { display: block; }
.women-workflow-main {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 12px 18px;
  align-items: start;
}
.women-workflow-main > *:not(.women-preview-rail) { grid-column: 1; }
.women-workflow-main > div:first-of-type + div { gap: 12px !important; }
.women-workflow-main [class*="aspect-"] { border-radius: 7px !important; background: #f6f7f9 !important; border-color: var(--ui-line-strong) !important; }
.women-workflow-main button[class*="border-emerald"] {
  color: #a43d37 !important;
  background: var(--women-accent-soft) !important;
  border-color: #efc5c0 !important;
}
.women-workflow-main button[class*="border-violet"] {
  color: #fff !important;
  background: var(--women-accent) !important;
  border-color: var(--women-accent) !important;
}
.women-workflow-main button[class*="border-cyan"] {
  color: #344054 !important;
  background: #fff !important;
  border-color: var(--ui-line-strong) !important;
}
.women-preview-rail { grid-column: 2; grid-row: 1 / span 40; top: 92px; }

#seedance-boot-hint {
  position: fixed;
  left: 220px;
  right: 0;
  z-index: 80;
  color: #475467 !important;
  background: #fff !important;
  border-color: var(--ui-line) !important;
}

@media (max-width: 1050px) {
  .workspace-body { grid-template-columns: minmax(0, 1fr) 270px; }
  .women-workflow-main { grid-template-columns: minmax(0, 1fr) 270px; }
}

@media (max-width: 860px) {
  .product-sidebar {
    position: static;
    width: 100%;
    min-height: auto;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--ui-line);
    display: block;
  }
  .sidebar-brand { padding: 0 2px 9px; }
  .sidebar-brand small,
  .sidebar-foot { display: none; }
  .product-sidebar nav { display: flex; overflow-x: auto; gap: 6px; }
  .product-sidebar nav a { flex: 0 0 auto; min-height: 34px; padding: 0 9px; }
  .nav-glyph { width: 19px; height: 19px; }
  #app > header,
  #app > main,
  #app > footer { margin-left: 0; width: 100% !important; }
  #seedance-boot-hint { left: 0; }
  #app > main { padding: 14px 12px 36px !important; }
  .workspace-body,
  .women-workflow-main { grid-template-columns: 1fr; }
  .workspace-preview-rail,
  .women-preview-rail { grid-column: 1; grid-row: auto; position: static; }
  .shop-preview-frame { aspect-ratio: 16 / 9; }
  .women-preview-frame { max-height: 560px; }
}

@media (max-width: 560px) {
  #app > header .layout-shell { padding-left: 12px; padding-right: 12px; }
  #app > header .bobo-header-icon { display: none; }
  .workspace-card > button:first-child { padding: 15px !important; }
  .workspace-card > button:first-child > div > div:first-child { display: none !important; }
  .workspace-card > button:first-child h2 { font-size: 17px !important; }
  .workspace-body,
  .womens-workspace-body { padding: 10px !important; gap: 10px; }
  .workflow-steps { gap: 2px; padding: 8px 4px; }
  .workflow-steps span { gap: 4px; font-size: 9px; }
  .workflow-steps b { width: 17px; height: 17px; }
  .workspace-editor,
  .women-workflow-main,
  .workspace-preview-rail { border-radius: 7px !important; }
  .women-workflow-main { padding: 12px; }
  .workspace-section-heading p { display: none; }
}
