/* Basic reset and typography */
* {
  box-sizing: border-box;
}

:root {
  --primary-color: #007bff;
  --secondary-color: #e0e0e0;
  --success-color: #28a745;
  --error-color: #b00020;
  --text-color: #333;
  --border-radius: 6px;
  --font-size-base: 16px;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--text-color);
  background-color: #f9f9f9;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.25rem;
}

/* Progress bar */
.progress-bar {
  display: flex;
  justify-content: space-between;
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.progress-bar li {
  flex: 1;
  text-align: center;
  position: relative;
  font-size: 0.7rem;
  color: #888;
}

.progress-bar li::before {
  content: '';
  display: block;
  width: 24px;
  height: 24px;
  margin: 0 auto 0.25rem;
  border-radius: 50%;
  background: #e0e0e0;
}

.progress-bar li.active::before {
  background: var(--primary-color);
}

.progress-bar li.completed::before {
  background: var(--success-color);
}

.progress-bar li.active,
.progress-bar li.completed {
  color: var(--text-color);
  font-weight: bold;
}

/* Step visibility */
.step {
  display: none;
}

.step.active {
  display: block;
}

/* Buttons */
button {
  font-size: 1rem;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  transition: background-color 0.2s ease;
}

button.primary {
  background-color: var(--primary-color);
  color: #fff;
}

button.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.secondary {
  background-color: var(--secondary-color);
  color: var(--text-color);
}

button.link-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--primary-color);
  text-decoration: underline;
  min-height: 0;
}

.actions {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

/* Stat cards */
#debtsContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat-card {
  flex: 1 1 calc(50% - 1rem);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  padding: 1rem;
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.9rem;
  color: #555;
}

.status {
  font-size: 0.9rem;
  color: var(--error-color);
  margin-bottom: 0.5rem;
}

.hidden {
  display: none !important;
}

/* Disclosures */
.disclosures ul {
  padding-left: 1.25rem;
  margin-top: 0;
}

.disclosures li {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.disclosures .ack {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Form fields */
.form-field {
  margin-bottom: 1rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  font-weight: bold;
}

.form-field input,
.form-field select {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
}

.form-field .error {
  color: var(--error-color);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Budget totals */
.totals {
  margin-top: 1rem;
  font-size: 0.95rem;
}

.totals p {
  margin: 0.25rem 0;
}

.totals strong {
  font-weight: bold;
}

/* Plan cards */
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0;
}

.plan-card {
  flex: 1 1 calc(50% - 1rem);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.plan-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.plan-card p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .plan-card {
    flex: 1 1 100%;
  }
}

/* Error message for login */
#loginMessage {
  margin-top: 1rem;
  color: var(--error-color);
  font-size: 0.9rem;
}

/* Reset button container */
.reset {
  margin-top: 2rem;
  text-align: center;
}
