
:root{
  --page-w: 210mm;
  --page-h: 297mm;
  --font: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
*{ box-sizing:border-box; }
body{ margin:0; font-family:var(--font); background:#f3f4f6; color:#111; }
.topbar{
  position:sticky; top:0; z-index:10;
  background:#111827; color:#fff;
  padding:10px 14px; display:flex; gap:10px; align-items:center; flex-wrap:wrap;
}
.topbar a{ color:#fff; text-decoration:none; opacity:.9; }
.topbar a:hover{ opacity:1; }
.topbar .spacer{ flex:1; }
.btn{
  border:1px solid rgba(255,255,255,.25);
  background:rgba(255,255,255,.12);
  color:#fff; padding:8px 10px; border-radius:10px;
  cursor:pointer; font-weight:700;
}
.btn.secondary{ background:rgba(255,255,255,.06); }
.container{ padding:18px; display:flex; justify-content:center; }
.sheet{
  width:100%; max-width:var(--page-w); min-height:var(--page-h);
  background:#fff; border-radius:12px;
  box-shadow:0 8px 22px rgba(0,0,0,.12);
  padding:16mm 14mm;
}
@media print{
  body{ background:#fff; }
  .topbar{ display:none; }
  .container{ padding:0; }
  .sheet{ box-shadow:none; border-radius:0; padding:12mm 12mm; }
}
.header{
  align-items:flex-start; display:flex; gap:14px; align-items:flex-start; }
.header .logo img{display:block;max-width:100%;height:auto;object-fit:contain;}
.header .addr{
  margin-left:auto; font-size:10px; line-height:1.25;
  white-space:pre;
  text-align:right;
}
.hline{ height:1px; background:#111; opacity:.65; margin:10px 0 14px; }
.grid2{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.box{ border:1px solid #777; }
.box .boxhead{ background:#dcdcdc; font-size:12px; padding:6px 8px; font-weight:800; border-bottom:1px solid #777; }
.box .boxbody{ padding:8px; }
.line{ display:flex; gap:8px; align-items:flex-end; margin:6px 0; }
.label{ font-size:12px; min-width:110px; }
.inputline{ flex:1; border-bottom:1px solid #222; padding:2px 2px 1px; }
input[type="text"], input[type="date"], input[type="time"]{
  width:100%; border:none; outline:none; font-size:12px; padding:2px 0; background:transparent;
}
.small input{ font-size:11px; }
.checkbox-row{ display:flex; gap:18px; align-items:center; flex-wrap:wrap; font-size:12px; }
.checkbox-row label{ display:flex; gap:6px; align-items:center; }
h1{ font-size:18px; margin:16px 0 10px; }
h2{ font-size:13px; margin:14px 0 8px; }
table.formtbl{ width:100%; border-collapse:collapse; font-size:12px; }
table.formtbl th, table.formtbl td{ border:1px solid #222; padding:6px; vertical-align:top; }
table.formtbl th{ background:#dcdcdc; font-weight:800; text-align:left; }
table.formtbl td .cell{ min-height:22px; }
table.formtbl input{ font-size:12px; padding:0; }
.zebra tbody tr:nth-child(even) td{ background:#efefef; }
.signature{ border:1px solid #222; height:42mm; width:100%; border-radius:8px; overflow:hidden; }
.signature canvas{ width:100%; height:100%; display:block; }
.sig-actions{ display:flex; gap:10px; margin-top:8px; flex-wrap:wrap; }
.sig-actions button{ border:1px solid #222; background:#fff; padding:6px 10px; border-radius:10px; cursor:pointer; font-weight:800; }
.note{ font-size:11px; opacity:.8; }

.logo{overflow:visible;align-self:flex-start;}

.topinput,.topselect{ height:34px; border:1px solid #cbd5e1; border-radius:10px; padding:0 10px; font-weight:700; }
.topinput{ width:260px; }
.topselect{ width:320px; }
@media (max-width: 900px){ .topinput{ width:160px;} .topselect{ width:180px;} }

.topcheck{ display:flex; align-items:center; gap:6px; font-weight:800; font-size:12px; }
.topcheck input{ width:16px; height:16px; }

.a4page{ width:100%; max-width:var(--page-w); min-height:var(--page-h); padding:14mm 14mm 16mm; }
.pagebreak{ page-break-after: always; }
.center{ text-align:center; }
.wbox{ border:2px solid #222; padding:10px; }
