/* 风格词画类与列表 */
.style-words-picker {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: none;
  overflow: visible;
  padding: 0;
  border: none;
}

.wf-style-words-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wf-style-words-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.wf-style-words-selected-count {
  margin: 0;
}

.wf-style-words-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wf-style-word-cat-chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font);
}

.wf-style-word-cat-chip:hover:not(.is-active) {
  border-color: var(--accent);
}

.wf-style-word-cat-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.wf-style-words-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.wf-style-word-group {
  margin-bottom: 12px;
}

.wf-style-word-group:last-child {
  margin-bottom: 0;
}

.wf-style-word-group-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.wf-style-word-group-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.wf-style-word-item {
  margin: 0;
  font-size: 13px;
}

.style-words-picker.legacy-flat {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  max-height: 160px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.style-category-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 8px;
  width: 100%;
}

.style-category-chip {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: var(--bg);
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  font-family: var(--font);
  color: var(--text);
}

.style-category-chip:hover:not(.is-active) {
  border-color: var(--accent);
  background: rgba(0, 113, 227, 0.06);
}

.style-category-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.28);
}

.style-words-toolbar {
  margin-bottom: 20px;
}

.style-words-toolbar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.style-words-toolbar-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.style-words-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.style-words-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.style-words-search-input {
  flex: 1;
  min-width: 200px;
  max-width: 420px;
  height: 36px;
  font-size: 13px;
}

.style-words-search-hint {
  margin: 0;
  white-space: nowrap;
}

.style-words-list-card {
  width: 100%;
}

.style-words-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 4px;
}

.style-word-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.style-word-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.style-word-category-tag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-muted);
}

.style-word-name {
  font-weight: 600;
  font-size: 14px;
}

.style-word-status {
  font-size: 12px;
  color: var(--text-muted);
}

.style-word-status.is-disabled {
  color: var(--danger);
}

.style-word-card-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.style-word-prompt {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  word-break: break-word;
}

.style-word-domain-badge {
  font-size: 12px;
  color: var(--text-muted);
}

.style-word-images {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.style-word-images img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.platform-portal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 13px;
}

.platform-portal-links a {
  color: var(--accent);
  text-decoration: none;
}

.platform-portal-links a:hover {
  text-decoration: underline;
}

.platform-admin-card pre {
  font-size: 12px;
  background: var(--bg);
  padding: 10px;
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.platform-balance-result {
  margin-top: 8px;
  font-size: 12px;
  background: var(--bg);
  padding: 10px;
  border-radius: var(--radius-md);
}

.style-word-import-modal-card {
  max-width: 640px;
}

.style-word-import-hint {
  margin-bottom: 12px;
}

.style-word-import-textarea {
  min-height: 200px;
  margin-bottom: 0;
}

.style-word-import-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.style-word-import-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.style-word-import-buttons .btn-primary {
  flex: 0 0 auto;
  min-width: 100px;
}

.style-word-batch-modal-card {
  max-width: 720px;
}

.style-word-batch-target-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.style-word-batch-target-row .input {
  width: 88px;
}

.style-word-batch-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.style-word-batch-stats-pill {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.style-word-batch-stats-pill.is-pending {
  border-color: #1a73e8;
  background: #e8f0fe;
  color: #174ea6;
}

.style-word-batch-stats-pill.is-skipped {
  color: var(--text-muted);
}

.style-word-batch-summary {
  margin: 16px 0;
  padding: 12px 14px;
  background: var(--surface-elevated, #f6f7f9);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.style-word-batch-total {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
}

.style-word-batch-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.style-word-batch-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.style-word-batch-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1a73e8, #4285f4);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.style-word-batch-progress-text {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 36px;
  text-align: right;
}

.style-word-batch-current {
  font-size: 13px;
  color: var(--text-muted);
}

.style-word-batch-recent {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.style-word-batch-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: var(--surface);
}

.style-word-batch-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.style-word-batch-item-name {
  font-weight: 600;
}

.style-word-batch-item-status {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-elevated, #eee);
}

.style-word-batch-item-status.is-done {
  background: #e6f4ea;
  color: #137333;
}

.style-word-batch-item-status.is-partial {
  background: #fef7e0;
  color: #b06000;
}

.style-word-batch-item-status.is-failed {
  background: #fce8e6;
  color: #c5221f;
}

.style-word-batch-item-status.is-skipped {
  background: #f1f3f4;
  color: #5f6368;
}

.style-word-batch-item-msg {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.style-word-batch-item-prompt {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.4;
}

.style-word-batch-item-images {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.style-word-batch-item-images img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.style-word-batch-log {
  font-size: 12px;
  max-height: 120px;
  overflow-y: auto;
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-family: ui-monospace, monospace;
  white-space: pre-wrap;
}

.style-word-batch-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  width: min(420px, calc(100vw - 40px));
  max-height: min(70vh, 560px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
}

.style-word-batch-float-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.style-word-batch-float-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.style-word-batch-float-title {
  font-size: 14px;
  font-weight: 600;
}

.style-word-batch-float-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8f0fe;
  color: #174ea6;
}

.style-word-batch-float-badge.is-done {
  background: #e6f4ea;
  color: #137333;
}

.style-word-batch-float-badge.is-cancelled {
  background: #fef7e0;
  color: #b06000;
}

.style-word-batch-float-badge.is-error {
  background: #fce8e6;
  color: #c5221f;
}

.style-word-batch-float-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.style-word-batch-float-summary {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.style-word-batch-float-progress {
  margin: 0;
}

.style-word-batch-float-current {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.style-word-batch-float-recent {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  margin-top: 4px;
}

.style-word-batch-float-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  background: var(--surface-elevated, #f6f7f9);
}

.style-word-batch-float-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.style-word-batch-float-card-name {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
}

.style-word-batch-float-card-status {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #eee;
  flex-shrink: 0;
}

.style-word-batch-float-card-status.is-done {
  background: #e6f4ea;
  color: #137333;
}

.style-word-batch-float-card-status.is-partial {
  background: #fef7e0;
  color: #b06000;
}

.style-word-batch-float-card-status.is-failed {
  background: #fce8e6;
  color: #c5221f;
}

.style-word-batch-float-card-status.is-skipped {
  background: #f1f3f4;
  color: #5f6368;
}

.style-word-batch-float-card-prompt {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.35;
}

.style-word-batch-float-card-images {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.style-word-batch-float-card-images img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
}
