/* CSS НАСТРОЙКИ И ДИЗАЙН-СИСТЕМА */
:root {
  --bg-primary: #08090c;
  --bg-secondary: #111317;
  --bg-card: rgba(17, 19, 23, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(227, 6, 19, 0.35);
  
  /* Акцентные цвета (Брендовый Красный автосервиса) */
  --accent-cyan: #e30613;
  --accent-purple: #7a0010;
  --accent-gradient: linear-gradient(135deg, #e30613 0%, #7a0010 100%);
  --accent-glow: 0 0 15px rgba(227, 6, 19, 0.45);
  
  /* Шрифты */
  --font-main: 'Outfit', 'Montserrat', sans-serif;
  --font-tech: 'Orbitron', 'Ubuntu', monospace;
  
  /* Семантические цвета */
  --color-critical: #e30613;
  --color-critical-bg: rgba(227, 6, 19, 0.15);
  --color-critical-border: rgba(227, 6, 19, 0.3);
  --color-critical-gradient: linear-gradient(135deg, #e30613 0%, #ff525b 100%);
  
  --color-warning: #ff9f0a;
  --color-warning-bg: rgba(255, 159, 10, 0.15);
  --color-warning-border: rgba(255, 159, 10, 0.3);
  
  --color-info: #34c759;
  --color-info-bg: rgba(52, 199, 89, 0.15);
  --color-info-border: rgba(52, 199, 89, 0.3);

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dark: #111827;

  --transition-speed: 0.3s;
}

/* СБРОС СТИЛЕЙ И БАЗОВЫЕ ПРАВИЛА */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  min-height: 100vh;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.5;
  overflow-x: hidden;
}

/* ФОНОВЫЕ СФЕРЫ */
.glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  animation: floatSphere 20s infinite ease-in-out alternate;
}

.sphere-1 {
  width: 500px;
  height: 500px;
  background: var(--accent-cyan);
  top: -10%;
  right: -10%;
  animation-duration: 25s;
}

.sphere-2 {
  width: 600px;
  height: 600px;
  background: var(--accent-purple);
  bottom: -15%;
  left: -10%;
  animation-duration: 30s;
}

@keyframes floatSphere {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(80px, 50px) scale(1.15);
  }
}

/* КОНТЕЙНЕР ПРИЛОЖЕНИЯ */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ШАПКА */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px;
  background: var(--bg-card);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  margin-bottom: 25px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

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

.logo-img-wrapper {
  width: 100px;
  height: auto;
  display: flex;
  align-items: center;
  filter: drop-shadow(0 0 8px rgba(227, 6, 19, 0.45));
}

.brand-logo-img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.logo-text h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.logo-text h1 span {
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.logo-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.green {
  background-color: var(--color-info);
  box-shadow: 0 0 8px var(--color-info);
}

.status-dot.red {
  background-color: var(--color-critical);
  box-shadow: 0 0 8px var(--color-critical);
}

.status-dot.orange {
  background-color: var(--color-warning);
  box-shadow: 0 0 8px var(--color-warning);
  animation: pulse 1.5s infinite;
}

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

/* ИКОНОЧНЫЕ КНОПКИ */
.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition-speed) ease;
}

.icon-btn:hover {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #fff;
  transform: rotate(30deg);
  box-shadow: var(--accent-glow);
}

/* ПРОГРЕСС ШАГОВ */
.steps-progress {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px auto 30px;
  width: 100%;
  max-width: 800px;
  padding: 0 20px;
}

.steps-progress::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 30px;
  right: 30px;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  z-index: 1;
  border-radius: 2px;
}

.progress-bar-fill {
  position: absolute;
  top: 20px;
  left: 30px;
  height: 4px;
  background: var(--accent-gradient);
  z-index: 2;
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.step-node {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: default;
}

.step-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.4s ease;
}

.step-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.4s ease;
}

.step-node.active .step-circle {
  background: var(--bg-primary);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: var(--accent-glow), inset 0 0 10px rgba(0, 240, 255, 0.2);
}

.step-node.active .step-label {
  color: var(--accent-cyan);
  font-weight: 700;
}

.step-node.completed .step-circle {
  background: var(--accent-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
}

.step-node.completed .step-label {
  color: var(--accent-purple);
}

/* ШАБЛОНЫ ШАГОВ (WIZARD STEPS) */
.wizard-step {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.wizard-step.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* КАРТОЧКА ШАГА (GLASSMORPHISM) */
.step-card {
  background: var(--bg-card);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  margin-bottom: 25px;
}

.card-header {
  margin-bottom: 25px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.card-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-header h2 i {
  color: var(--accent-cyan);
}

.card-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 5px;
}

/* ФОРМА ВЫБОРА АВТОМОБИЛЯ */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

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

.form-group.full-width {
  grid-column: span 2;
}

.form-group.hidden {
  display: none;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group label i {
  color: var(--accent-purple);
}

/* ВЫПАДАЮЩИЕ СПИСКИ И ПОЛЯ ВВОДА */
.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: color 0.2s ease;
}

.select-wrapper:hover::after {
  color: var(--accent-cyan);
}

select, input[type="text"], input[type="password"], textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 14px 20px;
  border-radius: 12px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
  appearance: none; /* Убирает дефолтную стрелку */
}

select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.01);
}

select:focus, input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15), inset 0 0 5px rgba(0, 240, 255, 0.05);
  background: rgba(255, 255, 255, 0.05);
}

/* Описание проблемы */
.description-group {
  margin-top: 25px;
  border-top: 1px solid var(--border-color);
  padding-top: 25px;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.textarea-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 5px;
}

/* КНОПКИ */
.primary-btn {
  background: var(--accent-gradient);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition-speed) ease;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.primary-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--accent-glow), 0 6px 20px rgba(139, 92, 246, 0.5);
}

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

.primary-btn:disabled {
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all var(--transition-speed) ease;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.secondary-btn:active {
  transform: translateY(0);
}

.pulse-glow {
  animation: pulseGlow 2s infinite alternate;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.2);
  }
  100% {
    box-shadow: 0 4px 25px rgba(0, 240, 255, 0.6);
  }
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  gap: 15px;
}

.flex-spacer {
  flex-grow: 1;
}

/* ШАГ 2: БЕЙДЖ АВТОМОБИЛЯ И СИМПТОМЫ */
.selected-car-badge {
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  color: var(--accent-cyan);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
}

.selected-car-badge strong {
  font-weight: 700;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.section-title i {
  color: var(--accent-purple);
}

.symptom-categories {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

.category-block {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px;
  transition: border-color 0.2s ease;
}

.category-block:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.category-block h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-block h4 i {
  color: var(--accent-cyan);
  width: 16px;
  text-align: center;
}

.symptom-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ТЕГИ СИМПТОМОВ */
.tag-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.tag-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border-color: var(--text-muted);
}

.tag-btn.active {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 600;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

/* ШАГ 3: КАРТОЧКА ОБД-СКАНЕРА */
.obd-scanner-card {
  background: #07090e;
  border: 3px solid #1c273a;
  border-radius: 24px;
  padding: 5px;
  box-shadow: 0 15px 50px rgba(0,0,0,0.6);
  position: relative;
  overflow: hidden;
}

.scanner-screen {
  background: #020408;
  border: 1px solid #141b26;
  border-radius: 18px;
  padding: 25px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.scanner-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #122137;
  padding-bottom: 12px;
  font-family: var(--font-tech);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-cyan);
  text-shadow: 0 0 5px rgba(0, 240, 255, 0.5);
  letter-spacing: 0.5px;
}

.scanner-voltage {
  color: #f59e0b;
  text-shadow: 0 0 5px rgba(245, 158, 11, 0.5);
}

.scanner-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 30px;
  align-items: center;
}

/* КРУГОВОЙ ИНДИКАТОР SCANNING */
.scanner-gauge {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-ring {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.gauge-ring-bg {
  fill: none;
  stroke: #1b1213;
  stroke-width: 8px;
}

.gauge-ring-fill {
  fill: none;
  stroke: var(--accent-cyan);
  stroke-width: 8px;
  stroke-dasharray: 314.15; /* 2 * PI * r (r=50) */
  stroke-dashoffset: 314.15; /* Изначально пусто */
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s linear;
  filter: drop-shadow(0 0 6px var(--accent-cyan));
}

.gauge-value {
  position: absolute;
  font-family: var(--font-tech);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
  top: 40%;
}

.gauge-label {
  position: absolute;
  font-family: var(--font-tech);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 2px;
  bottom: 25%;
  animation: pulse 1s infinite alternate;
}

/* ПАНЕЛЬ СТАТУСОВ СКАНИРОВАНИЯ */
.scanner-status-panel {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.scan-status-item {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.scan-status-item.pending {
  opacity: 0.3;
}

.scan-status-item.completed {
  color: var(--color-info);
}

.scan-status-item.completed .status-marker {
  color: var(--color-info);
  text-shadow: 0 0 8px rgba(52, 199, 89, 0.5);
}

.scan-status-item .status-marker {
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
  color: var(--accent-cyan);
}

/* ТЕРМИНАЛ ЛОГОВ */
.scanner-terminal {
  background: #02060c;
  border: 1px solid #0f1c30;
  border-radius: 12px;
  padding: 15px 20px;
  height: 140px;
  font-family: var(--font-tech);
  font-size: 0.75rem;
  color: #10b981;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.terminal-line {
  line-height: 1.4;
  opacity: 0.9;
}

.terminal-line.success {
  color: var(--color-info);
}

.terminal-line.error {
  color: var(--color-critical);
}

.scanner-footer {
  text-align: center;
  padding: 12px;
  border-top: 1px solid #142137;
  background: #05070a;
}

.scanner-tip {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.scanner-tip i {
  color: #f59e0b;
}

/* ШАГ 4: ОТЧЕТ ДИАГНОСТИКИ */
.report-container {
  background: var(--bg-card);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 25px;
}

.report-title-block h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.report-badge {
  display: inline-block;
  background: var(--accent-gradient);
  color: #fff;
  font-family: var(--font-tech);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 1px;
  margin-top: 5px;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

.report-date-car {
  display: flex;
  gap: 20px;
  margin-top: 15px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.report-date-car i {
  color: var(--accent-cyan);
}

.report-date-car strong {
  color: var(--text-main);
}

.report-brand-logo {
  font-size: 2.8rem;
  color: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.03);
  padding: 15px;
  border-radius: 18px;
  box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.02);
}

/* КАРТОЧКА КРИТИЧНОСТИ */
.severity-card {
  display: flex;
  gap: 20px;
  padding: 22px 25px;
  border-radius: 16px;
  align-items: flex-start;
  transition: all 0.3s ease;
}

.severity-card.critical {
  background: var(--color-critical-bg);
  border: 1px solid var(--color-critical-border);
  box-shadow: 0 0 20px rgba(255, 59, 48, 0.1);
}

.severity-card.critical .severity-icon-box {
  background: var(--color-critical);
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 59, 48, 0.5);
}

.severity-card.critical .severity-label span {
  color: var(--color-critical);
  font-weight: 800;
}

.severity-card.warning {
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning-border);
  box-shadow: 0 0 20px rgba(255, 159, 10, 0.1);
}

.severity-card.warning .severity-icon-box {
  background: var(--color-warning);
  color: var(--text-dark);
  box-shadow: 0 0 12px rgba(255, 159, 10, 0.5);
}

.severity-card.warning .severity-label span {
  color: var(--color-warning);
  font-weight: 800;
}

.severity-card.info {
  background: var(--color-info-bg);
  border: 1px solid var(--color-info-border);
  box-shadow: 0 0 20px rgba(52, 199, 89, 0.1);
}

.severity-card.info .severity-icon-box {
  background: var(--color-info);
  color: #fff;
  box-shadow: 0 0 12px rgba(52, 199, 89, 0.5);
}

.severity-card.info .severity-label span {
  color: var(--color-info);
  font-weight: 800;
}

.severity-icon-box {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.severity-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.severity-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.severity-desc {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.5;
}

/* СЕТКА ОТЧЕТА */
.report-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 30px;
}

.report-column-left,
.report-column-right {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.report-column-left .report-section-card {
  height: 100%;
  flex: 1;
}

.report-section-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 25px;
}

.report-section-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.report-section-card h3 i {
  color: var(--accent-cyan);
}

/* СПИСОК ПРИЧИН */
.causes-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cause-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 18px;
  transition: all 0.3s ease;
}

.cause-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-hover);
  transform: translateX(4px);
}

.cause-header {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
}

.cause-name {
  color: var(--text-main);
}

.cause-prob {
  color: var(--accent-cyan);
  font-family: var(--font-tech);
}

.prob-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  margin-bottom: 12px;
  overflow: hidden;
}

.prob-bar-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.cause-explanation {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ЧЕКЛИСТ С ГАЛОЧКАМИ */
.checklist-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.check-container {
  display: flex;
  position: relative;
  padding-left: 35px;
  cursor: pointer;
  font-size: 0.9rem;
  user-select: none;
  align-items: flex-start;
  color: var(--text-main);
}

.check-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 2px;
  left: 0;
  height: 22px;
  width: 22px;
  background-color: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.check-container:hover input ~ .checkmark {
  background-color: rgba(255,255,255,0.08);
  border-color: var(--accent-cyan);
}

.check-container input:checked ~ .checkmark {
  background: var(--accent-gradient);
  border-color: transparent;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.check-container input:checked ~ .checkmark:after {
  display: block;
}

.check-container .checkmark:after {
  left: 8px;
  top: 4px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.check-text {
  line-height: 1.4;
  transition: color 0.2s ease;
}

.check-container input:checked ~ .check-text {
  color: var(--text-muted);
  text-decoration: line-through;
}

/* СПИСОК РЕКОМЕНДАЦИЙ */
.recommendations-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recommendations-list li {
  position: relative;
  padding-left: 25px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-main);
}

.recommendations-list li::before {
  content: '\f061';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 3px;
  color: var(--accent-purple);
  font-size: 0.8rem;
}

/* КАРТОЧКА СТОИМОСТИ */
.cost-card {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(0, 240, 255, 0.05) 100%);
  border: 1px dashed rgba(0, 240, 255, 0.2) !important;
}

.cost-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cost-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cost-label {
  font-size: 0.88rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.cost-label i {
  color: var(--accent-cyan);
}

.cost-value {
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

/* Дисклеймер отчета */
.report-disclaimer {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 12px 20px;
  border-radius: 10px;
  line-height: 1.4;
}

.report-disclaimer strong {
  color: var(--text-main);
}

/* ПАНЕЛЬ ДЕЙСТВИЙ ОТЧЕТА */
.report-actions-panel {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

/* ПОДВАЛ */
.app-footer-bar {
  text-align: center;
  padding: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  margin-top: 40px;
}

/* МОДАЛЬНОЕ ОКНО */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.open {
  display: flex;
}

.modal-dialog {
  width: 100%;
  max-width: 500px;
  padding: 20px;
  animation: modalSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-hover);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 50px rgba(0, 240, 255, 0.15);
}

.modal-header {
  padding: 20px 25px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-header h3 i {
  color: var(--accent-cyan);
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-intro {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.api-key-input-wrapper {
  position: relative;
}

.api-key-input-wrapper input {
  padding-right: 50px;
}

.toggle-password-btn {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
}

.toggle-password-btn:hover {
  color: var(--text-main);
}

.input-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.input-hint a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.input-hint a:hover {
  text-decoration: underline;
}

.modal-footer {
  padding: 20px 25px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  background: rgba(0, 0, 0, 0.15);
}

/* УВЕДОМЛЕНИЯ (TOAST) */
.notification-toast {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  border: 1px solid var(--color-info-border);
  color: var(--text-main);
  padding: 16px 25px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 15px rgba(52, 199, 89, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2000;
  transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notification-toast.show {
  bottom: 30px;
}

.notification-toast i {
  font-size: 1.2rem;
  color: var(--color-info);
}

.notification-toast.error {
  border-color: var(--color-critical-border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 15px rgba(255, 59, 48, 0.1);
}

.notification-toast.error i {
  color: var(--color-critical);
}

/* АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ И ТЕЛЕФОНОВ */
@media (max-width: 992px) {
  .report-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-container {
    padding: 10px;
  }
  
  .app-header {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
    text-align: center;
  }
  
  .logo {
    justify-content: center;
  }
  
  .header-actions {
    justify-content: space-between;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .form-group.full-width {
    grid-column: span 1;
  }
  
  .scanner-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .report-container {
    padding: 20px;
  }
  
  .report-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .report-actions-panel {
    flex-direction: column;
  }
  
  .report-actions-panel button {
    width: 100%;
    justify-content: center;
  }
  
  .card-footer {
    flex-direction: column-reverse;
  }
  
  .card-footer button {
    width: 100%;
    justify-content: center;
  }
}

/* РЕЖИМ ПЕЧАТИ (ДЛЯ СОХРАНЕНИЯ В PDF) */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  
  .glow-bg, 
  .app-header, 
  .steps-progress, 
  .card-footer, 
  .report-actions-panel, 
  .app-footer-bar, 
  .modal,
  .notification-toast,
  .check-container input {
    display: none !important;
  }
  
  .app-container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }
  
  .report-container {
    background: #fff !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: #000 !important;
    display: block !important;
  }
  
  .report-header {
    border-bottom: 2px solid #000 !important;
    color: #000 !important;
  }
  
  .report-title-block h2 {
    color: #000 !important;
  }
  
  .report-badge {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #000 !important;
  }
  
  .severity-card {
    border: 2px solid #000 !important;
    background: #f9f9f9 !important;
    color: #000 !important;
    box-shadow: none !important;
  }
  
  .severity-icon-box {
    background: #000 !important;
    color: #fff !important;
    box-shadow: none !important;
  }
  
  .report-section-card {
    border: 1px solid #ddd !important;
    background: #fff !important;
    color: #000 !important;
    page-break-inside: avoid;
    margin-bottom: 20px;
  }
  
  .report-grid {
    display: block !important;
  }
  
  .cause-item {
    border: 1px solid #eee !important;
    background: #fff !important;
    margin-bottom: 10px;
  }
  
  .cause-name {
    color: #000 !important;
  }
  
  .cause-prob {
    color: #333 !important;
  }
  
  .prob-bar-container {
    background: #eee !important;
  }
  
  .prob-bar-fill {
    background: #333 !important;
  }
  
  .checkmark {
    border: 1px solid #000 !important;
  }
  
  .cost-card {
    background: #f9f9f9 !important;
    border: 1px dashed #000 !important;
  }
  
  .cost-value {
    color: #000 !important;
    text-shadow: none !important;
  }
}
