/* ============================================================
   Koderra — базовые стили
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-primary:    #2563eb;
    --color-primary-h:  #1d4ed8;
    --color-danger:     #dc2626;
    --color-success:    #16a34a;
    --color-info:       #0891b2;
    --color-bg:         #f8fafc;
    --color-surface:    #ffffff;
    --color-border:     #e2e8f0;
    --color-text:       #1e293b;
    --color-muted:      #64748b;
    --radius:           8px;
    --shadow:           0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---- Layout ---- */

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* ---- Header ---- */

.hdr {
    background: var(--color-surface);
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

.hdr-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    height: 56px;
}

/* Logo */
.hdr-logo {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    letter-spacing: -.4px;
    flex-shrink: 0;
}

/* Search */
.hdr-search {
    flex: 1;
    max-width: 500px;
    position: relative;
    display: flex;
    align-items: center;
}

.hdr-search-ico {
    position: absolute;
    left: .75rem;
    display: flex;
    align-items: center;
    pointer-events: none;
    color: #9ca3af;
}

.hdr-search-ico svg { width: 1rem; height: 1rem; }

.hdr-search-input {
    width: 100%;
    padding: .48rem .85rem .48rem 2.35rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: .875rem;
    color: #111827;
    background: var(--color-bg);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.hdr-search-input::placeholder { color: #9ca3af; }

.hdr-search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 15%, transparent);
}

/* Nav */
.hdr-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
    flex-shrink: 0;
}

.hdr-nav-link {
    padding: .35rem .65rem;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: background .12s, color .12s;
    white-space: nowrap;
}

.hdr-nav-link:hover { background: #f3f4f6; color: #111827; }
.hdr-nav-link--active { color: var(--color-primary); font-weight: 600; }
.hdr-nav-link--active:hover { background: color-mix(in srgb, var(--color-primary) 8%, transparent); }
.hdr-nav-link--admin { color: #7c3aed; }

/* Actions (right side) */
.hdr-actions {
    display: flex;
    align-items: center;
    gap: .25rem;
    margin-left: auto;
    flex-shrink: 0;
}

/* Icon buttons (chat, heart, cart) */
.hdr-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    transition: background .12s, color .12s;
    flex-shrink: 0;
}

.hdr-icon-btn svg { width: 20px; height: 20px; stroke-width: 1.75; }
.hdr-icon-btn:hover { background: #f3f4f6; color: #111827; }
.hdr-icon-btn--active { color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 8%, transparent); }

.hdr-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    background: #ef4444;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--color-surface);
    box-sizing: border-box;
}

/* Dropdown wrapper */
.hdr-dropdown-wrap {
    position: relative;
    flex-shrink: 0;
}

/* Balance button */
.hdr-balance-btn {
    display: flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .65rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 600;
    color: #16a34a;
    cursor: pointer;
    transition: background .12s;
    white-space: nowrap;
}

.hdr-balance-btn:hover { background: #f0fdf4; }

/* Profile button */
.hdr-profile-btn {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .55rem .3rem .3rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .12s;
    color: #374151;
}

.hdr-profile-btn:hover { background: #f3f4f6; }

.hdr-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hdr-profile-name {
    font-size: .85rem;
    font-weight: 500;
    color: #111827;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hdr-chevron { display: flex; align-items: center; color: #9ca3af; }
.hdr-chevron svg { width: 14px; height: 14px; }

/* Dropdown panel */
.hdr-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 200px;
    background: var(--color-surface);
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    padding: .4rem;
    z-index: 200;
}

.hdr-dropdown--right { left: auto; right: 0; }
.hdr-dropdown--open { display: block; }

.hdr-dropdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .45rem .65rem;
    font-size: .82rem;
}

.hdr-dropdown-lbl {
    display: flex;
    align-items: center;
    gap: .35rem;
    color: #6b7280;
}

.hdr-dropdown-lbl svg { width: .85rem; height: .85rem; opacity: .7; }

.hdr-dropdown-val { font-weight: 600; color: #111827; }
.hdr-dropdown-val--green { color: #16a34a; }

.hdr-dropdown-divider {
    height: 1px;
    background: #f3f4f6;
    margin: .3rem .25rem;
}

.hdr-dropdown-action {
    display: block;
    padding: .45rem .65rem;
    font-size: .82rem;
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
    border-radius: 6px;
    transition: background .1s;
}

.hdr-dropdown-action:hover { background: #f3f4f6; }

.hdr-dropdown-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    padding: .45rem .65rem;
    font-size: .845rem;
    font-weight: 400;
    color: #374151;
    text-decoration: none;
    border-radius: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background .1s;
    box-sizing: border-box;
}

.hdr-dropdown-item svg { width: .95rem; height: .95rem; opacity: .65; flex-shrink: 0; }
.hdr-dropdown-item:hover { background: #f3f4f6; color: #111827; }
.hdr-dropdown-item--danger { color: #dc2626; }
.hdr-dropdown-item--danger:hover { background: #fef2f2; color: #dc2626; }

/* Login button */
.hdr-btn-login {
    padding: .4rem 1rem;
    background: var(--color-primary);
    color: #fff;
    font-size: .875rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: opacity .15s;
    white-space: nowrap;
}

.hdr-btn-login:hover { opacity: .88; }

.nav-user {
    font-size: .875rem;
    color: var(--color-muted);
}

/* ---- Footer ---- */

.ftr {
    background: #0f172a;
    color: #94a3b8;
    margin-top: 4rem;
}

.ftr-main {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
    gap: 2.5rem 2rem;
    padding: 3rem 0 2.5rem;
}

/* Brand column */
.ftr-logo {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #f8fafc;
    text-decoration: none;
    letter-spacing: -.3px;
    margin-bottom: .85rem;
}

.ftr-desc {
    font-size: .82rem;
    line-height: 1.6;
    color: #64748b;
    margin: 0 0 1.25rem;
    max-width: 220px;
}

.ftr-social {
    display: flex;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

.ftr-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #1e293b;
    color: #94a3b8;
    text-decoration: none;
    transition: background .15s, color .15s;
}

.ftr-social-btn svg { width: 17px; height: 17px; }
.ftr-social-btn:hover { background: #334155; color: #f8fafc; }
.ftr-social-btn--chat { color: #38bdf8; }
.ftr-social-btn--chat:hover { color: #7dd3fc; }

.ftr-copy {
    font-size: .78rem;
    color: #475569;
    margin: 0;
}

/* Columns */
.ftr-col-title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #f8fafc;
    margin-bottom: 1rem;
}

.ftr-links {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.ftr-link {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    color: #64748b;
    text-decoration: none;
    transition: color .12s;
    line-height: 1.3;
}

.ftr-link:hover { color: #f8fafc; }

.ftr-link--highlight {
    color: #94a3b8;
    font-weight: 500;
}

.ftr-link--highlight:hover { color: #fff; }

.ftr-link-ico {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: #f97316;
}

.ftr-link-ico svg { width: 1rem; height: 1rem; }

/* Contacts */
.ftr-contacts {
    margin-top: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.ftr-contact-link {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .79rem;
    color: #64748b;
    text-decoration: none;
    transition: color .12s;
}

.ftr-contact-link svg { width: .85rem; height: .85rem; opacity: .7; flex-shrink: 0; }
.ftr-contact-link:hover { color: #f8fafc; }

/* Sub-footer */
.ftr-sub {
    border-top: 1px solid #1e293b;
    padding: 1rem 0;
}

.ftr-sub-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.ftr-disclaimer {
    font-size: .75rem;
    color: #334155;
}

.ftr-sub-links {
    display: flex;
    gap: 1.25rem;
}

.ftr-sub-link {
    font-size: .75rem;
    color: #334155;
    text-decoration: none;
    transition: color .12s;
}

.ftr-sub-link:hover { color: #64748b; }

/* Responsive */
@media (max-width: 900px) {
    .ftr-main {
        grid-template-columns: 1fr 1fr;
    }
    .ftr-col--brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .ftr-main {
        grid-template-columns: 1fr;
        gap: 1.75rem;
        padding: 2rem 0 1.5rem;
    }
    .ftr-col--brand { grid-column: auto; }
    .ftr-sub-inner { flex-direction: column; align-items: flex-start; gap: .5rem; }
}

/* ---- Alerts ---- */

.alert {
    padding: .75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: .9rem;
}

.alert-error   { background: #fef2f2; color: var(--color-danger);  border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: var(--color-success); border: 1px solid #bbf7d0; }
.alert-info    { background: #ecfeff; color: var(--color-info);    border: 1px solid #a5f3fc; }

/* ---- Buttons ---- */

.btn {
    display: inline-block;
    padding: .6rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: .95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    width: 100%;
    text-align: center;
}

.btn-primary:hover { background: var(--color-primary-h); }

.btn-link {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: .875rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

/* ---- Forms ---- */

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: .875rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: .4rem;
}

.form-group input {
    width: 100%;
    padding: .6rem .875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color .15s, box-shadow .15s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

/* ---- Auth page ---- */

.auth-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 3rem;
}

.auth-box {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
}

.auth-box h1 {
    font-size: 1.4rem;
    margin-bottom: .5rem;
}

.auth-hint {
    font-size: .9rem;
    color: var(--color-muted);
    margin-bottom: 1.5rem;
}

.auth-hint a {
    color: var(--color-primary);
}

.auth-form {
    margin-bottom: 1rem;
}

.resend-form {
    text-align: center;
}

/* ---- Navigation ---- */

.nav-link {
    color: var(--color-muted);
    text-decoration: none;
    font-size: .9rem;
}

.nav-link:hover { color: var(--color-primary); }

.btn-nav {
    background: var(--color-primary);
    color: #fff;
    padding: .4rem 1rem;
    border-radius: var(--radius);
    font-size: .875rem;
    text-decoration: none;
    font-weight: 500;
}

.btn-nav:hover { background: var(--color-primary-h); color: #fff; }

.btn-danger {
    background: var(--color-danger);
    color: #fff;
    padding: .6rem 1.25rem;
    border-radius: var(--radius);
    font-size: .95rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
}

/* ════════════════════════════════════════════════════════════════
   HOME PAGE
   ════════════════════════════════════════════════════════════════ */

/* ── Shared buttons ── */
.home-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .75rem 1.6rem;
    border-radius: 999px;
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .15s, transform .12s;
    cursor: pointer;
    border: none;
}
.home-btn svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; }
.home-btn:hover { opacity: .88; transform: translateY(-1px); }
.home-btn--primary {
    background: var(--color-primary);
    color: #fff;
}
.home-btn--outline {
    background: transparent;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
}
.home-btn--white {
    background: #fff;
    color: #0f172a;
}

/* ── Section shared ── */
.home-section { padding: 4.5rem 0; }
.home-section--gray { background: #f8fafc; }
.home-section-head { text-align: center; margin-bottom: 2.75rem; }
.home-section-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: .5rem;
    letter-spacing: -.02em;
}
.home-section-sub {
    font-size: 1rem;
    color: var(--color-muted);
}

/* ── Hero ── */
.home-hero {
    background: #0f172a;
    padding: 5rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.home-hero::before {
    content: '';
    position: absolute;
    top: -120px; left: 50%; transform: translateX(-50%);
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(99,102,241,.18) 0%, transparent 65%);
    pointer-events: none;
}
.home-hero-inner { position: relative; z-index: 1; }
.home-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(99,102,241,.15);
    color: #a5b4fc;
    border: 1px solid rgba(99,102,241,.3);
    border-radius: 999px;
    padding: .3rem .9rem;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .02em;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}
.home-hero-badge svg { width: .9rem; height: .9rem; }
.home-hero-title {
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 900;
    line-height: 1.1;
    color: #f1f5f9;
    margin-bottom: 1.25rem;
    letter-spacing: -.03em;
}
.home-hero-accent {
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.home-hero-sub {
    font-size: 1.1rem;
    color: #94a3b8;
    max-width: 560px;
    margin: 0 auto 2rem;
    line-height: 1.65;
}
.home-hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}
.home-hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 1.25rem;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 999px;
    padding: .65rem 1.75rem;
}
.home-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .1rem;
}
.home-hero-stat strong {
    font-size: 1.1rem;
    font-weight: 800;
    color: #f1f5f9;
}
.home-hero-stat span {
    font-size: .72rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.home-hero-stat-sep {
    width: 1px;
    height: 2rem;
    background: rgba(255,255,255,.1);
}

/* ── Tagline strip ── */
.home-tagline {
    background: var(--color-primary);
    padding: .85rem 0;
}
.home-tagline-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem 2.5rem;
}
.home-tagline-inner span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: #fff;
    font-size: .88rem;
    font-weight: 600;
}
.home-tagline-inner svg { width: 1rem; height: 1rem; opacity: .85; }

/* ── Steps ── */
.home-steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
    justify-content: center;
}
.home-step {
    flex: 1;
    max-width: 220px;
    text-align: center;
    padding: .5rem 1rem;
}
.home-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: .85rem;
    font-weight: 800;
    margin-bottom: .75rem;
}
.home-step-icon {
    width: 2.8rem;
    height: 2.8rem;
    margin: 0 auto .75rem;
    color: var(--color-primary);
    opacity: .75;
}
.home-step-icon svg { width: 100%; height: 100%; }
.home-step h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .4rem;
    color: var(--color-text);
}
.home-step p {
    font-size: .85rem;
    color: var(--color-muted);
    line-height: 1.55;
}
.home-step-arrow {
    flex-shrink: 0;
    align-self: center;
    color: var(--color-border);
    padding-bottom: 2rem;
}
.home-step-arrow svg { width: 1.5rem; height: 1.5rem; }

/* ── Solution types ── */
.home-types {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 1rem;
}
.home-type {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.4rem 1.25rem;
    transition: box-shadow .15s, transform .12s;
}
.home-type:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.07);
    transform: translateY(-2px);
}
.home-type-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .85rem;
}
.home-type-icon svg { width: 1.4rem; height: 1.4rem; }
.home-type-icon--purple { background: #ede9fe; color: #7c3aed; }
.home-type-icon--blue   { background: #dbeafe; color: #1d4ed8; }
.home-type-icon--green  { background: #dcfce7; color: #15803d; }
.home-type-icon--sky    { background: #e0f2fe; color: #0369a1; }
.home-type-icon--indigo { background: #e0e7ff; color: #4338ca; }
.home-type-icon--orange { background: #ffedd5; color: #c2410c; }
.home-type-icon--red    { background: #fee2e2; color: #b91c1c; }
.home-type-icon--teal   { background: #ccfbf1; color: #0f766e; }
.home-type h4 {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: .35rem;
    color: var(--color-text);
}
.home-type p {
    font-size: .82rem;
    color: var(--color-muted);
    line-height: 1.5;
}

/* ── Featured solutions grid (horizontal cards 2-col) ── */
.home-feat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.home-feat-card {
    display: flex;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s, transform .12s;
    min-height: 148px;
}
.home-feat-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
    transform: translateY(-2px);
}
.home-feat-img {
    flex-shrink: 0;
    width: 190px;
    overflow: hidden;
    background: #f1f5f9;
    position: relative;
}
.home-feat-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.home-feat-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
}
.home-feat-img-placeholder svg { width: 2.5rem; height: 2.5rem; }
.home-feat-body {
    flex: 1;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
    min-width: 0;
}
.home-feat-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
}
.home-feat-badge {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 600;
    white-space: nowrap;
}
.home-feat-badge svg { width: .7rem; height: .7rem; flex-shrink: 0; }
.home-feat-badge--cat    { background: #f1f5f9; color: #475569; }
.home-feat-badge--auto   { background: #dbeafe; color: #1d4ed8; }
.home-feat-badge--manual { background: #fef9c3; color: #854d0e; }
.home-feat-badge--consult {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    font-size: .72rem;
    padding: .2rem .65rem;
    gap: .25rem;
    box-shadow: 0 2px 8px rgba(99,102,241,.35);
}
.home-feat-badge--consult svg { width: .8rem; height: .8rem; }
.home-feat-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}
.home-feat-desc {
    font-size: .8rem;
    color: var(--color-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    flex: 1;
}
.home-feat-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: auto;
    padding-top: .4rem;
}
.home-feat-seller {
    display: flex;
    align-items: center;
    gap: .4rem;
    min-width: 0;
    overflow: hidden;
}
.home-feat-seller span {
    font-size: .75rem;
    color: var(--color-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.home-feat-avatar {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    object-fit: cover;
}
.home-feat-avatar--img { background: transparent; border-radius: 50%; }
.home-feat-price-block {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-shrink: 0;
    flex-wrap: nowrap;
}
.home-feat-price-new {
    font-size: .95rem;
    font-weight: 800;
    color: var(--color-primary);
    white-space: nowrap;
    letter-spacing: -.01em;
}
.home-feat-price-old {
    font-size: .75rem;
    color: #9ca3af;
    text-decoration: line-through;
    white-space: nowrap;
}
.home-feat-discount {
    display: inline-flex;
    align-items: center;
    padding: .15rem .38rem;
    border-radius: 5px;
    font-size: .65rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}
.home-catalog-link {
    text-align: center;
    margin-top: 2.5rem;
}
@media (max-width: 720px) {
    .home-feat-grid { grid-template-columns: 1fr; }
    .home-feat-img  { width: 130px; }
}

/* ── Use-cases ── */
.home-cases {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.home-case {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.2rem 1.25rem;
}
.home-case-tag {
    display: inline-block;
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
    color: var(--color-primary);
    border-radius: 999px;
    padding: .15rem .7rem;
    font-size: .75rem;
    font-weight: 700;
    margin-bottom: .6rem;
    letter-spacing: .02em;
}
.home-case p {
    font-size: .875rem;
    color: var(--color-muted);
    line-height: 1.55;
    margin: 0;
}

/* ── Authors CTA ── */
.home-authors {
    background: #0f172a;
    padding: 5rem 0;
}
.home-authors-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.home-authors-label {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: #a5b4fc;
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 1rem;
}
.home-authors-label svg { width: 1rem; height: 1rem; }
.home-authors-text h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #f1f5f9;
    margin-bottom: .85rem;
    letter-spacing: -.02em;
    line-height: 1.2;
}
.home-authors-text p {
    font-size: 1rem;
    color: #94a3b8;
    line-height: 1.65;
    margin-bottom: 1.5rem;
}
.home-authors-list {
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.home-authors-list li {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
    color: #cbd5e1;
}
.home-authors-list svg { width: 1rem; height: 1rem; color: #818cf8; flex-shrink: 0; }
.home-authors-visual { display: flex; justify-content: center; }
.home-authors-card {
    background: #1e293b;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 1rem;
    padding: 1.5rem;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 25px 50px rgba(0,0,0,.4);
}
.home-authors-card-header {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: #e2e8f0;
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.home-authors-card-header svg { width: 1.3rem; height: 1.3rem; color: #818cf8; }
.home-authors-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .55rem 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
    font-size: .875rem;
}
.home-authors-card-row span { color: #64748b; }
.home-authors-card-row strong { color: #e2e8f0; font-weight: 700; }
.home-authors-card-green { color: #4ade80 !important; }
.home-authors-card-footer {
    margin-top: 1rem;
    font-size: .78rem;
    color: #475569;
    text-align: center;
}

/* ── USPs ── */
.home-usps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
}
.home-usp {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}
.home-usp-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    color: var(--color-primary);
}
.home-usp-icon svg { width: 100%; height: 100%; }
.home-usp h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .5rem;
    color: var(--color-text);
}
.home-usp p {
    font-size: .875rem;
    color: var(--color-muted);
    line-height: 1.6;
}

/* ── Home responsive ── */
@media (max-width: 900px) {
    .home-authors-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .home-authors-visual { display: none; }
}
@media (max-width: 720px) {
    .home-hero { padding: 3.5rem 0 3rem; }
    .home-steps {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    .home-step-arrow { display: none; }
    .home-step { max-width: 100%; }
    .home-hero-stats { flex-wrap: wrap; gap: .75rem 1.25rem; }
    .home-section-title { font-size: 1.4rem; }
    .home-authors-text h2 { font-size: 1.5rem; }
}

/* ---- Features (legacy, kept for back-compat) ---- */
.features { padding: 2rem 0 4rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.feature-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 1.75rem 1.5rem; }
.feature-icon { font-size: 2rem; margin-bottom: .75rem; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.feature-card p { color: var(--color-muted); font-size: .9rem; line-height: 1.5; }

/* ---- Page header ---- */

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.page-header h1 { font-size: 1.75rem; }

.page-sub {
    color: var(--color-muted);
    margin-top: .35rem;
}

/* ---- Catalog placeholder ---- */

.catalog-placeholder {
    text-align: center;
    padding: 4rem 1rem;
}

.placeholder-icon { font-size: 3rem; margin-bottom: 1rem; }

.catalog-placeholder h2 { margin-bottom: .75rem; }

.catalog-placeholder p {
    color: var(--color-muted);
    margin-bottom: 1.5rem;
}

/* ---- Profile ---- */

.profile-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 560px;
}

.profile-row {
    display: flex;
    align-items: center;
    padding: .875rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    gap: 1rem;
}

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

.profile-label {
    min-width: 140px;
    font-size: .875rem;
    color: var(--color-muted);
}

.profile-value { font-size: .95rem; }

.badge {
    display: inline-block;
    background: #e0e7ff;
    color: #3730a3;
    border-radius: 4px;
    padding: .15rem .5rem;
    font-size: .8rem;
    font-weight: 500;
}

/* ---- Form card ---- */

.form-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 640px;
}

textarea {
    width: 100%;
    padding: .6rem .875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-surface);
    resize: vertical;
    transition: border-color .15s, box-shadow .15s;
}

textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.field-hint {
    font-size: .8rem;
    color: var(--color-muted);
    margin-top: .35rem;
}

.required { color: var(--color-danger); }

.form-actions {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
}

/* ---- Dashboard layout ---- */

.dashboard-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    align-items: start;
}

.dashboard-sidebar {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.seller-info {
    display: flex;
    align-items: center;
    gap: .875rem;
    padding: 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.seller-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.seller-meta {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 0;
}

.seller-meta strong {
    font-size: .875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.seller-status {
    font-size: .75rem;
    padding: .1rem .4rem;
    border-radius: 4px;
    font-weight: 500;
    display: inline-block;
}

.status-active    { background: #dcfce7; color: #166534; }
.status-pending   { background: #fef9c3; color: #854d0e; }
.status-rejected  { background: #fee2e2; color: #991b1b; }
.status-suspended { background: #f3f4f6; color: #374151; }

.dashboard-nav { padding: .5rem 0; }

.dashboard-nav-item {
    display: block;
    padding: .6rem 1.25rem;
    font-size: .9rem;
    color: var(--color-text);
    text-decoration: none;
    transition: background .1s;
}

.dashboard-nav-item:hover,
.dashboard-nav-item.active {
    background: #f1f5f9;
    color: var(--color-primary);
}

.nav-badge {
    background: var(--color-primary, #6366f1);
    color: #fff;
    border-radius: 1rem;
    padding: .1rem .45rem;
    font-size: .7rem;
    font-weight: 600;
    flex-shrink: 0;
}

.dashboard-main h1 { font-size: 1.75rem; margin-bottom: .5rem; }

/* ===== CHAT MESSENGER LAYOUT ===== */
.chat-layout {
    display: flex;
    flex: 1;
    min-width: 0;
    height: calc(100vh - 100px);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: .85rem;
    overflow: hidden;
    background: #fff;
}

.chat-list-panel {
    width: 280px;
    flex-shrink: 0;
    border-right: 1px solid var(--color-border, #e5e7eb);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
}

.chat-list-header {
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.chat-list-item {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .65rem .85rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    transition: background .1s;
    overflow: hidden;
}
.chat-list-item:last-child { border-bottom: none; }
.chat-list-item:hover { background: #f9fafb; }
.chat-list-item--active { background: #eef2ff; }
.chat-list-item--unread { background: #f0fdf4; }

.chat-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--color-primary, #6366f1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .95rem;
    flex-shrink: 0;
}

.chat-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.chat-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .4rem;
}
.chat-item-name {
    font-weight: 600;
    font-size: .875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.chat-item-time {
    font-size: .72rem;
    color: var(--color-muted, #6b7280);
    white-space: nowrap;
    flex-shrink: 0;
}
.chat-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .4rem;
}
.chat-item-preview {
    font-size: .78rem;
    color: var(--color-muted, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.chat-unread-badge {
    background: #22c55e;
    color: #fff;
    border-radius: 1rem;
    padding: .1rem .4rem;
    font-size: .68rem;
    font-weight: 700;
    flex-shrink: 0;
}

.chat-main-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-empty-state {
    align-items: center;
    justify-content: center;
    color: var(--color-muted, #9ca3af);
    font-size: .95rem;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1.1rem;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    flex-shrink: 0;
    background: #fff;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.chat-date-divider {
    text-align: center;
    margin: .5rem 0;
}
.chat-date-divider span {
    display: inline-block;
    background: #f3f4f6;
    color: var(--color-muted, #6b7280);
    font-size: .72rem;
    padding: .2rem .75rem;
    border-radius: 1rem;
}

.chat-msg-system {
    text-align: center;
    font-size: .78rem;
    color: var(--color-muted, #6b7280);
    background: #f3f4f6;
    border-radius: 1rem;
    padding: .35rem .85rem;
    align-self: center;
    max-width: 80%;
}

.chat-msg-row {
    display: flex;
    align-items: flex-end;
    gap: .5rem;
}
.chat-msg-row--mine { flex-direction: row-reverse; }

.chat-msg-avatar {
    width: 1.75rem;
    height: 1.75rem;
    font-size: .72rem;
    flex-shrink: 0;
}

.chat-bubble-wrap {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    max-width: 70%;
}

.chat-sender-name {
    font-size: .72rem;
    color: var(--color-muted, #6b7280);
    padding-left: .25rem;
}

.chat-bubble {
    padding: .5rem .75rem .4rem;
    border-radius: 1rem;
    font-size: .9rem;
    line-height: 1.5;
    word-break: break-word;
    display: inline-flex;
    flex-direction: column;
    max-width: 100%;
}
.chat-bubble--mine {
    background: var(--color-primary, #6366f1);
    color: #fff;
    border-bottom-right-radius: .25rem;
    align-self: flex-end;
}
.chat-bubble--theirs {
    background: #f3f4f6;
    color: var(--color-text, #111);
    border-bottom-left-radius: .25rem;
    align-self: flex-start;
}

/* Текст внутри пузыря */
.chat-bubble-text {
    display: block;
    white-space: pre-wrap;
}

/* Мета-строка: время + галочки, прижата вправо и вниз */
.chat-bubble-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .2rem;
    margin-top: .15rem;
    line-height: 1;
    align-self: flex-end;
}
.chat-bubble-meta--theirs {
    justify-content: flex-end;
}

.chat-time-inline {
    font-size: .65rem;
    opacity: .7;
    white-space: nowrap;
}

/* Галочки статуса */
.chat-ticks {
    display: inline-flex;
    align-items: center;
    width: 1.1rem;
    height: .75rem;
}
.chat-ticks svg {
    width: 100%;
    height: 100%;
}
.chat-ticks--sent    { color: rgba(255,255,255,.55); }
.chat-ticks--delivered { color: rgba(255,255,255,.65); }
.chat-ticks--read    { color: #4ade80; }

/* Для входящих сообщений — тёмное время */
.chat-bubble--theirs .chat-time-inline {
    color: var(--color-muted, #9ca3af);
    opacity: 1;
}

.chat-empty-msg {
    text-align: center;
    color: var(--color-muted, #9ca3af);
    font-size: .875rem;
    padding: 2rem 0;
}

.chat-input-area {
    border-top: 1px solid var(--color-border, #e5e7eb);
    padding: .65rem .85rem;
    flex-shrink: 0;
    background: #fff;
}

.chat-send-form {
    display: flex;
    align-items: flex-end;
    gap: .5rem;
}

.chat-textarea {
    flex: 1;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: .65rem;
    padding: .55rem .85rem;
    font-size: .9rem;
    resize: none;
    line-height: 1.45;
    min-height: 2.5rem;
    max-height: 7.5rem;
    overflow-y: auto;
    font-family: inherit;
    outline: none;
    transition: border-color .15s;
}
.chat-textarea:focus { border-color: var(--color-primary, #6366f1); }

.chat-send-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--color-primary, #6366f1);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s;
}
.chat-send-btn:hover { background: #4f46e5; }

/* ── Hover-кнопки действий над сообщением ───────────────────────────────── */
.chat-msg-row {
    position: relative;
    align-items: flex-end;
}
/* Кнопки действий рядом с пузырём (не поверх текста) */
.chat-msg-actions {
    display: none;
    align-items: center;
    gap: .15rem;
    align-self: center;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: .55rem;
    padding: .15rem .25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    white-space: nowrap;
}
.chat-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: .3rem;
    border-radius: .35rem;
    color: var(--color-muted, #6b7280);
    display: flex;
    align-items: center;
    transition: background .1s, color .1s;
}
.chat-action-btn svg { width: 1rem; height: 1rem; }
.chat-action-btn:hover { background: #f3f4f6; color: var(--color-text, #111); }
.chat-action-btn--danger:hover { background: #fee2e2; color: #dc2626; }

/* ── Форма редактирования ────────────────────────────────────────────────── */
.chat-edit-form {
    display: block;
    min-width: 200px;
    width: 100%;
    margin-bottom: .2rem;
}
.chat-edit-wrap {
    display: flex;
    align-items: flex-end;
    gap: .35rem;
}
.chat-edit-textarea {
    flex: 1;
    min-width: 0;
    padding: .45rem .65rem;
    border: 1.5px solid var(--color-primary, #6366f1);
    border-radius: .65rem;
    font-size: .875rem;
    font-family: inherit;
    resize: none;
    outline: none;
    line-height: 1.45;
    background: #fff;
}
.chat-edit-btns {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    flex-shrink: 0;
}
.chat-edit-apply {
    background: var(--color-primary, #6366f1);
    color: #fff;
    border: none;
    border-radius: .4rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.chat-edit-apply svg { width: 1rem; height: 1rem; }
.chat-edit-apply:hover { background: #4f46e5; }
.chat-edit-discard {
    background: none;
    color: var(--color-muted, #9ca3af);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: .4rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.chat-edit-discard svg { width: .9rem; height: .9rem; }
.chat-edit-discard:hover { background: #f3f4f6; color: #374151; }
.chat-edit-hint {
    font-size: .68rem;
    color: var(--color-muted, #9ca3af);
    margin-top: .25rem;
    padding-left: .25rem;
}

/* ── Пометка «изм.» ──────────────────────────────────────────────────────── */
.chat-edited {
    font-size: .62rem;
    opacity: .65;
    font-style: italic;
}

/* ── Удалённое сообщение ─────────────────────────────────────────────────── */
.chat-bubble--deleted {
    background: #f3f4f6;
    color: var(--color-muted, #9ca3af);
    font-style: italic;
    border-radius: 1rem;
    border-bottom-left-radius: .25rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem .75rem .4rem;
}
.chat-deleted-icon { font-style: normal; font-size: .9rem; }

/* ── Цитата (ответ) ──────────────────────────────────────────────────────── */
.chat-quote {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    padding: .35rem .6rem;
    border-radius: .5rem;
    margin-bottom: .35rem;
    cursor: pointer;
    max-width: 100%;
    overflow: hidden;
}
.chat-quote--mine {
    background: rgba(255,255,255,.18);
    border-left: 3px solid rgba(255,255,255,.6);
}
.chat-quote--theirs {
    background: rgba(99,102,241,.07);
    border-left: 3px solid var(--color-primary, #6366f1);
}
.chat-quote-sender {
    font-size: .72rem;
    font-weight: 700;
    opacity: .9;
}
.chat-quote-text {
    font-size: .78rem;
    opacity: .75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Reply bar (над инпутом) ─────────────────────────────────────────────── */
.reply-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .75rem;
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    background: #f9fafb;
    border-top-left-radius: .5rem;
    border-top-right-radius: .5rem;
}
.reply-bar-icon {
    width: 1.1rem;
    height: 1.1rem;
    color: var(--color-primary, #6366f1);
    flex-shrink: 0;
}
.reply-bar-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .05rem;
    padding-left: .35rem;
    border-left: 2.5px solid var(--color-primary, #6366f1);
}
.reply-bar-name {
    font-size: .75rem;
    font-weight: 700;
    color: var(--color-primary, #6366f1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.reply-bar-text {
    font-size: .78rem;
    color: var(--color-muted, #6b7280);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.reply-bar-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-muted, #9ca3af);
    padding: .2rem;
    border-radius: .35rem;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.reply-bar-close svg { width: 1.1rem; height: 1.1rem; }
.reply-bar-close:hover { color: #374151; background: #e5e7eb; }

/* ---- Stats grid ---- */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
}

.stat-label {
    font-size: .8rem;
    color: var(--color-muted);
    margin-top: .25rem;
}

.dashboard-actions { margin-top: 1rem; }


/* ---- Cart page ---- */

.cart-empty {
    text-align: center;
    padding: 4rem 1rem;
}

.cart-empty h2 { margin: .75rem 0 .5rem; }
.cart-empty p  { color: var(--color-muted); }

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: .75rem 1rem;
    position: relative;
}

.cart-item-info {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.cart-item-type {
    font-size: .75rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 500;
}

.cart-item-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
}

.cart-item-title:hover { color: var(--color-primary); }

.cart-item-seller {
    font-size: .8rem;
    color: var(--color-muted);
}

.cart-item-seller a { color: var(--color-primary); text-decoration: none; }

.cart-item-controls {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .5rem;
}

.qty-form { display: inline-flex; }

.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.qty-btn {
    background: #f8fafc;
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--color-text);
    transition: background .1s;
}

.qty-btn:hover:not(:disabled) { background: #e2e8f0; }
.qty-btn:disabled { color: var(--color-muted); cursor: default; }

.qty-value {
    width: 36px;
    text-align: center;
    font-size: .9rem;
    font-weight: 600;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    line-height: 32px;
}

.cart-item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .2rem;
}

.price-unit {
    font-size: .8rem;
    color: var(--color-muted);
}

.price-total {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
}

.cart-item-notes {
    grid-column: 1;
    grid-row: 2;
}

.notes-input {
    width: 100%;
    padding: .45rem .75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: .85rem;
    font-family: inherit;
    color: var(--color-text);
    background: #f8fafc;
    resize: none;
}

.notes-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

.notes-save {
    margin-top: .35rem;
    background: none;
    border: none;
    font-size: .8rem;
    color: var(--color-primary);
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.cart-item-remove {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--color-muted);
    cursor: pointer;
    font-size: .9rem;
    padding: .25rem;
    border-radius: 4px;
    transition: color .1s, background .1s;
}

.remove-btn:hover { color: var(--color-danger); background: #fef2f2; }

/* ---- Cart sidebar / summary ---- */

.cart-aside { position: sticky; top: 1.5rem; }

.cart-summary-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.cart-summary-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cart-summary-rows {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    font-size: .85rem;
}

.summary-row-name {
    color: var(--color-muted);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.summary-row-price { font-weight: 500; flex-shrink: 0; }

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    margin-bottom: 1.25rem;
}

.cart-total strong { font-size: 1.1rem; }

.checkout-btn {
    display: block;
    text-align: center;
    margin-bottom: 1rem;
}

.cart-guarantees {
    list-style: none;
    font-size: .8rem;
    color: var(--color-muted);
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.cart-guarantees li::before { content: '✓ '; color: var(--color-success); }

/* ---- Checkout page ---- */

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    align-items: start;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
}

.checkout-item:last-of-type { border-bottom: none; }

.checkout-item-info {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    flex: 1;
}

.checkout-item-notes {
    font-size: .8rem;
    color: var(--color-muted);
    font-style: italic;
    margin-top: .15rem;
}

.checkout-item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .2rem;
    flex-shrink: 0;
}

.checkout-form { margin-top: 1.5rem; }

.checkout-info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    padding: .875rem 1rem;
    font-size: .875rem;
    color: #1e40af;
    margin-bottom: 1.5rem;
}

.cancel-link {
    display: inline-block;
    margin-top: 1rem;
    font-size: .875rem;
    color: var(--color-muted);
    text-decoration: none;
}

.cancel-link:hover { color: var(--color-primary); }

/* ---- Order success ---- */

.order-success {
    max-width: 600px;
    margin: 2rem auto;
    text-align: center;
}

.success-icon { font-size: 3rem; margin-bottom: 1rem; }

.order-success h1 { font-size: 1.75rem; margin-bottom: .5rem; }

.order-success-sub {
    color: var(--color-muted);
    margin-bottom: 2rem;
}

.order-items-summary {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: left;
    margin-bottom: 1.5rem;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    padding: .5rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: .9rem;
}

.order-summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: .75rem;
    font-size: 1rem;
}

.order-notes {
    font-size: .875rem;
    color: var(--color-muted);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.order-success-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

/* ---- Seller sidebar ---- */

.seller-sidebar {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.seller-sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.seller-sidebar-title {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-muted);
}

.seller-sidebar-nav { list-style: none; padding: .5rem 0; }

.seller-sidebar-nav li { display: block; }

.sidebar-link {
    display: block;
    padding: .6rem 1.25rem;
    font-size: .9rem;
    color: var(--color-text);
    text-decoration: none;
    transition: background .1s;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: #f1f5f9;
    color: var(--color-primary);
}

/* ---- Solutions table ---- */

.solutions-table { display: flex; flex-direction: column; gap: .75rem; }

.solution-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}

.solution-row-info { flex: 1; display: flex; flex-direction: column; gap: .25rem; }

.solution-row-title {
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
}

.solution-row-title:hover { color: var(--color-primary); }

.solution-row-type {
    font-size: .75rem;
    color: var(--color-muted);
}

.solution-row-price {
    font-weight: 600;
    font-size: .95rem;
    flex-shrink: 0;
}

.solution-row-status { flex-shrink: 0; }

.status-badge {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 4px;
    font-size: .75rem;
    font-weight: 500;
}

.status-active   { background: #dcfce7; color: #166534; }
.status-draft    { background: #f3f4f6; color: #374151; }
.status-pending  { background: #fef9c3; color: #854d0e; }
.status-archived { background: #f3f4f6; color: #6b7280; }

/* ---- form-input (generic) ---- */

.form-label {
    display: block;
    font-size: .875rem;
    font-weight: 500;
    margin-bottom: .4rem;
}

.form-input {
    width: 100%;
    padding: .6rem .875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color .15s, box-shadow .15s;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

/* ---- btn-secondary-link ---- */

.btn-secondary-link {
    display: inline-block;
    font-size: .875rem;
    color: var(--color-primary);
    text-decoration: none;
}

.btn-secondary-link:hover { text-decoration: underline; }

/* ---- catalog ---- */

.catalog-tabs {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.catalog-tab {
    padding: .4rem 1rem;
    border-radius: 20px;
    font-size: .875rem;
    text-decoration: none;
    color: var(--color-muted);
    border: 1px solid var(--color-border);
    transition: all .15s;
}

.catalog-tab:hover,
.catalog-tab.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.25rem;
}

.solution-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0;
    text-decoration: none;
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow .18s, border-color .18s, transform .18s;
}

.solution-card:hover {
    box-shadow: 0 10px 28px rgba(0,0,0,.12);
    border-color: var(--color-primary);
    transform: translateY(-4px);
}

/* ── Image ── */
.solution-card-img {
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f1f5f9;
    position: relative;
}

/* Бейдж скидки в строке цены */
.solution-card-discount {
    display: inline-flex;
    align-items: center;
    padding: .18rem .4rem;
    border-radius: 5px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1;
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
}
/* Градация: маленькая (< 20%) */
.solution-card-discount--sm {
    background: #dcfce7;
    color: #15803d;
}
/* Средняя (20–39%) */
.solution-card-discount--md {
    background: #ffedd5;
    color: #c2410c;
}
/* Большая (≥ 40%) */
.solution-card-discount--lg {
    background: #fee2e2;
    color: #b91c1c;
}

.solution-card-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s;
}

.solution-card:hover .solution-card-img img {
    transform: scale(1.04);
}

.solution-card-no-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e7ff 0%, #f0f4ff 100%);
    color: #a5b4fc;
}

.solution-card-no-img svg {
    width: 2.5rem;
    height: 2.5rem;
    opacity: .6;
}

/* ── Body ── */
.solution-card-body {
    display: flex;
    flex-direction: column;
    padding: 1rem 1rem .9rem;
    flex: 1;
    gap: 0;
}

/* ── Title ── */
.solution-card-title {
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 .5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.35em * 3);
}

/* ── Meta badges ── */
.solution-card-meta {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    margin-bottom: .55rem;
}

.solution-card-badge {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    font-size: .68rem;
    font-weight: 500;
    padding: .15rem .42rem;
    border-radius: 99px;
    white-space: nowrap;
    opacity: .82;
}

.solution-card-badge svg {
    width: .72rem;
    height: .72rem;
    flex-shrink: 0;
    opacity: .8;
}

.solution-card-badge--auto {
    background: #dcfce7;
    color: #166534;
}

.solution-card-badge--manual {
    background: #fef9c3;
    color: #854d0e;
}

.solution-card-badge--cat {
    background: #f1f5f9;
    color: #475569;
}

/* ── Description ── */
.solution-card-desc {
    display: none;
}

/* ── Seller row ── */
.solution-card-seller-row {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .65rem;
}

.solution-card-seller-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
}

.solution-card-seller-avatar--img {
    object-fit: cover;
    background: transparent;
}

.solution-card-seller-name {
    font-size: .78rem;
    color: var(--color-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Price ── */
.solution-card-price-row {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-top: auto;
    padding-top: .6rem;
    border-top: 1px solid var(--color-border);
    flex-wrap: nowrap;
}

.solution-card-old-price {
    font-size: .78rem;
    color: #9ca3af;
    text-decoration: line-through;
    white-space: nowrap;
}

.solution-card-price {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--color-primary);
    letter-spacing: -.02em;
    white-space: nowrap;
}

.catalog-empty { text-align: center; padding: 3rem 1rem; }
.catalog-empty h2 { margin: .75rem 0 .5rem; }
.catalog-empty p { color: var(--color-muted); }

/* ---- Category grid (catalog) ---- */
.cat-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: 1.25rem;
}

.cat-card {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .42rem .95rem .42rem .7rem;
    background: transparent;
    border: 1.5px solid var(--color-border);
    border-radius: 999px;
    text-decoration: none;
    color: var(--color-text);
    font-size: .83rem;
    font-weight: 500;
    transition: border-color .12s, color .12s, background .12s;
    white-space: nowrap;
    line-height: 1;
}

.cat-card svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    opacity: .55;
    transition: opacity .12s;
}

.cat-card:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 6%, transparent);
}

.cat-card:hover svg { opacity: 1; }

.cat-card--active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    font-weight: 600;
}

.cat-card--active svg { opacity: .85; }

.cat-card--active:hover {
    background: var(--color-primary);
    color: #fff;
    opacity: .88;
}

.cat-card-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.cat-card-label { line-height: 1.2; }

/* ---- Catalog filters toolbar ---- */
.catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1.25rem;
    align-items: center;
    padding: .7rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .35rem;
}

.filter-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .055em;
    color: var(--color-muted);
    white-space: nowrap;
    margin-right: .1rem;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .28rem .72rem;
    border-radius: 999px;
    border: 1.5px solid var(--color-border);
    background: transparent;
    color: var(--color-text);
    font-size: .78rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .12s, color .12s, background .12s;
    white-space: nowrap;
    line-height: 1.4;
}

.filter-pill svg {
    width: .8rem;
    height: .8rem;
    flex-shrink: 0;
    opacity: .65;
}

.filter-pill:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.filter-pill:hover svg { opacity: 1; }

.filter-pill--active {
    background: color-mix(in srgb, var(--color-primary) 11%, transparent);
    border-color: var(--color-primary);
    color: var(--color-primary);
    font-weight: 600;
}

.filter-pill--active svg { opacity: 1; }

.filter-pill--active:hover {
    background: color-mix(in srgb, var(--color-primary) 17%, transparent);
}

.filter-input {
    width: 72px;
    padding: .28rem .5rem;
    border: 1.5px solid var(--color-border);
    border-radius: .45rem;
    font-size: .78rem;
    color: var(--color-text);
    background: var(--color-bg);
}

.filter-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.filter-reset {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .78rem;
    color: var(--color-muted);
    text-decoration: none;
    padding: .28rem .65rem;
    border-radius: 999px;
    border: 1.5px solid var(--color-border);
    transition: border-color .12s, color .12s;
    white-space: nowrap;
}

.filter-reset:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* ---- Breadcrumbs ---- */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem .15rem;
    font-size: .85rem;
    margin-bottom: 1rem;
    color: var(--color-muted);
}
.breadcrumb a {
    color: var(--color-muted);
    text-decoration: none;
}
.breadcrumb a:hover {
    color: var(--color-text);
    text-decoration: underline;
}
.breadcrumb-sep {
    margin: 0 .2rem;
    opacity: .5;
}

/* ---- Solution page ---- */

.solution-page {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

.solution-badges { display: flex; gap: .5rem; margin-bottom: .75rem; flex-wrap: wrap; }

.badge-type, .badge-category {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    padding: .2rem .65rem;
    border-radius: 4px;
    font-size: .75rem;
    font-weight: 500;
}

.badge-type     { background: #e0e7ff; color: #3730a3; }
.badge-category { background: #f0fdf4; color: #166534; }

.solution-title { font-size: 1.65rem; margin-bottom: .5rem; }

.solution-seller-line { margin-bottom: 1.25rem; }

.seller-link {
    font-size: .875rem;
    color: var(--color-primary);
    text-decoration: none;
}

.seller-link:hover { text-decoration: underline; }

.solution-description {
    font-size: .975rem;
    line-height: 1.7;
    color: var(--color-text);
}
.solution-description h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 1.5rem 0 .5rem;
    padding-top: .5rem;
    border-top: 2px solid var(--color-border);
}
.solution-description h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.solution-description h3 { font-size: 1rem; font-weight: 600; margin: 1.1rem 0 .35rem; }
.solution-description p  { margin: 0 0 .85rem; }
.solution-description ul,
.solution-description ol { padding-left: 1.4rem; margin: 0 0 .85rem; }
.solution-description li { margin-bottom: .3rem; }
.solution-description strong { font-weight: 600; }
.solution-description br + br { display: none; }

.solution-purchase-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.solution-price {
    font-size: 1.65rem;
    font-weight: 700;
}

.solution-sidebar { }
.solution-sidebar .solution-purchase-card { margin-top: 1rem; }

/* ─── Notifications settings ─────────────────────────────────────────────── */

.notif-banner {
    display: flex;
    align-items: center;
    gap: .6rem;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: var(--radius);
    padding: .65rem 1rem;
    margin-bottom: 1.5rem;
    font-size: .875rem;
    color: #4338ca;
}

.notif-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.notif-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}

.notif-icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.notif-icon--tg    { background: #229ed9; }
.notif-icon--email { background: #6366f1; }
.notif-icon svg { width: 1.5rem; height: 1.5rem; }

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

.notif-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: .25rem;
}

.notif-desc {
    font-size: .875rem;
    color: var(--color-muted);
    margin-bottom: .85rem;
    line-height: 1.5;
}

.notif-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.btn-tg {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #229ed9;
    color: #fff;
    border: none;
    border-radius: .5rem;
    padding: .5rem 1.1rem;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}
.btn-tg:hover { background: #1a86bb; }

.notif-tg-step {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: .5rem;
    padding: .85rem 1rem;
    margin-bottom: .5rem;
}
.notif-tg-instruction { font-size: .875rem; margin: 0 0 .65rem; }
.notif-tg-note { font-size: .75rem; color: var(--color-muted); margin: .5rem 0 0; }

/* Events grid */
.notif-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: .75rem;
}

.notif-event-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: .75rem 1rem;
}

.notif-event-icon { font-size: 1.5rem; flex-shrink: 0; }
.notif-event-title { font-size: .875rem; font-weight: 600; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.notif-event-desc  { font-size: .78rem; color: var(--color-muted); margin-top: .15rem; }

.notif-badge {
    font-size: .65rem;
    font-weight: 700;
    padding: .1rem .35rem;
    border-radius: 99px;
}
.notif-badge--tg    { background: #e0f2fe; color: #0369a1; }
.notif-badge--email { background: #eef2ff; color: #4338ca; }

/* ════════════════════════════════════════════════
   Solution page — redesign
   ════════════════════════════════════════════════ */

/* Hero image */
.solution-hero-img {
    position: relative;
    width: 100%;
    border-radius: .85rem;
    overflow: hidden;
    margin-bottom: 1.25rem;
    border: 1px solid var(--color-border);
    background: #f1f5f9;
    aspect-ratio: 16 / 9;
}
.solution-hero-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.solution-hero-img--square {
    aspect-ratio: 1 / 1;
    max-height: 520px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}
.solution-edit-btn {
    position: absolute;
    top: .75rem;
    right: .75rem;
    font-size: .78rem;
    font-weight: 600;
    padding: .35rem .75rem;
    border-radius: .45rem;
    background: rgba(255,255,255,.92);
    color: var(--color-text);
    text-decoration: none;
    backdrop-filter: blur(4px);
    border: 1px solid var(--color-border);
    transition: background .15s;
}
.solution-edit-btn:hover { background: #fff; }

/* Badges */
.solution-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: .65rem;
}
.badge-type {
    display: inline-flex;
    align-items: center;
    gap: .28rem;
    font-size: .72rem;
    font-weight: 600;
    padding: .22rem .65rem;
    border-radius: 2rem;
}

.badge-type svg, .badge-category svg {
    width: .75rem;
    height: .75rem;
    flex-shrink: 0;
    opacity: .8;
}
.badge-type--auto   { background: #dcfce7; color: #166534; }
.badge-type--manual { background: #fef9c3; color: #854d0e; }
.badge-category {
    font-size: .72rem;
    font-weight: 500;
    padding: .22rem .65rem;
    border-radius: 2rem;
    background: #f1f5f9;
    color: #475569;
}

/* Meta strip */
.solution-meta-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    margin-bottom: 1.25rem;
    font-size: .8rem;
    color: #94a3b8;
}
.solution-meta-item {
    display: flex;
    align-items: center;
    gap: .3rem;
}
.solution-meta-sep { color: #cbd5e1; }

/* Author card in main content */
.solution-author-card {
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: .75rem;
    overflow: hidden;
}
.solution-author-link {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .85rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: background .13s;
}
.solution-author-link:hover { background: #f8fafc; }
.solution-author-ava {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}
.solution-author-ava--img { object-fit: cover; }
.solution-author-info { flex: 1; min-width: 0; }
.solution-author-name {
    font-weight: 700;
    font-size: .95rem;
    display: block;
    margin-bottom: .15rem;
}
.solution-author-rating {
    font-size: .8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .15rem;
    flex-wrap: wrap;
}

/* ── Sidebar purchase card ── */
.solution-purchase-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: .85rem;
    overflow: hidden;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .85rem;
    margin-bottom: 1rem;
}

.sp-section { display: flex; flex-direction: column; gap: .4rem; }
.sp-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-muted);
    margin-bottom: .1rem;
}

.tariff-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem .75rem;
    border: 1.5px solid var(--color-border);
    border-radius: .55rem;
    cursor: pointer;
    gap: .5rem;
    transition: border-color .15s, background .15s;
}
.tariff-row:hover { border-color: var(--color-primary); background: #f5f3ff; }

.sp-price-block { text-align: center; padding: .25rem 0; }
.sp-price-label { font-size: .72rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .2rem; }
.sp-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -.03em;
    line-height: 1;
}

.sp-tier-block {
    background: #f8fafc;
    border-radius: .55rem;
    padding: .7rem .85rem;
}

.sp-buy-btn {
    width: 100%;
    padding: .85rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: .65rem;
    text-align: center;
}

.sp-chat-btn {
    display: block;
    text-align: center;
    padding: .65rem;
    border-radius: .55rem;
    border: 1.5px solid var(--color-border);
    color: var(--color-text);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 600;
    transition: border-color .15s, background .15s;
}
.sp-chat-btn:hover { border-color: var(--color-primary); background: #f5f3ff; color: var(--color-primary); }

.sp-fav-btn {
    width: 100%;
    padding: .55rem;
    border-radius: .5rem;
    cursor: pointer;
    background: none;
    border: 1px solid var(--color-border);
    font-size: .875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    transition: border-color .15s, background .15s;
}
.sp-fav-btn:hover { border-color: #f43f5e; color: #f43f5e; }

/* Trust block */
.sp-trust {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    padding-top: .25rem;
    border-top: 1px solid var(--color-border);
}
.sp-trust-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    color: var(--color-muted);
}

/* Seller mini-card */
.sp-seller-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: .85rem;
    overflow: hidden;
}
.sp-seller-head {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-muted);
    padding: .65rem 1rem .45rem;
    border-bottom: 1px solid var(--color-border);
    background: #f8fafc;
}
.sp-seller-body {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: background .13s;
}
.sp-seller-body:hover { background: #f8fafc; }
.sp-seller-ava {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}
.sp-seller-ava--img { object-fit: cover; }
.sp-seller-name { font-weight: 700; font-size: .9rem; }
.sp-seller-rating {
    font-size: .8rem;
    display: flex;
    align-items: center;
    gap: .15rem;
    margin-top: .1rem;
}
.sp-seller-stats {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: .65rem 1rem;
    border-top: 1px solid var(--color-border);
    background: #f8fafc;
}
.sp-seller-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .1rem;
}
.sp-seller-stat-val { font-size: 1rem; font-weight: 700; color: var(--color-text); }
.sp-seller-stat-lbl { font-size: .68rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: .04em; }
.sp-seller-stat-div { width: 1px; height: 2rem; background: var(--color-border); }

/* Rich-text description (Quill output) */
.solution-rich-text h2 { font-size: 1.1rem; font-weight: 700; margin: 1.1rem 0 .4rem; }
.solution-rich-text h3 { font-size: .975rem; font-weight: 700; margin: .9rem 0 .35rem; }
.solution-rich-text p  { margin: 0 0 .65rem; }
.solution-rich-text ul,
.solution-rich-text ol { padding-left: 1.4rem; margin: .5rem 0 .75rem; }
.solution-rich-text li { margin-bottom: .2rem; line-height: 1.6; }
.solution-rich-text blockquote {
    border-left: 3px solid var(--color-primary, #6366f1);
    margin: .75rem 0; padding: .4rem .9rem;
    color: var(--color-muted); background: #f9fafb;
    border-radius: 0 .4rem .4rem 0;
}
.solution-rich-text a     { color: var(--color-primary, #6366f1); }
.solution-rich-text img   { max-width: 100%; height: auto; border-radius: .5rem; margin: .5rem 0; }
.solution-rich-text strong { font-weight: 700; }
.solution-rich-text em    { font-style: italic; }
.solution-rich-text u     { text-decoration: underline; }
.solution-rich-text s,
.solution-rich-text del   { text-decoration: line-through; }

/* Responsive */
@media (max-width: 720px) {
    .solution-hero-img { aspect-ratio: 4 / 3; }
    .sp-price { font-size: 1.6rem; }
}

/* ════════════════════════════════════════════════════════════════
   CUSTOM HTML BLOCK — изоляция от сайтовых стилей
   ════════════════════════════════════════════════════════════════ */

/* Сброс элементных стилей сайта внутри блока */
.sol-custom-html {
    display: block;
    line-height: 1.6;
    font-family: inherit;
    color: var(--color-text, #111827);
    font-size: .9rem;
}
.sol-custom-html *,
.sol-custom-html *::before,
.sol-custom-html *::after {
    box-sizing: border-box;
}
/* Переопределяем element-selectors сайта → browser defaults */
.sol-custom-html h1,
.sol-custom-html h2,
.sol-custom-html h3,
.sol-custom-html h4,
.sol-custom-html h5,
.sol-custom-html h6 {
    all: revert;
    font-family: inherit;
    margin: revert;
    line-height: 1.3;
}
.sol-custom-html p  { all: revert; font-family: inherit; margin-bottom: .75em; }
.sol-custom-html ul,
.sol-custom-html ol { all: revert; padding-left: 1.5em; margin-bottom: .75em; }
.sol-custom-html li { all: revert; margin-bottom: .25em; }
.sol-custom-html a  { all: revert; color: var(--color-primary, #6366f1); }
.sol-custom-html table { all: revert; border-collapse: collapse; width: 100%; }
.sol-custom-html th,
.sol-custom-html td { all: revert; padding: .5em .75em; border: 1px solid var(--color-border, #e5e7eb); }
.sol-custom-html img { max-width: 100%; height: auto; display: inline-block; }
.sol-custom-html svg { max-width: 100%; }
.sol-custom-html pre,
.sol-custom-html code { all: revert; font-family: 'Fira Code', Consolas, monospace; }
/* Inline style от продавца имеет приоритет над выше — это intentional */

/* ── Медиапанель в кабинете ── */
.html-media-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    cursor: pointer;
    padding: .4rem;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: .4rem;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    max-width: 100px;
}
.html-media-item:hover {
    border-color: var(--color-primary, #6366f1);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 15%, transparent);
}
.html-media-item span {
    font-size: .68rem;
    color: var(--color-muted);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
}
.html-media-item code {
    display: none;
}
