/* ============================================================
   Bartrion — Анализ закупки и финансовый аудит
   Секция tender-analysis-section: маскирование показаний,
   прелоадер, калькулятор, риски, модальные окна, печать.
   Подключение: <link rel="stylesheet" href="/css/tender_analysis.css">
   ============================================================ */

/* 1. ФАКТУРНЫЙ ПАТТЕРН МАСКИРОВАНИЯ ПОКАЗАНИЙ (СТИЛЬ CHECKO) */
.mask-pattern {
    display: inline-block;
    height: 14px;
    width: 100px;
    vertical-align: -2px;
    border-radius: 2px;
    background-color: #eff6ff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M2.5 1v3M1 2.5h3M1.5 1.5l2 2M3.5 1.5l-2 2M7.5 6v3M6 7.5h3M6.5 6.5l2 2M8.5 6.5l-2 2' stroke='%232563eb' stroke-width='0.9' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 10px 10px;
    opacity: 0.88;
    user-select: none;
    pointer-events: none;
    margin: 0 2px;
}

.mw-xs { width: 25px; }
.mw-s { width: 45px; }
.mw-m { width: 90px; }
.mw-l { width: 140px; }
.mw-xl { width: 200px; }
.mw-xxl { width: 300px; }

/* 2. ВЕРХНИЙ БАР СЕКЦИИ */
.ta-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.ta-topbar-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

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

/* 3. БЕЙДЖИ СТАТУСОВ */
.ta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid transparent;
}

.ta-badge--green { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.ta-badge--blue { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.ta-badge--mint { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.ta-badge--muted { background: #f1f5f9; color: #475569; border-color: #e2e8f0; padding: 4px 10px; font-size: 12px; }

/* Панель кнопок печати и PDF */
.ta-print-bar {
    display: none;
    align-items: center;
    gap: 8px;
}

/* 4. БАННЕР «СМОТРЕТЬ АНАЛИЗ ЗАКУПКИ» */
.ta-cta {
    background: linear-gradient(135deg, #f0f9ff 0%, #eff6ff 50%, #f8fafc 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.06);
}

.ta-cta-inner {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ta-cta-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

.ta-cta-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 3px;
}

.ta-cta-sub {
    font-size: 13px;
    color: #475569;
}

/* Кнопка «Смотреть анализ закупки» */
.btn-reveal-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--accent-blue, #2563eb);
    color: white;
    font-size: 14px;
    font-weight: 700;
    padding: 11px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-reveal-main:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32);
}

/* 5. ОБЩИЕ ПАНЕЛИ И СЕТКИ */
.ta-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 24px;
}

.ta-section {
    margin-bottom: 24px;
}

.ta-panel-title,
.ta-section-title {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.ta-cell {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
}

.ta-cell-label {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ta-cell-value {
    font-size: 13px;
    color: #1e293b;
    line-height: 1.5;
}

.ta-cell-line {
    font-size: 13px;
    color: #1e293b;
    line-height: 1.6;
}

.ta-chip {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
    background: #eff6ff;
    color: #1d4ed8;
    margin-right: 4px;
    display: inline-block;
}

.ta-warn-inline {
    display: inline-flex;
    align-items: flex-start;
    gap: 5px;
    color: #b45309;
    font-weight: 600;
}

.ta-warn-inline svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* 6. КАЛЬКУЛЯТОР РЕНТАБЕЛЬНОСТИ */
.ta-calc-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.ta-calc-sub {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.ta-calc-select-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ta-calc-select-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.ta-calc-select {
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    background: white;
}

.ta-alert {
    display: none;
    background: #fffbeb;
    border: 1px solid #fef3c7;
    color: #b45309;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ta-alert--ok {
    background: #f0fdf4;
    border-color: #dcfce7;
    color: #166534;
}

.ta-alert-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ta-alert-btn--warn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    color: #b45309;
    border: 1px solid #f59e0b;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
}

.ta-alert-btn--ok {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    color: #166534;
    border: 1px solid #86efac;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
}

.ta-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.ta-metric {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
}

.ta-metric-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.ta-metric-value {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.ta-metric-value--blue { color: #2563eb; }
.ta-metric-value--gray { color: #64748b; }
.ta-metric-value--green { color: #059669; }

/* 7. ТАБЛИЦЫ */
.ta-table-wrap {
    overflow-x: auto;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.ta-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.ta-table thead tr {
    background: #f1f5f9;
    color: #475569;
    border-bottom: 1px solid #cbd5e1;
}

.ta-table--inc thead tr { background: #edf2f7; }

.ta-table th {
    padding: 10px 12px;
    font-weight: 600;
}

.ta-table--inc th { padding: 8px 10px; }

.ta-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.ta-table--inc td {
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
}

.ta-td-strong { font-weight: 600; color: #1e293b; }
.ta-td-muted { color: #64748b; }
.ta-td-rate { font-weight: 600; color: #2563eb; }
.ta-td-fot { font-weight: 700; color: #0f172a; }

/* 8. РИСКИ: КРИТИЧЕСКИЕ И ПРЕДУПРЕЖДЕНИЯ */
.ta-risks {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.ta-risk-box {
    border-radius: 10px;
    padding: 18px;
    transition: all 0.3s ease;
}

.ta-risk-box--red { background: #fef2f2; border: 1px solid #fecaca; }
.ta-risk-box--yellow { background: #fffbeb; border: 1px solid #fef3c7; }
.ta-risk-box--ok { background: #f0fdf4; border-color: #bbf7d0; }

.ta-risk-title {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ta-risk-title--red { color: #b91c1c; }
.ta-risk-title--yellow { color: #b45309; }

.ta-risk-badge {
    display: none;
    margin-left: auto;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.ta-risk-badge--red { background: #fee2e2; color: #991b1b; }
.ta-risk-badge--yellow { background: #fef3c7; color: #92400e; }
.ta-risk-badge--ok { background: #dcfce7; color: #166534; }

.ta-risk-list {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.6;
}

.ta-risk-list--red { color: #991b1b; }
.ta-risk-list--yellow { color: #92400e; }

.ta-risk-item { margin-bottom: 8px; }

.ta-risk-ok {
    list-style: none;
    margin-left: -20px;
    color: #166534;
    font-size: 13.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 9. КАРТОЧКИ ОБЪЕКТОВ И ПОСТОВ */
.ta-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
}

.ta-cards-grid--posts {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.ta-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ta-card--post { padding: 16px; }

.ta-card-title {
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
    margin-bottom: 5px;
    line-height: 1.4;
}

.ta-card--post .ta-card-title {
    font-size: 15px;
    margin-bottom: 8px;
}

.ta-card-body {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
}

.ta-card-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.ta-card-row svg { flex-shrink: 0; }

.ta-card-qual {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #e2e8f0;
}

/* 10. ПРОТИВОРЕЧИЯ: ДЕТАЛИ, ЦИТАТЫ, ЗАПРОС НА РАЗЪЯСНЕНИЕ */
.ta-impact-pill {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
}

.ta-impact-pill--high { background: #fee2e2; color: #b91c1c; }
.ta-impact-pill--medium { background: #fef3c7; color: #b45309; }
.ta-impact-pill--low { background: #e2e8f0; color: #475569; }

.ta-inc-details {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ta-inc-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 18px;
}

.ta-inc-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.ta-inc-kind {
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
}

.ta-inc-impact {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.ta-inc-summary {
    font-size: 13px;
    color: #1e293b;
    line-height: 1.6;
    margin-bottom: 10px;
}

.ta-struct-row {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ta-struct-chip {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 2px 8px;
}

.ta-quotes-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

.ta-blockquote {
    margin: 0 0 8px 0;
    padding: 10px 14px;
    background: #f8fafc;
    border-left: 3px solid #2563eb;
    border-radius: 0 6px 6px 0;
    font-size: 12.5px;
    color: #334155;
    line-height: 1.6;
    font-style: italic;
}

.ta-quote-meta {
    font-size: 11px;
    color: #94a3b8;
    font-style: normal;
    margin-top: 4px;
}

.ta-legal {
    font-size: 12.5px;
    color: #475569;
    margin-bottom: 10px;
}

.ta-clarification {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px 14px;
}

.ta-clarification-label {
    font-size: 11px;
    font-weight: 700;
    color: #1d4ed8;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ta-clarification-text {
    font-size: 13px;
    color: #1e293b;
    line-height: 1.6;
}

/* 11. ДОСЛОВНЫЕ ЦИТАТЫ-ОСНОВАНИЯ */
.ta-citations-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ta-citation {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
}

.ta-citation-field {
    font-size: 12px;
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 4px;
}

.ta-citation-meta {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.ta-citation-text {
    font-size: 13px;
    color: #334155;
    line-height: 1.6;
    font-style: italic;
    white-space: pre-line;
}

/* 12. БЛОК КОНКУРЕНТОВ */
.ta-comp-rows {
    margin-bottom: 12px;
    font-size: 13px;
    color: #475569;
}

.ta-comp-cta {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.ta-comp-price {
    font-size: 14px;
    font-weight: 700;
    color: #1d4ed8;
}

/* 13. МОДАЛЬНЫЕ ОКНА */
.ta-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.ta-modal-backdrop--soft { background: rgba(15, 23, 42, 0.65); }
.ta-modal-backdrop--form { background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); z-index: 9999; }

.ta-modal {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    padding: 36px 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    position: relative;
}

.ta-modal--soft { padding: 32px 28px; }

.ta-modal--form {
    border-radius: 12px;
    max-width: 560px;
    padding: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    text-align: left;
    max-height: 90vh;
    overflow-y: auto;
}

.ta-modal-close {
    position: absolute;
    right: 18px;
    top: 18px;
    background: none;
    border: none;
    font-size: 22px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
}

.ta-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.ta-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.ta-modal-title--form {
    font-size: 18px;
    border: none;
    margin: 0;
}

.ta-modal-sub {
    font-size: 14px;
    color: #64748b;
    margin: 0 auto 24px;
    max-width: 440px;
    line-height: 1.5;
}

.ta-modal-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 20px;
    text-align: left;
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 0;
}

.ta-modal-box--perks {
    text-align: left;
    padding: 16px 18px;
    font-size: 13px;
    color: #334155;
    margin-bottom: 24px;
    line-height: 1.8;
}

.ta-perk {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ta-paywall-link {
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    padding: 13px 24px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    border-radius: 8px;
}

/* 14. ФОРМА ПРОФИЛЯ КОМПАНИИ */
.ta-form-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
}

.ta-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

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

.ta-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 4px;
}

.ta-label--sm {
    font-size: 11px;
    color: #64748b;
}

.ta-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    box-sizing: border-box;
}

.ta-input--sm {
    padding: 6px 10px;
    border-radius: 4px;
}

.ta-rates-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 18px;
}

.ta-rates-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.ta-rates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ta-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.ta-btn-ghost {
    padding: 10px 18px;
    border: 1px solid #cbd5e1;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #475569;
}

/* 15. ВРАЩАЮЩИЙСЯ СПИННЕР */
.preloader-spinner-wrapper {
    margin-bottom: 20px;
}

.circular-spinner {
    animation: rotate 1.8s linear infinite;
    width: 60px;
    height: 60px;
}

.circular-spinner .path-bg {
    stroke: #e2e8f0;
}

.circular-spinner .path {
    stroke: var(--accent-blue, #2563eb);
    stroke-linecap: round;
    animation: dash 1.4s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.spin-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* 16. ШАГИ ПРЕЛОАДЕРА */
.preloader-step {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.preloader-step:last-child {
    margin-bottom: 0;
}

.step-done {
    color: #059669;
    font-weight: 600;
}

.step-done .step-icon {
    color: #059669;
}

.step-active {
    color: #2563eb;
    font-weight: 600;
}

.step-active .step-icon {
    color: #2563eb;
}

.step-pending {
    color: #94a3b8;
}

.step-pending .step-icon {
    color: #cbd5e1;
}

/* 17. СТИЛИ ПЕЧАТИ ОТЧЕТА (ВЕРСИЯ ДЛЯ ПЕЧАТИ И PDF) */
@page {
    size: A4 portrait;
    margin: 12mm 12mm 12mm 12mm;
}

@media print {
    /* Полное исключение шапки, подвала, навигации, сайдбара и интерактивных кнопок */
    header,
    footer,
    nav,
    aside,
    .main-header,
    .site-header,
    .header-container,
    .main-footer,
    .site-footer,
    .footer-container,
    .back-link,
    .detail-sidebar,
    .doc-sidebar,
    .sidebar-card,
    #reveal-cta-banner,
    .ta-cta,
    .ta-comp-cta button,
    #subscription-required-modal,
    #analysis-preloader-modal,
    #company-modal-backdrop,
    .ta-modal-backdrop,
    #print-actions-bar,
    .ta-print-bar,
    .btn-action-outline,
    .btn-reveal-main,
    .btn-save,
    .btn-primary,
    button,
    .top-nav,
    .breadcrumb,
    .ta-alert-btn--ok,
    .spin-icon,
    #profile-warning-alert,
    #sidebar-company {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Базовые параметры документа для качественной печати */
    html, body {
        background: #ffffff !important;
        color: #0f172a !important;
        font-size: 10.5pt !important;
        line-height: 1.35 !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Снятие ограничений ширины контейнера и 2-колоночного грида */
    .container {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .detail-grid {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        gap: 0 !important;
    }

    .detail-main {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Оформление заголовка закупки на первом листе */
    .detail-header {
        margin-bottom: 14px !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .detail-title {
        font-size: 18pt !important;
        line-height: 1.25 !important;
        margin-top: 6px !important;
        margin-bottom: 10px !important;
        color: #0f172a !important;
    }

    .detail-badges {
        margin-bottom: 6px !important;
        gap: 6px !important;
    }

    .badge {
        font-size: 8.5pt !important;
        padding: 2px 8px !important;
        border: 1px solid #cbd5e1 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Карточки секций: четкие контуры, отсутствие теней и запрет разрыва внутри */
    .info-card,
    .calc-section-card,
    .ta-panel,
    .ta-card {
        background: #ffffff !important;
        border: 1px solid #cbd5e1 !important;
        box-shadow: none !important;
        border-radius: 6px !important;
        padding: 14px 16px !important;
        margin-bottom: 14px !important;
        page-break-inside: avoid;
        break-inside: avoid;
    }

    #analysis-section,
    #competitors-section {
        position: static !important;
        width: 100% !important;
        margin: 0 0 14px 0 !important;
        padding: 14px 16px !important;
        box-shadow: none !important;
        border: 1px solid #cbd5e1 !important;
    }

    .info-card-title,
    .ta-panel-title {
        font-size: 13pt !important;
        margin-bottom: 10px !important;
        padding-bottom: 8px !important;
        border-bottom: 1px solid #e2e8f0 !important;
        color: #0f172a !important;
    }

    .detail-section {
        margin-bottom: 12px !important;
    }

    .section-label {
        font-size: 8pt !important;
        letter-spacing: 0.5px !important;
        margin-bottom: 4px !important;
        color: #64748b !important;
    }

    .section-content {
        font-size: 10.5pt !important;
        line-height: 1.4 !important;
    }

    /* Таблицы и параметры */
    table,
    .param-table,
    .ta-table {
        width: 100% !important;
        border-collapse: collapse !important;
        page-break-inside: auto;
    }

    tr {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    th, td, .param-name, .param-val {
        padding: 5px 8px !important;
        font-size: 9.5pt !important;
        border-color: #e2e8f0 !important;
    }

    /* Элементы анализа: карточки постов, расчеты, риски, цитаты */
    .ta-post-grid,
    .ta-calc-grid,
    .ta-stats-grid {
        display: grid !important;
        gap: 10px !important;
    }

    .ta-card--post,
    .ta-inc-card,
    .ta-citation,
    .ta-stat-box,
    .ta-metric-box {
        border: 1px solid #e2e8f0 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        break-inside: avoid;
        padding: 10px 12px !important;
    }

    /* Выпадающий список организации при печати фиксируется аккуратным текстом */
    .ta-calc-select-wrap {
        display: inline-flex !important;
        align-items: center !important;
    }

    .ta-calc-select {
        border: none !important;
        background: transparent !important;
        font-weight: 700 !important;
        font-size: 10.5pt !important;
        color: #0f172a !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        padding: 0 !important;
    }

    /* Сохранение контраста для бейджей рисков и меток */
    .ta-risk-badge,
    .ta-badge,
    .badge-status,
    .badge-law,
    .badge-region {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}


/* Кнопки действий в панели аудита (печать / PDF) */
.btn-action-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action-outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

/* Модификаторы бейджа рисков видимы только при заполнении (JS) */
.ta-risk-badge--red, .ta-risk-badge--yellow, .ta-risk-badge--ok { display: inline-block; }
