:root {
  --bg: #f4f6f9; --card: #ffffff; --ink: #1d2733; --muted: #66727f; --line: #dde3ea;
  --brand: #12477a; --brand-2: #1d6fb8; --ok: #1f8a4c; --warn: #b26a00; --err: #c0392b;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Malgun Gothic", "맑은 고딕", system-ui, sans-serif; background: var(--bg); color: var(--ink); font-size: 14px; }
a { color: var(--brand-2); }
button, .btn { font: inherit; border: 1px solid var(--brand); background: var(--brand); color: #fff; padding: 8px 14px;
  border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
button:hover, .btn:hover { background: var(--brand-2); border-color: var(--brand-2); }
button:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost, button.ghost { background: #fff; color: var(--brand); }
.btn.ghost:hover, button.ghost:hover { background: #eef4fb; }
button.small, .btn.small { padding: 4px 9px; font-size: 12.5px; }
button.danger { background: #fff; color: var(--err); border-color: var(--err); }
input, select { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
input:focus, select:focus { outline: 2px solid #b8d4f0; border-color: var(--brand-2); }

header.top { background: var(--brand); color: #fff; padding: 0 24px; height: 56px; display: flex; align-items: center; gap: 18px; }
header.top .logo { font-weight: 700; font-size: 17px; letter-spacing: .5px; }
header.top .logo small { font-weight: 400; opacity: .8; margin-left: 8px; font-size: 13px; }
header.top .sp { flex: 1; }
header.top .who { opacity: .9; }
header.top a, header.top button { color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.45); padding: 5px 11px; border-radius: 7px; text-decoration: none; font-size: 13px; }
header.top a:hover, header.top button:hover { background: rgba(255,255,255,.12); }

main { max-width: 1320px; margin: 22px auto 60px; padding: 0 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.card h2 { margin: 0 0 4px; font-size: 16px; display: flex; align-items: center; gap: 10px; }
.card h2 .no { background: var(--brand); color: #fff; border-radius: 999px; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.card .desc { color: var(--muted); margin: 0 0 14px; }
.card.disabled { opacity: .55; pointer-events: none; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.drop { border: 2px dashed #a9bdd3; border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); background: #f9fbfd; cursor: pointer; flex: 1; min-width: 320px; }
.drop.over { border-color: var(--brand-2); background: #eef5fc; color: var(--brand); }
.drop b { color: var(--ink); }

.prices { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 14px; }
.prices label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.prices input { text-align: right; }
.prices .grp { grid-column: 1 / -1; font-weight: 600; color: var(--ink); margin-top: 4px; font-size: 13px; }
td input.ov { width: 82px; padding: 4px 6px; text-align: right; font-size: 12.5px; }
td input.ov.on { background: #fce4d6; border-color: #e0a070; }
.chips { display: flex; gap: 8px; margin: 6px 0 12px; flex-wrap: wrap; }
.chip { padding: 4px 10px; border-radius: 999px; background: #eef2f6; font-size: 12.5px; }
.chip.ok { background: #e3f4ea; color: var(--ok); } .chip.warn { background: #fff2dc; color: var(--warn); } .chip.err { background: #fbe4e1; color: var(--err); }

.tbl-wrap { overflow: auto; max-height: 460px; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { border-bottom: 1px solid var(--line); padding: 7px 9px; text-align: left; white-space: nowrap; vertical-align: top; }
th { background: #f1f4f8; position: sticky; top: 0; z-index: 1; font-weight: 600; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.err td { background: #fdf1ef; } tr.warn td { background: #fffaf0; }
td.msg { white-space: normal; min-width: 260px; }
.msg .e { color: var(--err); } .msg .w { color: var(--warn); } .msg .o { color: var(--ok); }

.results { display: grid; grid-template-columns: 330px 1fr; gap: 16px; }
.plist { border: 1px solid var(--line); border-radius: 8px; max-height: 640px; overflow: auto; }
.plist .it { padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.plist .it:hover { background: #f5f9fd; }
.plist .it.on { background: #e8f1fb; border-left: 3px solid var(--brand-2); }
.plist .it .n { font-weight: 600; } .plist .it .s { color: var(--muted); font-size: 12px; margin-top: 2px; }
.plist .it .dl { margin-top: 6px; display: flex; gap: 6px; }
.viewer { border: 1px solid var(--line); border-radius: 8px; background: #fff; min-height: 560px; display: flex; flex-direction: column; }
.viewer .bar { padding: 8px 12px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.viewer .bar .t { flex: 1; font-weight: 600; }
.viewer .stage { flex: 1; overflow: auto; display: flex; align-items: flex-start; justify-content: center; background: #f7f8fa; padding: 10px; }
.viewer .stage img { max-width: 100%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.viewer .stage img.zoom { max-width: none; width: 200%; }
.viewer iframe { width: 100%; height: 640px; border: 0; }

.notice { padding: 10px 12px; border-radius: 8px; background: #eef4fb; color: var(--brand); margin: 10px 0; }
.notice.err { background: #fbe4e1; color: var(--err); }
.muted { color: var(--muted); }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid #fff; border-right-color: transparent; border-radius: 50%; animation: s .8s linear infinite; }
@keyframes s { to { transform: rotate(360deg); } }

/* 로그인 */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0e3a64, #1d6fb8); }
.auth { background: #fff; width: 380px; border-radius: 14px; padding: 32px 30px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.auth h1 { margin: 0 0 4px; font-size: 21px; color: var(--brand); }
.auth p.sub { margin: 0 0 22px; color: var(--muted); }
.auth label { display: block; margin: 12px 0 5px; font-weight: 600; font-size: 13px; }
.auth input { width: 100%; }
.auth button { width: 100%; justify-content: center; margin-top: 20px; padding: 10px; }
.auth .foot { margin-top: 18px; font-size: 12px; color: var(--muted); text-align: center; }
.jobs { font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.jobs a { cursor: pointer; }
