:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e6ebf0;
  --primary: #0e7490;
  --primary-700: #155e75;
  --primary-soft: #e6f7fb;
  --accent: #10b981;
  --amber: #f59e0b;
  --red: #ef4444;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-size: 20px; font-weight: 700;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15px; }
.brand-text small { color: var(--muted); font-size: 11px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color .15s; }
.nav-links a:hover { color: var(--primary); }
.updated-pill {
  font-size: 12px; color: var(--primary-700);
  background: var(--primary-soft); border: 1px solid #cdeef6;
  padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}
.lang-toggle {
  font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--primary); background: #fff;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 14px; margin-left: 8px; white-space: nowrap;
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.lang-toggle:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-1px); }

/* Hero */
.hero { background: radial-gradient(1200px 400px at 70% -10%, #e6f7fb 0%, transparent 60%), var(--bg); padding: 72px 0 56px; }
.hero-inner { max-width: 760px; }
.eyebrow { color: var(--primary); font-weight: 600; letter-spacing: .12em; font-size: 13px; margin: 0 0 14px; text-transform: uppercase; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.15; margin: 0 0 18px; letter-spacing: -.01em; }
.lede { font-size: 17px; color: var(--muted); margin: 0 0 28px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 10px; font-size: 15px; font-weight: 600; text-decoration: none; transition: transform .12s, box-shadow .15s; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--primary-700); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--primary); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--primary); }

/* Stats */
.stats { margin-top: -28px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.stat-num { font-size: 30px; font-weight: 700; color: var(--primary-700); letter-spacing: -.02em; }
.stat-label { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* Panel */
.panel { padding: 56px 0; }
.panel-head h2 { font-size: 24px; margin: 0 0 6px; }
.panel-head p { margin: 0 0 22px; }
.controls { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.search-box { flex: 1 1 280px; }
.search-box input, .controls select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); font-size: 14px; color: var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.controls select { flex: 1 1 160px; }
.search-box input:focus, .controls select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* Table */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table thead th {
  text-align: left; padding: 14px 16px; background: #f8fafc; color: var(--muted);
  font-weight: 600; font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  border-bottom: 1px solid var(--line); position: sticky; top: 64px;
}
.data-table th.num, .data-table td.num { text-align: right; }
.data-table tbody tr { border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background .12s; }
.data-table tbody tr:hover { background: var(--primary-soft); }
.data-table td { padding: 14px 16px; vertical-align: middle; }
.flag { font-size: 16px; margin-right: 6px; }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag-awarded { background: #e9f9f0; color: #047857; }
.tag-tendering { background: #fef3e2; color: #b45309; }
.tag-cancelled { background: #fdecec; color: #b91c1c; }
.trans-bar { height: 6px; width: 90px; background: #eef2f6; border-radius: 999px; overflow: hidden; display: inline-block; vertical-align: middle; }
.trans-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--primary)); }
.trans-val { font-size: 12px; color: var(--muted); margin-left: 8px; }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 22px; }
.pagination button { min-width: 36px; height: 36px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; cursor: pointer; font-size: 14px; color: var(--ink); }
.pagination button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { opacity: .4; cursor: default; }

/* About */
.about { padding: 56px 0; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.about h2 { font-size: 24px; margin: 0 0 12px; }
.about p { color: var(--muted); }
.about-list { list-style: none; padding: 0; margin: 18px 0 0; }
.about-list li { padding: 10px 0; border-top: 1px solid var(--line); display: flex; gap: 12px; }
.about-list li span { color: var(--primary); font-weight: 700; min-width: 36px; }
.about-card { background: linear-gradient(135deg, var(--primary), var(--primary-700)); color: #fff; border-radius: 18px; padding: 36px; text-align: center; box-shadow: var(--shadow); }
.about-card-num { font-size: 46px; font-weight: 800; }
.about-card-label { opacity: .9; margin-top: 6px; }

/* Sources */
.sources { padding: 56px 0; }
.sources h2 { font-size: 24px; margin: 0 0 6px; }
.source-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 24px 0; }
.source-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.source-card h3 { margin: 0 0 8px; font-size: 16px; color: var(--primary-700); }
.source-card p { margin: 0; color: var(--muted); font-size: 13px; }
.disclaimer { font-size: 13px; color: var(--muted); background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 14px 16px; }

/* Footer */
.site-footer { background: #0f172a; color: #cbd5e1; padding: 26px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.footer-inner .muted { color: #94a3b8; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); }
.modal-card { position: relative; background: var(--surface); border-radius: 16px; width: min(560px, 92vw); max-height: 86vh; overflow: auto; padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-close { position: absolute; top: 14px; right: 16px; border: none; background: none; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; }
.modal-card h3 { margin: 0 0 4px; font-size: 19px; }
.modal-meta { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.detail-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.detail-row .k { color: var(--muted); }
.detail-row .v { font-weight: 600; text-align: right; }

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .source-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .data-table thead th:nth-child(3), .data-table td:nth-child(3),
  .data-table thead th:nth-child(7), .data-table td:nth-child(7) { display: none; }
}
@media (max-width: 600px) {
  .stats-grid, .source-grid { grid-template-columns: 1fr; }
}
