/* Same visual design as the original LLL_MPI_Chart_Template.html, made
   responsive for a real browser (phone + laptop) instead of a fixed
   750px PNG export target. */

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #ffffff;
  max-width: 750px;
  margin: 0 auto;
  padding: 32px 20px 36px;
  color: #1a1a1a;
}

.header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.header h1 { font-size: 26px; font-weight: 800; color: #1a1a1a; margin-bottom: 4px; }
.header p { font-size: 14px; color: #6b6b6b; margin-bottom: 24px; }
.edit-link {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 700;
  color: #1c4d9e;
  background: #eaf1fd;
  border: 2px solid #bcd4f7;
  border-radius: 10px;
  padding: 8px 14px;
  text-decoration: none;
  white-space: nowrap;
}
.edit-link:hover { background: #dbe8fb; }

.row { display: flex; align-items: center; gap: 14px; }
.card { flex: 1; min-width: 0; border-radius: 14px; padding: 16px 20px; border: 2px solid; }
.card.qualifying { background: #eaf1fd; border-color: #bcd4f7; }
.card.eligibility { background: #eaf6ea; border-color: #c3e6c3; }
.card.eligibility.pending { background: #f4f4f2; border-color: #d8d6d0; border-style: dashed; }
.card.current { background: #fdf1dc; border-color: #f0c877; }

.card-title { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.card.qualifying .card-title { color: #1c4d9e; }
.card.eligibility .card-title { color: #2c7a2c; }
.card.eligibility.pending .card-title { color: #9a988f; }
.card.current .card-title { color: #b8791a; }

.card-dates { font-size: 13.5px; margin-bottom: 12px; }
.card.qualifying .card-dates { color: #3868b0; }
.card.eligibility .card-dates { color: #3f8f3f; }
.card.eligibility.pending .card-dates { color: #a8a69c; }
.card.current .card-dates { color: #c2911f; }

.marker-label-row { position: relative; height: 18px; margin-bottom: 2px; }
.marker-label { position: absolute; top: 0; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.marker-label.b400 { color: #1a1a1a; transform: translateX(-50%); }
.marker-label.b850 { color: #c0392b; transform: translateX(-100%); }

.bar-track { position: relative; height: 30px; background: #e4e2da; border-radius: 8px; margin-bottom: 4px; }
.bar-fill-complete {
  height: 100%; width: 100%; background: #3f9142; border-radius: 8px;
  display: flex; align-items: center; padding: 0 12px;
  font-size: 14px; font-weight: 700; color: #ffffff;
}
.bar-fill-current {
  height: 100%; background: #3f9142; border-radius: 8px 0 0 8px;
  display: flex; align-items: center; justify-content: flex-end; padding: 0 10px;
  font-size: 14px; font-weight: 700; color: #ffffff; white-space: nowrap; min-width: fit-content;
}
.bar-marker { position: absolute; top: 0; width: 3px; height: 30px; }
.bar-marker-400 { background: #1a1a1a; }
.bar-marker-850 { background: #c0392b; }

.breakdown { font-size: 13px; color: #3868b0; margin-top: 10px; line-height: 1.5; }
.card.current .breakdown { color: #4a4a4a; }
.note { font-size: 13px; color: #4a4a4a; margin-top: 10px; line-height: 1.5; }

.arrow { font-size: 20px; color: #9a988f; flex: 0 0 auto; }

.divider { font-size: 13px; color: #8a8880; padding: 14px 0; display: flex; align-items: center; gap: 10px; }
.divider-line { flex: 1; height: 1px; background: #e2e0d8; }

.legend {
  margin-top: 22px; padding-top: 16px; border-top: 1px solid #e2e0d8;
  display: flex; flex-wrap: wrap; gap: 20px; font-size: 12.5px; color: #4a4a4a;
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-swatch { width: 13px; height: 13px; border-radius: 3px; display: inline-block; }

.status-note { font-size: 13.5px; color: #8a8880; padding: 20px 0; }

@media (max-width: 560px) {
  .row { flex-direction: column; align-items: stretch; }
  .arrow { transform: rotate(90deg); align-self: center; }
}

/* /edit page */
.edit-table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 14px; }
.edit-table th, .edit-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e2e0d8; }
.edit-table th { color: #6b6b6b; font-weight: 700; font-size: 12.5px; text-transform: uppercase; }
.edit-table input { width: 100%; border: 1px solid #d8d6d0; border-radius: 6px; padding: 6px 8px; font-size: 14px; }
.edit-table td.actions { display: flex; gap: 6px; white-space: nowrap; }
.btn {
  border: none; border-radius: 8px; padding: 8px 14px; font-size: 13.5px; font-weight: 700;
  cursor: pointer;
}
.btn-primary { background: #3f9142; color: #fff; }
.btn-primary:hover { background: #357a38; }
.btn-secondary { background: #eaf1fd; color: #1c4d9e; }
.btn-secondary:hover { background: #dbe8fb; }
.btn-danger { background: #fdeaea; color: #c0392b; }
.btn-danger:hover { background: #fbdada; }
.btn:disabled { opacity: 0.5; cursor: default; }
.add-row-form {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end;
  margin-top: 20px; padding-top: 20px; border-top: 1px solid #e2e0d8;
}
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: #6b6b6b; }
.field input { border: 1px solid #d8d6d0; border-radius: 8px; padding: 8px 10px; font-size: 14px; color: #1a1a1a; }
.total-line { margin-top: 16px; font-size: 14px; color: #4a4a4a; }
.error-banner {
  background: #fdeaea; border: 1px solid #f3c3c3; color: #a13333;
  border-radius: 10px; padding: 10px 14px; font-size: 13.5px; margin-top: 14px;
}
