.three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.checkline {
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
}

.checkline input {
  width: auto;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stats div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 18px;
  box-shadow: 0 10px 28px rgba(18, 60, 74, .06);
}

.stats strong {
  display: block;
  font-size: 1.5rem;
}

.stats span {
  display: block;
  color: var(--slate);
  font-size: .9rem;
}

.bar {
  height: 16px;
  border-radius: 999px;
  background: var(--mist);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--ink));
  border-radius: inherit;
}

.record-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 16px;
  margin: 14px 0;
  box-shadow: 0 10px 26px rgba(18, 60, 74, .06);
}

.record-card h4 {
  margin: 0 0 6px;
}

.module-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.module-card:hover,
.module-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--ink);
  box-shadow: 0 14px 34px rgba(18, 60, 74, .12);
}

.module-card span {
  display: inline-block;
  margin-top: 10px;
  color: var(--ink);
  font-weight: 800;
}

.drawer {
  margin: 16px 0;
}

.pay-chart {
  min-height: 230px;
  display: grid;
  grid-template-columns: repeat(12, minmax(44px, 1fr));
  gap: 12px;
  align-items: end;
  overflow-x: auto;
  padding: 18px 0 4px;
}

.pay-month {
  display: grid;
  grid-template-rows: 160px auto auto;
  gap: 6px;
  text-align: center;
  min-width: 48px;
}

.pay-bars {
  align-self: end;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 4px;
  height: 160px;
  border-bottom: 1px solid var(--line);
}

.pay-bars span {
  display: block;
  width: 16px;
  min-height: 0;
  border-radius: 6px 6px 0 0;
}

.pay-bars .paid,
.chart-key .paid {
  background: var(--ink);
}

.pay-bars .pending,
.chart-key .pending {
  background: var(--accent);
}

.pay-month strong {
  font-size: .82rem;
}

.pay-month small {
  color: var(--slate);
  font-size: .72rem;
}

.chart-key {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--slate);
  font-size: .9rem;
}

.chart-key span {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}

.click-row {
  cursor: pointer;
}

.click-row:hover {
  background: var(--mist);
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.access-grid fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.access-grid legend {
  font-weight: 800;
  color: var(--ink);
}

.org-chart {
  overflow-x: auto;
  padding: 20px 4px 10px;
}

.org-tree,
.org-tree ul {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.org-tree ul {
  display: flex;
  justify-content: center;
  position: relative;
  padding-top: 30px;
}

.org-tree ul::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  height: 30px;
  border-left: 2px solid rgba(18, 60, 74, .24);
}

.org-tree li {
  position: relative;
  padding: 30px 10px 0;
  text-align: center;
}

.org-tree > li {
  padding-top: 0;
}

.org-tree li::before,
.org-tree li::after {
  content: "";
  position: absolute;
  top: 0;
  width: 50%;
  height: 30px;
  border-top: 2px solid rgba(18, 60, 74, .24);
}

.org-tree li::before {
  right: 50%;
}

.org-tree li::after {
  left: 50%;
  border-left: 2px solid rgba(18, 60, 74, .24);
}

.org-tree li:first-child::before,
.org-tree li:last-child::after {
  border-top: 0;
}

.org-tree li:only-child {
  padding-top: 0;
}

.org-tree li:only-child::before,
.org-tree li:only-child::after,
.org-tree > li::before,
.org-tree > li::after {
  display: none;
}

.org-card {
  display: inline-block;
  min-width: 190px;
  max-width: 260px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(18, 60, 74, .08);
  padding: 14px 16px;
}

.org-card.root {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.org-card h4 {
  margin: 0 0 5px;
}

.org-card p {
  margin: 0;
  color: inherit;
}

.org-card span {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--mist);
  color: var(--ink);
  font-size: .78rem;
  font-weight: 700;
}

@media (max-width: 850px) {
  .three,
  .stats,
  .access-grid {
    grid-template-columns: 1fr;
  }

  .org-tree ul {
    display: block;
    padding-top: 20px;
  }

  .org-tree ul::before,
  .org-tree li::before,
  .org-tree li::after {
    display: none;
  }

  .org-tree li {
    padding: 12px 0;
  }
}
