* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f4f8;
    padding: 30px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

h1 {
    color: #1a2a4a;
    font-size: 28px;
    text-align: center;
    margin-bottom: 8px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.back-link {
    display: inline-block;
    color: #3182ce;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 20px;
    font-size: 14px;
}

.back-link:hover {
    text-decoration: underline;
}

.form-section {
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.form-section h2 {
    font-size: 18px;
    color: #1a2a4a;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3182ce;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 180px;
    position: relative;
}

.form-group.full-width {
    flex: 1 1 100%;
}

label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #2d3748;
    margin-bottom: 5px;
}

.tooltip-trigger {
    display: inline-block;
    position: relative;
    cursor: pointer;
    margin-left: 6px;
    font-weight: 700;
    color: #3182ce;
    font-size: 14px;
    font-style: normal;
}

.tooltip-trigger .tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: 300px;
    max-width: 90vw;
    background: #1a2a4a;
    color: #fff;
    text-align: left;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    position: absolute;
    z-index: 100;
    bottom: 130%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    pointer-events: none;
    white-space: normal;
    word-wrap: break-word;
}

.tooltip-trigger .tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1a2a4a;
}

.tooltip-trigger:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

input, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
    background: #fff;
}

input:focus, select:focus {
    border-color: #3182ce;
    outline: none;
    box-shadow: 0 0 0 3px rgba(49,130,206,0.1);
}

small {
    display: block;
    color: #718096;
    font-size: 12px;
    margin-top: 4px;
}

.main-btn {
    width: 100%;
    padding: 14px;
    background: #3182ce;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.main-btn:hover {
    background: #2c5282;
}

/* ===== КНОПКА РАССЧИТАТЬ K2 ===== */
.btn-calc {
    padding: 10px 24px;
    background: #38a169;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    width: auto;
    min-width: 180px;
    margin-top: 8px;
}

.btn-calc:hover {
    background: #2f855a;
}

.btn-calc:active {
    transform: scale(0.97);
}

.btn-calc:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

#results {
    margin-top: 30px;
    padding: 25px;
    background: #ebf8ff;
    border-radius: 12px;
    border: 2px solid #3182ce;
}

#results h2 {
    color: #1a2a4a;
    margin-bottom: 16px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #bee3f8;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 600;
    color: #2d3748;
}

.result-value {
    font-weight: 700;
    color: #1a2a4a;
    font-size: 16px;
}

.result-final {
    background: #2c5282;
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-final .result-label {
    color: #fff;
}

.result-final .result-value {
    color: #f6e05e;
    font-size: 24px;
}

.recommendations {
    margin-top: 15px;
    font-size: 13px;
    color: #4a5568;
    background: #edf2f7;
    padding: 12px 16px;
    border-radius: 6px;
}

.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary {
    background: #e2e8f0;
    color: #2d3748;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.print-btn-container {
    margin-top: 15px;
    text-align: right;
}

#co2Params, #cnPassportParams, #cnCalcParams {
    display: none;
}

/* ===== ВАЖНОЕ ПРИМЕЧАНИЕ ===== */
.important-note {
    background: #1a2a4a;
    color: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 15px;
}

.important-note strong {
    color: #f6e05e;
}

.important-note .highlight {
    color: #f6e05e;
    font-weight: 700;
}

@media (max-width: 600px) {
    .container { padding: 20px; }
    .form-row { flex-direction: column; }
    .form-group { min-width: 100%; }
    .result-final { flex-direction: column; text-align: center; gap: 5px; }
    .tooltip-trigger .tooltip-text {
        width: 260px;
        left: 0;
        transform: translateX(0) translateY(5px);
        bottom: 130%;
    }
    .tooltip-trigger:hover .tooltip-text {
        transform: translateX(0) translateY(0);
    }
    .btn-calc {
        width: 100%;
        min-width: unset;
    }
}
.result-final {
    background: #2c5282;
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-final .result-label {
    color: #ffffff;
}

.result-final .result-value {
    color: #f6e05e;
}

.important-note {
    background: #1a2a4a;
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 15px;
}

.important-note strong {
    color: #f6e05e;
}
