
.ai-page-head,
.ai-section-head {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: start;
      -ms-flex-align: start;
          align-items: flex-start;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.ai-page-head h2,
.ai-section-head h3 {
  font-size: 20px;
  margin: 0 0 4px;
  color: #17233d;
}
.ai-page-head p {
  margin: 0;
  color: #808695;
}
.ai-head-actions {
  min-width: 240px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-align: end;
      -ms-flex-align: end;
          align-items: flex-end;
}
.ai-balance {
  margin-top: 28px;
  color: #515a6e;
  font-size: 14px;
}
.ai-balance strong {
  color: #2d8cf0;
  font-size: 22px;
}
.ai-record-card {
  margin-top: 16px;
}
.ai-record-filter,
.ai-device-filter {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: end;
      -ms-flex-pack: end;
          justify-content: flex-end;
  gap: 8px;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
}
.ai-device-filter {
  margin-bottom: 12px;
}
.ai-record-page {
  margin-top: 12px;
  text-align: right;
}
.ai-config-layout {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  gap: 14px;
}
.ai-config-form {
  padding-right: 4px;
}
.ai-prompt-grid {
  display: block;
}
.ai-prompt-item.ivu-form-item {
  margin-bottom: 8px;
}
.ai-prompt-item .ivu-input {
  min-height: 46px;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.4;
}
.ai-preview-select {
  width: 140px;
  margin-right: 8px;
  text-align: left;
}
.ai-meta {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 16px;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  color: #515a6e;
  margin-left: 86px;
}
.ai-tip {
  color: #808695;
  margin-left: 12px;
}
.ai-debug-meta {
  line-height: 1.8;
  margin-bottom: 12px;
  word-break: break-all;
}
.ai-debug-meta p {
  margin: 0;
}
.ai-debug-prompt {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 8px;
}
.ai-debug-upload {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  margin-bottom: 12px;
}
.ai-preview-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ai-preview-panel {
  border: 1px solid #e8eaec;
  border-radius: 6px;
  min-height: 280px;
  padding: 12px;
}
.ai-panel-title {
  color: #17233d;
  font-weight: 600;
  margin-bottom: 10px;
}
.ai-ref-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.ai-thumb {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid #dcdee2;
  border-radius: 4px;
  overflow: hidden;
}
.ai-thumb img,
.ai-result {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
}
.ai-result {
  display: block;
  max-height: 420px;
}
.ai-record-thumb {
  width: 52px;
  height: 52px;
  -o-object-fit: cover;
     object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
}
.ai-record-preview img {
  width: 100%;
  max-height: 520px;
  -o-object-fit: contain;
     object-fit: contain;
  display: block;
  background: #f8f8f9;
}
.ai-record-preview p {
  margin: 12px 0 0;
  color: #515a6e;
  line-height: 1.7;
}
.ai-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
}
.ai-empty {
  color: #808695;
  height: 230px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  background: #f8f8f9;
}
.ai-prompt-cell {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-prompt-preview {
  max-height: 480px;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.8;
  color: #515a6e;
  word-break: break-all;
}

