body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #F3F7FF;
    color: #334155;
}

:root {
    --app-sidebar-width: 200px;
    --app-sidebar-collapsed-width: 76px;
}

.card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.sidebar-item-active {
    background: linear-gradient(90deg, #EEF2FF 0%, #F8F9FF 100%);
    border-left: 3px solid #6366F1;
    color: #4F46E5;
}

.btn-gradient {
    background: linear-gradient(90deg, #5C7CFA 0%, #845EF7 100%);
    transition: all .3s;
}

.btn-gradient:hover {
    opacity: .9;
    transform: translateY(-1px);
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #E2E8F0;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background: #6366F1;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.vip-tag {
    background: linear-gradient(135deg, #FFD6A5, #FFB347);
    color: #8B4513;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
}

.app-role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
}

.app-role-badge-admin {
    background: #eef2ff;
    color: #4338ca;
    border-color: #c7d2fe;
    box-shadow: 0 6px 16px rgba(79, 70, 229, .10);
}

.app-role-badge-developer {
    background: #ecfeff;
    color: #0e7490;
    border-color: #a5f3fc;
}

.app-role-badge-user {
    background: #f8fafc;
    color: #475569;
    border-color: #e2e8f0;
}

.masonry {
    columns: 4;
    column-gap: 16px;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 16px;
}

@media (max-width: 1280px) {
    .masonry {
        columns: 3;
    }
}

@media (max-width: 900px) {
    .masonry {
        columns: 2;
    }
}

.gallery-grid {
    columns: 2;
    gap: 16px;
}

@media (min-width: 768px) {
    .gallery-grid {
        columns: 3;
    }
}

@media (min-width: 1280px) {
    .gallery-grid {
        columns: 4;
    }
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 16px;
}

#canvas-container {
    overflow: hidden;
    height: 600px;
    border-radius: 16px;
    background: #f1f5f9;
    position: relative;
    cursor: none;
}

#canvas-wrap {
    position: absolute;
    transform-origin: 0 0;
}

#canvas-container.pan-mode {
    cursor: grab;
}

#canvas-container.pan-mode.panning {
    cursor: grabbing;
}

#base-canvas {
    display: block;
    border-radius: 8px;
}

#mask-canvas {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 8px;
    opacity: .55;
    pointer-events: none;
}

#draw-canvas {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 8px;
    opacity: 0;
    cursor: none;
}

.brush-size-btn.active {
    background: #6366F1;
    color: white;
}

#brush-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    display: none;
}

#brush-cursor.brush-cursor-visible {
    display: block;
}

.inpaint-upload-area.dragover {
    border-color: #6366f1;
    background: #eef2ff;
}

#canvas-container.inpaint-canvas-container {
    height: 500px;
}

.inpaint-pan-button.is-pan-active {
    background: var(--accent-bg);
    color: #6366f1;
}

.sidebar {
    width: var(--app-sidebar-width);
    flex: 0 0 var(--app-sidebar-width);
    transition: width .22s ease, transform .22s ease;
}

#sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}

#sidebar-nav::-webkit-scrollbar {
    display: none;
}

.sidebar-nav-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 18px 4px 8px !important;
    color: #a7b2c2;
    font-size: 10px;
    font-weight: 850;
    line-height: 14px;
    letter-spacing: 0;
    white-space: nowrap;
}

.sidebar-nav-divider:first-child {
    margin-top: 2px !important;
}

#sidebar-nav > .sidebar-nav-link + .sidebar-nav-divider {
    margin-top: 28px !important;
}

.sidebar-nav-divider::after {
    content: '';
    min-width: 18px;
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, rgba(148, 163, 184, .32), rgba(148, 163, 184, 0));
}

.sidebar-nav-link {
    position: relative;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 9px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #75839a;
    font-size: 13px;
    font-weight: 750;
    line-height: 18px;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.sidebar-nav-link:hover {
    transform: translateY(-1px);
    border-color: rgba(148, 163, 184, .18);
    background: #f6f8fb;
    color: #111827;
}

.sidebar-nav-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 8px;
    color: #8a98ad;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.sidebar-nav-icon svg {
    width: 17px;
    height: 17px;
    display: block;
    stroke: currentColor;
}

.sidebar-nav-link:hover .sidebar-nav-icon {
    background: #fff;
    color: #475569;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .18);
}

.sidebar-nav-link.sidebar-item-active {
    background: #111827 !important;
    border-color: #111827 !important;
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(17, 24, 39, .12) !important;
}

.sidebar-nav-link.sidebar-item-active::after {
    content: '';
    position: absolute;
    right: 9px;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
}

.sidebar-nav-link.sidebar-item-active .sidebar-nav-icon {
    background: rgba(255, 255, 255, .12);
    color: #fff !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.sidebar-nav-link.sidebar-item-active .sidebar-label {
    color: #fff !important;
}

.app-sidebar-section {
    border-top: 1px solid #f1f5f9;
}

#points-progress {
    width: 0%;
    background: #111827 !important;
    box-shadow: none !important;
    transition: width .22s ease;
}

#sidebar-points-card {
    padding: 12px;
}

.sidebar-points-shell {
    border: 0 !important;
    border-radius: 16px !important;
    background: #f8fafc !important;
    padding: 18px 14px 14px !important;
    box-shadow: none !important;
    text-align: center;
}

.sidebar-points-caption {
    color: #94a3b8;
    font-size: 10px;
    line-height: 14px;
    font-weight: 800;
}

.sidebar-points-used-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin: 4px 0 13px;
    line-height: 1;
    color: #334155;
}

.sidebar-points-used-value #user-points {
    font-size: 20px;
    line-height: 24px;
    font-weight: 900;
    letter-spacing: 0;
}

.sidebar-points-divider {
    color: #94a3b8;
    font-size: 12px;
    font-weight: 900;
}

.sidebar-points-used-value #user-total-points {
    color: #6366f1;
    font-size: 12px;
    line-height: 16px;
    font-weight: 800;
}

.sidebar-points-meter {
    height: 6px !important;
    margin-bottom: 14px !important;
    overflow: hidden;
}

.app-loading-skeleton {
    min-height: 400px;
}

.preview-close-button {
    background: var(--card);
}

#preview-modal {
    z-index: 2600;
}

.global-preview-modal {
    padding: 28px;
}

.global-preview-dialog {
    position: relative;
    width: min(92vw, 1120px);
    max-height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 18px;
    background: rgba(15, 23, 42, .72);
    box-shadow: 0 28px 90px rgba(15, 23, 42, .34) !important;
}

.global-preview-stage {
    min-height: 280px;
    max-height: calc(100vh - 154px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0f172a;
}

.global-preview-image {
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 154px);
    object-fit: contain;
    background: #0f172a;
}

.global-preview-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, .10);
    background: rgba(15, 23, 42, .90);
}

.global-preview-prompt {
    min-width: 0;
    max-height: 44px;
    overflow: auto;
    color: #fff;
    font-size: 13px;
    font-weight: 650;
    line-height: 22px;
}

.global-preview-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}

.global-preview-action {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    transition: background-color .16s ease, opacity .16s ease;
}

.global-preview-action:hover:not(:disabled):not(.disabled) {
    background: rgba(255, 255, 255, .20);
}

.global-preview-action:disabled,
.global-preview-action.disabled {
    cursor: not-allowed;
    opacity: .45;
}

.global-preview-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #475569;
    box-shadow: 0 16px 34px rgba(15, 23, 42, .22);
}

.global-preview-close:hover {
    color: #111827;
}

@media (max-width: 720px) {
    .global-preview-modal {
        padding: 14px;
    }

    .global-preview-dialog {
        width: 100%;
        max-height: calc(100vh - 28px);
        border-radius: 16px;
    }

    .global-preview-stage,
    .global-preview-image {
        max-height: calc(100vh - 156px);
    }

    .global-preview-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .global-preview-actions {
        width: 100%;
    }

    .global-preview-action {
        flex: 1;
    }
}

.image-skeleton-tile {
    height: 200px;
}

.masonry-flow-item {
    break-inside: avoid;
    margin-bottom: 16px;
}

.overlay-action-dark {
    background: rgba(0, 0, 0, .4);
}

.overlay-action-light,
.works-fav-button {
    background: rgba(255, 255, 255, .2);
}

.overlay-action-primary {
    background: rgba(99, 102, 241, .7);
}

.works-fav-button.is-favorite {
    background: rgba(248, 113, 113, .8);
}

.gallery-fav-button {
    background: rgba(15, 23, 42, .46);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .18);
}

.gallery-fav-button:hover {
    background: rgba(15, 23, 42, .72);
}

.gallery-fav-button.is-favorite {
    background: rgba(248, 113, 113, .9);
}

.gallery-author-muted {
    color: rgba(255, 255, 255, .6);
}

.history-separator {
    color: #f1f5f9;
}

.history-status-completed {
    color: #10b981;
}

.history-status-failed {
    color: #f87171;
}

.history-status-processing {
    color: #f59e0b;
}

.history-status-default,
.history-publish-button,
.history-delete-button {
    color: #94a3b8;
}

.history-publish-button,
.history-delete-button {
    background: #f8fafc;
}

.history-publish-button.is-public {
    background: #d1fae5;
    color: #10b981;
}

.history-card-deleting {
    opacity: .5;
}

.sidebar-label,
.sidebar-footer-content,
#sidebar-points-card {
    transition: opacity .16s ease;
}

#app-logo-wrap {
    width: 160px;
    height: 50px;
}

body.sidebar-collapsed .sidebar {
    width: var(--app-sidebar-collapsed-width) !important;
    flex-basis: var(--app-sidebar-collapsed-width) !important;
}

body.sidebar-collapsed .sidebar-label,
body.sidebar-collapsed .sidebar-divider,
body.sidebar-collapsed .sidebar-footer-content,
body.sidebar-collapsed #sidebar-points-card {
    display: none !important;
}

body.sidebar-collapsed #app-logo-wrap {
    width: 44px;
    height: 44px;
}

body.sidebar-collapsed .sidebar-logo-row {
    justify-content: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

body.sidebar-collapsed #sidebar-nav {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

body.sidebar-collapsed #sidebar-nav a {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

body.sidebar-collapsed .sidebar-nav-link {
    width: 40px;
    min-height: 40px;
    margin: 0 auto;
    gap: 0;
}

body.sidebar-collapsed .sidebar-nav-link::after {
    display: none;
}

body.sidebar-collapsed .sidebar-nav-icon {
    width: 32px;
    height: 32px;
}

body.sidebar-collapsed .sidebar-user-row,
body.sidebar-collapsed .sidebar-bottom-actions {
    justify-content: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

body.sidebar-collapsed .sidebar-user-row {
    padding-bottom: 1rem !important;
}

body.sidebar-collapsed .sidebar-bottom-actions {
    margin-top: 0.875rem !important;
    padding-top: 1rem !important;
    padding-bottom: 1.25rem !important;
    gap: 0.875rem;
}

[data-theme="dark"] .sidebar-nav-divider {
    color: #66758a;
}

[data-theme="dark"] .sidebar-nav-divider::after {
    background: linear-gradient(90deg, rgba(100, 116, 139, .36), rgba(100, 116, 139, 0));
}

[data-theme="dark"] .sidebar-nav-link {
    color: #93a4bb;
}

[data-theme="dark"] .sidebar-nav-link:hover {
    border-color: rgba(148, 163, 184, .16);
    background: #202638;
    color: #e5edf8;
}

[data-theme="dark"] .sidebar-nav-icon {
    color: #7f8da3;
}

[data-theme="dark"] .sidebar-nav-link:hover .sidebar-nav-icon {
    background: #151827;
    color: #e5edf8;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .14);
}

[data-theme="dark"] .sidebar-nav-link.sidebar-item-active {
    background: #111827 !important;
    border-color: rgba(229, 237, 248, .16) !important;
    color: #e5edf8 !important;
    box-shadow: inset 0 0 0 1px rgba(229, 237, 248, .06), 0 10px 22px rgba(0, 0, 0, .22) !important;
}

[data-theme="dark"] .sidebar-nav-link.sidebar-item-active .sidebar-nav-icon {
    background: #252b3d;
    color: #e5edf8 !important;
}

[data-theme="dark"] .sidebar-nav-link.sidebar-item-active .sidebar-label {
    color: #e5edf8 !important;
}

@media (max-width: 768px) {
    body.sidebar-collapsed .sidebar {
        width: 16rem !important;
        flex-basis: 16rem !important;
    }

    body.sidebar-collapsed .sidebar-label,
    body.sidebar-collapsed .sidebar-divider,
    body.sidebar-collapsed .sidebar-footer-content,
    body.sidebar-collapsed #sidebar-points-card {
        display: initial !important;
    }

    body.sidebar-collapsed .sidebar-nav-divider {
        display: flex !important;
    }

    body.sidebar-collapsed #app-logo-wrap {
        width: 160px;
        height: 50px;
    }
}

.drop-zone {
    border: 2px dashed #E2E8F0;
    transition: all .2s;
}

.img2img-drop-zone {
    border-color: #f1f5f9;
}

.drop-zone.dragover {
    border-color: #6366F1;
    background: #EEF2FF;
}

.img2img-num-button {
    color: #94a3b8;
}

.img2img-num-button.active {
    background: #6366f1;
    color: #fff;
    font-weight: 700;
}

.result-count-pill {
    background: #f8fafc;
    color: #94a3b8;
}

.plan-card {
    border: 2px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all .2s;
}

.plan-card:hover {
    transform: translateY(-2px);
}

.plan-card.selected {
    border-color: var(--member-border);
    box-shadow: 0 0 0 3px var(--member-border), 0 12px 30px var(--member-shadow);
}

/* Text-to-image workbench refresh */
.text2img-workbench {
    background: #f5f7fb;
    gap: 20px !important;
    padding: 22px !important;
    align-items: stretch;
}

.text2img-compose-pane {
    flex: 0 1 900px !important;
    min-width: 620px;
    max-width: 900px;
    gap: 16px !important;
    padding-right: 2px !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 23, 42, .18) transparent;
}

.text2img-compose-pane::-webkit-scrollbar,
.text2img-result-body::-webkit-scrollbar {
    width: 6px;
}

.text2img-compose-pane::-webkit-scrollbar-track,
.text2img-result-body::-webkit-scrollbar-track {
    background: transparent;
}

.text2img-compose-pane::-webkit-scrollbar-thumb,
.text2img-result-body::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, .16);
    border-radius: 999px;
}

.text2img-card,
.text2img-result-panel {
    border: 1px solid rgba(15, 23, 42, .07) !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, .94) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .035), 0 18px 44px rgba(15, 23, 42, .045) !important;
}

.text2img-prompt-card,
.text2img-param-card,
.text2img-advanced-card {
    padding: 22px !important;
}

.text2img-prompt-card {
    position: relative;
    z-index: 40;
    overflow: visible !important;
}

.text2img-param-card,
.text2img-advanced-card,
.text2img-action-panel {
    position: relative;
    z-index: 10;
}

.text2img-section-header {
    margin-bottom: 14px !important;
}

.text2img-section-header h3,
.text2img-param-card h3,
.text2img-advanced-card h3,
.text2img-result-header h3 {
    color: #101828 !important;
    font-size: 14px !important;
    line-height: 20px;
    font-weight: 850 !important;
}

.text2img-clear-button {
    height: 28px;
    padding: 0 9px;
    border-radius: 8px;
    color: #98a2b3;
}

.text2img-clear-button:hover {
    background: #fff1f2;
}

.text2img-prompt-box {
    min-height: 140px;
    border-color: rgba(15, 23, 42, .06) !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.text2img-prompt-box:focus-within {
    border-color: rgba(17, 24, 39, .16) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, .04);
}

.text2img-prompt-input {
    height: 112px !important;
    line-height: 24px;
}

.text2img-basic-row {
    gap: 18px !important;
}

.text2img-basic-row label,
.text2img-param-grid label,
.text2img-advanced-card label {
    color: #8593a8 !important;
    letter-spacing: 0;
}

.text2img-select,
.text2img-input,
.text2img-enhance-card,
.text2img-num-control {
    height: 38px;
    border-color: rgba(15, 23, 42, .07) !important;
    border-radius: 11px !important;
    background: #f8fafc !important;
}

.text2img-native-select-hidden {
    position: absolute;
    width: 1px !important;
    height: 1px !important;
    margin: -1px;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0;
    pointer-events: none;
}

.text2img-custom-select {
    position: relative;
    z-index: 20;
}

.text2img-custom-select.is-open {
    z-index: 80;
}

.text2img-custom-select-trigger {
    width: 100%;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid rgba(15, 23, 42, .07);
    border-radius: 11px;
    background: #f8fafc;
    color: #334155;
    padding: 0 14px 0 16px;
    font-size: 12px;
    font-weight: 650;
    line-height: 1;
    text-align: left;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.text2img-custom-select-trigger span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text2img-custom-select-trigger svg {
    flex: 0 0 auto;
    color: #475569;
    transition: transform .16s ease;
}

.text2img-custom-select.is-open .text2img-custom-select-trigger {
    border-color: rgba(17, 24, 39, .22);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, .04);
}

.text2img-custom-select.is-open .text2img-custom-select-trigger svg {
    transform: rotate(180deg);
}

.text2img-custom-select-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    max-height: 260px;
    overflow: auto;
    padding: 6px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 48px rgba(15, 23, 42, .14);
}

.text2img-custom-select-option {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    border-radius: 10px;
    padding: 0 11px;
    color: #475569;
    font-size: 12px;
    font-weight: 650;
    text-align: left;
    transition: background-color .14s ease, color .14s ease;
}

.text2img-custom-select-option:hover:not(:disabled),
.text2img-custom-select-option.is-selected {
    background: #111827;
    color: #fff;
}

.text2img-custom-select-option:disabled {
    color: #cbd5e1;
    cursor: not-allowed;
}

.text2img-select:focus,
.text2img-input:focus {
    border-color: rgba(17, 24, 39, .22) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, .04);
}

.text2img-num-control {
    padding: 3px !important;
}

.text2img-num-btn {
    min-height: 30px;
    border-radius: 8px !important;
}

.text2img-num-btn.active {
    background: #111827 !important;
    border: 0 !important;
    color: #fff !important;
    box-shadow: 0 8px 16px rgba(17, 24, 39, .14) !important;
}

.text2img-param-card h3 {
    margin-bottom: 18px !important;
}

.text2img-param-grid {
    gap: 20px 28px !important;
}

.text2img-model-option {
    width: 100%;
    min-height: 42px;
    height: 42px;
    justify-content: flex-start;
    border-radius: 11px !important;
    border-color: rgba(15, 23, 42, .07) !important;
    background: #f8fafc !important;
    color: #536176 !important;
    text-align: left;
    overflow: hidden;
}

.text2img-model-option:hover {
    background: #fff !important;
    border-color: rgba(15, 23, 42, .14) !important;
    color: #111827 !important;
}

.text2img-workbench .image-model-option.bg-indigo-500 {
    background: #111827 !important;
    border: 1px solid #111827 !important;
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(17, 24, 39, .14) !important;
}

.text2img-model-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 16px;
}

.text2img-model-copy {
    min-width: 0;
    display: block;
    flex: 0 1 auto;
    text-align: left;
}

.text2img-model-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text2img-enhance-card {
    min-height: 46px;
    height: auto;
}

.text2img-action-panel {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto;
    grid-template-areas:
        "generate actions"
        "note note";
    align-items: center;
    gap: 10px 14px;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, .07);
    border-radius: 18px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
}

.text2img-generate-btn {
    grid-area: generate;
    height: 52px;
    border-radius: 13px !important;
    background: #111827 !important;
    box-shadow: 0 14px 24px rgba(17, 24, 39, .16) !important;
}

.text2img-generate-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    background: #1f2937 !important;
}

.text2img-generate-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

.text2img-secondary-actions {
    grid-area: actions;
    display: flex;
    gap: 10px;
}

.text2img-secondary-btn {
    height: 52px;
    min-width: 146px;
    justify-content: center;
    border-radius: 13px !important;
    border-color: rgba(15, 23, 42, .07) !important;
    color: #475569 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .035);
}

.text2img-secondary-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 23, 42, .14) !important;
    background: #fff !important;
    color: #111827 !important;
}

.text2img-policy-note {
    grid-area: note;
    color: #b4bdca;
    font-size: 10px;
    line-height: 14px;
    text-align: center;
}

.text2img-result-panel {
    min-width: 360px;
}

.text2img-result-header {
    padding: 18px 20px !important;
    border-bottom-color: rgba(15, 23, 42, .06) !important;
}

.text2img-result-header #result-count,
.text2img-result-header #elapsed-time-badge {
    background: #f2f5f9 !important;
    color: #8793a5 !important;
}

.text2img-result-body {
    padding: 18px !important;
    background: linear-gradient(180deg, #fbfcfe 0%, #f8fafc 100%);
}

.text2img-empty-state {
    min-height: 360px;
    gap: 10px;
    color: #aeb8c6 !important;
    text-align: center;
}

.text2img-empty-preview {
    width: 116px;
    height: 116px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(148, 163, 184, .42);
    border-radius: 18px;
    background: #fff;
    color: #b8c2cf;
}

.text2img-empty-state p {
    margin-top: 4px;
    color: #8793a5;
    font-size: 13px;
    font-weight: 850;
}

.text2img-empty-state span {
    color: #b4bdca;
    font-size: 11px;
    font-weight: 650;
}

.text2img-inspiration-grid {
    display: none !important;
}

.text2img-results-grid {
    gap: 14px !important;
}

.text2img-results-grid .generated-image-card {
    border-radius: 14px !important;
    border: 1px solid rgba(15, 23, 42, .08);
    background: #fff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
}

[data-theme="dark"] .text2img-workbench {
    background: #151827;
}

[data-theme="dark"] .text2img-card,
[data-theme="dark"] .text2img-result-panel,
[data-theme="dark"] .text2img-action-panel {
    background: #1b1f31 !important;
    border-color: rgba(148, 163, 184, .14) !important;
    box-shadow: none !important;
}

[data-theme="dark"] .text2img-section-header h3,
[data-theme="dark"] .text2img-param-card h3,
[data-theme="dark"] .text2img-advanced-card h3,
[data-theme="dark"] .text2img-result-header h3 {
    color: #e5edf8 !important;
}

[data-theme="dark"] .text2img-prompt-box,
[data-theme="dark"] .text2img-select,
[data-theme="dark"] .text2img-input,
[data-theme="dark"] .text2img-custom-select-trigger,
[data-theme="dark"] .text2img-enhance-card,
[data-theme="dark"] .text2img-num-control,
[data-theme="dark"] .text2img-model-option {
    background: #202638 !important;
    border-color: rgba(148, 163, 184, .14) !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .text2img-custom-select.is-open .text2img-custom-select-trigger {
    background: #202638 !important;
    border-color: rgba(229, 237, 248, .28) !important;
    box-shadow: 0 0 0 3px rgba(229, 237, 248, .06);
}

[data-theme="dark"] .text2img-custom-select-menu {
    background: #1b1f31;
    border-color: rgba(148, 163, 184, .18);
    box-shadow: 0 22px 52px rgba(0, 0, 0, .35);
}

[data-theme="dark"] .text2img-custom-select-option {
    color: #cbd5e1;
}

[data-theme="dark"] .text2img-custom-select-option:hover:not(:disabled),
[data-theme="dark"] .text2img-custom-select-option.is-selected {
    background: #e5edf8;
    color: #151827;
}

[data-theme="dark"] .text2img-custom-select-option:disabled {
    color: #64748b;
}

[data-theme="dark"] .text2img-prompt-input {
    color: #e5edf8 !important;
}

[data-theme="dark"] .text2img-result-body {
    background: #151827;
}

[data-theme="dark"] .text2img-empty-preview {
    background: #202638;
    border-color: rgba(148, 163, 184, .22);
    color: #718198;
}

[data-theme="dark"] .text2img-secondary-btn {
    background: #202638 !important;
    border-color: rgba(148, 163, 184, .16) !important;
    color: #a8b5c8 !important;
    box-shadow: none;
}

[data-theme="dark"] .text2img-generate-btn,
[data-theme="dark"] .text2img-num-btn.active,
[data-theme="dark"] .text2img-workbench .image-model-option.bg-indigo-500 {
    background: #e5edf8 !important;
    border-color: #e5edf8 !important;
    color: #151827 !important;
    box-shadow: none !important;
}

@media (max-width: 1280px) {
    .text2img-workbench {
        flex-direction: column;
        overflow-y: auto;
    }

    .text2img-compose-pane {
        flex: 0 0 auto !important;
        max-width: none;
        min-width: 0;
        overflow: visible;
        padding-right: 0 !important;
    }

    .text2img-result-panel {
        min-height: 460px;
        min-width: 0;
    }
}

@media (max-width: 820px) {
    .text2img-workbench {
        padding: 14px !important;
    }

    .text2img-basic-row,
    .text2img-param-grid,
    .text2img-advanced-card .grid {
        grid-template-columns: 1fr !important;
    }

    .text2img-action-panel {
        grid-template-columns: 1fr;
        grid-template-areas:
            "generate"
            "actions"
            "note";
    }

    .text2img-secondary-actions {
        flex-direction: column;
    }
}

/* Image-to-image workbench refresh */
.img2img-workbench {
    background: #f5f7fb;
    gap: 20px !important;
    padding: 22px !important;
}

.img2img-compose-pane {
    gap: 16px !important;
    padding-right: 2px !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 23, 42, .18) transparent;
}

.img2img-compose-pane::-webkit-scrollbar,
.img2img-result-body::-webkit-scrollbar {
    width: 6px;
}

.img2img-compose-pane::-webkit-scrollbar-track,
.img2img-result-body::-webkit-scrollbar-track {
    background: transparent;
}

.img2img-compose-pane::-webkit-scrollbar-thumb,
.img2img-result-body::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, .16);
    border-radius: 999px;
}

.img2img-card,
.img2img-result-panel {
    border: 1px solid rgba(15, 23, 42, .07) !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, .94) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .035), 0 18px 44px rgba(15, 23, 42, .045) !important;
}

.img2img-upload-card,
.img2img-prompt-card,
.img2img-param-card {
    padding: 22px !important;
}

.img2img-card-header,
.img2img-section-header {
    margin-bottom: 14px !important;
}

.img2img-card-header h3,
.img2img-section-header h3,
.img2img-param-card h3,
.img2img-result-header span:first-child {
    margin-bottom: 0 !important;
    color: #101828 !important;
    font-size: 14px !important;
    line-height: 20px;
    font-weight: 850 !important;
}

.img2img-card-header span {
    display: block;
    margin-top: 2px;
    color: #98a2b3;
    font-size: 11px;
    font-weight: 650;
}

.img2img-drop-zone {
    min-height: 154px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(148, 163, 184, .34) !important;
    border-radius: 15px !important;
    background: #f8fafc;
}

.img2img-drop-zone:hover,
.img2img-drop-zone.dragover {
    border-color: rgba(17, 24, 39, .22) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, .04);
}

.img2img-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.img2img-upload-icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 15px;
    background: #fff;
    color: #b8c2cf;
}

.img2img-preview-wrap {
    width: 100%;
}

.img2img-preview-wrap img {
    max-height: 180px !important;
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 12px 24px rgba(15, 23, 42, .08);
}

.img2img-remove-image {
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff1f2;
    font-weight: 800;
}

.img2img-clear-button {
    height: 28px;
    padding: 0 9px;
    border-radius: 8px;
    color: #98a2b3;
}

.img2img-clear-button:hover {
    background: #fff1f2;
}

.img2img-prompt-box {
    min-height: 132px;
    border-color: rgba(15, 23, 42, .06) !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.img2img-prompt-box:focus-within {
    border-color: rgba(17, 24, 39, .16) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, .04);
}

.img2img-prompt-input {
    height: 96px !important;
    line-height: 24px;
}

.img2img-param-card h3 {
    margin-bottom: 18px !important;
}

.img2img-param-stack {
    gap: 18px !important;
}

.img2img-param-stack label {
    color: #8593a8 !important;
    letter-spacing: 0;
}

.img2img-num-control,
.img2img-enhance-row {
    min-height: 38px;
    border: 1px solid rgba(15, 23, 42, .07);
    border-radius: 11px !important;
    background: #f8fafc !important;
}

.img2img-num-control {
    padding: 3px !important;
}

.img2img-enhance-row {
    padding: 8px 14px;
}

.img2img-enhance-row span {
    color: #475569 !important;
}

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

.img2img-size-button {
    min-height: 54px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    padding: 9px 11px;
    border: 1px solid rgba(15, 23, 42, .07);
    border-radius: 12px;
    background: #f8fafc;
    color: #475569;
    text-align: left;
    transition: border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease, opacity .16s ease;
}

.img2img-size-button span {
    width: 100%;
    overflow: hidden;
    color: inherit;
    font-size: 12px;
    font-weight: 850;
    line-height: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.img2img-size-button small {
    color: #98a2b3;
    font-size: 10px;
    font-weight: 650;
    line-height: 14px;
}

.img2img-size-button:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(15, 23, 42, .16);
    background: #fff;
    color: #111827;
}

.img2img-size-button.active {
    border-color: #111827;
    background: #111827;
    color: #fff;
    box-shadow: 0 10px 18px rgba(17, 24, 39, .14);
}

.img2img-size-button.active small {
    color: rgba(255, 255, 255, .68);
}

.img2img-size-button:disabled,
.img2img-size-button.is-disabled {
    cursor: not-allowed;
    opacity: .4;
    transform: none;
}

.img2img-size-hint {
    margin-top: 9px;
    color: #98a2b3;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
}

.img2img-num-button {
    min-height: 30px;
    border-radius: 8px !important;
    color: #8a98ad;
}

.img2img-num-button.active {
    background: #111827 !important;
    color: #fff !important;
    font-weight: 850;
    box-shadow: 0 8px 16px rgba(17, 24, 39, .14);
}

.img2img-action-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, .07);
    border-radius: 18px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
}

.img2img-generate-btn {
    height: 52px;
    border-radius: 13px !important;
    background: #111827 !important;
    box-shadow: 0 14px 24px rgba(17, 24, 39, .16) !important;
}

.img2img-generate-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    background: #1f2937 !important;
}

.img2img-generate-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

.img2img-policy-note {
    color: #b4bdca;
    font-size: 10px;
    line-height: 14px;
    text-align: center;
}

.img2img-result-panel {
    min-width: 360px;
}

.img2img-result-header {
    padding: 18px 20px !important;
    border-bottom-color: rgba(15, 23, 42, .06) !important;
}

.img2img-result-header #result-count {
    background: #f2f5f9 !important;
    color: #8793a5 !important;
}

.img2img-result-body {
    padding: 18px !important;
    background: linear-gradient(180deg, #fbfcfe 0%, #f8fafc 100%);
}

.img2img-empty-state {
    min-height: 360px;
    gap: 10px;
    color: #aeb8c6 !important;
    text-align: center;
}

.img2img-empty-preview {
    width: 116px;
    height: 116px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(148, 163, 184, .42);
    border-radius: 18px;
    background: #fff;
    color: #b8c2cf;
}

.img2img-empty-state p {
    margin-top: 4px;
    color: #8793a5;
    font-size: 13px;
    font-weight: 850;
}

.img2img-empty-state span {
    color: #b4bdca;
    font-size: 11px;
    font-weight: 650;
}

.img2img-results-grid {
    gap: 14px !important;
}

.img2img-results-grid .generated-image-card {
    border-radius: 14px !important;
    border: 1px solid rgba(15, 23, 42, .08);
    background: #fff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .06);
}

[data-theme="dark"] .img2img-workbench {
    background: #151827;
}

[data-theme="dark"] .img2img-card,
[data-theme="dark"] .img2img-result-panel,
[data-theme="dark"] .img2img-action-panel {
    background: #1b1f31 !important;
    border-color: rgba(148, 163, 184, .14) !important;
    box-shadow: none !important;
}

[data-theme="dark"] .img2img-card-header h3,
[data-theme="dark"] .img2img-section-header h3,
[data-theme="dark"] .img2img-param-card h3,
[data-theme="dark"] .img2img-result-header span:first-child {
    color: #e5edf8 !important;
}

[data-theme="dark"] .img2img-drop-zone,
[data-theme="dark"] .img2img-prompt-box,
[data-theme="dark"] .img2img-num-control,
[data-theme="dark"] .img2img-enhance-row,
[data-theme="dark"] .img2img-size-button {
    background: #202638 !important;
    border-color: rgba(148, 163, 184, .14) !important;
}

[data-theme="dark"] .img2img-prompt-input {
    color: #e5edf8 !important;
}

[data-theme="dark"] .img2img-upload-icon,
[data-theme="dark"] .img2img-empty-preview {
    background: #202638;
    border-color: rgba(148, 163, 184, .22);
    color: #718198;
}

[data-theme="dark"] .img2img-result-body {
    background: #151827;
}

[data-theme="dark"] .img2img-generate-btn,
[data-theme="dark"] .img2img-num-button.active,
[data-theme="dark"] .img2img-size-button.active {
    background: #e5edf8 !important;
    border-color: #e5edf8 !important;
    color: #151827 !important;
    box-shadow: none !important;
}

[data-theme="dark"] .img2img-size-button.active small {
    color: rgba(21, 24, 39, .62);
}

@media (max-width: 1180px) {
    .img2img-workbench {
        flex-direction: column;
        overflow-y: auto;
    }

    .img2img-compose-pane {
        overflow: visible;
        padding-right: 0 !important;
    }

    .img2img-result-panel {
        min-height: 460px;
        min-width: 0;
    }
}

@media (max-width: 820px) {
    .img2img-workbench {
        padding: 14px !important;
    }
}

/* Inpaint workbench refresh */
.inpaint-workbench {
    background: #f5f7fb;
    gap: 20px !important;
    padding: 22px !important;
}

.inpaint-compose-pane {
    gap: 16px !important;
    padding-right: 2px !important;
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 23, 42, .18) transparent;
}

.inpaint-compose-pane::-webkit-scrollbar,
.inpaint-result-body::-webkit-scrollbar,
.webgen-workbench ::-webkit-scrollbar,
.media-page-body::-webkit-scrollbar,
.profile-workbench::-webkit-scrollbar,
.recharge-workbench::-webkit-scrollbar,
.points-workbench::-webkit-scrollbar {
    width: 6px;
}

.inpaint-compose-pane::-webkit-scrollbar-track,
.inpaint-result-body::-webkit-scrollbar-track,
.webgen-workbench ::-webkit-scrollbar-track,
.media-page-body::-webkit-scrollbar-track,
.profile-workbench::-webkit-scrollbar-track,
.recharge-workbench::-webkit-scrollbar-track,
.points-workbench::-webkit-scrollbar-track {
    background: transparent;
}

.inpaint-compose-pane::-webkit-scrollbar-thumb,
.inpaint-result-body::-webkit-scrollbar-thumb,
.webgen-workbench ::-webkit-scrollbar-thumb,
.media-page-body::-webkit-scrollbar-thumb,
.profile-workbench::-webkit-scrollbar-thumb,
.recharge-workbench::-webkit-scrollbar-thumb,
.points-workbench::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, .16);
    border-radius: 999px;
}

.inpaint-card,
.inpaint-result-panel {
    border: 1px solid rgba(15, 23, 42, .07) !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, .94) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .035), 0 18px 44px rgba(15, 23, 42, .045) !important;
}

.inpaint-editor-card,
.inpaint-prompt-card {
    padding: 22px !important;
}

.inpaint-editor-header {
    gap: 14px;
    align-items: center !important;
    padding-top: 4px;
}

.inpaint-editor-header h3,
.inpaint-section-header h3,
.inpaint-result-header h3 {
    color: #101828 !important;
    font-size: 14px !important;
    line-height: 20px;
    font-weight: 850 !important;
}

.inpaint-tool-strip {
    min-height: 38px;
    flex-wrap: wrap;
    justify-content: flex-end;
    padding: 5px;
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 13px;
    background: #f8fafc;
}

.inpaint-tool-strip label {
    color: #8a98ad !important;
}

.inpaint-brush-size {
    width: 30px !important;
    height: 30px !important;
    border-color: rgba(15, 23, 42, .08) !important;
    background: #fff;
    color: #718096 !important;
}

.inpaint-brush-size.active {
    background: #111827 !important;
    border-color: #111827 !important;
    color: #fff !important;
    box-shadow: 0 8px 16px rgba(17, 24, 39, .14);
}

.inpaint-tool-button {
    min-height: 30px;
    border-color: rgba(15, 23, 42, .08) !important;
    background: #fff;
    color: #5f6d7e !important;
    font-weight: 800 !important;
}

.inpaint-tool-button:hover {
    border-color: rgba(15, 23, 42, .14) !important;
    color: #111827 !important;
}

.inpaint-danger-button {
    color: #ef4444 !important;
}

.inpaint-tool-divider {
    background: rgba(15, 23, 42, .08) !important;
}

.inpaint-upload-area {
    min-height: 184px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-color: rgba(148, 163, 184, .34) !important;
    border-radius: 15px !important;
    background: #fbfcfe;
}

.inpaint-upload-area:hover,
.inpaint-upload-area.dragover {
    border-color: rgba(17, 24, 39, .22) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, .04);
}

.inpaint-workbench #canvas-container.inpaint-canvas-container {
    height: clamp(390px, 48vh, 560px);
    border: 1px solid rgba(15, 23, 42, .07);
    border-radius: 15px;
    background: #f1f4f8;
}

.inpaint-canvas-help {
    margin-top: 8px;
    color: #9aa6b8;
}

.inpaint-prompt-box {
    min-height: 128px;
    border-color: rgba(15, 23, 42, .06) !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.inpaint-prompt-box:focus-within {
    border-color: rgba(17, 24, 39, .16) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, .04);
}

.inpaint-prompt-input {
    height: 98px !important;
    line-height: 24px;
}

.inpaint-action-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, .07);
    border-radius: 18px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .05);
}

.inpaint-generate-btn {
    width: 100%;
    height: 52px;
    border-radius: 13px !important;
    background: #111827 !important;
    box-shadow: 0 14px 24px rgba(17, 24, 39, .16) !important;
}

.inpaint-generate-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    background: #1f2937 !important;
}

.inpaint-generate-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

.inpaint-policy-note {
    color: #b4bdca;
    font-size: 10px;
    line-height: 14px;
    text-align: center;
}

.inpaint-result-panel {
    min-width: 360px;
}

.inpaint-result-header {
    padding: 18px 20px !important;
    border-bottom-color: rgba(15, 23, 42, .06) !important;
}

.inpaint-download-button {
    color: #7b8798 !important;
}

.inpaint-result-body {
    padding: 18px !important;
    background: linear-gradient(180deg, #fbfcfe 0%, #f8fafc 100%);
}

.inpaint-empty-state {
    min-height: 360px;
    gap: 10px;
    color: #aeb8c6 !important;
    text-align: center;
}

.inpaint-empty-preview {
    width: 116px;
    height: 116px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    border: 1px dashed rgba(148, 163, 184, .42);
    border-radius: 18px;
    background: #fff;
    color: #b8c2cf;
}

.inpaint-empty-state p {
    color: #8793a5;
    font-size: 13px;
    font-weight: 850;
}

.inpaint-result-image {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 14px !important;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .1) !important;
}

[data-theme="dark"] .inpaint-workbench {
    background: #151827;
}

[data-theme="dark"] .inpaint-card,
[data-theme="dark"] .inpaint-result-panel,
[data-theme="dark"] .inpaint-action-panel {
    background: #1b1f31 !important;
    border-color: rgba(148, 163, 184, .14) !important;
    box-shadow: none !important;
}

[data-theme="dark"] .inpaint-editor-header h3,
[data-theme="dark"] .inpaint-section-header h3,
[data-theme="dark"] .inpaint-result-header h3 {
    color: #e5edf8 !important;
}

[data-theme="dark"] .inpaint-tool-strip,
[data-theme="dark"] .inpaint-prompt-box,
[data-theme="dark"] .inpaint-workbench #canvas-container.inpaint-canvas-container {
    background: #202638 !important;
    border-color: rgba(148, 163, 184, .14) !important;
}

[data-theme="dark"] .inpaint-tool-button,
[data-theme="dark"] .inpaint-brush-size,
[data-theme="dark"] .inpaint-empty-preview {
    background: #1b1f31 !important;
    border-color: rgba(148, 163, 184, .16) !important;
    color: #a8b5c8 !important;
}

[data-theme="dark"] .inpaint-brush-size.active,
[data-theme="dark"] .inpaint-generate-btn {
    background: #e5edf8 !important;
    border-color: #e5edf8 !important;
    color: #151827 !important;
    box-shadow: none !important;
}

[data-theme="dark"] .inpaint-prompt-input {
    color: #e5edf8 !important;
}

[data-theme="dark"] .inpaint-result-body {
    background: #151827;
}

@media (max-width: 1180px) {
    .inpaint-workbench {
        flex-direction: column;
        overflow-y: auto;
    }

    .inpaint-compose-pane {
        overflow: visible;
        padding-right: 0 !important;
    }

    .inpaint-result-panel {
        min-height: 460px;
        min-width: 0;
    }
}

@media (max-width: 820px) {
    .inpaint-workbench {
        padding: 14px !important;
    }

    .inpaint-editor-header {
        flex-direction: column;
        align-items: stretch !important;
    }

    .inpaint-tool-strip {
        justify-content: flex-start;
        width: 100%;
    }

    .inpaint-canvas-help {
        align-items: flex-start !important;
        flex-direction: column;
        gap: 8px;
    }
}

/* Web page generator refresh */
.webgen-workbench {
    background: #f5f7fb;
    gap: 20px !important;
    padding: 22px !important;
}

.webgen-project-panel,
.webgen-main-panel,
.webgen-chat-panel {
    border: 1px solid rgba(15, 23, 42, .07) !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, .94) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .035), 0 18px 44px rgba(15, 23, 42, .045) !important;
}

.webgen-panel-header {
    min-height: 64px;
    border-bottom-color: rgba(15, 23, 42, .06) !important;
}

.webgen-project-panel .webgen-panel-header {
    gap: 18px;
}

.webgen-project-panel .webgen-panel-header h3 {
    min-width: 0;
    flex: 1 1 auto;
}

.webgen-panel-header h3,
.webgen-chat-header h3 {
    color: #101828 !important;
    font-size: 14px !important;
    line-height: 20px;
    font-weight: 850 !important;
}

.webgen-panel-header #btn-new-project,
.webgen-primary-btn {
    border-radius: 12px !important;
    background: #111827 !important;
    box-shadow: 0 12px 22px rgba(17, 24, 39, .14) !important;
}

.webgen-panel-header #btn-new-project {
    flex: 0 0 auto;
    margin-left: 8px;
}

.webgen-main-actions {
    border-color: rgba(15, 23, 42, .06) !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
    box-shadow: none !important;
}

.webgen-main-actions button {
    border-radius: 11px !important;
    box-shadow: none !important;
}

.webgen-main-scroll {
    background: linear-gradient(180deg, #fbfcfe 0%, #f8fafc 100%);
}

.webgen-create-panel {
    max-width: 720px !important;
    padding-top: 18px !important;
}

.webgen-create-panel label {
    color: #7d8aa0 !important;
}

.webgen-input {
    border-color: rgba(15, 23, 42, .07) !important;
    border-radius: 13px !important;
    background: #f8fafc !important;
}

.webgen-input:focus {
    border-color: rgba(17, 24, 39, .18) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, .04);
}

.webgen-project-item {
    border-color: rgba(15, 23, 42, .07) !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.webgen-project-item:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 23, 42, .15) !important;
    background: #fff !important;
}

.webgen-project-item.is-active {
    border-color: #111827 !important;
    background: #fff !important;
    box-shadow: 0 0 0 2px rgba(17, 24, 39, .08);
}

.webgen-page-tab {
    border-radius: 999px !important;
}

.webgen-page-tab.is-active {
    background: #111827 !important;
    color: #fff !important;
}

.webgen-chat-panel {
    width: 360px !important;
}

.webgen-chat-header {
    border-bottom-color: rgba(15, 23, 42, .06) !important;
    background: #fff !important;
}

.webgen-message-list {
    background: #f8fafc !important;
}

.webgen-chat-composer {
    border-top-color: rgba(15, 23, 42, .06) !important;
}

.webgen-chat-composer .webgen-input {
    font-size: 12px !important;
}

.webgen-workbench #design-img {
    border-radius: 14px !important;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .08) !important;
}

.webgen-preview-frame-wrap {
    background: #edf1f6 !important;
}

.webgen-preview-frame {
    transition: width .18s ease, height .18s ease, border-radius .18s ease, box-shadow .18s ease;
}

.webgen-preview-frame-wrap.is-mobile-preview {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: auto !important;
    padding: 18px !important;
}

.webgen-preview-frame-wrap.is-mobile-preview .webgen-preview-frame {
    width: min(430px, 100%) !important;
    height: calc(100vh - 118px) !important;
    max-height: 900px;
    min-height: 620px;
    flex: 0 0 auto;
    border-radius: 24px !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .18) !important;
}

[data-theme="dark"] .webgen-workbench {
    background: #151827;
}

[data-theme="dark"] .webgen-project-panel,
[data-theme="dark"] .webgen-main-panel,
[data-theme="dark"] .webgen-chat-panel {
    background: #1b1f31 !important;
    border-color: rgba(148, 163, 184, .14) !important;
    box-shadow: none !important;
}

[data-theme="dark"] .webgen-main-scroll,
[data-theme="dark"] .webgen-message-list {
    background: #151827 !important;
}

[data-theme="dark"] .webgen-preview-frame-wrap {
    background: #111827 !important;
}

[data-theme="dark"] .webgen-main-actions,
[data-theme="dark"] .webgen-input,
[data-theme="dark"] .webgen-project-item {
    background: #202638 !important;
    border-color: rgba(148, 163, 184, .14) !important;
}

[data-theme="dark"] .webgen-chat-header {
    background: #1b1f31 !important;
}

[data-theme="dark"] .webgen-panel-header h3,
[data-theme="dark"] .webgen-chat-header h3 {
    color: #e5edf8 !important;
}

[data-theme="dark"] .webgen-panel-header #btn-new-project,
[data-theme="dark"] .webgen-primary-btn,
[data-theme="dark"] .webgen-page-tab.is-active {
    background: #e5edf8 !important;
    color: #151827 !important;
    box-shadow: none !important;
}

@media (max-width: 1280px) {
    .webgen-workbench {
        overflow-x: auto;
    }

    .webgen-project-panel {
        width: 280px !important;
        flex: 0 0 280px;
    }

    .webgen-chat-panel {
        width: 330px !important;
        flex: 0 0 330px;
    }
}

@media (max-width: 980px) {
    .webgen-workbench {
        flex-direction: column;
        overflow-y: auto;
    }

    .webgen-project-panel,
    .webgen-chat-panel {
        width: 100% !important;
        flex: none;
        min-height: 360px;
    }
}

/* Media and history pages refresh */
.gallery-workbench,
.works-workbench,
.history-workbench {
    background: #f5f7fb;
}

.media-page-header {
    min-height: 72px;
    gap: 16px !important;
    border-bottom-color: rgba(15, 23, 42, .06) !important;
    background: rgba(255, 255, 255, .62);
}

.media-page-header h2 {
    color: #101828 !important;
    font-size: 16px !important;
    line-height: 22px;
    font-weight: 900 !important;
}

.media-page-body {
    padding: 20px 22px 24px !important;
}

.media-grid {
    column-gap: 18px !important;
}

.media-card {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .055);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.media-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 23, 42, .14);
    box-shadow: 0 18px 34px rgba(15, 23, 42, .08);
}

.media-card img {
    background: #f8fafc;
}

.media-filter-tabs {
    margin-left: 10px;
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 13px !important;
    background: #f8fafc !important;
}

.media-filter-tabs .filter-btn {
    min-width: 76px;
    border-radius: 10px !important;
}

.works-workbench .filter-btn.bg-white,
.works-workbench .filter-btn.font-bold {
    background: #111827 !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(17, 24, 39, .12) !important;
}

.media-search {
    margin-left: auto;
}

.media-search input {
    height: 38px;
    border-color: rgba(15, 23, 42, .07) !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
}

.media-search input:focus {
    border-color: rgba(17, 24, 39, .18) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, .04);
}

.media-danger-button {
    border: 1px solid rgba(239, 68, 68, .12);
    background: #fff;
    font-weight: 800 !important;
}

.media-danger-button:hover {
    border-color: rgba(239, 68, 68, .2);
}

.media-empty-state {
    min-height: 360px !important;
    border: 1px dashed rgba(148, 163, 184, .32);
    border-radius: 18px;
    background: rgba(255, 255, 255, .72);
}

.media-load-more button {
    min-width: 132px;
    height: 38px;
    border-color: rgba(15, 23, 42, .08) !important;
    color: #64748b !important;
    font-weight: 800 !important;
}

.history-list {
    display: grid;
    gap: 12px;
}

.history-record-card {
    border: 1px solid rgba(15, 23, 42, .07) !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, .92) !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .045) !important;
}

.history-record-card:hover {
    border-color: rgba(15, 23, 42, .13) !important;
    transform: translateY(-1px);
}

.history-record-card .history-image-preview,
.history-record-card .w-14.h-14 {
    border: 1px solid rgba(15, 23, 42, .06);
}

[data-theme="dark"] .gallery-workbench,
[data-theme="dark"] .works-workbench,
[data-theme="dark"] .history-workbench {
    background: #151827;
}

[data-theme="dark"] .media-page-header {
    background: rgba(27, 31, 49, .86);
    border-bottom-color: rgba(148, 163, 184, .14) !important;
}

[data-theme="dark"] .media-page-header h2 {
    color: #e5edf8 !important;
}

[data-theme="dark"] .media-card,
[data-theme="dark"] .history-record-card,
[data-theme="dark"] .media-empty-state,
[data-theme="dark"] .media-danger-button {
    background: #1b1f31 !important;
    border-color: rgba(148, 163, 184, .14) !important;
    box-shadow: none !important;
}

[data-theme="dark"] .media-filter-tabs,
[data-theme="dark"] .media-search input {
    background: #202638 !important;
    border-color: rgba(148, 163, 184, .14) !important;
}

[data-theme="dark"] .works-workbench .filter-btn.bg-white,
[data-theme="dark"] .works-workbench .filter-btn.font-bold {
    background: #e5edf8 !important;
    color: #151827 !important;
    box-shadow: none !important;
}

@media (max-width: 820px) {
    .media-page-header,
    .history-toolbar {
        align-items: flex-start !important;
        flex-direction: column;
    }

    .media-search {
        width: 100%;
        max-width: none !important;
        margin-left: 0;
    }

    .media-filter-tabs {
        margin-left: 0;
        width: 100%;
    }

    .media-filter-tabs .filter-btn {
        flex: 1;
    }
}

/* Account pages refresh */
.profile-workbench,
.recharge-workbench,
.points-workbench {
    background: #f5f7fb;
    padding: 22px !important;
}

.profile-grid {
    gap: 18px !important;
}

.profile-card,
.recharge-card,
.points-summary-card,
.points-ledger-card {
    border: 1px solid rgba(15, 23, 42, .07) !important;
    border-radius: 18px !important;
    background: rgba(255, 255, 255, .94) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .035), 0 18px 44px rgba(15, 23, 42, .045) !important;
}

.profile-card {
    padding: 24px !important;
}

.profile-hero-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .96) 0%, rgba(248, 250, 252, .92) 100%) !important;
}

.profile-stats-grid {
    gap: 12px !important;
}

.profile-stats-grid > .profile-stat-card {
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 14px;
    background: #f8fafc;
    padding: 14px 10px;
}

.profile-favorite-stat {
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.profile-favorite-stat:hover {
    transform: translateY(-1px);
    border-color: rgba(17, 24, 39, .16);
    background: #fff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .07);
}

.profile-favorite-stat:focus-visible {
    outline: 2px solid rgba(99, 102, 241, .36);
    outline-offset: 3px;
}

.profile-bot-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.profile-bot-header,
.profile-bot-switch-row,
.profile-bot-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.profile-bot-status {
    flex: 0 0 auto;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    padding: 7px 11px;
    font-size: 10px;
    line-height: 1;
    font-weight: 900;
}

.profile-bot-status.is-online {
    border-color: rgba(16, 185, 129, .22);
    background: #ecfdf5;
    color: #059669;
}

.profile-bot-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-bot-switch-row {
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 14px;
    background: #f8fafc;
    padding: 14px;
}

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

.profile-bot-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.profile-bot-field span {
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
}

.profile-bot-field input,
.profile-bot-field select,
.profile-bot-field textarea {
    width: 100%;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 12px;
    background: #f8fafc;
    color: #334155;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 700;
    outline: none;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.profile-bot-field textarea {
    resize: vertical;
    min-height: 84px;
}

.profile-bot-field input:focus,
.profile-bot-field select:focus,
.profile-bot-field textarea:focus {
    border-color: rgba(99, 102, 241, .32);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .08);
}

.profile-bot-save {
    flex: 0 0 auto;
    border-radius: 12px;
    background: #111827;
    color: #fff;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 900;
    transition: transform .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.profile-bot-save:hover {
    transform: translateY(-1px);
    background: #020617;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .14);
}

.profile-favorites-modal {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.profile-favorites-modal.hidden {
    display: none;
}

.profile-favorites-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .42);
    backdrop-filter: blur(6px);
}

.profile-favorites-panel {
    position: relative;
    width: min(960px, 100%);
    max-height: min(760px, 86vh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(15, 23, 42, .22);
}

.profile-favorites-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
}

.profile-favorites-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    transition: background-color .16s ease, color .16s ease;
}

.profile-favorites-close:hover {
    background: #f1f5f9;
    color: #111827;
}

.profile-favorites-list {
    min-height: 320px;
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    padding: 18px;
    background: #f8fafc;
}

.profile-favorites-loading,
.profile-favorites-empty {
    min-height: 300px;
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(148, 163, 184, .32);
    border-radius: 16px;
    background: rgba(255, 255, 255, .78);
    color: #94a3b8;
    text-align: center;
}

.profile-favorite-card {
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, .07);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .055);
}

.profile-favorite-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: block;
    overflow: hidden;
    background: #eef2f7;
}

.profile-favorite-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .18s ease;
}

.profile-favorite-card:hover .profile-favorite-thumb img {
    transform: scale(1.035);
}

.profile-favorite-info {
    padding: 12px;
}

.profile-favorite-prompt {
    min-height: 34px;
    color: #1f2937;
    font-size: 12px;
    line-height: 17px;
    font-weight: 850;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.profile-favorite-meta {
    margin-top: 6px;
    color: #94a3b8;
    font-size: 10px;
    line-height: 14px;
}

.profile-favorite-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.profile-favorite-action {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    padding: 0 10px;
    background: #f1f5f9;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    transition: background-color .16s ease, color .16s ease;
}

.profile-favorite-action:hover {
    background: #111827;
    color: #fff;
}

.profile-favorite-remove {
    color: #ef4444;
}

.profile-workbench input,
.profile-workbench textarea,
.profile-workbench select,
.points-workbench input,
.points-workbench textarea,
.points-workbench select {
    border-color: rgba(15, 23, 42, .07) !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
}

.profile-workbench input:focus,
.points-workbench input:focus {
    border-color: rgba(17, 24, 39, .18) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, .04);
}

.profile-workbench [data-toggle-row] {
    border-radius: 12px !important;
}

.profile-workbench [data-toggle-row]:hover {
    background: #f8fafc !important;
}

.profile-workbench #pts-list,
.points-ledger-card #pts-list {
    border-color: rgba(15, 23, 42, .06) !important;
    border-radius: 14px !important;
}

.recharge-workbench {
    min-height: 100%;
    overflow-y: auto;
}

.recharge-workbench > .grid {
    gap: 20px !important;
}

.recharge-card {
    padding: 22px !important;
}

.recharge-plans-card h2 {
    color: #101828 !important;
    font-size: 24px !important;
    line-height: 30px;
    font-weight: 900 !important;
}

.recharge-workbench .tab-btn {
    min-width: 104px;
    border-radius: 10px !important;
    font-size: 13px;
    font-weight: 800;
}

.recharge-workbench .tab-btn.active {
    background: #111827 !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(17, 24, 39, .12) !important;
}

.recharge-workbench #plan-grid {
    gap: 18px !important;
}

.recharge-workbench #plan-grid > .animate-pulse {
    height: 500px !important;
    border-radius: 20px !important;
    padding: 24px !important;
}

.recharge-workbench .plan-card {
    min-height: 430px !important;
    border: 1px solid rgba(15, 23, 42, .08) !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .06) !important;
}

.recharge-workbench .plan-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 23, 42, .15) !important;
    box-shadow: 0 20px 40px rgba(15, 23, 42, .09) !important;
}

.recharge-workbench .plan-card.selected {
    border-color: #111827 !important;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, .08), 0 18px 36px rgba(15, 23, 42, .08) !important;
}

.recharge-workbench .recharge-premium-plan {
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%) !important;
}

.recharge-workbench .recharge-light-plan {
    background: #fff !important;
}

.recharge-feature-panel {
    border: 1px solid rgba(15, 23, 42, .06);
    background: #f8fafc;
}

.recharge-primary-btn {
    border-radius: 14px !important;
    background: #111827 !important;
    box-shadow: 0 14px 24px rgba(17, 24, 39, .16) !important;
}

.recharge-primary-btn:hover:not(:disabled) {
    background: #1f2937 !important;
}

.recharge-workbench .pay-btn {
    border-width: 1px;
    border-color: rgba(15, 23, 42, .08) !important;
    border-radius: 14px !important;
    background: #f8fafc !important;
}

.recharge-workbench .pay-btn.selected {
    border-color: #111827 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(17, 24, 39, .06) !important;
}

.recharge-workbench #orders-list > div,
.recharge-workbench #selected-plan-panel {
    border-color: rgba(15, 23, 42, .07) !important;
    border-radius: 14px !important;
}

.points-page-header {
    min-height: 44px;
}

.points-page-header h2 {
    color: #101828 !important;
    font-size: 18px !important;
    line-height: 24px;
    font-weight: 900 !important;
}

.points-summary-grid {
    gap: 14px !important;
}

.points-summary-card {
    min-height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.points-ledger-card {
    border-radius: 18px !important;
}

.points-ledger-card #pts-list > div {
    border-color: rgba(15, 23, 42, .06);
}

.points-ledger-card #pts-pagination {
    border-top: 1px solid rgba(15, 23, 42, .06);
}

[data-theme="dark"] .profile-workbench,
[data-theme="dark"] .recharge-workbench,
[data-theme="dark"] .points-workbench {
    background: #151827;
}

[data-theme="dark"] .profile-card,
[data-theme="dark"] .recharge-card,
[data-theme="dark"] .points-summary-card,
[data-theme="dark"] .points-ledger-card,
[data-theme="dark"] .profile-stats-grid > .profile-stat-card,
[data-theme="dark"] .recharge-workbench .plan-card,
[data-theme="dark"] .recharge-feature-panel {
    background: #1b1f31 !important;
    border-color: rgba(148, 163, 184, .14) !important;
    box-shadow: none !important;
}

[data-theme="dark"] .profile-favorites-panel,
[data-theme="dark"] .profile-favorite-card,
[data-theme="dark"] .profile-favorites-empty,
[data-theme="dark"] .profile-favorites-loading {
    background: #1b1f31;
    border-color: rgba(148, 163, 184, .14);
}

[data-theme="dark"] .profile-favorites-list,
[data-theme="dark"] .profile-favorites-close,
[data-theme="dark"] .profile-favorite-action,
[data-theme="dark"] .profile-bot-switch-row,
[data-theme="dark"] .profile-bot-status {
    background: #202638;
}

[data-theme="dark"] .profile-bot-status {
    border-color: rgba(148, 163, 184, .16);
    color: #a8b5c8;
}

[data-theme="dark"] .profile-bot-status.is-online {
    background: rgba(16, 185, 129, .12);
    border-color: rgba(16, 185, 129, .24);
    color: #34d399;
}

[data-theme="dark"] .profile-favorites-header {
    border-bottom-color: rgba(148, 163, 184, .14);
}

[data-theme="dark"] .profile-favorite-prompt,
[data-theme="dark"] #favorites-modal-title {
    color: #e5edf8 !important;
}

[data-theme="dark"] .profile-favorite-action:hover {
    background: #e5edf8;
    color: #151827;
}

[data-theme="dark"] .profile-hero-card,
[data-theme="dark"] .recharge-workbench .recharge-premium-plan,
[data-theme="dark"] .recharge-workbench .recharge-light-plan {
    background: #1b1f31 !important;
}

[data-theme="dark"] .profile-workbench input,
[data-theme="dark"] .profile-workbench textarea,
[data-theme="dark"] .profile-workbench select,
[data-theme="dark"] .points-workbench input,
[data-theme="dark"] .points-workbench textarea,
[data-theme="dark"] .points-workbench select,
[data-theme="dark"] .recharge-workbench .pay-btn {
    background: #202638 !important;
    border-color: rgba(148, 163, 184, .14) !important;
}

[data-theme="dark"] .recharge-workbench .tab-btn.active,
[data-theme="dark"] .recharge-primary-btn {
    background: #e5edf8 !important;
    color: #151827 !important;
    box-shadow: none !important;
}

[data-theme="dark"] .recharge-workbench .plan-card.selected,
[data-theme="dark"] .recharge-workbench .pay-btn.selected {
    border-color: #e5edf8 !important;
    box-shadow: 0 0 0 3px rgba(229, 237, 248, .08) !important;
}

@media (max-width: 820px) {
    .profile-workbench,
    .recharge-workbench,
    .points-workbench {
        padding: 14px !important;
    }

    .profile-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .profile-bot-header,
    .profile-bot-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-bot-grid {
        grid-template-columns: 1fr;
    }

    .profile-bot-save {
        width: 100%;
    }

    .points-page-header {
        align-items: flex-start !important;
        flex-direction: column;
    }

    .profile-favorites-modal {
        padding: 12px;
        align-items: stretch;
    }

    .profile-favorites-panel {
        max-height: 92vh;
    }

    .profile-favorites-list {
        grid-template-columns: 1fr;
    }
}

.pay-btn {
    border: 2px solid #E2E8F0;
    border-radius: 12px;
    cursor: pointer;
    transition: all .2s;
    background: white;
}

.pay-btn:hover {
    border-color: var(--member-primary);
}

.pay-btn.selected {
    border-color: var(--member-primary);
    background: white;
    box-shadow: 0 0 0 2px var(--member-border);
}

.tab-btn {
    padding: 8px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    color: #64748b;
}

.tab-btn.active {
    background: var(--member-soft);
    color: var(--member-text);
    font-weight: 600;
    box-shadow: 0 2px 8px var(--member-shadow);
}

.purple-card {
    background: linear-gradient(165deg, #7c3aed 0%, #c084fc 50%, #fb7185 100%);
    box-shadow: 0 30px 60px -15px rgba(168, 85, 247, .4);
}

.black-gold-card {
    background: linear-gradient(180deg, #1a1c2e 0%, #000 100%);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .85);
    border: 1px solid rgba(212, 175, 55, .2);
}

.gold-text {
    color: #D4AF37;
}

.glass-inner {
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 28px;
}

.dark-glass-inner {
    background: rgba(255, 255, 255, .03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, .1);
    border-radius: 28px;
}

.gold-btn {
    background: linear-gradient(90deg, #FDE68A 0%, #D4AF37 50%, #B45309 100%);
    color: #451A03;
}

.recharge-price-value {
    padding-top: 6px;
    margin-top: -6px;
}

.profile-avatar-fallback {
    background: linear-gradient(135deg, #6366f1, #a855f7);
}

.profile-member-icon {
    background: #EDE9FE;
    color: #7C3AED;
}

.profile-points-bar {
    width: 0%;
}

.profile-member-card.profile-member-card-pro {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-color: #B8860B;
}

.profile-member-card.profile-member-card-pro .profile-member-icon {
    background: linear-gradient(135deg, #B8860B, #FFD700);
    color: #1a1a2e;
}

.profile-member-card.profile-member-card-pro #member-status-text {
    color: #FFD700;
}

.profile-member-card.profile-member-card-pro #member-expire-text {
    color: #B8860B;
}

.profile-member-card.profile-member-card-vip {
    background: linear-gradient(135deg, #EDE9FE, #DDD6FE);
    border-color: #C4B5FD;
}

.profile-member-card.profile-member-card-vip .profile-member-icon {
    background: linear-gradient(135deg, #7C3AED, #A855F7);
    color: white;
}

.profile-member-card.profile-member-card-vip #member-status-text {
    color: #5B21B6;
}

.profile-member-card.profile-member-card-vip #member-expire-text {
    color: #7C3AED;
}

.profile-points-amount-consume {
    color: #f87171;
}

.profile-points-amount-recharge {
    color: #34d399;
}

.profile-points-amount-reward {
    color: #818cf8;
}

.profile-points-amount-refund {
    color: #fbbf24;
}

.profile-points-amount-adjust {
    color: #94a3b8;
}

.points-list {
    border-color: #f1f5f9;
}

.points-amount-consume {
    color: #f87171;
}

.points-amount-recharge {
    color: #34d399;
}

.points-amount-reward {
    color: #818cf8;
}

.points-amount-refund {
    color: #fbbf24;
}

.points-amount-default {
    color: #94a3b8;
}

.af-task-indent-0 {
    padding-left: 0;
}

.af-task-indent-1 {
    padding-left: 18px;
}

.af-task-indent-2 {
    padding-left: 36px;
}

.af-task-indent-3 {
    padding-left: 54px;
}

.af-task-indent-4 {
    padding-left: 72px;
}

.af-task-indent-5 {
    padding-left: 90px;
}

.af-task-indent-6 {
    padding-left: 108px;
}

.af-task-indent-7 {
    padding-left: 126px;
}

.af-task-indent-8 {
    padding-left: 144px;
}

.af-task-desc-indent-0 {
    padding-left: 68px;
}

.af-task-desc-indent-1 {
    padding-left: 86px;
}

.af-task-desc-indent-2 {
    padding-left: 104px;
}

.af-task-desc-indent-3 {
    padding-left: 122px;
}

.af-task-desc-indent-4 {
    padding-left: 140px;
}

.af-task-desc-indent-5 {
    padding-left: 158px;
}

.af-task-desc-indent-6 {
    padding-left: 176px;
}

.af-task-desc-indent-7 {
    padding-left: 194px;
}

.af-task-desc-indent-8 {
    padding-left: 212px;
}

#preview-drawer * {
    scrollbar-width: thin;
    scrollbar-color: #818cf8 #e2e8f0;
}

#preview-drawer ::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

#preview-drawer ::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 999px;
}

#preview-drawer ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #818cf8, #a78bfa);
    border-radius: 999px;
    border: 2px solid #e2e8f0;
}

#preview-drawer ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
}

/* Dark app shell */
[data-theme="dark"] body {
    background: #151827 !important;
    color: #e5edf8 !important;
}

[data-theme="dark"] .sidebar,
[data-theme="dark"] header,
[data-theme="dark"] #notify-dropdown {
    background: #1b1f31 !important;
    border-color: rgba(148, 163, 184, .14) !important;
    box-shadow: none !important;
    backdrop-filter: none;
}

[data-theme="dark"] main,
[data-theme="dark"] #page-content {
    background: #151827 !important;
}

[data-theme="dark"] header #page-title,
[data-theme="dark"] #header-username,
[data-theme="dark"] #sidebar-username,
[data-theme="dark"] #user-points {
    color: #e5edf8 !important;
}

[data-theme="dark"] .menu-btn,
[data-theme="dark"] [data-toggle-notify],
[data-theme="dark"] .sidebar-bottom-actions a,
[data-theme="dark"] .sidebar-bottom-actions button,
[data-theme="dark"] #btn-logout,
[data-theme="dark"] #user-total-points,
[data-theme="dark"] #sidebar-points {
    color: #93a4bb !important;
}

[data-theme="dark"] .menu-btn:hover,
[data-theme="dark"] [data-toggle-notify]:hover,
[data-theme="dark"] .sidebar-bottom-actions a:hover,
[data-theme="dark"] .sidebar-bottom-actions button:hover {
    color: #e5edf8 !important;
}

[data-theme="dark"] .app-sidebar-section {
    border-top-color: rgba(148, 163, 184, .12) !important;
}

[data-theme="dark"] #sidebar-points-card > div {
    background: #202638 !important;
    border: 0 !important;
    box-shadow: none !important;
}

[data-theme="dark"] .sidebar-points-caption {
    color: #93a4bb;
}

[data-theme="dark"] .sidebar-points-used-value #user-points {
    color: #e5edf8;
}

[data-theme="dark"] .sidebar-points-divider {
    color: #64748b;
}

[data-theme="dark"] #sidebar-points-card .bg-slate-200 {
    background: #2a3042 !important;
}

[data-theme="dark"] #points-progress {
    background: #e5edf8 !important;
    box-shadow: none !important;
}

[data-theme="dark"] #sidebar-points-card button,
[data-theme="dark"] header [data-nav-page="recharge"] {
    background: #202638 !important;
    border-color: rgba(148, 163, 184, .16) !important;
    color: #e5edf8 !important;
    box-shadow: none !important;
}

[data-theme="dark"] #sidebar-points-card button:hover,
[data-theme="dark"] header [data-nav-page="recharge"]:hover {
    background: #252b3d !important;
    border-color: rgba(148, 163, 184, .24) !important;
}

[data-theme="dark"] #sidebar-avatar,
[data-theme="dark"] #header-avatar {
    background: #252b3d !important;
    color: #e5edf8 !important;
}

[data-theme="dark"] #notify-dropdown {
    color: #e5edf8 !important;
}

[data-theme="dark"] #notify-dropdown .border-b {
    border-color: rgba(148, 163, 184, .14) !important;
}

[data-theme="dark"] #bell-dot {
    border-color: #1b1f31 !important;
}
