:root {
  --green: #20bf78;
  --green-dark: #159c63;
  --green-soft: #e8fbf3;
  --blue: #5b8def;
  --red: #ef5d6f;
  --yellow: #ffc447;
  --ink: #1f2a33;
  --text: #2c343b;
  --muted: #8b949e;
  --line: #edf0f2;
  --page: #f5f7f8;
  --surface: #ffffff;
  --brown: #7a5a1a;
  --shadow: 0 8px 24px rgba(20, 48, 36, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #111;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
strong,
b {
  font-weight: 600;
}

button {
  cursor: pointer;
}

.app {
  width: min(100vw, 440px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--page);
  overflow-x: hidden;
}

.panel,
.card,
.pending-card,
.record-card,
.empty-card {
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.home {
  min-height: 100vh;
  padding: 10px 13px 84px;
  background: var(--page);
}

.hero {
  height: 126px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e3fff9, #efffff);
  overflow: hidden;
}

.hero h1 {
  margin: 0 0 8px;
  color: #069865;
  font-size: 30px;
  line-height: 1;
  font-weight: 650;
}

.hero p {
  margin: 0;
  max-width: 232px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.hero-art {
  position: relative;
  width: 158px;
  height: 106px;
  flex: 0 0 auto;
}

.hero-art::before {
  content: "";
  position: absolute;
  left: 25px;
  top: 3px;
  width: 74px;
  height: 94px;
  border: 5px solid #1f7081;
  border-radius: 5px;
  background:
    radial-gradient(circle at 20px 18px, #d2e5e2 0 5px, transparent 6px),
    linear-gradient(#f7ffff 0 28%, #ff9051 29% 61%, #fff 62%);
}

.hero-art::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 36px;
  width: 88px;
  height: 60px;
  border-radius: 12px 8px 14px 12px;
  background: linear-gradient(157deg, transparent 0 35%, #12a666 36% 59%, transparent 60%), #e49a36;
  transform: rotate(-8deg) scale(0.9);
  transform-origin: center;
}

.card {
  margin-top: 14px;
  padding: 15px;
}

.card h2,
.records h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.step-grid {
  display: grid;
  grid-template-columns: 1fr 30px 1fr 30px 1fr;
  align-items: center;
  text-align: center;
}

.step-grid button {
  border: 0;
  background: transparent;
  display: grid;
  gap: 7px;
  justify-items: center;
  color: var(--ink);
}

.step-grid i {
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-style: normal;
  font-weight: 600;
  font-size: 23px;
}

.step-grid .green {
  background: var(--green);
}

.step-grid .blue {
  background: #5a9fea;
}

.step-grid .red {
  background: #ef675b;
}

.step-grid b {
  color: #e1e1e1;
  font-size: 34px;
  font-weight: 200;
}

.service > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.service button {
  min-height: 66px;
  border: 0;
  border-radius: 6px;
  padding: 15px;
  background: #e9fff8;
  text-align: left;
}

.service button:nth-child(2) {
  background: #fff1ec;
}

.service strong {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
}

.service span {
  color: #737b7a;
  font-size: 13px;
}

.contract-section {
  padding: 18px 4px 0;
}

.contract-section h2 {
  margin: 0 0 12px;
  padding: 0 2px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
}

.contract-section .pending-card {
  margin-bottom: 12px;
}

.pending-card,
.record-card {
  padding: 16px 15px;
}

.pending-card h3,
.record-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.line {
  height: 1px;
  margin: 15px 0;
  background: #e7e7e7;
}

.pending-data {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) 82px;
  align-items: center;
  gap: 8px;
}

.pending-data span,
.record-card span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.pending-data strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.1;
}

.pending-data div:first-child strong {
  font-size: 21px;
}

.status-badge {
  min-width: 68px;
  height: 28px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  justify-self: end;
  padding: 0 10px;
  border: 1px solid var(--red);
  border-radius: 999px;
  background: #fff;
  color: var(--red);
  font-size: 12px !important;
  font-style: normal;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.status-badge.confirmed {
  border-color: rgba(239, 93, 111, 0.42);
  background: #fff;
  color: var(--red);
}

.status-badge.settled {
  border-color: rgba(21, 156, 99, 0.28);
  background: #eefaf5;
  color: var(--green-dark);
}

.status-badge.muted {
  border-color: #e3e7ea;
  background: #f7f8f9;
  color: #8c969f;
}

.record-card .status-badge {
  margin-top: 7px;
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: min(100vw, 440px);
  height: 70px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  transform: translateX(-50%);
  border-top: 1px solid #eee;
  background: #fff;
  z-index: 20;
}

.tabbar button {
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  color: #59626b;
  font-size: 13px;
}

.tabbar i {
  font-style: normal;
  font-size: 24px;
}

.tabbar .active {
  color: var(--green-dark);
}

.login,
.mine {
  min-height: 100vh;
  padding: 34px 24px 92px;
  background:
    linear-gradient(180deg, #e9fbf5 0, #f5f7f8 45%, #f5f7f8 100%);
  position: relative;
  overflow: hidden;
}

.brand-logo {
  display: block;
  object-fit: contain;
  background: #fff;
}

.login-logo {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login h1 {
  margin: 64px 0 12px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 600;
}

.login p {
  margin: 0;
  color: #5d6871;
  font-size: 17px;
}

.agree-login {
  margin: 46px 0 80px;
  display: flex;
  justify-content: center;
  gap: 12px;
  color: #43534f;
}

.agree-login input,
.agree-row input {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #9aa5a9;
  border-radius: 3px;
  background: #fff;
  position: relative;
  flex: 0 0 auto;
}

.agree-login input:checked,
.agree-row input:checked {
  border-color: var(--green);
  background: var(--green);
}

.agree-login input:checked::after,
.agree-row input:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

a {
  color: #3c9b79;
  text-decoration: none;
}

.green-main {
  width: 100%;
  height: 60px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #1fc878, #3ca576);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.plain-form {
  min-height: 100vh;
  background: #fff;
  padding-bottom: 128px;
}

.plain-form label {
  min-height: 58px;
  display: grid;
  grid-template-columns: 118px 1fr auto;
  align-items: center;
  padding: 0 28px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
}

.plain-form input,
.plain-form select {
  min-width: 0;
  height: 38px;
  border: 0;
  outline: 0;
  background: transparent;
  text-align: right;
  color: #272b2f;
  font-size: 16px;
  font-weight: 400;
}

.plain-form input::placeholder {
  color: #c9cdd0;
}

.date-row {
  cursor: pointer;
}

.date-row input {
  pointer-events: none;
}

.plain-form em {
  margin-left: 10px;
  font-style: normal;
}

.calendar {
  width: 20px;
  height: 20px;
  margin-left: 10px;
  border: 2px solid #d8dcde;
  border-radius: 3px;
  position: relative;
}

.calendar::before {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  top: 5px;
  border-top: 2px solid #d8dcde;
}

.formula {
  min-height: 44px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 28px 0 12px;
  white-space: nowrap;
  color: #5f686f;
  font-size: 15px;
}

.formula span {
  color: var(--green-dark);
  font-size: 20px;
  font-weight: 650;
}

.select-row {
  position: relative;
}

.select-row::after {
  content: "›";
  color: #90959a;
  font-size: 38px;
}

.agree-row {
  min-height: 46px !important;
  grid-template-columns: 24px 1fr !important;
  gap: 10px;
  padding-left: 36px !important;
  padding-right: 22px !important;
  background: #f7f7f7;
  color: #5f686f;
  font-size: 14px !important;
}

.plain-form .agree-row input {
  appearance: none;
  width: 20px;
  min-width: 20px;
  height: 20px;
  border: 2px solid #7f8b90;
  border-radius: 3px;
  background: #fff;
  position: relative;
  text-align: initial;
}

.plain-form .agree-row input:checked {
  border-color: var(--green);
  background: var(--green);
}

.plain-form .agree-row input:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.fixed {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 66px);
  width: min(calc(100vw - 44px), 396px);
  height: 52px;
  margin: 0;
  transform: translateX(-50%);
  z-index: 15;
}

.profile-submit {
  width: calc(100% - 54px);
  margin: 72px 27px 0;
}

.auth-gate {
  min-height: 100vh;
  padding: 150px 34px 120px;
  background: #fff;
  text-align: center;
}

.auth-gate h2 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.25;
}

.auth-gate p {
  margin: 0 0 34px;
  color: #7d8589;
  line-height: 1.65;
  font-size: 16px;
}

.mine {
  padding: 18px 14px 92px;
}

.mine-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  padding: 18px;
  position: relative;
  z-index: 1;
}

.mine-logo {
  width: 74px;
  height: 74px;
  flex: 0 0 74px;
  border-radius: 8px;
}

.mine-user {
  min-width: 0;
}

.mine-head h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.2;
  font-weight: 600;
}

.mine-head p {
  margin: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.mine-head p span {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 600;
}

.mine-head p i {
  font-style: normal;
}

.mine-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
  overflow: hidden;
}

.mine-list button {
  min-height: 60px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  display: grid;
  grid-template-columns: 46px 1fr 22px;
  align-items: center;
  text-align: left;
  padding: 0 16px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
}

.mine-list button:last-child {
  border-bottom: 0;
}

.mine-list i {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #e7eefb;
  color: #5a68e8;
  font-style: normal;
  font-size: 16px;
}

.mine-list button:nth-child(2) i {
  background: #e7fff7;
  color: var(--green);
}

.mine-list button:nth-child(3) i {
  background: #fff0ec;
  color: #ef4e32;
}

.mine-list b {
  color: #b8c0c6;
  font-size: 24px;
  font-weight: 300;
}

.records {
  min-height: 100vh;
  padding-bottom: 84px;
  background: var(--page);
}

.stat-hero {
  min-height: 156px;
  padding: 20px 24px 17px;
  background: linear-gradient(120deg, #1fc878, #3a9f72);
  color: #fff;
  text-align: center;
  overflow: hidden;
}

.stat-hero p {
  margin: 0;
  opacity: 0.72;
  font-size: 13px;
  line-height: 1.25;
}

.stat-hero > strong {
  display: block;
  margin: 8px 0 16px;
  font-size: 32px;
  line-height: 1;
  font-weight: 500;
}

.stat-hero div {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.stat-hero span {
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.1;
}

.stat-hero b {
  color: #fff;
  font-size: 18px;
  line-height: 1;
  font-weight: 600;
}

.search {
  height: 44px;
  margin: 14px 17px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 15px;
  border-radius: 5px;
  background: #fff;
  color: #bfc4c7;
}

.search input {
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-size: 16px;
}

.records h2 {
  padding: 0 18px;
}

.records h2 {
  margin-bottom: 12px;
}

.record-card {
  margin: 0 17px 12px;
}

.record-card div {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr) 70px;
  gap: 10px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  align-items: start;
}

.record-card b {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.12;
  white-space: nowrap;
}

.record-card span:nth-child(2) b {
  font-size: 16px;
}

.record-card span {
  min-width: 0;
  display: grid;
  grid-template-rows: 18px 28px;
  align-items: start;
}

.record-card .record-status-cell {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.record-card .status-badge {
  width: 68px;
  min-width: 68px;
  margin-top: 0;
  padding: 0 8px;
}

.due {
  min-height: 100vh;
  padding-bottom: 70px;
  background: #fff;
}

.due-head,
.due button {
  height: 52px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 0 28px;
  border: 0;
  border-bottom: 1px solid #f4f4f4;
  background: #fff;
  color: var(--text);
  font-size: 16px;
}

.empty-box {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 450px;
  color: #777;
}

.empty-box div {
  width: 120px;
  height: 94px;
  border-radius: 12px;
  background: #eeeafa;
  opacity: 0.8;
}

.settings {
  min-height: 100vh;
  padding-bottom: 84px;
  background: #fff;
}

.settings > button:not(.logout) {
  width: 100%;
  min-height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 0;
  border-bottom: 1px solid #f3f3f3;
  background: #fff;
  padding: 0 24px;
  text-align: left;
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
}

.logout {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 74px);
  width: min(calc(100vw - 66px), 374px);
  transform: translateX(-50%);
}

.loan-agreements {
  min-height: 100vh;
  padding: 14px 16px 96px;
  background: #f7f8f7;
}

.loan-agreement-card {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 15px 16px 14px;
  border: 1px solid #edf0ed;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(25, 43, 34, 0.04);
}

.loan-agreement-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.loan-agreement-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
}

.loan-agreement-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.loan-agreement-card > span {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
}

.loan-agreement-card footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.loan-agreement-card em {
  font-style: normal;
}

.faq {
  min-height: 100vh;
  padding: 18px 16px 96px;
  background: #f7f8f7;
}

.faq h1 {
  margin: 4px 2px 14px;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.25;
  font-weight: 650;
}

.faq article {
  margin-bottom: 10px;
  padding: 13px 14px 14px;
  border: 1px solid #edf0ed;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(25, 43, 34, 0.04);
}

.faq h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 650;
}

.faq p {
  margin: 0;
  color: #5e6870;
  font-size: 14px;
  line-height: 1.65;
}

.contract-info {
  min-height: 100vh;
  background: var(--surface);
  padding-bottom: 76px;
}

.loan-title {
  height: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.loan-title i {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 2px solid #55c88c;
  border-radius: 3px;
  color: #25a96f;
  font-style: normal;
}

.loan-title strong {
  font-size: 19px;
  font-weight: 600;
}

.info-row {
  min-height: 44px;
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  align-items: center;
  padding: 0 24px;
  color: #5e6870;
  font-size: 15px;
}

.info-row strong {
  text-align: right;
  color: var(--ink);
  font-weight: 500;
  font-size: 15px;
  white-space: nowrap;
}

.split {
  height: 8px;
  background: #f5f5f5;
}

.share-hint {
  margin: 22px 24px 0;
  padding: 13px 14px;
  border-radius: 6px;
  background: #fff8df;
  color: #7b5b12;
  line-height: 1.55;
  font-size: 15px;
}

.yellow-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 16px 54px 0;
}

.yellow-actions button {
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd84a, var(--yellow));
  color: #6b4910;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 10px 25px rgba(255, 194, 53, 0.26);
}

.detail {
  min-height: 100vh;
  padding-bottom: 84px;
  background: #fff;
}

.detail-hero {
  padding: 22px 18px 19px;
  background: linear-gradient(120deg, #1fc878, #38a173);
  color: #fff;
}

.detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.detail-title-row h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
}

.detail-title-row button {
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #effff9;
  font-size: 13px;
}

.detail-party {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  margin: 9px 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.detail-party strong {
  color: #fff;
  font-size: 18px;
  font-weight: 500;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.45);
  text-align: center;
}

.detail-metrics span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.2;
}

.detail-metrics b {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 16px;
  line-height: 1.1;
}

.detail-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 16px 0;
  text-align: center;
  color: #999;
  font-size: 13px;
}

.detail-tabs b {
  display: block;
  margin-top: 7px;
  color: #888;
  font-size: 17px;
  font-weight: 500;
}

.detail-tabs span:first-child,
.detail-tabs span:first-child b {
  color: var(--green-dark);
}

.detail-amount {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 18px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.detail-amount strong {
  color: var(--green-dark);
  font-size: 22px;
  line-height: 1;
}

.detail-amount i {
  color: #aab2b8;
  font-style: normal;
}

.settle-actions {
  position: fixed;
  left: 50%;
  bottom: calc(66px + env(safe-area-inset-bottom));
  width: min(100vw, 440px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 18px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  z-index: 32;
}

.settle-actions button {
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--green-dark);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.settle-actions button:first-child {
  background: #ef6b3a;
}

.settle-actions button.disabled,
.settle-actions button:disabled {
  background: #e8ecef;
  color: #a2abb2;
}

.agreement {
  min-height: 100vh;
  padding: 20px 18px 92px;
  background: #fff;
  line-height: 1.78;
  font-size: 15px;
  color: #25282b;
}

.agreement h1 {
  margin: 0 0 18px;
  text-align: center;
  font-size: 19px;
}

.agreement h2 {
  margin: 18px 0 8px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.agreement-table {
  width: 100%;
  margin: 14px 0 18px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.agreement-table td {
  padding: 8px 7px;
  border: 1px solid #dfe5e8;
  vertical-align: middle;
  word-break: break-word;
}

.agreement-table td:nth-child(odd) {
  width: 24%;
  background: #f7faf9;
  color: #5f6b72;
  font-weight: 600;
}

.signature-block {
  position: relative;
  min-height: 132px;
  margin-top: 22px;
  padding: 14px 140px 10px 0;
  border-top: 1px solid #edf0f2;
}

.signature-block p {
  margin: 8px 0;
}

.company-seal {
  position: absolute;
  right: 4px;
  top: 18px;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border: 3px solid #d92323;
  border-radius: 50%;
  color: #d92323;
  text-align: center;
  transform: rotate(-12deg);
  opacity: 0.88;
}

.company-seal::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid #d92323;
  border-radius: 50%;
}

.company-seal span {
  width: 78px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.company-seal b {
  position: absolute;
  bottom: 20px;
  font-size: 10px;
}

.history-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: min(100vw, 440px);
  height: calc(58px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-items: center;
  transform: translateX(-50%);
  background: #191919;
  z-index: 35;
}

.history-bar button {
  width: 86px;
  height: 48px;
  border: 0;
  background: transparent;
  color: #c9c9c9;
  font-size: 52px;
  line-height: 40px;
  font-weight: 200;
}

.history-bar button:disabled {
  color: #505050;
}

.mask {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.68);
  z-index: 50;
}

.role-modal,
.confirm-modal {
  width: min(330px, calc(100vw - 76px));
  border-radius: 5px;
  background: #fff;
  overflow: hidden;
  position: relative;
}

.role-modal .close {
  position: absolute;
  right: 18px;
  top: 16px;
  border: 0;
  background: transparent;
  color: #aaa;
  font-size: 35px;
}

.role-modal h3,
.confirm-modal h3 {
  margin: 28px 0 18px;
  text-align: center;
  font-size: 24px;
  font-weight: 500;
}

.role-modal p,
.confirm-modal p {
  margin: 0;
  padding: 0 20px 26px;
  color: #444;
  line-height: 1.7;
  font-size: 16px;
}

.role-modal div,
.confirm-modal div,
.qr-card div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #eee;
}

.role-modal div button,
.confirm-modal div button,
.qr-card button {
  height: 58px;
  border: 0;
  background: #fff;
  color: #29a56d;
  font-size: 22px;
}

.confirm-modal div button:last-child {
  color: var(--red);
  border-left: 1px solid #eee;
}

.qr-card {
  width: min(330px, calc(100vw - 86px));
  padding: 16px 16px 0;
  background: #fff;
  text-align: center;
}

.qr-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
}

.qr-card p {
  margin: 16px 0 22px;
}

.pin-mask {
  align-items: end;
}

.date-picker-mask {
  align-items: end;
}

.date-sheet {
  width: min(100vw, 440px);
  padding: 16px 18px calc(20px + env(safe-area-inset-bottom));
  border-radius: 14px 14px 0 0;
  background: #fff;
}

.date-head {
  height: 42px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  color: var(--ink);
}

.date-head button {
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f4f6f7;
  color: #65707a;
  font-size: 26px;
  line-height: 1;
}

.date-head strong {
  text-align: center;
  font-size: 17px;
}

.date-sheet p {
  margin: 4px 0 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.week-row,
.day-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}

.week-row span {
  height: 28px;
  color: #9aa3aa;
  font-size: 12px;
}

.day-grid {
  row-gap: 6px;
}

.day-grid button,
.day-grid i {
  width: 38px;
  height: 38px;
  justify-self: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #27313a;
  font-size: 15px;
  font-style: normal;
}

.day-grid button.active {
  background: var(--green);
  color: #fff;
  font-weight: 600;
}

.date-today {
  width: 100%;
  height: 42px;
  margin-top: 14px;
  border: 0;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 15px;
  font-weight: 600;
}

.pin-sheet {
  width: min(100vw, 440px);
  background: #fff;
  padding: 30px 18px 18px;
}

.pin-sheet h3 {
  margin: 0 0 28px;
  text-align: center;
  font-size: 24px;
  font-weight: 500;
}

.pin-box {
  height: 54px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid #e5e5e5;
  position: relative;
}

.pin-box input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.pin-box span {
  display: grid;
  place-items: center;
  border-right: 1px solid #eee;
  font-size: 28px;
}

.pin-box span:last-child {
  border-right: 0;
}

.num-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 130px;
  background: #f3f4f6;
}

.num-pad button {
  height: 64px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  font-size: 32px;
}

.admin-login {
  padding: 28px;
}

.admin-login input {
  width: 100%;
  height: 48px;
  margin-bottom: 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0 12px;
}

.admin {
  min-height: 100vh;
  padding: 16px 16px 86px;
  background: var(--page);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.admin-stats span,
.admin article,
.empty-card {
  background: #fff;
  border-radius: 8px;
  padding: 14px;
}

.admin-stats b {
  display: block;
  margin-top: 5px;
  font-size: 22px;
}

.admin article {
  margin-top: 12px;
}

.admin article button {
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  padding: 0 16px;
}

.empty-card {
  color: #888;
  text-align: center;
}

.empty-card.tall {
  margin: 0 17px;
  min-height: 178px;
  display: grid;
  place-items: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  max-width: min(340px, calc(100vw - 40px));
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  z-index: 80;
  font-size: 14px;
}

@media (max-width: 380px) {
  .plain-form label {
    grid-template-columns: 126px 1fr auto;
    padding: 0 28px;
    font-size: 20px;
  }

  .formula {
    font-size: 16px;
  }

  .formula span {
    font-size: 19px;
  }

  .yellow-actions {
    padding-left: 60px;
    padding-right: 60px;
  }
}
