html {
  font-size: 15px;
}

body {
  margin-bottom: 64px;
  background: #f6f4ef;
  color: #172033;
}

.navbar-brand {
  font-weight: 700;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: 28px 0 18px;
}

.page-head h1 {
  margin: 0 0 6px;
  color: #073f3a;
  font-size: 2rem;
  font-weight: 800;
}

.page-head p,
.muted {
  color: #5f6b6d;
}

.work-form,
.result-panel {
  background: #fff;
  border: 1px solid #d9d2c3;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 10px 28px rgba(20, 32, 45, .05);
}

.work-form section + section {
  margin-top: 28px;
}

h2 {
  color: #073f3a;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 16px;
}

h3 {
  color: #073f3a;
  font-size: 1.05rem;
  margin-top: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

label span,
.signer-card label {
  font-weight: 650;
}

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

.signer-card {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 16px;
}

.signer-card legend {
  float: none;
  width: auto;
  margin-bottom: 8px;
  padding: 0 4px;
  color: #073f3a;
  font-size: 1rem;
  font-weight: 800;
}

.signer-card label {
  display: block;
  margin-bottom: 12px;
}

.form-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.btn-primary,
.btn-success {
  background: #0f4a43;
  border-color: #0f4a43;
}

.btn-primary:hover,
.btn-success:hover {
  background: #093530;
  border-color: #093530;
}

.case-facts {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 9px 18px;
  margin: 0;
}

.case-facts dt {
  font-weight: 800;
}

.case-facts dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.status {
  display: inline-block;
  min-width: 78px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eef2f7;
  color: #233042;
  font-weight: 800;
  text-align: center;
}

.status-signed {
  background: #dff4e8;
  color: #125a32;
}

.status-failed,
.status-cancelled,
.status-expired {
  background: #fde2e2;
  color: #8a1f1f;
}

.status-signstarted,
.status-viewed,
.status-pending,
.status-created {
  background: #fff1cf;
  color: #6d4b00;
}

.link-list {
  display: grid;
  gap: 10px;
}

.link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid #edf0f2;
}

.link-row span {
  display: block;
  color: #5f6b6d;
}

.refresh-pill {
  padding: 7px 10px;
  border: 1px solid #d9d2c3;
  border-radius: 999px;
  background: #fff;
  color: #5f6b6d;
}

.status-table {
  display: grid;
  grid-template-columns: 1.2fr 1.3fr .5fr .7fr 1fr;
  gap: 0;
  overflow-x: auto;
}

.status-table > div {
  padding: 10px;
  border-bottom: 1px solid #edf0f2;
}

.status-table .table-head {
  background: #f8fafb;
  font-weight: 800;
}

@media (max-width: 900px) {
  .form-grid,
  .signer-grid {
    grid-template-columns: 1fr;
  }

  .case-facts {
    grid-template-columns: 1fr;
  }
}
