html {
  height: -webkit-fill-available;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f3f4f6;
}

.app {
  max-width: 500px;
  margin: auto;
  padding: 16px;
}

.tabs {
  display: flex;
  margin-bottom: 10px;
}

.tabs button {
  flex: 1;
  padding: 12px;
  border: none;
  background: #ddd;
  font-size: 16px;
}

.tabs button.active {
  background: #2563eb;
  color: #fff;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.page h3 {
  background: #16a34a;
  color: #fff;
  padding: 10px;
  font-size: 20px;
  margin: 30px 0;
  position: relative;
}

.page h3::before, .page h3::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 4px;
  background: #16a34a;
}

.page h3::before {
  top: -10px;
  box-shadow: 0 6px 0 #cfd8dc;
}

.page h3::after {
  bottom: -10px;
  box-shadow: 0 -6px 0 #cfd8dc;
}

.page .inputSect {
  display: block;
  padding: 8px;
  margin-bottom: 10px;
}

.page .loan-body {
  display: none;
}

.page .loan.open .loan-body {
  display: block;
}

label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
}

label input {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px solid #ccc;
}

#addLoanBtn {
  width: 50%;
  padding: 12px;
  margin-top: 10px;
  background: #06b6d4;
  color: #fff;
  border: none;
  border-radius: 8px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.deleteLoan {
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
}

.mainBtn {
  width: 100%;
  padding: 12px;
  margin-top: 20px;
  background: #2563eb;
  color: #fff;
  border: none;
  font-size: 16px;
  border-radius: 8px;
}

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

.resultBox {
  background: #fff;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 8px;
}

canvas {
  background: #fff;
  margin-top: 10px;
  border-radius: 8px;
}

#inputPage .table-wrap {
  max-height: 320px;
  overflow-y: auto;
}

#inputPage table {
  width: 100%;
  table-layout: fixed;
  background: #fff;
  margin-top: 10px;
  border-radius: 8px;
  border-collapse: collapse;
}

#inputPage table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}

#inputPage table th,
#inputPage table td {
  padding: 4px;
  text-align: center;
  font-size: 12px;
  border-bottom: 1px solid #eee;
}

#inputPage table td input{
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  padding: 8px;
  font-size: 12px;
  border: 1px solid #999;
  border-radius: 12px;
}

#outputPage .table-wrap {
  max-height: 320px;
  overflow-y: auto;
}

#outputPage table {
  width: 100%;
  table-layout: fixed;
  background: #fff;
  margin-top: 10px;
  border-radius: 8px;
  border-collapse: collapse;
}

#outputPage table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}

#outputPage table th,
#outputPage table td {
  padding: 6px;
  text-align: center;
  font-size: 12px;
  border-bottom: 1px solid #eee;
}