:root {
    --background: #f3f5f9;
    --surface: #ffffff;
    --surface-soft: #f7f8fb;
    --border: #e1e5ec;
    --text: #171c2b;
    --muted: #6c7485;
    --primary: #005bff;
    --primary-hover: #0048cc;
    --sidebar: #111827;
    --sidebar-soft: #1d2737;
    --success: #17874b;
    --success-soft: #e9f8f0;
    --danger: #b42318;
    --danger-soft: #fff1f0;
    --radius: 16px;
    --shadow: 0 14px 40px rgba(30, 42, 70, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        Inter,
        Arial,
        sans-serif;
    background: var(--background);
    color: var(--text);
}

button,
input,
textarea {
    font: inherit;
}

.app-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 24px 16px;
    background: var(--sidebar);
    color: #ffffff;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 26px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-icon {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: var(--primary);
    font-size: 23px;
    font-weight: 800;
}

.brand-name {
    font-size: 15px;
    font-weight: 700;
}

.brand-version {
    margin-top: 3px;
    color: #9ca7b8;
    font-size: 12px;
}

.navigation {
    display: grid;
    gap: 6px;
    margin-top: 24px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 46px;
    padding: 0 12px;
    border-radius: 11px;
    color: #c7ced9;
    text-decoration: none;
    transition: 0.15s ease;
}

.nav-item:hover,
.nav-item.active {
    background: var(--sidebar-soft);
    color: #ffffff;
}

.nav-item.active {
    box-shadow: inset 3px 0 0 var(--primary);
}

.nav-item.disabled {
    cursor: default;
}

.nav-icon {
    width: 22px;
    text-align: center;
    font-weight: 700;
}

.soon {
    margin-left: auto;
    color: #8691a3;
    font-size: 10px;
    text-transform: uppercase;
}

.sidebar-bottom {
    margin-top: auto;
}

.main-area {
    min-width: 0;
    padding: 0 34px 50px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 112px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.topbar h1 {
    margin: 4px 0 0;
    font-size: 30px;
    letter-spacing: -0.7px;
}

.eyebrow,
.step-label {
    margin: 0;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 13px;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #25a866;
    box-shadow: 0 0 0 4px rgba(37, 168, 102, 0.12);
}

.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 24px;
    align-items: start;
}

.editor-column,
.result-main {
    display: grid;
    gap: 22px;
}

.result-column,
.product-summary {
    min-width: 0;
}

.panel,
.result-preview {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.panel {
    padding: 25px;
}

.panel-header,
.result-preview-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 23px;
}

.panel-header h2,
.result-preview-header h2 {
    margin: 5px 0 0;
    font-size: 20px;
}

.required-note {
    color: var(--muted);
    font-size: 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 19px;
}

.field.full {
    grid-column: 1 / -1;
}

.field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
}

.field input,
.field textarea {
    width: 100%;
    border: 1px solid #cfd5df;
    border-radius: 10px;
    background: #ffffff;
    color: var(--text);
    outline: none;
    transition: 0.15s ease;
}

.field input {
    height: 45px;
    padding: 0 13px;
}

.field textarea {
    min-height: 90px;
    padding: 12px 13px;
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 91, 255, 0.11);
}

.upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 210px;
    padding: 24px;
    border: 2px dashed #cbd3df;
    border-radius: 14px;
    background: var(--surface-soft);
    text-align: center;
    cursor: pointer;
    transition: 0.15s ease;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: #f3f7ff;
}

.upload-zone input {
    display: none;
}

.upload-icon {
    display: grid;
    width: 46px;
    height: 46px;
    margin-bottom: 13px;
    place-items: center;
    border-radius: 13px;
    background: #e7efff;
    color: var(--primary);
    font-size: 25px;
    font-weight: 700;
}

.upload-title {
    font-weight: 700;
}

.upload-description {
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
}

.selected-file {
    margin: 12px 0 0;
    color: var(--success);
    font-size: 13px;
    font-weight: 600;
}

.result-preview {
    position: sticky;
    top: 24px;
    padding: 25px;
}

.module-list {
    display: grid;
    gap: 10px;
}

.module-item {
    display: grid;
    grid-template-columns: 39px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
}

.module-item.available {
    background: #ffffff;
}

.module-icon {
    display: grid;
    width: 39px;
    height: 39px;
    place-items: center;
    border-radius: 10px;
    background: #e8efff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.module-item strong {
    display: block;
    font-size: 14px;
}

.module-item p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.module-status {
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--success-soft);
    color: var(--success);
    font-size: 10px;
    font-weight: 800;
}

.module-status.muted {
    background: #edf0f4;
    color: #818a99;
}

.generate-button {
    display: flex;
    width: 100%;
    min-height: 49px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 22px;
    border: 0;
    border-radius: 11px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: 0.15s ease;
}

.generate-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.generation-note {
    margin: 13px 5px 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}

.result-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

.generated-content {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.55;
}

.generated-content.description {
    font-size: 15px;
    font-weight: 400;
}

.keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.keyword {
    padding: 8px 11px;
    border: 1px solid #cad8f4;
    border-radius: 999px;
    background: #f2f6ff;
    color: #244a91;
    font-size: 13px;
}

.characteristics {
    border-top: 1px solid var(--border);
}

.characteristic-row {
    display: grid;
    grid-template-columns: minmax(130px, 0.7fr) 1fr;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.characteristic-row span {
    color: var(--muted);
    font-size: 13px;
}

.characteristic-row strong {
    font-size: 14px;
}

.sticky-panel {
    position: sticky;
    top: 24px;
    padding: 0;
    overflow: hidden;
}

.product-image {
    display: block;
    width: 100%;
    height: 330px;
    object-fit: contain;
    padding: 20px;
    background: var(--surface-soft);
}

.image-placeholder {
    display: grid;
    height: 270px;
    place-items: center;
    background: var(--surface-soft);
    color: var(--muted);
}

.summary-content {
    padding: 23px;
}

.summary-content h2 {
    margin: 11px 0 19px;
    font-size: 20px;
    line-height: 1.35;
}

.summary-category {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.product-meta {
    display: grid;
    gap: 11px;
    margin: 0;
}

.product-meta div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.product-meta dt {
    color: var(--muted);
    font-size: 13px;
}

.product-meta dd {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    text-align: right;
}

.link-button {
    margin-top: 22px;
}

.secondary-button {
    padding: 11px 15px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.alert {
    padding: 16px 18px;
    border-radius: 12px;
}

.alert p {
    margin: 6px 0 0;
}

.alert-error {
    border: 1px solid #ffc8c3;
    background: var(--danger-soft);
    color: var(--danger);
}

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

    .result-preview,
    .sticky-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    .navigation {
        grid-template-columns: 1fr 1fr;
    }

    .sidebar-bottom {
        display: none;
    }

    .main-area {
        padding: 0 18px 35px;
    }

    .topbar {
        min-height: 96px;
    }

    .topbar h1 {
        font-size: 24px;
    }

    .status {
        display: none;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field.full {
        grid-column: auto;
    }
}

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

    .panel,
    .result-preview {
        padding: 20px;
    }

    .required-note {
        display: none;
    }
}
.generation-source {
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    color: var(--muted);
    font-size: 13px;
}

.generation-source strong {
    color: var(--text);
}
