:root {
  color-scheme: light;
  font-family: "Inter", system-ui, sans-serif;
  background: #f6f7fb;
  color: #1d2433;
}

body {
  margin: 0;
  padding: 24px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.logo {
  font-weight: 700;
  font-size: 22px;
}

.tagline {
  color: #667085;
}

main {
  display: grid;
  gap: 24px;
}

.screen {
  display: none;
  background: #ffffff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.1);
}

.screen.active {
  display: block;
}

.stories {
  display: flex;
  gap: 12px;
  margin: 16px 0 24px;
}

.story {
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid #d0d5dd;
  background: #ffffff;
}

.role-select {
  margin: 24px 0;
}

.hint {
  color: #667085;
  font-size: 14px;
  margin-bottom: 12px;
}

.role-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.role-card {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid #eaecf0;
  background: #f9fafb;
  text-align: left;
}

.role-title {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.role-subtitle {
  color: #667085;
  font-size: 14px;
}

.card {
  background: #f9fafb;
  border-radius: 16px;
  padding: 18px;
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

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

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

input {
  border-radius: 12px;
  border: 1px solid #d0d5dd;
  padding: 10px 12px;
}

button {
  border-radius: 12px;
  border: none;
  padding: 10px 16px;
  background: #3452ff;
  color: #ffffff;
  cursor: pointer;
}

button.secondary {
  background: #ffffff;
  color: #3452ff;
  border: 1px solid #3452ff;
}

button.ghost {
  background: transparent;
  color: #3452ff;
  border: 1px solid #d0d5dd;
}

.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.back {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #ffffff;
  color: #3452ff;
  border: 1px solid #d0d5dd;
}

.tariff-sheet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.tariff {
  background: #f1f4ff;
  padding: 16px;
  border-radius: 14px;
  display: grid;
  gap: 8px;
}

.loan-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  padding: 12px;
  border-radius: 12px;
}

.loan-card span {
  display: block;
  color: #667085;
}

.status {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
}

.status.active {
  background: #ecfdf3;
  color: #027a48;
}

.status.overdue {
  background: #fef3f2;
  color: #b42318;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.badge {
  background: #fee4e2;
  color: #b42318;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.cta, .footer-cta {
  margin-top: 24px;
}

.cta-link {
  color: #3452ff;
  text-decoration: none;
  font-weight: 600;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  max-width: 520px;
  width: min(90vw, 520px);
}

.modal-close {
  background: transparent;
  color: #1d2433;
  border: none;
  font-size: 18px;
  float: right;
}

@media (max-width: 720px) {
  body {
    padding: 16px;
  }

  .screen {
    padding: 16px;
  }

  .app-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
