


/* Кнопка открытия */
#profitCalcOpenBtn {
  background: #879ba6;
  color: white;
  padding: 12px 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  transition: background 0.3s ease, transform 0.2s ease;
}
#profitCalcOpenBtn:hover {
  background: #67838b;
  transform: translateY(-1px);
}

/* Оверлей */
.profit-calc-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  backdrop-filter: blur(2px);
}

/* Модальное окно */
.profit-calc-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  width: 95%;
  max-width: 1200px;
  max-height: 85vh;
  background: transparent;
  animation: profitCalcModalAppear 0.3s ease-out;
}
@keyframes profitCalcModalAppear {
  0% { opacity: 0; transform: translate(-50%, -40%); }
  100% { opacity: 1; transform: translate(-50%, -50%); }
}
.profit-calc-modal-content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  border: 1px solid #2563eb;
  overflow: hidden;
}
.profit-calc-modal-header {
  background: #2563eb;
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 16px 16px 0 0;
  flex-shrink: 0;
}
.profit-calc-modal-header h2 {
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}
#profitCalcCloseBtn {
  background: none;
  border: none;
  color: #ee6c6c;
  font-size: 24px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}
#profitCalcCloseBtn:hover {
  background: rgba(255, 255, 255, 0.4);
  color: #ff4444;
}
.profit-calc-modal-body {
  overflow-y: auto;
  max-height: calc(85vh - 70px);
  padding: 0 20px 20px 20px;
}
.profit-calc-disclaimer {
  background: #fff8e1;
  border-left: 4px solid #ffc107;
  padding: 15px;
  font-size: 13px;
  margin: 15px 0;
  border-radius: 0 8px 8px 0;
  color: #333;
}
.profit-calc-form-container {
  padding: 0;
}
.profit-calc-input-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}
.profit-calc-input-group {
  margin-bottom: 15px;
}
.profit-calc-input-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #374151;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.profit-calc-input-group input {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  background: #f9fafb;
  transition: border-color 0.2s;
}
.profit-calc-input-group input:focus {
  outline: none;
  border-color: #2563eb;
  background: white;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.profit-calc-input-group input[readonly] {
  background: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
}
.profit-calc-budget-info {
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
}
.profit-calc-budget-warning {
  color: #ff6b35;
  font-size: 12px;
  margin-top: 6px;
}
.profit-calc-calculate-btn-container {
  text-align: center;
  margin: 20px 0;
}
#profitCalcCalculateBtn {
  background: #2563eb;
  color: white;
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
  transition: all 0.2s;
}
#profitCalcCalculateBtn:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}
.profit-calc-results {
  display: none;
  padding: 20px 0;
  border-top: 1px solid #e5e7eb;
}
.profit-calc-results-header {
  text-align: center;
  margin-bottom: 20px;
}
.profit-calc-results-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
}
.profit-calc-results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}
.profit-calc-result-card {
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
  border-left: 4px solid #2563eb;
}
.profit-calc-result-card h4 {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 15px 0;
}
.profit-calc-result-item {
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.4;
}
.profit-calc-highlight {
  font-weight: 600;
  color: #2563eb;
}
.profit-calc-positive {
  color: #2e7d32;
  font-weight: 600;
}
.profit-calc-negative {
  color: #c62828;
  font-weight: 600;
}
.profit-calc-warning {
  color: #ff6b35;
  font-weight: 600;
}
.profit-calc-recommendation-card {
  border-left-color: #f57c00;
  background: #fff3e0;
}
.profit-calc-budget-card {
  border-left-color: #2e7d32;
  background: #e8f5e9;
}
.profit-calc-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
  margin: 15px 0;
}
.profit-calc-stat-item {
  background: white;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.profit-calc-stat-number {
  font-size: 18px;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 5px;
}
.profit-calc-stat-label {
  font-size: 12px;
  color: #6b7280;
}
.profit-calc-expand-btn {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin-top: 10px;
  font-weight: 500;
}
.profit-calc-expand-content {
  display: none;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e5e7eb;
}
.profit-calc-ul {
  padding-left: 20px;
  margin: 10px 0;
}
.profit-calc-li {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.4;
}
.profit-calc-income-section {
  margin: 15px 0;
  padding: 15px;
  background: white;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.profit-calc-income-title {
  font-weight: 600;
  color: #374151;
  margin-bottom: 10px;
  font-size: 14px;
}
.profit-calc-income-details {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 10px;
}
.profit-calc-income-value {
  font-weight: 600;
}
.profit-calc-plan-value {
  color: #2563eb;
}
.profit-calc-fact-value {
  color: #7b1fa2;
}
.profit-calc-difference {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e5e7eb;
}
@media (max-width: 1024px) {
  .profit-calc-input-grid { grid-template-columns: repeat(2, 1fr); }
  .profit-calc-results-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .profit-calc-input-grid { grid-template-columns: 1fr; gap: 15px; }
  .profit-calc-results-grid { grid-template-columns: 1fr; gap: 20px; }
  .profit-calc-modal { width: 95%; }
  .profit-calc-modal-header h2 { font-size: 18px; }
}
@media (max-width: 480px) {
  .profit-calc-modal-header h2 { font-size: 16px; }
  .profit-calc-stat-grid { grid-template-columns: repeat(2, 1fr); }
}