/* Overall layout */
body {
  margin: 0;
  background: #f6f8fb;
  color: #0f172a;
  padding: 20px;
  line-height: 1.5;
}

header {
  grid-column: span 2;
  text-align: center;
  margin-bottom: 16px;
}

header h1 {
  margin: 0 0 6px 0;
  font-size: 26px;
  font-weight: 600;
}

header p {
  font-size: 14px;
  color: #475569;
}

/* Grid */
main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

/* Card panels */
.card {
  background: #fff;
  padding: 16px 18px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.card h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
}

/* Rows and form elements */
.row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

input,
select,
button {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

input:focus,
select:focus {
  border-color: #0ea5a4;
  outline: none;
  box-shadow: 0 0 0 2px rgba(14, 165, 164, 0.2);
}

button {
  cursor: pointer;
  background: #0ea5a4;
  color: white;
  border: none;
  font-weight: 500;
  transition: background 0.2s ease;
}

button:hover {
  background: #0c948f;
}

button.secondary {
  background: #64748b;
}

.smallbtn {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
  background: #e2e8f0;
  color: #0f172a;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.smallbtn:hover {
  background: #cbd5e1;
}

/* Muted text */
.muted {
  color: #64748b;
  font-size: 13px;
}

/* Route list */
#routeList {
  padding-left: 18px;
}

#routeList li {
  margin-bottom: 8px;
  font-size: 14px;
}

/* Results table (improved) */
#results table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 14px;
  border-radius: 6px;
  overflow: hidden;
}

#results th,
#results td {
  border: 1px solid #e2e8f0;
  padding: 10px 12px;
  text-align: center;
}

#results th {
  background-color: #0ea5a4;
  color: white;
  font-weight: 600;
}

#results tr:nth-child(even) {
  background-color: #f9fafb;
}

#results tr:hover {
  background-color: #eefdfd;
}

#results td {
  white-space: nowrap;
  font-size: 13px;
}

#summary p {
  margin: 6px 0;
  font-size: 15px;
}

/* Footer */
footer {
  grid-column: span 2;
  text-align: center;
  font-size: 12px;
  color: #64748b;
  margin-top: 20px;
}


.container-charge {
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 15px;
  background: #f9f9f9;
}

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

.charge-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.field {
  display: flex;
  flex-direction: column;
}

.field label {
  font-size: 0.9em;
  margin-bottom: 4px;
  color: #555;
}

input,
select {
  padding: 6px 8px;
  border: 1px solid #aaa;
  border-radius: 4px;
}

.smallbtn.remove-btn {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 5px 8px;
  cursor: pointer;
  border-radius: 3px;
}

.smallbtn.remove-btn:hover {
  background: #c0392b;
}