:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --line:#d9e0ea;
  --text:#1f2937;
  --muted:#6b7280;
  --blue:#2563eb;
  --green:#16a34a;
  --red:#dc2626;
  --orange:#ea580c;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:Arial, "Malgun Gothic", "맑은 고딕", sans-serif;
  background:var(--bg);
  color:var(--text);
}
.wrap{
  max-width:1600px;
  margin:24px auto;
  padding:0 16px 40px;
}
h1{
  font-size:28px;
  margin:0 0 8px;
}
.sub{
  color:var(--muted);
  margin-bottom:20px;
  font-size:14px;
}
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:8px;
  padding:18px;
  box-shadow:0 2px 8px rgba(0,0,0,0.03);
  margin-bottom:16px;
}
.grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(220px, 1fr));
  gap:12px;
}
.field label{
  display:block;
  font-size:13px;
  font-weight:700;
  margin-bottom:6px;
}
.field input[type="text"],
.field input[type="file"]{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  font-size:14px;
}
.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}
button{
  border:0;
  border-radius:8px;
  padding:11px 16px;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
}
.btn-primary{background:var(--blue); color:#fff;}
.btn-secondary{background:#111827; color:#fff;}
.btn-light{background:#eef2ff; color:#1e3a8a;}
.btn-green{background:var(--green); color:#fff;}
.hidden{display:none;}
.kpi-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(180px, 1fr));
  gap:12px;
}
.kpi{
  border:1px solid var(--line);
  border-radius:8px;
  padding:14px;
  background:#fff;
}
.kpi .label{
  font-size:12px;
  color:var(--muted);
  margin-bottom:8px;
}
.kpi .value{
  font-size:24px;
  font-weight:800;
  margin-bottom:4px;
}
.kpi .delta{
  font-size:13px;
  font-weight:700;
}
.up{color:var(--red);}
.down{color:var(--green);}
.same{color:var(--muted);}
.section-title{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
  gap:10px;
  flex-wrap:wrap;
}
.section-title h2{
  font-size:20px;
  margin:0;
}
.toolbar{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
.toolbar select{
  padding:9px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  font-size:14px;
}
.table-wrap{
  overflow:auto;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
}
table{
  border-collapse:collapse;
  width:100%;
  min-width:1100px;
  font-size:13px;
}
th, td{
  border-bottom:1px solid #edf1f5;
  padding:9px 10px;
  text-align:left;
  vertical-align:middle;
  white-space:nowrap;
}
th{
  background:#f8fafc;
  font-weight:800;
  position:sticky;
  top:0;
  z-index:1;
}
.status-pill{
  display:inline-block;
  padding:4px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
}
.status-added{background:#dcfce7; color:#166534;}
.status-removed{background:#fee2e2; color:#991b1b;}
.status-changed{background:#ffedd5; color:#9a3412;}
.status-same{background:#e5e7eb; color:#374151;}
.note{
  font-size:13px;
  color:var(--muted);
  margin-top:8px;
}
.summary-table td.num,
.detail-table td.num{
  text-align:right;
  font-variant-numeric:tabular-nums;
}
.badge{
  display:inline-block;
  padding:3px 8px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:12px;
  font-weight:700;
}
.analysis-box{
  white-space:pre-wrap;
  line-height:1.6;
  background:#f8fafc;
  border:1px solid var(--line);
  border-radius:8px;
  padding:14px;
  font-size:14px;
}
@media (max-width:1200px){
  .grid,.kpi-grid{grid-template-columns:repeat(2, minmax(220px,1fr));}
}
@media (max-width:700px){
  .grid,.kpi-grid{grid-template-columns:1fr;}
}
