/* === LINexact styles from original index.html (nothing simplified) === */

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9ff;
    color: #1a202c;
}
.sidebar-link.active {
    background-color: #eff4ff;
    color: #1a2b4b;
    font-weight: 600;
    border-left: 3px solid #1a2b4b;
}
.premium-card {
    background: white;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.premium-card:hover {
    border-color: #5b7cff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease-out;
    padding: 0 24px;
}
.faq-accordion-item.active .faq-answer {
    max-height: 500px;
    padding-bottom: 24px;
}
.faq-accordion-item.active .faq-icon {
    transform: rotate(45deg);
}
.glass-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
}
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
.result-item {
    background: #f8faff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}
.result-item .status-badge {
    font-weight: 700;
    font-size: 1rem;
    padding: 4px 16px;
    border-radius: 40px;
    display: inline-block;
}
.status-violation {
    background: #fee2e2;
    color: #dc2626;
}
.status-clean {
    background: #dbeafe;
    color: #2563eb;
}
.result-item .risk {
    font-weight: 700;
    font-size: 1.1rem;
    padding: 4px 16px;
    border-radius: 40px;
    display: inline-block;
    margin-bottom: 12px;
}
.risk-low {
    background: #dbeafe;
    color: #2563eb;
}
.risk-medium {
    background: #fef3c7;
    color: #d97706;
}
.risk-high {
    background: #fee2e2;
    color: #dc2626;
}
.risk-critical {
    background: #fecaca;
    color: #b91c1c;
}
.result-item .meta-grid {
    display: grid;
    gap: 12px;
    margin: 12px 0;
    font-size: 0.85rem;
}
.result-item .meta-grid.personal {
    grid-template-columns: repeat(5, 1fr);
}
.result-item .meta-grid.business {
    grid-template-columns: repeat(2, 1fr);
}
.result-item .meta-grid span {
    background: white;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-align: center;
}
.result-item .message {
    margin-top: 12px;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    border-left: 4px solid #5b7cff;
    font-size: 0.95rem;
    color: #4a5b6e;
    white-space: pre-line;
    line-height: 1.65;
}
.result-item .loading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #64748b;
    font-size: 0.95rem;
}
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #e2e8f0;
    border-top-color: #5b7cff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.empty-state {
    text-align: center;
    color: #94a3b8;
    padding: 40px 0;
}
#recommendationBlock {
    animation: fadeIn 0.5s ease;
    border-left: 4px solid #5b7cff;
}
.target-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
    font-size: 0.85rem;
    user-select: none;
}
.target-option:hover {
    border-color: #5b7cff;
    background: #eff4ff;
}
.target-option input[type="radio"] {
    accent-color: #5b7cff;
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
}
.target-option input[type="radio"]:checked + span {
    color: #1a2b4b;
    font-weight: 600;
}
.target-option:has(input:checked) {
    border-color: #5b7cff;
    background: #eff4ff;
}
.target-option.error {
    border-color: #dc2626;
    background: #fee2e2;
    animation: shake 0.3s ease;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
#targetError {
    font-size: 0.8rem;
    margin-top: 4px;
}

/* Иконки Material Symbols */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

@media (max-width: 640px) {
    .result-item .meta-grid.personal {
        grid-template-columns: 1fr 1fr;
    }
    .result-item .meta-grid.business {
        grid-template-columns: 1fr 1fr;
    }
    .target-option {
        padding: 4px 10px;
        font-size: 0.75rem;
    }
}


/* ========== Единые стили для всех страниц (doc / form / service) ========== */

.sidebar-link {
    font-weight: 500;
    color: #64748b;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.sidebar-link:hover {
    background-color: #f1f5f9;
    color: #1a2b4b;
    border-left-color: #1a2b4b;
}

/* glass-header: единый вариант */
.glass-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Документы: about / offer / privacy */
.doc-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 40px 48px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.03);
    line-height: 1.7;
}
@media (max-width: 640px) {
    .doc-card { padding: 24px 20px; }
}
.doc-card h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #1a2b4b;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}
.doc-card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a2b4b;
    margin: 28px 0 12px;
}
.doc-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a2b4b;
    margin: 18px 0 8px;
}
.doc-card p,
.doc-card li {
    color: #334155;
    font-size: 0.95rem;
    margin-bottom: 8px;
}
.doc-card ul {
    padding-left: 24px;
    list-style: disc;
}
.doc-card ul li {
    margin-bottom: 4px;
}
.badge {
    background: #eff4ff;
    color: #5b7cff;
    font-weight: 600;
    font-size: 0.7rem;
    padding: 2px 12px;
    border-radius: 40px;
    display: inline-block;
    letter-spacing: 0.02em;
}
.highlight {
    background: #f8faff;
    border-left: 4px solid #5b7cff;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 16px 0;
}
.version {
    color: #94a3b8;
    font-size: 0.75rem;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}
.footer-links a {
    color: #64748b;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover {
    color: #5b7cff;
}

/* Privacy table */
.table-wrap {
    overflow-x: auto;
    margin: 16px 0;
}
.table-wrap table,
.doc-card table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.table-wrap th,
.doc-card table th {
    background: #f1f5f9;
    text-align: left;
    padding: 10px 14px;
    font-weight: 600;
    color: #1a2b4b;
}
.table-wrap td,
.doc-card table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}
.table-wrap tr:last-child td,
.doc-card table tr:last-child td {
    border-bottom: none;
}

/* Offer article list */
.article-list {
    padding-left: 24px;
    list-style-type: decimal;
}
.article-list li {
    margin-bottom: 6px;
    padding-left: 4px;
}
.article-list ul {
    list-style-type: lower-alpha;
    padding-left: 24px;
    margin-top: 4px;
}
.article-list ul li {
    list-style-type: lower-alpha;
}

/* Service page */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
#mobileMenu {
    transition: left 0.3s ease-in-out;
}
.service-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 40px 48px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.03);
    width: 100%;
}
@media (max-width: 640px) {
    .service-card { padding: 24px 20px; }
}
.service-card table {
    font-size: 0.875rem;
}
.service-card th,
.service-card td {
    padding: 10px 12px !important;
}
.service-card .section-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1a2b4b;
    letter-spacing: -0.02em;
}

/* Trebovanie form */
.success-message {
    display: none;
    animation: slideIn 0.5s ease;
}
.success-message.show {
    display: block;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.loading-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid #e2e8f0;
    border-top-color: #5b7cff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.faq-item {
    cursor: pointer;
    transition: background-color 0.2s;
}
.faq-item:hover {
    background-color: #f8f9ff;
}
.faq-content {
    display: none;
    padding: 0 1.5rem 1.25rem;
    color: #64748b;
    line-height: 1.75;
}
.faq-content.open {
    display: block;
    animation: fadeIn 0.3s ease;
}
.faq-icon {
    transition: transform 0.3s;
}
.faq-icon.rotate {
    transform: rotate(45deg);
}
.form-input:focus {
    border-color: #5b7cff;
    box-shadow: 0 0 0 3px rgba(91, 124, 255, 0.15);
}
.payment-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #eef2ff 100%);
    border: 2px solid #5b7cff;
}


/* Success page (оплата) */
body:has(.card) {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}
.card {
    background: white;
    max-width: 500px;
    padding: 50px 40px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    text-align: center;
    border: 1px solid #e2e8f0;
}
.card .icon {
    width: 72px;
    height: 72px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 36px;
}
.card h1 {
    color: #1a2b4b;
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 12px;
}
.card p {
    color: #64748b;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 8px;
}
.card .email {
    font-weight: 700;
    color: #1a2b4b;
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
    margin: 12px 0 20px;
}
.card .btn {
    display: inline-block;
    background: #5b7cff;
    color: white;
    font-weight: 600;
    padding: 14px 36px;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 8px;
    transition: background 0.2s;
}
.card .btn:hover {
    background: #4a6adf;
}
.card .sub {
    font-size: 14px;
    color: #94a3b8;
    margin-top: 24px;
}
/* === MAX Messenger Widget & Menu Styles === */
.max-float-btn {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important; /* ГАРАНТИРОВАННО СПРАВА */
    left: auto !important;
    width: 65px !important;
    height: 65px !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
    z-index: 9999 !important;
    text-decoration: none !important;
    animation: maxPulse 2s infinite !important;
    border: 1px solid #f0f0f0 !important;
}

.max-float-btn:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25) !important;
    animation: none !important;
}

.max-btn-icon {
    width: 36px !important;
    height: 36px !important;
    object-fit: contain !important;
}

.max-tooltip {
    position: absolute !important;
    right: 75px !important;
    background: #333 !important;
    color: white !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease !important;
}

.max-float-btn:hover .max-tooltip {
    opacity: 1 !important;
}

@keyframes maxPulse {
    0% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); }
    50% { box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3); }
    100% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); }
}

.max-menu-link {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 16px !important;
    text-decoration: none !important;
    color: #1a1a2e !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

.max-menu-link:hover {
    background: #f0f4ff !important;
    color: #5B21B6 !important;
}

.max-menu-icon {
    width: 24px !important;
    height: 24px !important;
    object-fit: contain !important;
    display: inline-block !important;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .max-float-btn {
        width: 55px !important;
        height: 55px !important;
        bottom: 20px !important;
        right: 20px !important;
    }
    .max-btn-icon {
        width: 30px !important;
        height: 30px !important;
    }
    .max-tooltip {
        display: none !important;
    }
    .max-menu-link {
        padding: 12px 16px !important;
        font-size: 16px !important;
    }
    .max-menu-icon {
        width: 28px !important;
        height: 28px !important;
    }
}