*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f8f7f4;
  --surface: #ffffff;
  --border: #e2e0db;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #2d6a4f;
  --accent-light: #e8f5ef;
  --danger: #c0392b;
  --warn: #d4850a;
  --ok: #2d6a4f;
  --radius: 6px;
  --font: "Inter", system-ui, sans-serif;
}

body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nav */
nav { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 2rem; display: flex; align-items: center; gap: 2rem; height: 52px; }
nav .logo { font-weight: 600; color: var(--accent); letter-spacing: -.5px; }
nav a { color: var(--muted); font-size: .9rem; }
nav a:hover, nav a.active { color: var(--accent); text-decoration: none; }

/* Container */
.container { max-width: 960px; margin: 0 auto; padding: 2rem 1.5rem; }

/* Hero (лендинг) */
.hero { padding: 5rem 0 3rem; }
.hero h1 { font-size: 2.2rem; font-weight: 700; line-height: 1.2; color: var(--text); max-width: 600px; }
.hero p { margin-top: 1rem; color: var(--muted); max-width: 540px; font-size: 1.05rem; }
.hero .cta { margin-top: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.btn { display: inline-block; padding: .55rem 1.2rem; border-radius: var(--radius); font-size: .9rem; font-weight: 500; cursor: pointer; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #235c42; text-decoration: none; }
.btn-outline { border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Stats strip */
.stats-strip { display: flex; gap: 2rem; margin: 3rem 0; flex-wrap: wrap; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.5rem; min-width: 140px; }
.stat-card .value { font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-card .label { font-size: .82rem; color: var(--muted); margin-top: .2rem; }

/* Sources list (лендинг) */
.sources-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.source-chip { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1rem; font-size: .88rem; }
.source-chip .scope { font-size: .75rem; color: var(--muted); margin-top: .2rem; }

/* Section heading */
h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }
h3 { font-size: 1rem; font-weight: 600; margin-bottom: .75rem; color: var(--muted); }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; padding: .6rem .8rem; border-bottom: 2px solid var(--border); font-weight: 600; color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
td { padding: .55rem .8rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--accent-light); }

/* Badges */
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 99px; font-size: .75rem; font-weight: 600; }
.badge-ok { background: #d4edda; color: var(--ok); }
.badge-warn { background: #fef3cd; color: var(--warn); }
.badge-danger { background: #fde8e6; color: var(--danger); }
.badge-muted { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }

/* Status dot */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot-ok { background: var(--ok); }
.dot-warn { background: var(--warn); }
.dot-danger { background: var(--danger); }
.dot-muted { background: #bbb; }

/* Filters */
.filters { display: flex; gap: .75rem; margin-bottom: 1.25rem; flex-wrap: wrap; align-items: center; }
.filter-btn { padding: .35rem .85rem; border: 1px solid var(--border); border-radius: 99px; font-size: .83rem; cursor: pointer; background: var(--surface); color: var(--muted); }
.filter-btn.active, .filter-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Summary bar */
.summary { font-size: .88rem; color: var(--muted); margin-bottom: 1rem; }
.summary strong { color: var(--text); }

/* Charts (простые bar-bars через CSS) */
.bar-list { display: flex; flex-direction: column; gap: .5rem; }
.bar-row { display: flex; align-items: center; gap: .75rem; font-size: .88rem; }
.bar-label { min-width: 200px; color: var(--text); }
.bar-track { flex: 1; background: var(--bg); border-radius: 3px; height: 14px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s; }
.bar-count { min-width: 48px; text-align: right; color: var(--muted); }

/* Loading */
.loading { color: var(--muted); font-size: .9rem; padding: 2rem 0; }

/* Error */
.error-msg { color: var(--danger); font-size: .9rem; padding: 1rem; background: #fde8e6; border-radius: var(--radius); }

/* Admin nav tabs */
.admin-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.admin-tabs a { padding: .6rem 1.1rem; font-size: .9rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.admin-tabs a.active, .admin-tabs a:hover { color: var(--accent); border-bottom-color: var(--accent); text-decoration: none; }

footer { text-align: center; padding: 2.5rem 0; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--border); margin-top: 3rem; }
