:root {
    --bg: #f7f8fc;
    --dark: #101827;
    --text: #384152;
    --muted: #6b7280;
    --primary: #5b5cf6;
    --primary-dark: #4344d8;
    --accent: #00c2a8;
    --card: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 24px 70px rgba(16, 24, 39, .12);
    --radius: 28px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(91, 92, 246, .16), transparent 34rem),
        radial-gradient(circle at top right, rgba(0, 194, 168, .14), transparent 30rem),
        var(--bg);
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.topbar {
    width: min(1180px, calc(100% - 32px));
    margin: 20px auto 0;
    padding: 16px 18px;
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 999px;
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 14px;
    z-index: 20;
    box-shadow: 0 14px 40px rgba(16, 24, 39, .08);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--dark);
}

.logo-mark {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    padding: 8px 10px;
    border-radius: 14px;
    letter-spacing: .08em;
}

.nav {
    display: flex;
    gap: 20px;
    color: var(--muted);
    font-size: 14px;
}

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

.hero {
    width: min(1180px, calc(100% - 32px));
    margin: 56px auto 0;
    display: grid;
    grid-template-columns: 1.04fr .96fr;
    gap: 36px;
    align-items: center;
}

.badge {
    width: fit-content;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(91, 92, 246, .1);
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
}

h1,
h2,
h3 {
    color: var(--dark);
    margin: 0;
    line-height: 1.05;
}

h1 {
    margin-top: 22px;
    font-size: clamp(42px, 7vw, 76px);
    letter-spacing: -0.06em;
}

h2 {
    font-size: clamp(32px, 4vw, 52px);
    letter-spacing: -0.045em;
}

h3 {
    font-size: 22px;
}

.lead {
    margin: 22px 0 0;
    font-size: 21px;
    line-height: 1.55;
    color: var(--text);
}

.note {
    margin-top: 18px;
    color: var(--muted);
    max-width: 620px;
}

.hero-actions {
    margin-top: 30px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn {
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 15px;
    transition: .2s ease;
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 14px 30px rgba(91, 92, 246, .28);
}

.btn.primary:hover {
    transform: translateY(-2px);
}

.btn.ghost {
    background: #fff;
    color: var(--dark);
    border: 1px solid var(--border);
}

.btn.full {
    width: 100%;
}

.hero-card {
    position: relative;
    background: linear-gradient(145deg, #fff, #edf0ff);
    border-radius: 42px;
    padding: 28px;
    box-shadow: var(--shadow);
    min-height: 520px;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.hero-card img {
    width: 82%;
    opacity: .94;
}

.floating-card {
    position: absolute;
    right: 28px;
    bottom: 28px;
    background: rgba(255, 255, 255, .9);
    border: 1px solid rgba(255, 255, 255, .9);
    backdrop-filter: blur(18px);
    padding: 20px;
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(16, 24, 39, .14);
}

.floating-card span,
.floating-card small {
    display: block;
    color: var(--muted);
}

.floating-card strong {
    display: block;
    margin: 4px 0;
    color: var(--dark);
    font-size: 30px;
}

.section {
    width: min(1180px, calc(100% - 32px));
    margin: 92px auto 0;
}

.section-head {
    max-width: 760px;
    margin-bottom: 30px;
}

.section-head p,
.split p,
.seo-text p,
.contacts p,
.feature-panels p,
.faq-list p {
    font-size: 18px;
    line-height: 1.7;
}

.benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.benefits article,
.module-card,
.summary-box,
.mini-info,
.contact-card,
.admin-card,
.image-panel,
.seo-text,
.timeline-grid article,
.feature-panels article,
.faq-list details {
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(255, 255, 255, .86);
    border-radius: var(--radius);
    box-shadow: 0 18px 45px rgba(16, 24, 39, .08);
}

.benefits article {
    padding: 26px;
}

.benefits span {
    color: var(--primary);
    font-weight: 900;
}

.benefits p {
    line-height: 1.65;
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.timeline-grid article {
    padding: 26px;
    position: relative;
    overflow: hidden;
}

.timeline-grid article::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(91, 92, 246, .08);
}

.timeline-grid span {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 900;
    margin-bottom: 18px;
}

.timeline-grid p {
    line-height: 1.65;
}

.feature-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.feature-panels article {
    padding: 30px;
}

.feature-icon {
    width: fit-content;
    padding: 10px 14px;
    border-radius: 16px;
    background: #f3f4ff;
    color: var(--primary);
    font-weight: 900;
    margin-bottom: 18px;
    letter-spacing: .08em;
}

.split {
    display: grid;
    grid-template-columns: 1fr .8fr;
    gap: 30px;
    align-items: center;
}

.check-list {
    padding: 0;
    margin: 24px 0 0;
    list-style: none;
}

.check-list li {
    margin: 12px 0;
    padding-left: 28px;
    position: relative;
    line-height: 1.55;
}

.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 900;
}

.image-panel {
    padding: 28px;
}

.constructor-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}

.modules {
    display: grid;
    gap: 14px;
}

.module-card {
    padding: 18px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    cursor: pointer;
    transition: .2s ease;
}

.module-card:hover {
    transform: translateY(-2px);
    border-color: rgba(91, 92, 246, .35);
}

.module-card input {
    width: 22px;
    height: 22px;
    accent-color: var(--primary);
}

.module-card strong,
.module-card small {
    display: block;
}

.module-card small {
    margin-top: 5px;
    color: var(--muted);
    line-height: 1.45;
}

.module-card b {
    white-space: nowrap;
    color: var(--dark);
}

.summary {
    position: sticky;
    top: 110px;
    display: grid;
    gap: 16px;
}

.summary-box {
    padding: 24px;
}

.summary-box span {
    color: var(--muted);
}

.summary-box strong {
    display: block;
    margin: 8px 0 12px;
    color: var(--dark);
    font-size: 38px;
    letter-spacing: -0.04em;
}

.summary-box p,
.mini-info li {
    line-height: 1.6;
}

.mini-info {
    padding: 22px;
}

.seo-text {
    padding: 30px;
}

.faq-list {
    display: grid;
    gap: 14px;
}

.faq-list details {
    padding: 20px 24px;
}

.faq-list summary {
    cursor: pointer;
    color: var(--dark);
    font-size: 19px;
    font-weight: 900;
}

.faq-list p {
    margin-bottom: 0;
    color: var(--text);
}

.contacts {
    margin-bottom: 80px;
    display: grid;
    grid-template-columns: .9fr 1fr;
    gap: 30px;
}

.contact-card {
    padding: 24px;
}

.contact-link {
    display: block;
    padding: 16px 18px;
    margin-bottom: 10px;
    background: #f3f4ff;
    color: var(--primary);
    border-radius: 18px;
    font-weight: 800;
}

.contact-link:hover {
    background: #e8eaff;
}

.lead-form {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.input,
.lead-form input,
.lead-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 16px;
    padding: 14px 16px;
    outline: none;
    font: inherit;
}

.textarea,
.lead-form textarea {
    min-height: 110px;
    resize: vertical;
}

.input:focus,
.lead-form input:focus,
.lead-form textarea:focus {
    border-color: rgba(91, 92, 246, .55);
    box-shadow: 0 0 0 4px rgba(91, 92, 246, .08);
}

.footer {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 24px;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--dark);
    color: #fff;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.footer p {
    color: #cbd5e1;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #cbd5e1;
    min-width: 180px;
}

.footer-links a:hover {
    color: #fff;
}

.flash-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 20px auto;
}

.flash {
    padding: 14px 18px;
    border-radius: 16px;
    background: #eef2ff;
    color: var(--dark);
}

.flash.error {
    background: #fee2e2;
}

.flash.success {
    background: #dcfce7;
}

.admin-page {
    width: min(980px, calc(100% - 32px));
    margin: 60px auto;
}

.admin-card {
    padding: 28px;
    max-width: 460px;
    margin: 0 auto;
}

.admin-card.wide {
    max-width: none;
}

.admin-card label {
    display: block;
    margin: 16px 0;
    font-weight: 700;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 24px 0;
}

.admin-stats div {
    background: #f3f4ff;
    border-radius: 22px;
    padding: 22px;
}

.admin-stats strong {
    display: block;
    font-size: 36px;
    color: var(--primary);
}

.admin-menu {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

td small {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

td form {
    margin-top: 8px;
}

td button {
    border: 0;
    background: #fee2e2;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
}

.checkbox-line {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.image-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.image-list div {
    background: #f8fafc;
    border-radius: 18px;
    padding: 14px;
}

.image-list img {
    height: 140px;
    width: 100%;
    object-fit: contain;
    margin: 10px 0;
}

@media (max-width: 900px) {
    .nav {
        display: none;
    }

    .hero,
    .split,
    .constructor-grid,
    .contacts,
    .feature-panels {
        grid-template-columns: 1fr;
    }

    .hero-card {
        min-height: 360px;
    }

    .benefits,
    .timeline-grid {
        grid-template-columns: 1fr;
    }

    .summary {
        position: static;
    }
}

@media (max-width: 560px) {
    .topbar {
        border-radius: 22px;
    }

    .logo {
        font-size: 14px;
    }

    h1 {
        font-size: 42px;
    }

    h2 {
        font-size: 32px;
    }

    .lead {
        font-size: 18px;
    }

    .hero {
        margin-top: 36px;
    }

    .section {
        margin-top: 64px;
    }

    .hero-card {
        min-height: 320px;
        border-radius: 30px;
    }

    .floating-card {
        left: 18px;
        right: 18px;
        bottom: 18px;
    }

    .module-card {
        grid-template-columns: auto 1fr;
    }

    .module-card b {
        grid-column: 2;
    }

    .summary-box strong {
        font-size: 32px;
    }

    .footer {
        display: block;
    }

    .footer-links {
        margin-top: 18px;
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }
}
.site-chat-inline {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(16, 24, 39, .08);
}

.site-chat-header {
    padding: 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}

.site-chat-header strong,
.site-chat-header span {
    display: block;
}

.site-chat-header span {
    margin-top: 4px;
    opacity: .8;
    font-size: 14px;
}

.site-chat-messages {
    height: 320px;
    padding: 16px;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.site-chat-message {
    max-width: 86%;
    padding: 12px 14px;
    border-radius: 16px;
    line-height: 1.45;
    font-size: 15px;
}

.site-chat-message.operator {
    align-self: flex-start;
    background: #eef2ff;
    color: var(--dark);
}

.site-chat-message.client {
    align-self: flex-end;
    background: var(--primary);
    color: #fff;
}

.site-chat-name {
    padding: 14px 16px 0;
    background: #fff;
}

.site-chat-name input,
.site-chat-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 16px;
    padding: 12px 14px;
    outline: none;
    font: inherit;
}

.site-chat-form {
    display: grid;
    gap: 12px;
    padding: 14px 16px 16px;
    background: #fff;
}

.site-chat-form textarea {
    min-height: 90px;
    resize: vertical;
}

.contact-alternatives {
    margin-top: 18px;
}

@media (max-width: 560px) {
    .site-chat-messages {
        height: 280px;
    }

    .site-chat-message {
        max-width: 94%;
    }
}

.admin-note {
    padding: 16px 18px;
    margin: 18px 0;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid var(--border);
}

.admin-note p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.admin-note {
    padding: 16px 18px;
    margin: 18px 0;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid var(--border);
}

.admin-note p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.site-chat-file {
    display: block;
    cursor: pointer;
}

.site-chat-file span {
    display: block;
    padding: 12px 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px dashed var(--border);
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.site-chat-file input {
    display: none;
}

.site-chat-attachment-link {
    display: block;
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .45);
    text-decoration: underline;
    font-size: 14px;
    word-break: break-all;
}

.site-chat-message.operator .site-chat-attachment-link {
    background: #fff;
    color: var(--primary);
}

.site-chat-message.client .site-chat-attachment-link {
    color: #fff;
}