@media print {
    @page {
        size: A4 portrait;
        margin: 10mm;
    }

    body {
        margin: 0;
    }

    /* Скрываем всё кроме print-area */


    #wc-root.print-area,
    #wc-root.print-area * {
        visibility: visible;
    }
   
    /* Основной контейнер для печати */
    #wc-root.print-area {
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        overflow: visible;
        page-break-inside: avoid;
        /* не разрывать на страницах */
        transform: scale(0.95);
        /* уменьшаем до 95%, чтобы помещалось на A4 */
        transform-origin: top left;
        width: 100%;
    }

    /* Canvas корректно масштабируется */
    #wc-root.print-area canvas {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }

    /* Убираем разрывы страниц после блока */
    #wc-root.print-area+* {
        display: none !important;
    }

    /* Опционально: предотвращаем разрывы внутри таблиц */
    #wc-root.print-area table {
        page-break-inside: avoid;
        border-collapse: collapse;
    }

}

#wc-root * {
    font-family: "Proxima", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
}
#wc-root hr{
    margin-top: 16px;margin-bottom: 16px;
}
#wc-root .wc-select {
    width: 100%;
    height: 30px;
    padding: 0 8px;
    border: 1px solid #3b82f6;
    background: #e6f2ff;
    border-radius: 4px;
    font-size: 13px;
    color: #1a1a1a;
    cursor: pointer;
    appearance: auto;
}

#wc-root .nice-select {
    width: 100%;
    height: 30px;
    line-height: 28px;
    padding: 0 32px 0 10px;
    border: 1px solid #3b82f6;
    background: #e6f2ff;
    border-radius: 4px;
    font-size: 13px;
    color: #1a1a1a;
    transition: 0.2s ease;
}

/* стрелка */
#wc-root .nice-select:after {
    right: 10px;
    border-bottom: 2px solid #2b86c5;
    border-right: 2px solid #2b86c5;
    height: 6px;
    width: 6px;
}
#wc-root td.blocked input{
    background-color: white;
    border:none
}
.nice-select .option {
    line-height: 25px;
}

#wc-root .nice-select:hover {
    border-color: #0049bc;
}

.nice-select .list:hover .option:not(:hover) {
    color: #1a1a1a;
}

#wc-root .nice-select.open {
    border-color: #0049bc;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
    background: #ffffff;
}

#wc-root .nice-select .nice-select-dropdown {
    width: 100%;
}

#wc-root .nice-select .list {
    width: 100%;
    border-radius: 4px;
    border: 1px solid #dbe2ea;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    font-size: 13px;
    margin: 0;
}

#wc-root .nice-select .option {
    padding: 6px 10px;
}

#wc-root .nice-select .option:hover {
    background: #e6f2ff;
}

#wc-root .nice-select .option.selected {
    background: #0049bc;
    color: #ffffff;
}

#wc-root .nice-select.disabled {
    background: #f1f1f1;
    border-color: #d0d0d0;
    color: #777;
    cursor: not-allowed;
}

.wc-table td .nice-select {
    height: 26px;
    line-height: 24px;
    font-size: 12px;
}

#wc-root {
    font-family: Arial, sans-serif;
    background: #f3f6fa;
    padding: 25px;
    border-radius: 14px;
    max-width: 1200px;
    margin: 32px auto;
    width: 100%;
}
#wc-root .wc-text{
    color: #1a1a1a;
    padding-top: 12px;
    padding-bottom: 12px;
}
#wc-root .wc-text.warning{
   background: rgb(240, 71, 71);
   border-radius: 6px;
   padding: 6px 18px;
   color: white;
   font-weight: 500;
}
/* TOP */
.wc-top {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.wc-info-table {
    border-collapse: collapse;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.wc-info-table td {
    padding: 8px 12px;
    border: 1px solid #dbe2ea;
    color: #1a1a1a;
}

/* SECTION TITLE */
.wc-section-title {
    background: linear-gradient(90deg, #0049bc, #4ca2d8);
    color: #fff;
    padding: 8px 14px;
    font-weight: bold;
    margin-bottom: 15px;
    border-radius: 6px;
}

/* MAIN */
.wc-main {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.wc-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    padding: 15px;
}

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

.wc-table th,
.wc-table td {
    border: 1px solid #dbe2ea;
    padding: 6px 8px;
    text-align: center;
    color: #1a1a1a;
}

.wc-table th {
    background: #eef4fb;
    font-weight: 600;
}

/* INPUT STATES */
.wc-table input,
.wc-info-table input {
    width: 100%;
    border: 1px solid #3b82f6;
    background: #e6f2ff;
    padding: 4px;
    text-align: center;
    border-radius: 4px;
    box-sizing: border-box;
    max-width: 216px;
}

.wc-table input:focus,
.wc-info-table input:focus {
    outline: none;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.wc-table input:disabled,
.wc-info-table input:disabled {
    background: #f1f1f1;
    border: 1px solid #d0d0d0;
    color: #555;
    font-weight: 600;
}

.wc-table input:invalid,
.wc-info-table input:invalid {
    border-color: #E6007D;
}

/* BALANCING */
.wc-balancing {
    background: #ffffff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    min-width: 220px;
    color: #1a1a1a;
}

.wc-balancing-title {
    font-weight: bold;
    margin-bottom: 10px;
}

.wc-balancing label {
    display: block;
    margin-bottom: 8px;
}

.wc-buttons {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.wc-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    width: 100%;
}

.wc-btn--primary {
    background: #0049bc;
    color: #fff;
}

.wc-btn--secondary {
    background: #e5e7eb;
}

/* SUMMARY */
.wc-summary {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.wc-summary {
    margin-top: 10px;
}

.wc-summary td {
    height: 56px;
}

.line {
    display: flex;
    gap: 8px;


}

.line input {
    width: 80px;
}

/* RESULTS */
.wc-results {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wc-results-table th {
    background: #eef4fb;
    font-weight: 600;
}

.wc-results-table td {
    text-align: center;
}

.wc-results-table .unit {
    color: #6b7280;
    font-size: 12px;
}

.wc-bold {
    font-weight: 600;
}

.wc-divider td {
    padding: 4px;
    background: #f3f6fa;
    border: none;
}

.chart-wrapper {
    width: 100%;
    aspect-ratio: 674 / 377;
    min-width: 0;
}

canvas {
    max-width: 100% !important;

}

@media (max-width: 1199px) {
    .wc-main {
        flex-direction: column;
    }

    #wc-root {
        padding: 24px 8px;

    }

    #wc-root .wc-card td:nth-child(2) {
        width: 30%;

    }

    #wc-root .wc-card td:nth-child(3) {
        width: 20%;

    }
}

@media (max-width: 768px) {
    #wc-root {
        padding: 24px 8px;
        font-size: 12px;
    }

    .wc-card {
        padding: 15px 8px;
        overflow-y: auto;
    }

    #wc-root .wc-card th:first-child {
        width: 75px;
    }

    .wc-top {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 48px;
    }

    .wc-summary {
        flex-direction: column;
        gap: 12px;
    }

    .wc-summary .wc-info-table {
        width: 100%;

    }

    .wc-summary .wc-info-table td:first-child {
        width: 30%;
    }
}