:root { --b:#111827; --muted:#6b7280; --bg:#f5f7fb; --card:#ffffff; --line:#e5e7eb; }
body { margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; background:var(--bg); color:var(--b); }
.wrap { max-width:1100px; margin:24px auto; padding:0 16px; display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
@media (max-width: 980px){ .wrap{ grid-template-columns: 1fr; } }
.card { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px; box-shadow: 0 1px 10px rgba(0,0,0,.04); }
h1 { font-size:18px; margin:0 0 10px; }
h2 { font-size:14px; margin:16px 0 10px; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.06em; }
label { display:block; font-size:12px; color:var(--muted); margin:10px 0 6px; }
input, textarea { width:100%; box-sizing:border-box; padding:10px; border-radius:10px; border:1px solid var(--line); outline:none; background:#fff; }
textarea { min-height:90px; resize:vertical; }
.row { display:grid; grid-template-columns: 1fr 1fr; gap:10px; }
.row3 { display:grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap:10px; align-items:end; }
.btns { display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; }
button { border:1px solid var(--line); background:#111827; color:#fff; padding:10px 12px; border-radius:12px; cursor:pointer; font-weight:600; }
button.secondary { background:#fff; color:#111827; }
button.danger { background:#b91c1c; }
table { width:100%; border-collapse:collapse; margin-top:10px; }
th, td { border-bottom:1px solid var(--line); padding:10px 8px; text-align:left; font-size:13px; vertical-align:top; }
th { font-size:12px; color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
.totals { margin-top:10px; display:grid; gap:6px; }
.totals div { display:flex; justify-content:space-between; font-size:13px; }
.totals .grand { font-weight:800; font-size:14px; }
.hint { font-size:12px; color:var(--muted); margin-top:8px; }
.sig-wrap { border:1px dashed var(--line); border-radius:12px; padding:10px; background:#fbfdff; }
canvas { width:100%; height:160px; background:#fff; border:1px solid var(--line); border-radius:12px; touch-action:none; }
.pill { display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border-radius:999px; border:1px solid var(--line); font-size:12px; color:var(--muted); background:#fff; }
.previewHeader { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.previewBox { border:1px solid var(--line); border-radius:12px; padding:14px; background:#fff; }
.brand { font-weight:800; font-size:16px; }
.small { font-size:12px; color:var(--muted); }
.strong { font-weight:800; }
.pre { white-space:pre-wrap; }
.hr { height:1px; background:var(--line); margin:12px 0; }
.right { text-align:right; }
.previewLogo { max-height:34px; max-width:180px; display:block; margin:0 0 6px auto; }
.stamp { font-size:12px; color:var(--muted); }
.ok { color:#065f46; font-weight:700; }
.warn { color:#92400e; font-weight:700; }
.mb6 { margin-bottom:6px; }
.sigImg { max-width:260px; max-height:90px; border:1px solid #e5e7eb; border-radius:10px; background:#fff; }
.success { background:#dcfce7; border:1px solid #bbf7d0; padding:10px; border-radius:10px; color:#14532d; margin-top:10px; }
a { text-decoration:none; }
code { background:#f3f4f6; padding:2px 6px; border-radius:6px; }
