* { box-sizing: border-box; }
body {
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background: #f5f6f8;
  color: #1c1c1e;
  margin: 0;
  padding: 0;
}
.wrap {
  max-width: 720px;
  margin: 40px auto;
  padding: 0 16px;
}
.wrap.wide {
  max-width: 1000px;
}
.card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 28px 32px;
}
h1.page-title {
  font-size: 20px;
  margin: 0 0 20px;
}
.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #333;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field input[type="date"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
}
.field textarea { min-height: 80px; resize: vertical; }
.row2 { display: flex; gap: 16px; }
.row2 .field { flex: 1; }
.check-field { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 16px; }
.check-field input { margin-top: 3px; }
button, .btn {
  display: inline-block;
  background: #1c1c1e;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
button.secondary, .btn.secondary {
  background: #fff;
  color: #1c1c1e;
  border: 1px solid #999;
}
.error-box {
  background: #fdecea;
  border: 1px solid #f5c6cb;
  color: #86181d;
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 13px;
}
.notice-box {
  background: #eef6ff;
  border: 1px solid #b6d9ff;
  color: #0b4a8f;
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 13px;
}
table.list {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.list th, table.list td {
  border-bottom: 1px solid #e5e5e5;
  padding: 8px 10px;
  text-align: left;
}
table.list th { color: #666; font-weight: 600; }
.status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
}
.status.draft { background: #eee; color: #555; }
.status.sent { background: #fff3cd; color: #856404; }
.status.signed { background: #d4edda; color: #155724; }
.status.send_failed { background: #f8d7da; color: #721c24; }
.status.expired { background: #f1f1f1; color: #999; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.topbar a { color: #333; font-size: 13px; text-decoration: none; }
.doc-frame {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 16px;
  max-height: 480px;
  overflow-y: auto;
  background: #fafafa;
  margin-bottom: 20px;
}
