/* Показ вкладки "Карта области" — отменено скрытие */

.tab[href="../diagnostics/index.html"],
.tab[href="diagnostics/index.html"],
.sidebar-menu__link[href="../diagnostics/index.html"],
.sidebar-menu__link[href="diagnostics/index.html"],
.hide-diagnostics-tab {
  display: none !important;
}

/* Скрытие вкладок "Карта" и "Чат с ИИ" */
.tab[href="../index.html"],
.tab[href="index.html"],
.sidebar-menu__link[href="../index.html"],
.sidebar-menu__link[href="index.html"],
.tab[href="../chat/index.html"],
.tab[href="chat/index.html"],
.sidebar-menu__link[href="../chat/index.html"],
.sidebar-menu__link[href="chat/index.html"],
.hide-map-tab,
.hide-chat-tab {
  display: none !important;
}

/* Подсветка активной вкладки - правила в основном CSS файле */

/* Выпадающий список регионов */
.regions-dropdown {
  position: relative;
  width: 100%;
}

.regions-dropdown__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #0c1c36;
  border: 1px solid #1d3a64;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #cfe5ff;
}

.regions-dropdown__trigger:hover {
  background: #0f1928;
  border-color: #2d4a7a;
}

.regions-dropdown__trigger.active {
  background: #0f1928;
  border-color: #2d4a7a;
}

.regions-dropdown__text {
  font-size: 14px;
  color: #cfe5ff;
}

.regions-dropdown__arrow {
  color: #8fb0d1;
  transition: transform 0.2s ease;
}

.regions-dropdown__trigger.active .regions-dropdown__arrow {
  transform: rotate(180deg);
}

.regions-dropdown__menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #0c1c36;
  border: 1px solid #1d3a64;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  max-height: 300px;
  overflow: hidden;
  display: none;
}

.regions-dropdown__menu.active {
  display: block;
}

.regions-dropdown__search {
  padding: 12px;
  border-bottom: 1px solid #1d3a64;
}

.regions-dropdown__search-input {
  width: 100%;
  padding: 8px 12px;
  background: #0f1928;
  border: 1px solid #1d3a64;
  border-radius: 6px;
  color: #cfe5ff;
  font-size: 14px;
}

.regions-dropdown__search-input::placeholder {
  color: #8fb0d1;
}

.regions-dropdown__search-input:focus {
  outline: none;
  border-color: #2d4a7a;
}

.regions-dropdown__options {
  max-height: 200px;
  overflow-y: auto;
  padding: 8px 0;
}

.regions-dropdown__option {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.regions-dropdown__option:hover {
  background: #0f1928;
}

.regions-dropdown__checkbox {
  display: none;
}

.regions-dropdown__custom-checkbox {
  position: relative;
  width: 18px;
  height: 18px;
  margin-right: 12px;
  border: 2px solid #1d3a64;
  border-radius: 4px;
  background: #0c1c36;
  transition: all 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
}

.regions-dropdown__custom-checkbox::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.regions-dropdown__option:hover .regions-dropdown__custom-checkbox {
  border-color: #2d4a7a;
  background: #0f1928;
}

.regions-dropdown__checkbox:checked + .regions-dropdown__custom-checkbox {
  background: #2d4a7a;
  border-color: #2d4a7a;
}

.regions-dropdown__checkbox:checked + .regions-dropdown__custom-checkbox::after {
  opacity: 1;
}

.regions-dropdown__option-text {
  font-size: 14px;
  color: #cfe5ff;
  flex: 1;
}

/* Стили для отключенных опций регионов */
.regions-dropdown__option--disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
}

.regions-dropdown__option--disabled:hover {
  background: transparent !important;
}

.regions-dropdown__option--disabled .regions-dropdown__custom-checkbox {
  border-color: #4a5568 !important;
  background: #2d3748 !important;
}

.regions-dropdown__option--disabled .regions-dropdown__option-text {
  color: #718096 !important;
}

.analytics {
  display: grid;
  grid-template-columns: 320px 1fr 320px;
  gap: 12px;
  padding: 12px;
  height: calc(100vh - 64px);
  min-height: 0;
}

/* Left sidebar - Filters */
.analytics__filters {
  background: linear-gradient(180deg, #0f1928, #0e1826);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  height: 100%;
  overflow: auto;
}

.filters-header {
  margin-bottom: 20px;
}

.filters-header__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #cfe5ff;
}

.filters-header__subtitle {
  font-size: 12px;
  color: #9db7d6;
}

.filter-section {
  margin-bottom: 24px;
}

.filter-section__title {
  font-size: 12px;
  color: #8fb0d1;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Search box */
.search-box {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  background: #0b1626;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 10px 12px 10px 36px;
  color: #cfe5ff;
  font-size: 13px;
}

.search-box input:focus {
  outline: none;
  border-color: #3b82f6;
}

/* Risk level toggles */
.risk-level-toggles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.risk-level-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 0;
}

.risk-level-toggle input {
  display: none;
}

.risk-level-toggle__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--stroke);
  transition: all 0.2s ease;
}

.risk-level-toggle__dot--critical {
  border-color: #ef4444;
}

.risk-level-toggle__dot--high {
  border-color: #f59e0b;
}

.risk-level-toggle__dot--medium {
  border-color: #3b82f6;
}

.risk-level-toggle__dot--low {
  border-color: #10b981;
}

.risk-level-toggle input:checked + .risk-level-toggle__dot--critical {
  background: #ef4444;
  border-color: #ef4444;
}

.risk-level-toggle input:checked + .risk-level-toggle__dot--high {
  background: #f59e0b;
  border-color: #f59e0b;
}

.risk-level-toggle input:checked + .risk-level-toggle__dot--medium {
  background: #3b82f6;
  border-color: #3b82f6;
}

.risk-level-toggle input:checked + .risk-level-toggle__dot--low {
  background: #10b981;
  border-color: #10b981;
}

.risk-level-toggle__text {
  font-size: 13px;
  color: #cfe5ff;
  flex: 1;
}

/* Category toggles */
.category-toggles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 0;
}

.category-toggle input {
  display: none;
}

.category-toggle__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--stroke);
  transition: all 0.2s ease;
}

.category-toggle input:checked + .category-toggle__dot {
  border-color: #3b82f6;
  background: #3b82f6;
}

.category-toggle__text {
  font-size: 13px;
  color: #cfe5ff;
  flex: 1;
}

/* District toggles */
.district-toggles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.district-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 0;
}

.district-toggle input {
  display: none;
}

.district-toggle__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--stroke);
  transition: all 0.2s ease;
}

.district-toggle input:checked + .district-toggle__dot {
  border-color: #22c55e;
  background: #22c55e;
}

.district-toggle__text {
  font-size: 13px;
  color: #cfe5ff;
  flex: 1;
}

/* Clear filters button */
.clear-filters {
  width: 100%;
  background: linear-gradient(180deg, #1a2538, #0f1b29);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 10px 12px;
  color: #cfe5ff;
  font-size: 13px;
  cursor: pointer;
  margin-top: 16px;
}

.clear-filters:hover {
  border-color: #2b3d55;
  background: linear-gradient(180deg, #2a3548, #1f2b3a);
}

/* Content area */
.analytics__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  overflow: auto;
}

/* Analytics header */
.analytics-header {
  background: linear-gradient(180deg, #0f1a29, #0c1726);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
}

.analytics-header__title {
  font-size: 24px;
  font-weight: 700;
  color: #e6f0ff;
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.analytics-header__subtitle {
  font-size: 14px;
  color: #9db7d6;
  margin: 0;
}

/* Статистика рисков */
.risk-stats {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding: 12px 16px;
  background: #0c1c36;
  border: 1px solid #1d3a64;
  border-radius: 8px;
}

.risk-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.risk-stat__number {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.risk-stat__number--critical {
  color: #ef4444;
}

.risk-stat__number--high {
  color: #f59e0b;
}

.risk-stat__number--medium {
  color: #3b82f6;
}

.risk-stat__number--low {
  color: #10b981;
}

.risk-stat__label {
  font-size: 12px;
  color: #8fb0d1;
  text-align: center;
  font-weight: 500;
}

/* Поиск рисков */
.risks-search {
  margin-bottom: 16px;
}

.risks-search__container {
  position: relative;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 0 12px;
  transition: all 0.2s ease;
}

.risks-search__container:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.risks-search__icon {
  color: #64748b;
  margin-right: 8px;
  flex-shrink: 0;
}

.risks-search__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f1f5f9;
  font-size: 14px;
  font-weight: 400;
  padding: 10px 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.risks-search__input::placeholder {
  color: #64748b;
}

.risks-search__clear {
  color: #64748b;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.risks-search__clear:hover {
  color: #f1f5f9;
  background: rgba(100, 116, 139, 0.1);
}

.risks-search__results {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 6px;
  color: #93c5fd;
  font-size: 12px;
  display: none;
}

.risks-search__results--visible {
  display: block;
}

/* Risks grid */
.risks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 0 0 20px 0;
}

/* Risk card */
.risk-card {
  background: linear-gradient(180deg, #0f1a29, #0c1726);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.risk-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  border-color: #3b82f6;
}

.risk-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.risk-card--critical::before {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.risk-card--high::before {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.risk-card--medium::before {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.risk-card--low::before {
  background: linear-gradient(90deg, #10b981, #059669);
}

.risk-card__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.risk-card__icon {
  font-size: 32px;
  flex-shrink: 0;
  margin-top: 4px;
}

.risk-card__info {
  flex: 1;
}

.risk-card__title {
  font-size: 18px;
  font-weight: 600;
  color: #e6f0ff;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.risk-card__level {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.risk-card__level--critical {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.risk-card__level--high {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.risk-card__level--medium {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

.risk-card__level--low {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.risk-card__category {
  font-size: 12px;
  color: #9db7d6;
  margin-bottom: 12px;
}

.risk-card__description {
  color: #cfe5ff;
  line-height: 1.5;
  font-size: 14px;
  margin-bottom: 16px;
}

.risk-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--stroke);
}

.risk-card__district {
  font-size: 12px;
  color: #9db7d6;
}

.risk-card__probability {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #9db7d6;
}

.risk-card__probability-bar {
  width: 60px;
  height: 4px;
  background: #374151;
  border-radius: 2px;
  overflow: hidden;
}

.risk-card__probability-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.risk-card__probability-fill--critical {
  background: #ef4444;
}

.risk-card__probability-fill--high {
  background: #f59e0b;
}

.risk-card__probability-fill--medium {
  background: #3b82f6;
}

.risk-card__probability-fill--low {
  background: #10b981;
}

/* Analytics Dashboard */
.analytics-dashboard {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100%;
  overflow-y: auto;
}

.dashboard-section {
  background: linear-gradient(135deg, #1a2a3a, #162230);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 12px;
  transition: all 0.2s ease;
  max-height: 300px;
  overflow-y: auto;
}

.dashboard-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.section-header {
  margin-bottom: 8px;
  text-align: center;
}

.section-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: #e6f0ff;
  margin: 0 0 4px 0;
}

.section-subtitle {
  font-size: 11px;
  color: #9db7d6;
  opacity: 0.8;
}

/* Stats Grid */
.stats-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: linear-gradient(135deg, #0f1b2b, #0b1625);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.stat-item--critical::before {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.stat-item--high::before {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.stat-item--medium::before {
  background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.stat-item--low::before {
  background: linear-gradient(90deg, #10b981, #059669);
}

.stat-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.stat-item__icon {
  flex-shrink: 0;
  color: #9db7d6;
}

.stat-item--critical .stat-item__icon {
  color: #fca5a5;
}

.stat-item--high .stat-item__icon {
  color: #fbbf24;
}

.stat-item--medium .stat-item__icon {
  color: #93c5fd;
}

.stat-item--low .stat-item__icon {
  color: #6ee7b7;
}

.stat-item__content {
  flex: 1;
  min-width: 0;
}

.stat-item__number {
  font-size: 18px;
  font-weight: 700;
  color: #e6f0ff;
  line-height: 1;
  margin-bottom: 2px;
}

.stat-item__label {
  font-size: 10px;
  color: #9db7d6;
  line-height: 1;
  margin-bottom: 2px;
}

.stat-item__percentage {
  font-size: 9px;
  color: #6b7280;
  font-weight: 500;
}

/* Trends Container */
.trends-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.trend-card {
  padding: 8px;
  background: linear-gradient(135deg, #0f1b2b, #0b1625);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.trend-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.trend-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.trend-card__title {
  font-size: 12px;
  font-weight: 600;
  color: #cfe5ff;
}

.trend-card__change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 8px;
}

.trend-card__change--increase {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.trend-card__change--decrease {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.trend-card__change--stable {
  background: rgba(156, 163, 175, 0.2);
  color: #d1d5db;
}

.trend-card__description {
  font-size: 10px;
  color: #9db7d6;
  opacity: 0.8;
}

/* Top Risks */
.top-risks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.top-risk-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: linear-gradient(135deg, #0f1b2b, #0b1625);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.top-risk-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.top-risk-item__rank {
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.top-risk-item__content {
  flex: 1;
  min-width: 0;
}

.top-risk-item__title {
  font-size: 11px;
  font-weight: 600;
  color: #cfe5ff;
  line-height: 1.2;
  margin-bottom: 2px;
}

.top-risk-item__probability {
  font-size: 10px;
  color: #9db7d6;
  font-weight: 500;
}

.top-risk-item__level {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.top-risk-item__level--critical {
  background: #ef4444;
}

.top-risk-item__level--high {
  background: #f59e0b;
}

.top-risk-item__level--medium {
  background: #3b82f6;
}

.top-risk-item__level--low {
  background: #10b981;
}

/* ===== МОДАЛЬНОЕ ОКНО РИСКА ===== */
.risk-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.risk-modal--open {
  display: flex;
}

.risk-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.risk-modal__content {
  position: relative;
  background: linear-gradient(180deg, #0f1a2a, #0b1522);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  width: 100%;
  max-width: 1400px;
  max-height: 95vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.risk-modal__header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--stroke);
  background: linear-gradient(180deg, #0f1b2b, #0b1625);
}

.risk-modal__badge {
  width: 16px;
  height: 16px;
  border-radius: 8px;
  flex-shrink: 0;
  margin-top: 4px;
}

.risk-modal__badge--critical {
  background: #ef4444;
}

.risk-modal__badge--high {
  background: #f59e0b;
}

.risk-modal__badge--medium {
  background: #3b82f6;
}

.risk-modal__badge--low {
  background: #10b981;
}

.risk-modal__title {
  flex: 1;
  margin-right: 40px;
}

.modal-risk-level {
  display: inline-block;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  align-self: flex-start;
}

.modal-risk-level--critical {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.modal-risk-level--high {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.modal-risk-level--medium {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.modal-risk-level--low {
  background: linear-gradient(135deg, #10b981, #059669);
}

.modal-risk-title-text {
  font-size: 20px;
  font-weight: 700;
  color: #e6f0ff;
  line-height: 1.3;
}

.risk-modal__close {
  background: none;
  border: none;
  color: #9db7d6;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.risk-modal__close:hover {
  background: rgba(156, 183, 214, 0.1);
  color: #cfe5ff;
}

.risk-modal__body {
  padding: 0;
  overflow-y: auto;
  max-height: calc(95vh - 120px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.risk-modal__left {
  padding: 24px;
  border-right: 1px solid var(--stroke);
  background: linear-gradient(180deg, #0f1b2b, #0b1625);
}

/* Дисклеймер ИИ */
.risk-modal__disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  margin-bottom: 20px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  border-left: 4px solid #f59e0b;
}

.disclaimer__icon {
  color: #f59e0b;
  flex-shrink: 0;
  margin-top: 2px;
}

.disclaimer__text {
  font-size: 13px;
  line-height: 1.4;
  color: #fbbf24;
}

.disclaimer__text strong {
  color: #f59e0b;
  font-weight: 600;
}

.risk-modal__right {
  padding: 24px;
  background: linear-gradient(180deg, #0b1522, #0a1420);
}

.risk-modal__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
}

.risk-modal__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.risk-modal__label {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.risk-modal__value {
  font-size: 14px;
  color: #cfe5ff;
  font-weight: 600;
}

.risk-modal__description {
  font-size: 14px;
  line-height: 1.5;
  color: #cfe5ff;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 8px;
}

.risk-modal__factors,
.risk-modal__mitigation,
.risk-modal__timeline {
  margin-bottom: 16px;
}

.risk-modal__factors h4,
.risk-modal__mitigation h4,
.risk-modal__timeline h4 {
  font-size: 14px;
  font-weight: 600;
  color: #e6f0ff;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.risk-modal__factors h4::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-right: 6px;
}

.risk-modal__mitigation h4::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-right: 6px;
}

.risk-modal__timeline h4::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12,6 12,12 16,14'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-right: 6px;
}

.risk-modal__factors-content,
.risk-modal__mitigation-content,
.risk-modal__timeline-content {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  color: #93c5fd;
  line-height: 1.4;
  font-size: 13px;
}

.risk-modal__mitigation-content {
  color: #6ee7b7;
}

.risk-modal__timeline-content {
  color: #fbbf24;
}

.risk-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.risk-item:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

.risk-item--mitigation {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.2);
}

.risk-item--mitigation:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

.risk-item--timeline {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.2);
}

.risk-item--timeline:hover {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

.risk-item__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.risk-item__icon--warning {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.risk-item__icon--shield {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.risk-item__icon--clock {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12,6 12,12 16,14'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.risk-item__text {
  flex: 1;
  line-height: 1.4;
}