/* Debt Calculator-specific styles — complements Tailwind CDN */
html { scroll-behavior: smooth; }

/* Inputs & selects */
.dc-input {
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  color: #111827;
  background-color: #ffffff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.dc-input:focus {
  outline: none;
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}
.dc-input[type="number"] { -moz-appearance: textfield; }
.dc-input::-webkit-outer-spin-button,
.dc-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Debt rows (desktop: grid; mobile: stacked) */
.debt-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr 1fr auto;
  gap: 0.75rem;
  align-items: end;
  padding: 0.75rem;
  background-color: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}
.debt-row .field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.debt-row .remove-btn {
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: background-color 0.15s;
}
.debt-row .remove-btn:hover { background-color: #fee2e2; }
.debt-row .remove-btn:disabled { color: #d1d5db; cursor: not-allowed; }
.debt-row .remove-btn:disabled:hover { background-color: transparent; }

@media (max-width: 768px) {
  .debt-row {
    grid-template-columns: 1fr 1fr;
  }
  .debt-row .field.name { grid-column: 1 / -1; }
  .debt-row .remove-btn {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

/* Result columns */
.result-card {
  background-color: #ffffff;
  border-radius: 0.75rem;
  padding: 1.25rem;
  border: 2px solid transparent;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.result-card.snowball { border-color: #fb923c; }
.result-card.avalanche { border-color: #3b82f6; }
.result-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.result-card.snowball h3 { color: #c2410c; }
.result-card.avalanche h3 { color: #1d4ed8; }
.result-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px dashed #e5e7eb;
}
.result-stat:last-child { border-bottom: none; }
.result-stat .label { color: #6b7280; font-size: 0.875rem; }
.result-stat .value { color: #111827; font-weight: 600; font-size: 1rem; }

/* Chart */
#payoffChart { max-height: 360px; }

/* Schedule table */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  margin-top: 0.5rem;
}
.schedule-table th {
  background-color: #1e293b;
  color: white;
  padding: 0.5rem;
  text-align: left;
  font-weight: 600;
  position: sticky;
  top: 0;
}
.schedule-table td {
  padding: 0.375rem 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}
.schedule-table tr:nth-child(even) td { background-color: #f8fafc; }

.schedule-wrapper {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
}

/* Summary banner */
.summary-banner {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-left: 4px solid #059669;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  color: #064e3b;
  font-weight: 500;
}
.summary-banner.snowball-wins {
  background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
  border-left-color: #fb923c;
  color: #7c2d12;
}
.summary-banner.tie {
  background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
  border-left-color: #475569;
  color: #1e293b;
}

/* Buttons */
.btn-primary {
  background-color: #059669;
  color: white;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-size: 0.9375rem;
  transition: background-color 0.15s;
}
.btn-primary:hover { background-color: #047857; }
.btn-secondary {
  background-color: #f1f5f9;
  color: #1e293b;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  font-size: 0.9375rem;
  transition: background-color 0.15s;
}
.btn-secondary:hover { background-color: #e2e8f0; }

/* Color legend dots */
.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.375rem;
  vertical-align: middle;
}
.legend-dot.snowball { background-color: #fb923c; }
.legend-dot.avalanche { background-color: #3b82f6; }

/* Share toast */
.share-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  font-weight: 500;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.share-toast.show { opacity: 1; }

/* Error state */
.input-error { border-color: #dc2626 !important; }
.error-msg { color: #dc2626; font-size: 0.8125rem; margin-top: 0.375rem; }
</content>
</invoke>