:root {
	--ink: #1d2733;
	--muted: #5c6b7a;
	--line: #dde3ea;
	--bg: #f4f6f9;
	--card: #ffffff;
	--accent: #0b5cad;
	--warn-bg: #fff6e0;
	--warn-line: #e3a008;
	--err-bg: #fdecec;
	--err-line: #c62828;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.45; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
header { background: var(--accent); color: #fff; padding: 22px 0 18px; }
header h1 { margin: 2px 0 4px; font-size: 26px; font-weight: 600; }
.brand { font-size: 13px; letter-spacing: .04em; opacity: .85; }
.sub { margin: 0; opacity: .9; font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; margin: 18px 0; }
h2 { font-size: 19px; margin: 0 0 12px; color: var(--accent); }
h3 { font-size: 15px; margin: 16px 0 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 18px; }
label { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); gap: 4px; }
input, select { font-size: 15px; padding: 7px 9px; border: 1px solid #b9c4cf; border-radius: 5px; color: var(--ink); background: #fff; width: 100%; }
.pair { display: flex; gap: 6px; }
.unitBox { display: flex; align-items: center; white-space: nowrap; padding: 7px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); color: var(--ink); font-size: 15px; }
.actions { margin-top: 16px; }
button { background: var(--accent); color: #fff; border: 0; border-radius: 5px; padding: 9px 20px; font-size: 15px; cursor: pointer; }
button:hover { background: #094a8c; }
.hint { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.resHead { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.resHead h2 { margin: 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 24px; }
.group { border-top: 1px solid var(--line); margin-top: 10px; }
table.res { width: 100%; border-collapse: collapse; }
table.res td { padding: 5px 6px; border-bottom: 1px solid #eef1f4; vertical-align: top; }
table.res td:first-child { color: var(--muted); width: 46%; }
table.res td:last-child { font-weight: 600; }
.msg { padding: 8px 12px; border-radius: 5px; margin: 8px 0; font-size: 14px; border-left: 4px solid; }
.msg.warning { background: var(--warn-bg); border-color: var(--warn-line); }
.msg.error { background: var(--err-bg); border-color: var(--err-line); }
.foot { font-size: 12px; color: var(--muted); margin: 8px 0 30px; }
.printOnly { display: none; }
.printOnlyInline { display: none; }
.preparedFor { margin: 6px 0 0; font-size: 15px; color: var(--ink); }
.foot.copy { margin-top: -22px; }
.user { margin: 6px 0 0; font-size: 13px; opacity: .9; }
.logout { color: #fff; margin-left: 10px; }
.btn { display: inline-block; background: var(--accent); color: #fff; border-radius: 5px; padding: 9px 18px; font-size: 15px; text-decoration: none; }
.btn:hover { background: #094a8c; }
.btn.light, button.light { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
.btnRow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.login { max-width: 440px; }
.login label { margin-top: 10px; }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
label.check input { width: auto; }
.cc { padding: 7px 9px; border: 1px solid #b9c4cf; border-radius: 5px; background: var(--bg); color: var(--ink); font-size: 15px; }
.linkRow { margin-top: 12px; display: flex; gap: 18px; }
button.link { background: none; color: var(--accent); padding: 0; font-size: 14px; text-decoration: underline; }
button.link:hover { background: none; }
.msg.ok { background: #e8f5e9; border-color: #2e7d32; }
.msg.hint { background: var(--bg); border-color: var(--line); }
.headRow { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.logoBox img { display: block; height: 58px; width: auto; }
.logoText { margin-top: 6px; font-style: italic; font-weight: 600; font-size: 12.5px; line-height: 1.4; color: #fff; white-space: nowrap; }
.logoPrint { display: none !important; }
.wm { position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(6, 1fr); align-items: center; justify-items: center; pointer-events: none; z-index: 1000; }
.wm img { width: 55%; max-width: 420px; opacity: .05; transform: rotate(-20deg); }
@media (max-width: 600px) {
	.logoBox img { height: 34px; }
	.logoText { font-size: 9.5px; white-space: normal; max-width: 170px; }
	table.res td:first-child { width: 50%; }
	header h1 { font-size: 21px; }
}
@media print {
	body { background: #fff; font-size: 11pt; }
	.noprint { display: none !important; }
	.printOnly { display: block; font-size: 10pt; color: #555; }
	.printOnlyInline { display: inline; }
	.preparedFor { font-size: 10.5pt; }
	header { background: #fff; color: #000; padding: 0 0 6px; border-bottom: 2px solid #000; }
	.card { border: 0; padding: 0; margin: 10px 0; }
	.group { break-inside: avoid; }
	.wm img { width: 70%; max-width: none; opacity: .07; }
	.logoScreen { display: none !important; }
	.logoPrint { display: block !important; height: 44px !important; }
	.logoText { color: #1d2733; font-size: 8.5pt; }
	.user { display: none; }
	h2 { color: #000; }
}
.login { max-width: 380px; margin: 40px auto; }
.logout { color: #fff; margin-left: 12px; font-size: 13px; }
.sketchBox { margin: 8px 0 12px; text-align: center; }
.sketch { width: 100%; max-width: 680px; height: auto; background: #fff; }
@media print { .sketchBox { break-inside: avoid; } }
.sketchBox { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 700px) { .sketchBox { grid-template-columns: 1fr; } }
table.cmp th { text-align: left; padding: 6px; border-bottom: 2px solid var(--line); font-size: 14px; }
table.cmp td:first-child { width: 30%; }
table.cmp td { width: 35%; }
table.cmp td:last-child { font-weight: normal; }
table.cmp td:not(:first-child) { font-weight: 600; }
