:root {
  color: #172033;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 0;
  margin: 0;
  background: #f3f6fb;
}

.loginShell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: #f3f6fb;
}

.loginCard {
  width: min(420px, 100%);
}

.loginSubtitle {
  margin: 0 0 16px;
}

.loginError {
  margin-bottom: 16px;
}

.loginLabel {
  display: block;
  margin: 14px 0 7px;
  color: #344256;
  font-size: 13px;
  font-weight: 500;
}

.captchaRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: center;
  gap: 10px;
}

.captchaImageButton {
  display: block;
  width: 180px;
  height: 60px;
  flex: 0 0 180px;
  overflow: hidden;
  padding: 0;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  background: #f2f6fc;
  cursor: pointer;
}

.captchaImageButton img {
  display: block;
  width: 180px;
  height: 60px;
}

.loginSubmit {
  margin-top: 18px;
}

.shell {
  min-width: 1080px;
  min-height: 100vh;
}

.sider {
  min-height: 100vh;
  background: #0f1115 !important;
}

.brand {
  display: flex;
  height: 64px;
  align-items: center;
  gap: 11px;
  padding: 0 16px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.brandMark,
.menuMark {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1;
  text-align: center;
}

.sider .ant-menu {
  border-inline-end: 0 !important;
  background: #0f1115;
}

.sider .ant-menu-item {
  height: 44px;
  margin: 4px 8px;
  border-radius: 7px;
}

.sider .ant-menu-item-selected {
  background: #fff !important;
  color: #111827 !important;
}

.main {
  min-width: 0;
  min-height: 100vh;
  background: #f3f6fb;
}

.header {
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  border-bottom: 1px solid #dbe4ef;
  background: #fff;
}

.pageTitle {
  font-size: 18px;
  font-weight: 800;
}

.accountButton {
  display: flex;
  min-width: 220px;
  height: 40px;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.directionSwitch {
  width: 116px;
}

.platformMark {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  background: #eef6ff;
  color: #2f73b6;
  font-size: 10px;
  font-weight: 800;
}

.accountName {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content {
  padding: 20px 24px 32px;
}

.stack {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 16px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #dce5f0;
  border-radius: 8px;
  background: #fff;
}

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

.taskCard {
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid #dce5f0;
  border-radius: 9px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.taskCard:hover {
  border-color: #9fc3ee;
  box-shadow: 0 12px 28px rgba(39, 66, 96, .12);
  transform: translateY(-2px);
}

.taskCover {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: linear-gradient(135deg, #163b5c, #2877a8);
}

.taskBody {
  padding: 11px 12px 10px;
}

.taskTitle {
  min-height: 36px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.taskMeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  color: #7a899c;
  font-size: 10px;
}

.empty {
  grid-column: 1 / -1;
  padding: 80px 20px;
  border: 1px dashed #cfd9e5;
  border-radius: 8px;
  background: #fff;
  color: #7a899c;
  text-align: center;
}

.accountGrid {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 430px;
  overflow: hidden;
  border: 1px solid #dce5f0;
  border-radius: 8px;
}

.accountList {
  padding: 12px;
  border-right: 1px solid #dce5f0;
  background: #f7f9fc;
}

.accountListHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
}

.accountItem {
  width: 100%;
  margin-bottom: 7px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.accountItem.active {
  border-color: #acd0f5;
  background: #eef6ff;
}

.accountItemTitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
}

.accountItemMeta {
  margin-top: 5px;
  color: #7b899a;
  font-size: 10px;
  line-height: 1.5;
}

.accountSettings {
  padding: 20px 22px;
}

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

.identity {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.scheduleBox {
  padding: 14px;
  border: 1px solid #dce5f0;
  border-radius: 7px;
  background: #f8fbff;
}

.scheduleHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 800;
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.weekdays .ant-checkbox-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 7px 2px;
  border: 1px solid #dce5f0;
  border-radius: 6px;
  background: #fff;
  font-size: 10px;
}

.detailBody {
  max-height: calc(100vh - 135px);
  overflow: auto;
  padding: 18px 20px 22px;
  background: #f5f7fa;
}

.detailHeader {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #7a899c;
  font-size: 11px;
}

.versionBox {
  margin-bottom: 14px;
  border: 1px solid #dce5f0;
  border-radius: 8px;
  background: #fff;
}

.versionRow {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid #e1e8f0;
  border-radius: 7px;
  background: #fbfdff;
}

.versionRow + .versionRow {
  margin-top: 7px;
}

.versionSub {
  margin-top: 3px;
  color: #7a899c;
  font-size: 10px;
}

.reviewGrid {
  display: grid;
  grid-template-columns: minmax(340px, .85fr) minmax(480px, 1.15fr);
  gap: 14px;
}

.panel {
  padding: 14px;
  border: 1px solid #dce5f0;
  border-radius: 8px;
  background: #fff;
}

.panelTitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 800;
}

.mainAsset {
  display: block;
  width: 100%;
  border-radius: 7px;
  background: #edf2f7;
}

.mainAssetPreview {
  display: block;
  width: 100%;
}

.copyTitle {
  margin-bottom: 13px;
  font-size: 16px;
  font-weight: 800;
}

.copyText {
  color: #46576d;
  font-size: 12px;
  line-height: 1.85;
  white-space: pre-line;
}

.assetGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.assetCard {
  overflow: hidden;
  border: 1px solid #dce5f0;
  border-radius: 8px;
  background: #fff;
}

.assetCard img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.assetCard .ant-image {
  display: block;
  width: 100%;
}

.assetFoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 10px;
  font-size: 11px;
  font-weight: 700;
}

.detailActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e6ebf1;
}

.detailActionSpacer {
  flex: 1;
}

.referenceCard {
  border-color: #dce5f0;
}

.referenceList {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.referenceCard .ant-card-body {
  padding: 18px 20px;
}

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

.referenceMain {
  min-width: 0;
}

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

.referenceUrl {
  overflow: hidden;
  color: #718197;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.patternList {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.referenceLearningPreview {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 12px;
  margin-top: 13px;
  color: #52647a;
  font-size: 11px;
  line-height: 1.55;
}

.referenceLearningPreview > div {
  min-width: 0;
}

.learningLabel {
  display: block;
  margin-bottom: 3px;
  color: #1e3048;
  font-weight: 700;
}

.referenceDetailSection {
  margin-top: 22px;
}

.referenceDetailSection .ant-typography {
  margin-top: 0;
}

.referenceLearningGroups {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.referenceLearningGroups > div {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.referenceLearningGroups > div > .ant-typography {
  min-width: 76px;
  padding-top: 2px;
}

.referenceFeatureSummary {
  display: grid;
  gap: 9px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e4eaf2;
}

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

.referenceFeatureList > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 10px;
  border: 1px solid #e3eaf3;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 11px;
}

.referenceFeatureList .ant-tag {
  margin-inline-end: 0;
  font-size: 10px;
}

.referenceStrengthGroup {
  display: flex;
  margin-bottom: 6px;
}

.referenceStrengthHint {
  display: block;
}

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

.referenceImageCard {
  overflow: hidden;
  border: 1px solid #dce5f0;
  border-radius: 8px;
  background: #fff;
  color: #52647a;
  text-decoration: none;
}

.referenceImageCard .ant-image {
  display: block;
  width: 100%;
}

.referenceDetailImages img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #edf2f7;
}

.referenceImageCard > span {
  display: block;
  padding: 8px 10px;
  font-size: 11px;
}

.referenceRawText {
  max-height: 360px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  border: 1px solid #dce5f0;
  border-radius: 8px;
  background: #f7f9fc;
  color: #34445a;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.recipeGrid {
  display: grid;
  grid-template-columns: minmax(320px, .75fr) minmax(500px, 1.25fr);
  align-items: stretch;
  gap: 16px;
}

.recipeGrid .ant-card {
  min-height: calc(100vh - 104px);
}

.recipeGrid .ant-card-body {
  height: calc(100vh - 178px);
  min-height: 260px;
}

.markdown {
  height: 100% !important;
  min-height: 100% !important;
  resize: none;
  font-family: "Cascadia Code", Consolas, monospace;
  line-height: 1.65;
}

.historyLayout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
  height: 66vh;
  min-height: 420px;
}

.historyList {
  overflow: auto;
  border: 1px solid #dce5f0;
  border-radius: 8px;
  background: #f8fafc;
}

.historyItem {
  display: block;
  width: 100%;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid #e6edf5;
  background: transparent;
  color: #243247;
  text-align: left;
  cursor: pointer;
}

.historyItem:hover,
.historyItem.active {
  background: #eef6ff;
}

.historyItem > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.historyItem small,
.historyItem em {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  line-height: 1.45;
}

.historyPreview {
  height: 100%;
  margin: 0;
  overflow: auto;
  padding: 14px;
  border: 1px solid #dce5f0;
  border-radius: 8px;
  background: #101826;
  color: #dff4ff;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.promptCode {
  overflow: auto;
  padding: 13px;
  border-radius: 7px;
  background: #101826;
  color: #dff4ff;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.featureSelector {
  overflow: hidden;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  background: #f8fafc;
}

.featureSelectorHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #dbe5f1;
  background: #fff;
}

.featureSelectorHeader > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.featureSelectorHeader span {
  color: #7b8ba1;
  font-size: 11px;
}

.featureGroups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-height: 330px;
  overflow-y: auto;
  padding: 12px;
}

.featureGroup {
  align-self: start;
  overflow: hidden;
  border: 1px solid #e0e8f2;
  border-radius: 7px;
  background: #fff;
}

.featureGroupTitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #edf1f6;
  background: #f5f8fc;
  color: #24364e;
  font-size: 12px;
  font-weight: 700;
}

.featureGroupTitle span {
  color: #8492a6;
  font-size: 11px;
  font-weight: 400;
}

.featureOption {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid #f0f3f7;
  cursor: pointer;
}

.featureOption:last-child {
  border-bottom: 0;
}

.featureOption:hover {
  background: #f8fbff;
}

.featureOptionBody {
  display: grid;
  min-width: 0;
  gap: 3px;
  color: #718096;
  font-size: 11px;
  line-height: 1.5;
}

.featureOptionTitle {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  color: #17263b;
  font-size: 12px;
  font-weight: 600;
}

.featureOptionTitle .ant-tag {
  margin-inline-end: 0;
  font-size: 10px;
  line-height: 17px;
}

.featureSelectorHint {
  display: block;
  padding: 0 14px 12px;
  font-size: 11px;
}

.createContentModal .ant-modal-body {
  max-height: calc(100vh - 210px);
  overflow-y: auto;
  padding-right: 6px;
}

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

.planCard {
  min-height: 230px;
  border: 1px solid #d9e4f2;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  cursor: pointer;
  padding: 12px;
  text-align: left;
}

.planCard.active {
  border-color: #1677ff;
  background: #f0f7ff;
  box-shadow: inset 3px 0 0 #1677ff;
}

.planCardTitle {
  color: #111827;
  font-size: 15px;
  font-weight: 850;
}

.planCardMeta {
  display: inline-block;
  margin-top: 6px;
  border-radius: 999px;
  background: #eef2f7;
  color: #526174;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
}

.planCard p {
  margin: 9px 0;
  color: #4b5b70;
  font-size: 12px;
  line-height: 1.45;
}

.planCard dl {
  margin: 0;
}

.planCard dt {
  margin-top: 8px;
  color: #6b778a;
  font-size: 12px;
  font-weight: 800;
}

.planCard dd {
  margin: 3px 0 0;
  color: #263247;
  font-size: 12px;
  line-height: 1.4;
}

@media (max-width: 1460px) {
  .gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .historyLayout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .historyList {
    max-height: 220px;
  }

  .recipeGrid .ant-card {
    min-height: 430px;
  }

  .recipeGrid .ant-card-body {
    height: 360px;
  }
}

@media (max-width: 1080px) {
  .referenceContent {
    grid-template-columns: 1fr;
  }

  .referenceActions {
    justify-content: flex-start;
  }

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

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

}

@media (max-width: 760px) {
  .featureGroups {
    grid-template-columns: 1fr;
  }
}
