* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f4f5f7;
  color: #1f2933;
  line-height: 1.5;
}

.container { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }
.container.narrow { max-width: 420px; }
.container.wide { max-width: 960px; }

.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.page-header h1 { margin: 0 0 4px; font-size: 1.5rem; }

.muted { color: #5b6b7c; }
.small { font-size: 0.85rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; }
.break-word { overflow-wrap: anywhere; }

/* Agreement document */
.agreement-paper {
  background: #fff;
  border: 1px solid #d7dce1;
  border-radius: 6px;
  padding: 24px 28px;
  margin-bottom: 24px;
}
.agreement-text {
  white-space: pre-wrap;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.02rem;
  margin: 0;
}
/* Inline fill-in fields inside the agreement body */
.agreement-text input.field {
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid #c3ccd4;
  border-radius: 4px;
  padding: 2px 6px;
  margin: 0;
  width: 100%;
  min-width: 220px;
}
.agreement-text input.field:focus {
  outline: 2px solid #1f6feb;
  outline-offset: 1px;
  border-color: #1f6feb;
}
.agreement-text input.field-error {
  border-color: #c0392b;
  background: #fdf0ef;
}
.agreement-text input.field-error:focus {
  outline-color: #c0392b;
  border-color: #c0392b;
}
.tenant-fields {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.tenant-fields th,
.tenant-fields td {
  text-align: left;
  vertical-align: middle;
  padding: 6px 12px 6px 0;
}
.tenant-fields th {
  width: 150px;
  font-weight: 600;
  white-space: nowrap;
}

/* Execution block */
.execution-block {
  background: #fff;
  border: 1px solid #d7dce1;
  border-radius: 6px;
  padding: 20px 24px;
}
.execution-block h2 { margin-top: 0; font-size: 1.1rem; }

/* Forms */
label { display: block; font-weight: 600; margin: 14px 0 4px; }
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid #c3ccd4;
  border-radius: 6px;
  background: #fff;
}
label.checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
  margin-top: 18px;
}
label.checkbox input { margin-top: 4px; }
label.checkbox.error { color: #8a1f1f; }
label.checkbox.error input[type="checkbox"] {
  outline: 2px solid #c0392b;
  outline-offset: 1px;
}

.btn {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 18px;
  font-size: 1rem;
  border: 1px solid #c3ccd4;
  border-radius: 6px;
  background: #fff;
  color: #1f2933;
  text-decoration: none;
  cursor: pointer;
}
.btn.primary { background: #1f6feb; border-color: #1f6feb; color: #fff; font-weight: 600; }
.btn + .btn { margin-left: 8px; }

.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; }
.alert.error { background: #fde8e8; border: 1px solid #f5c2c2; color: #8a1f1f; }

/* Records table */
.records { width: 100%; border-collapse: collapse; background: #fff; }
.records th, .records td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #eef1f4;
  font-size: 0.95rem;
}
.records th { color: #5b6b7c; font-weight: 500; }

.inline { display: inline; }
