:root { --ink: #1f2933; --muted: #66727f; --line: #d9dfe5; --bg: #f4f6f8; --brand: #1f5f8b; --warn: #a15c00; --bad: #b3261e; --good: #1b7a43; }
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.4 "Segoe UI", system-ui, sans-serif; color: var(--ink); background: var(--bg); }
h1 { font-size: 20px; margin: 0; } h2 { font-size: 16px; margin: 0 0 10px; } h3 { font-size: 14px; margin: 16px 0 6px; }
a { color: var(--brand); cursor: pointer; }
button, .btn { font: inherit; padding: 5px 11px; border: 1px solid var(--line); background: #fff; border-radius: 4px; cursor: pointer; color: var(--ink); text-decoration: none; display: inline-block; }
button:hover, .btn:hover { border-color: var(--brand); }
button.primary, .btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
button.small { padding: 1px 6px; font-size: 12px; }
button:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; padding: 4px 6px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); width: 100%; }
input:disabled, select:disabled, textarea:disabled { background: #f0f2f4; }
textarea { min-height: 90px; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
header { background: #fff; border-bottom: 1px solid var(--line); padding: 10px 18px; display: flex; gap: 18px; align-items: center; }
header .grow { flex: 1; }
main { padding: 16px 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 14px; margin-bottom: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 14px; }
.tabs { display: flex; gap: 2px; margin: 12px 0; border-bottom: 1px solid var(--line); }
.tabs a { padding: 6px 13px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--brand); border-color: var(--brand); font-weight: 600; }
table { border-collapse: collapse; width: 100%; background: #fff; }
th { text-align: left; font-size: 12px; color: var(--muted); border-bottom: 2px solid var(--line); padding: 5px 6px; white-space: nowrap; }
td { border-bottom: 1px solid var(--line); padding: 3px 5px; vertical-align: top; }
td.num, th.num { text-align: right; white-space: nowrap; }
td input, td select { border-color: transparent; background: transparent; padding: 3px 4px; }
td input:hover, td input:focus, td select:hover { border-color: var(--line); background: #fff; }
tr.sec td { background: #eef3f7; font-weight: 600; }
tr.note td { color: var(--muted); font-style: italic; }
tr.nq td { background: #fff7e8; }
tr.inc td { background: #f1f6f1; }
.editor { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; align-items: start; }
.tree a { display: block; padding: 3px 6px; border-radius: 3px; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree a.on { background: #dcebf5; font-weight: 600; }
.tree small { color: var(--muted); float: right; margin-left: 6px; }
.scroll { overflow-x: auto; }
.total { font-size: 18px; font-weight: 600; }
.muted { color: var(--muted); font-size: 12px; }
.err { color: var(--bad); font-size: 12px; }
.warn { color: var(--warn); }
.good { color: var(--good); }
.banner { padding: 8px 12px; border-radius: 4px; margin-bottom: 10px; background: #fff7e8; border: 1px solid #f0d9a8; }
.banner.bad { background: #fdecea; border-color: #f2c1bc; color: var(--bad); }
.login { max-width: 320px; margin: 90px auto; }
.warnlist { max-height: 260px; overflow: auto; font-size: 12px; padding-left: 18px; }
.w-name { min-width: 300px; } .w-spec { min-width: 180px; }
.w-code { width: 62px; } .w-unit { width: 70px; } .w-vol { width: 120px; } .w-price { width: 125px; } .w-act { width: 96px; white-space: nowrap; }

.report { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 14px; align-items: start; }
.report .preview iframe { width: 100%; height: 80vh; border: 1px solid #ccc; background: #fff; }
@media (max-width: 800px) { .report { grid-template-columns: 1fr; } .report .preview iframe { height: 70vh; } }
.imgbox { height: 90px; display: flex; align-items: center; margin: 6px 0; }
.imgbox img { max-height: 90px; max-width: 220px; border: 1px solid #ddd; background: #fff; }
