/* ========== СТИЛИ ДЛЯ ФОРМЫ ВХОДА ========== */
#login-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f0f2f5;
    font-family: Arial, sans-serif;
}
.login-box {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    width: 400px;
    text-align: center;
}
.login-box h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 24px;
}
.login-box input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}
.login-box button {
    width: 100%;
    padding: 14px;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s;
}
.login-box button:hover {
    background: #1a252f;
}
.error {
    color: #e74c3c;
    margin: 15px 0;
    font-weight: bold;
}

/* ========== СТИЛИ ДЛЯ БИЗНЕС-ПЛАНА ========== */
#business-plan {
    display: none;
    font-family: 'Times New Roman', serif;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 auto;
    padding: 10mm 5mm;
    background: #fff;
    color: #000;
}

h1 {
    text-align: center;
    font-size: 18px;
    text-transform: uppercase;
    font-weight: bold;
    margin: 5px 0 15px 0;
    padding: 0;
    border-bottom: 2px solid #000;
}

.section-title {
    font-weight: bold;
    margin: 15px 0 8px 0;
    text-decoration: underline;
}

input, textarea, select {
    width: 100%;
    padding: 2px 4px;
    margin: 0 0 5px 0;
    border: none;
    border-bottom: 1px solid #000;
    font-family: 'Times New Roman', serif;
    font-size: 14px;
    box-sizing: border-box;
    resize: vertical;
    overflow-y: auto;
    min-height: 22px;
    line-height: 1.4;
}

textarea {
    min-height: 60px;
    line-height: 1.5;
    white-space: pre-wrap;
    padding: 6px 8px;
}

textarea.auto-resize {
    overflow-y: hidden;
    resize: none;
    height: auto;
    min-height: 60px;
}

/* ========== СТИЛИ ТАБЛИЦ — ВСЁ ПО ЦЕНТРУ ========== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    page-break-inside: avoid;
}

th, td {
    border: 1px solid #000;
    padding: 4px 6px;
    text-align: center; /* ← ВСЁ ПО ЦЕНТРУ, КАК В ВАШЕМ .DOCX */
    vertical-align: top;
    font-size: 13px;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

/* ========== СТИЛИ ДЛЯ ПЕЧАТИ ========== */
@media print {
    body, #business-plan {
        margin: 0 !important;
        padding: 10mm 5mm !important;
        font-family: 'Times New Roman', serif !important;
        font-size: 12pt !important;
        line-height: 1.4 !important;
    }

    input:not(td input), textarea:not(td textarea), select {
        width: 100% !important;
        min-height: 22px !important;
        padding: 1px 2px !important;
        margin: 1px 0 !important;
        font-size: 12pt !important;
        line-height: 1.4 !important;
        border: none !important;
        border-bottom: 1px solid #000 !important;
        background: transparent !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        white-space: normal !important;
    }

    textarea:not(td textarea) {
        min-height: 35px !important;
        height: auto !important;
        white-space: pre-wrap !important;
        padding: 2px 2px !important;
    }

    td input, td textarea {
        width: 100% !important;
        min-height: 20px !important;
        padding: 1px 2px !important;
        margin: 0 !important;
        font-size: 11pt !important;
        line-height: 1.3 !important;
        border: none !important;
        background: transparent !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        white-space: normal !important;
    }

    td textarea {
        min-height: 25px !important;
        height: auto !important;
        white-space: pre-wrap !important;
    }

    table {
        width: 100% !important;
        font-size: 11pt !important;
        border-collapse: collapse !important;
        margin: 5px 0 !important;
    }

    th, td {
        padding: 3px 5px !important;
        border: 1px solid #000 !important;
        font-size: 11pt !important;
        word-break: break-word;
    }

    th {
        background: #f2f2f2 !important;
        font-weight: bold !important;
        text-align: center !important;
    }

    h1 {
        font-size: 16pt !important;
        margin: 5px 0 10px 0 !important;
        padding: 0 !important;
    }

    .section-title, h2 {
        font-size: 13pt !important;
        margin: 10px 0 5px 0 !important;
        padding: 0 !important;
    }

    .signature {
        margin: 40px 0 0 0 !important;
        padding: 0 !important;
        text-align: right !important;
        font-size: 12pt !important;
    }

    button.pdf-button {
        display: none !important;
    }

    .page-break {
        page-break-before: always !important;
    }

    .section :last-child {
        margin-bottom: 2px !important;
    }
}