main {
    position: relative;
    padding: 5rem var(--padding-horizontal) 3rem;
}

main > .header_text {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

main .calculators {
    padding-left: 0;
    padding-right: 0;
}


.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.form-section h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.4rem;
}

.form-group {
    margin: 0.7rem 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.2rem;
    font-weight: 600;
    color: #495057;
}

.form-group select,
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    -webkit-transition: border-color 0.3s;
    -o-transition: border-color 0.3s;
    transition: border-color 0.3s;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #80bdff;
    -webkit-box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
            box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.product-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.product-section h4 {
    margin-top: 0;
    color: #495057;
    font-size: 1.2rem;
}

.form-actions {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    -webkit-transition: all 0.3s;
    -o-transition: all 0.3s;
    transition: all 0.3s;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-outline {
    background: transparent;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.btn-outline:hover {
    background: #f8f9fa;
}

hr {
    margin: 1.5rem 0;
    border: none;
    border-top: 1px solid #dee2e6;
}


.history-section {
    margin: 2rem 0 3rem;
}

.table-responsive {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table th,
table td {
    padding: 0.3rem;
    text-align: center;
    border: 1px solid #e0e0e0;
}

table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
}

table tr:hover {
    background-color: #f5f5f5;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-preliminary {
    background-color: #fff3cd;
    color: #856404;
}

.status-ready {
    background-color: #d4edda;
    color: #155724;
}

.status-correction {
    background-color: #f8d7da;
    color: #721c24;
}

.status-advertising {
    background-color: #cce5ff;
    color: #004085;
}

.status-completed {
    background-color: #d1ecf1;
    color: #0c5460;
}

.empty-history {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.calculation-card {
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.calculation-card:hover {
    -webkit-transform: translateY(-2px);
        -ms-transform: translateY(-2px);
            transform: translateY(-2px);
    -webkit-box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tax-info {
    background-color: #e7f3ff;
    border-left: 4px solid var(--blue);
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.tax-types {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.tax-type-option {
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
    min-width: 200px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.tax-type-option:hover {
    border-color: var(--blue);
    background-color: #f8fbff;
}

.tax-type-option.active {
    border-color: var(--blue);
    background-color: #e7f3ff;
}

.tax-type-option h6 {
    margin-top: 0;
    color: #333;
}

.tax-type-option p {
    margin-bottom: 0;
    color: #666;
    font-size: 14px;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.step-indicator {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    margin-bottom: 30px;
}

.step {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    color: #666;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #666;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    margin-right: 10px;
    font-weight: 600;
}

.step.active .step-number {
    background-color: var(--blue);
    color: white;
}

.step.active .step-text {
    color: var(--blue);
    font-weight: 600;
}

.step-separator {
    width: 50px;
    height: 2px;
    background-color: #e0e0e0;
    margin: 0 15px;
}

.navigation-buttons {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    margin-top: 30px;
}

/* Стили для формы создания расчета */
.create-form {
    display: block;
    margin-top: 30px;
}

.create-form.hidden {
    display: none;
}

/* Стили для кнопок действий */
.action-buttons {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 8px;
    -ms-flex-wrap: nowrap;
        flex-wrap: nowrap;
}

.btn-sm {
    display: block;
    padding: 4px 8px;
    margin: 0.5rem;
    font-size: 12px;
    line-height: 1.5;
}

/* Стили для подтверждения удаления */
.delete-confirmation {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
}

.delete-confirmation h5 {
    color: #856404;
    margin-top: 0;
}

/* Отступы для кнопок в таблице */
.history-table td:last-child {
    padding: 8px 5px;
}

.calculator-message {
    padding: 5px 10px;
    margin: 5px 0;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
}

.calculator-message:not(:last-child) {
    border-bottom: 1px solid #e9ecef;
}


/* media */

@media (max-width: 800px) {
    main > .header_text {
        font-size: 1.4rem;
    }

    .calculators {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .calculators .item:first-child .header_text {
        margin-top: 1rem !important;
    }
}