  .form-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
      gap: 0.5rem;
  }

  .form-grid-additions {
      display: grid;
      grid-template-columns: repeat(3, minmax(120px, 1fr));
      gap: 0.5rem;
  }

  @media (max-width: 480px) {
      .form-grid {
          grid-template-columns: repeat(3, 1fr);
          /* Force 2 columns on very small screens */
      }
  }
  div.row-final input {
    background-color: burlywood;
  }
  .form-group {
      display: flex;
      flex-direction: column;
      margin-bottom: 0.25rem;

  }

  .form-group label {
      font-size: 0.75em;
      margin-bottom: 0.25rem;
      color: #555;
  }

  .form-group input {
      padding: 0.5rem;
      font-size: 1rem;
      border: 1px solid #ccc;
      border-radius: 4px;
  }

  .panel {
      background: #f6f6f6;
      border: 1px solid #ccc;
  }

  .form-scroll {
      overflow-x: auto;
      max-width: 100%;
  }

  .modal {
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .modal.show {
      opacity: 1;
      visibility: visible;
  }
  .action-button {
  background-color: #0073aa;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.action-button:hover {
  background-color: #005f8d;
}

/* Updated CSS (we need to clean this...)
/* Panel styling */
.panel {
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #f9f9f9;
  margin-bottom: 1rem;
}

/* Section headers */
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.panel-header h4 {
  margin: 0;
}

.panel-header i {
  font-size: 1.2rem;
}

/* Top action buttons */
.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-bottom: 1rem;
}

/* Form grid layouts */
.form-grid,
.form-grid-additions {
  display: grid;
  gap: 1rem;
}

.form-grid-additions {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.form-grid.results {
  grid-template-columns: 100px repeat(6, minmax(80px, 1fr));
  gap: 0.5rem;
}

/* Modal styling */
.calc-modal,
#exportModal,
#importModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
}

.calc-modal-content,
#exportModal > div,
#importModal > div {
  background: #fff;
  padding: 1rem;
  max-width: 400px;
  margin: 10% auto;
  border-radius: 6px;
  position: relative;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.modal-fullwidth {
  width: 100%;
  margin-bottom: 1rem;
}

/* Utility */
.align-center {
  text-align: center;
}

.align-self-center {
  align-self: center;
}

.font-small-bold {
  font-size: 0.75em;
  font-weight: bold;
}

