/* ============================================================
   GEIST — премиум-шрифт (open-source MIT, от Vercel)
   ============================================================ */
@font-face {
    font-family: 'Geist';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/static/fonts/geist-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Geist';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/static/fonts/geist-medium.woff2') format('woff2');
}
@font-face {
    font-family: 'Geist';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/static/fonts/geist-bold.woff2') format('woff2');
}
@font-face {
    font-family: 'Geist';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('/static/fonts/geist-black.woff2') format('woff2');
}

/* ============ RESET ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #efede8;
    --bg-soft: #f5f3ee;
    --card: #fbfaf7;
    --card-dark: #171717;
    --text: #171717;
    --text-dim: #6b6b6b;
    --text-light: #9a9a9a;
    --border: rgba(23, 23, 23, 0.1);
    --border-strong: rgba(23, 23, 23, 0.15);
    --accent: #c9ff4a;
    --accent-dark: #687044;
    --violet: #7c5cff;
    --green: #4ade80;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Geist', "Avenir Next", "Inter", -apple-system, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "ss01", "cv01";
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }

::selection {
    background: rgba(201, 255, 74, 0.55);
}

/* ============ APP LAYOUT (с сайдбаром) ============ */
.app-layout {
    display: flex;
    min-height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
}

/* ============ SIDEBAR ============ */
.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--card-dark);
    color: #fff;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo-mark {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--accent);
    color: var(--card-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 20px;
}

.sidebar-logo-text {
    font-size: 18px;
    font-weight: 800;
}

.sidebar-logo-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: rgba(255,255,255,0.65);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    border: none;
    background: transparent;
    text-align: left;
    width: 100%;
    font-family: inherit;
}

.sidebar-nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}

.sidebar-nav-item.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.sidebar-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.sidebar-balance {
    margin-top: auto;
    padding: 20px;
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
}

.sidebar-balance-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.5);
    margin-bottom: 12px;
}

.sidebar-balance-value {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--accent);
}

.sidebar-balance-hint {
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    margin-top: 6px;
}

/* ============ MAIN CONTENT ============ */
.main-content {
    flex: 1;
    padding: 24px;
    min-width: 0;
}

.content-shell {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(23, 23, 23, 0.08);
}

/* ============ HEADER ============ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.page-header-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-dark);
    margin-bottom: 8px;
}

.page-title {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.page-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1;
}

.btn-dark {
    background: var(--card-dark);
    color: #fff;
}
.btn-dark:hover { background: #000; }

.btn-accent {
    background: var(--accent);
    color: var(--card-dark);
}
.btn-accent:hover {
    background: #d6ff66;
    box-shadow: 0 0 30px rgba(201, 255, 74, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-strong);
}
.btn-outline:hover { background: rgba(23, 23, 23, 0.04); }

.btn-soft {
    background: #e7edcf;
    color: var(--accent-dark);
    border: 1px solid rgba(104, 112, 68, 0.2);
}
.btn-soft:hover { background: #dde6bb; }

.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 16px 28px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: wait; }

/* ============ GRID (две колонки) ============ */
.two-col {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 1100px) {
    .two-col { grid-template-columns: 1fr; }
}

/* ============ PANEL (блок) ============ */
.panel {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.panel-num {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--card-dark);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.panel-title {
    font-size: 16px;
    font-weight: 700;
}

.panel-desc {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 2px;
}

.panel-badge {
    margin-left: auto;
    padding: 5px 12px;
    border-radius: 100px;
    background: #e7edcf;
    color: var(--accent-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.panel-body {
    padding: 24px;
    background: var(--card);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============ FORM FIELDS ============ */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-field-hint {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 400;
}

.required { color: #e04b4b; }

.form-input,
.form-textarea {
    padding: 13px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: #fff;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder { color: #b5b5b5; }

.form-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

/* ============ CARDS GRID (выбор маркетплейса/стиля) ============ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.cards-grid-sm {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.select-card {
    position: relative;
    cursor: pointer;
}

.select-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.select-card-content {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: #fff;
    transition: all .2s;
}

.select-card:hover .select-card-content {
    border-color: #b5b5b5;
    transform: translateY(-2px);
}

.select-card input:checked + .select-card-content {
    border-color: var(--card-dark);
    background: var(--card-dark);
    color: #fff;
}

.select-card-icon {
    font-size: 22px;
    margin-bottom: 8px;
}

.select-card-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 3px;
}

.select-card-meta {
    font-size: 11px;
    opacity: 0.6;
    line-height: 1.4;
}

.select-card-check {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--card-dark);
    font-size: 12px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.5);
    transition: all .2s;
}

.select-card input:checked ~ .select-card-check {
    opacity: 1;
    transform: scale(1);
}

/* ============ UPLOAD ============ */
.upload-area {
    border: 2px dashed var(--border-strong);
    border-radius: 14px;
    background: #fff;
    transition: all .3s;
    position: relative;
}

.upload-area:hover {
    border-color: var(--violet);
}

.upload-area.dragover {
    border-color: var(--violet);
    background: rgba(124, 92, 255, 0.04);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 160px;
    padding: 30px 24px;
    cursor: pointer;
    text-align: center;
}

.upload-icon { font-size: 38px; margin-bottom: 4px; }
.upload-placeholder p { font-size: 14px; font-weight: 600; }
.upload-placeholder span { font-size: 12px; color: var(--text-dim); }

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 16px;
}

.preview-item {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--border-strong);
    cursor: zoom-in;
    transition: transform .2s;
}

.preview-item:hover { transform: scale(1.05); }

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.preview-remove:hover { background: #e04b4b; }

/* ============ PREVIEW CARD (правая колонка, тёмная) ============ */
.preview-dark {
    background: var(--card-dark);
    color: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.preview-dark-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.preview-dark-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: rgba(255,255,255,0.5);
    margin-bottom: 6px;
}

.preview-dark-title {
    font-size: 20px;
    font-weight: 800;
}

.preview-dark-badge {
    padding: 6px 12px;
    border-radius: 100px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    font-size: 12px;
    font-weight: 600;
}

.preview-card-visual {
    border-radius: 14px;
    background: linear-gradient(135deg, #77766f, #d9d6cc, #c9ff4a);
    padding: 16px;
    aspect-ratio: 1;
    position: relative;
    margin-bottom: 16px;
}

.preview-card-tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 100px;
    background: rgba(23, 23, 23, 0.85);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.preview-score {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    margin-bottom: 16px;
}

.preview-score-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.6);
}

.preview-score-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--green);
}

.preview-dark-actions {
    display: flex;
    gap: 10px;
}

/* ============ PROMPT ============ */
.prompt-display {
    background: #0f0f0f;
    color: #e0e0e0;
    padding: 16px 20px;
    border-radius: 12px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.7;
    max-height: 240px;
    overflow-y: auto;
    word-break: break-word;
}

.prompt-textarea {
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.7;
    min-height: 140px;
    background: #0f0f0f !important;
    color: #e0e0e0 !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}

/* ============ RESULT CARDS ============ */
.result-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--border);
    transition: border-color .2s;
}

.result-item:hover { border-color: var(--border-strong); }

.result-thumb {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #77766f, #c9ff4a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    overflow: hidden;
}

.result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-meta {
    font-size: 12px;
    color: var(--text-dim);
    display: flex;
    gap: 8px;
    align-items: center;
}

.result-status {
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
}

.result-status.ready {
    background: #d1fae5;
    color: #065f46;
}

.result-status.draft {
    background: #fef3c7;
    color: #92400e;
}

/* ============ SUMMARY BAR ============ */
.summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    background: var(--card-dark);
    color: #fff;
    border-radius: 16px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.summary-cost {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.summary-cost-icon { font-size: 18px; }

.summary-cost-value {
    font-size: 26px;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.summary-cost-label {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

.summary-note {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

.summary-note strong { color: #fff; }

/* ============ PROGRESS ============ */
.generation-progress {
    padding: 40px 32px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-align: center;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 28px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
    transition: color .3s;
}

.progress-step span {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0ded8;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all .3s;
}

.progress-step.active { color: var(--text); }

.progress-step.active span {
    background: var(--violet);
    color: #fff;
    box-shadow: 0 0 20px rgba(124, 92, 255, 0.4);
}

.progress-step.done span {
    background: var(--accent-dark);
    color: #fff;
    font-size: 0;
}

.progress-step.done span::after {
    content: '✓';
    font-size: 16px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e0ded8;
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 14px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--violet), var(--accent));
    border-radius: 100px;
    width: 0;
    transition: width 0.6s ease;
}

.progress-text {
    color: var(--text-dim);
    font-size: 13px;
}

/* ============ MODAL ============ */
.image-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 24px;
    cursor: zoom-out;
}

.image-modal.open { display: flex; }

.image-modal img {
    max-width: 75vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 12px;
    cursor: default;
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
}

/* ============ LANDING ============ */
.landing-hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px 40px;
    text-align: center;
}

.landing-hero-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    background: #e7edcf;
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

.landing-hero h1 {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 20px;
}

.landing-hero h1 .accent {
    background: linear-gradient(135deg, var(--violet), var(--accent-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.landing-hero p {
    font-size: 18px;
    color: var(--text-dim);
    max-width: 620px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.landing-hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .app-layout { flex-direction: column; }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 16px;
    }
    .sidebar-logo { width: 100%; border-bottom: none; padding-bottom: 0; }
    .sidebar-nav { flex-direction: row; flex-wrap: wrap; width: 100%; }
    .sidebar-balance { width: 100%; margin-top: 0; }
    .content-shell { padding: 20px; }
    .page-title { font-size: 26px; }
}

@media (max-width: 500px) {
    .main-content { padding: 12px; }
    .panel-body { padding: 16px; }
    .cards-grid, .cards-grid-sm { grid-template-columns: 1fr 1fr; }
    .summary-bar { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ============ TOPBAR ============ */
.topbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 100px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--card-dark);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
}

.user-info { min-width: 0; }

.user-name {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
}

.user-email {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.2;
}

/* ============ MODAL ============ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(23, 23, 23, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.open {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.modal {
    background: var(--card);
    border-radius: 20px;
    padding: 32px;
    width: 100%;
    max-width: 440px;
    position: relative;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-soft);
    color: var(--text-dim);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}

.modal-close:hover {
    background: var(--border);
}

.modal-header {
    margin-bottom: 24px;
}

.modal-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-dark);
    margin-bottom: 8px;
}

.modal-title {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.modal-desc {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.5;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-error {
    color: #e04b4b;
    font-size: 13px;
    text-align: center;
    min-height: 18px;
}

.modal-footer {
    text-align: center;
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 8px;
}

.modal-footer a {
    color: var(--violet);
    font-weight: 600;
}

/* ============ TOAST ============ */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--card-dark);
    color: #fff;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    max-width: 400px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============ ACCOUNT HERO ============ */
.account-hero {
    position: relative;
    padding: 40px;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 32px;
    background: linear-gradient(135deg, #171717 0%, #2a2a2a 100%);
    color: #fff;
}

.account-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(201, 255, 74, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(124, 92, 255, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.account-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.account-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c9ff4a, #687044);
    color: #171717;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: 0 10px 30px rgba(201, 255, 74, 0.3);
}

.account-hero-info {
    flex: 1;
    min-width: 200px;
}

.account-hero-name {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.account-hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.account-hero-email {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
}

.account-badge {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}

.account-badge-success {
    background: rgba(201, 255, 74, 0.15);
    color: #c9ff4a;
    border: 1px solid rgba(201, 255, 74, 0.3);
}

.account-badge-warning {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.account-hero-date {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

.account-hero-btn {
    border-color: rgba(255,255,255,0.2) !important;
    color: #fff !important;
    background: rgba(255,255,255,0.05) !important;
}

.account-hero-btn:hover {
    background: rgba(255,255,255,0.1) !important;
}

/* ============ STATS ============ */
.stat-card {
    padding: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.stat-card-icon {
    font-size: 20px;
    margin-bottom: 8px;
    opacity: 0.7;
}

.stat-card-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    font-weight: 700;
}

.stat-card-value {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 4px;
}

.stat-card-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
}

.stat-card-accent {
    background: linear-gradient(135deg, #171717 0%, #2a2a2a 100%);
    border-color: transparent;
    color: #fff;
}

.stat-card-accent .stat-card-label,
.stat-card-accent .stat-card-hint {
    color: rgba(255,255,255,0.5);
}

.stat-card-accent .stat-card-value {
    color: #c9ff4a;
}

.stat-card-progress {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 100px;
    overflow: hidden;
    margin-top: 12px;
}

.stat-card-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #c9ff4a, #687044);
    border-radius: 100px;
    transition: width 0.6s ease;
}

/* ============ ALERT ============ */
.alert {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 14px;
    margin-bottom: 24px;
}

.alert-warning {
    background: #fef3c7;
    border: 1px solid #fde68a;
}

.alert-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 700;
    font-size: 14px;
    color: #92400e;
    margin-bottom: 2px;
}

.alert-desc {
    font-size: 13px;
    color: #a16207;
}

/* ============ TRANSACTIONS ============ */
.tx-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tx-item {
    display: grid;
    grid-template-columns: 40px 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color .2s;
}

.tx-item:hover {
    border-color: var(--border-strong);
}

.tx-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}

.tx-icon-positive {
    background: #d1fae5;
    color: #065f46;
}

.tx-icon-negative {
    background: #fee2e2;
    color: #991b1b;
}

.tx-desc {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
    color: var(--text);
}

.tx-date {
    font-size: 12px;
    color: var(--text-dim);
}

.tx-amount {
    font-weight: 900;
    font-size: 18px;
    letter-spacing: -0.01em;
}

.tx-positive { color: #065f46; }
.tx-negative { color: #991b1b; }

.tx-balance {
    font-size: 12px;
    color: var(--text-light);
    min-width: 60px;
    text-align: right;
}

/* ============ GENERATIONS ============ */
.gen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.gen-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform .3s, border-color .3s;
}

.gen-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-strong);
}

.gen-card-image {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f5f3ee, #e7edcf);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.gen-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gen-card-placeholder {
    font-size: 48px;
    opacity: 0.4;
}

.gen-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    background: rgba(23,23,23,0.85);
    color: #fff;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gen-card-body {
    padding: 16px;
}

.gen-card-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gen-card-meta {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.gen-card-date {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.gen-card-prompt summary {
    cursor: pointer;
    color: var(--violet);
    font-size: 12px;
    font-weight: 600;
}

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 16px;
}

.empty-state-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.empty-state-desc {
    font-size: 14px;
    color: var(--text-dim);
    max-width: 320px;
    margin: 0 auto;
}

@media (max-width: 700px) {
    .account-hero { padding: 24px; }
    .account-avatar { width: 60px; height: 60px; font-size: 24px; }
    .account-hero-name { font-size: 22px; }
    .tx-item { grid-template-columns: 40px 1fr auto; }
    .tx-balance { display: none; }
    .stat-card-value { font-size: 24px; }
}

/* ============ ADMIN (Linear-style) ============ */
.admin-body {
    background: #fafafa;
}

.sidebar-admin {
    background: #0a0a0a;
    border-right: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo-mark-admin {
    background: #fff;
    color: #0a0a0a;
}

.nav-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
    text-decoration: none;
}

.sidebar-nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.9);
}

.sidebar-nav-item.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.sidebar-user {
    margin-top: auto;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
}

.sidebar-user-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 8px;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.sidebar-user-email {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 12px;
    word-break: break-all;
}

.sidebar-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
    width: 100%;
    justify-content: center;
}

.sidebar-back-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* Page header */
.page-header-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6b6b6b;
    margin-bottom: 6px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0a0a0a;
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 13px;
    color: #6b6b6b;
}

/* Search form */
.search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    width: 14px;
    height: 14px;
    color: #999;
    pointer-events: none;
}

.search-input {
    padding: 9px 14px 9px 34px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    background: #fff;
    font-size: 13px;
    min-width: 260px;
    color: #0a0a0a;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input:focus {
    outline: none;
    border-color: #0a0a0a;
    box-shadow: 0 0 0 3px rgba(10,10,10,0.08);
}

/* Flat panel */
.panel-flat {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
}

.panel-body-flat {
    padding: 0;
}

/* Data table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead {
    background: #fafafa;
    border-bottom: 1px solid #e5e5e5;
}

.data-table th {
    text-align: left;
    padding: 11px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b6b6b;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: #fafafa;
}

.td-id {
    color: #999;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 12px;
}

/* User cell */
.user-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-cell-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0a0a0a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-cell-name {
    font-weight: 600;
    color: #0a0a0a;
    font-size: 13px;
    line-height: 1.3;
}

.user-cell-email {
    font-size: 12px;
    color: #999;
    line-height: 1.3;
}

/* Rays badge */
.rays-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    background: #f5f5f5;
    color: #0a0a0a;
    font-size: 12px;
    font-weight: 700;
    font-family: 'SF Mono', monospace;
}

/* Status badges */
.status-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.status-badge-admin {
    background: #fee;
    color: #c00;
}

.status-badge-verified {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge-pending {
    background: #fff8e1;
    color: #b76e00;
}

.status-badge-blocked {
    background: #f5f5f5;
    color: #666;
}

/* Icon buttons */
.action-buttons {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.icon-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: #666;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.icon-btn svg {
    width: 15px;
    height: 15px;
}

.icon-btn:hover {
    background: #f0f0f0;
    color: #0a0a0a;
    border-color: #e5e5e5;
}

.icon-btn-active {
    background: #0a0a0a;
    color: #fff;
    border-color: #0a0a0a;
}

.icon-btn-active:hover {
    background: #2a2a2a;
    color: #fff;
    border-color: #2a2a2a;
}

.icon-btn-danger:hover {
    background: #fee;
    color: #c00;
    border-color: #fcc;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    border-top: 1px solid #f0f0f0;
}

.page-link {
    padding: 6px 12px;
    border-radius: 6px;
    background: #fafafa;
    color: #0a0a0a;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #e5e5e5;
    transition: all 0.15s;
}

.page-link:hover {
    background: #f0f0f0;
}

.page-info {
    font-size: 12px;
    color: #6b6b6b;
}

/* Modal improvements */
.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 8px;
}

.form-field-optional {
    color: #999;
    font-weight: 400;
    font-size: 12px;
}

/* ============ DASHBOARD ============ */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.kpi-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 20px;
    transition: border-color 0.15s;
}

.kpi-card:hover {
    border-color: #d0d0d0;
}

.kpi-card-primary {
    background: #0a0a0a;
    border-color: #0a0a0a;
    color: #fff;
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.kpi-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b6b6b;
}

.kpi-card-primary .kpi-label {
    color: rgba(255,255,255,0.5);
}

.kpi-icon {
    width: 16px;
    height: 16px;
    color: #999;
}

.kpi-card-primary .kpi-icon {
    color: rgba(255,255,255,0.4);
}

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 6px;
    color: #0a0a0a;
}

.kpi-card-primary .kpi-value {
    color: #fff;
}

.kpi-footer {
    font-size: 12px;
    color: #6b6b6b;
}

.kpi-card-primary .kpi-footer {
    color: rgba(255,255,255,0.5);
}

.kpi-delta {
    color: #16a34a;
    font-weight: 600;
}

.kpi-card-primary .kpi-delta {
    color: #4ade80;
}

/* Panel header (clean) */
.panel-header-clean {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.panel-header-clean .panel-title {
    font-size: 14px;
    font-weight: 600;
    color: #0a0a0a;
    margin-bottom: 2px;
}

.panel-header-clean .panel-desc {
    font-size: 12px;
    color: #999;
}

.panel-total {
    font-size: 12px;
    color: #6b6b6b;
}

.panel-total strong {
    color: #0a0a0a;
    font-size: 14px;
}

.panel-body-clean {
    padding: 8px 20px;
}

/* Chart */
.chart-container {
    padding: 20px;
}

.bar-chart {
    width: 100%;
    height: 120px;
    display: block;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: #999;
    font-family: 'SF Mono', monospace;
}

/* Stat rows */
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row-divider {
    border-top: 1px solid #e5e5e5;
    margin-top: 4px;
    padding-top: 16px;
}

.stat-label {
    font-size: 13px;
    color: #6b6b6b;
}

.stat-value {
    font-size: 15px;
    font-weight: 700;
    color: #0a0a0a;
    font-family: 'SF Mono', monospace;
}

.stat-value-positive {
    color: #16a34a;
}

.stat-value-negative {
    color: #dc2626;
}

/* List rows */
.list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.list-row:last-child {
    border-bottom: none;
}

.list-rank {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #6b6b6b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.list-content {
    flex: 1;
    min-width: 0;
}

.list-name {
    font-size: 13px;
    font-weight: 600;
    color: #0a0a0a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-meta {
    font-size: 11px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-value {
    font-size: 14px;
    font-weight: 700;
    color: #0a0a0a;
    font-family: 'SF Mono', monospace;
    flex-shrink: 0;
}

/* Events */
.event-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.event-row:last-child {
    border-bottom: none;
}

.event-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f5f5f5;
    color: #6b6b6b;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.event-icon svg {
    width: 14px;
    height: 14px;
}

.event-icon-user {
    background: #e3f2fd;
    color: #1976d2;
}

.event-icon-generation {
    background: #f3e5f5;
    color: #7b1fa2;
}

.event-icon-transaction {
    background: #fff8e1;
    color: #b76e00;
}

.event-content {
    flex: 1;
    min-width: 0;
}

.event-title {
    font-size: 13px;
    font-weight: 600;
    color: #0a0a0a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-desc {
    font-size: 11px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-time {
    font-size: 11px;
    color: #999;
    font-family: 'SF Mono', monospace;
    flex-shrink: 0;
}

/* Empty block */
.empty-block {
    text-align: center;
    padding: 32px 20px;
    color: #999;
    font-size: 13px;
}

/* Dashboard layout */
.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

@media (max-width: 900px) {
    .dashboard-row {
        grid-template-columns: 1fr;
    }
}

/* ============ IMAGE MODAL (уменьшенная) ============ */
.image-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: zoom-out;
}

.image-modal.open {
    display: flex;
    animation: fadeIn 0.15s ease-out;
}

.image-modal img {
    max-width: 75vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    cursor: default;
    background: #fff;
}

.image-modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
}

.image-modal-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 700px) {
    .image-modal { padding: 20px; }
    .image-modal img {
        max-width: 75vw;
        max-height: 80vh;
    }
    .image-modal-close {
        top: 12px;
        right: 12px;
    }
}

/* ============ UPLOAD ADD BUTTON ============ */
.upload-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 32px);
    margin: 0 16px 16px;
    padding: 10px 16px;
    border: 1px dashed #d0d0d0;
    border-radius: 10px;
    background: transparent;
    color: #6b6b6b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.upload-add-btn:hover {
    border-color: #0a0a0a;
    color: #0a0a0a;
    background: #fafafa;
}

/* ============ UPLOAD PREVIEW (обновлённые) ============ */
.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px;
    justify-content: center;
}

.preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e5e5e5;
    transition: all 0.2s;
    cursor: zoom-in;
    background: #fafafa;
}

.preview-item:hover {
    border-color: #0a0a0a;
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    transition: all 0.15s;
}

.preview-item:hover .preview-remove {
    opacity: 1;
}

.preview-remove:hover {
    background: #e04b4b;
    transform: scale(1.1);
}

/* Кнопка "Добавить ещё" */
.upload-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100px;
    height: 100px;
    margin: 0;
    padding: 0;
    border: 2px dashed #d0d0d0;
    border-radius: 12px;
    background: #fafafa;
    color: #6b6b6b;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
    flex-direction: column;
}

.upload-add-btn:hover {
    border-color: #0a0a0a;
    color: #0a0a0a;
    background: #fff;
}

.upload-add-btn svg {
    width: 20px;
    height: 20px;
}

/* ============ UPLOAD ADD TILE (правильная кнопка "+") ============ */
.upload-add-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100px;
    height: 100px;
    padding: 8px;
    border: 2px dashed #c0c0c0;
    border-radius: 12px;
    background: #fafafa;
    color: #6b6b6b;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-family: inherit;
    box-sizing: border-box;
    line-height: 1;
}

.upload-add-tile:hover {
    border-color: #0a0a0a;
    color: #0a0a0a;
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.upload-add-tile:active {
    transform: translateY(0);
    box-shadow: none;
}

.upload-add-tile svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.upload-add-tile span {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* ============ TEMPLATES ============ */







/* ============ FILES ============ */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.file-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.file-card:hover { border-color: #0a0a0a; transform: translateY(-2px); }

.file-preview {
    aspect-ratio: 1;
    background: #f5f5f5;
    overflow: hidden;
    max-height: 200px;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.file-info { padding: 12px; }
.file-name { font-size: 12px; font-weight: 600; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 11px; color: #999; }

/* ============ PRICING ============ */
.balance-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #0a0a0a;
    color: #fff;
    border-radius: 100px;
    font-size: 14px;
}

.balance-pill-icon { font-size: 16px; }
.balance-pill-value { font-size: 18px; font-weight: 800; color: #c9ff4a; }
.balance-pill-label { color: rgba(255,255,255,0.6); }

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.plan-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    padding: 28px 24px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.plan-card-highlight {
    border-color: #0a0a0a;
    background: #0a0a0a;
    color: #fff;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.plan-card-highlight .plan-name,
.plan-card-highlight .plan-price-value,
.plan-card-highlight .plan-desc,
.plan-card-highlight .plan-features li { color: #fff; }

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 14px;
    background: #c9ff4a;
    color: #0a0a0a;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
}

.plan-name { font-size: 18px; font-weight: 700; margin-bottom: 16px; color: #0a0a0a; }
.plan-price { display: flex; align-items: baseline; gap: 4px; margin-bottom: 8px; }
.plan-price-value { font-size: 36px; font-weight: 800; color: #0a0a0a; }
.plan-price-currency { font-size: 20px; color: #6b6b6b; }

.plan-rays {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(201,255,74,0.15);
    color: #687044;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
    align-self: flex-start;
}

.plan-desc { font-size: 13px; color: #6b6b6b; margin-bottom: 20px; }
.plan-features { list-style: none; margin-bottom: 24px; flex: 1; }
.plan-features li { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; color: #0a0a0a; }
.plan-features li svg { width: 14px; height: 14px; color: #16a34a; flex-shrink: 0; }

.pricing-info { margin-top: 48px; padding: 32px; background: #fafafa; border-radius: 16px; }
.pricing-info h3 { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.pricing-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.pricing-info-item { text-align: center; padding: 16px; background: #fff; border-radius: 12px; }
.pricing-info-icon { font-size: 28px; margin-bottom: 8px; }
.pricing-info-title { font-size: 13px; color: #6b6b6b; margin-bottom: 4px; }
.pricing-info-value { font-size: 16px; font-weight: 700; color: #0a0a0a; }

/* ============ ACCOUNT PICKER ============ */
.account-picker-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s ease-out;
}

.account-picker-modal {
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    max-width: 440px;
    width: 100%;
    position: relative;
    box-shadow: 0 30px 80px rgba(0,0,0,0.3);
}

.account-picker-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    color: #6b6b6b;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.account-picker-close:hover {
    background: #e5e5e5;
}

.account-picker-header {
    margin-bottom: 24px;
}

.account-picker-header h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 6px;
    color: #0a0a0a;
}

.account-picker-header p {
    color: #6b6b6b;
    font-size: 14px;
}

.account-picker-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.account-picker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}

.account-picker-item:hover {
    border-color: #0a0a0a;
    background: #fafafa;
}

.account-picker-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #0a0a0a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.account-picker-info {
    flex: 1;
    min-width: 0;
}

.account-picker-name {
    font-weight: 600;
    font-size: 14px;
    color: #0a0a0a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-picker-email {
    font-size: 12px;
    color: #6b6b6b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-picker-provider {
    font-size: 20px;
    flex-shrink: 0;
}

.account-picker-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #9a9a9a;
    font-size: 11px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.15s;
    padding: 0;
}

.account-picker-item:hover .account-picker-remove {
    opacity: 1;
}

.account-picker-remove:hover {
    background: #fee2e2;
    color: #e04b4b;
}

.account-picker-footer {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.account-picker-footer a {
    color: #7c5cff;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
}

.account-picker-footer a:hover {
    text-decoration: underline;
}

/* === Кнопка удаления файла === */
.file-card {
    position: relative;
    transition: opacity 0.25s, transform 0.25s;
}

.file-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(23, 23, 23, 0.08);
    color: #6b6b6b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.15s;
    z-index: 2;
}

.file-card:hover .file-delete-btn {
    opacity: 1;
}

.file-delete-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
    transform: scale(1.05);
}

.file-delete-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}

.file-delete-btn svg {
    width: 16px;
    height: 16px;
}

/* ============ WORKSPACE (технический стиль) ============ */

.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1.5px solid #171717;
}

.ws-label {
    font-size: 11px;
    font-weight: 700;
    color: #9a9a9a;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.ws-title {
    font-size: 24px;
    font-weight: 800;
    color: #171717;
    margin: 0;
    letter-spacing: -0.02em;
}

.ws-actions {
    display: flex;
    gap: 8px;
}

/* === LAYOUT === */
.ws-layout {
    /* Используем flex вместо grid — sticky-панель работает надёжнее */
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: flex-start;   /* критично для sticky */
}

.ws-settings {
    flex: 1 1 auto;
    min-width: 0;
}

.ws-preview-col {
    flex: 0 0 360px;
    width: 360px;
}

@media (max-width: 1100px) {
    .ws-layout { grid-template-columns: 1fr; }
}

.ws-settings {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* === PANEL === */
.ws-panel {
    background: #fff;
    border: 1.5px solid #171717;
    border-radius: 10px;
    padding: 20px 20px 22px;
    box-shadow: 0 1px 0 rgba(23,23,23,0.04);
}

.ws-panel-title {
    font-size: 13px;
    font-weight: 800;
    color: #171717;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    list-style: none;
}

.ws-panel-title::-webkit-details-marker { display: none; }

.ws-panel-hint {
    font-size: 11px;
    font-weight: 500;
    color: #9a9a9a;
    text-transform: none;
    letter-spacing: 0;
}

.ws-panel-collapsible[open] .ws-panel-title {
    margin-bottom: 14px;
}

.ws-panel-collapsible .ws-panel-body {
    padding-top: 14px;
    border-top: 1.5px solid #171717;
}

/* === FIELDS === */
.ws-field {
    margin-bottom: 14px;
}

.ws-field:last-child { margin-bottom: 0; }

.ws-field-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #4a4a4a;
    margin-bottom: 6px;
}

.ws-required { color: #dc2626; }
.ws-hint {
    font-size: 11px;
    color: #9a9a9a;
    font-weight: 500;
}

.ws-field-hint {
    font-size: 11px;
    color: #9a9a9a;
    margin-top: 5px;
}

.ws-select,
.ws-input,
.ws-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #171717;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-family: inherit;
    color: #171717;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ws-select:focus,
.ws-input:focus,
.ws-textarea:focus {
    background: #fff;
    border-color: #171717;
    box-shadow: 0 0 0 3px rgba(201,255,74,0.6);
}

.ws-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}

.ws-select:hover,
.ws-input:hover,
.ws-textarea:hover {
    border-color: #000;
}



.ws-textarea {
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
    line-height: 1.5;
}

.ws-prompt {
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
    font-size: 12px;
    line-height: 1.6;
}

/* === UPLOAD === */
.ws-upload {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ws-upload-placeholder {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 16px;
    border: 2px dashed #171717;
    border-radius: 8px;
    background: #fafaf7;
    color: #4a4a4a;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.ws-upload-placeholder:hover {
    background: rgba(201,255,74,0.12);
    color: #171717;
}

.ws-upload-placeholder svg {
    width: 22px;
    height: 22px;
    stroke: #9a9a9a;
}

.ws-upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ws-upload-add {
    width: 60px;
    height: 60px;
    border: 2px dashed #171717;
    border-radius: 8px;
    background: #fafaf7;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.ws-upload-add:hover {
    background: rgba(201,255,74,0.12);
}

.ws-upload-add svg {
    width: 20px;
    height: 20px;
    stroke: #9a9a9a;
}

/* === PREVIEW === */
.ws-preview-col {
    /* Sticky: прилипает пока видна форма, отпускает при скролле до конца .ws-layout */
    /* Всё остальное (overflow, max-height, fixed) НЕ добавлять — сломает sticky */
    position: sticky;
    top: 100px;              /* отступ от фиксированной шапки Sooli */
    align-self: flex-start;  /* критично: не растягиваться по высоте flex-контейнера */
    z-index: 10;
}

.ws-preview {
    background: #171717;
    border-radius: 12px;
    padding: 20px;
    color: #fff;
    border: 1.5px solid #171717;
}

.ws-preview-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
}

.ws-preview-label {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.ws-preview-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    word-break: break-word;
}

.ws-preview-badge {
    flex-shrink: 0;
    background: #c9ff4a;
    color: #171717;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 100px;
}

.ws-preview-visual {
    aspect-ratio: 1 / 1;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    overflow: hidden;
}

.ws-preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.3);
    font-size: 12px;
}

.ws-preview-empty svg {
    width: 32px;
    height: 32px;
    stroke: rgba(255,255,255,0.2);
}

.ws-preview-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ws-preview-meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

.ws-preview-meta-row strong {
    color: #fff;
    font-weight: 600;
}

.ws-cost-block {
    padding: 12px 14px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    margin-bottom: 14px;
}

.ws-cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.ws-cost-row + .ws-cost-row {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.ws-cost-label {
    color: rgba(255,255,255,0.5);
}

.ws-cost-value {
    color: #c9ff4a;
    font-weight: 700;
    font-size: 14px;
}

.ws-cost-balance .ws-cost-value {
    color: #fff;
    font-weight: 600;
    font-size: 13px;
}

/* === RESULTS === */
.ws-results {
    margin-top: 24px;
}

.ws-results-empty {
    background: #fff;
    border: 2px dashed #171717;
    border-radius: 10px;
    padding: 60px 24px;
    text-align: center;
    color: #6b6b6b;
}

.ws-results-empty-icon {
    font-size: 36px;
    color: #c9ff4a;
    margin-bottom: 12px;
}

.ws-results-empty-title {
    font-size: 16px;
    font-weight: 700;
    color: #171717;
    margin-bottom: 6px;
}

.ws-results-empty-desc {
    font-size: 13px;
    color: #9a9a9a;
}

/* === ПРЕСЕТЫ === */
.ws-presets-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #fafaf7;
    border: 1.5px solid #171717;
    border-radius: 10px;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.ws-presets-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ws-presets-label {
    font-size: 12px;
    font-weight: 700;
    color: #4a4a4a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ws-presets-select {
    padding: 6px 28px 6px 10px;
    border: 1.5px solid #171717;
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
    font-family: inherit;
    color: #171717;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    min-width: 140px;
}

/* === КОЛИЧЕСТВО === */
.ws-quantity {
    display: flex;
    gap: 6px;
}

.ws-qty-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid #171717;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    color: #171717;
    cursor: pointer;
    transition: all 0.15s;
}

.ws-qty-btn:hover {
    background: #fafaf7;
}

.ws-qty-btn.active {
    background: #171717;
    color: #c9ff4a;
}

/* === ЧЕК-ЛИСТ === */
.ws-checklist {
    padding: 12px 14px;
    background: rgba(255,255,255,0.04);
    border-radius: 10px;
    margin-bottom: 14px;
}

.ws-checklist-title {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}

.ws-checklist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    padding: 3px 0;
}

.ws-checklist-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.ws-checklist-item.ws-check-ok svg {
    stroke: #c9ff4a;
}

.ws-checklist-item strong {
    color: #fff;
    font-weight: 600;
}

/* === ИСТОРИЯ === */
.ws-history {
    margin-top: 32px;
}

.ws-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid #171717;
}

.ws-history-title {
    font-size: 13px;
    font-weight: 800;
    color: #171717;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ws-history-link {
    font-size: 12px;
    color: #6b6b6b;
    text-decoration: none;
}

.ws-history-link:hover { color: #171717; }

.ws-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.ws-history-item {
    background: #fff;
    border: 1.5px solid #171717;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s;
}

.ws-history-item:hover {
    transform: translateY(-2px);
}

.ws-history-img {
    aspect-ratio: 1 / 1;
    background: #f5f3ee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9a9a9a;
    font-size: 11px;
}

.ws-history-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ws-history-info {
    padding: 8px 10px;
}

.ws-history-name {
    font-size: 11px;
    font-weight: 600;
    color: #171717;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.ws-history-stars {
    font-size: 11px;
    color: #c9ff4a;
    letter-spacing: 1px;
}

.ws-history-stars .empty { color: #d4d4d4; }

/* === МОДАЛКА СРАВНЕНИЯ === */
.compare-modal {
    position: fixed;
    inset: 0;
    background: rgba(23,23,23,0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.compare-modal.open { display: flex; }

.compare-modal-inner {
    background: #fff;
    border-radius: 14px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border: 1.5px solid #171717;
}

.compare-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1.5px solid #171717;
}

.compare-modal-title {
    font-size: 16px;
    font-weight: 800;
    color: #171717;
}

.compare-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 18px;
    color: #6b6b6b;
    cursor: pointer;
    border-radius: 6px;
}

.compare-modal-close:hover {
    background: #f5f3ee;
    color: #171717;
}

.compare-modal-body {
    padding: 24px;
}

.compare-pair {
    display: grid;
    grid-template-columns: 1fr 40px 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
}

.compare-col { text-align: center; }

.compare-label {
    font-size: 11px;
    font-weight: 700;
    color: #9a9a9a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.compare-img {
    aspect-ratio: 1 / 1;
    background: #f5f3ee;
    border: 1.5px solid #171717;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9a9a9a;
    font-size: 12px;
    overflow: hidden;
}

.compare-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.compare-arrow {
    font-size: 24px;
    color: #c9ff4a;
    text-align: center;
    font-weight: 700;
}

.compare-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 20px;
    border-top: 1.5px solid #171717;
}

.compare-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #4a4a4a;
}

.compare-stars {
    display: flex;
    gap: 2px;
    font-size: 22px;
    cursor: pointer;
}

.compare-stars span {
    color: #d4d4d4;
    transition: color 0.1s;
    user-select: none;
}

.compare-stars span:hover,
.compare-stars span.active {
    color: #c9ff4a;
}

/* === РЕЗУЛЬТАТ — СЕТКА === */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.result-card {
    background: #fff;
    border: 1.5px solid #171717;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.15s;
}

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

.result-card-image {
    aspect-ratio: 1 / 1;
    background: #f5f3ee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.result-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-card-info {
    padding: 12px 14px;
    border-top: 1.5px solid #171717;
}

.result-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #171717;
    margin-bottom: 4px;
}

.result-card-meta {
    font-size: 11px;
    color: #9a9a9a;
}

/* === КОЛИЧЕСТВО (новое) === */
.ws-qty-input {
    width: 70px;
    padding: 8px 10px;
    border: 1.5px solid #171717;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    color: #171717;
    text-align: center;
    outline: none;
}

.ws-qty-input:focus {
    box-shadow: 0 0 0 3px rgba(201,255,74,0.6);
}

.ws-qty-label {
    font-size: 12px;
    color: #6b6b6b;
    margin-left: 6px;
}

/* === РАЗМЕР ПРЕВЬЮ === */
.ws-preview-size-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ws-preview-size-label {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    margin-right: 4px;
}

.ws-size-btn {
    padding: 4px 10px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    background: transparent;
    color: rgba(255,255,255,0.6);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.ws-size-btn:hover {
    border-color: rgba(255,255,255,0.3);
    color: #fff;
}

.ws-size-btn.active {
    background: #c9ff4a;
    border-color: #c9ff4a;
    color: #171717;
}

/* Размеры превью */
.ws-preview-visual.size-small { max-width: 180px; margin-left: auto; margin-right: auto; }
.ws-preview-visual.size-medium { max-width: 260px; margin-left: auto; margin-right: auto; }
.ws-preview-visual.size-large { max-width: 100%; }

/* === КОНВЕРТЕР === */
.ws-converter {
    margin-top: 40px;
    background: #fff;
    border: 1.5px solid #171717;
    border-radius: 12px;
    overflow: hidden;
}

.ws-converter-header {
    padding: 20px 24px;
    border-bottom: 1.5px solid #171717;
    background: #fafaf7;
}

.ws-converter-title {
    font-size: 15px;
    font-weight: 800;
    color: #171717;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ws-converter-desc {
    font-size: 12px;
    color: #6b6b6b;
}

.ws-converter-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 24px;
}

@media (max-width: 900px) {
    .ws-converter-body { grid-template-columns: 1fr; }
}

.ws-converter-drop {
    background: #fafaf7;
    border: 2px dashed #171717;
    border-radius: 10px;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

.ws-converter-drop:hover {
    background: rgba(201,255,74,0.08);
}

.ws-converter-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #6b6b6b;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    padding: 20px;
}

.ws-converter-placeholder svg {
    width: 40px;
    height: 40px;
    stroke: #9a9a9a;
}

.ws-converter-hint {
    font-size: 11px;
    color: #9a9a9a;
}

.ws-converter-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ws-converter-preview img {
    max-width: 100%;
    max-height: 280px;
    border-radius: 6px;
}

.ws-converter-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ws-converter-custom {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: center;
}

.ws-converter-custom span {
    color: #9a9a9a;
    font-weight: 700;
}

.ws-cost-total {
    color: #c9ff4a !important;
    font-size: 16px !important;
    font-weight: 900 !important;
}

/* === ИНФО О ФАЙЛЕ === */
.ws-file-info {
    padding: 12px 14px;
    background: #fafaf7;
    border: 1.5px solid #171717;
    border-radius: 8px;
    margin-bottom: 4px;
}

.ws-file-info-title {
    font-size: 11px;
    font-weight: 800;
    color: #6b6b6b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.ws-file-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 3px 0;
    color: #6b6b6b;
}

.ws-file-info-row strong {
    color: #171717;
    font-weight: 600;
}

/* === РЕЗУЛЬТАТ === */
.ws-result-info {
    padding: 12px 14px;
    background: rgba(201,255,74,0.12);
    border: 1.5px solid #171717;
    border-radius: 8px;
}

.ws-result-info-title {
    font-size: 11px;
    font-weight: 800;
    color: #171717;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.ws-result-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 3px 0;
    color: #4a4a4a;
}

.ws-result-info-row strong {
    color: #171717;
    font-weight: 700;
}

.ws-result-savings strong {
    color: #16a34a;
    font-size: 13px;
}

/* === RANGE (ползунок) === */
.ws-range {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e5e5;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    margin-top: 6px;
}

.ws-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #171717;
    border: 2px solid #c9ff4a;
    cursor: pointer;
    transition: transform 0.15s;
}

.ws-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.ws-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #171717;
    border: 2px solid #c9ff4a;
    cursor: pointer;
}

/* ФИКС: превью и placeholder не перехватывают клики */
.ws-converter-preview,
.ws-converter-preview img {
    pointer-events: none;
}

#converter-btn {
    position: relative;
    z-index: 100;
    pointer-events: auto;
}

/* ============ ЛИЧНЫЙ КАБИНЕТ (компактный) ============ */

/* === ПРОФИЛЬ В СТРОКУ === */
.acc-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #171717;
    border-radius: 12px;
    margin-bottom: 16px;
    color: #fff;
}

.acc-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #c9ff4a;
    color: #171717;
    font-weight: 900;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.acc-info { flex: 1; min-width: 0; }

.acc-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.acc-name {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acc-badge {
    font-size: 12px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.acc-badge-ok { background: #c9ff4a; color: #171717; }
.acc-badge-warn { background: #f59e0b; color: #171717; }

.acc-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.acc-dot { opacity: 0.4; }

.acc-actions { flex-shrink: 0; }

/* === МЕТРИКИ В РЯД === */
.acc-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 900px) { .acc-metrics { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .acc-metrics { grid-template-columns: 1fr; } }

.acc-metric {
    background: #fff;
    border: 1.5px solid #171717;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
}

.acc-metric-primary {
    background: #171717;
    color: #fff;
}

.acc-metric-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.acc-metric-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b6b6b;
}

.acc-metric-primary .acc-metric-label { color: rgba(255,255,255,0.5); }

.acc-metric-icon {
    font-size: 14px;
    opacity: 0.6;
}

.acc-metric-value {
    font-size: 24px;
    font-weight: 900;
    color: #171717;
    line-height: 1;
    margin-bottom: 6px;
}

.acc-metric-primary .acc-metric-value { color: #c9ff4a; }

.acc-metric-foot {
    font-size: 11px;
    color: #9a9a9a;
    margin-bottom: 10px;
}

.acc-metric-primary .acc-metric-foot { color: rgba(255,255,255,0.4); }

.acc-metric-action {
    font-size: 12px;
    font-weight: 700;
    color: #c9ff4a;
    text-decoration: none;
    margin-top: auto;
}

.acc-metric-action:hover { text-decoration: underline; }

/* === ALERT === */
.acc-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fef3c7;
    border: 1.5px solid #f59e0b;
    border-radius: 10px;
    margin-bottom: 16px;
}

.acc-alert-icon { font-size: 18px; color: #f59e0b; }

.acc-alert-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    font-size: 13px;
    color: #78350f;
}

.acc-alert-body strong { font-weight: 700; }
.acc-alert-body span { color: #92400e; font-size: 12px; }

/* === ДВЕ КОЛОНКИ === */
.acc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

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

/* === ПАНЕЛЬ === */
.acc-panel {
    background: #fff;
    border: 1.5px solid #171717;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

.acc-panel-wide { grid-column: 1 / -1; }

.acc-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1.5px solid #171717;
    background: #fafaf7;
}

.acc-panel-title {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #171717;
}

.acc-panel-badge {
    font-size: 11px;
    font-weight: 700;
    color: #6b6b6b;
    background: #f0eee8;
    padding: 2px 8px;
    border-radius: 10px;
}

.acc-panel-body { padding: 8px; }

.acc-feedback-panel {
    border-color: rgba(23, 23, 23, 0.18);
    margin-bottom: 16px;
}

.acc-feedback-intro {
    margin: 4px 8px 16px;
    color: #6b6b6b;
    font-size: 13px;
    line-height: 1.5;
}

.acc-feedback-form {
    display: grid;
    gap: 8px;
    padding: 0 8px 8px;
}

.acc-feedback-label {
    margin-top: 4px;
    color: #454545;
    font-size: 12px;
    font-weight: 700;
}

.acc-feedback-form .ws-select,
.acc-feedback-form .ws-textarea {
    width: 100%;
    min-width: 0;
}

.acc-feedback-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #888;
    font-size: 12px;
}

.acc-feedback-status {
    min-height: 20px;
    color: #276749;
    font-size: 13px;
}

.acc-feedback-status.is-error { color: #b42318; }

@media (max-width: 640px) {
    .acc-feedback-footer { align-items: stretch; flex-direction: column; }
    .acc-feedback-footer .btn { width: 100%; }
}

.acc-panel-more {
    font-size: 11px;
    color: #9a9a9a;
    text-align: center;
    padding: 8px;
}

/* === ТРАНЗАКЦИИ === */
.acc-tx-list {
    display: flex;
    flex-direction: column;
}

.acc-tx {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background 0.1s;
}

.acc-tx:hover { background: #fafaf7; }

.acc-tx-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.acc-tx-up { background: rgba(201,255,74,0.2); color: #65a30d; }
.acc-tx-down { background: rgba(239,68,68,0.1); color: #dc2626; }

.acc-tx-info { flex: 1; min-width: 0; }

.acc-tx-desc {
    font-size: 12px;
    font-weight: 600;
    color: #171717;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.acc-tx-date {
    font-size: 10px;
    color: #9a9a9a;
}

.acc-tx-amount {
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}

.acc-positive { color: #65a30d; }
.acc-negative { color: #dc2626; }

/* === БЫСТРЫЕ ДЕЙСТВИЯ === */
.acc-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.acc-quick {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    background: #fafaf7;
    border: 1.5px solid #171717;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    transition: all 0.15s;
}

.acc-quick:hover {
    background: rgba(201,255,74,0.12);
    transform: translateY(-1px);
}

.acc-quick-icon { font-size: 22px; margin-bottom: 6px; }

.acc-quick-title {
    font-size: 12px;
    font-weight: 700;
    color: #171717;
    margin-bottom: 2px;
}

.acc-quick-desc {
    font-size: 10px;
    color: #9a9a9a;
}

/* === ГЕНЕРАЦИИ === */
.acc-gen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}

.acc-gen {
    background: #fafaf7;
    border: 1.5px solid #171717;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.15s;
}

.acc-gen:hover { transform: translateY(-2px); }

.acc-gen-image {
    aspect-ratio: 1 / 1;
    background: #f0eee8;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.acc-gen-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.acc-gen-empty {
    font-size: 28px;
    color: #d4d4d4;
}

.acc-gen-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #171717;
    color: #c9ff4a;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.acc-gen-info { padding: 8px 10px; }

.acc-gen-title {
    font-size: 11px;
    font-weight: 700;
    color: #171717;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.acc-gen-date {
    font-size: 10px;
    color: #9a9a9a;
}

/* === ПУСТОЕ СОСТОЯНИЕ === */
.acc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    color: #9a9a9a;
}

.acc-empty-icon {
    font-size: 28px;
    margin-bottom: 8px;
    color: #c9ff4a;
}

.acc-empty-text {
    font-size: 13px;
    color: #6b6b6b;
}

/* === АДАПТИВ === */
@media (max-width: 768px) {
    .acc-header {
        flex-wrap: wrap;
        padding: 12px 14px;
    }
    .acc-avatar { width: 44px; height: 44px; font-size: 20px; }
    .acc-name { font-size: 16px; }
    .acc-meta { font-size: 11px; flex-wrap: wrap; }
    .acc-actions { width: 100%; }
    .acc-actions .btn { width: 100%; }
    .acc-panel-body { padding: 6px; }
    .acc-quick-actions { grid-template-columns: 1fr; }
}

/* === Кнопка удаления в истории (рабочая область) === */
.ws-history-item {
    position: relative;
}

.ws-history-delete {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(23, 23, 23, 0.1);
    color: #6b6b6b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.15s;
    z-index: 5;
    padding: 0;
}

.ws-history-item:hover .ws-history-delete {
    opacity: 1;
}

.ws-history-delete:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
    transform: scale(1.1);
}

.ws-history-delete:disabled {
    opacity: 0.3;
    cursor: wait;
}

.ws-history-delete svg {
    width: 14px;
    height: 14px;
}

/* Для кнопки в превью-визуал */
.ws-preview-visual {
    position: relative;
}

/* === Кнопка удаления в кабинете === */
.acc-gen {
    position: relative;
}

.acc-gen-delete {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(23, 23, 23, 0.1);
    color: #6b6b6b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.15s;
    z-index: 5;
    padding: 0;
}

.acc-gen:hover .acc-gen-delete {
    opacity: 1;
}

.acc-gen-delete:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
    transform: scale(1.1);
}

.acc-gen-delete:disabled {
    opacity: 0.3;
    cursor: wait;
}

.acc-gen-delete svg {
    width: 14px;
    height: 14px;
}

/* === Кнопки в карточке генерации (кабинет) === */
.acc-gen-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.15s;
}

.acc-gen:hover .acc-gen-actions {
    opacity: 1;
}

.acc-gen-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border: 1.5px solid #171717;
    border-radius: 6px;
    background: #fff;
    color: #171717;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
}

.acc-gen-btn:hover {
    background: #c9ff4a;
    transform: translateY(-1px);
}

.acc-gen-btn svg {
    width: 14px;
    height: 14px;
}

/* === МОДАЛКА ИНСТРУКЦИИ === */
.modal-help {
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-help .modal-header {
    margin-bottom: 24px;
}

.help-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 28px;
}

.help-step {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #fafaf7;
    border: 1.5px solid #171717;
    border-radius: 12px;
    transition: all 0.15s;
}

.help-step:hover {
    transform: translateX(4px);
    background: rgba(201, 255, 74, 0.06);
}

.help-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #c9ff4a;
    color: #171717;
    font-weight: 900;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.help-step-body {
    flex: 1;
    min-width: 0;
}

.help-step-title {
    font-size: 15px;
    font-weight: 800;
    color: #171717;
    margin-bottom: 6px;
}

.help-step-text {
    font-size: 13px;
    color: #4a4a4a;
    line-height: 1.6;
}

.help-step-text strong {
    color: #171717;
    font-weight: 700;
}

/* === Список моделей в шаге 4 === */
.help-model-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.help-model-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid rgba(23, 23, 23, 0.08);
    border-radius: 8px;
    font-size: 12px;
}

.help-model-row.help-model-recommended {
    background: rgba(201, 255, 74, 0.1);
    border-color: #c9ff4a;
}

.help-model-name {
    font-weight: 700;
    color: #171717;
}

.help-model-price {
    font-weight: 800;
    color: #171717;
    text-align: right;
}

.help-model-desc {
    grid-column: 1 / -1;
    font-size: 11px;
    color: #6b6b6b;
}

/* === Подсказки === */
.help-tips {
    padding: 16px 20px;
    background: rgba(201, 255, 74, 0.1);
    border: 1.5px solid #171717;
    border-radius: 12px;
    margin-bottom: 24px;
}

.help-tips-title {
    font-size: 13px;
    font-weight: 800;
    color: #171717;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.help-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.help-tips li {
    font-size: 13px;
    color: #4a4a4a;
    padding-left: 18px;
    position: relative;
}

.help-tips li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #65a30d;
    font-weight: 900;
}

.help-tips li strong {
    color: #171717;
    font-weight: 700;
}

.help-footer {
    padding-top: 20px;
    border-top: 1.5px solid #171717;
}

/* === Адаптив === */
@media (max-width: 640px) {
    .help-step {
        flex-direction: column;
        gap: 10px;
    }
    .help-step-num {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    .help-model-row {
        font-size: 11px;
    }
}

/* ============ НОВАЯ РАБОЧАЯ ОБЛАСТЬ (стиль Aidentika) ============ */

/* === НОМЕРА ШАГОВ === */
.ws-panel-step {
    position: relative;
    padding-top: 28px !important;
}

.ws-step-badge {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 11px;
    font-weight: 800;
    color: #9a9a9a;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: 'SF Mono', 'Consolas', monospace;
}

.ws-step-badge-preview {
    top: 16px;
    right: 20px;
    color: rgba(255,255,255,0.3);
}

/* === ТАБЫ (Тип контента) === */
.ws-tabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    background: #f0eee8;
    border-radius: 10px;
}

.ws-tab {
    flex: 1;
    padding: 9px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: #6b6b6b;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.ws-tab:hover:not(:disabled) {
    color: #171717;
}

.ws-tab.active {
    background: #171717;
    color: #c9ff4a;
    font-weight: 700;
}

.ws-tab:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* === ДВА ПОЛЯ В РЯД === */
.ws-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 640px) {
    .ws-row-2 { grid-template-columns: 1fr; }
}

/* === ТРИ ПОЛЯ В РЯД === */
.ws-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

@media (max-width: 900px) {
    .ws-row-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .ws-row-3 { grid-template-columns: 1fr; }
}

/* === ЧИПСЫ (формат, качество) === */
.ws-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ws-chip {
    padding: 8px 14px;
    border: 1.5px solid rgba(23,23,23,0.12);
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #4a4a4a;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ws-chip:hover {
    border-color: #171717;
    color: #171717;
}

.ws-chip.active {
    background: #171717;
    border-color: #171717;
    color: #c9ff4a;
}

.ws-chip-add {
    font-size: 11px;
    opacity: 0.7;
    font-weight: 500;
}

/* === ПРЕСЕТЫ INLINE === */
.ws-presets-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 16px;
    margin-top: 8px;
    border-top: 1px solid rgba(23,23,23,0.06);
    flex-wrap: wrap;
}

.ws-presets-label {
    font-size: 12px;
    font-weight: 700;
    color: #6b6b6b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ws-presets-inline .ws-presets-select {
    flex: 1;
    min-width: 140px;
}

.btn-xs {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 6px;
}

/* === COUNTER === */
#desc-counter {
    font-weight: 700;
    color: #171717;
}

/* === АДАПТИВ === */
@media (max-width: 768px) {
    .ws-step-badge {
        position: static;
        display: inline-block;
        margin-bottom: 8px;
        color: #9a9a9a;
    }
    .ws-panel-step {
        padding-top: 20px !important;
    }
    /* .ws-tabs — оставляем в строку (3 таба) */
    .ws-tabs {
        flex-direction: row !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .ws-tabs::-webkit-scrollbar {
        display: none;
    }
    .ws-tab {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        padding: 8px 6px !important;
        font-size: 11px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ============ ВОДЯНОЙ ЗНАК ФОРМАТА ============ */
.ws-preview-visual {
    position: relative;
}

.ws-format-watermark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0.4;
    transition: opacity 0.3s;
    z-index: 1;
}

.ws-preview-visual:hover .ws-format-watermark {
    opacity: 0.7;
}

.ws-format-frame {
    border: 3px dashed rgba(201, 255, 74, 0.9);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    max-width: 80%;
    max-height: 80%;
}

/* Разные пропорции */
.ws-format-frame[data-ratio="1:1"]   { width: 70%; aspect-ratio: 1 / 1; }
.ws-format-frame[data-ratio="3:4"]   { width: 55%; aspect-ratio: 3 / 4; }
.ws-format-frame[data-ratio="4:3"]   { width: 75%; aspect-ratio: 4 / 3; }
.ws-format-frame[data-ratio="16:9"]  { width: 85%; aspect-ratio: 16 / 9; }
.ws-format-frame[data-ratio="9:16"]  { width: 40%; aspect-ratio: 9 / 16; }

.ws-format-info {
    text-align: center;
    color: #fff;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
}

.ws-format-ratio {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 6px;
    letter-spacing: 0.05em;
    color: #c9ff4a;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.ws-format-size {
    font-size: 13px;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.ws-format-market {
    font-size: 11px;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

/* Плавное появление */
@keyframes watermark-appear {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 0.15;
        transform: scale(1);
    }
}

.ws-format-watermark.changed {
    animation: watermark-appear 0.4s ease-out;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .ws-format-ratio { font-size: 18px; }
    .ws-format-size { font-size: 9px; }
    .ws-format-market { font-size: 8px; }
}

/* === СКРЫТЫЕ СЕЛЕКТЫ (для отправки формы, но невидимые) === */
.ws-hidden-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* === ВАРИАЦИИ (при quantity > 1) === */
.ws-variations {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ws-variation-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1.5px solid rgba(23,23,23,0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 13px;
    color: #4a4a4a;
}

.ws-variation-option:hover {
    border-color: #171717;
    background: #fafaf7;
}

.ws-variation-option input[type="radio"] {
    margin: 0;
    accent-color: #171717;
    cursor: pointer;
}

.ws-variation-option:has(input:checked) {
    border-color: #171717;
    background: rgba(201, 255, 74, 0.15);
    color: #171717;
    font-weight: 600;
}

.ws-variation-option span {
    flex: 1;
}

/* Универсальный скрывающий класс */
.ws-hidden {
    display: none !important;
}

/* === ВЫБРАННЫЕ РАДИО-ВАРИАЦИИ — ТЁМНЫЕ === */
.ws-variation-option:has(input:checked) {
    background: #171717;
    color: #c9ff4a;
    border-color: #171717;
}

.ws-variation-option:has(input:checked) input[type="radio"] {
    accent-color: #c9ff4a;
}

/* === ТАБЫ — активный тёмный === */
.ws-tab.active {
    background: #171717;
    color: #c9ff4a;
}

/* === КНОПКИ КОЛИЧЕСТВА — активная тёмная === */
.ws-qty-btn.active {
    background: #171717;
    color: #c9ff4a;
    border-color: #171717;
}

/* === КНОПКИ РАЗМЕРА ПРЕВЬЮ — активная тёмная === */
.ws-size-btn.active {
    background: #c9ff4a;
    color: #171717;
    border-color: #c9ff4a;
}

/* === РАДИО-КАРТОЧКИ (если есть) — активная === */
.select-card input:checked + .select-card-content {
    background: #171717;
    color: #c9ff4a;
}

/* === ФОКУС НА СЕЛЕКТАХ — подсветка лаймом === */
.ws-select:focus,
.ws-input:focus,
.ws-textarea:focus {
    border-color: #171717;
    box-shadow: 0 0 0 3px rgba(201, 255, 74, 0.6);
}

/* === СЕЛЕКТЫ — при выборе показывают значение тёмным === */
.ws-select {
    background-color: #fff;
    color: #171717;
}

.ws-select:focus {
    background-color: #fff;
}

/* ============================================
   ВСЕ ВЫБРАННЫЕ ЭЛЕМЕНТЫ — ЧЁРНЫЕ
   ============================================ */

/* --- ТАБЫ (Фото / Карточка / Видео) --- */
.ws-tabs {
    background: #f0eee8;
}

.ws-tab {
    background: transparent;
    color: #6b6b6b;
    border: none;
}

.ws-tab.active {
    background: #171717 !important;
    color: #c9ff4a !important;
    font-weight: 700;
}

/* --- КНОПКИ КОЛИЧЕСТВА (1 / 5 / 10) --- */
.ws-qty-btn {
    background: #fff;
    color: #171717;
    border: 1.5px solid #171717;
}

.ws-qty-btn.active {
    background: #171717 !important;
    color: #c9ff4a !important;
}

/* --- ЧИПСЫ (формат, качество, длительность) --- */
.ws-chip {
    background: #fff;
    color: #4a4a4a;
    border: 1.5px solid rgba(23,23,23,0.15);
}

.ws-chip.active {
    background: #171717 !important;
    color: #c9ff4a !important;
    border-color: #171717 !important;
}

/* --- РАДИО-ВАРИАЦИИ (разные ракурсы, стили и т.д.) --- */
.ws-variation-option {
    background: #fff;
    color: #4a4a4a;
    border: 1.5px solid rgba(23,23,23,0.15);
}

.ws-variation-option:has(input:checked) {
    background: #171717 !important;
    color: #c9ff4a !important;
    border-color: #171717 !important;
}

.ws-variation-option:has(input:checked) input[type="radio"] {
    accent-color: #c9ff4a !important;
}

.ws-variation-option:has(input:checked) span {
    color: #c9ff4a;
    font-weight: 700;
}

/* --- КНОПКИ РАЗМЕРА ПРЕВЬЮ (S / M / L) --- */
.ws-size-btn {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.15);
}

.ws-size-btn.active {
    background: #c9ff4a !important;
    color: #171717 !important;
    border-color: #c9ff4a !important;
}

/* --- СЕЛЕКТЫ — при выборе показывают ЖИРНЫЙ текст --- */
.ws-select {
    color: #171717;
    font-weight: 600;
    background: #fff;
    border: 1.5px solid #171717;
}

.ws-select:focus {
    background: #fff;
    border-color: #171717;
    box-shadow: 0 0 0 3px rgba(201, 255, 74, 0.6);
}

/* --- ЛЕЙБЛЫ СЕЛЕКТОВ — тёмные и жирные --- */
.ws-field-label {
    color: #171717;
    font-weight: 700;
}

/* --- ВЫБРАННОЕ ЗНАЧЕНИЕ В СЕЛЕКТЕ — ЛАЙМОВЫЙ АКЦЕНТ --- */
.ws-select option:checked {
    background: #171717 !important;
    color: #c9ff4a !important;
}

/* --- ФОКУС НА ВСЕХ ЭЛЕМЕНТАХ — ЛАЙМОВАЯ РАМКА --- */
.ws-chip:focus,
.ws-qty-btn:focus,
.ws-tab:focus,
.ws-variation-option:focus-within {
    outline: none;
    box-shadow: 0 0 0 3px rgba(201, 255, 74, 0.6);
}


/* === РАЗБИВКА ЦЕНЫ === */
.ws-cost-breakdown {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    text-align: right;
    margin-top: 4px;
    font-style: italic;
}

/* === ПОДСКАЗКА ПРО ЛУЧИ === */
.ws-currency-hint {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(201, 255, 74, 0.15);
    border: 1px solid #c9ff4a;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    color: #171717;
    margin-top: 8px;
}

/* ============================================
   ЗАГРУЗКА 5 ФОТО — С РАЗНЫХ СТОРОН
   ============================================ */

.ws-upload-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

@media (max-width: 900px) {
    .ws-upload-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .ws-upload-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ws-upload-5 .ws-upload-slot {
    aspect-ratio: 1 / 1;
    border: 1.5px dashed rgba(23, 23, 23, 0.15);
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    overflow: hidden;
}

.ws-upload-5 .ws-upload-slot:hover {
    border-color: #6b6b6b;
    background: rgba(107, 107, 107, 0.03);
}

.ws-upload-5 .ws-upload-slot.has-photo {
    border-style: solid;
    border-color: rgba(23, 23, 23, 0.1);
    background: #f5f5f3;
}

.ws-upload-5 .ws-slot-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #b0b0b0;
    font-size: 10px;
    font-weight: 500;
    text-align: center;
    padding: 4px;
}

.ws-upload-5 .ws-slot-empty svg {
    width: 20px;
    height: 20px;
    stroke: #d0d0d0;
}

.ws-upload-5 .ws-upload-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ws-upload-5 .ws-slot-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(23, 23, 23, 0.1);
    color: #6b6b6b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.15s;
    z-index: 2;
    padding: 0;
}

.ws-upload-5 .ws-slot-remove:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Обновляем старый селектор .ws-upload-4 на .ws-upload-5 */
.ws-upload-all-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px dashed rgba(23, 23, 23, 0.15);
    border-radius: 10px;
    color: #6b6b6b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    margin-top: 4px;
}

.ws-upload-all-btn:hover {
    border-color: #6b6b6b;
    color: #2a2a2a;
    background: rgba(107, 107, 107, 0.03);
}


.ws-upload-slot.ws-slot-active {
    border-color: #6b6b6b;
    background: rgba(107, 107, 107, 0.08);
}

/* ============================================
   ФИНАЛЬНЫЕ СТРЕЛКИ НА СЕЛЕКТАХ (важно!)
   Перебиваем всё, что было раньше
   ============================================ */

select.ws-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: #ffffff !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 16px 16px !important;
    padding-right: 44px !important;
    cursor: pointer !important;
}

select.ws-select:hover {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23171717' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e") !important;
    border-color: #171717 !important;
}

select.ws-select:focus {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23171717' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e") !important;
    border-color: #171717 !important;
}

/* Также стрелки для пресетов */
select.ws-presets-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    background-color: #ffffff !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 14px 14px !important;
    padding-right: 34px !important;
}


/* ============ ПРЕДПРОСМОТР ПРОМПТА ============ */
.ws-prompt-preview {
    background: #f9f9f9;
    border: 1px solid rgba(10, 10, 10, 0.08);
    border-radius: 12px;
    padding: 14px;
    margin: 12px 0;
}

.ws-prompt-preview.changed {
    border-color: #c9ff4a;
    box-shadow: 0 0 0 3px rgba(201, 255, 74, 0.3);
}

.ws-prompt-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ws-prompt-preview-title {
    font-weight: 700;
    font-size: 14px;
}

.ws-prompt-btn-sm {
    background: #0a0a0a;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.ws-prompt-btn-sm:hover { background: #2a2a2a; }
.ws-prompt-btn-sm:disabled { opacity: 0.5; cursor: wait; }

.ws-prompt-section { margin-bottom: 10px; }

.ws-prompt-label {
    display: block;
    font-size: 11px;
    color: #6b6b6b;
    margin-bottom: 4px;
    font-weight: 600;
}

.ws-prompt-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(10, 10, 10, 0.12);
    border-radius: 8px;
    font-size: 12px;
    font-family: inherit;
    resize: vertical;
    background: #fff;
    line-height: 1.5;
}

.ws-prompt-textarea:focus {
    outline: none;
    border-color: #0a0a0a;
    box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.06);
}

.ws-prompt-ru {
    background: #fff;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    color: #4a4a4a;
    min-height: 40px;
    line-height: 1.5;
    border: 1px solid rgba(10, 10, 10, 0.06);
}

.ws-prompt-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

/* Кнопка «Сгенерировать» — когда активна */
.btn.ready {
    animation: pulse-ready 2s infinite;
}
@keyframes pulse-ready {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201, 255, 74, 0.7); }
    50% { box-shadow: 0 0 0 8px rgba(201, 255, 74, 0); }
}
.ws-prompt-btn-sm.primary {
    background: #c9ff4a;
    color: #0a0a0a;
    font-weight: 700;
}
.ws-prompt-btn-sm.primary:hover {
    background: #a8e030;
}

/* RU-поле теперь textarea — стили как у EN */
#prompt-ru.ws-prompt-textarea {
    background: #fff;
    color: #4a4a4a;
}

/* ============ АНИМАЦИИ ГЕНЕРАЦИИ ============ */

/* Пульсация активной карточки */
@keyframes card-pulse {
    0% {
        border-color: #c9ff4a;
        box-shadow: 0 0 0 0 rgba(201, 255, 74, 0.7);
    }
    50% {
        border-color: #a8e030;
        box-shadow: 0 0 0 12px rgba(201, 255, 74, 0);
    }
    100% {
        border-color: #c9ff4a;
        box-shadow: 0 0 0 0 rgba(201, 255, 74, 0);
    }
}

/* Переливание градиента на активной карточке */
@keyframes card-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Вращение спиннера */
@keyframes spinner-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Мерцание карточек в очереди */
@keyframes queue-fade {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.9; }
}

/* Плавное появление готовой карточки */
@keyframes card-appear {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Активная карточка — генерация */
.result-card.generating {
    border: 2px solid #c9ff4a;
    position: relative;
    overflow: hidden;
    animation: card-pulse 2s infinite;
}

.result-card.generating .result-card-image {
    background: linear-gradient(90deg, #f5f5f5 25%, #fafafa 50%, #f5f5f5 75%);
    background-size: 200% 100%;
    animation: card-shimmer 2s infinite linear;
}

/* Спиннер внутри активной карточки */
.result-card.generating .spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid rgba(201, 255, 74, 0.3);
    border-top-color: #c9ff4a;
    border-radius: 50%;
    animation: spinner-rotate 1s infinite linear;
    margin-right: 10px;
    vertical-align: middle;
}

.result-card.generating .status-text {
    color: #0a0a0a;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Карточки в очереди */
.result-card.queued {
    border: 1px dashed rgba(10, 10, 10, 0.15);
    animation: queue-fade 2.5s infinite;
}

.result-card.queued .status-text {
    color: #9a9a9a;
    font-size: 13px;
    text-align: center;
}

/* Готовая карточка — плавное появление */
.result-card.done {
    border: 1px solid rgba(10, 10, 10, 0.08);
    animation: card-appear 0.5s ease-out;
}

.result-card.done:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(10, 10, 10, 0.08);
    transition: all 0.2s;
}

/* Прогресс-линия сверху — с анимацией */
.result-progress-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(90deg, rgba(201, 255, 74, 0.1) 0%, rgba(201, 255, 74, 0.2) 50%, rgba(201, 255, 74, 0.1) 100%);
    background-size: 200% 100%;
    border-radius: 20px;
    animation: card-shimmer 3s infinite linear;
    font-weight: 700;
    color: #0a0a0a;
}

.result-progress-line::before {
    content: '⚡';
    font-size: 16px;
}

/* Прогресс-бар с градиентом */
.progress-bar-fill {
    background: linear-gradient(90deg, #c9ff4a 0%, #a8e030 50%, #c9ff4a 100%);
    background-size: 200% 100%;
    animation: card-shimmer 2s infinite linear;
    transition: width 0.6s ease-out;
}

/* Общий блок с прогрессом */
.generation-progress {
    background: #fff;
    border: 1px solid rgba(10, 10, 10, 0.08);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 8px;
}

.progress-step {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    border-radius: 8px;
    background: #f5f5f5;
    color: #9a9a9a;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s;
}

.progress-step span {
    display: block;
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 2px;
}

.progress-step.active {
    background: #c9ff4a;
    color: #0a0a0a;
    transform: scale(1.05);
}

.progress-step.done {
    background: #0a0a0a;
    color: #c9ff4a;
}

.progress-bar {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-text {
    text-align: center;
    font-size: 13px;
    color: #6b6b6b;
    font-weight: 600;
}

/* Уведомление о 24 часах */
.history-notice {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: linear-gradient(90deg, rgba(201, 255, 74, 0.15) 0%, rgba(201, 255, 74, 0.05) 100%);
    border: 1px solid rgba(201, 255, 74, 0.4);
    border-radius: 12px;
    margin: 20px 0;
}

.history-notice-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.history-notice-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.history-notice-text strong {
    font-size: 14px;
    color: #0a0a0a;
}

.history-notice-text span {
    font-size: 13px;
    color: #6b6b6b;
}

/* Кнопки действий в истории */
.ws-history-actions {
    display: flex;
    gap: 6px;
    padding: 8px;
    border-top: 1px solid rgba(10, 10, 10, 0.06);
}

.ws-history-actions .btn {
    font-size: 12px;
    padding: 6px 10px;
}

/* === LIGHTBOX для просмотра фото === */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    cursor: default;
}
.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}
.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    font-size: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}
.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}
.lightbox-name {
    text-align: center;
    color: #fff;
    margin-top: 16px;
    font-size: 14px;
    opacity: 0.8;
    word-break: break-all;
}

/* ============================================================
   ФИКС МОБИЛЬНОЙ РАЗМЕТКИ — sidebar сверху, контент ниже
   ============================================================ */

@media (max-width: 900px) {
    /* Layout — вертикальная колонка */
    .app-layout {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Sidebar — горизонтальная полоса сверху */
    .sidebar {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 12px 16px !important;
        margin: 0 !important;
        position: static !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border, #e5e5e5) !important;
        height: auto !important;
        min-height: 0 !important;
    }

    .sidebar-logo {
        width: 100% !important;
        margin-bottom: 8px !important;
    }

    .sidebar-nav {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        width: 100% !important;
        margin-bottom: 8px !important;
    }

    .sidebar-nav-item {
        flex: 0 0 auto !important;
        padding: 6px 10px !important;
        font-size: 13px !important;
        white-space: nowrap !important;
    }

    .sidebar-balance {
        width: 100% !important;
        margin-top: 0 !important;
        padding: 10px 14px !important;
    }

    /* Main content — под sidebar */
    .main-content {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        flex: 1 1 auto !important;
    }

    .content-shell {
        padding: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Workspace layout — 1 колонка */
    .ws-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    .ws-form-col,
    .ws-preview-col {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Поля формы */
    .ws-row-2,
    .ws-row-3 {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
}

@media (max-width: 640px) {
    .sidebar-nav-item {
        font-size: 12px !important;
        padding: 6px 8px !important;
    }

    .page-title,
    .ws-title {
        font-size: 22px !important;
    }

    .topbar {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    /* Горизонтальный скролл запрещаем */
    body, html {
        overflow-x: hidden !important;
    }
}

/* ============================================================
   МОБИЛЬНОЕ МЕНЮ: гамбургер + выезжающий sidebar
   ============================================================ */

/* Кнопка гамбургера — видна только на мобильных */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #171717;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s;
}

.mobile-menu-btn:active {
    transform: scale(0.94);
}

.mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: #c9ff4a;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}

/* Крестик когда меню открыто */
.mobile-menu-btn.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.is-open span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.25s;
}

.sidebar-overlay.is-open {
    display: block;
    opacity: 1;
}

/* ============================================================
   МОБИЛЬНЫЙ LAYOUT
   ============================================================ */

@media (max-width: 900px) {
    /* Показываем гамбургер */
    .mobile-menu-btn {
        display: flex;
    }

    /* Sidebar превращается в выезжающее меню */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        z-index: 100 !important;
        padding: 60px 20px 20px 20px !important;
        background: #171717 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s ease !important;
        overflow-y: auto !important;
        border: none !important;
    }

    .sidebar.is-open {
        transform: translateX(0) !important;
    }

    /* Внутри сайдбара — вертикальное меню */
    .sidebar-logo {
        width: 100% !important;
        margin-bottom: 20px !important;
        border-bottom: 1px solid #2a2a2a !important;
        padding-bottom: 16px !important;
    }

    .sidebar-nav {
        flex-direction: column !important;
        width: 100% !important;
        gap: 4px !important;
        margin-bottom: 16px !important;
    }

    .sidebar-nav-item {
        width: 100% !important;
        padding: 12px 14px !important;
        font-size: 15px !important;
        white-space: nowrap !important;
        border-radius: 10px !important;
    }

    .sidebar-balance {
        width: 100% !important;
        margin-top: 0 !important;
    }

    /* Main content — на всю ширину */
    .app-layout {
        display: flex !important;
        flex-direction: column !important;
    }

    .main-content {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding-top: 60px !important; /* чтобы гамбургер не перекрывал */
    }

    .content-shell {
        padding: 12px !important;
    }

    /* Topbar — компактнее */
    .topbar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    /* Workspace header — вертикально */
    .workspace-header {
        flex-direction: column !important;
        gap: 14px !important;
        padding-bottom: 16px !important;
        margin-bottom: 20px !important;
        align-items: stretch !important;
    }

    /* Заголовок — не переносится по словам, а уменьшается */
    .ws-title {
        font-size: 22px !important;
        line-height: 1.25 !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        hyphens: none !important;
    }

    /* Кнопки в шапке — в ряд с горизонтальным скроллом */
    .ws-actions {
        display: flex !important;
        gap: 6px !important;
        overflow-x: auto !important;
        padding-bottom: 4px !important;
        -webkit-overflow-scrolling: touch;
    }

    .ws-actions::-webkit-scrollbar {
        display: none;
    }

    .ws-actions .btn {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        font-size: 13px !important;
        padding: 8px 12px !important;
    }

    /* Плашка «1 луч = 1 ₽» */
    .ws-currency-hint {
        display: inline-block !important;
        width: auto !important;
        max-width: 100% !important;
        font-size: 12px !important;
        padding: 6px 12px !important;
        margin-top: 6px !important;
        word-break: normal !important;
        white-space: normal !important;
        line-height: 1.3 !important;
    }

    /* Форма и превью — вертикально */
    .ws-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    .ws-form-col,
    .ws-preview-col {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /* Grid-поля — 1 колонка */
    .ws-row-2,
    .ws-row-3 {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    /* User chip — компактнее */
    .user-chip {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .user-info {
        min-width: 0 !important;
        flex: 1 !important;
    }

    .user-email {
        font-size: 12px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding-top: 56px !important;
    }

    .ws-title {
        font-size: 19px !important;
    }

    .mobile-menu-btn {
        width: 40px;
        height: 40px;
        top: 10px;
        left: 10px;
    }

    /* Модалки на всю ширину */
    .modal-overlay {
        padding: 10px !important;
    }

    .modal {
        padding: 20px 16px !important;
        border-radius: 14px !important;
        max-width: 100% !important;
    }

    /* Пресеты в модалке — вертикально */
    .preset-row {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .preset-row > div:first-child {
        flex: 1 0 100% !important;
    }
}

/* Защита от горизонтального скролла */
html, body {
    overflow-x: clip;
}


/* Логотип в sidebar — кликабельная ссылка с hover-эффектом */
.sidebar-logo {
    cursor: pointer;
    transition: opacity 0.15s;
}

.sidebar-logo:hover {
    opacity: 0.85;
}

.sidebar-logo:active {
    opacity: 0.7;
}

.sidebar-logo .sidebar-logo-mark {
    transition: transform 0.2s ease;
}

.sidebar-logo:hover .sidebar-logo-mark {
    transform: scale(1.05);
}


/* ============================================================
   ADMIN: Состояние сервера
   ============================================================ */

/* Сетка 3 колонки */
.server-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 900px) {
    .server-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .server-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Карточка сервера */
.server-card {
    background: var(--card, #fff);
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 14px;
    padding: 20px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.server-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.server-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.server-card-icon {
    font-size: 20px;
    line-height: 1;
}

.server-card-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim, #9a9a9a);
}

.server-card-value {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #171717;
    line-height: 1.1;
    margin-bottom: 10px;
}

.server-card-hint {
    font-size: 12px;
    color: var(--text-dim, #9a9a9a);
    margin-top: 10px;
    line-height: 1.4;
}

/* Прогресс-бар */
.server-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.server-bar-fill {
    height: 100%;
    background: #1c7d32;
    border-radius: 4px;
    transition: width 0.4s ease, background 0.2s;
}

/* Список сервисов */
.service-row {
    display: grid;
    grid-template-columns: 30px 1fr auto auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px 8px;
    border-bottom: 1px solid var(--border, #e5e5e5);
    font-size: 14px;
}

.service-row:last-child {
    border-bottom: none;
}

.service-row-down {
    background: #fff5f5;
    border-radius: 6px;
    padding-left: 12px;
    padding-right: 12px;
}

.service-status {
    font-size: 16px;
}

.service-name {
    font-weight: 600;
    color: #171717;
    font-family: monospace;
    font-size: 13px;
}

.service-state {
    font-size: 12px;
    color: var(--text-dim, #9a9a9a);
    padding: 2px 8px;
    background: #f5f5f5;
    border-radius: 6px;
}

.service-uptime {
    font-size: 12px;
    color: var(--text-dim, #9a9a9a);
    min-width: 60px;
    text-align: right;
}

.service-memory {
    font-size: 12px;
    color: var(--text-dim, #9a9a9a);
    min-width: 70px;
    text-align: right;
}

@media (max-width: 640px) {
    .service-row {
        grid-template-columns: 30px 1fr;
        gap: 6px;
    }
    .service-state,
    .service-uptime,
    .service-memory {
        grid-column: 2;
        font-size: 11px;
    }
}


/* === TELEGRAM ID в форме обратной связи === */
.acc-tg-block {
    background: #fafaf7;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
}
.acc-tg-hint {
    font-size: 11px;
    color: #9a9a9a;
    font-weight: 400;
    margin-left: 4px;
}
.acc-tg-row {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.acc-tg-input {
    flex: 1;
    font-family: monospace;
    font-size: 14px;
}
.acc-tg-help {
    font-size: 12px;
    color: #6b6b6b;
    margin-top: 10px;
    line-height: 1.5;
}
.acc-tg-help a {
    color: var(--accent-dark, #6ba300);
    text-decoration: underline;
}
.acc-tg-help b {
    color: #171717;
}
@media (max-width: 640px) {
    .acc-tg-row { flex-direction: column; }
    .acc-tg-row button { width: 100%; }
}


/* === BOTTOM SHEET: выбор «Камера / Галерея» === */
.ws-upload-sheet {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.ws-upload-sheet-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.15s ease-out;
}

.ws-upload-sheet-body {
    position: relative;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 20px 16px 24px 16px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.25s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.ws-upload-sheet-title {
    font-size: 16px;
    font-weight: 800;
    color: #171717;
    text-align: center;
    margin-bottom: 16px;
}

.ws-upload-sheet-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    background: #fafaf7;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    cursor: pointer;
    margin-bottom: 10px;
    text-align: left;
    transition: background 0.15s, transform 0.1s;
}

.ws-upload-sheet-btn:hover,
.ws-upload-sheet-btn:active {
    background: #f0f0eb;
    transform: scale(0.99);
}

.ws-upload-sheet-icon {
    font-size: 28px;
    line-height: 1;
}

.ws-upload-sheet-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ws-upload-sheet-text strong {
    font-size: 15px;
    font-weight: 700;
    color: #171717;
}

.ws-upload-sheet-text small {
    font-size: 12px;
    color: #9a9a9a;
}

.ws-upload-sheet-cancel {
    display: block;
    width: 100%;
    padding: 14px;
    background: none;
    border: none;
    color: #6b6b6b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    border-radius: 10px;
    transition: background 0.15s;
}

.ws-upload-sheet-cancel:hover {
    background: #f5f5f5;
}

@media (min-width: 641px) {
    .ws-upload-sheet-body {
        border-radius: 20px;
        margin-bottom: 40px;
        max-width: 400px;
    }
}


/* ============================================================
   СКИЛЛЫ — модалка со списком промптов
   ============================================================ */

.skills-tip {
    background: #fafaf7;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #6b6b6b;
    line-height: 1.5;
    margin-bottom: 16px;
}

.skills-tip strong {
    color: #171717;
}

/* Строка скилла в списке */
.skill-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    margin-bottom: 8px;
    background: #fff;
    transition: background 0.15s;
}

.skill-row:hover {
    background: #fafaf7;
}

.skill-row-info {
    flex: 1;
    min-width: 0;
}

.skill-row-name {
    font-size: 15px;
    font-weight: 700;
    color: #171717;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.skill-row-prompt {
    font-size: 12px;
    color: #9a9a9a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: monospace;
}

.skill-row-meta {
    font-size: 11px;
    color: #b5b5b5;
    margin-top: 4px;
}

/* Кнопки в строке скилла */
.skill-row-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.skill-btn {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    background: #fff;
    color: #171717;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.skill-btn:hover {
    background: #f0f0eb;
}

.skill-btn-apply {
    background: #fafaf7;
}

.skill-btn-gen {
    background: #c9ff4a;
    border-color: #c9ff4a;
    color: #171717;
}

.skill-btn-gen:hover {
    background: #b8eb2e;
}

.skill-btn-icon {
    padding: 6px 8px;
    font-size: 13px;
}

.skill-btn-delete {
    color: #e04b4b;
}

.skill-btn-delete:hover {
    background: #ffe5e5;
}

/* Мобильные */
@media (max-width: 640px) {
    .skill-row {
        flex-wrap: wrap;
        padding: 10px 12px;
    }

    .skill-row-info {
        flex: 1 0 100%;
        margin-bottom: 6px;
    }

    .skill-row-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .skill-btn {
        flex: 0 0 auto;
    }
}


/* Активный скилл */
.skill-row-active {
    background: #f5ffd6 !important;
    border-color: #c9ff4a !important;
    box-shadow: 0 0 0 2px rgba(201, 255, 74, 0.4);
}

.skill-row-active .skill-row-name {
    color: #4a7a00;
}

.skills-active-hint {
    font-size: 13px;
    color: #6b6b6b;
    font-weight: 600;
    margin-left: 8px;
}

/* Когда поле промпта пустое, но есть активный скилл */
.ws-panel-collapsible[style*="display: none"] + .ws-note {
    display: block;
}

/* ============================================================
   СКИЛЛЫ: блок с кнопкой и подсказкой активного скилла
   ============================================================ */

.ws-skills-block {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.skills-active-hint {
    font-size: 13px;
    color: #4a7a00;
    font-weight: 600;
    padding: 6px 12px;
    background: #f5ffd6;
    border: 1px solid #c9ff4a;
    border-radius: 8px;
    display: none;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}

.skills-active-hint::before {
    content: '✅';
    font-size: 12px;
}

.skills-active-hint[style*="inline-flex"],
.skills-active-hint[style*="display: inline-flex"] {
    display: inline-flex !important;
}

/* Мобильные */
@media (max-width: 640px) {
    .ws-skills-block {
        gap: 8px;
    }
    .skills-active-hint {
        font-size: 12px;
        padding: 4px 10px;
    }
}

/* ============================================================
   Кнопка «⚡ Скиллы» — тёмная когда есть активный скилл
   ============================================================ */

#skills-open-btn {
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

/* Активный скилл → тёмная кнопка */
#skills-open-btn.skills-btn-active {
    background: #171717 !important;
    color: #c9ff4a !important;
    border-color: #171717 !important;
    font-weight: 700;
}

#skills-open-btn.skills-btn-active:hover {
    background: #2a2a2a !important;
}

/* Активная плашка скилла — тоже тёмная (опционально) */
.skills-active-hint {
    background: #f5ffd6;
    color: #4a7a00;
    border: 1px solid #c9ff4a;
}

.skills-active-hint::before {
    content: '✅';
    color: #c9ff4a;
}

/* Убираем жёлтое автозаполнение Chrome на названии скилла */
.skill-row-name {
    background: transparent !important;
    color: #171717;
}

.skill-row-active .skill-row-name {
    color: #4a7a00;
    background: transparent !important;
}

/* Если Chrome добавляет свой :autofill-фон */
.skill-row-name:-webkit-autofill,
.skill-row-name:-webkit-autofill:hover,
.skill-row-name:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px transparent inset !important;
    -webkit-text-fill-color: #4a7a00 !important;
    transition: background-color 5000s ease-in-out 0s;
    background: transparent !important;
}

/* ============================================================
   TOP HEADER (замена левого сайдбара, 2026-10-05)
   ============================================================ */

/* Старый боковой сайдбар полностью отключаем */
.sidebar,
.sidebar-admin {
    display: none !important;
}

/* app-layout становится колонкой: хедер сверху, контент снизу */
.app-layout {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
}

/* ---------- HEADER ---------- */
.app-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    background: #171717;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 90;
    border-bottom: 1px solid #2a2a2a;
    min-height: 62px;
}

/* Логотип */
.app-header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    cursor: pointer;
    transition: opacity 0.15s;
}
.app-header-logo:hover { opacity: 0.85; }

.app-header-logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #c9ff4a;
    color: #171717;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 17px;
    flex-shrink: 0;
}
.app-header-logo-mark-admin {
    background: #2a2a2a;
    color: #c9ff4a;
}

.app-header-logo-text-wrap { line-height: 1.05; }
.app-header-logo-text { font-weight: 800; font-size: 15px; }
.app-header-logo-sub  { font-size: 10px; color: #9a9a9a; }

/* Навигация по центру */
.app-header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.app-header-nav::-webkit-scrollbar { display: none; }

.app-header-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 9px;
    color: #cfcfcf;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.app-header-nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}
.app-header-nav-item.active {
    background: rgba(201,255,74,0.12);
    color: #c9ff4a;
}
.app-header-nav-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.85;
}

/* Правый блок */
.app-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    flex-shrink: 0;
}

/* Баланс */
.app-header-balance {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.15;
}
.app-header-balance-value {
    font-weight: 800;
    font-size: 15px;
    color: #c9ff4a;
}
.app-header-balance-hint {
    font-size: 10px;
    color: #9a9a9a;
}

/* Юзер */
.topbar-user .user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
}
.topbar-user .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #c9ff4a;
    color: #171717;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
}
.topbar-user .user-info { line-height: 1.15; }
.topbar-user .user-name  { font-size: 13px; font-weight: 700; color: #fff; }
.topbar-user .user-email { font-size: 11px; color: #9a9a9a; }

/* Админский юзер */
.app-header-user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.15;
}
.app-header-user-label { font-size: 10px; color: #9a9a9a; }
.app-header-user-name  { font-size: 13px; font-weight: 700; color: #fff; }
.app-header-user-email { font-size: 11px; color: #9a9a9a; }

.app-header-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    border-color: #3a3a3a !important;
    color: #cfcfcf !important;
}
.app-header-back-btn:hover {
    background: rgba(255,255,255,0.06) !important;
    color: #fff !important;
}

/* ---------- MAIN ---------- */
.main-content {
    flex: 1;
    width: 100%;
    padding: 24px;
    min-width: 0;
}
.content-shell {
    width: 100%;
    max-width: 100%;
}

/* Внутренний topbar (юзер внутри main) — если где-то ещё остался, скрываем */
.main-content .topbar { display: none !important; }

/* ---------- ОВЕРЛЕЙ ---------- */
.sidebar-overlay { display: none; }
.sidebar-overlay.is-open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 80;
}

/* ============================================================
   МОБИЛЬНЫЙ ХЕДЕР (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
    /* гамбургер показываем */
    .mobile-menu-btn { display: flex !important; }

    /* Прячем текстовую часть логотипа на узком экране */
    .app-header-logo-text-wrap { display: none; }

    /* Навигация — выпадающая панель под хедером */
    .app-header-nav {
        display: none;
        position: absolute;
        top: 62px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        background: #171717;
        padding: 12px;
        border-bottom: 1px solid #2a2a2a;
        z-index: 91;
        max-height: calc(100vh - 62px);
        overflow-y: auto;
    }
    .app-header-nav.is-open { display: flex !important; }

    .app-header-nav-item {
        width: 100%;
        padding: 12px 14px;
        font-size: 15px;
    }

    /* Юзер в хедере — компактнее */
    .topbar-user .user-info { display: none; }
    .topbar-user .btn { padding: 6px 10px; font-size: 12px; }

    .app-header-user { display: none; }

    .app-header-balance-hint { display: none; }

    .app-header { padding: 10px 12px; gap: 10px; }
    .main-content { padding: 14px; }
}

/* ============================================================
   WS-TABS: разделители и контраст (2026-10-05)
   ============================================================ */

.ws-tabs {
    background: #ebe9e3 !important;
    padding: 5px !important;
    gap: 0 !important;
    border-radius: 12px !important;
    border: 1px solid rgba(23,23,23,0.06) !important;
}

.ws-tab {
    position: relative;
    background: transparent;
    border-radius: 9px !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #6b6b6b !important;
    border: none !important;
    transition: all 0.15s ease !important;
}

/* Вертикальный разделитель между неактивными табами */
.ws-tab + .ws-tab::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 22%;
    bottom: 22%;
    width: 1px;
    background: rgba(23,23,23,0.12);
    border-radius: 1px;
    pointer-events: none;
    transition: opacity 0.15s;
}

/* Прячем разделитель у активного и у соседа активного */
.ws-tab.active + .ws-tab::before,
.ws-tab.active::before {
    opacity: 0;
}

/* Hover для неактивных */
.ws-tab:hover:not(:disabled):not(.active) {
    background: rgba(255,255,255,0.7) !important;
    color: #171717 !important;
}

/* Активный таб — тёмный с зелёным текстом и тенью */
.ws-tab.active {
    background: #171717 !important;
    color: #c9ff4a !important;
    box-shadow: 0 2px 8px rgba(23,23,23,0.18) !important;
    z-index: 1;
}

.ws-tab.active:hover {
    background: #171717 !important;
    color: #c9ff4a !important;
}

/* Мобильный — табы плотнее, разделители тоньше */
@media (max-width: 640px) {
    .ws-tab {
        padding: 9px 8px !important;
        font-size: 12px !important;
    }
    .ws-tab + .ws-tab::before {
        top: 28%;
        bottom: 28%;
    }
}

@media (max-width: 420px) {
    .ws-tab {
        padding: 8px 6px !important;
        font-size: 11px !important;
    }
}

/* На десктопе (>900px) модалка выбора «камера/галерея» не нужна */
@media (min-width: 901px) {
    .ws-upload-sheet { display: none !important; }
}

/* ============================================================
   Компактный блок «Идеи и обратная связь» (2026-10-05)
   Перенесён в конец страницы, не на всю ширину
   ============================================================ */

.acc-feedback-panel {
    max-width: 640px;
    margin: 40px auto 24px;
    padding: 24px 28px;
}

.acc-feedback-panel .acc-panel-head {
    padding-bottom: 12px;
    margin-bottom: 14px;
}

.acc-feedback-panel .acc-panel-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.acc-feedback-intro {
    font-size: 13px;
    line-height: 1.5;
    color: #6b6b6b;
    margin: 0 0 16px;
}

/* Компактные поля */
.acc-feedback-panel .acc-feedback-label {
    font-size: 12px;
    margin-bottom: 6px;
}

.acc-feedback-panel .ws-select {
    font-size: 14px;
    padding: 8px 12px;
    min-height: 38px;
}

.acc-feedback-panel .ws-textarea {
    font-size: 14px;
    padding: 10px 12px;
    min-height: 80px;
}

/* Telegram ID — компактнее */
.acc-feedback-panel > .acc-panel-body > div:first-child .ws-input {
    padding: 8px 12px;
    font-size: 14px;
}

/* Футер формы */
.acc-feedback-panel .acc-feedback-footer {
    margin-top: 12px;
    padding-top: 12px;
    font-size: 12px;
}

.acc-feedback-panel .btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* Мобильный */
@media (max-width: 768px) {
    .acc-feedback-panel {
        max-width: none;
        margin: 32px 0 16px;
        padding: 20px 18px;
    }
}

/* === СЕЛЕКТОР КАЧЕСТВА (Sooli, добавлено 2026-10-06) === */
.ws-quality-block {
    margin: 16px 0 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.ws-quality-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 8px;
    font-weight: 600;
}
.ws-quality-chips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.ws-quality-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #fff;
    font-family: inherit;
    font-size: 12px;
}
.ws-quality-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}
.ws-quality-chip.active {
    background: #c8f000;
    border-color: #c8f000;
    color: #171717;
}
.ws-quality-name {
    font-weight: 700;
    font-size: 12px;
    line-height: 1.2;
}
.ws-quality-cost {
    font-size: 10px;
    opacity: 0.75;
    margin-top: 2px;
}
.ws-quality-chip.active .ws-quality-cost {
    opacity: 0.9;
    font-weight: 600;
}

/* === STICKY ПРАВАЯ ПАНЕЛЬ === */
@media (min-width: 1024px) {
    /* .ws-preview-col — sticky задан в базовом блоке */
}

/* === БЛОК ОШИБОК В ПРАВОЙ ПАНЕЛИ === */
.ws-panel-errors {
    background: #ff3b3b;
    color: #fff;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 12px;
    font-weight: 600;
    animation: slideDown 0.2s ease;
    box-shadow: 0 4px 16px rgba(255, 59, 59, 0.3);
}
@keyframes slideDown {
    from { transform: translateY(-8px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}



/* На средних экранах (1100-1300) — уменьшаем отступ */
@media (min-width: 1024px) and (max-width: 1300px) {
    .ws-layout {
        padding-right: 360px;
    }
    .ws-preview-col {
        width: 320px;
    }
}


/* ================================================================
   ПРАВАЯ ПАНЕЛЬ (мобильная версия) — обычный поток
   ================================================================ */
@media (max-width: 1023px) {
    .ws-layout {
        flex-direction: column;
    }
    .ws-preview-col {
        position: static;
        width: 100%;
        flex: 1 1 auto;
    }
}


/* === БЕЙДЖ "До/После" в истории === */
.ws-history-edit-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(23, 23, 23, 0.9);
    color: #c8f000;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    z-index: 2;
    pointer-events: none;
}

/* === Заглушка "Без исходного фото" в compare-модалке === */
.compare-no-reference {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    gap: 6px;
    padding: 20px;
    text-align: center;
}
.compare-no-reference span {
    font-size: 14px;
    font-weight: 600;
    color: #6b6b6b;
}
.compare-no-reference small {
    font-size: 12px;
    color: #999;
}

/* ================================================================
   MAINTENANCE MODAL — уведомление о технических работах
   ================================================================ */
.maintenance-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(23, 23, 23, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: mntFadeIn 0.3s ease;
}
.maintenance-modal-overlay.hidden { display: none; }

@keyframes mntFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.maintenance-modal {
    background: #fff;
    border-radius: 20px;
    max-width: 460px;
    width: 100%;
    padding: 40px 32px 32px;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
    animation: mntSlideUp 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
    position: relative;
}

@keyframes mntSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.maintenance-modal-icon {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 20px;
    animation: mntIconFloat 3s ease-in-out infinite;
    display: inline-block;
}

@keyframes mntIconFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

.maintenance-modal-title {
    font-size: 24px;
    font-weight: 800;
    color: #171717;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    line-height: 1.2;
}

.maintenance-modal-text {
    font-size: 15px;
    color: #4a4a4a;
    line-height: 1.6;
    margin-bottom: 12px;
}

.maintenance-modal-hint {
    font-size: 14px;
    color: #6b6b6b;
    line-height: 1.5;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: #f8f8f4;
    border-radius: 10px;
    font-weight: 500;
}

.maintenance-modal-timer {
    background: #f0fce0;
    border: 1.5px solid #c9ff4a;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.maintenance-modal-timer-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #5a7a30;
    font-weight: 700;
    margin-bottom: 6px;
}

.maintenance-modal-timer-value {
    font-size: 36px;
    font-weight: 900;
    color: #171717;
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
    letter-spacing: 0.02em;
    line-height: 1;
}

.maintenance-modal-btn {
    display: inline-block;
    width: 100%;
    padding: 14px 24px;
    background: #c9ff4a;
    color: #171717;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
}

.maintenance-modal-btn:hover {
    background: #b8ec39;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(201, 255, 74, 0.4);
}

.maintenance-modal-btn:active {
    transform: translateY(0);
}

/* Мобильная адаптация */
@media (max-width: 480px) {
    .maintenance-modal {
        padding: 32px 24px 24px;
        border-radius: 16px;
    }
    .maintenance-modal-icon { font-size: 48px; }
    .maintenance-modal-title { font-size: 20px; }
    .maintenance-modal-text { font-size: 14px; }
    .maintenance-modal-timer-value { font-size: 30px; }
}

/* === AUTH баннер техработ === */
.maintenance-auth-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #fff8e0, #ffeaa7);
    border-bottom: 2px solid #ffb800;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    box-shadow: 0 2px 12px rgba(255, 184, 0, 0.3);
    animation: mntBannerSlide 0.4s ease;
}
@keyframes mntBannerSlide {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}
.maintenance-auth-banner-icon { font-size: 22px; line-height: 1; }
.maintenance-auth-banner-text {
    display: flex; flex-direction: column; gap: 2px;
    font-size: 13px; color: #5a4500; line-height: 1.3;
}
.maintenance-auth-banner-text strong {
    font-weight: 800; font-size: 14px; color: #3e2c00;
}
