:root { --bg:#f3f5f8; --card:#fff; --ink:#1d2733; --muted:#6b7785; --line:#dde3ea; --pri:#0f5f8c; --pri2:#0b4a6d; --red:#b42318; --green:#147a3d; --amber:#a15c00; --pink:#a3246b; }
* { box-sizing: border-box; }
body { margin:0; font:14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color:var(--ink); background:var(--bg); }
a { color:var(--pri); }
input, select, textarea { font:inherit; padding:6px 8px; border:1px solid #c7d0da; border-radius:6px; background:#fbfcfd; width:100%; }
input[type=checkbox] { width:auto; }
input:focus, select:focus, textarea:focus, .editor:focus { outline:2px solid #9cc6e2; outline-offset:0; background:#fff; }
label { display:block; font-size:12.5px; color:#3b4856; }
label > input, label > select, label > textarea { margin-top:3px; }
.btn { display:inline-block; padding:7px 13px; border:1px solid #c2ccd6; border-radius:6px; background:#fff; color:var(--ink); cursor:pointer; text-decoration:none; font-size:13.5px; white-space:nowrap; }
.btn:hover { background:#eef3f7; } .btn:disabled { opacity:.5; cursor:default; }
.btn.primary { background:var(--pri); border-color:var(--pri); color:#fff; } .btn.primary:hover { background:var(--pri2); }
.btn.sm { padding:3px 9px; font-size:12.5px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:14px 16px; margin-bottom:14px; }
.muted { color:var(--muted); } .small { font-size:12px; } .err { color:var(--red); } .center { text-align:center; }
.warn { background:#fff4e5; border:1px solid #f5c98a; padding:8px; border-radius:6px; }
.info { background:#eaf4fb; border:1px solid #b9dbf0; padding:8px; border-radius:6px; margin-top:0; }
.top { display:flex; align-items:center; gap:18px; padding:8px 18px; background:#0f3d5c; color:#fff; position:sticky; top:0; z-index:5; flex-wrap:wrap; }
.top .brand { font-weight:700; font-size:16px; } .top .brand small { font-weight:400; opacity:.75; margin-left:6px; }
.top nav { display:flex; gap:4px; flex:1; flex-wrap:wrap; }
.top nav a { color:#d6e6f2; text-decoration:none; padding:6px 11px; border-radius:6px; } .top nav a.on, .top nav a:hover { background:rgba(255,255,255,.14); color:#fff; }
.top .user { font-size:13px; } .top .user a { color:#cfe3f1; margin-left:8px; }
.pill { background:rgba(255,255,255,.18); padding:1px 7px; border-radius:9px; font-size:11.5px; }
main { padding:16px 18px; max-width:1500px; margin:0 auto; }
.bar { display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; margin-bottom:10px; }
.bar label { min-width:120px; } .bar #wq { width:280px; }
.sum { margin-bottom:8px; color:#3b4856; }
table.grid { width:100%; border-collapse:collapse; }
table.grid th, table.grid td { border-bottom:1px solid var(--line); padding:6px 7px; text-align:left; vertical-align:top; }
table.grid th { font-size:12px; color:#4a5866; background:#f6f8fa; position:sticky; top:52px; }
table.grid tr:hover td { background:#f8fbfd; } table.grid td input { padding:4px 6px; }
tr.cancel td { opacity:.5; text-decoration:line-through; }
.b { display:inline-block; font-size:11px; padding:1px 7px; border-radius:9px; font-weight:600; margin:1px 2px; text-decoration:none; }
.b.green { background:#e3f4e9; color:var(--green); } .b.amber { background:#fff1dc; color:var(--amber); } .b.red { background:#fde7e5; color:var(--red); }
.b.grey { background:#eceff3; color:#56626f; } .b.pink { background:#fbe6f1; color:var(--pink); }
.login { min-height:100vh; display:grid; place-items:center; } .login .card { width:360px; } .login h1 { margin:0 0 4px; color:var(--pri); }
.login label { margin:10px 0; } .login .btn { margin-top:8px; }
.pstrip { display:flex; gap:18px; align-items:center; flex-wrap:wrap; } .pstrip .big { font-size:17px; }
.tabs { display:flex; gap:4px; margin-bottom:-1px; } .tabs a { padding:8px 14px; border:1px solid transparent; border-bottom:none; border-radius:8px 8px 0 0; cursor:pointer; text-decoration:none; }
.tabs a.on { background:#fff; border-color:var(--line); font-weight:600; }
.rgrid { display:grid; grid-template-columns: minmax(0,1fr) 330px; gap:14px; align-items:start; }
.rgrid.tl { grid-template-columns: 280px minmax(0,1fr); }
.rgrid > .card:first-child { border-top-left-radius:0; }
.editor { min-height:380px; border:1px solid #c7d0da; border-radius:6px; padding:12px 14px; background:#fff; margin:6px 0 10px; font-size:14.5px; overflow:auto; }
.editor p { margin:0 0 6px; }
.tool { display:flex; gap:4px; align-items:center; margin-top:8px; flex-wrap:wrap; } .tool button { padding:3px 9px; border:1px solid #c7d0da; background:#fff; border-radius:5px; cursor:pointer; }
table.rt { border-collapse:collapse; width:100%; margin:4px 0 8px; } table.rt td, table.rt th { border:1px solid #cfd6de; padding:4px 7px; vertical-align:top; }
table.rt td:first-child { width:28%; } table.rt.ob td:first-child { width:auto; } table.rt th { background:#f2f5f8; }
.form2 { display:grid; grid-template-columns:1fr 1fr; gap:10px 14px; margin-bottom:12px; } .form2 .wide { grid-column:1 / -1; } .form2.tight { gap:6px 10px; }
.obp h3 { margin-top:0; } .obres { display:grid; grid-template-columns:1fr 1fr; gap:4px 10px; margin:8px 0 10px; font-size:13px; }
.obres div { display:flex; justify-content:space-between; border-bottom:1px dotted var(--line); } .obres span { color:var(--muted); }
.ind { margin:8px 0 14px; } .chk { display:flex; gap:7px; align-items:flex-start; padding:3px 0; font-size:13.5px; color:var(--ink); } .chk input { margin-top:3px; }
h3 { margin:6px 0 10px; color:#0f3d5c; font-size:15px; }
.cards { display:grid; grid-template-columns:repeat(auto-fit, minmax(460px,1fr)); gap:14px; align-items:start; }
.tlist { list-style:none; padding:0; margin:10px 0 0; } .tlist li { padding:6px 8px; border-radius:6px; cursor:pointer; } .tlist li.on { background:#e6f0f7; font-weight:600; } .tlist li.off { opacity:.5; }
.reflist { max-height:260px; overflow:auto; font-size:12.5px; } .reflist div { padding:3px 0; border-bottom:1px dotted var(--line); }
.lhprev { max-width:100%; max-height:120px; border:1px solid var(--line); }
#modal { position:fixed; inset:0; background:rgba(15,30,45,.45); display:grid; place-items:center; z-index:20; }
.mbox { background:#fff; border-radius:10px; width:min(720px,95vw); max-height:90vh; overflow:auto; } .mhead { display:flex; justify-content:space-between; padding:10px 14px; border-bottom:1px solid var(--line); } .mbody { padding:14px; }
#toast { position:fixed; bottom:18px; left:50%; transform:translateX(-50%); background:#1d2733; color:#fff; padding:9px 16px; border-radius:8px; opacity:0; transition:opacity .2s; pointer-events:none; z-index:30; }
#toast.show { opacity:1; } #toast.bad { background:var(--red); }
#printArea { display:none; }
@media (max-width:900px) { .rgrid, .rgrid.tl { grid-template-columns:1fr; } .form2 { grid-template-columns:1fr; } .cards { grid-template-columns:1fr; } }

/* ---------- printing (A4) ---------- */
@page { size:A4; margin:10mm 12mm; }
@media print {
  body.printing > *:not(#printArea) { display:none !important; }
  body.printing #printArea { display:block; }
  body { background:#fff; font-size:12.5pt; }
}
.rp { font-family: "Times New Roman", Georgia, serif; color:#000; }
.rp .lh { width:100%; display:block; margin-bottom:4mm; }
.lhtext { text-align:center; border-bottom:2px solid #000; padding-bottom:3mm; margin-bottom:4mm; } .lhtext .n { font-size:20pt; font-weight:700; letter-spacing:.5px; }
.rp-pt { width:100%; table-layout:fixed; border-collapse:collapse; border:1px solid #000; font-size:11pt; } .rp-pt td { padding:3px 6px; border:1px solid #000; }
.rp-title { text-align:center; text-decoration:underline; font-size:14pt; margin:5mm 0 3mm; }
.rp-body table.rt td, .rp-body table.rt th { border:1px solid #444; } .rp-body p { margin:0 0 4px; }
.rp-imp { margin-top:4mm; } .rp-imp div { font-weight:700; margin-top:2px; }
.rp-decl { font-size:10.5pt; margin:4mm 0 0; border-top:1px dashed #777; padding-top:2mm; } .rp-decl.center { border:0; padding:0; margin-top:1mm; }
.rp-sign { display:flex; justify-content:flex-end; align-items:flex-end; gap:20mm; margin-top:14mm; text-align:center; }
.draftmark { font-size:26pt; color:#bbb; border:3px solid #bbb; padding:0 8px; transform:rotate(-12deg); }
.rp-foot { margin-top:6mm; font-size:9pt; text-align:center; color:#333; border-top:1px solid #999; padding-top:2mm; }
/* Form F */
.ff-page { font-family:"Times New Roman", Georgia, serif; color:#000; font-size:9.5pt; line-height:1.18; page-break-after:always; }
.ff-page:last-child { page-break-after:auto; }
.ff-title { text-align:center; font-size:15pt; font-weight:700; } .ff-sub { text-align:center; font-size:9.5pt; margin:1px 0; }
.ff-meta { text-align:right; margin:2mm 0; }
.ff-sec { font-weight:700; margin:2mm 0 1mm; border-bottom:1px solid #000; }
table.ff { width:100%; border-collapse:collapse; } table.ff td { vertical-align:top; padding:1px 4px; border-bottom:1px dotted #999; }
table.ff td:first-child { width:7mm; } table.ff td:nth-child(2) { width:52%; }
.ff-val { font-weight:700; text-transform:uppercase; }
.ff-ind { list-style:none; padding:0; margin:2px 0; columns:2; column-gap:5mm; font-size:8.3pt; line-height:1.18; } .ff-ind li { margin:0 0 1px; break-inside:avoid; }
.ff-ind .tick { display:inline-block; width:3.8mm; height:3.8mm; border:1px solid #000; text-align:center; line-height:3.5mm; font-size:8pt; margin-right:2px; }
.ff-sign { display:flex; justify-content:space-between; margin-top:3mm; font-size:9pt; gap:10mm; } .ff-sign span { text-align:right; max-width:60%; }
.ff-decl { border:1px solid #000; padding:4mm; margin:4mm 0; line-height:1.7; }
.ff-sign2 { display:flex; justify-content:space-between; gap:10mm; margin-top:12mm; } .ff-sign2 span:last-child { text-align:right; max-width:60%; }
.ff-small { font-size:9.5pt; margin-top:4mm; }
