:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #d7dce5;
  --primary: #244a7f;
  --primary-dark: #18345c;
  --soft: #edf3fb;
  --warn: #9f2f2f;
  --warn-bg: #fff2f2;
  --ok: #1f7a4c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
.site-header {
  background: linear-gradient(135deg, #1d355d, #325f9f);
  color: #fff;
  padding: 42px 24px;
}
.site-header > div, .container { max-width: 1180px; margin: 0 auto; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); letter-spacing: -0.04em; }
h2 { margin: 0 0 18px; font-size: 20px; }
.lead { max-width: 780px; line-height: 1.6; opacity: 0.92; }
.eyebrow { margin: 0 0 10px; text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; opacity: 0.76; }
.container { padding: 24px; }
.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff8e5;
  border: 1px solid #efd58b;
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 18px;
  line-height: 1.5;
}
.notice strong { flex: 0 0 auto; color: #6b4e00; }
.grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.06);
}
.file-box {
  display: block;
  border: 1px dashed #9ca3af;
  background: #fafbff;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  cursor: pointer;
}
.file-title { display: block; font-weight: 700; margin-bottom: 4px; }
.file-desc { display: block; color: var(--muted); font-size: 14px; margin-bottom: 10px; }
input[type="file"] { width: 100%; }
button {
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
}
button:disabled { opacity: 0.45; cursor: not-allowed; }
.primary { background: var(--primary); color: #fff; width: 100%; margin-top: 4px; }
.primary:hover:not(:disabled) { background: var(--primary-dark); }
.secondary { background: var(--primary); color: #fff; }
.tertiary { background: var(--soft); color: var(--primary); }
.status { color: var(--muted); line-height: 1.5; margin-bottom: 0; }
.compact-list { padding-left: 20px; line-height: 1.7; color: #374151; }
.guide-state {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--soft);
  border-radius: 10px;
  color: var(--primary);
  font-weight: 700;
}
.summary { margin-top: 18px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.kpis div { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 14px; padding: 18px; }
.kpis span { display: block; font-size: 28px; font-weight: 800; color: var(--primary); }
.kpis small { color: var(--muted); }
.actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.table-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 12px; }
.table-heading h2 { margin: 0; }
#filterInput { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 280px; }
#tableCard { margin-top: 18px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 1100px; }
th, td { padding: 10px 12px; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
th { position: sticky; top: 0; background: #f3f6fb; text-align: left; z-index: 1; }
tbody tr:hover { background: #fafcff; }
.badge { display: inline-block; border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 700; }
.badge.warn { color: var(--warn); background: var(--warn-bg); }
.badge.check { color: #7c4a03; background: #fff7df; }
.badge.adjust { color: #3f3f46; background: #f4f4f5; }
.amount { text-align: right; white-space: nowrap; }
footer { max-width: 1180px; margin: 0 auto; padding: 0 24px 36px; color: var(--muted); font-size: 13px; }
@media (max-width: 820px) {
  .grid.two, .kpis { grid-template-columns: 1fr; }
  .notice { display: block; }
  .table-heading { flex-direction: column; align-items: stretch; }
  #filterInput { min-width: 0; width: 100%; }
}
.view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.tab {
  background: #f8fafc;
  border: 1px solid var(--line);
  color: #374151;
  padding: 9px 12px;
}
.tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.tab-count {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.08);
  font-size: 12px;
}
.tab.active .tab-count {
  background: rgba(255, 255, 255, 0.2);
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 24px !important;
}
