:root {
    --primary-gradient: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    --secondary-gradient: linear-gradient(135deg, #20c997 0%, #198754 100%);
    --info-gradient: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --hover-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Шапка как в index.php */
.calc-header {
    background: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.calc-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.brand-header {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    font-size: 1.8rem;
}

/* Кнопка "На главную" */
.btn-outline-primary {
    border: 2px solid #0d6efd;
    color: #0d6efd;
    font-weight: 500;
    border-radius: 8px;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.2);
}

.modern-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.modern-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    padding: 40px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.modern-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.modern-header {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(13, 110, 253, 0.1);
}

.modern-label {
    color: #495057;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    font-size: 0.95rem;
}

.modern-select, .modern-input {
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 16px;
    width: 100%;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.modern-select:focus, .modern-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
    outline: none;
    background: white;
}

.modern-btn-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.modern-btn {
    flex: 1;
    min-width: 280px;
    padding: 20px 30px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    letter-spacing: 0.5px;
}

.modern-btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.modern-btn-primary:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #5a0fd2 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.3);
}

.modern-btn-success {
    background: var(--secondary-gradient);
    color: white;
    padding: 16px 35px;
    font-size: 1.1rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    width: 100%;
    max-width: 300px;
}

.modern-btn-success:hover {
    background: linear-gradient(135deg, #1ba87e 0%, #146c43 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(32, 201, 151, 0.3);
}

.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 25px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.modern-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    font-weight: 700;
    padding: 18px 20px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.95rem;
}

.modern-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f3f5;
    background: white;
    transition: background-color 0.3s ease;
}

.modern-table tr:hover td {
    background: linear-gradient(135deg, #f8f9fe 0%, #f0f2ff 100%);
}

.modern-table tr:last-child td {
    border-bottom: none;
}

.modern-form-group {
    margin-bottom: 30px;
}

.modern-info-box {
    background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%);
    border-left: 4px solid #0d6efd;
    padding: 25px;
    border-radius: 12px;
    margin: 30px 0;
    font-size: 0.95rem;
    color: #495057;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.08);
}

.modern-icon {
    width: 22px;
    height: 22px;
}

.text-muted {
    color: #6c757d !important;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.mt-4 {
    margin-top: 2rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.table-responsive {
    overflow-x: auto;
    border-radius: 12px;
    margin: 25px 0;
}

/* Совместимость с Bootstrap из func.php */
hr {
    border: none;
    color: #008B8B;
    background-color: #008B8B;
    height: 2px;
    margin: 2rem 0;
}

.container {
    max-width: 100%;
    padding: 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .modern-btn {
        min-width: 100%;
    }

    .modern-card {
        padding: 25px 20px;
    }

    .modern-container {
        padding: 20px 15px;
    }

    .modern-header {
        font-size: 1.5rem;
    }

    .brand-header {
        font-size: 1.4rem;
    }

    .modern-table th,
    .modern-table td {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .calc-header .container {
        padding: 0 15px;
    }

    .btn-outline-primary {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
}

@media (max-width: 576px) {
    .modern-btn-group {
        gap: 15px;
    }

    .modern-btn {
        padding: 18px 20px;
        font-size: 1rem;
    }

    .modern-btn-success {
        padding: 14px 25px;
        font-size: 1rem;
    }

    .brand-header {
        font-size: 1.2rem;
    }

    .calc-header .d-flex.align-items-center img {
        width: 48px;
        height: 48px;
    }
}

/* Стили для печати (наследуем из func.php) */
@media print {
    .modern-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .modern-btn-success,
    .modern-btn,
    .modern-btn-primary,
    .d-print-none,
    .calc-header {
        display: none !important;
    }

    .modern-table {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}