:root {
    --ws-bg: #1a1a1a;
    --ws-surface: #222222;
    --ws-surface-hover: #2a2a2a;
    --ws-surface-light: #2e2e2e;
    --ws-border: rgba(255, 255, 255, 0.08);
    --ws-border-light: rgba(255, 255, 255, 0.12);
    --ws-text: #e0e0e0;
    --ws-text-dim: #999999;
    --ws-text-muted: #666666;
    --ws-accent: #6c63ff;
    --ws-accent-hover: #7b73ff;
    --ws-success: #4caf50;
    --ws-warning: #ffa726;
    --ws-danger: #ef5350;
    --ws-gold: #ffc107;
    --ws-diamond: #29b6f6;
    --ws-input-bg: #161616;
    --ws-input-border: rgba(255, 255, 255, 0.15);
    --ws-card-bg: #282828;
    --ws-offline-card-min: 240px;
    --ws-card-border: rgba(255, 255, 255, 0.06);
    --ws-settings-width: 440px;
    --ws-scrollbar-bg: rgba(255, 255, 255, 0.05);
    --ws-scrollbar-thumb: rgba(255, 255, 255, 0.15);
    --ws-transition: 0.2s ease;
    --ws-result-card-min: 240px;
}

/* ===== Workspace Layout ===== */
.ai-workspace {
    display: flex;
    height: calc(100vh - 56px);
    background: var(--ws-bg);
    overflow: hidden;
}

.ai-workspace-settings {
    width: var(--ws-settings-width);
    min-width: var(--ws-settings-width);
    display: flex;
    flex-direction: column;
    background: var(--ws-surface);
    border-right: 1px solid var(--ws-border);
}

.ai-workspace-settings-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
}

.ai-workspace-settings-scroll::-webkit-scrollbar {
    width: 6px;
}
.ai-workspace-settings-scroll::-webkit-scrollbar-track {
    background: var(--ws-scrollbar-bg);
}
.ai-workspace-settings-scroll::-webkit-scrollbar-thumb {
    background: var(--ws-scrollbar-thumb);
    border-radius: 3px;
}
.ai-workspace-settings-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.ai-workspace-settings-footer {
    border-top: 1px solid var(--ws-border);
    padding: 12px 16px;
    background: var(--ws-surface);
    flex-shrink: 0;
}

.ai-workspace-results {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--ws-bg);
}

.ai-workspace-results-inner {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.ai-workspace-results-inner::-webkit-scrollbar {
    width: 6px;
}
.ai-workspace-results-inner::-webkit-scrollbar-track {
    background: var(--ws-scrollbar-bg);
}
.ai-workspace-results-inner::-webkit-scrollbar-thumb {
    background: var(--ws-scrollbar-thumb);
    border-radius: 3px;
}

/* ===== Section Titles ===== */
.ws-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ws-text-muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ws-section-title i {
    font-size: 0.75rem;
}

/* ===== Member Banner ===== */
.ws-member-banner {
    background: linear-gradient(135deg, #2e2e2e 0%, #333333 100%);
    border: 1px solid var(--ws-border-light);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: border-color var(--ws-transition);
}
.ws-member-banner:hover {
    border-color: var(--ws-accent);
}
.ws-member-banner-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ws-gold);
}
.ws-member-banner-sub {
    font-size: 0.75rem;
    color: var(--ws-text-dim);
    margin-top: 2px;
}
.ws-member-banner .btn {
    font-size: 0.75rem;
    padding: 4px 12px;
    margin-top: 8px;
}

/* ===== Prompt Input ===== */
.ws-prompt-container {
    margin-bottom: 16px;
}
.ws-prompt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.ws-prompt-header .ws-section-title {
    margin-bottom: 0;
}
.ws-prompt-actions a {
    font-size: 0.7rem;
    color: var(--ws-text-muted);
    text-decoration: none;
}
.ws-prompt-actions a:hover {
    color: var(--ws-accent);
}

.ws-prompt-textarea {
    width: 100%;
    min-height: 80px;
    max-height: 200px;
    background: var(--ws-input-bg);
    border: 1px solid var(--ws-input-border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--ws-text);
    font-size: 0.82rem;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    outline: none;
    transition: border-color var(--ws-transition);
    position: relative;
}
.ws-prompt-textarea:focus {
    border-color: var(--ws-accent);
}
.ws-prompt-textarea[contenteditable="true"].empty:before {
    content: attr(data-placeholder);
    color: var(--ws-text-muted);
    position: absolute;
    pointer-events: none;
    font-size: 0.82rem;
}

/* ===== Tags ===== */
.ws-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 0;
}
.ws-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(108, 99, 255, 0.15);
    border: 1px solid rgba(108, 99, 255, 0.3);
    color: #b4b0ff;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all var(--ws-transition);
}
.ws-tag-chip:hover {
    background: rgba(108, 99, 255, 0.25);
}
.ws-tag-chip .ws-tag-remove {
    font-size: 0.6rem;
    opacity: 0.6;
    margin-left: 2px;
}
.ws-tag-chip .ws-tag-remove:hover {
    opacity: 1;
    color: var(--ws-danger);
}
.ws-tag-chip-cover {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
.ws-tag-weight {
    font-size: 0.65rem;
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(76, 175, 80, 0.2);
    color: #81c784;
    cursor: pointer;
}
.ws-tag-weight.default {
    background: rgba(255, 167, 38, 0.2);
    color: #ffb74d;
}
.ws-tag-chip-tooltip-trigger {
    cursor: pointer;
}
.ws-chip-color-wrap {
    margin-left: 2px;
    vertical-align: middle;
    position: relative;
    display: inline-block;
}
.ws-chip-color-wrap .ws-chip-color-btn {
    border-radius: 3px;
    border: 1px solid var(--ws-border, #444);
}
.ws-chip-color-wrap .dropdown-menu.ws-color-dropdown {
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
/* 芯片上的颜色选择器：高度自适应、无滚动条，出现在标签正下方 */
.ws-chip-color-wrap .ws-chip-color-dropdown {
    max-height: none;
    overflow: visible;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
/* 覆盖 Bootstrap .dropdown-menu 的 display:none，用 Vue 控制的 .show 时强制显示 */
.ws-chip-color-wrap .ws-chip-color-dropdown.show {
    display: block !important;
}

/* ===== Card Select (Model, Style) ===== */
.ws-card-select {
    margin-bottom: 16px;
}
.ws-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
}
.ws-card-option {
    background: var(--ws-card-bg);
    border: 2px solid var(--ws-card-border);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    transition: all var(--ws-transition);
    text-align: center;
}
.ws-card-option:hover {
    border-color: rgba(108, 99, 255, 0.3);
    background: var(--ws-surface-hover);
}
.ws-card-option.selected {
    border-color: var(--ws-accent);
    background: rgba(108, 99, 255, 0.1);
}
.ws-card-option-name {
    font-size: 0.7rem;
    color: var(--ws-text);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Form Controls (Dark) ===== */
.ws-form-group {
    margin-bottom: 12px;
}
.ws-form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--ws-text-dim);
    margin-bottom: 4px;
}
.ws-form-label .fa-question-circle {
    font-size: 0.65rem;
    cursor: help;
}
.ws-select {
    width: 100%;
    background: var(--ws-input-bg);
    border: 1px solid var(--ws-input-border);
    border-radius: 6px;
    padding: 6px 10px;
    color: var(--ws-text);
    font-size: 0.8rem;
    outline: none;
    appearance: auto;
    transition: border-color var(--ws-transition);
}
.ws-select:focus {
    border-color: var(--ws-accent);
}
/* 有任意 option 选中时，select 外框显示紫色 */
.ws-select.ws-select-has-selection {
    border-color: var(--ws-accent);
}
.ws-select option {
    background: var(--ws-surface);
    color: var(--ws-text);
}
/* 显式高亮选中项，避免部分浏览器因 option 统一样式而不显示 selected 状态 */
.ws-select option:checked,
.ws-select option[selected] {
    background: rgba(108, 99, 255, 0.25);
    color: var(--ws-accent, #6c63ff);
}
/* 全设置面板：未选中项用灰白字，避免黑字在深色背景上看不清 */
#ws_advanced_settings .ws-select option {
    background: var(--ws-surface);
    color: var(--ws-text);
}
#ws_advanced_settings .ws-select option:checked,
#ws_advanced_settings .ws-select option[selected] {
    background: rgba(108, 99, 255, 0.25);
    color: var(--ws-accent, #6c63ff);
}

/* 全设置里颜色下拉：限制宽度，避免 width:100% 继承大容器变成 1728px */
#ws_advanced_settings .sub_prompt_group_container .dropdown-menu.ws-color-dropdown {
    max-width: 320px;
    min-width: 200px;
}

/* ===== Radio Button Presets (Dimensions) ===== */
.ws-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ws-radio-pill {
    padding: 5px 12px;
    border-radius: 6px;
    background: var(--ws-input-bg);
    border: 1px solid var(--ws-input-border);
    color: var(--ws-text-dim);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--ws-transition);
    white-space: nowrap;
}
.ws-radio-pill:hover {
    border-color: rgba(108, 99, 255, 0.3);
    color: var(--ws-text);
}
.ws-radio-pill.selected {
    background: rgba(108, 99, 255, 0.15);
    border-color: var(--ws-accent);
    color: var(--ws-accent);
}
.ws-radio-pill input[type="radio"] {
    display: none;
}

/* ===== Toggle Switch (Dark) ===== */
.ws-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ws-toggle-label {
    font-size: 0.78rem;
    color: var(--ws-text);
}
.ws-toggle .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--ws-accent);
    border-color: var(--ws-accent);
}

/* ===== Collapsible Section ===== */
.ws-collapsible {
    margin-bottom: 12px;
}
.ws-collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--ws-card-bg);
    border: 1px solid var(--ws-card-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--ws-transition);
}
.ws-collapsible-header:hover {
    background: var(--ws-surface-hover);
}
.ws-collapsible-header .ws-section-title {
    margin-bottom: 0;
}
.ws-collapsible-header i.ws-chevron {
    font-size: 0.7rem;
    color: var(--ws-text-muted);
    transition: transform var(--ws-transition);
}
.ws-collapsible-header[aria-expanded="true"] i.ws-chevron {
    transform: rotate(180deg);
}
/* 有选中标签时小分类栏目高亮（深紫背景+浅紫边框，与芯片一致） */
.ws-detail-category-header-has-selected {
    background: rgba(108, 99, 255, 0.2) !important;
    border-color: rgba(108, 99, 255, 0.45) !important;
}
.ws-detail-category-header-has-selected:hover {
    background: rgba(108, 99, 255, 0.28) !important;
}
/* 小分类标题行：标题 + x N + 标签名（单行省略） */
.ws-detail-category-header-inner {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    gap: 6px;
}
.ws-detail-category-header-inner .ws-section-title {
    flex-shrink: 0;
}
.ws-detail-category-count {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: var(--ws-text-muted);
}
.ws-detail-category-capsules-wrap {
    min-width: 0;
    overflow: hidden;
    flex: 1;
}
.ws-detail-category-capsules-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.68rem;
    color: var(--ws-text-muted);
    background: var(--ws-surface);
    border-radius: 999px;
    padding: 2px 8px;
    max-width: 100%;
}
/* 小小分类行：有选中时高亮；后面接可换行的芯片列表，点击芯片取消选中；小芯片与小小分类名垂直居中对齐 */
.ws-form-label-row {
    margin-bottom: 4px;
    align-items: center;
}
.ws-form-label-row .ws-form-label-text {
    font-size: 0.78rem;
    color: var(--ws-text);
    font-weight: 600;
    line-height: 1.3;
}
.ws-form-label-row-has-selected .ws-form-label-text {
    color: #b4b0ff;
}
.ws-detail-lv2-chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    vertical-align: middle;
}
.ws-detail-lv2-chip {
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.65rem;
    border-radius: 4px;
    background: rgba(108, 99, 255, 0.15);
    border: 1px solid rgba(108, 99, 255, 0.3);
    color: #b4b0ff;
    cursor: pointer;
    transition: all var(--ws-transition);
}
.ws-detail-lv2-chip:hover {
    background: rgba(108, 99, 255, 0.25);
    border-color: rgba(108, 99, 255, 0.5);
}
.ws-collapsible-body {
    padding: 12px;
    background: var(--ws-surface-light);
    border: 1px solid var(--ws-card-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
}

/* ===== Price Display ===== */
.ws-price-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--ws-text-dim);
    margin-bottom: 8px;
}
.ws-price-gold {
    color: var(--ws-gold);
    font-weight: 600;
}
.ws-price-diamond {
    color: var(--ws-diamond);
    font-weight: 600;
}
.ws-price-free {
    color: var(--ws-success);
    font-weight: 600;
}
.ws-price-crossed {
    text-decoration: line-through;
    opacity: 0.6;
}

/* ===== Footer Create Area ===== */
.ws-batch-slider-row {
    margin-bottom: 8px;
}
.ws-batch-value {
    display: inline-block;
    background: var(--ws-input-bg);
    border: 1px solid var(--ws-input-border);
    border-radius: 4px;
    padding: 2px 10px;
    color: var(--ws-text);
    font-size: 0.82rem;
    font-weight: 600;
    min-width: 36px;
    text-align: center;
}
.ws-batch-slider {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--ws-border-light);
    border-radius: 3px;
    outline: none;
}
.ws-batch-slider::-webkit-slider-runnable-track {
    height: 5px;
    border-radius: 3px;
}
.ws-batch-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--ws-accent);
    cursor: pointer;
    margin-top: -6px;
}
.ws-batch-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--ws-accent);
    cursor: pointer;
    border: none;
}
.ws-create-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ws-batch-select {
    width: 80px;
    background: var(--ws-input-bg);
    border: 1px solid var(--ws-input-border);
    border-radius: 6px;
    padding: 8px 10px;
    color: var(--ws-text);
    font-size: 0.85rem;
    outline: none;
    flex-shrink: 0;
}
.ws-btn-create {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--ws-accent) 0%, #5a52d5 100%);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--ws-transition);
}
.ws-btn-create:hover {
    background: linear-gradient(135deg, var(--ws-accent-hover) 0%, #6a62e5 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}
.ws-btn-create:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.ws-btn-create.processing {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}
.ws-btn-offline {
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background: var(--ws-warning);
    color: #1a1a1a;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--ws-transition);
}
.ws-btn-offline:hover {
    background: #ffb740;
}
.ws-btn-menu {
    padding: 10px 12px;
    border: 1px solid var(--ws-input-border);
    border-radius: 8px;
    background: var(--ws-input-bg);
    color: var(--ws-text-dim);
    cursor: pointer;
    flex-shrink: 0;
}
.ws-btn-menu:hover {
    border-color: var(--ws-accent);
    color: var(--ws-text);
}

/* ===== Banner in Results Panel ===== */
.ws-results-banner-area {
    flex-shrink: 0;
    padding: 10px 12px 0;
}
.ws-results-banner-area .ws-member-banner {
    position: relative;
    margin-bottom: 0;
}
.ws-banner-dismiss {
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--ws-text-muted);
    cursor: pointer;
    z-index: 2;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.ws-banner-dismiss:hover {
    opacity: 1;
    color: var(--ws-text);
}

/* ===== Results Tabs ===== */
.ws-results-tabs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    border-bottom: 1px solid var(--ws-border);
    flex-shrink: 0;
    gap: 8px;
    min-height: 40px;
}
.ws-results-tabs-left {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}
.ws-results-tabs-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.ws-tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 12px;
    font-size: 0.78rem;
    color: var(--ws-text-muted);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.ws-tab-btn:hover {
    color: var(--ws-text);
}
.ws-tab-btn:focus,
.ws-tab-btn:active {
    outline: none;
    box-shadow: none;
}
.ws-tab-btn.active {
    color: var(--ws-accent);
    border-bottom-color: var(--ws-accent);
    font-weight: 600;
}
.ws-tab-badge {
    display: inline-block;
    background: var(--ws-danger);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    padding: 0 4px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Zoom Control */
.ws-zoom-control {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ws-zoom-slider {
    width: 80px;
    height: 3px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--ws-border-light);
    border-radius: 2px;
    outline: none;
}
.ws-zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ws-text-dim);
    cursor: pointer;
}
.ws-zoom-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ws-text-dim);
    cursor: pointer;
    border: none;
}

/* Feedback Button */
.ws-feedback-btn {
    background: none;
    border: 1px solid var(--ws-border-light);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.72rem;
    color: var(--ws-text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.ws-feedback-btn:hover {
    border-color: var(--ws-accent);
    color: var(--ws-text);
}

/* Tab Content */
.ws-tab-content {
    display: none;
    min-height: 0;
    flex: 1;
    overflow: hidden;
}
.ws-tab-content.active {
    display: flex;
    flex-direction: column;
}
.ws-tab-content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}
.ws-tab-content-scroll::-webkit-scrollbar {
    width: 6px;
}
.ws-tab-content-scroll::-webkit-scrollbar-track {
    background: var(--ws-scrollbar-bg);
}
.ws-tab-content-scroll::-webkit-scrollbar-thumb {
    background: var(--ws-scrollbar-thumb);
    border-radius: 3px;
}
.ws-tab-content-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Refund Sub-tabs */
.ws-refund-subtabs {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--ws-border);
}
.ws-refund-subtab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--ws-text-muted);
    font-size: 0.75rem;
    padding: 6px 8px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    text-align: center;
}
.ws-refund-subtab:hover {
    color: var(--ws-text-dim);
}
.ws-refund-subtab:focus,
.ws-refund-subtab:active {
    outline: none;
    box-shadow: none;
}
.ws-refund-subtab.active {
    color: var(--ws-accent);
    border-bottom-color: var(--ws-accent);
    font-weight: 600;
}
.ws-refund-panel { display: none; }
.ws-refund-panel.active { display: block; }

/* Refund cards */
.ws-refund-card {
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
    font-size: 0.75rem;
    color: var(--ws-text);
    transition: border-color 0.15s;
}
.ws-refund-card:hover {
    border-color: var(--ws-border-light);
}
.ws-refund-card .row { margin: 0; }
.ws-refund-card-img {
    background: var(--ws-input-bg);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    min-height: 90px;
    padding: 0;
}
.ws-refund-card-body {
    padding: 8px 10px;
}
.ws-refund-card-body h6 {
    font-size: 0.78rem;
    margin-bottom: 2px;
}
.ws-refund-card-body .badge {
    font-size: 0.65rem;
}
.ws-refund-card-body .btn-sm {
    font-size: 0.68rem;
    padding: 2px 8px;
}

/* Refund request items */
.ws-refund-req-item {
    display: flex;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--ws-border);
    border-radius: 6px;
    margin-bottom: 8px;
    background: var(--ws-surface);
    font-size: 0.75rem;
    transition: border-color 0.15s;
}
.ws-refund-req-item:hover {
    border-color: var(--ws-border-light);
}
.ws-refund-req-img {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}
.ws-refund-req-info {
    flex: 1;
    min-width: 0;
}
.ws-refund-req-info .btn-sm {
    font-size: 0.65rem;
    padding: 1px 6px;
}
.ws-refund-empty {
    text-align: center;
    color: var(--ws-text-muted);
    padding: 24px 0;
    font-size: 0.78rem;
}
.ws-refund-empty .ws-empty-icon {
    font-size: 1.5rem;
    opacity: 0.3;
}
.ws-refund-card-title {
    font-weight: 600;
}
.ws-refund-card-time {
    color: var(--ws-text-muted);
    font-size: 0.68rem;
    white-space: nowrap;
    margin-left: 4px;
}
.ws-refund-card-tags {
    line-height: 1.8;
}
.ws-refund-card-prompt {
    color: var(--ws-text-muted);
    font-size: 0.68rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ws-refund-card-cost {
    font-size: 0.7rem;
}
.ws-refund-card-input-img {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 28%;
    height: 28%;
    border-radius: 3px;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}
.ws-refund-req-time {
    color: var(--ws-text-muted);
    font-size: 0.65rem;
}
.ws-refund-req-dimmed {
    opacity: 0.55;
}

/* Refund pagination */
.ws-refund-pagination {
    flex-shrink: 0;
    border-top: 1px solid var(--ws-border);
    background: var(--ws-bg);
    padding: 6px 12px;
    text-align: center;
    font-size: 0.75rem;
}
.ws-refund-pagination:empty {
    display: none;
}
.ws-refund-pagination .ws-pager {
    display: inline-flex;
    gap: 2px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}
.ws-refund-pagination .ws-pager-btn {
    background: var(--ws-surface);
    border: 1px solid var(--ws-border);
    color: var(--ws-text-dim);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.72rem;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}
.ws-refund-pagination .ws-pager-btn:hover {
    border-color: var(--ws-accent);
    color: var(--ws-text);
}
.ws-refund-pagination .ws-pager-btn.active {
    background: var(--ws-accent);
    border-color: var(--ws-accent);
    color: #fff;
}
.ws-refund-pagination .ws-pager-btn.disabled {
    opacity: 0.35;
    pointer-events: none;
}
.ws-refund-pagination .ws-pager-ellipsis {
    color: var(--ws-text-muted);
    padding: 0 4px;
    font-size: 0.72rem;
}

/* Job list inline style replacements */
.ws-job-empty-icon {
    opacity: 0.3;
}
.ws-job-empty-text {
    font-size: 0.82rem;
}
.ws-job-queue-row {
    font-size: 0.78rem;
}
.ws-job-item-row {
    font-size: 0.82rem;
}
.ws-job-tags-row {
    margin-top: 4px;
}
.ws-job-time {
    color: var(--ws-text-muted);
}

/* Shared helper classes for workspace components */
.ws-zoom-icon {
    font-size: 0.7rem;
    color: var(--ws-text-muted);
}
.ws-empty-tip {
    color: var(--ws-text-muted);
    margin-top: 8px;
}
.ws-progress-text {
    text-align: center;
    color: #fff;
    font-size: 0.7rem;
    margin-top: 2px;
}
.ws-eta-highlight {
    color: var(--ws-success);
}
.ws-actions-bar-inner {
    gap: 8px;
}
.ws-processing-tip {
    color: var(--ws-text-dim);
}
.ws-actions-btns {
    gap: 6px;
}
.ws-spinner-muted {
    color: var(--ws-text-muted);
}
.ws-offline-empty-icon {
    opacity: 0.3;
}
.ws-offline-empty-text {
    font-size: 0.82rem;
}

/* Carousel full-screen modal dialog */
.ws-carousel-modal .modal-dialog,
.ws-offline-viewer-modal .modal-dialog {
    width: 100%;
    max-width: inherit;
    margin: 0;
}

/* Feedback modal dark theme */
.ws-feedback-modal .modal-content {
    background: var(--ws-surface);
    border: 1px solid var(--ws-border-light);
}
.ws-feedback-modal .modal-title {
    color: var(--ws-text);
}
.ws-feedback-modal .close {
    color: var(--ws-text-muted);
}
.ws-feedback-modal .ws-feedback-textarea {
    background: var(--ws-bg);
    color: var(--ws-text);
    border-color: var(--ws-border-light);
    resize: vertical;
}

/* Embedded Job List */
.ws-embedded-job-list .list-group-item {
    background: var(--ws-surface);
    border-color: var(--ws-border);
    color: var(--ws-text);
}
.ws-embedded-job-list .list-group-item-secondary {
    background: var(--ws-input-bg) !important;
}
.ws-embedded-job-list h5, .ws-embedded-job-list h6 {
    color: var(--ws-text);
}
.ws-embedded-section-divider {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--ws-border);
}
.ws-embedded-section-title {
    color: var(--ws-text-dim);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 10px;
}
.ws-job-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
}
.ws-job-image-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: var(--ws-input-bg);
    cursor: pointer;
    border: 1px solid var(--ws-card-border);
    transition: border-color 0.2s;
}
.ws-job-image-item:hover {
    border-color: var(--ws-accent);
}
.ws-job-image-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.ws-job-image-new {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--ws-danger);
    color: #fff;
    font-size: 0.6rem;
    padding: 1px 5px;
    border-radius: 3px;
    line-height: 1.3;
}

/* Embedded Refund */
.ws-embedded-refund .card {
    background: var(--ws-surface);
    border-color: var(--ws-border);
}
.ws-embedded-refund .card-body {
    color: var(--ws-text);
}
.ws-embedded-refund .card-title {
    color: var(--ws-text);
}
.ws-embedded-refund .list-group-item {
    background: var(--ws-surface);
    border-color: var(--ws-border);
    color: var(--ws-text);
}
.ws-embedded-refund .list-group-item-action:hover,
.ws-embedded-refund .list-group-item-action:focus {
    background: var(--ws-surface-hover);
    color: var(--ws-text);
}

/* Mobile Logs/Tips */
.ws-mobile-logs-tips {
    padding: 12px 16px;
}

/* ===== Results Grid ===== */
.ws-results-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--ws-text-muted);
    text-align: center;
    padding: 40px;
}
.ws-results-empty i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
}
.ws-results-empty p {
    font-size: 0.85rem;
    margin: 0;
}

.ws-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--ws-result-card-min), 1fr));
    gap: 10px;
    align-content: start;
}
.ws-result-item {
    border-radius: 8px;
    background: var(--ws-surface);
    border: 1px solid var(--ws-card-border);
    cursor: pointer;
    transition: all var(--ws-transition);
}
.ws-result-item:hover {
    border-color: var(--ws-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.ws-result-image-area {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}
.ws-result-image {
    width: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--ws-input-bg);
}
.ws-result-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2;
}
.ws-result-progress .progress {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
}
.ws-result-progress .progress-bar {
    background: var(--ws-accent);
}
.ws-result-card-actions {
    padding: 6px;
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    background: var(--ws-surface);
    flex-shrink: 0;
}
.ws-result-card-actions .btn {
    padding: 3px 8px;
    font-size: 0.7rem;
    border-radius: 4px;
}
.ws-result-placeholder {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ws-input-bg);
    position: relative;
}
.ws-result-placeholder-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--ws-text-muted);
    font-size: 0.75rem;
}
.ws-result-inner-thumb {
    width: 20%;
    padding-top: 20%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    left: 0;
    top: 0;
}
.ws-result-actions-bar {
    flex-shrink: 0;
    padding: 10px 16px;
    background: var(--ws-surface);
    border-top: 1px solid var(--ws-border);
}
.ws-result-actions-bar .btn {
    font-size: 0.78rem;
}

/* ===== i2i Upload Area ===== */
.ws-i2i-upload {
    margin-bottom: 16px;
}
.ws-i2i-dropzone {
    border: 2px dashed var(--ws-input-border);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--ws-transition);
    background: var(--ws-input-bg);
}
.ws-i2i-dropzone:hover {
    border-color: var(--ws-accent);
    background: rgba(108, 99, 255, 0.05);
}
.ws-i2i-dropzone i {
    font-size: 2rem;
    color: var(--ws-text-muted);
    margin-bottom: 8px;
}
.ws-i2i-dropzone p {
    color: var(--ws-text-dim);
    font-size: 0.8rem;
    margin: 0;
}
.ws-i2i-preview {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--ws-card-border);
    margin-bottom: 12px;
}
.ws-i2i-preview-image {
    width: 100%;
    padding-top: 75%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--ws-input-bg);
    cursor: pointer;
}
.ws-i2i-preview-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
}
.ws-i2i-preview-actions .btn {
    padding: 4px 8px;
    font-size: 0.7rem;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #fff;
}
.ws-i2i-preview-actions .btn:hover {
    background: rgba(0, 0, 0, 0.8);
}
.ws-i2i-mask-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(255, 0, 0, 0.3);
    opacity: 0.8;
    pointer-events: none;
}

/* ===== ControlNet / Mask / ADetailer Toggles ===== */
.ws-toggle-group {
    background: var(--ws-card-bg);
    border: 1px solid var(--ws-card-border);
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}
.ws-toggle-group-header {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ws-text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ws-toggle-group-header.active {
    color: var(--ws-success);
}
.ws-toggle-group .custom-switch {
    margin-bottom: 6px;
}
.ws-toggle-group .custom-control-label {
    font-size: 0.78rem;
    color: var(--ws-text);
}

/* ===== Autocomplete Dropdown ===== */
.ws-prompt-dropdown {
    position: absolute;
    z-index: 100;
    background: var(--ws-surface);
    border: 1px solid var(--ws-border-light);
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.ws-prompt-dropdown .dropdown-item {
    padding: 6px 12px;
    font-size: 0.78rem;
    color: var(--ws-text);
    cursor: pointer;
}
.ws-prompt-dropdown .dropdown-item:hover,
.ws-prompt-dropdown .dropdown-item.highlighted {
    background: rgba(108, 99, 255, 0.2);
    color: #fff;
}
.ws-prompt-dropdown .dropdown-item.custom_selected {
    background: rgba(108, 99, 255, 0.12);
    color: var(--ws-text);
}
.ws-prompt-dropdown .quick_prompt_search_option_image {
    width: 2rem;
    height: 2rem;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    flex-shrink: 0;
}

/* ===== Advanced Settings (Collapsible Card-Columns) ===== */
.ws-advanced-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.ws-advanced-card {
    background: var(--ws-card-bg);
    border: 1px solid var(--ws-card-border);
    border-radius: 8px;
    padding: 10px;
}
.ws-advanced-card .ws-form-group:last-child {
    margin-bottom: 0;
}

/* ===== Update Logs ===== */
.ws-logs {
    margin-top: 16px;
    border: 1px solid var(--ws-card-border);
    border-radius: 8px;
    overflow: hidden;
}
.ws-log-item {
    padding: 6px 12px;
    font-size: 0.72rem;
    color: var(--ws-text-dim);
    border-bottom: 1px solid var(--ws-card-border);
}
.ws-log-item:last-child {
    border-bottom: none;
}

/* ===== Tips ===== */
.ws-tips {
    margin-top: 12px;
    padding: 0;
    list-style: none;
}
.ws-tips li {
    font-size: 0.7rem;
    color: var(--ws-text-muted);
    padding: 2px 0;
    padding-left: 12px;
    position: relative;
}
.ws-tips li:before {
    content: "•";
    position: absolute;
    left: 0;
}

/* ===== Queue Info ===== */
.ws-queue-info {
    font-size: 0.75rem;
    color: var(--ws-text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
}
.ws-queue-info a {
    color: var(--ws-accent);
    text-decoration: none;
}
.ws-queue-info a:hover {
    text-decoration: underline;
}

/* ===== Chaos Warning ===== */
.ws-chaos-warning {
    font-size: 0.72rem;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 4px;
}
.ws-chaos-warning.low {
    color: var(--ws-text-dim);
}
.ws-chaos-warning.medium {
    color: var(--ws-warning);
}
.ws-chaos-warning.high {
    color: var(--ws-danger);
}

/* ===== Tooltips Dark Override ===== */
.ai-workspace .bs-tooltip-bottom .tooltip-inner,
.ai-workspace .bs-tooltip-top .tooltip-inner {
    max-width: 80vw;
    background: var(--ws-surface-light);
    color: var(--ws-text);
    border: 1px solid var(--ws-border-light);
}

/* 芯片悬停 tooltip 内示例图尺寸，与完整版一致（简洁版未加载 aiacademy.css 时也生效） */
.selected_tag_tip {
    max-width: 10rem;
    max-height: 10rem;
    display: block;
}

/* ===== Carousel Override ===== */
.ws-carousel-modal .modal-content {
    background: none;
    border: none;
}
.ws-carousel-modal .modal-dialog {
    width: 100%;
    margin: 0 auto;
    max-width: inherit;
}
.ws-carousel-modal {
    background-color: rgba(0, 0, 0, 0.85);
}
.ws-carousel-image {
    width: 90vw;
    height: calc(80vh - 80px);
    max-width: 900px;
    margin: 0 auto;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
}
.ws-carousel-modal .carousel-indicators {
    position: static;
    margin-top: 16px;
}
.ws-carousel-modal .carousel-indicators > li {
    width: 80px;
}
.ws-carousel-modal .carousel-indicators li img {
    display: block;
    opacity: 0.5;
}
.ws-carousel-modal .carousel-indicators li.active img {
    opacity: 1;
}
.ws-carousel-controls {
    padding: 10px;
    text-align: center;
}
.ws-carousel-controls .btn {
    font-size: 0.78rem;
    margin: 2px;
}

/* ===== Button Overrides ===== */
.ai-workspace .btn-sm {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 5px;
}
.ai-workspace .gold {
    color: var(--ws-gold);
}
.ai-workspace .diamond {
    color: var(--ws-diamond);
}

/* ===== Model Cards ===== */

.ws-model-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.ws-model-card {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--ws-card-bg);
    width: 90px;
    flex-shrink: 0;
}
.ws-model-card:hover {
    border-color: rgba(108, 99, 255, 0.4);
}
.ws-model-card.active {
    border-color: var(--ws-accent);
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.25);
}

.ws-model-card-img-wrap {
    width: 90px;
    height: 90px;
    background: var(--ws-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ws-model-card-img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    display: block;
}

.ws-model-card-body {
    padding: 0.25rem 0.375rem;
    text-align: center;
}
.ws-model-card-name {
    color: var(--ws-text);
    font-size: 0.68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ws-model-card-price {
    margin-top: 1px;
}
.ws-model-card-price .ws-price-gold {
    font-size: 0.62rem;
}

.ws-model-card-check {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ws-accent);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
}
.ws-model-card.active .ws-model-card-check {
    display: flex;
}

.ws-model-card-ver {
    position: absolute;
    top: 3px;
    left: 3px;
    padding: 0 4px;
    border-radius: 3px;
    background: rgba(108, 99, 255, 0.8);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    line-height: 1.4;
}

/* ===== Style Cards ===== */

.ws-style-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ws-style-card {
    position: relative;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--ws-card-bg);
    width: 80px;
    flex-shrink: 0;
}
.ws-style-card:hover {
    border-color: rgba(108, 99, 255, 0.35);
}
.ws-style-card.active {
    border-color: var(--ws-accent);
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.2);
}

.ws-style-card-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    display: block;
    background: var(--ws-surface);
}

.ws-style-card-name {
    padding: 0.2rem 0.25rem;
    text-align: center;
    color: var(--ws-text-dim);
    font-size: 0.65rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ws-style-card-check {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--ws-accent);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
}
.ws-style-card.active .ws-style-card-check {
    display: flex;
}

/* ===== Detail Option Cards（详细设置有示例图项，小图标网格，比画风更小） ===== */

.ws-detail-option-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ws-detail-option-card {
    position: relative;
    cursor: pointer;
    border-radius: 5px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--ws-card-bg);
    width: 52px;
    flex-shrink: 0;
}
.ws-detail-option-card:hover {
    border-color: rgba(108, 99, 255, 0.35);
}
.ws-detail-option-card.active {
    border-color: var(--ws-accent);
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.2);
}

.ws-detail-option-card-img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    display: block;
    background: var(--ws-surface);
}
.ws-detail-option-card-img.ws-detail-option-card-none {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: var(--ws-text-dim);
    text-align: center;
    padding: 4px;
    line-height: 1.2;
}

.ws-detail-option-card-name {
    padding: 0.15rem 0.2rem;
    text-align: center;
    color: var(--ws-text-dim);
    font-size: 0.58rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ws-detail-option-card-check {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--ws-accent);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
}
.ws-detail-option-card.active .ws-detail-option-card-check {
    display: flex;
}

/* 详细设置选项 tooltip：取消半透明，保持不透明 */
.ws-detail-option-tooltip-popup.show {
    opacity: 1 !important;
}

/* 详细设置选项 tooltip 内容区：最大宽度，避免在 JS 中写内联 style */
.ws-detail-option-tooltip-content {
    max-width: 200px;
}

/* 详细设置选项 tooltip 内分隔线：margin 与边框色，避免在 JS 中写内联 style */
.ws-detail-option-tooltip-hr {
    margin: 4px 0;
    border-color: var(--ws-border, #444);
}

/* 详细设置选项 tooltip 内图片：与「已使用的设置」chip tooltip 一致用 img，固定宽高避免乱跳 */
.ws-detail-option-tooltip-img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    display: block;
    margin-top: 4px;
}

/* ===== Dimension Radio Grid ===== */

.ws-dim-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ws-dim-option {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--ws-input-border);
    background: var(--ws-card-bg);
    color: var(--ws-text-dim);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.ws-dim-option:hover {
    border-color: rgba(108, 99, 255, 0.35);
    color: var(--ws-text);
}
.ws-dim-option.active {
    background: rgba(108, 99, 255, 0.12);
    border-color: var(--ws-accent);
    color: var(--ws-accent);
    font-weight: 500;
}

.ws-dim-label {
    white-space: nowrap;
}

.ws-dim-price {
    color: var(--ws-gold);
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}
.ws-dim-option.active .ws-dim-price {
    color: var(--ws-gold);
}

/* ===== Hires Radio Grid ===== */

.ws-hires-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ws-hires-option {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--ws-input-border);
    background: var(--ws-card-bg);
    color: var(--ws-text-dim);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.ws-hires-option:hover {
    border-color: rgba(108, 99, 255, 0.35);
    color: var(--ws-text);
}
.ws-hires-option.active {
    background: rgba(108, 99, 255, 0.12);
    border-color: var(--ws-accent);
    color: var(--ws-accent);
    font-weight: 500;
}

.ws-hires-label {
    white-space: nowrap;
}

.ws-hires-price {
    color: var(--ws-gold);
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}
.ws-hires-price.ws-price-diamond {
    color: var(--ws-diamond);
}

.ws-hires-multiplier {
    color: var(--ws-warning);
    font-size: 0.68rem;
    font-weight: 600;
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 991.98px) {
    .ai-workspace {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 56px);
    }
    .ai-workspace-settings {
        width: 100%;
        min-width: 100%;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--ws-border);
    }
    .ai-workspace-settings-scroll {
        max-height: none;
        overflow-y: visible;
    }
    .ai-workspace-settings-footer {
        position: sticky;
        bottom: 0;
        z-index: 10;
    }
    .ai-workspace-results {
        display: flex;
        flex-direction: column;
        min-height: 300px;
        overflow: visible;
    }
    .ai-workspace-results-inner {
        flex: 1;
        overflow-y: visible;
    }
    .ws-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    .ws-result-actions-bar {
        position: sticky;
        bottom: 0;
        z-index: 10;
    }
    .ws-tab-content {
        overflow: visible;
    }
    .ws-tab-content-scroll {
        overflow-y: visible;
    }
    .ws-results-tabs {
        flex-wrap: wrap;
        padding: 0 8px;
    }
    .ws-results-tabs-right {
        padding-bottom: 6px;
    }
    .ws-zoom-slider {
        width: 60px;
    }
}

@media (max-width: 575.98px) {
    .ws-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .ws-result-card-actions {
        padding: 4px;
        gap: 3px;
    }
    .ws-result-card-actions .btn {
        padding: 2px 5px;
        font-size: 0.6rem;
    }
    .ws-card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .ws-model-card {
        width: 75px;
    }
    .ws-model-card-img-wrap {
        width: 75px;
        height: 75px;
    }
    .ws-model-card-img {
        width: 75px;
        height: 75px;
    }
    .ws-style-card {
        width: 68px;
    }
    .ws-style-card-img {
        width: 68px;
        height: 68px;
    }
    .ws-dim-option,
    .ws-hires-option {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
    .ws-dim-price,
    .ws-hires-price {
        font-size: 0.65rem;
    }
}

/* ── Offline Results Tab ──────────────────────────────── */

.ws-offline-zoom-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--ws-border);
}
.ws-offline-zoom-row .ws-zoom-slider {
    flex: 1;
}

.ws-offline-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--ws-offline-card-min), 1fr));
    gap: 10px;
    padding: 12px 16px;
    align-content: start;
}

.ws-offline-result-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: var(--ws-surface);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ws-offline-result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.ws-offline-result-img {
    width: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.ws-offline-result-new {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--ws-danger);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    line-height: 1.4;
    text-transform: uppercase;
}

/* ── Offline Image Viewer Modal ──────────────────────── */

.ws-offline-viewer-modal .modal-content {
    background: rgba(0,0,0,0.95);
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.ws-offline-viewer-image {
    width: 90vw;
    height: calc(80vh - 60px);
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
}
.ws-viewer-tags {
    text-align: center;
    padding: 8px 12px 0;
    line-height: 2;
}
.ws-viewer-tags .btn {
    margin: 0 2px 4px;
}
.ws-viewer-tags .ws-viewer-custom-prompt {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
    cursor: help;
}
.ws-offline-viewer-controls {
    display: flex;
    gap: 8px;
    padding: 8px 0 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.ws-offline-viewer-close {
    position: absolute;
    top: 12px;
    right: 18px;
    color: #fff;
    font-size: 2rem;
    opacity: 0.7;
    text-shadow: none;
    z-index: 10;
}
.ws-offline-viewer-close:hover {
    opacity: 1;
    color: #fff;
}
