/* Drafts for Approval - calm approvals inbox */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: #faf5ec;
  color: #2f2a24;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.topbar {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px 8px;
}

.topbar h1 {
  margin: 0 0 16px;
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #e3d9c6;
  padding-bottom: 12px;
}

.tab {
  appearance: none;
  border: 1px solid #ddd2bd;
  background: #fffdf8;
  color: #4a4236;
  border-radius: 999px;
  padding: 7px 16px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.tab.active {
  background: #4a4236;
  border-color: #4a4236;
  color: #fffdf8;
}

main {
  max-width: 920px;
  margin: 0 auto;
  padding: 16px 20px 60px;
}

.loading {
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 20px;
  color: #7a6f5d;
}

.card {
  background: #fffdf8;
  border: 1px solid #e3d9c6;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(74, 66, 54, 0.06);
}

.card h2, .card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 650;
}

.section-title {
  margin: 22px 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7a6f5d;
}

.item-title { font-weight: 700; font-size: 16px; }
.item-detail { color: #554c3e; white-space: pre-wrap; margin-top: 2px; }
.muted { color: #7a6f5d; }
.small { font-size: 13px; }
.meta { color: #7a6f5d; font-size: 13px; margin-top: 4px; }

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #554c3e;
  margin: 12px 0 4px;
}

input[type="text"], input[type="password"], input[type="email"],
textarea, select {
  width: 100%;
  border: 1px solid #d8cdb6;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 14px;
  padding: 8px 10px;
}

textarea { min-height: 90px; resize: vertical; }
textarea.body-field { min-height: 180px; }
textarea.note-field { min-height: 56px; }
textarea.prose-field { min-height: 260px; width: 100%; }

input:focus, textarea:focus, select:focus {
  outline: 2px solid #c9b48a;
  outline-offset: 1px;
  border-color: #b49b6b;
}

.btn {
  appearance: none;
  display: inline-block;
  border: 1px solid #cbbfa5;
  background: #fff;
  color: #4a4236;
  border-radius: 8px;
  padding: 8px 14px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover { background: #f6efe0; }
.btn.primary { background: #4a4236; border-color: #4a4236; color: #fffdf8; }
.btn.primary:hover { background: #5d5243; }
.btn.danger { color: #8c3b2e; border-color: #ddb7ae; }
.btn.small-btn { padding: 5px 10px; font-size: 13px; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
}

.note-box {
  background: #fbf3df;
  border: 1px solid #eadfc0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 12px;
  font-size: 14px;
}

.missing-box {
  background: #fdf0ec;
  border: 1px solid #eccfc7;
  border-radius: 8px;
  padding: 12px;
  margin-top: 14px;
}

.missing-box .field-label { margin-top: 0; }
.missing-row { display: flex; gap: 8px; margin-top: 6px; }
.missing-row input { flex: 1; }

.error-text { color: #8c3b2e; font-size: 14px; margin-top: 10px; white-space: pre-wrap; }
.footer-note { color: #7a6f5d; font-size: 13px; margin-top: 14px; }
.empty { color: #7a6f5d; padding: 24px 4px; }

.status-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #ddd2bd;
  background: #fbf6ea;
  border-radius: 999px;
  padding: 2px 9px;
  margin-left: 8px;
  vertical-align: middle;
}

.login-wrap {
  max-width: 420px;
  margin: 40px auto;
  padding: 0 20px;
}

.signature-card canvas {
  display: block;
  width: 520px;
  max-width: 100%;
  height: 170px;
  background: #fff;
  border: 1px solid #d8cdb6;
  border-radius: 8px;
  touch-action: none;
  cursor: crosshair;
  margin-top: 10px;
}

.signature-preview {
  display: block;
  max-width: 320px;
  max-height: 110px;
  background: #fff;
  border: 1px solid #e3d9c6;
  border-radius: 8px;
  padding: 6px;
  margin-top: 8px;
}

.attachment {
  border: 1px solid #e3d9c6;
  border-radius: 10px;
  background: #fffaf0;
  padding: 14px;
  margin-top: 12px;
}

.att-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.att-name { font-weight: 650; word-break: break-word; }
.att-size { color: #7a6f5d; font-size: 13px; }

.att-pages { margin-top: 10px; }
.att-pages img, .att-pages canvas {
  display: block;
  max-width: 100%;
  border: 1px solid #e3d9c6;
  border-radius: 6px;
  background: #fff;
  margin-bottom: 10px;
}

.att-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.file-label { cursor: pointer; }
.file-label input[type="file"] { display: none; }

.field-editor { margin-top: 12px; }
.form-field-row { margin-bottom: 10px; }
.form-field-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #554c3e;
  margin-bottom: 4px;
}
.form-field-row.checkbox-row label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 500;
}
.form-field-row.checkbox-row input { width: auto; }
.readonly-value {
  background: #fbf6ea;
  border: 1px solid #e3d9c6;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  white-space: pre-wrap;
}

.locked-panel {
  background: #fbf6ea;
  border: 1px solid #e3d9c6;
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
  font-size: 14px;
}

.item-row select { width: auto; min-width: 130px; }
.item-top { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: flex-start; }
