:root {
  --bg: #f3f5f4;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --green: #7ecb66;
  --green-2: #5fb84e;
  --danger: #b91c1c;
  --warning: #92400e;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(15, 23, 42, .10);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at top left, rgba(126,203,102,.14), transparent 32rem), linear-gradient(180deg, #f8faf8 0%, var(--bg) 100%);
  color: var(--ink);
  min-height: 100vh;
}
.hero {
  background: radial-gradient(circle at 8% 12%, rgba(126,203,102,.24), transparent 18rem), linear-gradient(135deg, #030504 0%, #0b1010 55%, #111827 100%);
  color: #fff;
  padding: 22px;
  border-bottom: 1px solid rgba(126,203,102,.25);
}
.brand { max-width: 1120px; margin: 0 auto; display: flex; gap: 16px; align-items: center; }
.brand-mark {
  width: 66px; height: 66px; border-radius: 20px; display: grid; place-items: center;
  border: 1px solid rgba(126,203,102,.34); background: rgba(255,255,255,.06); font-weight: 900; color: var(--green);
}
.eyebrow { color: var(--green); font-size: 12px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 5px; }
h1 { margin: 0; font-size: 26px; letter-spacing: -.03em; }
.hero p { margin: 7px 0 0; color: #cbd5e1; }
main { max-width: 1120px; margin: 22px auto 42px; padding: 0 14px; }
.card {
  background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px;
}
h2, h3 { margin-top: 0; letter-spacing: -.02em; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.45; }
.message { padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; font-weight: 800; border: 1px solid transparent; }
.message.ok { background: #ecfdf3; color: #166534; border-color: #bbf7d0; }
.message.error { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.message.warning { background: #fffbeb; color: var(--warning); border-color: #fde68a; }
.worker-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.worker-grid div { border: 1px solid var(--line); background: #fbfdfb; border-radius: 14px; padding: 12px; }
.worker-grid span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; margin-bottom: 4px; }
.documents-list { display: grid; gap: 10px; }
.doc-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 13px; background: #fbfdfb; }
.doc-title { font-weight: 900; }
.doc-meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.pill { display: inline-block; border-radius: 999px; padding: 4px 8px; background: #eef2ff; color: #3730a3; font-weight: 900; font-size: 12px; }
.pill.ok { background: #d1fae5; color: #047857; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions.right { justify-content: flex-end; }
.actions.center { justify-content: center; }
button {
  border: 0; border-radius: 12px; padding: 10px 14px; background: linear-gradient(135deg, #050807, #111827);
  color: #fff; font-weight: 900; cursor: pointer; box-shadow: 0 8px 18px rgba(15,23,42,.14);
}
button.light { background: #f8fafc; color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
button.small { padding: 8px 10px; font-size: 12px; border-radius: 10px; }
button:disabled { opacity: .55; cursor: not-allowed; }
.viewer-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.pdf-wrap { height: 70vh; min-height: 420px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #111; }
.pdf-wrap iframe { width: 100%; height: 100%; border: 0; }
.signature-box { margin-top: 14px; border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: #fbfdfb; }
#signatureCanvas { width: 100%; max-width: 900px; height: 190px; background: #fff; border: 1px dashed #cbd5e1; border-radius: 14px; touch-action: none; display: block; }
.modal { position: fixed; inset: 0; z-index: 999; background: rgba(15,23,42,.62); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-card { width: 100%; max-width: 520px; background: #fff; border-radius: 22px; box-shadow: 0 24px 80px rgba(0,0,0,.32); padding: 22px; }
.document-name { font-weight: 900; background: #f8fafc; border: 1px solid var(--line); padding: 10px; border-radius: 12px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-weight: 800; line-height: 1.35; margin: 14px 0; }
.check-row input { width: 18px; height: 18px; margin-top: 2px; }
.success { text-align: center; }
.success-icon { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; background: #d1fae5; color: #047857; display: grid; place-items: center; font-size: 34px; font-weight: 900; }
@media (max-width: 720px) {
  .brand { align-items: flex-start; }
  .brand-mark { width: 56px; height: 56px; border-radius: 18px; }
  h1 { font-size: 23px; }
  .worker-grid { grid-template-columns: 1fr; }
  .doc-row, .viewer-head { flex-direction: column; align-items: stretch; }
  .pdf-wrap { height: 62vh; min-height: 360px; }
}
