:root {
  --ink: #203936;
  --muted: #657770;
  --green: #205b49;
  --light: #eaf2e9;
  --line: #e0e6dd;
  --paper: #fffefb;
  --bg: #f5f6f0;
  --orange: #ad6033;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.6;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
a {
  color: var(--green);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.layout {
  display: grid;
  grid-template-columns: 238px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #163f35;
  color: #fff;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 34px 22px;
  display: flex;
  flex-direction: column;
}
.logo {
  font-size: 27px;
  font-weight: 750;
  letter-spacing: -1px;
}
.logo b {
  color: #d7e7a0;
}
.logo-sub {
  font-size: 10px;
  letter-spacing: 0.18em;
  opacity: 0.7;
  margin: 3px 0 38px;
}
.nav {
  display: grid;
  gap: 8px;
}
.nav button {
  display: flex;
  gap: 13px;
  align-items: center;
  border: 0;
  color: #d6e1da;
  background: none;
  text-align: left;
  border-radius: 8px;
  padding: 12px 14px;
}
.nav button:hover,
.nav button.active {
  background: #31584a;
  color: white;
}
.nav .icon {
  font-size: 18px;
  width: 22px;
}
.side-bottom {
  margin-top: auto;
  padding-top: 35px;
  font-size: 12px;
  color: #c7d7c9;
}
.user {
  border-top: 1px solid #ffffff25;
  padding-top: 20px;
  margin-top: 20px;
}
.avatar {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  background: #e4ebd4;
  color: var(--green);
  font-weight: bold;
  margin-right: 8px;
}
.main {
  padding: 30px 42px 60px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  padding-bottom: 26px;
}
.topbar-right {
  display: flex;
  gap: 18px;
  align-items: center;
}
.environment {
  border-radius: 20px;
  background: #e9e8d8;
  padding: 4px 11px;
  color: #726438;
  font-size: 11px;
  font-weight: 600;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 16px 0 28px;
}
h1 {
  font-size: 28px;
  letter-spacing: 0.02em;
  margin: 0 0 6px;
  font-weight: 700;
}
h2 {
  font-size: 19px;
  margin: 0 0 14px;
}
h3 {
  font-size: 15px;
  margin: 0 0 8px;
}
p {
  margin: 6px 0 12px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 650;
  margin-bottom: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 10px 17px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.btn.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.btn.small {
  padding: 6px 10px;
}
.btn.ghost {
  background: transparent;
}
.btn.danger {
  color: #a0463e;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 25px;
}
.stat {
  padding: 21px 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.stat-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}
.stat-number {
  font-size: 33px;
  line-height: 1.6;
  font-weight: 650;
  letter-spacing: -1px;
}
.stat-number small {
  font-size: 12px;
  letter-spacing: 0;
  margin-left: 7px;
  color: var(--muted);
  font-weight: normal;
}
.stat-note {
  font-size: 11px;
  color: var(--muted);
}
.hero {
  padding: 25px 29px;
  background: #e8eedc;
  border: 1px solid #dce5ce;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 29px;
}
.hero h2 {
  margin: 2px 0 8px;
  font-size: 21px;
}
.hero .steps-line {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #5d7358;
  font-size: 12px;
}
.hero .star {
  font-size: 58px;
  line-height: 1;
  color: #6c8f5d;
  padding: 14px;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 22px;
}
.panel-head {
  padding: 22px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.panel-head h2 {
  margin: 0;
  font-size: 17px;
}
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 24px 18px;
  align-items: center;
}
.filters input {
  min-width: 230px;
  flex: 1;
}
.search,
.filters input,
.filters select {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 12px;
  background: white;
  max-width: 100%;
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  font-weight: 500;
  color: var(--muted);
  font-size: 11px;
  background: #f8f9f4;
  padding: 12px 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td {
  padding: 17px 22px;
  border-bottom: 1px solid #edf0e8;
  vertical-align: middle;
}
tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #f9faf5;
}
.title-button {
  border: 0;
  background: none;
  color: var(--ink);
  font-weight: 600;
  padding: 0;
  text-align: left;
}
.title-button:hover {
  text-decoration: underline;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  font-size: 11px;
  padding: 4px 9px;
  white-space: nowrap;
  background: #edf0e8;
  color: #667163;
}
.badge:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge.sent {
  background: #eef0fb;
  color: #6274ab;
}
.badge.review {
  background: #faf0db;
  color: #9d7826;
}
.badge.signed,
.badge.approved {
  background: #e8f1e7;
  color: #447455;
}
.badge.declined,
.badge.voided,
.badge.expired {
  background: #f7e9e5;
  color: #a35e51;
}
.tag {
  font-size: 10px;
  padding: 3px 7px;
  border: 1px solid #dfe6d8;
  border-radius: 4px;
  color: var(--muted);
  display: inline-block;
}
.empty {
  text-align: center;
  padding: 60px 25px;
  color: var(--muted);
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.card {
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.gap-top {
  margin-top: 20px;
}
.notice {
  padding: 13px 16px;
  border-radius: 8px;
  background: #faf1de;
  border: 1px solid #eee2bd;
  font-size: 12px;
  color: #856637;
  margin: 12px 0;
}
.notice.good {
  background: #edf3e8;
  border-color: #dce8d4;
  color: #456a43;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr);
  gap: 22px;
}
.document {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.9;
  background: #fffefb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px;
  max-height: 660px;
  overflow: auto;
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline li {
  padding: 0 0 22px 24px;
  border-left: 1px solid #dde5d6;
  position: relative;
  margin-left: 4px;
  font-size: 12px;
}
.timeline li:before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  background: #749570;
  border-radius: 50%;
  left: -4px;
  top: 7px;
}
.timeline li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}
.timeline time {
  font-size: 10px;
  color: var(--muted);
  display: block;
}
.comment {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  white-space: pre-wrap;
}
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}
.field label,
.field-label {
  font-size: 12px;
  font-weight: 600;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid #d5dfd2;
  border-radius: 7px;
  background: white;
  padding: 10px 12px;
  color: var(--ink);
}
textarea {
  resize: vertical;
}
.field .help {
  font-size: 11px;
  color: var(--muted);
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.span2 {
  grid-column: 1/-1;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 13px 0;
  font-size: 13px;
}
.check input {
  accent-color: var(--green);
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 3px;
}
.wizard {
  max-width: 920px;
  margin: auto;
}
.progress {
  display: flex;
  gap: 7px;
  margin: 8px 0 25px;
}
.progress span {
  flex: 1;
  padding: 12px 0;
  border-bottom: 2px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.progress .active {
  border-color: var(--green);
  color: var(--green);
  font-weight: 600;
}
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.choice {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 11px;
  padding: 28px;
  text-align: left;
  color: var(--ink);
}
.choice:hover {
  border-color: var(--green);
  background: #eef3e9;
}
.choice-icon {
  font-size: 26px;
  margin-bottom: 15px;
}
.choice h2 {
  font-size: 21px;
}
.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 15px;
  padding-top: 20px;
}
.money {
  font-size: 27px;
  font-weight: 600;
}
.summary {
  background: #eef3e9;
  padding: 20px;
  border-radius: 8px;
  margin: 15px 0;
}
.login {
  max-width: 460px;
  margin: 8vh auto;
  padding: 40px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
}
.login .logo {
  color: var(--green);
  margin-bottom: 30px;
}
.login .btn {
  width: 100%;
  margin-top: 10px;
}
.sign-shell {
  max-width: 760px;
  margin: auto;
  padding: 30px 22px 70px;
}
.sign-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}
.sign-header .logo {
  font-size: 25px;
  color: var(--green);
}
.sign-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  margin-top: 22px;
}
.sign-card h1 {
  font-size: 25px;
}
.sign-card .document {
  max-height: 430px;
  font-size: 13px;
  padding: 20px;
}
.sign-footer {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 30px;
}
.sign-name {
  font-size: 24px !important;
  letter-spacing: 0.08em;
}
.success-mark {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e8f2df;
  color: var(--green);
  font-size: 30px;
  margin-bottom: 20px;
}
.code-input {
  font-size: 28px !important;
  letter-spacing: 0.35em;
  max-width: 280px;
}
.loading {
  text-align: center;
  padding: 15vh 20px;
  color: var(--green);
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #173f34;
  color: white;
  padding: 12px 20px;
  border-radius: 9px;
  box-shadow: 0 5px 30px #0002;
  display: none;
  z-index: 20;
  max-width: 90vw;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 28px;
  max-width: 540px;
  width: 90vw;
  color: var(--ink);
  background: var(--paper);
}
dialog::backdrop {
  background: #102c2460;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
button.link {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  text-decoration: underline;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.error {
  color: #a0443d;
  padding: 10px 0;
}
.activity-dot {
  color: #608260;
  margin-right: 8px;
}
@media (min-width: 1600px) {
  .main {
    padding-left: 65px;
    padding-right: 65px;
  }
}
@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 195px 1fr;
  }
  .main {
    padding: 25px;
  }
  .sidebar {
    padding: 30px 16px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 16px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .hero .star {
    display: none;
  }
}
@media (max-width: 720px) {
  .layout {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    padding: 15px 20px;
    display: block;
  }
  .logo {
    font-size: 22px;
  }
  .logo-sub,
  .side-bottom {
    display: none;
  }
  .nav {
    display: flex;
    margin-top: 12px;
    overflow-x: auto;
    gap: 3px;
  }
  .nav button {
    padding: 8px 11px;
    white-space: nowrap;
    font-size: 12px;
  }
  .nav .icon {
    display: none;
  }
  .main {
    padding: 18px 16px 40px;
  }
  .topbar {
    padding-bottom: 5px;
    font-size: 10px;
  }
  .topbar-right {
    gap: 8px;
  }
  .heading {
    align-items: flex-start;
    margin-bottom: 20px;
  }
  h1 {
    font-size: 23px;
  }
  .heading .btn {
    padding: 9px 12px;
    font-size: 12px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-number {
    font-size: 28px;
  }
  .hero {
    padding: 20px;
  }
  .hero h2 {
    font-size: 18px;
  }
  .hero .steps-line {
    gap: 6px;
    font-size: 10px;
  }
  .panel-head {
    padding: 18px 16px;
  }
  .filters {
    padding: 0 16px 16px;
  }
  .filters input {
    min-width: 100%;
    width: 100%;
  }
  th,
  td {
    padding: 13px 15px;
  }
  .choice-grid,
  .fields {
    grid-template-columns: 1fr;
  }
  .span2 {
    grid-column: auto;
  }
  .card {
    padding: 20px;
  }
  .sign-shell {
    padding: 20px 14px 50px;
  }
  .sign-card {
    padding: 24px 18px;
  }
  .sign-card h1 {
    font-size: 22px;
  }
  .form-footer {
    flex-wrap: wrap;
  }
  .document {
    padding: 20px;
  }
  .login {
    margin: 6vh 16px;
    padding: 28px;
  }
  .progress span {
    font-size: 11px;
  }
  .user {
    display: none;
  }
}
@media (max-width: 720px) {
  #contract-table table,
  #contract-table tbody {
    display: block;
  }
  #contract-table thead {
    display: none;
  }
  #contract-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 9px;
    padding: 18px 16px;
    border-bottom: 1px solid var(--line);
  }
  #contract-table td {
    display: block;
    padding: 0;
    border: 0;
  }
  #contract-table td:first-child {
    grid-column: 1/-1;
  }
  #contract-table td:nth-child(2) {
    display: none;
  }
  #contract-table td:nth-child(3) {
    grid-column: 1/-1;
  }
  #contract-table td:nth-child(4),
  #contract-table td:nth-child(5) {
    font-size: 11px;
  }
  #contract-table td:last-child {
    display: none;
  }
  #contract-table .title-button {
    font-size: 14px;
  }
  #contract-table tr:last-child {
    border-bottom: 0;
  }
  .topbar {
    gap: 8px;
  }
  .topbar-right {
    flex-shrink: 0;
  }
  .topbar-right > span:last-child {
    display: none;
  }
  .environment {
    white-space: nowrap;
    font-size: 9px;
  }
}
/* Email login fields share the workspace form style. */
.login form > label { display: block; font-size: 13px; font-weight: 600; margin: 20px 0 12px; }
.login form > label input { display: block; box-sizing: border-box; width: 100%; margin-top: 9px; padding: 13px 14px; border: 1px solid #d8ded8; border-radius: 8px; background: #fff; color: #243f35; font: inherit; font-size: 16px; }
.login form > label input:focus { outline: 2px solid #6c9987; outline-offset: 2px; }
.login form[hidden] { display: none; }
