:root {
  --navy:#1a3c6e; --navy-d:#122b50; --bg:#f4f6fa; --line:#dde3ec;
  --good:#0a7a2f; --mid:#c77700; --bad:#c0392b;
}
* { box-sizing:border-box; }
body { margin:0; font-family:'Apple SD Gothic Neo','Malgun Gothic','Noto Sans KR',sans-serif;
       background:var(--bg); color:#222; font-size:14px; }
a { color:var(--navy); text-decoration:none; }

.topnav { background:var(--navy); color:#fff; display:flex; justify-content:space-between;
          align-items:center; padding:0 24px; height:54px; }
.topnav .brand { font-weight:700; font-size:16px; }
.topnav .region { background:#2e5aa8; font-size:11px; padding:2px 8px; border-radius:10px; margin-left:6px; }
.topnav .menu a { color:#cdd8ea; margin-left:18px; font-size:13.5px; }
.topnav .menu a.on, .topnav .menu a:hover { color:#fff; font-weight:600; }
.topnav .logout { opacity:.8; }

.container { max-width:1200px; margin:24px auto; padding:0 20px; }
h1 { font-size:21px; margin:6px 0 16px; }
h1 .date, .date { font-size:13px; color:#777; font-weight:400; }
h3 { margin:4px 0 10px; font-size:15px; color:var(--navy); }

.card { background:#fff; border:1px solid var(--line); border-radius:10px;
        padding:16px 18px; margin-bottom:16px; }
.table-wrap { overflow-x:auto; padding:10px 12px; }
table { width:100%; border-collapse:collapse; }
th, td { padding:8px 10px; border-bottom:1px solid #eef1f6; text-align:left; font-size:13px; }
thead th { background:#f2f5fa; color:#445; font-weight:600; white-space:nowrap; }
tr.clickable { cursor:pointer; }
tr.clickable:hover { background:#f7faff; }
.num { text-align:right; white-space:nowrap; }
.addr { max-width:340px; }
.rank { font-weight:700; color:var(--navy); }
.good { color:var(--good); font-weight:600; }
.bad { color:var(--bad); font-weight:600; }
.warn-text { color:var(--mid); font-weight:600; }
.roi.good { font-weight:700; }

.badge { display:inline-block; padding:2px 9px; border-radius:10px; font-size:11.5px; font-weight:700; color:#fff; }
.badge-low { background:var(--good); } .badge-mid { background:var(--mid); }
.badge-high { background:var(--bad); } .badge-na { background:#999; }
.conf { font-size:10.5px; padding:1px 5px; border-radius:6px; margin-left:4px; color:#fff; }
.conf-A { background:#2e7d32; } .conf-B { background:#e6a100; } .conf-C { background:#999; }

.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:800px){ .grid-2 { grid-template-columns:1fr; } }
.card-head { display:flex; justify-content:space-between; margin-bottom:6px; }
.risk-summary { color:#444; line-height:1.6; }
.tiny { font-size:11.5px; color:#999; }
.empty { color:#999; text-align:center; padding:24px; }

.kv th { width:130px; background:#f7f9fc; font-weight:600; }
.kv.small th, .kv.small td { padding:4px 8px; font-size:12px; }
.rawdoc { max-height:400px; overflow:auto; background:#f8f9fb; padding:12px;
          font-size:11.5px; white-space:pre-wrap; border-radius:6px; }
details summary { cursor:pointer; color:var(--navy); font-weight:600; padding:6px 0; }

.filter { display:flex; gap:10px; flex-wrap:wrap; }
.filter input[type=text] { flex:1; min-width:220px; }
input, select, button { padding:9px 12px; border:1px solid var(--line); border-radius:8px;
                        font-size:13.5px; font-family:inherit; }
button { background:var(--navy); color:#fff; border:none; cursor:pointer; font-weight:600; }
button:hover { background:var(--navy-d); }
.btn { background:var(--navy); color:#fff; padding:5px 12px; border-radius:6px; font-size:12px; }

.alert { background:#fdecea; border:1px solid #f5c6c3; color:#a33; padding:10px 14px;
         border-radius:8px; margin-bottom:14px; }
.alert.warn { background:#fff8e5; border-color:#eeda9a; color:#8a6400; }

.stats { display:flex; gap:14px; margin-bottom:16px; }
.stat { flex:1; background:#fff; border:1px solid var(--line); border-radius:10px;
        padding:16px; text-align:center; }
.stat b { display:block; font-size:24px; color:var(--navy); }
.stat span { font-size:12px; color:#888; }

.paging { text-align:center; margin:14px 0; }
.paging a { display:inline-block; padding:6px 11px; border:1px solid var(--line);
            border-radius:6px; margin:0 2px; background:#fff; }
.paging a.on { background:var(--navy); color:#fff; }

.footer { text-align:center; color:#999; font-size:11.5px; padding:20px; }

.login-body { display:flex; align-items:center; justify-content:center; min-height:100vh; }
.login-box { background:#fff; border:1px solid var(--line); border-radius:14px;
             padding:36px 40px; width:360px; text-align:center; }
.login-box h1 { font-size:20px; }
.login-box .sub { color:#888; font-size:12.5px; margin-bottom:20px; }
.login-box input { width:100%; margin-bottom:10px; }
.login-box button { width:100%; }
