:root {
  color-scheme: light;
  --ink: #203c43;
  --muted: #7d898b;
  --paper: #f6f5f0;
  --line: #e5e7df;
  --green: #20775f;
  --red: #b76042;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
}

button,input,select {
  font: inherit;
}

button,a,summary,select {
  -webkit-tap-highlight-color: transparent;
}

button,summary,select {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

button:disabled {
  cursor: default;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible {
  outline: 3px solid #d7ad68;
  outline-offset: 4px;
}

.shell {
  max-width: 1120px;
  margin: auto;
  padding: 0 40px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -.7px;
}

.brand-mark {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 11px;
  width: 35px;
  height: 35px;
  font-size: 28px;
  line-height: 1;
}

.brand-note {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 1px;
  border-left: 1px solid #ccd4cf;
  margin-left: 7px;
  padding-left: 17px;
  color: var(--muted);
}

.history-link {
  font-size: 13px;
  color: #586d71;
}

.history-link span {
  margin-left: 12px;
}

main {
  padding-top: 45px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 29px;
}

.eyebrow {
  color: #859691;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.2px;
  margin: 0 0 11px;
}

h1 {
  font-size: 35px;
  font-weight: 650;
  letter-spacing: 1px;
  line-height: 1.4;
  margin: 0 0 10px;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.date-badge {
  text-align: right;
  display: grid;
  gap: 1px;
  font-size: 11px;
  color: var(--muted);
}

.date-badge strong {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 1px;
}

.person-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  min-height: 50px;
}

.person-select {
  display: flex;
  align-items: center;
  gap: 13px;
}

.person-select label {
  font-size: 12px;
  color: var(--muted);
}

select {
  max-width: 260px;
  background: transparent;
  border: 1px solid #d7ded6;
  border-radius: 8px;
  padding: 7px 30px 7px 12px;
  color: var(--ink);
}

.small-button {
  background: #fff;
  border: 1px solid #d7ded6;
  border-radius: 8px;
  padding: 7px 15px;
  color: var(--ink);
  font-size: 12px;
}

.small-button:hover {
  background: #ebeee7;
}

.add-person {
  position: relative;
  font-size: 12px;
  color: #617572;
}

.add-person summary {
  list-style: none;
}

.add-person summary::-webkit-details-marker {
  display: none;
}

.add-person form {
  position: absolute;
  z-index: 5;
  right: 0;
  top: 35px;
  padding: 20px;
  display: grid;
  gap: 10px;
  background: #fff;
  box-shadow: 0 12px 40px #203c431c;
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 270px;
}

.add-person input {
  min-width: 0;
  border: 1px solid #ccd4cf;
  border-radius: 6px;
  padding: 9px;
}

.person-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.dashboard {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 20px;
}

.checkin-card {
  position: relative;
  overflow: hidden;
  background: #19383f;
  border-radius: 18px;
  padding: 27px 31px 0;
  color: #f4f6ee;
  min-height: 374px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

.pill {
  font-size: 10px;
  letter-spacing: 1.4px;
  border: 1px solid #5a7372;
  border-radius: 20px;
  padding: 4px 10px;
  color: #b9cec4;
}

.live-dot {
  color: #a8c0b8;
  font-size: 11px;
  letter-spacing: .4px;
}

.live-dot::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #cbe3a8;
  border-radius: 100%;
  margin-right: 7px;
  vertical-align: middle;
}

.card-kicker {
  color: #c4d5c7;
  font-size: 11px;
  letter-spacing: .8px;
  margin: 35px 0 8px;
  position: relative;
  z-index: 1;
}

.checkin-card h2 {
  font-size: 25px;
  font-weight: 500;
  letter-spacing: 1px;
  line-height: 1.5;
  margin: 0 0 12px;
  position: relative;
  z-index: 1;
  max-width: 84%;
  overflow-wrap: anywhere;
}

.card-copy {
  color: #a8bbb7;
  font-size: 12px;
  line-height: 1.9;
  margin: 0;
  position: relative;
  z-index: 1;
}

.checkin-action {
  margin: 23px 0 22px;
  position: relative;
  z-index: 1;
}

.checkin-button {
  background: #dfebcb;
  color: #254a3d;
  border: 0;
  border-radius: 9px;
  padding: 13px 26px;
  font-size: 14px;
  font-weight: 600;
  transition: background .15s,transform .15s;
}

.checkin-button:hover:not(:disabled) {
  background: #f0f6df;
  transform: translateY(-1px);
}

.checkin-button:disabled {
  background: #45635e;
  color: #d7e5da;
}

.checkin-action p {
  font-size: 10px;
  color: #a8bbb7;
  margin: 10px 0 0;
  min-height: 16px;
}

.card-bottom {
  border-top: 1px solid #40605f;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 0;
  color: #9db6b0;
  font-size: 10px;
  position: relative;
  z-index: 1;
}

.card-bottom strong {
  font-size: 18px;
  font-weight: 500;
  color: #e5eace;
  letter-spacing: 1px;
}

.card-bottom span:last-child {
  margin-left: auto;
}

.moon-scene {
  position: absolute;
  right: 17px;
  top: 94px;
  width: 195px;
  height: 180px;
  pointer-events: none;
  opacity: .85;
}

.moon {
  position: absolute;
  width: 82px;
  height: 82px;
  right: 42px;
  top: 25px;
  border-radius: 50%;
  background: #e7d9ab;
  box-shadow: 0 0 60px #e7d9ab18;
}

.moon::after {
  content: "";
  position: absolute;
  background: #19383f;
  width: 75px;
  height: 75px;
  top: -9px;
  left: 25px;
  border-radius: 50%;
}

.orbit {
  position: absolute;
  width: 160px;
  height: 130px;
  border: 1px solid #c5d5ab21;
  border-radius: 50%;
  right: 3px;
  top: 10px;
  transform: rotate(-30deg);
}

.star {
  position: absolute;
  color: #d6d6a7;
  font-size: 13px;
}

.star.one {
  left: 12px;
  top: 12px;
}

.star.two {
  right: 9px;
  top: 15px;
  font-size: 20px;
}

.star.three {
  right: 33px;
  bottom: 24px;
  font-size: 9px;
}

.today-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
}

.section-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.section-top h2 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.status-tag {
  font-size: 10px;
  background: #f3f1e9;
  color: #9a906c;
  border-radius: 20px;
  padding: 4px 10px;
  white-space: nowrap;
}

.status-tag.checked {
  color: var(--green);
  background: #edf4e9;
}

.amount-caption {
  color: var(--muted);
  font-size: 11px;
  margin: 31px 0 2px;
}

.today-amount {
  font-size: 64px;
  letter-spacing: -2px;
  line-height: 1.4;
  font-weight: 500;
}

.today-amount span {
  font-size: 26px;
  vertical-align: baseline;
  margin-right: 9px;
  font-weight: 400;
}

.today-amount.pending {
  color: #b2bdb5;
}

.fine {
  color: var(--red);
}

.refund {
  color: var(--green);
}

.amount-description {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 25px;
}

.today-detail {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}

.today-detail strong {
  color: var(--ink);
  font-weight: 500;
}

.today-footnote {
  font-size: 10px;
  color: #9aaba3;
  margin: 15px 0 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
  margin: 20px 0 34px;
}

.stats article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 21px 23px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.stat-icon {
  background: #f1f3eb;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 19px;
  color: #71887e;
}

.stat-icon.mint {
  background: #edf4ef;
  color: #649482;
}

.stat-icon.sand {
  background: #f7f1e6;
  color: #b09b6c;
}

.stats p {
  margin: 0 0 7px;
  font-size: 11px;
  color: #73867f;
}

.stats strong {
  font-size: 28px;
  font-weight: 550;
  line-height: 1.3;
}

.stats strong small {
  font-size: 15px;
  font-weight: 400;
  color: #8e9e95;
}

.stats div>span {
  display: block;
  font-size: 10px;
  color: #a0aaa3;
  margin-top: 7px;
}

.history-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 24px 27px 5px;
  scroll-margin-top: 20px;
}

.history-card .section-top {
  margin-bottom: 21px;
}

.history-card .section-top p {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0 0;
}

.muted {
  color: #9aa69e;
  font-size: 11px;
}

.table-scroll {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  white-space: nowrap;
  text-align: left;
  font-size: 12px;
}

th {
  color: #96a298;
  font-size: 10px;
  font-weight: 400;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}

td {
  padding: 17px 10px;
  border-bottom: 1px solid #eef0e9;
}

th:first-child,td:first-child {
  padding-left: 0;
}

th:last-child,td:last-child {
  text-align: right;
  padding-right: 0;
}

tbody tr:last-child td {
  border: 0;
}

.today-label {
  margin-left: 9px;
  color: #99a791;
  font-size: 9px;
}

.delta-tag {
  display: inline-block;
  font-size: 10px;
  padding: 4px 9px;
  background: #f2f3ed;
  color: #859283;
  border-radius: 5px;
}

.delta-tag.early {
  background: #eef6ec;
  color: #648861;
}

.delta-tag.late {
  background: #fcf2e9;
  color: #b68864;
}

.ledger-amount {
  font-weight: 550;
}

.empty-history {
  text-align: center;
  padding: 17px 0 36px;
  color: #9eaaa1;
}

.empty-history>span {
  font-size: 33px;
  line-height: 1;
}

.empty-history p {
  font-size: 12px;
  margin: 9px 0 4px;
}

.empty-history small {
  font-size: 11px;
}

.rules {
  margin: 23px 0;
  font-size: 12px;
  color: #77897f;
}

.rules summary {
  display: flex;
  justify-content: space-between;
  padding: 13px 0;
  list-style: none;
}

.rules summary::-webkit-details-marker {
  display: none;
}

.rules div {
  background: #eeeee5;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 11px;
}

.notice {
  border-radius: 9px;
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 13px;
}

.notice.success {
  background: #e8f0df;
  color: #466f4b;
}

.notice.error {
  background: #f6e8e0;
  color: #a66145;
}

.onboarding {
  position: relative;
  z-index: 1;
  margin: 24px 0;
}

.onboarding label {
  font-size: 11px;
  color: #bacebd;
  display: block;
  margin-bottom: 6px;
}

.onboarding div {
  display: flex;
  gap: 8px;
}

.onboarding input {
  border: 1px solid #68877c;
  background: #ffffff0d;
  border-radius: 8px;
  padding: 10px;
  color: #fff;
  min-width: 0;
  max-width: 200px;
}

.onboarding input::placeholder {
  color: #96ada5;
}

.onboarding button {
  border: 0;
  background: #dfebcb;
  color: #254a3d;
  border-radius: 8px;
  padding: 10px 15px;
  white-space: nowrap;
  font-size: 12px;
}

footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #94a197;
  padding: 19px 0 24px;
}

footer span {
  font-weight: 600;
}

footer p {
  margin: 0;
}

@media(min-width:801px) {
  .checkin-card .card-copy {
    max-width: 70%;
  }
}

@media(max-width:800px) {
  .shell {
    padding: 0 22px;
  }
  .header {
    height: 78px;
  }
  main {
    padding-top: 30px;
  }
  .page-heading {
    gap: 15px;
  }
  h1 {
    font-size: 28px;
  }
  .dashboard {
    grid-template-columns: 1.25fr 1fr;
    gap: 14px;
  }
  .checkin-card {
    padding: 23px 22px 0;
  }
  .moon-scene {
    opacity: .25;
    right: -20px;
  }
  .today-card {
    padding: 23px 20px;
  }
  .checkin-card h2 {
    font-size: 22px;
    max-width: 100%;
  }
  .stats {
    gap: 12px;
  }
  .stats article {
    padding: 17px 15px;
    gap: 10px;
  }
  .stat-icon {
    display: none;
  }
  .stats strong {
    font-size: 25px;
  }
  .history-card {
    padding: 21px 20px 5px;
  }
}

@media(max-width:580px) {
  .shell {
    padding: 0 18px;
  }
  .brand-note {
    display: none;
  }
  .brand {
    font-size: 21px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }
  h1 {
    font-size: 29px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .date-badge {
    display: flex;
    gap: 9px;
    align-items: center;
    text-align: left;
    flex-wrap: wrap;
  }
  .date-badge strong {
    font-size: 13px;
  }
  .date-badge>span:first-child {
    display: none;
  }
  .date-badge>span:last-child {
    font-size: 10px;
  }
  .person-bar {
    align-items: center;
    gap: 10px;
  }
  .person-select {
    gap: 7px;
  }
  .person-select label {
    display: none;
  }
  select {
    max-width: 180px;
    font-size: 12px;
  }
  .dashboard {
    grid-template-columns: 1fr;
  }
  .checkin-card {
    padding: 23px 24px 0;
    min-height: 355px;
  }
  .moon-scene {
    opacity: .55;
    right: 5px;
    top: 95px;
  }
  .card-copy {
    max-width: 85%;
  }
  .checkin-button {
    width: 100%;
    padding: 14px;
  }
  .checkin-action p {
    text-align: center;
    font-size: 10px;
  }
  .card-kicker {
    margin-top: 28px;
  }
  .checkin-card h2 {
    font-size: 25px;
  }
  .today-card {
    padding: 23px 24px;
  }
  .amount-caption {
    margin-top: 22px;
  }
  .today-amount {
    font-size: 54px;
    line-height: 1.3;
  }
  .amount-description {
    margin-bottom: 18px;
  }
  .stats {
    gap: 8px;
    margin-bottom: 25px;
  }
  .stats article {
    padding: 16px 10px;
  }
  .stats p {
    font-size: 10px;
  }
  .stats strong {
    font-size: 22px;
  }
  .stats div>span {
    font-size: 9px;
    line-height: 1.6;
  }
  .stats strong small {
    font-size: 12px;
  }
  .history-card {
    padding: 20px 18px 5px;
  }
  .history-card .section-top p {
    font-size: 10px;
  }
  td {
    padding: 14px 9px;
  }
  .onboarding input {
    width: 100%;
    max-width: none;
  }
  .onboarding div {
    gap: 8px;
  }
  .onboarding button {
    padding: 10px 12px;
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none!important;
  }
}

.admin-note {
  margin-top: 24px;
}
