/* ===== ПОДКЛЮЧЕНИЕ ЛОКАЛЬНЫХ ШРИФТОВ ROBOTO ===== */

/* Roboto Thin */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 100;
    src: local('Roboto Thin'), local('Roboto-Thin'),
         url('lib/Roboto/static/Roboto-Thin.ttf') format('truetype');
}
@font-face {
    font-family: 'Roboto';
    font-style: italic;
    font-weight: 100;
    src: local('Roboto Thin Italic'), local('Roboto-ThinItalic'),
         url('lib/Roboto/static/Roboto-ThinItalic.ttf') format('truetype');
}

/* Roboto Light */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 300;
    src: local('Roboto Light'), local('Roboto-Light'),
         url('lib/Roboto/static/Roboto-Light.ttf') format('truetype');
}
@font-face {
    font-family: 'Roboto';
    font-style: italic;
    font-weight: 300;
    src: local('Roboto Light Italic'), local('Roboto-LightItalic'),
         url('lib/Roboto/static/Roboto-LightItalic.ttf') format('truetype');
}

/* Roboto Regular 400 */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    src: local('Roboto'), local('Roboto-Regular'),
         url('lib/Roboto/static/Roboto-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'Roboto';
    font-style: italic;
    font-weight: 400;
    src: local('Roboto Italic'), local('Roboto-Italic'),
         url('lib/Roboto/static/Roboto-Italic.ttf') format('truetype');
}

/* Roboto Medium 500 */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 500;
    src: local('Roboto Medium'), local('Roboto-Medium'),
         url('lib/Roboto/static/Roboto-Medium.ttf') format('truetype');
}
@font-face {
    font-family: 'Roboto';
    font-style: italic;
    font-weight: 500;
    src: local('Roboto Medium Italic'), local('Roboto-MediumItalic'),
         url('lib/Roboto/static/Roboto-MediumItalic.ttf') format('truetype');
}

/* Roboto SemiBold 600 */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 600;
    src: local('Roboto SemiBold'), local('Roboto-SemiBold'),
         url('lib/Roboto/static/Roboto-SemiBold.ttf') format('truetype');
}
@font-face {
    font-family: 'Roboto';
    font-style: italic;
    font-weight: 600;
    src: local('Roboto SemiBold Italic'), local('Roboto-SemiBoldItalic'),
         url('lib/Roboto/static/Roboto-SemiBoldItalic.ttf') format('truetype');
}

/* Roboto Bold 700 */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700;
    src: local('Roboto Bold'), local('Roboto-Bold'),
         url('lib/Roboto/static/Roboto-Bold.ttf') format('truetype');
}
@font-face {
    font-family: 'Roboto';
    font-style: italic;
    font-weight: 700;
    src: local('Roboto Bold Italic'), local('Roboto-BoldItalic'),
         url('lib/Roboto/static/Roboto-BoldItalic.ttf') format('truetype');
}

/* Roboto ExtraBold 800 */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 800;
    src: local('Roboto ExtraBold'), local('Roboto-ExtraBold'),
         url('lib/Roboto/static/Roboto-ExtraBold.ttf') format('truetype');
}
@font-face {
    font-family: 'Roboto';
    font-style: italic;
    font-weight: 800;
    src: local('Roboto ExtraBold Italic'), local('Roboto-ExtraBoldItalic'),
         url('lib/Roboto/static/Roboto-ExtraBoldItalic.ttf') format('truetype');
}

/* Roboto Black 900 */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 900;
    src: local('Roboto Black'), local('Roboto-Black'),
         url('lib/Roboto/static/Roboto-Black.ttf') format('truetype');
}
@font-face {
    font-family: 'Roboto';
    font-style: italic;
    font-weight: 900;
    src: local('Roboto Black Italic'), local('Roboto-BlackItalic'),
         url('lib/Roboto/static/Roboto-BlackItalic.ttf') format('truetype');
}

/* ===== ПОДКЛЮЧЕНИЕ ROBOTO MONO (используем обычный Roboto как fallback) ===== */
@font-face {
    font-family: 'Roboto Mono';
    font-style: normal;
    font-weight: 400;
    src: local('Roboto'), local('Roboto-Regular'),
         url('lib/Roboto/static/Roboto-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'Roboto Mono';
    font-style: normal;
    font-weight: 500;
    src: local('Roboto Medium'), local('Roboto-Medium'),
         url('lib/Roboto/static/Roboto-Medium.ttf') format('truetype');
}

/* ===== СТРОГИЙ ВЕДОМСТВЕННЫЙ СТИЛЬ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Arial', sans-serif;
    background: #e6ecf0;
    color: #0a2e3c;
    font-size: 14px;
    line-height: 1.5;
    padding: 20px;
}

.app-container {
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 8px 24px rgba(0,32,64,0.08);
    border-radius: 4px;
}

/* ===== ШАПКА ===== */
.header {
    background: linear-gradient(90deg, #0a3143 0%, #124b63 100%);
    color: white;
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid #e5c13b;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-icon {
    background: rgba(255,255,255,0.1);
    width: 48px;
    height: 48px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.title-text h1 {
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.title-text span {
    font-size: 12px;
    opacity: 0.9;
    font-weight: 400;
}

/* ===== НАВИГАЦИЯ ===== */
.tabs {
    display: flex;
    background: white;
    padding: 0 28px;
    border-bottom: 1px solid #cfdbe3;
    gap: 32px;
}

.tab {
    padding: 18px 4px 14px 4px;
    font-weight: 600;
    color: #4f6f7f;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    transition: 0.1s;
}

.tab i {
    color: #2c5f2d;
    font-size: 16px;
}

.tab.active {
    color: #0a3143;
    border-bottom-color: #2c5f2d;
    background: rgba(44,95,45,0.02);
}

/* ===== КОНТЕНТ ===== */
.content {
    padding: 28px;
    background: #f5fafc;
    min-height: 700px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* ===== ПАНЕЛИ (ОБЩИЕ) ===== */
.panel {
    background: white;
    border: 1px solid #d3e0e5;
    margin-bottom: 28px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.panel-header {
    padding: 16px 24px;
    background: #fafefd;
    border-bottom: 1px solid #d3e0e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #0a3143;
    display: flex;
    align-items: center;
    gap: 12px;
}

.panel-header h2 i {
    color: #2c5f2d;
}

.panel-body {
    padding: 24px;
}

/* ===== ФОРМЫ (ОБЩИЕ) ===== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 13px;
    color: #1e4a5f;
}

.form-control {
    padding: 10px 14px;
    border: 1px solid #b8ccd2;
    border-radius: 4px;
    font-size: 14px;
}

/* ===== КНОПКИ (ОБЩИЕ) ===== */
.btn {
    padding: 10px 22px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 13px;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid #9eb3bd;
    transition: 0.1s;
}

.btn-primary {
    background: #0a3143;
    color: white;
    border-color: #0a3143;
}

.btn-primary:hover {
    background: #124b63;
}

.btn-outline {
    background: white;
    border: 1px solid #8ba3ad;
    color: #0a3143;
}

.btn-outline:hover {
    background: #f0f7fa;
}

.btn-danger {
    background: #b22222;
    color: white;
    border-color: #8b1a1a;
}

/* ===== БЕЙДЖИ (ОБЩИЕ) ===== */
.badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 12px;
}

.badge-warning { background: #fce9c4; color: #8a6900; }
.badge-success { background: #e1f0e5; color: #1f6e43; }
.badge-danger { background: #ffe6e6; color: #b22222; }
.badge-info { background: #e3edf0; color: #0a3143; }

/* ===== КАРТОЧКИ РИСКОВ (ОБЩИЕ) ===== */
.risk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.risk-card {
    background: white;
    border: 1px solid #d3e0e5;
    border-left: 8px solid;
    padding: 20px;
    border-radius: 4px;
}

.risk-extreme { border-left-color: #b22222; }
.risk-high { border-left-color: #cc7f2a; }
.risk-medium { border-left-color: #f0b429; }
.risk-low { border-left-color: #1f6e43; }

/* ===== СТАТУС (ОБЩИЙ) ===== */
.status-bar {
    background: #f0f7fa;
    padding: 16px 24px;
    border-left: 6px solid #2c5f2d;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

/* ===== ВИЗУАЛИЗАЦИЯ (ОБЩАЯ) ===== */
.chart-container {
    height: 320px;
    margin-top: 20px;
}

.flex-row {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.metric-card {
    background: #f8fcfd;
    padding: 16px 20px;
    border: 1px solid #d3e0e5;
    border-radius: 4px;
    min-width: 180px;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #0a3143;
}

.footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #cbd8df;
}

/* ===== АЛЕРТЫ (ОБЩИЕ) ===== */
.alert {
    padding: 16px 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.alert-warning {
    background: #fff4e5;
    border-left: 6px solid #e68a2e;
}

.alert-danger {
    background: #ffeded;
    border-left: 6px solid #b22222;
}

.alert-success {
    background: #e3f2e8;
    border-left: 6px solid #1f6e43;
}

/* ===== ЗАГЛУШКА ДЛЯ ПОРОГОВЫХ ЗНАЧЕНИЙ ===== */
.placeholder-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    background: #f8fcfd;
    border: 2px dashed #d3e0e5;
    border-radius: 8px;
}

.placeholder-inner {
    text-align: center;
    color: #6c8a9a;
}

.placeholder-inner i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.placeholder-inner h3 {
    font-weight: 400;
    margin-bottom: 10px;
}

.placeholder-inner p {
    max-width: 400px;
}
