.wallet-tenant-picker {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.wallet-tenant-picker[hidden] {
  display: none;
}

.wallet-tenant-picker label,
.wallet-adjustment-form label {
  display: grid;
  gap: 7px;
  color: #27496b;
  font-weight: 900;
}

.wallet-tenant-picker select,
.wallet-adjustment-form input,
.wallet-adjustment-form select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(23, 50, 77, 0.22);
  border-radius: 10px;
  padding: 10px 12px;
  color: #17324d;
  background: #fff;
}

.wallet-table td:nth-child(2),
.wallet-history-table td:nth-child(4) {
  min-width: 190px;
}

.wallet-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}

.wallet-summary div {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dbe7ee;
  border-radius: 12px;
  background: #f8fcfd;
}

.wallet-summary dt {
  color: #52677c;
  font-size: 13px;
  font-weight: 900;
}

.wallet-summary dd {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 900;
}

.wallet-adjustment-form {
  display: grid;
  grid-template-columns: minmax(120px, 0.6fr) minmax(140px, 0.7fr) minmax(220px, 1.6fr) auto;
  align-items: end;
  gap: 14px;
  padding: 18px;
  border-radius: 14px;
  background: #f0fdfa;
}

.wallet-adjustment-form .student-login-submit {
  min-height: 48px;
  margin: 0;
}

.wallet-history-heading {
  margin-top: 28px;
}

.wallet-history-table td[data-sign="positive"] {
  color: #047857;
  font-weight: 900;
}

.wallet-history-table td[data-sign="negative"] {
  color: #b91c1c;
  font-weight: 900;
}

.student-wallet-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.student-wallet-header,
.student-wallet-guide,
.student-wallet-card {
  border: 1px solid rgba(23, 50, 77, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 48px rgba(23, 50, 77, 0.12);
}

.student-wallet-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 22px;
  padding: clamp(24px, 5vw, 40px);
}

.student-wallet-header p:last-child {
  margin-bottom: 0;
}

.student-wallet-header .compact-button {
  flex: 0 0 auto;
  margin: 0;
}

.student-wallet-guide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 18px 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
}

.student-wallet-guide li {
  display: grid;
  gap: 6px;
  padding: 18px;
  background: #f8fcfd;
}

.student-wallet-guide strong {
  color: #0f766e;
}

.student-wallet-guide span {
  color: #52677c;
  font-size: 14px;
  line-height: 1.5;
}

.student-wallet-card {
  margin-top: 18px;
  padding: clamp(22px, 4vw, 34px);
}

.student-wallet-name {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 18px;
  margin-bottom: 20px;
}

.student-wallet-name span {
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
}

.student-wallet-name h2,
.student-wallet-card > h2 {
  margin: 4px 0 0;
}

.student-wallet-name > strong {
  padding: 8px 12px;
  border-radius: 999px;
  color: #35516a;
  background: #ecfeff;
}

@media (max-width: 820px) {
  .wallet-summary,
  .wallet-adjustment-form,
  .student-wallet-guide {
    grid-template-columns: 1fr;
  }

  .student-wallet-shell {
    width: min(100% - 20px, 680px);
    padding: 10px 0 32px;
  }

  .student-wallet-header,
  .student-wallet-name {
    display: grid;
  }

  .student-wallet-header .compact-button {
    width: 100%;
  }
}
