
.calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.calc-section {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 0.75rem;
  box-sizing: border-box;
}

.calc-section h4 {
  color: #495057;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1.2;
}

.calc-section h4 i {
  font-size: 0.9rem;
}

.input-group {
  margin-bottom: 0.6rem;
}

.input-group:last-child {
  margin-bottom: 0;
}

.input-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
  color: #495057;
  font-size: 0.85rem;
  line-height: 1.2;
}

.input-group input {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.85rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  box-sizing: border-box;
  min-width: 0;
}

.input-group input:focus {
  outline: 0;
  border-color: #007bff;
  box-shadow: 0 0 0 0.15rem rgba(0, 123, 255, 0.25);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 2rem;
}

.metric-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem;
  border-radius: 6px;
  text-align: center;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
}

.metric-card.positive {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.metric-card.negative {
  background: linear-gradient(135deg, #fc466b 0%, #3f5efb 100%);
}

.metric-card.warning {
  background: linear-gradient(135deg, #FDBB2D 0%, #22C1C3 100%);
}

.metric-card.default {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.metric-value {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
  line-height: 1.2;
}

.metric-label {
  font-size: 0.8rem;
  opacity: 0.95;
  margin-bottom: 0.2rem;
  font-weight: 600;
}

.metric-description {
  font-size: 0.7rem;
  opacity: 0.85;
  line-height: 1.1;
}

.controls {
  display: flex;
  gap: 0.75rem;
  margin: 1.5rem 0;
  justify-content: center;
  flex-wrap: wrap;
}

.controls .btn {
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
}

.controls .btn-sm {
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
}

.export-dropdown {
  position: relative;
  display: inline-block;
}

.export-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #ced4da;
  border-radius: 4px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  min-width: 180px;
  margin-top: 2px;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.export-menu.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.export-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1rem;
  border: none;
  background: white;
  color: #495057;
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s;
}

.export-item:hover {
  background: #f8f9fa;
}

.export-item:first-child {
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.export-item:last-child {
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.export-item i {
  font-size: 0.75rem;
  width: 14px;
}

/* Адаптивность */
@media (max-width: 1200px) {
  .calc-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .results-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .calc-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .results-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .metric-card {
    padding: 0.8rem;
  }
  
  .metric-value {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .results-grid {
    grid-template-columns: 1fr;
  }
}
