/* ===================================
   MIRA - Общие стили (common.css)
   Версия: 2.0 с поддержкой Garmin Pilot
   =================================== */

/* Garmin Pilot стили импортируются из dark-theme.css и split-screen.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    background: var(--gp-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Улучшенная читаемость по WCAG 2.1 AA */
.panel-title, .tab, .param-card .value, .param-card .label,
.recommendation-text, .data-table td, .data-table th {
    color: #1a202c;
}

/* Улучшенные цвета для статусов */
.status-allowed {
    background: rgba(56, 161, 105, 0.15);
    border: 1px solid rgba(56, 161, 105, 0.5);
    color: #22543d;
}

.status-restricted {
    background: rgba(237, 137, 54, 0.15);
    border: 1px solid rgba(237, 137, 54, 0.5);
    color: #744210;
}

.status-forbidden {
    background: rgba(229, 62, 62, 0.15);
    border: 1px solid rgba(229, 62, 62, 0.5);
    color: #742a2a;
}

/* Скрытие полосы прокрутки для кнопок пагинации */
#reportPage1Btn, #reportPage2Btn {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#reportPage1Btn::-webkit-scrollbar, #reportPage2Btn::-webkit-scrollbar {
    display: none;
}

/* Карта */
#map {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Поля координат */
.coords-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.coord-input {
    flex: 1 1 200px;
    min-width: 150px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 10px 12px;
    color: #2d3748;
    font-size: 13px;
    font-family: 'SF Mono', Monaco, monospace;
    box-sizing: border-box;
    transition: all 0.3s;
}

.coord-input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(0, 0, 0, 0.08);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.coord-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

/* Статус полёта */
.flight-status {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 14px;
}

.flight-status.status-allowed {
    background: rgba(56, 161, 105, 0.15);
    border: 1px solid rgba(56, 161, 105, 0.4);
    color: #276749;
}

.flight-status.status-restricted {
    background: rgba(237, 137, 54, 0.15);
    border: 1px solid rgba(237, 137, 54, 0.4);
    color: #c05621;
}

.flight-status.status-forbidden {
    background: rgba(229, 62, 62, 0.15);
    border: 1px solid rgba(229, 62, 62, 0.4);
    color: #c53030;
}

/* Сетка параметров */
.params-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.param-card {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    padding: 12px 10px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.param-card:active {
    background: rgba(0, 0, 0, 0.06);
}

.param-card i {
    font-size: 20px;
    margin-bottom: 6px;
    display: block;
}

.param-card .value {
    color: #2d3748;
    font-size: 18px;
    font-weight: 700;
    display: block;
}

.param-card .label {
    color: rgba(0, 0, 0, 0.5);
    font-size: 10px;
    text-transform: uppercase;
    margin-top: 4px;
    display: block;
}

.param-card .badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    margin-top: 6px;
    text-transform: uppercase;
}

.badge-ok { background: rgba(56, 161, 105, 0.2); color: #276749; }
.badge-warn { background: rgba(237, 137, 54, 0.2); color: #c05621; }
.badge-danger { background: rgba(229, 62, 62, 0.2); color: #c53030; }

/* Блок рекомендаций */
.recommendations-block {
    margin-top: 16px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.recommendations-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(102, 126, 234, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    color: #2d3748;
    font-size: 13px;
    font-weight: 600;
}

.recommendations-header i {
    color: #667eea;
    font-size: 16px;
}

.recommendations-content {
    padding: 14px 16px;
}

.recommendation-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 13px;
    line-height: 1.4;
}

.recommendation-item:last-child {
    border-bottom: none;
}

.recommendation-item i {
    flex-shrink: 0;
    font-size: 16px;
    margin-top: 1px;
}

.recommendation-item.critical i { color: #e53e3e; }
.recommendation-item.warning i { color: #dd6b20; }
.recommendation-item.info i { color: #3182ce; }
.recommendation-item.success i { color: #38a169; }

.recommendation-text {
    color: #4a5568;
}

.recommendation-text strong {
    color: #2d3748;
    font-weight: 600;
}

.recommendation-placeholder {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(0, 0, 0, 0.5);
    font-size: 13px;
    padding: 8px 0;
}

.recommendation-placeholder i {
    color: rgba(0, 0, 0, 0.4);
}

/* Параметр в рекомендации */
.rec-param {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin: 0 4px;
}

.rec-param.bad { background: rgba(229, 62, 62, 0.15); color: #c53030; }
.rec-param.warn { background: rgba(237, 137, 54, 0.15); color: #c05621; }
.rec-param.good { background: rgba(56, 161, 105, 0.15); color: #276749; }

/* Цвета иконок в параметрах */
.param-card:nth-child(1) i { color: #4fc3f7; }
.param-card:nth-child(2) i { color: #ffb74d; }
.param-card:nth-child(3) i { color: #81c784; }
.param-card:nth-child(4) i { color: #ba68c8; }
.param-card:nth-child(5) i { color: #e57373; }
.param-card:nth-child(6) i { color: #64b5f6; }

/* Кнопка действия */
.action-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 14px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.action-btn:active { transform: scale(0.98); }
.action-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Графики */
.chart-container {
    width: 100%;
    height: 220px;
    margin-bottom: 14px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.02);
    position: relative;
}

/* Skeleton-анимация для загрузки графиков */
.chart-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        rgba(102, 126, 234, 0.1) 0%,
        rgba(102, 126, 234, 0.15) 50%,
        rgba(102, 126, 234, 0.1) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.chart-skeleton::before {
    content: '';
    width: 60%;
    height: 70%;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.chart-container.loading {
    overflow: hidden;
}

.chart-container.loading .chart-skeleton {
    display: flex;
}

.chart-container:not(.loading) .chart-skeleton {
    display: none;
}

/* Временные окна */
.flight-windows {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 14px;
}

.flight-windows::-webkit-scrollbar { height: 4px; }
.flight-windows::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 2px; }

.flight-window {
    flex-shrink: 0;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    min-width: 70px;
}

.window-allowed { background: rgba(56, 161, 105, 0.15); color: #276749; border: 1px solid rgba(56, 161, 105, 0.3); }
.window-restricted { background: rgba(237, 137, 54, 0.15); color: #c05621; border: 1px solid rgba(237, 137, 54, 0.3); }
.window-forbidden { background: rgba(229, 62, 62, 0.15); color: #c53030; border: 1px solid rgba(229, 62, 62, 0.3); }

/* Таблица данных */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table th, .data-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.data-table th {
    color: rgba(0, 0, 0, 0.6);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 10px;
}

.data-table td { color: #2d3748; }

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.active { display: flex; }

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i { color: white; }

.close-modal {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 24px;
}

/* Настройки порогов */
.setting-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.setting-row label {
    font-size: 10px;
    font-weight: 600;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
    width: 150px;
}

.setting-row label i {
    color: #667eea;
    width: 12px;
    font-size: 12px;
    flex-shrink: 0;
    text-align: center;
}

.setting-row input[type="number"] {
    flex: 0 0 60px;
    width: 60px;
    padding: 8px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f7fafc;
    text-align: center;
}

.setting-row input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.setting-row input[type="number"]:hover {
    border-color: #cbd5e0;
}

/* Уведомления (Toast) */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 12px;
    color: #2d3748;
    font-size: 14px;
    z-index: 3000;
    opacity: 0;
    transition: all 0.4s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success i { color: #38a169; }
.toast.error i { color: #e53e3e; }
.toast.info i { color: #3182ce; }

/* Кнопка геолокации */
.geo-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.geo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.geo-btn:active { transform: scale(0.95); }
.geo-btn i { color: white; }

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Popup OpenLayers */
.ol-popup {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 10px 14px;
    color: #2d3748;
    font-size: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.ol-popup:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(255, 255, 255, 0.95);
}

.ol-popup-coords {
    font-family: 'SF Mono', Monaco, monospace;
    color: #667eea;
    margin-top: 4px;
    font-size: 11px;
}

/* Секции контента */
.section-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i { color: #667eea; }

/* Стили для печати / экспорта PDF */
@media print {
    * {
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }
    
    body, html {
        overflow: visible !important;
        height: auto !important;
        position: static !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .print-header {
        display: block !important;
    }

    .geo-btn,
    .panel-toggle,
    .panel-btn,
    .tabs,
    .coord-input,
    .action-btn,
    #toast,
    .ol-popup,
    #weatherLoading,
    .map-container,
    .side-panel,
    .dashboard-btn,
    .fullscreen-btn,
    .wizard-steps,
    .step-navigation {
        display: none !important;
    }

    /* Показываем только модальное окно скоринга при печати */
    .scoring-modal {
        position: static !important;
        display: block !important;
        background: white !important;
    }
    
    .scoring-modal-content,
    .scoring-modal-body {
        overflow: visible !important;
        position: static !important;
        height: auto !important;
        max-height: none !important;
    }

    .scoring-accordion-content {
        display: block !important;
        height: auto !important;
        overflow: visible !important;
    }

    .chart-container,
    .scoring-factor,
    .scoring-recommendations {
        page-break-inside: avoid;
    }

    .recommendations-block {
        page-break-inside: avoid;
    }
}

/* Print header */
.print-header {
    display: none;
    text-align: center;
    padding: 20px;
    border-bottom: 2px solid #667eea;
    margin-bottom: 20px;
}

/* Адаптив для меньших экранов */
@media (max-height: 700px) {
    .chart-container { height: 180px; }
    .param-card { padding: 10px 8px; }
    .param-card .value { font-size: 16px; }
}

/* Вкладки анализа (шаг 2) */
.analysis-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    border-bottom: 2px solid rgba(0,0,0,0.08);
    padding-bottom: 0;
    overflow-x: auto;
}

.analysis-tabs::-webkit-scrollbar { height: 3px; }
.analysis-tabs::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 2px; }

.analysis-tab {
    padding: 12px 16px;
    color: rgba(0, 0, 0, 0.5);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    white-space: nowrap;
    border-radius: 8px 8px 0 0;
}

.analysis-tab:hover {
    color: #2d3748;
    background: rgba(102, 126, 234, 0.05);
}

.analysis-tab.active {
    color: #2d3748;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.analysis-tab i {
    margin-right: 6px;
    color: #667eea;
}

/* Контент вкладок */
.tab-content-block {
    padding: 8px 0;
}

/* Сетка графиков */
.charts-grid {
    display: grid;
    gap: 16px;
}

.chart-item {
    margin-bottom: 8px;
}

.chart-title {
    font-size: 12px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-title i {
    color: #667eea;
    font-size: 11px;
}

/* Кнопки пагинации сегмента */
.segment-page-btn {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 8px;
    background: rgba(255,255,255,0.9);
    color: #4a5568;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.segment-page-btn:hover {
    background: rgba(255,255,255,1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.segment-page-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.segment-page-btn i {
    font-size: 14px;
}

.segment-page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Кнопка "Подробнее" для сегмента */
.segment-detail-btn {
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    width: auto;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.segment-detail-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.segment-detail-btn i {
    font-size: 12px;
}

/* Кнопки навигации между сегментами */
.segment-nav-btn {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.segment-nav-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.segment-nav-btn:active:not(:disabled) {
    transform: translateY(0);
}

.segment-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.segment-nav-btn i {
    font-size: 16px;
}

/* Пагинация сегментов (верхняя) */
.segment-panel .segment-pagination {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

/* Пагинация страниц (нижняя) */
.segment-panel .page-pagination {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

/* Боковая панель сегмента */
.segment-panel {
    position: fixed;
    top: 0;
    right: -37%;
    width: 37%;
    min-width: 420px;
    max-width: 550px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.segment-panel.active {
    right: 0;
}

.segment-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.segment-panel-header h3 {
    color: #2d3748;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.segment-panel-header h3 i {
    color: #667eea;
    font-size: 17px;
}

.segment-panel-close {
    width: 38px;
    height: 38px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 10px;
    color: #4a5568;
    font-size: 17px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.segment-panel-close:hover {
    background: rgba(229, 62, 62, 0.15);
    color: #e53e3e;
}

.segment-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 22px;
}

.segment-panel-body::-webkit-scrollbar {
    width: 6px;
}

.segment-panel-body::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

.segment-panel-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
}

/* Единый размер шрифта для всех элементов */
.segment-panel,
.side-panel,
.bottom-panel {
    font-size: 13px;
}

.segment-panel .flight-window,
.side-panel .flight-window,
.bottom-panel .flight-window {
    font-size: 13px;
    padding: 8px 12px;
}

.segment-panel .param-card .value,
.side-panel .param-card .value,
.bottom-panel .param-card .value {
    font-size: 19px;
}

.segment-panel .param-card .label,
.side-panel .param-card .label,
.bottom-panel .param-card .label {
    font-size: 10px;
}

.segment-panel table,
.side-panel table,
.bottom-panel table {
    font-size: 12px;
}

.segment-panel th,
.segment-panel td,
.side-panel th,
.side-panel td,
.bottom-panel th,
.bottom-panel td {
    padding: 8px 6px;
}

.segment-panel strong,
.side-panel strong,
.bottom-panel strong {
    font-size: 13px;
}

.segment-panel .recommendation-text,
.side-panel .recommendation-text,
.bottom-panel .recommendation-text {
    font-size: 13px;
    line-height: 1.6;
}

.segment-panel .section-title,
.side-panel .section-title,
.bottom-panel .section-title {
    font-size: 13px;
}

.segment-panel .panel-title,
.side-panel .panel-title,
.bottom-panel .panel-title {
    font-size: 16px;
}

.segment-panel .tab,
.side-panel .tab,
.bottom-panel .tab {
    font-size: 14px;
}

.segment-panel .data-table,
.side-panel .data-table,
.bottom-panel .data-table {
    font-size: 13px;
}

/* Адаптив для боковой панели */
@media (max-width: 1200px) {
    .segment-panel {
        width: 42%;
        min-width: 400px;
    }
}

/* ===================================
   Энергоэффективность (energy.css)
   =================================== */

.energy-summary-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.energy-metric-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: transform 0.2s;
}

.energy-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.energy-direction-card {
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.energy-direction-card.outbound {
    background: rgba(49, 130, 206, 0.05);
    border-color: rgba(49, 130, 206, 0.2);
}

.energy-direction-card.return {
    background: rgba(229, 62, 62, 0.05);
    border-color: rgba(229, 62, 62, 0.2);
}

.energy-status-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.energy-status-block.allowed {
    background: rgba(56, 161, 105, 0.15);
    border: 1px solid rgba(56, 161, 105, 0.5);
}

.energy-status-block.caution {
    background: rgba(214, 158, 46, 0.15);
    border: 1px solid rgba(214, 158, 46, 0.5);
}

.energy-status-block.restricted {
    background: rgba(237, 137, 54, 0.15);
    border: 1px solid rgba(237, 137, 54, 0.5);
}

.energy-status-block.forbidden {
    background: rgba(229, 62, 62, 0.15);
    border: 1px solid rgba(229, 62, 62, 0.5);
}

.energy-recommendation-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    border-left: 3px solid;
}

.energy-recommendation-item.critical {
    background: rgba(229, 62, 62, 0.1);
    border-left-color: #e53e3e;
}

.energy-recommendation-item.warning {
    background: rgba(237, 137, 54, 0.1);
    border-left-color: #ed8936;
}

.energy-recommendation-item.info {
    background: rgba(102, 126, 234, 0.05);
    border-left-color: #667eea;
}

/* Анимация для карточек */
@keyframes energyPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
}

.energy-metric-card.critical {
    animation: energyPulse 2s infinite;
}

@media (max-width: 768px) {
    .segment-panel {
        width: 100%;
        min-width: 0;
        max-width: none;
    }
    
    .segment-panel-header h3 {
        font-size: 16px;
    }
    
    .segment-panel-body {
        padding: 20px;
    }
}
