.new-income-container {
  color: #333;
  width: 100%;
  max-width: 100vw;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.form-card {
  background-color: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.form-header h1 {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin: 0;
}

.back-button {
  background-color: #6c757d;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  transition: background-color 0.2s;
}

.back-button:hover {
  background-color: #5a6268;
}

.back-button:active {
  background-color: #545b62;
}

.success-message {
  background-color: #d4edda;
  color: #155724;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #c3e6cb;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  border: 1px solid #f5c6cb;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 30px;
}

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

.form-grid label {
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 5px;
  display: block;
  color: #333;
}

.form-grid input,
.form-grid select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  background-color: #f9f9f9;
  transition: border-color 0.2s ease;
}

.form-grid input:focus,
.form-grid select:focus {
  outline: none;
  border-color: #ffcb05;
  background-color: #fff;
}

.form-grid input[type="number"] {
  text-align: right;
}

.save-button-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.save-button {
  background-color: #ffcb05;
  color: #fff !important;
  padding: 12px 30px;
  font-weight: bold;
  border: none;
  border-radius: 25px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.save-button:hover:not(:disabled) {
  background-color: #f4b400;
}

.save-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.income-categories {
  width: 100%;
  box-sizing: border-box;
}

.income-categories h3 {
  margin-top: 20px;
  margin-bottom: 10px;
}

.income-categories > div {
  border: 1px solid #ccc;
  padding: 10px;
  margin-top: 10px;
  width: 100%;
  box-sizing: border-box;
}

.income-categories .category-item {
  margin-bottom: 10px;
  border-bottom: 1px dotted #eee;
  padding-bottom: 5px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.category-item > div {
  width: 100%;
  box-sizing: border-box;
}

.category-item label {
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 5px;
  display: block;
  color: #333;
}

.category-item select,
.category-item input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  background-color: #f9f9f9;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.category-item input[readonly] {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.category-item input:focus,
.category-item select:focus {
  outline: none;
  border-color: #ffcb05;
  background-color: #fff;
}

.taxes-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.taxes-container label {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  font-weight: normal;
  font-size: 13px;
}

.taxes-container input[type="checkbox"] {
  width: 8px;
  height: 8px;
  margin: 0;
  transform: scale(0.5);
}

.total-income-summary {
  margin-top: 20px;
  padding: 10px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  width: 100%;
  box-sizing: border-box;
}

/* Responsive design */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .new-income-container {
    padding: 10px;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .form-card {
    padding: 15px;
  }

  .category-item {
    grid-template-columns: 1fr !important;
    gap: 5px !important;
  }

  .taxes-container {
    flex-direction: column;
    gap: 5px;
  }

  .taxes-container label {
    margin: 2px 0;
  }
}

.save-button.disabled-validation {
  background-color: #808080 !important;
  color: #fff !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}

.save-button.disabled-validation:hover {
  background-color: #dc3545 !important;
  transform: none !important;
}
