/* Калькуляторы крепежа и химии САВИК */

.calc-page-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 15px 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1e293b;
}

/* Hero заголовок */
.calc-hero {
    margin-bottom: 25px;
    text-align: left;
}

.calc-hero-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 12px;
}

.calc-main-title {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px 0;
    line-height: 1.25;
}

.calc-main-desc {
    font-size: 16px;
    color: #475569;
    max-width: 860px;
    margin: 0;
    line-height: 1.6;
}

/* Вкладки переключения калькуляторов */
.calc-tabs-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
}

.calc-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.calc-tab-btn:hover {
    border-color: #055ca7;
    color: #055ca7;
    background: #f8fafc;
}

.calc-tab-btn.is-active {
    background: #055ca7;
    border-color: #055ca7;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(5, 92, 167, 0.3);
}

.calc-tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Карточки разделов */
.calc-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
    padding: 28px;
    margin-bottom: 30px;
}

.calc-section {
    padding-bottom: 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid #f1f5f9;
}

.calc-section:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

/* Заголовки шагов */
.calc-step-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.calc-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #055ca7;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(5, 92, 167, 0.35);
}

.calc-step-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

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

/* Шаг 1: Сетка категорий с векторными SVG иконками */
.calc-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 12px;
}

.calc-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 10px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    user-select: none;
    color: #334155;
}

.calc-category-card:hover {
    background: #ffffff;
    border-color: #055ca7;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(5, 92, 167, 0.12);
    color: #055ca7;
}

.calc-category-card.is-active {
    background: #eff6ff;
    border-color: #055ca7;
    color: #055ca7;
    box-shadow: 0 0 0 3px rgba(5, 92, 167, 0.18);
}

.calc-category-svg {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #055ca7;
    transition: transform 0.2s ease;
}

.calc-category-card:hover .calc-category-svg {
    transform: scale(1.08);
}

.calc-category-card.is-active .calc-category-svg {
    color: #055ca7;
}

.calc-category-name {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

/* Шаг 2: Сетка стандартов */
.calc-standards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.calc-standard-card {
    display: flex;
    flex-direction: column;
    padding: 18px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.calc-standard-card:hover {
    background: #ffffff;
    border-color: #055ca7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 92, 167, 0.12);
}

.calc-standard-card.is-active {
    background: #eff6ff;
    border-color: #055ca7;
    box-shadow: 0 0 0 3px rgba(5, 92, 167, 0.18);
}

.calc-standard-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.calc-standard-code {
    font-size: 16px;
    font-weight: 800;
    color: #055ca7;
}

.calc-standard-gost {
    font-size: 11px;
    color: #64748b;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.calc-standard-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.calc-standard-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
    margin-top: auto;
}

.calc-standard-badge-custom {
    display: inline-block;
    margin-top: 8px;
    font-size: 11px;
    color: #055ca7;
    font-weight: 600;
}

/* Шаг 3: Выбор размеров */
.calc-size-selectors-wrap {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.calc-size-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calc-size-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.calc-selected-badge {
    color: #055ca7;
    font-size: 14px;
    font-weight: 700;
}

.calc-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.calc-chip {
    padding: 8px 16px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.calc-chip:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

.calc-chip.is-active {
    background: #055ca7;
    border-color: #055ca7;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(5, 92, 167, 0.35);
}

/* Шаг 4: Результат и карточка выбранного */
.calc-selected-item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 24px;
    border-left: 5px solid #055ca7;
    flex-wrap: wrap;
    gap: 16px;
}

.calc-item-main {
    flex: 1;
    min-width: 250px;
}

.calc-item-din {
    display: inline-block;
    padding: 2px 8px;
    background: #055ca7;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    margin-bottom: 6px;
}

.calc-item-name {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.calc-item-meta {
    font-size: 13px;
    color: #64748b;
}

.calc-item-weight-box {
    text-align: right;
    background: #ffffff;
    padding: 12px 18px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.calc-item-weight-val {
    font-size: 24px;
    font-weight: 800;
    color: #055ca7;
    line-height: 1.1;
}

.calc-item-weight-lbl {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.calc-item-weight-source {
    font-size: 11px;
    color: #10b981;
    font-weight: 600;
    margin-top: 4px;
}

/* Двусторонний калькулятор: Вводные поля */
.calc-inputs-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}

.calc-converter-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    padding: 8px;
}

.calc-input-card {
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 18px;
    transition: border-color 0.2s;
}

.calc-input-card:focus-within {
    border-color: #055ca7;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(5, 92, 167, 0.15);
}

.calc-input-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

.calc-unit-tag {
    background: #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}

.calc-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.calc-big-input {
    width: 100%;
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    background: transparent;
    border: none;
    outline: none;
    padding: 4px 30px 4px 0;
    font-family: inherit;
}

.calc-input-clear {
    position: absolute;
    right: 0;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.calc-input-clear:hover {
    color: #ef4444;
}

.calc-quick-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
}

.calc-quick-btn {
    padding: 5px 11px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
}

.calc-quick-btn:hover {
    background: #055ca7;
    border-color: #055ca7;
    color: #ffffff;
}

/* Информационная полоса */
.calc-summary-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
}

.calc-summary-stat {
    display: flex;
    flex-direction: column;
}

.calc-stat-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 2px;
}

.calc-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.calc-stat-hint {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Кнопки действий */
.calc-actions-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.calc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
    user-select: none;
    box-sizing: border-box !important;
    max-width: 100% !important;
    white-space: normal !important;
    text-align: center !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    line-height: 1.35 !important;
}

.calc-btn-primary {
    background: #055ca7;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(5, 92, 167, 0.25);
}

.calc-btn-primary:hover {
    background: #03447c;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(5, 92, 167, 0.35);
    color: #ffffff;
}

.calc-btn-outline {
    background: #ffffff;
    color: #055ca7;
    border: 2px solid #055ca7;
    box-sizing: border-box !important;
    max-width: 100% !important;
    white-space: normal !important;
    text-align: center !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    line-height: 1.35 !important;
}

.calc-btn-outline:hover {
    background: #f0f7ff;
    color: #03447c;
}

.calc-btn-success {
    background: #16a34a;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

.calc-btn-success:hover {
    background: #15803d;
    color: #ffffff;
}

.calc-btn-danger {
    color: #ef4444;
    border-color: #fca5a5;
}

.calc-btn-danger:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

.calc-btn-block {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* =========================================================
   СТИЛИ КАЛЬКУЛЯТОРА ХИМИЧЕСКОГО АНКЕРА (ITH)
   ========================================================= */
.calc-chemical-intro {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.calc-chemical-icon-box {
    display: none !important;
}

.calc-material-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.calc-radio-hidden {
    display: none;
}

.calc-material-option {
    cursor: pointer;
    user-select: none;
}

.calc-material-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px;
    transition: all 0.2s ease;
}

.calc-material-option:hover .calc-material-card {
    border-color: #055ca7;
    background: #ffffff;
}

.calc-material-option.is-active .calc-material-card {
    border-color: #055ca7;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(5, 92, 167, 0.18);
}

.calc-material-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.calc-material-desc {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
    line-height: 1.4;
}

.calc-material-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    background: #e2e8f0;
    color: #055ca7;
    border-radius: 6px;
}

.calc-material-option.is-active .calc-material-badge {
    background: #dbeafe;
    color: #0284c7;
}

/* Параметры химического анкера */
.calc-chem-params-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.calc-chem-param-box {
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 18px;
    transition: border-color 0.2s;
}

.calc-chem-param-box:focus-within {
    border-color: #055ca7;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(5, 92, 167, 0.15);
}

.calc-chem-param-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

/* Плашка объема инъекционной массы */
.calc-chem-volume-banner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border-left: 5px solid #055ca7;
    flex-wrap: wrap;
    gap: 16px;
}

.calc-chem-vol-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.calc-chem-vol-lbl {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
    font-weight: 600;
}

.calc-chem-vol-num {
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
}

.calc-chem-vol-divider {
    width: 1px;
    height: 48px;
    background: #cbd5e1;
}

/* Сетка карточек туб */
.calc-tubes-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 20px !important;
    align-items: stretch !important;
    margin-bottom: 24px !important;
}

.calc-tube-card {
    background: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 24px 20px 24px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: auto !important;
    min-height: 100% !important;
    box-sizing: border-box !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    overflow: visible !important;
}

.calc-tube-card * {
    box-sizing: border-box !important;
}

.calc-tube-card:hover {
    border-color: #055ca7 !important;
    box-shadow: 0 8px 24px rgba(5, 92, 167, 0.12) !important;
    transform: translateY(-2px) !important;
}

.calc-tube-buttons {
    margin-top: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    padding-top: 14px !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
}

.calc-tube-card .calc-btn {
    width: 100% !important;
    min-height: 42px !important;
    padding: 10px 14px !important;
    font-size: 13.5px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 8px !important;
    position: static !important;
    float: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
}

.calc-tube-card .calc-btn-primary {
    background: #055ca7 !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(5, 92, 167, 0.25) !important;
}

.calc-tube-card .calc-btn-primary:hover {
    background: #03447c !important;
    color: #ffffff !important;
}

.calc-tube-card .calc-btn-outline {
    background: #ffffff !important;
    color: #055ca7 !important;
    border: 2px solid #055ca7 !important;
}

.calc-tube-card .calc-btn-outline:hover {
    background: #f0f7ff !important;
    color: #03447c !important;
}

.calc-tube-badge-popular {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #055ca7;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calc-tube-badge-economy {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #16a34a;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calc-tube-name {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 0 6px 0 !important;
    line-height: 1.35 !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: flex-start !important;
}

.calc-tube-volume {
    font-size: 13px !important;
    color: #64748b !important;
    margin-bottom: 16px !important;
}

.calc-tube-result-box {
    background: #f8fafc !important;
    border-radius: 10px !important;
    padding: 14px !important;
    margin-bottom: 16px !important;
    flex-shrink: 0 !important;
}

.calc-tube-qty-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.calc-tube-qty-lbl {
    font-size: 13px;
    color: #64748b;
}

.calc-tube-qty-val {
    font-size: 22px;
    font-weight: 800;
    color: #055ca7;
}

.calc-tube-sum-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.calc-tube-sum-lbl {
    font-size: 13px;
    color: #334155;
    font-weight: 600;
}

.calc-tube-sum-val {
    font-size: 18px;
    font-weight: 800;
    color: #16a34a;
}

.calc-tube-price-per-ml {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
    text-align: right;
}

.calc-chem-note {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 13px;
    color: #92400e;
    line-height: 1.5;
    margin-top: 15px;
}

/* =========================================================
   ТАБЛИЦА СМЕТЫ / СПЕЦИФИКАЦИИ
   ========================================================= */
.calc-cart-card {
    border-top: 4px solid #16a34a;
}

.calc-estimate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.calc-estimate-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px 0;
}

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

.calc-estimate-totals-inline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.calc-total-pill {
    padding: 6px 14px;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 13px;
    color: #475569;
}

.calc-total-pill-accent {
    background: #dcfce7;
    color: #15803d;
    font-weight: 600;
}

.calc-total-pill-accent strong {
    font-size: 15px;
}

.calc-table-responsive {
    overflow-x: auto;
    margin-bottom: 20px;
}

.calc-estimate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.calc-estimate-table th {
    background: #f8fafc;
    padding: 12px 14px;
    font-weight: 700;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
}

.calc-estimate-table td {
    padding: 14px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.calc-estimate-table tr:hover {
    background: #f8fafc;
}

/* Явное, крупное отображение наименования в таблице */
.calc-table-item-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 3px;
    line-height: 1.35;
}

.calc-table-item-meta {
    font-size: 12px;
    color: #64748b;
    line-height: 1.3;
}

.calc-table-item-badge {
    display: inline-block;
    padding: 1px 6px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    margin-right: 6px;
}

.calc-table-qty-input {
    width: 90px;
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

.calc-table-delete-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
}

.calc-table-delete-btn:hover {
    color: #ef4444;
}

.calc-estimate-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.calc-estimate-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Модальное окно */
.calc-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.calc-modal-window {
    background: #ffffff;
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    overflow-y: auto;
}

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

.calc-modal-close:hover {
    color: #0f172a;
}

.calc-modal-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0;
}

.calc-modal-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.calc-form-group {
    margin-bottom: 14px;
}

.calc-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.calc-form-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s;
}

.calc-form-input:focus {
    outline: none;
    border-color: #055ca7;
    box-shadow: 0 0 0 3px rgba(5, 92, 167, 0.12);
}

.calc-form-estimate-preview {
    background: #f1f5f9;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: #334155;
    margin: 16px 0;
}

.calc-form-agreement {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
    margin-bottom: 16px;
}

.calc-form-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.calc-form-success h4 {
    color: #065f46;
    margin: 0 0 8px 0;
    font-size: 18px;
}

.calc-form-success p {
    color: #047857;
    font-size: 14px;
    margin: 0;
}

/* =========================================================
   АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ
   ========================================================= */
@media (max-width: 768px) {
    .calc-page-container {
        padding: 10px 4px 50px !important;
        margin: 0 !important;
    }
    .calc-hero {
        padding: 18px 14px !important;
        background: #ffffff !important;
        border-radius: 14px !important;
        border: 1px solid #e2e8f0 !important;
        margin-bottom: 16px !important;
    }
    .calc-hero-badge {
        font-size: 11px !important;
        padding: 3px 8px !important;
    }
    .calc-main-title {
        font-size: 20px !important;
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
    }
    .calc-main-desc {
        font-size: 13px !important;
        line-height: 1.45 !important;
    }
    .calc-tabs-nav {
        flex-direction: column !important;
        gap: 8px !important;
        margin-bottom: 16px !important;
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }
    .calc-tab-btn {
        width: 100% !important;
        padding: 12px 14px !important;
        font-size: 14px !important;
        border-radius: 10px !important;
        justify-content: flex-start !important;
    }
    .calc-card {
        padding: 16px 12px !important;
        border-radius: 14px !important;
        margin-bottom: 16px !important;
    }
    .calc-section {
        padding-bottom: 18px !important;
        margin-bottom: 18px !important;
    }
    .calc-step-header {
        margin-bottom: 14px !important;
        gap: 10px !important;
    }
    .calc-step-num {
        width: 28px !important;
        height: 28px !important;
        font-size: 13px !important;
    }
    .calc-step-title {
        font-size: 16px !important;
        line-height: 1.3 !important;
    }
    .calc-step-subtitle {
        font-size: 12px !important;
    }
    .calc-categories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .calc-category-card {
        padding: 10px 6px !important;
        border-radius: 10px !important;
        min-height: 72px !important;
    }
    .calc-category-svg {
        width: 26px !important;
        height: 26px !important;
        margin-bottom: 4px !important;
    }
    .calc-category-name {
        font-size: 11px !important;
        line-height: 1.25 !important;
    }
    .calc-standards-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    .calc-standard-card {
        padding: 14px 12px !important;
        border-radius: 10px !important;
    }
    .calc-chips-container {
        gap: 6px !important;
    }
    .calc-chip {
        padding: 7px 12px !important;
        font-size: 13px !important;
        border-radius: 6px !important;
    }
    .calc-material-toggle {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    .calc-inputs-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    .calc-converter-arrow {
        transform: rotate(90deg) !important;
        padding: 4px !important;
        align-self: center !important;
    }
    .calc-input-card {
        padding: 14px 12px !important;
        border-radius: 10px !important;
    }
    .calc-big-input {
        font-size: 22px !important;
        padding: 4px 26px 4px 0 !important;
    }
    .calc-selected-item-info {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        padding: 14px 12px !important;
    }
    .calc-item-main {
        min-width: 0 !important;
        width: 100% !important;
    }
    .calc-item-weight-box {
        text-align: left !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 12px !important;
    }
    .calc-summary-strip {
        grid-template-columns: 1fr !important;
        padding: 12px 10px !important;
        border-radius: 10px !important;
        gap: 10px !important;
    }
    .calc-actions-row {
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .calc-btn,
    a.calc-btn,
    button.calc-btn,
    .calc-btn-outline,
    .calc-btn-primary,
    .calc-btn-block {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 44px !important;
        height: auto !important;
        font-size: 13.5px !important;
        white-space: normal !important;
        text-align: center !important;
        box-sizing: border-box !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        line-height: 1.35 !important;
        padding: 10px 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .calc-chem-params-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .calc-chem-param-box {
        padding: 14px 12px !important;
        border-radius: 10px !important;
    }
    .calc-quick-buttons {
        gap: 6px !important;
    }
    .calc-quick-btn {
        padding: 6px 10px !important;
        font-size: 13px !important;
        min-height: 36px !important;
        border-radius: 6px !important;
    }
    .calc-chem-volume-banner {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        padding: 14px 12px !important;
        border-radius: 12px !important;
        border-left-width: 4px !important;
    }
    .calc-chem-vol-divider {
        display: none !important;
    }
    .calc-chem-vol-stat {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        text-align: left !important;
    }
    .calc-chem-vol-num {
        font-size: 20px !important;
    }
    .calc-tubes-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
    .calc-tube-card {
        padding: 18px 14px 20px 14px !important;
        border-radius: 12px !important;
        height: auto !important;
        min-height: auto !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }
    .calc-tube-buttons {
        margin-top: 14px !important;
        padding-top: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    .calc-tube-card .calc-btn {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 42px !important;
        height: auto !important;
        font-size: 13px !important;
        padding: 10px 10px !important;
        line-height: 1.35 !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        box-sizing: border-box !important;
    }
    .calc-estimate-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    .calc-estimate-totals-inline {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 6px !important;
    }
    .calc-total-pill {
        font-size: 12px !important;
        padding: 6px 10px !important;
        text-align: center !important;
    }
    .calc-table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        border-radius: 8px !important;
        border: 1px solid #e2e8f0 !important;
        margin-bottom: 12px !important;
        position: relative !important;
    }
    .calc-table-responsive::before {
        content: "← Прокручивайте таблицу вправо для просмотра колонок →";
        display: block;
        font-size: 11px;
        color: #94a3b8;
        text-align: center;
        padding: 6px;
        background: #f8fafc;
        border-bottom: 1px solid #e2e8f0;
    }
    .calc-estimate-footer {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    .calc-estimate-actions {
        flex-direction: column !important;
        width: 100% !important;
        gap: 8px !important;
    }
    .calc-modal-window {
        padding: 20px 14px !important;
        border-radius: 14px !important;
        max-width: 95vw !important;
    }
    .calc-modal-title {
        font-size: 18px !important;
    }
}

@media (max-width: 480px) {
    .calc-tube-card {
        padding: 16px 12px 18px 12px !important;
    }
    .calc-btn,
    a.calc-btn,
    button.calc-btn,
    .calc-btn-outline,
    .calc-btn-primary,
    .calc-btn-block {
        font-size: 12.5px !important;
        padding: 9px 8px !important;
        line-height: 1.3 !important;
    }
    .calc-tube-card .calc-btn {
        font-size: 12px !important;
        padding: 8px 6px !important;
        min-height: 40px !important;
    }
}

/* =========================================================
   ПЕЧАТЬ СМЕТЫ
   ========================================================= */
@media print {
    body * {
        visibility: hidden;
    }
    #estimateCard, #estimateCard * {
        visibility: visible;
    }
    #estimateCard {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none;
        border: none;
        padding: 0;
    }
    .calc-estimate-footer, .calc-table-delete-btn, .calc-table-qty-input {
        display: none !important;
    }
}
